@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,22 +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 { Injectable, NgZone } from '@angular/core';
6
- import { Subject } from 'rxjs';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * @hidden
10
- */
11
- export class EditorToolsService {
12
- zone;
13
- needsCheck = new Subject();
14
- constructor(zone) {
15
- this.zone = zone;
16
- }
17
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorToolsService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
18
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorToolsService });
19
- }
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorToolsService, decorators: [{
21
- type: Injectable
22
- }], ctorParameters: () => [{ type: i0.NgZone }] });
@@ -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 **Bold** 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
- * The directive 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 kendoEditorBoldButton></kendo-toolbar-button>
25
- * ```
26
- * @remarks
27
- * Applied to: {@link ToolBarButtonComponent}
28
- */
29
- export class EditorBoldButtonDirective extends EditorCommandButton {
30
- constructor(button, localization, providerService, toolsService) {
31
- super('bold', button, localization, providerService, toolsService);
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorBoldButtonDirective, 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: EditorBoldButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorBoldButton]", usesInheritance: true, ngImport: i0 });
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorBoldButtonDirective, decorators: [{
37
- type: Directive,
38
- args: [{
39
- selector: 'kendo-toolbar-button[kendoEditorBoldButton]',
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 **Italic** 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
- * The directive 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 kendoEditorItalicButton></kendo-toolbar-button>
25
- * ```
26
- * @remarks
27
- * Applied to: {@link ToolBarButtonComponent}
28
- */
29
- export class EditorItalicButtonDirective extends EditorCommandButton {
30
- constructor(button, localization, providerService, toolsService) {
31
- super('italic', button, localization, providerService, toolsService);
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorItalicButtonDirective, 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: EditorItalicButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorItalicButton]", usesInheritance: true, ngImport: i0 });
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorItalicButtonDirective, decorators: [{
37
- type: Directive,
38
- args: [{
39
- selector: 'kendo-toolbar-button[kendoEditorItalicButton]',
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 **Strikethrough** 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
- * The directive 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 kendoEditorStrikethroughButton></kendo-toolbar-button>
25
- * ```
26
- * @remarks
27
- * Applied to: {@link ToolBarButtonComponent}
28
- */
29
- export class EditorStrikethroughButtonDirective extends EditorCommandButton {
30
- constructor(button, localization, providerService, toolsService) {
31
- super('strikethrough', button, localization, providerService, toolsService);
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorStrikethroughButtonDirective, 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: EditorStrikethroughButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorStrikethroughButton]", usesInheritance: true, ngImport: i0 });
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorStrikethroughButtonDirective, decorators: [{
37
- type: Directive,
38
- args: [{
39
- selector: 'kendo-toolbar-button[kendoEditorStrikethroughButton]',
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 **Subscript** 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
- * The directive 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 kendoEditorSubscriptButton></kendo-toolbar-button>
25
- * ```
26
- * @remarks
27
- * Applied to: {@link ToolBarButtonComponent}
28
- */
29
- export class EditorSubscriptButtonDirective extends EditorCommandButton {
30
- constructor(button, localization, providerService, toolsService) {
31
- super('subscript', button, localization, providerService, toolsService);
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorSubscriptButtonDirective, 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: EditorSubscriptButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorSubscriptButton]", usesInheritance: true, ngImport: i0 });
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorSubscriptButtonDirective, decorators: [{
37
- type: Directive,
38
- args: [{
39
- selector: 'kendo-toolbar-button[kendoEditorSubscriptButton]',
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 **Superscript** 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
- * The directive 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 kendoEditorSuperscriptButton></kendo-toolbar-button>
25
- * ```
26
- * @remarks
27
- * Applied to: {@link ToolBarButtonComponent}
28
- */
29
- export class EditorSuperscriptButtonDirective extends EditorCommandButton {
30
- constructor(button, localization, providerService, toolsService) {
31
- super('superscript', button, localization, providerService, toolsService);
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorSuperscriptButtonDirective, 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: EditorSuperscriptButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorSuperscriptButton]", usesInheritance: true, ngImport: i0 });
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorSuperscriptButtonDirective, decorators: [{
37
- type: Directive,
38
- args: [{
39
- selector: 'kendo-toolbar-button[kendoEditorSuperscriptButton]',
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 **Underline** 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
- * The directive 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 kendoEditorUnderlineButton></kendo-toolbar-button>
25
- * ```
26
- * @remarks
27
- * Applied to: {@link ToolBarButtonComponent}
28
- */
29
- export class EditorUnderlineButtonDirective extends EditorCommandButton {
30
- constructor(button, localization, providerService, toolsService) {
31
- super('underline', button, localization, providerService, toolsService);
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorUnderlineButtonDirective, 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: EditorUnderlineButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorUnderlineButton]", usesInheritance: true, ngImport: i0 });
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorUnderlineButtonDirective, decorators: [{
37
- type: Directive,
38
- args: [{
39
- selector: 'kendo-toolbar-button[kendoEditorUnderlineButton]',
40
- standalone: true
41
- }]
42
- }], ctorParameters: () => [{ type: i1.ToolBarButtonComponent }, { type: i2.EditorLocalizationService }, { type: i3.ProviderService }, { type: i4.EditorToolsService }] });
package/esm2022/util.mjs DELETED
@@ -1,130 +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 { getSelectionText as commonGetSelectionText } from '@progress/kendo-editor-common';
6
- import { isDocumentAvailable } from '@progress/kendo-angular-common';
7
- /**
8
- * @hidden
9
- */
10
- export function outerWidth(element) {
11
- if (!isDocumentAvailable()) {
12
- return element.offsetWidth || 0;
13
- }
14
- let width = element.offsetWidth;
15
- const style = getComputedStyle(element);
16
- width += parseFloat(style.marginLeft) || 0 + parseFloat(style.marginRight) || 0;
17
- return width;
18
- }
19
- /**
20
- * @hidden
21
- */
22
- export const removeEntries = (obj, predicate) => Object.keys(obj)
23
- .filter(key => predicate(key))
24
- .reduce((acc, curr) => Object.assign(acc, { [curr]: obj[curr] }), {});
25
- /**
26
- * @hidden
27
- */
28
- export const removeEmptyEntries = (obj) => {
29
- const predicate = key => obj[key] !== null && obj[key] !== undefined && obj[key] !== '';
30
- return removeEntries(obj, predicate);
31
- };
32
- /**
33
- * @hidden
34
- */
35
- export const isEmpty = (obj) => Object.keys(obj).length === 0;
36
- /**
37
- * @hidden
38
- */
39
- export const isNullOrUndefined = (value) => value === undefined || value === null;
40
- /**
41
- * @hidden
42
- */
43
- export const isPresent = (value) => !isNullOrUndefined(value);
44
- /**
45
- * @hidden
46
- */
47
- export const safeString = (value) => (isNullOrUndefined(value) ? '' : value.toString());
48
- /**
49
- * @hidden
50
- */
51
- export const first = (arr) => arr[0];
52
- /**
53
- * @hidden
54
- */
55
- export const last = (arr) => arr[arr.length - 1];
56
- /**
57
- * @hidden
58
- */
59
- export const unique = (arr) => Array.from(new Set(arr));
60
- /**
61
- * @hidden
62
- */
63
- export const split = (splitter) => (value) => value.split(splitter);
64
- /**
65
- * @hidden
66
- */
67
- export const trim = (value) => value.trim();
68
- /**
69
- * @hidden
70
- */
71
- export const filter = (predicate) => (arr) => arr.filter(predicate);
72
- /**
73
- * @hidden
74
- */
75
- export const toArray = (x) => (x instanceof Array ? x : [x]);
76
- /**
77
- * @hidden
78
- */
79
- export const getUniqueStyleValues = (style, cssStyle) => {
80
- if (style.hasNodesWithoutMarks) {
81
- return '';
82
- }
83
- const uniqueMarkValues = style.marks
84
- .filter(m => m.type.name === 'style')
85
- .map(m => m.attrs['style'])
86
- .map(safeString)
87
- .map(split(';'))
88
- .map(filter((m) => m.includes(cssStyle)))
89
- // guards against empty array
90
- .map((cssStyleValues) => (cssStyleValues.length !== 0 ? cssStyleValues : [`${cssStyle}: INVALID`]))
91
- .map(first)
92
- .map(split(':'))
93
- .map(last)
94
- .map(trim)
95
- .reduce((acc, curr) => (acc.indexOf(curr) > -1 ? acc : [...acc, curr]), []);
96
- if (uniqueMarkValues.indexOf('INVALID') > -1 || uniqueMarkValues.length !== 1) {
97
- return '';
98
- }
99
- return uniqueMarkValues[0];
100
- };
101
- /**
102
- * @hidden
103
- */
104
- export const conditionallyExecute = (fn) => (condition) => (param) => (condition ? fn(param) : param);
105
- // This re-declaration is necessary for proper API generation
106
- /**
107
- * Extracts the text from the current editor state's selection ([see example]({% slug plugins_editor %}#toc-popup-tools)).
108
- *
109
- * @example
110
- * ```ts
111
- * import { getSelectionText } from '@progress/kendo-angular-editor';
112
- *
113
- * export class AppComponent {
114
- * @ViewChild('editor') public editor;
115
- * public onClick() {
116
- * const selection = getSelectionText(this.editor.view.state);
117
- * }
118
- * }
119
- * ```
120
- * @param state The current `EditorState`.
121
- * @returns The selected text.
122
- */
123
- export const getSelectionText = (state) => commonGetSelectionText(state);
124
- /**
125
- * @hidden
126
- */
127
- export const replaceMessagePlaceholder = (message, replacements) => {
128
- replacements.forEach((replacement) => message = message.replace(new RegExp(`{\\s*${replacement.placeholder}\\s*}`, 'g'), replacement.value));
129
- return message;
130
- };