@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.
Files changed (113) hide show
  1. package/dist/cdn/js/kendo-react-editor.js +1 -1
  2. package/dist/es/Editor.d.ts +5 -5
  3. package/dist/es/Editor.js +25 -11
  4. package/dist/es/EditorProps.d.ts +1 -1
  5. package/dist/es/EditorProps.js +1 -0
  6. package/dist/es/config/pasteSettings.js +1 -0
  7. package/dist/es/config/shortcuts.d.ts +6 -6
  8. package/dist/es/config/shortcuts.js +1 -1
  9. package/dist/es/config/toolsSettings.js +23 -14
  10. package/dist/es/dialogs/EditorDialogProps.js +1 -0
  11. package/dist/es/dialogs/FindReplace.d.ts +1 -1
  12. package/dist/es/dialogs/FindReplace.js +6 -5
  13. package/dist/es/dialogs/insertImage.d.ts +1 -1
  14. package/dist/es/dialogs/insertImage.js +13 -2
  15. package/dist/es/dialogs/insertLink.d.ts +1 -1
  16. package/dist/es/dialogs/insertLink.js +13 -2
  17. package/dist/es/dialogs/main.js +3 -1
  18. package/dist/es/dialogs/viewHtml.d.ts +1 -1
  19. package/dist/es/dialogs/viewHtml.js +13 -2
  20. package/dist/es/main.d.ts +3 -3
  21. package/dist/es/main.js +116 -29
  22. package/dist/es/messages/index.d.ts +78 -391
  23. package/dist/es/package-metadata.js +1 -1
  24. package/dist/es/tools/ToolProps.d.ts +4 -1
  25. package/dist/es/tools/ToolProps.js +1 -0
  26. package/dist/es/tools/align.js +7 -3
  27. package/dist/es/tools/cleanFormatting.js +5 -3
  28. package/dist/es/tools/findReplace.d.ts +1 -1
  29. package/dist/es/tools/findReplace.js +7 -3
  30. package/dist/es/tools/fontStyle.js +7 -3
  31. package/dist/es/tools/formatBlock.js +7 -3
  32. package/dist/es/tools/indent.js +7 -3
  33. package/dist/es/tools/inlineFormat.js +7 -3
  34. package/dist/es/tools/insertImage.js +7 -3
  35. package/dist/es/tools/insertLink.js +7 -3
  36. package/dist/es/tools/insertTable/popup.js +3 -1
  37. package/dist/es/tools/insertTable/popupGrid.js +4 -2
  38. package/dist/es/tools/insertTable/tool.js +7 -3
  39. package/dist/es/tools/lists-styled.js +13 -4
  40. package/dist/es/tools/lists.js +7 -3
  41. package/dist/es/tools/main.d.ts +113 -112
  42. package/dist/es/tools/main.js +3 -1
  43. package/dist/es/tools/outdent.js +7 -3
  44. package/dist/es/tools/pdf.js +6 -4
  45. package/dist/es/tools/print.js +5 -3
  46. package/dist/es/tools/proseMirrorTool.js +7 -3
  47. package/dist/es/tools/selectAll.js +5 -3
  48. package/dist/es/tools/tableEdit.d.ts +8 -8
  49. package/dist/es/tools/unlink.js +7 -3
  50. package/dist/es/tools/utils.d.ts +1 -1
  51. package/dist/es/tools/viewHtml.js +7 -3
  52. package/dist/es/utils/controlled-value.d.ts +1 -2
  53. package/dist/npm/Editor.d.ts +5 -5
  54. package/dist/npm/Editor.js +35 -20
  55. package/dist/npm/EditorProps.d.ts +1 -1
  56. package/dist/npm/config/defaultStyles.js +1 -0
  57. package/dist/npm/config/schema.js +3 -2
  58. package/dist/npm/config/shortcuts.d.ts +6 -6
  59. package/dist/npm/config/shortcuts.js +7 -5
  60. package/dist/npm/config/toolsSettings.js +24 -14
  61. package/dist/npm/dialogs/FindReplace.d.ts +1 -1
  62. package/dist/npm/dialogs/FindReplace.js +15 -13
  63. package/dist/npm/dialogs/insertImage.d.ts +1 -1
  64. package/dist/npm/dialogs/insertImage.js +17 -5
  65. package/dist/npm/dialogs/insertLink.d.ts +1 -1
  66. package/dist/npm/dialogs/insertLink.js +18 -6
  67. package/dist/npm/dialogs/main.js +4 -1
  68. package/dist/npm/dialogs/viewHtml.d.ts +1 -1
  69. package/dist/npm/dialogs/viewHtml.js +19 -7
  70. package/dist/npm/main.d.ts +3 -3
  71. package/dist/npm/main.js +121 -33
  72. package/dist/npm/messages/index.d.ts +78 -391
  73. package/dist/npm/messages/index.js +2 -1
  74. package/dist/npm/package-metadata.js +2 -1
  75. package/dist/npm/tools/ToolProps.d.ts +4 -1
  76. package/dist/npm/tools/align.js +14 -8
  77. package/dist/npm/tools/applyColor.js +5 -3
  78. package/dist/npm/tools/cleanFormatting.js +10 -6
  79. package/dist/npm/tools/findReplace.d.ts +1 -1
  80. package/dist/npm/tools/findReplace.js +10 -5
  81. package/dist/npm/tools/fontStyle.js +12 -7
  82. package/dist/npm/tools/formatBlock.js +12 -7
  83. package/dist/npm/tools/history.js +3 -2
  84. package/dist/npm/tools/indent.js +16 -11
  85. package/dist/npm/tools/inlineFormat.js +12 -7
  86. package/dist/npm/tools/insertImage.js +13 -7
  87. package/dist/npm/tools/insertLink.js +11 -6
  88. package/dist/npm/tools/insertTable/index.js +3 -2
  89. package/dist/npm/tools/insertTable/popup.js +4 -1
  90. package/dist/npm/tools/insertTable/popupGrid.js +5 -3
  91. package/dist/npm/tools/insertTable/tool.js +13 -8
  92. package/dist/npm/tools/lists-styled.js +18 -7
  93. package/dist/npm/tools/lists.js +12 -7
  94. package/dist/npm/tools/main.d.ts +113 -112
  95. package/dist/npm/tools/main.js +4 -1
  96. package/dist/npm/tools/outdent.js +14 -9
  97. package/dist/npm/tools/pdf.js +10 -6
  98. package/dist/npm/tools/print.js +9 -5
  99. package/dist/npm/tools/proseMirrorTool.js +12 -6
  100. package/dist/npm/tools/selectAll.js +10 -6
  101. package/dist/npm/tools/tableEdit.d.ts +8 -8
  102. package/dist/npm/tools/tableEdit.js +14 -13
  103. package/dist/npm/tools/unlink.js +12 -7
  104. package/dist/npm/tools/utils.d.ts +1 -1
  105. package/dist/npm/tools/utils.js +1 -0
  106. package/dist/npm/tools/viewHtml.js +10 -5
  107. package/dist/npm/utils/browser-detection.js +1 -0
  108. package/dist/npm/utils/controlled-value.d.ts +1 -2
  109. package/dist/npm/utils/controlled-value.js +3 -1
  110. package/dist/npm/utils/index.js +37 -36
  111. package/dist/npm/utils/props-key.js +1 -0
  112. package/dist/systemjs/kendo-react-editor.js +1 -1
  113. package/package.json +13 -13
