@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.
- package/dist/cdn/js/kendo-angular-editor.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/common/error-messages.js +2 -1
- package/dist/es/config/command-icons.js +4 -2
- package/dist/es/config/commands.js +32 -31
- package/dist/es/editor-toolbar-state.js +20 -2
- package/dist/es/editor.component.js +11 -5
- package/dist/es/editor.module.js +7 -1
- package/dist/es/index.js +3 -0
- package/dist/es/localization/messages.js +8 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/tools/alignment/editor-align-center-button.directive.js +5 -3
- package/dist/es/tools/alignment/editor-align-justify-button.directive.js +5 -3
- package/dist/es/tools/alignment/editor-align-left-button.directive.js +5 -3
- package/dist/es/tools/alignment/editor-align-right-button.directive.js +5 -3
- package/dist/es/tools/editor-clean-formatting-button.directive.js +5 -3
- package/dist/es/tools/fontfamily/editor-fontfamily.component.js +9 -3
- package/dist/es/tools/fontsize/editor-fontsize.component.js +9 -3
- package/dist/es/tools/format/editor-format.component.js +9 -3
- package/dist/es/tools/history/editor-redo-button.directive.js +5 -3
- package/dist/es/tools/history/editor-undo-button.directive.js +5 -3
- package/dist/es/tools/image/editor-insert-image-button.directive.js +5 -3
- package/dist/es/tools/indentation/editor-indent-button.directive.js +5 -3
- package/dist/es/tools/indentation/editor-outdent-button.directive.js +5 -3
- package/dist/es/tools/link/editor-create-link-button.directive.js +5 -3
- package/dist/es/tools/link/editor-insert-file-button.directive.js +5 -3
- package/dist/es/tools/link/editor-unlink-button.directive.js +5 -3
- package/dist/es/tools/list/editor-insert-ordered-list-button.directive.js +5 -3
- package/dist/es/tools/list/editor-insert-unordered-list-button.directive.js +5 -3
- package/dist/es/tools/print/editor-print-button.directive.js +69 -0
- package/dist/es/tools/select-all/select-all-button.directive.js +50 -0
- package/dist/es/tools/shared/editor-command-base.js +13 -11
- package/dist/es/tools/shared/editor-command-button.js +3 -2
- package/dist/es/tools/shared/editor-command-dialog.js +3 -2
- package/dist/es/tools/source/editor-view-source-button.directive.js +5 -3
- package/dist/es/tools/tables/editor-add-column-after-button.directive.js +5 -3
- package/dist/es/tools/tables/editor-add-column-before-button.directive.js +5 -3
- package/dist/es/tools/tables/editor-add-row-after-button.directive.js +5 -3
- package/dist/es/tools/tables/editor-add-row-before-button.directive.js +5 -3
- package/dist/es/tools/tables/editor-delete-column-button.directive.js +5 -3
- package/dist/es/tools/tables/editor-delete-row-button.directive.js +5 -3
- package/dist/es/tools/tables/editor-delete-table-button.directive.js +5 -3
- package/dist/es/tools/tables/editor-merge-cells-button.directive.js +5 -3
- package/dist/es/tools/tables/editor-split-cell-button.directive.js +5 -3
- package/dist/es/tools/tools.service.js +20 -0
- package/dist/es/tools/typographical-emphasis/editor-bold-button.directive.js +5 -3
- package/dist/es/tools/typographical-emphasis/editor-italic-button.directive.js +5 -3
- package/dist/es/tools/typographical-emphasis/editor-strikethrough-button.directive.js +5 -3
- package/dist/es/tools/typographical-emphasis/editor-subscript-button.directive.js +5 -3
- package/dist/es/tools/typographical-emphasis/editor-superscript-button.directive.js +5 -3
- package/dist/es/tools/typographical-emphasis/editor-underline-button.directive.js +5 -3
- package/dist/es2015/common/commands.d.ts +5 -1
- package/dist/es2015/common/error-messages.js +2 -1
- package/dist/es2015/config/command-icons.d.ts +2 -2
- package/dist/es2015/config/command-icons.js +4 -2
- package/dist/es2015/config/commands.js +31 -30
- package/dist/es2015/editor-toolbar-state.js +20 -2
- package/dist/es2015/editor.component.d.ts +8 -1
- package/dist/es2015/editor.component.js +14 -4
- package/dist/es2015/editor.module.js +7 -1
- package/dist/es2015/index.d.ts +3 -0
- package/dist/es2015/index.js +3 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/localization/messages.d.ts +8 -0
- package/dist/es2015/localization/messages.js +8 -0
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/tools/alignment/editor-align-center-button.directive.d.ts +2 -1
- package/dist/es2015/tools/alignment/editor-align-center-button.directive.js +5 -3
- package/dist/es2015/tools/alignment/editor-align-justify-button.directive.d.ts +2 -1
- package/dist/es2015/tools/alignment/editor-align-justify-button.directive.js +5 -3
- package/dist/es2015/tools/alignment/editor-align-left-button.directive.d.ts +2 -1
- package/dist/es2015/tools/alignment/editor-align-left-button.directive.js +5 -3
- package/dist/es2015/tools/alignment/editor-align-right-button.directive.d.ts +2 -1
- package/dist/es2015/tools/alignment/editor-align-right-button.directive.js +5 -3
- package/dist/es2015/tools/editor-clean-formatting-button.directive.d.ts +2 -1
- package/dist/es2015/tools/editor-clean-formatting-button.directive.js +5 -3
- package/dist/es2015/tools/fontfamily/editor-fontfamily.component.d.ts +3 -1
- package/dist/es2015/tools/fontfamily/editor-fontfamily.component.js +9 -3
- package/dist/es2015/tools/fontsize/editor-fontsize.component.d.ts +3 -1
- package/dist/es2015/tools/fontsize/editor-fontsize.component.js +9 -3
- package/dist/es2015/tools/format/editor-format.component.d.ts +3 -1
- package/dist/es2015/tools/format/editor-format.component.js +9 -3
- package/dist/es2015/tools/history/editor-redo-button.directive.d.ts +2 -1
- package/dist/es2015/tools/history/editor-redo-button.directive.js +5 -3
- package/dist/es2015/tools/history/editor-undo-button.directive.d.ts +2 -1
- package/dist/es2015/tools/history/editor-undo-button.directive.js +5 -3
- package/dist/es2015/tools/image/editor-insert-image-button.directive.d.ts +2 -1
- package/dist/es2015/tools/image/editor-insert-image-button.directive.js +5 -3
- package/dist/es2015/tools/indentation/editor-indent-button.directive.d.ts +2 -1
- package/dist/es2015/tools/indentation/editor-indent-button.directive.js +5 -3
- package/dist/es2015/tools/indentation/editor-outdent-button.directive.d.ts +2 -1
- package/dist/es2015/tools/indentation/editor-outdent-button.directive.js +5 -3
- package/dist/es2015/tools/link/editor-create-link-button.directive.d.ts +2 -1
- package/dist/es2015/tools/link/editor-create-link-button.directive.js +5 -3
- package/dist/es2015/tools/link/editor-insert-file-button.directive.d.ts +2 -1
- package/dist/es2015/tools/link/editor-insert-file-button.directive.js +5 -3
- package/dist/es2015/tools/link/editor-unlink-button.directive.d.ts +2 -1
- package/dist/es2015/tools/link/editor-unlink-button.directive.js +5 -3
- package/dist/es2015/tools/list/editor-insert-ordered-list-button.directive.d.ts +2 -1
- package/dist/es2015/tools/list/editor-insert-ordered-list-button.directive.js +5 -3
- package/dist/es2015/tools/list/editor-insert-unordered-list-button.directive.d.ts +2 -1
- package/dist/es2015/tools/list/editor-insert-unordered-list-button.directive.js +5 -3
- package/dist/es2015/tools/print/editor-print-button.directive.d.ts +34 -0
- package/dist/es2015/tools/print/editor-print-button.directive.js +66 -0
- package/dist/es2015/tools/select-all/select-all-button.directive.d.ts +30 -0
- package/dist/es2015/tools/select-all/select-all-button.directive.js +48 -0
- package/dist/es2015/tools/shared/editor-command-base.d.ts +5 -3
- package/dist/es2015/tools/shared/editor-command-base.js +12 -10
- package/dist/es2015/tools/shared/editor-command-button.d.ts +5 -3
- package/dist/es2015/tools/shared/editor-command-button.js +3 -2
- package/dist/es2015/tools/shared/editor-command-dialog.d.ts +3 -1
- package/dist/es2015/tools/shared/editor-command-dialog.js +3 -2
- package/dist/es2015/tools/source/editor-view-source-button.directive.d.ts +2 -1
- package/dist/es2015/tools/source/editor-view-source-button.directive.js +5 -3
- package/dist/es2015/tools/tables/editor-add-column-after-button.directive.d.ts +2 -1
- package/dist/es2015/tools/tables/editor-add-column-after-button.directive.js +5 -3
- package/dist/es2015/tools/tables/editor-add-column-before-button.directive.d.ts +2 -1
- package/dist/es2015/tools/tables/editor-add-column-before-button.directive.js +5 -3
- package/dist/es2015/tools/tables/editor-add-row-after-button.directive.d.ts +2 -1
- package/dist/es2015/tools/tables/editor-add-row-after-button.directive.js +5 -3
- package/dist/es2015/tools/tables/editor-add-row-before-button.directive.d.ts +2 -1
- package/dist/es2015/tools/tables/editor-add-row-before-button.directive.js +5 -3
- package/dist/es2015/tools/tables/editor-delete-column-button.directive.d.ts +2 -1
- package/dist/es2015/tools/tables/editor-delete-column-button.directive.js +5 -3
- package/dist/es2015/tools/tables/editor-delete-row-button.directive.d.ts +2 -1
- package/dist/es2015/tools/tables/editor-delete-row-button.directive.js +5 -3
- package/dist/es2015/tools/tables/editor-delete-table-button.directive.d.ts +2 -1
- package/dist/es2015/tools/tables/editor-delete-table-button.directive.js +5 -3
- package/dist/es2015/tools/tables/editor-merge-cells-button.directive.d.ts +2 -1
- package/dist/es2015/tools/tables/editor-merge-cells-button.directive.js +5 -3
- package/dist/es2015/tools/tables/editor-split-cell-button.directive.d.ts +2 -1
- package/dist/es2015/tools/tables/editor-split-cell-button.directive.js +5 -3
- package/dist/es2015/tools/tools.service.d.ts +11 -0
- package/dist/es2015/tools/tools.service.js +22 -0
- package/dist/es2015/tools/typographical-emphasis/editor-bold-button.directive.d.ts +2 -1
- package/dist/es2015/tools/typographical-emphasis/editor-bold-button.directive.js +5 -3
- package/dist/es2015/tools/typographical-emphasis/editor-italic-button.directive.d.ts +2 -1
- package/dist/es2015/tools/typographical-emphasis/editor-italic-button.directive.js +5 -3
- package/dist/es2015/tools/typographical-emphasis/editor-strikethrough-button.directive.d.ts +2 -1
- package/dist/es2015/tools/typographical-emphasis/editor-strikethrough-button.directive.js +5 -3
- package/dist/es2015/tools/typographical-emphasis/editor-subscript-button.directive.d.ts +2 -1
- package/dist/es2015/tools/typographical-emphasis/editor-subscript-button.directive.js +5 -3
- package/dist/es2015/tools/typographical-emphasis/editor-superscript-button.directive.d.ts +2 -1
- package/dist/es2015/tools/typographical-emphasis/editor-superscript-button.directive.js +5 -3
- package/dist/es2015/tools/typographical-emphasis/editor-underline-button.directive.d.ts +2 -1
- package/dist/es2015/tools/typographical-emphasis/editor-underline-button.directive.js +5 -3
- package/dist/fesm2015/index.js +358 -159
- package/dist/fesm5/index.js +360 -162
- package/dist/npm/common/error-messages.js +2 -1
- package/dist/npm/config/command-icons.js +4 -2
- package/dist/npm/config/commands.js +33 -31
- package/dist/npm/editor-toolbar-state.js +20 -2
- package/dist/npm/editor.component.js +11 -5
- package/dist/npm/editor.module.js +7 -1
- package/dist/npm/index.js +6 -0
- package/dist/npm/localization/messages.js +8 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/tools/alignment/editor-align-center-button.directive.js +5 -3
- package/dist/npm/tools/alignment/editor-align-justify-button.directive.js +5 -3
- package/dist/npm/tools/alignment/editor-align-left-button.directive.js +5 -3
- package/dist/npm/tools/alignment/editor-align-right-button.directive.js +5 -3
- package/dist/npm/tools/editor-clean-formatting-button.directive.js +5 -3
- package/dist/npm/tools/fontfamily/editor-fontfamily.component.js +9 -3
- package/dist/npm/tools/fontsize/editor-fontsize.component.js +9 -3
- package/dist/npm/tools/format/editor-format.component.js +9 -3
- package/dist/npm/tools/history/editor-redo-button.directive.js +5 -3
- package/dist/npm/tools/history/editor-undo-button.directive.js +5 -3
- package/dist/npm/tools/image/editor-insert-image-button.directive.js +5 -3
- package/dist/npm/tools/indentation/editor-indent-button.directive.js +5 -3
- package/dist/npm/tools/indentation/editor-outdent-button.directive.js +5 -3
- package/dist/npm/tools/link/editor-create-link-button.directive.js +5 -3
- package/dist/npm/tools/link/editor-insert-file-button.directive.js +5 -3
- package/dist/npm/tools/link/editor-unlink-button.directive.js +5 -3
- package/dist/npm/tools/list/editor-insert-ordered-list-button.directive.js +5 -3
- package/dist/npm/tools/list/editor-insert-unordered-list-button.directive.js +5 -3
- package/dist/npm/tools/print/editor-print-button.directive.js +71 -0
- package/dist/npm/tools/select-all/select-all-button.directive.js +52 -0
- package/dist/npm/tools/shared/editor-command-base.js +13 -11
- package/dist/npm/tools/shared/editor-command-button.js +3 -2
- package/dist/npm/tools/shared/editor-command-dialog.js +3 -2
- package/dist/npm/tools/source/editor-view-source-button.directive.js +5 -3
- package/dist/npm/tools/tables/editor-add-column-after-button.directive.js +5 -3
- package/dist/npm/tools/tables/editor-add-column-before-button.directive.js +5 -3
- package/dist/npm/tools/tables/editor-add-row-after-button.directive.js +5 -3
- package/dist/npm/tools/tables/editor-add-row-before-button.directive.js +5 -3
- package/dist/npm/tools/tables/editor-delete-column-button.directive.js +5 -3
- package/dist/npm/tools/tables/editor-delete-row-button.directive.js +5 -3
- package/dist/npm/tools/tables/editor-delete-table-button.directive.js +5 -3
- package/dist/npm/tools/tables/editor-merge-cells-button.directive.js +5 -3
- package/dist/npm/tools/tables/editor-split-cell-button.directive.js +5 -3
- package/dist/npm/tools/tools.service.js +22 -0
- package/dist/npm/tools/typographical-emphasis/editor-bold-button.directive.js +5 -3
- package/dist/npm/tools/typographical-emphasis/editor-italic-button.directive.js +5 -3
- package/dist/npm/tools/typographical-emphasis/editor-strikethrough-button.directive.js +5 -3
- package/dist/npm/tools/typographical-emphasis/editor-subscript-button.directive.js +5 -3
- package/dist/npm/tools/typographical-emphasis/editor-superscript-button.directive.js +5 -3
- package/dist/npm/tools/typographical-emphasis/editor-underline-button.directive.js +5 -3
- package/dist/systemjs/kendo-angular-editor.js +1 -1
- package/package.json +4 -4
|
@@ -13,6 +13,7 @@ var editor_localization_service_1 = require("../../localization/editor-localizat
|
|
|
13
13
|
var kendo_angular_dialog_1 = require("@progress/kendo-angular-dialog");
|
|
14
14
|
var font_size_dialog_component_1 = require("../../dialogs/font-size-dialog.component");
|
|
15
15
|
var editor_fontsize_dropdownlist_component_1 = require("./editor-fontsize-dropdownlist.component");
|
|
16
|
+
var tools_service_1 = require("../tools.service");
|
|
16
17
|
/**
|
|
17
18
|
* A component which configures an existing `DropDownListComponent` as an Editor tool
|
|
18
19
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
@@ -26,11 +27,12 @@ var editor_fontsize_dropdownlist_component_1 = require("./editor-fontsize-dropdo
|
|
|
26
27
|
*/
|
|
27
28
|
var EditorFontSizeComponent = /** @class */ (function (_super) {
|
|
28
29
|
tslib_1.__extends(EditorFontSizeComponent, _super);
|
|
29
|
-
function EditorFontSizeComponent(editor, dialogService, localization) {
|
|
30
|
+
function EditorFontSizeComponent(editor, dialogService, localization, toolsService) {
|
|
30
31
|
var _this = _super.call(this) || this;
|
|
31
32
|
_this.editor = editor;
|
|
32
33
|
_this.dialogService = dialogService;
|
|
33
34
|
_this.localization = localization;
|
|
35
|
+
_this.toolsService = toolsService;
|
|
34
36
|
_this.disabled = false;
|
|
35
37
|
_this.tabindex = -1;
|
|
36
38
|
/**
|
|
@@ -72,7 +74,10 @@ var EditorFontSizeComponent = /** @class */ (function (_super) {
|
|
|
72
74
|
return itemArgs.dataItem.size === null;
|
|
73
75
|
}
|
|
74
76
|
};
|
|
75
|
-
setTimeout(function () {
|
|
77
|
+
setTimeout(function () {
|
|
78
|
+
_this.defaultItem = { text: _this.title, size: null };
|
|
79
|
+
_this.toolsService.needsCheck.next();
|
|
80
|
+
});
|
|
76
81
|
this.subs = this.editor.stateChange.subscribe(function (_a) {
|
|
77
82
|
// remove units(px, em, rem...)
|
|
78
83
|
// string#match returns array
|
|
@@ -195,7 +200,8 @@ var EditorFontSizeComponent = /** @class */ (function (_super) {
|
|
|
195
200
|
tslib_1.__param(0, core_1.Host()),
|
|
196
201
|
tslib_1.__metadata("design:paramtypes", [editor_component_1.EditorComponent,
|
|
197
202
|
kendo_angular_dialog_1.DialogService,
|
|
198
|
-
editor_localization_service_1.EditorLocalizationService
|
|
203
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
204
|
+
tools_service_1.EditorToolsService])
|
|
199
205
|
], EditorFontSizeComponent);
|
|
200
206
|
return EditorFontSizeComponent;
|
|
201
207
|
}(kendo_angular_toolbar_1.ToolBarToolComponent));
|
|
@@ -13,6 +13,7 @@ var editor_component_1 = require("../../editor.component");
|
|
|
13
13
|
var editor_localization_service_1 = require("../../localization/editor-localization.service");
|
|
14
14
|
var format_dialog_component_1 = require("../../dialogs/format-dialog.component");
|
|
15
15
|
var editor_format_dropdownlist_component_1 = require("./editor-format-dropdownlist.component");
|
|
16
|
+
var tools_service_1 = require("../tools.service");
|
|
16
17
|
/**
|
|
17
18
|
* A component which configures an existing `DropDownListComponent` as an Editor tool
|
|
18
19
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
@@ -26,11 +27,12 @@ var editor_format_dropdownlist_component_1 = require("./editor-format-dropdownli
|
|
|
26
27
|
*/
|
|
27
28
|
var EditorFormatComponent = /** @class */ (function (_super) {
|
|
28
29
|
tslib_1.__extends(EditorFormatComponent, _super);
|
|
29
|
-
function EditorFormatComponent(editor, dialogService, localization) {
|
|
30
|
+
function EditorFormatComponent(editor, dialogService, localization, toolsService) {
|
|
30
31
|
var _this = _super.call(this) || this;
|
|
31
32
|
_this.editor = editor;
|
|
32
33
|
_this.dialogService = dialogService;
|
|
33
34
|
_this.localization = localization;
|
|
35
|
+
_this.toolsService = toolsService;
|
|
34
36
|
_this.disabled = false;
|
|
35
37
|
_this.tabindex = -1;
|
|
36
38
|
/**
|
|
@@ -73,7 +75,10 @@ var EditorFormatComponent = /** @class */ (function (_super) {
|
|
|
73
75
|
return itemArgs.dataItem.tag === null;
|
|
74
76
|
}
|
|
75
77
|
};
|
|
76
|
-
setTimeout(function () {
|
|
78
|
+
setTimeout(function () {
|
|
79
|
+
_this.defaultItem = { text: _this.title, tag: null };
|
|
80
|
+
_this.toolsService.needsCheck.next();
|
|
81
|
+
});
|
|
77
82
|
this.subs = this.editor.stateChange.subscribe(function (_a) {
|
|
78
83
|
var format = _a.format;
|
|
79
84
|
var index = _this.data.findIndex(function (item) { return item.tag === format.selected.tag; });
|
|
@@ -192,7 +197,8 @@ var EditorFormatComponent = /** @class */ (function (_super) {
|
|
|
192
197
|
tslib_1.__param(0, core_1.Host()),
|
|
193
198
|
tslib_1.__metadata("design:paramtypes", [editor_component_1.EditorComponent,
|
|
194
199
|
kendo_angular_dialog_1.DialogService,
|
|
195
|
-
editor_localization_service_1.EditorLocalizationService
|
|
200
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
201
|
+
tools_service_1.EditorToolsService])
|
|
196
202
|
], EditorFormatComponent);
|
|
197
203
|
return EditorFormatComponent;
|
|
198
204
|
}(kendo_angular_toolbar_1.ToolBarToolComponent));
|
|
@@ -10,6 +10,7 @@ var kendo_angular_toolbar_1 = require("@progress/kendo-angular-toolbar");
|
|
|
10
10
|
var editor_component_1 = require("../../editor.component");
|
|
11
11
|
var editor_command_button_1 = require("../shared/editor-command-button");
|
|
12
12
|
var editor_localization_service_1 = require("../../localization/editor-localization.service");
|
|
13
|
+
var tools_service_1 = require("../tools.service");
|
|
13
14
|
/**
|
|
14
15
|
* A directive which configures an existing `ToolBarButtonComponent` as an Editor Redo tool
|
|
15
16
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
@@ -30,8 +31,8 @@ var editor_localization_service_1 = require("../../localization/editor-localizat
|
|
|
30
31
|
*/
|
|
31
32
|
var EditorRedoButtonDirective = /** @class */ (function (_super) {
|
|
32
33
|
tslib_1.__extends(EditorRedoButtonDirective, _super);
|
|
33
|
-
function EditorRedoButtonDirective(button, editor, localization) {
|
|
34
|
-
return _super.call(this, 'redo', button, editor, localization) || this;
|
|
34
|
+
function EditorRedoButtonDirective(button, editor, localization, toolsService) {
|
|
35
|
+
return _super.call(this, 'redo', button, editor, localization, toolsService) || this;
|
|
35
36
|
}
|
|
36
37
|
EditorRedoButtonDirective = tslib_1.__decorate([
|
|
37
38
|
core_1.Directive({
|
|
@@ -40,7 +41,8 @@ var EditorRedoButtonDirective = /** @class */ (function (_super) {
|
|
|
40
41
|
tslib_1.__param(1, core_1.Host()),
|
|
41
42
|
tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
|
|
42
43
|
editor_component_1.EditorComponent,
|
|
43
|
-
editor_localization_service_1.EditorLocalizationService
|
|
44
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
45
|
+
tools_service_1.EditorToolsService])
|
|
44
46
|
], EditorRedoButtonDirective);
|
|
45
47
|
return EditorRedoButtonDirective;
|
|
46
48
|
}(editor_command_button_1.EditorCommandButton));
|
|
@@ -10,6 +10,7 @@ var kendo_angular_toolbar_1 = require("@progress/kendo-angular-toolbar");
|
|
|
10
10
|
var editor_component_1 = require("../../editor.component");
|
|
11
11
|
var editor_command_button_1 = require("../shared/editor-command-button");
|
|
12
12
|
var editor_localization_service_1 = require("../../localization/editor-localization.service");
|
|
13
|
+
var tools_service_1 = require("../tools.service");
|
|
13
14
|
/**
|
|
14
15
|
* A directive which configures an existing `ToolBarButtonComponent` as an Editor Undo tool
|
|
15
16
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
@@ -30,8 +31,8 @@ var editor_localization_service_1 = require("../../localization/editor-localizat
|
|
|
30
31
|
*/
|
|
31
32
|
var EditorUndoButtonDirective = /** @class */ (function (_super) {
|
|
32
33
|
tslib_1.__extends(EditorUndoButtonDirective, _super);
|
|
33
|
-
function EditorUndoButtonDirective(button, editor, localization) {
|
|
34
|
-
return _super.call(this, 'undo', button, editor, localization) || this;
|
|
34
|
+
function EditorUndoButtonDirective(button, editor, localization, toolsService) {
|
|
35
|
+
return _super.call(this, 'undo', button, editor, localization, toolsService) || this;
|
|
35
36
|
}
|
|
36
37
|
EditorUndoButtonDirective = tslib_1.__decorate([
|
|
37
38
|
core_1.Directive({
|
|
@@ -40,7 +41,8 @@ var EditorUndoButtonDirective = /** @class */ (function (_super) {
|
|
|
40
41
|
tslib_1.__param(1, core_1.Host()),
|
|
41
42
|
tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
|
|
42
43
|
editor_component_1.EditorComponent,
|
|
43
|
-
editor_localization_service_1.EditorLocalizationService
|
|
44
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
45
|
+
tools_service_1.EditorToolsService])
|
|
44
46
|
], EditorUndoButtonDirective);
|
|
45
47
|
return EditorUndoButtonDirective;
|
|
46
48
|
}(editor_command_button_1.EditorCommandButton));
|
|
@@ -10,6 +10,7 @@ var kendo_angular_toolbar_1 = require("@progress/kendo-angular-toolbar");
|
|
|
10
10
|
var editor_component_1 = require("../../editor.component");
|
|
11
11
|
var editor_command_dialog_1 = require("../shared/editor-command-dialog");
|
|
12
12
|
var editor_localization_service_1 = require("../../localization/editor-localization.service");
|
|
13
|
+
var tools_service_1 = require("../tools.service");
|
|
13
14
|
/**
|
|
14
15
|
* A directive which configures an existing `ToolBarButtonComponent` as an Editor InsertImage tool
|
|
15
16
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
@@ -29,8 +30,8 @@ var editor_localization_service_1 = require("../../localization/editor-localizat
|
|
|
29
30
|
*/
|
|
30
31
|
var EditorInsertImageButtonDirective = /** @class */ (function (_super) {
|
|
31
32
|
tslib_1.__extends(EditorInsertImageButtonDirective, _super);
|
|
32
|
-
function EditorInsertImageButtonDirective(button, editor, localization) {
|
|
33
|
-
return _super.call(this, 'insertImage', button, editor, localization) || this;
|
|
33
|
+
function EditorInsertImageButtonDirective(button, editor, localization, toolsService) {
|
|
34
|
+
return _super.call(this, 'insertImage', button, editor, localization, toolsService) || this;
|
|
34
35
|
}
|
|
35
36
|
EditorInsertImageButtonDirective = tslib_1.__decorate([
|
|
36
37
|
core_1.Directive({
|
|
@@ -39,7 +40,8 @@ var EditorInsertImageButtonDirective = /** @class */ (function (_super) {
|
|
|
39
40
|
tslib_1.__param(1, core_1.Host()),
|
|
40
41
|
tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
|
|
41
42
|
editor_component_1.EditorComponent,
|
|
42
|
-
editor_localization_service_1.EditorLocalizationService
|
|
43
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
44
|
+
tools_service_1.EditorToolsService])
|
|
43
45
|
], EditorInsertImageButtonDirective);
|
|
44
46
|
return EditorInsertImageButtonDirective;
|
|
45
47
|
}(editor_command_dialog_1.EditorCommandDialog));
|
|
@@ -10,6 +10,7 @@ var kendo_angular_toolbar_1 = require("@progress/kendo-angular-toolbar");
|
|
|
10
10
|
var editor_component_1 = require("../../editor.component");
|
|
11
11
|
var editor_command_button_1 = require("../shared/editor-command-button");
|
|
12
12
|
var editor_localization_service_1 = require("../../localization/editor-localization.service");
|
|
13
|
+
var tools_service_1 = require("../tools.service");
|
|
13
14
|
/**
|
|
14
15
|
* A directive which configures an existing `ToolBarButtonComponent` as an Editor Indent tool
|
|
15
16
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
@@ -30,8 +31,8 @@ var editor_localization_service_1 = require("../../localization/editor-localizat
|
|
|
30
31
|
*/
|
|
31
32
|
var EditorIndentButtonDirective = /** @class */ (function (_super) {
|
|
32
33
|
tslib_1.__extends(EditorIndentButtonDirective, _super);
|
|
33
|
-
function EditorIndentButtonDirective(button, editor, localization) {
|
|
34
|
-
return _super.call(this, 'indent', button, editor, localization) || this;
|
|
34
|
+
function EditorIndentButtonDirective(button, editor, localization, toolsService) {
|
|
35
|
+
return _super.call(this, 'indent', button, editor, localization, toolsService) || this;
|
|
35
36
|
}
|
|
36
37
|
EditorIndentButtonDirective = tslib_1.__decorate([
|
|
37
38
|
core_1.Directive({
|
|
@@ -40,7 +41,8 @@ var EditorIndentButtonDirective = /** @class */ (function (_super) {
|
|
|
40
41
|
tslib_1.__param(1, core_1.Host()),
|
|
41
42
|
tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
|
|
42
43
|
editor_component_1.EditorComponent,
|
|
43
|
-
editor_localization_service_1.EditorLocalizationService
|
|
44
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
45
|
+
tools_service_1.EditorToolsService])
|
|
44
46
|
], EditorIndentButtonDirective);
|
|
45
47
|
return EditorIndentButtonDirective;
|
|
46
48
|
}(editor_command_button_1.EditorCommandButton));
|
|
@@ -10,6 +10,7 @@ var kendo_angular_toolbar_1 = require("@progress/kendo-angular-toolbar");
|
|
|
10
10
|
var editor_component_1 = require("../../editor.component");
|
|
11
11
|
var editor_command_button_1 = require("../shared/editor-command-button");
|
|
12
12
|
var editor_localization_service_1 = require("../../localization/editor-localization.service");
|
|
13
|
+
var tools_service_1 = require("../tools.service");
|
|
13
14
|
/**
|
|
14
15
|
* A directive which configures an existing `ToolBarButtonComponent` as an Editor Outdent tool
|
|
15
16
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
@@ -30,8 +31,8 @@ var editor_localization_service_1 = require("../../localization/editor-localizat
|
|
|
30
31
|
*/
|
|
31
32
|
var EditorOutdentButtonDirective = /** @class */ (function (_super) {
|
|
32
33
|
tslib_1.__extends(EditorOutdentButtonDirective, _super);
|
|
33
|
-
function EditorOutdentButtonDirective(button, editor, localization) {
|
|
34
|
-
return _super.call(this, 'outdent', button, editor, localization) || this;
|
|
34
|
+
function EditorOutdentButtonDirective(button, editor, localization, toolsService) {
|
|
35
|
+
return _super.call(this, 'outdent', button, editor, localization, toolsService) || this;
|
|
35
36
|
}
|
|
36
37
|
EditorOutdentButtonDirective = tslib_1.__decorate([
|
|
37
38
|
core_1.Directive({
|
|
@@ -40,7 +41,8 @@ var EditorOutdentButtonDirective = /** @class */ (function (_super) {
|
|
|
40
41
|
tslib_1.__param(1, core_1.Host()),
|
|
41
42
|
tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
|
|
42
43
|
editor_component_1.EditorComponent,
|
|
43
|
-
editor_localization_service_1.EditorLocalizationService
|
|
44
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
45
|
+
tools_service_1.EditorToolsService])
|
|
44
46
|
], EditorOutdentButtonDirective);
|
|
45
47
|
return EditorOutdentButtonDirective;
|
|
46
48
|
}(editor_command_button_1.EditorCommandButton));
|
|
@@ -10,6 +10,7 @@ var kendo_angular_toolbar_1 = require("@progress/kendo-angular-toolbar");
|
|
|
10
10
|
var editor_component_1 = require("../../editor.component");
|
|
11
11
|
var editor_command_dialog_1 = require("../shared/editor-command-dialog");
|
|
12
12
|
var editor_localization_service_1 = require("../../localization/editor-localization.service");
|
|
13
|
+
var tools_service_1 = require("../tools.service");
|
|
13
14
|
/**
|
|
14
15
|
* A directive which configures an existing `ToolBarButtonComponent` as an Editor CreateLink tool
|
|
15
16
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
@@ -30,8 +31,8 @@ var editor_localization_service_1 = require("../../localization/editor-localizat
|
|
|
30
31
|
*/
|
|
31
32
|
var EditorCreateLinkButtonDirective = /** @class */ (function (_super) {
|
|
32
33
|
tslib_1.__extends(EditorCreateLinkButtonDirective, _super);
|
|
33
|
-
function EditorCreateLinkButtonDirective(button, editor, localization) {
|
|
34
|
-
return _super.call(this, 'createLink', button, editor, localization) || this;
|
|
34
|
+
function EditorCreateLinkButtonDirective(button, editor, localization, toolsService) {
|
|
35
|
+
return _super.call(this, 'createLink', button, editor, localization, toolsService) || this;
|
|
35
36
|
}
|
|
36
37
|
EditorCreateLinkButtonDirective = tslib_1.__decorate([
|
|
37
38
|
core_1.Directive({
|
|
@@ -40,7 +41,8 @@ var EditorCreateLinkButtonDirective = /** @class */ (function (_super) {
|
|
|
40
41
|
tslib_1.__param(1, core_1.Host()),
|
|
41
42
|
tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
|
|
42
43
|
editor_component_1.EditorComponent,
|
|
43
|
-
editor_localization_service_1.EditorLocalizationService
|
|
44
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
45
|
+
tools_service_1.EditorToolsService])
|
|
44
46
|
], EditorCreateLinkButtonDirective);
|
|
45
47
|
return EditorCreateLinkButtonDirective;
|
|
46
48
|
}(editor_command_dialog_1.EditorCommandDialog));
|
|
@@ -10,6 +10,7 @@ var editor_component_1 = require("../../editor.component");
|
|
|
10
10
|
var editor_command_dialog_1 = require("../shared/editor-command-dialog");
|
|
11
11
|
var kendo_angular_toolbar_1 = require("@progress/kendo-angular-toolbar");
|
|
12
12
|
var editor_localization_service_1 = require("../../localization/editor-localization.service");
|
|
13
|
+
var tools_service_1 = require("../tools.service");
|
|
13
14
|
/**
|
|
14
15
|
* A directive which configures an existing `ToolBarButtonComponent` as an Editor 'Insert File' tool
|
|
15
16
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
@@ -22,8 +23,8 @@ var editor_localization_service_1 = require("../../localization/editor-localizat
|
|
|
22
23
|
*/
|
|
23
24
|
var EditorInsertFileButtonDirective = /** @class */ (function (_super) {
|
|
24
25
|
tslib_1.__extends(EditorInsertFileButtonDirective, _super);
|
|
25
|
-
function EditorInsertFileButtonDirective(button, editor, localization) {
|
|
26
|
-
return _super.call(this, 'insertFile', button, editor, localization) || this;
|
|
26
|
+
function EditorInsertFileButtonDirective(button, editor, localization, toolsService) {
|
|
27
|
+
return _super.call(this, 'insertFile', button, editor, localization, toolsService) || this;
|
|
27
28
|
}
|
|
28
29
|
EditorInsertFileButtonDirective = tslib_1.__decorate([
|
|
29
30
|
core_1.Directive({
|
|
@@ -32,7 +33,8 @@ var EditorInsertFileButtonDirective = /** @class */ (function (_super) {
|
|
|
32
33
|
tslib_1.__param(1, core_1.Host()),
|
|
33
34
|
tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
|
|
34
35
|
editor_component_1.EditorComponent,
|
|
35
|
-
editor_localization_service_1.EditorLocalizationService
|
|
36
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
37
|
+
tools_service_1.EditorToolsService])
|
|
36
38
|
], EditorInsertFileButtonDirective);
|
|
37
39
|
return EditorInsertFileButtonDirective;
|
|
38
40
|
}(editor_command_dialog_1.EditorCommandDialog));
|
|
@@ -10,6 +10,7 @@ var kendo_angular_toolbar_1 = require("@progress/kendo-angular-toolbar");
|
|
|
10
10
|
var editor_component_1 = require("../../editor.component");
|
|
11
11
|
var editor_command_button_1 = require("../shared/editor-command-button");
|
|
12
12
|
var editor_localization_service_1 = require("../../localization/editor-localization.service");
|
|
13
|
+
var tools_service_1 = require("../tools.service");
|
|
13
14
|
/**
|
|
14
15
|
* A directive which configures an existing `ToolBarButtonComponent` as an Editor Unlink tool
|
|
15
16
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
@@ -30,8 +31,8 @@ var editor_localization_service_1 = require("../../localization/editor-localizat
|
|
|
30
31
|
*/
|
|
31
32
|
var EditorUnlinkButtonDirective = /** @class */ (function (_super) {
|
|
32
33
|
tslib_1.__extends(EditorUnlinkButtonDirective, _super);
|
|
33
|
-
function EditorUnlinkButtonDirective(button, editor, localization) {
|
|
34
|
-
return _super.call(this, 'unlink', button, editor, localization) || this;
|
|
34
|
+
function EditorUnlinkButtonDirective(button, editor, localization, toolsService) {
|
|
35
|
+
return _super.call(this, 'unlink', button, editor, localization, toolsService) || this;
|
|
35
36
|
}
|
|
36
37
|
EditorUnlinkButtonDirective = tslib_1.__decorate([
|
|
37
38
|
core_1.Directive({
|
|
@@ -40,7 +41,8 @@ var EditorUnlinkButtonDirective = /** @class */ (function (_super) {
|
|
|
40
41
|
tslib_1.__param(1, core_1.Host()),
|
|
41
42
|
tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
|
|
42
43
|
editor_component_1.EditorComponent,
|
|
43
|
-
editor_localization_service_1.EditorLocalizationService
|
|
44
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
45
|
+
tools_service_1.EditorToolsService])
|
|
44
46
|
], EditorUnlinkButtonDirective);
|
|
45
47
|
return EditorUnlinkButtonDirective;
|
|
46
48
|
}(editor_command_button_1.EditorCommandButton));
|
|
@@ -10,6 +10,7 @@ var kendo_angular_toolbar_1 = require("@progress/kendo-angular-toolbar");
|
|
|
10
10
|
var editor_component_1 = require("../../editor.component");
|
|
11
11
|
var editor_command_button_1 = require("../shared/editor-command-button");
|
|
12
12
|
var editor_localization_service_1 = require("../../localization/editor-localization.service");
|
|
13
|
+
var tools_service_1 = require("../tools.service");
|
|
13
14
|
/**
|
|
14
15
|
* A directive which configures an existing `ToolBarButtonComponent` as an Editor InsertOrderedList tool
|
|
15
16
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
@@ -30,8 +31,8 @@ var editor_localization_service_1 = require("../../localization/editor-localizat
|
|
|
30
31
|
*/
|
|
31
32
|
var EditorInsertOrderedListButtonDirective = /** @class */ (function (_super) {
|
|
32
33
|
tslib_1.__extends(EditorInsertOrderedListButtonDirective, _super);
|
|
33
|
-
function EditorInsertOrderedListButtonDirective(button, editor, localization) {
|
|
34
|
-
return _super.call(this, 'insertOrderedList', button, editor, localization) || this;
|
|
34
|
+
function EditorInsertOrderedListButtonDirective(button, editor, localization, toolsService) {
|
|
35
|
+
return _super.call(this, 'insertOrderedList', button, editor, localization, toolsService) || this;
|
|
35
36
|
}
|
|
36
37
|
EditorInsertOrderedListButtonDirective = tslib_1.__decorate([
|
|
37
38
|
core_1.Directive({
|
|
@@ -40,7 +41,8 @@ var EditorInsertOrderedListButtonDirective = /** @class */ (function (_super) {
|
|
|
40
41
|
tslib_1.__param(1, core_1.Host()),
|
|
41
42
|
tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
|
|
42
43
|
editor_component_1.EditorComponent,
|
|
43
|
-
editor_localization_service_1.EditorLocalizationService
|
|
44
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
45
|
+
tools_service_1.EditorToolsService])
|
|
44
46
|
], EditorInsertOrderedListButtonDirective);
|
|
45
47
|
return EditorInsertOrderedListButtonDirective;
|
|
46
48
|
}(editor_command_button_1.EditorCommandButton));
|
|
@@ -10,6 +10,7 @@ var kendo_angular_toolbar_1 = require("@progress/kendo-angular-toolbar");
|
|
|
10
10
|
var editor_component_1 = require("../../editor.component");
|
|
11
11
|
var editor_command_button_1 = require("../shared/editor-command-button");
|
|
12
12
|
var editor_localization_service_1 = require("../../localization/editor-localization.service");
|
|
13
|
+
var tools_service_1 = require("../tools.service");
|
|
13
14
|
/**
|
|
14
15
|
* A directive which configures an existing `ToolBarButtonComponent` as an Editor InsertUnorderedList tool
|
|
15
16
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
@@ -30,8 +31,8 @@ var editor_localization_service_1 = require("../../localization/editor-localizat
|
|
|
30
31
|
*/
|
|
31
32
|
var EditorInsertUnorderedListButtonDirective = /** @class */ (function (_super) {
|
|
32
33
|
tslib_1.__extends(EditorInsertUnorderedListButtonDirective, _super);
|
|
33
|
-
function EditorInsertUnorderedListButtonDirective(button, editor, localization) {
|
|
34
|
-
return _super.call(this, 'insertUnorderedList', button, editor, localization) || this;
|
|
34
|
+
function EditorInsertUnorderedListButtonDirective(button, editor, localization, toolsService) {
|
|
35
|
+
return _super.call(this, 'insertUnorderedList', button, editor, localization, toolsService) || this;
|
|
35
36
|
}
|
|
36
37
|
EditorInsertUnorderedListButtonDirective = tslib_1.__decorate([
|
|
37
38
|
core_1.Directive({
|
|
@@ -40,7 +41,8 @@ var EditorInsertUnorderedListButtonDirective = /** @class */ (function (_super)
|
|
|
40
41
|
tslib_1.__param(1, core_1.Host()),
|
|
41
42
|
tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
|
|
42
43
|
editor_component_1.EditorComponent,
|
|
43
|
-
editor_localization_service_1.EditorLocalizationService
|
|
44
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
45
|
+
tools_service_1.EditorToolsService])
|
|
44
46
|
], EditorInsertUnorderedListButtonDirective);
|
|
45
47
|
return EditorInsertUnorderedListButtonDirective;
|
|
46
48
|
}(editor_command_button_1.EditorCommandButton));
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
var tools_service_1 = require("../tools.service");
|
|
15
|
+
/**
|
|
16
|
+
* A directive which configures an existing `ToolBarButtonComponent` as an Editor Print tool
|
|
17
|
+
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
18
|
+
* The directive will predefine the `icon` and `click` event handlers of the button.
|
|
19
|
+
*
|
|
20
|
+
* > 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.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts-no-run
|
|
24
|
+
* <kendo-toolbar-button kendoEditorPrintButton></kendo-toolbar-button>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* The following example demonstrates how to change the default icon that is applied by the directive.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts-no-run
|
|
31
|
+
* <kendo-toolbar-button kendoEditorPrintButton icon="blogger"></kendo-toolbar-button>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
var EditorPrintDirective = /** @class */ (function (_super) {
|
|
35
|
+
tslib_1.__extends(EditorPrintDirective, _super);
|
|
36
|
+
function EditorPrintDirective(button, editor, localization, toolsService) {
|
|
37
|
+
var _this = _super.call(this, 'print', button, editor, localization, toolsService) || this;
|
|
38
|
+
_this.editor = editor;
|
|
39
|
+
return _this;
|
|
40
|
+
}
|
|
41
|
+
EditorPrintDirective.prototype.ngAfterViewInit = function () {
|
|
42
|
+
if (core_1.isDevMode) {
|
|
43
|
+
if (!this.editor.iframe) {
|
|
44
|
+
throw new Error(error_messages_1.EditorErrorMessages.printTool);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
EditorPrintDirective.prototype.clickHandler = function () {
|
|
49
|
+
if (this.editor.iframe) {
|
|
50
|
+
var view = this.editor.view;
|
|
51
|
+
var dom = view && view.dom;
|
|
52
|
+
var doc = dom && dom.ownerDocument;
|
|
53
|
+
var editorWindow = doc && doc.defaultView;
|
|
54
|
+
if (editorWindow) {
|
|
55
|
+
editorWindow.print();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
EditorPrintDirective = tslib_1.__decorate([
|
|
60
|
+
core_1.Directive({
|
|
61
|
+
selector: 'kendo-toolbar-button[kendoEditorPrintButton]'
|
|
62
|
+
}),
|
|
63
|
+
tslib_1.__param(1, core_1.Host()),
|
|
64
|
+
tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
|
|
65
|
+
editor_component_1.EditorComponent,
|
|
66
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
67
|
+
tools_service_1.EditorToolsService])
|
|
68
|
+
], EditorPrintDirective);
|
|
69
|
+
return EditorPrintDirective;
|
|
70
|
+
}(editor_command_button_1.EditorCommandButton));
|
|
71
|
+
exports.EditorPrintDirective = EditorPrintDirective;
|
|
@@ -0,0 +1,52 @@
|
|
|
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 tools_service_1 = require("../tools.service");
|
|
14
|
+
/**
|
|
15
|
+
* A directive which configures an existing `ToolBarButtonComponent` as an Editor SelectAll 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
|
+
* @example
|
|
20
|
+
* ```ts-no-run
|
|
21
|
+
* <kendo-toolbar-button kendoEditorSelectAllButton></kendo-toolbar-button>
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* The following example demonstrates how to change the default icon that is applied by the directive.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts-no-run
|
|
28
|
+
* <kendo-toolbar-button kendoEditorSelectAllButton icon="blogger"></kendo-toolbar-button>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
var EditorSelectAllButtonDirective = /** @class */ (function (_super) {
|
|
32
|
+
tslib_1.__extends(EditorSelectAllButtonDirective, _super);
|
|
33
|
+
function EditorSelectAllButtonDirective(button, editor, localization, toolsService) {
|
|
34
|
+
return _super.call(this, 'selectAll', button, editor, localization, toolsService) || this;
|
|
35
|
+
}
|
|
36
|
+
EditorSelectAllButtonDirective.prototype.clickHandler = function () {
|
|
37
|
+
this.editor.shouldEmitFocus = true;
|
|
38
|
+
_super.prototype.clickHandler.call(this);
|
|
39
|
+
};
|
|
40
|
+
EditorSelectAllButtonDirective = tslib_1.__decorate([
|
|
41
|
+
core_1.Directive({
|
|
42
|
+
selector: 'kendo-toolbar-button[kendoEditorSelectAllButton]'
|
|
43
|
+
}),
|
|
44
|
+
tslib_1.__param(1, core_1.Host()),
|
|
45
|
+
tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
|
|
46
|
+
editor_component_1.EditorComponent,
|
|
47
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
48
|
+
tools_service_1.EditorToolsService])
|
|
49
|
+
], EditorSelectAllButtonDirective);
|
|
50
|
+
return EditorSelectAllButtonDirective;
|
|
51
|
+
}(editor_command_button_1.EditorCommandButton));
|
|
52
|
+
exports.EditorSelectAllButtonDirective = EditorSelectAllButtonDirective;
|
|
@@ -9,29 +9,31 @@ var command_icons_1 = require("../../config/command-icons");
|
|
|
9
9
|
* @hidden
|
|
10
10
|
*/
|
|
11
11
|
var EditorCommandBase = /** @class */ (function () {
|
|
12
|
-
function EditorCommandBase(command, button, editor, localization) {
|
|
12
|
+
function EditorCommandBase(command, button, editor, localization, toolsService) {
|
|
13
|
+
var _this = this;
|
|
13
14
|
this.command = command;
|
|
14
15
|
this.button = button;
|
|
15
16
|
this.editor = editor;
|
|
16
17
|
this.localization = localization;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var _this = this;
|
|
20
|
-
this.subs = this.editor.stateChange.subscribe(this.onStateChange.bind(this));
|
|
21
|
-
this.subs.add(this.button.click.subscribe((this.clickHandler.bind(this))));
|
|
22
|
-
this.subs.add(this.button.pointerdown.subscribe((this.pointerdownHandler.bind(this))));
|
|
23
|
-
Promise.resolve(null).then(function () {
|
|
18
|
+
this.toolsService = toolsService;
|
|
19
|
+
setTimeout(function () {
|
|
24
20
|
var text = _this.localization.get(_this.command);
|
|
25
21
|
if (text) {
|
|
26
|
-
_this.button.showText =
|
|
27
|
-
_this.button.showIcon =
|
|
22
|
+
_this.button.showText = 'overflow';
|
|
23
|
+
_this.button.showIcon = 'both';
|
|
28
24
|
_this.button.text = text;
|
|
29
25
|
}
|
|
30
|
-
if (!_this.button.icon) {
|
|
26
|
+
if (!_this.button.toolbarOptions.icon) {
|
|
31
27
|
_this.button.icon = command_icons_1.commandIcons[_this.command];
|
|
32
28
|
}
|
|
33
29
|
_this.button.title = text;
|
|
30
|
+
_this.toolsService.needsCheck.next();
|
|
34
31
|
});
|
|
32
|
+
}
|
|
33
|
+
EditorCommandBase.prototype.ngOnInit = function () {
|
|
34
|
+
this.subs = this.editor.stateChange.subscribe(this.onStateChange.bind(this));
|
|
35
|
+
this.subs.add(this.button.click.subscribe((this.clickHandler.bind(this))));
|
|
36
|
+
this.subs.add(this.button.pointerdown.subscribe((this.pointerdownHandler.bind(this))));
|
|
35
37
|
};
|
|
36
38
|
EditorCommandBase.prototype.ngOnDestroy = function () {
|
|
37
39
|
if (this.subs) {
|
|
@@ -11,12 +11,13 @@ var editor_command_base_1 = require("./editor-command-base");
|
|
|
11
11
|
*/
|
|
12
12
|
var EditorCommandButton = /** @class */ (function (_super) {
|
|
13
13
|
tslib_1.__extends(EditorCommandButton, _super);
|
|
14
|
-
function EditorCommandButton(command, button, editor, localization) {
|
|
15
|
-
var _this = _super.call(this, command, button, editor, localization) || this;
|
|
14
|
+
function EditorCommandButton(command, button, editor, localization, toolsService) {
|
|
15
|
+
var _this = _super.call(this, command, button, editor, localization, toolsService) || this;
|
|
16
16
|
_this.command = command;
|
|
17
17
|
_this.button = button;
|
|
18
18
|
_this.editor = editor;
|
|
19
19
|
_this.localization = localization;
|
|
20
|
+
_this.toolsService = toolsService;
|
|
20
21
|
return _this;
|
|
21
22
|
}
|
|
22
23
|
EditorCommandButton.prototype.clickHandler = function () {
|
|
@@ -11,12 +11,13 @@ var editor_command_base_1 = require("./editor-command-base");
|
|
|
11
11
|
*/
|
|
12
12
|
var EditorCommandDialog = /** @class */ (function (_super) {
|
|
13
13
|
tslib_1.__extends(EditorCommandDialog, _super);
|
|
14
|
-
function EditorCommandDialog(dialog, button, editor, localization) {
|
|
15
|
-
var _this = _super.call(this, dialog, button, editor, localization) || this;
|
|
14
|
+
function EditorCommandDialog(dialog, button, editor, localization, toolsService) {
|
|
15
|
+
var _this = _super.call(this, dialog, button, editor, localization, toolsService) || this;
|
|
16
16
|
_this.dialog = dialog;
|
|
17
17
|
_this.button = button;
|
|
18
18
|
_this.editor = editor;
|
|
19
19
|
_this.localization = localization;
|
|
20
|
+
_this.toolsService = toolsService;
|
|
20
21
|
return _this;
|
|
21
22
|
}
|
|
22
23
|
EditorCommandDialog.prototype.clickHandler = function () {
|
|
@@ -10,6 +10,7 @@ var kendo_angular_toolbar_1 = require("@progress/kendo-angular-toolbar");
|
|
|
10
10
|
var editor_component_1 = require("../../editor.component");
|
|
11
11
|
var editor_command_dialog_1 = require("../shared/editor-command-dialog");
|
|
12
12
|
var editor_localization_service_1 = require("../../localization/editor-localization.service");
|
|
13
|
+
var tools_service_1 = require("../tools.service");
|
|
13
14
|
/**
|
|
14
15
|
* A directive which configures an existing `ToolBarButtonComponent` as an Editor ViewSource tool
|
|
15
16
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
@@ -29,8 +30,8 @@ var editor_localization_service_1 = require("../../localization/editor-localizat
|
|
|
29
30
|
*/
|
|
30
31
|
var EditorViewSourceButtonDirective = /** @class */ (function (_super) {
|
|
31
32
|
tslib_1.__extends(EditorViewSourceButtonDirective, _super);
|
|
32
|
-
function EditorViewSourceButtonDirective(button, editor, localization) {
|
|
33
|
-
return _super.call(this, 'viewSource', button, editor, localization) || this;
|
|
33
|
+
function EditorViewSourceButtonDirective(button, editor, localization, toolsService) {
|
|
34
|
+
return _super.call(this, 'viewSource', button, editor, localization, toolsService) || this;
|
|
34
35
|
}
|
|
35
36
|
EditorViewSourceButtonDirective = tslib_1.__decorate([
|
|
36
37
|
core_1.Directive({
|
|
@@ -39,7 +40,8 @@ var EditorViewSourceButtonDirective = /** @class */ (function (_super) {
|
|
|
39
40
|
tslib_1.__param(1, core_1.Host()),
|
|
40
41
|
tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
|
|
41
42
|
editor_component_1.EditorComponent,
|
|
42
|
-
editor_localization_service_1.EditorLocalizationService
|
|
43
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
44
|
+
tools_service_1.EditorToolsService])
|
|
43
45
|
], EditorViewSourceButtonDirective);
|
|
44
46
|
return EditorViewSourceButtonDirective;
|
|
45
47
|
}(editor_command_dialog_1.EditorCommandDialog));
|