@progress/kendo-react-grid 11.0.0-develop.7 → 11.0.0-develop.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1746436965,version:"11.0.0-develop.7",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1746711151,version:"11.0.0-develop.8",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
@@ -10,8 +10,8 @@ const e = {
10
10
  productName: "KendoReact",
11
11
  productCode: "KENDOUIREACT",
12
12
  productCodes: ["KENDOUIREACT"],
13
- publishDate: 1746436965,
14
- version: "11.0.0-develop.7",
13
+ publishDate: 1746711151,
14
+ version: "11.0.0-develop.8",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
16
16
  };
17
17
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-grid",
3
- "version": "11.0.0-develop.7",
3
+ "version": "11.0.0-develop.8",
4
4
  "description": "React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -28,20 +28,20 @@
28
28
  "@progress/kendo-data-query": "^1.0.0",
29
29
  "@progress/kendo-drawing": "^1.21.2",
30
30
  "@progress/kendo-licensing": "^1.5.1",
31
- "@progress/kendo-react-animation": "11.0.0-develop.7",
32
- "@progress/kendo-react-buttons": "11.0.0-develop.7",
33
- "@progress/kendo-react-common": "11.0.0-develop.7",
34
- "@progress/kendo-react-data-tools": "11.0.0-develop.7",
35
- "@progress/kendo-react-dateinputs": "11.0.0-develop.7",
36
- "@progress/kendo-react-indicators": "11.0.0-develop.7",
37
- "@progress/kendo-react-form": "11.0.0-develop.7",
38
- "@progress/kendo-react-labels": "11.0.0-develop.7",
39
- "@progress/kendo-react-dialogs": "11.0.0-develop.7",
40
- "@progress/kendo-react-dropdowns": "11.0.0-develop.7",
41
- "@progress/kendo-react-inputs": "11.0.0-develop.7",
42
- "@progress/kendo-react-intl": "11.0.0-develop.7",
43
- "@progress/kendo-react-popup": "11.0.0-develop.7",
44
- "@progress/kendo-react-layout": "11.0.0-develop.7",
31
+ "@progress/kendo-react-animation": "11.0.0-develop.8",
32
+ "@progress/kendo-react-buttons": "11.0.0-develop.8",
33
+ "@progress/kendo-react-common": "11.0.0-develop.8",
34
+ "@progress/kendo-react-data-tools": "11.0.0-develop.8",
35
+ "@progress/kendo-react-dateinputs": "11.0.0-develop.8",
36
+ "@progress/kendo-react-indicators": "11.0.0-develop.8",
37
+ "@progress/kendo-react-form": "11.0.0-develop.8",
38
+ "@progress/kendo-react-labels": "11.0.0-develop.8",
39
+ "@progress/kendo-react-dialogs": "11.0.0-develop.8",
40
+ "@progress/kendo-react-dropdowns": "11.0.0-develop.8",
41
+ "@progress/kendo-react-inputs": "11.0.0-develop.8",
42
+ "@progress/kendo-react-intl": "11.0.0-develop.8",
43
+ "@progress/kendo-react-popup": "11.0.0-develop.8",
44
+ "@progress/kendo-react-layout": "11.0.0-develop.8",
45
45
  "@progress/kendo-svg-icons": "^4.0.0",
46
46
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
47
47
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
@@ -89,7 +89,7 @@
89
89
  "package": {
90
90
  "productName": "KendoReact",
91
91
  "productCode": "KENDOUIREACT",
92
- "publishDate": 1746436965,
92
+ "publishDate": 1746711151,
93
93
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
94
94
  }
95
95
  },
