@progress/kendo-react-grid 9.0.0-develop.2 → 9.0.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.
Files changed (68) hide show
  1. package/Grid.js +1 -1
  2. package/Grid.mjs +927 -1042
  3. package/GridNoRecords.js +1 -1
  4. package/GridNoRecords.mjs +7 -14
  5. package/GridToolbar.js +1 -1
  6. package/GridToolbar.mjs +23 -28
  7. package/README.md +34 -33
  8. package/VirtualScroll.js +1 -1
  9. package/VirtualScroll.mjs +63 -58
  10. package/VirtualScrollFixed.js +1 -1
  11. package/VirtualScrollFixed.mjs +16 -14
  12. package/cells/GridCell.mjs +6 -3
  13. package/cells/GridDetailCell.mjs +6 -3
  14. package/cells/GridEditCell.mjs +10 -38
  15. package/cells/GridFilterCell.js +1 -1
  16. package/cells/GridFilterCell.mjs +99 -113
  17. package/cells/GridGroupCell.mjs +24 -30
  18. package/cells/GridHierarchyCell.mjs +2 -13
  19. package/cells/GridSelectionCell.mjs +3 -24
  20. package/columnMenu/GridColumnMenuCheckboxFilter.js +1 -1
  21. package/columnMenu/GridColumnMenuCheckboxFilter.mjs +132 -184
  22. package/columnMenu/GridColumnMenuFilter.js +1 -1
  23. package/columnMenu/GridColumnMenuFilter.mjs +127 -170
  24. package/columnMenu/GridColumnMenuFilterCell.js +1 -1
  25. package/columnMenu/GridColumnMenuFilterCell.mjs +42 -61
  26. package/columnMenu/GridColumnMenuFilterUI.js +1 -1
  27. package/columnMenu/GridColumnMenuFilterUI.mjs +15 -24
  28. package/columnMenu/GridColumnMenuGroup.js +1 -1
  29. package/columnMenu/GridColumnMenuGroup.mjs +29 -40
  30. package/columnMenu/GridColumnMenuItemContent.js +1 -1
  31. package/columnMenu/GridColumnMenuItemContent.mjs +7 -20
  32. package/columnMenu/GridColumnMenuItemGroup.js +1 -1
  33. package/columnMenu/GridColumnMenuItemGroup.mjs +7 -20
  34. package/columnMenu/GridColumnMenuSort.js +1 -1
  35. package/columnMenu/GridColumnMenuSort.mjs +42 -53
  36. package/columnMenu/GridColumnMenuWrapper.mjs +6 -18
  37. package/dist/cdn/js/kendo-react-grid.js +1 -1
  38. package/drag/ColumnDraggable.js +1 -1
  39. package/drag/ColumnDraggable.mjs +34 -33
  40. package/drag/ColumnResize.js +1 -1
  41. package/drag/ColumnResize.mjs +36 -44
  42. package/drag/GroupingIndicator.js +1 -1
  43. package/drag/GroupingIndicator.mjs +51 -83
  44. package/filterCommon.mjs +1 -3
  45. package/footer/Footer.js +1 -1
  46. package/footer/Footer.mjs +40 -57
  47. package/footer/FooterRow.mjs +6 -5
  48. package/header/FilterRow.js +1 -1
  49. package/header/FilterRow.mjs +69 -82
  50. package/header/GridHeaderSelectionCell.js +1 -1
  51. package/header/GridHeaderSelectionCell.mjs +28 -35
  52. package/header/GroupPanel.js +1 -1
  53. package/header/GroupPanel.mjs +43 -49
  54. package/header/Header.js +1 -1
  55. package/header/Header.mjs +70 -74
  56. package/header/HeaderRow.mjs +24 -27
  57. package/index.d.mts +259 -724
  58. package/index.d.ts +259 -724
  59. package/index.js +1 -1
  60. package/index.mjs +78 -80
  61. package/messages/index.mjs +4 -1
  62. package/package-metadata.mjs +1 -1
  63. package/package.json +11 -11
  64. package/rows/GridDetailRow.js +1 -1
  65. package/rows/GridDetailRow.mjs +2 -10
  66. package/rows/GridRow.mjs +10 -8
  67. package/utils/index.js +1 -1
  68. package/utils/index.mjs +35 -39
