@progress/kendo-react-editor 12.2.1-develop.1 → 12.3.0-develop.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-react-editor.js +1 -1
- package/messages/index.js +1 -1
- package/messages/index.mjs +159 -143
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
- package/tools/index.js +1 -1
- package/tools/index.mjs +173 -142
- package/tools/lists-styled.js +1 -1
- package/tools/lists-styled.mjs +33 -30
package/tools/index.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const fe=require("react"),n=require("../config/toolsSettings.js"),pe=require("./insertTable/tool.js"),Ie=require("./insertTable/popup.js"),ye=require("./align.js"),be=require("./fontStyle.js"),U=require("./applyColor.js"),Ae=require("./formatBlock.js"),O=require("./history.js"),Ce=require("./indent.js"),xe=require("./inlineFormat.js"),Le=require("./insertImage.js"),ke=require("./insertLink.js"),we=require("./lists.js"),Re=require("./outdent.js"),r=require("./tableEdit.js"),qe=require("./unlink.js"),De=require("./viewHtml.js"),Ne=require("./print.js"),Fe=require("./pdf.js"),Be=require("./selectAll.js"),Ue=require("./cleanFormatting.js"),Oe=require("./findReplace.js"),P=require("./lists-styled.js"),l=require("@progress/kendo-svg-icons"),s=require("../messages/index.js"),Pe=require("./table-wizard/tableCellProperties.js"),ve=require("./table-wizard/tableProperties.js");function he(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const d=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(o,a,d.get?d:{enumerable:!0,get:()=>t[a]})}}return o.default=t,Object.freeze(o)}const i=he(fe);exports.EditorTools=void 0;(t=>{function o(e){return ye.createAlignTool(e)}t.createAlignTool=o;class a extends o(n.EditorToolsSettings.alignLeft){}t.AlignLeft=a;class d extends o(n.EditorToolsSettings.alignRight){}t.AlignRight=d;class v extends o(n.EditorToolsSettings.alignCenter){}t.AlignCenter=v;class h extends o(n.EditorToolsSettings.alignJustify){}t.AlignJustify=h;function m(e){return pe.InsertTableToolNS.createInsertTableTool(e)}t.createInsertTableTool=m;class H extends m(n.EditorToolsSettings.insertTable){}t.InsertTable=H;class K extends Ie.InsertTablePopupNS.InsertTablePopup{}t.InsertTablePopup=K;function u(e){return be.FontStyleToolNS.createStyleDropDownList(e)}t.createStyleDropDownList=u;class M extends u(n.EditorToolsSettings.fontSize){}t.FontSize=M;class V extends u(n.EditorToolsSettings.fontName){}t.FontName=V,t.ForeColor=e=>i.createElement(U.ApplyColorTool,{...n.EditorToolsSettings.foreColor,...e}),t.BackColor=e=>i.createElement(U.ApplyColorTool,{...n.EditorToolsSettings.backColor,...e});function f(e){return Ae.FormatBlockToolNS.createFormatBlockDropDownList(e)}t.createFormatBlockDropDownList=f;class j extends f(n.EditorToolsSettings.formatBlock){}t.FormatBlock=j;function p(e){return O.HistoryToolNS.createUndoTool(e)}t.createUndoTool=p;function I(e){return O.HistoryToolNS.createRedoTool(e)}t.createRedoTool=I;class z extends p(n.EditorToolsSettings.undo){}t.Undo=z;class J extends I(n.EditorToolsSettings.redo){}t.Redo=J;function y(e){return Ce.IndentToolNS.createIndentTool(e)}t.createIndentTool=y;class _ extends y(n.EditorToolsSettings.indent){}t.Indent=_;function c(e){return xe.InlineFormatToolNS.createInlineFormatTool(e)}t.createInlineFormatTool=c;class G extends c(n.EditorToolsSettings.bold){}t.Bold=G;class Q extends c(n.EditorToolsSettings.italic){}t.Italic=Q;class W extends c(n.EditorToolsSettings.underline){}t.Underline=W;class X extends c(n.EditorToolsSettings.strikethrough){}t.Strikethrough=X;class Y extends c(n.EditorToolsSettings.subscript){}t.Subscript=Y;class Z extends c(n.EditorToolsSettings.superscript){}t.Superscript=Z;function b(e){return Le.createInsertImageTool(e)}t.createInsertImageTool=b;class $ extends b(n.EditorToolsSettings.image){}t.InsertImage=$;function g(e){return ke.LinkToolNS.createLinkTool(e)}t.createLinkTool=g;class E extends g(n.EditorToolsSettings.link){}t.Link=E;class ee extends g(n.EditorToolsSettings.insertFile){}t.InsertFile=ee;function S(e){return we.ListToolNS.createListTool(e)}t.createListTool=S;class te extends S(n.EditorToolsSettings.orderedList){}t.OrderedList=te;class ne extends S(n.EditorToolsSettings.bulletList){}t.UnorderedList=ne,t.BulletedList=e=>{const T=[{icon:"list-unordered",svgIcon:l.listUnorderedIcon,textKey:s.keys.listStyleDisc,style:"disc"},{icon:"list-unordered-outline",svgIcon:l.listUnorderedOutlineIcon,textKey:s.keys.listStyleCircle,style:"circle"},{icon:"list-unordered-square",svgIcon:l.listUnorderedSquareIcon,textKey:s.keys.listStyleSquare,style:"square"}];return i.createElement(P.ListTool,{listType:n.EditorToolsSettings.bulletList.listType,items:T,icon:"list-unordered",svgIcon:l.listUnorderedIcon,titleKey:n.EditorToolsSettings.bulletList.messages.title,...e})},t.NumberedList=e=>{const T=[{icon:"list-ordered",svgIcon:l.listOrderedIcon,textKey:s.keys.listStyleDecimal},{icon:"list-roman-upper",svgIcon:l.listRomanUpperIcon,textKey:s.keys.listStyleUpperRoman,style:"upper-roman"},{icon:"list-roman-lower",svgIcon:l.listRomanLowerIcon,textKey:s.keys.listStyleLowerRoman,style:"lower-roman"},{icon:"list-latin-big",svgIcon:l.listLatinBigIcon,textKey:s.keys.listStyleUpperLatin,style:"upper-latin"},{icon:"list-latin-small",svgIcon:l.listLatinSmallIcon,textKey:s.keys.listStyleLowerLatin,style:"lower-latin"}];return i.createElement(P.ListTool,{listType:n.EditorToolsSettings.orderedList.listType,items:T,icon:"list-ordered",svgIcon:l.listOrderedIcon,titleKey:n.EditorToolsSettings.orderedList.messages.title,...e})},t.TableCellProperties=Pe.TableCellProperties,t.TableProperties=ve.TableProperties;function A(e){return Re.OutdentToolNS.createOutdentTool(e)}t.createOutdentTool=A;class le extends A(n.EditorToolsSettings.outdent){}t.Outdent=le,t.Print=e=>i.createElement(Ne.Print,{...e}),t.Pdf=e=>i.createElement(Fe.Pdf,{...e}),t.SelectAll=e=>i.createElement(Be.SelectAll,{...e}),t.CleanFormatting=e=>i.createElement(Ue.CleanFormatting,{...e});function C(e){return r.TableEditNS.createAddRowBeforeTool(e)}t.createAddRowBeforeTool=C;function x(e){return r.TableEditNS.createAddRowAfterTool(e)}t.createAddRowAfterTool=x;function L(e){return r.TableEditNS.createAddColumnBeforeTool(e)}t.createAddColumnBeforeTool=L;function k(e){return r.TableEditNS.createAddColumnAfterTool(e)}t.createAddColumnAfterTool=k;function w(e){return r.TableEditNS.createDeleteRowTool(e)}t.createDeleteRowTool=w;function R(e){return r.TableEditNS.createDeleteColumnTool(e)}t.createDeleteColumnTool=R;function q(e){return r.TableEditNS.createDeleteTableTool(e)}t.createDeleteTableTool=q;function D(e){return r.TableEditNS.createMergeCellsTool(e)}t.createMergeCellsTool=D;function N(e){return r.TableEditNS.createSplitCellTool(e)}t.createSplitCellTool=N;class oe extends C(n.EditorToolsSettings.addRowBefore){}t.AddRowBefore=oe;class re extends x(n.EditorToolsSettings.addRowAfter){}t.AddRowAfter=re;class se extends L(n.EditorToolsSettings.addColumnBefore){}t.AddColumnBefore=se;class ie extends k(n.EditorToolsSettings.addColumnAfter){}t.AddColumnAfter=ie;class ce extends w(n.EditorToolsSettings.deleteRow){}t.DeleteRow=ce;class ae extends R(n.EditorToolsSettings.deleteColumn){}t.DeleteColumn=ae;class de extends q(n.EditorToolsSettings.deleteTable){}t.DeleteTable=de;class ue extends D(n.EditorToolsSettings.mergeCells){}t.MergeCells=ue;class ge extends N(n.EditorToolsSettings.splitCell){}t.SplitCell=ge;function F(e){return qe.UnlinkToolNS.createUnlinkTool(e)}t.createUnlinkTool=F;class Se extends F(n.EditorToolsSettings.unlink){}t.Unlink=Se;function B(e){return De.ViewHtmlToolNS.createViewHtmlTool(e)}t.createViewHtmlTool=B;class Te extends B(n.EditorToolsSettings.viewHtml){}t.ViewHtml=Te;class me extends Oe.FindAndReplace{}t.FindAndReplace=me})(exports.EditorTools||(exports.EditorTools={}));
|
package/tools/index.mjs
CHANGED
|
@@ -5,273 +5,304 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as r from "react";
|
|
9
9
|
import { EditorToolsSettings as n } from "../config/toolsSettings.mjs";
|
|
10
|
-
import { InsertTableToolNS as
|
|
11
|
-
import { InsertTablePopupNS as
|
|
10
|
+
import { InsertTableToolNS as xe } from "./insertTable/tool.mjs";
|
|
11
|
+
import { InsertTablePopupNS as Se } from "./insertTable/popup.mjs";
|
|
12
12
|
import { createAlignTool as Ce } from "./align.mjs";
|
|
13
|
-
import { FontStyleToolNS as
|
|
13
|
+
import { FontStyleToolNS as ye } from "./fontStyle.mjs";
|
|
14
14
|
import { ApplyColorTool as B } from "./applyColor.mjs";
|
|
15
15
|
import { FormatBlockToolNS as Le } from "./formatBlock.mjs";
|
|
16
|
-
import { HistoryToolNS as
|
|
17
|
-
import { IndentToolNS as
|
|
16
|
+
import { HistoryToolNS as U } from "./history.mjs";
|
|
17
|
+
import { IndentToolNS as we } from "./indent.mjs";
|
|
18
18
|
import { InlineFormatToolNS as Te } from "./inlineFormat.mjs";
|
|
19
19
|
import { createInsertImageTool as Re } from "./insertImage.mjs";
|
|
20
20
|
import { LinkToolNS as be } from "./insertLink.mjs";
|
|
21
21
|
import { ListToolNS as De } from "./lists.mjs";
|
|
22
22
|
import { OutdentToolNS as ke } from "./outdent.mjs";
|
|
23
|
-
import { TableEditNS as
|
|
23
|
+
import { TableEditNS as l } from "./tableEdit.mjs";
|
|
24
24
|
import { UnlinkToolNS as Fe } from "./unlink.mjs";
|
|
25
25
|
import { ViewHtmlToolNS as Be } from "./viewHtml.mjs";
|
|
26
|
-
import { Print as
|
|
27
|
-
import { Pdf as
|
|
28
|
-
import { SelectAll as
|
|
29
|
-
import { CleanFormatting as
|
|
30
|
-
import { FindAndReplace as
|
|
31
|
-
import { ListTool as
|
|
32
|
-
import { listUnorderedIcon as
|
|
26
|
+
import { Print as Ue } from "./print.mjs";
|
|
27
|
+
import { Pdf as Ne } from "./pdf.mjs";
|
|
28
|
+
import { SelectAll as ve } from "./selectAll.mjs";
|
|
29
|
+
import { CleanFormatting as Pe } from "./cleanFormatting.mjs";
|
|
30
|
+
import { FindAndReplace as Ke } from "./findReplace.mjs";
|
|
31
|
+
import { ListTool as N } from "./lists-styled.mjs";
|
|
32
|
+
import { listUnorderedIcon as v, listOrderedIcon as P, listUnorderedOutlineIcon as Oe, listUnorderedSquareIcon as he, listRomanUpperIcon as He, listRomanLowerIcon as Ve, listLatinBigIcon as Me, listLatinSmallIcon as qe } from "@progress/kendo-svg-icons";
|
|
33
|
+
import { keys as o } from "../messages/index.mjs";
|
|
33
34
|
import { TableCellProperties as ze } from "./table-wizard/tableCellProperties.mjs";
|
|
34
35
|
import { TableProperties as Je } from "./table-wizard/tableProperties.mjs";
|
|
35
|
-
var
|
|
36
|
+
var K;
|
|
36
37
|
((t) => {
|
|
37
|
-
function
|
|
38
|
+
function c(e) {
|
|
38
39
|
return Ce(e);
|
|
39
40
|
}
|
|
40
|
-
t.createAlignTool =
|
|
41
|
-
class O extends
|
|
41
|
+
t.createAlignTool = c;
|
|
42
|
+
class O extends c(n.alignLeft) {
|
|
42
43
|
}
|
|
43
44
|
t.AlignLeft = O;
|
|
44
|
-
class h extends
|
|
45
|
+
class h extends c(n.alignRight) {
|
|
45
46
|
}
|
|
46
47
|
t.AlignRight = h;
|
|
47
|
-
class H extends
|
|
48
|
+
class H extends c(n.alignCenter) {
|
|
48
49
|
}
|
|
49
50
|
t.AlignCenter = H;
|
|
50
|
-
class V extends
|
|
51
|
+
class V extends c(n.alignJustify) {
|
|
51
52
|
}
|
|
52
53
|
t.AlignJustify = V;
|
|
53
|
-
function
|
|
54
|
-
return
|
|
54
|
+
function d(e) {
|
|
55
|
+
return xe.createInsertTableTool(e);
|
|
55
56
|
}
|
|
56
|
-
t.createInsertTableTool =
|
|
57
|
-
class M extends
|
|
57
|
+
t.createInsertTableTool = d;
|
|
58
|
+
class M extends d(n.insertTable) {
|
|
58
59
|
}
|
|
59
60
|
t.InsertTable = M;
|
|
60
|
-
class q extends
|
|
61
|
+
class q extends Se.InsertTablePopup {
|
|
61
62
|
}
|
|
62
63
|
t.InsertTablePopup = q;
|
|
63
|
-
function
|
|
64
|
-
return
|
|
64
|
+
function s(e) {
|
|
65
|
+
return ye.createStyleDropDownList(e);
|
|
65
66
|
}
|
|
66
|
-
t.createStyleDropDownList =
|
|
67
|
-
class z extends
|
|
67
|
+
t.createStyleDropDownList = s;
|
|
68
|
+
class z extends s(n.fontSize) {
|
|
68
69
|
}
|
|
69
70
|
t.FontSize = z;
|
|
70
|
-
class J extends
|
|
71
|
+
class J extends s(n.fontName) {
|
|
71
72
|
}
|
|
72
|
-
t.FontName = J, t.ForeColor = (e) => /* @__PURE__ */
|
|
73
|
-
function
|
|
73
|
+
t.FontName = J, t.ForeColor = (e) => /* @__PURE__ */ r.createElement(B, { ...n.foreColor, ...e }), t.BackColor = (e) => /* @__PURE__ */ r.createElement(B, { ...n.backColor, ...e });
|
|
74
|
+
function f(e) {
|
|
74
75
|
return Le.createFormatBlockDropDownList(e);
|
|
75
76
|
}
|
|
76
|
-
t.createFormatBlockDropDownList =
|
|
77
|
-
class $ extends
|
|
77
|
+
t.createFormatBlockDropDownList = f;
|
|
78
|
+
class $ extends f(n.formatBlock) {
|
|
78
79
|
}
|
|
79
80
|
t.FormatBlock = $;
|
|
80
|
-
function f(e) {
|
|
81
|
-
return y.createUndoTool(e);
|
|
82
|
-
}
|
|
83
|
-
t.createUndoTool = f;
|
|
84
81
|
function p(e) {
|
|
85
|
-
return
|
|
82
|
+
return U.createUndoTool(e);
|
|
86
83
|
}
|
|
87
|
-
t.
|
|
88
|
-
|
|
84
|
+
t.createUndoTool = p;
|
|
85
|
+
function I(e) {
|
|
86
|
+
return U.createRedoTool(e);
|
|
89
87
|
}
|
|
90
|
-
t.
|
|
91
|
-
class j extends p(n.
|
|
88
|
+
t.createRedoTool = I;
|
|
89
|
+
class j extends p(n.undo) {
|
|
92
90
|
}
|
|
93
|
-
t.
|
|
94
|
-
|
|
95
|
-
return Se.createIndentTool(e);
|
|
91
|
+
t.Undo = j;
|
|
92
|
+
class G extends I(n.redo) {
|
|
96
93
|
}
|
|
97
|
-
t.
|
|
98
|
-
|
|
94
|
+
t.Redo = G;
|
|
95
|
+
function g(e) {
|
|
96
|
+
return we.createIndentTool(e);
|
|
99
97
|
}
|
|
100
|
-
t.
|
|
101
|
-
|
|
98
|
+
t.createIndentTool = g;
|
|
99
|
+
class Q extends g(n.indent) {
|
|
100
|
+
}
|
|
101
|
+
t.Indent = Q;
|
|
102
|
+
function a(e) {
|
|
102
103
|
return Te.createInlineFormatTool(e);
|
|
103
104
|
}
|
|
104
|
-
t.createInlineFormatTool =
|
|
105
|
-
class
|
|
105
|
+
t.createInlineFormatTool = a;
|
|
106
|
+
class W extends a(n.bold) {
|
|
106
107
|
}
|
|
107
|
-
t.Bold =
|
|
108
|
-
class
|
|
108
|
+
t.Bold = W;
|
|
109
|
+
class X extends a(n.italic) {
|
|
109
110
|
}
|
|
110
|
-
t.Italic =
|
|
111
|
-
class
|
|
111
|
+
t.Italic = X;
|
|
112
|
+
class Y extends a(n.underline) {
|
|
112
113
|
}
|
|
113
|
-
t.Underline =
|
|
114
|
-
class
|
|
114
|
+
t.Underline = Y;
|
|
115
|
+
class Z extends a(n.strikethrough) {
|
|
115
116
|
}
|
|
116
|
-
t.Strikethrough =
|
|
117
|
-
class
|
|
117
|
+
t.Strikethrough = Z;
|
|
118
|
+
class _ extends a(n.subscript) {
|
|
118
119
|
}
|
|
119
|
-
t.Subscript =
|
|
120
|
-
class
|
|
120
|
+
t.Subscript = _;
|
|
121
|
+
class E extends a(n.superscript) {
|
|
121
122
|
}
|
|
122
|
-
t.Superscript =
|
|
123
|
-
function
|
|
123
|
+
t.Superscript = E;
|
|
124
|
+
function A(e) {
|
|
124
125
|
return Re(e);
|
|
125
126
|
}
|
|
126
|
-
t.createInsertImageTool =
|
|
127
|
-
class
|
|
127
|
+
t.createInsertImageTool = A;
|
|
128
|
+
class ee extends A(n.image) {
|
|
128
129
|
}
|
|
129
|
-
t.InsertImage =
|
|
130
|
-
function
|
|
130
|
+
t.InsertImage = ee;
|
|
131
|
+
function i(e) {
|
|
131
132
|
return be.createLinkTool(e);
|
|
132
133
|
}
|
|
133
|
-
t.createLinkTool =
|
|
134
|
-
class
|
|
134
|
+
t.createLinkTool = i;
|
|
135
|
+
class te extends i(n.link) {
|
|
135
136
|
}
|
|
136
|
-
t.Link =
|
|
137
|
-
class
|
|
137
|
+
t.Link = te;
|
|
138
|
+
class ne extends i(n.insertFile) {
|
|
138
139
|
}
|
|
139
|
-
t.InsertFile =
|
|
140
|
-
function
|
|
140
|
+
t.InsertFile = ne;
|
|
141
|
+
function m(e) {
|
|
141
142
|
return De.createListTool(e);
|
|
142
143
|
}
|
|
143
|
-
t.createListTool =
|
|
144
|
-
class
|
|
144
|
+
t.createListTool = m;
|
|
145
|
+
class le extends m(n.orderedList) {
|
|
145
146
|
}
|
|
146
|
-
t.OrderedList =
|
|
147
|
-
class re extends
|
|
147
|
+
t.OrderedList = le;
|
|
148
|
+
class re extends m(n.bulletList) {
|
|
148
149
|
}
|
|
149
150
|
t.UnorderedList = re, t.BulletedList = (e) => {
|
|
150
|
-
const
|
|
151
|
-
{ icon: "list-unordered", svgIcon:
|
|
152
|
-
{
|
|
153
|
-
|
|
151
|
+
const u = [
|
|
152
|
+
{ icon: "list-unordered", svgIcon: v, textKey: o.listStyleDisc, style: "disc" },
|
|
153
|
+
{
|
|
154
|
+
icon: "list-unordered-outline",
|
|
155
|
+
svgIcon: Oe,
|
|
156
|
+
textKey: o.listStyleCircle,
|
|
157
|
+
style: "circle"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
icon: "list-unordered-square",
|
|
161
|
+
svgIcon: he,
|
|
162
|
+
textKey: o.listStyleSquare,
|
|
163
|
+
style: "square"
|
|
164
|
+
}
|
|
154
165
|
];
|
|
155
|
-
return /* @__PURE__ */
|
|
156
|
-
|
|
166
|
+
return /* @__PURE__ */ r.createElement(
|
|
167
|
+
N,
|
|
157
168
|
{
|
|
158
169
|
listType: n.bulletList.listType,
|
|
159
|
-
items:
|
|
170
|
+
items: u,
|
|
160
171
|
icon: "list-unordered",
|
|
161
|
-
svgIcon:
|
|
172
|
+
svgIcon: v,
|
|
162
173
|
titleKey: n.bulletList.messages.title,
|
|
163
174
|
...e
|
|
164
175
|
}
|
|
165
176
|
);
|
|
166
177
|
}, t.NumberedList = (e) => {
|
|
167
|
-
const
|
|
168
|
-
{ icon: "list-ordered", svgIcon:
|
|
178
|
+
const u = [
|
|
179
|
+
{ icon: "list-ordered", svgIcon: P, textKey: o.listStyleDecimal },
|
|
169
180
|
// { icon: 'list-leading-zero', text: 'Decimal with leading zero', styleType: 'decimal-leading-zero' },
|
|
170
|
-
{
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
181
|
+
{
|
|
182
|
+
icon: "list-roman-upper",
|
|
183
|
+
svgIcon: He,
|
|
184
|
+
textKey: o.listStyleUpperRoman,
|
|
185
|
+
style: "upper-roman"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
icon: "list-roman-lower",
|
|
189
|
+
svgIcon: Ve,
|
|
190
|
+
textKey: o.listStyleLowerRoman,
|
|
191
|
+
style: "lower-roman"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
icon: "list-latin-big",
|
|
195
|
+
svgIcon: Me,
|
|
196
|
+
textKey: o.listStyleUpperLatin,
|
|
197
|
+
style: "upper-latin"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
icon: "list-latin-small",
|
|
201
|
+
svgIcon: qe,
|
|
202
|
+
textKey: o.listStyleLowerLatin,
|
|
203
|
+
style: "lower-latin"
|
|
204
|
+
}
|
|
174
205
|
];
|
|
175
|
-
return /* @__PURE__ */
|
|
176
|
-
|
|
206
|
+
return /* @__PURE__ */ r.createElement(
|
|
207
|
+
N,
|
|
177
208
|
{
|
|
178
209
|
listType: n.orderedList.listType,
|
|
179
|
-
items:
|
|
210
|
+
items: u,
|
|
180
211
|
icon: "list-ordered",
|
|
181
|
-
svgIcon:
|
|
212
|
+
svgIcon: P,
|
|
182
213
|
titleKey: n.orderedList.messages.title,
|
|
183
214
|
...e
|
|
184
215
|
}
|
|
185
216
|
);
|
|
186
217
|
}, t.TableCellProperties = ze, t.TableProperties = Je;
|
|
187
|
-
function
|
|
218
|
+
function x(e) {
|
|
188
219
|
return ke.createOutdentTool(e);
|
|
189
220
|
}
|
|
190
|
-
t.createOutdentTool =
|
|
191
|
-
class
|
|
221
|
+
t.createOutdentTool = x;
|
|
222
|
+
class oe extends x(n.outdent) {
|
|
192
223
|
}
|
|
193
|
-
t.Outdent =
|
|
194
|
-
function
|
|
195
|
-
return
|
|
224
|
+
t.Outdent = oe, t.Print = (e) => /* @__PURE__ */ r.createElement(Ue, { ...e }), t.Pdf = (e) => /* @__PURE__ */ r.createElement(Ne, { ...e }), t.SelectAll = (e) => /* @__PURE__ */ r.createElement(ve, { ...e }), t.CleanFormatting = (e) => /* @__PURE__ */ r.createElement(Pe, { ...e });
|
|
225
|
+
function S(e) {
|
|
226
|
+
return l.createAddRowBeforeTool(e);
|
|
196
227
|
}
|
|
197
|
-
t.createAddRowBeforeTool =
|
|
228
|
+
t.createAddRowBeforeTool = S;
|
|
198
229
|
function C(e) {
|
|
199
|
-
return
|
|
230
|
+
return l.createAddRowAfterTool(e);
|
|
200
231
|
}
|
|
201
232
|
t.createAddRowAfterTool = C;
|
|
202
|
-
function
|
|
203
|
-
return
|
|
233
|
+
function y(e) {
|
|
234
|
+
return l.createAddColumnBeforeTool(e);
|
|
204
235
|
}
|
|
205
|
-
t.createAddColumnBeforeTool =
|
|
236
|
+
t.createAddColumnBeforeTool = y;
|
|
206
237
|
function L(e) {
|
|
207
|
-
return
|
|
238
|
+
return l.createAddColumnAfterTool(e);
|
|
208
239
|
}
|
|
209
240
|
t.createAddColumnAfterTool = L;
|
|
210
|
-
function
|
|
211
|
-
return
|
|
241
|
+
function w(e) {
|
|
242
|
+
return l.createDeleteRowTool(e);
|
|
212
243
|
}
|
|
213
|
-
t.createDeleteRowTool =
|
|
244
|
+
t.createDeleteRowTool = w;
|
|
214
245
|
function T(e) {
|
|
215
|
-
return
|
|
246
|
+
return l.createDeleteColumnTool(e);
|
|
216
247
|
}
|
|
217
248
|
t.createDeleteColumnTool = T;
|
|
218
249
|
function R(e) {
|
|
219
|
-
return
|
|
250
|
+
return l.createDeleteTableTool(e);
|
|
220
251
|
}
|
|
221
252
|
t.createDeleteTableTool = R;
|
|
222
253
|
function b(e) {
|
|
223
|
-
return
|
|
254
|
+
return l.createMergeCellsTool(e);
|
|
224
255
|
}
|
|
225
256
|
t.createMergeCellsTool = b;
|
|
226
257
|
function D(e) {
|
|
227
|
-
return
|
|
258
|
+
return l.createSplitCellTool(e);
|
|
228
259
|
}
|
|
229
260
|
t.createSplitCellTool = D;
|
|
230
|
-
class
|
|
261
|
+
class ae extends S(n.addRowBefore) {
|
|
231
262
|
}
|
|
232
|
-
t.AddRowBefore =
|
|
233
|
-
class
|
|
263
|
+
t.AddRowBefore = ae;
|
|
264
|
+
class ce extends C(n.addRowAfter) {
|
|
234
265
|
}
|
|
235
|
-
t.AddRowAfter =
|
|
236
|
-
class
|
|
266
|
+
t.AddRowAfter = ce;
|
|
267
|
+
class se extends y(n.addColumnBefore) {
|
|
237
268
|
}
|
|
238
|
-
t.AddColumnBefore =
|
|
239
|
-
class
|
|
269
|
+
t.AddColumnBefore = se;
|
|
270
|
+
class ie extends L(n.addColumnAfter) {
|
|
240
271
|
}
|
|
241
|
-
t.AddColumnAfter =
|
|
242
|
-
class
|
|
272
|
+
t.AddColumnAfter = ie;
|
|
273
|
+
class me extends w(n.deleteRow) {
|
|
243
274
|
}
|
|
244
|
-
t.DeleteRow =
|
|
245
|
-
class
|
|
275
|
+
t.DeleteRow = me;
|
|
276
|
+
class ue extends T(n.deleteColumn) {
|
|
246
277
|
}
|
|
247
|
-
t.DeleteColumn =
|
|
248
|
-
class
|
|
278
|
+
t.DeleteColumn = ue;
|
|
279
|
+
class de extends R(n.deleteTable) {
|
|
249
280
|
}
|
|
250
|
-
t.DeleteTable =
|
|
251
|
-
class
|
|
281
|
+
t.DeleteTable = de;
|
|
282
|
+
class fe extends b(n.mergeCells) {
|
|
252
283
|
}
|
|
253
|
-
t.MergeCells =
|
|
254
|
-
class
|
|
284
|
+
t.MergeCells = fe;
|
|
285
|
+
class pe extends D(n.splitCell) {
|
|
255
286
|
}
|
|
256
|
-
t.SplitCell =
|
|
287
|
+
t.SplitCell = pe;
|
|
257
288
|
function k(e) {
|
|
258
289
|
return Fe.createUnlinkTool(e);
|
|
259
290
|
}
|
|
260
291
|
t.createUnlinkTool = k;
|
|
261
|
-
class
|
|
292
|
+
class Ie extends k(n.unlink) {
|
|
262
293
|
}
|
|
263
|
-
t.Unlink =
|
|
294
|
+
t.Unlink = Ie;
|
|
264
295
|
function F(e) {
|
|
265
296
|
return Be.createViewHtmlTool(e);
|
|
266
297
|
}
|
|
267
298
|
t.createViewHtmlTool = F;
|
|
268
|
-
class
|
|
299
|
+
class ge extends F(n.viewHtml) {
|
|
269
300
|
}
|
|
270
|
-
t.ViewHtml =
|
|
271
|
-
class
|
|
301
|
+
t.ViewHtml = ge;
|
|
302
|
+
class Ae extends Ke {
|
|
272
303
|
}
|
|
273
|
-
t.FindAndReplace =
|
|
274
|
-
})(
|
|
304
|
+
t.FindAndReplace = Ae;
|
|
305
|
+
})(K || (K = {}));
|
|
275
306
|
export {
|
|
276
|
-
|
|
307
|
+
K as EditorTools
|
|
277
308
|
};
|
package/tools/lists-styled.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react"),y=require("@progress/kendo-editor-common"),v=require("@progress/kendo-react-buttons"),x=require("../config/toolsSettings.js"),k=require("@progress/kendo-react-intl"),g=require("../messages/index.js");function T(s){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(i,t,n.get?n:{enumerable:!0,get:()=>s[t]})}}return i.default=s,Object.freeze(i)}const f=T(p),m=(s,i)=>{const{from:t,to:n}=s.selection;let l=null;return s.doc.nodesBetween(t,n,r=>(l=l||(r.type===i?r:null),!l)),l},I=s=>{let i=!1;const t=s.view,n=x.listsTypes,l=s.listType,r=k.useLocalization();let u=[...s.items||[]],c,a;if(t){const e=t.state,o=e&&e.schema.nodes;c=o&&m(e,o[n.orderedList]),a=o&&m(e,o[n.bulletList]),i=!!(l===n.orderedList?c&&!a:!c&&a)}const L=e=>{t&&(y.toggleList(t.state,t.dispatch,t,{listType:l,...n,listAttrs:{}},"InsertList"),t.focus())},S=e=>{if(t){const o=e.item.style?{style:"list-style-type: "+e.item.style+";"}:{},d=c||a;if(d&&y.listStyle(d.attrs)!==e.item.style){const b=t.state.selection.$head.posAtIndex(0,-2)-1;t.dispatch(t.state.tr.setNodeMarkup(b,t.state.schema.nodes[l],o))}else y.toggleList(t.state,t.dispatch,t,{listType:l,...n,listAttrs:o},"InsertList");t.focus()}};if(u=u.map(e=>({...e,text:e.textKey?r.toLanguageString(e.textKey,g.messages[e.textKey]):e.text})),i&&(c||a)){const e=y.listStyle((c||a).attrs);u=u.map((o,d)=>({...o,selected:e?o.style===e:d===0}))}return f.createElement("span",{onMouseDown:e=>{e.preventDefault()}},f.createElement(v.SplitButton,{textField:"text",items:u,icon:s.icon,svgIcon:s.svgIcon,onButtonClick:L,onItemClick:S,buttonClass:i?"k-selected":void 0,title:s.title!==void 0?s.title:r.toLanguageString(s.titleKey,g.messages[s.titleKey])}))};exports.ListTool=I;
|
package/tools/lists-styled.mjs
CHANGED
|
@@ -9,62 +9,65 @@ import * as u from "react";
|
|
|
9
9
|
import { listStyle as y, toggleList as f } from "@progress/kendo-editor-common";
|
|
10
10
|
import { SplitButton as h } from "@progress/kendo-react-buttons";
|
|
11
11
|
import { listsTypes as I } from "../config/toolsSettings.mjs";
|
|
12
|
-
import { useLocalization as
|
|
13
|
-
import { messages as
|
|
12
|
+
import { useLocalization as K } from "@progress/kendo-react-intl";
|
|
13
|
+
import { messages as g } from "../messages/index.mjs";
|
|
14
14
|
const L = (s, a) => {
|
|
15
|
-
const { from:
|
|
15
|
+
const { from: e, to: l } = s.selection;
|
|
16
16
|
let i = null;
|
|
17
|
-
return s.doc.nodesBetween(
|
|
18
|
-
},
|
|
17
|
+
return s.doc.nodesBetween(e, l, (r) => (i = i || (r.type === a ? r : null), !i)), i;
|
|
18
|
+
}, B = (s) => {
|
|
19
19
|
let a = !1;
|
|
20
|
-
const
|
|
21
|
-
let
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
24
|
-
n = o && L(
|
|
20
|
+
const e = s.view, l = I, i = s.listType, r = K();
|
|
21
|
+
let m = [...s.items || []], n, c;
|
|
22
|
+
if (e) {
|
|
23
|
+
const t = e.state, o = t && t.schema.nodes;
|
|
24
|
+
n = o && L(t, o[l.orderedList]), c = o && L(t, o[l.bulletList]), a = !!(i === l.orderedList ? n && !c : !n && c);
|
|
25
25
|
}
|
|
26
|
-
const p = (
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
if (
|
|
30
|
-
const o =
|
|
31
|
-
if (
|
|
32
|
-
const v =
|
|
33
|
-
|
|
26
|
+
const p = (t) => {
|
|
27
|
+
e && (f(e.state, e.dispatch, e, { listType: i, ...l, listAttrs: {} }, "InsertList"), e.focus());
|
|
28
|
+
}, x = (t) => {
|
|
29
|
+
if (e) {
|
|
30
|
+
const o = t.item.style ? { style: "list-style-type: " + t.item.style + ";" } : {}, d = n || c;
|
|
31
|
+
if (d && y(d.attrs) !== t.item.style) {
|
|
32
|
+
const v = e.state.selection.$head.posAtIndex(0, -2) - 1;
|
|
33
|
+
e.dispatch(e.state.tr.setNodeMarkup(v, e.state.schema.nodes[i], o));
|
|
34
34
|
} else
|
|
35
|
-
f(
|
|
36
|
-
|
|
35
|
+
f(e.state, e.dispatch, e, { listType: i, ...l, listAttrs: o }, "InsertList");
|
|
36
|
+
e.focus();
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
if (
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
if (m = m.map((t) => ({
|
|
40
|
+
...t,
|
|
41
|
+
text: t.textKey ? r.toLanguageString(t.textKey, g[t.textKey]) : t.text
|
|
42
|
+
})), a && (n || c)) {
|
|
43
|
+
const t = y((n || c).attrs);
|
|
44
|
+
m = m.map((o, d) => ({
|
|
42
45
|
...o,
|
|
43
|
-
selected:
|
|
46
|
+
selected: t ? o.style === t : d === 0
|
|
44
47
|
}));
|
|
45
48
|
}
|
|
46
49
|
return /* @__PURE__ */ u.createElement(
|
|
47
50
|
"span",
|
|
48
51
|
{
|
|
49
|
-
onMouseDown: (
|
|
50
|
-
|
|
52
|
+
onMouseDown: (t) => {
|
|
53
|
+
t.preventDefault();
|
|
51
54
|
}
|
|
52
55
|
},
|
|
53
56
|
/* @__PURE__ */ u.createElement(
|
|
54
57
|
h,
|
|
55
58
|
{
|
|
56
59
|
textField: "text",
|
|
57
|
-
items:
|
|
60
|
+
items: m,
|
|
58
61
|
icon: s.icon,
|
|
59
62
|
svgIcon: s.svgIcon,
|
|
60
63
|
onButtonClick: p,
|
|
61
|
-
onItemClick:
|
|
64
|
+
onItemClick: x,
|
|
62
65
|
buttonClass: a ? "k-selected" : void 0,
|
|
63
|
-
title: s.title !== void 0 ? s.title : r.toLanguageString(s.titleKey,
|
|
66
|
+
title: s.title !== void 0 ? s.title : r.toLanguageString(s.titleKey, g[s.titleKey])
|
|
64
67
|
}
|
|
65
68
|
)
|
|
66
69
|
);
|
|
67
70
|
};
|
|
68
71
|
export {
|
|
69
|
-
|
|
72
|
+
B as ListTool
|
|
70
73
|
};
|