@progress/kendo-vue-grid 9.1.0-develop.1 → 9.1.0
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/BaseCSVExport.js +1 -1
- package/BaseCSVExport.mjs +1 -1
- package/Grid.js +1 -1
- package/Grid.mjs +2 -2
- package/NOTICE.txt +18 -40
- package/RootGrid.js +1 -1
- package/RootGrid.mjs +44 -44
- package/cells/GridHierarchyCell.js +1 -1
- package/cells/GridHierarchyCell.mjs +10 -10
- package/components/table/GridTable.js +1 -1
- package/components/table/GridTable.mjs +7 -6
- package/components/table/GridTableScrollable.js +1 -1
- package/components/table/GridTableScrollable.mjs +10 -9
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/drag/ColumnResize.js +1 -1
- package/drag/ColumnResize.mjs +41 -41
- package/getRowContents.js +1 -1
- package/getRowContents.mjs +24 -24
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
- package/utils/virtualColumns.js +1 -1
- package/utils/virtualColumns.mjs +50 -50
package/BaseCSVExport.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 p=require("vue"),g=require("@progress/kendo-csv"),b=require("@progress/kendo-file-saver"),m=require("@progress/kendo-data-query"),i=require("./utils/dataProcessing.js"),f=e=>e&&typeof e=="object"&&"items"in e&&"field"in e,S=e=>e&&typeof e=="object"&&"data"in e?e.data||[]:Array.isArray(e)?e:[],C=(e,t)=>{const u=[],a=[];return e.length>0?e.forEach(({field:n,title:o})=>{u.push(n),a.push(o)}):t.length>0&&!Array.isArray(t[0])&&!f(t[0])&&Object.keys(t[0]).forEach(n=>{u.push(n),a.push(n)}),{autoKeys:u,autoNames:a}},A=(e,t,u)=>{const a=u.allPages!==!1,n=i.normalizeAutoProcessData(t.autoProcessData);if(n)return i.processData(e,{autoProcessData:n,group:t.group,defaultGroup:t.defaultGroup,sort:t.sort,defaultSort:t.defaultSort,filter:t.filter,defaultFilter:t.defaultFilter,search:t.search,pageable:t.pageable,take:t.take,skip:t.skip,includePaging:!a}).data;const o=t.group||t.defaultGroup;return o&&o.length>0?m.process(e,{group:o}).data:e},x=(e,t,u)=>{var o,s;let a=(o=e.keys)!=null?o:void 0,n=(s=e.names)!=null?s:void 0;if(!a||!n){const{autoKeys:l,autoNames:c}=C(t,u);a!=null||(a=l.length
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("vue"),g=require("@progress/kendo-csv"),b=require("@progress/kendo-file-saver"),m=require("@progress/kendo-data-query"),i=require("./utils/dataProcessing.js"),f=e=>e&&typeof e=="object"&&"items"in e&&"field"in e,S=e=>e&&typeof e=="object"&&"data"in e?e.data||[]:Array.isArray(e)?e:[],C=(e,t)=>{const u=[],a=[];return e.length>0?e.forEach(({field:n,title:o})=>{u.push(n),a.push(o)}):t.length>0&&!Array.isArray(t[0])&&!f(t[0])&&Object.keys(t[0]).forEach(n=>{u.push(n),a.push(n)}),{autoKeys:u,autoNames:a}},A=(e,t,u)=>{const a=u.allPages!==!1,n=i.normalizeAutoProcessData(t.autoProcessData);if(n)return i.processData(e,{autoProcessData:n,group:t.group,defaultGroup:t.defaultGroup,sort:t.sort,defaultSort:t.defaultSort,filter:t.filter,defaultFilter:t.defaultFilter,search:t.search,pageable:t.pageable,take:t.take,skip:t.skip,includePaging:!a}).data;const o=t.group||t.defaultGroup;return o&&o.length>0?m.process(e,{group:o}).data:e},x=(e,t,u)=>{var o,s;let a=(o=e.keys)!=null?o:void 0,n=(s=e.names)!=null?s:void 0;if(!a||!n){const{autoKeys:l,autoNames:c}=C(t,u);a||a!=null||(a=l.length?l:void 0),n||n!=null||(n=c.length?c:void 0)}return{keys:a,names:n}},j=p.defineComponent({name:"BaseCSVExport",props:{gridProps:{type:Object,required:!0},csv:{type:[Boolean,Object],default:void 0},fileName:{type:String,default:"grid-export.csv"},onCsvexport:{type:Function,default:void 0},columnsState:{type:Array,default:void 0}},setup(e,{expose:t}){const u=()=>{const n=typeof e.csv=="object"&&e.csv!==null?e.csv:{},o=n.data||e.gridProps.dataItems||[];let s=S(o);const l=e.onCsvexport;l&&(s=l(s)),s=A(s,e.gridProps,n);const c=(e.columnsState||[]).filter(r=>r.field&&!r.hidden&&r.show!==!1).map(r=>({field:r.field,title:r.title||r.field})),{keys:d,names:v}=x(n,c,s),y=s.length>0&&f(s[0])?{data:s,total:s.length}:s,h={...n,data:y,keys:d,names:v};return g.toCSVBlob(h)};return t({save:()=>{const n=typeof e.csv=="object"&&e.csv!==null?e.csv:{},o=u(),s=n.fileName||e.fileName||"grid-export.csv";b.saveAs(o,s)},getBlob:u}),()=>null}});exports.BaseCSVExport=j;
|
package/BaseCSVExport.mjs
CHANGED
|
@@ -52,7 +52,7 @@ const f = (e) => e && typeof e == "object" && "items" in e && "field" in e, S =
|
|
|
52
52
|
autoKeys: r,
|
|
53
53
|
autoNames: c
|
|
54
54
|
} = x(t, l);
|
|
55
|
-
o != null || (o = r.length
|
|
55
|
+
o || o != null || (o = r.length ? r : void 0), n || n != null || (n = c.length ? c : void 0);
|
|
56
56
|
}
|
|
57
57
|
return {
|
|
58
58
|
keys: o,
|
package/Grid.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 a=require("vue"),l=require("@progress/kendo-vue-common"),f=require("@progress/kendo-vue-data-tools"),Ye=require("@progress/kendo-vue-indicators"),Ee=require("./GridNav.js"),Pe=require("./cells/GridSelectionCell.js"),De=require("./cells/GridHierarchyCell.js"),Ze=require("./cells/GridDetailHierarchyCell.js"),et=require("./cells/GridDetailCell.js"),tt=require("./header/Header.js"),st=require("./header/HeaderRow.js"),it=require("./header/FilterRow.js"),ot=require("./header/GroupPanel.js"),nt=require("./footer/Footer.js"),rt=require("./footer/FooterRow.js"),at=require("./components/table/GridTable.js"),lt=require("./components/table/GridTableScrollable.js"),Ne=require("./filterCommon.js"),dt=require("./VirtualScroll.js"),ht=require("./drag/ColumnResize.js"),ct=require("./drag/CommonDragLogic.js"),pt=require("./drag/DragClue.js"),ut=require("./drag/DropClue.js"),$=require("./utils/main.js"),Ve=require("./cells/GridGroupCell.js"),ft=require("./rows/GridRow.js"),gt=require("./common.js"),ze=require("./header/GridHeaderSelectionCell.js"),Fe=require("./components/noRecords/GridNoRecords.js"),Le=require("./components/noRecords/GridNoRecordsContainer.js"),ne=require("./package-metadata.js"),Ke=require("./messages/messagesMap.js"),re=require("@progress/kendo-data-query"),mt=require("./key.js"),Rt=require("./utils/virtualColumns.js"),_e=require("./components/StickyGroupTable.js"),Ct=require("./getRowContents.js"),bt=require("./hooks/useStickyGroups.js"),Ae=require("./components/PinnedRowsTable.js"),St=require("./cells/pincell/GridPinCell.js"),vt=require("./BaseCSVExport.js"),U=require("./contextMenu/GridContextMenu.js"),N=require("./contextMenu/enums.js"),xt=a.defineComponent({name:"KendoGrid",inheritAttrs:!1,props:{...gt.gridProps,toolbar:{type:Object},noRecords:{type:Object}},data(){return{isRtl:!1,context:void 0,navigation:void 0,showLicenseWatermark:!1,licenseMessage:void 0,notHiddenColumns:[],contextMenuState:{show:!1,offset:{left:0,top:0},dataItem:void 0,field:void 0}}},watch:{clipboard:function(e){e?this.clipboardServiceRef||(this.clipboardServiceRef=new f.ClipboardService(this.handleClipboardEvent),this.clipboardServiceRef.addEventListeners(document)):this.clipboardServiceRef&&(this.clipboardServiceRef.removeEventListeners(document),this.clipboardServiceRef=null)},rowHeight:function(e,t){var s;this.onRowHeightChanged(e,t),(s=this.vsRef)==null||s.reset()},scrollable:function(){var e;(e=this.vsRef)==null||e.reset()},filter:function(){var e;(e=this.vsRef)==null||e.reset()},group:function(){var e;(e=this.vsRef)==null||e.reset()},currentGroupable:function(){var e;(e=this.vsRef)==null||e.reset()},sort:function(){var e;(e=this.vsRef)==null||e.reset()}},created(){l.validatePackage(ne.packageMetadata),this.showLicenseWatermark=l.shouldShowValidationUI(ne.packageMetadata),this.licenseMessage=l.getLicenseMessage(ne.packageMetadata),this.initialHeight=null,this.columnsRef=[],this.dragLogic=new ct.CommonDragLogic(this.columnReorder.bind(this),this.groupReorder.bind(this),this.columnToGroup.bind(this)),this.columnResize=new ht.ColumnResize(this.onResize.bind(this)),this._columnsMap=[[]],this._header=null,this._footer=null,this.tableRef=null,this.scrollHeightContainerRef=null,this.forceUpdateTimeout=void 0,this._gridId=l.guid(),this._gridRoleElementId=l.guid(),this.slicedCurrentData=void 0,this._prevTotal=void 0,this._containerHeightRef=0,this._minRowHeightRef=0,this.wrapperScrollTopRef=0,this.scrollLeftRef=0,this.previousCopiedItems=[],this.clipboardServiceRef=null},mounted(){var t,s;this.setRefs();const e=l.isRtl(this._element);if(this._prevTotal=this.$props.total,this.isRtl=e,this.initialHeight=((s=(t=this._element)==null?void 0:t.style)==null?void 0:s.height)||null,this.resizeObserver=l.canUseDOM&&(window==null?void 0:window.ResizeObserver)&&new ResizeObserver(this.calculateMedia),document!=null&&document.body&&this.resizeObserver&&this.resizeObserver.observe(document.body),l.canUseDOM){const i={rootMargin:"0px",threshold:.9};this.observerRef=window.IntersectionObserver&&new window.IntersectionObserver(this.handleIntersection,i)||null}this.$props.clipboard&&(this.clipboardServiceRef=new f.ClipboardService(this.handleClipboardEvent),this.clipboardServiceRef.addEventListeners(document))},updated(){var s;this.setRefs();const e=l.isRtl(this._element);this.isRtl=e,this._prevTotal=this.$props.total,this.vsRef.tableTransform&&this.vsRef.table&&(this.vsRef.table.style.transform=this.vsRef.tableTransform,this.vsRef.tableTransform="");const t=this.updateStickyGroups();this.sticky.headerItems=t==null?void 0:t.stickyHeaderItems,this.sticky.footerItems=t==null?void 0:t.stickyFooterItems,this.isVirtualScroll&&(this.setContainerHeight(),this.setMinRowHeight(),(s=this.vsRef)==null||s.update())},unmounted(){this.gridUnmounted()},computed:{gridId(){return this.$props.id+"-role-element-id"},idPrefix(){return this.$props.navigatable?this.gridId:""},groupExpandable(){return f.getGroupExpandableOptions(typeof this.$props.groupable=="object"&&this.$props.groupable.enabled!==!1?this.$props.groupable.expandable:this.$props.groupable)},hierarchClass(){return l.uGrid.hierarchyCell({})},computedRowSpannable(){return $.getRowSpanOptions(this.$props.rowSpannable)},computedSelectable(){return f.getSelectionOptions(this.$props.selectable)},detailExpandable(){return f.getDetailExpandableOptions(!!this.$props.detail)},nonscrollableWrapperClass(){const{size:e}=this.$props,t=this.$attrs.class;return{"k-grid":!0,"k-grid-md":!e,[`k-grid-${l.kendoThemeMaps.sizeMap[e]||e}`]:e,[t]:!!t}},scrollableWrapperClass(){const{scrollable:e}=this.$props;return{...this.nonscrollableWrapperClass,"k-grid-virtual":e==="virtual"}},gridTableClass(){const{size:e}=this.$props;return{"k-table":!0,"k-grid-table":!0,"k-grid-md":!e,[`k-table-${l.kendoThemeMaps.sizeMap[e]||e}`]:e}},getCorrectHeight(){return this.$props.scrollable==="virtual"?this.initialHeight||"450px":null},currentGroupable(){var t;const e=(t=this.gridStateContext.group)==null?void 0:t.value;return this.$props.groupable===!0&&(e==null?void 0:e.length)||l.isObject(this.$props.groupable)&&this.$props.groupable.enabled!==!1},computedCollapsed(){let e=[];if(this.$props.group)for(let t=0;t<this.$props.group.length;t++)this.$props.collapsedGroups[t]?e.push(this.$props.collapsedGroups[t]):e.push([]);return e},getAriaRowCount(){var s,i;const e=this.$props.dataItems,t=this.$props.total||(e==null?void 0:e.total)||(e==null?void 0:e.length)||0;return this.$props.detail?this._columnsMap.length+(this.$props.filterable?1:0)+t*2+(this.columnsRef.some(o=>{var n;return!!(o.footerCell||(n=o.cells)!=null&&n.footerCell)})||(s=this.$props.cells)!=null&&s.footerCell?1:0):!this.$props.pageable&&this.$props.scrollable==="scrollable"?void 0:this.$props.groupable?-1:this._columnsMap.length+(this.$props.filterable?1:0)+t+(this.columnsRef.some(o=>{var n;return!!(o.footerCell||(n=o.cells)!=null&&n.footerCell)})||(i=this.$props.cells)!=null&&i.footerCell?1:0)},getAriaColCount(){const e=this.$props.columns,t=this.$props.columnVirtualization,s=(e==null?void 0:e.filter(i=>i.hidden!==void 0).length)!==0;if(t||s)return(e==null?void 0:e.length)!==0?e==null?void 0:e.length:-1},isVirtualScroll(){return this.$props.scrollable==="virtual"||this.$props.scrollable===void 0||!1},pinnedSourceSet(){var t,s;const e=new Set;return(t=this.gridStateContext.pinnedTopRows)!=null&&t.value&&this.gridStateContext.pinnedTopRows.value.forEach(i=>e.add(i)),(s=this.gridStateContext.pinnedBottomRows)!=null&&s.value&&this.gridStateContext.pinnedBottomRows.value.forEach(i=>e.add(i)),e},sortedPinnedTopRows(){var s,i;const e=((s=this.gridStateContext.pinnedTopRows)==null?void 0:s.value)||[],t=(i=this.gridStateContext.sort)==null?void 0:i.value;return this.autoProcessData&&(t!=null&&t.length)?re.orderBy([...e],t):e},sortedPinnedBottomRows(){var s,i;const e=((s=this.gridStateContext.pinnedBottomRows)==null?void 0:s.value)||[],t=(i=this.gridStateContext.sort)==null?void 0:i.value;return this.autoProcessData&&(t!=null&&t.length)?re.orderBy([...e],t):e},hasPinnedTopRows(){return this.$props.pinnable&&this.sortedPinnedTopRows.length>0},hasPinnedBottomRows(){return this.$props.pinnable&&this.sortedPinnedBottomRows.length>0},contextMenuColumn(){return this.columnsRef.find(e=>e.field===this.contextMenuState.field)},headMenuItems(){var t;const e=this.$props.sortable&&((t=this.contextMenuColumn)==null?void 0:t.sortable);return U.getDefaultHeadContextMenuItems({sortable:!!e,selectable:this.computedSelectable.enabled})},bodyMenuItems(){var e;return this.$props.sortable&&((e=this.contextMenuColumn)==null||e.sortable),U.getDefaultBodyContextMenuItems({selectable:this.computedSelectable.enabled,pinnable:!!this.$props.pinnable,clipboard:!!this.$props.clipboard})},contextMenuItems(){var s;const e=((s=this.contextMenuColumn)==null?void 0:s.contextMenu)||this.$props.contextMenu,t=typeof e=="function"?e(this.contextMenuState):e;if(t&&this.contextMenuState.offset){const i=this.contextMenuState.dataItem?N.GridContextMenuAnchorPart.body:N.GridContextMenuAnchorPart.head,o=t[i],n=this.contextMenuState.dataItem?this.bodyMenuItems:this.headMenuItems;let r;return o===!0||o===void 0?r=n:o!==!1&&(r=o),this.$props.pinnable&&r&&this.contextMenuState.dataItem?this.filterPinContextMenuItems(r):r}}},methods:{getCellPositionStyle(e,t){return e.left!==void 0?t?{left:e.right+"px",right:e.left+"px"}:{left:e.left+"px",right:e.right+"px"}:{}},handleContextMenuOpen(e,t,s){e.preventDefault(),this.contextMenuState={show:!0,offset:{left:e.pageX,top:e.pageY},dataItem:t,field:s}},handleContextMenuClose(){this.contextMenuState={show:!1,offset:{left:0,top:0},dataItem:void 0,field:void 0}},inActiveElement(){var o;if(!l.canUseDOM)return!1;const e=document==null?void 0:document.activeElement;let t=document==null?void 0:document.body;e!=null&&e.matches(".k-table-td")&&(t=e);const s=t==null?void 0:t.closest(".k-grid-container"),i=t&&((o=this._element)==null?void 0:o.contains(t));return!!(t&&i&&s)},handleClipboardEvent(e,t,s,i,o){var c,g,u;if(!this.inActiveElement()&&!s||!e)return;const n={type:e,nativeEvent:t,columns:this.columnsRef,dataItemKey:this.$props.dataItemKey||"",dataItem:i,field:o,...typeof this.$props.clipboard!="boolean"?this.$props.clipboard:{},...s},r=this.getLeafDataItems(),d=f.populateClipboardData({event:n,data:r,selectedState:(u=(g=this.$props.select)!=null?g:(c=this.gridStateContext.select)==null?void 0:c.value)!=null?u:{},previousCopiedItems:this.previousCopiedItems});e!==f.ClipboardActionType.paste&&(this.previousCopiedItems=d.copiedItems),l.hasListener.call(this,"clipboard")&&this.$emit("clipboard",{...n,...d})},handleContextMenuSelect(e){this.handleContextMenuItemClick({event:e,dataItem:this.contextMenuState.dataItem,field:this.contextMenuState.field})},renderContextMenu(){var e;return a.createVNode(U.GridContextMenu,{show:!!(this.contextMenuState.show&&((e=this.contextMenuItems)!=null&&e.length)),dataItem:this.contextMenuState.dataItem,field:this.contextMenuState.field,items:this.contextMenuItems,offset:this.contextMenuState.offset,onClose:this.handleContextMenuClose,onSelect:this.handleContextMenuSelect},null)},filterPinContextMenuItems(e){var c,g;const t=this.$props.dataItemKey||"",s=this.contextMenuState.dataItem,i=((c=this.gridStateContext.pinnedTopRows)==null?void 0:c.value)||[],o=((g=this.gridStateContext.pinnedBottomRows)==null?void 0:g.value)||[],n=t?s[t]:void 0,r=n!==void 0&&i.some(u=>u[t]===n),d=n!==void 0&&o.some(u=>u[t]===n);return e.map(u=>{const p=typeof u=="string"?U.contextMenuItemsMap[u]:u;return(p==null?void 0:p.name)===N.GridContextMenuItemNames.pinRow&&p.items?{...p,items:p.items.filter(m=>m.name===N.GridContextMenuItemNames.pinTop?!r:m.name===N.GridContextMenuItemNames.pinBottom?!d:m.name===N.GridContextMenuItemNames.unpin?r||d:!0)}:u})},handleContextMenuItemClick(e){var i,o,n,r,d,c,g,u;const t=e.event.event.item,s={event:e.event,menuItem:t,dataItem:e.dataItem,field:e.field};switch(this.$emit("contextmenuitemclick",s),(i=t.data)==null?void 0:i.action){case"SortCommand":if(this.contextMenuColumn){const p=(o=t.name)==null?void 0:o.toLowerCase().includes("asc"),R=((n=t.name)==null?void 0:n.toLowerCase().includes("desc"))?"desc":void 0,x=p?"asc":R,b=t.name?x:void 0,I=(((r=this.gridStateContext.sort)==null?void 0:r.value)||[]).filter(k=>{var S;return k.field!==((S=this.contextMenuColumn)==null?void 0:S.field)});b&&((d=this.contextMenuColumn)!=null&&d.field)&&I.push({field:this.contextMenuColumn.field,dir:b}),this.sortChangeHandler(I,{event:e.event})}break;case"SelectRowCommand":{const p=e.dataItem;if(this.computedSelectable.enabled&&p&&this.$props.dataItemKey){const R=l.getter(this.$props.dataItemKey)(p),x=this.getLeafDataItems(),b=x.findIndex(T=>T[this.$props.dataItemKey]===p[this.$props.dataItemKey]),w=0,I=this.columnsRef.length-1,k={...this.getArguments(e.event),dataItem:p,startDataItem:b,endDataItem:b,startRowIndex:b,endRowIndex:b,startColIndex:w,endColIndex:I,dataItems:x,ctrlKey:!1,altKey:!1,metaKey:!1,shiftKey:!1,isDrag:!1,mode:this.computedSelectable.mode,cell:this.computedSelectable.cell,componentId:this.$props.id||this._gridId,selectedField:this.$props.selectedField||""},S=this.computedSelectable.mode==="multiple"?{...(g=(c=this.gridStateContext.select)==null?void 0:c.value)!=null?g:{}}:{};S[R]===!0||Array.isArray(S[R])&&S[R].length===this.columnsRef.length?delete S[R]:S[R]=this.computedSelectable.cell?[...Array(this.columnsRef.length).keys()]:!0,this.raiseSelectionEvent(k,S)}break}case"SelectAllRowsCommand":{if(this.computedSelectable.enabled&&this.$props.dataItemKey){const p=this.getLeafDataItems(),m={},R=p[0],x=p[p.length-1];p.forEach(b=>{const w=l.getter(this.$props.dataItemKey)(b);m[w]=this.computedSelectable.cell?[...Array(this.columnsRef.length).keys()]:!0}),this.raiseSelectionEvent({...this.getArguments(e.event),dataItems:p,dataItem:R,startDataItem:R,endDataItem:x,startRowIndex:0,endRowIndex:p.length-1,startColIndex:0,endColIndex:this.columnsRef.length-1,ctrlKey:!1,altKey:!1,metaKey:!1,shiftKey:!1,isDrag:!1,mode:this.computedSelectable.mode,cell:this.computedSelectable.cell,componentId:this.$props.id||this._gridId,selectedField:this.$props.selectedField||""},m)}break}case"ClearSelectionCommand":this.computedSelectable.enabled&&this.clearSelection({...this.getArguments(e.event),dataItems:this.getLeafDataItems(),startRowIndex:-1,endRowIndex:-1,startColIndex:-1,endColIndex:-1,ctrlKey:!1,altKey:!1,metaKey:!1,shiftKey:!1,isDrag:!1,mode:this.computedSelectable.mode,cell:this.computedSelectable.cell,componentId:this.$props.id||this._gridId,selectedField:this.$props.selectedField||""});break;case"PinTopCommand":this.handleRowPin("pinTop",e.dataItem);break;case"PinBottomCommand":this.handleRowPin("pinBottom",e.dataItem);break;case"UnpinCommand":this.handleRowPin("unpin",e.dataItem);break;case"CopySelectionCommand":this.handleClipboardEvent(f.ClipboardActionType.copy,e.event.nativeEvent,{copyHeaders:!((u=t.name)!=null&&u.toLowerCase().includes("noheaders"))},e.dataItem,e.field);break;case"PasteCommand":this.handleClipboardEvent(f.ClipboardActionType.paste,e.event.nativeEvent,{},e.dataItem,e.field);break}this.handleContextMenuClose()},triggerCellContextMenu(e,t,s){this.$emit("contextmenu",{dataItem:t,field:s,event:e}),this.$props.contextMenu&&this.handleContextMenuOpen(e,t,s)},handleIntersection(e){const t={rowIndex:this.rowIndexRef.value};e.forEach(s=>{s.boundingClientRect.height!==s.intersectionRect.height&&this.setCurrentOnTop(t)})},scrollIntoView(e){var i;if(!((i=this.vsRef)!=null&&i.container)||this.$props.scrollable==="none")return;const{rowIndex:t}=e;this.rowIndexRef.value=t;const s=this._element;if(this.observerRef&&s){this.observerRef.disconnect();const o=s.querySelector(`[absolute-row-index="${this.rowIndexRef.value}"]`);o?this.observerRef.observe(o):this.setCurrentOnTop(e)}},setCurrentOnTop(e){var i,o;if(!((i=this.vsRef)!=null&&i.container)||this.$props.scrollable==="none")return;this.observerRef&&this.observerRef.disconnect();const{rowIndex:t}=e,s=this._element;if(this.isVirtualScroll){const n=((o=this.vsRef.rowHeightService)==null?void 0:o.offset(t))||0;this.vsRef.container.scroll(0,n)}else if(s){const n=t<1?s.querySelector("tbody > tr:nth-child(1)"):s.querySelector(`tbody > tr:nth-child(${t+1})`);n&&this.containerElementRef&&(this.containerElementRef.scrollTop=n.offsetTop)}},getTotal(){let e=this.$props.total||0;return Array.isArray(this.$props.dataItems)?e=e||this.$props.dataItems.length:this.$props.dataItems&&(e=e||this.$props.dataItems.total),e},exportAsCsv(){this.csvExportRef&&this.csvExportRef.save()},getCsvBlob(){return this.csvExportRef?this.csvExportRef.getBlob():null},readColumnElements(){return $.readColumns(this.$props.columns,this.currentColumnsState,{prevId:0,idPrefix:this.idPrefix})},getResolvedFlatColumnsState(){const e=[],t=(s,i)=>s==null?void 0:s.forEach(o=>{const n=o.hidden||i;e.push({...o,hidden:n}),t(o.children,n)});return t(this.currentColumnsState,!1),e},filterColumns(e){const t=this.getResolvedFlatColumnsState();return[e.filter(s=>{var i;return!s.hidden&&!((i=t.find(o=>o.id===s.id))!=null&&i.hidden)}),e.filter(s=>{var i;return s.hidden||((i=t.find(o=>o.id===s.id))==null?void 0:i.hidden)})]},getFlatData(e,t,s,i,o,n,r){const d=[],c=$.flatData(d,e,t,{index:s},i!==void 0,o,n,this.groupExpandable.defaultExpand,r,this.$props.expandField);return{flattedData:d,resolvedGroupsCount:c}},getColumnsEssentialProps(e){return e&&JSON.stringify(e.map(t=>({id:t.id,field:t.field,title:t.title,children:t.children})))},calculateMedia(){const e=this.filterHiddenColumns(this.$props.columns||[]);this.getColumnsEssentialProps(this.notHiddenColumns)!==this.getColumnsEssentialProps(e)&&this.$forceUpdate()},filterHiddenColumns(e){if(!e||e.length===0)return e;const t=s=>({...s,children:s.children&&s.children.length>0?this.filterHiddenColumns(s.children):s.children});return[...e].filter(s=>!s.hidden).filter(s=>l.canUseDOM&&s&&s.media?window.matchMedia(s.media).matches:s).map(s=>t(s))},getColumns(){const e=this.columnsRef.filter(s=>s.declarationIndex>=0&&s.parentIndex===-1),t=s=>(s.sort((i,o)=>i.declarationIndex-o.declarationIndex),s.map(i=>{const{declarationIndex:o,parentIndex:n,depth:r,colSpan:d,rowSpan:c,index:g,kFirst:u,children:p,...m}=i;return p.length?{children:t(p),...m}:m}));return t(e)},setRefs(){var n,r,d,c;let e="$el";const t=l.getRef(this,"gridNav");t&&(this._element=t[e]);const s=l.getRef(this,"groupPanelDiv");if(s){let g=s[e]||null;this.dragLogic.refGroupPanelDiv(g)}this.stickyHeaderRef=l.getRef(this,"stickyHeader"),this.stickyFooterRef=l.getRef(this,"stickyFooter"),this.pinnedTopRef=l.getRef(this,"pinnedTop"),this.pinnedBottomRef=l.getRef(this,"pinnedBottom");const i=l.getRef(this,"dropElementClue"),o=l.getRef(this,"dragElementClue");this.dragLogic.refDropElementClue(i),this.dragLogic.refDragElementClue(o),this.columnResize.colGroupMain=l.getRef(this,"colGroup"),this.columnResize.colGroupStickyHeader=(n=this.stickyHeaderRef)==null?void 0:n.colGroupRef,this.columnResize.colGroupStickyFooter=(r=this.stickyFooterRef)==null?void 0:r.colGroupRef,this.columnResize.colGroupPinnedTop=(d=this.pinnedTopRef)==null?void 0:d.colGroupRef,this.columnResize.colGroupPinnedBottom=(c=this.pinnedBottomRef)==null?void 0:c.colGroupRef,this._header=l.getRef(this,"header"),this._footer=l.getRef(this,"footer"),this.resetTableWidth(),l.setScrollbarWidth()},gridUnmounted(){clearTimeout(this.forceUpdateTimeout),this.columnResize.columns=[],this.dragLogic.columns=[],this.dragLogic&&this.dragLogic.dragElementClue&&(this.dragLogic.dragElementClue.$el.remove(),this.dragLogic.dropElementClue.$el.remove()),this.dataRef=[],this.columnsRef=[],document!=null&&document.body&&this.resizeObserver&&this.resizeObserver.disconnect(),this.observerRef&&(this.observerRef.disconnect(),this.observerRef=null),this.clipboardServiceRef&&(this.clipboardServiceRef.removeEventListeners(document),this.clipboardServiceRef=null)},isAllData(){const{dataItems:e,total:t}=this.$props;return Array.isArray(e)?e.length===t:e?t===e.total:!1},resetVirtualSkip(){this.isVirtualScroll&&this.virtualSkipRef&&(this.virtualSkipRef=0)},virtualPageChange(e,t){var i;const s=(i=this.gridStateContext.group)==null?void 0:i.value;this.$props.pageable||s!=null&&s.length?(this.virtualSkipRef=e.skip,this.$forceUpdate()):this.pageChangeHandler(e,t)},initializeVirtualization(){const e=this.vsRef,t=this.$props.rowHeight||this._minRowHeightRef||0;this.tableBodyRef=l.getRef(this,"tableBody"),this.scrollTableRef=l.getComponentElementRef(this,"table"),e&&(e.fixedScroll=this.$props.fixedScroll||!1,e.PageChange=this.virtualPageChange,e.pageSize=this._virtualPageSize,e.scrollableVirtual=this.isVirtualScroll,this.scrollContainerRef=e.container=l.getRef(this,"scrollContainer"),e.tableBody=this.tableBodyRef,e.scrollHeightContainer=l.getRef(this,"scrollHeightContainer"),e.table=this.scrollTableRef,(!e.rowHeightService||e.total!==this._virtualTotal)&&t&&(e.total=this._virtualTotal,e.rowHeightService=new l.RowHeightService(this._virtualTotal,t)))},setContainerHeight(){const e=l.getRef(this,"scrollContainer");this._containerHeightRef=(e==null?void 0:e.offsetHeight)||0},setMinRowHeight(){if(!this._minRowHeightRef&&!this.$props.rowHeight){const t=$.calcRowHeight(l.getRef(this,"tableBody"));t&&(this._minRowHeightRef=t,this.$forceUpdate())}},onRowHeightChanged(e,t){this.setRefs()},onHeaderScroll(e){const s=e.target.scrollLeft,i=l.getRef(this,"scrollContainer");i&&(i.scrollLeft=s),this.scrollLeftRef=s},scrollHandler(e){clearTimeout(this.forceUpdateTimeout);const t=e.currentTarget.scrollLeft,s=e.currentTarget.scrollTop;this.$props.columnVirtualization&&(!this.isVirtualScroll||s===this.wrapperScrollTopRef)&&(this.forceUpdateTimeout=setTimeout(()=>{this.$forceUpdate()},0)),this.scrollLeftRef=t,this._header&&this._header.setScrollLeft(e.currentTarget.scrollLeft),this._footer&&this._footer.setScrollLeft(e.currentTarget.scrollLeft),this.stickyHeaderRef&&this.stickyHeaderRef.setScrollLeft(e.currentTarget.scrollLeft),this.stickyFooterRef&&this.stickyFooterRef.setScrollLeft(e.currentTarget.scrollLeft),this.pinnedTopRef&&this.pinnedTopRef.setScrollLeft(t),this.pinnedBottomRef&&this.pinnedBottomRef.setScrollLeft(t),this.vsRef&&s!==this.wrapperScrollTopRef&&this.vsRef.scrollHandler(e);const i=this.virtualSkipRef;this.vsRef&&s!==this.wrapperScrollTopRef&&this.vsRef.scrollHandler(e);const o=this.isVirtualScroll&&this.virtualSkipRef!==i;if(this.$emit("scroll",e),this.wrapperScrollTopRef=s,!o){const n=this.updateStickyGroups();this.sticky.headerItems=n==null?void 0:n.stickyHeaderItems,this.sticky.footerItems=n==null?void 0:n.stickyFooterItems}},rowClick(e,t){e.target.type!=="checkbox"&&this.$emit("rowclick",{dataItem:t.dataItem,...this.getArguments(e)})},rowDoubleClick(e,t){e.target.type!=="checkbox"&&this.$emit("rowdblclick",{dataItem:t.dataItem,...this.getArguments(e)})},loopGroupedItems(e,t,s=0,i=null){return e.forEach(o=>{!i&&t(o,s)&&(i=o),o.items&&o.items.length&&!i&&(i=this.loopGroupedItems(o.items,t,s+1,i))}),i},updateGroupCollapsed(e){let t=this.computedCollapsed,s=t[e.level];const i=this.$props.uniqueField,o=function(d,c){return d.value===e.dataItem.value&&c===e.level},n=this.allGroupedItems?this.loopGroupedItems(this.allGroupedItems.data,o,0,null):e.dataItem,r=$.groupedFirstItemValue(n||e.dataItem,i);if(e.value){if(s&&s.length){const d=s.indexOf(r);d>-1&&s.splice(d,1)}}else s?s.includes(r)||s.push(r):s=[r];return t},itemChange(e){var i;const t=l.hasListener.call(this,"itemchange"),s=(i=this.gridStateContext.group)==null?void 0:i.value;if(e.field===this.$props.expandField||(s||this.$props.detail)&&e.field===void 0){l.hasListener.call(this,"expandchange")&&e.dataItem&&this.$emit("expandchange",{...this.getArguments(e.event),collapsedGroups:this.updateGroupCollapsed(e),dataItem:e.dataItem,value:e.value});return}t&&this.$emit("itemchange",{...this.getArguments(e.event),dataItem:e.dataItem,field:e.field,value:e.value})},cellClickHandler(e){this.$emit("cellclick",{dataItem:e.dataItem,field:e.field})},cellKeydownHandler(e){this.$emit("cellkeydown",e)},navigationActionHandler(e){this.$emit("navigationaction",e)},editHandler(e){this.$emit("edit",{dataItem:e})},removeHandler(e){this.$emit("remove",{dataItem:e})},saveHandler(e){this.$emit("save",{dataItem:e})},cancelHandler(e){this.$emit("cancel",{dataItem:e})},selectionChangeHandler(e){var t,s,i;if(this.computedSelectable.enabled){const{event:o,dataItem:n,dataIndex:r,columnIndex:d}=e,c={...this.getArguments(o),dataItem:n,startColIndex:d,endColIndex:d,startRowIndex:r,endRowIndex:r,dataItems:this.getLeafDataItems(),altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,mode:this.computedSelectable.mode,cell:this.computedSelectable.cell,isDrag:!1,componentId:this.$props.id||this._gridId,selectedField:this.$props.selectedField||""};this.gridStateContext.selectionchange({...c,select:this.$props.dataItemKey?f.getSelectedState({event:c,selectedState:(i=(s=this.$props.select)!=null?s:(t=this.gridStateContext.select)==null?void 0:t.value)!=null?i:{},dataItemKey:this.$props.dataItemKey}):{}})}},onKeyboardSelectionChangeHandler(e){var g,u;if(!this.computedSelectable.enabled||!this.$props.dataItemKey)return;const t=(g=this.gridStateContext.select)==null?void 0:g.value,s={dataItems:this.getLeafDataItems(),mode:this.computedSelectable.mode,cell:this.computedSelectable.cell,componentId:this.$props.id,selectedField:"",...this.getArguments(e)},i=f.getSelectedStateFromKeyDown({event:s,selectedState:t!=null?t:{},dataItemKey:this.$props.dataItemKey});if(i===t)return;const o=e.target,n=f.closestTagName(o,"TD"),r=f.closestTagName(o,"TR"),d=f.getColumnIndex(n),c=f.getRowIndex(r);if(d!==void 0&&c!==void 0){const p=(u=$.getDataAsArray(this.$props.dataItems))==null?void 0:u[c];this.gridStateContext.selectionchange({...s,select:i,dataItem:p,startRowIndex:c,startColIndex:d,startDataItem:p,endDataItem:p,endRowIndex:c,endColIndex:d,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey,isDrag:!1})}},onHeaderSelectionChangeHandler(e){if(this.computedSelectable.enabled){const t=this.getLeafDataItems();this.gridStateContext.headerselectionchange({select:e.event.target.checked?t.reduce((s,i)=>(this.$props.dataItemKey&&l.getter(this.$props.dataItemKey)(i)!==void 0&&(s[l.getter(this.$props.dataItemKey)(i)]=!0),s),{}):{},field:e.field,event:e.event,target:this,dataItems:t})}},selectionRelease(e){var t,s,i;if(this.computedSelectable.enabled){const o=this.getLeafDataItems(),n=o[e.startRowIndex],r=o[e.endRowIndex],d={event:void 0,target:this,selectedField:"",componentId:this.$props.id||this._gridId,dataItems:o,dataItem:null,startDataItem:n,endDataItem:r,...e},c=f.getSelectedState({event:d,selectedState:(i=(s=this.$props.select)!=null?s:(t=this.gridStateContext.select)==null?void 0:t.value)!=null?i:{},dataItemKey:this.$props.dataItemKey});this.raiseSelectionEvent(d,c)}},clearSelection(e){this.computedSelectable.enabled&&this.raiseSelectionEvent(e,{})},raiseSelectionEvent(e,t){this.computedSelectable.enabled&&this.gridStateContext.selectionchange({...e,select:t})},moveToNextPage(e){var o,n,r,d;const t=(r=(n=(o=this.gridStateContext.take)==null?void 0:o.value)!=null?n:this.$props.pageSize)!=null?r:0,s=(((d=this.gridStateContext.skip)==null?void 0:d.value)||0)+t,i=this.getTotal();s<i&&this.pageChangeHandler({skip:s,take:t},e)},moveToPrevPage(e){var i,o,n,r;const t=(n=(o=(i=this.gridStateContext.take)==null?void 0:i.value)!=null?o:this.$props.pageSize)!=null?n:0,s=(((r=this.gridStateContext.skip)==null?void 0:r.value)||0)-t;s>=0&&this.pageChangeHandler({skip:s,take:t},e)},pageChangeHandler(e,t){this.raiseDataEvent("pagechange",{page:e,event:t},{skip:e.skip,take:e.take},t)},sortChangeHandler(e,t){this.raiseDataEvent("sortchange",{sort:e},{sort:e},t)},filterChangeHandler(e,t){this.raiseDataEvent("filterchange",{filter:e},{filter:e,skip:0},t)},groupChangeHandler(e,t){this.raiseDataEvent("groupchange",{group:e},{group:e,skip:0},t)},handleDetailExpandAction(e,t){var s;if(this.detailExpandable.enabled){const i=(s=this.gridStateContext.detailExpand)==null?void 0:s.value,o=f.detailExpandReducer(i!=null?i:{},e);this.gridStateContext.detailexpandchange({...this.getArguments(t),detailExpand:o})}},handleGroupExpandAction(e,t){var s;if(this.groupExpandable.enabled){const i=(s=this.gridStateContext.groupExpand)==null?void 0:s.value,o=f.groupExpandReducer(i!=null?i:[],e,this.groupExpandable);this.$props.expandField||this.gridStateContext.groupexpandchange({...this.getArguments(t),groupExpand:o})}this.scrollToStickyGroup(e.group)},raiseDataEvent(e,t,s,i){if(this.resetVirtualSkip(),this.$props.autoProcessData)this.gridStateContext[e]({...this.getArguments(i),...t});else if(l.hasListener.call(this,e))this.$emit(e,{...this.getArguments(i),...t});else if(l.hasListener.call(this,"datastatechange")){const o={...this.getDataState(),...s};this.gridStateContext.datastatechange({...this.getArguments(i),data:o,dataState:o})}},columnReorder(e,t,s){const i=this.columnsRef[e],o=$.getFlatColumnsState(this.currentColumnsState),n=i.depth,r=u=>{do u++;while(u<this.columnsRef.length&&this.columnsRef[u].depth>n);return u},d=this.columnsRef.splice(e,r(e)-e);this.columnsRef.splice(e<t?r(t-d.length):t,0,...d),this.columnsRef.filter(u=>u.declarationIndex>=0).forEach((u,p)=>{u.orderIndex=p;const m=o.find(R=>R.id===u.id);m&&(m.orderIndex=p)});const c=this.columnsRef[e].locked&&this.columnsRef[t].locked;f.updateLeft(this._columnsMap,this.columnsRef,c||this.shouldUpdateLeftRightRef),f.updateRight(this._columnsMap,this.columnsRef,c||this.shouldUpdateLeftRightRef),this.resizedRef&&(this.shouldUpdateLeftRightRef=!1,this.resizedRef=!1);const g=this.getColumns();this.$emit("columnreorder",{target:this,columns:g,event:s,prev:e,next:t}),this.gridStateContext.columnsstatechange({columnsState:this.currentColumnsState})},groupReorder(e,t,s){var o;const i=(o=this.gridStateContext.group)==null?void 0:o.value;i!==void 0&&(i.splice(t,0,...i.splice(e,1)),this.groupChangeHandler(i,s))},columnToGroup(e,t,s){var n;const i=this.columnsRef[e].field;if(!i)return;const o=(((n=this.gridStateContext.group)==null?void 0:n.value)||[]).slice();o.splice(t,0,{field:i}),this.groupChangeHandler(o,s)},resetTableWidth(){var i;let e=0;if(!this.columnResize.colGroupMain)return;const t=(i=this.columnResize.colGroupMain)==null?void 0:i.children;for(let o=0;o<t.length;o++){const n=t[o].width;if(!n)return;e+=parseFloat(n.toString())}e=Math.round(e),this._header&&this._header.setWidth(e),this._footer&&this._footer.setWidth(e),this.stickyHeaderRef&&this.stickyHeaderRef.setWidth(e),this.stickyFooterRef&&this.stickyFooterRef.setWidth(e),this.pinnedTopRef&&this.pinnedTopRef.setWidth(e),this.pinnedBottomRef&&this.pinnedBottomRef.setWidth(e);const s=l.getComponentElementRef(this,"table");s&&e&&(s.style.width=e+"px"),this.stickyFooterRef&&this.setStickyFooterOffset()},setStickyFooterOffset(){const e=this.containerElementRef,t=e?e.scrollWidth>e.clientWidth:!1;this.stickyFooterRef&&(this.stickyFooterRef.$el.style.marginBlockEnd=t?"var(--kendo-scrollbar-width, 0px)":"")},onResize(e,t,s,i,o,n,r){this.resetTableWidth(),this.shouldUpdateLeftRightRef=!0,this.resizedRef=!0,this.$emit("columnresize",{columns:this.getColumns(),index:e,targetColumnId:r,event:i,newWidth:t,oldWidth:s,end:o,target:this}),o&&this.gridStateContext.columnsstatechange({columnsState:n})},initColumnsState(e,t){const s=i=>{var n;const o=t.find(r=>r.id===i.id);if(o){const r={...o};return r.children=(n=i.children)==null?void 0:n.map(s),r}return i};this.currentColumnsState=e.filter(i=>i.parentIndex===-1).map(s)},configureColumns(e,t){e.filter(n=>n.columnType==="checkbox").forEach(n=>{n.width=n.width||"50px",n.defaultCell=a.markRaw(Pe.GridSelectionCell),n.defaultHeaderCell=a.markRaw(ze.GridHeaderSelectionCell),n._type="edit",n.columnMenu=!1}),this.$props.selectedField&&this.columnsRef.filter(n=>n.field===this.$props.selectedField).forEach(n=>{n.width=n.width||"50px",n.defaultCell=a.markRaw(Pe.GridSelectionCell),n.defaultHeaderCell=a.markRaw(ze.GridHeaderSelectionCell),n.columnMenu=!1}),this.$props.pinnable&&e.filter(n=>n.columnType==="pin").forEach(n=>{n.width=n.width||"48px",n.defaultCell=a.markRaw(St.GridPinCell),n.defaultHeaderCell=a.markRaw(f.HeaderCell),n.sortable=!1,n.filterable=!1,n.editable=!1});const s=$.getFlatColumnsState(this.currentColumnsState);this.initColumnsState(e,s);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(this.detailExpandable.enabled&&this.$props.detail&&!this.$props.expandField){const n={...i,_type:"expand",id:f.tableKeyboardNavigationTools.generateNavigatableId(`${o++}`,"expand","column"),defaultCell:a.markRaw(De.GridHierarchyCell),field:this.detailExpandable.column,headerClassName:this.hierarchClass};e.unshift(n),this.currentColumnsState.unshift(s.find(r=>r.id===n.id)||n)}this.$props.expandField&&l.hasListener.call(this,"expandchange")&&this.$props.detail&&(e.unshift({...i,defaultCell:a.markRaw(De.GridHierarchyCell),field:this.$props.expandField,headerClassName:"k-hierarchy-cell k-header",id:f.tableKeyboardNavigationTools.generateNavigatableId(`${e.length}`,this.idPrefix,"column"),...this.expandColumn}),o++);for(let n=0;n<t;n++){const r={...i,isAccessible:!1,defaultCell:a.markRaw(Ve.GridGroupCell),id:f.tableKeyboardNavigationTools.generateNavigatableId(`${o++}`,"group","column"),field:"value",locked:this.$props.lockGroups,columnMenu:!1};e.unshift(r),this.currentColumnsState.unshift(s.find(d=>d.id===r.id)||r)}e.slice(o).forEach(n=>{n.parentIndex>=0&&(n.parentIndex+=o),n.rowSpannable=n.rowSpannable!==void 0?$.getRowSpanOptions(n.rowSpannable):this.computedRowSpannable})},initColumns(e,t){var n;this.columnsRef=this.readColumnElements();const s=(n=this.gridStateContext.group)==null?void 0:n.value;this.columnsRef.filter(r=>!r.hidden).length===0&&(this.columnsRef=$.autoGenerateColumns(e,s,{column:this.$props.expandField?this.$props.expandField:this.groupExpandable.column},{prevId:0,idPrefix:this.idPrefix})),this.configureColumns(this.columnsRef,t);const[i,o]=this.filterColumns(this.columnsRef);this.columnsRef=i,this.hiddenColumnsRef=o,this._columnsMap=$.mapColumns(this.columnsRef,!0)},resolveTitle(e){const t=this.findColumnByField(e),s=t&&(t.title||t.field);return s===void 0?e:s},findColumnByField(e){let t;return this.$props.columns.forEach(s=>{const i=this.searchColumn(s,e);i&&(t=i)}),t},searchColumn(e,t){if(e.field===t)return e;if(e.children){let s,i=null;for(s=0;i==null&&s<e.children.length;s++)i=this.searchColumn(e.children[s],t);return i}return null},getDataState(){var n,r,d,c,g;const e=(n=this.gridStateContext.sort)==null?void 0:n.value,t=(r=this.gridStateContext.filter)==null?void 0:r.value,s=(d=this.gridStateContext.skip)==null?void 0:d.value,i=(c=this.gridStateContext.take)==null?void 0:c.value,o=(g=this.gridStateContext.group)==null?void 0:g.value;return{filter:t,sort:e,skip:s,take:i!==void 0?i:this.$props.pageSize,group:o}},getArguments(e){return{event:e,target:this}},getLeafDataItems(){return this.dataRef.filter(e=>e.rowType==="data").map(e=>e.dataItem)},totalGroupedRows(e){let t=0;return e&&(t=this.addSubItems(e,t)),t},addSubItems(e,t){return e.forEach(s=>{t++,s.expanded!==!1&&s.items&&(t=this.addSubItems(s.items,t)),this.group&&this.group.length&&(this.$props.groupable.footer==="always"||s.expanded!==!1&&s.items&&this.$props.groupable.footer==="visible")&&t++}),t},searchChange(e){const t=this.$props.searchFields||this.columnsRef.map(o=>o.field)||[],s=e.event.target.value,i={logic:"or",filters:t.filter(o=>o!==void 0).map(o=>{var n;return typeof o=="string"?{field:o,value:s,operator:"contains"}:{value:s,operator:(n=o.operator)!=null?n:"contains",field:o.field,ignoreCase:o.ignoreCase}})};this.raiseDataEvent("searchchange",{search:i},{skip:0},e)},getCellsToRender(e,t){var n;const s=[];let i=null,o=0;if(t.forEach((r,d)=>{const c=parseFloat((r.width||"").toString())||10;if(o){o--,i&&(i.width+=c);return}const g=Math.min($.getColSpan(r,e),t.length-d);o=g-1,i={width:c,colSpan:g,columnIndex:d},s.push(i)}),this.$props.columnVirtualization){const r=this.scrollLeftRef||0,d=this.tableWidth||parseFloat((((n=this.$attrs.style)==null?void 0:n.width)||"").toString());return Rt.getVirtualCellsToRender({cellModels:s,columns:t,tableViewPortWidth:d,scrollLeft:r})}return s},calcVirtualPageSize(){const{pageable:e,take:t,pageSize:s}=this.$props;if(!this.isVirtualScroll)return 0;if(!e){if(t)return t;if(s)return s}const i=this.$props.rowHeight||this._minRowHeightRef,o=this._containerHeightRef;return o&&i?Math.ceil(o/i*1.5):0},getRowPinPosition(e){var n,r;const{dataItemKey:t=""}=this.$props,s=((n=this.gridStateContext.pinnedTopRows)==null?void 0:n.value)||[],i=((r=this.gridStateContext.pinnedBottomRows)==null?void 0:r.value)||[];if(!t||!e)return"none";const o=e[t];return s!=null&&s.some(d=>d[t]===o)?"top":i!=null&&i.some(d=>d[t]===o)?"bottom":"none"},handleRowPin(e,t){var g,u,p,m;if(!this.$props.pinnable)return;const{dataItemKey:s=""}=this.$props,i=((g=this.gridStateContext.pinnedTopRows)==null?void 0:g.value)||[],o=((u=this.gridStateContext.pinnedBottomRows)==null?void 0:u.value)||[],n=t[s],r=i.filter(R=>R[s]!==n),d=o.filter(R=>R[s]!==n);let c;switch(e){case"pinTop":c={pinnedTopRows:[...r,t],pinnedBottomRows:d,dataItem:t};break;case"pinBottom":c={pinnedTopRows:r,pinnedBottomRows:[...d,t],dataItem:t};break;case"unpin":c={pinnedTopRows:r,pinnedBottomRows:d,dataItem:t};break;default:return}(m=(p=this.gridStateContext).rowpinchange)==null||m.call(p,c)},pinnedSelectionRelease(e,t){const s=this.$props.dataItemKey;if(!s||!t)return;const i=l.getter(s),o=this.getLeafDataItems().findIndex(n=>i(n)===i(t));o!==-1&&this.selectionRelease({...e,startRowIndex:o,endRowIndex:o})}},provide(){return{gridContext:{dataItemKey:this.$props.dataItemKey,searchChange:this.searchChange,selectionRelease:this.selectionRelease,pinnedSelectionRelease:this.pinnedSelectionRelease,dispatchGroupExpand:this.handleGroupExpandAction,dispatchDetailExpand:this.handleDetailExpandAction,scrollToStickyGroup:this.scrollToStickyGroup,getCellPositionStyle:this.getCellPositionStyle,onRowPin:this.handleRowPin,getRowPinPosition:this.getRowPinPosition,onContextMenu:this.triggerCellContextMenu,exportAsCsv:this.exportAsCsv},sticky:this.sticky}},setup(e){const t=a.ref(null),s=a.ref(null),i=a.ref(null),o=a.ref(null),n=a.ref(null),r=a.ref(null),d=a.ref(null),c=a.ref([]),g=a.ref([]),u=a.ref(null),p=a.ref(null),m=a.ref(null),R=a.ref(null),x=a.ref(null),b=a.ref(null),w=a.ref(null),I=a.ref(!0),k=a.ref(!1),S=new dt.VirtualScroll,T=a.ref(0),F=a.inject(mt.KendoKey,{}),j=typeof e.groupable=="object"&&!!e.groupable.stickyHeaders,M=typeof e.groupable=="object"&&!!e.groupable.stickyFooters,L=a.ref([]),K=a.computed(()=>{var q,E;return!!((E=(q=F.group)==null?void 0:q.value)!=null&&E.length)}),G=null,H=a.ref(void 0),_=a.ref({headerItems:[],footerItems:[]}),{scrollToStickyGroup:A,update:B}=bt.useStickyGroups({enabled:j,enabledFooters:M,flatData:L,containerRef:u,stickyHeaderRef:p,stickyFooterRef:m,tableBodyRef:b,rowHeight:e.rowHeight,isGrouped:K,virtualSkipRef:T,rowHeightServiceRef:a.computed(()=>S==null?void 0:S.rowHeightService)});return{rowIndexRef:H,observerRef:G,dataRef:L,groupPanelDivRef:t,dropElementClueRef:s,dragElementClueRef:i,headerRef:o,footerRef:n,gridNavRef:r,colGroupRef:d,scrollContainerRef:u,tableBodyRef:b,gridStateContext:F,shouldUpdateLeftRightRef:I,resizedRef:k,currentColumnsState:e.columnsState,vsRef:S,virtualSkipRef:T,stickyHeaderItems:c,stickyHeaderRef:p,stickyFooterItems:g,stickyFooterRef:m,pinnedTopRef:R,pinnedBottomRef:x,csvExportRef:w,sticky:_,scrollToStickyGroup:A,updateStickyGroups:B}},render(){var ue,fe,ge,me,Re,Ce,be,Se,ve,xe,Ie,$e,we,ye,ke,He,Te,Me;const e=(ue=this.gridStateContext.sort)==null?void 0:ue.value,t=(fe=this.gridStateContext.filter)==null?void 0:fe.value,s=(ge=this.gridStateContext.search)==null?void 0:ge.value,i=(me=this.gridStateContext.select)==null?void 0:me.value,o=(Re=this.gridStateContext.skip)==null?void 0:Re.value,n=(Ce=this.gridStateContext.take)==null?void 0:Ce.value,r=(be=this.gridStateContext.group)==null?void 0:be.value,d=(Se=this.gridStateContext.groupExpand)==null?void 0:Se.value,c=(ve=this.gridStateContext.detailExpand)==null?void 0:ve.value,g=(r==null?void 0:r.length)||0,u=typeof this.$props.groupable=="object"&&!!this.$props.groupable.stickyHeaders,p=typeof this.$props.groupable=="object"&&!!this.$props.groupable.stickyFooters,m=!!(r!=null&&r.length);let R;this.currentColumnsState=(xe=this.gridStateContext.columnsState)==null?void 0:xe.value;const x=this.$props.autoProcessData===!0?{group:!0,sort:!0,filter:!0,search:!0,page:!0}:this.$props.autoProcessData;let b;const w=f.tableKeyboardNavigationTools.getIdPrefix(this.navigation);let I=[];Array.isArray(this.$props.dataItems)?(I=this.$props.dataItems,b=(Ie=this.$props.total)!=null?Ie:I.length):(I=(($e=$.applyExpandedState(this.$props.dataItems,this.$props.collapsedGroups.length?this.computedCollapsed:[],this.$props.uniqueField))==null?void 0:$e.data)||[],b=(ke=(ye=this.$props.total)!=null?ye:(we=this.$props.dataItems)==null?void 0:we.total)!=null?ke:I.length);const k=this.$props.groupable===!0||l.isObject(this.$props.groupable)&&this.$props.groupable.enabled!==!1;this.dragLogic.reorderable=this.$props.reorderable||!1,this.dragLogic.groupable=k,this._virtualPageSize=this.calcVirtualPageSize();const S=I.length===b,T=l.isObject(this.$props.groupable)&&this.$props.groupable.footer||"none";if(x){const h=x.page&&!(this.isVirtualScroll&&!this.$props.pageable),{data:v,total:y}=re.process(I,{group:x.group?r:void 0,sort:x.sort?e:void 0,filter:f.combineFilters(x.filter?t:void 0,x.search?s:void 0),...h?{take:this.$props.pageable?n||10:n,skip:o||0}:{}});I=v,b=(He=this.$props.total)!=null?He:y}const{resolvedGroupsCount:F,flattedData:j}=this.getFlatData(I,T,S?0:this.$props.skip||0,r,c,d,this.$props.dataItemKey);this.dataRef=j;const M=this.virtualSkipRef||0;if(this._virtualTotal=b,this.isVirtualScroll){let h=o||0;if((m||this.$props.pageable)&&(h=M,this._virtualTotal=this.dataRef.length),S||m||this.$props.pageable)if(this._virtualPageSize===0){const v=Math.min(n||this.$props.pageSize||20,this.dataRef.length);R=this.dataRef.slice(h,h+v)}else R=this.dataRef.slice(h,h+this._virtualPageSize)}this.initializeVirtualization();const L=(Te=this.selectable)!=null&&Te.drag?"none":void 0;this.initColumns(this.$props.dataItems,F),this.columnResize.resizable=this.$props.resizable||!1,this.columnResize.columns=this.columnsRef,this.columnResize.columnsState=l.cloneArray(this.currentColumnsState||[]),this.dragLogic.columns=this.columnsRef;const K=this.$props.toolbar,G=this.$props.noRecords,H=this.columnsRef.filter(h=>h.children.length===0),_=k&&a.createVNode(ot.GroupPanel,{ref:h=>{this.groupPanelDivRef=h},group:r||[],ariaControls:this._gridRoleElementId,onGroupChange:this.groupChangeHandler,onPressHandler:this.dragLogic.pressHandler,onDragHandler:this.dragLogic.dragHandler,onReleaseHandler:this.dragLogic.releaseHandler,resolveTitle:this.resolveTitle},null),A=(this.dragLogic.reorderable||this.dragLogic.groupable)&&l.canUseDOM&&document&&document.body,B=[A&&a.createVNode(ut.DropClue,{ref:h=>{this.dropElementClueRef=h}},null),A&&a.createVNode(pt.DragClue,{ref:h=>{this.dragElementClueRef=h}},null)],q=this.showLicenseWatermark?a.createVNode(l.WatermarkOverlay,{message:this.licenseMessage},null):null,E=this.$attrs.style,Be=E&&l.isObject(E)&&E["width"]||"";this.tableWidth=parseFloat(Be.toString());const qe=H.findIndex(h=>typeof h.colSpan=="function")>-1;let O;O=this.getCellsToRender({},H);const P=H.map(function(h,v){return a.createVNode("col",{key:h.id||`col-${v}`,width:h.width!==void 0?Math.floor(parseFloat(h.width.toString())):void 0},null)},this),ae=a.createVNode(tt.Header,{size:this.$props.size,columnResize:this.columnResize,staticHeaders:this.$props.scrollable!=="none",ref:h=>{this.headerRef=h},onHeaderscroll:this.onHeaderScroll,headerRow:a.createVNode(st.HeaderRow,{grid:this,sort:e,groupable:this.$props.groupable,reorderable:this.$props.reorderable,sortable:this.$props.sortable,onSortChange:this.sortChangeHandler,filter:t,filterable:this.$props.filterable,filterOperators:this.$props.filterOperators||Ne.operators,onFilterChange:this.filterChangeHandler,columnMenu:this.$props.columnMenu,columnMenuIcon:this.$props.columnMenuIcon,columnMenuAnimate:this.$props.columnMenuAnimate,onSelectionchange:this.onHeaderSelectionChangeHandler,columns:this.columnsRef,cellsToRender:O,columnVirtualization:this.$props.columnVirtualization,columnsInitial:this.$props.columns,columnResize:this.columnResize,onPressHandler:this.dragLogic.pressHandler,onDragHandler:this.dragLogic.dragHandler,onReleaseHandler:this.dragLogic.releaseHandler,columnsMap:this._columnsMap,cellRender:this.$props.headerCellRender,cells:this.$props.cells,isRtl:this.isRtl,isColCountDefined:this.getAriaColCount!==void 0,headerSelectionValue:!!(i&&this.dataRef.filter(h=>h.rowType==="data").every(h=>i&&this.$props.dataItemKey&&l.getter(this.$props.dataItemKey)(h.dataItem)!==void 0?i[l.getter(this.$props.dataItemKey)(h.dataItem)]:void 0)),filterRow:this.$props.filterable&&a.createVNode(it.FilterRow,{grid:this,size:this.$props.size,columns:this.columnsRef,columnsMap:this._columnsMap,cellsToRender:O,columnVirtualization:this.$props.columnVirtualization,filter:t,filterOperators:this.$props.filterOperators||Ne.operators,onFilterchange:this.filterChangeHandler,sort:this.$props.sort,cellRender:this.$props.filterCellRender,cells:this.$props.cells,isRtl:this.isRtl,ariaRowIndex:this._columnsMap.length+1},null)||void 0},null),cols:P},null),le=this.columnsRef.some(h=>{var v;return!!(h.footerCell||(v=h.cells)!=null&&v.footerCell)})||(Me=this.$props.cells)!=null&&Me.footerCell?a.createVNode(nt.Footer,{size:this.$props.size,columnResize:this.columnResize,staticHeaders:this.$props.scrollable!=="none",ref:h=>{this.footerRef=h},row:a.createVNode(rt.FooterRow,{isRtl:this.isRtl,rowIndex:this.getAriaRowCount+1,columns:this.columnsRef,cells:this.$props.cells},null),cols:P},null):a.createVNode("span",null,null),V={leafColumns:H,cellsToRender:O,selectedField:this.$props.selectedField,dataItemKey:this.$props.dataItemKey,select:i,highlight:this.$props.highlight,editField:this.$props.editField,cellRender:this.$props.cellRender,cells:this.$props.cells,getCellsToRender:this.getCellsToRender,hasDynamicColSpan:qe,itemChange:this.itemChange,selectionChangeHandler:this.selectionChangeHandler,editHandler:this.editHandler,removeHandler:this.removeHandler,saveHandler:this.saveHandler,cancelHandler:this.cancelHandler,cellClickHandler:this.cellClickHandler,cellKeydownHandler:this.cellKeydownHandler,computedCollapsed:this.computedCollapsed,uniqueField:this.$props.uniqueField,columnsRef:this.columnsRef,isRtl:this.isRtl,idPrefix:w},Oe=function(h,v,y,Z,ee){return Ct.getRowContents(V,h,v,y,Z,ee)};let We=0,J=[];const Q=!this.dataRef.length,de=h=>h>=this.dataRef.length-We;let X=0;if(this.dataRef.length){const h=this._columnsMap.length+(this.$props.filterable?1:0)+1;let v=this.$props.skip||0,y=-1,Z=0;const ee=this.computedRowSpannable.enabled?{}:void 0;if(this.isVirtualScroll){if(M>0){const C=this.dataRef.slice(0,M).filter(z=>z.rowType==="data").length;y+=C,v+=M}!this.$props.pageable&&S&&(y+=this.$props.skip||0)}J=(R||this.dataRef).map(function(C,z){C.rowType==="data"&&y++;const te=C.dataIndex%2!==0,Ge=this.$props.dataItemKey&&l.getter(this.$props.dataItemKey)(C.dataItem),se=z+v,ie=Ge||"ai"+se,oe=ie+"_1",W=Oe.call(this,C,ie,y,te,ee),Qe=C.rowType==="data"?this.pinnedSourceSet.has(C.dataItem):!1,Xe=H.length-(this.detailExpandable.enabled?1:0)-((r==null?void 0:r.length)||0)||1;return X=se+h+Z,[a.createVNode(ft.GridRow,{key:ie,item:C,dataIndex:y,ariaRowIndex:X,absoluteRowIndex:se,isAltRow:te,isHidden:de(z),rowHeight:this.$props.rowHeight,isSelected:W.isSelected,isHighlighted:W.isHighlighted,isInEdit:W.isInEdit,rowType:C.rowType,onRowclick:D=>this.rowClick(D,C),onRowdblclick:D=>this.rowDoubleClick(D,C),render:this.$props.rowRender,class:this.$props.rowClass?this.$props.rowClass(C):"",isPinned:Qe,rows:this.$props.rows},{default:()=>[W.row]}),this.$props.detail&&C.rowType==="data"&&(C.expanded||C.dataItem.expanded)&&a.createVNode("tr",{key:oe,class:te?"k-table-row k-table-alt-row k-detail-row":"k-table-row k-detail-row",style:{visibility:de(z)?"hidden":"",height:this.$props.detailRowHeight+"px"},role:"row","aria-rowindex":X},[r==null?void 0:r.map(function(D){return a.createVNode(Ve.GridGroupCell,{id:"",dataIndex:C.dataIndex,field:D.field,dataItem:C.dataItem,key:`group-${D.field}-${C.dataIndex}`,locked:this.$props.lockGroups,group:C.group},null)},this),(this.$props.expandField||this.detailExpandable.enabled)&&a.createVNode(Ze.GridDetailHierarchyCell,{id:f.tableKeyboardNavigationTools.generateNavigatableId(`${oe}-dhcell`,w)},null),a.createVNode(et.GridDetailCell,{dataItem:C.dataItem,dataIndex:C.dataIndex,colSpan:Xe,ariaColIndex:2+(r?r.length:0),detail:this.$props.detail?this.$props.detail:void 0,id:f.tableKeyboardNavigationTools.generateNavigatableId(`${oe}-dcell`,w)},null)])]},this)}const Ue=this.$props.pageable&&a.createVNode(f.Pager,{class:"k-grid-pager",onPagesizechange:this.pageChangeHandler,onPagechange:this.pageChangeHandler,size:this.$props.size,total:b,skip:o||0,pageSize:(n!==void 0?n:this.$props.pageSize)||10,messagesMap:Ke.pagerMessagesMap,settings:f.normalize(this.$props.pageable||{})},null),he=l.getTemplate.call(this,{h:a.h,template:this.$props.pager,defaultRendering:Ue,additionalProps:{...this.$props,skip:this.$props.skip||0,messagesMap:Ke.pagerMessagesMap},additionalListeners:{pagesizechange:this.pageChangeHandler,pagechange:this.pageChangeHandler}}),je=h=>e&&e.filter(v=>v.field===h).length>0,ce=a.createVNode("colgroup",{ref:l.setRef(this,"colGroup")},[H.map(function(h,v){return a.createVNode("col",{key:h.id||`col-${v}`,class:je(h.field)?"k-sorted":void 0,width:h.width!==void 0?h.width.toString().indexOf("%")!==-1?h.width:Math.floor(parseFloat(h.width.toString()))+"px":void 0},null)},this)]),pe={height:this.getCorrectHeight,...this.$attrs.style},Je=a.createVNode("div",{class:"k-loading-mask"},[a.createVNode("div",{class:"k-loading-color"},null),a.createVNode("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},[a.createVNode(Ye.Loader,{size:"large",type:"converging-spinner"},null)])]),Y=this.$props.showLoader&&l.getTemplate.call(this,{h:a.h,template:this.$props.loader,defaultRendering:Je});return this.$props.scrollable==="none"?a.createVNode(a.Fragment,null,[a.createVNode(f.TableKeyboardNavigationProvider,{ref:"navRef",id:this._gridId,navigatable:this.$props.navigatable,scrollable:this.$props.scrollable,columnVirtualization:this.$props.columnVirtualization},{default:()=>[a.createVNode(Ee.GridNav,{ref:h=>{this.gridNavRef=h},columnsRef:this.columnsRef,dataRef:this.dataRef,id:this.$props.id,dir:this.$props.dir,style:pe,class:this.nonscrollableWrapperClass,onMovetonextpage:this.moveToNextPage,onMovetoprevpage:this.moveToPrevPage,onColumnreorder:this.columnReorder,onKeyboardselectionchange:this.onKeyboardSelectionChangeHandler,onNavigationaction:this.navigationActionHandler},{default:()=>[K,_,a.createVNode("div",{role:"grid",class:"k-grid-aria-root",id:this._gridRoleElementId,"aria-colcount":this.getAriaColCount,"aria-rowcount":this.getAriaRowCount},[a.createVNode(at.GridTable,{selectable:this.computedSelectable,class:"k-table",ref:l.setRef(this,"table")},{default:()=>[ce,ae,a.createVNode("tbody",{class:"k-table-tbody","data-keyboardnavbody":!0,ref:l.setRef(this,"tableBody")},[J,a.createTextVNode(" "),Y]),le]}),Q&&a.createVNode(Le.GridNoRecordsContainer,{id:f.tableKeyboardNavigationTools.generateNavigatableId("no-records",w)},{default:()=>[G.length?G:a.createVNode(Fe.GridNoRecords,null,null)]})]),he,Y,B]})]}),this.renderContextMenu()]):a.createVNode(a.Fragment,null,[a.createVNode(f.TableKeyboardNavigationProvider,{ref:"navRef",id:this._gridId,navigatable:this.$props.navigatable,scrollable:this.$props.scrollable,columnVirtualization:this.$props.columnVirtualization},{default:()=>[a.createVNode(Ee.GridNav,{ref:h=>{this.gridNavRef=h},dataRef:this.dataRef,id:this.$props.id,dir:this.$props.dir,style:pe,class:this.scrollableWrapperClass,onMovetonextpage:this.moveToNextPage,onMovetoprevpage:this.moveToPrevPage,onColumnreorder:this.columnReorder,onKeyboardselectionchange:this.onKeyboardSelectionChangeHandler,onSetcurrentontop:this.setCurrentOnTop,onNavigationaction:this.navigationActionHandler},{default:()=>[K,_,a.createVNode("div",{role:"grid",class:"k-grid-aria-root",id:this._gridRoleElementId,"aria-colcount":this.getAriaColCount,"aria-rowcount":this.getAriaRowCount},[ae,this.hasPinnedTopRows&&a.createVNode(Ae.PinnedRowsTable,{ref:l.setRef(this,"pinnedTop"),size:this.$props.size,cols:P,dataRowContext:V,position:"top",pinnedItems:this.sortedPinnedTopRows,rowHeight:this.$props.rowHeight,rows:this.$props.rows,selectable:this.computedSelectable},null),a.createVNode("div",{class:"k-grid-container",role:"presentation"},[m&&u&&a.createVNode(_e.StickyGroupTable,{ref:l.setRef(this,"stickyHeader"),size:this.$props.size,cols:P,dataRowContext:V,position:"top",groupLevelCount:g,rowHeight:this.$props.rowHeight},null),a.createVNode("div",{role:"presentation",ref:l.setRef(this,"scrollContainer"),class:"k-grid-content k-virtual-content",onScroll:this.scrollHandler},[a.createVNode("div",{class:"k-grid-table-wrap",role:"presentation"},[a.createVNode(lt.GridTableScrollable,{selectable:this.computedSelectable,tableClassName:this.gridTableClass,tableStyle:{userSelect:L},ref:l.setRef(this,"table")},{default:()=>[ce,a.createVNode("tbody",{class:"k-table-tbody",role:"rowgroup","data-keyboardnavbody":!0,ref:l.setRef(this,"tableBody")},[J])]}),Q&&a.createVNode(Le.GridNoRecordsContainer,{id:f.tableKeyboardNavigationTools.generateNavigatableId("no-records",w)},{default:()=>[G.length?G:a.createVNode(Fe.GridNoRecords,null,null)]})]),!Q&&a.createVNode("div",{class:"k-height-container",role:"presentation"},[a.createVNode("div",{ref:l.setRef(this,"scrollHeightContainer"),style:this.$props.scrollable==="virtual"?{height:this._containerHeightRef+"px"}:{}},null)])]),m&&p&&a.createVNode(_e.StickyGroupTable,{ref:l.setRef(this,"stickyFooter"),size:this.$props.size,cols:P,dataRowContext:V,position:"bottom",groupLevelCount:g,rowHeight:this.$props.rowHeight},null)]),this.hasPinnedBottomRows&&a.createVNode(Ae.PinnedRowsTable,{ref:l.setRef(this,"pinnedBottom"),size:this.$props.size,cols:P,dataRowContext:V,position:"bottom",pinnedItems:this.sortedPinnedBottomRows,rowHeight:this.$props.rowHeight,rows:this.$props.rows,selectable:this.computedSelectable},null),le,q]),he,Y,B]})]}),this.renderContextMenu(),this.$props.csv&&a.createVNode(vt.BaseCSVExport,{ref:h=>{this.csvExportRef=h},gridProps:this.$props,csv:this.$props.csv,fileName:typeof this.$props.csv=="object"?this.$props.csv.fileName:void 0,onCsvexport:this.$props.onCsvexport,columnsState:this.currentColumnsState},null)])}});exports.Grid=xt;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),l=require("@progress/kendo-vue-common"),f=require("@progress/kendo-vue-data-tools"),Ye=require("@progress/kendo-vue-indicators"),Ee=require("./GridNav.js"),Pe=require("./cells/GridSelectionCell.js"),De=require("./cells/GridHierarchyCell.js"),Ze=require("./cells/GridDetailHierarchyCell.js"),et=require("./cells/GridDetailCell.js"),tt=require("./header/Header.js"),st=require("./header/HeaderRow.js"),it=require("./header/FilterRow.js"),ot=require("./header/GroupPanel.js"),nt=require("./footer/Footer.js"),rt=require("./footer/FooterRow.js"),at=require("./components/table/GridTable.js"),lt=require("./components/table/GridTableScrollable.js"),Ne=require("./filterCommon.js"),dt=require("./VirtualScroll.js"),ht=require("./drag/ColumnResize.js"),ct=require("./drag/CommonDragLogic.js"),pt=require("./drag/DragClue.js"),ut=require("./drag/DropClue.js"),$=require("./utils/main.js"),Ve=require("./cells/GridGroupCell.js"),ft=require("./rows/GridRow.js"),gt=require("./common.js"),ze=require("./header/GridHeaderSelectionCell.js"),Fe=require("./components/noRecords/GridNoRecords.js"),Le=require("./components/noRecords/GridNoRecordsContainer.js"),ne=require("./package-metadata.js"),Ke=require("./messages/messagesMap.js"),re=require("@progress/kendo-data-query"),mt=require("./key.js"),Rt=require("./utils/virtualColumns.js"),_e=require("./components/StickyGroupTable.js"),Ct=require("./getRowContents.js"),bt=require("./hooks/useStickyGroups.js"),Ae=require("./components/PinnedRowsTable.js"),St=require("./cells/pincell/GridPinCell.js"),vt=require("./BaseCSVExport.js"),U=require("./contextMenu/GridContextMenu.js"),N=require("./contextMenu/enums.js"),xt=a.defineComponent({name:"KendoGrid",inheritAttrs:!1,props:{...gt.gridProps,toolbar:{type:Object},noRecords:{type:Object}},data(){return{isRtl:!1,context:void 0,navigation:void 0,showLicenseWatermark:!1,licenseMessage:void 0,notHiddenColumns:[],contextMenuState:{show:!1,offset:{left:0,top:0},dataItem:void 0,field:void 0}}},watch:{clipboard:function(e){e?this.clipboardServiceRef||(this.clipboardServiceRef=new f.ClipboardService(this.handleClipboardEvent),this.clipboardServiceRef.addEventListeners(document)):this.clipboardServiceRef&&(this.clipboardServiceRef.removeEventListeners(document),this.clipboardServiceRef=null)},rowHeight:function(e,t){var s;this.onRowHeightChanged(e,t),(s=this.vsRef)==null||s.reset()},scrollable:function(){var e;(e=this.vsRef)==null||e.reset()},filter:function(){var e;(e=this.vsRef)==null||e.reset()},group:function(){var e;(e=this.vsRef)==null||e.reset()},currentGroupable:function(){var e;(e=this.vsRef)==null||e.reset()},sort:function(){var e;(e=this.vsRef)==null||e.reset()}},created(){l.validatePackage(ne.packageMetadata),this.showLicenseWatermark=l.shouldShowValidationUI(ne.packageMetadata),this.licenseMessage=l.getLicenseMessage(ne.packageMetadata),this.initialHeight=null,this.columnsRef=[],this.dragLogic=new ct.CommonDragLogic(this.columnReorder.bind(this),this.groupReorder.bind(this),this.columnToGroup.bind(this)),this.columnResize=new ht.ColumnResize(this.onResize.bind(this)),this._columnsMap=[[]],this._header=null,this._footer=null,this.tableRef=null,this.scrollHeightContainerRef=null,this.forceUpdateTimeout=void 0,this._gridId=l.guid(),this._gridRoleElementId=l.guid(),this.slicedCurrentData=void 0,this._prevTotal=void 0,this._containerHeightRef=0,this._minRowHeightRef=0,this.wrapperScrollTopRef=0,this.scrollLeftRef=0,this.previousCopiedItems=[],this.clipboardServiceRef=null},mounted(){var t,s;this.setRefs();const e=l.isRtl(this._element);if(this._prevTotal=this.$props.total,this.isRtl=e,this.initialHeight=((s=(t=this._element)==null?void 0:t.style)==null?void 0:s.height)||null,this.resizeObserver=l.canUseDOM&&(window==null?void 0:window.ResizeObserver)&&new ResizeObserver(this.calculateMedia),document!=null&&document.body&&this.resizeObserver&&this.resizeObserver.observe(document.body),l.canUseDOM){const i={rootMargin:"0px",threshold:.9};this.observerRef=window.IntersectionObserver&&new window.IntersectionObserver(this.handleIntersection,i)||null}this.$props.clipboard&&(this.clipboardServiceRef=new f.ClipboardService(this.handleClipboardEvent),this.clipboardServiceRef.addEventListeners(document))},updated(){var s;this.setRefs();const e=l.isRtl(this._element);this.isRtl=e,this._prevTotal=this.$props.total,this.vsRef.tableTransform&&this.vsRef.table&&(this.vsRef.table.style.transform=this.vsRef.tableTransform,this.vsRef.tableTransform="");const t=this.updateStickyGroups();this.sticky.headerItems=t==null?void 0:t.stickyHeaderItems,this.sticky.footerItems=t==null?void 0:t.stickyFooterItems,this.isVirtualScroll&&(this.setContainerHeight(),this.setMinRowHeight(),(s=this.vsRef)==null||s.update())},unmounted(){this.gridUnmounted()},computed:{gridId(){return this.$props.id+"-role-element-id"},idPrefix(){return this.$props.navigatable?this.gridId:""},groupExpandable(){return f.getGroupExpandableOptions(typeof this.$props.groupable=="object"&&this.$props.groupable.enabled!==!1?this.$props.groupable.expandable:this.$props.groupable)},hierarchClass(){return l.uGrid.hierarchyCell({})},computedRowSpannable(){return $.getRowSpanOptions(this.$props.rowSpannable)},computedSelectable(){return f.getSelectionOptions(this.$props.selectable)},detailExpandable(){return f.getDetailExpandableOptions(!!this.$props.detail)},nonscrollableWrapperClass(){const{size:e}=this.$props,t=this.$attrs.class;return{"k-grid":!0,"k-grid-md":!e,[`k-grid-${l.kendoThemeMaps.sizeMap[e]||e}`]:e,[t]:!!t}},scrollableWrapperClass(){const{scrollable:e}=this.$props;return{...this.nonscrollableWrapperClass,"k-grid-virtual":e==="virtual"}},gridTableClass(){const{size:e}=this.$props;return{"k-table":!0,"k-grid-table":!0,"k-grid-md":!e,[`k-table-${l.kendoThemeMaps.sizeMap[e]||e}`]:e}},getCorrectHeight(){return this.$props.scrollable==="virtual"?this.initialHeight||"450px":null},currentGroupable(){var t;const e=(t=this.gridStateContext.group)==null?void 0:t.value;return this.$props.groupable===!0&&(e==null?void 0:e.length)||l.isObject(this.$props.groupable)&&this.$props.groupable.enabled!==!1},computedCollapsed(){let e=[];if(this.$props.group)for(let t=0;t<this.$props.group.length;t++)this.$props.collapsedGroups[t]?e.push(this.$props.collapsedGroups[t]):e.push([]);return e},getAriaRowCount(){var s,i;const e=this.$props.dataItems,t=this.$props.total||(e==null?void 0:e.total)||(e==null?void 0:e.length)||0;return this.$props.detail?this._columnsMap.length+(this.$props.filterable?1:0)+t*2+(this.columnsRef.some(o=>{var n;return!!(o.footerCell||(n=o.cells)!=null&&n.footerCell)})||(s=this.$props.cells)!=null&&s.footerCell?1:0):!this.$props.pageable&&this.$props.scrollable==="scrollable"?void 0:this.$props.groupable?-1:this._columnsMap.length+(this.$props.filterable?1:0)+t+(this.columnsRef.some(o=>{var n;return!!(o.footerCell||(n=o.cells)!=null&&n.footerCell)})||(i=this.$props.cells)!=null&&i.footerCell?1:0)},getAriaColCount(){const e=this.$props.columns,t=this.$props.columnVirtualization,s=(e==null?void 0:e.filter(i=>i.hidden!==void 0).length)!==0;if(t||s)return(e==null?void 0:e.length)!==0?e==null?void 0:e.length:-1},isVirtualScroll(){return this.$props.scrollable==="virtual"||this.$props.scrollable===void 0||!1},pinnedSourceSet(){var t,s;const e=new Set;return(t=this.gridStateContext.pinnedTopRows)!=null&&t.value&&this.gridStateContext.pinnedTopRows.value.forEach(i=>e.add(i)),(s=this.gridStateContext.pinnedBottomRows)!=null&&s.value&&this.gridStateContext.pinnedBottomRows.value.forEach(i=>e.add(i)),e},sortedPinnedTopRows(){var s,i;const e=((s=this.gridStateContext.pinnedTopRows)==null?void 0:s.value)||[],t=(i=this.gridStateContext.sort)==null?void 0:i.value;return this.autoProcessData&&(t!=null&&t.length)?re.orderBy([...e],t):e},sortedPinnedBottomRows(){var s,i;const e=((s=this.gridStateContext.pinnedBottomRows)==null?void 0:s.value)||[],t=(i=this.gridStateContext.sort)==null?void 0:i.value;return this.autoProcessData&&(t!=null&&t.length)?re.orderBy([...e],t):e},hasPinnedTopRows(){return this.$props.pinnable&&this.sortedPinnedTopRows.length>0},hasPinnedBottomRows(){return this.$props.pinnable&&this.sortedPinnedBottomRows.length>0},contextMenuColumn(){return this.columnsRef.find(e=>e.field===this.contextMenuState.field)},headMenuItems(){var t;const e=this.$props.sortable&&((t=this.contextMenuColumn)==null?void 0:t.sortable);return U.getDefaultHeadContextMenuItems({sortable:!!e,selectable:this.computedSelectable.enabled})},bodyMenuItems(){var e;return this.$props.sortable&&((e=this.contextMenuColumn)==null||e.sortable),U.getDefaultBodyContextMenuItems({selectable:this.computedSelectable.enabled,pinnable:!!this.$props.pinnable,clipboard:!!this.$props.clipboard})},contextMenuItems(){var s;const e=((s=this.contextMenuColumn)==null?void 0:s.contextMenu)||this.$props.contextMenu,t=typeof e=="function"?e(this.contextMenuState):e;if(t&&this.contextMenuState.offset){const i=this.contextMenuState.dataItem?N.GridContextMenuAnchorPart.body:N.GridContextMenuAnchorPart.head,o=t[i],n=this.contextMenuState.dataItem?this.bodyMenuItems:this.headMenuItems;let r;return o===!0||o===void 0?r=n:o!==!1&&(r=o),this.$props.pinnable&&r&&this.contextMenuState.dataItem?this.filterPinContextMenuItems(r):r}}},methods:{getCellPositionStyle(e,t){return e.left!==void 0?t?{left:e.right+"px",right:e.left+"px"}:{left:e.left+"px",right:e.right+"px"}:{}},handleContextMenuOpen(e,t,s){e.preventDefault(),this.contextMenuState={show:!0,offset:{left:e.pageX,top:e.pageY},dataItem:t,field:s}},handleContextMenuClose(){this.contextMenuState={show:!1,offset:{left:0,top:0},dataItem:void 0,field:void 0}},inActiveElement(){var o;if(!l.canUseDOM)return!1;const e=document==null?void 0:document.activeElement;let t=document==null?void 0:document.body;e!=null&&e.matches(".k-table-td")&&(t=e);const s=t==null?void 0:t.closest(".k-grid-container"),i=t&&((o=this._element)==null?void 0:o.contains(t));return!!(t&&i&&s)},handleClipboardEvent(e,t,s,i,o){var c,g,u;if(!this.inActiveElement()&&!s||!e)return;const n={type:e,nativeEvent:t,columns:this.columnsRef,dataItemKey:this.$props.dataItemKey||"",dataItem:i,field:o,...typeof this.$props.clipboard!="boolean"?this.$props.clipboard:{},...s},r=this.getLeafDataItems(),d=f.populateClipboardData({event:n,data:r,selectedState:(u=(g=this.$props.select)!=null?g:(c=this.gridStateContext.select)==null?void 0:c.value)!=null?u:{},previousCopiedItems:this.previousCopiedItems});e!==f.ClipboardActionType.paste&&(this.previousCopiedItems=d.copiedItems),l.hasListener.call(this,"clipboard")&&this.$emit("clipboard",{...n,...d})},handleContextMenuSelect(e){this.handleContextMenuItemClick({event:e,dataItem:this.contextMenuState.dataItem,field:this.contextMenuState.field})},renderContextMenu(){var e;return a.createVNode(U.GridContextMenu,{show:!!(this.contextMenuState.show&&((e=this.contextMenuItems)!=null&&e.length)),dataItem:this.contextMenuState.dataItem,field:this.contextMenuState.field,items:this.contextMenuItems,offset:this.contextMenuState.offset,onClose:this.handleContextMenuClose,onSelect:this.handleContextMenuSelect},null)},filterPinContextMenuItems(e){var c,g;const t=this.$props.dataItemKey||"",s=this.contextMenuState.dataItem,i=((c=this.gridStateContext.pinnedTopRows)==null?void 0:c.value)||[],o=((g=this.gridStateContext.pinnedBottomRows)==null?void 0:g.value)||[],n=t&&s?s[t]:void 0,r=n!==void 0&&i.some(u=>u[t]===n),d=n!==void 0&&o.some(u=>u[t]===n);return e.map(u=>{const p=typeof u=="string"?U.contextMenuItemsMap[u]:u;return(p==null?void 0:p.name)===N.GridContextMenuItemNames.pinRow&&p.items?{...p,items:p.items.filter(m=>m.name===N.GridContextMenuItemNames.pinTop?!r:m.name===N.GridContextMenuItemNames.pinBottom?!d:m.name===N.GridContextMenuItemNames.unpin?r||d:!0)}:u})},handleContextMenuItemClick(e){var i,o,n,r,d,c,g,u;const t=e.event.event.item,s={event:e.event,menuItem:t,dataItem:e.dataItem,field:e.field};switch(this.$emit("contextmenuitemclick",s),(i=t.data)==null?void 0:i.action){case"SortCommand":if(this.contextMenuColumn){const p=(o=t.name)==null?void 0:o.toLowerCase().includes("asc"),R=((n=t.name)==null?void 0:n.toLowerCase().includes("desc"))?"desc":void 0,x=p?"asc":R,b=t.name?x:void 0,I=(((r=this.gridStateContext.sort)==null?void 0:r.value)||[]).filter(k=>{var S;return k.field!==((S=this.contextMenuColumn)==null?void 0:S.field)});b&&((d=this.contextMenuColumn)!=null&&d.field)&&I.push({field:this.contextMenuColumn.field,dir:b}),this.sortChangeHandler(I,{event:e.event})}break;case"SelectRowCommand":{const p=e.dataItem;if(this.computedSelectable.enabled&&p&&this.$props.dataItemKey){const R=l.getter(this.$props.dataItemKey)(p),x=this.getLeafDataItems(),b=x.findIndex(T=>T[this.$props.dataItemKey]===p[this.$props.dataItemKey]),w=0,I=this.columnsRef.length-1,k={...this.getArguments(e.event),dataItem:p,startDataItem:b,endDataItem:b,startRowIndex:b,endRowIndex:b,startColIndex:w,endColIndex:I,dataItems:x,ctrlKey:!1,altKey:!1,metaKey:!1,shiftKey:!1,isDrag:!1,mode:this.computedSelectable.mode,cell:this.computedSelectable.cell,componentId:this.$props.id||this._gridId,selectedField:this.$props.selectedField||""},S=this.computedSelectable.mode==="multiple"?{...(g=(c=this.gridStateContext.select)==null?void 0:c.value)!=null?g:{}}:{};S[R]===!0||Array.isArray(S[R])&&S[R].length===this.columnsRef.length?delete S[R]:S[R]=this.computedSelectable.cell?[...Array(this.columnsRef.length).keys()]:!0,this.raiseSelectionEvent(k,S)}break}case"SelectAllRowsCommand":{if(this.computedSelectable.enabled&&this.$props.dataItemKey){const p=this.getLeafDataItems(),m={},R=p[0],x=p[p.length-1];p.forEach(b=>{const w=l.getter(this.$props.dataItemKey)(b);m[w]=this.computedSelectable.cell?[...Array(this.columnsRef.length).keys()]:!0}),this.raiseSelectionEvent({...this.getArguments(e.event),dataItems:p,dataItem:R,startDataItem:R,endDataItem:x,startRowIndex:0,endRowIndex:p.length-1,startColIndex:0,endColIndex:this.columnsRef.length-1,ctrlKey:!1,altKey:!1,metaKey:!1,shiftKey:!1,isDrag:!1,mode:this.computedSelectable.mode,cell:this.computedSelectable.cell,componentId:this.$props.id||this._gridId,selectedField:this.$props.selectedField||""},m)}break}case"ClearSelectionCommand":this.computedSelectable.enabled&&this.clearSelection({...this.getArguments(e.event),dataItems:this.getLeafDataItems(),startRowIndex:-1,endRowIndex:-1,startColIndex:-1,endColIndex:-1,ctrlKey:!1,altKey:!1,metaKey:!1,shiftKey:!1,isDrag:!1,mode:this.computedSelectable.mode,cell:this.computedSelectable.cell,componentId:this.$props.id||this._gridId,selectedField:this.$props.selectedField||""});break;case"PinTopCommand":this.handleRowPin("pinTop",e.dataItem);break;case"PinBottomCommand":this.handleRowPin("pinBottom",e.dataItem);break;case"UnpinCommand":this.handleRowPin("unpin",e.dataItem);break;case"CopySelectionCommand":this.handleClipboardEvent(f.ClipboardActionType.copy,e.event.nativeEvent,{copyHeaders:!((u=t.name)!=null&&u.toLowerCase().includes("noheaders"))},e.dataItem,e.field);break;case"PasteCommand":this.handleClipboardEvent(f.ClipboardActionType.paste,e.event.nativeEvent,{},e.dataItem,e.field);break}this.handleContextMenuClose()},triggerCellContextMenu(e,t,s){this.$emit("contextmenu",{dataItem:t,field:s,event:e}),this.$props.contextMenu&&this.handleContextMenuOpen(e,t,s)},handleIntersection(e){const t={rowIndex:this.rowIndexRef.value};e.forEach(s=>{s.boundingClientRect.height!==s.intersectionRect.height&&this.setCurrentOnTop(t)})},scrollIntoView(e){var i;if(!((i=this.vsRef)!=null&&i.container)||this.$props.scrollable==="none")return;const{rowIndex:t}=e;this.rowIndexRef.value=t;const s=this._element;if(this.observerRef&&s){this.observerRef.disconnect();const o=s.querySelector(`[absolute-row-index="${this.rowIndexRef.value}"]`);o?this.observerRef.observe(o):this.setCurrentOnTop(e)}},setCurrentOnTop(e){var i,o;if(!((i=this.vsRef)!=null&&i.container)||this.$props.scrollable==="none")return;this.observerRef&&this.observerRef.disconnect();const{rowIndex:t}=e,s=this._element;if(this.isVirtualScroll){const n=((o=this.vsRef.rowHeightService)==null?void 0:o.offset(t))||0;this.vsRef.container.scroll(0,n)}else if(s){const n=t<1?s.querySelector("tbody > tr:nth-child(1)"):s.querySelector(`tbody > tr:nth-child(${t+1})`);n&&this.containerElementRef&&(this.containerElementRef.scrollTop=n.offsetTop)}},getTotal(){let e=this.$props.total||0;return Array.isArray(this.$props.dataItems)?e=e||this.$props.dataItems.length:this.$props.dataItems&&(e=e||this.$props.dataItems.total),e},exportAsCsv(){this.csvExportRef&&this.csvExportRef.save()},getCsvBlob(){return this.csvExportRef?this.csvExportRef.getBlob():null},readColumnElements(){return $.readColumns(this.$props.columns,this.currentColumnsState,{prevId:0,idPrefix:this.idPrefix})},getResolvedFlatColumnsState(){const e=[],t=(s,i)=>s==null?void 0:s.forEach(o=>{const n=o.hidden||i;e.push({...o,hidden:n}),t(o.children,n)});return t(this.currentColumnsState,!1),e},filterColumns(e){const t=this.getResolvedFlatColumnsState();return[e.filter(s=>{var i;return!s.hidden&&!((i=t.find(o=>o.id===s.id))!=null&&i.hidden)}),e.filter(s=>{var i;return s.hidden||((i=t.find(o=>o.id===s.id))==null?void 0:i.hidden)})]},getFlatData(e,t,s,i,o,n,r){const d=[],c=$.flatData(d,e,t,{index:s},i!==void 0,o,n,this.groupExpandable.defaultExpand,r,this.$props.expandField);return{flattedData:d,resolvedGroupsCount:c}},getColumnsEssentialProps(e){return e&&JSON.stringify(e.map(t=>({id:t.id,field:t.field,title:t.title,children:t.children})))},calculateMedia(){const e=this.filterHiddenColumns(this.$props.columns||[]);this.getColumnsEssentialProps(this.notHiddenColumns)!==this.getColumnsEssentialProps(e)&&this.$forceUpdate()},filterHiddenColumns(e){if(!e||e.length===0)return e;const t=s=>({...s,children:s.children&&s.children.length>0?this.filterHiddenColumns(s.children):s.children});return[...e].filter(s=>!s.hidden).filter(s=>l.canUseDOM&&s&&s.media?window.matchMedia(s.media).matches:s).map(s=>t(s))},getColumns(){const e=this.columnsRef.filter(s=>s.declarationIndex>=0&&s.parentIndex===-1),t=s=>(s.sort((i,o)=>i.declarationIndex-o.declarationIndex),s.map(i=>{const{declarationIndex:o,parentIndex:n,depth:r,colSpan:d,rowSpan:c,index:g,kFirst:u,children:p,...m}=i;return p.length?{children:t(p),...m}:m}));return t(e)},setRefs(){var n,r,d,c;let e="$el";const t=l.getRef(this,"gridNav");t&&(this._element=t[e]);const s=l.getRef(this,"groupPanelDiv");if(s){let g=s[e]||null;this.dragLogic.refGroupPanelDiv(g)}this.stickyHeaderRef=l.getRef(this,"stickyHeader"),this.stickyFooterRef=l.getRef(this,"stickyFooter"),this.pinnedTopRef=l.getRef(this,"pinnedTop"),this.pinnedBottomRef=l.getRef(this,"pinnedBottom");const i=l.getRef(this,"dropElementClue"),o=l.getRef(this,"dragElementClue");this.dragLogic.refDropElementClue(i),this.dragLogic.refDragElementClue(o),this.columnResize.colGroupMain=l.getRef(this,"colGroup"),this.columnResize.colGroupStickyHeader=(n=this.stickyHeaderRef)==null?void 0:n.colGroupRef,this.columnResize.colGroupStickyFooter=(r=this.stickyFooterRef)==null?void 0:r.colGroupRef,this.columnResize.colGroupPinnedTop=(d=this.pinnedTopRef)==null?void 0:d.colGroupRef,this.columnResize.colGroupPinnedBottom=(c=this.pinnedBottomRef)==null?void 0:c.colGroupRef,this._header=l.getRef(this,"header"),this._footer=l.getRef(this,"footer"),this.resetTableWidth(),l.setScrollbarWidth()},gridUnmounted(){clearTimeout(this.forceUpdateTimeout),this.columnResize.columns=[],this.dragLogic.columns=[],this.dragLogic&&this.dragLogic.dragElementClue&&(this.dragLogic.dragElementClue.$el.remove(),this.dragLogic.dropElementClue.$el.remove()),this.dataRef=[],this.columnsRef=[],document!=null&&document.body&&this.resizeObserver&&this.resizeObserver.disconnect(),this.observerRef&&(this.observerRef.disconnect(),this.observerRef=null),this.clipboardServiceRef&&(this.clipboardServiceRef.removeEventListeners(document),this.clipboardServiceRef=null)},isAllData(){const{dataItems:e,total:t}=this.$props;return Array.isArray(e)?e.length===t:e?t===e.total:!1},resetVirtualSkip(){this.isVirtualScroll&&this.virtualSkipRef&&(this.virtualSkipRef=0)},virtualPageChange(e,t){var i;const s=(i=this.gridStateContext.group)==null?void 0:i.value;this.$props.pageable||s!=null&&s.length?(this.virtualSkipRef=e.skip,this.$forceUpdate()):this.pageChangeHandler(e,t)},initializeVirtualization(){const e=this.vsRef,t=this.$props.rowHeight||this._minRowHeightRef||0;this.tableBodyRef=l.getRef(this,"tableBody"),this.scrollTableRef=l.getComponentElementRef(this,"table"),e&&(e.fixedScroll=this.$props.fixedScroll||!1,e.PageChange=this.virtualPageChange,e.pageSize=this._virtualPageSize,e.scrollableVirtual=this.isVirtualScroll,this.scrollContainerRef=e.container=l.getRef(this,"scrollContainer"),e.tableBody=this.tableBodyRef,e.scrollHeightContainer=l.getRef(this,"scrollHeightContainer"),e.table=this.scrollTableRef,(!e.rowHeightService||e.total!==this._virtualTotal)&&t&&(e.total=this._virtualTotal,e.rowHeightService=new l.RowHeightService(this._virtualTotal,t)))},setContainerHeight(){const e=l.getRef(this,"scrollContainer");this._containerHeightRef=(e==null?void 0:e.offsetHeight)||0},setMinRowHeight(){if(!this._minRowHeightRef&&!this.$props.rowHeight){const t=$.calcRowHeight(l.getRef(this,"tableBody"));t&&(this._minRowHeightRef=t,this.$forceUpdate())}},onRowHeightChanged(e,t){this.setRefs()},onHeaderScroll(e){const s=e.target.scrollLeft,i=l.getRef(this,"scrollContainer");i&&(i.scrollLeft=s),this.scrollLeftRef=s},scrollHandler(e){clearTimeout(this.forceUpdateTimeout);const t=e.currentTarget.scrollLeft,s=e.currentTarget.scrollTop;this.$props.columnVirtualization&&(!this.isVirtualScroll||s===this.wrapperScrollTopRef)&&(this.forceUpdateTimeout=setTimeout(()=>{this.$forceUpdate()},0)),this.scrollLeftRef=t,this._header&&this._header.setScrollLeft(e.currentTarget.scrollLeft),this._footer&&this._footer.setScrollLeft(e.currentTarget.scrollLeft),this.stickyHeaderRef&&this.stickyHeaderRef.setScrollLeft(e.currentTarget.scrollLeft),this.stickyFooterRef&&this.stickyFooterRef.setScrollLeft(e.currentTarget.scrollLeft),this.pinnedTopRef&&this.pinnedTopRef.setScrollLeft(t),this.pinnedBottomRef&&this.pinnedBottomRef.setScrollLeft(t),this.vsRef&&s!==this.wrapperScrollTopRef&&this.vsRef.scrollHandler(e);const i=this.virtualSkipRef;this.vsRef&&s!==this.wrapperScrollTopRef&&this.vsRef.scrollHandler(e);const o=this.isVirtualScroll&&this.virtualSkipRef!==i;if(this.$emit("scroll",e),this.wrapperScrollTopRef=s,!o){const n=this.updateStickyGroups();this.sticky.headerItems=n==null?void 0:n.stickyHeaderItems,this.sticky.footerItems=n==null?void 0:n.stickyFooterItems}},rowClick(e,t){e.target.type!=="checkbox"&&this.$emit("rowclick",{dataItem:t.dataItem,...this.getArguments(e)})},rowDoubleClick(e,t){e.target.type!=="checkbox"&&this.$emit("rowdblclick",{dataItem:t.dataItem,...this.getArguments(e)})},loopGroupedItems(e,t,s=0,i=null){return e.forEach(o=>{!i&&t(o,s)&&(i=o),o.items&&o.items.length&&!i&&(i=this.loopGroupedItems(o.items,t,s+1,i))}),i},updateGroupCollapsed(e){let t=this.computedCollapsed,s=t[e.level];const i=this.$props.uniqueField,o=function(d,c){return d.value===e.dataItem.value&&c===e.level},n=this.allGroupedItems?this.loopGroupedItems(this.allGroupedItems.data,o,0,null):e.dataItem,r=$.groupedFirstItemValue(n||e.dataItem,i);if(e.value){if(s&&s.length){const d=s.indexOf(r);d>-1&&s.splice(d,1)}}else s?s.includes(r)||s.push(r):s=[r];return t},itemChange(e){var i;const t=l.hasListener.call(this,"itemchange"),s=(i=this.gridStateContext.group)==null?void 0:i.value;if(e.field===this.$props.expandField||(s||this.$props.detail)&&e.field===void 0){l.hasListener.call(this,"expandchange")&&e.dataItem&&this.$emit("expandchange",{...this.getArguments(e.event),collapsedGroups:this.updateGroupCollapsed(e),dataItem:e.dataItem,value:e.value});return}t&&this.$emit("itemchange",{...this.getArguments(e.event),dataItem:e.dataItem,field:e.field,value:e.value})},cellClickHandler(e){this.$emit("cellclick",{dataItem:e.dataItem,field:e.field})},cellKeydownHandler(e){this.$emit("cellkeydown",e)},navigationActionHandler(e){this.$emit("navigationaction",e)},editHandler(e){this.$emit("edit",{dataItem:e})},removeHandler(e){this.$emit("remove",{dataItem:e})},saveHandler(e){this.$emit("save",{dataItem:e})},cancelHandler(e){this.$emit("cancel",{dataItem:e})},selectionChangeHandler(e){var t,s,i;if(this.computedSelectable.enabled){const{event:o,dataItem:n,dataIndex:r,columnIndex:d}=e,c={...this.getArguments(o),dataItem:n,startColIndex:d,endColIndex:d,startRowIndex:r,endRowIndex:r,dataItems:this.getLeafDataItems(),altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,mode:this.computedSelectable.mode,cell:this.computedSelectable.cell,isDrag:!1,componentId:this.$props.id||this._gridId,selectedField:this.$props.selectedField||""};this.gridStateContext.selectionchange({...c,select:this.$props.dataItemKey?f.getSelectedState({event:c,selectedState:(i=(s=this.$props.select)!=null?s:(t=this.gridStateContext.select)==null?void 0:t.value)!=null?i:{},dataItemKey:this.$props.dataItemKey}):{}})}},onKeyboardSelectionChangeHandler(e){var g,u;if(!this.computedSelectable.enabled||!this.$props.dataItemKey)return;const t=(g=this.gridStateContext.select)==null?void 0:g.value,s={dataItems:this.getLeafDataItems(),mode:this.computedSelectable.mode,cell:this.computedSelectable.cell,componentId:this.$props.id,selectedField:"",...this.getArguments(e)},i=f.getSelectedStateFromKeyDown({event:s,selectedState:t!=null?t:{},dataItemKey:this.$props.dataItemKey});if(i===t)return;const o=e.target,n=f.closestTagName(o,"TD"),r=f.closestTagName(o,"TR"),d=f.getColumnIndex(n),c=f.getRowIndex(r);if(d!==void 0&&c!==void 0){const p=(u=$.getDataAsArray(this.$props.dataItems))==null?void 0:u[c];this.gridStateContext.selectionchange({...s,select:i,dataItem:p,startRowIndex:c,startColIndex:d,startDataItem:p,endDataItem:p,endRowIndex:c,endColIndex:d,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey,isDrag:!1})}},onHeaderSelectionChangeHandler(e){if(this.computedSelectable.enabled){const t=this.getLeafDataItems();this.gridStateContext.headerselectionchange({select:e.event.target.checked?t.reduce((s,i)=>(this.$props.dataItemKey&&l.getter(this.$props.dataItemKey)(i)!==void 0&&(s[l.getter(this.$props.dataItemKey)(i)]=!0),s),{}):{},field:e.field,event:e.event,target:this,dataItems:t})}},selectionRelease(e){var t,s,i;if(this.computedSelectable.enabled){const o=this.getLeafDataItems(),n=o[e.startRowIndex],r=o[e.endRowIndex],d={event:void 0,target:this,selectedField:"",componentId:this.$props.id||this._gridId,dataItems:o,dataItem:null,startDataItem:n,endDataItem:r,...e},c=f.getSelectedState({event:d,selectedState:(i=(s=this.$props.select)!=null?s:(t=this.gridStateContext.select)==null?void 0:t.value)!=null?i:{},dataItemKey:this.$props.dataItemKey});this.raiseSelectionEvent(d,c)}},clearSelection(e){this.computedSelectable.enabled&&this.raiseSelectionEvent(e,{})},raiseSelectionEvent(e,t){this.computedSelectable.enabled&&this.gridStateContext.selectionchange({...e,select:t})},moveToNextPage(e){var o,n,r,d;const t=(r=(n=(o=this.gridStateContext.take)==null?void 0:o.value)!=null?n:this.$props.pageSize)!=null?r:0,s=(((d=this.gridStateContext.skip)==null?void 0:d.value)||0)+t,i=this.getTotal();s<i&&this.pageChangeHandler({skip:s,take:t},e)},moveToPrevPage(e){var i,o,n,r;const t=(n=(o=(i=this.gridStateContext.take)==null?void 0:i.value)!=null?o:this.$props.pageSize)!=null?n:0,s=(((r=this.gridStateContext.skip)==null?void 0:r.value)||0)-t;s>=0&&this.pageChangeHandler({skip:s,take:t},e)},pageChangeHandler(e,t){this.raiseDataEvent("pagechange",{page:e,event:t},{skip:e.skip,take:e.take},t)},sortChangeHandler(e,t){this.raiseDataEvent("sortchange",{sort:e},{sort:e},t)},filterChangeHandler(e,t){this.raiseDataEvent("filterchange",{filter:e},{filter:e,skip:0},t)},groupChangeHandler(e,t){this.raiseDataEvent("groupchange",{group:e},{group:e,skip:0},t)},handleDetailExpandAction(e,t){var s;if(this.detailExpandable.enabled){const i=(s=this.gridStateContext.detailExpand)==null?void 0:s.value,o=f.detailExpandReducer(i!=null?i:{},e);this.gridStateContext.detailexpandchange({...this.getArguments(t),detailExpand:o})}},handleGroupExpandAction(e,t){var s;if(this.groupExpandable.enabled){const i=(s=this.gridStateContext.groupExpand)==null?void 0:s.value,o=f.groupExpandReducer(i!=null?i:[],e,this.groupExpandable);this.$props.expandField||this.gridStateContext.groupexpandchange({...this.getArguments(t),groupExpand:o})}this.scrollToStickyGroup(e.group)},raiseDataEvent(e,t,s,i){if(this.resetVirtualSkip(),this.$props.autoProcessData)this.gridStateContext[e]({...this.getArguments(i),...t});else if(l.hasListener.call(this,e))this.$emit(e,{...this.getArguments(i),...t});else if(l.hasListener.call(this,"datastatechange")){const o={...this.getDataState(),...s};this.gridStateContext.datastatechange({...this.getArguments(i),data:o,dataState:o})}},columnReorder(e,t,s){const i=this.columnsRef[e],o=$.getFlatColumnsState(this.currentColumnsState),n=i.depth,r=u=>{do u++;while(u<this.columnsRef.length&&this.columnsRef[u].depth>n);return u},d=this.columnsRef.splice(e,r(e)-e);this.columnsRef.splice(e<t?r(t-d.length):t,0,...d),this.columnsRef.filter(u=>u.declarationIndex>=0).forEach((u,p)=>{u.orderIndex=p;const m=o.find(R=>R.id===u.id);m&&(m.orderIndex=p)});const c=this.columnsRef[e].locked&&this.columnsRef[t].locked;f.updateLeft(this._columnsMap,this.columnsRef,c||this.shouldUpdateLeftRightRef),f.updateRight(this._columnsMap,this.columnsRef,c||this.shouldUpdateLeftRightRef),this.resizedRef&&(this.shouldUpdateLeftRightRef=!1,this.resizedRef=!1);const g=this.getColumns();this.$emit("columnreorder",{target:this,columns:g,event:s,prev:e,next:t}),this.gridStateContext.columnsstatechange({columnsState:this.currentColumnsState})},groupReorder(e,t,s){var o;const i=(o=this.gridStateContext.group)==null?void 0:o.value;i!==void 0&&(i.splice(t,0,...i.splice(e,1)),this.groupChangeHandler(i,s))},columnToGroup(e,t,s){var n;const i=this.columnsRef[e].field;if(!i)return;const o=(((n=this.gridStateContext.group)==null?void 0:n.value)||[]).slice();o.splice(t,0,{field:i}),this.groupChangeHandler(o,s)},resetTableWidth(){var i;let e=0;if(!this.columnResize.colGroupMain)return;const t=(i=this.columnResize.colGroupMain)==null?void 0:i.children;for(let o=0;o<t.length;o++){const n=t[o].width;if(!n)return;e+=parseFloat(n.toString())}e=Math.round(e),this._header&&this._header.setWidth(e),this._footer&&this._footer.setWidth(e),this.stickyHeaderRef&&this.stickyHeaderRef.setWidth(e),this.stickyFooterRef&&this.stickyFooterRef.setWidth(e),this.pinnedTopRef&&this.pinnedTopRef.setWidth(e),this.pinnedBottomRef&&this.pinnedBottomRef.setWidth(e);const s=l.getComponentElementRef(this,"table");s&&e&&(s.style.width=e+"px"),this.stickyFooterRef&&this.setStickyFooterOffset()},setStickyFooterOffset(){const e=this.containerElementRef,t=e?e.scrollWidth>e.clientWidth:!1;this.stickyFooterRef&&(this.stickyFooterRef.$el.style.marginBlockEnd=t?"var(--kendo-scrollbar-width, 0px)":"")},onResize(e,t,s,i,o,n,r){this.resetTableWidth(),this.shouldUpdateLeftRightRef=!0,this.resizedRef=!0,this.$emit("columnresize",{columns:this.getColumns(),index:e,targetColumnId:r,event:i,newWidth:t,oldWidth:s,end:o,target:this}),o&&this.gridStateContext.columnsstatechange({columnsState:n})},initColumnsState(e,t){const s=i=>{var n;const o=t.find(r=>r.id===i.id);if(o){const r={...o};return r.children=(n=i.children)==null?void 0:n.map(s),r}return i};this.currentColumnsState=e.filter(i=>i.parentIndex===-1).map(s)},configureColumns(e,t){e.filter(n=>n.columnType==="checkbox").forEach(n=>{n.width=n.width||"50px",n.defaultCell=a.markRaw(Pe.GridSelectionCell),n.defaultHeaderCell=a.markRaw(ze.GridHeaderSelectionCell),n._type="edit",n.columnMenu=!1}),this.$props.selectedField&&this.columnsRef.filter(n=>n.field===this.$props.selectedField).forEach(n=>{n.width=n.width||"50px",n.defaultCell=a.markRaw(Pe.GridSelectionCell),n.defaultHeaderCell=a.markRaw(ze.GridHeaderSelectionCell),n.columnMenu=!1}),this.$props.pinnable&&e.filter(n=>n.columnType==="pin").forEach(n=>{n.width=n.width||"48px",n.defaultCell=a.markRaw(St.GridPinCell),n.defaultHeaderCell=a.markRaw(f.HeaderCell),n.sortable=!1,n.filterable=!1,n.editable=!1});const s=$.getFlatColumnsState(this.currentColumnsState);this.initColumnsState(e,s);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(this.detailExpandable.enabled&&this.$props.detail&&!this.$props.expandField){const n={...i,_type:"expand",id:f.tableKeyboardNavigationTools.generateNavigatableId(`${o++}`,"expand","column"),defaultCell:a.markRaw(De.GridHierarchyCell),field:this.detailExpandable.column,headerClassName:this.hierarchClass};e.unshift(n),this.currentColumnsState.unshift(s.find(r=>r.id===n.id)||n)}this.$props.expandField&&l.hasListener.call(this,"expandchange")&&this.$props.detail&&(e.unshift({...i,defaultCell:a.markRaw(De.GridHierarchyCell),field:this.$props.expandField,headerClassName:"k-hierarchy-cell k-header",id:f.tableKeyboardNavigationTools.generateNavigatableId(`${e.length}`,this.idPrefix,"column"),...this.expandColumn}),o++);for(let n=0;n<t;n++){const r={...i,isAccessible:!1,defaultCell:a.markRaw(Ve.GridGroupCell),id:f.tableKeyboardNavigationTools.generateNavigatableId(`${o++}`,"group","column"),field:"value",locked:this.$props.lockGroups,columnMenu:!1};e.unshift(r),this.currentColumnsState.unshift(s.find(d=>d.id===r.id)||r)}e.slice(o).forEach(n=>{n.parentIndex>=0&&(n.parentIndex+=o),n.rowSpannable=n.rowSpannable!==void 0?$.getRowSpanOptions(n.rowSpannable):this.computedRowSpannable})},initColumns(e,t){var n;this.columnsRef=this.readColumnElements();const s=(n=this.gridStateContext.group)==null?void 0:n.value;this.columnsRef.filter(r=>!r.hidden).length===0&&(this.columnsRef=$.autoGenerateColumns(e,s,{column:this.$props.expandField?this.$props.expandField:this.groupExpandable.column},{prevId:0,idPrefix:this.idPrefix})),this.configureColumns(this.columnsRef,t);const[i,o]=this.filterColumns(this.columnsRef);this.columnsRef=i,this.hiddenColumnsRef=o,this._columnsMap=$.mapColumns(this.columnsRef,!0)},resolveTitle(e){const t=this.findColumnByField(e),s=t&&(t.title||t.field);return s===void 0?e:s},findColumnByField(e){let t;return this.$props.columns.forEach(s=>{const i=this.searchColumn(s,e);i&&(t=i)}),t},searchColumn(e,t){if(e.field===t)return e;if(e.children){let s,i=null;for(s=0;i==null&&s<e.children.length;s++)i=this.searchColumn(e.children[s],t);return i}return null},getDataState(){var n,r,d,c,g;const e=(n=this.gridStateContext.sort)==null?void 0:n.value,t=(r=this.gridStateContext.filter)==null?void 0:r.value,s=(d=this.gridStateContext.skip)==null?void 0:d.value,i=(c=this.gridStateContext.take)==null?void 0:c.value,o=(g=this.gridStateContext.group)==null?void 0:g.value;return{filter:t,sort:e,skip:s,take:i!==void 0?i:this.$props.pageSize,group:o}},getArguments(e){return{event:e,target:this}},getLeafDataItems(){return this.dataRef.filter(e=>e.rowType==="data").map(e=>e.dataItem)},totalGroupedRows(e){let t=0;return e&&(t=this.addSubItems(e,t)),t},addSubItems(e,t){return e.forEach(s=>{t++,s.expanded!==!1&&s.items&&(t=this.addSubItems(s.items,t)),this.group&&this.group.length&&(this.$props.groupable.footer==="always"||s.expanded!==!1&&s.items&&this.$props.groupable.footer==="visible")&&t++}),t},searchChange(e){const t=this.$props.searchFields||this.columnsRef.map(o=>o.field)||[],s=e.event.target.value,i={logic:"or",filters:t.filter(o=>o!==void 0).map(o=>{var n;return typeof o=="string"?{field:o,value:s,operator:"contains"}:{value:s,operator:(n=o.operator)!=null?n:"contains",field:o.field,ignoreCase:o.ignoreCase}})};this.raiseDataEvent("searchchange",{search:i},{skip:0},e)},getCellsToRender(e,t){var n;const s=[];let i=null,o=0;if(t.forEach((r,d)=>{const c=parseFloat((r.width||"").toString())||10;if(o){o--,i&&(i.width+=c);return}const g=Math.min($.getColSpan(r,e),t.length-d);o=g-1,i={width:c,colSpan:g,columnIndex:d},s.push(i)}),this.$props.columnVirtualization){const r=this.scrollLeftRef||0,d=this.tableWidth||parseFloat((((n=this.$attrs.style)==null?void 0:n.width)||"").toString());return Rt.getVirtualCellsToRender({cellModels:s,columns:t,tableViewPortWidth:d,scrollLeft:r})}return s},calcVirtualPageSize(){const{pageable:e,take:t,pageSize:s}=this.$props;if(!this.isVirtualScroll)return 0;if(!e){if(t)return t;if(s)return s}const i=this.$props.rowHeight||this._minRowHeightRef,o=this._containerHeightRef;return o&&i?Math.ceil(o/i*1.5):0},getRowPinPosition(e){var n,r;const{dataItemKey:t=""}=this.$props,s=((n=this.gridStateContext.pinnedTopRows)==null?void 0:n.value)||[],i=((r=this.gridStateContext.pinnedBottomRows)==null?void 0:r.value)||[];if(!t||!e)return"none";const o=e[t];return s!=null&&s.some(d=>d[t]===o)?"top":i!=null&&i.some(d=>d[t]===o)?"bottom":"none"},handleRowPin(e,t){var g,u,p,m;if(!this.$props.pinnable)return;const{dataItemKey:s=""}=this.$props,i=((g=this.gridStateContext.pinnedTopRows)==null?void 0:g.value)||[],o=((u=this.gridStateContext.pinnedBottomRows)==null?void 0:u.value)||[],n=t[s],r=i.filter(R=>R[s]!==n),d=o.filter(R=>R[s]!==n);let c;switch(e){case"pinTop":c={pinnedTopRows:[...r,t],pinnedBottomRows:d,dataItem:t};break;case"pinBottom":c={pinnedTopRows:r,pinnedBottomRows:[...d,t],dataItem:t};break;case"unpin":c={pinnedTopRows:r,pinnedBottomRows:d,dataItem:t};break;default:return}(m=(p=this.gridStateContext).rowpinchange)==null||m.call(p,c)},pinnedSelectionRelease(e,t){const s=this.$props.dataItemKey;if(!s||!t)return;const i=l.getter(s),o=this.getLeafDataItems().findIndex(n=>i(n)===i(t));o!==-1&&this.selectionRelease({...e,startRowIndex:o,endRowIndex:o})}},provide(){return{gridContext:{dataItemKey:this.$props.dataItemKey,searchChange:this.searchChange,selectionRelease:this.selectionRelease,pinnedSelectionRelease:this.pinnedSelectionRelease,dispatchGroupExpand:this.handleGroupExpandAction,dispatchDetailExpand:this.handleDetailExpandAction,scrollToStickyGroup:this.scrollToStickyGroup,getCellPositionStyle:this.getCellPositionStyle,onRowPin:this.handleRowPin,getRowPinPosition:this.getRowPinPosition,onContextMenu:this.triggerCellContextMenu,exportAsCsv:this.exportAsCsv},sticky:this.sticky}},setup(e){const t=a.ref(null),s=a.ref(null),i=a.ref(null),o=a.ref(null),n=a.ref(null),r=a.ref(null),d=a.ref(null),c=a.ref([]),g=a.ref([]),u=a.ref(null),p=a.ref(null),m=a.ref(null),R=a.ref(null),x=a.ref(null),b=a.ref(null),w=a.ref(null),I=a.ref(!0),k=a.ref(!1),S=new dt.VirtualScroll,T=a.ref(0),F=a.inject(mt.KendoKey,{}),j=typeof e.groupable=="object"&&!!e.groupable.stickyHeaders,M=typeof e.groupable=="object"&&!!e.groupable.stickyFooters,L=a.ref([]),K=a.computed(()=>{var q,E;return!!((E=(q=F.group)==null?void 0:q.value)!=null&&E.length)}),G=null,H=a.ref(void 0),_=a.ref({headerItems:[],footerItems:[]}),{scrollToStickyGroup:A,update:B}=bt.useStickyGroups({enabled:j,enabledFooters:M,flatData:L,containerRef:u,stickyHeaderRef:p,stickyFooterRef:m,tableBodyRef:b,rowHeight:e.rowHeight,isGrouped:K,virtualSkipRef:T,rowHeightServiceRef:a.computed(()=>S==null?void 0:S.rowHeightService)});return{rowIndexRef:H,observerRef:G,dataRef:L,groupPanelDivRef:t,dropElementClueRef:s,dragElementClueRef:i,headerRef:o,footerRef:n,gridNavRef:r,colGroupRef:d,scrollContainerRef:u,tableBodyRef:b,gridStateContext:F,shouldUpdateLeftRightRef:I,resizedRef:k,currentColumnsState:e.columnsState,vsRef:S,virtualSkipRef:T,stickyHeaderItems:c,stickyHeaderRef:p,stickyFooterItems:g,stickyFooterRef:m,pinnedTopRef:R,pinnedBottomRef:x,csvExportRef:w,sticky:_,scrollToStickyGroup:A,updateStickyGroups:B}},render(){var ue,fe,ge,me,Re,Ce,be,Se,ve,xe,Ie,$e,we,ye,ke,He,Te,Me;const e=(ue=this.gridStateContext.sort)==null?void 0:ue.value,t=(fe=this.gridStateContext.filter)==null?void 0:fe.value,s=(ge=this.gridStateContext.search)==null?void 0:ge.value,i=(me=this.gridStateContext.select)==null?void 0:me.value,o=(Re=this.gridStateContext.skip)==null?void 0:Re.value,n=(Ce=this.gridStateContext.take)==null?void 0:Ce.value,r=(be=this.gridStateContext.group)==null?void 0:be.value,d=(Se=this.gridStateContext.groupExpand)==null?void 0:Se.value,c=(ve=this.gridStateContext.detailExpand)==null?void 0:ve.value,g=(r==null?void 0:r.length)||0,u=typeof this.$props.groupable=="object"&&!!this.$props.groupable.stickyHeaders,p=typeof this.$props.groupable=="object"&&!!this.$props.groupable.stickyFooters,m=!!(r!=null&&r.length);let R;this.currentColumnsState=(xe=this.gridStateContext.columnsState)==null?void 0:xe.value;const x=this.$props.autoProcessData===!0?{group:!0,sort:!0,filter:!0,search:!0,page:!0}:this.$props.autoProcessData;let b;const w=f.tableKeyboardNavigationTools.getIdPrefix(this.navigation);let I=[];Array.isArray(this.$props.dataItems)?(I=this.$props.dataItems,b=(Ie=this.$props.total)!=null?Ie:I.length):(I=(($e=$.applyExpandedState(this.$props.dataItems,this.$props.collapsedGroups.length?this.computedCollapsed:[],this.$props.uniqueField))==null?void 0:$e.data)||[],b=(ke=(ye=this.$props.total)!=null?ye:(we=this.$props.dataItems)==null?void 0:we.total)!=null?ke:I.length);const k=this.$props.groupable===!0||l.isObject(this.$props.groupable)&&this.$props.groupable.enabled!==!1;this.dragLogic.reorderable=this.$props.reorderable||!1,this.dragLogic.groupable=k,this._virtualPageSize=this.calcVirtualPageSize();const S=I.length===b,T=l.isObject(this.$props.groupable)&&this.$props.groupable.footer||"none";if(x){const h=x.page&&!(this.isVirtualScroll&&!this.$props.pageable),{data:v,total:y}=re.process(I,{group:x.group?r:void 0,sort:x.sort?e:void 0,filter:f.combineFilters(x.filter?t:void 0,x.search?s:void 0),...h?{take:this.$props.pageable?n||10:n,skip:o||0}:{}});I=v,b=(He=this.$props.total)!=null?He:y}const{resolvedGroupsCount:F,flattedData:j}=this.getFlatData(I,T,S?0:this.$props.skip||0,r,c,d,this.$props.dataItemKey);this.dataRef=j;const M=this.virtualSkipRef||0;if(this._virtualTotal=b,this.isVirtualScroll){let h=o||0;if((m||this.$props.pageable)&&(h=M,this._virtualTotal=this.dataRef.length),S||m||this.$props.pageable)if(this._virtualPageSize===0){const v=Math.min(n||this.$props.pageSize||20,this.dataRef.length);R=this.dataRef.slice(h,h+v)}else R=this.dataRef.slice(h,h+this._virtualPageSize)}this.initializeVirtualization();const L=(Te=this.selectable)!=null&&Te.drag?"none":void 0;this.initColumns(this.$props.dataItems,F),this.columnResize.resizable=this.$props.resizable||!1,this.columnResize.columns=this.columnsRef,this.columnResize.columnsState=l.cloneArray(this.currentColumnsState||[]),this.dragLogic.columns=this.columnsRef;const K=this.$props.toolbar,G=this.$props.noRecords,H=this.columnsRef.filter(h=>h.children.length===0),_=k&&a.createVNode(ot.GroupPanel,{ref:h=>{this.groupPanelDivRef=h},group:r||[],ariaControls:this._gridRoleElementId,onGroupChange:this.groupChangeHandler,onPressHandler:this.dragLogic.pressHandler,onDragHandler:this.dragLogic.dragHandler,onReleaseHandler:this.dragLogic.releaseHandler,resolveTitle:this.resolveTitle},null),A=(this.dragLogic.reorderable||this.dragLogic.groupable)&&l.canUseDOM&&document&&document.body,B=[A&&a.createVNode(ut.DropClue,{ref:h=>{this.dropElementClueRef=h}},null),A&&a.createVNode(pt.DragClue,{ref:h=>{this.dragElementClueRef=h}},null)],q=this.showLicenseWatermark?a.createVNode(l.WatermarkOverlay,{message:this.licenseMessage},null):null,E=this.$attrs.style,Be=E&&l.isObject(E)&&E["width"]||"";this.tableWidth=parseFloat(Be.toString());const qe=H.findIndex(h=>typeof h.colSpan=="function")>-1;let O;O=this.getCellsToRender({},H);const P=H.map(function(h,v){return a.createVNode("col",{key:h.id||`col-${v}`,width:h.width!==void 0?Math.floor(parseFloat(h.width.toString())):void 0},null)},this),ae=a.createVNode(tt.Header,{size:this.$props.size,columnResize:this.columnResize,staticHeaders:this.$props.scrollable!=="none",ref:h=>{this.headerRef=h},onHeaderscroll:this.onHeaderScroll,headerRow:a.createVNode(st.HeaderRow,{grid:this,sort:e,groupable:this.$props.groupable,reorderable:this.$props.reorderable,sortable:this.$props.sortable,onSortChange:this.sortChangeHandler,filter:t,filterable:this.$props.filterable,filterOperators:this.$props.filterOperators||Ne.operators,onFilterChange:this.filterChangeHandler,columnMenu:this.$props.columnMenu,columnMenuIcon:this.$props.columnMenuIcon,columnMenuAnimate:this.$props.columnMenuAnimate,onSelectionchange:this.onHeaderSelectionChangeHandler,columns:this.columnsRef,cellsToRender:O,columnVirtualization:this.$props.columnVirtualization,columnsInitial:this.$props.columns,columnResize:this.columnResize,onPressHandler:this.dragLogic.pressHandler,onDragHandler:this.dragLogic.dragHandler,onReleaseHandler:this.dragLogic.releaseHandler,columnsMap:this._columnsMap,cellRender:this.$props.headerCellRender,cells:this.$props.cells,isRtl:this.isRtl,isColCountDefined:this.getAriaColCount!==void 0,headerSelectionValue:!!(i&&this.dataRef.filter(h=>h.rowType==="data").every(h=>i&&this.$props.dataItemKey&&l.getter(this.$props.dataItemKey)(h.dataItem)!==void 0?i[l.getter(this.$props.dataItemKey)(h.dataItem)]:void 0)),filterRow:this.$props.filterable&&a.createVNode(it.FilterRow,{grid:this,size:this.$props.size,columns:this.columnsRef,columnsMap:this._columnsMap,cellsToRender:O,columnVirtualization:this.$props.columnVirtualization,filter:t,filterOperators:this.$props.filterOperators||Ne.operators,onFilterchange:this.filterChangeHandler,sort:this.$props.sort,cellRender:this.$props.filterCellRender,cells:this.$props.cells,isRtl:this.isRtl,ariaRowIndex:this._columnsMap.length+1},null)||void 0},null),cols:P},null),le=this.columnsRef.some(h=>{var v;return!!(h.footerCell||(v=h.cells)!=null&&v.footerCell)})||(Me=this.$props.cells)!=null&&Me.footerCell?a.createVNode(nt.Footer,{size:this.$props.size,columnResize:this.columnResize,staticHeaders:this.$props.scrollable!=="none",ref:h=>{this.footerRef=h},row:a.createVNode(rt.FooterRow,{isRtl:this.isRtl,rowIndex:this.getAriaRowCount+1,columns:this.columnsRef,cells:this.$props.cells},null),cols:P},null):a.createVNode("span",null,null),V={leafColumns:H,cellsToRender:O,selectedField:this.$props.selectedField,dataItemKey:this.$props.dataItemKey,select:i,highlight:this.$props.highlight,editField:this.$props.editField,cellRender:this.$props.cellRender,cells:this.$props.cells,getCellsToRender:this.getCellsToRender,hasDynamicColSpan:qe,itemChange:this.itemChange,selectionChangeHandler:this.selectionChangeHandler,editHandler:this.editHandler,removeHandler:this.removeHandler,saveHandler:this.saveHandler,cancelHandler:this.cancelHandler,cellClickHandler:this.cellClickHandler,cellKeydownHandler:this.cellKeydownHandler,computedCollapsed:this.computedCollapsed,uniqueField:this.$props.uniqueField,columnsRef:this.columnsRef,isRtl:this.isRtl,idPrefix:w},Oe=function(h,v,y,Z,ee){return Ct.getRowContents(V,h,v,y,Z,ee)};let We=0,J=[];const Q=!this.dataRef.length,de=h=>h>=this.dataRef.length-We;let X=0;if(this.dataRef.length){const h=this._columnsMap.length+(this.$props.filterable?1:0)+1;let v=this.$props.skip||0,y=-1,Z=0;const ee=this.computedRowSpannable.enabled?{}:void 0;if(this.isVirtualScroll){if(M>0){const C=this.dataRef.slice(0,M).filter(z=>z.rowType==="data").length;y+=C,v+=M}!this.$props.pageable&&S&&(y+=this.$props.skip||0)}J=(R||this.dataRef).map(function(C,z){C.rowType==="data"&&y++;const te=C.dataIndex%2!==0,Ge=this.$props.dataItemKey&&l.getter(this.$props.dataItemKey)(C.dataItem),se=z+v,ie=Ge||"ai"+se,oe=ie+"_1",W=Oe.call(this,C,ie,y,te,ee),Qe=C.rowType==="data"?this.pinnedSourceSet.has(C.dataItem):!1,Xe=H.length-(this.detailExpandable.enabled?1:0)-((r==null?void 0:r.length)||0)||1;return X=se+h+Z,[a.createVNode(ft.GridRow,{key:ie,item:C,dataIndex:y,ariaRowIndex:X,absoluteRowIndex:se,isAltRow:te,isHidden:de(z),rowHeight:this.$props.rowHeight,isSelected:W.isSelected,isHighlighted:W.isHighlighted,isInEdit:W.isInEdit,rowType:C.rowType,onRowclick:D=>this.rowClick(D,C),onRowdblclick:D=>this.rowDoubleClick(D,C),render:this.$props.rowRender,class:this.$props.rowClass?this.$props.rowClass(C):"",isPinned:Qe,rows:this.$props.rows},{default:()=>[W.row]}),this.$props.detail&&C.rowType==="data"&&(C.expanded||C.dataItem.expanded)&&a.createVNode("tr",{key:oe,class:te?"k-table-row k-table-alt-row k-detail-row":"k-table-row k-detail-row",style:{visibility:de(z)?"hidden":"",height:this.$props.detailRowHeight+"px"},role:"row","aria-rowindex":X},[r==null?void 0:r.map(function(D){return a.createVNode(Ve.GridGroupCell,{id:"",dataIndex:C.dataIndex,field:D.field,dataItem:C.dataItem,key:`group-${D.field}-${C.dataIndex}`,locked:this.$props.lockGroups,group:C.group},null)},this),(this.$props.expandField||this.detailExpandable.enabled)&&a.createVNode(Ze.GridDetailHierarchyCell,{id:f.tableKeyboardNavigationTools.generateNavigatableId(`${oe}-dhcell`,w)},null),a.createVNode(et.GridDetailCell,{dataItem:C.dataItem,dataIndex:C.dataIndex,colSpan:Xe,ariaColIndex:2+(r?r.length:0),detail:this.$props.detail,id:f.tableKeyboardNavigationTools.generateNavigatableId(`${oe}-dcell`,w)},null)])]},this)}const Ue=this.$props.pageable&&a.createVNode(f.Pager,{class:"k-grid-pager",onPagesizechange:this.pageChangeHandler,onPagechange:this.pageChangeHandler,size:this.$props.size,total:b,skip:o||0,pageSize:(n!==void 0?n:this.$props.pageSize)||10,messagesMap:Ke.pagerMessagesMap,settings:f.normalize(this.$props.pageable||{})},null),he=l.getTemplate.call(this,{h:a.h,template:this.$props.pager,defaultRendering:Ue,additionalProps:{...this.$props,skip:this.$props.skip||0,messagesMap:Ke.pagerMessagesMap},additionalListeners:{pagesizechange:this.pageChangeHandler,pagechange:this.pageChangeHandler}}),je=h=>e&&e.filter(v=>v.field===h).length>0,ce=a.createVNode("colgroup",{ref:l.setRef(this,"colGroup")},[H.map(function(h,v){return a.createVNode("col",{key:h.id||`col-${v}`,class:je(h.field)?"k-sorted":void 0,width:h.width!==void 0?h.width.toString().indexOf("%")!==-1?h.width:Math.floor(parseFloat(h.width.toString()))+"px":void 0},null)},this)]),pe={height:this.getCorrectHeight,...this.$attrs.style},Je=a.createVNode("div",{class:"k-loading-mask"},[a.createVNode("div",{class:"k-loading-color"},null),a.createVNode("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},[a.createVNode(Ye.Loader,{size:"large",type:"converging-spinner"},null)])]),Y=this.$props.showLoader&&l.getTemplate.call(this,{h:a.h,template:this.$props.loader,defaultRendering:Je});return this.$props.scrollable==="none"?a.createVNode(a.Fragment,null,[a.createVNode(f.TableKeyboardNavigationProvider,{ref:"navRef",id:this._gridId,navigatable:this.$props.navigatable,scrollable:this.$props.scrollable,columnVirtualization:this.$props.columnVirtualization},{default:()=>[a.createVNode(Ee.GridNav,{ref:h=>{this.gridNavRef=h},columnsRef:this.columnsRef,dataRef:this.dataRef,id:this.$props.id,dir:this.$props.dir,style:pe,class:this.nonscrollableWrapperClass,onMovetonextpage:this.moveToNextPage,onMovetoprevpage:this.moveToPrevPage,onColumnreorder:this.columnReorder,onKeyboardselectionchange:this.onKeyboardSelectionChangeHandler,onNavigationaction:this.navigationActionHandler},{default:()=>[K,_,a.createVNode("div",{role:"grid",class:"k-grid-aria-root",id:this._gridRoleElementId,"aria-colcount":this.getAriaColCount,"aria-rowcount":this.getAriaRowCount},[a.createVNode(at.GridTable,{selectable:this.computedSelectable,class:"k-table",ref:l.setRef(this,"table")},{default:()=>[ce,ae,a.createVNode("tbody",{class:"k-table-tbody","data-keyboardnavbody":!0,ref:l.setRef(this,"tableBody")},[J,a.createTextVNode(" "),Y]),le]}),Q&&a.createVNode(Le.GridNoRecordsContainer,{id:f.tableKeyboardNavigationTools.generateNavigatableId("no-records",w)},{default:()=>[G.length?G:a.createVNode(Fe.GridNoRecords,null,null)]})]),he,Y,B]})]}),this.renderContextMenu()]):a.createVNode(a.Fragment,null,[a.createVNode(f.TableKeyboardNavigationProvider,{ref:"navRef",id:this._gridId,navigatable:this.$props.navigatable,scrollable:this.$props.scrollable,columnVirtualization:this.$props.columnVirtualization},{default:()=>[a.createVNode(Ee.GridNav,{ref:h=>{this.gridNavRef=h},dataRef:this.dataRef,id:this.$props.id,dir:this.$props.dir,style:pe,class:this.scrollableWrapperClass,onMovetonextpage:this.moveToNextPage,onMovetoprevpage:this.moveToPrevPage,onColumnreorder:this.columnReorder,onKeyboardselectionchange:this.onKeyboardSelectionChangeHandler,onSetcurrentontop:this.setCurrentOnTop,onNavigationaction:this.navigationActionHandler},{default:()=>[K,_,a.createVNode("div",{role:"grid",class:"k-grid-aria-root",id:this._gridRoleElementId,"aria-colcount":this.getAriaColCount,"aria-rowcount":this.getAriaRowCount},[ae,this.hasPinnedTopRows&&a.createVNode(Ae.PinnedRowsTable,{ref:l.setRef(this,"pinnedTop"),size:this.$props.size,cols:P,dataRowContext:V,position:"top",pinnedItems:this.sortedPinnedTopRows,rowHeight:this.$props.rowHeight,rows:this.$props.rows,selectable:this.computedSelectable},null),a.createVNode("div",{class:"k-grid-container",role:"presentation"},[m&&u&&a.createVNode(_e.StickyGroupTable,{ref:l.setRef(this,"stickyHeader"),size:this.$props.size,cols:P,dataRowContext:V,position:"top",groupLevelCount:g,rowHeight:this.$props.rowHeight},null),a.createVNode("div",{role:"presentation",ref:l.setRef(this,"scrollContainer"),class:"k-grid-content k-virtual-content",onScroll:this.scrollHandler},[a.createVNode("div",{class:"k-grid-table-wrap",role:"presentation"},[a.createVNode(lt.GridTableScrollable,{selectable:this.computedSelectable,tableClassName:this.gridTableClass,tableStyle:{userSelect:L},ref:l.setRef(this,"table")},{default:()=>[ce,a.createVNode("tbody",{class:"k-table-tbody",role:"rowgroup","data-keyboardnavbody":!0,ref:l.setRef(this,"tableBody")},[J])]}),Q&&a.createVNode(Le.GridNoRecordsContainer,{id:f.tableKeyboardNavigationTools.generateNavigatableId("no-records",w)},{default:()=>[G.length?G:a.createVNode(Fe.GridNoRecords,null,null)]})]),!Q&&a.createVNode("div",{class:"k-height-container",role:"presentation"},[a.createVNode("div",{ref:l.setRef(this,"scrollHeightContainer"),style:this.$props.scrollable==="virtual"?{height:this._containerHeightRef+"px"}:{}},null)])]),m&&p&&a.createVNode(_e.StickyGroupTable,{ref:l.setRef(this,"stickyFooter"),size:this.$props.size,cols:P,dataRowContext:V,position:"bottom",groupLevelCount:g,rowHeight:this.$props.rowHeight},null)]),this.hasPinnedBottomRows&&a.createVNode(Ae.PinnedRowsTable,{ref:l.setRef(this,"pinnedBottom"),size:this.$props.size,cols:P,dataRowContext:V,position:"bottom",pinnedItems:this.sortedPinnedBottomRows,rowHeight:this.$props.rowHeight,rows:this.$props.rows,selectable:this.computedSelectable},null),le,q]),he,Y,B]})]}),this.renderContextMenu(),this.$props.csv&&a.createVNode(vt.BaseCSVExport,{ref:h=>{this.csvExportRef=h},gridProps:this.$props,csv:this.$props.csv,fileName:typeof this.$props.csv=="object"?this.$props.csv.fileName:void 0,onCsvexport:this.$props.onCsvexport,columnsState:this.currentColumnsState},null)])}});exports.Grid=xt;
|
package/Grid.mjs
CHANGED
|
@@ -362,7 +362,7 @@ const bi = /* @__PURE__ */ bt({
|
|
|
362
362
|
},
|
|
363
363
|
filterPinContextMenuItems(e) {
|
|
364
364
|
var h, u;
|
|
365
|
-
const t = this.$props.dataItemKey || "", s = this.contextMenuState.dataItem, i = ((h = this.gridStateContext.pinnedTopRows) == null ? void 0 : h.value) || [], o = ((u = this.gridStateContext.pinnedBottomRows) == null ? void 0 : u.value) || [], n = t ? s[t] : void 0, r = n !== void 0 && i.some((p) => p[t] === n), a = n !== void 0 && o.some((p) => p[t] === n);
|
|
365
|
+
const t = this.$props.dataItemKey || "", s = this.contextMenuState.dataItem, i = ((h = this.gridStateContext.pinnedTopRows) == null ? void 0 : h.value) || [], o = ((u = this.gridStateContext.pinnedBottomRows) == null ? void 0 : u.value) || [], n = t && s ? s[t] : void 0, r = n !== void 0 && i.some((p) => p[t] === n), a = n !== void 0 && o.some((p) => p[t] === n);
|
|
366
366
|
return e.map((p) => {
|
|
367
367
|
const c = typeof p == "string" ? ws[p] : p;
|
|
368
368
|
return (c == null ? void 0 : c.name) === Q.pinRow && c.items ? {
|
|
@@ -1652,7 +1652,7 @@ const bi = /* @__PURE__ */ bt({
|
|
|
1652
1652
|
dataIndex: g.dataIndex,
|
|
1653
1653
|
colSpan: Ct,
|
|
1654
1654
|
ariaColIndex: 2 + (r ? r.length : 0),
|
|
1655
|
-
detail: this.$props.detail
|
|
1655
|
+
detail: this.$props.detail,
|
|
1656
1656
|
id: M.generateNavigatableId(`${de}-dcell`, $)
|
|
1657
1657
|
}, null)])];
|
|
1658
1658
|
}, this);
|
package/NOTICE.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
Progress Kendo UI for Vue 2026 Updated July 2026
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
----------------------------------------------------------------------------------------------------------------------------
|
|
5
5
|
NOTICES REPORT
|
|
6
6
|
----------------------------------------------------------------------------------------------------------------------------
|
|
7
7
|
|
|
@@ -25,14 +25,20 @@
|
|
|
25
25
|
|
|
26
26
|
----------------------------------------------------------------------------------------------------------------------------
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
will include a configuration to connect to AI. You acknowledge that a separate license or subscription access
|
|
31
|
-
by the terms and conditions of a license agreement from AI licensor will be required for use and access of
|
|
32
|
-
integrated with the Software. You will be responsible to comply with the terms of such license agreement
|
|
33
|
-
AI. You acknowledge and accept that Progress is not a party to the license agreement between You
|
|
34
|
-
use, and as a result Progress does not have any control over AI and its availability, and Progress
|
|
35
|
-
liabilities for any output, error, damages, loss, etc., or any other result of Your use of AI
|
|
28
|
+
GENERATIVE ARTIFICIAL INTELLIGENCE INTEGRATION
|
|
29
|
+
If the Software documentation specifies integration with some form of generative artificial intelligence (AI), then the
|
|
30
|
+
Software will include a configuration to connect to AI. You acknowledge that a separate license or subscription access
|
|
31
|
+
to AI governed by the terms and conditions of a license agreement from AI licensor will be required for use and access of
|
|
32
|
+
AI capabilities integrated with the Software. You will be responsible to comply with the terms of such license agreement
|
|
33
|
+
for a valid use of AI. You acknowledge and accept that Progress is not a party to the license agreement between You
|
|
34
|
+
and AI licensor for AI use, and as a result Progress does not have any control over AI and its availability, and Progress
|
|
35
|
+
disclaims any and all liabilities for any output, error, damages, loss, etc., or any other result of Your use of AI
|
|
36
|
+
integrated with the Software.
|
|
37
|
+
|
|
38
|
+
----------------------------------------------------------------------------------------------------------------------------
|
|
39
|
+
|
|
40
|
+
NOTICE FROM PROGRESS SOFTWARE CORPORATION: Additional notices may be included in the release notes or other
|
|
41
|
+
documentation that accompanies updates received in connection with support of the Product.
|
|
36
42
|
|
|
37
43
|
----------------------------------------------------------------------------------------------------------------------------
|
|
38
44
|
|
|
@@ -41,7 +47,6 @@ Components:
|
|
|
41
47
|
| -------------------------------------- | ------------------------------------- | ---------------------------------------- |
|
|
42
48
|
| Component | Origin | License |
|
|
43
49
|
| -------------------------------------- | ------------------------------------- | ---------------------------------------- |
|
|
44
|
-
| axios 1.13.6 | https://github.com/axios/axios | MIT License |
|
|
45
50
|
| @progress/jszip-esm 1.0.4 | https://github.com/telerik/jszip-esm# | MIT License |
|
|
46
51
|
| | readme | |
|
|
47
52
|
| @progress/pako-esm 1.0.1 | https://github.com/telerik/pako-esm#r | MIT License |
|
|
@@ -77,39 +82,12 @@ License Data and Text:
|
|
|
77
82
|
-------------------------------------------------------------------------------------------------------------------------
|
|
78
83
|
|
|
79
84
|
MIT License
|
|
80
|
-
(@progress/pako-esm 1.0.1)
|
|
81
|
-
|
|
82
|
-
Copyright © 2020 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved. (as modified)
|
|
83
|
-
|
|
84
|
-
Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn
|
|
85
|
-
|
|
86
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
87
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
88
|
-
in the Software without restriction, including without limitation the rights
|
|
89
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
90
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
91
|
-
furnished to do so, subject to the following conditions:
|
|
92
|
-
|
|
93
|
-
The above copyright notice and this permission notice shall be included in
|
|
94
|
-
all copies or substantial portions of the Software.
|
|
95
|
-
|
|
96
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
97
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
98
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
99
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
100
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
101
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
102
|
-
THE SOFTWARE
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
MIT License
|
|
107
|
-
(@progress/jszip-esm 1.0.4, axios 1.13.6, prosemirror-commands 1.7.1, prosemirror-dropcursor 1.8.2, prosemirror-gapcursor 1.4.0, prosemirror-history 1.5.0, prosemirror-inputrules 1.5.1, prosemirror-keymap 1.2.3, prosemirror-model 1.25.4, prosemirror-schema-list 1.5.1, prosemirror-state 1.4.4, prosemirror-tables 1.8.5, prosemirror-transform 1.10.5, prosemirror-view 1.41.6)
|
|
85
|
+
(@progress/jszip-esm 1.0.4, @progress/pako-esm 1.0.1, prosemirror-commands 1.7.1, prosemirror-dropcursor 1.8.2, prosemirror-gapcursor 1.4.0, prosemirror-history 1.5.0, prosemirror-inputrules 1.5.1, prosemirror-keymap 1.2.3, prosemirror-model 1.25.4, prosemirror-schema-list 1.5.1, prosemirror-state 1.4.4, prosemirror-tables 1.8.5, prosemirror-transform 1.10.5, prosemirror-view 1.41.6)
|
|
108
86
|
|
|
109
87
|
The MIT License
|
|
110
88
|
===============
|
|
111
89
|
|
|
112
|
-
Copyright
|
|
90
|
+
[Copyright notice for each component version subject to this license can be located via the origin url provided in the Component Summary above]
|
|
113
91
|
|
|
114
92
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
115
93
|
this software and associated documentation files (the "Software"), to deal in the
|
package/RootGrid.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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),w=require("./Grid.js"),R=require("./GridState.js"),G=require("./common.js"),n=require("@progress/kendo-vue-common"),O=i.defineComponent({name:"KendoVueGrid",props:G.gridProps,setup(e,{expose:t}){const o=i.ref(null);t({get element(){var a;return((a=o.value)==null?void 0:a.element)||null},get props(){return e},get columns(){var a;return((a=o.value)==null?void 0:a.columns)||[]},scrollIntoView:a=>{var s;(s=o.value)==null||s.scrollIntoView(a)},fitColumns:a=>{var s;(s=o.value)==null||s.fitColumns(a)},exportAsPdf:()=>{var a;(a=o.value)==null||a.exportAsPdf()}})},methods:{transformTemplate(e,t){return e?n.templateRendering.call(this,e,t):void 0},transformGroupTemplates(e,t){if(e)return{groupHeader:this.transformTemplate(e.groupHeader,t),data:this.transformTemplate(e.data,t),groupFooter:this.transformTemplate(e.groupFooter,t)}},transformCellTemplates(e,t){if(e)return{headerCell:this.transformTemplate(e.headerCell,t),filterCell:this.transformTemplate(e.filterCell,t),footerCell:this.transformTemplate(e.footerCell,t),groupHeader:this.transformTemplate(e.groupHeader,t),data:this.transformTemplate(e.data,t),groupFooter:this.transformTemplate(e.groupFooter,t),select:this.transformGroupTemplates(e.select,t),hierarchy:this.transformGroupTemplates(e.hierarchy,t),group:this.transformGroupTemplates(e.group,t),edit:e.edit?{text:this.transformTemplate(e.edit.text,t),numeric:this.transformTemplate(e.edit.numeric,t),boolean:this.transformTemplate(e.edit.boolean,t),date:this.transformTemplate(e.edit.date,t)}:void 0}},transformRowTemplates(e,t){if(e)return{groupHeader:this.transformTemplate(e.groupHeader,t),data:this.transformTemplate(e.data,t),groupFooter:this.transformTemplate(e.groupFooter,t),pinnedData:this.transformTemplate(e.pinnedData,t)}}},computed:{columnsWithTemplates(){const e=n.getListeners.call(this);return n.mapTree(this.$props.columns||[],"children",t=>{const o={...t};return{...o,cell:this.transformTemplate(o.cell,e),headerCell:this.transformTemplate(o.headerCell,e),filterCell:this.transformTemplate(o.filterCell,e),footerCell:this.transformTemplate(o.footerCell,e),columnMenu:o.columnMenu===!1?!1:this.transformTemplate(o.columnMenu,e),cells:this.transformCellTemplates(o.cells,e)}})},cellsWithTemplates(){const e=n.getListeners.call(this);return this.transformCellTemplates(this.$props.cells,e)},rowsWithTemplates(){const e=n.getListeners.call(this);return this.transformRowTemplates(this.$props.rows,e)}},render(){const e=n.getDefaultSlots(this)||[],t=n.getListeners.call(this),o=e.filter(r=>{var m,l,p;return(r==null?void 0:r.tag)&&r.tag.toLowerCase().indexOf("toolbar")!==-1||(r==null?void 0:r.componentOptions)&&((m=r.componentOptions.tag)==null?void 0:m.toLowerCase().indexOf("toolbar"))!==-1||((p=(l=r==null?void 0:r.type)==null?void 0:l.name)==null?void 0:p.toLowerCase().indexOf("toolbar"))!==-1}),a=e.filter(r=>{var m,l,p;return(r==null?void 0:r.tag)&&r.tag.toLowerCase().indexOf("records")!==-1||(r==null?void 0:r.componentOptions)&&((m=r.componentOptions.tag)==null?void 0:m.toLowerCase().indexOf("records"))!==-1||((p=(l=r==null?void 0:r.type)==null?void 0:l.name)==null?void 0:p.toLowerCase().indexOf("records"))!==-1}),{cellRender:s,detail:f,columns:x,rowRender:d,pager:T,loader:h,rows:L,...u}=this.$props,g=this.columnsWithTemplates,c=this.cellsWithTemplates,C=this.rowsWithTemplates;return i.createVNode(R.GridStateProvider,u,{default:()=>[i.createVNode(w.Grid,i.mergeProps(u,t,{class:this.$attrs.class,style:this.$attrs.style,columns:g,cells:c,rows:C,cellRender:this.transformTemplate(s,t),rowRender:this.transformTemplate(d,t),pager:this.transformTemplate(T,t),loader:this.transformTemplate(h,t),detail:this.transformTemplate(f,t),toolbar:o,noRecords:a}),null)]})}});exports.RootGrid=O;
|
package/RootGrid.mjs
CHANGED
|
@@ -5,47 +5,47 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as
|
|
9
|
-
import { Grid as
|
|
10
|
-
import { GridStateProvider as
|
|
11
|
-
import { gridProps as
|
|
12
|
-
import { getDefaultSlots as
|
|
13
|
-
const
|
|
8
|
+
import { defineComponent as w, createVNode as i, mergeProps as x, ref as R } from "vue";
|
|
9
|
+
import { Grid as O } from "./Grid.mjs";
|
|
10
|
+
import { GridStateProvider as W } from "./GridState.mjs";
|
|
11
|
+
import { gridProps as G } from "./common.mjs";
|
|
12
|
+
import { getDefaultSlots as b, getListeners as l, mapTree as L, templateRendering as P } from "@progress/kendo-vue-common";
|
|
13
|
+
const M = /* @__PURE__ */ w({
|
|
14
14
|
name: "KendoVueGrid",
|
|
15
|
-
props:
|
|
15
|
+
props: G,
|
|
16
16
|
setup(e, {
|
|
17
17
|
expose: t
|
|
18
18
|
}) {
|
|
19
|
-
const
|
|
19
|
+
const o = R(null);
|
|
20
20
|
t({
|
|
21
21
|
get element() {
|
|
22
22
|
var a;
|
|
23
|
-
return ((a =
|
|
23
|
+
return ((a = o.value) == null ? void 0 : a.element) || null;
|
|
24
24
|
},
|
|
25
25
|
get props() {
|
|
26
26
|
return e;
|
|
27
27
|
},
|
|
28
28
|
get columns() {
|
|
29
29
|
var a;
|
|
30
|
-
return ((a =
|
|
30
|
+
return ((a = o.value) == null ? void 0 : a.columns) || [];
|
|
31
31
|
},
|
|
32
32
|
scrollIntoView: (a) => {
|
|
33
33
|
var s;
|
|
34
|
-
(s =
|
|
34
|
+
(s = o.value) == null || s.scrollIntoView(a);
|
|
35
35
|
},
|
|
36
36
|
fitColumns: (a) => {
|
|
37
37
|
var s;
|
|
38
|
-
(s =
|
|
38
|
+
(s = o.value) == null || s.fitColumns(a);
|
|
39
39
|
},
|
|
40
40
|
exportAsPdf: () => {
|
|
41
41
|
var a;
|
|
42
|
-
(a =
|
|
42
|
+
(a = o.value) == null || a.exportAsPdf();
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
},
|
|
46
46
|
methods: {
|
|
47
47
|
transformTemplate(e, t) {
|
|
48
|
-
return e ?
|
|
48
|
+
return e ? P.call(this, e, t) : void 0;
|
|
49
49
|
},
|
|
50
50
|
transformGroupTemplates(e, t) {
|
|
51
51
|
if (e)
|
|
@@ -88,18 +88,18 @@ const D = /* @__PURE__ */ C({
|
|
|
88
88
|
computed: {
|
|
89
89
|
columnsWithTemplates() {
|
|
90
90
|
const e = l.call(this);
|
|
91
|
-
return
|
|
92
|
-
const
|
|
91
|
+
return L(this.$props.columns || [], "children", (t) => {
|
|
92
|
+
const o = {
|
|
93
93
|
...t
|
|
94
94
|
};
|
|
95
95
|
return {
|
|
96
|
-
...
|
|
97
|
-
cell: this.transformTemplate(
|
|
98
|
-
headerCell: this.transformTemplate(
|
|
99
|
-
filterCell: this.transformTemplate(
|
|
100
|
-
footerCell: this.transformTemplate(
|
|
101
|
-
columnMenu:
|
|
102
|
-
cells: this.transformCellTemplates(
|
|
96
|
+
...o,
|
|
97
|
+
cell: this.transformTemplate(o.cell, e),
|
|
98
|
+
headerCell: this.transformTemplate(o.headerCell, e),
|
|
99
|
+
filterCell: this.transformTemplate(o.filterCell, e),
|
|
100
|
+
footerCell: this.transformTemplate(o.footerCell, e),
|
|
101
|
+
columnMenu: o.columnMenu === !1 ? !1 : this.transformTemplate(o.columnMenu, e),
|
|
102
|
+
cells: this.transformCellTemplates(o.cells, e)
|
|
103
103
|
};
|
|
104
104
|
});
|
|
105
105
|
},
|
|
@@ -113,40 +113,40 @@ const D = /* @__PURE__ */ C({
|
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
render() {
|
|
116
|
-
const e =
|
|
117
|
-
var n, m;
|
|
118
|
-
return
|
|
119
|
-
}), a = e.filter((
|
|
120
|
-
var n, m;
|
|
121
|
-
return
|
|
116
|
+
const e = b(this) || [], t = l.call(this), o = e.filter((r) => {
|
|
117
|
+
var n, m, p;
|
|
118
|
+
return (r == null ? void 0 : r.tag) && r.tag.toLowerCase().indexOf("toolbar") !== -1 || (r == null ? void 0 : r.componentOptions) && ((n = r.componentOptions.tag) == null ? void 0 : n.toLowerCase().indexOf("toolbar")) !== -1 || ((p = (m = r == null ? void 0 : r.type) == null ? void 0 : m.name) == null ? void 0 : p.toLowerCase().indexOf("toolbar")) !== -1;
|
|
119
|
+
}), a = e.filter((r) => {
|
|
120
|
+
var n, m, p;
|
|
121
|
+
return (r == null ? void 0 : r.tag) && r.tag.toLowerCase().indexOf("records") !== -1 || (r == null ? void 0 : r.componentOptions) && ((n = r.componentOptions.tag) == null ? void 0 : n.toLowerCase().indexOf("records")) !== -1 || ((p = (m = r == null ? void 0 : r.type) == null ? void 0 : m.name) == null ? void 0 : p.toLowerCase().indexOf("records")) !== -1;
|
|
122
122
|
}), {
|
|
123
123
|
cellRender: s,
|
|
124
|
-
detail:
|
|
125
|
-
columns:
|
|
126
|
-
rowRender:
|
|
124
|
+
detail: u,
|
|
125
|
+
columns: v,
|
|
126
|
+
rowRender: T,
|
|
127
127
|
pager: d,
|
|
128
128
|
loader: h,
|
|
129
|
-
rows:
|
|
130
|
-
...
|
|
131
|
-
} = this.$props,
|
|
132
|
-
return i(
|
|
133
|
-
default: () => [i(
|
|
129
|
+
rows: y,
|
|
130
|
+
...f
|
|
131
|
+
} = this.$props, g = this.columnsWithTemplates, C = this.cellsWithTemplates, c = this.rowsWithTemplates;
|
|
132
|
+
return i(W, f, {
|
|
133
|
+
default: () => [i(O, x(f, t, {
|
|
134
134
|
class: this.$attrs.class,
|
|
135
135
|
style: this.$attrs.style,
|
|
136
|
-
columns:
|
|
137
|
-
cells:
|
|
138
|
-
rows:
|
|
136
|
+
columns: g,
|
|
137
|
+
cells: C,
|
|
138
|
+
rows: c,
|
|
139
139
|
cellRender: this.transformTemplate(s, t),
|
|
140
|
-
rowRender: this.transformTemplate(
|
|
140
|
+
rowRender: this.transformTemplate(T, t),
|
|
141
141
|
pager: this.transformTemplate(d, t),
|
|
142
142
|
loader: this.transformTemplate(h, t),
|
|
143
|
-
detail: this.transformTemplate(
|
|
144
|
-
toolbar:
|
|
143
|
+
detail: this.transformTemplate(u, t),
|
|
144
|
+
toolbar: o,
|
|
145
145
|
noRecords: a
|
|
146
146
|
}), null)]
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
});
|
|
150
150
|
export {
|
|
151
|
-
|
|
151
|
+
M as RootGrid
|
|
152
152
|
};
|