@@ -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.EditorUtils = void 0;
14
15
  var shortcuts = require("./../config/shortcuts");
15
16
  var schema_1 = require("./../config/schema");
16
17
  var kendo_editor_common_1 = require("@progress/kendo-editor-common");
@@ -26,7 +27,7 @@ var EditorUtils;
26
27
  * @returns {boolean}—If alignment is applied to any of the elements, returns `true`.
27
28
  */
28
29
  function alignBlocks(view, actions, command) {
29
- return Boolean(kendo_editor_common_1.alignBlocks(actions, command)(view.state, view.dispatch));
30
+ return Boolean((0, kendo_editor_common_1.alignBlocks)(actions, command)(view.state, view.dispatch));
30
31
  }
31
32
  EditorUtils.alignBlocks = alignBlocks;
32
33
  /**
@@ -35,7 +36,7 @@ var EditorUtils;
35
36
  * @returns {boolean}—If a style is applied to any of the elements, returns `true`.
36
37
  */
37
38
  function applyInlineStyle(view, options, command) {
38
- return kendo_editor_common_1.applyInlineStyle(options, command)(view.state, view.dispatch);
39
+ return (0, kendo_editor_common_1.applyInlineStyle)(options, command)(view.state, view.dispatch);
39
40
  }
40
41
  EditorUtils.applyInlineStyle = applyInlineStyle;
