@progress/kendo-angular-editor 21.4.1 → 22.0.0-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/fesm2022/progress-kendo-angular-editor.mjs +196 -196
  2. package/localization/messages.d.ts +1 -1
  3. package/package.json +20 -28
  4. package/schematics/ngAdd/index.js +4 -4
  5. package/tools/shared/editor-command-base.d.ts +1 -1
  6. package/esm2022/common/active-marks.mjs +0 -5
  7. package/esm2022/common/apply-to-word-options.mjs +0 -5
  8. package/esm2022/common/commands.mjs +0 -5
  9. package/esm2022/common/css-settings.interface.mjs +0 -5
  10. package/esm2022/common/direction.mjs +0 -5
  11. package/esm2022/common/error-messages.mjs +0 -16
  12. package/esm2022/common/font-family-item.interface.mjs +0 -5
  13. package/esm2022/common/font-size-item.interface.mjs +0 -5
  14. package/esm2022/common/format-item.interface.mjs +0 -5
  15. package/esm2022/common/image-data.interface.mjs +0 -5
  16. package/esm2022/common/link-data.interface.mjs +0 -5
  17. package/esm2022/common/paste-cleanup-settings.mjs +0 -5
  18. package/esm2022/common/plugins-function.mjs +0 -5
  19. package/esm2022/common/predicate.mjs +0 -5
  20. package/esm2022/common/provider.service.mjs +0 -17
  21. package/esm2022/common/resizable-options.interface.mjs +0 -5
  22. package/esm2022/common/styles.mjs +0 -306
  23. package/esm2022/common/table-data.interface.mjs +0 -5
  24. package/esm2022/config/command-icons.mjs +0 -93
  25. package/esm2022/config/commands.mjs +0 -62
  26. package/esm2022/config/schema.mjs +0 -22
  27. package/esm2022/config/semantic-nodes.mjs +0 -27
  28. package/esm2022/config/table-commands.mjs +0 -14
  29. package/esm2022/config/utils.mjs +0 -96
  30. package/esm2022/dialogs/colorpicker-dialog.component.mjs +0 -140
  31. package/esm2022/dialogs/file-link-dialog.component.mjs +0 -252
  32. package/esm2022/dialogs/font-family-dialog.component.mjs +0 -115
  33. package/esm2022/dialogs/font-size-dialog.component.mjs +0 -115
  34. package/esm2022/dialogs/format-dialog.component.mjs +0 -114
  35. package/esm2022/dialogs/image-dialog.component.mjs +0 -230
  36. package/esm2022/dialogs/insert-table-dialog.component.mjs +0 -79
  37. package/esm2022/dialogs/source-dialog.component.mjs +0 -112
  38. package/esm2022/directives.mjs +0 -95
  39. package/esm2022/editor-toolbar-state.mjs +0 -280
  40. package/esm2022/editor.component.mjs +0 -1319
  41. package/esm2022/editor.module.mjs +0 -89
  42. package/esm2022/index.mjs +0 -64
  43. package/esm2022/localization/custom-messages.component.mjs +0 -53
  44. package/esm2022/localization/editor-localization.service.mjs +0 -31
  45. package/esm2022/localization/localized-messages.directive.mjs +0 -35
  46. package/esm2022/localization/messages.mjs +0 -364
  47. package/esm2022/package-metadata.mjs +0 -16
  48. package/esm2022/preventable-events/paste-event.mjs +0 -32
  49. package/esm2022/preventable-events/preventable-event.mjs +0 -25
  50. package/esm2022/progress-kendo-angular-editor.mjs +0 -8
  51. package/esm2022/tools/alignment/editor-align-center-button.directive.mjs +0 -42
  52. package/esm2022/tools/alignment/editor-align-justify-button.directive.mjs +0 -42
  53. package/esm2022/tools/alignment/editor-align-left-button.directive.mjs +0 -42
  54. package/esm2022/tools/alignment/editor-align-right-button.directive.mjs +0 -42
  55. package/esm2022/tools/blockquote/editor-blockquote-button.directive.mjs +0 -40
  56. package/esm2022/tools/colorpicker/editor-back-color.directive.mjs +0 -41
  57. package/esm2022/tools/colorpicker/editor-colorpicker.component.mjs +0 -377
  58. package/esm2022/tools/colorpicker/editor-fore-color.directive.mjs +0 -37
  59. package/esm2022/tools/editor-clean-formatting-button.directive.mjs +0 -41
  60. package/esm2022/tools/fontfamily/editor-fontfamily-dropdownlist.component.mjs +0 -109
  61. package/esm2022/tools/fontfamily/editor-fontfamily.component.mjs +0 -297
  62. package/esm2022/tools/fontsize/editor-fontsize-dropdownlist.component.mjs +0 -98
  63. package/esm2022/tools/fontsize/editor-fontsize.component.mjs +0 -305
  64. package/esm2022/tools/format/editor-format-dropdownlist.component.mjs +0 -182
  65. package/esm2022/tools/format/editor-format.component.mjs +0 -283
  66. package/esm2022/tools/history/editor-redo-button.directive.mjs +0 -42
  67. package/esm2022/tools/history/editor-undo-button.directive.mjs +0 -42
  68. package/esm2022/tools/image/editor-insert-image-button.directive.mjs +0 -41
  69. package/esm2022/tools/indentation/editor-indent-button.directive.mjs +0 -41
  70. package/esm2022/tools/indentation/editor-outdent-button.directive.mjs +0 -41
  71. package/esm2022/tools/link/editor-create-link-button.directive.mjs +0 -41
  72. package/esm2022/tools/link/editor-insert-file-button.directive.mjs +0 -40
  73. package/esm2022/tools/link/editor-unlink-button.directive.mjs +0 -41
  74. package/esm2022/tools/list/editor-insert-ordered-list-button.directive.mjs +0 -41
  75. package/esm2022/tools/list/editor-insert-unordered-list-button.directive.mjs +0 -42
  76. package/esm2022/tools/print/editor-print-button.directive.mjs +0 -62
  77. package/esm2022/tools/select-all/select-all-button.directive.mjs +0 -45
  78. package/esm2022/tools/shared/dropdown-tool.directive.mjs +0 -40
  79. package/esm2022/tools/shared/editor-command-base.mjs +0 -78
  80. package/esm2022/tools/shared/editor-command-button.mjs +0 -37
  81. package/esm2022/tools/shared/editor-command-dialog.mjs +0 -33
  82. package/esm2022/tools/source/editor-view-source-button.directive.mjs +0 -41
  83. package/esm2022/tools/tables/editor-add-column-after-button.directive.mjs +0 -42
  84. package/esm2022/tools/tables/editor-add-column-before-button.directive.mjs +0 -42
  85. package/esm2022/tools/tables/editor-add-row-after-button.directive.mjs +0 -42
  86. package/esm2022/tools/tables/editor-add-row-before-button.directive.mjs +0 -42
  87. package/esm2022/tools/tables/editor-delete-column-button.directive.mjs +0 -42
  88. package/esm2022/tools/tables/editor-delete-row-button.directive.mjs +0 -42
  89. package/esm2022/tools/tables/editor-delete-table-button.directive.mjs +0 -42
  90. package/esm2022/tools/tables/editor-insert-table-button.component.mjs +0 -307
  91. package/esm2022/tools/tables/editor-merge-cells-button.directive.mjs +0 -44
  92. package/esm2022/tools/tables/editor-split-cell-button.directive.mjs +0 -44
  93. package/esm2022/tools/tables/popup-table-grid.component.mjs +0 -117
  94. package/esm2022/tools/tools.service.mjs +0 -22
  95. package/esm2022/tools/typographical-emphasis/editor-bold-button.directive.mjs +0 -42
  96. package/esm2022/tools/typographical-emphasis/editor-italic-button.directive.mjs +0 -42
  97. package/esm2022/tools/typographical-emphasis/editor-strikethrough-button.directive.mjs +0 -42
  98. package/esm2022/tools/typographical-emphasis/editor-subscript-button.directive.mjs +0 -42
  99. package/esm2022/tools/typographical-emphasis/editor-superscript-button.directive.mjs +0 -42
  100. package/esm2022/tools/typographical-emphasis/editor-underline-button.directive.mjs +0 -42
  101. package/esm2022/util.mjs +0 -130
