@progress/kendo-react-editor 6.1.1-dev.202311151536 → 7.0.0-develop.1

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 (231) hide show
  1. package/{dist/es/Editor.d.ts → Editor.d.ts} +5 -1
  2. package/{dist/npm/EditorProps.d.ts → EditorProps.d.ts} +4 -1
  3. package/LICENSE.md +1 -1
  4. package/{dist/es/config → config}/defaultStyles.d.ts +4 -0
  5. package/config/pasteSettings.d.ts +10 -0
  6. package/config/schema.d.ts +5 -0
  7. package/{dist/es/config → config}/shortcuts.d.ts +10 -6
  8. package/{dist/es/config → config}/toolsSettings.d.ts +4 -1
  9. package/{dist/npm/dialogs → dialogs}/EditorDialogProps.d.ts +4 -1
  10. package/{dist/npm/dialogs → dialogs}/FindReplace.d.ts +5 -1
  11. package/{dist/npm/dialogs/main.d.ts → dialogs/index.d.ts} +4 -0
  12. package/{dist/npm/dialogs → dialogs}/insertImage.d.ts +5 -1
  13. package/{dist/es/dialogs → dialogs}/insertLink.d.ts +5 -1
  14. package/{dist/npm/dialogs → dialogs}/viewHtml.d.ts +5 -1
  15. package/dist/cdn/js/kendo-react-editor.js +226 -1
  16. package/{dist/es/main.d.ts → index.d.ts} +10 -6
  17. package/index.js +226 -0
  18. package/index.mjs +4133 -0
  19. package/{dist/npm/messages → messages}/index.d.ts +4 -0
  20. package/package-metadata.d.ts +9 -0
  21. package/package.json +37 -52
  22. package/{dist/es/tools → tools}/ToolProps.d.ts +4 -1
  23. package/tools/align.d.ts +11 -0
  24. package/{dist/es/tools → tools}/applyColor.d.ts +4 -0
  25. package/{dist/npm/tools → tools}/cleanFormatting.d.ts +4 -0
  26. package/{dist/npm/tools → tools}/findReplace.d.ts +5 -1
  27. package/{dist/npm/tools → tools}/fontStyle.d.ts +4 -0
  28. package/{dist/es/tools → tools}/formatBlock.d.ts +4 -0
  29. package/{dist/npm/tools → tools}/history.d.ts +4 -0
  30. package/{dist/npm/tools → tools}/indent.d.ts +4 -0
  31. package/{dist/npm/tools/main.d.ts → tools/index.d.ts} +6 -2
  32. package/{dist/es/tools → tools}/inlineFormat.d.ts +4 -0
  33. package/tools/insertImage.d.ts +17 -0
  34. package/{dist/npm/tools → tools}/insertLink.d.ts +4 -0
  35. package/tools/insertTable/index.d.ts +7 -0
  36. package/{dist/npm/tools → tools}/insertTable/popup.d.ts +5 -1
  37. package/{dist/npm/tools → tools}/insertTable/popupGrid.d.ts +6 -2
  38. package/{dist/es/tools → tools}/insertTable/tool.d.ts +4 -0
  39. package/tools/lists-styled.d.ts +8 -0
  40. package/{dist/es/tools → tools}/lists.d.ts +4 -0
  41. package/{dist/es/tools → tools}/outdent.d.ts +4 -0
  42. package/{dist/npm/tools → tools}/pdf.d.ts +4 -0
  43. package/{dist/npm/tools → tools}/print.d.ts +4 -0
  44. package/{dist/npm/tools → tools}/proseMirrorTool.d.ts +4 -0
  45. package/{dist/npm/tools → tools}/selectAll.d.ts +4 -0
  46. package/{dist/npm/tools → tools}/table-wizard/cellPropsUtils.d.ts +4 -0
  47. package/{dist/npm/tools → tools}/table-wizard/tableCellProperties.d.ts +5 -1
  48. package/tools/table-wizard/tableProperties.d.ts +15 -0
  49. package/{dist/es/tools → tools}/table-wizard/tablePropsUtils.d.ts +5 -1
  50. package/{dist/es/tools → tools}/table-wizard/utils.d.ts +4 -0
  51. package/{dist/npm/tools → tools}/tableEdit.d.ts +4 -0
  52. package/{dist/npm/tools → tools}/unlink.d.ts +4 -0
  53. package/{dist/npm/tools → tools}/utils.d.ts +4 -0
  54. package/{dist/es/tools → tools}/viewHtml.d.ts +4 -0
  55. package/utils/browser-detection.d.ts +8 -0
  56. package/utils/controlled-value.d.ts +9 -0
  57. package/{dist/npm/utils → utils}/index.d.ts +4 -0
  58. package/utils/props-key.d.ts +9 -0
  59. package/about.md +0 -3
  60. package/dist/es/Editor.js +0 -441
  61. package/dist/es/EditorProps.d.ts +0 -197
  62. package/dist/es/EditorProps.js +0 -1
  63. package/dist/es/config/defaultStyles.js +0 -12
  64. package/dist/es/config/pasteSettings.d.ts +0 -6
  65. package/dist/es/config/pasteSettings.js +0 -1
  66. package/dist/es/config/schema.d.ts +0 -1
  67. package/dist/es/config/schema.js +0 -1
  68. package/dist/es/config/shortcuts.js +0 -34
  69. package/dist/es/config/toolsSettings.js +0 -522
  70. package/dist/es/dialogs/EditorDialogProps.d.ts +0 -27
  71. package/dist/es/dialogs/EditorDialogProps.js +0 -1
  72. package/dist/es/dialogs/FindReplace.d.ts +0 -71
  73. package/dist/es/dialogs/FindReplace.js +0 -248
  74. package/dist/es/dialogs/insertImage.d.ts +0 -28
  75. package/dist/es/dialogs/insertImage.js +0 -119
  76. package/dist/es/dialogs/insertLink.js +0 -94
  77. package/dist/es/dialogs/main.d.ts +0 -49
  78. package/dist/es/dialogs/main.js +0 -69
  79. package/dist/es/dialogs/viewHtml.d.ts +0 -25
  80. package/dist/es/dialogs/viewHtml.js +0 -79
  81. package/dist/es/main.js +0 -201
  82. package/dist/es/messages/index.d.ts +0 -334
  83. package/dist/es/messages/index.js +0 -989
  84. package/dist/es/package-metadata.d.ts +0 -5
  85. package/dist/es/package-metadata.js +0 -11
  86. package/dist/es/tools/ToolProps.js +0 -1
  87. package/dist/es/tools/align.d.ts +0 -7
  88. package/dist/es/tools/align.js +0 -70
  89. package/dist/es/tools/applyColor.js +0 -34
  90. package/dist/es/tools/cleanFormatting.d.ts +0 -16
  91. package/dist/es/tools/cleanFormatting.js +0 -50
  92. package/dist/es/tools/findReplace.d.ts +0 -29
  93. package/dist/es/tools/findReplace.js +0 -76
  94. package/dist/es/tools/fontStyle.d.ts +0 -28
  95. package/dist/es/tools/fontStyle.js +0 -91
  96. package/dist/es/tools/formatBlock.js +0 -89
  97. package/dist/es/tools/history.d.ts +0 -26
  98. package/dist/es/tools/history.js +0 -16
  99. package/dist/es/tools/indent.d.ts +0 -17
  100. package/dist/es/tools/indent.js +0 -90
  101. package/dist/es/tools/inlineFormat.js +0 -75
  102. package/dist/es/tools/insertImage.d.ts +0 -13
  103. package/dist/es/tools/insertImage.js +0 -78
  104. package/dist/es/tools/insertLink.d.ts +0 -24
  105. package/dist/es/tools/insertLink.js +0 -85
  106. package/dist/es/tools/insertTable/index.d.ts +0 -3
  107. package/dist/es/tools/insertTable/index.js +0 -3
  108. package/dist/es/tools/insertTable/popup.d.ts +0 -93
  109. package/dist/es/tools/insertTable/popup.js +0 -102
  110. package/dist/es/tools/insertTable/popupGrid.d.ts +0 -31
  111. package/dist/es/tools/insertTable/popupGrid.js +0 -54
  112. package/dist/es/tools/insertTable/tool.js +0 -106
  113. package/dist/es/tools/lists-styled.d.ts +0 -5
  114. package/dist/es/tools/lists-styled.js +0 -80
  115. package/dist/es/tools/lists.js +0 -84
  116. package/dist/es/tools/main.d.ts +0 -714
  117. package/dist/es/tools/main.js +0 -740
  118. package/dist/es/tools/outdent.js +0 -85
  119. package/dist/es/tools/pdf.d.ts +0 -25
  120. package/dist/es/tools/pdf.js +0 -44
  121. package/dist/es/tools/print.d.ts +0 -16
  122. package/dist/es/tools/print.js +0 -48
  123. package/dist/es/tools/proseMirrorTool.d.ts +0 -12
  124. package/dist/es/tools/proseMirrorTool.js +0 -67
  125. package/dist/es/tools/selectAll.d.ts +0 -16
  126. package/dist/es/tools/selectAll.js +0 -45
  127. package/dist/es/tools/table-wizard/cellPropsUtils.d.ts +0 -36
  128. package/dist/es/tools/table-wizard/cellPropsUtils.js +0 -203
  129. package/dist/es/tools/table-wizard/tableCellProperties.d.ts +0 -20
  130. package/dist/es/tools/table-wizard/tableCellProperties.js +0 -247
  131. package/dist/es/tools/table-wizard/tableProperties.d.ts +0 -11
  132. package/dist/es/tools/table-wizard/tableProperties.js +0 -294
  133. package/dist/es/tools/table-wizard/tablePropsUtils.js +0 -498
  134. package/dist/es/tools/table-wizard/utils.js +0 -144
  135. package/dist/es/tools/tableEdit.d.ts +0 -98
  136. package/dist/es/tools/tableEdit.js +0 -90
  137. package/dist/es/tools/unlink.d.ts +0 -17
  138. package/dist/es/tools/unlink.js +0 -77
  139. package/dist/es/tools/utils.d.ts +0 -50
  140. package/dist/es/tools/utils.js +0 -72
  141. package/dist/es/tools/viewHtml.js +0 -79
  142. package/dist/es/utils/browser-detection.d.ts +0 -4
  143. package/dist/es/utils/browser-detection.js +0 -5
  144. package/dist/es/utils/controlled-value.d.ts +0 -5
  145. package/dist/es/utils/controlled-value.js +0 -31
  146. package/dist/es/utils/index.d.ts +0 -363
  147. package/dist/es/utils/index.js +0 -431
  148. package/dist/es/utils/props-key.d.ts +0 -5
  149. package/dist/es/utils/props-key.js +0 -5
  150. package/dist/npm/Editor.d.ts +0 -118
  151. package/dist/npm/Editor.js +0 -444
  152. package/dist/npm/EditorProps.js +0 -2
  153. package/dist/npm/config/defaultStyles.d.ts +0 -12
  154. package/dist/npm/config/defaultStyles.js +0 -15
  155. package/dist/npm/config/pasteSettings.d.ts +0 -6
  156. package/dist/npm/config/pasteSettings.js +0 -2
  157. package/dist/npm/config/schema.d.ts +0 -1
  158. package/dist/npm/config/schema.js +0 -6
  159. package/dist/npm/config/shortcuts.d.ts +0 -24
  160. package/dist/npm/config/shortcuts.js +0 -38
  161. package/dist/npm/config/toolsSettings.d.ts +0 -490
  162. package/dist/npm/config/toolsSettings.js +0 -525
  163. package/dist/npm/dialogs/EditorDialogProps.js +0 -2
  164. package/dist/npm/dialogs/FindReplace.js +0 -251
  165. package/dist/npm/dialogs/insertImage.js +0 -122
  166. package/dist/npm/dialogs/insertLink.d.ts +0 -26
  167. package/dist/npm/dialogs/insertLink.js +0 -97
  168. package/dist/npm/dialogs/main.js +0 -72
  169. package/dist/npm/dialogs/viewHtml.js +0 -82
  170. package/dist/npm/main.d.ts +0 -176
  171. package/dist/npm/main.js +0 -189
  172. package/dist/npm/messages/index.js +0 -992
  173. package/dist/npm/package-metadata.d.ts +0 -5
  174. package/dist/npm/package-metadata.js +0 -14
  175. package/dist/npm/tools/ToolProps.d.ts +0 -38
  176. package/dist/npm/tools/ToolProps.js +0 -2
  177. package/dist/npm/tools/align.d.ts +0 -7
  178. package/dist/npm/tools/align.js +0 -74
  179. package/dist/npm/tools/applyColor.d.ts +0 -12
  180. package/dist/npm/tools/applyColor.js +0 -38
  181. package/dist/npm/tools/cleanFormatting.js +0 -54
  182. package/dist/npm/tools/findReplace.js +0 -79
  183. package/dist/npm/tools/fontStyle.js +0 -94
  184. package/dist/npm/tools/formatBlock.d.ts +0 -18
  185. package/dist/npm/tools/formatBlock.js +0 -92
  186. package/dist/npm/tools/history.js +0 -19
  187. package/dist/npm/tools/indent.js +0 -93
  188. package/dist/npm/tools/inlineFormat.d.ts +0 -47
  189. package/dist/npm/tools/inlineFormat.js +0 -78
  190. package/dist/npm/tools/insertImage.d.ts +0 -13
  191. package/dist/npm/tools/insertImage.js +0 -82
  192. package/dist/npm/tools/insertLink.js +0 -88
  193. package/dist/npm/tools/insertTable/index.d.ts +0 -3
  194. package/dist/npm/tools/insertTable/index.js +0 -7
  195. package/dist/npm/tools/insertTable/popup.js +0 -105
  196. package/dist/npm/tools/insertTable/popupGrid.js +0 -56
  197. package/dist/npm/tools/insertTable/tool.d.ts +0 -24
  198. package/dist/npm/tools/insertTable/tool.js +0 -109
  199. package/dist/npm/tools/lists-styled.d.ts +0 -5
  200. package/dist/npm/tools/lists-styled.js +0 -84
  201. package/dist/npm/tools/lists.d.ts +0 -27
  202. package/dist/npm/tools/lists.js +0 -87
  203. package/dist/npm/tools/main.js +0 -743
  204. package/dist/npm/tools/outdent.d.ts +0 -17
  205. package/dist/npm/tools/outdent.js +0 -88
  206. package/dist/npm/tools/pdf.js +0 -48
  207. package/dist/npm/tools/print.js +0 -52
  208. package/dist/npm/tools/proseMirrorTool.js +0 -71
  209. package/dist/npm/tools/selectAll.js +0 -49
  210. package/dist/npm/tools/table-wizard/cellPropsUtils.js +0 -208
  211. package/dist/npm/tools/table-wizard/tableCellProperties.js +0 -253
  212. package/dist/npm/tools/table-wizard/tableProperties.d.ts +0 -11
  213. package/dist/npm/tools/table-wizard/tableProperties.js +0 -298
  214. package/dist/npm/tools/table-wizard/tablePropsUtils.d.ts +0 -52
  215. package/dist/npm/tools/table-wizard/tablePropsUtils.js +0 -504
  216. package/dist/npm/tools/table-wizard/utils.d.ts +0 -39
  217. package/dist/npm/tools/table-wizard/utils.js +0 -153
  218. package/dist/npm/tools/tableEdit.js +0 -95
  219. package/dist/npm/tools/unlink.js +0 -80
  220. package/dist/npm/tools/utils.js +0 -82
  221. package/dist/npm/tools/viewHtml.d.ts +0 -24
  222. package/dist/npm/tools/viewHtml.js +0 -82
  223. package/dist/npm/utils/browser-detection.d.ts +0 -4
  224. package/dist/npm/utils/browser-detection.js +0 -8
  225. package/dist/npm/utils/controlled-value.d.ts +0 -5
  226. package/dist/npm/utils/controlled-value.js +0 -35
  227. package/dist/npm/utils/index.js +0 -434
  228. package/dist/npm/utils/props-key.d.ts +0 -5
  229. package/dist/npm/utils/props-key.js +0 -8
  230. package/dist/systemjs/kendo-react-editor.js +0 -1
  231. package/e2e-next/editor.basic.tests.ts +0 -24