@@ -6,40 +6,41 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as r from "react";
10
- import { uGrid as s, Draggable as n, classNames as a, UnstyledContext as o } from "@progress/kendo-react-common";
11
- class i extends r.PureComponent {
12
- constructor() {
13
- super(...arguments), this.draggable = null, this.onPress = (t) => {
14
- const e = this.draggable && this.draggable.element;
15
- e && this.props.pressHandler && this.props.pressHandler(t.event, e);
16
- }, this.onDrag = (t) => {
17
- const e = this.draggable && this.draggable.element;
18
- e && this.props.dragHandler && this.props.dragHandler(t.event, e);
19
- }, this.onRelease = (t) => {
20
- this.draggable && this.draggable.element && this.props.releaseHandler && this.props.releaseHandler(t.event);
21
- };
22
- }
23
- render() {
24
- const t = this.context && this.context.uGrid ? this.context.uGrid : s;
25
- return /* @__PURE__ */ r.createElement(
26
- n,
9
+ import * as a from "react";
10
+ import { useUnstyled as d, uGrid as u, Draggable as m, classNames as f } from "@progress/kendo-react-common";
11
+ const R = (e) => {
12
+ const n = a.useRef(null), c = (t) => {
13
+ const r = n.current && n.current.element;
14
+ r && e.pressHandler && e.pressHandler(t.event, r);
15
+ }, s = (t) => {
16
+ const r = n.current && n.current.element;
17
+ r && e.dragHandler && e.dragHandler(t.event, r);
18
+ }, o = (t) => {
19
+ n.current && n.current.element && e.releaseHandler && e.releaseHandler(t.event);
20
+ }, l = d(), i = l && l.uGrid ? l.uGrid : u;
21
+ return /* @__PURE__ */ a.createElement(
22
+ m,
23
+ {
24
+ onPress: c,
25
+ onDrag: s,
26
+ onRelease: o,
27
+ hint: e.dragClue,
28
+ autoScroll: { boundaryElementRef: e.headerRef, direction: { horizontal: !0, vertical: !1 } },
29
+ scrollContainer: e.containerRef || void 0,
30
+ ref: n
31
+ },
32
+ /* @__PURE__ */ a.createElement(
33
+ "tr",
27
34
  {
28
- onPress: this.onPress,
29
- onDrag: this.onDrag,
30
- onRelease: this.onRelease,
31
- hint: this.props.dragClue,
32
- autoScroll: { boundaryElementRef: this.props.headerRef, direction: { horizontal: !0, vertical: !1 } },
33
- scrollContainer: this.props.containerRef || void 0,
34
- ref: (e) => {
35
- this.draggable = e;
36
- }
35
+ className: f(i.simpleTr({})),
36
+ style: { touchAction: "none" },
37
+ role: "row",
38
+ "aria-rowindex": e.ariaRowIndex
37
39
  },
38
- /* @__PURE__ */ r.createElement("tr", { className: a(t.simpleTr({})), style: { touchAction: "none" }, role: "row", "aria-rowindex": this.props.ariaRowIndex }, this.props.children)
39
- );
40
- }
41
- }
42
- i.contextType = o;
40
+ e.children
41
+ )
42
+ );
43
+ };
43
44
  export {
44
- i as ColumnDraggable
45
+ R as ColumnDraggable
45
46
  };
