@progress/kendo-angular-editor 2.5.0 → 3.0.0-dev.202201191455

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 (104) hide show
  1. package/LICENSE.md +1 -1
  2. package/NOTICE.txt +119 -79
  3. package/README.md +1 -1
  4. package/dist/cdn/js/kendo-angular-editor.js +2 -2
  5. package/dist/cdn/main.js +1 -1
  6. package/dist/es/common/error-messages.js +4 -3
  7. package/dist/es/config/command-icons.js +1 -0
  8. package/dist/es/config/commands.js +18 -17
  9. package/dist/es/config/schema.js +2 -4
  10. package/dist/es/config/table-commands.js +1 -363
  11. package/dist/es/dialogs/colorpicker-dialog.component.js +1 -1
  12. package/dist/es/dialogs/file-link-dialog.component.js +1 -1
  13. package/dist/es/dialogs/image-dialog.component.js +1 -1
  14. package/dist/es/editor-toolbar-state.js +12 -2
  15. package/dist/es/editor.component.js +103 -75
  16. package/dist/es/editor.module.js +6 -3
  17. package/dist/es/index.js +2 -0
  18. package/dist/es/localization/messages.js +4 -0
  19. package/dist/es/main.js +1 -0
  20. package/dist/es/package-metadata.js +1 -1
  21. package/dist/{es2015/config/table-nodes.d.ts → es/preventable-events/paste-event-data.js} +0 -5
  22. package/dist/es/preventable-events/paste-event.js +25 -0
  23. package/dist/es/tools/blockquote/editor-blockquote-button.directive.js +48 -0
  24. package/dist/es/tools/colorpicker/editor-colorpicker.component.js +24 -7
  25. package/dist/es/tools/format/editor-format-dropdownlist.component.js +1 -1
  26. package/dist/es/tools/format/editor-format.component.js +0 -1
  27. package/dist/es/tools/tables/popup-table-grid.component.js +1 -1
  28. package/dist/es2015/common/commands.d.ts +1 -1
  29. package/dist/es2015/common/error-messages.js +4 -3
  30. package/dist/es2015/common/format-item.interface.d.ts +1 -1
  31. package/dist/es2015/common/paste-cleanup-settings.d.ts +14 -0
  32. package/dist/es2015/config/command-icons.js +1 -0
  33. package/dist/es2015/config/commands.js +18 -17
  34. package/dist/es2015/config/schema.d.ts +1 -1
  35. package/dist/es2015/config/schema.js +2 -3
  36. package/dist/es2015/config/table-commands.d.ts +0 -36
  37. package/dist/es2015/config/table-commands.js +1 -357
  38. package/dist/es2015/dialogs/colorpicker-dialog.component.js +1 -1
  39. package/dist/es2015/dialogs/file-link-dialog.component.js +4 -4
  40. package/dist/es2015/dialogs/image-dialog.component.js +4 -4
  41. package/dist/es2015/editor-toolbar-state.js +12 -2
  42. package/dist/es2015/editor.component.d.ts +16 -11
  43. package/dist/es2015/editor.component.js +105 -75
  44. package/dist/es2015/editor.module.js +6 -3
  45. package/dist/es2015/index.d.ts +2 -0
  46. package/dist/es2015/index.js +2 -0
  47. package/dist/es2015/index.metadata.json +1 -1
  48. package/dist/es2015/localization/messages.d.ts +4 -0
  49. package/dist/es2015/localization/messages.js +4 -0
  50. package/dist/es2015/main.d.ts +2 -0
  51. package/dist/es2015/main.js +1 -0
  52. package/dist/es2015/package-metadata.js +1 -1
  53. package/dist/es2015/preventable-events/paste-event-data.d.ts +21 -0
  54. package/dist/es2015/preventable-events/paste-event-data.js +4 -0
  55. package/dist/es2015/preventable-events/paste-event.d.ts +27 -0
  56. package/dist/es2015/preventable-events/paste-event.js +20 -0
  57. package/dist/es2015/tools/blockquote/editor-blockquote-button.directive.d.ts +30 -0
  58. package/dist/es2015/tools/blockquote/editor-blockquote-button.directive.js +45 -0
  59. package/dist/es2015/tools/colorpicker/editor-colorpicker.component.d.ts +8 -2
  60. package/dist/es2015/tools/colorpicker/editor-colorpicker.component.js +20 -7
  61. package/dist/es2015/tools/format/editor-format-dropdownlist.component.js +0 -4
  62. package/dist/es2015/tools/format/editor-format.component.js +0 -1
  63. package/dist/es2015/tools/tables/popup-table-grid.component.js +2 -2
  64. package/dist/fesm2015/index.js +354 -1624
  65. package/dist/fesm5/index.js +365 -1649
  66. package/dist/npm/common/error-messages.js +4 -2
  67. package/dist/npm/config/command-icons.js +1 -0
  68. package/dist/npm/config/commands.js +16 -14
  69. package/dist/npm/config/schema.js +2 -4
  70. package/dist/npm/config/table-commands.js +1 -368
  71. package/dist/npm/dialogs/colorpicker-dialog.component.js +1 -1
  72. package/dist/npm/dialogs/file-link-dialog.component.js +1 -1
  73. package/dist/npm/dialogs/image-dialog.component.js +1 -1
  74. package/dist/npm/editor-toolbar-state.js +11 -1
  75. package/dist/npm/editor.component.js +99 -71
  76. package/dist/npm/editor.module.js +7 -4
  77. package/dist/npm/index.js +5 -0
  78. package/dist/npm/localization/messages.js +4 -0
  79. package/dist/npm/main.js +2 -0
  80. package/dist/npm/package-metadata.js +1 -1
  81. package/dist/npm/preventable-events/paste-event-data.js +6 -0
  82. package/dist/npm/preventable-events/paste-event.js +27 -0
  83. package/dist/npm/tools/blockquote/editor-blockquote-button.directive.js +50 -0
  84. package/dist/npm/tools/colorpicker/editor-colorpicker.component.js +24 -7
  85. package/dist/npm/tools/format/editor-format-dropdownlist.component.js +1 -1
  86. package/dist/npm/tools/format/editor-format.component.js +0 -1
  87. package/dist/npm/tools/tables/popup-table-grid.component.js +1 -1
  88. package/dist/systemjs/kendo-angular-editor.js +1 -1
  89. package/package.json +18 -18
  90. package/dist/es/config/table-nodes.js +0 -146
  91. package/dist/es/config/tables/CellSelection.js +0 -268
  92. package/dist/es/config/tables/TableMap.js +0 -333
  93. package/dist/es/config/tables/table-utils.js +0 -302
  94. package/dist/es2015/config/table-nodes.js +0 -145
  95. package/dist/es2015/config/tables/CellSelection.d.ts +0 -35
  96. package/dist/es2015/config/tables/CellSelection.js +0 -256
  97. package/dist/es2015/config/tables/TableMap.d.ts +0 -35
  98. package/dist/es2015/config/tables/TableMap.js +0 -329
  99. package/dist/es2015/config/tables/table-utils.d.ts +0 -77
  100. package/dist/es2015/config/tables/table-utils.js +0 -299
  101. package/dist/npm/config/table-nodes.js +0 -157
  102. package/dist/npm/config/tables/CellSelection.js +0 -270
  103. package/dist/npm/config/tables/TableMap.js +0 -338
  104. package/dist/npm/config/tables/table-utils.js +0 -307
