@progress/kendo-react-editor 5.4.0-dev.202205250548 → 5.4.0-dev.202205271059

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 (109) 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 +16 -9
  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.js +1 -1
  8. package/dist/es/config/toolsSettings.js +19 -14
  9. package/dist/es/dialogs/EditorDialogProps.js +1 -0
  10. package/dist/es/dialogs/FindReplace.d.ts +1 -1
  11. package/dist/es/dialogs/FindReplace.js +6 -5
  12. package/dist/es/dialogs/insertImage.d.ts +1 -1
  13. package/dist/es/dialogs/insertImage.js +3 -1
  14. package/dist/es/dialogs/insertLink.d.ts +1 -1
  15. package/dist/es/dialogs/insertLink.js +3 -1
  16. package/dist/es/dialogs/main.js +3 -1
  17. package/dist/es/dialogs/viewHtml.d.ts +1 -1
  18. package/dist/es/dialogs/viewHtml.js +3 -1
  19. package/dist/es/main.d.ts +1 -1
  20. package/dist/es/main.js +116 -29
  21. package/dist/es/messages/index.d.ts +78 -391
  22. package/dist/es/package-metadata.js +1 -1
  23. package/dist/es/tools/ToolProps.d.ts +4 -1
  24. package/dist/es/tools/ToolProps.js +1 -0
  25. package/dist/es/tools/align.js +7 -3
  26. package/dist/es/tools/cleanFormatting.js +4 -2
  27. package/dist/es/tools/findReplace.js +7 -3
  28. package/dist/es/tools/fontStyle.js +7 -3
  29. package/dist/es/tools/formatBlock.js +7 -3
  30. package/dist/es/tools/indent.js +7 -3
  31. package/dist/es/tools/inlineFormat.js +7 -3
  32. package/dist/es/tools/insertImage.js +7 -3
  33. package/dist/es/tools/insertLink.js +7 -3
  34. package/dist/es/tools/insertTable/popup.js +3 -1
  35. package/dist/es/tools/insertTable/popupGrid.js +3 -1
  36. package/dist/es/tools/insertTable/tool.js +7 -3
  37. package/dist/es/tools/lists-styled.js +9 -4
  38. package/dist/es/tools/lists.js +7 -3
  39. package/dist/es/tools/main.d.ts +113 -112
  40. package/dist/es/tools/main.js +3 -1
  41. package/dist/es/tools/outdent.js +7 -3
  42. package/dist/es/tools/pdf.js +5 -3
  43. package/dist/es/tools/print.js +4 -2
  44. package/dist/es/tools/proseMirrorTool.js +7 -3
  45. package/dist/es/tools/selectAll.js +4 -2
  46. package/dist/es/tools/tableEdit.d.ts +8 -8
  47. package/dist/es/tools/unlink.js +7 -3
  48. package/dist/es/tools/utils.d.ts +1 -1
  49. package/dist/es/tools/viewHtml.js +7 -3
  50. package/dist/es/utils/controlled-value.d.ts +1 -2
  51. package/dist/npm/Editor.d.ts +5 -5
  52. package/dist/npm/Editor.js +17 -9
  53. package/dist/npm/EditorProps.d.ts +1 -1
  54. package/dist/npm/config/defaultStyles.js +1 -0
  55. package/dist/npm/config/schema.js +3 -2
  56. package/dist/npm/config/shortcuts.js +4 -2
  57. package/dist/npm/config/toolsSettings.js +20 -14
  58. package/dist/npm/dialogs/FindReplace.d.ts +1 -1
  59. package/dist/npm/dialogs/FindReplace.js +7 -5
  60. package/dist/npm/dialogs/insertImage.d.ts +1 -1
  61. package/dist/npm/dialogs/insertImage.js +4 -1
  62. package/dist/npm/dialogs/insertLink.d.ts +1 -1
  63. package/dist/npm/dialogs/insertLink.js +4 -1
  64. package/dist/npm/dialogs/main.js +4 -1
  65. package/dist/npm/dialogs/viewHtml.d.ts +1 -1
  66. package/dist/npm/dialogs/viewHtml.js +4 -1
  67. package/dist/npm/main.d.ts +1 -1
  68. package/dist/npm/main.js +121 -33
  69. package/dist/npm/messages/index.d.ts +78 -391
  70. package/dist/npm/messages/index.js +2 -1
  71. package/dist/npm/package-metadata.js +2 -1
  72. package/dist/npm/tools/ToolProps.d.ts +4 -1
  73. package/dist/npm/tools/align.js +10 -4
  74. package/dist/npm/tools/applyColor.js +3 -1
  75. package/dist/npm/tools/cleanFormatting.js +7 -3
  76. package/dist/npm/tools/findReplace.js +8 -3
  77. package/dist/npm/tools/fontStyle.js +8 -3
  78. package/dist/npm/tools/formatBlock.js +8 -3
  79. package/dist/npm/tools/history.js +1 -0
  80. package/dist/npm/tools/indent.js +8 -3
  81. package/dist/npm/tools/inlineFormat.js +8 -3
  82. package/dist/npm/tools/insertImage.js +10 -4
  83. package/dist/npm/tools/insertLink.js +8 -3
  84. package/dist/npm/tools/insertTable/index.js +3 -2
  85. package/dist/npm/tools/insertTable/popup.js +4 -1
  86. package/dist/npm/tools/insertTable/popupGrid.js +3 -1
  87. package/dist/npm/tools/insertTable/tool.js +8 -3
  88. package/dist/npm/tools/lists-styled.js +12 -5
  89. package/dist/npm/tools/lists.js +8 -3
  90. package/dist/npm/tools/main.d.ts +113 -112
  91. package/dist/npm/tools/main.js +4 -1
  92. package/dist/npm/tools/outdent.js +8 -3
  93. package/dist/npm/tools/pdf.js +8 -4
  94. package/dist/npm/tools/print.js +7 -3
  95. package/dist/npm/tools/proseMirrorTool.js +10 -4
  96. package/dist/npm/tools/selectAll.js +7 -3
  97. package/dist/npm/tools/tableEdit.d.ts +8 -8
  98. package/dist/npm/tools/tableEdit.js +1 -0
  99. package/dist/npm/tools/unlink.js +8 -3
  100. package/dist/npm/tools/utils.d.ts +1 -1
  101. package/dist/npm/tools/utils.js +1 -0
  102. package/dist/npm/tools/viewHtml.js +8 -3
  103. package/dist/npm/utils/browser-detection.js +1 -0
  104. package/dist/npm/utils/controlled-value.d.ts +1 -2
  105. package/dist/npm/utils/controlled-value.js +3 -1
  106. package/dist/npm/utils/index.js +1 -0
  107. package/dist/npm/utils/props-key.js +1 -0
  108. package/dist/systemjs/kendo-react-editor.js +1 -1
  109. package/package.json +12 -12
