@progress/kendo-react-grid 9.0.0-develop.9 → 9.0.1-develop.1

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 (51) 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/VirtualScroll.js +1 -1
  8. package/VirtualScroll.mjs +53 -51
  9. package/VirtualScrollFixed.js +1 -1
  10. package/VirtualScrollFixed.mjs +16 -14
  11. package/cells/GridFilterCell.js +1 -1
  12. package/cells/GridFilterCell.mjs +99 -113
  13. package/columnMenu/GridColumnMenuCheckboxFilter.js +1 -1
  14. package/columnMenu/GridColumnMenuCheckboxFilter.mjs +132 -178
  15. package/columnMenu/GridColumnMenuFilter.js +1 -1
  16. package/columnMenu/GridColumnMenuFilter.mjs +123 -156
  17. package/columnMenu/GridColumnMenuFilterCell.js +1 -1
  18. package/columnMenu/GridColumnMenuFilterCell.mjs +42 -53
  19. package/columnMenu/GridColumnMenuFilterUI.js +1 -1
  20. package/columnMenu/GridColumnMenuFilterUI.mjs +15 -17
  21. package/columnMenu/GridColumnMenuGroup.js +1 -1
  22. package/columnMenu/GridColumnMenuGroup.mjs +29 -40
  23. package/columnMenu/GridColumnMenuItemContent.js +1 -1
  24. package/columnMenu/GridColumnMenuItemContent.mjs +7 -20
  25. package/columnMenu/GridColumnMenuItemGroup.js +1 -1
  26. package/columnMenu/GridColumnMenuItemGroup.mjs +7 -20
  27. package/columnMenu/GridColumnMenuSort.js +1 -1
  28. package/columnMenu/GridColumnMenuSort.mjs +42 -53
  29. package/dist/cdn/js/kendo-react-grid.js +1 -1
  30. package/drag/ColumnDraggable.js +1 -1
  31. package/drag/ColumnDraggable.mjs +34 -45
  32. package/drag/GroupingIndicator.js +1 -1
  33. package/drag/GroupingIndicator.mjs +51 -69
  34. package/footer/Footer.js +1 -1
  35. package/footer/Footer.mjs +40 -57
  36. package/header/FilterRow.js +1 -1
  37. package/header/FilterRow.mjs +70 -78
  38. package/header/GridHeaderSelectionCell.js +1 -1
  39. package/header/GridHeaderSelectionCell.mjs +28 -37
  40. package/header/GroupPanel.js +1 -1
  41. package/header/GroupPanel.mjs +43 -49
  42. package/header/Header.js +1 -1
  43. package/header/Header.mjs +70 -89
  44. package/index.d.mts +261 -725
  45. package/index.d.ts +261 -725
  46. package/index.js +1 -1
  47. package/index.mjs +78 -80
  48. package/package-metadata.mjs +1 -1
  49. package/package.json +11 -11
  50. package/rows/GridDetailRow.js +1 -1
  51. package/rows/GridDetailRow.mjs +2 -10
