@progress/kendo-vue-data-tools
Version:
89 lines (88 loc) • 2.63 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import { defineComponent as o, createVNode as n, h as s } from "vue";
import { ColumnMenuSort as r } from "./ColumnMenuSort.mjs";
import { ColumnMenuFilter as i } from "./ColumnMenuFilter.mjs";
import { getTemplate as l, Keys as a } from "@progress/kendo-vue-common";
const m = /* @__PURE__ */ o({
name: "KendoColumnMenuContent",
inheritAttrs: !1,
props: {
column: Object,
sortable: [Boolean, Object],
sort: {
type: Array
},
filter: Object,
filterOperators: Object,
filterable: Boolean,
render: [Boolean, String, Function, Object],
onContentfocus: Function,
onClosemenu: Function,
onExpandchange: Function,
onSortchange: Function,
onFilterchange: Function
},
methods: {
handleFocus(e) {
this.$emit("contentfocus", e);
},
closeMenu() {
this.$emit("closemenu");
},
expandChange() {
this.$emit("expandchange");
},
sortChange(e, t) {
this.$emit("sortchange", e, t);
},
filterChange(e, t) {
this.$emit("filterchange", e, t);
},
contentKeyDown(e) {
e.keyCode === a.esc && this.$emit("closemenu");
}
},
render() {
const e = this.$props.render, t = n("div", {
onKeydown: this.contentKeyDown,
style: this.$attrs.style
}, [n(r, {
column: this.$props.column,
sortable: this.$props.sortable,
sort: this.$props.sort,
onClosemenu: this.closeMenu,
onSortchange: this.sortChange
}, null), n(i, {
column: this.$props.column,
filterable: this.$props.filterable,
filter: this.$props.filter,
filterOperators: this.$props.filterOperators,
onFilterfocus: this.handleFocus,
onClosemenu: this.closeMenu,
onExpandchange: this.expandChange,
onFilterchange: this.filterChange
}, null)]);
return l.call(this, {
h: s,
template: typeof e != "boolean" && e,
defaultRendering: t,
additionalProps: this.$props,
additionalListeners: {
closemenu: this.closeMenu,
filterchange: this.filterChange,
sortchange: this.sortChange,
expandchange: this.expandChange,
contentfocus: this.handleFocus
}
});
}
});
export {
m as ColumnMenuContent
};