41
42
  /**
@@ -44,7 +45,7 @@ var EditorUtils;
44
45
  * @returns {boolean}—If the link is applied, returns `true`.
45
46
  */
46
47
  function applyLink(view, options, command) {
47
- return kendo_editor_common_1.applyLink(options, command)(view.state, view.dispatch);
48
+ return (0, kendo_editor_common_1.applyLink)(options, command)(view.state, view.dispatch);
48
49
  }
49
50
  EditorUtils.applyLink = applyLink;
50
51
  /**
@@ -53,7 +54,7 @@ var EditorUtils;
53
54
  * @returns {boolean}
54
55
  */
55
56
  function canIndentList(state, nodeType) {
56
- return kendo_editor_common_1.canIndentAsListItem(state, nodeType);
57
+ return (0, kendo_editor_common_1.canIndentAsListItem)(state, nodeType);
57
58
  }
58
59
  EditorUtils.canIndentList = canIndentList;
59
60
  /**
@@ -64,7 +65,7 @@ var EditorUtils;
64
65
  * @returns {boolean}—The node of this type can be inserted in the current selection.
65
66
  */
66
67
  function canInsert(state, nodeType) {
67
- return kendo_editor_common_1.canInsert(state, nodeType);
68
+ return (0, kendo_editor_common_1.canInsert)(state, nodeType);
68
69
  }
69
70
  EditorUtils.canInsert = canInsert;
70
71
  /**
@@ -73,7 +74,7 @@ var EditorUtils;
73
74
  * @returns {boolean}
74
75
  */
75
76
  function canOutdentList(state, listsTypes) {
76
- return kendo_editor_common_1.canOutdentAsListItem(state, { listsTypes: listsTypes, nodes: [] });
77
+ return (0, kendo_editor_common_1.canOutdentAsListItem)(state, { listsTypes: listsTypes, nodes: [] });
77
78
  }
78
79
  EditorUtils.canOutdentList = canOutdentList;
79
80
  /**
@@ -83,7 +84,7 @@ var EditorUtils;
83
84
  * @returns {string}—The result HTML.
84
85
  */
85
86
  function convertMsLists(html) {
86
- return kendo_editor_common_1.convertMsLists(html);
87
+ return (0, kendo_editor_common_1.convertMsLists)(html);
87
88
  }
88
89
  EditorUtils.convertMsLists = convertMsLists;
89
90
  /**
@@ -95,7 +96,7 @@ var EditorUtils;
95
96
  * @returns {Node}—The `document` object of the Editor.
96
97
  */
97
98
  function createDocument(schema, html, parseOptions) {
98
- return kendo_editor_common_1.parseContent(kendo_editor_common_1.trimWhitespace(html), schema, parseOptions !== undefined ? parseOptions : { preserveWhitespace: 'full' });
99
+ return (0, kendo_editor_common_1.parseContent)((0, kendo_editor_common_1.trimWhitespace)(html), schema, parseOptions !== undefined ? parseOptions : { preserveWhitespace: 'full' });
99
100
  }
100
101
  EditorUtils.createDocument = createDocument;
101
102
  /**
@@ -118,7 +119,7 @@ var EditorUtils;
118
119
  * ```
119
120
  */
120
121
  function createTable(tableTypes, rows, columns) {
121
- return kendo_editor_common_1.createTable(tableTypes, rows, columns);
122
+ return (0, kendo_editor_common_1.createTable)(tableTypes, rows, columns);
122
123
  }
123
124
  EditorUtils.createTable = createTable;
