@progress/kendo-vue-grid
Version:
71 lines (70 loc) • 2.4 kB
JavaScript
/**
* @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 s, h as i, createVNode as d } from "vue";
import { noop as a, getTemplate as c } from "@progress/kendo-vue-common";
import { KEYBOARD_NAV_DATA_ID as p, KEYBOARD_NAV_DATA_LEVEL as u } from "@progress/kendo-vue-data-tools";
import { resolveCells as f } from "../utils/main.mjs";
const $ = /* @__PURE__ */ s({
name: "FooterCell",
props: {
column: Object,
columnIndex: Number,
isRtl: Boolean,
rowIndex: Number,
cells: Object
},
inject: {
getKeyboardNavigationAttributes: {
default: a
}
},
computed: {
columnStyles() {
const e = this.$props.column;
if (e.locked && (e.left !== void 0 || e.right !== void 0))
return this.$props.isRtl ? {
left: e.right + "px",
right: e.left + "px"
} : {
left: e.left + "px",
right: e.right + "px"
};
},
tdClassName() {
const e = this.$props.column, t = e.locked && (e.left !== void 0 || e.right !== void 0) ? "k-grid-footer-sticky" : "";
return e.footerClassName ? `k-table-td ${e.footerClassName} ${t}` : "k-table-td " + t;
}
},
render() {
const e = this.$props.column, t = `footer-${this.$props.rowIndex}-${this.$props.columnIndex}`, o = this.getKeyboardNavigationAttributes(t, !0), l = f(this.$props.cells, e.cells), n = {
key: this.$props.columnIndex,
colspan: e.colSpan === 1 ? void 0 : e.colSpan,
style: this.columnStyles,
class: this.tdClassName,
role: "gridcell",
tabindex: o.tabIndex,
"data-keyboardnavlevel": o[u],
"data-keyboardnavid": o[p]
}, r = c.call(this, {
h: i,
template: e.footerCell || (l == null ? void 0 : l.footerCell),
defaultRendering: null,
additionalProps: {
...this.$props,
field: e.field,
colSpan: e.colSpan === 1 ? void 0 : e.colSpan,
defaultStyle: this.columnStyles,
tdProps: n
}
});
return d("td", n, [r]);
}
});
export {
$ as FooterCell
};