UNPKG

@progress/kendo-vue-grid

Version:
9 lines (8 loc) 1.59 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),r=require("@progress/kendo-vue-common"),i=require("@progress/kendo-vue-data-tools"),p=n.defineComponent({props:{colSpan:Number,ariaColIndex:Number,dataItem:[Object,String,Number],dataIndex:Number,detail:[String,Function,Object],id:String},inject:{getKeyboardNavigationAttributes:{default:r.noop}},setup(){const e=n.inject("kendoIntlService",{}),t=n.inject("gridContext",null);return{kendoIntlService:e,gridContext:t}},methods:{triggerContextMenu(e){var t,a;(a=(t=this.gridContext)==null?void 0:t.onContextMenu)==null||a.call(t,e,this.$props.dataItem)}},render(){const{colSpan:e,ariaColIndex:t,dataItem:a,dataIndex:d,id:l}=this.$props,o=this.getKeyboardNavigationAttributes(l),s={class:"k-table-td k-detail-cell",colspan:e,"aria-colindex":t,role:"gridcell",tabindex:o.tabIndex,"data-keyboardnavlevel":o[i.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":o[i.KEYBOARD_NAV_DATA_ID],onContextmenu:this.triggerContextMenu},c=function(u){return r.getTemplate.call(this,{h:n.h,template:this.$props.detail,additionalProps:u})}.call(this,{dataItem:a,dataIndex:d});return n.createVNode("td",s,[c])}});exports.GridDetailCell=p;