124
125
  /**
@@ -127,7 +128,7 @@ var EditorUtils;
127
128
  * @returns {boolean}—If an element is formatted, returns `true`.
128
129
  */
129
130
  function formatBlockElements(view, value, commandName) {
130
- return kendo_editor_common_1.formatBlockElements(value, commandName)(view.state, view.dispatch);
131
+ return (0, kendo_editor_common_1.formatBlockElements)(value, commandName)(view.state, view.dispatch);
131
132
  }
132
133
  EditorUtils.formatBlockElements = formatBlockElements;
133
134
  /**
@@ -136,7 +137,7 @@ var EditorUtils;
136
137
  * @returns {string[]}
137
138
  */
138
139
  function getBlockFormats(state) {
139
- return kendo_editor_common_1.getBlockFormats(state);
140
+ return (0, kendo_editor_common_1.getBlockFormats)(state);
140
141
  }
141
142
  EditorUtils.getBlockFormats = getBlockFormats;
142
143
  /**
@@ -147,14 +148,14 @@ var EditorUtils;
147
148
  * @returns {string}—The HTML content.
148
149
  */
149
150
  function getHtml(state) {
150
- return kendo_editor_common_1.getHtml(state);
151
+ return (0, kendo_editor_common_1.getHtml)(state);
151
152
  }
152
153
  EditorUtils.getHtml = getHtml;
153
154
  /**
154
155
  * @returns {string[]}—An array of matched styles that are found in the selection.
155
156
  */
156
157
  function getInlineStyles(state, style) {
157
- return kendo_editor_common_1.getInlineStyles(state, style);
158
+ return (0, kendo_editor_common_1.getInlineStyles)(state, style);
158
159
  }
159
160
  EditorUtils.getInlineStyles = getInlineStyles;
160
161
  /**
@@ -163,7 +164,7 @@ var EditorUtils;
163
164
  * @returns {Mark<any>}
164
165
  */
165
166
  function getMark(state, markType) {
166
- return kendo_editor_common_1.getMark(state, markType);
167
+ return (0, kendo_editor_common_1.getMark)(state, markType);
167
168
  }
168
169
  EditorUtils.getMark = getMark;
169
170
  /**
@@ -172,7 +173,7 @@ var EditorUtils;
172
173
  * @returns {boolean}
173
174
  */
174
175
  function hasMark(state, options) {
175
- return kendo_editor_common_1.hasMark(state, options);
176
+ return (0, kendo_editor_common_1.hasMark)(state, options);
176
177
  }
177
178
  EditorUtils.hasMark = hasMark;
178
179
  /**
@@ -181,7 +182,7 @@ var EditorUtils;
181
182
  * @returns {boolean}
182
183
  */
183
184
  function hasNode(state, nodeType) {
184
- return kendo_editor_common_1.hasNode(state, nodeType);
185
+ return (0, kendo_editor_common_1.hasNode)(state, nodeType);
185
186
  }
186
187
  EditorUtils.hasNode = hasNode;
187
188
  /**
@@ -190,7 +191,7 @@ var EditorUtils;
190
191
  * @returns {boolean}&mdash;If indentation is applied to any of the elements, returns `true`.
191
192
  */
192
193
  function indentBlocks(view, actions, command, dir) {
193
- return Boolean(kendo_editor_common_1.indentBlocks(actions, command, dir)(view.state, view.dispatch));
194
+ return Boolean((0, kendo_editor_common_1.indentBlocks)(actions, command, dir)(view.state, view.dispatch));
194
195
  }
195
196
  EditorUtils.indentBlocks = indentBlocks;
196
197
  /**
@@ -200,7 +201,7 @@ var EditorUtils;
200
201
  * @returns {string}&mdash;The indented HTML.
201
202
  */
202
203
  function indentHtml(content) {
203
- return kendo_editor_common_1.indentHtml(content);
204
+ return (0, kendo_editor_common_1.indentHtml)(content);
204
205
  }
205
206
  EditorUtils.indentHtml = indentHtml;
206
207
  /**
@@ -212,7 +213,7 @@ var EditorUtils;
212
213
  * Defines if the content element will be scrolled to the current selection.
213
214
  */
