@progress/kendo-react-editor 5.4.0-dev.202205200719 → 5.4.0-dev.202206061009
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/dist/es/Editor.d.ts +5 -5
- package/dist/es/Editor.js +25 -11
- package/dist/es/EditorProps.d.ts +1 -1
- package/dist/es/EditorProps.js +1 -0
- package/dist/es/config/pasteSettings.js +1 -0
- package/dist/es/config/shortcuts.d.ts +6 -6
- package/dist/es/config/shortcuts.js +1 -1
- package/dist/es/config/toolsSettings.js +23 -14
- package/dist/es/dialogs/EditorDialogProps.js +1 -0
- package/dist/es/dialogs/FindReplace.d.ts +1 -1
- package/dist/es/dialogs/FindReplace.js +6 -5
- package/dist/es/dialogs/insertImage.d.ts +1 -1
- package/dist/es/dialogs/insertImage.js +13 -2
- package/dist/es/dialogs/insertLink.d.ts +1 -1
- package/dist/es/dialogs/insertLink.js +13 -2
- package/dist/es/dialogs/main.js +3 -1
- package/dist/es/dialogs/viewHtml.d.ts +1 -1
- package/dist/es/dialogs/viewHtml.js +13 -2
- package/dist/es/main.d.ts +3 -3
- package/dist/es/main.js +116 -29
- package/dist/es/messages/index.d.ts +78 -391
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/tools/ToolProps.d.ts +4 -1
- package/dist/es/tools/ToolProps.js +1 -0
- package/dist/es/tools/align.js +7 -3
- package/dist/es/tools/cleanFormatting.js +5 -3
- package/dist/es/tools/findReplace.d.ts +1 -1
- package/dist/es/tools/findReplace.js +7 -3
- package/dist/es/tools/fontStyle.js +7 -3
- package/dist/es/tools/formatBlock.js +7 -3
- package/dist/es/tools/indent.js +7 -3
- package/dist/es/tools/inlineFormat.js +7 -3
- package/dist/es/tools/insertImage.js +7 -3
- package/dist/es/tools/insertLink.js +7 -3
- package/dist/es/tools/insertTable/popup.js +3 -1
- package/dist/es/tools/insertTable/popupGrid.js +4 -2
- package/dist/es/tools/insertTable/tool.js +7 -3
- package/dist/es/tools/lists-styled.js +13 -4
- package/dist/es/tools/lists.js +7 -3
- package/dist/es/tools/main.d.ts +113 -112
- package/dist/es/tools/main.js +3 -1
- package/dist/es/tools/outdent.js +7 -3
- package/dist/es/tools/pdf.js +6 -4
- package/dist/es/tools/print.js +5 -3
- package/dist/es/tools/proseMirrorTool.js +7 -3
- package/dist/es/tools/selectAll.js +5 -3
- package/dist/es/tools/tableEdit.d.ts +8 -8
- package/dist/es/tools/unlink.js +7 -3
- package/dist/es/tools/utils.d.ts +1 -1
- package/dist/es/tools/viewHtml.js +7 -3
- package/dist/es/utils/controlled-value.d.ts +1 -2
- package/dist/npm/Editor.d.ts +5 -5
- package/dist/npm/Editor.js +35 -20
- package/dist/npm/EditorProps.d.ts +1 -1
- package/dist/npm/config/defaultStyles.js +1 -0
- package/dist/npm/config/schema.js +3 -2
- package/dist/npm/config/shortcuts.d.ts +6 -6
- package/dist/npm/config/shortcuts.js +7 -5
- package/dist/npm/config/toolsSettings.js +24 -14
- package/dist/npm/dialogs/FindReplace.d.ts +1 -1
- package/dist/npm/dialogs/FindReplace.js +15 -13
- package/dist/npm/dialogs/insertImage.d.ts +1 -1
- package/dist/npm/dialogs/insertImage.js +17 -5
- package/dist/npm/dialogs/insertLink.d.ts +1 -1
- package/dist/npm/dialogs/insertLink.js +18 -6
- package/dist/npm/dialogs/main.js +4 -1
- package/dist/npm/dialogs/viewHtml.d.ts +1 -1
- package/dist/npm/dialogs/viewHtml.js +19 -7
- package/dist/npm/main.d.ts +3 -3
- package/dist/npm/main.js +121 -33
- package/dist/npm/messages/index.d.ts +78 -391
- package/dist/npm/messages/index.js +2 -1
- package/dist/npm/package-metadata.js +2 -1
- package/dist/npm/tools/ToolProps.d.ts +4 -1
- package/dist/npm/tools/align.js +14 -8
- package/dist/npm/tools/applyColor.js +5 -3
- package/dist/npm/tools/cleanFormatting.js +10 -6
- package/dist/npm/tools/findReplace.d.ts +1 -1
- package/dist/npm/tools/findReplace.js +10 -5
- package/dist/npm/tools/fontStyle.js +12 -7
- package/dist/npm/tools/formatBlock.js +12 -7
- package/dist/npm/tools/history.js +3 -2
- package/dist/npm/tools/indent.js +16 -11
- package/dist/npm/tools/inlineFormat.js +12 -7
- package/dist/npm/tools/insertImage.js +13 -7
- package/dist/npm/tools/insertLink.js +11 -6
- package/dist/npm/tools/insertTable/index.js +3 -2
- package/dist/npm/tools/insertTable/popup.js +4 -1
- package/dist/npm/tools/insertTable/popupGrid.js +5 -3
- package/dist/npm/tools/insertTable/tool.js +13 -8
- package/dist/npm/tools/lists-styled.js +18 -7
- package/dist/npm/tools/lists.js +12 -7
- package/dist/npm/tools/main.d.ts +113 -112
- package/dist/npm/tools/main.js +4 -1
- package/dist/npm/tools/outdent.js +14 -9
- package/dist/npm/tools/pdf.js +10 -6
- package/dist/npm/tools/print.js +9 -5
- package/dist/npm/tools/proseMirrorTool.js +12 -6
- package/dist/npm/tools/selectAll.js +10 -6
- package/dist/npm/tools/tableEdit.d.ts +8 -8
- package/dist/npm/tools/tableEdit.js +14 -13
- package/dist/npm/tools/unlink.js +12 -7
- package/dist/npm/tools/utils.d.ts +1 -1
- package/dist/npm/tools/utils.js +1 -0
- package/dist/npm/tools/viewHtml.js +10 -5
- package/dist/npm/utils/browser-detection.js +1 -0
- package/dist/npm/utils/controlled-value.d.ts +1 -2
- package/dist/npm/utils/controlled-value.js +3 -1
- package/dist/npm/utils/index.js +37 -36
- package/dist/npm/utils/props-key.js +1 -0
- package/dist/systemjs/kendo-react-editor.js +1 -1
- package/package.json +13 -13
package/dist/es/tools/main.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
package/dist/es/tools/outdent.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -27,8 +29,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
27
29
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
30
|
t[p] = s[p];
|
|
29
31
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
31
|
-
|
|
32
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
+
t[p[i]] = s[p[i]];
|
|
35
|
+
}
|
|
32
36
|
return t;
|
|
33
37
|
};
|
|
34
38
|
import * as React from 'react';
|
package/dist/es/tools/pdf.js
CHANGED
|
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
15
|
t[p] = s[p];
|
|
16
16
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
18
|
-
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
19
21
|
return t;
|
|
20
22
|
};
|
|
21
23
|
import * as React from 'react';
|
|
@@ -34,9 +36,9 @@ export var Pdf = function (props) {
|
|
|
34
36
|
var titleKey = settings.messages.title;
|
|
35
37
|
var onClick = React.useCallback(function () {
|
|
36
38
|
if (view) {
|
|
37
|
-
savePDF(view.dom, __assign({}, defaultSavePdfOptions, (savePdfOptions || {})), savePdfCallback);
|
|
39
|
+
savePDF(view.dom, __assign(__assign({}, defaultSavePdfOptions), (savePdfOptions || {})), savePdfCallback);
|
|
38
40
|
}
|
|
39
41
|
}, [view, savePdfOptions, savePdfCallback]);
|
|
40
42
|
var button = (React.createElement(Button, __assign({ onClick: onClick, title: useLocalization().toLanguageString(titleKey, messages[titleKey]) }, onDownPreventDefault, settings.props, buttonProps)));
|
|
41
|
-
return render ? render.call(undefined, button, { view: view }) : button;
|
|
43
|
+
return (render ? render.call(undefined, button, { view: view }) : button);
|
|
42
44
|
};
|
package/dist/es/tools/print.js
CHANGED
|
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
15
|
t[p] = s[p];
|
|
16
16
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
18
|
-
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
19
21
|
return t;
|
|
20
22
|
};
|
|
21
23
|
import * as React from 'react';
|
|
@@ -40,5 +42,5 @@ export var Print = function (props) {
|
|
|
40
42
|
}
|
|
41
43
|
}, [editorWindow]);
|
|
42
44
|
var button = (React.createElement(Button, __assign({ onClick: onClick, disabled: !editorWindow || editorWindow === window, title: useLocalization().toLanguageString(titleKey, messages[titleKey]) }, onDownPreventDefault, settings.props, buttonProps)));
|
|
43
|
-
return render ? render.call(undefined, button, { view: view }) : button;
|
|
45
|
+
return (render ? render.call(undefined, button, { view: view }) : button);
|
|
44
46
|
};
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -27,8 +29,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
27
29
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
30
|
t[p] = s[p];
|
|
29
31
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
31
|
-
|
|
32
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
+
t[p[i]] = s[p[i]];
|
|
35
|
+
}
|
|
32
36
|
return t;
|
|
33
37
|
};
|
|
34
38
|
import * as React from 'react';
|
|
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
15
|
t[p] = s[p];
|
|
16
16
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
18
|
-
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
19
21
|
return t;
|
|
20
22
|
};
|
|
21
23
|
import * as React from 'react';
|
|
@@ -39,5 +41,5 @@ export var SelectAll = function (props) {
|
|
|
39
41
|
}
|
|
40
42
|
}, [view]);
|
|
41
43
|
var button = (React.createElement(Button, __assign({ onClick: onClick, title: useLocalization().toLanguageString(titleKey, messages[titleKey]) }, onDownPreventDefault, settings.props, buttonProps)));
|
|
42
|
-
return render ? render.call(undefined, button, { view: view }) : button;
|
|
44
|
+
return (render ? render.call(undefined, button, { view: view }) : button);
|
|
43
45
|
};
|
|
@@ -57,33 +57,33 @@ export declare namespace TableEditNS {
|
|
|
57
57
|
/**
|
|
58
58
|
* @hidden
|
|
59
59
|
*/
|
|
60
|
-
const createAddRowAfterTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps
|
|
60
|
+
const createAddRowAfterTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
61
61
|
/**
|
|
62
62
|
* @hidden
|
|
63
63
|
*/
|
|
64
|
-
const createAddColumnBeforeTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps
|
|
64
|
+
const createAddColumnBeforeTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
65
65
|
/**
|
|
66
66
|
* @hidden
|
|
67
67
|
*/
|
|
68
|
-
const createAddColumnAfterTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps
|
|
68
|
+
const createAddColumnAfterTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
69
69
|
/**
|
|
70
70
|
* @hidden
|
|
71
71
|
*/
|
|
72
|
-
const createDeleteRowTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps
|
|
72
|
+
const createDeleteRowTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
73
73
|
/**
|
|
74
74
|
* @hidden
|
|
75
75
|
*/
|
|
76
|
-
const createDeleteColumnTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps
|
|
76
|
+
const createDeleteColumnTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
77
77
|
/**
|
|
78
78
|
* @hidden
|
|
79
79
|
*/
|
|
80
|
-
const createDeleteTableTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps
|
|
80
|
+
const createDeleteTableTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
81
81
|
/**
|
|
82
82
|
* @hidden
|
|
83
83
|
*/
|
|
84
|
-
const createMergeCellsTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps
|
|
84
|
+
const createMergeCellsTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
85
85
|
/**
|
|
86
86
|
* @hidden
|
|
87
87
|
*/
|
|
88
|
-
const createSplitCellTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps
|
|
88
|
+
const createSplitCellTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
89
89
|
}
|
package/dist/es/tools/unlink.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -27,8 +29,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
27
29
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
30
|
t[p] = s[p];
|
|
29
31
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
31
|
-
|
|
32
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
+
t[p[i]] = s[p[i]];
|
|
35
|
+
}
|
|
32
36
|
return t;
|
|
33
37
|
};
|
|
34
38
|
import * as React from 'react';
|
package/dist/es/tools/utils.d.ts
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -27,8 +29,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
27
29
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
30
|
t[p] = s[p];
|
|
29
31
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
31
|
-
|
|
32
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
+
t[p[i]] = s[p[i]];
|
|
35
|
+
}
|
|
32
36
|
return t;
|
|
33
37
|
};
|
|
34
38
|
import * as React from 'react';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="prosemirror-model" />
|
|
2
1
|
import { Transaction, EditorView, Node } from '@progress/kendo-editor-common';
|
|
3
2
|
/**
|
|
4
3
|
* @hidden
|
|
5
4
|
*/
|
|
6
|
-
export declare const updateEditorValue: (view: EditorView
|
|
5
|
+
export declare const updateEditorValue: (view: EditorView, value: Node | string, prevValue: Node | string | undefined, trOnChange: Transaction | null, htmlOnChange: string | null) => void;
|
package/dist/npm/Editor.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ interface EditorStateInterface {
|
|
|
30
30
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
export
|
|
33
|
+
export declare class Editor extends React.Component<EditorProps, EditorStateInterface> {
|
|
34
34
|
/**
|
|
35
35
|
* @hidden
|
|
36
36
|
*/
|
|
@@ -60,19 +60,19 @@ export default class Editor extends React.Component<EditorProps, EditorStateInte
|
|
|
60
60
|
/**
|
|
61
61
|
* The value of the Editor.
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
get value(): Node | string;
|
|
64
64
|
/**
|
|
65
65
|
* Returns the DOM element of the Editor.
|
|
66
66
|
*/
|
|
67
|
-
|
|
67
|
+
get element(): HTMLElement | null;
|
|
68
68
|
/**
|
|
69
69
|
* Returns the content-editable DOM element of the Editor.
|
|
70
70
|
*/
|
|
71
|
-
|
|
71
|
+
get contentElement(): HTMLDivElement | null;
|
|
72
72
|
/**
|
|
73
73
|
* Returns the `view` object of the Editor.
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
get view(): EditorView<any> | undefined;
|
|
76
76
|
private _element;
|
|
77
77
|
private _view?;
|
|
78
78
|
private _contentElement;
|
package/dist/npm/Editor.js
CHANGED
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -23,7 +25,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
23
25
|
};
|
|
24
26
|
return __assign.apply(this, arguments);
|
|
25
27
|
};
|
|
28
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
29
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
|
+
if (ar || !(i in from)) {
|
|
31
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
32
|
+
ar[i] = from[i];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
|
+
};
|
|
26
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.Editor = void 0;
|
|
27
39
|
var React = require("react");
|
|
28
40
|
var PropTypes = require("prop-types");
|
|
29
41
|
var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
|
|
@@ -71,6 +83,9 @@ var Editor = /** @class */ (function (_super) {
|
|
|
71
83
|
view: undefined,
|
|
72
84
|
linkDialog: false
|
|
73
85
|
};
|
|
86
|
+
_this._element = null;
|
|
87
|
+
_this._contentElement = null;
|
|
88
|
+
_this.iframe = null;
|
|
74
89
|
_this.trOnChange = null;
|
|
75
90
|
_this.htmlOnChange = null;
|
|
76
91
|
/**
|
|
@@ -166,9 +181,9 @@ var Editor = /** @class */ (function (_super) {
|
|
|
166
181
|
licensing.validatePackage(package_metadata_1.packageMetadata);
|
|
167
182
|
}
|
|
168
183
|
else {
|
|
169
|
-
var message = "License activation failed for "
|
|
184
|
+
var message = "License activation failed for ".concat(package_metadata_1.packageMetadata.name, "\n");
|
|
170
185
|
message += 'The @progress/kendo-licensing script is not loaded.\n';
|
|
171
|
-
message += "See "
|
|
186
|
+
message += "See ".concat(package_metadata_1.packageMetadata.licensingDocsUrl, " for more information.\n");
|
|
172
187
|
console.warn(message);
|
|
173
188
|
}
|
|
174
189
|
return _this;
|
|
@@ -189,7 +204,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
189
204
|
}
|
|
190
205
|
return this.props.defaultContent || '';
|
|
191
206
|
},
|
|
192
|
-
enumerable:
|
|
207
|
+
enumerable: false,
|
|
193
208
|
configurable: true
|
|
194
209
|
});
|
|
195
210
|
Object.defineProperty(Editor.prototype, "element", {
|
|
@@ -199,7 +214,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
199
214
|
get: function () {
|
|
200
215
|
return this._element;
|
|
201
216
|
},
|
|
202
|
-
enumerable:
|
|
217
|
+
enumerable: false,
|
|
203
218
|
configurable: true
|
|
204
219
|
});
|
|
205
220
|
Object.defineProperty(Editor.prototype, "contentElement", {
|
|
@@ -209,7 +224,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
209
224
|
get: function () {
|
|
210
225
|
return this._contentElement;
|
|
211
226
|
},
|
|
212
|
-
enumerable:
|
|
227
|
+
enumerable: false,
|
|
213
228
|
configurable: true
|
|
214
229
|
});
|
|
215
230
|
Object.defineProperty(Editor.prototype, "view", {
|
|
@@ -219,7 +234,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
219
234
|
get: function () {
|
|
220
235
|
return this._view;
|
|
221
236
|
},
|
|
222
|
-
enumerable:
|
|
237
|
+
enumerable: false,
|
|
223
238
|
configurable: true
|
|
224
239
|
});
|
|
225
240
|
/**
|
|
@@ -239,7 +254,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
239
254
|
if (value === undefined || !view) {
|
|
240
255
|
return;
|
|
241
256
|
}
|
|
242
|
-
controlled_value_1.updateEditorValue(view, value, prevProps.value, this.trOnChange, this.htmlOnChange);
|
|
257
|
+
(0, controlled_value_1.updateEditorValue)(view, value, prevProps.value, this.trOnChange, this.htmlOnChange);
|
|
243
258
|
this.trOnChange = null;
|
|
244
259
|
this.htmlOnChange = null;
|
|
245
260
|
};
|
|
@@ -271,7 +286,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
271
286
|
React.createElement(kendo_react_buttons_1.ButtonGroup, { key: index }, item.map(_this.renderTool, index)) :
|
|
272
287
|
_this.renderTool(item, index);
|
|
273
288
|
});
|
|
274
|
-
return (React.createElement("div", { ref: function (e) { return _this._element = e; }, className: kendo_react_common_1.classNames('k-widget k-editor', className, { 'k-editor-resizable': this.props.resizable }), dir: this.props.dir, style: style },
|
|
289
|
+
return (React.createElement("div", { ref: function (e) { return _this._element = e; }, className: (0, kendo_react_common_1.classNames)('k-widget k-editor', className, { 'k-editor-resizable': this.props.resizable }), dir: this.props.dir, style: style },
|
|
275
290
|
buttons.length > 0 && (React.createElement(kendo_react_buttons_1.Toolbar, { keyboardNavigation: this.props.keyboardNavigation }, buttons)),
|
|
276
291
|
defaultEditMode === 'iframe' ?
|
|
277
292
|
(React.createElement("div", { className: "k-editor-content" },
|
|
@@ -325,23 +340,23 @@ var Editor = /** @class */ (function (_super) {
|
|
|
325
340
|
apply: function (_, val) { return val; }
|
|
326
341
|
}
|
|
327
342
|
}),
|
|
328
|
-
kendo_editor_common_1.spacesFix(),
|
|
329
|
-
kendo_editor_common_1.caretColor(),
|
|
330
|
-
kendo_editor_common_1.history(),
|
|
331
|
-
kendo_editor_common_1.dropCursor(),
|
|
332
|
-
kendo_editor_common_1.gapCursor(),
|
|
333
|
-
kendo_editor_common_1.tableEditing()
|
|
343
|
+
(0, kendo_editor_common_1.spacesFix)(),
|
|
344
|
+
(0, kendo_editor_common_1.caretColor)(),
|
|
345
|
+
(0, kendo_editor_common_1.history)(),
|
|
346
|
+
(0, kendo_editor_common_1.dropCursor)(),
|
|
347
|
+
(0, kendo_editor_common_1.gapCursor)(),
|
|
348
|
+
(0, kendo_editor_common_1.tableEditing)()
|
|
334
349
|
];
|
|
335
|
-
var shortcuts = __assign({}, utils_1.EditorUtils.getShortcuts({
|
|
350
|
+
var shortcuts = __assign(__assign({}, utils_1.EditorUtils.getShortcuts({
|
|
336
351
|
types: { listItem: 'list_item', hardBreak: 'hard_break' },
|
|
337
352
|
toolsSettings: { bold: bold, italic: italic, underline: underline }
|
|
338
|
-
}), { 'Mod-k': function () {
|
|
353
|
+
})), { 'Mod-k': function () {
|
|
339
354
|
var linkDialog = _this.state.linkDialog;
|
|
340
355
|
var editorView = _this.view;
|
|
341
356
|
if (editorView) {
|
|
342
357
|
var editorState = editorView.state;
|
|
343
358
|
var collapsed = editorState.selection.empty;
|
|
344
|
-
var linkMark = kendo_editor_common_1.getMark(editorState, editorState.schema.marks[link.mark]);
|
|
359
|
+
var linkMark = (0, kendo_editor_common_1.getMark)(editorState, editorState.schema.marks[link.mark]);
|
|
345
360
|
var disabled = collapsed && !linkMark;
|
|
346
361
|
if (!linkDialog && !disabled) {
|
|
347
362
|
_this.setState({ linkDialog: true });
|
|
@@ -354,7 +369,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
354
369
|
utils_1.EditorUtils.createDocument(new kendo_editor_common_1.Schema({ nodes: schema_1.nodes, marks: schema_1.marks }), value || defaultContent, { preserveWhitespace: preserveWhitespace });
|
|
355
370
|
var viewProps = {
|
|
356
371
|
state: kendo_editor_common_1.EditorState.create({
|
|
357
|
-
plugins: plugins
|
|
372
|
+
plugins: __spreadArray(__spreadArray([], plugins, true), [(0, kendo_editor_common_1.keymap)(shortcuts), (0, kendo_editor_common_1.keymap)(kendo_editor_common_1.baseKeymap)], false),
|
|
358
373
|
doc: doc
|
|
359
374
|
}),
|
|
360
375
|
transformPastedHTML: this.onPasteHtml,
|
|
@@ -395,4 +410,4 @@ var Editor = /** @class */ (function (_super) {
|
|
|
395
410
|
};
|
|
396
411
|
return Editor;
|
|
397
412
|
}(React.Component));
|
|
398
|
-
exports.
|
|
413
|
+
exports.Editor = Editor;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// <reference types="react" />
|
|
3
3
|
import { EditorState, Plugin, Transaction, EditorView, Schema, Node } from '@progress/kendo-editor-common';
|
|
4
4
|
import { EditorUtils } from './utils';
|
|
5
|
-
import Editor from './Editor';
|
|
5
|
+
import { Editor } from './Editor';
|
|
6
6
|
interface EditorEvent {
|
|
7
7
|
/**
|
|
8
8
|
* An event target.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nodes = exports.marks = void 0;
|
|
3
4
|
var kendo_editor_common_1 = require("@progress/kendo-editor-common");
|
|
4
|
-
exports
|
|
5
|
-
exports
|
|
5
|
+
Object.defineProperty(exports, "marks", { enumerable: true, get: function () { return kendo_editor_common_1.marks; } });
|
|
6
|
+
Object.defineProperty(exports, "nodes", { enumerable: true, get: function () { return kendo_editor_common_1.nodes; } });
|
|
@@ -13,10 +13,10 @@ export declare const getShortcuts: (settings?: {
|
|
|
13
13
|
types?: {
|
|
14
14
|
listItem: string;
|
|
15
15
|
hardBreak: string;
|
|
16
|
-
};
|
|
16
|
+
} | undefined;
|
|
17
17
|
toolsSettings?: {
|
|
18
|
-
bold?: EditorToolsSettings.InlineFormatOptions;
|
|
19
|
-
italic?: EditorToolsSettings.InlineFormatOptions;
|
|
20
|
-
underline?: EditorToolsSettings.InlineFormatOptions;
|
|
21
|
-
};
|
|
22
|
-
}) => Shortcuts;
|
|
18
|
+
bold?: EditorToolsSettings.InlineFormatOptions | undefined;
|
|
19
|
+
italic?: EditorToolsSettings.InlineFormatOptions | undefined;
|
|
20
|
+
underline?: EditorToolsSettings.InlineFormatOptions | undefined;
|
|
21
|
+
} | undefined;
|
|
22
|
+
} | undefined) => Shortcuts;
|
|
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.getShortcuts = void 0;
|
|
14
15
|
var kendo_editor_common_1 = require("@progress/kendo-editor-common");
|
|
15
16
|
var toolsSettings_1 = require("./toolsSettings");
|
|
16
17
|
var bold = toolsSettings_1.EditorToolsSettings.bold, underline = toolsSettings_1.EditorToolsSettings.underline, italic = toolsSettings_1.EditorToolsSettings.italic;
|
|
@@ -18,8 +19,8 @@ var mac = typeof navigator !== 'undefined' ? /Mac/.test(navigator.platform) : fa
|
|
|
18
19
|
/**
|
|
19
20
|
* @hidden
|
|
20
21
|
*/
|
|
21
|
-
|
|
22
|
-
var insertBr = kendo_editor_common_1.chainCommands(kendo_editor_common_1.exitCode, function (state, dispatch) {
|
|
22
|
+
var getShortcuts = function (settings) {
|
|
23
|
+
var insertBr = (0, kendo_editor_common_1.chainCommands)(kendo_editor_common_1.exitCode, function (state, dispatch) {
|
|
23
24
|
var hardBreak = settings && settings.types && settings.types.hardBreak || 'hard_break';
|
|
24
25
|
var br = state.schema.nodes[hardBreak];
|
|
25
26
|
if (dispatch) {
|
|
@@ -29,8 +30,9 @@ exports.getShortcuts = function (settings) {
|
|
|
29
30
|
});
|
|
30
31
|
var listItem = settings && settings.types && settings.types.listItem || 'list_item';
|
|
31
32
|
var toolsSettings = settings && settings.toolsSettings || {};
|
|
32
|
-
var shortcutsSettings = __assign({ 'Mod-b': function (state, dispatch) { return kendo_editor_common_1.toggleInlineFormat(toolsSettings.bold || bold)(state, dispatch); }, 'Mod-i': function (state, dispatch) { return kendo_editor_common_1.toggleInlineFormat(toolsSettings.italic || italic)(state, dispatch); }, 'Mod-u': function (state, dispatch) { return kendo_editor_common_1.toggleInlineFormat(toolsSettings.underline || underline)(state, dispatch); }, 'Mod-z': kendo_editor_common_1.undo, 'Shift-Mod-z': kendo_editor_common_1.redo }, __assign({}, !mac ? { 'Mod-y': kendo_editor_common_1.redo } : {}), { 'Backspace': kendo_editor_common_1.undoInputRule, 'Mod-Enter': insertBr, 'Shift-Enter': insertBr }, __assign({}, mac ? { 'Ctrl-Enter': insertBr } : {}), { 'Enter': function (state, dispatch) {
|
|
33
|
-
return kendo_editor_common_1.splitListItem(state.schema.nodes[listItem])(state, dispatch);
|
|
34
|
-
}, 'Tab': kendo_editor_common_1.goToNextCell(1), 'Shift-Tab': kendo_editor_common_1.goToNextCell(-1) });
|
|
33
|
+
var shortcutsSettings = __assign(__assign(__assign(__assign({ 'Mod-b': function (state, dispatch) { return (0, kendo_editor_common_1.toggleInlineFormat)(toolsSettings.bold || bold)(state, dispatch); }, 'Mod-i': function (state, dispatch) { return (0, kendo_editor_common_1.toggleInlineFormat)(toolsSettings.italic || italic)(state, dispatch); }, 'Mod-u': function (state, dispatch) { return (0, kendo_editor_common_1.toggleInlineFormat)(toolsSettings.underline || underline)(state, dispatch); }, 'Mod-z': kendo_editor_common_1.undo, 'Shift-Mod-z': kendo_editor_common_1.redo }, __assign({}, !mac ? { 'Mod-y': kendo_editor_common_1.redo } : {})), { 'Backspace': kendo_editor_common_1.undoInputRule, 'Mod-Enter': insertBr, 'Shift-Enter': insertBr }), __assign({}, mac ? { 'Ctrl-Enter': insertBr } : {})), { 'Enter': function (state, dispatch) {
|
|
34
|
+
return (0, kendo_editor_common_1.splitListItem)(state.schema.nodes[listItem])(state, dispatch);
|
|
35
|
+
}, 'Tab': (0, kendo_editor_common_1.goToNextCell)(1), 'Shift-Tab': (0, kendo_editor_common_1.goToNextCell)(-1) });
|
|
35
36
|
return shortcutsSettings;
|
|
36
37
|
};
|
|
38
|
+
exports.getShortcuts = getShortcuts;
|