@progress/kendo-react-grid 10.1.0-develop.9 → 10.1.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.
package/GridComponent.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 wt=require("react"),c=require("@progress/kendo-react-common"),St=require("@progress/kendo-data-query"),b=require("@progress/kendo-react-data-tools"),Gt=require("./cells/GridSelectionCell.js"),Et=require("./cells/GridHierarchyCell.js"),Rt=require("./cells/GridEditCell.js"),vt=require("./header/Header.js"),It=require("./header/HeaderRow.js"),xt=require("./header/FilterRow.js"),Nt=require("./header/GroupPanel.js"),kt=require("./footer/Footer.js"),u=require("./utils/index.js"),qt=require("./cells/GridCell.js"),Ve=require("./cells/GridGroupCell.js"),Ft=require("./rows/GridRow.js"),Dt=require("./header/GridHeaderSelectionCell.js"),Oe=require("./components/noRecords/GridNoRecords.js"),Be=require("./filterCommon.js"),Tt=require("./footer/FooterRow.js"),Ht=require("./paging/GridPagerSettings.js"),Pt=require("./package-metadata.js"),Kt=require("./cells/GridDetailCell.js"),At=require("./cells/GridDetailHierarchyCell.js"),Le=require("./components/noRecords/GridNoRecordsContainer.js"),_e=require("./GridClientWrapper.js"),Vt=require("./components/colGroup/GridColGroup.js"),Ot=require("./components/table/GridTable.js"),ze=require("./components/GridDropClue.js"),Me=require("./components/GridDragClue.js"),We=require("./components/table/GridTableBody.js"),Bt=require("./components/PagerContainer.js"),Lt=require("./components/table/GridTableScrollable.js"),je=require("./components/GridElementContainer.js"),_t=require("./components/GridContainerElementContainer.js"),zt=require("./components/VirtualScrollHeightContainer.js"),ne=require("./messages/index.js"),Q=require("./VirtualScrollFixed.js"),Mt=require("./VirtualScroll.js"),Wt=require("./components/GridCustomCellClientContainer.js"),jt=require("./components/GridDraggableRowsContainer.js"),$t=require("./cells/GridRowReorderCell.js"),Qt=require("./header/client/GridHeaderRowReorderCell.js"),$e=require("./components/GridLoader.js"),Ut=require("./utils/premium.js"),Qe=require("@progress/kendo-react-intl");function Jt(e){const q=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const y in e)if(y!=="default"){const E=Object.getOwnPropertyDescriptor(e,y);Object.defineProperty(q,y,E.get?E:{enumerable:!0,get:()=>e[y]})}}return q.default=e,Object.freeze(q)}const a=Jt(wt),Ue=a.forwardRef((e,q)=>{var Ie,xe,Ne,ke,qe,Fe,De,Te;const y=e.id+"-role-element-id",E=e.navigatable?y:"";let v=e.columnsState||[];const Je=(t,n,d,i,o,g,l)=>{const s=[],C=u.flatData(s,G,t,{index:n},d!==void 0,i,o,g,ot.defaultExpand,l);return{flattedData:s,resolvedGroupsCount:C}},Xe=t=>{const n=t.filter(d=>d&&d.type&&d.type.displayName==="KendoReactGridColumn");return u.readColumns(n,v,{prevId:0,idPrefix:E})},Ye=()=>{const t=[],n=(d,i)=>d==null?void 0:d.forEach(o=>{const g=o.hidden||i;t.push({...o,hidden:g}),n(o.children,g)});return n(v,!1),t},Ze=t=>{const n=Ye();return t.filter(d=>{var i;return!d.hidden&&!((i=n.find(o=>o.id===d.id))!=null&&i.hidden)})},pe=(t,n)=>{var d;f=Xe(t),f.filter(i=>!i.hidden).length===0&&(f=u.autoGenerateColumns(G,e.group,{column:(d=O.column)!=null?d:e.expandField},{prevId:0,idPrefix:E})),tt(f,n),f=Ze(f),F=u.mapColumns(f,!0),ie=f.map(u.clientColumn)},et=(t,n)=>{const d=i=>{var g;const o=n.find(l=>l.id===i.id);return o?(o.children=(g=i.children)==null?void 0:g.map(d),o):u.getColumnState(i)};v=t.filter(i=>i.parentIndex===-1).map(d)},tt=(t,n)=>{var g;t.filter(l=>e.selectedField&&l.field===e.selectedField||l.columnType==="checkbox").forEach(l=>{l.width=l.width||"50px",l.cell=l.cell||Gt.GridSelectionCell,l._type="edit",l.headerCell=l.headerCell||Dt.GridHeaderSelectionCell}),T!==void 0&&t.filter(l=>l.columnType==="reorder").forEach(l=>{l.width=l.width||"50px",l.cell=l.cell||$t.GridRowReorderCell,l.headerCell=l.headerCell||Qt.GridHeaderRowReorderCell,l.sortable=!1,l.filterable=!1,l.editable=!1});const d=u.getFlatColumnsState(v);et(t,d);const i={id:"",resizable:!0,width:"32px",title:" ",declarationIndex:-1,orderIndex:-1,children:[],parentIndex:-1,depth:0,colSpan:0,headerColSpan:0,rowSpan:0,left:0,right:0,index:0,rightBorder:!1,ariaColumnIndex:0,isAccessible:!0};let o=0;if((e.expandField||O.enabled)&&e.detail){const l={...i,_type:"expand",id:b.tableKeyboardNavigationTools.generateNavigatableId(`${o++}`,"expand","column"),cell:Et.GridHierarchyCell,field:(g=O.column)!=null?g:e.expandField,headerClassName:c.classNames(m.hierarchyCell({}))};t.unshift(l),v.unshift(d.find(s=>s.id===l.id)||u.getColumnState(l))}for(let l=0;l<n;l++){const s={...i,isAccessible:!1,cell:Ve.GridGroupCell,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${o++}`,"group","column"),field:"value",locked:e.lockGroups};t.unshift(s),v.unshift(d.find(C=>C.id===s.id)||u.getColumnState(s))}t.slice(o).forEach(l=>{l.parentIndex>=0&&(l.parentIndex+=o),l.rowSpannable=l.rowSpannable!==void 0?u.getRowSpanOptions(l.rowSpannable):de})},U=()=>{var t;return Array.isArray(e.data)?G.length===e.total:G?e.total===((t=e.data)==null?void 0:t.total):!1},at=()=>{const{rowHeight:t,detailRowHeight:n,detail:d,expandField:i}=e,o=U(),g=t!==void 0&&t>0,l=n!==void 0&&n>0;return!g||V&&!o||!!(d&&i)&&(!l||!o)?Mt.VirtualScroll:Q.VirtualScrollFixed},J=()=>e.isClient?f:ie,lt=(t,n,d,i,o,g)=>{let l=u.getColSpan(t,n);if(e.columnVirtualization&&t.colSpan===1)return{colSpan:g,colsToSkip:o};let s=d.length-1===i,C=d.length-i;return e.columnVirtualization&&(s=w.length-1===i,C=w.length-i),l>1&&!s?o=l-1:l=1,C<=l&&!s&&(l=C),{colSpan:l,colsToSkip:o}};let X,h=[],z,f=[],ie=[],F=[[]];const rt=e.scrollLeftRef||{current:0},M=e.localization||new Qe.LocalizationService(e.language),nt=e.intl||new Qe.IntlService((Ie=e.locale)!=null?Ie:"en"),D=e.unstyled,m=D&&D.uGrid?D.uGrid:c.uGrid,T=u.isRowReorderEnabled(e.rowReorderable),H=e.autoProcessData===!0?{group:!0,sort:!0,filter:!0,search:!0,page:!0}:e.autoProcessData;let G,k;if(Array.isArray(e.data)?(G=e.data,k=(xe=e.total)!=null?xe:G.length):(G=((Ne=e.data)==null?void 0:Ne.data)||[],k=(Fe=(qe=e.total)!=null?qe:(ke=e.data)==null?void 0:ke.total)!=null?Fe:G.length),H){const{data:t,total:n}=St.process(G,{group:H.group?e.group:void 0,sort:H.sort?e.sort:void 0,filter:b.combineFilters(H.filter?e.filter:void 0,H.search?e.search:void 0),...H.page?{take:e.take,skip:e.skip}:{}});G=t,k=(De=e.total)!=null?De:n}const{size:I="medium"}=e,it=typeof e.groupable=="object"&&e.groupable.footer||"none",P=e.scrollable==="virtual",V=e.groupable===!0||typeof e.groupable=="object"&&e.groupable.enabled!==!1,O=b.getDetailExpandableOptions(!!e.detail),ot=b.getGroupExpandableOptions(typeof e.groupable=="object"&&e.groupable.enabled!==!1?e.groupable.expandable:e.groupable),{resolvedGroupsCount:dt,flattedData:ct}=Je(it,e.skip||0,e.group,e.expandField,e.detailExpand,e.groupExpand,e.dataItemKey);h=ct;const Y=at();Y===Q.VirtualScrollFixed&&U()&&(z=h.slice(e.skip||0,(e.skip||0)+((e.take!==void 0?e.take:e.pageSize)||0)));const oe=b.getSelectionOptions(e.selectable||!!e.selectedField),de=u.getRowSpanOptions(e.rowSpannable),st=oe&&oe.drag?"none":void 0,W=a.useMemo(()=>a.Children.toArray(e.children),[e.children]);pe(W,dt);const Z=a.useMemo(()=>{const t=Ut.gridPremiumFeatures(e,f);return{premium:t.length>0,features:t}},[e,f]),ce=a.useMemo(()=>Z.premium?!c.validatePackage(Pt.packageMetadata,{component:"Grid",features:Z.features}):!1,[Z.premium]),se=W.map(t=>t&&t.type&&t.type.displayName==="KendoReactGridToolbar"?a.cloneElement(t,{...t.props,ariaControls:y}):null),j=W.filter(t=>t&&t.type&&t.type.displayName==="KendoReactGridNoRecords"),ue=W.filter(t=>t&&t.type&&t.type.displayName==="KendoReactGridStatusBar"),w=f.filter(t=>t.children.length===0),ge=V&&a.createElement(Nt.GroupPanel,{columns:J(),group:e.group||[],ariaControls:y}),fe=a.createElement(vt.Header,{size:I,staticHeaders:e.scrollable!=="none",draggable:e.reorderable||V,headerRow:a.createElement(It.HeaderRow,{cells:e.cells,sort:e.sort,sortable:e.sortable,group:e.group||[],groupable:V,filter:e.filter,filterable:e.filterable,filterOperators:e.filterOperators||Be.operators,columnMenu:e.columnMenu,columnMenuIcon:e.columnMenuIcon,columns:f,columnsMap:F,cellRender:e.headerCellRender,navigatable:!!e.navigatable,localization:M,unstyled:D,headerSelectionValue:!!(e.select&&h.filter(t=>t.rowType==="data").every(t=>e.select&&e.dataItemKey&&c.getter(e.dataItemKey)(t.dataItem)!==void 0?e.select[c.getter(e.dataItemKey)(t.dataItem)]:void 0))}),filterRow:e.filterable&&a.createElement(xt.FilterRow,{cells:e.cells,size:I,columns:f,filter:e.filter,filterOperators:e.filterOperators||Be.operators,sort:e.sort,cellRender:e.filterCellRender,navigatable:!!e.navigatable,ariaRowIndex:F.length+1,localization:M})||void 0,cols:w.map((t,n)=>a.createElement("col",{key:n.toString(),width:u.getColumnWidth(t)}))}),ut=rt.current||0,gt=parseFloat(((e.style||{}).width||"").toString()),ft=(t,n,d,i,o)=>{let g=!1;const l=e.selectedField?u.getNestedValue(e.selectedField,t.dataItem):e.select&&e.dataItemKey&&c.getter(e.dataItemKey)(t.dataItem)!==void 0?e.select[c.getter(e.dataItemKey)(t.dataItem)]:void 0;let s=0;const{colSpans:C,hiddenColumns:K}=b.tableColumnsVirtualization({enabled:e.columnVirtualization,columns:w,tableViewPortWidth:gt,scrollLeft:ut,getColSpan:u.getColSpan,dataItem:t.dataItem}),x=w.filter((r,S)=>!K[S]);return{row:w.map((r,S)=>{var He,Pe,Ke,Ae;if(K[S])return null;if(s>0)return s--,null;let R;if((He=r.rowSpannable)!=null&&He.enabled&&t.rowType==="data"&&r.field&&o){const N=r.field?(Ke=(Pe=r.rowSpannable).valueGetter)==null?void 0:Ke.call(Pe,t.dataItem,r.field):null;R={value:N,count:1},o[r.field]&&((Ae=o[r.field])==null?void 0:Ae.value)===N&&o[r.field]!==null?(o[r.field].count++,R.count=null):o[r.field]=R}const{colSpan:L,colsToSkip:te}=lt(r,t.dataItem,x,S,s,C[S]);s=te;const _=r.id?r.id:S,Ct=c.classNames(m.contentSticky({locked:r.locked}),r.className),yt=r.left!==void 0?{left:r.left,right:r.right}:{};let ae=!1;if(r.editable&&(e.editable||e.editField)){const N=e.editField?u.getNestedValue(e.editField,t.dataItem):e.edit&&e.dataItemKey?e.edit[c.getter(e.dataItemKey)(t.dataItem)]:void 0,re=typeof N=="boolean"?N:Array.isArray(N)?N.indexOf(r.field)>-1:r.field!==void 0&&N===r.field;re&&r.columnType==="data"&&(re===!0||re===r.field)&&(g=!0,ae=!0)}const le=r.cell||ae&&Rt.GridEditCell||qt.GridCell,ht=e.expandField&&e.detail&&r.field===e.expandField||r._type==="expand",A={locked:e.lockGroups,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${n}-${String(S)}`,E,ht||t.rowType==="groupHeader"||t.rowType==="groupFooter"||r.field==="value"?"nodata":"cell"),colSpan:L,dataItem:t.dataItem,field:r.field,editor:r.editor,format:r.format,columnType:r.columnType,rowReorderable:T,className:Ct,render:e.cellRender,cells:u.resolveCells(e.cells,r.cells),columnIndex:S,columnsCount:w.length,rowType:t.rowType,level:t.level,expanded:t.expanded,dataIndex:t.dataIndex,rowDataIndex:d,columnPosition:yt,style:{},ariaColumnIndex:r.ariaColumnIndex,isSelected:(r==null?void 0:r._type)==="edit"?l:Array.isArray(l)&&l.indexOf(S)>-1,isSorted:!!u.isSorted(r.field,e.sort),isInEdit:ae,isAlt:i,unstyled:D,group:t.group,localization:M,intl:nt,_rowSpan:R};return r.cell?a.createElement(Wt.GridCustomCellClientContainer,{key:_,isClient:u.isClientReference(le),dataItem:A.dataItem,rowDataIndex:A.rowDataIndex,columnIndex:A.columnIndex,columnPosition:A.columnPosition},a.createElement(le,{...A})):a.createElement(le,{key:_,...A})}),isInEdit:g,isSelected:typeof l=="boolean"&&l}};let me=0;if(P&&X)for(let t=0;t<X.topCacheCount+X.attendedSkip-(e.skip||0);t++){const n=h.shift();if(n)h.push(n),me++,n.rowType==="groupHeader"&&t--;else break}const be=t=>t>=h.length-me;let Ce=e.skip||0;const p=[],ye=!h.length,he=F.length+(e.filterable?1:0)+1;let B=0;if(h.length){let t=-1,n=0;const d=de.enabled?{}:void 0;(z||h).forEach((i,o)=>{i.rowType==="data"&&(Ce++,t++);const g=Ce%2===0,l=e.dataItemKey&&c.getter(e.dataItemKey)(i.dataItem),s=o+(e.skip||0),C=l||"ai"+s,K=C+"_1",x=ft(i,C,t,g,d);if(B=s+he+n,p.push(a.createElement(Ft.GridRow,{key:C,dataItem:i.dataItem,isAltRow:g,isInEdit:x.isInEdit,rowType:i.rowType,isRowReorderable:T,isHidden:be(o),onClick:null,onDoubleClick:null,selectedField:e.selectedField,rowHeight:e.rowHeight,render:e.rowRender,ariaRowIndex:B,absoluteRowIndex:s,dataIndex:P&&!e.groupable?s:t,isSelected:x.isSelected,rows:e.rows},x.row)),e.detail&&i.rowType==="data"&&i.expanded){const r=w.length-(e.expandField||O.enabled?1:0)-(e.group?e.group.length:0)||1;n++,B=s+he+n,p.push(a.createElement("tr",{key:K,className:c.classNames(m.detailTr({isAlt:g})),style:{visibility:be(o)?"hidden":"",height:e.detailRowHeight},role:"row","aria-rowindex":B},e.group&&e.group.map((S,R)=>{var _;const L=(_=x==null?void 0:x.row[R])==null?void 0:_.props.style,te=L?{left:L.left,right:L.right}:{};return a.createElement(Ve.GridGroupCell,{id:"",dataIndex:i.dataIndex,field:S.field,dataItem:i.dataItem,key:R,columnPosition:te,style:{},ariaColumnIndex:1+R,isSelected:!1,locked:e.lockGroups,cells:e.cells,group:i.group})}),(e.expandField||O.enabled)&&a.createElement(At.GridDetailHierarchyCell,{unstyled:D,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${K}-dhcell`,E)}),a.createElement(Kt.GridDetailCell,{dataItem:i.dataItem,dataIndex:i.dataIndex,colSpan:r,ariaColIndex:2+(e.group?e.group.length:0),detail:e.detail,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${K}-dcell`,E)})))}})}const we={size:I,total:k,skip:e.skip||0,take:(e.take!==void 0?e.take:e.pageSize)||10,...Ht.normalize(e.pageable||{})},Se=a.createElement(Bt.PagerContainer,null,e.pager?a.createElement(e.pager,{...we}):a.createElement(b.Pager,{className:c.classNames(m.pager({})),...we})),mt=(t,n)=>a.createElement("col",{key:n.toString(),width:u.getColumnWidth(t)}),bt=(Te=e.cells)!=null&&Te.footerCell||f.some(t=>{var n;return!!(t.footerCell||(n=t.cells)!=null&&n.footerCell)})?a.createElement(kt.Footer,{size:I,staticHeaders:e.scrollable!=="none",row:a.createElement(Tt.FooterRow,{cells:e.cells,idPrefix:E,columns:f,ariaRowIndex:B+1}),cols:w.map(mt)}):null,Ge=a.createElement(Vt.GridColGroup,null,w.map((t,n)=>a.createElement("col",{key:n.toString(),className:u.isSorted(t.field,e.sort)?c.classNames(m.sorted({})):void 0,width:u.getColumnWidth(t)}))),Ee=e.reorderable||V,{detail:Xt,cells:Yt,rows:Zt,...Re}=e,ve=a.createElement("tbody",{role:"rowgroup",className:c.classNames(m.tbody({})),...b.tableKeyboardNavigationBodyAttributes},p);let ee=ve;if(T&&(ee=a.createElement(jt.GridReorderableRowsContainer,{unstyled:m,columns:f,rowReorderSettings:e.rowReorderable},ve)),e.scrollable==="none")return a.createElement(_e.GridClientWrapper,{gridRef:q,gridProps:Re,columnsRef:J(),columnsMapRef:F,columnsState:v,dataRef:h,slicedData:z,isFixedVirtualScroll:Y===Q.VirtualScrollFixed,id:y,total:k,isAllData:U(),detailExpandable:!!e.detail},a.createElement(je.GridElementContainer,null,a.createElement("div",{id:e.id,style:e.style,className:c.classNames(m.wrapper({size:I}),e.className),"aria-label":e.ariaLabel,...b.tableKeyboardNavigationScopeAttributes},se,ge,a.createElement(Ot.GridTable,{selectable:e.selectable,className:c.classNames(m.table({size:I}))},Ge,fe,a.createElement(We.GridTableBody,{rowReorderable:T},ee)),ye&&a.createElement(Le.GridNoRecordsContainer,null,j.length?j:a.createElement(Oe.GridNoRecords,null)),Ee&&a.createElement(a.Fragment,null,a.createElement(ze.GridDropClue,null),a.createElement(Me.GridDragClue,null)))),ue,e.pageable&&Se,a.createElement($e.GridLoader,{loader:e.loader,showLoader:e.showLoader}),ce&&a.createElement(c.WatermarkOverlay,null));let $=e.style||{};return P&&($.height||($=Object.assign({},$,{height:"450px"}))),a.createElement(_e.GridClientWrapper,{gridRef:q,gridProps:Re,columnsRef:J(),columnsMapRef:F,columnsState:v,dataRef:h,slicedData:z,isFixedVirtualScroll:Y===Q.VirtualScrollFixed,id:y,total:k,detailExpandable:!!e.detail},a.createElement(je.GridElementContainer,null,a.createElement("div",{id:e.id,style:$,className:c.classNames(m.wrapper({size:I,virtual:P}),e.className),"aria-label":e.ariaLabel,...b.tableKeyboardNavigationScopeAttributes},se,ge,a.createElement("div",{className:c.classNames(m.ariaRoot({})),role:"grid","aria-colcount":w.length,"aria-rowcount":k,id:y,"aria-label":M.toLanguageString(ne.gridAriaLabel,ne.messages[ne.gridAriaLabel])},fe,a.createElement("div",{className:c.classNames(m.container({})),role:"presentation"},a.createElement(_t.GridContainerElementContainer,null,a.createElement("div",{className:c.classNames(m.content({})),role:"presentation"},a.createElement("div",{className:c.classNames(m.tableWrap({})),role:"presentation"},a.createElement(Lt.GridTableScrollable,{selectable:e.selectable,tableClassName:c.classNames(m.table({size:I})),tableStyle:{userSelect:st}},Ge,a.createElement(We.GridTableBody,{rowReorderable:T},ee)),ye&&a.createElement(Le.GridNoRecordsContainer,null,j.length?j:a.createElement(Oe.GridNoRecords,null))),P&&a.createElement("div",{className:c.classNames(m.heightContainer({})),role:"presentation"},a.createElement(zt.VirtualScrollHeightContainer,{isVirtualScroll:P}))))),bt,Ee&&a.createElement(a.Fragment,null,a.createElement(ze.GridDropClue,null),a.createElement(Me.GridDragClue,null)),ce&&a.createElement(c.WatermarkOverlay,null)),ue,e.pageable&&Se,a.createElement($e.GridLoader,{loader:e.loader,showLoader:e.showLoader}))))});Ue.displayName="KendoReactGridComponent";exports.GridComponent=Ue;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const wt=require("react"),c=require("@progress/kendo-react-common"),St=require("@progress/kendo-data-query"),b=require("@progress/kendo-react-data-tools"),Gt=require("./cells/GridSelectionCell.js"),Et=require("./cells/GridHierarchyCell.js"),Rt=require("./cells/GridEditCell.js"),vt=require("./header/Header.js"),It=require("./header/HeaderRow.js"),xt=require("./header/FilterRow.js"),Nt=require("./header/GroupPanel.js"),kt=require("./footer/Footer.js"),u=require("./utils/index.js"),qt=require("./cells/GridCell.js"),Ve=require("./cells/GridGroupCell.js"),Ft=require("./rows/GridRow.js"),Dt=require("./header/GridHeaderSelectionCell.js"),Oe=require("./components/noRecords/GridNoRecords.js"),Be=require("./filterCommon.js"),Tt=require("./footer/FooterRow.js"),Ht=require("./paging/GridPagerSettings.js"),Pt=require("./package-metadata.js"),Kt=require("./cells/GridDetailCell.js"),At=require("./cells/GridDetailHierarchyCell.js"),Le=require("./components/noRecords/GridNoRecordsContainer.js"),_e=require("./GridClientWrapper.js"),Vt=require("./components/colGroup/GridColGroup.js"),Ot=require("./components/table/GridTable.js"),ze=require("./components/GridDropClue.js"),Me=require("./components/GridDragClue.js"),We=require("./components/table/GridTableBody.js"),Bt=require("./components/PagerContainer.js"),Lt=require("./components/table/GridTableScrollable.js"),je=require("./components/GridElementContainer.js"),_t=require("./components/GridContainerElementContainer.js"),zt=require("./components/VirtualScrollHeightContainer.js"),ne=require("./messages/index.js"),U=require("./VirtualScrollFixed.js"),Mt=require("./VirtualScroll.js"),Wt=require("./components/GridCustomCellClientContainer.js"),jt=require("./components/GridDraggableRowsContainer.js"),$t=require("./cells/GridRowReorderCell.js"),Qt=require("./header/client/GridHeaderRowReorderCell.js"),$e=require("./components/GridLoader.js"),Ut=require("./utils/premium.js"),Qe=require("@progress/kendo-react-intl");function Jt(e){const q=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const y in e)if(y!=="default"){const E=Object.getOwnPropertyDescriptor(e,y);Object.defineProperty(q,y,E.get?E:{enumerable:!0,get:()=>e[y]})}}return q.default=e,Object.freeze(q)}const a=Jt(wt),Ue=a.forwardRef((e,q)=>{var Ie,xe,Ne,ke,qe,Fe,De,Te;const y=e.id+"-role-element-id",E=e.navigatable?y:"";let v=e.columnsState||[];const Je=(t,n,d,i,o,g,l)=>{const s=[],C=u.flatData(s,G,t,{index:n},d!==void 0,i,o,g,ot.defaultExpand,l);return{flattedData:s,resolvedGroupsCount:C}},Xe=t=>{const n=t.filter(d=>d&&d.type&&d.type.displayName==="KendoReactGridColumn");return u.readColumns(n,v,{prevId:0,idPrefix:E})},Ye=()=>{const t=[],n=(d,i)=>d==null?void 0:d.forEach(o=>{const g=o.hidden||i;t.push({...o,hidden:g}),n(o.children,g)});return n(v,!1),t},Ze=t=>{const n=Ye();return t.filter(d=>{var i;return!d.hidden&&!((i=n.find(o=>o.id===d.id))!=null&&i.hidden)})},pe=(t,n)=>{var d;f=Xe(t),f.filter(i=>!i.hidden).length===0&&(f=u.autoGenerateColumns(G,e.group,{column:(d=O.column)!=null?d:e.expandField},{prevId:0,idPrefix:E})),tt(f,n),f=Ze(f),F=u.mapColumns(f,!0),ie=f.map(u.clientColumn)},et=(t,n)=>{const d=i=>{var g;const o=n.find(l=>l.id===i.id);return o?(o.children=(g=i.children)==null?void 0:g.map(d),o):u.getColumnState(i)};v=t.filter(i=>i.parentIndex===-1).map(d)},tt=(t,n)=>{var g;t.filter(l=>e.selectedField&&l.field===e.selectedField||l.columnType==="checkbox").forEach(l=>{l.width=l.width||"50px",l.cell=l.cell||Gt.GridSelectionCell,l._type="edit",l.headerCell=l.headerCell||Dt.GridHeaderSelectionCell}),T!==void 0&&t.filter(l=>l.columnType==="reorder").forEach(l=>{l.width=l.width||"50px",l.cell=l.cell||$t.GridRowReorderCell,l.headerCell=l.headerCell||Qt.GridHeaderRowReorderCell,l.sortable=!1,l.filterable=!1,l.editable=!1});const d=u.getFlatColumnsState(v);et(t,d);const i={id:"",resizable:!0,width:"32px",title:" ",declarationIndex:-1,orderIndex:-1,children:[],parentIndex:-1,depth:0,colSpan:0,headerColSpan:0,rowSpan:0,left:0,right:0,index:0,rightBorder:!1,ariaColumnIndex:0,isAccessible:!0};let o=0;if((e.expandField||O.enabled)&&e.detail){const l={...i,_type:"expand",id:b.tableKeyboardNavigationTools.generateNavigatableId(`${o++}`,"expand","column"),cell:Et.GridHierarchyCell,field:(g=O.column)!=null?g:e.expandField,headerClassName:c.classNames(m.hierarchyCell({}))};t.unshift(l),v.unshift(d.find(s=>s.id===l.id)||u.getColumnState(l))}for(let l=0;l<n;l++){const s={...i,isAccessible:!1,cell:Ve.GridGroupCell,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${o++}`,"group","column"),field:"value",locked:e.lockGroups};t.unshift(s),v.unshift(d.find(C=>C.id===s.id)||u.getColumnState(s))}t.slice(o).forEach(l=>{l.parentIndex>=0&&(l.parentIndex+=o),l.rowSpannable=l.rowSpannable!==void 0?u.getRowSpanOptions(l.rowSpannable):de})},z=()=>{var t;return Array.isArray(e.data)?G.length===e.total:G?e.total===((t=e.data)==null?void 0:t.total):!1},at=()=>{const{rowHeight:t,detailRowHeight:n,detail:d,expandField:i}=e,o=z(),g=t!==void 0&&t>0,l=n!==void 0&&n>0;return!g||V&&!o||!!(d&&i)&&(!l||!o)?Mt.VirtualScroll:U.VirtualScrollFixed},J=()=>e.isClient?f:ie,lt=(t,n,d,i,o,g)=>{let l=u.getColSpan(t,n);if(e.columnVirtualization&&t.colSpan===1)return{colSpan:g,colsToSkip:o};let s=d.length-1===i,C=d.length-i;return e.columnVirtualization&&(s=w.length-1===i,C=w.length-i),l>1&&!s?o=l-1:l=1,C<=l&&!s&&(l=C),{colSpan:l,colsToSkip:o}};let X,h=[],M,f=[],ie=[],F=[[]];const rt=e.scrollLeftRef||{current:0},W=e.localization||new Qe.LocalizationService(e.language),nt=e.intl||new Qe.IntlService((Ie=e.locale)!=null?Ie:"en"),D=e.unstyled,m=D&&D.uGrid?D.uGrid:c.uGrid,T=u.isRowReorderEnabled(e.rowReorderable),H=e.autoProcessData===!0?{group:!0,sort:!0,filter:!0,search:!0,page:!0}:e.autoProcessData;let G,k;if(Array.isArray(e.data)?(G=e.data,k=(xe=e.total)!=null?xe:G.length):(G=((Ne=e.data)==null?void 0:Ne.data)||[],k=(Fe=(qe=e.total)!=null?qe:(ke=e.data)==null?void 0:ke.total)!=null?Fe:G.length),H){const{data:t,total:n}=St.process(G,{group:H.group?e.group:void 0,sort:H.sort?e.sort:void 0,filter:b.combineFilters(H.filter?e.filter:void 0,H.search?e.search:void 0),...H.page?{take:e.take,skip:e.skip}:{}});G=t,k=(De=e.total)!=null?De:n}const{size:I="medium"}=e,it=typeof e.groupable=="object"&&e.groupable.footer||"none",P=e.scrollable==="virtual",V=e.groupable===!0||typeof e.groupable=="object"&&e.groupable.enabled!==!1,O=b.getDetailExpandableOptions(!!e.detail),ot=b.getGroupExpandableOptions(typeof e.groupable=="object"&&e.groupable.enabled!==!1?e.groupable.expandable:e.groupable),{resolvedGroupsCount:dt,flattedData:ct}=Je(it,e.skip||0,e.group,e.expandField,e.detailExpand,e.groupExpand,e.dataItemKey);h=ct;const Y=at();Y===U.VirtualScrollFixed&&z()&&(M=h.slice(e.skip||0,(e.skip||0)+((e.take!==void 0?e.take:e.pageSize)||0)));const oe=b.getSelectionOptions(e.selectable||!!e.selectedField),de=u.getRowSpanOptions(e.rowSpannable),st=oe&&oe.drag?"none":void 0,j=a.useMemo(()=>a.Children.toArray(e.children),[e.children]);pe(j,dt);const Z=a.useMemo(()=>{const t=Ut.gridPremiumFeatures(e,f);return{premium:t.length>0,features:t}},[e,f]),ce=a.useMemo(()=>Z.premium?!c.validatePackage(Pt.packageMetadata,{component:"Grid",features:Z.features}):!1,[Z.premium]),se=j.map(t=>t&&t.type&&t.type.displayName==="KendoReactGridToolbar"?a.cloneElement(t,{...t.props,ariaControls:y}):null),$=j.filter(t=>t&&t.type&&t.type.displayName==="KendoReactGridNoRecords"),ue=j.filter(t=>t&&t.type&&t.type.displayName==="KendoReactGridStatusBar"),w=f.filter(t=>t.children.length===0),ge=V&&a.createElement(Nt.GroupPanel,{columns:J(),group:e.group||[],ariaControls:y}),fe=a.createElement(vt.Header,{size:I,staticHeaders:e.scrollable!=="none",draggable:e.reorderable||V,headerRow:a.createElement(It.HeaderRow,{cells:e.cells,sort:e.sort,sortable:e.sortable,group:e.group||[],groupable:V,filter:e.filter,filterable:e.filterable,filterOperators:e.filterOperators||Be.operators,columnMenu:e.columnMenu,columnMenuIcon:e.columnMenuIcon,columns:f,columnsMap:F,cellRender:e.headerCellRender,navigatable:!!e.navigatable,localization:W,unstyled:D,headerSelectionValue:!!(e.select&&h.filter(t=>t.rowType==="data").every(t=>e.select&&e.dataItemKey&&c.getter(e.dataItemKey)(t.dataItem)!==void 0?e.select[c.getter(e.dataItemKey)(t.dataItem)]:void 0))}),filterRow:e.filterable&&a.createElement(xt.FilterRow,{cells:e.cells,size:I,columns:f,filter:e.filter,filterOperators:e.filterOperators||Be.operators,sort:e.sort,cellRender:e.filterCellRender,navigatable:!!e.navigatable,ariaRowIndex:F.length+1,localization:W})||void 0,cols:w.map((t,n)=>a.createElement("col",{key:n.toString(),width:u.getColumnWidth(t)}))}),ut=rt.current||0,gt=parseFloat(((e.style||{}).width||"").toString()),ft=(t,n,d,i,o)=>{let g=!1;const l=e.selectedField?u.getNestedValue(e.selectedField,t.dataItem):e.select&&e.dataItemKey&&c.getter(e.dataItemKey)(t.dataItem)!==void 0?e.select[c.getter(e.dataItemKey)(t.dataItem)]:void 0;let s=0;const{colSpans:C,hiddenColumns:K}=b.tableColumnsVirtualization({enabled:e.columnVirtualization,columns:w,tableViewPortWidth:gt,scrollLeft:ut,getColSpan:u.getColSpan,dataItem:t.dataItem}),x=w.filter((r,S)=>!K[S]);return{row:w.map((r,S)=>{var He,Pe,Ke,Ae;if(K[S])return null;if(s>0)return s--,null;let R;if((He=r.rowSpannable)!=null&&He.enabled&&t.rowType==="data"&&r.field&&o){const N=r.field?(Ke=(Pe=r.rowSpannable).valueGetter)==null?void 0:Ke.call(Pe,t.dataItem,r.field):null;R={value:N,count:1},o[r.field]&&((Ae=o[r.field])==null?void 0:Ae.value)===N&&o[r.field]!==null?(o[r.field].count++,R.count=null):o[r.field]=R}const{colSpan:L,colsToSkip:te}=lt(r,t.dataItem,x,S,s,C[S]);s=te;const _=r.id?r.id:S,Ct=c.classNames(m.contentSticky({locked:r.locked}),r.className),yt=r.left!==void 0?{left:r.left,right:r.right}:{};let ae=!1;if(r.editable&&(e.editable||e.editField)){const N=e.editField?u.getNestedValue(e.editField,t.dataItem):e.edit&&e.dataItemKey?e.edit[c.getter(e.dataItemKey)(t.dataItem)]:void 0,re=typeof N=="boolean"?N:Array.isArray(N)?N.indexOf(r.field)>-1:r.field!==void 0&&N===r.field;re&&r.columnType==="data"&&(re===!0||re===r.field)&&(g=!0,ae=!0)}const le=r.cell||ae&&Rt.GridEditCell||qt.GridCell,ht=e.expandField&&e.detail&&r.field===e.expandField||r._type==="expand",A={locked:e.lockGroups,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${n}-${String(S)}`,E,ht||t.rowType==="groupHeader"||t.rowType==="groupFooter"||r.field==="value"?"nodata":"cell"),colSpan:L,dataItem:t.dataItem,field:r.field,editor:r.editor,format:r.format,columnType:r.columnType,rowReorderable:T,className:Ct,render:e.cellRender,cells:u.resolveCells(e.cells,r.cells),columnIndex:S,columnsCount:w.length,rowType:t.rowType,level:t.level,expanded:t.expanded,dataIndex:t.dataIndex,rowDataIndex:d,columnPosition:yt,style:{},ariaColumnIndex:r.ariaColumnIndex,isSelected:(r==null?void 0:r._type)==="edit"?l:Array.isArray(l)&&l.indexOf(S)>-1,isSorted:!!u.isSorted(r.field,e.sort),isInEdit:ae,isAlt:i,unstyled:D,group:t.group,localization:W,intl:nt,_rowSpan:R};return r.cell?a.createElement(Wt.GridCustomCellClientContainer,{key:_,isClient:u.isClientReference(le),dataItem:A.dataItem,rowDataIndex:A.rowDataIndex,columnIndex:A.columnIndex,columnPosition:A.columnPosition},a.createElement(le,{...A})):a.createElement(le,{key:_,...A})}),isInEdit:g,isSelected:typeof l=="boolean"&&l}};let me=0;if(P&&X)for(let t=0;t<X.topCacheCount+X.attendedSkip-(e.skip||0);t++){const n=h.shift();if(n)h.push(n),me++,n.rowType==="groupHeader"&&t--;else break}const be=t=>t>=h.length-me;let Ce=e.skip||0;const p=[],ye=!h.length,he=F.length+(e.filterable?1:0)+1;let B=0;if(h.length){let t=-1,n=0;const d=de.enabled?{}:void 0;(M||h).forEach((i,o)=>{i.rowType==="data"&&(Ce++,t++);const g=Ce%2===0,l=e.dataItemKey&&c.getter(e.dataItemKey)(i.dataItem),s=o+(e.skip||0),C=l||"ai"+s,K=C+"_1",x=ft(i,C,t,g,d);if(B=s+he+n,p.push(a.createElement(Ft.GridRow,{key:C,dataItem:i.dataItem,isAltRow:g,isInEdit:x.isInEdit,rowType:i.rowType,isRowReorderable:T,isHidden:be(o),onClick:null,onDoubleClick:null,selectedField:e.selectedField,rowHeight:e.rowHeight,render:e.rowRender,ariaRowIndex:B,absoluteRowIndex:s,dataIndex:P&&!e.groupable?s:t,isSelected:x.isSelected,rows:e.rows},x.row)),e.detail&&i.rowType==="data"&&i.expanded){const r=w.length-(e.expandField||O.enabled?1:0)-(e.group?e.group.length:0)||1;n++,B=s+he+n,p.push(a.createElement("tr",{key:K,className:c.classNames(m.detailTr({isAlt:g})),style:{visibility:be(o)?"hidden":"",height:e.detailRowHeight},role:"row","aria-rowindex":B},e.group&&e.group.map((S,R)=>{var _;const L=(_=x==null?void 0:x.row[R])==null?void 0:_.props.style,te=L?{left:L.left,right:L.right}:{};return a.createElement(Ve.GridGroupCell,{id:"",dataIndex:i.dataIndex,field:S.field,dataItem:i.dataItem,key:R,columnPosition:te,style:{},ariaColumnIndex:1+R,isSelected:!1,locked:e.lockGroups,cells:e.cells,group:i.group})}),(e.expandField||O.enabled)&&a.createElement(At.GridDetailHierarchyCell,{unstyled:D,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${K}-dhcell`,E)}),a.createElement(Kt.GridDetailCell,{dataItem:i.dataItem,dataIndex:i.dataIndex,colSpan:r,ariaColIndex:2+(e.group?e.group.length:0),detail:e.detail,id:b.tableKeyboardNavigationTools.generateNavigatableId(`${K}-dcell`,E)})))}})}const we={size:I,total:k,skip:e.skip||0,take:(e.take!==void 0?e.take:e.pageSize)||10,...Ht.normalize(e.pageable||{})},Se=a.createElement(Bt.PagerContainer,null,e.pager?a.createElement(e.pager,{...we}):a.createElement(b.Pager,{className:c.classNames(m.pager({})),...we})),mt=(t,n)=>a.createElement("col",{key:n.toString(),width:u.getColumnWidth(t)}),bt=(Te=e.cells)!=null&&Te.footerCell||f.some(t=>{var n;return!!(t.footerCell||(n=t.cells)!=null&&n.footerCell)})?a.createElement(kt.Footer,{size:I,staticHeaders:e.scrollable!=="none",row:a.createElement(Tt.FooterRow,{cells:e.cells,idPrefix:E,columns:f,ariaRowIndex:B+1}),cols:w.map(mt)}):null,Ge=a.createElement(Vt.GridColGroup,null,w.map((t,n)=>a.createElement("col",{key:n.toString(),className:u.isSorted(t.field,e.sort)?c.classNames(m.sorted({})):void 0,width:u.getColumnWidth(t)}))),Ee=e.reorderable||V,{detail:Xt,cells:Yt,rows:Zt,...Re}=e,ve=a.createElement("tbody",{role:"rowgroup",className:c.classNames(m.tbody({})),...b.tableKeyboardNavigationBodyAttributes},p);let ee=ve;if(T&&(ee=a.createElement(jt.GridReorderableRowsContainer,{unstyled:m,columns:f,rowReorderSettings:e.rowReorderable},ve)),e.scrollable==="none")return a.createElement(_e.GridClientWrapper,{gridRef:q,gridProps:Re,columnsRef:J(),columnsMapRef:F,columnsState:v,dataRef:h,slicedData:M,isFixedVirtualScroll:Y===U.VirtualScrollFixed,id:y,total:k,isAllData:z(),detailExpandable:!!e.detail},a.createElement(je.GridElementContainer,null,a.createElement("div",{id:e.id,style:e.style,className:c.classNames(m.wrapper({size:I}),e.className),"aria-label":e.ariaLabel,...b.tableKeyboardNavigationScopeAttributes},se,ge,a.createElement(Ot.GridTable,{selectable:e.selectable,className:c.classNames(m.table({size:I}))},Ge,fe,a.createElement(We.GridTableBody,{rowReorderable:T},ee)),ye&&a.createElement(Le.GridNoRecordsContainer,null,$.length?$:a.createElement(Oe.GridNoRecords,null)),Ee&&a.createElement(a.Fragment,null,a.createElement(ze.GridDropClue,null),a.createElement(Me.GridDragClue,null)))),ue,e.pageable&&Se,a.createElement($e.GridLoader,{loader:e.loader,showLoader:e.showLoader}),ce&&a.createElement(c.WatermarkOverlay,null));let Q=e.style||{};return P&&(Q.height||(Q=Object.assign({},Q,{height:"450px"}))),a.createElement(_e.GridClientWrapper,{gridRef:q,gridProps:Re,columnsRef:J(),columnsMapRef:F,columnsState:v,dataRef:h,slicedData:M,isFixedVirtualScroll:Y===U.VirtualScrollFixed,id:y,total:k,isAllData:z(),detailExpandable:!!e.detail},a.createElement(je.GridElementContainer,null,a.createElement("div",{id:e.id,style:Q,className:c.classNames(m.wrapper({size:I,virtual:P}),e.className),"aria-label":e.ariaLabel,...b.tableKeyboardNavigationScopeAttributes},se,ge,a.createElement("div",{className:c.classNames(m.ariaRoot({})),role:"grid","aria-colcount":w.length,"aria-rowcount":k,id:y,"aria-label":W.toLanguageString(ne.gridAriaLabel,ne.messages[ne.gridAriaLabel])},fe,a.createElement("div",{className:c.classNames(m.container({})),role:"presentation"},a.createElement(_t.GridContainerElementContainer,null,a.createElement("div",{className:c.classNames(m.content({})),role:"presentation"},a.createElement("div",{className:c.classNames(m.tableWrap({})),role:"presentation"},a.createElement(Lt.GridTableScrollable,{selectable:e.selectable,tableClassName:c.classNames(m.table({size:I})),tableStyle:{userSelect:st}},Ge,a.createElement(We.GridTableBody,{rowReorderable:T},ee)),ye&&a.createElement(Le.GridNoRecordsContainer,null,$.length?$:a.createElement(Oe.GridNoRecords,null))),P&&a.createElement("div",{className:c.classNames(m.heightContainer({})),role:"presentation"},a.createElement(zt.VirtualScrollHeightContainer,{isVirtualScroll:P}))))),bt,Ee&&a.createElement(a.Fragment,null,a.createElement(ze.GridDropClue,null),a.createElement(Me.GridDragClue,null)),ce&&a.createElement(c.WatermarkOverlay,null)),ue,e.pageable&&Se,a.createElement($e.GridLoader,{loader:e.loader,showLoader:e.showLoader}))))});Ue.displayName="KendoReactGridComponent";exports.GridComponent=Ue;
package/GridComponent.mjs CHANGED
@@ -42,7 +42,7 @@ import { GridElementContainer as Ze } from "./components/GridElementContainer.mj
42
42
  import { GridContainerElementContainer as sa } from "./components/GridContainerElementContainer.mjs";
43
43
  import { VirtualScrollHeightContainer as ma } from "./components/VirtualScrollHeightContainer.mjs";
44
44
  import { gridAriaLabel as pe, messages as ua } from "./messages/index.mjs";
45
- import { VirtualScrollFixed as U } from "./VirtualScrollFixed.mjs";
45
+ import { VirtualScrollFixed as q } from "./VirtualScrollFixed.mjs";
46
46
  import { VirtualScroll as fa } from "./VirtualScroll.mjs";
47
47
  import { GridCustomCellClientContainer as ga } from "./components/GridCustomCellClientContainer.mjs";
48
48
  import { GridReorderableRowsContainer as ba } from "./components/GridDraggableRowsContainer.mjs";
@@ -164,12 +164,12 @@ const Sa = a.forwardRef((e, ie) => {
164
164
  t.slice(o).forEach((l) => {
165
165
  l.parentIndex >= 0 && (l.parentIndex += o), l.rowSpannable = l.rowSpannable !== void 0 ? Oe(l.rowSpannable) : ce;
166
166
  });
167
- }, q = () => {
167
+ }, z = () => {
168
168
  var t;
169
169
  return Array.isArray(e.data) ? C.length === e.total : C ? e.total === ((t = e.data) == null ? void 0 : t.total) : !1;
170
170
  }, dt = () => {
171
- const { rowHeight: t, detailRowHeight: n, detail: d, expandField: i } = e, o = q(), s = t !== void 0 && t > 0, l = n !== void 0 && n > 0;
172
- return !s || K && !o || !!(d && i) && (!l || !o) ? fa : U;
171
+ const { rowHeight: t, detailRowHeight: n, detail: d, expandField: i } = e, o = z(), s = t !== void 0 && t > 0, l = n !== void 0 && n > 0;
172
+ return !s || K && !o || !!(d && i) && (!l || !o) ? fa : q;
173
173
  }, J = () => e.isClient ? m : oe, ct = (t, n, d, i, o, s) => {
174
174
  let l = We(t, n);
175
175
  if (e.columnVirtualization && t.colSpan === 1)
@@ -177,8 +177,8 @@ const Sa = a.forwardRef((e, ie) => {
177
177
  let c = d.length - 1 === i, g = d.length - i;
178
178
  return e.columnVirtualization && (c = h.length - 1 === i, g = h.length - i), l > 1 && !c ? o = l - 1 : l = 1, g <= l && !c && (l = g), { colSpan: l, colsToSkip: o };
179
179
  };
180
- let Q, b = [], z, m = [], oe = [], k = [[]];
181
- const st = e.scrollLeftRef || { current: 0 }, M = e.localization || new wa(e.language), mt = e.intl || new Ea((Ge = e.locale) != null ? Ge : "en"), N = e.unstyled, u = N && N.uGrid ? N.uGrid : xt, F = Wt(e.rowReorderable), D = e.autoProcessData === !0 ? {
180
+ let Q, b = [], M, m = [], oe = [], k = [[]];
181
+ const st = e.scrollLeftRef || { current: 0 }, W = e.localization || new wa(e.language), mt = e.intl || new Ea((Ge = e.locale) != null ? Ge : "en"), N = e.unstyled, u = N && N.uGrid ? N.uGrid : xt, F = Wt(e.rowReorderable), D = e.autoProcessData === !0 ? {
182
182
  group: !0,
183
183
  sort: !0,
184
184
  filter: !0,
@@ -214,19 +214,19 @@ const Sa = a.forwardRef((e, ie) => {
214
214
  );
215
215
  b = bt;
216
216
  const X = dt();
217
- X === U && q() && (z = b.slice(
217
+ X === q && z() && (M = b.slice(
218
218
  e.skip || 0,
219
219
  (e.skip || 0) + ((e.take !== void 0 ? e.take : e.pageSize) || 0)
220
220
  ));
221
- const de = Tt(e.selectable || !!e.selectedField), ce = Oe(e.rowSpannable), ht = de && de.drag ? "none" : void 0, W = a.useMemo(() => a.Children.toArray(e.children), [e.children]);
222
- nt(W, gt);
221
+ const de = Tt(e.selectable || !!e.selectedField), ce = Oe(e.rowSpannable), ht = de && de.drag ? "none" : void 0, $ = a.useMemo(() => a.Children.toArray(e.children), [e.children]);
222
+ nt($, gt);
223
223
  const Y = a.useMemo(() => {
224
224
  const t = Ca(e, m);
225
225
  return {
226
226
  premium: t.length > 0,
227
227
  features: t
228
228
  };
229
- }, [e, m]), se = a.useMemo(() => Y.premium ? !Gt(la, { component: "Grid", features: Y.features }) : !1, [Y.premium]), me = W.map((t) => t && t.type && t.type.displayName === "KendoReactGridToolbar" ? a.cloneElement(t, { ...t.props, ariaControls: x }) : null), $ = W.filter((t) => t && t.type && t.type.displayName === "KendoReactGridNoRecords"), ue = W.filter(
229
+ }, [e, m]), se = a.useMemo(() => Y.premium ? !Gt(la, { component: "Grid", features: Y.features }) : !1, [Y.premium]), me = $.map((t) => t && t.type && t.type.displayName === "KendoReactGridToolbar" ? a.cloneElement(t, { ...t.props, ariaControls: x }) : null), j = $.filter((t) => t && t.type && t.type.displayName === "KendoReactGridNoRecords"), ue = $.filter(
230
230
  (t) => t && t.type && t.type.displayName === "KendoReactGridStatusBar"
231
231
  ), h = m.filter((t) => t.children.length === 0), fe = K && /* @__PURE__ */ a.createElement(zt, { columns: J(), group: e.group || [], ariaControls: x }), ge = /* @__PURE__ */ a.createElement(
232
232
  Lt,
@@ -251,7 +251,7 @@ const Sa = a.forwardRef((e, ie) => {
251
251
  columnsMap: k,
252
252
  cellRender: e.headerCellRender,
253
253
  navigatable: !!e.navigatable,
254
- localization: M,
254
+ localization: W,
255
255
  unstyled: N,
256
256
  headerSelectionValue: !!(e.select && b.filter((t) => t.rowType === "data").every(
257
257
  (t) => e.select && e.dataItemKey && H(e.dataItemKey)(t.dataItem) !== void 0 ? e.select[H(e.dataItemKey)(t.dataItem)] : void 0
@@ -270,7 +270,7 @@ const Sa = a.forwardRef((e, ie) => {
270
270
  cellRender: e.filterCellRender,
271
271
  navigatable: !!e.navigatable,
272
272
  ariaRowIndex: k.length + 1,
273
- localization: M
273
+ localization: W
274
274
  }
275
275
  ) || void 0,
276
276
  cols: h.map((t, n) => /* @__PURE__ */ a.createElement("col", { key: n.toString(), width: re(t) }))
@@ -347,7 +347,7 @@ const Sa = a.forwardRef((e, ie) => {
347
347
  isAlt: i,
348
348
  unstyled: N,
349
349
  group: t.group,
350
- localization: M,
350
+ localization: W,
351
351
  intl: mt,
352
352
  _rowSpan: w
353
353
  };
@@ -384,7 +384,7 @@ const Sa = a.forwardRef((e, ie) => {
384
384
  if (b.length) {
385
385
  let t = -1, n = 0;
386
386
  const d = ce.enabled ? {} : void 0;
387
- (z || b).forEach((i, o) => {
387
+ (M || b).forEach((i, o) => {
388
388
  i.rowType === "data" && (ye++, t++);
389
389
  const s = ye % 2 === 0, l = e.dataItemKey && H(e.dataItemKey)(i.dataItem), c = o + (e.skip || 0), g = l || "ai" + c, A = g + "_1", I = wt(i, g, t, s, d);
390
390
  if (V = c + we + n, Z.push(
@@ -530,11 +530,11 @@ const Sa = a.forwardRef((e, ie) => {
530
530
  columnsMapRef: k,
531
531
  columnsState: E,
532
532
  dataRef: b,
533
- slicedData: z,
534
- isFixedVirtualScroll: X === U,
533
+ slicedData: M,
534
+ isFixedVirtualScroll: X === q,
535
535
  id: x,
536
536
  total: R,
537
- isAllData: q(),
537
+ isAllData: z(),
538
538
  detailExpandable: !!e.detail
539
539
  },
540
540
  /* @__PURE__ */ a.createElement(Ze, null, /* @__PURE__ */ a.createElement(
@@ -558,7 +558,7 @@ const Sa = a.forwardRef((e, ie) => {
558
558
  ge,
559
559
  /* @__PURE__ */ a.createElement(Ye, { rowReorderable: F }, p)
560
560
  ),
561
- Ce && /* @__PURE__ */ a.createElement(qe, null, $.length ? $ : /* @__PURE__ */ a.createElement(je, null)),
561
+ Ce && /* @__PURE__ */ a.createElement(qe, null, j.length ? j : /* @__PURE__ */ a.createElement(je, null)),
562
562
  ve && /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(Qe, null), /* @__PURE__ */ a.createElement(Xe, null))
563
563
  )),
564
564
  ue,
@@ -566,8 +566,8 @@ const Sa = a.forwardRef((e, ie) => {
566
566
  /* @__PURE__ */ a.createElement(et, { loader: e.loader, showLoader: e.showLoader }),
567
567
  se && /* @__PURE__ */ a.createElement(Le, null)
568
568
  );
569
- let j = e.style || {};
570
- return T && (j.height || (j = Object.assign({}, j, { height: "450px" }))), /* @__PURE__ */ a.createElement(
569
+ let U = e.style || {};
570
+ return T && (U.height || (U = Object.assign({}, U, { height: "450px" }))), /* @__PURE__ */ a.createElement(
571
571
  Je,
572
572
  {
573
573
  gridRef: ie,
@@ -576,17 +576,18 @@ const Sa = a.forwardRef((e, ie) => {
576
576
  columnsMapRef: k,
577
577
  columnsState: E,
578
578
  dataRef: b,
579
- slicedData: z,
580
- isFixedVirtualScroll: X === U,
579
+ slicedData: M,
580
+ isFixedVirtualScroll: X === q,
581
581
  id: x,
582
582
  total: R,
583
+ isAllData: z(),
583
584
  detailExpandable: !!e.detail
584
585
  },
585
586
  /* @__PURE__ */ a.createElement(Ze, null, /* @__PURE__ */ a.createElement(
586
587
  "div",
587
588
  {
588
589
  id: e.id,
589
- style: j,
590
+ style: U,
590
591
  className: f(
591
592
  u.wrapper({
592
593
  size: S,
@@ -607,7 +608,7 @@ const Sa = a.forwardRef((e, ie) => {
607
608
  "aria-colcount": h.length,
608
609
  "aria-rowcount": R,
609
610
  id: x,
610
- "aria-label": M.toLanguageString(pe, ua[pe])
611
+ "aria-label": W.toLanguageString(pe, ua[pe])
611
612
  },
612
613
  ge,
613
614
  /* @__PURE__ */ a.createElement("div", { className: f(u.container({})), role: "presentation" }, /* @__PURE__ */ a.createElement(sa, null, /* @__PURE__ */ a.createElement("div", { className: f(u.content({})), role: "presentation" }, /* @__PURE__ */ a.createElement("div", { className: f(u.tableWrap({})), role: "presentation" }, /* @__PURE__ */ a.createElement(
@@ -623,7 +624,7 @@ const Sa = a.forwardRef((e, ie) => {
623
624
  },
624
625
  Ie,
625
626
  /* @__PURE__ */ a.createElement(Ye, { rowReorderable: F }, p)
626
- ), Ce && /* @__PURE__ */ a.createElement(qe, null, $.length ? $ : /* @__PURE__ */ a.createElement(je, null))), T && /* @__PURE__ */ a.createElement(
627
+ ), Ce && /* @__PURE__ */ a.createElement(qe, null, j.length ? j : /* @__PURE__ */ a.createElement(je, null))), T && /* @__PURE__ */ a.createElement(
627
628
  "div",
628
629
  {
629
630
  className: f(u.heightContainer({})),
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  > - This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)&mdash;an enterprise-grade UI library with 120+ free and premium components.
8
8
  > - This is a free React Data Grid (Table) component with premium features. To use the premium features of the KendoReact Data Grid (Table), you will need to [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid). You can use the free features even in production, no sign-up or license required.
9
9
  > - If you're looking for more free React components, check out [Get Started with KendoReact Free](https://www.telerik.com/kendo-react-ui/components/free).
10
- > - If you have an active license, visit the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid) to learn how to configure your KendoReact licensing.
10
+ > - If you have an active license, visit the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid) to learn how to configure your KendoReact licensing.
11
11
  > - Installing and working with this package indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid).
12
12
  > - The [30-day free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid) gives you access to all KendoReact components and their full functionality. Additionally, for the period of your trial, you can use our legendary technical support provided directly by the KendoReact dev team!
13
13
 
@@ -16,7 +16,7 @@
16
16
  How to start:
17
17
 
18
18
  ```sh
19
- npm install --save @progress/kendo-react-grid @progress/kendo-data-query @progress/kendo-drawing @progress/kendo-licensing @progress/kendo-react-animation @progress/kendo-react-buttons @progress/kendo-react-common @progress/kendo-react-data-tools @progress/kendo-react-dateinputs @progress/kendo-react-indicators @progress/kendo-react-dropdowns @progress/kendo-react-inputs @progress/kendo-react-intl @progress/kendo-react-popup @progress/kendo-react-layout @progress/kendo-svg-icons
19
+ npm i @progress/kendo-react-grid
20
20
  ```
21
21
 
22
22
  ## React Data Grid
@@ -62,7 +62,7 @@ Among the many features which the KendoReact Data Grid delivers are:
62
62
  - [Detail templates (premium)](https://www.telerik.com/kendo-react-ui/components/grid/advanced-features/detail/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)&mdash;The detail rows of the Grid provide additional details about a particular row of table data through expanding or collapsing its content.
63
63
  - [Globalization (free)](https://www.telerik.com/kendo-react-ui/components/grid/globalization/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)&mdash;By using the available globalization options in KendoReact, you can translate the Grid messages by adapting them to specific culture locales.
64
64
  - [Theme support (free)](https://www.telerik.com/kendo-react-ui/components/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)&mdash;The KendoReact Grid, as well as all 120+ components in the KendoReact suite, are styled in three polished themes (Bootstrap, Material, Fluent, and Default) and can be further customized to match your specific design guidelines.
65
- - [Server and hybrid data operations (premium)](https://www.telerik.com/kendo-react-ui/components/grid/rsc-mode)&mdash;The RCS mode of the KendoReact Grid is a modern, high-performance implementation built on top of the React Server Components (or RSC) architecture allowing you to perform server and hybrid data operations.
65
+ - [Server and hybrid data operations (premium)](https://www.telerik.com/kendo-react-ui/components/grid/rsc-mode)&mdash;The RCS mode of the KendoReact Grid is a modern, high-performance implementation built on top of the React Server Components (or RSC) architecture allowing you to perform server and hybrid data operations.
66
66
 
67
67
  How to use the Data Grid component in your apps:
68
68
 
@@ -70,7 +70,7 @@ How to use the Data Grid component in your apps:
70
70
  import { Grid, GridColumn } from '@progress/kendo-react-grid';
71
71
  ...
72
72
  /**
73
- * Provide the data to populate the grid.
73
+ * Provide the data to populate the grid.
74
74
  */
75
75
  <Grid data={data}>
76
76
  <GridColumn field="DataField1" />
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "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;
9
+ "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"),h=require("@progress/kendo-react-inputs"),E=require("@progress/kendo-react-dateinputs"),u=require("../messages/index.js"),O=require("@progress/kendo-react-intl"),C=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",svgIcon:C.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)},v=n=>{g.cellBoolDropdownChange(n,e.onChange)},k=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(h.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:v,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(h.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,svgIcon:C.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:k,disabled:!(!(e.value===null||e.value==="")||e.operator)}))));return e.render?e.render.call(void 0,f,e):f};exports.GridFilterCell=R;
@@ -9,12 +9,12 @@
9
9
  import * as o from "react";
10
10
  import { Button as z } from "@progress/kendo-react-buttons";
11
11
  import { DropDownList as m } from "@progress/kendo-react-dropdowns";
12
- import { TextBox as w, NumericTextBox as k } from "@progress/kendo-react-inputs";
13
- import { DatePicker as L } from "@progress/kendo-react-dateinputs";
12
+ import { TextBox as w, NumericTextBox as L } from "@progress/kendo-react-inputs";
13
+ import { DatePicker as k } from "@progress/kendo-react-dateinputs";
14
14
  import { filterClearButton as f, messages as d, filterChooseOperator as g } from "../messages/index.mjs";
15
15
  import { useLocalization as x } from "@progress/kendo-react-intl";
16
- import { filterClearIcon as D, filterIcon as N } from "@progress/kendo-svg-icons";
17
- import { cellOperatorChange as y, cellInputChange as B, cellBoolDropdownChange as O } from "../filterCommon.mjs";
16
+ import { filterClearIcon as D, filterIcon as y } from "@progress/kendo-svg-icons";
17
+ import { cellOperatorChange as N, cellInputChange as B, cellBoolDropdownChange as O } from "../filterCommon.mjs";
18
18
  import { classNames as S } from "@progress/kendo-react-common";
19
19
  const j = (e) => {
20
20
  const n = o.useRef(), u = x(), h = () => {
@@ -30,8 +30,7 @@ const j = (e) => {
30
30
  value: r,
31
31
  onChange: C,
32
32
  className: "k-dropdown-operator",
33
- iconClassName: "k-i-filter k-icon",
34
- svgIcon: N,
33
+ svgIcon: y,
35
34
  data: e.operators,
36
35
  textField: "text",
37
36
  title: u.toLanguageString(g, d[g]),
@@ -46,7 +45,7 @@ const j = (e) => {
46
45
  }, c = (t, r) => {
47
46
  B(t, r, e);
48
47
  }, C = (t) => {
49
- y(t, e.value, e.onChange);
48
+ N(t, e.value, e.onChange);
50
49
  }, v = (t) => {
51
50
  O(t, e.onChange);
52
51
  }, b = (t) => {
@@ -57,7 +56,7 @@ const j = (e) => {
57
56
  switch (t) {
58
57
  case "numeric":
59
58
  return /* @__PURE__ */ o.createElement(
60
- k,
59
+ L,
61
60
  {
62
61
  ref: n,
63
62
  size: e.size,
@@ -71,7 +70,7 @@ const j = (e) => {
71
70
  );
72
71
  case "date":
73
72
  return /* @__PURE__ */ o.createElement(
74
- L,
73
+ k,
75
74
  {
76
75
  ref: n,
77
76
  size: e.size,
@@ -128,7 +127,6 @@ const j = (e) => {
128
127
  z,
129
128
  {
130
129
  size: e.size,
131
- icon: "filter-clear",
132
130
  svgIcon: D,
133
131
  className: S({
134
132
  "k-clear-button-visible": !!(!(e.value === null || e.value === "") || e.operator)