@progress/kendo-angular-editor 2.5.0-dev.202111161123 → 2.5.0-dev.202111291334

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 (199) hide show
  1. package/dist/cdn/js/kendo-angular-editor.js +2 -2
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/common/error-messages.js +2 -1
  4. package/dist/es/config/command-icons.js +4 -2
  5. package/dist/es/config/commands.js +32 -31
  6. package/dist/es/editor-toolbar-state.js +20 -2
  7. package/dist/es/editor.component.js +11 -5
  8. package/dist/es/editor.module.js +7 -1
  9. package/dist/es/index.js +3 -0
  10. package/dist/es/localization/messages.js +8 -0
  11. package/dist/es/package-metadata.js +1 -1
  12. package/dist/es/tools/alignment/editor-align-center-button.directive.js +5 -3
  13. package/dist/es/tools/alignment/editor-align-justify-button.directive.js +5 -3
  14. package/dist/es/tools/alignment/editor-align-left-button.directive.js +5 -3
  15. package/dist/es/tools/alignment/editor-align-right-button.directive.js +5 -3
  16. package/dist/es/tools/editor-clean-formatting-button.directive.js +5 -3
  17. package/dist/es/tools/fontfamily/editor-fontfamily.component.js +9 -3
  18. package/dist/es/tools/fontsize/editor-fontsize.component.js +9 -3
  19. package/dist/es/tools/format/editor-format.component.js +9 -3
  20. package/dist/es/tools/history/editor-redo-button.directive.js +5 -3
  21. package/dist/es/tools/history/editor-undo-button.directive.js +5 -3
  22. package/dist/es/tools/image/editor-insert-image-button.directive.js +5 -3
  23. package/dist/es/tools/indentation/editor-indent-button.directive.js +5 -3
  24. package/dist/es/tools/indentation/editor-outdent-button.directive.js +5 -3
  25. package/dist/es/tools/link/editor-create-link-button.directive.js +5 -3
  26. package/dist/es/tools/link/editor-insert-file-button.directive.js +5 -3
  27. package/dist/es/tools/link/editor-unlink-button.directive.js +5 -3
  28. package/dist/es/tools/list/editor-insert-ordered-list-button.directive.js +5 -3
  29. package/dist/es/tools/list/editor-insert-unordered-list-button.directive.js +5 -3
  30. package/dist/es/tools/print/editor-print-button.directive.js +69 -0
  31. package/dist/es/tools/select-all/select-all-button.directive.js +50 -0
  32. package/dist/es/tools/shared/editor-command-base.js +13 -11
  33. package/dist/es/tools/shared/editor-command-button.js +3 -2
  34. package/dist/es/tools/shared/editor-command-dialog.js +3 -2
  35. package/dist/es/tools/source/editor-view-source-button.directive.js +5 -3
  36. package/dist/es/tools/tables/editor-add-column-after-button.directive.js +5 -3
  37. package/dist/es/tools/tables/editor-add-column-before-button.directive.js +5 -3
  38. package/dist/es/tools/tables/editor-add-row-after-button.directive.js +5 -3
  39. package/dist/es/tools/tables/editor-add-row-before-button.directive.js +5 -3
  40. package/dist/es/tools/tables/editor-delete-column-button.directive.js +5 -3
  41. package/dist/es/tools/tables/editor-delete-row-button.directive.js +5 -3
  42. package/dist/es/tools/tables/editor-delete-table-button.directive.js +5 -3
  43. package/dist/es/tools/tables/editor-merge-cells-button.directive.js +5 -3
  44. package/dist/es/tools/tables/editor-split-cell-button.directive.js +5 -3
  45. package/dist/es/tools/tools.service.js +20 -0
  46. package/dist/es/tools/typographical-emphasis/editor-bold-button.directive.js +5 -3
  47. package/dist/es/tools/typographical-emphasis/editor-italic-button.directive.js +5 -3
  48. package/dist/es/tools/typographical-emphasis/editor-strikethrough-button.directive.js +5 -3
  49. package/dist/es/tools/typographical-emphasis/editor-subscript-button.directive.js +5 -3
  50. package/dist/es/tools/typographical-emphasis/editor-superscript-button.directive.js +5 -3
  51. package/dist/es/tools/typographical-emphasis/editor-underline-button.directive.js +5 -3
  52. package/dist/es2015/common/commands.d.ts +5 -1
  53. package/dist/es2015/common/error-messages.js +2 -1
  54. package/dist/es2015/config/command-icons.d.ts +2 -2
  55. package/dist/es2015/config/command-icons.js +4 -2
  56. package/dist/es2015/config/commands.js +31 -30
  57. package/dist/es2015/editor-toolbar-state.js +20 -2
  58. package/dist/es2015/editor.component.d.ts +8 -1
  59. package/dist/es2015/editor.component.js +14 -4
  60. package/dist/es2015/editor.module.js +7 -1
  61. package/dist/es2015/index.d.ts +3 -0
  62. package/dist/es2015/index.js +3 -0
  63. package/dist/es2015/index.metadata.json +1 -1
  64. package/dist/es2015/localization/messages.d.ts +8 -0
  65. package/dist/es2015/localization/messages.js +8 -0
  66. package/dist/es2015/package-metadata.js +1 -1
  67. package/dist/es2015/tools/alignment/editor-align-center-button.directive.d.ts +2 -1
  68. package/dist/es2015/tools/alignment/editor-align-center-button.directive.js +5 -3
  69. package/dist/es2015/tools/alignment/editor-align-justify-button.directive.d.ts +2 -1
  70. package/dist/es2015/tools/alignment/editor-align-justify-button.directive.js +5 -3
  71. package/dist/es2015/tools/alignment/editor-align-left-button.directive.d.ts +2 -1
  72. package/dist/es2015/tools/alignment/editor-align-left-button.directive.js +5 -3
  73. package/dist/es2015/tools/alignment/editor-align-right-button.directive.d.ts +2 -1
  74. package/dist/es2015/tools/alignment/editor-align-right-button.directive.js +5 -3
  75. package/dist/es2015/tools/editor-clean-formatting-button.directive.d.ts +2 -1
  76. package/dist/es2015/tools/editor-clean-formatting-button.directive.js +5 -3
  77. package/dist/es2015/tools/fontfamily/editor-fontfamily.component.d.ts +3 -1
  78. package/dist/es2015/tools/fontfamily/editor-fontfamily.component.js +9 -3
  79. package/dist/es2015/tools/fontsize/editor-fontsize.component.d.ts +3 -1
  80. package/dist/es2015/tools/fontsize/editor-fontsize.component.js +9 -3
  81. package/dist/es2015/tools/format/editor-format.component.d.ts +3 -1
  82. package/dist/es2015/tools/format/editor-format.component.js +9 -3
  83. package/dist/es2015/tools/history/editor-redo-button.directive.d.ts +2 -1
  84. package/dist/es2015/tools/history/editor-redo-button.directive.js +5 -3
  85. package/dist/es2015/tools/history/editor-undo-button.directive.d.ts +2 -1
  86. package/dist/es2015/tools/history/editor-undo-button.directive.js +5 -3
  87. package/dist/es2015/tools/image/editor-insert-image-button.directive.d.ts +2 -1
  88. package/dist/es2015/tools/image/editor-insert-image-button.directive.js +5 -3
  89. package/dist/es2015/tools/indentation/editor-indent-button.directive.d.ts +2 -1
  90. package/dist/es2015/tools/indentation/editor-indent-button.directive.js +5 -3
  91. package/dist/es2015/tools/indentation/editor-outdent-button.directive.d.ts +2 -1
  92. package/dist/es2015/tools/indentation/editor-outdent-button.directive.js +5 -3
  93. package/dist/es2015/tools/link/editor-create-link-button.directive.d.ts +2 -1
  94. package/dist/es2015/tools/link/editor-create-link-button.directive.js +5 -3
  95. package/dist/es2015/tools/link/editor-insert-file-button.directive.d.ts +2 -1
  96. package/dist/es2015/tools/link/editor-insert-file-button.directive.js +5 -3
  97. package/dist/es2015/tools/link/editor-unlink-button.directive.d.ts +2 -1
  98. package/dist/es2015/tools/link/editor-unlink-button.directive.js +5 -3
  99. package/dist/es2015/tools/list/editor-insert-ordered-list-button.directive.d.ts +2 -1
  100. package/dist/es2015/tools/list/editor-insert-ordered-list-button.directive.js +5 -3
  101. package/dist/es2015/tools/list/editor-insert-unordered-list-button.directive.d.ts +2 -1
  102. package/dist/es2015/tools/list/editor-insert-unordered-list-button.directive.js +5 -3
  103. package/dist/es2015/tools/print/editor-print-button.directive.d.ts +34 -0
  104. package/dist/es2015/tools/print/editor-print-button.directive.js +66 -0
  105. package/dist/es2015/tools/select-all/select-all-button.directive.d.ts +30 -0
  106. package/dist/es2015/tools/select-all/select-all-button.directive.js +48 -0
  107. package/dist/es2015/tools/shared/editor-command-base.d.ts +5 -3
  108. package/dist/es2015/tools/shared/editor-command-base.js +12 -10
  109. package/dist/es2015/tools/shared/editor-command-button.d.ts +5 -3
  110. package/dist/es2015/tools/shared/editor-command-button.js +3 -2
  111. package/dist/es2015/tools/shared/editor-command-dialog.d.ts +3 -1
  112. package/dist/es2015/tools/shared/editor-command-dialog.js +3 -2
  113. package/dist/es2015/tools/source/editor-view-source-button.directive.d.ts +2 -1
  114. package/dist/es2015/tools/source/editor-view-source-button.directive.js +5 -3
  115. package/dist/es2015/tools/tables/editor-add-column-after-button.directive.d.ts +2 -1
  116. package/dist/es2015/tools/tables/editor-add-column-after-button.directive.js +5 -3
  117. package/dist/es2015/tools/tables/editor-add-column-before-button.directive.d.ts +2 -1
  118. package/dist/es2015/tools/tables/editor-add-column-before-button.directive.js +5 -3
  119. package/dist/es2015/tools/tables/editor-add-row-after-button.directive.d.ts +2 -1
  120. package/dist/es2015/tools/tables/editor-add-row-after-button.directive.js +5 -3
  121. package/dist/es2015/tools/tables/editor-add-row-before-button.directive.d.ts +2 -1
  122. package/dist/es2015/tools/tables/editor-add-row-before-button.directive.js +5 -3
  123. package/dist/es2015/tools/tables/editor-delete-column-button.directive.d.ts +2 -1
  124. package/dist/es2015/tools/tables/editor-delete-column-button.directive.js +5 -3
  125. package/dist/es2015/tools/tables/editor-delete-row-button.directive.d.ts +2 -1
  126. package/dist/es2015/tools/tables/editor-delete-row-button.directive.js +5 -3
  127. package/dist/es2015/tools/tables/editor-delete-table-button.directive.d.ts +2 -1
  128. package/dist/es2015/tools/tables/editor-delete-table-button.directive.js +5 -3
  129. package/dist/es2015/tools/tables/editor-merge-cells-button.directive.d.ts +2 -1
  130. package/dist/es2015/tools/tables/editor-merge-cells-button.directive.js +5 -3
  131. package/dist/es2015/tools/tables/editor-split-cell-button.directive.d.ts +2 -1
  132. package/dist/es2015/tools/tables/editor-split-cell-button.directive.js +5 -3
  133. package/dist/es2015/tools/tools.service.d.ts +11 -0
  134. package/dist/es2015/tools/tools.service.js +22 -0
  135. package/dist/es2015/tools/typographical-emphasis/editor-bold-button.directive.d.ts +2 -1
  136. package/dist/es2015/tools/typographical-emphasis/editor-bold-button.directive.js +5 -3
  137. package/dist/es2015/tools/typographical-emphasis/editor-italic-button.directive.d.ts +2 -1
  138. package/dist/es2015/tools/typographical-emphasis/editor-italic-button.directive.js +5 -3
  139. package/dist/es2015/tools/typographical-emphasis/editor-strikethrough-button.directive.d.ts +2 -1
  140. package/dist/es2015/tools/typographical-emphasis/editor-strikethrough-button.directive.js +5 -3
  141. package/dist/es2015/tools/typographical-emphasis/editor-subscript-button.directive.d.ts +2 -1
  142. package/dist/es2015/tools/typographical-emphasis/editor-subscript-button.directive.js +5 -3
  143. package/dist/es2015/tools/typographical-emphasis/editor-superscript-button.directive.d.ts +2 -1
  144. package/dist/es2015/tools/typographical-emphasis/editor-superscript-button.directive.js +5 -3
  145. package/dist/es2015/tools/typographical-emphasis/editor-underline-button.directive.d.ts +2 -1
  146. package/dist/es2015/tools/typographical-emphasis/editor-underline-button.directive.js +5 -3
  147. package/dist/fesm2015/index.js +358 -159
  148. package/dist/fesm5/index.js +360 -162
  149. package/dist/npm/common/error-messages.js +2 -1
  150. package/dist/npm/config/command-icons.js +4 -2
  151. package/dist/npm/config/commands.js +33 -31
  152. package/dist/npm/editor-toolbar-state.js +20 -2
  153. package/dist/npm/editor.component.js +11 -5
  154. package/dist/npm/editor.module.js +7 -1
  155. package/dist/npm/index.js +6 -0
  156. package/dist/npm/localization/messages.js +8 -0
  157. package/dist/npm/package-metadata.js +1 -1
  158. package/dist/npm/tools/alignment/editor-align-center-button.directive.js +5 -3
  159. package/dist/npm/tools/alignment/editor-align-justify-button.directive.js +5 -3
  160. package/dist/npm/tools/alignment/editor-align-left-button.directive.js +5 -3
  161. package/dist/npm/tools/alignment/editor-align-right-button.directive.js +5 -3
  162. package/dist/npm/tools/editor-clean-formatting-button.directive.js +5 -3
  163. package/dist/npm/tools/fontfamily/editor-fontfamily.component.js +9 -3
  164. package/dist/npm/tools/fontsize/editor-fontsize.component.js +9 -3
  165. package/dist/npm/tools/format/editor-format.component.js +9 -3
  166. package/dist/npm/tools/history/editor-redo-button.directive.js +5 -3
  167. package/dist/npm/tools/history/editor-undo-button.directive.js +5 -3
  168. package/dist/npm/tools/image/editor-insert-image-button.directive.js +5 -3
  169. package/dist/npm/tools/indentation/editor-indent-button.directive.js +5 -3
  170. package/dist/npm/tools/indentation/editor-outdent-button.directive.js +5 -3
  171. package/dist/npm/tools/link/editor-create-link-button.directive.js +5 -3
  172. package/dist/npm/tools/link/editor-insert-file-button.directive.js +5 -3
  173. package/dist/npm/tools/link/editor-unlink-button.directive.js +5 -3
  174. package/dist/npm/tools/list/editor-insert-ordered-list-button.directive.js +5 -3
  175. package/dist/npm/tools/list/editor-insert-unordered-list-button.directive.js +5 -3
  176. package/dist/npm/tools/print/editor-print-button.directive.js +71 -0
  177. package/dist/npm/tools/select-all/select-all-button.directive.js +52 -0
  178. package/dist/npm/tools/shared/editor-command-base.js +13 -11
  179. package/dist/npm/tools/shared/editor-command-button.js +3 -2
  180. package/dist/npm/tools/shared/editor-command-dialog.js +3 -2
  181. package/dist/npm/tools/source/editor-view-source-button.directive.js +5 -3
  182. package/dist/npm/tools/tables/editor-add-column-after-button.directive.js +5 -3
  183. package/dist/npm/tools/tables/editor-add-column-before-button.directive.js +5 -3
  184. package/dist/npm/tools/tables/editor-add-row-after-button.directive.js +5 -3
  185. package/dist/npm/tools/tables/editor-add-row-before-button.directive.js +5 -3
  186. package/dist/npm/tools/tables/editor-delete-column-button.directive.js +5 -3
  187. package/dist/npm/tools/tables/editor-delete-row-button.directive.js +5 -3
  188. package/dist/npm/tools/tables/editor-delete-table-button.directive.js +5 -3
  189. package/dist/npm/tools/tables/editor-merge-cells-button.directive.js +5 -3
  190. package/dist/npm/tools/tables/editor-split-cell-button.directive.js +5 -3
  191. package/dist/npm/tools/tools.service.js +22 -0
  192. package/dist/npm/tools/typographical-emphasis/editor-bold-button.directive.js +5 -3
  193. package/dist/npm/tools/typographical-emphasis/editor-italic-button.directive.js +5 -3
  194. package/dist/npm/tools/typographical-emphasis/editor-strikethrough-button.directive.js +5 -3
  195. package/dist/npm/tools/typographical-emphasis/editor-subscript-button.directive.js +5 -3
  196. package/dist/npm/tools/typographical-emphasis/editor-superscript-button.directive.js +5 -3
  197. package/dist/npm/tools/typographical-emphasis/editor-underline-button.directive.js +5 -3
  198. package/dist/systemjs/kendo-angular-editor.js +1 -1
  199. package/package.json +4 -4