@@ -30,7 +30,7 @@ interface EditorStateInterface {
30
30
  * ReactDOM.render(<App />, document.querySelector('my-app'));
31
31
  * ```
32
32
  */
33
- export default class Editor extends React.Component<EditorProps, EditorStateInterface> {
33
+ export declare class Editor extends React.Component<EditorProps, EditorStateInterface> {
34
34
  /**
35
35
  * @hidden
36
36
  */
@@ -60,19 +60,19 @@ export default class Editor extends React.Component<EditorProps, EditorStateInte
60
60
  /**
61
61
  * The value of the Editor.
62
62
  */
63
- readonly value: Node | string;
63
+ get value(): Node | string;
64
64
  /**
65
65
  * Returns the DOM element of the Editor.
66
66
  */
67
- readonly element: HTMLElement;
67
+ get element(): HTMLElement;
68
68
  /**
69
69
  * Returns the content-editable DOM element of the Editor.
70
70
  */
71
- readonly contentElement: HTMLDivElement;
71
+ get contentElement(): HTMLDivElement;
72
72
  /**
73
73
  * Returns the `view` object of the Editor.
74
74
  */
75
- readonly view: EditorView<any>;
75
+ get view(): EditorView<any>;
76
76
  private _element;
77
77
  private _view?;
78
78
  private _contentElement;
package/dist/es/Editor.js CHANGED
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
2
2
  var extendStatics = function (d, b) {
3
3
  extendStatics = Object.setPrototypeOf ||
4
4
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
6
  return extendStatics(d, b);
7
7
  };
8
8
  return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
9
11
  extendStatics(d, b);
10
12
  function __() { this.constructor = d; }
11
13
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -22,6 +24,11 @@ var __assign = (this && this.__assign) || function () {
22
24
  };
23
25
  return __assign.apply(this, arguments);
24
26
  };
27
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
28
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
29
+ to[j] = from[i];
30
+ return to;
31
+ };
25
32
  import * as React from 'react';
26
33
  import * as PropTypes from 'prop-types';
27
34
  import { ButtonGroup, Toolbar, ToolbarSeparator } from '@progress/kendo-react-buttons';
@@ -187,7 +194,7 @@ var Editor = /** @class */ (function (_super) {
187
194
  }
188
195
  return this.props.defaultContent || '';
189
196
  },
190
- enumerable: true,
197
+ enumerable: false,
191
198
  configurable: true
192
199
  });
193
200
  Object.defineProperty(Editor.prototype, "element", {
@@ -197,7 +204,7 @@ var Editor = /** @class */ (function (_super) {
197
204
  get: function () {
198
205
  return this._element;
199
206
  },
200
- enumerable: true,
207
+ enumerable: false,
201
208
  configurable: true
202
209
  });
203
210
  Object.defineProperty(Editor.prototype, "contentElement", {
@@ -207,7 +214,7 @@ var Editor = /** @class */ (function (_super) {
207
214
  get: function () {
208
215
  return this._contentElement;
209
216
  },
210
- enumerable: true,
217
+ enumerable: false,
211
218
  configurable: true
212
219
  });
213
220
  Object.defineProperty(Editor.prototype, "view", {
@@ -217,7 +224,7 @@ var Editor = /** @class */ (function (_super) {
217
224
  get: function () {
218
225
  return this._view;
219
226
  },
220
- enumerable: true,
227
+ enumerable: false,
221
228
  configurable: true
222
229
  });
223
230
  /**
@@ -330,10 +337,10 @@ var Editor = /** @class */ (function (_super) {
330
337
  gapCursor(),
331
338
  tableEditing()
332
339
  ];
333
- var shortcuts = __assign({}, EditorUtils.getShortcuts({
340
+ var shortcuts = __assign(__assign({}, EditorUtils.getShortcuts({
334
341
  types: { listItem: 'list_item', hardBreak: 'hard_break' },
335
342
  toolsSettings: { bold: bold, italic: italic, underline: underline }
336
- }), { 'Mod-k': function () {
343
+ })), { 'Mod-k': function () {
337
344
  var linkDialog = _this.state.linkDialog;
338
345
  var editorView = _this.view;
339
346
  if (editorView) {
@@ -352,7 +359,7 @@ var Editor = /** @class */ (function (_super) {
352
359
  EditorUtils.createDocument(new Schema({ nodes: nodes, marks: marks }), value || defaultContent, { preserveWhitespace: preserveWhitespace });
353
360
  var viewProps = {
354
361
  state: EditorState.create({
355
- plugins: plugins.concat([keymap(shortcuts), keymap(baseKeymap)]),
362
+ plugins: __spreadArray(__spreadArray([], plugins), [keymap(shortcuts), keymap(baseKeymap)]),
356
363
  doc: doc
357
364
  }),
358
365
  transformPastedHTML: this.onPasteHtml,
@@ -393,4 +400,4 @@ var Editor = /** @class */ (function (_super) {
393
400
  };
394
401
  return Editor;
395
402
  }(React.Component));
396
- export default Editor;
403
+ export { Editor };
@@ -2,7 +2,7 @@
2
2
  /// <reference types="react" />
3
3
  import { EditorState, Plugin, Transaction, EditorView, Schema, Node } from '@progress/kendo-editor-common';
4
4
  import { EditorUtils } from './utils';
5
- import Editor from './Editor';
5
+ import { Editor } from './Editor';
6
6
  interface EditorEvent {
7
7
  /**
8
8
  * An event target.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -27,7 +27,7 @@ export var getShortcuts = function (settings) {
27
27
  });
28
28
  var listItem = settings && settings.types && settings.types.listItem || 'list_item';
29
29
  var toolsSettings = settings && settings.toolsSettings || {};
30
- var shortcutsSettings = __assign({ 'Mod-b': function (state, dispatch) { return toggleInlineFormat(toolsSettings.bold || bold)(state, dispatch); }, 'Mod-i': function (state, dispatch) { return toggleInlineFormat(toolsSettings.italic || italic)(state, dispatch); }, 'Mod-u': function (state, dispatch) { return toggleInlineFormat(toolsSettings.underline || underline)(state, dispatch); }, 'Mod-z': undo, 'Shift-Mod-z': redo }, __assign({}, !mac ? { 'Mod-y': redo } : {}), { 'Backspace': undoInputRule, 'Mod-Enter': insertBr, 'Shift-Enter': insertBr }, __assign({}, mac ? { 'Ctrl-Enter': insertBr } : {}), { 'Enter': function (state, dispatch) {
30
+ var shortcutsSettings = __assign(__assign(__assign(__assign({ 'Mod-b': function (state, dispatch) { return toggleInlineFormat(toolsSettings.bold || bold)(state, dispatch); }, 'Mod-i': function (state, dispatch) { return toggleInlineFormat(toolsSettings.italic || italic)(state, dispatch); }, 'Mod-u': function (state, dispatch) { return toggleInlineFormat(toolsSettings.underline || underline)(state, dispatch); }, 'Mod-z': undo, 'Shift-Mod-z': redo }, __assign({}, !mac ? { 'Mod-y': redo } : {})), { 'Backspace': undoInputRule, 'Mod-Enter': insertBr, 'Shift-Enter': insertBr }), __assign({}, mac ? { 'Ctrl-Enter': insertBr } : {})), { 'Enter': function (state, dispatch) {
31
31
  return splitListItem(state.schema.nodes[listItem])(state, dispatch);
32
32
  }, 'Tab': goToNextCell(1), 'Shift-Tab': goToNextCell(-1) });
33
33
  return shortcutsSettings;
@@ -9,6 +9,11 @@ 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, il = from.length, j = to.length; i < il; i++, j++)
14
+ to[j] = from[i];
15
+ return to;
16
+ };
12
17
  import { keys, messages } from './../messages';
13
18
  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';
14
19
  /**
@@ -29,43 +34,43 @@ export var EditorToolsSettings;
29
34
  /**
30
35
  * The object of the Bold tool settings.
31
36
  */
32
- EditorToolsSettings.bold = __assign({}, boldSettings, { props: __assign({ icon: 'bold' }, buttonCommonProps), messages: {
37
+ EditorToolsSettings.bold = __assign(__assign({}, boldSettings), { props: __assign({ icon: 'bold' }, buttonCommonProps), messages: {
33
38
  title: keys.bold
34
39
  }, commandName: 'Bold' });
35
40
  /**
36
41
  * The object of the Italic tool settings.
37
42
  */
38
- EditorToolsSettings.italic = __assign({}, italicSettings, { props: __assign({ icon: 'italic' }, buttonCommonProps), messages: {
43
+ EditorToolsSettings.italic = __assign(__assign({}, italicSettings), { props: __assign({ icon: 'italic' }, buttonCommonProps), messages: {
39
44
  title: keys.italic
40
45
  }, commandName: 'Italic' });
41
46
  /**
42
47
  * The object of the Underline tool settings.
43
48
  */
44
- EditorToolsSettings.underline = __assign({}, underlineSettings, { props: __assign({ icon: 'underline' }, buttonCommonProps), messages: {
49
+ EditorToolsSettings.underline = __assign(__assign({}, underlineSettings), { props: __assign({ icon: 'underline' }, buttonCommonProps), messages: {
45
50
  title: keys.underline
46
51
  }, commandName: 'Underline' });
47
52
  /**
48
53
  * The object of the Strikethrough tool settings.
49
54
  */
50
- EditorToolsSettings.strikethrough = __assign({}, strikethroughSettings, { props: __assign({ icon: 'strikethrough' }, buttonCommonProps), messages: {
55
+ EditorToolsSettings.strikethrough = __assign(__assign({}, strikethroughSettings), { props: __assign({ icon: 'strikethrough' }, buttonCommonProps), messages: {
51
56
  title: keys.strikethrough
52
57
  }, commandName: 'Strikethrough' });
53
58
  /**
54
59
  * The object of the Subscript tool settings.
55
60
  */
56
- EditorToolsSettings.subscript = __assign({}, subscriptSettings, { props: __assign({ icon: 'subscript' }, buttonCommonProps), messages: {
61
+ EditorToolsSettings.subscript = __assign(__assign({}, subscriptSettings), { props: __assign({ icon: 'subscript' }, buttonCommonProps), messages: {
57
62
  title: keys.subscript
58
63
  }, commandName: 'Subscript' });
59
64
  /**
60
65
  * The object of the Superscript tool settings.
61
66
  */
62
- EditorToolsSettings.superscript = __assign({}, superscriptSettings, { props: __assign({ icon: 'superscript' }, buttonCommonProps), messages: {
67
+ EditorToolsSettings.superscript = __assign(__assign({}, superscriptSettings), { props: __assign({ icon: 'superscript' }, buttonCommonProps), messages: {
63
68
  title: keys.superscript
64
69
  }, commandName: 'Superscript' });
65
70
  /**
66
71
  * The object of the Link tool settings.
67
72
  */
68
- EditorToolsSettings.link = __assign({}, linkSettings, { props: __assign({ icon: 'link-horizontal' }, buttonCommonProps), messages: {
73
+ EditorToolsSettings.link = __assign(__assign({}, linkSettings), { props: __assign({ icon: 'link-horizontal' }, buttonCommonProps), messages: {
69
74
  insertHyperlink: keys.insertHyperlink,
70
75
  insertHyperlinkDialogTitle: keys.insertHyperlinkDialogTitle,
71
76
  insertHyperlinkAddress: keys.insertHyperlinkAddress,
@@ -77,7 +82,7 @@ export var EditorToolsSettings;
77
82
  /**
78
83
  * The object of the Link tool settings.
79
84
  */
80
- EditorToolsSettings.insertFile = __assign({}, linkSettings, { props: __assign({ icon: 'file-add' }, buttonCommonProps), messages: {
85
+ EditorToolsSettings.insertFile = __assign(__assign({}, linkSettings), { props: __assign({ icon: 'file-add' }, buttonCommonProps), messages: {
81
86
  insertHyperlink: keys.insertFile,
82
87
  insertHyperlinkDialogTitle: keys.insertFileDialogTitle,
83
88
  insertHyperlinkAddress: keys.insertFileAddress,
@@ -296,7 +301,7 @@ export var EditorToolsSettings;
296
301
  /**
297
302
  * The object of the Unlink tool settings.
298
303
  */
299
- EditorToolsSettings.unlink = __assign({}, linkSettings, { props: __assign({ icon: 'unlink-horizontal' }, buttonCommonProps), messages: {
304
+ EditorToolsSettings.unlink = __assign(__assign({}, linkSettings), { props: __assign({ icon: 'unlink-horizontal' }, buttonCommonProps), messages: {
300
305
  title: keys.unlink
301
306
  }, commandName: 'Unlink' });
302
307
  /**
@@ -408,7 +413,7 @@ export var EditorToolsSettings;
408
413
  * The object of the AlignLeft tool settings.
409
414
  */
410
415
  EditorToolsSettings.alignLeft = {
411
- actions: alignLeftRules.slice(),
416
+ actions: __spreadArray([], alignLeftRules),
412
417
  props: __assign({ icon: 'align-left' }, buttonCommonProps),
413
418
  messages: {
414
419
  title: keys.alignLeft
@@ -419,7 +424,7 @@ export var EditorToolsSettings;
419
424
  * The object of the AlignRight tool settings.
420
425
  */
421
426
  EditorToolsSettings.alignRight = {
422
- actions: alignRightRules.slice(),
427
+ actions: __spreadArray([], alignRightRules),
423
428
  props: __assign({ icon: 'align-right' }, buttonCommonProps),
424
429
  messages: {
425
430
  title: keys.alignRight
@@ -430,7 +435,7 @@ export var EditorToolsSettings;
430
435
  * The object of the AlignCenter tool settings.
431
436
  */
432
437
  EditorToolsSettings.alignCenter = {
433
- actions: alignCenterRules.slice(),
438
+ actions: __spreadArray([], alignCenterRules),
434
439
  props: __assign({ icon: 'align-center' }, buttonCommonProps),
435
440
  messages: {
436
441
  title: keys.alignCenter
@@ -441,7 +446,7 @@ export var EditorToolsSettings;
441
446
  * The object of the AlignJustify tool settings.
442
447
  */
443
448
  EditorToolsSettings.alignJustify = {
444
- actions: alignJustifyRules.slice(),
449
+ actions: __spreadArray([], alignJustifyRules),
445
450
  props: __assign({ icon: 'align-justify' }, buttonCommonProps),
446
451
  messages: {
447
452
  title: keys.alignJustify
@@ -452,7 +457,7 @@ export var EditorToolsSettings;
452
457
  * The object of the AlignRemove tool settings.
453
458
  */
454
459
  EditorToolsSettings.alignRemove = {
455
- actions: alignRemoveRules.slice(),
460
+ actions: __spreadArray([], alignRemoveRules),
456
461
  props: __assign({ icon: 'align-remove' }, buttonCommonProps),
457
462
  messages: {},
458
463
  commandName: 'AlignRemove'
@@ -0,0 +1 @@
1
+ export {};
@@ -41,7 +41,7 @@ export declare class FindAndReplaceDialog extends React.Component<FindAndReplace
41
41
  * @hidden
42
42
  */
43
43
  state: FindAndReplaceDialogState;
44
- private readonly settings;
44
+ private get settings();
45
45
  constructor(props: FindAndReplaceDialogProps);
46
46
  /**
47
47
  * @hidden
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
2
2
  var extendStatics = function (d, b) {
3
3
  extendStatics = Object.setPrototypeOf ||
4
4
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
6
  return extendStatics(d, b);
7
7
  };
8
8
  return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
9
11
  extendStatics(d, b);
10
12
  function __() { this.constructor = d; }
11
13
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -118,7 +120,7 @@ var FindAndReplaceDialog = /** @class */ (function (_super) {
118
120
  _this.onSearchChange = function (e) { return _this.setNextState({ searchText: e.target.value }); };
119
121
  _this.onReplaceChange = function (e) { return _this.setNextState({ replaceText: e.target.value }); };
120
122
  _this.setNextState = function (next) {
121
- var nextState = __assign({}, _this.state, next, { matches: undefined, nextMatch: undefined });
123
+ var nextState = __assign(__assign(__assign({}, _this.state), next), { matches: undefined, nextMatch: undefined });
122
124
  var view = _this.props.view;
123
125
  if (nextState.searchText) {
124
126
  var text = nextState.searchText, matchWord = nextState.matchWord, matchCase = nextState.matchCase, useRegExp = nextState.useRegExp, matchCyclic = nextState.matchCyclic;
@@ -129,8 +131,7 @@ var FindAndReplaceDialog = /** @class */ (function (_super) {
129
131
  matches.find(function (match) { return match.from >= selection_1.from; }) ||
130
132
  (matchCyclic && matches[0]) ||
131
133
  undefined;
132
- _this.setState(__assign({}, nextState, { matches: matches,
133
- nextMatch: nextMatch }));
134
+ _this.setState(__assign(__assign({}, nextState), { matches: matches, nextMatch: nextMatch }));
134
135
  }
135
136
  else {
136
137
  _this.setState(nextState);
@@ -151,7 +152,7 @@ var FindAndReplaceDialog = /** @class */ (function (_super) {
151
152
  get: function () {
152
153
  return this.props.settings || settings;
153
154
  },
154
- enumerable: true,
155
+ enumerable: false,
155
156
  configurable: true
156
157
  });
157
158
  /**
@@ -22,7 +22,7 @@ export declare class InsertImageDialog extends React.Component<InsertImageDialog
22
22
  /**
23
23
  * @hidden
24
24
  */
25
- render(): {};
25
+ render(): React.ReactNode;
26
26
  private onClose;
27
27
  private onInsert;
28
28
  }
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
2
2
  var extendStatics = function (d, b) {
3
3
  extendStatics = Object.setPrototypeOf ||
4
4
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
6
  return extendStatics(d, b);
7
7
  };
8
8
  return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
9
11
  extendStatics(d, b);
10
12
  function __() { this.constructor = d; }
11
13
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -20,7 +20,7 @@ export declare class InsertLinkDialog extends React.Component<InsertLinkDialogPr
20
20
  /**
21
21
  * @hidden
22
22
  */
23
- render(): {};
23
+ render(): React.ReactNode;
24
24
  private onClose;
25
25
  private onInsert;
26
26
  }
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
2
2
  var extendStatics = function (d, b) {
3
3
  extendStatics = Object.setPrototypeOf ||
4
4
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
6
  return extendStatics(d, b);
7
7
  };
8
8
  return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
9
11
  extendStatics(d, b);
10
12
  function __() { this.constructor = d; }
11
13
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
2
2
  var extendStatics = function (d, b) {
3
3
  extendStatics = Object.setPrototypeOf ||
4
4
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
6
  return extendStatics(d, b);
7
7
  };
8
8
  return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
9
11
  extendStatics(d, b);
10
12
  function __() { this.constructor = d; }
11
13
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -18,7 +18,7 @@ export declare class ViewHtmlDialog extends React.Component<ViewHtmlDialogProps>
18
18
  /**
19
19
  * @hidden
20
20
  */
21
- render(): {};
21
+ render(): React.ReactNode;
22
22
  private onUpdate;
23
23
  private onClose;
24
24
  }
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
2
2
  var extendStatics = function (d, b) {
3
3
  extendStatics = Object.setPrototypeOf ||
4
4
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
6
  return extendStatics(d, b);
7
7
  };
8
8
  return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
9
11
  extendStatics(d, b);
10
12
  function __() { this.constructor = d; }
11
13
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
package/dist/es/main.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="prosemirror-model" />
2
- import Editor from './Editor';
2
+ import { Editor } from './Editor';
3
3
  import { EditorProps, EditorMountEvent, EditorPasteEvent, EditorChangeEvent, EditorExecuteEvent, EditorFocusEvent, EditorBlurEvent } from './EditorProps';
4
4
  import { EditorTools } from './tools/main';
5
5
  import { EditorToolsSettings } from './config/toolsSettings';
package/dist/es/main.js CHANGED
@@ -1,4 +1,4 @@
1
- import Editor from './Editor';
1
+ import { Editor } from './Editor';
2
2
  import { EditorTools } from './tools/main';
3
3
  import { EditorToolsSettings } from './config/toolsSettings';
4
4
  import { EditorUtils } from './utils';
@@ -46,52 +46,139 @@ tableEditing, fixTables, fixTablesKey, cellAround, isInTable, selectionCell, mov
46
46
  */
47
47
  export var ProseMirror = {
48
48
  // prosemirror-state
49
- Selection: Selection, SelectionRange: SelectionRange, TextSelection: TextSelection, NodeSelection: NodeSelection, AllSelection: AllSelection,
50
- EditorState: EditorState, Plugin: Plugin, PluginKey: PluginKey, Transaction: Transaction,
49
+ Selection: Selection,
50
+ SelectionRange: SelectionRange,
51
+ TextSelection: TextSelection,
52
+ NodeSelection: NodeSelection,
53
+ AllSelection: AllSelection,
54
+ EditorState: EditorState,
55
+ Plugin: Plugin,
56
+ PluginKey: PluginKey,
57
+ Transaction: Transaction,
51
58
  // prosemirror-view
52
- Decoration: Decoration, DecorationSet: DecorationSet,
59
+ Decoration: Decoration,
60
+ DecorationSet: DecorationSet,
53
61
  EditorView: EditorView,
54
62
  // prosemirror-model
55
- Node: Node, ResolvedPos: ResolvedPos, NodeRange: NodeRange, Fragment: Fragment, Slice: Slice, ReplaceError: ReplaceError, Mark: Mark,
56
- Schema: Schema, NodeType: NodeType, MarkType: MarkType, ContentMatch: ContentMatch, DOMParser: DOMParser, DOMSerializer: DOMSerializer,
63
+ Node: Node,
64
+ ResolvedPos: ResolvedPos,
65
+ NodeRange: NodeRange,
66
+ Fragment: Fragment,
67
+ Slice: Slice,
68
+ ReplaceError: ReplaceError,
69
+ Mark: Mark,
70
+ Schema: Schema,
71
+ NodeType: NodeType,
72
+ MarkType: MarkType,
73
+ ContentMatch: ContentMatch,
74
+ DOMParser: DOMParser,
75
+ DOMSerializer: DOMSerializer,
57
76
  // prosemirror-transform
58
- Transform: Transform, Step: Step, StepResult: StepResult,
59
- joinPoint: joinPoint, canJoin: canJoin, canSplit: canSplit, insertPoint: insertPoint, dropPoint: dropPoint, liftTarget: liftTarget, findWrapping: findWrapping,
60
- StepMap: StepMap, MapResult: MapResult, Mapping: Mapping,
61
- AddMarkStep: AddMarkStep, RemoveMarkStep: RemoveMarkStep,
62
- ReplaceStep: ReplaceStep, ReplaceAroundStep: ReplaceAroundStep, replaceStep: replaceStep,
77
+ Transform: Transform,
78
+ Step: Step,
79
+ StepResult: StepResult,
80
+ joinPoint: joinPoint,
81
+ canJoin: canJoin,
82
+ canSplit: canSplit,
83
+ insertPoint: insertPoint,
84
+ dropPoint: dropPoint,
85
+ liftTarget: liftTarget,
86
+ findWrapping: findWrapping,
87
+ StepMap: StepMap,
88
+ MapResult: MapResult,
89
+ Mapping: Mapping,
90
+ AddMarkStep: AddMarkStep,
91
+ RemoveMarkStep: RemoveMarkStep,
92
+ ReplaceStep: ReplaceStep,
93
+ ReplaceAroundStep: ReplaceAroundStep,
94
+ replaceStep: replaceStep,
63
95
  // prosemirror-commands
64
- deleteSelection: deleteSelection, joinBackward: joinBackward, selectNodeBackward: selectNodeBackward, joinForward: joinForward, selectNodeForward: selectNodeForward,
65
- joinUp: joinUp, joinDown: joinDown, lift: lift, newlineInCode: newlineInCode, exitCode: exitCode, createParagraphNear: createParagraphNear, liftEmptyBlock: liftEmptyBlock,
66
- splitBlock: splitBlock, splitBlockKeepMarks: splitBlockKeepMarks, selectParentNode: selectParentNode, selectAll: selectAll, wrapIn: wrapIn, setBlockType: setBlockType,
67
- toggleMark: toggleMark, autoJoin: autoJoin, chainCommands: chainCommands, pcBaseKeymap: pcBaseKeymap, macBaseKeymap: macBaseKeymap, baseKeymap: baseKeymap,
96
+ deleteSelection: deleteSelection,
97
+ joinBackward: joinBackward,
98
+ selectNodeBackward: selectNodeBackward,
99
+ joinForward: joinForward,
100
+ selectNodeForward: selectNodeForward,
101
+ joinUp: joinUp,
102
+ joinDown: joinDown,
103
+ lift: lift,
104
+ newlineInCode: newlineInCode,
105
+ exitCode: exitCode,
106
+ createParagraphNear: createParagraphNear,
107
+ liftEmptyBlock: liftEmptyBlock,
108
+ splitBlock: splitBlock,
109
+ splitBlockKeepMarks: splitBlockKeepMarks,
110
+ selectParentNode: selectParentNode,
111
+ selectAll: selectAll,
112
+ wrapIn: wrapIn,
113
+ setBlockType: setBlockType,
114
+ toggleMark: toggleMark,
115
+ autoJoin: autoJoin,
116
+ chainCommands: chainCommands,
117
+ pcBaseKeymap: pcBaseKeymap,
118
+ macBaseKeymap: macBaseKeymap,
119
+ baseKeymap: baseKeymap,
68
120
  // prosemirror-history
69
- history: history, undo: undo, redo: redo, undoDepth: undoDepth, redoDepth: redoDepth,
121
+ history: history,
122
+ undo: undo,
123
+ redo: redo,
124
+ undoDepth: undoDepth,
125
+ redoDepth: redoDepth,
70
126
  // prosemirror-inputrules
71
- InputRule: InputRule, inputRules: inputRules, undoInputRule: undoInputRule,
72
- emDash: emDash, ellipsis: ellipsis, openDoubleQuote: openDoubleQuote, closeDoubleQuote: closeDoubleQuote, openSingleQuote: openSingleQuote, closeSingleQuote: closeSingleQuote, smartQuotes: smartQuotes,
73
- wrappingInputRule: wrappingInputRule, textblockTypeInputRule: textblockTypeInputRule,
127
+ InputRule: InputRule,
128
+ inputRules: inputRules,
129
+ undoInputRule: undoInputRule,
130
+ emDash: emDash,
131
+ ellipsis: ellipsis,
132
+ openDoubleQuote: openDoubleQuote,
133
+ closeDoubleQuote: closeDoubleQuote,
134
+ openSingleQuote: openSingleQuote,
135
+ closeSingleQuote: closeSingleQuote,
136
+ smartQuotes: smartQuotes,
137
+ wrappingInputRule: wrappingInputRule,
138
+ textblockTypeInputRule: textblockTypeInputRule,
74
139
  // prosemirror-keymap
75
- keymap: keymap, keydownHandler: keydownHandler,
140
+ keymap: keymap,
141
+ keydownHandler: keydownHandler,
76
142
  // prosemirror-schema-list
77
- orderedList: orderedList, bulletList: bulletList, listItem: listItem, addListNodes: addListNodes,
78
- wrapInList: wrapInList, splitListItem: splitListItem, liftListItem: liftListItem, sinkListItem: sinkListItem,
143
+ orderedList: orderedList,
144
+ bulletList: bulletList,
145
+ listItem: listItem,
146
+ addListNodes: addListNodes,
147
+ wrapInList: wrapInList,
148
+ splitListItem: splitListItem,
149
+ liftListItem: liftListItem,
150
+ sinkListItem: sinkListItem,
79
151
  // prosemirror-dropcursor
80
152
  dropCursor: dropCursor,
81
153
  // prosemirror-gapcursor
82
154
  gapCursor: gapCursor,
83
155
  // prosemirror-tables
84
- tableEditing: tableEditing, fixTables: fixTables, fixTablesKey: fixTablesKey,
85
- cellAround: cellAround, isInTable: isInTable, selectionCell: selectionCell, moveCellForward: moveCellForward, inSameTable: inSameTable,
86
- findCell: findCell, colCount: colCount, nextCell: nextCell, removeColSpan: removeColSpan, addColSpan: addColSpan, columnIsHeader: columnIsHeader,
87
- tableNodes: tableNodes, tableNodeTypes: tableNodeTypes,
156
+ tableEditing: tableEditing,
157
+ fixTables: fixTables,
158
+ fixTablesKey: fixTablesKey,
159
+ cellAround: cellAround,
160
+ isInTable: isInTable,
161
+ selectionCell: selectionCell,
162
+ moveCellForward: moveCellForward,
163
+ inSameTable: inSameTable,
164
+ findCell: findCell,
165
+ colCount: colCount,
166
+ nextCell: nextCell,
167
+ removeColSpan: removeColSpan,
168
+ addColSpan: addColSpan,
169
+ columnIsHeader: columnIsHeader,
170
+ tableNodes: tableNodes,
171
+ tableNodeTypes: tableNodeTypes,
88
172
  CellSelection: CellSelection,
89
173
  TableMap: TableMap,
90
174
  tableEditingKey: tableEditingKey,
91
- columnResizing: columnResizing, columnResizingPluginKey: columnResizingPluginKey,
175
+ columnResizing: columnResizing,
176
+ columnResizingPluginKey: columnResizingPluginKey,
92
177
  updateColumnsOnResize: updateColumnsOnResize,
93
- selectedRect: selectedRect, addColumn: addColumn,
94
- addColumnBefore: addColumnBefore, addColumnAfter: addColumnAfter,
178
+ selectedRect: selectedRect,
179
+ addColumn: addColumn,
180
+ addColumnBefore: addColumnBefore,
181
+ addColumnAfter: addColumnAfter,
95
182
  deleteColumn: deleteColumn,
96
183
  rowIsHeader: rowIsHeader,
97
184
  addRow: addRow,