@@ -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 client";"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,l,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 n=s;if(this.isRtl?n+=e.getBoundingClientRect().right-e.offsetWidth/2-c.clientX:n+=c.clientX-e.getBoundingClientRect().left-e.offsetWidth/2,!r&&Math.abs(n-s)<1)return;this.fixateInitialWidths(o.parentElement.clientWidth),this.setWidths(l,Math.floor(n)/s);const d=this.columns.filter(i=>!i.children.length).findIndex(i=>i.id===l.id);this.onResize(d,s,n,t,r,l.id)},this.dblClickHandler=(c,l)=>{const e=this.columns.filter(h=>l.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 n=[this.colGroupMain.parentElement],d=[this.colGroupMain];this.colGroupHeader&&(n.push(this.colGroupHeader.parentElement),d.push(this.colGroupHeader)),this.colGroupFooter&&(n.push(this.colGroupFooter.parentElement),d.push(this.colGroupFooter)),n.forEach(h=>h.classList.add("k-autofitting"));let 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])})}),n.forEach(h=>h.classList.remove("k-autofitting")),this.onResize(s[0],0,0,c,!0,l[0])},this.updateColElements=c=>{const l=this.columns.filter(r=>!r.children.length);let e=1e-10;for(let r=0;r<c.length;r++){const t=c[r],o=l.findIndex(i=>i.id===t.id),s=parseFloat((t.width||0).toString()),n=Math.floor(s);e+=s-n;const d=n+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 l=0,e=this.colGroupMain?this.colGroupMain.children:[];for(let t=0;t<e.length;t++)e[t].width?f-=parseFloat(e[t].width):l++;if(l===0)return;const r=Math.floor(f/l);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 l=this.columns.findIndex(t=>t.id===f.id),e=[];let r=f.children.length;for(let t=l+1;r>0&&t<this.columns.length;t++,r--){const o=this.columns[t];o.children.length?r+=o.children.length:e.push(o)}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,l){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,n)=>s+n,0);!c.locked||t<=o+u||this.columns.forEach(s=>{if(s!=null&&s.locked&&l){const n=f==null?void 0:f.querySelectorAll('[aria-colindex="'+s.ariaColumnIndex+'"]');n==null||n.forEach(d=>{const i=d.style;this.isRtl?(s.index>e&&i&&i.right&&(i.right=parseInt(i.right,10)-l+"px"),s.index<e&&i&&i.left&&(i.left=parseInt(i.left,10)-l+"px")):(s.index>e&&i&&i.left&&(i.left=parseInt(i.left,10)-l+"px"),s.index<e&&i&&i.right&&(i.right=parseInt(i.right,10)-l+"px"))})}})}}exports.ColumnResize=g;
8
+ "use client";"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;r>0&&t<this.columns.length;t++,r--){const o=this.columns[t];o.children.length?r+=o.children.length:e.push(o)}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;
@@ -10,21 +10,21 @@ class u {
10
10
  constructor(f) {
11
11
  this.columns = [], this.resizable = !1, this.isRtl = !1, this.setIsRtl = (c) => {
12
12
  this.isRtl = c;
13
- }, this.dragHandler = (c, l, e, h) => {
13
+ }, this.dragHandler = (c, n, e, h) => {
14
14
  const t = c.originalEvent;
15
15
  h || (t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation());
16
16
  const o = e.closest("th");
17
17
  if (!o || !o)
18
18
  return;
19
19
  const s = o.clientWidth;
20
- let n = s;
21
- if (this.isRtl ? n += e.getBoundingClientRect().right - e.offsetWidth / 2 - c.clientX : n += c.clientX - e.getBoundingClientRect().left - e.offsetWidth / 2, !h && Math.abs(n - s) < 1)
20
+ let l = s;
21
+ if (this.isRtl ? l += e.getBoundingClientRect().right - e.offsetWidth / 2 - c.clientX : l += c.clientX - e.getBoundingClientRect().left - e.offsetWidth / 2, !h && Math.abs(l - s) < 1)
22
22
  return;
23
- this.fixateInitialWidths(o.parentElement.clientWidth), this.setWidths(l, Math.floor(n) / s);
24
- const d = this.columns.filter((i) => !i.children.length).findIndex((i) => i.id === l.id);
25
- this.onResize(d, s, n, t, h, l.id);
26
- }, this.dblClickHandler = (c, l) => {
27
- const e = this.columns.filter((r) => l.indexOf(r.id) > -1);
23
+ this.fixateInitialWidths(o.parentElement.clientWidth), this.setWidths(n, Math.floor(l) / s);
24
+ const d = this.columns.filter((i) => !i.children.length).findIndex((i) => i.id === n.id);
25
+ this.onResize(d, s, l, t, h, n.id);
26
+ }, this.dblClickHandler = (c, n) => {
27
+ const e = this.columns.filter((r) => n.indexOf(r.id) > -1);
28
28
  if (!this.colGroupMain || !e.length)
29
29
  return;
30
30
  const h = {}, t = e;
@@ -38,69 +38,61 @@ class u {
38
38
  o.forEach((r, a) => {
39
39
  h[r.id] && s.push(a);
40
40
  });
41
- const n = [this.colGroupMain.parentElement], d = [this.colGroupMain];
42
- this.colGroupHeader && (n.push(this.colGroupHeader.parentElement), d.push(this.colGroupHeader)), this.colGroupFooter && (n.push(this.colGroupFooter.parentElement), d.push(this.colGroupFooter)), n.forEach((r) => r.classList.add("k-autofitting"));
43
- let i = [];
41
+ const l = [this.colGroupMain.parentElement], d = [this.colGroupMain];
42
+ this.colGroupHeader && (l.push(this.colGroupHeader.parentElement), d.push(this.colGroupHeader)), this.colGroupFooter && (l.push(this.colGroupFooter.parentElement), d.push(this.colGroupFooter)), l.forEach((r) => r.classList.add("k-autofitting"));
43
+ const i = [];
44
44
  d.forEach((r) => {
45
45
  s.forEach((a) => {
46
- r.children[a] && (r.children[a].width = "", i[a] = Math.max(i[a] || 0, r.children[a].offsetWidth + 1));
46
+ r.children[a] && (r.children[a].width = "", i[a] = Math.max(
47
+ i[a] || 0,
48
+ r.children[a].offsetWidth + 1
49
+ ));
47
50
  });
48
51
  }), d.forEach((r) => {
49
52
  s.forEach((a) => {
50
53
  r.children[a] && (r.children[a].width = i[a] + "px", o[a].width = i[a]);
51
54
  });
52
- }), n.forEach((r) => r.classList.remove("k-autofitting")), this.onResize(s[0], 0, 0, c, !0, l[0]);
55
+ }), l.forEach((r) => r.classList.remove("k-autofitting")), this.onResize(s[0], 0, 0, c, !0, n[0]);
53
56
  }, this.updateColElements = (c) => {
54
- const l = this.columns.filter((h) => !h.children.length);
57
+ const n = this.columns.filter((h) => !h.children.length);
55
58
  let e = 1e-10;
56
59
  for (let h = 0; h < c.length; h++) {
57
- const t = c[h], o = l.findIndex((i) => i.id === t.id), s = parseFloat((t.width || 0).toString()), n = Math.floor(s);
58
- e += s - n;
59
- const d = n + Math.floor(e);
60
+ const t = c[h], o = n.findIndex((i) => i.id === t.id), s = parseFloat((t.width || 0).toString()), l = Math.floor(s);
61
+ e += s - l;
62
+ const d = l + Math.floor(e);
60
63
  if (e -= Math.floor(e), this.colGroupMain && this.colGroupMain.children[o]) {
61
64
  const i = parseInt(this.colGroupMain.children[o].width, 10);
62
- this.colGroupMain.children[o].width = d + "px", this.updateNextLockedCol(
63
- this.colGroupMain.parentElement,
64
- t,
65
- i - d
66
- );
65
+ this.colGroupMain.children[o].width = d + "px", this.updateNextLockedCol(this.colGroupMain.parentElement, t, i - d);
67
66
  }
68
67
  if (this.colGroupHeader && this.colGroupHeader.children[o]) {
69
68
  const i = parseInt(this.colGroupHeader.children[o].width, 10);
70
- this.colGroupHeader.children[o].width = d + "px", this.updateNextLockedCol(
71
- this.colGroupHeader.parentElement,
72
- t,
73
- i - d
74
- );
69
+ this.colGroupHeader.children[o].width = d + "px", this.updateNextLockedCol(this.colGroupHeader.parentElement, t, i - d);
75
70
  }
76
71
  if (this.colGroupFooter && this.colGroupFooter.children[o]) {
77
72
  const i = parseInt(this.colGroupFooter.children[o].width, 10);
78
- this.colGroupFooter.children[o].width = d + "px", this.updateNextLockedCol(
79
- this.colGroupFooter.parentElement,
80
- t,
81
- i - d
82
- );
73
+ this.colGroupFooter.children[o].width = d + "px", this.updateNextLockedCol(this.colGroupFooter.parentElement, t, i - d);
83
74
  }
84
75
  }
85
76
  }, this.onResize = f;
86
77
  }
87
78
  fixateInitialWidths(f) {
88
79
  const c = this.columns.filter((t) => !t.children.length);
89
- let l = 0, e = this.colGroupMain ? this.colGroupMain.children : [];
80
+ let n = 0;
81
+ const e = this.colGroupMain ? this.colGroupMain.children : [];
90
82
  for (let t = 0; t < e.length; t++)
91
- e[t].width ? f -= parseFloat(e[t].width) : l++;
92
- if (l === 0)
83
+ e[t].width ? f -= parseFloat(e[t].width) : n++;
84
+ if (n === 0)
93
85
  return;
94
- const h = Math.floor(f / l);
86
+ const h = Math.floor(f / n);
95
87
  for (let t = 0; t < e.length; t++) {
96
88
  const o = e[t];
97
89
  o.width || (o.width = h, c[t].width = h.toString(), this.colGroupHeader && (this.colGroupHeader.children[t].width = h), this.colGroupFooter && (this.colGroupFooter.children[t].width = h));
98
90
  }
99
91
  }