package/GridNoRecords.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 s=require("react"),a=require("@progress/kendo-react-intl"),o=require("./messages/index.js");function l(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const u=l(s),c=class c extends u.Component{render(){return this.props.children||a.provideLocalizationService(this).toLanguageString(o.noRecords,o.messages[o.noRecords])}};c.displayName="KendoReactGridNoRecords";let r=c;a.registerForLocalization(r);exports.GridNoRecords=r;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@progress/kendo-react-intl"),e=require("./messages/index.js"),o=r=>{const n=t.useLocalization();return r.children||n.toLanguageString(e.noRecords,e.messages[e.noRecords])};o.displayName="KendoReactGridNoRecords";exports.GridNoRecords=o;
package/GridNoRecords.mjs CHANGED
@@ -6,20 +6,13 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as r from "react";
10
- import { provideLocalizationService as i, registerForLocalization as s } from "@progress/kendo-react-intl";
11
- import { noRecords as o, messages as a } from "./messages/index.mjs";
12
- const t = class t extends r.Component {
13
- /**
14
- * @hidden
15
- */
16
- render() {
17
- return this.props.children || i(this).toLanguageString(o, a[o]);
18
- }
9
+ import { useLocalization as i } from "@progress/kendo-react-intl";
10
+ import { noRecords as o, messages as t } from "./messages/index.mjs";
11
+ const n = (e) => {
12
+ const r = i();
13
+ return e.children || r.toLanguageString(o, t[o]);
19
14
  };
20
- t.displayName = "KendoReactGridNoRecords";
21
- let e = t;
22
- s(e);
15
+ n.displayName = "KendoReactGridNoRecords";
23
16
  export {
24
- e as GridNoRecords
17
+ n as GridNoRecords
25
18
  };
package/GridToolbar.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 l=require("react"),i=require("@progress/kendo-react-common");function c(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const n=c(l),s=class s extends n.Component{render(){return n.createElement("div",{className:i.classNames("k-toolbar k-grid-toolbar k-toolbar-solid",{"k-toolbar-md":!this.props.size,[`k-toolbar-${i.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),"aria-label":this.props.ariaLabel,"aria-controls":this.props.ariaControls,role:"toolbar"},this.props.children)}};s.displayName="KendoReactGridToolbar";let r=s;exports.GridToolbar=r;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),r=require("@progress/kendo-react-common");function s(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:()=>o[t]})}}return e.default=o,Object.freeze(e)}const b=s(i),l=o=>{const{size:e,className:t,ariaLabel:a,ariaControls:n,children:c}=o;return b.createElement("div",{className:r.classNames("k-toolbar k-grid-toolbar k-toolbar-solid",{"k-toolbar-md":!e,[`k-toolbar-${r.kendoThemeMaps.sizeMap[e]||e}`]:e},t),"aria-label":a,"aria-controls":n,role:"toolbar"},c)};l.displayName="KendoReactGridToolbar";exports.GridToolbar=l;
package/GridToolbar.mjs CHANGED
@@ -6,34 +6,29 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as o from "react";
10
- import { classNames as a, kendoThemeMaps as r } from "@progress/kendo-react-common";
11
- const s = class s extends o.Component {
12
- /**
13
- * @hidden
14
- */
15
- render() {
16
- return /* @__PURE__ */ o.createElement(
17
- "div",
18
- {
19
- className: a(
20
- "k-toolbar k-grid-toolbar k-toolbar-solid",
21
- {
22
- "k-toolbar-md": !this.props.size,
23
- [`k-toolbar-${r.sizeMap[this.props.size] || this.props.size}`]: this.props.size
24
- },
25
- this.props.className
26
- ),
27
- "aria-label": this.props.ariaLabel,
28
- "aria-controls": this.props.ariaControls,
29
- role: "toolbar"
30
- },
31
- this.props.children
32
- );
33
- }
9
+ import * as s from "react";
10
+ import { classNames as i, kendoThemeMaps as c } from "@progress/kendo-react-common";
11
+ const m = (o) => {
12
+ const { size: a, className: r, ariaLabel: e, ariaControls: l, children: t } = o;
13
+ return /* @__PURE__ */ s.createElement(
14
+ "div",
15
+ {
16
+ className: i(
17
+ "k-toolbar k-grid-toolbar k-toolbar-solid",
18
+ {
19
+ "k-toolbar-md": !a,
20
+ [`k-toolbar-${c.sizeMap[a] || a}`]: a
21
+ },
22
+ r
23
+ ),
24
+ "aria-label": e,
25
+ "aria-controls": l,
26
+ role: "toolbar"
27
+ },
28
+ t
29
+ );
34
30
  };
35
- s.displayName = "KendoReactGridToolbar";
36
- let e = s;
31
+ m.displayName = "KendoReactGridToolbar";
37
32
  export {
38
- e as GridToolbar
33
+ m as GridToolbar
39
34
  };
package/VirtualScroll.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 g=require("react");function u(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(i,t,l.get?l:{enumerable:!0,get:()=>r[t]})}}return i.default=r,Object.freeze(i)}const c=u(g);class f{constructor(i){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=c.createRef(),this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=c.createRef(),this.tableTransform="",this.prevScrollPos=0,this.tableTranslate=0,this.scrollSyncing=!1,this.reactVersion=Number.parseFloat(c.version),this.topItems=(t,l)=>{if(!this.container||l)return{topItemsCount:0,topItemsHeight:0};const s=this.container.clientHeight,e=Math.ceil(s/t[0].line),n=Math.ceil((t.length-e)/2);let o=0;for(let a=0;a<n;a++)o+=t[a].line+t[a].acc;return{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:e+e/2}},this.horizontalScrollbarHeight=()=>this.container?this.container.offsetHeight-this.container.clientHeight:0,i&&(this.topCacheCount=4,this.attendedSkip=-this.topCacheCount),this.scrollHandler=this.scrollHandler.bind(this)}get container(){return this.containerRef.current}get rowHeights(){const i=[],t=this.tableBodyRef.current&&this.tableBodyRef.current.children||[];let l=0;for(let s=0;s<t.length;s++){if(t[s].className.indexOf("k-grouping-row")>-1){l+=t[s].scrollHeight;continue}t[s].className.indexOf("k-detail-row")>-1?i[i.length-1].line+=t[s].scrollHeight:(i.push({line:t[s].scrollHeight,acc:l}),l=0)}return i}changePage(i,t){this.attendedSkip=i-this.topCacheCount,this.PageChange&&this.PageChange({skip:Math.max(0,i-this.topCacheCount),take:this.pageSize},t)}translate(i,t){this.tableTranslate=i,this.scrollableVirtual&&this.table&&(this.reactVersion<=17||t?this.table.style.transform="translateY("+i+"px)":this.tableTransform="translateY("+i+"px)")}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}localScrollUp(i){if(!this.container)return;const t=this.rowHeights,l=this.container.scrollTop;let s=this.tableTranslate,e=0;const{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:a}=this.topItems(t,!!this.topCacheCount),h=l-s;if(!(h>o||t.length<=a)){for(;e<this.topCacheCount+this.attendedSkip-this.realSkip+n&&this.propsSkip-e>0&&!(s+(t[t.length-1-e].line+t[t.length-1-e].acc)+h<=l);)s-=t[t.length-1-e].line+t[t.length-1-e].acc,e++;if(e===0&&this.topCacheCount===0&&this.attendedSkip>0&&(s=Math.max(s-t[0].line,0),e=1),this.propsSkip-e<=0&&s>l){this.translate(0),this.changePage(0,i),this.container.scrollTop=0;return}if(s>l&&(s=l),s!==this.tableTranslate){this.translate(Math.max(0,s-o));const p=Math.max(0,this.propsSkip-e-n);this.changePage(p,i)}}}localScrollDown(i){if(!this.container)return;const t=this.rowHeights,l=this.container.scrollTop;let s=this.tableTranslate,e=0;const{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:a}=this.topItems(t,!!this.topCacheCount);for(;e<t.length-this.topCacheCount&&!(s+t[e].line+t[e].acc>l);)s+=t[e].line+t[e].acc,e++;n>this.propsSkip+e||t.length<=a||(e>=t.length-this.topCacheCount&&this.propsSkip+e>=this.total?(this.translate(s-o),this.changePage(this.total-1-n,i)):s!==this.tableTranslate&&this.propsSkip+e-n!==this.propsSkip&&(this.translate(s-o),this.changePage(this.propsSkip+e-n,i)))}scrollNonStrict(i){const t=this.total*this.prevScrollPos/this.containerHeight;let l=Math.floor(t);l>=this.total&&(l=this.total-1);const s=Math.min(t-l,1);let e=0;const n=l-this.propsSkip,o=this.rowHeights;n>=0&&n<=1?e=-((o[0].line+o[0].acc)*s):n===-1&&(e=-((o[o.length-1].line+o[o.length-1].acc)*s));const{topItemsCount:a,topItemsHeight:h}=this.topItems(o,!!this.topCacheCount);this.translate(Math.max(0,e-h-this.horizontalScrollbarHeight()+this.containerHeight*t/this.total)),this.changePage(l-a,i)}scrollHandler(i){if(!this.scrollableVirtual)return;if(this.scrollSyncing||!this.container||!this.table){this.scrollSyncing=!1;return}const t=this.container.scrollTop,l=this.prevScrollPos;if(this.prevScrollPos=t,this.askedSkip!==void 0){this.translate(this.containerHeight*this.askedSkip/this.total),this.changePage(this.askedSkip,i),this.prevScrollPos=t,this.askedSkip=void 0;return}t-l<0&&t>this.tableTranslate-this.table.scrollHeight/10?this.localScrollUp(i):t-l>0&&t<this.tableTranslate+this.table.scrollHeight*2/3?this.localScrollDown(i):this.scrollNonStrict(i),this.prevScrollPos=t}}exports.VirtualScroll=f;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react");function g(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:()=>r[t]})}}return i.default=r,Object.freeze(i)}const u=g(p);class f{constructor(i){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=null,this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=null,this.tableTransform="",this.prevScrollPos=0,this.tableTranslate=0,this.scrollSyncing=!1,this.reactVersion=Number.parseFloat(u.version),this.topItems=(t,s)=>{if(!this.container||s)return{topItemsCount:0,topItemsHeight:0};const l=this.container.clientHeight,e=Math.ceil(l/t[0].line),n=Math.ceil((t.length-e)/2);let o=0;for(let a=0;a<n;a++)o+=t[a].line+t[a].acc;return{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:e+e/2}},this.horizontalScrollbarHeight=()=>this.container?this.container.offsetHeight-this.container.clientHeight:0,i&&(this.topCacheCount=4,this.attendedSkip=-this.topCacheCount),this.scrollHandler=this.scrollHandler.bind(this)}get container(){var i;return(i=this.containerRef)==null?void 0:i.current}get rowHeights(){var l,e;const i=[],t=((l=this.tableBodyRef)==null?void 0:l.current)&&((e=this.tableBodyRef)==null?void 0:e.current.children)||[];let s=0;for(let n=0;n<t.length;n++){if(t[n].className.indexOf("k-grouping-row")>-1){s+=t[n].scrollHeight;continue}t[n].className.indexOf("k-detail-row")>-1?i[i.length-1].line+=t[n].scrollHeight:(i.push({line:t[n].scrollHeight,acc:s}),s=0)}return i}changePage(i,t){this.attendedSkip=i-this.topCacheCount,this.PageChange&&this.PageChange({skip:Math.max(0,i-this.topCacheCount),take:this.pageSize},t)}translate(i,t){this.tableTranslate=i,this.scrollableVirtual&&this.table&&(this.reactVersion<=17||t?this.table.style.transform="translateY("+i+"px)":this.tableTransform="translateY("+i+"px)")}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}localScrollUp(i){if(!this.container)return;const t=this.rowHeights,s=this.container.scrollTop;let l=this.tableTranslate,e=0;const{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:a}=this.topItems(t,!!this.topCacheCount),h=s-l;if(!(h>o||t.length<=a)){for(;e<this.topCacheCount+this.attendedSkip-this.realSkip+n&&this.propsSkip-e>0&&!(l+(t[t.length-1-e].line+t[t.length-1-e].acc)+h<=s);)l-=t[t.length-1-e].line+t[t.length-1-e].acc,e++;if(e===0&&this.topCacheCount===0&&this.attendedSkip>0&&(l=Math.max(l-t[0].line,0),e=1),this.propsSkip-e<=0&&l>s){this.translate(0),this.changePage(0,i),this.container.scrollTop=0;return}if(l>s&&(l=s),l!==this.tableTranslate){this.translate(Math.max(0,l-o));const c=Math.max(0,this.propsSkip-e-n);this.changePage(c,i)}}}localScrollDown(i){if(!this.container)return;const t=this.rowHeights,s=this.container.scrollTop;let l=this.tableTranslate,e=0;const{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:a}=this.topItems(t,!!this.topCacheCount);for(;e<t.length-this.topCacheCount&&!(l+t[e].line+t[e].acc>s);)l+=t[e].line+t[e].acc,e++;n>this.propsSkip+e||t.length<=a||(e>=t.length-this.topCacheCount&&this.propsSkip+e>=this.total?(this.translate(l-o),this.changePage(this.total-1-n,i)):l!==this.tableTranslate&&this.propsSkip+e-n!==this.propsSkip&&(this.translate(l-o),this.changePage(this.propsSkip+e-n,i)))}scrollNonStrict(i){const t=this.total*this.prevScrollPos/this.containerHeight;let s=Math.floor(t);s>=this.total&&(s=this.total-1);const l=Math.min(t-s,1);let e=0;const n=s-this.propsSkip,o=this.rowHeights;n>=0&&n<=1?e=-((o[0].line+o[0].acc)*l):n===-1&&(e=-((o[o.length-1].line+o[o.length-1].acc)*l));const{topItemsCount:a,topItemsHeight:h}=this.topItems(o,!!this.topCacheCount);this.translate(Math.max(0,e-h-this.horizontalScrollbarHeight()+this.containerHeight*t/this.total)),this.changePage(s-a,i)}scrollHandler(i){if(!this.scrollableVirtual)return;if(this.scrollSyncing||!this.container||!this.table){this.scrollSyncing=!1;return}const t=this.container.scrollTop,s=this.prevScrollPos;if(this.prevScrollPos=t,this.askedSkip!==void 0){this.translate(this.containerHeight*this.askedSkip/this.total),this.changePage(this.askedSkip,i),this.prevScrollPos=t,this.askedSkip=void 0;return}t-s<0&&t>this.tableTranslate-this.table.scrollHeight/10?this.localScrollUp(i):t-s>0&&t<this.tableTranslate+this.table.scrollHeight*2/3?this.localScrollDown(i):this.scrollNonStrict(i),this.prevScrollPos=t}}exports.VirtualScroll=f;
package/VirtualScroll.mjs CHANGED
@@ -6,112 +6,114 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as r from "react";
9
+ import * as c from "react";
10
10
  class g {
11
- constructor(s) {
12
- this.table = null, this.containerHeight = 0, this.topCacheCount = 0, this.attendedSkip = 0, this.propsSkip = 0, this.total = 0, this.scrollableVirtual = !1, this.realSkip = 0, this.pageSize = 0, this.PageChange = null, this.tableBodyRef = r.createRef(), this.fixedScroll = !1, this.askedSkip = void 0, this.containerRef = r.createRef(), this.tableTransform = "", this.prevScrollPos = 0, this.tableTranslate = 0, this.scrollSyncing = !1, this.reactVersion = Number.parseFloat(r.version), this.topItems = (t, l) => {
11
+ constructor(i) {
12
+ this.table = null, this.containerHeight = 0, this.topCacheCount = 0, this.attendedSkip = 0, this.propsSkip = 0, this.total = 0, this.scrollableVirtual = !1, this.realSkip = 0, this.pageSize = 0, this.PageChange = null, this.tableBodyRef = null, this.fixedScroll = !1, this.askedSkip = void 0, this.containerRef = null, this.tableTransform = "", this.prevScrollPos = 0, this.tableTranslate = 0, this.scrollSyncing = !1, this.reactVersion = Number.parseFloat(c.version), this.topItems = (t, l) => {
13
13
  if (!this.container || l)
14
14
  return { topItemsCount: 0, topItemsHeight: 0 };
15
- const i = this.container.clientHeight, e = Math.ceil(i / t[0].line), n = Math.ceil((t.length - e) / 2);
16
- let o = 0;
17
- for (let a = 0; a < n; a++)
18
- o += t[a].line + t[a].acc;
15
+ const s = this.container.clientHeight, e = Math.ceil(s / t[0].line), o = Math.ceil((t.length - e) / 2);
16
+ let n = 0;
17
+ for (let a = 0; a < o; a++)
18
+ n += t[a].line + t[a].acc;
19
19
  return {
20
- topItemsCount: n,
21
- topItemsHeight: o,
20
+ topItemsCount: o,
21
+ topItemsHeight: n,
22
22
  itemsNeededOnScreen: e + e / 2
23
23
  };
24
- }, this.horizontalScrollbarHeight = () => this.container ? this.container.offsetHeight - this.container.clientHeight : 0, s && (this.topCacheCount = 4, this.attendedSkip = -this.topCacheCount), this.scrollHandler = this.scrollHandler.bind(this);
24
+ }, this.horizontalScrollbarHeight = () => this.container ? this.container.offsetHeight - this.container.clientHeight : 0, i && (this.topCacheCount = 4, this.attendedSkip = -this.topCacheCount), this.scrollHandler = this.scrollHandler.bind(this);
25
25
  }
26
26
  get container() {
27
- return this.containerRef.current;
27
+ var i;
28
+ return (i = this.containerRef) == null ? void 0 : i.current;
28
29
  }
29
30
  /**
30
31
  * @return - The row heights in an array.
31
32
  */
32
33
  get rowHeights() {
33
- const s = [], t = this.tableBodyRef.current && this.tableBodyRef.current.children || [];
34
+ var s, e;
35
+ const i = [], t = ((s = this.tableBodyRef) == null ? void 0 : s.current) && ((e = this.tableBodyRef) == null ? void 0 : e.current.children) || [];
34
36
  let l = 0;
35
- for (let i = 0; i < t.length; i++) {
36
- if (t[i].className.indexOf("k-grouping-row") > -1) {
37
- l += t[i].scrollHeight;
37
+ for (let o = 0; o < t.length; o++) {
38
+ if (t[o].className.indexOf("k-grouping-row") > -1) {
39
+ l += t[o].scrollHeight;
38
40
  continue;
39
41
  }
40
- t[i].className.indexOf("k-detail-row") > -1 ? s[s.length - 1].line += t[i].scrollHeight : (s.push({
41
- line: t[i].scrollHeight,
42
+ t[o].className.indexOf("k-detail-row") > -1 ? i[i.length - 1].line += t[o].scrollHeight : (i.push({
43
+ line: t[o].scrollHeight,
42
44
  acc: l
43
45
  }), l = 0);
44
46
  }
45
- return s;
47
+ return i;
46
48
  }
47
- changePage(s, t) {
48
- this.attendedSkip = s - this.topCacheCount, this.PageChange && this.PageChange(
49
+ changePage(i, t) {
50
+ this.attendedSkip = i - this.topCacheCount, this.PageChange && this.PageChange(
49
51
  {
50
- skip: Math.max(0, s - this.topCacheCount),
52
+ skip: Math.max(0, i - this.topCacheCount),
51
53
  take: this.pageSize
52
54
  },
53
55
  t
54
56
  );
55
57
  }
56
- translate(s, t) {
57
- this.tableTranslate = s, this.scrollableVirtual && this.table && (this.reactVersion <= 17 || t ? this.table.style.transform = "translateY(" + s + "px)" : this.tableTransform = "translateY(" + s + "px)");
58
+ translate(i, t) {
59
+ this.tableTranslate = i, this.scrollableVirtual && this.table && (this.reactVersion <= 17 || t ? this.table.style.transform = "translateY(" + i + "px)" : this.tableTransform = "translateY(" + i + "px)");
58
60
  }
59
61
  reset() {
60
62
  this.scrollSyncing = !0, !this.fixedScroll && (this.container && (this.container.scrollTop = 0), this.translate(0, !0));
61
63
  }
62
- localScrollUp(s) {
64
+ localScrollUp(i) {
63
65
  if (!this.container)
64
66
  return;
65
67
  const t = this.rowHeights, l = this.container.scrollTop;
66
- let i = this.tableTranslate, e = 0;
67
- const { topItemsCount: n, topItemsHeight: o, itemsNeededOnScreen: a } = this.topItems(
68
+ let s = this.tableTranslate, e = 0;
69
+ const { topItemsCount: o, topItemsHeight: n, itemsNeededOnScreen: a } = this.topItems(
68
70
  t,
69
71
  !!this.topCacheCount
70
- ), h = l - i;
71
- if (!(h > o || t.length <= a)) {
72
- for (; e < this.topCacheCount + this.attendedSkip - this.realSkip + n && this.propsSkip - e > 0 && !(i + (t[t.length - 1 - e].line + t[t.length - 1 - e].acc) + h <= l); )
73
- i -= t[t.length - 1 - e].line + t[t.length - 1 - e].acc, e++;
74
- if (e === 0 && this.topCacheCount === 0 && this.attendedSkip > 0 && (i = Math.max(i - t[0].line, 0), e = 1), this.propsSkip - e <= 0 && i > l) {
75
- this.translate(0), this.changePage(0, s), this.container.scrollTop = 0;
72
+ ), h = l - s;
73
+ if (!(h > n || t.length <= a)) {
74
+ for (; e < this.topCacheCount + this.attendedSkip - this.realSkip + o && this.propsSkip - e > 0 && !(s + (t[t.length - 1 - e].line + t[t.length - 1 - e].acc) + h <= l); )
75
+ s -= t[t.length - 1 - e].line + t[t.length - 1 - e].acc, e++;
76
+ if (e === 0 && this.topCacheCount === 0 && this.attendedSkip > 0 && (s = Math.max(s - t[0].line, 0), e = 1), this.propsSkip - e <= 0 && s > l) {
77
+ this.translate(0), this.changePage(0, i), this.container.scrollTop = 0;
76
78
  return;
77
79
  }
78
- if (i > l && (i = l), i !== this.tableTranslate) {
79
- this.translate(Math.max(0, i - o));
80
- const c = Math.max(0, this.propsSkip - e - n);
81
- this.changePage(c, s);
80
+ if (s > l && (s = l), s !== this.tableTranslate) {
81
+ this.translate(Math.max(0, s - n));
82
+ const r = Math.max(0, this.propsSkip - e - o);
83
+ this.changePage(r, i);
82
84
  }
83
85
  }
84
86
  }
85
- localScrollDown(s) {
87
+ localScrollDown(i) {
86
88
  if (!this.container)
87
89
  return;
88
90
  const t = this.rowHeights, l = this.container.scrollTop;
89
- let i = this.tableTranslate, e = 0;
90
- const { topItemsCount: n, topItemsHeight: o, itemsNeededOnScreen: a } = this.topItems(
91
+ let s = this.tableTranslate, e = 0;
92
+ const { topItemsCount: o, topItemsHeight: n, itemsNeededOnScreen: a } = this.topItems(
91
93
  t,
92
94
  !!this.topCacheCount
93
95
  );
94
- for (; e < t.length - this.topCacheCount && !(i + t[e].line + t[e].acc > l); )
95
- i += t[e].line + t[e].acc, e++;
96
- n > this.propsSkip + e || t.length <= a || (e >= t.length - this.topCacheCount && this.propsSkip + e >= this.total ? (this.translate(i - o), this.changePage(this.total - 1 - n, s)) : i !== this.tableTranslate && this.propsSkip + e - n !== this.propsSkip && (this.translate(i - o), this.changePage(this.propsSkip + e - n, s)));
96
+ for (; e < t.length - this.topCacheCount && !(s + t[e].line + t[e].acc > l); )
97
+ s += t[e].line + t[e].acc, e++;
98
+ o > this.propsSkip + e || t.length <= a || (e >= t.length - this.topCacheCount && this.propsSkip + e >= this.total ? (this.translate(s - n), this.changePage(this.total - 1 - o, i)) : s !== this.tableTranslate && this.propsSkip + e - o !== this.propsSkip && (this.translate(s - n), this.changePage(this.propsSkip + e - o, i)));
97
99
  }
98
- scrollNonStrict(s) {
100
+ scrollNonStrict(i) {
99
101
  const t = this.total * this.prevScrollPos / this.containerHeight;
100
102
  let l = Math.floor(t);
101
103
  l >= this.total && (l = this.total - 1);
102
- const i = Math.min(t - l, 1);
104
+ const s = Math.min(t - l, 1);
103
105
  let e = 0;
104
- const n = l - this.propsSkip, o = this.rowHeights;
105
- n >= 0 && n <= 1 ? e = -((o[0].line + o[0].acc) * i) : n === -1 && (e = -((o[o.length - 1].line + o[o.length - 1].acc) * i));
106
- const { topItemsCount: a, topItemsHeight: h } = this.topItems(o, !!this.topCacheCount);
106
+ const o = l - this.propsSkip, n = this.rowHeights;
107
+ o >= 0 && o <= 1 ? e = -((n[0].line + n[0].acc) * s) : o === -1 && (e = -((n[n.length - 1].line + n[n.length - 1].acc) * s));
108
+ const { topItemsCount: a, topItemsHeight: h } = this.topItems(n, !!this.topCacheCount);
107
109
  this.translate(
108
110
  Math.max(
109
111
  0,
110
112
  e - h - this.horizontalScrollbarHeight() + this.containerHeight * t / this.total
111
113
  )
112
- ), this.changePage(l - a, s);
114
+ ), this.changePage(l - a, i);
113
115
  }
114
- scrollHandler(s) {
116
+ scrollHandler(i) {
115
117
  if (!this.scrollableVirtual)
116
118
  return;
117
119
  if (this.scrollSyncing || !this.container || !this.table) {
@@ -120,10 +122,10 @@ class g {
120
122
  }
121
123
  const t = this.container.scrollTop, l = this.prevScrollPos;
122
124
  if (this.prevScrollPos = t, this.askedSkip !== void 0) {
123
- this.translate(this.containerHeight * this.askedSkip / this.total), this.changePage(this.askedSkip, s), this.prevScrollPos = t, this.askedSkip = void 0;
125
+ this.translate(this.containerHeight * this.askedSkip / this.total), this.changePage(this.askedSkip, i), this.prevScrollPos = t, this.askedSkip = void 0;
124
126
  return;
125
127
  }
126
- t - l < 0 && t > this.tableTranslate - this.table.scrollHeight / 10 ? this.localScrollUp(s) : t - l > 0 && t < this.tableTranslate + this.table.scrollHeight * 2 / 3 ? this.localScrollDown(s) : this.scrollNonStrict(s), this.prevScrollPos = t;
128
+ t - l < 0 && t > this.tableTranslate - this.table.scrollHeight / 10 ? this.localScrollUp(i) : t - l > 0 && t < this.tableTranslate + this.table.scrollHeight * 2 / 3 ? this.localScrollDown(i) : this.scrollNonStrict(i), this.prevScrollPos = t;
127
129
  }
128
130
  }
129
131
  export {
@@ -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 d=require("react"),g=require("./utils/index.js");function u(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=u(d);class p{constructor(e){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=o.createRef(),this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=o.createRef(),this.tableTransform="",this.scrollSyncing=!1,this.lastLoaded=0,this.firstLoaded=0,this.lastScrollTop=0,this.reactVersion=Number.parseFloat(o.version),this.firstLoaded=this.pageSize,this.lastLoaded=this.realSkip+this.pageSize,this.scrollHandler=this.scrollHandler.bind(this)}get container(){return this.containerRef.current}translate(e,t){this.scrollableVirtual&&this.table&&(g.firefox||this.reactVersion<=17||t?this.table.style.transform="translateY("+e+"px)":this.tableTransform="translateY("+e+"px)")}changePage(e,t){this.PageChange&&this.PageChange({skip:Math.max(0,e),take:this.pageSize},t)}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}scrollHandler(e){if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!this.containerRef.current)return;if(this.scrollSyncing){this.scrollSyncing=!1;return}const t=this.container.scrollTop,a=this.lastScrollTop>=t,h=!a;this.lastScrollTop=t;let i=this.rowHeightService.index(t),l=this.rowHeightService.offset(i);const{offsetHeight:n}=this.containerRef.current,c=this.rowHeightService.index(t+n);if(h&&c>=this.lastLoaded&&this.lastLoaded<this.total){const r=i+this.pageSize-this.total;r>0&&(i=i-r,l=this.rowHeightService.offset(i)),this.firstLoaded=i,this.translate(l);const f=this.firstLoaded+this.pageSize;this.lastLoaded=Math.min(f,this.total),this.changePage(this.firstLoaded,e)}else if(a&&i<this.firstLoaded){const r=Math.floor(this.pageSize*.3);this.firstLoaded=Math.max(i-r,0),this.translate(this.rowHeightService.offset(this.firstLoaded)),this.lastLoaded=Math.min(this.firstLoaded+this.pageSize,this.total),this.changePage(this.firstLoaded,e)}}}exports.VirtualScrollFixed=p;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),g=require("./utils/index.js");function u(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(t,e,a.get?a:{enumerable:!0,get:()=>s[e]})}}return t.default=s,Object.freeze(t)}const p=u(d);class S{constructor(t){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=null,this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=null,this.tableTransform="",this.scrollSyncing=!1,this.lastLoaded=0,this.firstLoaded=0,this.lastScrollTop=0,this.reactVersion=Number.parseFloat(p.version),this.firstLoaded=this.pageSize,this.lastLoaded=this.realSkip+this.pageSize,this.scrollHandler=this.scrollHandler.bind(this)}get container(){var t;return((t=this.containerRef)==null?void 0:t.current)||void 0}translate(t,e){this.scrollableVirtual&&this.table&&(g.firefox||this.reactVersion<=17||e?this.table.style.transform="translateY("+t+"px)":this.tableTransform="translateY("+t+"px)")}changePage(t,e){this.PageChange&&this.PageChange({skip:Math.max(0,t),take:this.pageSize},e)}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}scrollHandler(t){var o;if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!((o=this.containerRef)!=null&&o.current))return;if(this.scrollSyncing){this.scrollSyncing=!1;return}const e=this.container.scrollTop,a=this.lastScrollTop>=e,n=!a;this.lastScrollTop=e;let i=this.rowHeightService.index(e),l=this.rowHeightService.offset(i);const{offsetHeight:h}=this.containerRef.current,c=this.rowHeightService.index(e+h);if(n&&c>=this.lastLoaded&&this.lastLoaded<this.total){const r=i+this.pageSize-this.total;r>0&&(i=i-r,l=this.rowHeightService.offset(i)),this.firstLoaded=i,this.translate(l);const f=this.firstLoaded+this.pageSize;this.lastLoaded=Math.min(f,this.total),this.changePage(this.firstLoaded,t)}else if(a&&i<this.firstLoaded){const r=Math.floor(this.pageSize*.3);this.firstLoaded=Math.max(i-r,0),this.translate(this.rowHeightService.offset(this.firstLoaded)),this.lastLoaded=Math.min(this.firstLoaded+this.pageSize,this.total),this.changePage(this.firstLoaded,t)}}}exports.VirtualScrollFixed=S;
@@ -6,17 +6,18 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as a from "react";
10
- import { firefox as f } from "./utils/index.mjs";
11
- class p {
9
+ import * as f from "react";
10
+ import { firefox as d } from "./utils/index.mjs";
11
+ class S {
12
12
  constructor(t) {
13
- this.table = null, this.containerHeight = 0, this.topCacheCount = 0, this.attendedSkip = 0, this.propsSkip = 0, this.total = 0, this.scrollableVirtual = !1, this.realSkip = 0, this.pageSize = 0, this.PageChange = null, this.tableBodyRef = a.createRef(), this.fixedScroll = !1, this.askedSkip = void 0, this.containerRef = a.createRef(), this.tableTransform = "", this.scrollSyncing = !1, this.lastLoaded = 0, this.firstLoaded = 0, this.lastScrollTop = 0, this.reactVersion = Number.parseFloat(a.version), this.firstLoaded = this.pageSize, this.lastLoaded = this.realSkip + this.pageSize, this.scrollHandler = this.scrollHandler.bind(this);
13
+ this.table = null, this.containerHeight = 0, this.topCacheCount = 0, this.attendedSkip = 0, this.propsSkip = 0, this.total = 0, this.scrollableVirtual = !1, this.realSkip = 0, this.pageSize = 0, this.PageChange = null, this.tableBodyRef = null, this.fixedScroll = !1, this.askedSkip = void 0, this.containerRef = null, this.tableTransform = "", this.scrollSyncing = !1, this.lastLoaded = 0, this.firstLoaded = 0, this.lastScrollTop = 0, this.reactVersion = Number.parseFloat(f.version), this.firstLoaded = this.pageSize, this.lastLoaded = this.realSkip + this.pageSize, this.scrollHandler = this.scrollHandler.bind(this);
14
14
  }
15
15
  get container() {
16
- return this.containerRef.current;
16
+ var t;
17
+ return ((t = this.containerRef) == null ? void 0 : t.current) || void 0;
17
18
  }
18
19
  translate(t, i) {
19
- this.scrollableVirtual && this.table && (f || this.reactVersion <= 17 || i ? this.table.style.transform = "translateY(" + t + "px)" : this.tableTransform = "translateY(" + t + "px)");
20
+ this.scrollableVirtual && this.table && (d || this.reactVersion <= 17 || i ? this.table.style.transform = "translateY(" + t + "px)" : this.tableTransform = "translateY(" + t + "px)");
20
21
  }
21
22
  changePage(t, i) {
22
23
  this.PageChange && this.PageChange({ skip: Math.max(0, t), take: this.pageSize }, i);
@@ -25,27 +26,28 @@ class p {
25
26
  this.scrollSyncing = !0, !this.fixedScroll && (this.container && (this.container.scrollTop = 0), this.translate(0, !0));
26
27
  }
27
28
  scrollHandler(t) {
28
- if (!this.scrollableVirtual || !this.container || !this.table || !this.rowHeightService || !this.containerRef.current)
29
+ var h;
30
+ if (!this.scrollableVirtual || !this.container || !this.table || !this.rowHeightService || !((h = this.containerRef) != null && h.current))
29
31
  return;
30
32
  if (this.scrollSyncing) {
31
33
  this.scrollSyncing = !1;
32
34
  return;
33
35
  }
34
- const i = this.container.scrollTop, r = this.lastScrollTop >= i, o = !r;
36
+ const i = this.container.scrollTop, a = this.lastScrollTop >= i, l = !a;
35
37
  this.lastScrollTop = i;
36
- let e = this.rowHeightService.index(i), h = this.rowHeightService.offset(e);
37
- const { offsetHeight: l } = this.containerRef.current, n = this.rowHeightService.index(i + l);
38
- if (o && n >= this.lastLoaded && this.lastLoaded < this.total) {
38
+ let e = this.rowHeightService.index(i), r = this.rowHeightService.offset(e);
39
+ const { offsetHeight: o } = this.containerRef.current, n = this.rowHeightService.index(i + o);
40
+ if (l && n >= this.lastLoaded && this.lastLoaded < this.total) {
39
41
  const s = e + this.pageSize - this.total;
40
- s > 0 && (e = e - s, h = this.rowHeightService.offset(e)), this.firstLoaded = e, this.translate(h);
42
+ s > 0 && (e = e - s, r = this.rowHeightService.offset(e)), this.firstLoaded = e, this.translate(r);
41
43
  const c = this.firstLoaded + this.pageSize;
42
44
  this.lastLoaded = Math.min(c, this.total), this.changePage(this.firstLoaded, t);
43
- } else if (r && e < this.firstLoaded) {
45
+ } else if (a && e < this.firstLoaded) {
44
46
  const s = Math.floor(this.pageSize * 0.3);
45
47
  this.firstLoaded = Math.max(e - s, 0), this.translate(this.rowHeightService.offset(this.firstLoaded)), this.lastLoaded = Math.min(this.firstLoaded + this.pageSize, this.total), this.changePage(this.firstLoaded, t);
46
48
  }
47
49
  }
48
50
  }
49
51
  export {
50
- p as VirtualScrollFixed
52
+ S as VirtualScrollFixed
51
53
  };
@@ -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 g=require("react"),f=require("@progress/kendo-react-buttons"),l=require("@progress/kendo-react-dropdowns"),c=require("@progress/kendo-react-inputs"),C=require("@progress/kendo-react-dateinputs"),a=require("../messages/index.js"),u=require("@progress/kendo-react-intl"),h=require("@progress/kendo-svg-icons"),p=require("../filterCommon.js"),m=require("@progress/kendo-react-common");function b(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const i=b(g);class d extends i.Component{constructor(e){super(e),this._inputRef=i.createRef(),this.renderOperatorEditor=t=>{if(this.props.filterType==="boolean")return;let s;const r=this.props.operators.find(o=>o.operator===this.props.operator)||null;return i.createElement(l.DropDownList,{ref:o=>s=o,size:this.props.size,value:r,onChange:this.operatorChange,className:"k-dropdown-operator",iconClassName:"k-i-filter k-icon",svgIcon:h.filterIcon,data:this.props.operators,textField:"text",title:t.toLanguageString(a.filterChooseOperator,a.messages[a.filterChooseOperator]),popupSettings:{width:"",onMouseDownOutside:function(o){!o.isAnchorClicked&&o.state&&o.state.props.show&&s&&s.togglePopup()}}})},this.inputChange=this.inputChange.bind(this),this.clear=this.clear.bind(this),this.operatorChange=this.operatorChange.bind(this),this.boolDropdownChange=this.boolDropdownChange.bind(this)}render(){const e=u.provideLocalizationService(this),t=i.createElement("div",{className:"k-filtercell"},i.createElement("div",{className:"k-filtercell-wrapper"},this.filterComponent(this.props.filterType,this.props.value,this.props.booleanValues),i.createElement("div",{className:"k-filtercell-operator"},this.renderOperatorEditor(e)," ",i.createElement(f.Button,{size:this.props.size,icon:"filter-clear",svgIcon:h.filterClearIcon,className:m.classNames({"k-clear-button-visible":!!(!(this.props.value===null||this.props.value==="")||this.props.operator)}),title:e.toLanguageString(a.filterClearButton,a.messages[a.filterClearButton]),type:"button",onClick:this.clear,disabled:!(!(this.props.value===null||this.props.value==="")||this.props.operator)}))));return this.props.render?this.props.render.call(void 0,t,this.props):t}inputChange(e,t){p.cellInputChange(e,t,this.props)}operatorChange(e){p.cellOperatorChange(e,this.props.value,this.props.onChange)}boolDropdownChange(e){p.cellBoolDropdownChange(e,this.props.onChange)}clear(e){e.preventDefault(),this.props.onChange({value:"",operator:"",syntheticEvent:e}),this._inputRef.current&&(this._inputRef.current.element.value="",setTimeout(()=>{this._inputRef.current.element.focus()},0))}filterComponent(e,t,s){switch(e){case"numeric":return i.createElement(c.NumericTextBox,{ref:this._inputRef,size:this.props.size,value:t,onChange:r=>{this.inputChange(r.value,r.syntheticEvent)},title:this.props.title,ariaLabel:this.props.ariaLabel});case"date":return i.createElement(C.DatePicker,{ref:this._inputRef,size:this.props.size,value:t,onChange:r=>{this.inputChange(r.value,r.syntheticEvent)},title:this.props.title,ariaLabel:this.props.ariaLabel,popupSettings:{onMouseDownOutside:r=>{!r.isAnchorClicked&&r.state&&r.state.props.show&&this._inputRef&&this._inputRef.current.togglePopup()}}});case"boolean":{const r=o=>o==null;return i.createElement(l.DropDownList,{ref:this._inputRef,size:this.props.size,onChange:this.boolDropdownChange,value:s.find(o=>o.operator===(r(t)?"":t)),data:s,textField:"text",title:this.props.title,ariaLabel:this.props.ariaLabel,popupSettings:{onMouseDownOutside:o=>{!o.isAnchorClicked&&o.state&&o.state.props.show&&this._inputRef&&this._inputRef.current.togglePopup()}}})}default:return i.createElement(c.TextBox,{ref:this._inputRef,size:this.props.size,value:t||"",onChange:r=>{this.inputChange(r.target.value,r.syntheticEvent)},title:this.props.title,"aria-label":this.props.ariaLabel})}}}u.registerForLocalization(d);exports.GridFilterCell=d;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),D=require("@progress/kendo-react-buttons"),m=require("@progress/kendo-react-dropdowns"),C=require("@progress/kendo-react-inputs"),E=require("@progress/kendo-react-dateinputs"),u=require("../messages/index.js"),O=require("@progress/kendo-react-intl"),h=require("@progress/kendo-svg-icons"),g=require("../filterCommon.js"),y=require("@progress/kendo-react-common");function L(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const c in e)if(c!=="default"){const s=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(t,c,s.get?s:{enumerable:!0,get:()=>e[c]})}}return t.default=e,Object.freeze(t)}const r=L(z),R=e=>{const t=r.useRef(),c=O.useLocalization(),s=()=>{if(e.filterType==="boolean")return;let n;const l=e.operators.find(o=>o.operator===e.operator)||null;return r.createElement(m.DropDownList,{ref:o=>n=o,size:e.size,value:l,onChange:b,className:"k-dropdown-operator",iconClassName:"k-i-filter k-icon",svgIcon:h.filterIcon,data:e.operators,textField:"text",title:c.toLanguageString(u.filterChooseOperator,u.messages[u.filterChooseOperator]),popupSettings:{width:"",onMouseDownOutside:function(o){!o.isAnchorClicked&&o.state&&o.state.props.show&&n&&n.togglePopup()}}})},d=(n,l)=>{g.cellInputChange(n,l,e)},b=n=>{g.cellOperatorChange(n,e.value,e.onChange)},k=n=>{g.cellBoolDropdownChange(n,e.onChange)},v=n=>{n.preventDefault(),e.onChange({value:"",operator:"",syntheticEvent:n}),t.current&&(t.current.element.value="",setTimeout(()=>{t.current.element.focus()},0))},w=(n,l,o)=>{switch(n){case"numeric":return r.createElement(C.NumericTextBox,{ref:t,size:e.size,value:l,onChange:a=>{d(a.value,a.syntheticEvent)},title:e.title,ariaLabel:e.ariaLabel});case"date":return r.createElement(E.DatePicker,{ref:t,size:e.size,value:l,onChange:a=>{d(a.value,a.syntheticEvent)},title:e.title,ariaLabel:e.ariaLabel,popupSettings:{onMouseDownOutside:a=>{!a.isAnchorClicked&&a.state&&a.state.props.show&&t&&t.current.togglePopup()}}});case"boolean":{const a=i=>i==null;return r.createElement(m.DropDownList,{ref:t,size:e.size,onChange:k,value:o.find(i=>i.operator===(a(l)?"":l)),data:o,textField:"text",title:e.title,ariaLabel:e.ariaLabel,popupSettings:{onMouseDownOutside:i=>{!i.isAnchorClicked&&i.state&&i.state.props.show&&t&&t.current.togglePopup()}}})}default:return r.createElement(C.TextBox,{ref:t,size:e.size,value:l||"",onChange:a=>{d(a.target.value,a.syntheticEvent)},title:e.title,"aria-label":e.ariaLabel})}},f=r.createElement("div",{className:"k-filtercell"},r.createElement("div",{className:"k-filtercell-wrapper"},w(e.filterType,e.value,e.booleanValues),r.createElement("div",{className:"k-filtercell-operator"},s()," ",r.createElement(D.Button,{size:e.size,icon:"filter-clear",svgIcon:h.filterClearIcon,className:y.classNames({"k-clear-button-visible":!!(!(e.value===null||e.value==="")||e.operator)}),title:c.toLanguageString(u.filterClearButton,u.messages[u.filterClearButton]),type:"button",onClick:v,disabled:!(!(e.value===null||e.value==="")||e.operator)}))));return e.render?e.render.call(void 0,f,e):f};exports.GridFilterCell=R;