UNPKG

@progress/kendo-vue-editor

Version:
560 lines (559 loc) 14.5 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 "@progress/kendo-vue-buttons"; import { keys as e, messages as i } from "../messages/main.mjs"; import "@progress/kendo-vue-pdf"; import { indentRules as o, bold as c, italic as m, underline as r, strikethrough as d, subscript as p, superscript as g, link as t, addRowBefore as f, addRowAfter as u, addColumnBefore as I, addColumnAfter as v, deleteRow as R, deleteColumn as y, deleteTable as b, mergeCells as h, splitCell as C, undo as k, redo as N, alignLeftRules as H, alignRightRules as w, alignCenterRules as x, alignJustifyRules as A, alignRemoveRules as F, outdentRules as L } from "@progress/kendo-editor-common"; import { boldIcon as M, italicIcon as z, underlineIcon as W, strikethroughIcon as D, subscriptIcon as B, supscriptIcon as T, linkIcon as P, fileAddIcon as U, tableAddIcon as G, tableRowInsertAboveIcon as J, tableRowInsertBelowIcon as O, tableColumnInsertLeftIcon as K, tableColumnInsertRightIcon as V, tableRowDeleteIcon as j, tableColumnDeleteIcon as q, tableDeleteIcon as Q, cellsMergeIcon as X, cellSplitHorizontallyIcon as Y, printIcon as Z, selectAllIcon as _, filePdfIcon as $, clearCssIcon as S, imageIcon as E, codeIcon as ee, searchIcon as ne, unlinkIcon as ae, undoIcon as le, redoIcon as ie, foregroundColorIcon as te, dropletIcon as se, alignLeftIcon as oe, alignRightIcon as ce, alignCenterIcon as me, alignJustifyIcon as re, alignRemoveIcon as de, indentIcon as pe, outdentIcon as ge, listOrderedIcon as fe, listUnorderedIcon as ue } from "@progress/kendo-svg-icons"; const l = { ...o.listsTypes }; var s; ((n) => { const a = { type: "button" }; n.bold = { ...c, props: { icon: "bold", svgIcon: M, ...a }, messages: { title: e.bold }, commandName: "Bold" }, n.italic = { ...m, props: { icon: "italic", svgIcon: z, ...a }, messages: { title: e.italic }, commandName: "Italic" }, n.underline = { ...r, props: { icon: "underline", svgIcon: W, ...a }, messages: { title: e.underline }, commandName: "Underline" }, n.strikethrough = { ...d, props: { icon: "strikethrough", svgIcon: D, ...a }, messages: { title: e.strikethrough }, commandName: "Strikethrough" }, n.subscript = { ...p, props: { icon: "subscript", svgIcon: B, ...a }, messages: { title: e.subscript }, commandName: "Subscript" }, n.superscript = { ...g, props: { icon: "supscript", svgIcon: T, ...a }, messages: { title: e.superscript }, commandName: "Superscript" }, n.link = { ...t, props: { icon: "link", svgIcon: P, ...a }, messages: { insertHyperlink: e.insertHyperlink, insertHyperlinkDialogTitle: e.insertHyperlinkDialogTitle, insertHyperlinkAddress: e.insertHyperlinkAddress, insertHyperlinkTitle: e.insertHyperlinkTitle, insertHyperlinkNewWindow: e.insertHyperlinkNewWindow, insertHyperlinkCancel: e.insertHyperlinkCancel, insertHyperlinkInsert: e.insertHyperlinkInsert }, commandName: "Link" }, n.insertFile = { ...t, props: { icon: "file-add", svgIcon: U, ...a }, messages: { insertHyperlink: e.insertFile, insertHyperlinkDialogTitle: e.insertFileDialogTitle, insertHyperlinkAddress: e.insertFileAddress, insertHyperlinkTitle: e.insertFileTitle, insertHyperlinkNewWindow: "", insertHyperlinkCancel: e.insertFileCancel, insertHyperlinkInsert: e.insertFileInsert }, commandName: "InsertFile", linkTarget: !1 }, n.insertTable = { props: { icon: "table-add", svgIcon: G, ...a }, messages: { createTable: e.createTable, createTableHint: e.createTableHint }, commandName: "InsertTable" }, n.addRowBefore = { command: f, props: { icon: "table-row-insert-above", svgIcon: J, ...a }, messages: { title: e.addRowBefore }, commandName: "AddRowBefore" }, n.addRowAfter = { command: u, props: { icon: "table-row-insert-below", svgIcon: O, ...a }, messages: { title: e.addRowAfter }, commandName: "AddRowAfter" }, n.addColumnBefore = { command: I, props: { icon: "table-column-insert-left", svgIcon: K, ...a }, messages: { title: e.addColumnBefore }, commandName: "AddColumnBefore" }, n.addColumnAfter = { command: v, props: { icon: "table-column-insert-right", svgIcon: V, ...a }, messages: { title: e.addColumnAfter }, commandName: "AddColumnAfter" }, n.deleteRow = { command: R, props: { icon: "table-row-delete", svgIcon: j, ...a }, messages: { title: e.deleteRow }, commandName: "DeleteRow" }, n.deleteColumn = { command: y, props: { icon: "table-column-delete", svgIcon: q, ...a }, messages: { title: e.deleteColumn }, commandName: "DeleteColumn" }, n.deleteTable = { command: b, props: { icon: "table-delete", svgIcon: Q, ...a }, messages: { title: e.deleteTable }, commandName: "DeleteTable" }, n.mergeCells = { command: h, props: { icon: "cells-merge", svgIcon: X, ...a }, messages: { title: e.mergeCells }, commandName: "MergeCells" }, n.splitCell = { command: C, props: { icon: "cell-split-horizontally", svgIcon: Y, ...a }, messages: { title: e.splitCell }, commandName: "SplitCell" }, n.print = { props: { icon: "print", svgIcon: Z, ...a }, messages: { title: e.print } }, n.selectAll = { props: { icon: "select-all", svgIcon: _, ...a }, messages: { title: e.selectAll } }, n.pdf = { props: { icon: "file-pdf", svgIcon: $, ...a }, messages: { title: e.pdf } }, n.savePdfOptions = { fileName: "editor.pdf", paperSize: "A4", margin: "1cm" }, n.cleanFormatting = { props: { icon: "clear-css", svgIcon: S, ...a }, messages: { title: e.cleanFormatting }, commandName: "CleanFormatting" }, n.image = { node: "image", props: { icon: "image", svgIcon: E, ...a }, messages: { insertImage: e.insertImage, insertImageDialogTitle: e.insertImageDialogTitle, insertImageAddress: e.insertImageAddress, insertImageTitle: e.insertImageTitle, insertImageAltText: e.insertImageAltText, insertImageWidth: e.insertImageWidth, insertImageHeight: e.insertImageHeight, insertImageCancel: e.insertImageCancel, insertImageInsert: e.insertImageInsert }, commandName: "InsertImage" }, n.viewHtml = { props: { icon: "code", svgIcon: ee, ...a }, messages: { viewHtml: e.viewHtml, viewHtmlDialogTitle: e.viewHtmlDialogTitle, viewHtmlCancel: e.viewHtmlCancel, viewHtmlUpdate: e.viewHtmlUpdate }, commandName: "SetContent" }, n.findAndReplace = { props: { icon: "search", svgIcon: ne, ...a }, messages: { findReplaceToolTitle: e.findReplaceToolTitle, findReplaceDialogTitle: e.findReplaceDialogTitle, findReplaceTabFind: e.findReplaceTabFind, findReplaceTabReplace: e.findReplaceTabReplace, findReplaceFindWhat: e.findReplaceFindWhat, findReplaceReplaceWith: e.findReplaceReplaceWith, findReplaceReplace: e.findReplaceReplace, findReplaceReplaceAll: e.findReplaceReplaceAll, findReplaceMatchCase: e.findReplaceMatchCase, findReplaceMatchWord: e.findReplaceMatchWord, findReplaceMatchCyclic: e.findReplaceMatchCyclic, findReplaceUseRegExp: e.findReplaceUseRegExp, findReplacePrevMatch: e.findReplacePrevMatch, findReplaceNextMatch: e.findReplaceNextMatch, findReplaceMatches: e.findReplaceMatches, findReplaceInvalidRegExp: e.findReplaceInvalidRegExp } }, n.unlink = { ...t, props: { icon: "unlink", svgIcon: ae, ...a }, messages: { title: e.unlink }, commandName: "Unlink" }, n.undo = { command: k, props: { icon: "undo", svgIcon: le, ...a }, messages: { title: e.undo }, commandName: "Undo" }, n.redo = { command: N, props: { icon: "redo", svgIcon: ie, ...a }, messages: { title: e.redo }, commandName: "Redo" }, n.fontSize = { style: "font-size", defaultItem: { text: i[e.fontSize], value: "", localizationKey: e.fontSize }, items: [ { text: "1 (8pt)", value: "xx-small" }, { text: "2 (10pt)", value: "x-small" }, { text: "3 (12pt)", value: "small" }, { text: "4 (14pt)", value: "medium" }, { text: "5 (18pt)", value: "large" }, { text: "6 (24pt)", value: "x-large" }, { text: "7 (36pt)", value: "xx-large" } ], commandName: "FontSize" }, n.fontName = { style: "font-family", defaultItem: { text: i[e.fontName], value: "", localizationKey: e.fontName }, items: [ { text: "Arial", value: "Arial, Helvetica, sans-serif", style: { fontFamily: "Arial, Helvetica, sans-serif" } }, { text: "Courier New", value: "'Courier New', Courier, monospace", style: { fontFamily: "'Courier New', Courier, monospace" } }, { text: "Georgia", value: "Georgia, serif", style: { fontFamily: "Georgia, serif" } }, { text: "Impact", value: "Impact, Charcoal, sans-serif", style: { fontFamily: "Impact, Charcoal, sans-serif" } }, { text: "Lucida Console", value: "'Lucida Console', Monaco, monospace", style: { fontFamily: "'Lucida Console', Monaco, monospace" } }, { text: "Tahoma", value: "Tahoma, Geneva, sans-serif", style: { fontFamily: "Tahoma, Geneva, sans-serif" } }, { text: "Times New Roman", value: "'Times New Roman', Times,serif", style: { fontFamily: "'Times New Roman', Times,serif" } }, { text: "Trebuchet MS", value: "'Trebuchet MS', Helvetica, sans-serif", style: { fontFamily: "'Trebuchet MS', Helvetica, sans-serif" } }, { text: "Verdana", value: "Verdana, Geneva, sans-serif", style: { fontFamily: "Verdana, Geneva, sans-serif" } } ], commandName: "FontName" }, n.formatBlock = { defaultItem: { text: i[e.format], value: "", localizationKey: e.format }, items: [ { text: "Paragraph", value: "p", style: { display: "block", marginLeft: 0 } }, { text: "Heading 1", value: "h1", style: { display: "block", fontSize: "2em", marginLeft: 0, fontWeight: "bold" } }, { text: "Heading 2", value: "h2", style: { display: "block", fontSize: "1.5em", marginLeft: 0, fontWeight: "bold" } }, { text: "Heading 3", value: "h3", style: { display: "block", fontSize: "1.17em", marginLeft: 0, fontWeight: "bold" } }, { text: "Heading 4", value: "h4", style: { display: "block", fontSize: "1em", marginLeft: 0, fontWeight: "bold" } }, { text: "Heading 5", value: "h5", style: { display: "block", fontSize: "0.83em", marginLeft: 0, fontWeight: "bold" } }, { text: "Heading 6", value: "h6", style: { display: "block", fontSize: "0.67em", marginLeft: 0, fontWeight: "bold" } } ], commandName: "FormatBlock" }, n.foreColor = { color: "color", colorPickerProps: { icon: "foreground-color", svgIcon: te, view: "palette", title: e.foregroundColor }, commandName: "ForeColor" }, n.backColor = { color: "background-color", colorPickerProps: { icon: "droplet", svgIcon: se, view: "palette", title: e.backgroundColor }, commandName: "BackColor" }, n.alignLeft = { actions: [...H], props: { icon: "align-left", svgIcon: oe, ...a }, messages: { title: e.alignLeft }, commandName: "AlignLeft" }, n.alignRight = { actions: [...w], props: { icon: "align-right", svgIcon: ce, ...a }, messages: { title: e.alignRight }, commandName: "AlignRight" }, n.alignCenter = { actions: [...x], props: { icon: "align-center", svgIcon: me, ...a }, messages: { title: e.alignCenter }, commandName: "AlignCenter" }, n.alignJustify = { actions: [...A], props: { icon: "align-justify", svgIcon: re, ...a }, messages: { title: e.alignJustify }, commandName: "AlignJustify" }, n.alignRemove = { actions: [...F], props: { icon: "align-remove", svgIcon: de, ...a }, messages: {}, commandName: "AlignRemove" }, n.indent = { actions: o.nodes, listsTypes: l, props: { icon: "indent", svgIcon: pe, ...a }, messages: { title: e.indent }, commandName: "Indent" }, n.outdent = { actions: L.nodes, listsTypes: l, props: { icon: "outdent", svgIcon: ge, ...a }, messages: { title: e.outdent }, commandName: "Outdent" }, n.orderedList = { listType: l.orderedList, props: { icon: "list-ordered", svgIcon: fe, ...a }, messages: { title: e.orderedList }, commandName: "OrderedList", types: { ...l } }, n.bulletList = { listType: l.bulletList, props: { icon: "list-unordered", svgIcon: ue, ...a }, messages: { title: e.bulletList }, commandName: "UnorderedList", types: { ...l } }; })(s || (s = {})); export { s as EditorToolsSettings };