@@ -27,6 +27,10 @@ export declare class Messages extends ComponentMessages {
27
27
  * The title of the tool that changes the text background color.
28
28
  */
29
29
  backColor: string;
30
+ /**
31
+ * The title of the tool that wraps an element in a blockquote.
32
+ */
33
+ blockquote: string;
30
34
  /**
31
35
  * The title of the tool that makes text bold.
32
36
  */
@@ -30,6 +30,10 @@ tslib_1.__decorate([
30
30
  Input(),
31
31
  tslib_1.__metadata("design:type", String)
32
32
  ], Messages.prototype, "backColor", void 0);
33
+ tslib_1.__decorate([
34
+ Input(),
35
+ tslib_1.__metadata("design:type", String)
36
+ ], Messages.prototype, "blockquote", void 0);
33
37
  tslib_1.__decorate([
34
38
  Input(),
35
39
  tslib_1.__metadata("design:type", String)
@@ -9,3 +9,5 @@ export { EditorState, Plugin, PluginKey, Transaction, EditorView, Decoration, De
9
9
  export { PluginsFn } from './common/plugins-function';
10
10
  export { ApplyToWordOptions } from './common/apply-to-word-options';
11
11
  export { EditorResizableOptions } from './common/resizable-options.interface';
12
+ export { EditorPasteEvent } from './preventable-events/paste-event';
13
+ export { EditorPastedContentArgs } from './preventable-events/paste-event-data';
@@ -6,3 +6,4 @@ export { EditorComponent } from './editor.component';
6
6
  export { EditorModule } from './editor.module';
7
7
  export { schema, Schema } from './config/schema';
8
8
  export { EditorState, Plugin, PluginKey, Transaction, EditorView, Decoration, DecorationSet, NodeType, Node, MarkType, Mark, InputRule, inputRules, wrappingInputRule, textblockTypeInputRule, keymap, baseKeymap, history, dropCursor, gapCursor, tableNodes, getSelectionText } from '@progress/kendo-editor-common';
9
+ export { EditorPasteEvent } from './preventable-events/paste-event';
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-editor',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1638198421,
12
+ publishDate: 1642603748,
13
13
  version: '',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
15
  };
@@ -0,0 +1,21 @@
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
+ /**
6
+ * The Editor [`pastedContent`]({% slug api_editor_editorcomponent %}#toc-pastedcontent) callback argument.
7
+ */
8
+ export declare type EditorPastedContentArgs = {
9
+ /**
10
+ * The HTML content cleaned in accordance with the [`PasteCleanupSettings`]({% slug paste_cleanup %}).
11
+ */
12
+ cleanedHtml: string;
13
+ /**
14
+ * The raw pasted content.
15
+ */
16
+ originalHtml: string;
17
+ /**
18
+ * The original DOM event.
19
+ */
20
+ originalEvent: ClipboardEvent;
21
+ };
@@ -0,0 +1,4 @@
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
+ *-------------------------------------------------------------------------------------------*/
@@ -0,0 +1,27 @@
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
+ import { PreventableEvent } from "@progress/kendo-angular-common";
6
+ /**
7
+ * The Editor [`paste`]({% slug api_editor_editorcomponent %}#toc-paste) event.
8
+ */
9
+ export declare class EditorPasteEvent extends PreventableEvent {
10
+ /**
11
+ * The HTML content cleaned in accordance with the [`PasteCleanupSettings`]({% slug paste_cleanup %}).
12
+ */
13
+ cleanedHtml: string;
14
+ /**
15
+ * The raw pasted content.
16
+ */
17
+ originalHtml: string;
18
+ /**
19
+ * The original DOM event.
20
+ */
21
+ originalEvent: ClipboardEvent;
22
+ /**
23
+ * Constructs the event arguments for the `paste` event.
24
+ * @hidden
25
+ */
26
+ constructor(cleanedHtml: string, originalHtml: string, originalEvent: ClipboardEvent);
27
+ }
@@ -0,0 +1,20 @@
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
+ import { PreventableEvent } from "@progress/kendo-angular-common";
6
+ /**
7
+ * The Editor [`paste`]({% slug api_editor_editorcomponent %}#toc-paste) event.
8
+ */
9
+ export class EditorPasteEvent extends PreventableEvent {
10
+ /**
11
+ * Constructs the event arguments for the `paste` event.
12
+ * @hidden
13
+ */
14
+ constructor(cleanedHtml, originalHtml, originalEvent) {
15
+ super();
16
+ this.cleanedHtml = cleanedHtml;
17
+ this.originalHtml = originalHtml;
18
+ this.originalEvent = originalEvent;
19
+ }
20
+ }
@@ -0,0 +1,30 @@
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
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
6
+ import { EditorComponent } from '../../editor.component';
7
+ import { EditorCommandButton } from '../shared/editor-command-button';
8
+ import { EditorLocalizationService } from '../../localization/editor-localization.service';
9
+ import { EditorToolsService } from '../tools.service';
10
+ /**
11
+ * A directive which configures an existing `ToolBarButtonComponent` as an Editor Blockquote tool
12
+ * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
13
+ * The directive will predefine the `icon` and `click` event handlers of the button.
14
+ *
15
+ * @example
16
+ * ```ts-no-run
17
+ * <kendo-toolbar-button kendoEditorBlockquoteButton></kendo-toolbar-button>
18
+ * ```
19
+ *
20
+ * The following example demonstrates how to change the default icon that is applied by the directive.
21
+ *
22
+ * @example
23
+ * ```ts-no-run
24
+ * <kendo-toolbar-button kendoEditorBlockquoteButton icon="blogger"></kendo-toolbar-button>
25
+ * ```
26
+ */
27
+ export declare class EditorBlockquoteDirective extends EditorCommandButton {
28
+ protected editor: EditorComponent;
29
+ constructor(button: ToolBarButtonComponent, editor: EditorComponent, localization: EditorLocalizationService, toolsService: EditorToolsService);
30
+ }
@@ -0,0 +1,45 @@
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
+ import * as tslib_1 from "tslib";
6
+ import { Directive, Host } from '@angular/core';
7
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
8
+ import { EditorComponent } from '../../editor.component';
9
+ import { EditorCommandButton } from '../shared/editor-command-button';
10
+ import { EditorLocalizationService } from '../../localization/editor-localization.service';
11
+ import { EditorToolsService } from '../tools.service';
12
+ /**
13
+ * A directive which configures an existing `ToolBarButtonComponent` as an Editor Blockquote tool
14
+ * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
15
+ * The directive will predefine the `icon` and `click` event handlers of the button.
16
+ *
17
+ * @example
18
+ * ```ts-no-run
19
+ * <kendo-toolbar-button kendoEditorBlockquoteButton></kendo-toolbar-button>
20
+ * ```
21
+ *
22
+ * The following example demonstrates how to change the default icon that is applied by the directive.
23
+ *
24
+ * @example
25
+ * ```ts-no-run
26
+ * <kendo-toolbar-button kendoEditorBlockquoteButton icon="blogger"></kendo-toolbar-button>
27
+ * ```
28
+ */
29
+ let EditorBlockquoteDirective = class EditorBlockquoteDirective extends EditorCommandButton {
30
+ constructor(button, editor, localization, toolsService) {
31
+ super('blockquote', button, editor, localization, toolsService);
32
+ this.editor = editor;
33
+ }
34
+ };
35
+ EditorBlockquoteDirective = tslib_1.__decorate([
36
+ Directive({
37
+ selector: 'kendo-toolbar-button[kendoEditorBlockquoteButton]'
38
+ }),
39
+ tslib_1.__param(1, Host()),
40
+ tslib_1.__metadata("design:paramtypes", [ToolBarButtonComponent,
41
+ EditorComponent,
42
+ EditorLocalizationService,
43
+ EditorToolsService])
44
+ ], EditorBlockquoteDirective);
45
+ export { EditorBlockquoteDirective };
@@ -40,9 +40,15 @@ export declare class EditorColorPickerComponent extends ToolBarToolComponent {
40
40
  */
41
41
  disabled: boolean;
42
42
  /**
43
- * Specifies whether the ColorPicker will render a gradient, palette or combo view.
43
+ * Specifies whether the ColorPicker will render a gradient, palette, or both in its popup.
44
44
  *
45
- * @default 'palette'
45
+ * @default ['palette']
46
+ */
47
+ views: ColorPickerView[];
48
+ /**
49
+ * @hidden
50
+ *
51
+ * For backward compatibility with configurations using the deprecated "view" input.
46
52
  */
47
53
  view: ColorPickerView;
48
54
  /**
@@ -32,11 +32,19 @@ let EditorColorPickerComponent = EditorColorPickerComponent_1 = class EditorColo
32
32
  */
33
33
  this.disabled = false;
34
34
  /**
35
- * Specifies whether the ColorPicker will render a gradient, palette or combo view.
35
+ * Specifies whether the ColorPicker will render a gradient, palette, or both in its popup.
36
36
  *
37
- * @default 'palette'
37
+ * @default ['palette']
38
38
  */
39
- this.view = 'palette';
39
+ this.views = ['palette'];
40
+ }
41
+ /**
42
+ * @hidden
43
+ *
44
+ * For backward compatibility with configurations using the deprecated "view" input.
45
+ */
46
+ set view(view) {
47
+ this.views = [view];
40
48
  }
41
49
  /**
42
50
  * @hidden
@@ -108,7 +116,7 @@ let EditorColorPickerComponent = EditorColorPickerComponent_1 = class EditorColo
108
116
  editorCommand: this.editorCommand,
109
117
  paletteSettings: this.paletteSettings,
110
118
  icon: this.icon,
111
- view: this.view
119
+ views: this.views
112
120
  });
113
121
  }
114
122
  /**
@@ -159,8 +167,13 @@ tslib_1.__decorate([
159
167
  ], EditorColorPickerComponent.prototype, "disabled", void 0);
160
168
  tslib_1.__decorate([
161
169
  Input(),
162
- tslib_1.__metadata("design:type", String)
163
- ], EditorColorPickerComponent.prototype, "view", void 0);
170
+ tslib_1.__metadata("design:type", Array)
171
+ ], EditorColorPickerComponent.prototype, "views", void 0);
172
+ tslib_1.__decorate([
173
+ Input(),
174
+ tslib_1.__metadata("design:type", String),
175
+ tslib_1.__metadata("design:paramtypes", [String])
176
+ ], EditorColorPickerComponent.prototype, "view", null);
164
177
  tslib_1.__decorate([
165
178
  ViewChild('toolbarTemplate', { static: true }),
166
179
  tslib_1.__metadata("design:type", TemplateRef)
@@ -189,7 +202,7 @@ EditorColorPickerComponent = EditorColorPickerComponent_1 = tslib_1.__decorate([
189
202
  <ng-template #toolbarTemplate>
190
203
  <kendo-colorpicker
191
204
  #colorpicker
192
- [view]="view"
205
+ [views]="['palette']"
193
206
  [format]="'hex'"
194
207
  [attr.title]="title"
195
208
  [icon]="icon"
@@ -112,10 +112,6 @@ FormatDropDownListComponent = tslib_1.__decorate([
112
112
  {{ dataItem.text }}
113
113
  </span>
114
114
 
115
- <span *ngSwitchCase="'blockquote'" style="display: block; margin-left: 0;">
116
- {{ dataItem.text }}
117
- </span>
118
-
119
115
  <span *ngSwitchDefault>{{ dataItem.text }}</span>
120
116
  </ng-container>
121
117
  </ng-template>
@@ -39,7 +39,6 @@ let EditorFormatComponent = EditorFormatComponent_1 = class EditorFormatComponen
39
39
  this.valueChange = new EventEmitter();
40
40
  this._data = [
41
41
  { text: 'Paragraph', tag: 'p' },
42
- { text: 'Quotation', tag: 'blockquote' },
43
42
  { text: 'Heading 1', tag: 'h1' },
44
43
  { text: 'Heading 2', tag: 'h2' },
45
44
  { text: 'Heading 3', tag: 'h3' },
@@ -61,8 +61,8 @@ PopupTableGridComponent = tslib_1.__decorate([
61
61
  <div style="border-color: inherit;" (mouseleave)="resetState()" (click)="insertTable()">
62
62
  <span *ngFor="let i of cells"
63
63
  class="k-ct-cell"
64
- [class.k-state-selected]="selected(i)"
65
- [class.k-state-disabled]="!selected(i)"
64
+ [class.k-selected]="selected(i)"
65
+ [class.k-disabled]="!selected(i)"
66
66
  (mouseenter)="setState(i)">
67
67
  </span>
68
68
  </div>