UNPKG

@progress/kendo-vue-editor

Version:
68 lines (67 loc) 1.81 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 d, createVNode as t } from "vue"; import { Button as n } from "@progress/kendo-vue-buttons"; import { FindAndReplaceDialog as c } from "../dialogs/FindReplace.mjs"; import { messages as h } from "../messages/main.mjs"; import { EditorToolsSettings as m } from "../config/toolsSettings.mjs"; import { provideLocalizationService as f } from "@progress/kendo-vue-intl"; const i = m.findAndReplace, R = /* @__PURE__ */ p({ name: "KendoFindAndReplace", props: { view: Object, ...n.props }, inject: { kendoLocalizationService: { default: null } }, data() { return { showDialog: !1 }; }, render() { const { view: o, ...s } = this.$props, r = f(this), e = i.messages.findReplaceToolTitle, l = { ...s, key: "tool", disabled: !o, title: r.toLanguageString(e, h[e]), ...i.props }, a = d(n, { onClick: this.onOpen, onMousedown: this.preventDefault, onPointerdown: this.preventDefault, ...l }); return t("span", null, [a, this.showDialog && o && t(c, { view: o, onClose: this.onClose, dir: this.$props.dir, key: "dialog" }, null)]); }, methods: { onClose() { this.showDialog = !1; }, onOpen() { this.showDialog = !0; }, preventDefault(o) { o.preventDefault(); } } }); export { R as FindAndReplace };