@progress/kendo-react-editor
Version:
React Editor enables users to create rich text content through a WYSIWYG interface. KendoReact Editor package
278 lines (277 loc) • 8.2 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import * as l from "react";
import { EditorToolsSettings as n } from "../config/toolsSettings.mjs";
import { InsertTableToolNS as Ae } from "./insertTable/tool.mjs";
import { InsertTablePopupNS as xe } from "./insertTable/popup.mjs";
import { createAlignTool as Ce } from "./align.mjs";
import { FontStyleToolNS as we } from "./fontStyle.mjs";
import { ApplyColorTool as B } from "./applyColor.mjs";
import { FormatBlockToolNS as Le } from "./formatBlock.mjs";
import { HistoryToolNS as y } from "./history.mjs";
import { IndentToolNS as Se } from "./indent.mjs";
import { InlineFormatToolNS as Te } from "./inlineFormat.mjs";
import { createInsertImageTool as Re } from "./insertImage.mjs";
import { LinkToolNS as be } from "./insertLink.mjs";
import { ListToolNS as De } from "./lists.mjs";
import { OutdentToolNS as ke } from "./outdent.mjs";
import { TableEditNS as r } from "./tableEdit.mjs";
import { UnlinkToolNS as Fe } from "./unlink.mjs";
import { ViewHtmlToolNS as Be } from "./viewHtml.mjs";
import { Print as ye } from "./print.mjs";
import { Pdf as Ue } from "./pdf.mjs";
import { SelectAll as Ne } from "./selectAll.mjs";
import { CleanFormatting as ve } from "./cleanFormatting.mjs";
import { FindAndReplace as Pe } from "./findReplace.mjs";
import { ListTool as U } from "./lists-styled.mjs";
import { listUnorderedIcon as N, listOrderedIcon as v, listUnorderedOutlineIcon as Oe, listUnorderedSquareIcon as he, listRomanUpperIcon as He, listRomanLowerIcon as Ve, listLatinBigIcon as Me, listLatinSmallIcon as qe } from "@progress/kendo-svg-icons";
import { TableCellProperties as ze } from "./table-wizard/tableCellProperties.mjs";
import { TableProperties as Je } from "./table-wizard/tableProperties.mjs";
var P;
((t) => {
function a(e) {
return Ce(e);
}
t.createAlignTool = a;
class O extends a(n.alignLeft) {
}
t.AlignLeft = O;
class h extends a(n.alignRight) {
}
t.AlignRight = h;
class H extends a(n.alignCenter) {
}
t.AlignCenter = H;
class V extends a(n.alignJustify) {
}
t.AlignJustify = V;
function u(e) {
return Ae.createInsertTableTool(e);
}
t.createInsertTableTool = u;
class M extends u(n.insertTable) {
}
t.InsertTable = M;
class q extends xe.InsertTablePopup {
}
t.InsertTablePopup = q;
function c(e) {
return we.createStyleDropDownList(e);
}
t.createStyleDropDownList = c;
class z extends c(n.fontSize) {
}
t.FontSize = z;
class J extends c(n.fontName) {
}
t.FontName = J, t.ForeColor = (e) => /* @__PURE__ */ l.createElement(B, { ...n.foreColor, ...e }), t.BackColor = (e) => /* @__PURE__ */ l.createElement(B, { ...n.backColor, ...e });
function d(e) {
return Le.createFormatBlockDropDownList(e);
}
t.createFormatBlockDropDownList = d;
class $ extends d(n.formatBlock) {
}
t.FormatBlock = $;
function f(e) {
return y.createUndoTool(e);
}
t.createUndoTool = f;
function p(e) {
return y.createRedoTool(e);
}
t.createRedoTool = p;
class K extends f(n.undo) {
}
t.Undo = K;
class j extends p(n.redo) {
}
t.Redo = j;
function I(e) {
return Se.createIndentTool(e);
}
t.createIndentTool = I;
class G extends I(n.indent) {
}
t.Indent = G;
function o(e) {
return Te.createInlineFormatTool(e);
}
t.createInlineFormatTool = o;
class Q extends o(n.bold) {
}
t.Bold = Q;
class W extends o(n.italic) {
}
t.Italic = W;
class X extends o(n.underline) {
}
t.Underline = X;
class Y extends o(n.strikethrough) {
}
t.Strikethrough = Y;
class Z extends o(n.subscript) {
}
t.Subscript = Z;
class _ extends o(n.superscript) {
}
t.Superscript = _;
function g(e) {
return Re(e);
}
t.createInsertImageTool = g;
class E extends g(n.image) {
}
t.InsertImage = E;
function s(e) {
return be.createLinkTool(e);
}
t.createLinkTool = s;
class ee extends s(n.link) {
}
t.Link = ee;
class te extends s(n.insertFile) {
}
t.InsertFile = te;
function i(e) {
return De.createListTool(e);
}
t.createListTool = i;
class ne extends i(n.orderedList) {
}
t.OrderedList = ne;
class re extends i(n.bulletList) {
}
t.UnorderedList = re, t.BulletedList = (e) => {
const m = [
{ icon: "list-unordered", svgIcon: N, text: "Disc", style: "disc" },
{ icon: "list-unordered-outline", svgIcon: Oe, text: "Circle", style: "circle" },
{ icon: "list-unordered-square", svgIcon: he, text: "Square", style: "square" }
];
return /* @__PURE__ */ l.createElement(
U,
{
listType: n.bulletList.listType,
items: m,
icon: "list-unordered",
svgIcon: N,
titleKey: n.bulletList.messages.title,
...e
}
);
}, t.NumberedList = (e) => {
const m = [
{ icon: "list-ordered", svgIcon: v, text: "Decimal" },
// { icon: 'list-leading-zero', text: 'Decimal with leading zero', styleType: 'decimal-leading-zero' },
{ icon: "list-roman-upper", svgIcon: He, text: "Upper roman", style: "upper-roman" },
{ icon: "list-roman-lower", svgIcon: Ve, text: "Lower roman", style: "lower-roman" },
{ icon: "list-latin-big", svgIcon: Me, text: "Upper latin", style: "upper-latin" },
{ icon: "list-latin-small", svgIcon: qe, text: "Lower latin", style: "lower-latin" }
];
return /* @__PURE__ */ l.createElement(
U,
{
listType: n.orderedList.listType,
items: m,
icon: "list-ordered",
svgIcon: v,
titleKey: n.orderedList.messages.title,
...e
}
);
}, t.TableCellProperties = ze, t.TableProperties = Je;
function A(e) {
return ke.createOutdentTool(e);
}
t.createOutdentTool = A;
class le extends A(n.outdent) {
}
t.Outdent = le, t.Print = (e) => /* @__PURE__ */ l.createElement(ye, { ...e }), t.Pdf = (e) => /* @__PURE__ */ l.createElement(Ue, { ...e }), t.SelectAll = (e) => /* @__PURE__ */ l.createElement(Ne, { ...e }), t.CleanFormatting = (e) => /* @__PURE__ */ l.createElement(ve, { ...e });
function x(e) {
return r.createAddRowBeforeTool(e);
}
t.createAddRowBeforeTool = x;
function C(e) {
return r.createAddRowAfterTool(e);
}
t.createAddRowAfterTool = C;
function w(e) {
return r.createAddColumnBeforeTool(e);
}
t.createAddColumnBeforeTool = w;
function L(e) {
return r.createAddColumnAfterTool(e);
}
t.createAddColumnAfterTool = L;
function S(e) {
return r.createDeleteRowTool(e);
}
t.createDeleteRowTool = S;
function T(e) {
return r.createDeleteColumnTool(e);
}
t.createDeleteColumnTool = T;
function R(e) {
return r.createDeleteTableTool(e);
}
t.createDeleteTableTool = R;
function b(e) {
return r.createMergeCellsTool(e);
}
t.createMergeCellsTool = b;
function D(e) {
return r.createSplitCellTool(e);
}
t.createSplitCellTool = D;
class oe extends x(n.addRowBefore) {
}
t.AddRowBefore = oe;
class ae extends C(n.addRowAfter) {
}
t.AddRowAfter = ae;
class ce extends w(n.addColumnBefore) {
}
t.AddColumnBefore = ce;
class se extends L(n.addColumnAfter) {
}
t.AddColumnAfter = se;
class ie extends S(n.deleteRow) {
}
t.DeleteRow = ie;
class me extends T(n.deleteColumn) {
}
t.DeleteColumn = me;
class ue extends R(n.deleteTable) {
}
t.DeleteTable = ue;
class de extends b(n.mergeCells) {
}
t.MergeCells = de;
class fe extends D(n.splitCell) {
}
t.SplitCell = fe;
function k(e) {
return Fe.createUnlinkTool(e);
}
t.createUnlinkTool = k;
class pe extends k(n.unlink) {
}
t.Unlink = pe;
function F(e) {
return Be.createViewHtmlTool(e);
}
t.createViewHtmlTool = F;
class Ie extends F(n.viewHtml) {
}
t.ViewHtml = Ie;
class ge extends Pe {
}
t.FindAndReplace = ge;
})(P || (P = {}));
export {
P as EditorTools
};