UNPKG

@progress/kendo-vue-editor

Version:
64 lines (63 loc) 1.67 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { Button as i } from "@progress/kendo-vue-buttons"; import { provideLocalizationService as a } from "@progress/kendo-vue-intl"; import { savePDF as p } from "@progress/kendo-vue-pdf"; import { messages as l } from "../messages/main.mjs"; import { EditorToolsSettings as d } from "../config/toolsSettings.mjs"; import { defineComponent as f, h as c } from "vue"; const { pdf: m, savePdfOptions: v } = d, S = /* @__PURE__ */ f({ name: "KendoPdf", props: { view: Object, settings: Object, ...i.props }, inject: { kendoLocalizationService: { default: null } }, render() { const { view: t, render: h, settings: e = m, savePdfOptions: u, savePdfCallback: P, ...n } = this.$props, o = e.messages.title, s = a(this), r = { ...n, title: s.toLanguageString(o, l[o]), ...e.props }; return c(i, { onClick: this.handleClick, onMousedown: this.preventDefault, onPointerdown: this.preventDefault, ...r }); }, methods: { handleClick() { this.view && p(this.view.dom, { ...v, ...this.savePdfOptions || {} }, this.savePdfCallback); }, preventDefault(t) { t.preventDefault(); } } }); export { S as Pdf };