package/utils/index.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),w=require("../GridColumn.js"),S=require("@progress/kendo-data-query"),y=require("@progress/kendo-react-data-tools"),q=require("./_serverModule.js"),G=require("./_clientModule.js"),g=require("../contextMenu/enums.js"),k=require("@progress/kendo-react-common");function p(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const M=p(j);function v(e,t){const n=(e!=null?e:"").split(".");let a=t;return n.forEach(o=>{a=a?a[o]:void 0}),a}function b(e,t,n,a,o,l,r,i,d,s,h=0,c){var I;let u=h;for(let f=0;f<t.length;f++){let m;if(!o||t[f].value===void 0||t[f].items===void 0){e[e.length]={dataIndex:a.index,dataItem:t[f],rowType:"data",level:h,group:c,expanded:(I=l?v(l,t[f]):s&&!!(r!=null&&r[S.getter(s)(t[f])]))!=null?I:!1},a.index++;continue}else{let C;c!=null&&c.parents?C=[{field:c.field,value:c.value},...c.parents]:c?C=[c]:C=[],m={field:t[f].field,value:t[f].value,parents:C}}u=Math.max(u,h+1);let x=!1;if(l)x=v(l,t[f])!==!1;else{const C=y.findGroupExpand(i||[],m);C?x=C.expanded!==!1:x=d!==!1}e[e.length]={dataIndex:-1,dataItem:t[f],level:h,group:m,rowType:"groupHeader",expanded:x},x&&(m.expanded=x,u=Math.max(b(e,t[f].items,n,a,o,l,r,i,d,s,h+1,m),u)),(n==="always"||x&&n==="visible")&&(e[e.length]={dataIndex:-1,dataItem:t[f],rowType:"groupFooter",level:h,expanded:x})}return u}const B=(e,t)=>typeof e.colSpan=="function"?e.colSpan({dataItem:t,column:e}):e.colSpan||1;function F(e,t){const n=[[]];let a=0;for(let r=e.length-1;r>=0;r--)a=Math.max(a,e[r].depth),e[r].headerColSpan=e[r].headerColSpan||1,e[r].children.length>0&&(e[r].headerColSpan=e[r].children.reduce((i,d)=>d.hidden?i:i+d.headerColSpan,0));const o=[];let l=1;return e.forEach((r,i)=>{n[r.depth]=n[r.depth]||[];let d=!1;n[r.depth].length===0&&(l<=1?l=1+(r.children.length>0?0:a-r.depth):(l--,d=!0)),r.rowSpan=1+(r.children.length>0?0:a-r.depth),r.kFirst=d,r.index=n[r.depth].length,n[r.depth].push(i),r.ariaColumnIndex=o[r.depth]?o[r.depth]+1:1;for(let s=r.depth;s<r.depth+r.rowSpan;s++)o[s]=(o[s]||0)+r.headerColSpan}),y.updateLeft(n,e,t),y.updateRight(n,e,t),n}function N(e,t,n,a=0,o=!1){const l=[];if(!e)return[];e&&e.length===void 0&&(e=[e]),e.forEach((i,d)=>{i=i.props?i.props:i;const s=i.id?i.id:y.tableKeyboardNavigationTools.generateNavigatableId(`${n.prevId++}`,n.idPrefix,"column"),h=k.canUseDOM&&i.media&&window.matchMedia?!window.matchMedia(i.media).matches:!1,c=o||h||i.hidden,u=t==null?void 0:t.find(f=>f.id===s),I=N(i.children,(u==null?void 0:u.children)||[],n,a+1,c);l.push(Object.assign({depth:a},w.gridDefaultProps,I.length?{cell:()=>null,filterCell:()=>null}:{},i,{id:s,declarationIndex:l.length,children:I,headerColSpan:0,rowSpan:0,columnType:i.columnType||"data",colSpan:i.colSpan||1,isAccessible:!0,hidden:c,left:null,right:null,rowSpannable:i.rowSpannable},u?{width:u.width,orderIndex:u.orderIndex}:{}))});const r=(i,d)=>i.orderIndex===d.orderIndex?i.declarationIndex-d.declarationIndex:(i.orderIndex||0)-(d.orderIndex||0);if(l.sort(r),a===0){const i=[],d=(s,h)=>s.forEach(c=>{c.parentIndex=h,d(c.children,i.push(c)-1)});return d(l,-1),i}return l}const D=e=>Array.isArray(e)?e:e?e.data:[];function H(e,t,n,a){const o=D(e),l=[];if(o.length>0){let r=o[0];if(t)for(let d=0;d<t.length;d++)r=r.items&&r.items[0];Object.getOwnPropertyNames(r).forEach(d=>{d!==n.column&&l.push(Object.assign({id:y.tableKeyboardNavigationTools.generateNavigatableId(`${a.prevId++}`,a.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,headerColSpan:0,rowSpan:0,index:0,columnType:"data",left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0},w.gridDefaultProps,{field:d}))})}return l}const _=(e,t)=>{let n=e[t.parentIndex];for(;n;){if(n.footerCell)return!0;n=e[n.parentIndex]}return!1},$=e=>e.filter(t=>_(e,t)?!1:!!t.footerCell||!(t.children&&t.children.length>0)),z=e=>e.width!==void 0?Math.floor(parseFloat(e.width.toString()))+"px":void 0,V=(e,t)=>t&&t.filter(n=>n.field===e).length>0,E=e=>(e.sort((t,n)=>t.declarationIndex-n.declarationIndex),e.map(t=>{const{declarationIndex:n,parentIndex:a,depth:o,headerColSpan:l,rowSpan:r,index:i,kFirst:d,children:s,...h}=t;return s.length?{children:E(s),...h}:h})),R=e=>{const{filterCell:t,headerCell:n,footerCell:a,cells:o,cell:l,rowSpannable:r,defaultCell:i,...d}=e;return e.children.length?{...d,children:e.children.map(R)}:d},A=e=>({id:e.id,field:e.field,title:e.title,width:e.width,hidden:!1,children:e.children?O(e.children):null}),O=e=>e.map(A),L=e=>{const t=[],n=a=>a==null?void 0:a.forEach(o=>{t.push(o),n(o.children)});return n(e),t},W=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),K=17895697,Q=e=>{let t=[];return e.sortable&&(t=t.concat([g.GridContextMenuItemNames.sortAsc,g.GridContextMenuItemNames.sortDesc])),t},U=e=>{let t=[];return e.clipboard&&(t=t.concat([g.GridContextMenuItemNames.copySelection,g.GridContextMenuItemNames.copySelectionNoHeaders,g.GridContextMenuItemNames.paste])),e.editable&&(t.length&&(t=t.concat([g.GridContextMenuItemNames.separator])),t=t.concat([g.GridContextMenuItemNames.create,g.GridContextMenuItemNames.edit,g.GridContextMenuItemNames.delete])),e.selectable&&(t.length&&(t=t.concat([g.GridContextMenuItemNames.separator])),t=t.concat([g.GridContextMenuItemNames.select])),e.rowReorderable&&(t.length&&(t=t.concat([g.GridContextMenuItemNames.separator])),t=t.concat([g.GridContextMenuItemNames.reorderRow])),t},J=(e,t)=>{if(!(!e&&!t))return t?e?{...e,...t,select:{...e.select||{},...t.select||{}},hierarchy:{...e.hierarchy||{},...t.hierarchy||{}},group:{...e.group||{},...t.group||{}},edit:{...e.edit||{},...t.edit||{}}}:t:e},P=e=>{var n;return typeof e=="object"?(n=e.enabled)!=null?n:!0:e!=null?e:!1},X=()=>q.ServerFragment===G.ClientFragment,Y=e=>!!(e&&e.$$typeof===Symbol.for("react.client.reference")),Z=e=>({id:e.id,ariaColumnIndex:e.ariaColumnIndex,isSelected:e.isSelected,isInEdit:e.isInEdit,isSorted:e.isSorted,isAlt:e.isAlt,expanded:e.expanded,className:e.className,style:e.style,field:e.field,dataItem:e.dataItem,format:e.format,colSpan:e.colSpan,dataIndex:e.dataIndex,columnIndex:e.columnIndex,columnsCount:e.columnsCount,rowType:e.rowType,level:e.level,editor:e.editor,render:e.render,locked:e.locked,isRtl:e.isRtl,rowDataIndex:e.rowDataIndex,columnPosition:e.columnPosition,group:e.group}),ee=e=>{var a,o;const t=typeof e=="object"?(a=e.enabled)!=null?a:!0:e!=null?e:!1,n=typeof e=="object"?(o=e.valueGetter)!=null?o:(l,r)=>S.getter(r)(l):(l,r)=>S.getter(r)(l);return{enabled:t,valueGetter:n}},T=e=>{var t;return M.isValidElement(e)?e:(t=M.Children.toArray(e))==null?void 0:t[0]},te=(e,t)=>{const n=T(e);return n?M.cloneElement(n,t):null};exports.autoGenerateColumns=H;exports.clientColumn=R;exports.cloneReactElement=te;exports.firefox=W;exports.firefoxMaxHeight=K;exports.flatData=b;exports.footerColumns=$;exports.getClientCellProps=Z;exports.getColSpan=B;exports.getColumnState=A;exports.getColumnWidth=z;exports.getColumnsState=O;exports.getDataAsArray=D;exports.getDefaultBodyContextMenuItems=U;exports.getDefaultHeadContextMenuItems=Q;exports.getFlatColumnsState=L;exports.getNestedValue=v;exports.getReactElement=T;exports.getRowSpanOptions=ee;exports.isClient=X;exports.isClientReference=Y;exports.isRowReorderEnabled=P;exports.isSorted=V;exports.mapColumns=F;exports.readColumns=N;exports.resolveCells=J;exports.sanitizeColumns=E;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),v=require("../GridColumn.js"),y=require("@progress/kendo-data-query"),S=require("@progress/kendo-react-data-tools"),H=require("./_serverModule.js"),p=require("./_clientModule.js"),g=require("../contextMenu/enums.js"),q=require("@progress/kendo-react-common");function G(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const w=G(j);function M(e,t){const n=(e!=null?e:"").split(".");let a=t;return n.forEach(o=>{a=a?a[o]:void 0}),a}function b(e,t,n,a,o,l,r,i,d,s,h=0,c){var I;let u=h;for(let f=0;f<t.length;f++){let m;if(!o||t[f].value===void 0||t[f].items===void 0){e[e.length]={dataIndex:a.index,dataItem:t[f],rowType:"data",level:h,group:c,expanded:(I=l?M(l,t[f]):s&&!!(r!=null&&r[y.getter(s)(t[f])]))!=null?I:!1},a.index++;continue}else{let C;c!=null&&c.parents?C=[{field:c.field,value:c.value},...c.parents]:c?C=[c]:C=[],m={field:t[f].field,value:t[f].value,parents:C}}u=Math.max(u,h+1);let x=!1;if(l)x=M(l,t[f])!==!1;else{const C=S.findGroupExpand(i||[],m);C?x=C.expanded!==!1:x=d!==!1}e[e.length]={dataIndex:-1,dataItem:t[f],level:h,group:m,rowType:"groupHeader",expanded:x},x&&(m.expanded=x,u=Math.max(b(e,t[f].items,n,a,o,l,r,i,d,s,h+1,m),u)),(n==="always"||x&&n==="visible")&&(e[e.length]={dataIndex:-1,dataItem:t[f],rowType:"groupFooter",level:h,expanded:x})}return u}const k=(e,t)=>typeof e.colSpan=="function"?e.colSpan({dataItem:t,column:e}):e.colSpan||1;function F(e,t){const n=[[]];let a=0;for(let r=e.length-1;r>=0;r--)a=Math.max(a,e[r].depth),e[r].headerColSpan=e[r].headerColSpan||1,e[r].children.length>0&&(e[r].headerColSpan=e[r].children.reduce((i,d)=>d.hidden?i:i+d.headerColSpan,0));const o=[];let l=1;return e.forEach((r,i)=>{n[r.depth]=n[r.depth]||[];let d=!1;n[r.depth].length===0&&(l<=1?l=1+(r.children.length>0?0:a-r.depth):(l--,d=!0)),r.rowSpan=1+(r.children.length>0?0:a-r.depth),r.kFirst=d,r.index=n[r.depth].length,n[r.depth].push(i),r.ariaColumnIndex=o[r.depth]?o[r.depth]+1:1;for(let s=r.depth;s<r.depth+r.rowSpan;s++)o[s]=(o[s]||0)+r.headerColSpan}),S.updateLeft(n,e,t),S.updateRight(n,e,t),n}function N(e,t,n,a=0,o=!1){const l=[];if(!e)return[];e&&e.length===void 0&&(e=[e]),e.forEach((i,d)=>{i=i.props?i.props:i;const s=i.id?i.id:S.tableKeyboardNavigationTools.generateNavigatableId(`${n.prevId++}`,n.idPrefix,"column"),h=q.canUseDOM&&i.media&&window.matchMedia?!window.matchMedia(i.media).matches:!1,c=o||h||i.hidden,u=t==null?void 0:t.find(f=>f.id===s),I=N(i.children,(u==null?void 0:u.children)||[],n,a+1,c);l.push(Object.assign({depth:a},v.gridDefaultProps,I.length?{cell:()=>null,filterCell:()=>null}:{},i,{id:s,declarationIndex:l.length,children:I,headerColSpan:0,rowSpan:0,columnType:i.columnType||"data",colSpan:i.colSpan||1,isAccessible:!0,hidden:c,left:null,right:null,rowSpannable:i.rowSpannable},u?{width:u.width,orderIndex:u.orderIndex}:{}))});const r=(i,d)=>i.orderIndex===d.orderIndex?i.declarationIndex-d.declarationIndex:(i.orderIndex||0)-(d.orderIndex||0);if(l.sort(r),a===0){const i=[],d=(s,h)=>s.forEach(c=>{c.parentIndex=h,d(c.children,i.push(c)-1)});return d(l,-1),i}return l}const R=e=>Array.isArray(e)?e:e?e.data:[];function B(e,t,n,a){const o=R(e),l=[];if(o.length>0){let r=o[0];if(t)for(let d=0;d<t.length;d++)r=r.items&&r.items[0];Object.getOwnPropertyNames(r).forEach(d=>{d!==n.column&&l.push(Object.assign({id:S.tableKeyboardNavigationTools.generateNavigatableId(`${a.prevId++}`,a.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,headerColSpan:0,rowSpan:0,index:0,columnType:"data",left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0},v.gridDefaultProps,{field:d}))})}return l}const _=(e,t)=>{let n=e[t.parentIndex];for(;n;){if(n.footerCell)return!0;n=e[n.parentIndex]}return!1},$=e=>e.filter(t=>_(e,t)?!1:!!t.footerCell||!(t.children&&t.children.length>0)),z=e=>e.width!==void 0?Math.floor(parseFloat(e.width.toString()))+"px":void 0,V=(e,t)=>t&&t.filter(n=>n.field===e).length>0,D=e=>(e.sort((t,n)=>t.declarationIndex-n.declarationIndex),e.map(t=>{const{declarationIndex:n,parentIndex:a,depth:o,headerColSpan:l,rowSpan:r,index:i,kFirst:d,children:s,...h}=t;return s.length?{children:D(s),...h}:h})),E=e=>{const{filterCell:t,headerCell:n,footerCell:a,cells:o,cell:l,rowSpannable:r,defaultCell:i,...d}=e;return e.children.length?{...d,children:e.children.map(E)}:d},A=e=>({id:e.id,field:e.field,title:e.title,width:e.width,hidden:!1,children:e.children?O(e.children):null}),O=e=>e.map(A),L=e=>{const t=[],n=a=>a==null?void 0:a.forEach(o=>{t.push(o),n(o.children)});return n(e),t},W=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),K=17895697,Q=e=>{let t=[];return e.sortable&&(t=t.concat([g.GridContextMenuItemNames.sortAsc,g.GridContextMenuItemNames.sortDesc])),t},U=e=>{let t=[];return e.clipboard&&(t=t.concat([g.GridContextMenuItemNames.copySelection,g.GridContextMenuItemNames.copySelectionNoHeaders,g.GridContextMenuItemNames.paste])),e.editable&&(t.length&&(t=t.concat([g.GridContextMenuItemNames.separator])),t=t.concat([g.GridContextMenuItemNames.create,g.GridContextMenuItemNames.edit,g.GridContextMenuItemNames.delete])),e.selectable&&(t.length&&(t=t.concat([g.GridContextMenuItemNames.separator])),t=t.concat([g.GridContextMenuItemNames.select])),e.rowReorderable&&(t.length&&(t=t.concat([g.GridContextMenuItemNames.separator])),t=t.concat([g.GridContextMenuItemNames.reorderRow])),t},J=(e,t)=>{if(!(!e&&!t))return t?e?{...e,...t,select:{...e.select||{},...t.select||{}},hierarchy:{...e.hierarchy||{},...t.hierarchy||{}},group:{...e.group||{},...t.group||{}},edit:{...e.edit||{},...t.edit||{}}}:t:e},P=e=>{var n;return typeof e=="object"?(n=e.enabled)!=null?n:!0:e!=null?e:!1},X=()=>H.ServerFragment===p.ClientFragment,Y=e=>!!(e&&e.$$typeof===Symbol.for("react.client.reference")),Z=e=>({id:e.id,ariaColumnIndex:e.ariaColumnIndex,isSelected:e.isSelected,isInEdit:e.isInEdit,isSorted:e.isSorted,isAlt:e.isAlt,expanded:e.expanded,className:e.className,style:e.style,field:e.field,dataItem:e.dataItem,format:e.format,colSpan:e.colSpan,dataIndex:e.dataIndex,columnIndex:e.columnIndex,columnsCount:e.columnsCount,rowType:e.rowType,level:e.level,editor:e.editor,render:e.render,locked:e.locked,isRtl:e.isRtl,rowDataIndex:e.rowDataIndex,columnPosition:e.columnPosition,group:e.group}),ee=e=>{var a,o;const t=typeof e=="object"?(a=e.enabled)!=null?a:!0:e!=null?e:!1,n=typeof e=="object"?(o=e.valueGetter)!=null?o:(l,r)=>y.getter(r)(l):(l,r)=>y.getter(r)(l);return{enabled:t,valueGetter:n}},T=e=>{var t;return w.isValidElement(e)?e:(t=w.Children.toArray(e))==null?void 0:t[0]},te=(e,t)=>{const n=T(e);return n?w.cloneElement(n,t):null},ne=e=>{let t=0;if(e){const n=e.insertRow(0),a=n.insertCell(0);a.textContent="&nbsp;",t=n.getBoundingClientRect().height,e.deleteRow(0)}return t};exports.autoGenerateColumns=B;exports.calcRowHeight=ne;exports.clientColumn=E;exports.cloneReactElement=te;exports.firefox=W;exports.firefoxMaxHeight=K;exports.flatData=b;exports.footerColumns=$;exports.getClientCellProps=Z;exports.getColSpan=k;exports.getColumnState=A;exports.getColumnWidth=z;exports.getColumnsState=O;exports.getDataAsArray=R;exports.getDefaultBodyContextMenuItems=U;exports.getDefaultHeadContextMenuItems=Q;exports.getFlatColumnsState=L;exports.getNestedValue=M;exports.getReactElement=T;exports.getRowSpanOptions=ee;exports.isClient=X;exports.isClientReference=Y;exports.isRowReorderEnabled=P;exports.isSorted=V;exports.mapColumns=F;exports.readColumns=N;exports.resolveCells=J;exports.sanitizeColumns=D;
package/utils/index.mjs CHANGED
@@ -5,79 +5,79 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as w from "react";
9
- import { gridDefaultProps as b } from "../GridColumn.mjs";
8
+ import * as y from "react";
9
+ import { gridDefaultProps as E } from "../GridColumn.mjs";
10
10
  import { getter as v } from "@progress/kendo-data-query";
11
- import { findGroupExpand as M, updateLeft as A, updateRight as D, tableKeyboardNavigationTools as E } from "@progress/kendo-react-data-tools";
12
- import { ServerFragment as m } from "./_serverModule.mjs";
13
- import { ClientFragment as T } from "./_clientModule.mjs";
11
+ import { findGroupExpand as b, updateLeft as A, updateRight as D, tableKeyboardNavigationTools as M } from "@progress/kendo-react-data-tools";
12
+ import { ServerFragment as R } from "./_serverModule.mjs";
13
+ import { ClientFragment as m } from "./_clientModule.mjs";
14
14
  import { GridContextMenuItemNames as g } from "../contextMenu/enums.mjs";
15
- import { canUseDOM as B } from "@progress/kendo-react-common";
15
+ import { canUseDOM as T } from "@progress/kendo-react-common";
16
16
  function u(e, t) {
17
17
  const r = (e != null ? e : "").split(".");
18
- let i = t;
18
+ let a = t;
19
19
  return r.forEach((o) => {
20
- i = i ? i[o] : void 0;
21
- }), i;
20
+ a = a ? a[o] : void 0;
21
+ }), a;
22
22
  }
