@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
|
@@ -66,7 +66,7 @@ var FindAndReplaceDialog = /** @class */ (function (_super) {
|
|
|
66
66
|
cur = current === -1 ? matches.length : current + 1;
|
|
67
67
|
all = matches.length;
|
|
68
68
|
}
|
|
69
|
-
return utils_1.formatString(locMessage, cur, all);
|
|
69
|
+
return (0, utils_1.formatString)(locMessage, cur, all);
|
|
70
70
|
};
|
|
71
71
|
_this.onFindNext = function () {
|
|
72
72
|
_this.onFind();
|
|
@@ -79,7 +79,7 @@ var FindAndReplaceDialog = /** @class */ (function (_super) {
|
|
|
79
79
|
var view = _this.props.view;
|
|
80
80
|
var _a = _this.state, text = _a.searchText, matchCase = _a.matchCase, matchCyclic = _a.matchCyclic, matchWord = _a.matchWord, useRegExp = _a.useRegExp;
|
|
81
81
|
var searchOptions = { text: text, matchWord: matchWord, matchCase: matchCase, useRegExp: useRegExp, backward: backward, matchCyclic: matchCyclic };
|
|
82
|
-
var selectionResult = kendo_editor_common_1.find(view.state, searchOptions);
|
|
82
|
+
var selectionResult = (0, kendo_editor_common_1.find)(view.state, searchOptions);
|
|
83
83
|
if (selectionResult) {
|
|
84
84
|
var transaction = view.state.tr.setSelection(selectionResult);
|
|
85
85
|
transaction.scrollIntoView();
|
|
@@ -94,7 +94,7 @@ var FindAndReplaceDialog = /** @class */ (function (_super) {
|
|
|
94
94
|
if (!selection.empty) {
|
|
95
95
|
var start = selection.from;
|
|
96
96
|
var end = start + replaceText.length;
|
|
97
|
-
var transaction = kendo_editor_common_1.replace(selection, replaceText, view.state.tr);
|
|
97
|
+
var transaction = (0, kendo_editor_common_1.replace)(selection, replaceText, view.state.tr);
|
|
98
98
|
transaction.setSelection(kendo_editor_common_1.TextSelection.create(transaction.doc, start, end));
|
|
99
99
|
transaction.scrollIntoView();
|
|
100
100
|
view.dispatch(transaction);
|
|
@@ -105,7 +105,7 @@ var FindAndReplaceDialog = /** @class */ (function (_super) {
|
|
|
105
105
|
var view = _this.props.view;
|
|
106
106
|
var _a = _this.state, searchText = _a.searchText, replaceText = _a.replaceText, matchCase = _a.matchCase, matchWord = _a.matchWord, useRegExp = _a.useRegExp;
|
|
107
107
|
var searchOptions = { text: searchText, matchWord: matchWord, matchCase: matchCase, useRegExp: useRegExp };
|
|
108
|
-
view.dispatch(kendo_editor_common_1.replaceAll(view.state, replaceText, searchOptions));
|
|
108
|
+
view.dispatch((0, kendo_editor_common_1.replaceAll)(view.state, replaceText, searchOptions));
|
|
109
109
|
_this.setNextState({});
|
|
110
110
|
};
|
|
111
111
|
_this.onKeyDown = function (event) {
|
|
@@ -129,7 +129,7 @@ var FindAndReplaceDialog = /** @class */ (function (_super) {
|
|
|
129
129
|
var text = nextState.searchText, matchWord = nextState.matchWord, matchCase = nextState.matchCase, useRegExp = nextState.useRegExp, matchCyclic = nextState.matchCyclic;
|
|
130
130
|
var searchOptions = { text: text, matchWord: matchWord, matchCase: matchCase, useRegExp: useRegExp };
|
|
131
131
|
var selection_1 = view.state.selection;
|
|
132
|
-
var matches = kendo_editor_common_1.findAll(view.state.doc, searchOptions);
|
|
132
|
+
var matches = (0, kendo_editor_common_1.findAll)(view.state.doc, searchOptions);
|
|
133
133
|
var nextMatch = (!_this.state.searchText && matches[0]) ||
|
|
134
134
|
matches.find(function (match) { return match.from >= selection_1.from; }) ||
|
|
135
135
|
(matchCyclic && matches[0]) ||
|
|
@@ -142,7 +142,7 @@ var FindAndReplaceDialog = /** @class */ (function (_super) {
|
|
|
142
142
|
};
|
|
143
143
|
_this.state = {
|
|
144
144
|
selectedTab: 0,
|
|
145
|
-
searchText: kendo_editor_common_1.selectedLineTextOnly(props.view.state),
|
|
145
|
+
searchText: (0, kendo_editor_common_1.selectedLineTextOnly)(props.view.state),
|
|
146
146
|
replaceText: '',
|
|
147
147
|
matchCase: false,
|
|
148
148
|
matchWord: false,
|
|
@@ -189,7 +189,7 @@ var FindAndReplaceDialog = /** @class */ (function (_super) {
|
|
|
189
189
|
* @hidden
|
|
190
190
|
*/
|
|
191
191
|
FindAndReplaceDialog.prototype.render = function () {
|
|
192
|
-
var localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
192
|
+
var localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
193
193
|
var _a = this.settings.messages, findReplaceDialogTitle = _a.findReplaceDialogTitle, findReplaceTabFind = _a.findReplaceTabFind, findReplaceTabReplace = _a.findReplaceTabReplace, findReplaceFindWhat = _a.findReplaceFindWhat, findReplaceReplaceWith = _a.findReplaceReplaceWith, findReplaceReplace = _a.findReplaceReplace, findReplaceReplaceAll = _a.findReplaceReplaceAll, findReplaceMatchCase = _a.findReplaceMatchCase, findReplaceMatchWord = _a.findReplaceMatchWord, findReplaceMatchCyclic = _a.findReplaceMatchCyclic, findReplaceUseRegExp = _a.findReplaceUseRegExp, findReplacePrevMatch = _a.findReplacePrevMatch, findReplaceNextMatch = _a.findReplaceNextMatch, findReplaceMatches = _a.findReplaceMatches;
|
|
194
194
|
var _b = this.state, matchCase = _b.matchCase, matchWord = _b.matchWord, matchCyclic = _b.matchCyclic, useRegExp = _b.useRegExp, searchText = _b.searchText, replaceText = _b.replaceText, nextMatch = _b.nextMatch;
|
|
195
195
|
var checkboxes = (React.createElement("div", { className: "k-search-options" },
|
|
@@ -242,4 +242,4 @@ var FindAndReplaceDialog = /** @class */ (function (_super) {
|
|
|
242
242
|
return FindAndReplaceDialog;
|
|
243
243
|
}(React.Component));
|
|
244
244
|
exports.FindAndReplaceDialog = FindAndReplaceDialog;
|
|
245
|
-
kendo_react_intl_1.registerForLocalization(FindAndReplaceDialog);
|
|
245
|
+
(0, kendo_react_intl_1.registerForLocalization)(FindAndReplaceDialog);
|
|
@@ -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
|
}
|
|
@@ -14,6 +14,15 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
18
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
19
|
+
if (ar || !(i in from)) {
|
|
20
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
21
|
+
ar[i] = from[i];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
25
|
+
};
|
|
17
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
27
|
exports.InsertImageDialog = void 0;
|
|
19
28
|
var React = require("react");
|
|
@@ -56,7 +65,7 @@ var InsertImageDialog = /** @class */ (function (_super) {
|
|
|
56
65
|
return Object.assign(acc, (_a = {}, _a[curr] = data[curr], _a));
|
|
57
66
|
}, {});
|
|
58
67
|
var newImage = nodeType.createAndFill(attrs);
|
|
59
|
-
var insertImageCmd = kendo_editor_common_1.insertNode(newImage, true);
|
|
68
|
+
var insertImageCmd = (0, kendo_editor_common_1.insertNode)(newImage, true);
|
|
60
69
|
insertImageCmd(view.state, function (tr) { return view.dispatch(tr.setMeta('commandName', settings.commandName).setMeta('args', attrs)); });
|
|
61
70
|
_this.onClose();
|
|
62
71
|
};
|
|
@@ -69,7 +78,7 @@ var InsertImageDialog = /** @class */ (function (_super) {
|
|
|
69
78
|
var _this = this;
|
|
70
79
|
var _a = this.props, view = _a.view, settings = _a.settings, dir = _a.dir, render = _a.render;
|
|
71
80
|
var _b = settings.messages, insertImageDialogTitle = _b.insertImageDialogTitle, insertImageAddress = _b.insertImageAddress, insertImageTitle = _b.insertImageTitle, insertImageAltText = _b.insertImageAltText, insertImageWidth = _b.insertImageWidth, insertImageHeight = _b.insertImageHeight, insertImageCancel = _b.insertImageCancel, insertImageInsert = _b.insertImageInsert;
|
|
72
|
-
var localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
81
|
+
var localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
73
82
|
var state = view && view.state;
|
|
74
83
|
var attrs = {};
|
|
75
84
|
if (state && state.selection instanceof kendo_editor_common_1.NodeSelection &&
|
|
@@ -100,10 +109,10 @@ var InsertImageDialog = /** @class */ (function (_super) {
|
|
|
100
109
|
var actionButtons = [(React.createElement(kendo_react_buttons_1.Button, { onClick: this.onClose, dir: dir, key: "cancel" }, localization.toLanguageString(insertImageCancel, messages_1.messages[insertImageCancel]))), (React.createElement(kendo_react_buttons_1.Button, { onClick: this.onInsert, themeColor: 'primary', dir: dir, key: "insert" }, localization.toLanguageString(insertImageInsert, messages_1.messages[insertImageInsert])))];
|
|
101
110
|
var dialog = (React.createElement(kendo_react_dialogs_1.Dialog, { title: localization.toLanguageString(insertImageDialogTitle, messages_1.messages[insertImageDialogTitle]), onClose: this.onClose, key: "dialog", closeIcon: true, dir: dir, style: dir === 'rtl' ? { textAlign: 'right' } : undefined, appendTo: document.body },
|
|
102
111
|
content,
|
|
103
|
-
React.createElement(kendo_react_dialogs_1.DialogActionsBar, null, actionButtons)));
|
|
112
|
+
React.createElement.apply(React, __spreadArray([kendo_react_dialogs_1.DialogActionsBar, null], actionButtons, false))));
|
|
104
113
|
return render ? render(dialog, { content: content, actionButtons: actionButtons }) : dialog;
|
|
105
114
|
};
|
|
106
115
|
return InsertImageDialog;
|
|
107
116
|
}(React.Component));
|
|
108
117
|
exports.InsertImageDialog = InsertImageDialog;
|
|
109
|
-
kendo_react_intl_1.registerForLocalization(InsertImageDialog);
|
|
118
|
+
(0, kendo_react_intl_1.registerForLocalization)(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
|
}
|
|
@@ -14,6 +14,15 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
18
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
19
|
+
if (ar || !(i in from)) {
|
|
20
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
21
|
+
ar[i] = from[i];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
25
|
+
};
|
|
17
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
27
|
exports.InsertLinkDialog = void 0;
|
|
19
28
|
var React = require("react");
|
|
@@ -44,7 +53,7 @@ var InsertLinkDialog = /** @class */ (function (_super) {
|
|
|
44
53
|
title: _this.title ? _this.title.value : undefined,
|
|
45
54
|
target: _this.target && _this.target.checked ? '_blank' : undefined
|
|
46
55
|
};
|
|
47
|
-
kendo_editor_common_1.applyLink({ mark: mark, attrs: attrs }, _this.props.settings.commandName)(view.state, view.dispatch);
|
|
56
|
+
(0, kendo_editor_common_1.applyLink)({ mark: mark, attrs: attrs }, _this.props.settings.commandName)(view.state, view.dispatch);
|
|
48
57
|
_this.onClose();
|
|
49
58
|
};
|
|
50
59
|
return _this;
|
|
@@ -55,10 +64,10 @@ var InsertLinkDialog = /** @class */ (function (_super) {
|
|
|
55
64
|
InsertLinkDialog.prototype.render = function () {
|
|
56
65
|
var _this = this;
|
|
57
66
|
var _a = this.props, view = _a.view, settings = _a.settings, dir = _a.dir, render = _a.render;
|
|
58
|
-
var localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
67
|
+
var localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
59
68
|
var _b = settings.messages, insertHyperlinkDialogTitle = _b.insertHyperlinkDialogTitle, insertHyperlinkAddress = _b.insertHyperlinkAddress, insertHyperlinkTitle = _b.insertHyperlinkTitle, insertHyperlinkNewWindow = _b.insertHyperlinkNewWindow, insertHyperlinkCancel = _b.insertHyperlinkCancel, insertHyperlinkInsert = _b.insertHyperlinkInsert;
|
|
60
69
|
var linkMark = view ?
|
|
61
|
-
kendo_editor_common_1.getMark(view.state, view.state.schema.marks[settings.mark])
|
|
70
|
+
(0, kendo_editor_common_1.getMark)(view.state, view.state.schema.marks[settings.mark])
|
|
62
71
|
: false;
|
|
63
72
|
var content = (React.createElement("div", { className: "k-edit-form-container" },
|
|
64
73
|
React.createElement("div", { className: "k-edit-label" },
|
|
@@ -76,10 +85,10 @@ var InsertLinkDialog = /** @class */ (function (_super) {
|
|
|
76
85
|
];
|
|
77
86
|
var dialog = (React.createElement(kendo_react_dialogs_1.Dialog, { title: localization.toLanguageString(insertHyperlinkDialogTitle, messages_1.messages[insertHyperlinkDialogTitle]), onClose: this.onClose, closeIcon: true, dir: dir, style: dir === 'rtl' ? { textAlign: 'right' } : undefined, appendTo: document.body },
|
|
78
87
|
content,
|
|
79
|
-
React.createElement(kendo_react_dialogs_1.DialogActionsBar, null, actionButtons)));
|
|
88
|
+
React.createElement.apply(React, __spreadArray([kendo_react_dialogs_1.DialogActionsBar, null], actionButtons, false))));
|
|
80
89
|
return render ? render(dialog, { content: content, actionButtons: actionButtons }) : dialog;
|
|
81
90
|
};
|
|
82
91
|
return InsertLinkDialog;
|
|
83
92
|
}(React.Component));
|
|
84
93
|
exports.InsertLinkDialog = InsertLinkDialog;
|
|
85
|
-
kendo_react_intl_1.registerForLocalization(InsertLinkDialog);
|
|
94
|
+
(0, kendo_react_intl_1.registerForLocalization)(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
|
}
|
|
@@ -14,6 +14,15 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
18
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
19
|
+
if (ar || !(i in from)) {
|
|
20
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
21
|
+
ar[i] = from[i];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
25
|
+
};
|
|
17
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
27
|
exports.ViewHtmlDialog = void 0;
|
|
19
28
|
var React = require("react");
|
|
@@ -33,9 +42,9 @@ var ViewHtmlDialog = /** @class */ (function (_super) {
|
|
|
33
42
|
_this.htmlArea = null;
|
|
34
43
|
_this.onUpdate = function () {
|
|
35
44
|
var _a = _this.props, view = _a.view, settings = _a.settings;
|
|
36
|
-
var html = kendo_editor_common_1.trimWhitespace(_this.htmlArea ? _this.htmlArea.value : '');
|
|
45
|
+
var html = (0, kendo_editor_common_1.trimWhitespace)(_this.htmlArea ? _this.htmlArea.value : '');
|
|
37
46
|
var preserveWhitespace = props_key_1.editorPropsKey.getState(view.state).preserveWhitespace;
|
|
38
|
-
kendo_editor_common_1.setHtml(html, settings.commandName, { preserveWhitespace: preserveWhitespace })(view.state, view.dispatch);
|
|
47
|
+
(0, kendo_editor_common_1.setHtml)(html, settings.commandName, { preserveWhitespace: preserveWhitespace })(view.state, view.dispatch);
|
|
39
48
|
_this.onClose();
|
|
40
49
|
};
|
|
41
50
|
_this.onClose = function () {
|
|
@@ -50,20 +59,20 @@ var ViewHtmlDialog = /** @class */ (function (_super) {
|
|
|
50
59
|
ViewHtmlDialog.prototype.render = function () {
|
|
51
60
|
var _this = this;
|
|
52
61
|
var _a = this.props, view = _a.view, settings = _a.settings, dir = _a.dir, render = _a.render;
|
|
53
|
-
var localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
62
|
+
var localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
54
63
|
var _b = settings.messages, viewHtmlDialogTitle = _b.viewHtmlDialogTitle, viewHtmlCancel = _b.viewHtmlCancel, viewHtmlUpdate = _b.viewHtmlUpdate;
|
|
55
64
|
var content = (React.createElement("textarea", { className: "k-textarea k-editor-textarea", style: {
|
|
56
65
|
height: '280px',
|
|
57
66
|
width: '490px'
|
|
58
|
-
}, ref: function (e) { return _this.htmlArea = e; }, defaultValue: kendo_editor_common_1.indentHtml(kendo_editor_common_1.getHtml(view.state)), autoFocus: true }));
|
|
67
|
+
}, ref: function (e) { return _this.htmlArea = e; }, defaultValue: (0, kendo_editor_common_1.indentHtml)((0, kendo_editor_common_1.getHtml)(view.state)), autoFocus: true }));
|
|
59
68
|
var actionButtons = [(React.createElement(kendo_react_buttons_1.Button, { onClick: this.onClose, dir: dir, key: "cancel" }, localization.toLanguageString(viewHtmlCancel, messages_1.messages[viewHtmlCancel]))), (React.createElement(kendo_react_buttons_1.Button, { onClick: this.onUpdate, themeColor: 'primary', dir: dir, key: "update" }, localization.toLanguageString(viewHtmlUpdate, messages_1.messages[viewHtmlUpdate])))
|
|
60
69
|
];
|
|
61
70
|
var dialog = (React.createElement(kendo_react_dialogs_1.Dialog, { title: localization.toLanguageString(viewHtmlDialogTitle, messages_1.messages[viewHtmlDialogTitle]), onClose: this.onClose, key: "dialog", closeIcon: true, dir: dir, style: dir === 'rtl' ? { textAlign: 'right' } : undefined, appendTo: document.body },
|
|
62
71
|
content,
|
|
63
|
-
React.createElement(kendo_react_dialogs_1.DialogActionsBar, null, actionButtons)));
|
|
72
|
+
React.createElement.apply(React, __spreadArray([kendo_react_dialogs_1.DialogActionsBar, null], actionButtons, false))));
|
|
64
73
|
return render ? render(dialog, { content: content, actionButtons: actionButtons }) : dialog;
|
|
65
74
|
};
|
|
66
75
|
return ViewHtmlDialog;
|
|
67
76
|
}(React.Component));
|
|
68
77
|
exports.ViewHtmlDialog = ViewHtmlDialog;
|
|
69
|
-
kendo_react_intl_1.registerForLocalization(ViewHtmlDialog);
|
|
78
|
+
(0, kendo_react_intl_1.registerForLocalization)(ViewHtmlDialog);
|
package/dist/npm/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;
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-editor',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1654762180,
|
|
12
12
|
version: '',
|
|
13
13
|
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'
|
|
14
14
|
};
|
package/dist/npm/tools/align.js
CHANGED
|
@@ -58,17 +58,17 @@ var createAlignTool = function (settings) {
|
|
|
58
58
|
AlignTool.prototype.render = function () {
|
|
59
59
|
var _a = this.props, view = _a.view, render = _a.render, props = __rest(_a, ["view", "render"]);
|
|
60
60
|
var state = view && view.state;
|
|
61
|
-
var aligned = !!state && kendo_editor_common_1.isAligned(state, settings.actions);
|
|
61
|
+
var aligned = !!state && (0, kendo_editor_common_1.isAligned)(state, settings.actions);
|
|
62
62
|
var actions = aligned ? alignRemove.actions : settings.actions;
|
|
63
63
|
var commandName = aligned ? alignRemove.commandName : settings.commandName;
|
|
64
|
-
var localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
64
|
+
var localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
65
65
|
var titleKey = settings.messages.title;
|
|
66
|
-
var button = (React.createElement(kendo_react_buttons_1.Button, __assign({ onClick: function () { return view && kendo_editor_common_1.alignBlocks(actions, commandName)(view.state, view.dispatch); }, selected: aligned, togglable: true }, utils_1.onDownPreventDefault, { title: localization.toLanguageString(titleKey, messages_1.messages[titleKey]) }, settings.props, props)));
|
|
66
|
+
var button = (React.createElement(kendo_react_buttons_1.Button, __assign({ onClick: function () { return view && (0, kendo_editor_common_1.alignBlocks)(actions, commandName)(view.state, view.dispatch); }, selected: aligned, togglable: true }, utils_1.onDownPreventDefault, { title: localization.toLanguageString(titleKey, messages_1.messages[titleKey]) }, settings.props, props)));
|
|
67
67
|
return render ? render.call(undefined, button, { view: view }) : button;
|
|
68
68
|
};
|
|
69
69
|
return AlignTool;
|
|
70
70
|
}(React.Component));
|
|
71
|
-
kendo_react_intl_1.registerForLocalization(Tool);
|
|
71
|
+
(0, kendo_react_intl_1.registerForLocalization)(Tool);
|
|
72
72
|
return Tool;
|
|
73
73
|
};
|
|
74
74
|
exports.createAlignTool = createAlignTool;
|
|
@@ -26,12 +26,12 @@ var ApplyColorTool = function (props) {
|
|
|
26
26
|
var _a = colorPickerProps.view, paletteView = _a === void 0 ? 'palette' : _a;
|
|
27
27
|
var onChange = React.useCallback(function (event) {
|
|
28
28
|
if (view) {
|
|
29
|
-
kendo_editor_common_1.applyInlineStyle({ style: style, value: event.value }, commandName)(view.state, view.dispatch);
|
|
29
|
+
(0, kendo_editor_common_1.applyInlineStyle)({ style: style, value: event.value }, commandName)(view.state, view.dispatch);
|
|
30
30
|
if (paletteView === 'palette') {
|
|
31
31
|
view.focus();
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}, [view, style, paletteView, commandName]);
|
|
35
|
-
return (React.createElement(kendo_react_inputs_1.ColorPicker, __assign({ onChange: onChange, onActiveColorClick: onChange }, colorPickerProps, { title: titleKey ? kendo_react_intl_1.useLocalization().toLanguageString(titleKey, messages_1.messages[titleKey]) : titleKey })));
|
|
35
|
+
return (React.createElement(kendo_react_inputs_1.ColorPicker, __assign({ onChange: onChange, onActiveColorClick: onChange }, colorPickerProps, { title: titleKey ? (0, kendo_react_intl_1.useLocalization)().toLanguageString(titleKey, messages_1.messages[titleKey]) : titleKey })));
|
|
36
36
|
};
|
|
37
37
|
exports.ApplyColorTool = ApplyColorTool;
|
|
@@ -31,7 +31,7 @@ var messages_1 = require("../messages");
|
|
|
31
31
|
var kendo_editor_common_1 = require("@progress/kendo-editor-common");
|
|
32
32
|
var toolsSettings_1 = require("./../config/toolsSettings");
|
|
33
33
|
var cleanFormatting = toolsSettings_1.EditorToolsSettings.cleanFormatting;
|
|
34
|
-
var command = kendo_editor_common_1.cleanFormatting();
|
|
34
|
+
var command = (0, kendo_editor_common_1.cleanFormatting)();
|
|
35
35
|
/**
|
|
36
36
|
* @hidden
|
|
37
37
|
*/
|
|
@@ -46,7 +46,7 @@ var CleanFormatting = function (props) {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
}, [view]);
|
|
49
|
-
var button = (React.createElement(kendo_react_buttons_1.Button, __assign({ onClick: onClick, disabled: !view || !command(view.state), title: kendo_react_intl_1.useLocalization().toLanguageString(titleKey, messages_1.messages[titleKey]) }, utils_1.onDownPreventDefault, settings.props, buttonProps)));
|
|
50
|
-
return render ? render.call(undefined, button, { view: view }) : button;
|
|
49
|
+
var button = (React.createElement(kendo_react_buttons_1.Button, __assign({ onClick: onClick, disabled: !view || !command(view.state), title: (0, kendo_react_intl_1.useLocalization)().toLanguageString(titleKey, messages_1.messages[titleKey]) }, utils_1.onDownPreventDefault, settings.props, buttonProps)));
|
|
50
|
+
return (render ? render.call(undefined, button, { view: view }) : button);
|
|
51
51
|
};
|
|
52
52
|
exports.CleanFormatting = CleanFormatting;
|
|
@@ -67,11 +67,11 @@ var FindAndReplace = /** @class */ (function (_super) {
|
|
|
67
67
|
FindAndReplace.prototype.render = function () {
|
|
68
68
|
var _a = this.props, view = _a.view, buttonProps = __rest(_a, ["view"]);
|
|
69
69
|
var props = settings.props;
|
|
70
|
-
var localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
70
|
+
var localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
71
71
|
var titleKey = settings.messages.findReplaceToolTitle;
|
|
72
72
|
return [(React.createElement(kendo_react_buttons_1.Button, __assign({ onClick: this.onOpen }, utils_1.onDownPreventDefault, { disabled: !view, title: localization.toLanguageString(titleKey, messages_1.messages[titleKey]), key: "tool" }, props, buttonProps))), this.state.showDialog && view && (React.createElement(FindReplace_1.FindAndReplaceDialog, { view: view, onClose: this.onClose, dir: buttonProps.dir, key: "dialog" }))];
|
|
73
73
|
};
|
|
74
74
|
return FindAndReplace;
|
|
75
75
|
}(React.Component));
|
|
76
76
|
exports.FindAndReplace = FindAndReplace;
|
|
77
|
-
kendo_react_intl_1.registerForLocalization(FindAndReplace);
|
|
77
|
+
(0, kendo_react_intl_1.registerForLocalization)(FindAndReplace);
|
|
@@ -62,7 +62,7 @@ var FontStyleToolNS;
|
|
|
62
62
|
var view = _this.props.view;
|
|
63
63
|
var style = settings.style;
|
|
64
64
|
if (view) {
|
|
65
|
-
kendo_editor_common_1.applyInlineStyle({ style: style, value: item.value }, settings.commandName)(view.state, view.dispatch);
|
|
65
|
+
(0, kendo_editor_common_1.applyInlineStyle)({ style: style, value: item.value }, settings.commandName)(view.state, view.dispatch);
|
|
66
66
|
var syntheticEvent = event.syntheticEvent;
|
|
67
67
|
if (syntheticEvent && syntheticEvent.type === 'click') {
|
|
68
68
|
view.focus();
|
|
@@ -76,8 +76,8 @@ var FontStyleToolNS;
|
|
|
76
76
|
var _a = this.props, view = _a.view, render = _a.render, data = _a.data, defaultItemProps = _a.defaultItem, ddlProps = __rest(_a, ["view", "render", "data", "defaultItem"]);
|
|
77
77
|
var items = data || settings.items;
|
|
78
78
|
var defaultItem = defaultItemProps || settings.defaultItem;
|
|
79
|
-
var styles = view ? kendo_editor_common_1.getInlineStyles(view.state, { name: style, value: /^.+$/ }) : [];
|
|
80
|
-
var localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
79
|
+
var styles = view ? (0, kendo_editor_common_1.getInlineStyles)(view.state, { name: style, value: /^.+$/ }) : [];
|
|
80
|
+
var localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
81
81
|
if (defaultItem && defaultItem.localizationKey) {
|
|
82
82
|
defaultItem = __assign({}, defaultItem);
|
|
83
83
|
defaultItem.text = defaultItem.localizationKey ? localization.toLanguageString(defaultItem.localizationKey, messages_1.messages[defaultItem.localizationKey]) : defaultItem.text;
|
|
@@ -88,7 +88,7 @@ var FontStyleToolNS;
|
|
|
88
88
|
};
|
|
89
89
|
return DropDownListTool;
|
|
90
90
|
}(React.Component));
|
|
91
|
-
kendo_react_intl_1.registerForLocalization(Tool);
|
|
91
|
+
(0, kendo_react_intl_1.registerForLocalization)(Tool);
|
|
92
92
|
return Tool;
|
|
93
93
|
};
|
|
94
94
|
})(FontStyleToolNS = exports.FontStyleToolNS || (exports.FontStyleToolNS = {}));
|
|
@@ -60,7 +60,7 @@ var FormatBlockToolNS;
|
|
|
60
60
|
_this.onChange = function (event) {
|
|
61
61
|
var item = event.target.value;
|
|
62
62
|
var view = _this.props.view;
|
|
63
|
-
if (view && kendo_editor_common_1.formatBlockElements(item.value, settings.commandName)(view.state, view.dispatch)) {
|
|
63
|
+
if (view && (0, kendo_editor_common_1.formatBlockElements)(item.value, settings.commandName)(view.state, view.dispatch)) {
|
|
64
64
|
var syntheticEvent = event.syntheticEvent;
|
|
65
65
|
if (syntheticEvent && syntheticEvent.type === 'click') {
|
|
66
66
|
view.focus();
|
|
@@ -74,8 +74,8 @@ var FormatBlockToolNS;
|
|
|
74
74
|
var items = data || settings.items;
|
|
75
75
|
var defaultItem = defaultItemProps || settings.defaultItem;
|
|
76
76
|
var state = view && view.state;
|
|
77
|
-
var formats = state ? kendo_editor_common_1.getBlockFormats(state) : [];
|
|
78
|
-
var localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
77
|
+
var formats = state ? (0, kendo_editor_common_1.getBlockFormats)(state) : [];
|
|
78
|
+
var localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
79
79
|
if (defaultItem && defaultItem.localizationKey) {
|
|
80
80
|
defaultItem = __assign({}, defaultItem);
|
|
81
81
|
defaultItem.text = defaultItem.localizationKey ? localization.toLanguageString(defaultItem.localizationKey, messages_1.messages[defaultItem.localizationKey]) : defaultItem.text;
|
|
@@ -86,7 +86,7 @@ var FormatBlockToolNS;
|
|
|
86
86
|
};
|
|
87
87
|
return FormatBlockDropDownList;
|
|
88
88
|
}(React.Component));
|
|
89
|
-
kendo_react_intl_1.registerForLocalization(Tool);
|
|
89
|
+
(0, kendo_react_intl_1.registerForLocalization)(Tool);
|
|
90
90
|
return Tool;
|
|
91
91
|
};
|
|
92
92
|
})(FormatBlockToolNS = exports.FormatBlockToolNS || (exports.FormatBlockToolNS = {}));
|
|
@@ -11,9 +11,9 @@ var HistoryToolNS;
|
|
|
11
11
|
/**
|
|
12
12
|
* @hidden
|
|
13
13
|
*/
|
|
14
|
-
HistoryToolNS.createUndoTool = function (settings) { return proseMirrorTool_1.createProseMirrorTool(settings, kendo_editor_common_1.undo); };
|
|
14
|
+
HistoryToolNS.createUndoTool = function (settings) { return (0, proseMirrorTool_1.createProseMirrorTool)(settings, kendo_editor_common_1.undo); };
|
|
15
15
|
/**
|
|
16
16
|
* @hidden
|
|
17
17
|
*/
|
|
18
|
-
HistoryToolNS.createRedoTool = function (settings) { return proseMirrorTool_1.createProseMirrorTool(settings, kendo_editor_common_1.redo); };
|
|
18
|
+
HistoryToolNS.createRedoTool = function (settings) { return (0, proseMirrorTool_1.createProseMirrorTool)(settings, kendo_editor_common_1.redo); };
|
|
19
19
|
})(HistoryToolNS = exports.HistoryToolNS || (exports.HistoryToolNS = {}));
|
package/dist/npm/tools/indent.js
CHANGED
|
@@ -65,26 +65,26 @@ var IndentToolNS;
|
|
|
65
65
|
var listItem = nodes && nodes[settings.listsTypes.listItem];
|
|
66
66
|
var actions = settings.actions;
|
|
67
67
|
var canIndented = !!state &&
|
|
68
|
-
(kendo_editor_common_1.isIndented(state, actions, buttonProps.dir) ||
|
|
69
|
-
actions.some(function (a) { return nodes[a.node] && kendo_editor_common_1.hasNode(state, nodes[a.node]); })) &&
|
|
70
|
-
!kendo_editor_common_1.hasNode(state, listItem);
|
|
71
|
-
var canListIndent = !!state && kendo_editor_common_1.canIndentAsListItem(state, listItem);
|
|
68
|
+
((0, kendo_editor_common_1.isIndented)(state, actions, buttonProps.dir) ||
|
|
69
|
+
actions.some(function (a) { return nodes[a.node] && (0, kendo_editor_common_1.hasNode)(state, nodes[a.node]); })) &&
|
|
70
|
+
!(0, kendo_editor_common_1.hasNode)(state, listItem);
|
|
71
|
+
var canListIndent = !!state && (0, kendo_editor_common_1.canIndentAsListItem)(state, listItem);
|
|
72
72
|
var canIndent = canIndented || canListIndent;
|
|
73
|
-
var localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
73
|
+
var localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
74
74
|
var titleKey = settings.messages.title;
|
|
75
75
|
var button = (React.createElement(kendo_react_buttons_1.Button, __assign({ onClick: function () {
|
|
76
76
|
if (view && canListIndent) {
|
|
77
|
-
kendo_editor_common_1.sinkListItem(listItem)(view.state, view.dispatch);
|
|
77
|
+
(0, kendo_editor_common_1.sinkListItem)(listItem)(view.state, view.dispatch);
|
|
78
78
|
}
|
|
79
79
|
else if (view && canIndented) {
|
|
80
|
-
kendo_editor_common_1.indentBlocks(actions, settings.commandName, buttonProps.dir)(view.state, view.dispatch);
|
|
80
|
+
(0, kendo_editor_common_1.indentBlocks)(actions, settings.commandName, buttonProps.dir)(view.state, view.dispatch);
|
|
81
81
|
}
|
|
82
82
|
}, title: localization.toLanguageString(titleKey, messages_1.messages[titleKey]), disabled: !canIndent }, utils_1.onDownPreventDefault, settings.props, buttonProps)));
|
|
83
83
|
return render ? render.call(undefined, button, { view: view }) : button;
|
|
84
84
|
};
|
|
85
85
|
return IndentTool;
|
|
86
86
|
}(React.Component));
|
|
87
|
-
kendo_react_intl_1.registerForLocalization(Tool);
|
|
87
|
+
(0, kendo_react_intl_1.registerForLocalization)(Tool);
|
|
88
88
|
return Tool;
|
|
89
89
|
};
|
|
90
90
|
})(IndentToolNS = exports.IndentToolNS || (exports.IndentToolNS = {}));
|
|
@@ -63,16 +63,16 @@ var InlineFormatToolNS;
|
|
|
63
63
|
var state = view && view.state;
|
|
64
64
|
var mark = settings.mark, altMarks = settings.altMarks, altStyle = settings.altStyle;
|
|
65
65
|
var options = { mark: mark, altMarks: altMarks, altStyle: altStyle };
|
|
66
|
-
var localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
66
|
+
var localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
67
67
|
var titleKey = settings.messages.title;
|
|
68
68
|
var button = (React.createElement(kendo_react_buttons_1.Button, __assign({ onClick: function () {
|
|
69
|
-
return view && kendo_editor_common_1.toggleInlineFormat(options, state && state.tr.setMeta('commandName', settings.commandName))(view.state, view.dispatch);
|
|
70
|
-
}, selected: !!state && kendo_editor_common_1.hasMark(state, options), togglable: true }, utils_1.onDownPreventDefault, { title: localization.toLanguageString(titleKey, messages_1.messages[titleKey]) }, settings.props, buttonProps)));
|
|
69
|
+
return view && (0, kendo_editor_common_1.toggleInlineFormat)(options, state && state.tr.setMeta('commandName', settings.commandName))(view.state, view.dispatch);
|
|
70
|
+
}, selected: !!state && (0, kendo_editor_common_1.hasMark)(state, options), togglable: true }, utils_1.onDownPreventDefault, { title: localization.toLanguageString(titleKey, messages_1.messages[titleKey]) }, settings.props, buttonProps)));
|
|
71
71
|
return render ? render.call(undefined, button, { view: view }) : button;
|
|
72
72
|
};
|
|
73
73
|
return InlineTool;
|
|
74
74
|
}(React.Component));
|
|
75
|
-
kendo_react_intl_1.registerForLocalization(Tool);
|
|
75
|
+
(0, kendo_react_intl_1.registerForLocalization)(Tool);
|
|
76
76
|
return Tool;
|
|
77
77
|
};
|
|
78
78
|
})(InlineFormatToolNS = exports.InlineFormatToolNS || (exports.InlineFormatToolNS = {}));
|
|
@@ -67,14 +67,14 @@ var createInsertImageTool = function (settings) {
|
|
|
67
67
|
var _a = this.props, view = _a.view, render = _a.render, buttonProps = __rest(_a, ["view", "render"]);
|
|
68
68
|
var state = view && view.state;
|
|
69
69
|
var nodeType = state ? state.schema.nodes[settings.node] : undefined;
|
|
70
|
-
var localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
70
|
+
var localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
71
71
|
var insertImage = settings.messages.insertImage;
|
|
72
|
-
var rendering = [(React.createElement(kendo_react_buttons_1.Button, __assign({ onClick: this.toggleDialog, key: "insertImage", disabled: !nodeType || !state || !kendo_editor_common_1.canInsert(state, nodeType) }, utils_1.onDownPreventDefault, { title: localization.toLanguageString(insertImage, messages_1.messages[insertImage]) }, settings.props, buttonProps))), (this.state.openedDialog && view && (React.createElement(main_1.EditorDialogs.InsertImageDialog, { key: "insertImageDialog", view: view, settings: settings, dir: buttonProps.dir, onClose: this.toggleDialog })) || null)];
|
|
72
|
+
var rendering = [(React.createElement(kendo_react_buttons_1.Button, __assign({ onClick: this.toggleDialog, key: "insertImage", disabled: !nodeType || !state || !(0, kendo_editor_common_1.canInsert)(state, nodeType) }, utils_1.onDownPreventDefault, { title: localization.toLanguageString(insertImage, messages_1.messages[insertImage]) }, settings.props, buttonProps))), (this.state.openedDialog && view && (React.createElement(main_1.EditorDialogs.InsertImageDialog, { key: "insertImageDialog", view: view, settings: settings, dir: buttonProps.dir, onClose: this.toggleDialog })) || null)];
|
|
73
73
|
return render ? render.call(undefined, rendering, { view: view }) : rendering;
|
|
74
74
|
};
|
|
75
75
|
return InsertImageTool;
|
|
76
76
|
}(React.Component));
|
|
77
|
-
kendo_react_intl_1.registerForLocalization(Tool);
|
|
77
|
+
(0, kendo_react_intl_1.registerForLocalization)(Tool);
|
|
78
78
|
return Tool;
|
|
79
79
|
};
|
|
80
80
|
exports.createInsertImageTool = createInsertImageTool;
|
|
@@ -72,15 +72,15 @@ var LinkToolNS;
|
|
|
72
72
|
var _a = this.props, view = _a.view, render = _a.render, props = __rest(_a, ["view", "render"]);
|
|
73
73
|
var state = view && view.state;
|
|
74
74
|
var collapsed = state ? state.selection.empty : true;
|
|
75
|
-
var linkMark = state && kendo_editor_common_1.getMark(state, state.schema.marks[settings.mark]);
|
|
76
|
-
var localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
75
|
+
var linkMark = state && (0, kendo_editor_common_1.getMark)(state, state.schema.marks[settings.mark]);
|
|
76
|
+
var localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
77
77
|
var insertHyperlink = settings.messages.insertHyperlink;
|
|
78
78
|
var rendering = [(React.createElement(kendo_react_buttons_1.Button, __assign({ onClick: this.toggleDialog, key: "link", disabled: collapsed && !linkMark }, utils_1.onDownPreventDefault, { title: localization.toLanguageString(insertHyperlink, messages_1.messages[insertHyperlink]) }, settings.props, props))), (this.state.openedDialog && view && (React.createElement(main_1.EditorDialogs.InsertLinkDialog, { key: "insertLinkDialog", settings: settings, dir: props.dir, view: view, onClose: this.toggleDialog })) || null)];
|
|
79
79
|
return render ? render.call(undefined, rendering, { view: view }) : rendering;
|
|
80
80
|
};
|
|
81
81
|
return LinkTool;
|
|
82
82
|
}(React.Component));
|
|
83
|
-
kendo_react_intl_1.registerForLocalization(Tool);
|
|
83
|
+
(0, kendo_react_intl_1.registerForLocalization)(Tool);
|
|
84
84
|
return Tool;
|
|
85
85
|
};
|
|
86
86
|
})(LinkToolNS = exports.LinkToolNS || (exports.LinkToolNS = {}));
|
|
@@ -34,7 +34,7 @@ var PopupGrid = /** @class */ (function (_super) {
|
|
|
34
34
|
var row = Math.floor(index / this.props.columns);
|
|
35
35
|
var col = index % this.props.columns;
|
|
36
36
|
var selected = col <= selCol && row <= selRow;
|
|
37
|
-
return (React.createElement("span", { className: cellClass + (selected ? " "
|
|
37
|
+
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 }));
|
|
38
38
|
};
|
|
39
39
|
PopupGrid.prototype.render = function () {
|
|
40
40
|
var _this = this;
|
|
@@ -44,7 +44,7 @@ var PopupGrid = /** @class */ (function (_super) {
|
|
|
44
44
|
var onDown = this.props.onDown;
|
|
45
45
|
var message = this.props.createTableMessage;
|
|
46
46
|
if (col > -1) {
|
|
47
|
-
message = utils_1.formatString(this.props.createTableHintMessage, row + 1, col + 1);
|
|
47
|
+
message = (0, utils_1.formatString)(this.props.createTableHintMessage, row + 1, col + 1);
|
|
48
48
|
}
|
|
49
49
|
for (var i = 0; i < total; i++) {
|
|
50
50
|
cells.push(this.renderCell(i, row, col));
|
|
@@ -77,9 +77,9 @@ var InsertTableToolNS;
|
|
|
77
77
|
if (!view) {
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
|
-
var newTable = kendo_editor_common_1.createTable(view.state.schema.nodes, row, col);
|
|
80
|
+
var newTable = (0, kendo_editor_common_1.createTable)(view.state.schema.nodes, row, col);
|
|
81
81
|
if (newTable) {
|
|
82
|
-
kendo_editor_common_1.insertNode(newTable, true)(view.state, view.dispatch);
|
|
82
|
+
(0, kendo_editor_common_1.insertNode)(newTable, true)(view.state, view.dispatch);
|
|
83
83
|
}
|
|
84
84
|
view.focus();
|
|
85
85
|
_this.closePopup();
|
|
@@ -90,16 +90,16 @@ var InsertTableToolNS;
|
|
|
90
90
|
var _this = this;
|
|
91
91
|
var _a = this.props, view = _a.view, render = _a.render, props = __rest(_a, ["view", "render"]);
|
|
92
92
|
var state = view && view.state;
|
|
93
|
-
var localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
93
|
+
var localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
94
94
|
var _b = settings.messages, createTableMsgKey = _b.createTable, createTableHint = _b.createTableHint;
|
|
95
95
|
var createTableMsg = localization.toLanguageString(createTableMsgKey, messages_1.messages[createTableMsgKey]);
|
|
96
96
|
var createTableHintMsg = localization.toLanguageString(createTableHint, messages_1.messages[createTableHint]);
|
|
97
|
-
var rendering = [(React.createElement(kendo_react_buttons_1.Button, __assign({ onClick: this.togglePopup, ref: function (e) { return _this.button = e && e.element; }, key: "InsertTable", disabled: !state || !kendo_editor_common_1.canInsert(state, state.schema.nodes.table) }, utils_1.onDownPreventDefault, { title: createTableMsg }, settings.props, props))), (view && (React.createElement(popup_1.InsertTablePopupNS.InsertTablePopup, { key: "insertTablePopup", createTableMessage: createTableMsg, createTableHintMessage: createTableHintMsg, dir: props.dir, anchor: this.button, show: this.state.openedPopup, onClose: this.closePopup, onTableInsert: this.onTableInsert })) || null)];
|
|
97
|
+
var rendering = [(React.createElement(kendo_react_buttons_1.Button, __assign({ onClick: this.togglePopup, ref: function (e) { return _this.button = e && e.element; }, key: "InsertTable", disabled: !state || !(0, kendo_editor_common_1.canInsert)(state, state.schema.nodes.table) }, utils_1.onDownPreventDefault, { title: createTableMsg }, settings.props, props))), (view && (React.createElement(popup_1.InsertTablePopupNS.InsertTablePopup, { key: "insertTablePopup", createTableMessage: createTableMsg, createTableHintMessage: createTableHintMsg, dir: props.dir, anchor: this.button, show: this.state.openedPopup, onClose: this.closePopup, onTableInsert: this.onTableInsert })) || null)];
|
|
98
98
|
return render ? render.call(undefined, rendering, { view: view }) : rendering;
|
|
99
99
|
};
|
|
100
100
|
return InsertTableTool;
|
|
101
101
|
}(React.Component));
|
|
102
|
-
kendo_react_intl_1.registerForLocalization(Tool);
|
|
102
|
+
(0, kendo_react_intl_1.registerForLocalization)(Tool);
|
|
103
103
|
return Tool;
|
|
104
104
|
};
|
|
105
105
|
})(InsertTableToolNS = exports.InsertTableToolNS || (exports.InsertTableToolNS = {}));
|