100
92
  setWidths(f, c) {
101
- const l = this.columns.findIndex((t) => t.id === f.id), e = [];
93
+ const n = this.columns.findIndex((t) => t.id === f.id), e = [];
102
94
  let h = f.children.length;
103
- for (let t = l + 1; h > 0 && t < this.columns.length; t++, h--) {
95
+ for (let t = n + 1; h > 0 && t < this.columns.length; t++, h--) {
104
96
  const o = this.columns[t];
105
97
  o.children.length ? h += o.children.length : e.push(o);
106
98
  }
@@ -110,14 +102,14 @@ class u {
110
102
  o < s && (o = s), t.width = o;
111
103
  }), this.updateColElements(e), e;
112
104
  }
113
- updateNextLockedCol(f, c, l) {
114
- const e = c.index, h = this.colGroupMain.parentElement.closest(".k-grid"), t = h == null ? void 0 : h.clientWidth, o = this.columns.filter((s) => s.locked).map((s) => parseInt(s.width + "", 10)).reduce((s, n) => s + n, 0);
105
+ updateNextLockedCol(f, c, n) {
106
+ const e = c.index, h = this.colGroupMain.parentElement.closest(".k-grid"), t = h == null ? void 0 : h.clientWidth, o = this.columns.filter((s) => s.locked).map((s) => parseInt(s.width + "", 10)).reduce((s, l) => s + l, 0);
115
107
  !c.locked || t <= o + 20 || this.columns.forEach((s) => {
116
- if (s != null && s.locked && l) {
117
- const n = f == null ? void 0 : f.querySelectorAll('[aria-colindex="' + s.ariaColumnIndex + '"]');
118
- n == null || n.forEach((d) => {
108
+ if (s != null && s.locked && n) {
109
+ const l = f == null ? void 0 : f.querySelectorAll('[aria-colindex="' + s.ariaColumnIndex + '"]');
110
+ l == null || l.forEach((d) => {
119
111
  const i = d.style;
120
- this.isRtl ? (s.index > e && i && i.right && (i.right = parseInt(i.right, 10) - l + "px"), s.index < e && i && i.left && (i.left = parseInt(i.left, 10) - l + "px")) : (s.index > e && i && i.left && (i.left = parseInt(i.left, 10) - l + "px"), s.index < e && i && i.right && (i.right = parseInt(i.right, 10) - l + "px"));
112
+ 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"));
121
113
  });
122
114
  }
123
115
  });
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),n=require("@progress/kendo-react-common"),l=require("@progress/kendo-react-intl"),r=require("@progress/kendo-svg-icons");function p(s){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:()=>s[t]})}}return e.default=s,Object.freeze(e)}const o=p(c);class i extends o.Component{constructor(){super(...arguments),this.draggable=null,this.onPress=e=>{const t=this.draggable&&this.draggable.element;t&&this.props.onPress&&this.props.onPress(e.event,t)},this.onDrag=e=>{const t=this.draggable&&this.draggable.element;t&&this.props.onDrag&&this.props.onDrag(e.event,t)},this.onRelease=e=>{this.draggable&&this.draggable.element&&this.props.onRelease&&this.props.onRelease(e.event)},this.sortChange=e=>{if(e.preventDefault(),this.props.onSortChange){const t=this.props.dir==="asc"?"desc":"asc";this.props.onSortChange(e,t)}},this.handleKeyDown=e=>{(e.keyCode===n.Keys.delete||e.keyCode===n.Keys.backspace)&&(e.preventDefault(),e.stopPropagation(),this.props.onRemove&&this.props.onRemove(e))},this.groupRemove=e=>{e.preventDefault(),e.stopPropagation(),this.props.onRemove&&this.props.onRemove(e)},this.onContextMenu=e=>{const t={title:this.props.title,dir:this.props.dir,index:this.props.index};this.props.onContextMenu&&this.props.onContextMenu.call(void 0,e,{dataItem:{...t}})}}render(){const{dir:e}=this.props;return o.createElement(n.Draggable,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:t=>{this.draggable=t}},o.createElement("div",{className:"k-chip k-chip-md k-chip-solid k-chip-solid-base k-rounded-md",onClick:this.sortChange,onContextMenu:this.onContextMenu,onKeyDown:this.handleKeyDown,tabIndex:0,role:"button",style:{touchAction:"none"}},o.createElement("span",null,o.createElement(n.IconWrap,{name:"sort-"+e+"-small",icon:e==="asc"?r.sortAscSmallIcon:r.sortDescSmallIcon,size:"small"})),o.createElement("span",{className:"k-chip-content"},this.props.title),o.createElement("span",{className:"k-chip-actions"},o.createElement("span",{className:"k-chip-action k-chip-remove-action",onClick:this.groupRemove},o.createElement(n.IconWrap,{name:"x-circle",icon:r.xCircleIcon,size:"small"})))))}}l.registerForLocalization(i);exports.GroupingIndicator=i;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),l=require("@progress/kendo-react-common"),i=require("@progress/kendo-svg-icons");function h(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const c=h(b),y=e=>{const t=c.useRef(null),a=n=>{const o=t.current&&t.current.element;o&&e.onPress&&e.onPress(n.event,o)},r=n=>{const o=t.current&&t.current.element;o&&e.onDrag&&e.onDrag(n.event,o)},m=n=>{t.current&&t.current.element&&e.onRelease&&e.onRelease(n.event)},u=n=>{if(n.preventDefault(),e.onSortChange){const o=e.dir==="asc"?"desc":"asc";e.onSortChange(n,o)}},d=n=>{(n.keyCode===l.Keys.delete||n.keyCode===l.Keys.backspace)&&(n.preventDefault(),n.stopPropagation(),e.onRemove&&e.onRemove(n))},f=n=>{n.preventDefault(),n.stopPropagation(),e.onRemove&&e.onRemove(n)},g=n=>{const o={title:e.title,dir:e.dir,index:e.index};e.onContextMenu&&e.onContextMenu.call(void 0,n,{dataItem:{...o}})},{dir:s,title:k}=e;return c.createElement(l.Draggable,{onPress:a,onDrag:r,onRelease:m,ref:t},c.createElement("div",{className:"k-chip k-chip-md k-chip-solid k-chip-solid-base k-rounded-md",onClick:u,onContextMenu:g,onKeyDown:d,tabIndex:0,role:"button",style:{touchAction:"none"}},c.createElement("span",null,c.createElement(l.IconWrap,{name:"sort-"+s+"-small",icon:s==="asc"?i.sortAscSmallIcon:i.sortDescSmallIcon,size:"small"})),c.createElement("span",{className:"k-chip-content"},k),c.createElement("span",{className:"k-chip-actions"},c.createElement("span",{className:"k-chip-action k-chip-remove-action",onClick:f},c.createElement(l.IconWrap,{name:"x-circle",icon:i.xCircleIcon,size:"small"})))))};exports.GroupingIndicator=y;
@@ -6,90 +6,58 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as s from "react";
10
- import { Keys as o, Draggable as i, IconWrap as n } from "@progress/kendo-react-common";
11
- import { registerForLocalization as r } from "@progress/kendo-react-intl";
12
- import { sortAscSmallIcon as a, sortDescSmallIcon as p, xCircleIcon as l } from "@progress/kendo-svg-icons";
13
- class c extends s.Component {
14
- constructor() {
15
- super(...arguments), this.draggable = null, this.onPress = (e) => {
16
- const t = this.draggable && this.draggable.element;
17
- t && this.props.onPress && this.props.onPress(e.event, t);
18
- }, this.onDrag = (e) => {
19
- const t = this.draggable && this.draggable.element;
20
- t && this.props.onDrag && this.props.onDrag(e.event, t);
21
- }, this.onRelease = (e) => {
22
- this.draggable && this.draggable.element && this.props.onRelease && this.props.onRelease(e.event);
23
- }, this.sortChange = (e) => {
24
- if (e.preventDefault(), this.props.onSortChange) {
25
- const t = this.props.dir === "asc" ? "desc" : "asc";
26
- this.props.onSortChange(e, t);
27
- }
28
- }, this.handleKeyDown = (e) => {
29
- (e.keyCode === o.delete || e.keyCode === o.backspace) && (e.preventDefault(), e.stopPropagation(), this.props.onRemove && this.props.onRemove(e));
30
- }, this.groupRemove = (e) => {
31
- e.preventDefault(), e.stopPropagation(), this.props.onRemove && this.props.onRemove(e);
32
- }, this.onContextMenu = (e) => {
33
- const t = {
34
- title: this.props.title,
35
- dir: this.props.dir,
36
- index: this.props.index
37
- };
38
- this.props.onContextMenu && this.props.onContextMenu.call(void 0, e, { dataItem: { ...t } });
9
+ import * as o from "react";
10
+ import { Draggable as h, IconWrap as l, Keys as i } from "@progress/kendo-react-common";
11
+ import { sortAscSmallIcon as C, sortDescSmallIcon as D, xCircleIcon as R } from "@progress/kendo-svg-icons";
12
+ const I = (n) => {
13
+ const c = o.useRef(null), s = (e) => {
14
+ const t = c.current && c.current.element;
15
+ t && n.onPress && n.onPress(e.event, t);
16
+ }, r = (e) => {
17
+ const t = c.current && c.current.element;
18
+ t && n.onDrag && n.onDrag(e.event, t);
19
+ }, m = (e) => {
20
+ c.current && c.current.element && n.onRelease && n.onRelease(e.event);
21
+ }, d = (e) => {
22
+ if (e.preventDefault(), n.onSortChange) {
23
+ const t = n.dir === "asc" ? "desc" : "asc";
24
+ n.onSortChange(e, t);
25
+ }
26
+ }, u = (e) => {
27
+ (e.keyCode === i.delete || e.keyCode === i.backspace) && (e.preventDefault(), e.stopPropagation(), n.onRemove && n.onRemove(e));
28
+ }, f = (e) => {
29
+ e.preventDefault(), e.stopPropagation(), n.onRemove && n.onRemove(e);
30
+ }, g = (e) => {
31
+ const t = {
32
+ title: n.title,
33
+ dir: n.dir,
34
+ index: n.index
39
35
  };
40
- }
41
- render() {
42
- const { dir: e } = this.props;
43
- return /* @__PURE__ */ s.createElement(
44
- i,
36
+ n.onContextMenu && n.onContextMenu.call(void 0, e, { dataItem: { ...t } });
37
+ }, { dir: a, title: k } = n;
38
+ return /* @__PURE__ */ o.createElement(h, { onPress: s, onDrag: r, onRelease: m, ref: c }, /* @__PURE__ */ o.createElement(
39
+ "div",
40
+ {
41
+ className: "k-chip k-chip-md k-chip-solid k-chip-solid-base k-rounded-md",
42
+ onClick: d,
43
+ onContextMenu: g,
44
+ onKeyDown: u,
45
+ tabIndex: 0,
46
+ role: "button",
47
+ style: { touchAction: "none" }
48
+ },
49
+ /* @__PURE__ */ o.createElement("span", null, /* @__PURE__ */ o.createElement(
50
+ l,
45
51
  {
46
- onPress: this.onPress,
47
- onDrag: this.onDrag,
48
- onRelease: this.onRelease,
49
- ref: (t) => {
50
- this.draggable = t;
51
- }
52
- },
53
- /* @__PURE__ */ s.createElement(
54
- "div",
55
- {
56
- className: "k-chip k-chip-md k-chip-solid k-chip-solid-base k-rounded-md",
57
- onClick: this.sortChange,
58
- onContextMenu: this.onContextMenu,
59
- onKeyDown: this.handleKeyDown,
60
- tabIndex: 0,
61
- role: "button",
62
- style: { touchAction: "none" }
63
- },
64
- /* @__PURE__ */ s.createElement("span", null, /* @__PURE__ */ s.createElement(
65
- n,
66
- {
67
- name: "sort-" + e + "-small",
68
- icon: e === "asc" ? a : p,
69
- size: "small"
70
- }
71
- )),
72
- /* @__PURE__ */ s.createElement("span", { className: "k-chip-content" }, this.props.title),
73
- /* @__PURE__ */ s.createElement("span", { className: "k-chip-actions" }, /* @__PURE__ */ s.createElement(
74
- "span",
75
- {
76
- className: "k-chip-action k-chip-remove-action",
77
- onClick: this.groupRemove
78
- },
79
- /* @__PURE__ */ s.createElement(
80
- n,
81
- {
82
- name: "x-circle",
83
- icon: l,
84
- size: "small"
85
- }
86
- )
87
- ))
88
- )
89
- );
90
- }
91
- }
92
- r(c);
52
+ name: "sort-" + a + "-small",
53
+ icon: a === "asc" ? C : D,
54
+ size: "small"
55
+ }
56
+ )),
57
+ /* @__PURE__ */ o.createElement("span", { className: "k-chip-content" }, k),
58
+ /* @__PURE__ */ o.createElement("span", { className: "k-chip-actions" }, /* @__PURE__ */ o.createElement("span", { className: "k-chip-action k-chip-remove-action", onClick: f }, /* @__PURE__ */ o.createElement(l, { name: "x-circle", icon: R, size: "small" })))
59
+ ));
60
+ };
93
61
  export {
94
- c as GroupingIndicator
62
+ I as GroupingIndicator
95
63
  };
package/filterCommon.mjs CHANGED
@@ -43,9 +43,7 @@ const f = [
43
43
  { text: "grid.filterIsNullOperator", operator: "isnull" },
44
44
  { text: "grid.filterIsNotNullOperator", operator: "isnotnull" }
45
45
  ],
46
- boolean: [
47
- { text: "grid.filterEqOperator", operator: "eq" }
48
- ]
46
+ boolean: [{ text: "grid.filterEqOperator", operator: "eq" }]
49
47
  }, i = (t) => t === "isnull" || t === "isnotnull" || t === "isempty" || t === "isnotempty", d = (t, o) => t.map((e) => ({
50
48
  text: o.toLanguageString(e.text, l[e.text]),
51
49
  operator: e.operator
package/footer/Footer.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),a=require("@progress/kendo-react-common");function l(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const o in r)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(r,o);Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}return e.default=r,Object.freeze(e)}const t=l(i);class n extends t.Component{constructor(){super(...arguments),this.footerWrap=null,this.table=null}componentDidMount(){this.setState({})}setScrollLeft(e){this.footerWrap&&(this.footerWrap.scrollLeft=e)}setWidth(e){this.table&&(this.table.style.width=e+"px")}render(){return this.props.staticHeaders?t.createElement("div",{className:"k-grid-footer",role:"presentation"},t.createElement("div",{ref:e=>{this.footerWrap=e},className:"k-grid-footer-wrap",style:this.props.hasScrollbarWidth?{}:{borderWidth:0},role:"presentation"},t.createElement("table",{ref:e=>{this.table=e},className:a.classNames("k-table k-grid-footer-table",{"k-table-md":!this.props.size,[`k-table-${a.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),role:"presentation"},t.createElement("colgroup",{ref:e=>{this.props.columnResize.colGroupFooter=e},role:"presentation"},this.props.cols),t.createElement("tfoot",{className:"k-table-tfoot",role:"presentation"},this.props.row)))):t.createElement("tfoot",{className:"k-table-tfoot"},this.props.row)}}exports.Footer=n;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),n=require("@progress/kendo-react-common");function i(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return a.default=e,Object.freeze(a)}const t=i(s),c=t.forwardRef((e,a)=>{const r=t.useRef(null),o=t.useRef(null);return t.useImperativeHandle(a,()=>({setScrollLeft:l=>{r.current&&(r.current.scrollLeft=l)},setWidth:l=>{o.current&&(o.current.style.width=l+"px")}})),e.staticHeaders?t.createElement("div",{className:"k-grid-footer",role:"presentation"},t.createElement("div",{ref:r,className:"k-grid-footer-wrap",style:e.hasScrollbarWidth?{}:{borderWidth:0},role:"presentation"},t.createElement("table",{ref:o,className:n.classNames("k-table k-grid-footer-table",{"k-table-md":!e.size,[`k-table-${n.kendoThemeMaps.sizeMap[e.size]||e.size}`]:e.size},e.className),role:"presentation"},t.createElement("colgroup",{ref:l=>{e.columnResize.colGroupFooter=l},role:"presentation"},e.cols),t.createElement("tfoot",{className:"k-table-tfoot",role:"presentation"},e.row)))):t.createElement("tfoot",{className:"k-table-tfoot"},e.row)});c.displayName="KendoReactFooter";exports.Footer=c;
package/footer/Footer.mjs CHANGED
@@ -7,70 +7,53 @@
7
7
  */
8
8
  "use client";
9
9
  import * as t from "react";
10
- import { classNames as s, kendoThemeMaps as r } from "@progress/kendo-react-common";
11
- class i extends t.Component {
12
- constructor() {
13
- super(...arguments), this.footerWrap = null, this.table = null;
14
- }
15
- componentDidMount() {
16
- this.setState({});
17
- }
18
- /**
19
- *
20
- * @param scrollLeft - Scrolls to the left (in pixels).
21
- */
22
- setScrollLeft(e) {
23
- this.footerWrap && (this.footerWrap.scrollLeft = e);
24
- }
25
- /**
26
- *
27
- * @param width - Scrolls the width (in pixels).
28
- */
29
- setWidth(e) {
30
- this.table && (this.table.style.width = e + "px");
31
- }
32
- render() {
33
- return this.props.staticHeaders ? /* @__PURE__ */ t.createElement(
34
- "div",
10
+ import { classNames as s, kendoThemeMaps as n } from "@progress/kendo-react-common";
11
+ const c = t.forwardRef((e, o) => {
12
+ const a = t.useRef(null), l = t.useRef(null);
13
+ return t.useImperativeHandle(o, () => ({
14
+ setScrollLeft: (r) => {
15
+ a.current && (a.current.scrollLeft = r);
16
+ },
17
+ setWidth: (r) => {
18
+ l.current && (l.current.style.width = r + "px");
19
+ }
20
+ })), e.staticHeaders ? /* @__PURE__ */ t.createElement("div", { className: "k-grid-footer", role: "presentation" }, /* @__PURE__ */ t.createElement(
21
+ "div",
22
+ {
23
+ ref: a,
24
+ className: "k-grid-footer-wrap",
25
+ style: e.hasScrollbarWidth ? {} : { borderWidth: 0 },
26
+ role: "presentation"
27
+ },
28
+ /* @__PURE__ */ t.createElement(
29
+ "table",
35
30
  {
36
- className: "k-grid-footer",
31
+ ref: l,
32
+ className: s(
33
+ "k-table k-grid-footer-table",
34
+ {
35
+ "k-table-md": !e.size,
36
+ [`k-table-${n.sizeMap[e.size] || e.size}`]: e.size
37
+ },
38
+ e.className
39
+ ),
37
40
  role: "presentation"
38
41
  },
39
42
  /* @__PURE__ */ t.createElement(
40
- "div",
43
+ "colgroup",
41
44
  {
42
- ref: (e) => {
43
- this.footerWrap = e;
45
+ ref: (r) => {
46
+ e.columnResize.colGroupFooter = r;
44
47
  },
45
- className: "k-grid-footer-wrap",
46
- style: this.props.hasScrollbarWidth ? {} : { borderWidth: 0 },
47
48
  role: "presentation"
48
49
  },
49
- /* @__PURE__ */ t.createElement(
50
- "table",
51
- {
52
- ref: (e) => {
53
- this.table = e;
54
- },
55
- className: s(
56
- "k-table k-grid-footer-table",
57
- {
58
- "k-table-md": !this.props.size,
59
- [`k-table-${r.sizeMap[this.props.size] || this.props.size}`]: this.props.size
60
- },
61
- this.props.className
62
- ),
63
- role: "presentation"
64
- },
65
- /* @__PURE__ */ t.createElement("colgroup", { ref: (e) => {
66
- this.props.columnResize.colGroupFooter = e;
67
- }, role: "presentation" }, this.props.cols),
68
- /* @__PURE__ */ t.createElement("tfoot", { className: "k-table-tfoot", role: "presentation" }, this.props.row)
69
- )
70
- )
71
- ) : /* @__PURE__ */ t.createElement("tfoot", { className: "k-table-tfoot" }, this.props.row);
72
- }
73
- }
50
+ e.cols
51
+ ),
52
+ /* @__PURE__ */ t.createElement("tfoot", { className: "k-table-tfoot", role: "presentation" }, e.row)
53
+ )
54
+ )) : /* @__PURE__ */ t.createElement("tfoot", { className: "k-table-tfoot" }, e.row);
55
+ });
56
+ c.displayName = "KendoReactFooter";
74
57
  export {
75
- i as Footer
58
+ c as Footer
76
59
  };
@@ -14,10 +14,7 @@ const k = (t) => {
14
14
  const { column: e, index: l, isRtl: r, id: c, cells: s } = t, d = b(c), a = {
15
15
  colSpan: e.colSpan !== 1 ? e.colSpan : void 0,
16
16
  style: e.left !== void 0 ? r ? { left: e.right, right: e.left } : { left: e.left, right: e.right } : {},
17
- className: C(
18
- "k-table-td",
19
- e.locked && e.left !== void 0 ? "k-grid-footer-sticky" : ""
20
- ),
17
+ className: C("k-table-td", e.locked && e.left !== void 0 ? "k-grid-footer-sticky" : ""),
21
18
  key: l,
22
19
  role: "gridcell",
23
20
  "aria-colindex": e.ariaColumnIndex,
@@ -33,7 +30,11 @@ const k = (t) => {
33
30
  }
34
31
  return e.footerCell && /* @__PURE__ */ o.createElement(e.footerCell, { ...n, key: l }) || /* @__PURE__ */ o.createElement("td", { ...a });
35
32
  }, I = (t) => /* @__PURE__ */ o.createElement("tr", { className: "k-table-row", role: "row", "aria-rowindex": t.ariaRowIndex }, f(t.columns).map((e, l) => {
36
- const r = g.generateNavigatableId(`${l}-footercell`, t.idPrefix, "nodata");
33
+ const r = g.generateNavigatableId(
34
+ `${l}-footercell`,
35
+ t.idPrefix,
36
+ "nodata"
37
+ );
37
38
  return /* @__PURE__ */ o.createElement(
38
39
  k,
39
40
  {
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react"),x=require("@progress/kendo-react-intl"),S=require("../cells/GridFilterCell.js"),d=require("../filterCommon.js"),k=require("@progress/kendo-react-data-tools"),C=require("../messages/index.js"),T=require("@progress/kendo-react-common"),O=require("../utils/index.js");function q(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const r in a)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(a,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>a[r]})}}return t.default=a,Object.freeze(t)}const n=q(L),y="k-table-row k-filter-row";class m extends n.Component{headerCellClassName(t,r){let i=`${r?"k-grid-header-sticky":""}`;return this.props.sort&&this.props.sort.filter(c=>c.field===t).length>0&&(i+=" k-sorted"),i}setFilter(t,r,i,c){if(!this.props.filterChange)return;const o=[];(t!==""&&t!==null||r!=="")&&o.push({field:i,operator:r,value:t}),this.props.filter&&this.props.filter.filters&&(this.props.filter.filters||[]).forEach(s=>{const l=s;l&&l.field!==i&&o.push(l)});const h=this.props.filter&&this.props.filter.logic?this.props.filter.logic:"and";this.props.filterChange(o.length>0?{logic:h,filters:o}:null,c)}render(){const t=x.provideLocalizationService(this),r=this.props.filter&&this.props.filter.filters||[],i=e=>{if(e===void 0)return;const s=r.filter(l=>l.field===e);return s.length?s[0]:void 0};let c=0,o=-1;const h=this.props.columns.filter(e=>e.children.length===0).map(e=>{const s=d.getFilterType(e.filter),l=i(e.field),b=e.filterable?t.toLanguageString(C.filterAriaLabel,C.messages[C.filterAriaLabel]):void 0;let g=l&&l.value;g===void 0&&(g=s==="text"?"":null);const f=e.filterable&&{render:this.props.cellRender,field:e.field,title:e.filterTitle,value:g,operator:l&&l.operator,operators:d.operatorMap(this.props.filterOperators[s]||[],t),booleanValues:d.operatorMap(d.booleanFilterValues,t),filterType:s,ariaLabel:b,onChange:p=>{this.setFilter(p.value,p.operator,e.field,p.syntheticEvent)}},v=e.declarationIndex>=0?++o:--c,E={ariaLabel:b,ariaColumnIndex:e.ariaColumnIndex},I=e.left!==void 0?this.props.isRtl?{left:e.right,right:e.left}:{left:e.left,right:e.right}:{},F={columnId:k.tableKeyboardNavigationTools.getFilterColumnId(e.id),navigatable:e.navigatable||this.props.navigatable,style:I,className:T.classNames("k-table-th",this.headerCellClassName(e.field,e.locked)||void 0),role:"columnheader",...E},R=f&&(e.filterCell?n.createElement(e.filterCell,{...f}):n.createElement(S.GridFilterCell,{size:this.props.size,...f})),u=O.resolveCells(this.props.cells,e.cells);if(u&&u.filterCell){const p=u.filterCell;return n.createElement(p,{key:v,...f,thProps:F,index:o},R)}return n.createElement(k.HeaderThElement,{key:v,...F},R)});return n.createElement("tr",{className:y,"aria-rowindex":this.props.ariaRowIndex,role:"row"},h)}}x.registerForLocalization(m);exports.FILTER_ROW_CLASS=y;exports.FilterRow=m;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),O=require("@progress/kendo-react-intl"),S=require("../cells/GridFilterCell.js"),u=require("../filterCommon.js"),y=require("@progress/kendo-react-data-tools"),v=require("../messages/index.js"),q=require("@progress/kendo-react-common"),w=require("../utils/index.js");function _(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const g=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(a,n,g.get?g:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const d=_(m),x="k-table-row k-filter-row",A=t=>{const a=O.useLocalization(),n=(e,r)=>{let l=`${r?"k-grid-header-sticky":""}`;return t.sort&&t.sort.filter(o=>o.field===e).length>0&&(l+=" k-sorted"),l},g=(e,r,l,o)=>{if(!t.filterChange)return;const i=[];(e!==""&&e!==null||r!=="")&&i.push({field:l,operator:r,value:e}),t.filter&&t.filter.filters&&(t.filter.filters||[]).forEach(b=>{const c=b;c&&c.field!==l&&i.push(c)});const s=t.filter&&t.filter.logic?t.filter.logic:"and";t.filterChange(i.length>0?{logic:s,filters:i}:null,o)},L=t.filter&&t.filter.filters||[],E=e=>{if(e===void 0)return;const r=L.filter(l=>l.field===e);return r.length?r[0]:void 0};let I=0,F=-1;const T=t.columns.filter(e=>e.children.length===0).map(e=>{const r=u.getFilterType(e.filter),l=E(e.field),o=e.filterable?a.toLanguageString(v.filterAriaLabel,v.messages[v.filterAriaLabel]):void 0;let i=l&&l.value;i===void 0&&(i=r==="text"?"":null);const s=e.filterable&&{render:t.cellRender,field:e.field,title:e.filterTitle,value:i,operator:l&&l.operator,operators:u.operatorMap(t.filterOperators[r]||[],a),booleanValues:u.operatorMap(u.booleanFilterValues,a),filterType:r,ariaLabel:o,onChange:f=>{g(f.value,f.operator,e.field,f.syntheticEvent)}},C=e.declarationIndex>=0?++F:--I,b={ariaLabel:o,ariaColumnIndex:e.ariaColumnIndex},c=e.left!==void 0?t.isRtl?{left:e.right,right:e.left}:{left:e.left,right:e.right}:{},R={columnId:y.tableKeyboardNavigationTools.getFilterColumnId(e.id),navigatable:e.navigatable||t.navigatable,style:c,className:q.classNames("k-table-th",n(e.field,e.locked)||void 0),role:"columnheader",...b},k=s&&(e.filterCell?d.createElement(e.filterCell,{...s}):d.createElement(S.GridFilterCell,{size:t.size,...s})),h=w.resolveCells(t.cells,e.cells);if(h&&h.filterCell){const f=h.filterCell;return d.createElement(f,{key:C,...s,thProps:R,index:F},k)}return d.createElement(y.HeaderThElement,{key:C,...R},k)});return d.createElement("tr",{className:x,"aria-rowindex":t.ariaRowIndex,role:"row"},T)};exports.FILTER_ROW_CLASS=x;exports.FilterRow=A;