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

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 (52) 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 +4 -3
  8. package/dist/es/editor.module.js +7 -1
  9. package/dist/es/index.js +2 -0
  10. package/dist/es/localization/messages.js +8 -0
  11. package/dist/es/package-metadata.js +1 -1
  12. package/dist/es/tools/print/editor-print-button.directive.js +67 -0
  13. package/dist/es/tools/select-all/select-all-button.directive.js +48 -0
  14. package/dist/es/tools/shared/editor-command-base.js +7 -5
  15. package/dist/es2015/common/commands.d.ts +5 -1
  16. package/dist/es2015/common/error-messages.js +2 -1
  17. package/dist/es2015/config/command-icons.d.ts +2 -2
  18. package/dist/es2015/config/command-icons.js +4 -2
  19. package/dist/es2015/config/commands.js +31 -30
  20. package/dist/es2015/editor-toolbar-state.js +20 -2
  21. package/dist/es2015/editor.component.d.ts +5 -0
  22. package/dist/es2015/editor.component.js +7 -2
  23. package/dist/es2015/editor.module.js +7 -1
  24. package/dist/es2015/index.d.ts +2 -0
  25. package/dist/es2015/index.js +2 -0
  26. package/dist/es2015/index.metadata.json +1 -1
  27. package/dist/es2015/localization/messages.d.ts +8 -0
  28. package/dist/es2015/localization/messages.js +8 -0
  29. package/dist/es2015/package-metadata.js +1 -1
  30. package/dist/es2015/tools/print/editor-print-button.directive.d.ts +33 -0
  31. package/dist/es2015/tools/print/editor-print-button.directive.js +64 -0
  32. package/dist/es2015/tools/select-all/select-all-button.directive.d.ts +29 -0
  33. package/dist/es2015/tools/select-all/select-all-button.directive.js +46 -0
  34. package/dist/es2015/tools/shared/editor-command-base.d.ts +4 -3
  35. package/dist/es2015/tools/shared/editor-command-base.js +6 -4
  36. package/dist/es2015/tools/shared/editor-command-button.d.ts +3 -3
  37. package/dist/fesm2015/index.js +173 -43
  38. package/dist/fesm5/index.js +177 -46
  39. package/dist/npm/common/error-messages.js +2 -1
  40. package/dist/npm/config/command-icons.js +4 -2
  41. package/dist/npm/config/commands.js +33 -31
  42. package/dist/npm/editor-toolbar-state.js +20 -2
  43. package/dist/npm/editor.component.js +4 -3
  44. package/dist/npm/editor.module.js +7 -1
  45. package/dist/npm/index.js +4 -0
  46. package/dist/npm/localization/messages.js +8 -0
  47. package/dist/npm/package-metadata.js +1 -1
  48. package/dist/npm/tools/print/editor-print-button.directive.js +69 -0
  49. package/dist/npm/tools/select-all/select-all-button.directive.js +50 -0
  50. package/dist/npm/tools/shared/editor-command-base.js +7 -5
  51. package/dist/systemjs/kendo-angular-editor.js +1 -1
  52. package/package.json +1 -1