@@ -1,34 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { chainCommands, exitCode, splitListItem, undo, redo, undoInputRule, goToNextCell, toggleInlineFormat } from '@progress/kendo-editor-common';
13
- import { EditorToolsSettings } from './toolsSettings';
14
- var bold = EditorToolsSettings.bold, underline = EditorToolsSettings.underline, italic = EditorToolsSettings.italic;
15
- var mac = typeof navigator !== 'undefined' ? /Mac/.test(navigator.platform) : false;
16
- /**
17
- * @hidden
18
- */
19
- export var getShortcuts = function (settings) {
20
- var insertBr = chainCommands(exitCode, function (state, dispatch) {
21
- var hardBreak = settings && settings.types && settings.types.hardBreak || 'hard_break';
22
- var br = state.schema.nodes[hardBreak];
23
- if (dispatch) {
24
- dispatch(state.tr.replaceSelectionWith(br.create()).scrollIntoView());
25
- }
26
- return true;
27
- });
28
- var listItem = settings && settings.types && settings.types.listItem || 'list_item';
29
- var toolsSettings = settings && settings.toolsSettings || {};
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
- return splitListItem(state.schema.nodes[listItem])(state, dispatch);
32
- }, 'Tab': goToNextCell(1), 'Shift-Tab': goToNextCell(-1) });
33
- return shortcutsSettings;
34
- };
@@ -1,522 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
- if (ar || !(i in from)) {
15
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
16
- ar[i] = from[i];
17
- }
18
- }
19
- return to.concat(ar || Array.prototype.slice.call(from));
20
- };
21
- import { keys, messages } from './../messages';
22
- import { alignCenterIcon, alignJustifyIcon, alignLeftIcon, alignRemoveIcon, alignRightIcon, binocularsIcon, boldIcon, cellsMergeIcon, cellSplitHorizontallyIcon, clearCssIcon, codeIcon, dropletIcon, fileAddIcon, filePdfIcon, foregroundColorIcon, imageIcon, indentIcon, italicIcon, linkIcon, listOrderedIcon, listUnorderedIcon, outdentIcon, printIcon, redoIcon, selectAllIcon, strikethroughIcon, subscriptIcon, supscriptIcon, tableAddIcon, tableColumnDeleteIcon, tableColumnInsertLeftIcon, tableColumnInsertRightIcon, tableDeleteIcon, tableRowDeleteIcon, tableRowInsertAboveIcon, tableRowInsertBelowIcon, underlineIcon, undoIcon, unlinkIcon } from '@progress/kendo-svg-icons';
23
- 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';
24
- /**
25
- * @hidden
26
- */
27
- export var listsTypes = __assign({}, indentRules.listsTypes);
28
- /**
29
- * Represents a wrapping namespace for the tool settings of the Editor.
30
- */
31
- export var EditorToolsSettings;
32
- (function (EditorToolsSettings) {
33
- /**
34
- * @hidden
35
- */
36
- var buttonCommonProps = {
37
- type: 'button'
38
- };
39
- /**
40
- * The object of the Bold tool settings.
41
- */
42
- EditorToolsSettings.bold = __assign(__assign({}, boldSettings), { props: __assign({ icon: 'bold', svgIcon: boldIcon }, buttonCommonProps), messages: {
43
- title: keys.bold
44
- }, commandName: 'Bold' });
45
- /**
46
- * The object of the Italic tool settings.
47
- */
48
- EditorToolsSettings.italic = __assign(__assign({}, italicSettings), { props: __assign({ icon: 'italic', svgIcon: italicIcon }, buttonCommonProps), messages: {
49
- title: keys.italic
50
- }, commandName: 'Italic' });
51
- /**
52
- * The object of the Underline tool settings.
53
- */
54
- EditorToolsSettings.underline = __assign(__assign({}, underlineSettings), { props: __assign({ icon: 'underline', svgIcon: underlineIcon }, buttonCommonProps), messages: {
55
- title: keys.underline
56
- }, commandName: 'Underline' });
57
- /**
58
- * The object of the Strikethrough tool settings.
59
- */
60
- EditorToolsSettings.strikethrough = __assign(__assign({}, strikethroughSettings), { props: __assign({ icon: 'strikethrough', svgIcon: strikethroughIcon }, buttonCommonProps), messages: {
61
- title: keys.strikethrough
62
- }, commandName: 'Strikethrough' });
63
- /**
64
- * The object of the Subscript tool settings.
65
- */
66
- EditorToolsSettings.subscript = __assign(__assign({}, subscriptSettings), { props: __assign({ icon: 'subscript', svgIcon: subscriptIcon }, buttonCommonProps), messages: {
67
- title: keys.subscript
68
- }, commandName: 'Subscript' });
69
- /**
70
- * The object of the Superscript tool settings.
71
- */
72
- EditorToolsSettings.superscript = __assign(__assign({}, superscriptSettings), { props: __assign({ icon: 'supscript', svgIcon: supscriptIcon }, buttonCommonProps), messages: {
73
- title: keys.superscript
74
- }, commandName: 'Superscript' });
75
- /**
76
- * The object of the Link tool settings.
77
- */
78
- EditorToolsSettings.link = __assign(__assign({}, linkSettings), { props: __assign({ icon: 'link', svgIcon: linkIcon }, buttonCommonProps), messages: {
79
- insertHyperlink: keys.insertHyperlink,
80
- insertHyperlinkDialogTitle: keys.insertHyperlinkDialogTitle,
81
- insertHyperlinkAddress: keys.insertHyperlinkAddress,
82
- insertHyperlinkTitle: keys.insertHyperlinkTitle,
83
- insertHyperlinkNewWindow: keys.insertHyperlinkNewWindow,
84
- insertHyperlinkCancel: keys.insertHyperlinkCancel,
85
- insertHyperlinkInsert: keys.insertHyperlinkInsert
86
- }, commandName: 'Link' });
87
- /**
88
- * The object of the Link tool settings.
89
- */
90
- EditorToolsSettings.insertFile = __assign(__assign({}, linkSettings), { props: __assign({ icon: 'file-add', svgIcon: fileAddIcon }, buttonCommonProps), messages: {
91
- insertHyperlink: keys.insertFile,
92
- insertHyperlinkDialogTitle: keys.insertFileDialogTitle,
93
- insertHyperlinkAddress: keys.insertFileAddress,
94
- insertHyperlinkTitle: keys.insertFileTitle,
95
- insertHyperlinkNewWindow: '',
96
- insertHyperlinkCancel: keys.insertFileCancel,
97
- insertHyperlinkInsert: keys.insertFileInsert
98
- }, commandName: 'InsertFile', linkTarget: false });
99
- /**
100
- * The object of the InsertTable tool settings.
101
- */
102
- EditorToolsSettings.insertTable = {
103
- props: __assign({ icon: 'table-add', svgIcon: tableAddIcon }, buttonCommonProps),
104
- messages: {
105
- createTable: keys.createTable,
106
- createTableHint: keys.createTableHint
107
- },
108
- commandName: 'InsertTable'
109
- };
110
- /**
111
- * The object of the AddRowBefore tool settings.
112
- */
113
- EditorToolsSettings.addRowBefore = {
114
- props: __assign({ icon: 'table-row-insert-above', svgIcon: tableRowInsertAboveIcon }, buttonCommonProps),
115
- messages: {
116
- title: keys.addRowBefore
117
- },
118
- commandName: 'AddRowBefore'
119
- };
120
- /**
121
- * The object of the AddRowAfter tool settings.
122
- */
123
- EditorToolsSettings.addRowAfter = {
124
- props: __assign({ icon: 'table-row-insert-below', svgIcon: tableRowInsertBelowIcon }, buttonCommonProps),
125
- messages: {
126
- title: keys.addRowAfter
127
- },
128
- commandName: 'AddRowAfter'
129
- };
130
- /**
131
- * The object of the AddColumnBefore tool settings.
132
- */
133
- EditorToolsSettings.addColumnBefore = {
134
- props: __assign({ icon: 'table-column-insert-left', svgIcon: tableColumnInsertLeftIcon }, buttonCommonProps),
135
- messages: {
136
- title: keys.addColumnBefore
137
- },
138
- commandName: 'AddColumnBefore'
139
- };
140
- /**
141
- * The object of the AddColumnAfter tool settings.
142
- */
143
- EditorToolsSettings.addColumnAfter = {
144
- props: __assign({ icon: 'table-column-insert-right', svgIcon: tableColumnInsertRightIcon }, buttonCommonProps),
145
- messages: {
146
- title: keys.addColumnAfter
147
- },
148
- commandName: 'AddColumnAfter'
149
- };
150
- /**
151
- * The object of the DeleteRow tool settings.
152
- */
153
- EditorToolsSettings.deleteRow = {
154
- props: __assign({ icon: 'table-row-delete', svgIcon: tableRowDeleteIcon }, buttonCommonProps),
155
- messages: {
156
- title: keys.deleteRow
157
- },
158
- commandName: 'DeleteRow'
159
- };
160
- /**
161
- * The object of the DeleteColumn tool settings.
162
- */
163
- EditorToolsSettings.deleteColumn = {
164
- props: __assign({ icon: 'table-column-delete', svgIcon: tableColumnDeleteIcon }, buttonCommonProps),
165
- messages: {
166
- title: keys.deleteColumn
167
- },
168
- commandName: 'DeleteColumn'
169
- };
170
- /**
171
- * The object of the DeleteTable tool settings.
172
- */
173
- EditorToolsSettings.deleteTable = {
174
- props: __assign({ icon: 'table-delete', svgIcon: tableDeleteIcon }, buttonCommonProps),
175
- messages: {
176
- title: keys.deleteTable
177
- },
178
- commandName: 'DeleteTable'
179
- };
180
- /**
181
- * The object of the MergeCells tool settings.
182
- */
183
- EditorToolsSettings.mergeCells = {
184
- props: __assign({ icon: 'cells-merge', svgIcon: cellsMergeIcon }, buttonCommonProps),
185
- messages: {
186
- title: keys.mergeCells
187
- },
188
- commandName: 'MergeCells'
189
- };
190
- /**
191
- * The object of the SplitCell tool settings.
192
- */
193
- EditorToolsSettings.splitCell = {
194
- props: __assign({ icon: 'cell-split-horizontally', svgIcon: cellSplitHorizontallyIcon }, buttonCommonProps),
195
- messages: {
196
- title: keys.splitCell
197
- },
198
- commandName: 'SplitCell'
199
- };
200
- /**
201
- * The object of the Print tool settings.
202
- */
203
- EditorToolsSettings.print = {
204
- props: __assign({ icon: 'print', svgIcon: printIcon }, buttonCommonProps),
205
- messages: {
206
- title: keys.print
207
- }
208
- };
209
- /**
210
- * The object of the Print tool settings.
211
- */
212
- EditorToolsSettings.selectAll = {
213
- props: __assign({ icon: 'select-all', svgIcon: selectAllIcon }, buttonCommonProps),
214
- messages: {
215
- title: keys.selectAll
216
- }
217
- };
218
- /**
219
- * The object of the Print tool settings.
220
- */
221
- EditorToolsSettings.pdf = {
222
- props: __assign({ icon: 'file-pdf', svgIcon: filePdfIcon }, buttonCommonProps),
223
- messages: {
224
- title: keys.pdf
225
- }
226
- };
227
- /**
228
- * The PDF export options.
229
- *
230
- * const savePdfOptions = {
231
- * fileName: 'editor.pdf',
232
- * paperSize: 'A4',
233
- * margin: '1cm'
234
- * };
235
- */
236
- EditorToolsSettings.savePdfOptions = {
237
- fileName: 'editor.pdf',
238
- paperSize: 'A4',
239
- margin: '1cm'
240
- };
241
- /**
242
- * The object of the CleanFormatting tool settings.
243
- */
244
- EditorToolsSettings.cleanFormatting = {
245
- props: __assign({ icon: 'clear-css', svgIcon: clearCssIcon }, buttonCommonProps),
246
- messages: {
247
- title: keys.cleanFormatting
248
- },
249
- commandName: 'CleanFormatting'
250
- };
251
- /**
252
- * The object of the InsertImage tool settings.
253
- */
254
- EditorToolsSettings.image = {
255
- node: 'image',
256
- props: __assign({ icon: 'image', svgIcon: imageIcon }, buttonCommonProps),
257
- messages: {
258
- insertImage: keys.insertImage,
259
- insertImageDialogTitle: keys.insertImageDialogTitle,
260
- insertImageAddress: keys.insertImageAddress,
261
- insertImageTitle: keys.insertImageTitle,
262
- insertImageAltText: keys.insertImageAltText,
263
- insertImageWidth: keys.insertImageWidth,
264
- insertImageHeight: keys.insertImageHeight,
265
- insertImageCancel: keys.insertImageCancel,
266
- insertImageInsert: keys.insertImageInsert
267
- },
268
- commandName: 'InsertImage'
269
- };
270
- /**
271
- * The object of the ViewHtml tool settings.
272
- */
273
- EditorToolsSettings.viewHtml = {
274
- props: __assign({ icon: 'code', svgIcon: codeIcon }, buttonCommonProps),
275
- messages: {
276
- viewHtml: keys.viewHtml,
277
- viewHtmlDialogTitle: keys.viewHtmlDialogTitle,
278
- viewHtmlCancel: keys.viewHtmlCancel,
279
- viewHtmlUpdate: keys.viewHtmlUpdate
280
- },
281
- commandName: 'SetContent'
282
- };
283
- /**
284
- * The object of the Find and Replace tool settings.
285
- */
286
- EditorToolsSettings.findAndReplace = {
287
- props: __assign({ icon: 'find', svgIcon: binocularsIcon }, buttonCommonProps),
288
- messages: {
289
- findReplaceToolTitle: keys.findReplaceToolTitle,
290
- findReplaceDialogTitle: keys.findReplaceDialogTitle,
291
- findReplaceTabFind: keys.findReplaceTabFind,
292
- findReplaceTabReplace: keys.findReplaceTabReplace,
293
- findReplaceFindWhat: keys.findReplaceFindWhat,
294
- findReplaceReplaceWith: keys.findReplaceReplaceWith,
295
- findReplaceReplace: keys.findReplaceReplace,
296
- findReplaceReplaceAll: keys.findReplaceReplaceAll,
297
- findReplaceMatchCase: keys.findReplaceMatchCase,
298
- findReplaceMatchWord: keys.findReplaceMatchWord,
299
- findReplaceMatchCyclic: keys.findReplaceMatchCyclic,
300
- findReplaceUseRegExp: keys.findReplaceUseRegExp,
301
- findReplacePrevMatch: keys.findReplacePrevMatch,
302
- findReplaceNextMatch: keys.findReplaceNextMatch,
303
- findReplaceMatches: keys.findReplaceMatches
304
- }
305
- };
306
- /**
307
- * The object of the Unlink tool settings.
308
- */
309
- EditorToolsSettings.unlink = __assign(__assign({}, linkSettings), { props: __assign({ icon: 'unlink', svgIcon: unlinkIcon }, buttonCommonProps), messages: {
310
- title: keys.unlink
311
- }, commandName: 'Unlink' });
312
- /**
313
- * The object of the Undo tool settings.
314
- */
315
- EditorToolsSettings.undo = {
316
- props: __assign({ icon: 'undo', svgIcon: undoIcon }, buttonCommonProps),
317
- messages: {
318
- title: keys.undo
319
- },
320
- commandName: 'Undo'
321
- };
322
- /**
323
- * The object of the Redo tool settings.
324
- */
325
- EditorToolsSettings.redo = {
326
- props: __assign({ icon: 'redo', svgIcon: redoIcon }, buttonCommonProps),
327
- messages: {
328
- title: keys.redo
329
- },
330
- commandName: 'Redo'
331
- };
332
- /**
333
- * The object of the FontSize tool settings.
334
- */
335
- EditorToolsSettings.fontSize = {
336
- style: 'font-size',
337
- defaultItem: { text: messages[keys.fontSize], value: '', localizationKey: keys.fontSize },
338
- items: [
339
- { text: '1 (8pt)', value: 'xx-small' },
340
- { text: '2 (10pt)', value: 'x-small' },
341
- { text: '3 (12pt)', value: 'small' },
342
- { text: '4 (14pt)', value: 'medium' },
343
- { text: '5 (18pt)', value: 'large' },
344
- { text: '6 (24pt)', value: 'x-large' },
345
- { text: '7 (36pt)', value: 'xx-large' }
346
- ],
347
- commandName: 'FontSize'
348
- };
349
- /**
350
- * The object of the FontName tool settings.
351
- */
352
- EditorToolsSettings.fontName = {
353
- style: 'font-family',
354
- defaultItem: { text: messages[keys.fontName], value: '', localizationKey: keys.fontName },
355
- items: [
356
- { text: 'Arial', value: 'Arial, Helvetica, sans-serif',
357
- style: { fontFamily: 'Arial, Helvetica, sans-serif' } },
358
- { text: 'Courier New', value: '\'Courier New\', Courier, monospace',
359
- style: { fontFamily: '\'Courier New\', Courier, monospace' } },
360
- { text: 'Georgia', value: 'Georgia, serif',
361
- style: { fontFamily: 'Georgia, serif' } },
362
- { text: 'Impact', value: 'Impact, Charcoal, sans-serif',
363
- style: { fontFamily: 'Impact, Charcoal, sans-serif' } },
364
- { text: 'Lucida Console', value: '\'Lucida Console\', Monaco, monospace',
365
- style: { fontFamily: '\'Lucida Console\', Monaco, monospace' } },
366
- { text: 'Tahoma', value: 'Tahoma, Geneva, sans-serif',
367
- style: { fontFamily: 'Tahoma, Geneva, sans-serif' } },
368
- { text: 'Times New Roman', value: '\'Times New Roman\', Times,serif',
369
- style: { fontFamily: '\'Times New Roman\', Times,serif' } },
370
- { text: 'Trebuchet MS', value: '\'Trebuchet MS\', Helvetica, sans-serif',
371
- style: { fontFamily: '\'Trebuchet MS\', Helvetica, sans-serif' } },
372
- { text: 'Verdana', value: 'Verdana, Geneva, sans-serif',
373
- style: { fontFamily: 'Verdana, Geneva, sans-serif' } }
374
- ],
375
- commandName: 'FontName'
376
- };
377
- /**
378
- * The object of the FormatBlock tool settings.
379
- */
380
- EditorToolsSettings.formatBlock = {
381
- defaultItem: { text: messages[keys.format], value: '', localizationKey: keys.format },
382
- items: [
383
- { text: 'Paragraph', value: 'p', style: { display: 'block', marginLeft: 0 } },
384
- { text: 'Heading 1', value: 'h1', style: { display: 'block', fontSize: '2em', marginLeft: 0, fontWeight: 'bold' } },
385
- { text: 'Heading 2', value: 'h2', style: { display: 'block', fontSize: '1.5em', marginLeft: 0, fontWeight: 'bold' } },
386
- { text: 'Heading 3', value: 'h3', style: { display: 'block', fontSize: '1.17em', marginLeft: 0, fontWeight: 'bold' } },
387
- { text: 'Heading 4', value: 'h4', style: { display: 'block', fontSize: '1em', marginLeft: 0, fontWeight: 'bold' } },
388
- { text: 'Heading 5', value: 'h5', style: { display: 'block', fontSize: '0.83em', marginLeft: 0, fontWeight: 'bold' } },
389
- { text: 'Heading 6', value: 'h6', style: { display: 'block', fontSize: '0.67em', marginLeft: 0, fontWeight: 'bold' } }
390
- ],
391
- commandName: 'FormatBlock'
392
- };
393
- /**
394
- * The object of the ForeColor tool settings.
395
- */
396
- EditorToolsSettings.foreColor = {
397
- style: 'color',
398
- colorPickerProps: {
399
- icon: 'foreground-color',
400
- svgIcon: foregroundColorIcon,
401
- view: 'palette',
402
- title: keys.foregroundColor,
403
- ariaLabel: keys.foreColorLabel
404
- },
405
- commandName: 'ForeColor'
406
- };
407
- /**
408
- * The object of the BackColor tool settings.
409
- */
410
- EditorToolsSettings.backColor = {
411
- style: 'background-color',
412
- colorPickerProps: {
413
- icon: 'droplet',
414
- svgIcon: dropletIcon,
415
- view: 'palette',
416
- title: keys.backgroundColor,
417
- ariaLabel: keys.backColorLabel
418
- },
419
- commandName: 'BackColor'
420
- };
421
- /**
422
- * The object of the AlignLeft tool settings.
423
- */
424
- EditorToolsSettings.alignLeft = {
425
- actions: __spreadArray([], alignLeftRules, true),
426
- props: __assign({ icon: 'align-left', svgIcon: alignLeftIcon }, buttonCommonProps),
427
- messages: {
428
- title: keys.alignLeft
429
- },
430
- commandName: 'AlignLeft'
431
- };
432
- /**
433
- * The object of the AlignRight tool settings.
434
- */
435
- EditorToolsSettings.alignRight = {
436
- actions: __spreadArray([], alignRightRules, true),
437
- props: __assign({ icon: 'align-right', svgIcon: alignRightIcon }, buttonCommonProps),
438
- messages: {
439
- title: keys.alignRight
440
- },
441
- commandName: 'AlignRight'
442
- };
443
- /**
444
- * The object of the AlignCenter tool settings.
445
- */
446
- EditorToolsSettings.alignCenter = {
447
- actions: __spreadArray([], alignCenterRules, true),
448
- props: __assign({ icon: 'align-center', svgIcon: alignCenterIcon }, buttonCommonProps),
449
- messages: {
450
- title: keys.alignCenter
451
- },
452
- commandName: 'AlignCenter'
453
- };
454
- /**
455
- * The object of the AlignJustify tool settings.
456
- */
457
- EditorToolsSettings.alignJustify = {
458
- actions: __spreadArray([], alignJustifyRules, true),
459
- props: __assign({ icon: 'align-justify', svgIcon: alignJustifyIcon }, buttonCommonProps),
460
- messages: {
461
- title: keys.alignJustify
462
- },
463
- commandName: 'AlignJustify'
464
- };
465
- /**
466
- * The object of the AlignRemove tool settings.
467
- */
468
- EditorToolsSettings.alignRemove = {
469
- actions: __spreadArray([], alignRemoveRules, true),
470
- props: __assign({ icon: 'align-remove', svgIcon: alignRemoveIcon }, buttonCommonProps),
471
- messages: {},
472
- commandName: 'AlignRemove'
473
- };
474
- /**
475
- * The object of the Indent tool settings.
476
- */
477
- EditorToolsSettings.indent = {
478
- actions: indentRules.nodes,
479
- listsTypes: listsTypes,
480
- props: __assign({ icon: 'indent', svgIcon: indentIcon }, buttonCommonProps),
481
- messages: {
482
- title: keys.indent
483
- },
484
- commandName: 'Indent'
485
- };
486
- /**
487
- * The object of the Outdent tool settings.
488
- */
489
- EditorToolsSettings.outdent = {
490
- actions: outdentRules.nodes,
491
- listsTypes: listsTypes,
492
- props: __assign({ icon: 'outdent', svgIcon: outdentIcon }, buttonCommonProps),
493
- messages: {
494
- title: keys.outdent
495
- },
496
- commandName: 'Outdent'
497
- };
498
- /**
499
- * The object of the OrderedList tool settings.
500
- */
501
- EditorToolsSettings.orderedList = {
502
- listType: listsTypes.orderedList,
503
- props: __assign({ icon: 'list-ordered', svgIcon: listOrderedIcon }, buttonCommonProps),
504
- messages: {
505
- title: keys.orderedList
506
- },
507
- commandName: 'OrderedList',
508
- types: __assign({}, listsTypes)
509
- };
510
- /**
511
- * The object of the UnorderedList tool settings.
512
- */
513
- EditorToolsSettings.bulletList = {
514
- listType: listsTypes.bulletList,
515
- props: __assign({ icon: 'list-unordered', svgIcon: listUnorderedIcon }, buttonCommonProps),
516
- messages: {
517
- title: keys.bulletList
518
- },
519
- commandName: 'UnorderedList',
520
- types: __assign({}, listsTypes)
521
- };
522
- })(EditorToolsSettings || (EditorToolsSettings = {}));
@@ -1,27 +0,0 @@
1
- /// <reference types="react" />
2
- import { EditorView } from '@progress/kendo-editor-common';
3
- /**
4
- * @hidden
5
- */
6
- export interface EditorDialogProps {
7
- /**
8
- * The `EditorView` object.
9
- */
10
- view: EditorView;
11
- /**
12
- * The `settings` object of the Dialog.
13
- */
14
- settings: any;
15
- /**
16
- * Represents the `dir` HTML attribute.
17
- */
18
- dir?: string;
19
- /**
20
- * The `close` event which will be triggered when the Dialog is about to be unmounted.
21
- */
22
- onClose: () => void;
23
- /**
24
- * Fires when a Dialog is about to be rendered. Used to override the default appearance of the Dialog.
25
- */
26
- render?: (tool: React.ReactElement<any>, args?: any) => React.ReactNode;
27
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,71 +0,0 @@
1
- import * as React from 'react';
2
- import { EditorToolsSettings } from './../config/toolsSettings';
3
- import { TextSelection, EditorView } from '@progress/kendo-editor-common';
4
- interface FindAndReplaceDialogState {
5
- selectedTab: number;
6
- matches?: TextSelection[];
7
- nextMatch?: TextSelection;
8
- searchText: string;
9
- replaceText: string;
10
- matchCase: boolean;
11
- matchWord: boolean;
12
- matchCyclic: boolean;
13
- useRegExp: boolean;
14
- }
15
- /**
16
- * @hidden
17
- */
18
- export interface FindAndReplaceDialogProps {
19
- /**
20
- * The `EditorView` object.
21
- */
22
- view: EditorView;
23
- /**
24
- * The `settings` object of the Dialog.
25
- */
26
- settings?: EditorToolsSettings.FindReplaceSettings;
27
- /**
28
- * Represents the `dir` HTML attribute.
29
- */
30
- dir?: string;
31
- /**
32
- * The `close` event which will be triggered when the Dialog is about to be unmounted.
33
- */
34
- onClose: () => void;
35
- }
36
- /**
37
- * @hidden
38
- */
39
- export declare class FindAndReplaceDialog extends React.Component<FindAndReplaceDialogProps, FindAndReplaceDialogState> {
40
- /**
41
- * @hidden
42
- */
43
- state: FindAndReplaceDialogState;
44
- private get settings();
45
- constructor(props: FindAndReplaceDialogProps);
46
- /**
47
- * @hidden
48
- */
49
- componentDidUpdate(_: FindAndReplaceDialogProps, prevState: FindAndReplaceDialogState): void;
50
- /**
51
- * @hidden
52
- */
53
- render(): JSX.Element;
54
- private onTabSelect;
55
- private onClose;
56
- private matchesMessage;
57
- private onFindNext;
58
- private onFindPrev;
59
- private onFind;
60
- private onReplace;
61
- private onReplaceAll;
62
- private onKeyDown;
63
- private onMatchCaseChecked;
64
- private onMatchWordChecked;
65
- private onMatchCyclicChecked;
66
- private onUseRegExpChecked;
67
- private onSearchChange;
68
- private onReplaceChange;
69
- private setNextState;
70
- }
71
- export {};