23
- function F(e, t, r, i, o, l, n, a, d, f, c = 0, h) {
24
- var y;
23
+ function F(e, t, r, a, o, l, n, i, d, f, c = 0, s) {
24
+ var S;
25
25
  let x = c;
26
- for (let s = 0; s < t.length; s++) {
27
- let S;
28
- if (!o || t[s].value === void 0 || t[s].items === void 0) {
26
+ for (let h = 0; h < t.length; h++) {
27
+ let w;
28
+ if (!o || t[h].value === void 0 || t[h].items === void 0) {
29
29
  e[e.length] = {
30
- dataIndex: i.index,
31
- dataItem: t[s],
30
+ dataIndex: a.index,
31
+ dataItem: t[h],
32
32
  rowType: "data",
33
33
  level: c,
34
- group: h,
34
+ group: s,
35
35
  // This is related to detail-row expansion
36
- expanded: (y = l ? u(l, t[s]) : f && !!(n != null && n[v(f)(t[s])])) != null ? y : !1
37
- }, i.index++;
36
+ expanded: (S = l ? u(l, t[h]) : f && !!(n != null && n[v(f)(t[h])])) != null ? S : !1
37
+ }, a.index++;
38
38
  continue;
39
39
  } else {
40
40
  let C;
41
- h != null && h.parents ? C = [{ field: h.field, value: h.value }, ...h.parents] : h ? C = [h] : C = [], S = {
42
- field: t[s].field,
43
- value: t[s].value,
41
+ s != null && s.parents ? C = [{ field: s.field, value: s.value }, ...s.parents] : s ? C = [s] : C = [], w = {
42
+ field: t[h].field,
43
+ value: t[h].value,
44
44
  parents: C
45
45
  };
46
46
  }
47
47
  x = Math.max(x, c + 1);
48
48
  let I = !1;
49
49
  if (l)
50
- I = u(l, t[s]) !== !1;
50
+ I = u(l, t[h]) !== !1;
51
51
  else {
52
- const C = M(a || [], S);
52
+ const C = b(i || [], w);
53
53
  C ? I = C.expanded !== !1 : I = d !== !1;
54
54
  }
55
55
  e[e.length] = {
56
56
  dataIndex: -1,
57
- dataItem: t[s],
57
+ dataItem: t[h],
58
58
  level: c,
59
- group: S,
59
+ group: w,
60
60
  rowType: "groupHeader",
61
61
  expanded: I
62
- }, I && (S.expanded = I, x = Math.max(
62
+ }, I && (w.expanded = I, x = Math.max(
63
63
  F(
64
64
  e,
65
- t[s].items,
65
+ t[h].items,
66
66
  r,
67
- i,
67
+ a,
68
68
  o,
69
69
  l,
70
70
  n,
71
- a,
71
+ i,
72
72
  d,
73
73
  f,
74
74
  c + 1,
75
- S
75
+ w
76
76
  ),
77
77
  x
78
78
  )), (r === "always" || I && r === "visible") && (e[e.length] = {
79
79
  dataIndex: -1,
80
- dataItem: t[s],
80
+ dataItem: t[h],
81
81
  rowType: "groupFooter",
82
82
  level: c,
83
83
  expanded: I
@@ -88,65 +88,65 @@ function F(e, t, r, i, o, l, n, a, d, f, c = 0, h) {
88
88
  const K = (e, t) => typeof e.colSpan == "function" ? e.colSpan({ dataItem: t, column: e }) : e.colSpan || 1;
89
89
  function Q(e, t) {
90
90
  const r = [[]];
91
- let i = 0;
91
+ let a = 0;
92
92
  for (let n = e.length - 1; n >= 0; n--)
93
- i = Math.max(i, e[n].depth), e[n].headerColSpan = e[n].headerColSpan || 1, e[n].children.length > 0 && (e[n].headerColSpan = e[n].children.reduce(
94
- (a, d) => d.hidden ? a : a + d.headerColSpan,
93
+ a = Math.max(a, e[n].depth), e[n].headerColSpan = e[n].headerColSpan || 1, e[n].children.length > 0 && (e[n].headerColSpan = e[n].children.reduce(
94
+ (i, d) => d.hidden ? i : i + d.headerColSpan,
95
95
  0
96
96
  ));
97
97
  const o = [];
98
98
  let l = 1;
99
- return e.forEach((n, a) => {
99
+ return e.forEach((n, i) => {
100
100
  r[n.depth] = r[n.depth] || [];
101
101
  let d = !1;
102
- r[n.depth].length === 0 && (l <= 1 ? l = 1 + (n.children.length > 0 ? 0 : i - n.depth) : (l--, d = !0)), n.rowSpan = 1 + (n.children.length > 0 ? 0 : i - n.depth), n.kFirst = d, n.index = r[n.depth].length, r[n.depth].push(a), n.ariaColumnIndex = o[n.depth] ? o[n.depth] + 1 : 1;
102
+ r[n.depth].length === 0 && (l <= 1 ? l = 1 + (n.children.length > 0 ? 0 : a - n.depth) : (l--, d = !0)), n.rowSpan = 1 + (n.children.length > 0 ? 0 : a - n.depth), n.kFirst = d, n.index = r[n.depth].length, r[n.depth].push(i), n.ariaColumnIndex = o[n.depth] ? o[n.depth] + 1 : 1;
103
103
  for (let f = n.depth; f < n.depth + n.rowSpan; f++)
104
104
  o[f] = (o[f] || 0) + n.headerColSpan;
105
105
  }), A(r, e, t), D(r, e, t), r;
106
106
  }
107
- function j(e, t, r, i = 0, o = !1) {
107
+ function H(e, t, r, a = 0, o = !1) {
108
108
  const l = [];
109
109
  if (!e)
110
110
  return [];
111
- e && e.length === void 0 && (e = [e]), e.forEach((a, d) => {
112
- a = a.props ? a.props : a;
113
- const f = a.id ? a.id : E.generateNavigatableId(`${r.prevId++}`, r.idPrefix, "column"), c = B && a.media && window.matchMedia ? !window.matchMedia(a.media).matches : !1, h = o || c || a.hidden, x = t == null ? void 0 : t.find((s) => s.id === f), y = j(a.children, (x == null ? void 0 : x.children) || [], r, i + 1, h);
111
+ e && e.length === void 0 && (e = [e]), e.forEach((i, d) => {
112
+ i = i.props ? i.props : i;
113
+ const f = i.id ? i.id : M.generateNavigatableId(`${r.prevId++}`, r.idPrefix, "column"), c = T && i.media && window.matchMedia ? !window.matchMedia(i.media).matches : !1, s = o || c || i.hidden, x = t == null ? void 0 : t.find((h) => h.id === f), S = H(i.children, (x == null ? void 0 : x.children) || [], r, a + 1, s);
114
114
  l.push(
115
115
  Object.assign(
116
- { depth: i },
117
- b,
118
- y.length ? { cell: () => null, filterCell: () => null } : {},
119
- a,
116
+ { depth: a },
117
+ E,
118
+ S.length ? { cell: () => null, filterCell: () => null } : {},
119
+ i,
120
120
  {
121
121
  id: f,
122
122
  declarationIndex: l.length,
123
- children: y,
123
+ children: S,
124
124
  headerColSpan: 0,
125
125
  rowSpan: 0,
126
- columnType: a.columnType || "data",
127
- colSpan: a.colSpan || 1,
126
+ columnType: i.columnType || "data",
127
+ colSpan: i.colSpan || 1,
128
128
  isAccessible: !0,
129
- hidden: h,
129
+ hidden: s,
130
130
  left: null,
131
131
  right: null,
132
- rowSpannable: a.rowSpannable
132
+ rowSpannable: i.rowSpannable
133
133
  },
134
134
  x ? { width: x.width, orderIndex: x.orderIndex } : {}
135
135
  )
136
136
  );
137
137
  });
138
- const n = (a, d) => a.orderIndex === d.orderIndex ? a.declarationIndex - d.declarationIndex : (a.orderIndex || 0) - (d.orderIndex || 0);
139
- if (l.sort(n), i === 0) {
140
- const a = [], d = (f, c) => f.forEach((h) => {
141
- h.parentIndex = c, d(h.children, a.push(h) - 1);
138
+ const n = (i, d) => i.orderIndex === d.orderIndex ? i.declarationIndex - d.declarationIndex : (i.orderIndex || 0) - (d.orderIndex || 0);
139
+ if (l.sort(n), a === 0) {
140
+ const i = [], d = (f, c) => f.forEach((s) => {
141
+ s.parentIndex = c, d(s.children, i.push(s) - 1);
142
142
  });
143
- return d(l, -1), a;
143
+ return d(l, -1), i;
144
144
  }
145
145
  return l;
146
146
  }
147
- const H = (e) => Array.isArray(e) ? e : e ? e.data : [];
148
- function X(e, t, r, i) {
149
- const o = H(e), l = [];
147
+ const j = (e) => Array.isArray(e) ? e : e ? e.data : [];
148
+ function X(e, t, r, a) {
149
+ const o = j(e), l = [];
150
150
  if (o.length > 0) {
151
151
  let n = o[0];
152
152
  if (t)
@@ -156,7 +156,7 @@ function X(e, t, r, i) {
156
156
  d !== r.column && l.push(
157
157
  Object.assign(
158
158
  {
159
- id: E.generateNavigatableId(`${i.prevId++}`, i.idPrefix, "column"),
159
+ id: M.generateNavigatableId(`${a.prevId++}`, a.idPrefix, "column"),
160
160
  declarationIndex: -1,
161
161
  parentIndex: -1,
162
162
  depth: 0,
@@ -172,7 +172,7 @@ function X(e, t, r, i) {
172
172
  ariaColumnIndex: 0,
173
173
  isAccessible: !0
174
174
  },
175
- b,
175
+ E,
176
176
  { field: d }
177
177
  )
178
178
  );
@@ -180,7 +180,7 @@ function X(e, t, r, i) {
180
180
  }
181
181
  return l;
182
182
  }
183
- const O = (e, t) => {
183
+ const B = (e, t) => {
184
184
  let r = e[t.parentIndex];
185
185
  for (; r; ) {
186
186
  if (r.footerCell)
@@ -188,27 +188,27 @@ const O = (e, t) => {
188
188
  r = e[r.parentIndex];
189
189
  }
190
190
  return !1;
191
- }, Y = (e) => e.filter((t) => O(e, t) ? !1 : !!t.footerCell || !(t.children && t.children.length > 0)), Z = (e) => e.width !== void 0 ? Math.floor(parseFloat(e.width.toString())) + "px" : void 0, _ = (e, t) => t && t.filter((r) => r.field === e).length > 0, R = (e) => (e.sort((t, r) => t.declarationIndex - r.declarationIndex), e.map((t) => {
192
- const { declarationIndex: r, parentIndex: i, depth: o, headerColSpan: l, rowSpan: n, index: a, kFirst: d, children: f, ...c } = t;
191
+ }, Y = (e) => e.filter((t) => B(e, t) ? !1 : !!t.footerCell || !(t.children && t.children.length > 0)), Z = (e) => e.width !== void 0 ? Math.floor(parseFloat(e.width.toString())) + "px" : void 0, _ = (e, t) => t && t.filter((r) => r.field === e).length > 0, O = (e) => (e.sort((t, r) => t.declarationIndex - r.declarationIndex), e.map((t) => {
192
+ const { declarationIndex: r, parentIndex: a, depth: o, headerColSpan: l, rowSpan: n, index: i, kFirst: d, children: f, ...c } = t;
193
193
  return f.length ? {
194
- children: R(f),
194
+ children: O(f),
195
195
  ...c
196
196
  } : c;
197
- })), N = (e) => {
198
- const { filterCell: t, headerCell: r, footerCell: i, cells: o, cell: l, rowSpannable: n, defaultCell: a, ...d } = e;
197
+ })), p = (e) => {
198
+ const { filterCell: t, headerCell: r, footerCell: a, cells: o, cell: l, rowSpannable: n, defaultCell: i, ...d } = e;
199
199
  return e.children.length ? {
200
200
  ...d,
201
- children: e.children.map(N)
201
+ children: e.children.map(p)
202
202
  } : d;
203
- }, k = (e) => ({
203
+ }, N = (e) => ({
204
204
  id: e.id,
205
205
  field: e.field,
206
206
  title: e.title,
207
207
  width: e.width,
208
208
  hidden: !1,
209
- children: e.children ? p(e.children) : null
210
- }), p = (e) => e.map(k), G = (e) => {
211
- const t = [], r = (i) => i == null ? void 0 : i.forEach((o) => {
209
+ children: e.children ? k(e.children) : null
210
+ }), k = (e) => e.map(N), G = (e) => {
211
+ const t = [], r = (a) => a == null ? void 0 : a.forEach((o) => {
212
212
  t.push(o), r(o.children);
213
213
  });
214
214
  return r(e), t;
@@ -248,10 +248,10 @@ const O = (e, t) => {
248
248
  ...t.edit || {}
249
249
  }
250
250
  } : t : e;
251
- }, ae = (e) => {
251
+ }, ie = (e) => {
252
252
  var r;
253
253
  return typeof e == "object" ? (r = e.enabled) != null ? r : !0 : e != null ? e : !1;
254
- }, ie = () => m === T, de = (e) => !!(e && e.$$typeof === Symbol.for("react.client.reference")), le = (e) => ({
254
+ }, ae = () => R === m, de = (e) => !!(e && e.$$typeof === Symbol.for("react.client.reference")), le = (e) => ({
255
255
  id: e.id,
256
256
  ariaColumnIndex: e.ariaColumnIndex,
257
257
  isSelected: e.isSelected,
@@ -278,19 +278,27 @@ const O = (e, t) => {
278
278
  columnPosition: e.columnPosition,
279
279
  group: e.group
280
280
  }), oe = (e) => {
281
- var i, o;
282
- const t = typeof e == "object" ? (i = e.enabled) != null ? i : !0 : e != null ? e : !1, r = typeof e == "object" ? (o = e.valueGetter) != null ? o : (l, n) => v(n)(l) : (l, n) => v(n)(l);
281
+ var a, o;
282
+ const t = typeof e == "object" ? (a = e.enabled) != null ? a : !0 : e != null ? e : !1, r = typeof e == "object" ? (o = e.valueGetter) != null ? o : (l, n) => v(n)(l) : (l, n) => v(n)(l);
283
283
  return { enabled: t, valueGetter: r };
284
284
  }, $ = (e) => {
285
285
  var t;
286
- return w.isValidElement(e) ? e : (t = w.Children.toArray(e)) == null ? void 0 : t[0];
286
+ return y.isValidElement(e) ? e : (t = y.Children.toArray(e)) == null ? void 0 : t[0];
287
287
  }, fe = (e, t) => {
288
288
  const r = $(e);
289
- return r ? w.cloneElement(r, t) : null;
289
+ return r ? y.cloneElement(r, t) : null;
290
+ }, se = (e) => {
291
+ let t = 0;
292
+ if (e) {
293
+ const r = e.insertRow(0), a = r.insertCell(0);
294
+ a.textContent = "&nbsp;", t = r.getBoundingClientRect().height, e.deleteRow(0);
295
+ }
296
+ return t;
290
297
  };
291
298
  export {
292
299
  X as autoGenerateColumns,
293
- N as clientColumn,
300
+ se as calcRowHeight,
301
+ p as clientColumn,
294
302
  fe as cloneReactElement,
295
303
  P as firefox,
296
304
  ee as firefoxMaxHeight,
@@ -298,22 +306,22 @@ export {
298
306
  Y as footerColumns,
299
307
  le as getClientCellProps,
300
308
  K as getColSpan,
301
- k as getColumnState,
309
+ N as getColumnState,
302
310
  Z as getColumnWidth,
303
- p as getColumnsState,
304
- H as getDataAsArray,
311
+ k as getColumnsState,
312
+ j as getDataAsArray,
305
313
  ne as getDefaultBodyContextMenuItems,
306
314
  te as getDefaultHeadContextMenuItems,
307
315
  G as getFlatColumnsState,
308
316
  u as getNestedValue,
309
317
  $ as getReactElement,
310
318
  oe as getRowSpanOptions,
311
- ie as isClient,
319
+ ae as isClient,
312
320
  de as isClientReference,
313
- ae as isRowReorderEnabled,
321
+ ie as isRowReorderEnabled,
314
322
  _ as isSorted,
315
323
  Q as mapColumns,
316
- j as readColumns,
324
+ H as readColumns,
317
325
  re as resolveCells,
318
- R as sanitizeColumns
326
+ O as sanitizeColumns
319
327
  };
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2025 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- "use 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 l;if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!((l=this.containerRef)!=null&&l.current))return;if(this.scrollSyncing){this.scrollSyncing=!1;return}const e=this.container.scrollTop,a=this.lastScrollTop>=e,h=!a;this.lastScrollTop=e;let i=this.rowHeightService.index(e),o=this.rowHeightService.offset(i);const{offsetHeight:n}=this.containerRef.current,c=this.rowHeightService.index(e+n);if(h&&c>=this.lastLoaded&&this.lastLoaded<this.total){const r=i+this.pageSize-this.total;r>0&&(i=i-r,o=this.rowHeightService.offset(i)),this.firstLoaded=i,this.translate(o);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;
@@ -1,52 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2025 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- import * as f from "react";
9
- import { firefox as d } from "./utils/index.mjs";
10
- class S {
11
- constructor(t) {
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.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);
13
- }
14
- get container() {
15
- var t;
16
- return ((t = this.containerRef) == null ? void 0 : t.current) || void 0;
17
- }
18
- translate(t, i) {
19
- this.scrollableVirtual && this.table && (d || this.reactVersion <= 17 || i ? this.table.style.transform = "translateY(" + t + "px)" : this.tableTransform = "translateY(" + t + "px)");
20
- }
21
- changePage(t, i) {
22
- this.PageChange && this.PageChange({ skip: Math.max(0, t), take: this.pageSize }, i);
23
- }
24
- reset() {
25
- this.scrollSyncing = !0, !this.fixedScroll && (this.container && (this.container.scrollTop = 0), this.translate(0, !0));
26
- }
27
- scrollHandler(t) {
28
- var h;
29
- if (!this.scrollableVirtual || !this.container || !this.table || !this.rowHeightService || !((h = this.containerRef) != null && h.current))
30
- return;
31
- if (this.scrollSyncing) {
32
- this.scrollSyncing = !1;
33
- return;
34
- }
35
- const i = this.container.scrollTop, a = this.lastScrollTop >= i, o = !a;
36
- this.lastScrollTop = i;
37
- let s = this.rowHeightService.index(i), r = this.rowHeightService.offset(s);
38
- const { offsetHeight: l } = this.containerRef.current, n = this.rowHeightService.index(i + l);
39
- if (o && n >= this.lastLoaded && this.lastLoaded < this.total) {
40
- const e = s + this.pageSize - this.total;
41
- e > 0 && (s = s - e, r = this.rowHeightService.offset(s)), this.firstLoaded = s, this.translate(r);
42
- const c = this.firstLoaded + this.pageSize;
43
- this.lastLoaded = Math.min(c, this.total), this.changePage(this.firstLoaded, t);
44
- } else if (a && s < this.firstLoaded) {
45
- const e = Math.floor(this.pageSize * 0.3);
46
- this.firstLoaded = Math.max(s - e, 0), this.translate(this.rowHeightService.offset(this.firstLoaded)), this.lastLoaded = Math.min(this.firstLoaded + this.pageSize, this.total), this.changePage(this.firstLoaded, t);
47
- }
48
- }
49
- }
50
- export {
51
- S as VirtualScrollFixed
52
- };