@progress/kendo-vue-grid
Version:
67 lines (66 loc) • 1.88 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 c, createVNode as t, h as a } from "vue";
import { guid as r, getTemplate as d } from "@progress/kendo-vue-common";
import { provideLocalizationService as p } from "@progress/kendo-vue-intl";
import { selectAllRows as s, messages as h } from "../messages/main.mjs";
const S = /* @__PURE__ */ c({
props: {
field: String,
title: String,
selectionValue: Boolean,
render: [Object, Function, String]
},
created() {
this.inputId = r();
},
inject: {
kendoLocalizationService: {
default: null
}
},
methods: {
changeHandle(e) {
this.$emit("selectionchange", {
field: this.$props.field,
event: e
});
}
},
render() {
const e = this.$props.render, n = p(this).toLanguageString(s, h[s]), l = t("input", {
checked: this.$props.selectionValue,
id: this.inputId,
type: "checkbox",
class: "k-checkbox k-checkbox-md k-rounded-md",
"aria-label": n,
onChange: this.changeHandle
}, null), i = d.call(this, {
h: a,
template: e,
defaultRendering: l,
additionalProps: {
...this.$props,
selectAll: n
},
additionalListeners: {
selectionchange: this.changeHandle
}
}), o = e ? i : t("span", {
class: "k-checkbox-wrap"
}, [i]);
return t("span", {
class: "k-link"
}, [t("span", {
class: "k-column-title"
}, [o])]);
}
});
export {
S as GridHeaderSelectionCell
};