@@ -3,14 +3,14 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { __decorate, __param, __metadata } from 'tslib';
6
- import { Inject, Optional, Input, ViewChild, ElementRef, Component, EventEmitter, isDevMode, Output, HostBinding, ContentChild, ViewContainerRef, forwardRef, ChangeDetectorRef, NgZone, TemplateRef, Host, Directive, NgModule } from '@angular/core';
6
+ import { Inject, Optional, Input, ViewChild, ElementRef, Component, Injectable, EventEmitter, isDevMode, Output, HostBinding, ContentChild, ViewContainerRef, forwardRef, ChangeDetectorRef, NgZone, TemplateRef, Host, Directive, NgModule } from '@angular/core';
7
7
  import { FormControl, Validators, FormGroup, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
8
- import { BehaviorSubject, Subject, zip, fromEvent, merge, interval } from 'rxjs';
8
+ import { Subject, BehaviorSubject, zip, fromEvent, merge, interval } from 'rxjs';
9
9
  import { take, filter, auditTime, map, concatMap, takeUntil } from 'rxjs/operators';
10
10
  import { ToolBarComponent, ToolBarToolComponent, ToolBarButtonComponent, ToolBarModule } from '@progress/kendo-angular-toolbar';
11
11
  import { DialogContentBase, DialogRef, DialogService, DialogModule } from '@progress/kendo-angular-dialog';
12
12
  import { isDocumentAvailable, guid, KendoInput, Keys } from '@progress/kendo-angular-common';
13
- import { nodes, Schema, marks, Selection, SelectionRange, TextSelection, Fragment, Slice, NodeSelection, insertNode, expandToWordWrap, toggleInlineFormat, bold, cleanFormatting, applyLink, applyInlineStyle, insertText, italic, strikethrough, subscript, superscript, underline, removeLink, link, isAligned, alignCenterRules, alignBlocks, alignRemoveRules, alignJustifyRules, alignLeftRules, alignRightRules, formatBlockElements, getHtml, indent, insertImage, toggleOrderedList, toggleUnorderedList, outdent, redo, setHtml, undo, hasMark, activeNode, canIndentAsListItem, canBeIndented, indentRules, hasNode, canOutdentAsListItem, outdentRules, getActiveMarks, expandSelection, addColumnBefore, addColumnAfter, addRowBefore, addRowAfter, deleteRow, deleteColumn, mergeCells, splitCell, deleteTable, getNodeFromSelection, getMark, getSelectionText, parseContent, Plugin, PluginKey, history, keymap, buildListKeymap, buildKeymap, baseKeymap, gapCursor, imageResizing, placeholder, EditorState, EditorView, hasSameMarkup, pasteCleanup, removeComments, sanitize, removeAttribute, sanitizeStyleAttr, sanitizeClassAttr } from '@progress/kendo-editor-common';
13
+ import { nodes, Schema, marks, Selection, SelectionRange, TextSelection, Fragment, Slice, NodeSelection, insertNode, expandToWordWrap, toggleInlineFormat, bold, cleanFormatting, applyLink, applyInlineStyle, insertText, italic, strikethrough, subscript, superscript, underline, removeLink, link, selectAll, isAligned, alignCenterRules, alignBlocks, alignRemoveRules, alignJustifyRules, alignLeftRules, alignRightRules, formatBlockElements, getHtml, indent, insertImage, toggleOrderedList, toggleUnorderedList, outdent, redo, setHtml, undo, hasMark, activeNode, canIndentAsListItem, canBeIndented, indentRules, hasNode, canOutdentAsListItem, outdentRules, getActiveMarks, expandSelection, addColumnBefore, addColumnAfter, addRowBefore, addRowAfter, deleteRow, deleteColumn, mergeCells, splitCell, deleteTable, getNodeFromSelection, getMark, getSelectionText, parseContent, Plugin, PluginKey, history, keymap, buildListKeymap, buildKeymap, baseKeymap, gapCursor, imageResizing, placeholder, EditorState, EditorView, hasSameMarkup, pasteCleanup, removeComments, sanitize, removeAttribute, sanitizeStyleAttr, sanitizeClassAttr } from '@progress/kendo-editor-common';
14
14
  export { Schema, EditorState, Plugin, PluginKey, Transaction, EditorView, Decoration, DecorationSet, NodeType, Node, MarkType, Mark, InputRule, inputRules, wrappingInputRule, textblockTypeInputRule, keymap, baseKeymap, history, dropCursor, gapCursor, tableNodes, getSelectionText } from '@progress/kendo-editor-common';
15
15
  import { validatePackage } from '@progress/kendo-licensing';
16
16
  import { LocalizationService, L10N_PREFIX, RTL, MessageService, ComponentMessages } from '@progress/kendo-angular-l10n';
@@ -27,7 +27,7 @@ const packageMetadata = {
27
27
  name: '@progress/kendo-angular-editor',
28
28
  productName: 'Kendo UI for Angular',
29
29
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
30
- publishDate: 1637061495,
30
+ publishDate: 1638192544,
31
31
  version: '',
32
32
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
33
33
  };
@@ -1607,7 +1607,7 @@ const deleteTableElement = (selector) => (state, dispatch) => {
1607
1607
  const deleteTable$1 = deleteTableElement(isTable);
1608
1608
 
1609
1609
  const alignRemove = (state, dispatch) => alignBlocks(alignRemoveRules)(state, dispatch);
1610
- const ɵ1$5 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, bold, { applyToWord })), ɵ2$4 = (options) => cleanFormatting(options), ɵ3$4 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs.value, applyToWord: attrs.applyToWord }), ɵ4$2 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-family', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ5$2 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-size', value: attrs.value + 'px', applyToWord: attrs.applyToWord }), ɵ6$1 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs, applyToWord: attrs.applyToWord }), ɵ7$1 = text => insertText(text), ɵ8$1 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, italic, { applyToWord })), ɵ9$1 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, strikethrough, { applyToWord })), ɵ10 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, subscript, { applyToWord })), ɵ11 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, superscript, { applyToWord })), ɵ12 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, underline, { applyToWord })), ɵ13 = () => removeLink(link), ɵ14 = attrs => expandToWordWrap(applyInlineStyle, { style: 'color', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ15 = attrs => expandToWordWrap(applyInlineStyle, { style: 'background-color', value: attrs.value, applyToWord: attrs.applyToWord });
1610
+ const ɵ1$5 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, bold, { applyToWord })), ɵ2$4 = (options) => cleanFormatting(options), ɵ3$4 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs.value, applyToWord: attrs.applyToWord }), ɵ4$2 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-family', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ5$2 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-size', value: attrs.value + 'px', applyToWord: attrs.applyToWord }), ɵ6$1 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs, applyToWord: attrs.applyToWord }), ɵ7$1 = text => insertText(text), ɵ8$1 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, italic, { applyToWord })), ɵ9$1 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, strikethrough, { applyToWord })), ɵ10 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, subscript, { applyToWord })), ɵ11 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, superscript, { applyToWord })), ɵ12 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, underline, { applyToWord })), ɵ13 = () => removeLink(link), ɵ14 = attrs => expandToWordWrap(applyInlineStyle, { style: 'color', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ15 = attrs => expandToWordWrap(applyInlineStyle, { style: 'background-color', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ16 = () => (state, dispatch) => selectAll(state, dispatch);
1611
1611
  const inlineCommand = {
1612
1612
  bold: ɵ1$5,
1613
1613
  cleanFormatting: ɵ2$4,
@@ -1623,39 +1623,40 @@ const inlineCommand = {
1623
1623
  underline: ɵ12,
1624
1624
  unlink: ɵ13,
1625
1625
  foreColor: ɵ14,
1626
- backColor: ɵ15
1626
+ backColor: ɵ15,
1627
+ selectAll: ɵ16
1627
1628
  };
1628
- const ɵ16 = () => (state, dispatch) => isAligned(state, alignCenterRules) ? alignRemove(state, dispatch) : alignBlocks(alignCenterRules)(state, dispatch), ɵ17 = () => (state, dispatch) => isAligned(state, alignJustifyRules) ? alignRemove(state, dispatch) : alignBlocks(alignJustifyRules)(state, dispatch), ɵ18 = () => (state, dispatch) => isAligned(state, alignLeftRules) ? alignRemove(state, dispatch) : alignBlocks(alignLeftRules)(state, dispatch), ɵ19 = () => (state, dispatch) => isAligned(state, alignRightRules) ? alignRemove(state, dispatch) : alignBlocks(alignRightRules)(state, dispatch), ɵ20 = formatAttr => formatBlockElements(formatAttr.tag), ɵ21 = () => getHtml, ɵ22 = () => indent, ɵ23 = attrs => insertImage(attrs), ɵ24 = () => toggleOrderedList, ɵ25 = () => toggleUnorderedList, ɵ26 = () => outdent, ɵ27 = () => redo, ɵ28 = ({ content, parseOptions }) => setHtml(content, 'setHTML', parseOptions), ɵ29 = () => undo;
1629
+ const ɵ17 = () => (state, dispatch) => isAligned(state, alignCenterRules) ? alignRemove(state, dispatch) : alignBlocks(alignCenterRules)(state, dispatch), ɵ18 = () => (state, dispatch) => isAligned(state, alignJustifyRules) ? alignRemove(state, dispatch) : alignBlocks(alignJustifyRules)(state, dispatch), ɵ19 = () => (state, dispatch) => isAligned(state, alignLeftRules) ? alignRemove(state, dispatch) : alignBlocks(alignLeftRules)(state, dispatch), ɵ20 = () => (state, dispatch) => isAligned(state, alignRightRules) ? alignRemove(state, dispatch) : alignBlocks(alignRightRules)(state, dispatch), ɵ21 = formatAttr => formatBlockElements(formatAttr.tag), ɵ22 = () => getHtml, ɵ23 = () => indent, ɵ24 = attrs => insertImage(attrs), ɵ25 = () => toggleOrderedList, ɵ26 = () => toggleUnorderedList, ɵ27 = () => outdent, ɵ28 = () => redo, ɵ29 = ({ content, parseOptions }) => setHtml(content, 'setHTML', parseOptions), ɵ30 = () => undo;
1629
1630
  const blockCommand = {
1630
- alignCenter: ɵ16,
1631
- alignJustify: ɵ17,
1632
- alignLeft: ɵ18,
1633
- alignRight: ɵ19,
1634
- format: ɵ20,
1635
- getHTML: ɵ21,
1636
- indent: ɵ22,
1637
- insertImage: ɵ23,
1631
+ alignCenter: ɵ17,
1632
+ alignJustify: ɵ18,
1633
+ alignLeft: ɵ19,
1634
+ alignRight: ɵ20,
1635
+ format: ɵ21,
1636
+ getHTML: ɵ22,
1637
+ indent: ɵ23,
1638
+ insertImage: ɵ24,
1638
1639
  // think about changing the command name.
1639
- insertOrderedList: ɵ24,
1640
+ insertOrderedList: ɵ25,
1640
1641
  // think about changing the command name.
1641
- insertUnorderedList: ɵ25,
1642
- outdent: ɵ26,
1643
- redo: ɵ27,
1644
- setHTML: ɵ28,
1645
- undo: ɵ29
1642
+ insertUnorderedList: ɵ26,
1643
+ outdent: ɵ27,
1644
+ redo: ɵ28,
1645
+ setHTML: ɵ29,
1646
+ undo: ɵ30
1646
1647
  };
1647
- const ɵ30 = attr => insertTable(attr), ɵ31 = () => addColumnBefore$1, ɵ32 = () => addColumnAfter$1, ɵ33 = () => addRowBefore$1, ɵ34 = () => addRowAfter$1, ɵ35 = () => deleteRow$1, ɵ36 = () => deleteColumn$1, ɵ37 = () => mergeCells$1, ɵ38 = () => splitCell$1, ɵ39 = () => deleteTable$1;
1648
+ const ɵ31 = attr => insertTable(attr), ɵ32 = () => addColumnBefore$1, ɵ33 = () => addColumnAfter$1, ɵ34 = () => addRowBefore$1, ɵ35 = () => addRowAfter$1, ɵ36 = () => deleteRow$1, ɵ37 = () => deleteColumn$1, ɵ38 = () => mergeCells$1, ɵ39 = () => splitCell$1, ɵ40 = () => deleteTable$1;
1648
1649
  const tableCommand = {
1649
- insertTable: ɵ30,
1650
- addColumnBefore: ɵ31,
1651
- addColumnAfter: ɵ32,
1652
- addRowBefore: ɵ33,
1653
- addRowAfter: ɵ34,
1654
- deleteRow: ɵ35,
1655
- deleteColumn: ɵ36,
1656
- mergeCells: ɵ37,
1657
- splitCell: ɵ38,
1658
- deleteTable: ɵ39
1650
+ insertTable: ɵ31,
1651
+ addColumnBefore: ɵ32,
1652
+ addColumnAfter: ɵ33,
1653
+ addRowBefore: ɵ34,
1654
+ addRowAfter: ɵ35,
1655
+ deleteRow: ɵ36,
1656
+ deleteColumn: ɵ37,
1657
+ mergeCells: ɵ38,
1658
+ splitCell: ɵ39,
1659
+ deleteTable: ɵ40
1659
1660
  };
1660
1661
  /**
1661
1662
  * @hidden
@@ -1722,6 +1723,10 @@ const getToolbarState = (state, options) => ({
1722
1723
  selected: false,
1723
1724
  disabled: !redo(state)
1724
1725
  },
1726
+ selectAll: {
1727
+ selected: false,
1728
+ disabled: false
1729
+ },
1725
1730
  strikethrough: {
1726
1731
  selected: hasMark(state, strikethrough),
1727
1732
  disabled: false
@@ -1771,6 +1776,12 @@ const getToolbarState = (state, options) => ({
1771
1776
  selected: false,
1772
1777
  disabled: false
1773
1778
  },
1779
+ // print
1780
+ print: {
1781
+ selected: false,
1782
+ disabled: false
1783
+ },
1784
+ // table
1774
1785
  insertTable: {
1775
1786
  selected: false,
1776
1787
  disabled: false
@@ -1843,6 +1854,8 @@ const initialToolBarState = {
1843
1854
  //history
1844
1855
  redo: { selected: false, disabled: true },
1845
1856
  undo: { selected: false, disabled: true },
1857
+ // print
1858
+ print: { selected: false, disabled: false },
1846
1859
  //dialogs
1847
1860
  createLink: { selected: false, disabled: true },
1848
1861
  insertFile: { selected: false, disabled: true },
@@ -1858,7 +1871,9 @@ const initialToolBarState = {
1858
1871
  deleteColumn: { selected: false, disabled: true },
1859
1872
  mergeCells: { selected: false, disabled: true },
1860
1873
  splitCell: { selected: false, disabled: true },
1861
- deleteTable: { selected: false, disabled: true }
1874
+ deleteTable: { selected: false, disabled: true },
1875
+ // select all
1876
+ selectAll: { selected: false, disabled: false }
1862
1877
  };
1863
1878
  /**
1864
1879
  * @hidden
@@ -1891,6 +1906,8 @@ const disabledToolBarState = {
1891
1906
  //history
1892
1907
  redo: { selected: false, disabled: true },
1893
1908
  undo: { selected: false, disabled: true },
1909
+ // print
1910
+ print: { selected: false, disabled: true },
1894
1911
  //dialogs
1895
1912
  createLink: { selected: false, disabled: true },
1896
1913
  insertFile: { selected: false, disabled: true },
@@ -1906,7 +1923,9 @@ const disabledToolBarState = {
1906
1923
  deleteColumn: { selected: false, disabled: true },
1907
1924
  mergeCells: { selected: false, disabled: true },
1908
1925
  splitCell: { selected: false, disabled: true },
1909
- deleteTable: { selected: false, disabled: true }
1926
+ deleteTable: { selected: false, disabled: true },
1927
+ // select all
1928
+ selectAll: { selected: false, disabled: true }
1910
1929
  };
1911
1930
 
1912
1931
  /**
@@ -2524,9 +2543,25 @@ const EditorErrorMessages = {
2524
2543
  setSchemaOnce: 'The Schema cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/schema/',
2525
2544
  pluginsCallbackType: ɵ0$6,
2526
2545
  setPluginsOnce: 'The plugins cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/plugins/',
2527
- setPlaceHolderOnce: 'The placeholder cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/placeholder/'
2546
+ setPlaceHolderOnce: 'The placeholder cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/placeholder/',
2547
+ printTool: 'The Print tool and functionality are supported only in iframe mode. See https://www.telerik.com/kendo-angular-ui-develop/components/editor/api/EditorPrintButtonDirective/'
2528
2548
  };
2529
2549
 
2550
+ /**
2551
+ * @hidden
2552
+ */
2553
+ let EditorToolsService = class EditorToolsService {
2554
+ /**
2555
+ * @hidden
2556
+ */
2557
+ constructor() {
2558
+ this.needsCheck = new Subject();
2559
+ }
2560
+ };
2561
+ EditorToolsService = __decorate([
2562
+ Injectable()
2563
+ ], EditorToolsService);
2564
+
2530
2565
  var EditorComponent_1;
2531
2566
  const EMPTY_PARAGRAPH = '<p></p>';
2532
2567
  const defaultPasteCleanupSettings = {
@@ -2554,15 +2589,17 @@ const getPasteCleanupAttributes = (config) => {
2554
2589
  * Represents the [Kendo UI Editor component for Angular]({% slug overview_editor %}).
2555
2590
  */
2556
2591
  let EditorComponent = EditorComponent_1 = class EditorComponent {
2557
- constructor(dialogService, localization, cdr, ngZone, element) {
2592
+ constructor(dialogService, localization, cdr, ngZone, element, toolsService) {
2558
2593
  this.dialogService = dialogService;
2559
2594
  this.localization = localization;
2560
2595
  this.cdr = cdr;
2561
2596
  this.ngZone = ngZone;
2562
2597
  this.element = element;
2598
+ this.toolsService = toolsService;
2563
2599
  /**
2564
2600
  * If set to `false`, the Editor will run in style non-encapsulated mode. This means
2565
2601
  * that the styles of the page will be persisted in the Editor and its content will be affected by them.
2602
+ * @default true
2566
2603
  */
2567
2604
  this.iframe = true;
2568
2605
  /**
@@ -2827,6 +2864,7 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
2827
2864
  this.subs.add(this.localization.changes.subscribe(({ rtl }) => {
2828
2865
  this.direction = rtl ? 'rtl' : 'ltr';
2829
2866
  }));
2867
+ this.subs.add(this.toolsService.needsCheck.subscribe(() => this.cdr.markForCheck()));
2830
2868
  }
2831
2869
  ngAfterViewInit() {
2832
2870
  this.afterViewInit.next();
@@ -2979,7 +3017,6 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
2979
3017
  * Manually focus the Editor.
2980
3018
  */
2981
3019
  focus() {
2982
- // this.focusChangedProgrammatically = true;
2983
3020
  this.focusChangedProgrammatically = true;
2984
3021
  this._view.focus();
2985
3022
  this.focusChangedProgrammatically = false;
@@ -3150,8 +3187,9 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
3150
3187
  if (this.readonly) {
3151
3188
  contentAreaClasslist.add('k-state-focused');
3152
3189
  }
3153
- if (!this.focusChangedProgrammatically) {
3190
+ if (!this.focusChangedProgrammatically || this.shouldEmitFocus) {
3154
3191
  this.ngZone.run(() => this.onFocus.emit());
3192
+ this.shouldEmitFocus = false;
3155
3193
  }
3156
3194
  }));
3157
3195
  this.subs.add(fromEvent(containerElement, 'focusout')
@@ -3376,6 +3414,7 @@ EditorComponent = EditorComponent_1 = __decorate([
3376
3414
  selector: 'kendo-editor',
3377
3415
  providers: [
3378
3416
  EditorLocalizationService,
3417
+ EditorToolsService,
3379
3418
  {
3380
3419
  provide: LocalizationService,
3381
3420
  useExisting: EditorLocalizationService
@@ -3466,8 +3505,12 @@ EditorComponent = EditorComponent_1 = __decorate([
3466
3505
  linkWebAddress="Web address"
3467
3506
  i18n-outdent="kendo.editor.outdent|The title of the tool that outdents the content."
3468
3507
  outdent="Outdent"
3508
+ i18n-print="kendo.editor.print|The title of the print tool."
3509
+ print="Print"
3469
3510
  i18n-redo="kendo.editor.redo|The title of the tool that undos the last action."
3470
3511
  redo="Redo"
3512
+ i18n-selectAll="kendo.editor.selectAll|The title of the tool that selects all content."
3513
+ selectAll="Select All"
3471
3514
  i18n-strikethrough="kendo.editor.strikethrough|The title of the tool that strikes through text."
3472
3515
  strikethrough="Strikethrough"
3473
3516
  i18n-subscript="kendo.editor.subscript|The title of the tool that makes text subscript."
@@ -3558,7 +3601,8 @@ EditorComponent = EditorComponent_1 = __decorate([
3558
3601
  LocalizationService,
3559
3602
  ChangeDetectorRef,
3560
3603
  NgZone,
3561
- ElementRef])
3604
+ ElementRef,
3605
+ EditorToolsService])
3562
3606
  ], EditorComponent);
3563
3607
 
3564
3608
  /**
@@ -4060,11 +4104,12 @@ var EditorFormatComponent_1;
4060
4104
  * ```
4061
4105
  */
4062
4106
  let EditorFormatComponent = EditorFormatComponent_1 = class EditorFormatComponent extends ToolBarToolComponent {
4063
- constructor(editor, dialogService, localization) {
4107
+ constructor(editor, dialogService, localization, toolsService) {
4064
4108
  super();
4065
4109
  this.editor = editor;
4066
4110
  this.dialogService = dialogService;
4067
4111
  this.localization = localization;
4112
+ this.toolsService = toolsService;
4068
4113
  this.disabled = false;
4069
4114
  this.tabindex = -1;
4070
4115
  /**
@@ -4100,7 +4145,10 @@ let EditorFormatComponent = EditorFormatComponent_1 = class EditorFormatComponen
4100
4145
  return itemArgs.dataItem.tag === null;
4101
4146
  }
4102
4147
  };
4103
- setTimeout(() => (this.defaultItem = { text: this.title, tag: null }));
4148
+ setTimeout(() => {
4149
+ this.defaultItem = { text: this.title, tag: null };
4150
+ this.toolsService.needsCheck.next();
4151
+ });
4104
4152
  this.subs = this.editor.stateChange.subscribe(({ format }) => {
4105
4153
  const index = this.data.findIndex(item => item.tag === format.selected.tag);
4106
4154
  this.value = index !== -1 ? format.selected.tag : null;
@@ -4241,7 +4289,8 @@ EditorFormatComponent = EditorFormatComponent_1 = __decorate([
4241
4289
  __param(0, Host()),
4242
4290
  __metadata("design:paramtypes", [EditorComponent,
4243
4291
  DialogService,
4244
- EditorLocalizationService])
4292
+ EditorLocalizationService,
4293
+ EditorToolsService])
4245
4294
  ], EditorFormatComponent);
4246
4295
 
4247
4296
  /**
@@ -4413,11 +4462,12 @@ var EditorFontSizeComponent_1;
4413
4462
  * ```
4414
4463
  */
4415
4464
  let EditorFontSizeComponent = EditorFontSizeComponent_1 = class EditorFontSizeComponent extends ToolBarToolComponent {
4416
- constructor(editor, dialogService, localization) {
4465
+ constructor(editor, dialogService, localization, toolsService) {
4417
4466
  super();
4418
4467
  this.editor = editor;
4419
4468
  this.dialogService = dialogService;
4420
4469
  this.localization = localization;
4470
+ this.toolsService = toolsService;
4421
4471
  this.disabled = false;
4422
4472
  this.tabindex = -1;
4423
4473
  /**
@@ -4452,7 +4502,10 @@ let EditorFontSizeComponent = EditorFontSizeComponent_1 = class EditorFontSizeCo
4452
4502
  return itemArgs.dataItem.size === null;
4453
4503
  }
4454
4504
  };
4455
- setTimeout(() => (this.defaultItem = { text: this.title, size: null }));
4505
+ setTimeout(() => {
4506
+ this.defaultItem = { text: this.title, size: null };
4507
+ this.toolsService.needsCheck.next();
4508
+ });
4456
4509
  this.subs = this.editor.stateChange.subscribe(({ style }) => {
4457
4510
  // remove units(px, em, rem...)
4458
4511
  // string#match returns array
@@ -4597,7 +4650,8 @@ EditorFontSizeComponent = EditorFontSizeComponent_1 = __decorate([
4597
4650
  __param(0, Host()),
4598
4651
  __metadata("design:paramtypes", [EditorComponent,
4599
4652
  DialogService,
4600
- EditorLocalizationService])
4653
+ EditorLocalizationService,
4654
+ EditorToolsService])
4601
4655
  ], EditorFontSizeComponent);
4602
4656
 
4603
4657
  var EditorFontFamilyComponent_1;
@@ -4613,11 +4667,12 @@ var EditorFontFamilyComponent_1;
4613
4667
  * ```
4614
4668
  */
4615
4669
  let EditorFontFamilyComponent = EditorFontFamilyComponent_1 = class EditorFontFamilyComponent extends ToolBarToolComponent {
4616
- constructor(editor, dialogService, localization) {
4670
+ constructor(editor, dialogService, localization, toolsService) {
4617
4671
  super();
4618
4672
  this.editor = editor;
4619
4673
  this.dialogService = dialogService;
4620
4674
  this.localization = localization;
4675
+ this.toolsService = toolsService;
4621
4676
  this.disabled = false;
4622
4677
  this.tabindex = -1;
4623
4678
  /**
@@ -4659,7 +4714,10 @@ let EditorFontFamilyComponent = EditorFontFamilyComponent_1 = class EditorFontFa
4659
4714
  return itemArgs.dataItem.fontName === null;
4660
4715
  }
4661
4716
  };
4662
- setTimeout(() => (this.defaultItem = { text: this.title, fontName: null }));
4717
+ setTimeout(() => {
4718
+ this.defaultItem = { text: this.title, fontName: null };
4719
+ this.toolsService.needsCheck.next();
4720
+ });
4663
4721
  this.subs = this.editor.stateChange.subscribe(({ style }) => {
4664
4722
  this.value = getUniqueStyleValues(style.selected, 'font-family') || null;
4665
4723
  this.disabled = style.disabled;
@@ -4802,7 +4860,8 @@ EditorFontFamilyComponent = EditorFontFamilyComponent_1 = __decorate([
4802
4860
  __param(0, Host()),
4803
4861
  __metadata("design:paramtypes", [EditorComponent,
4804
4862
  DialogService,
4805
- EditorLocalizationService])
4863
+ EditorLocalizationService,
4864
+ EditorToolsService])
4806
4865
  ], EditorFontFamilyComponent);
4807
4866
 
4808
4867
  // tslint:disable:no-forward-ref
@@ -5304,9 +5363,11 @@ const commandIcons = {
5304
5363
  alignJustify: 'align-justify',
5305
5364
  alignLeft: 'align-left',
5306
5365
  alignRight: 'align-right',
5366
+ backColor: 'background',
5307
5367
  bold: 'bold',
5308
5368
  cleanFormatting: 'clear-css',
5309
5369
  createLink: 'link-horizontal',
5370
+ foreColor: 'foreground-color',
5310
5371
  indent: 'indent-increase',
5311
5372
  insertFile: 'file-add',
5312
5373
  insertImage: 'image',
@@ -5314,7 +5375,9 @@ const commandIcons = {
5314
5375
  insertUnorderedList: 'list-unordered',
5315
5376
  italic: 'italic',
5316
5377
  outdent: 'indent-decrease',
5378
+ print: 'print',
5317
5379
  redo: 'redo',
5380
+ selectAll: 'select-all',
5318
5381
  strikethrough: 'strikethrough',
5319
5382
  subscript: 'sub-script',
5320
5383
  superscript: 'sup-script',
@@ -5322,8 +5385,6 @@ const commandIcons = {
5322
5385
  undo: 'undo',
5323
5386
  unlink: 'unlink-horizontal',
5324
5387
  viewSource: 'html',
5325
- foreColor: 'foreground-color',
5326
- backColor: 'background',
5327
5388
  //table
5328
5389
  insertTable: 'table-insert',
5329
5390
  addColumnBefore: 'table-column-insert-left',
@@ -5342,29 +5403,31 @@ const commandIcons = {
5342
5403
  * @hidden
5343
5404
  */
5344
5405
  class EditorCommandBase {
5345
- constructor(command, button, editor, localization) {
5406
+ constructor(command, button, editor, localization, toolsService) {
5346
5407
  this.command = command;
5347
5408
  this.button = button;
5348
5409
  this.editor = editor;
5349
5410
  this.localization = localization;
5350
- }
5351
- ngOnInit() {
5352
- this.subs = this.editor.stateChange.subscribe(this.onStateChange.bind(this));
5353
- this.subs.add(this.button.click.subscribe((this.clickHandler.bind(this))));
5354
- this.subs.add(this.button.pointerdown.subscribe((this.pointerdownHandler.bind(this))));
5355
- Promise.resolve(null).then(() => {
5411
+ this.toolsService = toolsService;
5412
+ setTimeout(() => {
5356
5413
  const text = this.localization.get(this.command);
5357
5414
  if (text) {
5358
- this.button.showText = "overflow";
5359
- this.button.showIcon = "both";
5415
+ this.button.showText = 'overflow';
5416
+ this.button.showIcon = 'both';
5360
5417
  this.button.text = text;
5361
5418
  }
5362
- if (!this.button.icon) {
5419
+ if (!this.button.toolbarOptions.icon) {
5363
5420
  this.button.icon = commandIcons[this.command];
5364
5421
  }
5365
5422
  this.button.title = text;
5423
+ this.toolsService.needsCheck.next();
5366
5424
  });
5367
5425
  }
5426
+ ngOnInit() {
5427
+ this.subs = this.editor.stateChange.subscribe(this.onStateChange.bind(this));
5428
+ this.subs.add(this.button.click.subscribe((this.clickHandler.bind(this))));
5429
+ this.subs.add(this.button.pointerdown.subscribe((this.pointerdownHandler.bind(this))));
5430
+ }
5368
5431
  ngOnDestroy() {
5369
5432
  if (this.subs) {
5370
5433
  this.subs.unsubscribe();
@@ -5382,12 +5445,13 @@ class EditorCommandBase {
5382
5445
  * @hidden
5383
5446
  */
5384
5447
  class EditorCommandButton extends EditorCommandBase {
5385
- constructor(command, button, editor, localization) {
5386
- super(command, button, editor, localization);
5448
+ constructor(command, button, editor, localization, toolsService) {
5449
+ super(command, button, editor, localization, toolsService);
5387
5450
  this.command = command;
5388
5451
  this.button = button;
5389
5452
  this.editor = editor;
5390
5453
  this.localization = localization;
5454
+ this.toolsService = toolsService;
5391
5455
  }
5392
5456
  clickHandler() {
5393
5457
  this.editor.exec(this.command, this.editor.applyToWord);
@@ -5421,8 +5485,8 @@ class EditorCommandButton extends EditorCommandBase {
5421
5485
  * ```
5422
5486
  */
5423
5487
  let EditorAlignLeftButtonDirective = class EditorAlignLeftButtonDirective extends EditorCommandButton {
5424
- constructor(button, editor, localization) {
5425
- super('alignLeft', button, editor, localization);
5488
+ constructor(button, editor, localization, toolsService) {
5489
+ super('alignLeft', button, editor, localization, toolsService);
5426
5490
  }
5427
5491
  };
5428
5492
  EditorAlignLeftButtonDirective = __decorate([
@@ -5432,7 +5496,8 @@ EditorAlignLeftButtonDirective = __decorate([
5432
5496
  __param(1, Host()),
5433
5497
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5434
5498
  EditorComponent,
5435
- EditorLocalizationService])
5499
+ EditorLocalizationService,
5500
+ EditorToolsService])
5436
5501
  ], EditorAlignLeftButtonDirective);
5437
5502
 
5438
5503
  /**
@@ -5454,8 +5519,8 @@ EditorAlignLeftButtonDirective = __decorate([
5454
5519
  * ```
5455
5520
  */
5456
5521
  let EditorAlignCenterButtonDirective = class EditorAlignCenterButtonDirective extends EditorCommandButton {
5457
- constructor(button, editor, localization) {
5458
- super('alignCenter', button, editor, localization);
5522
+ constructor(button, editor, localization, toolsService) {
5523
+ super('alignCenter', button, editor, localization, toolsService);
5459
5524
  }
5460
5525
  };
5461
5526
  EditorAlignCenterButtonDirective = __decorate([
@@ -5465,7 +5530,8 @@ EditorAlignCenterButtonDirective = __decorate([
5465
5530
  __param(1, Host()),
5466
5531
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5467
5532
  EditorComponent,
5468
- EditorLocalizationService])
5533
+ EditorLocalizationService,
5534
+ EditorToolsService])
5469
5535
  ], EditorAlignCenterButtonDirective);
5470
5536
 
5471
5537
  /**
@@ -5487,8 +5553,8 @@ EditorAlignCenterButtonDirective = __decorate([
5487
5553
  * ```
5488
5554
  */
5489
5555
  let EditorAlignRightButtonDirective = class EditorAlignRightButtonDirective extends EditorCommandButton {
5490
- constructor(button, editor, localization) {
5491
- super('alignRight', button, editor, localization);
5556
+ constructor(button, editor, localization, toolsService) {
5557
+ super('alignRight', button, editor, localization, toolsService);
5492
5558
  }
5493
5559
  };
5494
5560
  EditorAlignRightButtonDirective = __decorate([
@@ -5498,7 +5564,8 @@ EditorAlignRightButtonDirective = __decorate([
5498
5564
  __param(1, Host()),
5499
5565
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5500
5566
  EditorComponent,
5501
- EditorLocalizationService])
5567
+ EditorLocalizationService,
5568
+ EditorToolsService])
5502
5569
  ], EditorAlignRightButtonDirective);
5503
5570
 
5504
5571
  /**
@@ -5520,8 +5587,8 @@ EditorAlignRightButtonDirective = __decorate([
5520
5587
  * ```
5521
5588
  */
5522
5589
  let EditorAlignJustifyButtonDirective = class EditorAlignJustifyButtonDirective extends EditorCommandButton {
5523
- constructor(button, editor, localization) {
5524
- super('alignJustify', button, editor, localization);
5590
+ constructor(button, editor, localization, toolsService) {
5591
+ super('alignJustify', button, editor, localization, toolsService);
5525
5592
  }
5526
5593
  };
5527
5594
  EditorAlignJustifyButtonDirective = __decorate([
@@ -5531,7 +5598,8 @@ EditorAlignJustifyButtonDirective = __decorate([
5531
5598
  __param(1, Host()),
5532
5599
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5533
5600
  EditorComponent,
5534
- EditorLocalizationService])
5601
+ EditorLocalizationService,
5602
+ EditorToolsService])
5535
5603
  ], EditorAlignJustifyButtonDirective);
5536
5604
 
5537
5605
  /**
@@ -5553,8 +5621,8 @@ EditorAlignJustifyButtonDirective = __decorate([
5553
5621
  * ```
5554
5622
  */
5555
5623
  let EditorRedoButtonDirective = class EditorRedoButtonDirective extends EditorCommandButton {
5556
- constructor(button, editor, localization) {
5557
- super('redo', button, editor, localization);
5624
+ constructor(button, editor, localization, toolsService) {
5625
+ super('redo', button, editor, localization, toolsService);
5558
5626
  }
5559
5627
  };
5560
5628
  EditorRedoButtonDirective = __decorate([
@@ -5564,7 +5632,8 @@ EditorRedoButtonDirective = __decorate([
5564
5632
  __param(1, Host()),
5565
5633
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5566
5634
  EditorComponent,
5567
- EditorLocalizationService])
5635
+ EditorLocalizationService,
5636
+ EditorToolsService])
5568
5637
  ], EditorRedoButtonDirective);
5569
5638
 
5570
5639
  /**
@@ -5586,8 +5655,8 @@ EditorRedoButtonDirective = __decorate([
5586
5655
  * ```
5587
5656
  */
5588
5657
  let EditorUndoButtonDirective = class EditorUndoButtonDirective extends EditorCommandButton {
5589
- constructor(button, editor, localization) {
5590
- super('undo', button, editor, localization);
5658
+ constructor(button, editor, localization, toolsService) {
5659
+ super('undo', button, editor, localization, toolsService);
5591
5660
  }
5592
5661
  };
5593
5662
  EditorUndoButtonDirective = __decorate([
@@ -5597,19 +5666,21 @@ EditorUndoButtonDirective = __decorate([
5597
5666
  __param(1, Host()),
5598
5667
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5599
5668
  EditorComponent,
5600
- EditorLocalizationService])
5669
+ EditorLocalizationService,
5670
+ EditorToolsService])
5601
5671
  ], EditorUndoButtonDirective);
5602
5672
 
5603
5673
  /**
5604
5674
  * @hidden
5605
5675
  */
5606
5676
  class EditorCommandDialog extends EditorCommandBase {
5607
- constructor(dialog, button, editor, localization) {
5608
- super(dialog, button, editor, localization);
5677
+ constructor(dialog, button, editor, localization, toolsService) {
5678
+ super(dialog, button, editor, localization, toolsService);
5609
5679
  this.dialog = dialog;
5610
5680
  this.button = button;
5611
5681
  this.editor = editor;
5612
5682
  this.localization = localization;
5683
+ this.toolsService = toolsService;
5613
5684
  }
5614
5685
  clickHandler() {
5615
5686
  this.editor.openDialog(this.dialog);
@@ -5638,8 +5709,8 @@ class EditorCommandDialog extends EditorCommandBase {
5638
5709
  * ```
5639
5710
  */
5640
5711
  let EditorInsertImageButtonDirective = class EditorInsertImageButtonDirective extends EditorCommandDialog {
5641
- constructor(button, editor, localization) {
5642
- super('insertImage', button, editor, localization);
5712
+ constructor(button, editor, localization, toolsService) {
5713
+ super('insertImage', button, editor, localization, toolsService);
5643
5714
  }
5644
5715
  };
5645
5716
  EditorInsertImageButtonDirective = __decorate([
@@ -5649,7 +5720,8 @@ EditorInsertImageButtonDirective = __decorate([
5649
5720
  __param(1, Host()),
5650
5721
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5651
5722
  EditorComponent,
5652
- EditorLocalizationService])
5723
+ EditorLocalizationService,
5724
+ EditorToolsService])
5653
5725
  ], EditorInsertImageButtonDirective);
5654
5726
 
5655
5727
  /**
@@ -5671,8 +5743,8 @@ EditorInsertImageButtonDirective = __decorate([
5671
5743
  * ```
5672
5744
  */
5673
5745
  let EditorIndentButtonDirective = class EditorIndentButtonDirective extends EditorCommandButton {
5674
- constructor(button, editor, localization) {
5675
- super('indent', button, editor, localization);
5746
+ constructor(button, editor, localization, toolsService) {
5747
+ super('indent', button, editor, localization, toolsService);
5676
5748
  }
5677
5749
  };
5678
5750
  EditorIndentButtonDirective = __decorate([
@@ -5682,7 +5754,8 @@ EditorIndentButtonDirective = __decorate([
5682
5754
  __param(1, Host()),
5683
5755
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5684
5756
  EditorComponent,
5685
- EditorLocalizationService])
5757
+ EditorLocalizationService,
5758
+ EditorToolsService])
5686
5759
  ], EditorIndentButtonDirective);
5687
5760
 
5688
5761
  /**
@@ -5704,8 +5777,8 @@ EditorIndentButtonDirective = __decorate([
5704
5777
  * ```
5705
5778
  */
5706
5779
  let EditorOutdentButtonDirective = class EditorOutdentButtonDirective extends EditorCommandButton {
5707
- constructor(button, editor, localization) {
5708
- super('outdent', button, editor, localization);
5780
+ constructor(button, editor, localization, toolsService) {
5781
+ super('outdent', button, editor, localization, toolsService);
5709
5782
  }
5710
5783
  };
5711
5784
  EditorOutdentButtonDirective = __decorate([
@@ -5715,7 +5788,8 @@ EditorOutdentButtonDirective = __decorate([
5715
5788
  __param(1, Host()),
5716
5789
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5717
5790
  EditorComponent,
5718
- EditorLocalizationService])
5791
+ EditorLocalizationService,
5792
+ EditorToolsService])
5719
5793
  ], EditorOutdentButtonDirective);
5720
5794
 
5721
5795
  /**
@@ -5737,8 +5811,8 @@ EditorOutdentButtonDirective = __decorate([
5737
5811
  * ```
5738
5812
  */
5739
5813
  let EditorCreateLinkButtonDirective = class EditorCreateLinkButtonDirective extends EditorCommandDialog {
5740
- constructor(button, editor, localization) {
5741
- super('createLink', button, editor, localization);
5814
+ constructor(button, editor, localization, toolsService) {
5815
+ super('createLink', button, editor, localization, toolsService);
5742
5816
  }
5743
5817
  };
5744
5818
  EditorCreateLinkButtonDirective = __decorate([
@@ -5748,7 +5822,8 @@ EditorCreateLinkButtonDirective = __decorate([
5748
5822
  __param(1, Host()),
5749
5823
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5750
5824
  EditorComponent,
5751
- EditorLocalizationService])
5825
+ EditorLocalizationService,
5826
+ EditorToolsService])
5752
5827
  ], EditorCreateLinkButtonDirective);
5753
5828
 
5754
5829
  /**
@@ -5770,8 +5845,8 @@ EditorCreateLinkButtonDirective = __decorate([
5770
5845
  * ```
5771
5846
  */
5772
5847
  let EditorUnlinkButtonDirective = class EditorUnlinkButtonDirective extends EditorCommandButton {
5773
- constructor(button, editor, localization) {
5774
- super('unlink', button, editor, localization);
5848
+ constructor(button, editor, localization, toolsService) {
5849
+ super('unlink', button, editor, localization, toolsService);
5775
5850
  }
5776
5851
  };
5777
5852
  EditorUnlinkButtonDirective = __decorate([
@@ -5781,7 +5856,8 @@ EditorUnlinkButtonDirective = __decorate([
5781
5856
  __param(1, Host()),
5782
5857
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5783
5858
  EditorComponent,
5784
- EditorLocalizationService])
5859
+ EditorLocalizationService,
5860
+ EditorToolsService])
5785
5861
  ], EditorUnlinkButtonDirective);
5786
5862
 
5787
5863
  /**
@@ -5803,8 +5879,8 @@ EditorUnlinkButtonDirective = __decorate([
5803
5879
  * ```
5804
5880
  */
5805
5881
  let EditorInsertOrderedListButtonDirective = class EditorInsertOrderedListButtonDirective extends EditorCommandButton {
5806
- constructor(button, editor, localization) {
5807
- super('insertOrderedList', button, editor, localization);
5882
+ constructor(button, editor, localization, toolsService) {
5883
+ super('insertOrderedList', button, editor, localization, toolsService);
5808
5884
  }
5809
5885
  };
5810
5886
  EditorInsertOrderedListButtonDirective = __decorate([
@@ -5814,7 +5890,8 @@ EditorInsertOrderedListButtonDirective = __decorate([
5814
5890
  __param(1, Host()),
5815
5891
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5816
5892
  EditorComponent,
5817
- EditorLocalizationService])
5893
+ EditorLocalizationService,
5894
+ EditorToolsService])
5818
5895
  ], EditorInsertOrderedListButtonDirective);
5819
5896
 
5820
5897
  /**
@@ -5836,8 +5913,8 @@ EditorInsertOrderedListButtonDirective = __decorate([
5836
5913
  * ```
5837
5914
  */
5838
5915
  let EditorInsertUnorderedListButtonDirective = class EditorInsertUnorderedListButtonDirective extends EditorCommandButton {
5839
- constructor(button, editor, localization) {
5840
- super('insertUnorderedList', button, editor, localization);
5916
+ constructor(button, editor, localization, toolsService) {
5917
+ super('insertUnorderedList', button, editor, localization, toolsService);
5841
5918
  }
5842
5919
  };
5843
5920
  EditorInsertUnorderedListButtonDirective = __decorate([
@@ -5847,7 +5924,8 @@ EditorInsertUnorderedListButtonDirective = __decorate([
5847
5924
  __param(1, Host()),
5848
5925
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5849
5926
  EditorComponent,
5850
- EditorLocalizationService])
5927
+ EditorLocalizationService,
5928
+ EditorToolsService])
5851
5929
  ], EditorInsertUnorderedListButtonDirective);
5852
5930
 
5853
5931
  /**
@@ -5868,8 +5946,8 @@ EditorInsertUnorderedListButtonDirective = __decorate([
5868
5946
  * ```
5869
5947
  */
5870
5948
  let EditorViewSourceButtonDirective = class EditorViewSourceButtonDirective extends EditorCommandDialog {
5871
- constructor(button, editor, localization) {
5872
- super('viewSource', button, editor, localization);
5949
+ constructor(button, editor, localization, toolsService) {
5950
+ super('viewSource', button, editor, localization, toolsService);
5873
5951
  }
5874
5952
  };
5875
5953
  EditorViewSourceButtonDirective = __decorate([
@@ -5879,7 +5957,8 @@ EditorViewSourceButtonDirective = __decorate([
5879
5957
  __param(1, Host()),
5880
5958
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5881
5959
  EditorComponent,
5882
- EditorLocalizationService])
5960
+ EditorLocalizationService,
5961
+ EditorToolsService])
5883
5962
  ], EditorViewSourceButtonDirective);
5884
5963
 
5885
5964
  /**
@@ -5901,8 +5980,8 @@ EditorViewSourceButtonDirective = __decorate([
5901
5980
  * ```
5902
5981
  */
5903
5982
  let EditorBoldButtonDirective = class EditorBoldButtonDirective extends EditorCommandButton {
5904
- constructor(button, editor, localization) {
5905
- super('bold', button, editor, localization);
5983
+ constructor(button, editor, localization, toolsService) {
5984
+ super('bold', button, editor, localization, toolsService);
5906
5985
  }
5907
5986
  };
5908
5987
  EditorBoldButtonDirective = __decorate([
@@ -5912,7 +5991,8 @@ EditorBoldButtonDirective = __decorate([
5912
5991
  __param(1, Host()),
5913
5992
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5914
5993
  EditorComponent,
5915
- EditorLocalizationService])
5994
+ EditorLocalizationService,
5995
+ EditorToolsService])
5916
5996
  ], EditorBoldButtonDirective);
5917
5997
 
5918
5998
  /**
@@ -5934,8 +6014,8 @@ EditorBoldButtonDirective = __decorate([
5934
6014
  * ```
5935
6015
  */
5936
6016
  let EditorItalicButtonDirective = class EditorItalicButtonDirective extends EditorCommandButton {
5937
- constructor(button, editor, localization) {
5938
- super('italic', button, editor, localization);
6017
+ constructor(button, editor, localization, toolsService) {
6018
+ super('italic', button, editor, localization, toolsService);
5939
6019
  }
5940
6020
  };
5941
6021
  EditorItalicButtonDirective = __decorate([
@@ -5945,7 +6025,8 @@ EditorItalicButtonDirective = __decorate([
5945
6025
  __param(1, Host()),
5946
6026
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5947
6027
  EditorComponent,
5948
- EditorLocalizationService])
6028
+ EditorLocalizationService,
6029
+ EditorToolsService])
5949
6030
  ], EditorItalicButtonDirective);
5950
6031
 
5951
6032
  /**
@@ -5967,8 +6048,8 @@ EditorItalicButtonDirective = __decorate([
5967
6048
  * ```
5968
6049
  */
5969
6050
  let EditorUnderlineButtonDirective = class EditorUnderlineButtonDirective extends EditorCommandButton {
5970
- constructor(button, editor, localization) {
5971
- super('underline', button, editor, localization);
6051
+ constructor(button, editor, localization, toolsService) {
6052
+ super('underline', button, editor, localization, toolsService);
5972
6053
  }
5973
6054
  };
5974
6055
  EditorUnderlineButtonDirective = __decorate([
@@ -5978,7 +6059,8 @@ EditorUnderlineButtonDirective = __decorate([
5978
6059
  __param(1, Host()),
5979
6060
  __metadata("design:paramtypes", [ToolBarButtonComponent,
5980
6061
  EditorComponent,
5981
- EditorLocalizationService])
6062
+ EditorLocalizationService,
6063
+ EditorToolsService])
5982
6064
  ], EditorUnderlineButtonDirective);
5983
6065
 
5984
6066
  /**
@@ -6000,8 +6082,8 @@ EditorUnderlineButtonDirective = __decorate([
6000
6082
  * ```
6001
6083
  */
6002
6084
  let EditorStrikethroughButtonDirective = class EditorStrikethroughButtonDirective extends EditorCommandButton {
6003
- constructor(button, editor, localization) {
6004
- super('strikethrough', button, editor, localization);
6085
+ constructor(button, editor, localization, toolsService) {
6086
+ super('strikethrough', button, editor, localization, toolsService);
6005
6087
  }
6006
6088
  };
6007
6089
  EditorStrikethroughButtonDirective = __decorate([
@@ -6011,7 +6093,8 @@ EditorStrikethroughButtonDirective = __decorate([
6011
6093
  __param(1, Host()),
6012
6094
  __metadata("design:paramtypes", [ToolBarButtonComponent,
6013
6095
  EditorComponent,
6014
- EditorLocalizationService])
6096
+ EditorLocalizationService,
6097
+ EditorToolsService])
6015
6098
  ], EditorStrikethroughButtonDirective);
6016
6099
 
6017
6100
  /**
@@ -6033,8 +6116,8 @@ EditorStrikethroughButtonDirective = __decorate([
6033
6116
  * ```
6034
6117
  */
6035
6118
  let EditorSubscriptButtonDirective = class EditorSubscriptButtonDirective extends EditorCommandButton {
6036
- constructor(button, editor, localization) {
6037
- super('subscript', button, editor, localization);
6119
+ constructor(button, editor, localization, toolsService) {
6120
+ super('subscript', button, editor, localization, toolsService);
6038
6121
  }
6039
6122
  };
6040
6123
  EditorSubscriptButtonDirective = __decorate([
@@ -6044,7 +6127,8 @@ EditorSubscriptButtonDirective = __decorate([
6044
6127
  __param(1, Host()),
6045
6128
  __metadata("design:paramtypes", [ToolBarButtonComponent,
6046
6129
  EditorComponent,
6047
- EditorLocalizationService])
6130
+ EditorLocalizationService,
6131
+ EditorToolsService])
6048
6132
  ], EditorSubscriptButtonDirective);
6049
6133
 
6050
6134
  /**
@@ -6066,8 +6150,8 @@ EditorSubscriptButtonDirective = __decorate([
6066
6150
  * ```
6067
6151
  */
6068
6152
  let EditorSuperscriptButtonDirective = class EditorSuperscriptButtonDirective extends EditorCommandButton {
6069
- constructor(button, editor, localization) {
6070
- super('superscript', button, editor, localization);
6153
+ constructor(button, editor, localization, toolsService) {
6154
+ super('superscript', button, editor, localization, toolsService);
6071
6155
  }
6072
6156
  };
6073
6157
  EditorSuperscriptButtonDirective = __decorate([
@@ -6077,7 +6161,8 @@ EditorSuperscriptButtonDirective = __decorate([
6077
6161
  __param(1, Host()),
6078
6162
  __metadata("design:paramtypes", [ToolBarButtonComponent,
6079
6163
  EditorComponent,
6080
- EditorLocalizationService])
6164
+ EditorLocalizationService,
6165
+ EditorToolsService])
6081
6166
  ], EditorSuperscriptButtonDirective);
6082
6167
 
6083
6168
  /**
@@ -6091,8 +6176,8 @@ EditorSuperscriptButtonDirective = __decorate([
6091
6176
  * ```
6092
6177
  */
6093
6178
  let EditorInsertFileButtonDirective = class EditorInsertFileButtonDirective extends EditorCommandDialog {
6094
- constructor(button, editor, localization) {
6095
- super('insertFile', button, editor, localization);
6179
+ constructor(button, editor, localization, toolsService) {
6180
+ super('insertFile', button, editor, localization, toolsService);
6096
6181
  }
6097
6182
  };
6098
6183
  EditorInsertFileButtonDirective = __decorate([
@@ -6102,7 +6187,8 @@ EditorInsertFileButtonDirective = __decorate([
6102
6187
  __param(1, Host()),
6103
6188
  __metadata("design:paramtypes", [ToolBarButtonComponent,
6104
6189
  EditorComponent,
6105
- EditorLocalizationService])
6190
+ EditorLocalizationService,
6191
+ EditorToolsService])
6106
6192
  ], EditorInsertFileButtonDirective);
6107
6193
 
6108
6194
  /**
@@ -6161,8 +6247,8 @@ EditorBackColorDirective = __decorate([
6161
6247
  * ```
6162
6248
  */
6163
6249
  let EditorCleanFormattingButtonDirective = class EditorCleanFormattingButtonDirective extends EditorCommandButton {
6164
- constructor(button, editor, localization) {
6165
- super('cleanFormatting', button, editor, localization);
6250
+ constructor(button, editor, localization, toolsService) {
6251
+ super('cleanFormatting', button, editor, localization, toolsService);
6166
6252
  }
6167
6253
  };
6168
6254
  EditorCleanFormattingButtonDirective = __decorate([
@@ -6172,7 +6258,8 @@ EditorCleanFormattingButtonDirective = __decorate([
6172
6258
  __param(1, Host()),
6173
6259
  __metadata("design:paramtypes", [ToolBarButtonComponent,
6174
6260
  EditorComponent,
6175
- EditorLocalizationService])
6261
+ EditorLocalizationService,
6262
+ EditorToolsService])
6176
6263
  ], EditorCleanFormattingButtonDirective);
6177
6264
 
6178
6265
  /**
@@ -6187,8 +6274,8 @@ EditorCleanFormattingButtonDirective = __decorate([
6187
6274
  * ```
6188
6275
  */
6189
6276
  let EditorAddColumnBeforeButtonDirective = class EditorAddColumnBeforeButtonDirective extends EditorCommandButton {
6190
- constructor(button, editor, localization) {
6191
- super('addColumnBefore', button, editor, localization);
6277
+ constructor(button, editor, localization, toolsService) {
6278
+ super('addColumnBefore', button, editor, localization, toolsService);
6192
6279
  }
6193
6280
  };
6194
6281
  EditorAddColumnBeforeButtonDirective = __decorate([
@@ -6198,7 +6285,8 @@ EditorAddColumnBeforeButtonDirective = __decorate([
6198
6285
  __param(1, Host()),
6199
6286
  __metadata("design:paramtypes", [ToolBarButtonComponent,
6200
6287
  EditorComponent,
6201
- EditorLocalizationService])
6288
+ EditorLocalizationService,
6289
+ EditorToolsService])
6202
6290
  ], EditorAddColumnBeforeButtonDirective);
6203
6291
 
6204
6292
  /**
@@ -6213,8 +6301,8 @@ EditorAddColumnBeforeButtonDirective = __decorate([
6213
6301
  * ```
6214
6302
  */
6215
6303
  let EditorAddColumnAfterButtonDirective = class EditorAddColumnAfterButtonDirective extends EditorCommandButton {
6216
- constructor(button, editor, localization) {
6217
- super('addColumnAfter', button, editor, localization);
6304
+ constructor(button, editor, localization, toolsService) {
6305
+ super('addColumnAfter', button, editor, localization, toolsService);
6218
6306
  }
6219
6307
  };
6220
6308
  EditorAddColumnAfterButtonDirective = __decorate([
@@ -6224,7 +6312,8 @@ EditorAddColumnAfterButtonDirective = __decorate([
6224
6312
  __param(1, Host()),
6225
6313
  __metadata("design:paramtypes", [ToolBarButtonComponent,
6226
6314
  EditorComponent,
6227
- EditorLocalizationService])
6315
+ EditorLocalizationService,
6316
+ EditorToolsService])
6228
6317
  ], EditorAddColumnAfterButtonDirective);
6229
6318
 
6230
6319
  /**
@@ -6239,8 +6328,8 @@ EditorAddColumnAfterButtonDirective = __decorate([
6239
6328
  * ```
6240
6329
  */
6241
6330
  let EditorAddRowBeforeButtonDirective = class EditorAddRowBeforeButtonDirective extends EditorCommandButton {
6242
- constructor(button, editor, localization) {
6243
- super('addRowBefore', button, editor, localization);
6331
+ constructor(button, editor, localization, toolsService) {
6332
+ super('addRowBefore', button, editor, localization, toolsService);
6244
6333
  }
6245
6334
  };
6246
6335
  EditorAddRowBeforeButtonDirective = __decorate([
@@ -6250,7 +6339,8 @@ EditorAddRowBeforeButtonDirective = __decorate([
6250
6339
  __param(1, Host()),
6251
6340
  __metadata("design:paramtypes", [ToolBarButtonComponent,
6252
6341
  EditorComponent,
6253
- EditorLocalizationService])
6342
+ EditorLocalizationService,
6343
+ EditorToolsService])
6254
6344
  ], EditorAddRowBeforeButtonDirective);
6255
6345
 
6256
6346
  /**
@@ -6265,8 +6355,8 @@ EditorAddRowBeforeButtonDirective = __decorate([
6265
6355
  * ```
6266
6356
  */
6267
6357
  let EditorAddRowAfterButtonDirective = class EditorAddRowAfterButtonDirective extends EditorCommandButton {
6268
- constructor(button, editor, localization) {
6269
- super('addRowAfter', button, editor, localization);
6358
+ constructor(button, editor, localization, toolsService) {
6359
+ super('addRowAfter', button, editor, localization, toolsService);
6270
6360
  }
6271
6361
  };
6272
6362
  EditorAddRowAfterButtonDirective = __decorate([
@@ -6276,7 +6366,8 @@ EditorAddRowAfterButtonDirective = __decorate([
6276
6366
  __param(1, Host()),
6277
6367
  __metadata("design:paramtypes", [ToolBarButtonComponent,
6278
6368
  EditorComponent,
6279
- EditorLocalizationService])
6369
+ EditorLocalizationService,
6370
+ EditorToolsService])
6280
6371
  ], EditorAddRowAfterButtonDirective);
6281
6372
 
6282
6373
  /**
@@ -6291,8 +6382,8 @@ EditorAddRowAfterButtonDirective = __decorate([
6291
6382
  * ```
6292
6383
  */
6293
6384
  let EditorDeleteColumnButtonDirective = class EditorDeleteColumnButtonDirective extends EditorCommandButton {
6294
- constructor(button, editor, localization) {
6295
- super('deleteColumn', button, editor, localization);
6385
+ constructor(button, editor, localization, toolsService) {
6386
+ super('deleteColumn', button, editor, localization, toolsService);
6296
6387
  }
6297
6388
  };
6298
6389
  EditorDeleteColumnButtonDirective = __decorate([
@@ -6302,7 +6393,8 @@ EditorDeleteColumnButtonDirective = __decorate([
6302
6393
  __param(1, Host()),
6303
6394
  __metadata("design:paramtypes", [ToolBarButtonComponent,
6304
6395
  EditorComponent,
6305
- EditorLocalizationService])
6396
+ EditorLocalizationService,
6397
+ EditorToolsService])
6306
6398
  ], EditorDeleteColumnButtonDirective);
6307
6399
 
6308
6400
  /**
@@ -6317,8 +6409,8 @@ EditorDeleteColumnButtonDirective = __decorate([
6317
6409
  * ```
6318
6410
  */
6319
6411
  let EditorDeleteRowButtonDirective = class EditorDeleteRowButtonDirective extends EditorCommandButton {
6320
- constructor(button, editor, localization) {
6321
- super('deleteRow', button, editor, localization);
6412
+ constructor(button, editor, localization, toolsService) {
6413
+ super('deleteRow', button, editor, localization, toolsService);
6322
6414
  }
6323
6415
  };
6324
6416
  EditorDeleteRowButtonDirective = __decorate([
@@ -6328,7 +6420,8 @@ EditorDeleteRowButtonDirective = __decorate([
6328
6420
  __param(1, Host()),
6329
6421
  __metadata("design:paramtypes", [ToolBarButtonComponent,
6330
6422
  EditorComponent,
6331
- EditorLocalizationService])
6423
+ EditorLocalizationService,
6424
+ EditorToolsService])
6332
6425
  ], EditorDeleteRowButtonDirective);
6333
6426
 
6334
6427
  /**
@@ -6343,8 +6436,8 @@ EditorDeleteRowButtonDirective = __decorate([
6343
6436
  * ```
6344
6437
  */
6345
6438
  let EditorDeleteTableButtonDirective = class EditorDeleteTableButtonDirective extends EditorCommandButton {
6346
- constructor(button, editor, localization) {
6347
- super('deleteTable', button, editor, localization);
6439
+ constructor(button, editor, localization, toolsService) {
6440
+ super('deleteTable', button, editor, localization, toolsService);
6348
6441
  }
6349
6442
  };
6350
6443
  EditorDeleteTableButtonDirective = __decorate([
@@ -6354,7 +6447,8 @@ EditorDeleteTableButtonDirective = __decorate([
6354
6447
  __param(1, Host()),
6355
6448
  __metadata("design:paramtypes", [ToolBarButtonComponent,
6356
6449
  EditorComponent,
6357
- EditorLocalizationService])
6450
+ EditorLocalizationService,
6451
+ EditorToolsService])
6358
6452
  ], EditorDeleteTableButtonDirective);
6359
6453
 
6360
6454
  /**
@@ -6371,8 +6465,8 @@ EditorDeleteTableButtonDirective = __decorate([
6371
6465
  * ```
6372
6466
  */
6373
6467
  let EditorMergeCellsButtonDirective = class EditorMergeCellsButtonDirective extends EditorCommandButton {
6374
- constructor(button, editor, localization) {
6375
- super('mergeCells', button, editor, localization);
6468
+ constructor(button, editor, localization, toolsService) {
6469
+ super('mergeCells', button, editor, localization, toolsService);
6376
6470
  }
6377
6471
  };
6378
6472
  EditorMergeCellsButtonDirective = __decorate([
@@ -6382,7 +6476,8 @@ EditorMergeCellsButtonDirective = __decorate([
6382
6476
  __param(1, Host()),
6383
6477
  __metadata("design:paramtypes", [ToolBarButtonComponent,
6384
6478
  EditorComponent,
6385
- EditorLocalizationService])
6479
+ EditorLocalizationService,
6480
+ EditorToolsService])
6386
6481
  ], EditorMergeCellsButtonDirective);
6387
6482
 
6388
6483
  /**
@@ -6399,8 +6494,8 @@ EditorMergeCellsButtonDirective = __decorate([
6399
6494
  * ```
6400
6495
  */
6401
6496
  let EditorSplitCellButtonDirective = class EditorSplitCellButtonDirective extends EditorCommandButton {
6402
- constructor(button, editor, localization) {
6403
- super('splitCell', button, editor, localization);
6497
+ constructor(button, editor, localization, toolsService) {
6498
+ super('splitCell', button, editor, localization, toolsService);
6404
6499
  }
6405
6500
  };
6406
6501
  EditorSplitCellButtonDirective = __decorate([
@@ -6410,7 +6505,8 @@ EditorSplitCellButtonDirective = __decorate([
6410
6505
  __param(1, Host()),
6411
6506
  __metadata("design:paramtypes", [ToolBarButtonComponent,
6412
6507
  EditorComponent,
6413
- EditorLocalizationService])
6508
+ EditorLocalizationService,
6509
+ EditorToolsService])
6414
6510
  ], EditorSplitCellButtonDirective);
6415
6511
 
6416
6512
  /**
@@ -6494,10 +6590,18 @@ __decorate([
6494
6590
  Input(),
6495
6591
  __metadata("design:type", String)
6496
6592
  ], Messages.prototype, "outdent", void 0);
6593
+ __decorate([
6594
+ Input(),
6595
+ __metadata("design:type", String)
6596
+ ], Messages.prototype, "print", void 0);
6497
6597
  __decorate([
6498
6598
  Input(),
6499
6599
  __metadata("design:type", String)
6500
6600
  ], Messages.prototype, "redo", void 0);
6601
+ __decorate([
6602
+ Input(),
6603
+ __metadata("design:type", String)
6604
+ ], Messages.prototype, "selectAll", void 0);
6501
6605
  __decorate([
6502
6606
  Input(),
6503
6607
  __metadata("design:type", String)
@@ -6698,6 +6802,97 @@ DropDownToolDirective = __decorate([
6698
6802
  NgZone])
6699
6803
  ], DropDownToolDirective);
6700
6804
 
6805
+ /**
6806
+ * A directive which configures an existing `ToolBarButtonComponent` as an Editor Print tool
6807
+ * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
6808
+ * The directive will predefine the `icon` and `click` event handlers of the button.
6809
+ *
6810
+ * > The Editor Print tool is supported in the default [`iframe`](https://www.telerik.com/kendo-angular-ui-develop/components/editor/api/EditorComponent/#toc-iframe) mode only.
6811
+ *
6812
+ * @example
6813
+ * ```ts-no-run
6814
+ * <kendo-toolbar-button kendoEditorPrintButton></kendo-toolbar-button>
6815
+ * ```
6816
+ *
6817
+ * The following example demonstrates how to change the default icon that is applied by the directive.
6818
+ *
6819
+ * @example
6820
+ * ```ts-no-run
6821
+ * <kendo-toolbar-button kendoEditorPrintButton icon="blogger"></kendo-toolbar-button>
6822
+ * ```
6823
+ */
6824
+ let EditorPrintDirective = class EditorPrintDirective extends EditorCommandButton {
6825
+ constructor(button, editor, localization, toolsService) {
6826
+ super('print', button, editor, localization, toolsService);
6827
+ this.editor = editor;
6828
+ }
6829
+ ngAfterViewInit() {
6830
+ if (isDevMode) {
6831
+ if (!this.editor.iframe) {
6832
+ throw new Error(EditorErrorMessages.printTool);
6833
+ }
6834
+ }
6835
+ }
6836
+ clickHandler() {
6837
+ if (this.editor.iframe) {
6838
+ const view = this.editor.view;
6839
+ const dom = view && view.dom;
6840
+ const doc = dom && dom.ownerDocument;
6841
+ const editorWindow = doc && doc.defaultView;
6842
+ if (editorWindow) {
6843
+ editorWindow.print();
6844
+ }
6845
+ }
6846
+ }
6847
+ };
6848
+ EditorPrintDirective = __decorate([
6849
+ Directive({
6850
+ selector: 'kendo-toolbar-button[kendoEditorPrintButton]'
6851
+ }),
6852
+ __param(1, Host()),
6853
+ __metadata("design:paramtypes", [ToolBarButtonComponent,
6854
+ EditorComponent,
6855
+ EditorLocalizationService,
6856
+ EditorToolsService])
6857
+ ], EditorPrintDirective);
6858
+
6859
+ /**
6860
+ * A directive which configures an existing `ToolBarButtonComponent` as an Editor SelectAll tool
6861
+ * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
6862
+ * The directive will predefine the `icon` and `click` event handlers of the button.
6863
+ *
6864
+ * @example
6865
+ * ```ts-no-run
6866
+ * <kendo-toolbar-button kendoEditorSelectAllButton></kendo-toolbar-button>
6867
+ * ```
6868
+ *
6869
+ * The following example demonstrates how to change the default icon that is applied by the directive.
6870
+ *
6871
+ * @example
6872
+ * ```ts-no-run
6873
+ * <kendo-toolbar-button kendoEditorSelectAllButton icon="blogger"></kendo-toolbar-button>
6874
+ * ```
6875
+ */
6876
+ let EditorSelectAllButtonDirective = class EditorSelectAllButtonDirective extends EditorCommandButton {
6877
+ constructor(button, editor, localization, toolsService) {
6878
+ super('selectAll', button, editor, localization, toolsService);
6879
+ }
6880
+ clickHandler() {
6881
+ this.editor.shouldEmitFocus = true;
6882
+ super.clickHandler();
6883
+ }
6884
+ };
6885
+ EditorSelectAllButtonDirective = __decorate([
6886
+ Directive({
6887
+ selector: 'kendo-toolbar-button[kendoEditorSelectAllButton]'
6888
+ }),
6889
+ __param(1, Host()),
6890
+ __metadata("design:paramtypes", [ToolBarButtonComponent,
6891
+ EditorComponent,
6892
+ EditorLocalizationService,
6893
+ EditorToolsService])
6894
+ ], EditorSelectAllButtonDirective);
6895
+
6701
6896
  const COMPONENT_DIRECTIVES = [
6702
6897
  //alignment
6703
6898
  EditorAlignLeftButtonDirective,
@@ -6749,7 +6944,11 @@ const COMPONENT_DIRECTIVES = [
6749
6944
  CustomMessagesComponent,
6750
6945
  LocalizedMessagesDirective,
6751
6946
  // dropdown tools
6752
- DropDownToolDirective
6947
+ DropDownToolDirective,
6948
+ // print
6949
+ EditorPrintDirective,
6950
+ // select all
6951
+ EditorSelectAllButtonDirective
6753
6952
  ];
6754
6953
  const TOOLBAR_TOOLS = [
6755
6954
  EditorFontSizeComponent,
@@ -6863,4 +7062,4 @@ EditorModule = __decorate([
6863
7062
  * Generated bundle index. Do not edit.
6864
7063
  */
6865
7064
 
6866
- export { ColorPickerDialogComponent, FileLinkDialogComponent, FontFamilyDialogComponent, FontSizeDialogComponent, FormatDialogComponent, ImageDialogComponent, InsertTableDialogComponent, SourceDialogComponent, CustomMessagesComponent, EditorLocalizationService, LocalizedMessagesDirective, Messages, EditorAlignCenterButtonDirective, EditorAlignJustifyButtonDirective, EditorAlignLeftButtonDirective, EditorAlignRightButtonDirective, EditorBackColorDirective, EditorColorPickerComponent, EditorForeColorDirective, EditorCleanFormattingButtonDirective, FontFamilyDropDownListComponent, EditorFontFamilyComponent, FontSizeDropDownListComponent, EditorFontSizeComponent, FormatDropDownListComponent, EditorFormatComponent, EditorRedoButtonDirective, EditorUndoButtonDirective, EditorInsertImageButtonDirective, EditorIndentButtonDirective, EditorOutdentButtonDirective, EditorCreateLinkButtonDirective, EditorInsertFileButtonDirective, EditorUnlinkButtonDirective, EditorInsertOrderedListButtonDirective, EditorInsertUnorderedListButtonDirective, DropDownToolDirective, EditorCommandBase, EditorCommandButton, EditorCommandDialog, EditorViewSourceButtonDirective, EditorAddColumnAfterButtonDirective, EditorAddColumnBeforeButtonDirective, EditorAddRowAfterButtonDirective, EditorAddRowBeforeButtonDirective, EditorDeleteColumnButtonDirective, EditorDeleteRowButtonDirective, EditorDeleteTableButtonDirective, EditorInsertTableButtonComponent, EditorMergeCellsButtonDirective, EditorSplitCellButtonDirective, PopupTableGridComponent, EditorBoldButtonDirective, EditorItalicButtonDirective, EditorStrikethroughButtonDirective, EditorSubscriptButtonDirective, EditorSuperscriptButtonDirective, EditorUnderlineButtonDirective, EditorComponent, EditorModule, schema };
7065
+ export { ColorPickerDialogComponent, FileLinkDialogComponent, FontFamilyDialogComponent, FontSizeDialogComponent, FormatDialogComponent, ImageDialogComponent, InsertTableDialogComponent, SourceDialogComponent, CustomMessagesComponent, EditorLocalizationService, LocalizedMessagesDirective, Messages, EditorAlignCenterButtonDirective, EditorAlignJustifyButtonDirective, EditorAlignLeftButtonDirective, EditorAlignRightButtonDirective, EditorBackColorDirective, EditorColorPickerComponent, EditorForeColorDirective, EditorCleanFormattingButtonDirective, FontFamilyDropDownListComponent, EditorFontFamilyComponent, FontSizeDropDownListComponent, EditorFontSizeComponent, FormatDropDownListComponent, EditorFormatComponent, EditorRedoButtonDirective, EditorUndoButtonDirective, EditorInsertImageButtonDirective, EditorIndentButtonDirective, EditorOutdentButtonDirective, EditorCreateLinkButtonDirective, EditorInsertFileButtonDirective, EditorUnlinkButtonDirective, EditorInsertOrderedListButtonDirective, EditorInsertUnorderedListButtonDirective, EditorPrintDirective, EditorSelectAllButtonDirective, DropDownToolDirective, EditorCommandBase, EditorCommandButton, EditorCommandDialog, EditorViewSourceButtonDirective, EditorAddColumnAfterButtonDirective, EditorAddColumnBeforeButtonDirective, EditorAddRowAfterButtonDirective, EditorAddRowBeforeButtonDirective, EditorDeleteColumnButtonDirective, EditorDeleteRowButtonDirective, EditorDeleteTableButtonDirective, EditorInsertTableButtonComponent, EditorMergeCellsButtonDirective, EditorSplitCellButtonDirective, PopupTableGridComponent, EditorToolsService, EditorBoldButtonDirective, EditorItalicButtonDirective, EditorStrikethroughButtonDirective, EditorSubscriptButtonDirective, EditorSuperscriptButtonDirective, EditorUnderlineButtonDirective, EditorComponent, EditorModule, schema };