@progress/kendo-react-editor 5.4.0-dev.202205271059 → 5.4.0-dev.202206090823
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 +3 -3
- package/dist/es/Editor.js +14 -7
- package/dist/es/config/shortcuts.d.ts +6 -6
- package/dist/es/config/toolsSettings.js +13 -9
- package/dist/es/dialogs/insertImage.d.ts +1 -1
- package/dist/es/dialogs/insertImage.js +10 -1
- package/dist/es/dialogs/insertLink.d.ts +1 -1
- package/dist/es/dialogs/insertLink.js +10 -1
- package/dist/es/dialogs/viewHtml.d.ts +1 -1
- package/dist/es/dialogs/viewHtml.js +10 -1
- package/dist/es/main.d.ts +2 -2
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/tools/cleanFormatting.js +1 -1
- package/dist/es/tools/findReplace.d.ts +1 -1
- package/dist/es/tools/insertTable/popupGrid.js +1 -1
- package/dist/es/tools/lists-styled.js +9 -5
- package/dist/es/tools/pdf.js +1 -1
- package/dist/es/tools/print.js +1 -1
- package/dist/es/tools/selectAll.js +1 -1
- package/dist/npm/Editor.d.ts +3 -3
- package/dist/npm/Editor.js +23 -16
- package/dist/npm/config/shortcuts.d.ts +6 -6
- package/dist/npm/config/shortcuts.js +4 -4
- package/dist/npm/config/toolsSettings.js +13 -9
- package/dist/npm/dialogs/FindReplace.js +8 -8
- package/dist/npm/dialogs/insertImage.d.ts +1 -1
- package/dist/npm/dialogs/insertImage.js +13 -4
- package/dist/npm/dialogs/insertLink.d.ts +1 -1
- package/dist/npm/dialogs/insertLink.js +14 -5
- package/dist/npm/dialogs/viewHtml.d.ts +1 -1
- package/dist/npm/dialogs/viewHtml.js +15 -6
- package/dist/npm/main.d.ts +2 -2
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/tools/align.js +4 -4
- package/dist/npm/tools/applyColor.js +2 -2
- package/dist/npm/tools/cleanFormatting.js +3 -3
- package/dist/npm/tools/findReplace.d.ts +1 -1
- package/dist/npm/tools/findReplace.js +2 -2
- package/dist/npm/tools/fontStyle.js +4 -4
- package/dist/npm/tools/formatBlock.js +4 -4
- package/dist/npm/tools/history.js +2 -2
- package/dist/npm/tools/indent.js +8 -8
- package/dist/npm/tools/inlineFormat.js +4 -4
- package/dist/npm/tools/insertImage.js +3 -3
- package/dist/npm/tools/insertLink.js +3 -3
- package/dist/npm/tools/insertTable/popupGrid.js +2 -2
- package/dist/npm/tools/insertTable/tool.js +5 -5
- package/dist/npm/tools/lists-styled.js +13 -9
- package/dist/npm/tools/lists.js +4 -4
- package/dist/npm/tools/outdent.js +6 -6
- package/dist/npm/tools/pdf.js +3 -3
- package/dist/npm/tools/print.js +2 -2
- package/dist/npm/tools/proseMirrorTool.js +2 -2
- package/dist/npm/tools/selectAll.js +3 -3
- package/dist/npm/tools/tableEdit.js +13 -13
- package/dist/npm/tools/unlink.js +4 -4
- package/dist/npm/tools/viewHtml.js +2 -2
- package/dist/npm/utils/index.js +36 -36
- package/dist/systemjs/kendo-react-editor.js +1 -1
- package/package.json +13 -13
package/dist/es/Editor.d.ts
CHANGED
|
@@ -64,15 +64,15 @@ export declare class Editor extends React.Component<EditorProps, EditorStateInte
|
|
|
64
64
|
/**
|
|
65
65
|
* Returns the DOM element of the Editor.
|
|
66
66
|
*/
|
|
67
|
-
get element(): HTMLElement;
|
|
67
|
+
get element(): HTMLElement | null;
|
|
68
68
|
/**
|
|
69
69
|
* Returns the content-editable DOM element of the Editor.
|
|
70
70
|
*/
|
|
71
|
-
get contentElement(): HTMLDivElement;
|
|
71
|
+
get contentElement(): HTMLDivElement | null;
|
|
72
72
|
/**
|
|
73
73
|
* Returns the `view` object of the Editor.
|
|
74
74
|
*/
|
|
75
|
-
get view(): EditorView<any
|
|
75
|
+
get view(): EditorView<any> | undefined;
|
|
76
76
|
private _element;
|
|
77
77
|
private _view?;
|
|
78
78
|
private _contentElement;
|
package/dist/es/Editor.js
CHANGED
|
@@ -24,10 +24,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
24
|
};
|
|
25
25
|
return __assign.apply(this, arguments);
|
|
26
26
|
};
|
|
27
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
28
|
-
for (var i = 0,
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
28
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
29
|
+
if (ar || !(i in from)) {
|
|
30
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
31
|
+
ar[i] = from[i];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
31
35
|
};
|
|
32
36
|
import * as React from 'react';
|
|
33
37
|
import * as PropTypes from 'prop-types';
|
|
@@ -76,6 +80,9 @@ var Editor = /** @class */ (function (_super) {
|
|
|
76
80
|
view: undefined,
|
|
77
81
|
linkDialog: false
|
|
78
82
|
};
|
|
83
|
+
_this._element = null;
|
|
84
|
+
_this._contentElement = null;
|
|
85
|
+
_this.iframe = null;
|
|
79
86
|
_this.trOnChange = null;
|
|
80
87
|
_this.htmlOnChange = null;
|
|
81
88
|
/**
|
|
@@ -171,9 +178,9 @@ var Editor = /** @class */ (function (_super) {
|
|
|
171
178
|
licensing.validatePackage(packageMetadata);
|
|
172
179
|
}
|
|
173
180
|
else {
|
|
174
|
-
var message = "License activation failed for "
|
|
181
|
+
var message = "License activation failed for ".concat(packageMetadata.name, "\n");
|
|
175
182
|
message += 'The @progress/kendo-licensing script is not loaded.\n';
|
|
176
|
-
message += "See "
|
|
183
|
+
message += "See ".concat(packageMetadata.licensingDocsUrl, " for more information.\n");
|
|
177
184
|
console.warn(message);
|
|
178
185
|
}
|
|
179
186
|
return _this;
|
|
@@ -359,7 +366,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
359
366
|
EditorUtils.createDocument(new Schema({ nodes: nodes, marks: marks }), value || defaultContent, { preserveWhitespace: preserveWhitespace });
|
|
360
367
|
var viewProps = {
|
|
361
368
|
state: EditorState.create({
|
|
362
|
-
plugins: __spreadArray(__spreadArray([], plugins), [keymap(shortcuts), keymap(baseKeymap)]),
|
|
369
|
+
plugins: __spreadArray(__spreadArray([], plugins, true), [keymap(shortcuts), keymap(baseKeymap)], false),
|
|
363
370
|
doc: doc
|
|
364
371
|
}),
|
|
365
372
|
transformPastedHTML: this.onPasteHtml,
|
|
@@ -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;
|
|
@@ -9,10 +9,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
13
|
-
for (var i = 0,
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
16
20
|
};
|
|
17
21
|
import { keys, messages } from './../messages';
|
|
18
22
|
import { bold as boldSettings, italic as italicSettings, underline as underlineSettings, strikethrough as strikethroughSettings, subscript as subscriptSettings, superscript as superscriptSettings, link as linkSettings, alignLeftRules, alignRightRules, alignCenterRules, alignJustifyRules, alignRemoveRules, indentRules, outdentRules } from '@progress/kendo-editor-common';
|
|
@@ -413,7 +417,7 @@ export var EditorToolsSettings;
|
|
|
413
417
|
* The object of the AlignLeft tool settings.
|
|
414
418
|
*/
|
|
415
419
|
EditorToolsSettings.alignLeft = {
|
|
416
|
-
actions: __spreadArray([], alignLeftRules),
|
|
420
|
+
actions: __spreadArray([], alignLeftRules, true),
|
|
417
421
|
props: __assign({ icon: 'align-left' }, buttonCommonProps),
|
|
418
422
|
messages: {
|
|
419
423
|
title: keys.alignLeft
|
|
@@ -424,7 +428,7 @@ export var EditorToolsSettings;
|
|
|
424
428
|
* The object of the AlignRight tool settings.
|
|
425
429
|
*/
|
|
426
430
|
EditorToolsSettings.alignRight = {
|
|
427
|
-
actions: __spreadArray([], alignRightRules),
|
|
431
|
+
actions: __spreadArray([], alignRightRules, true),
|
|
428
432
|
props: __assign({ icon: 'align-right' }, buttonCommonProps),
|
|
429
433
|
messages: {
|
|
430
434
|
title: keys.alignRight
|
|
@@ -435,7 +439,7 @@ export var EditorToolsSettings;
|
|
|
435
439
|
* The object of the AlignCenter tool settings.
|
|
436
440
|
*/
|
|
437
441
|
EditorToolsSettings.alignCenter = {
|
|
438
|
-
actions: __spreadArray([], alignCenterRules),
|
|
442
|
+
actions: __spreadArray([], alignCenterRules, true),
|
|
439
443
|
props: __assign({ icon: 'align-center' }, buttonCommonProps),
|
|
440
444
|
messages: {
|
|
441
445
|
title: keys.alignCenter
|
|
@@ -446,7 +450,7 @@ export var EditorToolsSettings;
|
|
|
446
450
|
* The object of the AlignJustify tool settings.
|
|
447
451
|
*/
|
|
448
452
|
EditorToolsSettings.alignJustify = {
|
|
449
|
-
actions: __spreadArray([], alignJustifyRules),
|
|
453
|
+
actions: __spreadArray([], alignJustifyRules, true),
|
|
450
454
|
props: __assign({ icon: 'align-justify' }, buttonCommonProps),
|
|
451
455
|
messages: {
|
|
452
456
|
title: keys.alignJustify
|
|
@@ -457,7 +461,7 @@ export var EditorToolsSettings;
|
|
|
457
461
|
* The object of the AlignRemove tool settings.
|
|
458
462
|
*/
|
|
459
463
|
EditorToolsSettings.alignRemove = {
|
|
460
|
-
actions: __spreadArray([], alignRemoveRules),
|
|
464
|
+
actions: __spreadArray([], alignRemoveRules, true),
|
|
461
465
|
props: __assign({ icon: 'align-remove' }, buttonCommonProps),
|
|
462
466
|
messages: {},
|
|
463
467
|
commandName: 'AlignRemove'
|
|
@@ -22,7 +22,7 @@ export declare class InsertImageDialog extends React.Component<InsertImageDialog
|
|
|
22
22
|
/**
|
|
23
23
|
* @hidden
|
|
24
24
|
*/
|
|
25
|
-
render(): React.
|
|
25
|
+
render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
|
|
26
26
|
private onClose;
|
|
27
27
|
private onInsert;
|
|
28
28
|
}
|
|
@@ -13,6 +13,15 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
13
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
14
|
};
|
|
15
15
|
})();
|
|
16
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
17
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
18
|
+
if (ar || !(i in from)) {
|
|
19
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
20
|
+
ar[i] = from[i];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
24
|
+
};
|
|
16
25
|
import * as React from 'react';
|
|
17
26
|
import { Dialog, DialogActionsBar } from '@progress/kendo-react-dialogs';
|
|
18
27
|
import { Button } from '@progress/kendo-react-buttons';
|
|
@@ -97,7 +106,7 @@ var InsertImageDialog = /** @class */ (function (_super) {
|
|
|
97
106
|
var actionButtons = [(React.createElement(Button, { onClick: this.onClose, dir: dir, key: "cancel" }, localization.toLanguageString(insertImageCancel, messages[insertImageCancel]))), (React.createElement(Button, { onClick: this.onInsert, themeColor: 'primary', dir: dir, key: "insert" }, localization.toLanguageString(insertImageInsert, messages[insertImageInsert])))];
|
|
98
107
|
var dialog = (React.createElement(Dialog, { title: localization.toLanguageString(insertImageDialogTitle, messages[insertImageDialogTitle]), onClose: this.onClose, key: "dialog", closeIcon: true, dir: dir, style: dir === 'rtl' ? { textAlign: 'right' } : undefined, appendTo: document.body },
|
|
99
108
|
content,
|
|
100
|
-
React.createElement(DialogActionsBar, null, actionButtons)));
|
|
109
|
+
React.createElement.apply(React, __spreadArray([DialogActionsBar, null], actionButtons, false))));
|
|
101
110
|
return render ? render(dialog, { content: content, actionButtons: actionButtons }) : dialog;
|
|
102
111
|
};
|
|
103
112
|
return InsertImageDialog;
|
|
@@ -20,7 +20,7 @@ export declare class InsertLinkDialog extends React.Component<InsertLinkDialogPr
|
|
|
20
20
|
/**
|
|
21
21
|
* @hidden
|
|
22
22
|
*/
|
|
23
|
-
render(): React.
|
|
23
|
+
render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
|
|
24
24
|
private onClose;
|
|
25
25
|
private onInsert;
|
|
26
26
|
}
|
|
@@ -13,6 +13,15 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
13
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
14
|
};
|
|
15
15
|
})();
|
|
16
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
17
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
18
|
+
if (ar || !(i in from)) {
|
|
19
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
20
|
+
ar[i] = from[i];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
24
|
+
};
|
|
16
25
|
import * as React from 'react';
|
|
17
26
|
import { Dialog, DialogActionsBar } from '@progress/kendo-react-dialogs';
|
|
18
27
|
import { Button } from '@progress/kendo-react-buttons';
|
|
@@ -73,7 +82,7 @@ var InsertLinkDialog = /** @class */ (function (_super) {
|
|
|
73
82
|
];
|
|
74
83
|
var dialog = (React.createElement(Dialog, { title: localization.toLanguageString(insertHyperlinkDialogTitle, messages[insertHyperlinkDialogTitle]), onClose: this.onClose, closeIcon: true, dir: dir, style: dir === 'rtl' ? { textAlign: 'right' } : undefined, appendTo: document.body },
|
|
75
84
|
content,
|
|
76
|
-
React.createElement(DialogActionsBar, null, actionButtons)));
|
|
85
|
+
React.createElement.apply(React, __spreadArray([DialogActionsBar, null], actionButtons, false))));
|
|
77
86
|
return render ? render(dialog, { content: content, actionButtons: actionButtons }) : dialog;
|
|
78
87
|
};
|
|
79
88
|
return InsertLinkDialog;
|
|
@@ -18,7 +18,7 @@ export declare class ViewHtmlDialog extends React.Component<ViewHtmlDialogProps>
|
|
|
18
18
|
/**
|
|
19
19
|
* @hidden
|
|
20
20
|
*/
|
|
21
|
-
render(): React.
|
|
21
|
+
render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
|
|
22
22
|
private onUpdate;
|
|
23
23
|
private onClose;
|
|
24
24
|
}
|
|
@@ -13,6 +13,15 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
13
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
14
|
};
|
|
15
15
|
})();
|
|
16
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
17
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
18
|
+
if (ar || !(i in from)) {
|
|
19
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
20
|
+
ar[i] = from[i];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
24
|
+
};
|
|
16
25
|
import * as React from 'react';
|
|
17
26
|
import { Dialog, DialogActionsBar } from '@progress/kendo-react-dialogs';
|
|
18
27
|
import { Button } from '@progress/kendo-react-buttons';
|
|
@@ -57,7 +66,7 @@ var ViewHtmlDialog = /** @class */ (function (_super) {
|
|
|
57
66
|
];
|
|
58
67
|
var dialog = (React.createElement(Dialog, { title: localization.toLanguageString(viewHtmlDialogTitle, messages[viewHtmlDialogTitle]), onClose: this.onClose, key: "dialog", closeIcon: true, dir: dir, style: dir === 'rtl' ? { textAlign: 'right' } : undefined, appendTo: document.body },
|
|
59
68
|
content,
|
|
60
|
-
React.createElement(DialogActionsBar, null, actionButtons)));
|
|
69
|
+
React.createElement.apply(React, __spreadArray([DialogActionsBar, null], actionButtons, false))));
|
|
61
70
|
return render ? render(dialog, { content: content, actionButtons: actionButtons }) : dialog;
|
|
62
71
|
};
|
|
63
72
|
return ViewHtmlDialog;
|
package/dist/es/main.d.ts
CHANGED
|
@@ -150,8 +150,8 @@ export declare const ProseMirror: {
|
|
|
150
150
|
deleteColumn: typeof deleteColumn;
|
|
151
151
|
rowIsHeader: typeof rowIsHeader;
|
|
152
152
|
addRow: typeof addRow;
|
|
153
|
-
addRowBefore: (state: EditorState<any>, dispatch?: (tr: Transaction<any>) => void) => boolean;
|
|
154
|
-
addRowAfter: (state: EditorState<any>, dispatch?: (tr: Transaction<any>) => void) => boolean;
|
|
153
|
+
addRowBefore: (state: EditorState<any>, dispatch?: ((tr: Transaction<any>) => void) | undefined) => boolean;
|
|
154
|
+
addRowAfter: (state: EditorState<any>, dispatch?: ((tr: Transaction<any>) => void) | undefined) => boolean;
|
|
155
155
|
deleteRow: typeof deleteRow;
|
|
156
156
|
mergeCells: typeof mergeCells;
|
|
157
157
|
splitCell: typeof splitCell;
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-editor',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1654762180,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
11
11
|
};
|
|
@@ -44,5 +44,5 @@ export var CleanFormatting = function (props) {
|
|
|
44
44
|
}
|
|
45
45
|
}, [view]);
|
|
46
46
|
var button = (React.createElement(Button, __assign({ onClick: onClick, disabled: !view || !command(view.state), title: useLocalization().toLanguageString(titleKey, messages[titleKey]) }, onDownPreventDefault, settings.props, buttonProps)));
|
|
47
|
-
return render ? render.call(undefined, button, { view: view }) : button;
|
|
47
|
+
return (render ? render.call(undefined, button, { view: view }) : button);
|
|
48
48
|
};
|
|
@@ -32,7 +32,7 @@ var PopupGrid = /** @class */ (function (_super) {
|
|
|
32
32
|
var row = Math.floor(index / this.props.columns);
|
|
33
33
|
var col = index % this.props.columns;
|
|
34
34
|
var selected = col <= selCol && row <= selRow;
|
|
35
|
-
return (React.createElement("span", { className: cellClass + (selected ? " "
|
|
35
|
+
return (React.createElement("span", { className: cellClass + (selected ? " ".concat(selectedClass) : ''), onMouseEnter: function () { return _this.setState({ row: row, col: col }); }, onClick: function () { return _this.props.onCellClick.call(undefined, row, col); }, key: index }));
|
|
36
36
|
};
|
|
37
37
|
PopupGrid.prototype.render = function () {
|
|
38
38
|
var _this = this;
|
|
@@ -9,10 +9,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
13
|
-
for (var i = 0,
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
16
20
|
};
|
|
17
21
|
import * as React from 'react';
|
|
18
22
|
import { toggleList, listStyle } from '@progress/kendo-editor-common';
|
|
@@ -35,7 +39,7 @@ export var ListTool = function (props) {
|
|
|
35
39
|
var view = props.view;
|
|
36
40
|
var types = listsTypes;
|
|
37
41
|
var listType = props.listType;
|
|
38
|
-
var items = __spreadArray([], (props.items || []));
|
|
42
|
+
var items = __spreadArray([], (props.items || []), true);
|
|
39
43
|
var ol, ul;
|
|
40
44
|
if (view) {
|
|
41
45
|
var state = view.state;
|
package/dist/es/tools/pdf.js
CHANGED
|
@@ -40,5 +40,5 @@ export var Pdf = function (props) {
|
|
|
40
40
|
}
|
|
41
41
|
}, [view, savePdfOptions, savePdfCallback]);
|
|
42
42
|
var button = (React.createElement(Button, __assign({ onClick: onClick, title: useLocalization().toLanguageString(titleKey, messages[titleKey]) }, onDownPreventDefault, settings.props, buttonProps)));
|
|
43
|
-
return render ? render.call(undefined, button, { view: view }) : button;
|
|
43
|
+
return (render ? render.call(undefined, button, { view: view }) : button);
|
|
44
44
|
};
|
package/dist/es/tools/print.js
CHANGED
|
@@ -42,5 +42,5 @@ export var Print = function (props) {
|
|
|
42
42
|
}
|
|
43
43
|
}, [editorWindow]);
|
|
44
44
|
var button = (React.createElement(Button, __assign({ onClick: onClick, disabled: !editorWindow || editorWindow === window, title: useLocalization().toLanguageString(titleKey, messages[titleKey]) }, onDownPreventDefault, settings.props, buttonProps)));
|
|
45
|
-
return render ? render.call(undefined, button, { view: view }) : button;
|
|
45
|
+
return (render ? render.call(undefined, button, { view: view }) : button);
|
|
46
46
|
};
|
|
@@ -41,5 +41,5 @@ export var SelectAll = function (props) {
|
|
|
41
41
|
}
|
|
42
42
|
}, [view]);
|
|
43
43
|
var button = (React.createElement(Button, __assign({ onClick: onClick, title: useLocalization().toLanguageString(titleKey, messages[titleKey]) }, onDownPreventDefault, settings.props, buttonProps)));
|
|
44
|
-
return render ? render.call(undefined, button, { view: view }) : button;
|
|
44
|
+
return (render ? render.call(undefined, button, { view: view }) : button);
|
|
45
45
|
};
|
package/dist/npm/Editor.d.ts
CHANGED
|
@@ -64,15 +64,15 @@ export declare class Editor extends React.Component<EditorProps, EditorStateInte
|
|
|
64
64
|
/**
|
|
65
65
|
* Returns the DOM element of the Editor.
|
|
66
66
|
*/
|
|
67
|
-
get element(): HTMLElement;
|
|
67
|
+
get element(): HTMLElement | null;
|
|
68
68
|
/**
|
|
69
69
|
* Returns the content-editable DOM element of the Editor.
|
|
70
70
|
*/
|
|
71
|
-
get contentElement(): HTMLDivElement;
|
|
71
|
+
get contentElement(): HTMLDivElement | null;
|
|
72
72
|
/**
|
|
73
73
|
* Returns the `view` object of the Editor.
|
|
74
74
|
*/
|
|
75
|
-
get view(): EditorView<any
|
|
75
|
+
get view(): EditorView<any> | undefined;
|
|
76
76
|
private _element;
|
|
77
77
|
private _view?;
|
|
78
78
|
private _contentElement;
|
package/dist/npm/Editor.js
CHANGED
|
@@ -25,10 +25,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
25
25
|
};
|
|
26
26
|
return __assign.apply(this, arguments);
|
|
27
27
|
};
|
|
28
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
29
|
-
for (var i = 0,
|
|
30
|
-
|
|
31
|
-
|
|
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));
|
|
32
36
|
};
|
|
33
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
38
|
exports.Editor = void 0;
|
|
@@ -79,6 +83,9 @@ var Editor = /** @class */ (function (_super) {
|
|
|
79
83
|
view: undefined,
|
|
80
84
|
linkDialog: false
|
|
81
85
|
};
|
|
86
|
+
_this._element = null;
|
|
87
|
+
_this._contentElement = null;
|
|
88
|
+
_this.iframe = null;
|
|
82
89
|
_this.trOnChange = null;
|
|
83
90
|
_this.htmlOnChange = null;
|
|
84
91
|
/**
|
|
@@ -174,9 +181,9 @@ var Editor = /** @class */ (function (_super) {
|
|
|
174
181
|
licensing.validatePackage(package_metadata_1.packageMetadata);
|
|
175
182
|
}
|
|
176
183
|
else {
|
|
177
|
-
var message = "License activation failed for "
|
|
184
|
+
var message = "License activation failed for ".concat(package_metadata_1.packageMetadata.name, "\n");
|
|
178
185
|
message += 'The @progress/kendo-licensing script is not loaded.\n';
|
|
179
|
-
message += "See "
|
|
186
|
+
message += "See ".concat(package_metadata_1.packageMetadata.licensingDocsUrl, " for more information.\n");
|
|
180
187
|
console.warn(message);
|
|
181
188
|
}
|
|
182
189
|
return _this;
|
|
@@ -247,7 +254,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
247
254
|
if (value === undefined || !view) {
|
|
248
255
|
return;
|
|
249
256
|
}
|
|
250
|
-
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);
|
|
251
258
|
this.trOnChange = null;
|
|
252
259
|
this.htmlOnChange = null;
|
|
253
260
|
};
|
|
@@ -279,7 +286,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
279
286
|
React.createElement(kendo_react_buttons_1.ButtonGroup, { key: index }, item.map(_this.renderTool, index)) :
|
|
280
287
|
_this.renderTool(item, index);
|
|
281
288
|
});
|
|
282
|
-
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 },
|
|
283
290
|
buttons.length > 0 && (React.createElement(kendo_react_buttons_1.Toolbar, { keyboardNavigation: this.props.keyboardNavigation }, buttons)),
|
|
284
291
|
defaultEditMode === 'iframe' ?
|
|
285
292
|
(React.createElement("div", { className: "k-editor-content" },
|
|
@@ -333,12 +340,12 @@ var Editor = /** @class */ (function (_super) {
|
|
|
333
340
|
apply: function (_, val) { return val; }
|
|
334
341
|
}
|
|
335
342
|
}),
|
|
336
|
-
kendo_editor_common_1.spacesFix(),
|
|
337
|
-
kendo_editor_common_1.caretColor(),
|
|
338
|
-
kendo_editor_common_1.history(),
|
|
339
|
-
kendo_editor_common_1.dropCursor(),
|
|
340
|
-
kendo_editor_common_1.gapCursor(),
|
|
341
|
-
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)()
|
|
342
349
|
];
|
|
343
350
|
var shortcuts = __assign(__assign({}, utils_1.EditorUtils.getShortcuts({
|
|
344
351
|
types: { listItem: 'list_item', hardBreak: 'hard_break' },
|
|
@@ -349,7 +356,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
349
356
|
if (editorView) {
|
|
350
357
|
var editorState = editorView.state;
|
|
351
358
|
var collapsed = editorState.selection.empty;
|
|
352
|
-
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]);
|
|
353
360
|
var disabled = collapsed && !linkMark;
|
|
354
361
|
if (!linkDialog && !disabled) {
|
|
355
362
|
_this.setState({ linkDialog: true });
|
|
@@ -362,7 +369,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
362
369
|
utils_1.EditorUtils.createDocument(new kendo_editor_common_1.Schema({ nodes: schema_1.nodes, marks: schema_1.marks }), value || defaultContent, { preserveWhitespace: preserveWhitespace });
|
|
363
370
|
var viewProps = {
|
|
364
371
|
state: kendo_editor_common_1.EditorState.create({
|
|
365
|
-
plugins: __spreadArray(__spreadArray([], plugins), [kendo_editor_common_1.keymap(shortcuts), kendo_editor_common_1.keymap(kendo_editor_common_1.baseKeymap)]),
|
|
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),
|
|
366
373
|
doc: doc
|
|
367
374
|
}),
|
|
368
375
|
transformPastedHTML: this.onPasteHtml,
|
|
@@ -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;
|
|
@@ -20,7 +20,7 @@ var mac = typeof navigator !== 'undefined' ? /Mac/.test(navigator.platform) : fa
|
|
|
20
20
|
* @hidden
|
|
21
21
|
*/
|
|
22
22
|
var getShortcuts = function (settings) {
|
|
23
|
-
var insertBr = kendo_editor_common_1.chainCommands(kendo_editor_common_1.exitCode, function (state, dispatch) {
|
|
23
|
+
var insertBr = (0, kendo_editor_common_1.chainCommands)(kendo_editor_common_1.exitCode, function (state, dispatch) {
|
|
24
24
|
var hardBreak = settings && settings.types && settings.types.hardBreak || 'hard_break';
|
|
25
25
|
var br = state.schema.nodes[hardBreak];
|
|
26
26
|
if (dispatch) {
|
|
@@ -30,9 +30,9 @@ var getShortcuts = function (settings) {
|
|
|
30
30
|
});
|
|
31
31
|
var listItem = settings && settings.types && settings.types.listItem || 'list_item';
|
|
32
32
|
var toolsSettings = settings && settings.toolsSettings || {};
|
|
33
|
-
var shortcutsSettings = __assign(__assign(__assign(__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) {
|
|
34
|
-
return kendo_editor_common_1.splitListItem(state.schema.nodes[listItem])(state, dispatch);
|
|
35
|
-
}, '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) });
|
|
36
36
|
return shortcutsSettings;
|
|
37
37
|
};
|
|
38
38
|
exports.getShortcuts = getShortcuts;
|
|
@@ -10,10 +10,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
14
|
-
for (var i = 0,
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
+
if (ar || !(i in from)) {
|
|
16
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
+
ar[i] = from[i];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
17
21
|
};
|
|
18
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
23
|
exports.EditorToolsSettings = exports.listsTypes = void 0;
|
|
@@ -416,7 +420,7 @@ var EditorToolsSettings;
|
|
|
416
420
|
* The object of the AlignLeft tool settings.
|
|
417
421
|
*/
|
|
418
422
|
EditorToolsSettings.alignLeft = {
|
|
419
|
-
actions: __spreadArray([], kendo_editor_common_1.alignLeftRules),
|
|
423
|
+
actions: __spreadArray([], kendo_editor_common_1.alignLeftRules, true),
|
|
420
424
|
props: __assign({ icon: 'align-left' }, buttonCommonProps),
|
|
421
425
|
messages: {
|
|
422
426
|
title: messages_1.keys.alignLeft
|
|
@@ -427,7 +431,7 @@ var EditorToolsSettings;
|
|
|
427
431
|
* The object of the AlignRight tool settings.
|
|
428
432
|
*/
|
|
429
433
|
EditorToolsSettings.alignRight = {
|
|
430
|
-
actions: __spreadArray([], kendo_editor_common_1.alignRightRules),
|
|
434
|
+
actions: __spreadArray([], kendo_editor_common_1.alignRightRules, true),
|
|
431
435
|
props: __assign({ icon: 'align-right' }, buttonCommonProps),
|
|
432
436
|
messages: {
|
|
433
437
|
title: messages_1.keys.alignRight
|
|
@@ -438,7 +442,7 @@ var EditorToolsSettings;
|
|
|
438
442
|
* The object of the AlignCenter tool settings.
|
|
439
443
|
*/
|
|
440
444
|
EditorToolsSettings.alignCenter = {
|
|
441
|
-
actions: __spreadArray([], kendo_editor_common_1.alignCenterRules),
|
|
445
|
+
actions: __spreadArray([], kendo_editor_common_1.alignCenterRules, true),
|
|
442
446
|
props: __assign({ icon: 'align-center' }, buttonCommonProps),
|
|
443
447
|
messages: {
|
|
444
448
|
title: messages_1.keys.alignCenter
|
|
@@ -449,7 +453,7 @@ var EditorToolsSettings;
|
|
|
449
453
|
* The object of the AlignJustify tool settings.
|
|
450
454
|
*/
|
|
451
455
|
EditorToolsSettings.alignJustify = {
|
|
452
|
-
actions: __spreadArray([], kendo_editor_common_1.alignJustifyRules),
|
|
456
|
+
actions: __spreadArray([], kendo_editor_common_1.alignJustifyRules, true),
|
|
453
457
|
props: __assign({ icon: 'align-justify' }, buttonCommonProps),
|
|
454
458
|
messages: {
|
|
455
459
|
title: messages_1.keys.alignJustify
|
|
@@ -460,7 +464,7 @@ var EditorToolsSettings;
|
|
|
460
464
|
* The object of the AlignRemove tool settings.
|
|
461
465
|
*/
|
|
462
466
|
EditorToolsSettings.alignRemove = {
|
|
463
|
-
actions: __spreadArray([], kendo_editor_common_1.alignRemoveRules),
|
|
467
|
+
actions: __spreadArray([], kendo_editor_common_1.alignRemoveRules, true),
|
|
464
468
|
props: __assign({ icon: 'align-remove' }, buttonCommonProps),
|
|
465
469
|
messages: {},
|
|
466
470
|
commandName: 'AlignRemove'
|