@@ -1,41 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive } from '@angular/core';
6
- import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
- import { EditorCommandButton } from '../shared/editor-command-button';
8
- import { EditorLocalizationService } from '../../localization/editor-localization.service';
9
- import { ProviderService } from '../../common/provider.service';
10
- import { EditorToolsService } from '../tools.service';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "@progress/kendo-angular-toolbar";
13
- import * as i2 from "../../localization/editor-localization.service";
14
- import * as i3 from "../../common/provider.service";
15
- import * as i4 from "../tools.service";
16
- /**
17
- * Configures a ToolBarButtonComponent as an Editor **InsertOrderedList** tool ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
18
- * The directive sets the SVG icon and `click` event handlers for the button.
19
- * The directive also updates the `selected` state of the button based on the cursor position in the editing area.
20
- *
21
- * @example
22
- * ```html
23
- * <kendo-toolbar-button kendoEditorInsertOrderedListButton></kendo-toolbar-button>
24
- * ```
25
- * @remarks
26
- * Applied to: {@link ToolBarButtonComponent}
27
- */
28
- export class EditorInsertOrderedListButtonDirective extends EditorCommandButton {
29
- constructor(button, localization, providerService, toolsService) {
30
- super('insertOrderedList', button, localization, providerService, toolsService);
31
- }
32
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorInsertOrderedListButtonDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.EditorLocalizationService }, { token: i3.ProviderService }, { token: i4.EditorToolsService }], target: i0.ɵɵFactoryTarget.Directive });
33
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: EditorInsertOrderedListButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorInsertOrderedListButton]", usesInheritance: true, ngImport: i0 });
34
- }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorInsertOrderedListButtonDirective, decorators: [{
36
- type: Directive,
37
- args: [{
38
- selector: 'kendo-toolbar-button[kendoEditorInsertOrderedListButton]',
39
- standalone: true
40
- }]
41
- }], ctorParameters: () => [{ type: i1.ToolBarButtonComponent }, { type: i2.EditorLocalizationService }, { type: i3.ProviderService }, { type: i4.EditorToolsService }] });
@@ -1,42 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive } from '@angular/core';
6
- import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
- import { EditorCommandButton } from '../shared/editor-command-button';
8
- import { EditorLocalizationService } from '../../localization/editor-localization.service';
9
- import { ProviderService } from '../../common/provider.service';
10
- import { EditorToolsService } from '../tools.service';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "@progress/kendo-angular-toolbar";
13
- import * as i2 from "../../localization/editor-localization.service";
14
- import * as i3 from "../../common/provider.service";
15
- import * as i4 from "../tools.service";
16
- /**
17
- * Configures a ToolBarButtonComponent as an Editor **InsertUnorderedList** tool
18
- * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
19
- * This directive sets the SVG icon and `click` event handlers for the button.
20
- * It also updates the `selected` state of the button based on the cursor position in the editing area.
21
- *
22
- * @example
23
- * ```html
24
- * <kendo-toolbar-button kendoEditorInsertUnorderedListButton></kendo-toolbar-button>
25
- * ```
26
- * @remarks
27
- * Applied to: {@link ToolBarButtonComponent}
28
- */
29
- export class EditorInsertUnorderedListButtonDirective extends EditorCommandButton {
30
- constructor(button, localization, providerService, toolsService) {
31
- super('insertUnorderedList', button, localization, providerService, toolsService);
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorInsertUnorderedListButtonDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.EditorLocalizationService }, { token: i3.ProviderService }, { token: i4.EditorToolsService }], target: i0.ɵɵFactoryTarget.Directive });
34
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: EditorInsertUnorderedListButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorInsertUnorderedListButton]", usesInheritance: true, ngImport: i0 });
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorInsertUnorderedListButtonDirective, decorators: [{
37
- type: Directive,
38
- args: [{
39
- selector: 'kendo-toolbar-button[kendoEditorInsertUnorderedListButton]',
40
- standalone: true
41
- }]
42
- }], ctorParameters: () => [{ type: i1.ToolBarButtonComponent }, { type: i2.EditorLocalizationService }, { type: i3.ProviderService }, { type: i4.EditorToolsService }] });
@@ -1,62 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive, isDevMode } from '@angular/core';
6
- import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
- import { EditorCommandButton } from '../shared/editor-command-button';
8
- import { EditorLocalizationService } from '../../localization/editor-localization.service';
9
- import { EditorErrorMessages } from '../../common/error-messages';
10
- import { EditorToolsService } from '../tools.service';
11
- import { ProviderService } from '../../common/provider.service';
12
- import * as i0 from "@angular/core";
13
- import * as i1 from "@progress/kendo-angular-toolbar";
14
- import * as i2 from "../../localization/editor-localization.service";
15
- import * as i3 from "../../common/provider.service";
16
- import * as i4 from "../tools.service";
17
- /**
18
- * Configures a ToolBarButtonComponent as an Editor **Print** tool
19
- * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
20
- * This directive sets the SVG icon and `click` event handlers for the button.
21
- *
22
- * The Editor Print tool works only in the default [`iframe`](slug:api_editor_editorcomponent#iframe) mode.
23
- *
24
- * @example
25
- * ```html
26
- * <kendo-toolbar-button kendoEditorPrintButton></kendo-toolbar-button>
27
- * ```
28
- * @remarks
29
- * Applied to: {@link ToolBarButtonComponent}
30
- */
31
- export class EditorPrintDirective extends EditorCommandButton {
32
- constructor(button, localization, providerService, toolsService) {
33
- super('print', button, localization, providerService, toolsService);
34
- }
35
- ngAfterViewInit() {
36
- if (isDevMode) {
37
- if (!this.editor.iframe) {
38
- throw new Error(EditorErrorMessages.printTool);
39
- }
40
- }
41
- }
42
- clickHandler() {
43
- if (this.editor.iframe) {
44
- const view = this.editor.view;
45
- const dom = view && view.dom;
46
- const doc = dom && dom.ownerDocument;
47
- const editorWindow = doc && doc.defaultView;
48
- if (editorWindow) {
49
- editorWindow.print();
50
- }
51
- }
52
- }
53
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorPrintDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.EditorLocalizationService }, { token: i3.ProviderService }, { token: i4.EditorToolsService }], target: i0.ɵɵFactoryTarget.Directive });
54
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: EditorPrintDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorPrintButton]", usesInheritance: true, ngImport: i0 });
55
- }
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorPrintDirective, decorators: [{
57
- type: Directive,
58
- args: [{
59
- selector: 'kendo-toolbar-button[kendoEditorPrintButton]',
60
- standalone: true
61
- }]
62
- }], ctorParameters: () => [{ type: i1.ToolBarButtonComponent }, { type: i2.EditorLocalizationService }, { type: i3.ProviderService }, { type: i4.EditorToolsService }] });
@@ -1,45 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive } from '@angular/core';
6
- import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
- import { EditorCommandButton } from '../shared/editor-command-button';
8
- import { EditorLocalizationService } from '../../localization/editor-localization.service';
9
- import { EditorToolsService } from '../tools.service';
10
- import { ProviderService } from '../../common/provider.service';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "@progress/kendo-angular-toolbar";
13
- import * as i2 from "../../localization/editor-localization.service";
14
- import * as i3 from "../../common/provider.service";
15
- import * as i4 from "../tools.service";
16
- /**
17
- * Configures a ToolBarButtonComponent as an Editor **SelectAll** tool
18
- * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
19
- * This directive sets the SVG icon and `click` event handlers for the button.
20
- *
21
- * @example
22
- * ```html
23
- * <kendo-toolbar-button kendoEditorSelectAllButton></kendo-toolbar-button>
24
- * ```
25
- * @remarks
26
- * Applied to: {@link ToolBarButtonComponent}
27
- */
28
- export class EditorSelectAllButtonDirective extends EditorCommandButton {
29
- constructor(button, localization, providerService, toolsService) {
30
- super('selectAll', button, localization, providerService, toolsService);
31
- }
32
- clickHandler() {
33
- this.editor.shouldEmitFocus = true;
34
- super.clickHandler();
35
- }
36
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorSelectAllButtonDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.EditorLocalizationService }, { token: i3.ProviderService }, { token: i4.EditorToolsService }], target: i0.ɵɵFactoryTarget.Directive });
37
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: EditorSelectAllButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorSelectAllButton]", usesInheritance: true, ngImport: i0 });
38
- }
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorSelectAllButtonDirective, decorators: [{
40
- type: Directive,
41
- args: [{
42
- selector: 'kendo-toolbar-button[kendoEditorSelectAllButton]',
43
- standalone: true
44
- }]
45
- }], ctorParameters: () => [{ type: i1.ToolBarButtonComponent }, { type: i2.EditorLocalizationService }, { type: i3.ProviderService }, { type: i4.EditorToolsService }] });
@@ -1,40 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive, ElementRef, NgZone } from '@angular/core';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * @hidden
9
- */
10
- export class DropDownToolDirective {
11
- hostEl;
12
- zone;
13
- get hostElement() {
14
- return this.hostEl.nativeElement;
15
- }
16
- constructor(hostEl, zone) {
17
- this.hostEl = hostEl;
18
- this.zone = zone;
19
- }
20
- ngAfterViewInit() {
21
- this.zone.runOutsideAngular(() => {
22
- this.hostElement.addEventListener('pointerdown', this.preventDefault);
23
- });
24
- }
25
- ngOnDestroy() {
26
- this.hostElement.removeEventListener('pointerdown', this.preventDefault);
27
- }
28
- preventDefault = (event) => {
29
- event.preventDefault();
30
- };
31
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DropDownToolDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
32
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: DropDownToolDirective, isStandalone: true, selector: "[kendoEditorDropDownTool]", ngImport: i0 });
33
- }
34
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DropDownToolDirective, decorators: [{
35
- type: Directive,
36
- args: [{
37
- selector: '[kendoEditorDropDownTool]',
38
- standalone: true
39
- }]
40
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }] });
@@ -1,78 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
6
- import { commandIcons, commandSVGIcons } from '../../config/command-icons';
7
- import { LocalizationService } from '@progress/kendo-angular-l10n';
8
- import { ProviderService } from '../../common/provider.service';
9
- import { Directive, Inject, InjectionToken } from '@angular/core';
10
- import { EditorToolsService } from '../tools.service';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "@progress/kendo-angular-toolbar";
13
- import * as i2 from "@progress/kendo-angular-l10n";
14
- import * as i3 from "../../common/provider.service";
15
- import * as i4 from "../tools.service";
16
- const MY_TOKEN = new InjectionToken('COMMAND_TOKEN');
17
- /**
18
- * @hidden
19
- */
20
- export class EditorCommandBaseDirective {
21
- command;
22
- button;
23
- localization;
24
- toolsService;
25
- subs;
26
- editor;
27
- constructor(command, button, localization, providerService, toolsService) {
28
- this.command = command;
29
- this.button = button;
30
- this.localization = localization;
31
- this.toolsService = toolsService;
32
- this.editor = providerService.editor;
33
- this.toolsService.zone.runOutsideAngular(() => {
34
- setTimeout(() => {
35
- const text = this.localization.get(this.command);
36
- if (text) {
37
- this.button.showText = 'menu';
38
- this.button.showIcon = 'always';
39
- this.button.text = text;
40
- }
41
- if (!this.button.toolbarOptions.icon) {
42
- this.button.icon = commandIcons[this.command];
43
- }
44
- if (!this.button.toolbarOptions.svgIcon) {
45
- this.button.svgIcon = commandSVGIcons[this.command];
46
- }
47
- this.button.title = text;
48
- this.toolsService.zone.run(() => {
49
- this.toolsService.needsCheck.next(undefined);
50
- });
51
- });
52
- });
53
- }
54
- ngOnInit() {
55
- this.subs = this.editor.stateChange.subscribe(this.onStateChange.bind(this));
56
- this.subs.add(this.button.click.subscribe((this.clickHandler.bind(this))));
57
- this.subs.add(this.button.pointerdown.subscribe((this.pointerdownHandler.bind(this))));
58
- }
59
- ngOnDestroy() {
60
- if (this.subs) {
61
- this.subs.unsubscribe();
62
- }
63
- }
64
- clickHandler() { }
65
- pointerdownHandler(_event) { }
66
- onStateChange(_toolBarState) { }
67
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorCommandBaseDirective, deps: [{ token: MY_TOKEN }, { token: i1.ToolBarButtonComponent }, { token: i2.LocalizationService }, { token: i3.ProviderService }, { token: i4.EditorToolsService }], target: i0.ɵɵFactoryTarget.Directive });
68
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: EditorCommandBaseDirective, selector: "[kendoEditorCommandBase]", ngImport: i0 });
69
- }
70
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorCommandBaseDirective, decorators: [{
71
- type: Directive,
72
- args: [{
73
- selector: '[kendoEditorCommandBase]'
74
- }]
75
- }], ctorParameters: () => [{ type: undefined, decorators: [{
76
- type: Inject,
77
- args: [MY_TOKEN]
78
- }] }, { type: i1.ToolBarButtonComponent }, { type: i2.LocalizationService }, { type: i3.ProviderService }, { type: i4.EditorToolsService }] });
@@ -1,37 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { EditorCommandBaseDirective } from './editor-command-base';
6
- import { take } from 'rxjs/operators';
7
- /**
8
- * @hidden
9
- */
10
- export class EditorCommandButton extends EditorCommandBaseDirective {
11
- command;
12
- button;
13
- localization;
14
- providerService;
15
- toolsService;
16
- constructor(command, button, localization, providerService, toolsService) {
17
- super(command, button, localization, providerService, toolsService);
18
- this.command = command;
19
- this.button = button;
20
- this.localization = localization;
21
- this.providerService = providerService;
22
- this.toolsService = toolsService;
23
- }
24
- clickHandler() {
25
- this.editor.exec(this.command, this.editor.applyToWord);
26
- this.editor.focus();
27
- }
28
- pointerdownHandler(e) {
29
- e.preventDefault();
30
- }
31
- onStateChange(toolBarState) {
32
- this.providerService.editor.ngZone.onStable.pipe(take(1)).subscribe(() => {
33
- this.button.selected = toolBarState[this.command].selected;
34
- this.button.disabled = toolBarState[this.command].disabled;
35
- });
36
- }
37
- }
@@ -1,33 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { EditorCommandBaseDirective } from './editor-command-base';
6
- import { take } from 'rxjs/operators';
7
- /**
8
- * @hidden
9
- */
10
- export class EditorCommandDialog extends EditorCommandBaseDirective {
11
- dialog;
12
- button;
13
- localization;
14
- providerService;
15
- toolsService;
16
- constructor(dialog, button, localization, providerService, toolsService) {
17
- super(dialog, button, localization, providerService, toolsService);
18
- this.dialog = dialog;
19
- this.button = button;
20
- this.localization = localization;
21
- this.providerService = providerService;
22
- this.toolsService = toolsService;
23
- }
24
- clickHandler() {
25
- this.editor.openDialog(this.dialog);
26
- }
27
- onStateChange(toolBarState) {
28
- this.providerService.editor.ngZone.onStable.pipe(take(1)).subscribe(() => {
29
- this.button.selected = toolBarState[this.command].selected;
30
- this.button.disabled = toolBarState[this.command].disabled;
31
- });
32
- }
33
- }
@@ -1,41 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive } from '@angular/core';
6
- import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
- import { EditorCommandDialog } from '../shared/editor-command-dialog';
8
- import { EditorLocalizationService } from '../../localization/editor-localization.service';
9
- import { ProviderService } from '../../common/provider.service';
10
- import { EditorToolsService } from '../tools.service';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "@progress/kendo-angular-toolbar";
13
- import * as i2 from "../../localization/editor-localization.service";
14
- import * as i3 from "../../common/provider.service";
15
- import * as i4 from "../tools.service";
16
- /**
17
- * Configures a ToolBarButtonComponent as an Editor **ViewSource** tool
18
- * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
19
- * The directive sets the SVG icon and `click` event handlers for the button.
20
- *
21
- * @example
22
- * ```html
23
- * <kendo-toolbar-button kendoEditorViewSourceButton></kendo-toolbar-button>
24
- * ```
25
- * @remarks
26
- * Applied to: {@link ToolBarButtonComponent}
27
- */
28
- export class EditorViewSourceButtonDirective extends EditorCommandDialog {
29
- constructor(button, localization, providerService, toolsService) {
30
- super('viewSource', button, localization, providerService, toolsService);
31
- }
32
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorViewSourceButtonDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.EditorLocalizationService }, { token: i3.ProviderService }, { token: i4.EditorToolsService }], target: i0.ɵɵFactoryTarget.Directive });
33
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: EditorViewSourceButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorViewSourceButton]", usesInheritance: true, ngImport: i0 });
34
- }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorViewSourceButtonDirective, decorators: [{
36
- type: Directive,
37
- args: [{
38
- selector: 'kendo-toolbar-button[kendoEditorViewSourceButton]',
39
- standalone: true
40
- }]
41
- }], ctorParameters: () => [{ type: i1.ToolBarButtonComponent }, { type: i2.EditorLocalizationService }, { type: i3.ProviderService }, { type: i4.EditorToolsService }] });
@@ -1,42 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive } from '@angular/core';
6
- import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
- import { EditorCommandButton } from '../shared/editor-command-button';
8
- import { EditorLocalizationService } from '../../localization/editor-localization.service';
9
- import { ProviderService } from '../../common/provider.service';
10
- import { EditorToolsService } from '../tools.service';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "@progress/kendo-angular-toolbar";
13
- import * as i2 from "../../localization/editor-localization.service";
14
- import * as i3 from "../../common/provider.service";
15
- import * as i4 from "../tools.service";
16
- /**
17
- * Configures a ToolBarButtonComponent as an Editor **AddColumnAfter** tool
18
- * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
19
- * The directive sets the SVG icon and `click` event handlers for the button.
20
- * The directive also updates the `disabled` state of the button based on the cursor position in the editing area.
21
- *
22
- * @example
23
- * ```html
24
- * <kendo-toolbar-button kendoEditorAddColumnAfterButton></kendo-toolbar-button>
25
- * ```
26
- * @remarks
27
- * Applied to: {@link ToolBarButtonComponent}
28
- */
29
- export class EditorAddColumnAfterButtonDirective extends EditorCommandButton {
30
- constructor(button, localization, providerService, toolsService) {
31
- super('addColumnAfter', button, localization, providerService, toolsService);
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorAddColumnAfterButtonDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.EditorLocalizationService }, { token: i3.ProviderService }, { token: i4.EditorToolsService }], target: i0.ɵɵFactoryTarget.Directive });
34
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: EditorAddColumnAfterButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorAddColumnAfterButton]", usesInheritance: true, ngImport: i0 });
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorAddColumnAfterButtonDirective, decorators: [{
37
- type: Directive,
38
- args: [{
39
- selector: 'kendo-toolbar-button[kendoEditorAddColumnAfterButton]',
40
- standalone: true
41
- }]
42
- }], ctorParameters: () => [{ type: i1.ToolBarButtonComponent }, { type: i2.EditorLocalizationService }, { type: i3.ProviderService }, { type: i4.EditorToolsService }] });
@@ -1,42 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive } from '@angular/core';
6
- import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
- import { EditorCommandButton } from '../shared/editor-command-button';
8
- import { EditorLocalizationService } from '../../localization/editor-localization.service';
9
- import { ProviderService } from '../../common/provider.service';
10
- import { EditorToolsService } from '../tools.service';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "@progress/kendo-angular-toolbar";
13
- import * as i2 from "../../localization/editor-localization.service";
14
- import * as i3 from "../../common/provider.service";
15
- import * as i4 from "../tools.service";
16
- /**
17
- * Configures a ToolBarButtonComponent as an Editor **AddColumnBefore** tool
18
- * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
19
- * The directive sets the SVG icon and `click` event handlers for the button.
20
- * The directive also updates the `disabled` state of the button based on the cursor position in the editing area.
21
- *
22
- * @example
23
- * ```html
24
- * <kendo-toolbar-button kendoEditorAddColumnBeforeButton></kendo-toolbar-button>
25
- * ```
26
- * @remarks
27
- * Applied to: {@link ToolBarButtonComponent}
28
- */
29
- export class EditorAddColumnBeforeButtonDirective extends EditorCommandButton {
30
- constructor(button, localization, providerService, toolsService) {
31
- super('addColumnBefore', button, localization, providerService, toolsService);
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorAddColumnBeforeButtonDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.EditorLocalizationService }, { token: i3.ProviderService }, { token: i4.EditorToolsService }], target: i0.ɵɵFactoryTarget.Directive });
34
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: EditorAddColumnBeforeButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorAddColumnBeforeButton]", usesInheritance: true, ngImport: i0 });
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorAddColumnBeforeButtonDirective, decorators: [{
37
- type: Directive,
38
- args: [{
39
- selector: 'kendo-toolbar-button[kendoEditorAddColumnBeforeButton]',
40
- standalone: true
41
- }]
42
- }], ctorParameters: () => [{ type: i1.ToolBarButtonComponent }, { type: i2.EditorLocalizationService }, { type: i3.ProviderService }, { type: i4.EditorToolsService }] });
@@ -1,42 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive } from '@angular/core';
6
- import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
- import { EditorCommandButton } from '../shared/editor-command-button';
8
- import { EditorLocalizationService } from '../../localization/editor-localization.service';
9
- import { ProviderService } from '../../common/provider.service';
10
- import { EditorToolsService } from '../tools.service';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "@progress/kendo-angular-toolbar";
13
- import * as i2 from "../../localization/editor-localization.service";
14
- import * as i3 from "../../common/provider.service";
15
- import * as i4 from "../tools.service";
16
- /**
17
- * Configures a ToolBarButtonComponent as an Editor **AddRowAfter** tool
18
- * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
19
- * The directive sets the SVG icon and `click` event handlers for the button.
20
- * The directive also updates the `disabled` state of the button based on the cursor position in the editing area.
21
- *
22
- * @example
23
- * ```html
24
- * <kendo-toolbar-button kendoEditorAddRowAfterButton></kendo-toolbar-button>
25
- * ```
26
- * @remarks
27
- * Applied to: {@link ToolBarButtonComponent}
28
- */
29
- export class EditorAddRowAfterButtonDirective extends EditorCommandButton {
30
- constructor(button, localization, providerService, toolsService) {
31
- super('addRowAfter', button, localization, providerService, toolsService);
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorAddRowAfterButtonDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.EditorLocalizationService }, { token: i3.ProviderService }, { token: i4.EditorToolsService }], target: i0.ɵɵFactoryTarget.Directive });
34
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: EditorAddRowAfterButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorAddRowAfterButton]", usesInheritance: true, ngImport: i0 });
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorAddRowAfterButtonDirective, decorators: [{
37
- type: Directive,
38
- args: [{
39
- selector: 'kendo-toolbar-button[kendoEditorAddRowAfterButton]',
40
- standalone: true
41
- }]
42
- }], ctorParameters: () => [{ type: i1.ToolBarButtonComponent }, { type: i2.EditorLocalizationService }, { type: i3.ProviderService }, { type: i4.EditorToolsService }] });
@@ -1,42 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive } from '@angular/core';
6
- import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
- import { EditorCommandButton } from '../shared/editor-command-button';
8
- import { EditorLocalizationService } from '../../localization/editor-localization.service';
9
- import { ProviderService } from '../../common/provider.service';
10
- import { EditorToolsService } from '../tools.service';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "@progress/kendo-angular-toolbar";
13
- import * as i2 from "../../localization/editor-localization.service";
14
- import * as i3 from "../../common/provider.service";
15
- import * as i4 from "../tools.service";
16
- /**
17
- * Configures a ToolBarButtonComponent as an Editor **AddRowBefore** tool
18
- * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
19
- * The directive sets the SVG icon and `click` event handlers for the button.
20
- * The directive also updates the `disabled` state of the button based on the cursor position in the editing area.
21
- *
22
- * @example
23
- * ```html
24
- * <kendo-toolbar-button kendoEditorAddRowBeforeButton></kendo-toolbar-button>
25
- * ```
26
- * @remarks
27
- * Applied to: {@link ToolBarButtonComponent}
28
- */
29
- export class EditorAddRowBeforeButtonDirective extends EditorCommandButton {
30
- constructor(button, localization, providerService, toolsService) {
31
- super('addRowBefore', button, localization, providerService, toolsService);
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorAddRowBeforeButtonDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.EditorLocalizationService }, { token: i3.ProviderService }, { token: i4.EditorToolsService }], target: i0.ɵɵFactoryTarget.Directive });
34
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: EditorAddRowBeforeButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorAddRowBeforeButton]", usesInheritance: true, ngImport: i0 });
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorAddRowBeforeButtonDirective, decorators: [{
37
- type: Directive,
38
- args: [{
39
- selector: 'kendo-toolbar-button[kendoEditorAddRowBeforeButton]',
40
- standalone: true
41
- }]
42
- }], ctorParameters: () => [{ type: i1.ToolBarButtonComponent }, { type: i2.EditorLocalizationService }, { type: i3.ProviderService }, { type: i4.EditorToolsService }] });