UNPKG

@progress/kendo-vue-grid

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