214
215
  function insertNode(view, node, scrollIntoView) {
215
- kendo_editor_common_1.insertNode(node, scrollIntoView)(view.state, view.dispatch);
216
+ (0, kendo_editor_common_1.insertNode)(node, scrollIntoView)(view.state, view.dispatch);
216
217
  }
217
218
  EditorUtils.insertNode = insertNode;
218
219
  /**
@@ -221,7 +222,7 @@ var EditorUtils;
221
222
  * @returns {boolean}
222
223
  */
223
224
  function isAligned(state, actions) {
224
- return kendo_editor_common_1.isAligned(state, actions);
225
+ return (0, kendo_editor_common_1.isAligned)(state, actions);
225
226
  }
226
227
  EditorUtils.isAligned = isAligned;
227
228
  /**
@@ -230,7 +231,7 @@ var EditorUtils;
230
231
  * @returns {boolean}
231
232
  */
232
233
  function isIndented(state, actions, dir) {
233
- return kendo_editor_common_1.isIndented(state, actions, dir);
234
+ return (0, kendo_editor_common_1.isIndented)(state, actions, dir);
234
235
  }
235
236
  EditorUtils.isIndented = isIndented;
236
237
  /**
@@ -246,7 +247,7 @@ var EditorUtils;
246
247
  * ```
247
248
  */
248
249
  function removeComments(html) {
249
- return kendo_editor_common_1.removeComments(html);
250
+ return (0, kendo_editor_common_1.removeComments)(html);
250
251
  }
251
252
  EditorUtils.removeComments = removeComments;
252
253
  /**
@@ -264,7 +265,7 @@ var EditorUtils;
264
265
  * ```
265
266
  */
266
267
  function removeTag(html, tag) {
267
- return kendo_editor_common_1.removeTag(html, tag);
268
+ return (0, kendo_editor_common_1.removeTag)(html, tag);
268
269
  }
269
270
  EditorUtils.removeTag = removeTag;
270
271
  /**
@@ -275,7 +276,7 @@ var EditorUtils;
275
276
  * @returns {string}&mdash;The resulting HTML.
276
277
  */
277
278
  function pasteCleanup(html, settings) {
278
- return kendo_editor_common_1.pasteCleanup(html, settings);
279
+ return (0, kendo_editor_common_1.pasteCleanup)(html, settings);
279
280
  }
280
281
  EditorUtils.pasteCleanup = pasteCleanup;
281
282
  /**
@@ -286,7 +287,7 @@ var EditorUtils;
286
287
  * @param {Attr} attr&mdash;The DOM class attribute that will be sanitized.
287
288
  */
288
289
  function sanitizeClassAttr(attr) {
289
- kendo_editor_common_1.sanitizeClassAttr(attr);
290
+ (0, kendo_editor_common_1.sanitizeClassAttr)(attr);
290
291
  }
291
292
  EditorUtils.sanitizeClassAttr = sanitizeClassAttr;
292
293
  /**
@@ -298,7 +299,7 @@ var EditorUtils;
298
299
  * @param {Attr} attr&mdash;The DOM style attribute that will be sanitized.
299
300
  */
300
301
  function sanitizeStyleAttr(attr) {
301
- kendo_editor_common_1.sanitizeStyleAttr(attr);
302
+ (0, kendo_editor_common_1.sanitizeStyleAttr)(attr);
302
303
  }
303
304
  EditorUtils.sanitizeStyleAttr = sanitizeStyleAttr;
304
305
  /**
@@ -307,7 +308,7 @@ var EditorUtils;
307
308
  * @param {Attr} attr&mdash;The DOM attribute that will be removed.
308
309
  */
309
310
  function removeAttribute(attr) {
310
- kendo_editor_common_1.removeAttribute(attr);
311
+ (0, kendo_editor_common_1.removeAttribute)(attr);
311
312
  }
312
313
  EditorUtils.removeAttribute = removeAttribute;
313
314
  /**
@@ -323,7 +324,7 @@ var EditorUtils;
323
324
  * ```
324
325
  */
