UNPKG

@progress/kendo-vue-grid

Version:
72 lines (71 loc) 2.04 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 a, inject as d, createVNode as g, mergeProps as m } from "vue"; import { fileCsvIcon as C } from "@progress/kendo-svg-icons"; import { classNames as x } from "@progress/kendo-vue-common"; import { exportCSV as i, messages as c } from "./messages/main.mjs"; import { Button as b } from "@progress/kendo-vue-buttons"; const v = { themeColor: String, size: String, rounded: String, fillMode: String, disabled: { type: Boolean, default: void 0 }, icon: String, svgIcon: Object, title: String, togglable: { type: Boolean, default: !1 }, selected: { type: Boolean, default: void 0 }, tabIndex: Number, type: String }, I = /* @__PURE__ */ a({ name: "GridCsvExportButton", inheritAttrs: !1, props: v, setup(e, { attrs: o, slots: l }) { const r = d("gridContext", {}), t = d("kendoLocalizationService", null), f = (n) => { r.exportAsCsv && r.exportAsCsv(), o.onClick && o.onClick(n); }; return () => { var s; const n = ((s = t == null ? void 0 : t.toLanguageString) == null ? void 0 : s.call(t, i, c[i])) || c[i], u = x("k-grid-csv", o.class); return g(b, m({ type: "button" }, o, { themeColor: e.themeColor, size: e.size, rounded: e.rounded, fillMode: e.fillMode, disabled: e.disabled, title: e.title || n, icon: e.icon || "file-csv", svgIcon: e.svgIcon || C, class: u, onClick: f }), { default: () => [l.default ? l.default() : n] }); }; } }); export { I as GridCsvExportButton, v as buttonPropsDefinition };