@@ -66,6 +66,10 @@ exports.getToolbarState = function (state, options) { return ({
66
66
  selected: false,
67
67
  disabled: !kendo_editor_common_2.redo(state)
68
68
  },
69
+ selectAll: {
70
+ selected: false,
71
+ disabled: false
72
+ },
69
73
  strikethrough: {
70
74
  selected: kendo_editor_common_2.hasMark(state, kendo_editor_common_2.strikethrough),
71
75
  disabled: false
@@ -115,6 +119,12 @@ exports.getToolbarState = function (state, options) { return ({
115
119
  selected: false,
116
120
  disabled: false
117
121
  },
122
+ // print
123
+ print: {
124
+ selected: false,
125
+ disabled: false
126
+ },
127
+ // table
118
128
  insertTable: {
119
129
  selected: false,
120
130
  disabled: false
@@ -187,6 +197,8 @@ exports.initialToolBarState = {
187
197
  //history
188
198
  redo: { selected: false, disabled: true },
189
199
  undo: { selected: false, disabled: true },
200
+ // print
201
+ print: { selected: false, disabled: false },
190
202
  //dialogs
191
203
  createLink: { selected: false, disabled: true },
192
204
  insertFile: { selected: false, disabled: true },
@@ -202,7 +214,9 @@ exports.initialToolBarState = {
202
214
  deleteColumn: { selected: false, disabled: true },
203
215
  mergeCells: { selected: false, disabled: true },
204
216
  splitCell: { selected: false, disabled: true },
205
- deleteTable: { selected: false, disabled: true }
217
+ deleteTable: { selected: false, disabled: true },
218
+ // select all
219
+ selectAll: { selected: false, disabled: false }
206
220
  };
207
221
  /**
208
222
  * @hidden
@@ -235,6 +249,8 @@ exports.disabledToolBarState = {
235
249
  //history
236
250
  redo: { selected: false, disabled: true },
237
251
  undo: { selected: false, disabled: true },
252
+ // print
253
+ print: { selected: false, disabled: true },
238
254
  //dialogs
239
255
  createLink: { selected: false, disabled: true },
240
256
  insertFile: { selected: false, disabled: true },
@@ -250,5 +266,7 @@ exports.disabledToolBarState = {
250
266
  deleteColumn: { selected: false, disabled: true },
251
267
  mergeCells: { selected: false, disabled: true },
252
268
  splitCell: { selected: false, disabled: true },
253
- deleteTable: { selected: false, disabled: true }
269
+ deleteTable: { selected: false, disabled: true },
270
+ // select all
271
+ selectAll: { selected: false, disabled: true }
254
272
  };
@@ -67,6 +67,7 @@ var EditorComponent = /** @class */ (function () {
67
67
  /**
68
68
  * If set to `false`, the Editor will run in style non-encapsulated mode. This means
69
69
  * that the styles of the page will be persisted in the Editor and its content will be affected by them.
70
+ * @default true
70
71
  */
71
72
  this.iframe = true;
72
73
  /**
@@ -563,7 +564,6 @@ var EditorComponent = /** @class */ (function () {
563
564
  * Manually focus the Editor.
564
565
  */
565
566
  EditorComponent.prototype.focus = function () {
566
- // this.focusChangedProgrammatically = true;
567
567
  this.focusChangedProgrammatically = true;
568
568
  this._view.focus();
569
569
  this.focusChangedProgrammatically = false;
@@ -735,8 +735,9 @@ var EditorComponent = /** @class */ (function () {
735
735
  if (_this.readonly) {
736
736
  contentAreaClasslist_1.add('k-state-focused');
737
737
  }
738
- if (!_this.focusChangedProgrammatically) {
738
+ if (!_this.focusChangedProgrammatically || _this.shouldEmitFocus) {
739
739
  _this.ngZone.run(function () { return _this.onFocus.emit(); });
740
+ _this.shouldEmitFocus = false;
740
741
  }
741
742
  }));
742
743
  this.subs.add(rxjs_1.fromEvent(containerElement, 'focusout')
@@ -981,7 +982,7 @@ var EditorComponent = /** @class */ (function () {
981
982
  }
982
983
  ],
983
984
  /* tslint:disable:max-line-length */
984
- template: "\n <ng-container\n kendoEditorLocalizedMessages\n i18n-alignCenter=\"kendo.editor.alignCenter|The title of the tool that aligns text in the center.\"\n alignCenter=\"Center text\"\n i18n-alignJustify=\"kendo.editor.alignJustify|The title of the tool that justifies text both left and right.\"\n alignJustify=\"Justify\"\n i18n-alignLeft=\"kendo.editor.alignLeft|The title of the tool that aligns text on the left.\"\n alignLeft=\"Align text left\"\n i18n-alignRight=\"kendo.editor.alignRight|The title of the tool that aligns text on the right.\"\n alignRight=\"Align text right\"\n i18n-backColor=\"kendo.editor.backColor|The title of the tool that changes the text background color.\"\n backColor=\"Background color\"\n i18n-bold=\"kendo.editor.bold|The title of the tool that makes text bold.\"\n bold=\"Bold\"\n i18n-cleanFormatting=\"kendo.editor.cleanFormatting|The title of the Clean Formatting tool.\"\n cleanFormatting=\"Clean formatting\"\n i18n-createLink=\"kendo.editor.createLink|The title of the tool that creates hyperlinks.\"\n createLink=\"Insert link\"\n i18n-dialogApply=\"kendo.editor.dialogApply|The label of the **Apply** button in all editor dialogs.\"\n dialogApply=\"Apply\"\n i18n-dialogCancel=\"kendo.editor.dialogCancel|The label of the **Cancel** button in all editor dialogs.\"\n dialogCancel=\"Cancel\"\n i18n-dialogInsert=\"kendo.editor.dialogInsert|The label of the **Insert** button in all editor dialogs.\"\n dialogInsert=\"Insert\"\n i18n-dialogUpdate=\"kendo.editor.dialogUpdate|The label of the **Update** button in all editor dialogs.\"\n dialogUpdate=\"Update\"\n i18n-fileText=\"kendo.editor.fileText|The caption for the file text in the insertFile dialog.\"\n fileText=\"Text\"\n i18n-fileTitle=\"kendo.editor.fileTitle|The caption for the file Title in the insertFile dialog.\"\n fileTitle=\"Title\"\n i18n-fileWebAddress=\"kendo.editor.fileWebAddress|The caption for the file URL in the insertFile dialog.\"\n fileWebAddress=\"Web address\"\n i18n-fontFamily=\"kendo.editor.fontFamily|The title of the tool that changes the text font.\"\n fontFamily=\"Select font family\"\n i18n-fontSize=\"kendo.editor.fontSize|The title of the tool that changes the text size.\"\n fontSize=\"Select font size\"\n i18n-foreColor=\"kendo.editor.foreColor|The title of the tool that changes the text color.\"\n foreColor=\"Color\"\n i18n-format=\"kendo.editor.format|The title of the tool that lets users choose block formats.\"\n format=\"Format\"\n i18n-imageAltText=\"kendo.editor.imageAltText|The caption for the image alternate text in the insertImage dialog.\"\n imageAltText=\"Alternate text\"\n i18n-imageHeight=\"kendo.editor.imageHeight|The caption for the image height in the insertImage dialog.\"\n imageHeight=\"Height (px)\"\n i18n-imageWebAddress=\"kendo.editor.imageWebAddress|The caption for the image URL in the insertImage dialog.\"\n imageWebAddress=\"Web address\"\n i18n-imageWidth=\"kendo.editor.imageWidth|The caption for the image width in the insertImage dialog.\"\n imageWidth=\"Width (px)\"\n i18n-indent=\"kendo.editor.indent|The title of the tool that indents the content.\"\n indent=\"Indent\"\n i18n-insertFile=\"kendo.editor.insertFile|The title of the tool that inserts links to files.\"\n insertFile=\"Insert file\"\n i18n-insertImage=\"kendo.editor.insertImage|The title of the tool that inserts images.\"\n insertImage=\"Insert image\"\n i18n-insertOrderedList=\"kendo.editor.insertOrderedList|The title of the tool that inserts an ordered list.\"\n insertOrderedList=\"Insert ordered list\"\n i18n-insertUnorderedList=\"kendo.editor.insertUnorderedList|The title of the tool that inserts an unordered list.\"\n insertUnorderedList=\"Insert unordered list\"\n i18n-italic=\"kendo.editor.italic|The title of the tool that makes text italicized.\"\n italic=\"Italic\"\n i18n-linkOpenInNewWindow=\"kendo.editor.linkOpenInNewWindow|The caption for the checkbox for opening the link in a new window in the createLink dialog.\"\n linkOpenInNewWindow=\"Open link in new window\"\n i18n-linkText=\"kendo.editor.linkText|The caption for the link text in the createLink dialog.\"\n linkText=\"Text\"\n i18n-linkTitle=\"kendo.editor.linkTitle|The caption for the link title in the createLink dialog.\"\n linkTitle=\"Title\"\n i18n-linkWebAddress=\"kendo.editor.linkWebAddress|The caption for the URL in the createLink dialog.\"\n linkWebAddress=\"Web address\"\n i18n-outdent=\"kendo.editor.outdent|The title of the tool that outdents the content.\"\n outdent=\"Outdent\"\n i18n-redo=\"kendo.editor.redo|The title of the tool that undos the last action.\"\n redo=\"Redo\"\n i18n-strikethrough=\"kendo.editor.strikethrough|The title of the tool that strikes through text.\"\n strikethrough=\"Strikethrough\"\n i18n-subscript=\"kendo.editor.subscript|The title of the tool that makes text subscript.\"\n subscript=\"Subscript\"\n i18n-superscript=\"kendo.editor.superscript|The title of the tool that makes text superscript.\"\n superscript=\"Superscript\"\n i18n-underline=\"kendo.editor.underline|The title of the tool that underlines text.\"\n underline=\"Underline\"\n i18n-unlink=\"kendo.editor.unlink|The title of the tool that removes hyperlinks.\"\n unlink=\"Remove Link\"\n i18n-undo=\"kendo.editor.undo|The title of the tool that undos the last action.\"\n undo=\"Undo\"\n i18n-viewSource=\"kendo.editor.viewSource|The title of the tool that shows the editor value as HTML.\"\n viewSource=\"View source\"\n i18n-insertTable=\"kendo.editor.insertTable|The title of the tool that inserts table.\"\n insertTable=\"Insert Table\"\n i18n-addColumnBefore=\"kendo.editor.addColumnBefore|The title of the tool that adds new column before currently selected column.\"\n addColumnBefore=\"Add column before\"\n i18n-addColumnAfter=\"kendo.editor.addColumnAfter|The title of the tool that adds new column after currently selected column.\"\n addColumnAfter=\"Add column after\"\n i18n-addRowBefore=\"kendo.editor.addRowBefore|The title of the tool that adds new row before currently selected row.\"\n addRowBefore=\"Add row before\"\n i18n-addRowAfter=\"kendo.editor.addRowAfter|The title of the tool that adds new row after currently selected row.\"\n addRowAfter=\"Add row after\"\n i18n-deleteColumn=\"kendo.editor.deleteColumn|The title of the tool that deletes a table column.\"\n deleteColumn=\"Delete column\"\n i18n-deleteRow=\"kendo.editor.deleteRow|The title of the tool that deletes a table row.\"\n deleteRow=\"Delete row\"\n i18n-deleteTable=\"kendo.editor.deleteTable|The title of the tool that deletes a table.\"\n deleteTable=\"Delete table\"\n >\n </ng-container>\n\n <ng-content select=\"kendo-toolbar\"></ng-content>\n <kendo-toolbar [overflow]=\"true\" [tabindex]=\"readonly ? -1 : 0\" *ngIf=\"!userToolBarElement\" #defaultToolbar>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorBoldButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorItalicButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorUnderlineButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-dropdownlist kendoEditorFormat></kendo-toolbar-dropdownlist>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorAlignLeftButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignCenterButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignRightButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignJustifyButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorInsertUnorderedListButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorInsertOrderedListButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorIndentButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorOutdentButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorCreateLinkButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorUnlinkButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorInsertImageButton></kendo-toolbar-button>\n </kendo-toolbar>\n\n <div *ngIf=\"!iframe\" #content [attr.dir]=\"direction\" class=\"k-editor-content\"></div>\n\n <div class=\"k-editor-content\" *ngIf=\"iframe\">\n <iframe #content frameborder=\"0\" class=\"k-iframe\" (load)=\"iframeOnLoad()\"></iframe>\n </div>\n\n <ng-container #dialogsContainer></ng-container>\n ",
985
+ template: "\n <ng-container\n kendoEditorLocalizedMessages\n i18n-alignCenter=\"kendo.editor.alignCenter|The title of the tool that aligns text in the center.\"\n alignCenter=\"Center text\"\n i18n-alignJustify=\"kendo.editor.alignJustify|The title of the tool that justifies text both left and right.\"\n alignJustify=\"Justify\"\n i18n-alignLeft=\"kendo.editor.alignLeft|The title of the tool that aligns text on the left.\"\n alignLeft=\"Align text left\"\n i18n-alignRight=\"kendo.editor.alignRight|The title of the tool that aligns text on the right.\"\n alignRight=\"Align text right\"\n i18n-backColor=\"kendo.editor.backColor|The title of the tool that changes the text background color.\"\n backColor=\"Background color\"\n i18n-bold=\"kendo.editor.bold|The title of the tool that makes text bold.\"\n bold=\"Bold\"\n i18n-cleanFormatting=\"kendo.editor.cleanFormatting|The title of the Clean Formatting tool.\"\n cleanFormatting=\"Clean formatting\"\n i18n-createLink=\"kendo.editor.createLink|The title of the tool that creates hyperlinks.\"\n createLink=\"Insert link\"\n i18n-dialogApply=\"kendo.editor.dialogApply|The label of the **Apply** button in all editor dialogs.\"\n dialogApply=\"Apply\"\n i18n-dialogCancel=\"kendo.editor.dialogCancel|The label of the **Cancel** button in all editor dialogs.\"\n dialogCancel=\"Cancel\"\n i18n-dialogInsert=\"kendo.editor.dialogInsert|The label of the **Insert** button in all editor dialogs.\"\n dialogInsert=\"Insert\"\n i18n-dialogUpdate=\"kendo.editor.dialogUpdate|The label of the **Update** button in all editor dialogs.\"\n dialogUpdate=\"Update\"\n i18n-fileText=\"kendo.editor.fileText|The caption for the file text in the insertFile dialog.\"\n fileText=\"Text\"\n i18n-fileTitle=\"kendo.editor.fileTitle|The caption for the file Title in the insertFile dialog.\"\n fileTitle=\"Title\"\n i18n-fileWebAddress=\"kendo.editor.fileWebAddress|The caption for the file URL in the insertFile dialog.\"\n fileWebAddress=\"Web address\"\n i18n-fontFamily=\"kendo.editor.fontFamily|The title of the tool that changes the text font.\"\n fontFamily=\"Select font family\"\n i18n-fontSize=\"kendo.editor.fontSize|The title of the tool that changes the text size.\"\n fontSize=\"Select font size\"\n i18n-foreColor=\"kendo.editor.foreColor|The title of the tool that changes the text color.\"\n foreColor=\"Color\"\n i18n-format=\"kendo.editor.format|The title of the tool that lets users choose block formats.\"\n format=\"Format\"\n i18n-imageAltText=\"kendo.editor.imageAltText|The caption for the image alternate text in the insertImage dialog.\"\n imageAltText=\"Alternate text\"\n i18n-imageHeight=\"kendo.editor.imageHeight|The caption for the image height in the insertImage dialog.\"\n imageHeight=\"Height (px)\"\n i18n-imageWebAddress=\"kendo.editor.imageWebAddress|The caption for the image URL in the insertImage dialog.\"\n imageWebAddress=\"Web address\"\n i18n-imageWidth=\"kendo.editor.imageWidth|The caption for the image width in the insertImage dialog.\"\n imageWidth=\"Width (px)\"\n i18n-indent=\"kendo.editor.indent|The title of the tool that indents the content.\"\n indent=\"Indent\"\n i18n-insertFile=\"kendo.editor.insertFile|The title of the tool that inserts links to files.\"\n insertFile=\"Insert file\"\n i18n-insertImage=\"kendo.editor.insertImage|The title of the tool that inserts images.\"\n insertImage=\"Insert image\"\n i18n-insertOrderedList=\"kendo.editor.insertOrderedList|The title of the tool that inserts an ordered list.\"\n insertOrderedList=\"Insert ordered list\"\n i18n-insertUnorderedList=\"kendo.editor.insertUnorderedList|The title of the tool that inserts an unordered list.\"\n insertUnorderedList=\"Insert unordered list\"\n i18n-italic=\"kendo.editor.italic|The title of the tool that makes text italicized.\"\n italic=\"Italic\"\n i18n-linkOpenInNewWindow=\"kendo.editor.linkOpenInNewWindow|The caption for the checkbox for opening the link in a new window in the createLink dialog.\"\n linkOpenInNewWindow=\"Open link in new window\"\n i18n-linkText=\"kendo.editor.linkText|The caption for the link text in the createLink dialog.\"\n linkText=\"Text\"\n i18n-linkTitle=\"kendo.editor.linkTitle|The caption for the link title in the createLink dialog.\"\n linkTitle=\"Title\"\n i18n-linkWebAddress=\"kendo.editor.linkWebAddress|The caption for the URL in the createLink dialog.\"\n linkWebAddress=\"Web address\"\n i18n-outdent=\"kendo.editor.outdent|The title of the tool that outdents the content.\"\n outdent=\"Outdent\"\n i18n-print=\"kendo.editor.print|The title of the print tool.\"\n print=\"Print\"\n i18n-redo=\"kendo.editor.redo|The title of the tool that undos the last action.\"\n redo=\"Redo\"\n i18n-selectAll=\"kendo.editor.selectAll|The title of the tool that selects all content.\"\n selectAll=\"Select All\"\n i18n-strikethrough=\"kendo.editor.strikethrough|The title of the tool that strikes through text.\"\n strikethrough=\"Strikethrough\"\n i18n-subscript=\"kendo.editor.subscript|The title of the tool that makes text subscript.\"\n subscript=\"Subscript\"\n i18n-superscript=\"kendo.editor.superscript|The title of the tool that makes text superscript.\"\n superscript=\"Superscript\"\n i18n-underline=\"kendo.editor.underline|The title of the tool that underlines text.\"\n underline=\"Underline\"\n i18n-unlink=\"kendo.editor.unlink|The title of the tool that removes hyperlinks.\"\n unlink=\"Remove Link\"\n i18n-undo=\"kendo.editor.undo|The title of the tool that undos the last action.\"\n undo=\"Undo\"\n i18n-viewSource=\"kendo.editor.viewSource|The title of the tool that shows the editor value as HTML.\"\n viewSource=\"View source\"\n i18n-insertTable=\"kendo.editor.insertTable|The title of the tool that inserts table.\"\n insertTable=\"Insert Table\"\n i18n-addColumnBefore=\"kendo.editor.addColumnBefore|The title of the tool that adds new column before currently selected column.\"\n addColumnBefore=\"Add column before\"\n i18n-addColumnAfter=\"kendo.editor.addColumnAfter|The title of the tool that adds new column after currently selected column.\"\n addColumnAfter=\"Add column after\"\n i18n-addRowBefore=\"kendo.editor.addRowBefore|The title of the tool that adds new row before currently selected row.\"\n addRowBefore=\"Add row before\"\n i18n-addRowAfter=\"kendo.editor.addRowAfter|The title of the tool that adds new row after currently selected row.\"\n addRowAfter=\"Add row after\"\n i18n-deleteColumn=\"kendo.editor.deleteColumn|The title of the tool that deletes a table column.\"\n deleteColumn=\"Delete column\"\n i18n-deleteRow=\"kendo.editor.deleteRow|The title of the tool that deletes a table row.\"\n deleteRow=\"Delete row\"\n i18n-deleteTable=\"kendo.editor.deleteTable|The title of the tool that deletes a table.\"\n deleteTable=\"Delete table\"\n >\n </ng-container>\n\n <ng-content select=\"kendo-toolbar\"></ng-content>\n <kendo-toolbar [overflow]=\"true\" [tabindex]=\"readonly ? -1 : 0\" *ngIf=\"!userToolBarElement\" #defaultToolbar>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorBoldButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorItalicButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorUnderlineButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-dropdownlist kendoEditorFormat></kendo-toolbar-dropdownlist>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorAlignLeftButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignCenterButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignRightButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignJustifyButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorInsertUnorderedListButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorInsertOrderedListButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorIndentButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorOutdentButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorCreateLinkButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorUnlinkButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorInsertImageButton></kendo-toolbar-button>\n </kendo-toolbar>\n\n <div *ngIf=\"!iframe\" #content [attr.dir]=\"direction\" class=\"k-editor-content\"></div>\n\n <div class=\"k-editor-content\" *ngIf=\"iframe\">\n <iframe #content frameborder=\"0\" class=\"k-iframe\" (load)=\"iframeOnLoad()\"></iframe>\n </div>\n\n <ng-container #dialogsContainer></ng-container>\n ",
985
986
  styles: [
986
987
  "\n >>> .k-editor-content > .ProseMirror {\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n outline: none;\n overflow: auto;\n }\n\n .k-iframe {\n width: 100%;\n height: 100%;\n display: block;\n }\n "
987
988
  ]
@@ -68,6 +68,8 @@ var editor_fontfamily_dropdownlist_component_1 = require("./tools/fontfamily/edi
68
68
  var editor_fontsize_dropdownlist_component_1 = require("./tools/fontsize/editor-fontsize-dropdownlist.component");
69
69
  var font_size_dialog_component_1 = require("./dialogs/font-size-dialog.component");
70
70
  var dropdown_tool_directive_1 = require("./tools/shared/dropdown-tool.directive");
71
+ var editor_print_button_directive_1 = require("./tools/print/editor-print-button.directive");
72
+ var select_all_button_directive_1 = require("./tools/select-all/select-all-button.directive");
71
73
  var COMPONENT_DIRECTIVES = [
72
74
  //alignment
73
75
  editor_align_left_button_directive_1.EditorAlignLeftButtonDirective,
@@ -119,7 +121,11 @@ var COMPONENT_DIRECTIVES = [
119
121
  custom_messages_component_1.CustomMessagesComponent,
120
122
  localized_messages_directive_1.LocalizedMessagesDirective,
121
123
  // dropdown tools
122
- dropdown_tool_directive_1.DropDownToolDirective
124
+ dropdown_tool_directive_1.DropDownToolDirective,
125
+ // print
126
+ editor_print_button_directive_1.EditorPrintDirective,
127
+ // select all
128
+ select_all_button_directive_1.EditorSelectAllButtonDirective
123
129
  ];
124
130
  var TOOLBAR_TOOLS = [
125
131
  editor_fontsize_component_1.EditorFontSizeComponent,
package/dist/npm/index.js CHANGED
@@ -81,6 +81,10 @@ var editor_insert_ordered_list_button_directive_1 = require("./tools/list/editor
81
81
  exports.EditorInsertOrderedListButtonDirective = editor_insert_ordered_list_button_directive_1.EditorInsertOrderedListButtonDirective
82
82
  var editor_insert_unordered_list_button_directive_1 = require("./tools/list/editor-insert-unordered-list-button.directive");
83
83
  exports.EditorInsertUnorderedListButtonDirective = editor_insert_unordered_list_button_directive_1.EditorInsertUnorderedListButtonDirective
84
+ var editor_print_button_directive_1 = require("./tools/print/editor-print-button.directive");
85
+ exports.EditorPrintDirective = editor_print_button_directive_1.EditorPrintDirective
86
+ var select_all_button_directive_1 = require("./tools/select-all/select-all-button.directive");
87
+ exports.EditorSelectAllButtonDirective = select_all_button_directive_1.EditorSelectAllButtonDirective
84
88
  var dropdown_tool_directive_1 = require("./tools/shared/dropdown-tool.directive");
85
89
  exports.DropDownToolDirective = dropdown_tool_directive_1.DropDownToolDirective
86
90
  var editor_command_base_1 = require("./tools/shared/editor-command-base");
@@ -91,10 +91,18 @@ var Messages = /** @class */ (function (_super) {
91
91
  core_1.Input(),
92
92
  tslib_1.__metadata("design:type", String)
93
93
  ], Messages.prototype, "outdent", void 0);
94
+ tslib_1.__decorate([
95
+ core_1.Input(),
96
+ tslib_1.__metadata("design:type", String)
97
+ ], Messages.prototype, "print", void 0);
94
98
  tslib_1.__decorate([
95
99
  core_1.Input(),
96
100
  tslib_1.__metadata("design:type", String)
97
101
  ], Messages.prototype, "redo", void 0);
102
+ tslib_1.__decorate([
103
+ core_1.Input(),
104
+ tslib_1.__metadata("design:type", String)
105
+ ], Messages.prototype, "selectAll", void 0);
98
106
  tslib_1.__decorate([
99
107
  core_1.Input(),
100
108
  tslib_1.__metadata("design:type", String)
@@ -11,7 +11,7 @@ exports.packageMetadata = {
11
11
  name: '@progress/kendo-angular-editor',
12
12
  productName: 'Kendo UI for Angular',
13
13
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
14
- publishDate: 1637061495,
14
+ publishDate: 1637689470,
15
15
  version: '',
16
16
  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'
17
17
  };
@@ -0,0 +1,69 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ var tslib_1 = require("tslib");
8
+ var core_1 = require("@angular/core");
9
+ var kendo_angular_toolbar_1 = require("@progress/kendo-angular-toolbar");
10
+ var editor_component_1 = require("../../editor.component");
11
+ var editor_command_button_1 = require("../shared/editor-command-button");
12
+ var editor_localization_service_1 = require("../../localization/editor-localization.service");
13
+ var error_messages_1 = require("../../common/error-messages");
14
+ /**
15
+ * A directive which configures an existing `ToolBarButtonComponent` as an Editor Print tool
16
+ * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
17
+ * The directive will predefine the `icon` and `click` event handlers of the button.
18
+ *
19
+ * > 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.
20
+ *
21
+ * @example
22
+ * ```ts-no-run
23
+ * <kendo-toolbar-button kendoEditorPrintButton></kendo-toolbar-button>
24
+ * ```
25
+ *
26
+ * The following example demonstrates how to change the default icon that is applied by the directive.
27
+ *
28
+ * @example
29
+ * ```ts-no-run
30
+ * <kendo-toolbar-button kendoEditorPrintButton icon="blogger"></kendo-toolbar-button>
31
+ * ```
32
+ */
33
+ var EditorPrintDirective = /** @class */ (function (_super) {
34
+ tslib_1.__extends(EditorPrintDirective, _super);
35
+ function EditorPrintDirective(button, editor, localization) {
36
+ var _this = _super.call(this, 'print', button, editor, localization) || this;
37
+ _this.editor = editor;
38
+ return _this;
39
+ }
40
+ EditorPrintDirective.prototype.ngAfterViewInit = function () {
41
+ if (core_1.isDevMode) {
42
+ if (!this.editor.iframe) {
43
+ throw new Error(error_messages_1.EditorErrorMessages.printTool);
44
+ }
45
+ }
46
+ };
47
+ EditorPrintDirective.prototype.clickHandler = function () {
48
+ if (this.editor.iframe) {
49
+ var view = this.editor.view;
50
+ var dom = view && view.dom;
51
+ var doc = dom && dom.ownerDocument;
52
+ var editorWindow = doc && doc.defaultView;
53
+ if (editorWindow) {
54
+ editorWindow.print();
55
+ }
56
+ }
57
+ };
58
+ EditorPrintDirective = tslib_1.__decorate([
59
+ core_1.Directive({
60
+ selector: 'kendo-toolbar-button[kendoEditorPrintButton]'
61
+ }),
62
+ tslib_1.__param(1, core_1.Host()),
63
+ tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
64
+ editor_component_1.EditorComponent,
65
+ editor_localization_service_1.EditorLocalizationService])
66
+ ], EditorPrintDirective);
67
+ return EditorPrintDirective;
68
+ }(editor_command_button_1.EditorCommandButton));
69
+ exports.EditorPrintDirective = EditorPrintDirective;
@@ -0,0 +1,50 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ var tslib_1 = require("tslib");
8
+ var core_1 = require("@angular/core");
9
+ var kendo_angular_toolbar_1 = require("@progress/kendo-angular-toolbar");
10
+ var editor_component_1 = require("../../editor.component");
11
+ var editor_command_button_1 = require("../shared/editor-command-button");
12
+ var editor_localization_service_1 = require("../../localization/editor-localization.service");
13
+ /**
14
+ * A directive which configures an existing `ToolBarButtonComponent` as an Editor SelectAll tool
15
+ * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
16
+ * The directive will predefine the `icon` and `click` event handlers of the button.
17
+ *
18
+ * @example
19
+ * ```ts-no-run
20
+ * <kendo-toolbar-button kendoEditorSelectAllButton></kendo-toolbar-button>
21
+ * ```
22
+ *
23
+ * The following example demonstrates how to change the default icon that is applied by the directive.
24
+ *
25
+ * @example
26
+ * ```ts-no-run
27
+ * <kendo-toolbar-button kendoEditorSelectAllButton icon="blogger"></kendo-toolbar-button>
28
+ * ```
29
+ */
30
+ var EditorSelectAllButtonDirective = /** @class */ (function (_super) {
31
+ tslib_1.__extends(EditorSelectAllButtonDirective, _super);
32
+ function EditorSelectAllButtonDirective(button, editor, localization) {
33
+ return _super.call(this, 'selectAll', button, editor, localization) || this;
34
+ }
35
+ EditorSelectAllButtonDirective.prototype.clickHandler = function () {
36
+ this.editor.shouldEmitFocus = true;
37
+ _super.prototype.clickHandler.call(this);
38
+ };
39
+ EditorSelectAllButtonDirective = tslib_1.__decorate([
40
+ core_1.Directive({
41
+ selector: 'kendo-toolbar-button[kendoEditorSelectAllButton]'
42
+ }),
43
+ tslib_1.__param(1, core_1.Host()),
44
+ tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
45
+ editor_component_1.EditorComponent,
46
+ editor_localization_service_1.EditorLocalizationService])
47
+ ], EditorSelectAllButtonDirective);
48
+ return EditorSelectAllButtonDirective;
49
+ }(editor_command_button_1.EditorCommandButton));
50
+ exports.EditorSelectAllButtonDirective = EditorSelectAllButtonDirective;
@@ -16,18 +16,20 @@ var EditorCommandBase = /** @class */ (function () {
16
16
  this.localization = localization;
17
17
  }
18
18
  EditorCommandBase.prototype.ngOnInit = function () {
19
- var _this = this;
20
19
  this.subs = this.editor.stateChange.subscribe(this.onStateChange.bind(this));
21
20
  this.subs.add(this.button.click.subscribe((this.clickHandler.bind(this))));
22
21
  this.subs.add(this.button.pointerdown.subscribe((this.pointerdownHandler.bind(this))));
23
- Promise.resolve(null).then(function () {
22
+ };
23
+ EditorCommandBase.prototype.ngAfterViewInit = function () {
24
+ var _this = this;
25
+ setTimeout(function () {
24
26
  var text = _this.localization.get(_this.command);
25
27
  if (text) {
26
- _this.button.showText = "overflow";
27
- _this.button.showIcon = "both";
28
+ _this.button.showText = 'overflow';
29
+ _this.button.showIcon = 'both';
28
30
  _this.button.text = text;
29
31
  }
30
- if (!_this.button.icon) {
32
+ if (!_this.button.toolbarOptions.icon) {
31
33
  _this.button.icon = command_icons_1.commandIcons[_this.command];
32
34
  }
33
35
  _this.button.title = text;