@progress/kendo-react-editor 14.5.0-develop.9 → 15.0.0-develop.1
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/Editor.js +1 -1
- package/Editor.mjs +94 -78
- package/EditorMcpWrapper.d.ts +17 -0
- package/EditorMcpWrapper.js +8 -0
- package/EditorMcpWrapper.mjs +18 -0
- package/EditorProps.d.ts +17 -0
- package/README.md +4 -4
- package/dist/cdn/js/kendo-react-editor.js +1 -1
- package/index.d.mts +5 -3
- package/index.d.ts +5 -3
- package/index.js +1 -1
- package/index.mjs +138 -136
- package/messages/index.d.ts +4 -0
- package/messages/index.js +1 -1
- package/messages/index.mjs +202 -198
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
- package/tools/align.js +1 -1
- package/tools/align.mjs +19 -18
- package/tools/indent.js +1 -1
- package/tools/indent.mjs +18 -17
- package/tools/inlineFormat.js +1 -1
- package/tools/inlineFormat.mjs +23 -22
- package/tools/outdent.js +1 -1
- package/tools/outdent.mjs +23 -22
- package/tools/proseMirrorTool.js +1 -1
- package/tools/proseMirrorTool.mjs +19 -18
package/tools/indent.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 q=require("react"),y=require("@progress/kendo-react-buttons"),a=require("@progress/kendo-editor-common"),L=require("./utils.js"),S=require("@progress/kendo-react-intl"),k=require("../messages/index.js"),O=require("@progress/kendo-react-common");function j(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const d=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(e,s,d.get?d:{enumerable:!0,get:()=>o[s]})}}return e.default=o,Object.freeze(e)}const T=j(q);exports.IndentToolNS=void 0;(o=>{o.createIndentTool=e=>{const s=class extends T.Component{render(){const{view:t,render:p,...l}=this.props,I=l.dir,n=t&&t.state,c=n&&n.schema.nodes,r=c&&c[e.listsTypes.listItem],u=e.actions,b=!!n&&!!r&&(a.isIndented(n,u,I)||u.some(v=>c&&c[v.node]&&a.hasNode(n,c[v.node])))&&!a.hasNode(n,r),f=!!n&&a.canIndentAsListItem(n,r),h=b||f,g=S.provideLocalizationService(this),i=e.messages.title,m=!h,N=T.createElement(y.Button,{onClick:m?void 0:()=>{t&&f&&r?a.sinkListItem(r)(t.state,t.dispatch):t&&b&&a.indentBlocks(u,e.commandName,I)(t.state,t.dispatch)},"aria-disabled":m?!0:void 0,title:g.toLanguageString(i,k.messages[i]),"aria-label":g.toLanguageString(i,k.messages[i]),...L.onDownPreventDefault,...e.props,...l,className:O.classNames(l.className,e.props.className,{"k-disabled":m})});return p?p.call(void 0,N,{view:t}):N}};return S.registerForLocalization(s),s}})(exports.IndentToolNS||(exports.IndentToolNS={}));
|
package/tools/indent.mjs
CHANGED
|
@@ -5,38 +5,39 @@
|
|
|
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 L from "react";
|
|
9
9
|
import { Button as k } from "@progress/kendo-react-buttons";
|
|
10
|
-
import { isIndented as
|
|
10
|
+
import { isIndented as S, hasNode as N, canIndentAsListItem as z, sinkListItem as w, indentBlocks as x } from "@progress/kendo-editor-common";
|
|
11
11
|
import { onDownPreventDefault as y } from "./utils.mjs";
|
|
12
12
|
import { registerForLocalization as B, provideLocalizationService as C } from "@progress/kendo-react-intl";
|
|
13
|
-
import { messages as
|
|
14
|
-
import { classNames as
|
|
13
|
+
import { messages as b } from "../messages/index.mjs";
|
|
14
|
+
import { classNames as D } from "@progress/kendo-react-common";
|
|
15
15
|
var h;
|
|
16
|
-
((
|
|
17
|
-
|
|
18
|
-
const
|
|
16
|
+
((T) => {
|
|
17
|
+
T.createIndentTool = (e) => {
|
|
18
|
+
const d = class extends L.Component {
|
|
19
19
|
render() {
|
|
20
|
-
const { view: t, render:
|
|
20
|
+
const { view: t, render: l, ...i } = this.props, m = i.dir, o = t && t.state, n = o && o.schema.nodes, s = n && n[e.listsTypes.listItem], r = e.actions, p = !!o && !!s && (S(o, r, m) || r.some((v) => n && n[v.node] && N(o, n[v.node]))) && !N(o, s), I = !!o && z(o, s), g = p || I, f = C(this), a = e.messages.title, c = !g, u = /* @__PURE__ */ L.createElement(
|
|
21
21
|
k,
|
|
22
22
|
{
|
|
23
|
-
onClick:
|
|
24
|
-
t &&
|
|
23
|
+
onClick: c ? void 0 : () => {
|
|
24
|
+
t && I && s ? w(s)(t.state, t.dispatch) : t && p && x(r, e.commandName, m)(t.state, t.dispatch);
|
|
25
25
|
},
|
|
26
|
-
"aria-disabled":
|
|
27
|
-
title:
|
|
26
|
+
"aria-disabled": c ? !0 : void 0,
|
|
27
|
+
title: f.toLanguageString(a, b[a]),
|
|
28
|
+
"aria-label": f.toLanguageString(a, b[a]),
|
|
28
29
|
...y,
|
|
29
30
|
...e.props,
|
|
30
|
-
...
|
|
31
|
-
className:
|
|
32
|
-
"k-disabled":
|
|
31
|
+
...i,
|
|
32
|
+
className: D(i.className, e.props.className, {
|
|
33
|
+
"k-disabled": c
|
|
33
34
|
})
|
|
34
35
|
}
|
|
35
36
|
);
|
|
36
|
-
return
|
|
37
|
+
return l ? l.call(void 0, u, { view: t }) : u;
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
|
-
return B(
|
|
40
|
+
return B(d), d;
|
|
40
41
|
};
|
|
41
42
|
})(h || (h = {}));
|
|
42
43
|
export {
|
package/tools/inlineFormat.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 v=require("react"),T=require("@progress/kendo-react-buttons"),m=require("@progress/kendo-editor-common"),y=require("./utils.js"),d=require("@progress/kendo-react-intl"),g=require("../messages/index.js");function I(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const l=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>t[o]})}}return e.default=t,Object.freeze(e)}const p=I(v);exports.InlineFormatToolNS=void 0;(t=>{t.createInlineFormatTool=e=>{const o=class extends p.Component{render(){const{view:n,render:c,...b}=this.props,r=n&&n.state,{mark:f,altMarks:S,altStyle:k}=e,i={mark:f,altMarks:S,altStyle:k},s=d.provideLocalizationService(this),a=e.messages.title,u=p.createElement(T.Button,{onClick:()=>n&&m.toggleInlineFormat(i,r&&r.tr.setMeta("commandName",e.commandName))(n.state,n.dispatch),selected:!!r&&m.hasMark(r,i),togglable:!0,...y.onDownPreventDefault,title:s.toLanguageString(a,g.messages[a]),"aria-label":s.toLanguageString(a,g.messages[a]),...e.props,...b});return c?c.call(void 0,u,{view:n}):u}};return d.registerForLocalization(o),o}})(exports.InlineFormatToolNS||(exports.InlineFormatToolNS={}));
|
package/tools/inlineFormat.mjs
CHANGED
|
@@ -5,38 +5,39 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
9
|
-
import { Button as
|
|
10
|
-
import { hasMark as
|
|
11
|
-
import { onDownPreventDefault as
|
|
12
|
-
import { registerForLocalization as
|
|
13
|
-
import { messages as
|
|
14
|
-
var
|
|
15
|
-
((
|
|
16
|
-
|
|
17
|
-
const
|
|
8
|
+
import * as m from "react";
|
|
9
|
+
import { Button as S } from "@progress/kendo-react-buttons";
|
|
10
|
+
import { hasMark as b, toggleInlineFormat as h } from "@progress/kendo-editor-common";
|
|
11
|
+
import { onDownPreventDefault as k } from "./utils.mjs";
|
|
12
|
+
import { registerForLocalization as F, provideLocalizationService as I } from "@progress/kendo-react-intl";
|
|
13
|
+
import { messages as c } from "../messages/index.mjs";
|
|
14
|
+
var p;
|
|
15
|
+
((g) => {
|
|
16
|
+
g.createInlineFormatTool = (o) => {
|
|
17
|
+
const a = class extends m.Component {
|
|
18
18
|
render() {
|
|
19
|
-
const { view: t, render:
|
|
20
|
-
|
|
19
|
+
const { view: t, render: n, ...u } = this.props, e = t && t.state, { mark: d, altMarks: f, altStyle: v } = o, l = { mark: d, altMarks: f, altStyle: v }, i = I(this), r = o.messages.title, s = /* @__PURE__ */ m.createElement(
|
|
20
|
+
S,
|
|
21
21
|
{
|
|
22
|
-
onClick: () => t &&
|
|
23
|
-
|
|
22
|
+
onClick: () => t && h(
|
|
23
|
+
l,
|
|
24
24
|
e && e.tr.setMeta("commandName", o.commandName)
|
|
25
25
|
)(t.state, t.dispatch),
|
|
26
|
-
selected: !!e &&
|
|
26
|
+
selected: !!e && b(e, l),
|
|
27
27
|
togglable: !0,
|
|
28
|
-
...
|
|
29
|
-
title:
|
|
28
|
+
...k,
|
|
29
|
+
title: i.toLanguageString(r, c[r]),
|
|
30
|
+
"aria-label": i.toLanguageString(r, c[r]),
|
|
30
31
|
...o.props,
|
|
31
|
-
...
|
|
32
|
+
...u
|
|
32
33
|
}
|
|
33
34
|
);
|
|
34
|
-
return
|
|
35
|
+
return n ? n.call(void 0, s, { view: t }) : s;
|
|
35
36
|
}
|
|
36
37
|
};
|
|
37
|
-
return
|
|
38
|
+
return F(a), a;
|
|
38
39
|
};
|
|
39
|
-
})(
|
|
40
|
+
})(p || (p = {}));
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
p as InlineFormatToolNS
|
|
42
43
|
};
|
package/tools/outdent.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 y=require("react"),N=require("@progress/kendo-react-buttons"),c=require("@progress/kendo-editor-common"),k=require("./utils.js"),T=require("@progress/kendo-react-intl"),v=require("../messages/index.js"),q=require("@progress/kendo-react-common");function L(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>o[n]})}}return e.default=o,Object.freeze(e)}const S=L(y);exports.OutdentToolNS=void 0;(o=>{o.createOutdentTool=e=>{const n=class extends S.Component{render(){const{view:t,render:d,...r}=this.props,s=t&&t.state,u=r.dir,m=!!s&&c.isIndented(s,e.actions,u),p=s&&s.schema.nodes[e.listsTypes.listItem],b=!!s&&c.canOutdentAsListItem(s,{nodes:e.actions,listsTypes:e.listsTypes}),g=m||b,f=T.provideLocalizationService(this),a=e.messages.title,l=!g,O=S.createElement(N.Button,{onClick:l?void 0:()=>{t&&b&&p?c.liftListItem(p)(t.state,t.dispatch):t&&m&&c.indentBlocks(e.actions,e.commandName,u)(t.state,t.dispatch)},"aria-disabled":l?!0:void 0,title:f.toLanguageString(a,v.messages[a]),"aria-label":f.toLanguageString(a,v.messages[a]),...k.onDownPreventDefault,...e.props,...r,className:q.classNames(r.className,e.props.className,{"k-disabled":l})});return d?d.call(void 0,O,{view:t}):O}};return T.registerForLocalization(n),n}})(exports.OutdentToolNS||(exports.OutdentToolNS={}));
|
package/tools/outdent.mjs
CHANGED
|
@@ -5,44 +5,45 @@
|
|
|
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 f from "react";
|
|
9
9
|
import { Button as N } from "@progress/kendo-react-buttons";
|
|
10
|
-
import { isIndented as O, canOutdentAsListItem as
|
|
11
|
-
import { onDownPreventDefault as
|
|
10
|
+
import { isIndented as O, canOutdentAsListItem as h, liftListItem as I, indentBlocks as y } from "@progress/kendo-editor-common";
|
|
11
|
+
import { onDownPreventDefault as S } from "./utils.mjs";
|
|
12
12
|
import { registerForLocalization as k, provideLocalizationService as z } from "@progress/kendo-react-intl";
|
|
13
|
-
import { messages as
|
|
13
|
+
import { messages as v } from "../messages/index.mjs";
|
|
14
14
|
import { classNames as w } from "@progress/kendo-react-common";
|
|
15
|
-
var
|
|
16
|
-
((
|
|
17
|
-
|
|
18
|
-
const
|
|
15
|
+
var L;
|
|
16
|
+
((T) => {
|
|
17
|
+
T.createOutdentTool = (t) => {
|
|
18
|
+
const i = class extends f.Component {
|
|
19
19
|
render() {
|
|
20
|
-
const { view: o, render:
|
|
20
|
+
const { view: o, render: r, ...a } = this.props, e = o && o.state, c = a.dir, l = !!e && O(e, t.actions, c), d = e && e.schema.nodes[t.listsTypes.listItem], m = !!e && h(e, { nodes: t.actions, listsTypes: t.listsTypes }), b = l || m, p = z(this), s = t.messages.title, n = !b, u = /* @__PURE__ */ f.createElement(
|
|
21
21
|
N,
|
|
22
22
|
{
|
|
23
|
-
onClick:
|
|
24
|
-
o &&
|
|
23
|
+
onClick: n ? void 0 : () => {
|
|
24
|
+
o && m && d ? I(d)(o.state, o.dispatch) : o && l && y(
|
|
25
25
|
t.actions,
|
|
26
26
|
t.commandName,
|
|
27
|
-
|
|
27
|
+
c
|
|
28
28
|
)(o.state, o.dispatch);
|
|
29
29
|
},
|
|
30
|
-
"aria-disabled":
|
|
31
|
-
title:
|
|
32
|
-
|
|
30
|
+
"aria-disabled": n ? !0 : void 0,
|
|
31
|
+
title: p.toLanguageString(s, v[s]),
|
|
32
|
+
"aria-label": p.toLanguageString(s, v[s]),
|
|
33
|
+
...S,
|
|
33
34
|
...t.props,
|
|
34
|
-
...
|
|
35
|
-
className: w(
|
|
36
|
-
"k-disabled":
|
|
35
|
+
...a,
|
|
36
|
+
className: w(a.className, t.props.className, {
|
|
37
|
+
"k-disabled": n
|
|
37
38
|
})
|
|
38
39
|
}
|
|
39
40
|
);
|
|
40
|
-
return
|
|
41
|
+
return r ? r.call(void 0, u, { view: o }) : u;
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
|
-
return k(
|
|
44
|
+
return k(i), i;
|
|
44
45
|
};
|
|
45
|
-
})(
|
|
46
|
+
})(L || (L = {}));
|
|
46
47
|
export {
|
|
47
|
-
|
|
48
|
+
L as OutdentToolNS
|
|
48
49
|
};
|
package/tools/proseMirrorTool.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 f=require("react"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),v=require("@progress/kendo-react-buttons"),P=require("./utils.js"),m=require("@progress/kendo-react-intl"),p=require("../messages/index.js"),N=require("@progress/kendo-react-common");function S(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const b=S(f),k=(e,o)=>{const t=class extends b.Component{render(){const{view:r,render:c,...i}=this.props,l=m.provideLocalizationService(this),a=e.messages.title,u=r&&r.state,s=u?!o(u):!1,d=b.createElement(v.Button,{onClick:s?void 0:()=>r&&o(r.state,g=>r.dispatch(g.setMeta("commandName",e.commandName))),"aria-disabled":s?!0:void 0,...P.onDownPreventDefault,title:l.toLanguageString(a,p.messages[a]),"aria-label":l.toLanguageString(a,p.messages[a]),...e.props,...i,className:N.classNames(i.className,e.props.className,{"k-disabled":s})});return c?c.call(void 0,d,{view:r}):d}};return m.registerForLocalization(t),t};exports.createProseMirrorTool=k;
|
|
@@ -5,35 +5,36 @@
|
|
|
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 p from "react";
|
|
9
9
|
import { Button as f } from "@progress/kendo-react-buttons";
|
|
10
|
-
import { onDownPreventDefault as
|
|
11
|
-
import { registerForLocalization as
|
|
12
|
-
import { messages as
|
|
13
|
-
import { classNames as
|
|
14
|
-
const
|
|
15
|
-
const
|
|
10
|
+
import { onDownPreventDefault as v } from "./utils.mjs";
|
|
11
|
+
import { registerForLocalization as b, provideLocalizationService as g } from "@progress/kendo-react-intl";
|
|
12
|
+
import { messages as d } from "../messages/index.mjs";
|
|
13
|
+
import { classNames as N } from "@progress/kendo-react-common";
|
|
14
|
+
const T = (e, a) => {
|
|
15
|
+
const s = class extends p.Component {
|
|
16
16
|
render() {
|
|
17
|
-
const { view: o, render:
|
|
17
|
+
const { view: o, render: i, ...n } = this.props, l = g(this), t = e.messages.title, c = o && o.state, r = c ? !a(c) : !1, m = /* @__PURE__ */ p.createElement(
|
|
18
18
|
f,
|
|
19
19
|
{
|
|
20
|
-
onClick:
|
|
20
|
+
onClick: r ? void 0 : () => o && a(
|
|
21
21
|
o.state,
|
|
22
|
-
(
|
|
22
|
+
(u) => o.dispatch(u.setMeta("commandName", e.commandName))
|
|
23
23
|
),
|
|
24
|
-
"aria-disabled":
|
|
25
|
-
...
|
|
26
|
-
title:
|
|
24
|
+
"aria-disabled": r ? !0 : void 0,
|
|
25
|
+
...v,
|
|
26
|
+
title: l.toLanguageString(t, d[t]),
|
|
27
|
+
"aria-label": l.toLanguageString(t, d[t]),
|
|
27
28
|
...e.props,
|
|
28
|
-
...
|
|
29
|
-
className:
|
|
29
|
+
...n,
|
|
30
|
+
className: N(n.className, e.props.className, { "k-disabled": r })
|
|
30
31
|
}
|
|
31
32
|
);
|
|
32
|
-
return
|
|
33
|
+
return i ? i.call(void 0, m, { view: o }) : m;
|
|
33
34
|
}
|
|
34
35
|
};
|
|
35
|
-
return
|
|
36
|
+
return b(s), s;
|
|
36
37
|
};
|
|
37
38
|
export {
|
|
38
|
-
|
|
39
|
+
T as createProseMirrorTool
|
|
39
40
|
};
|