UNPKG

@progress/kendo-vue-editor

Version:
73 lines (72 loc) 1.83 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 { defineComponent as p, h as g, createVNode as n } from "vue"; import { Button as l } from "@progress/kendo-vue-buttons"; import { ViewHtmlDialog as m } from "../dialogs/viewHtml.mjs"; import { provideLocalizationService as u } from "@progress/kendo-vue-intl"; import { messages as d } from "../messages/main.mjs"; const H = /* @__PURE__ */ p({ name: "KendoViewHtml", props: { view: Object, settings: { type: Object, default: function() { return { messages: {} }; } }, ...l.props }, inject: { kendoLocalizationService: { default: null } }, data() { return { openedDialog: !1 }; }, render() { const { view: e, settings: t, ...s } = this.$props, r = u(this), o = t.messages.viewHtml, i = { ...s, key: "viewHtml", title: r.toLanguageString(o, d[o]), ...t.props }, a = [g(l, { onClick: this.toggleDialog, onMousedown: this.preventDefault, onPointerdown: this.preventDefault, ...i }), this.openedDialog && e && n(m, { key: "viewHtmlDialog", view: e, settings: t, dir: i.dir, onClose: this.toggleDialog }, null) || null]; return n("span", null, [a]); }, methods: { toggleDialog() { this.openedDialog = !this.openedDialog; }, preventDefault(e) { e.preventDefault(); } } }); export { H as ViewHtml };