325
326
  function sanitize(html) {
326
- return kendo_editor_common_1.sanitize(html);
327
+ return (0, kendo_editor_common_1.sanitize)(html);
327
328
  }
328
329
  EditorUtils.sanitize = sanitize;
329
330
  /**
@@ -335,7 +336,7 @@ var EditorUtils;
335
336
  * @returns&mdash;The html with the replaced images sources.
336
337
  */
337
338
  function replaceImageSourcesFromRtf(html, clipboardData) {
338
- return kendo_editor_common_1.replaceImageSourcesFromRtf(html, clipboardData);
339
+ return (0, kendo_editor_common_1.replaceImageSourcesFromRtf)(html, clipboardData);
339
340
  }
340
341
  EditorUtils.replaceImageSourcesFromRtf = replaceImageSourcesFromRtf;
341
342
  /**
@@ -345,7 +346,7 @@ var EditorUtils;
345
346
  * @returns {Plugin}&mdash;The text highlight plugin.
346
347
  */
347
348
  function textHighlight(key) {
348
- return kendo_editor_common_1.textHighlight(key);
349
+ return (0, kendo_editor_common_1.textHighlight)(key);
349
350
  }
350
351
  EditorUtils.textHighlight = textHighlight;
351
352
  /**
@@ -355,7 +356,7 @@ var EditorUtils;
355
356
  * @returns {Plugin}&mdash;The image resizing plugin.
356
357
  */
357
358
  function imageResizing(options) {
358
- return kendo_editor_common_1.imageResizing(options);
359
+ return (0, kendo_editor_common_1.imageResizing)(options);
359
360
  }
360
361
  EditorUtils.imageResizing = imageResizing;
361
362
  /**
@@ -364,7 +365,7 @@ var EditorUtils;
364
365
  * @returns {Plugin[]}&mdash;The table resizing plugins.
365
366
  */
366
367
  function tableResizing() {
367
- return kendo_editor_common_1.tableResizing();
368
+ return (0, kendo_editor_common_1.tableResizing)();
368
369
  }
369
370
  EditorUtils.tableResizing = tableResizing;
370
371
  /**
@@ -379,8 +380,8 @@ var EditorUtils;
379
380
  * Defines the options that will be used for parsing the HTML. Defaults to `{ preserveWhitespace: 'full' }`.
380
381
  */
381
382
  function setHtml(view, html, command, parseOptions) {
382
- var trimmed = kendo_editor_common_1.trimWhitespace(html);
383
- kendo_editor_common_1.setHtml(trimmed, command, parseOptions)(view.state, view.dispatch);
383
+ var trimmed = (0, kendo_editor_common_1.trimWhitespace)(html);
384
+ (0, kendo_editor_common_1.setHtml)(trimmed, command, parseOptions)(view.state, view.dispatch);
384
385
  }
385
386
  EditorUtils.setHtml = setHtml;
386
387
  /**
@@ -389,7 +390,7 @@ var EditorUtils;
389
390
  * @returns {boolean}
390
391
  */
391
392
  function toggleInlineFormat(view, options, transaction, markAttrs) {
392
- return kendo_editor_common_1.toggleInlineFormat(options, transaction, markAttrs)(view.state, view.dispatch);
393
+ return (0, kendo_editor_common_1.toggleInlineFormat)(options, transaction, markAttrs)(view.state, view.dispatch);
393
394
  }
394
395
  EditorUtils.toggleInlineFormat = toggleInlineFormat;
395
396
  /**
@@ -398,7 +399,7 @@ var EditorUtils;
398
399
  * @returns {boolean}
399
400
  */
400
401
  function toggleList(view, types, command) {
401
- return kendo_editor_common_1.toggleList(view.state, view.dispatch, view, types, command);
402
+ return (0, kendo_editor_common_1.toggleList)(view.state, view.dispatch, view, types, command);
402
403
  }
403
404
  EditorUtils.toggleList = toggleList;
404
405
  /* eslint-disable max-len */
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.editorPropsKey = void 0;
3
4
  var kendo_editor_common_1 = require("@progress/kendo-editor-common");
4
5
  /**
5
6
  * @hidden