@progress/kendo-angular-editor 21.4.1 → 22.0.0

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,230 +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 { Component, Input, ViewChild } from '@angular/core';
6
- import { FormControl, FormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
7
- import { DialogRef, DialogContentBase, DialogActionsComponent, DialogTitleBarComponent } from '@progress/kendo-angular-dialog';
8
- import { getNodeFromSelection } from '@progress/kendo-editor-common';
9
- import { guid } from '@progress/kendo-angular-common';
10
- import { TextBoxComponent, FormFieldComponent } from '@progress/kendo-angular-inputs';
11
- import { ButtonComponent } from '@progress/kendo-angular-buttons';
12
- import { LabelComponent } from '@progress/kendo-angular-label';
13
- import { safeString } from '../util';
14
- import { EditorLocalizationService } from '../localization/editor-localization.service';
15
- import * as i0 from "@angular/core";
16
- import * as i1 from "@progress/kendo-angular-dialog";
17
- import * as i2 from "../localization/editor-localization.service";
18
- import * as i3 from "@angular/forms";
19
- /**
20
- * @hidden
21
- */
22
- export class ImageDialogComponent extends DialogContentBase {
23
- dialog;
24
- localization;
25
- editor;
26
- srcInput;
27
- src = new FormControl('', Validators.required);
28
- alt = new FormControl('');
29
- width = new FormControl('', Validators.min(1));
30
- height = new FormControl('', Validators.min(1));
31
- data = {
32
- alt: '',
33
- height: '',
34
- src: '',
35
- width: ''
36
- };
37
- imageData = new FormGroup({
38
- alt: this.alt,
39
- height: this.height,
40
- src: this.src,
41
- width: this.width
42
- });
43
- srcInputId;
44
- altTextInputId;
45
- widthInputId;
46
- heightInputId;
47
- constructor(dialog, localization) {
48
- super(dialog);
49
- this.dialog = dialog;
50
- this.localization = localization;
51
- }
52
- ngOnInit() {
53
- this.srcInputId = `k-${guid()}`;
54
- this.altTextInputId = `k-${guid()}`;
55
- this.widthInputId = `k-${guid()}`;
56
- this.heightInputId = `k-${guid()}`;
57
- }
58
- onCancelAction() {
59
- this.dialog.close();
60
- }
61
- onConfirmAction() {
62
- if (this.src.value) {
63
- this.editor.exec('insertImage', this.getData());
64
- this.dialog.close();
65
- this.editor.view.focus();
66
- }
67
- }
68
- setData(state) {
69
- const node = getNodeFromSelection(state);
70
- if (node) {
71
- this.src.patchValue(node.attrs['src']);
72
- this.alt.patchValue(node.attrs['alt']);
73
- this.width.patchValue(node.attrs['width']);
74
- this.height.patchValue(node.attrs['height']);
75
- }
76
- }
77
- textFor(key) {
78
- return this.localization.get(key);
79
- }
80
- getData() {
81
- return {
82
- alt: this.alt.value,
83
- height: this.normalizeDimension(this.height.value),
84
- src: this.src.value,
85
- width: this.normalizeDimension(this.width.value)
86
- };
87
- }
88
- normalizeDimension(value) {
89
- return Number.isNaN(parseInt(value, 10)) || parseInt(value, 10) <= 0 ? '' : safeString(parseInt(value, 10));
90
- }
91
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ImageDialogComponent, deps: [{ token: i1.DialogRef }, { token: i2.EditorLocalizationService }], target: i0.ɵɵFactoryTarget.Component });
92
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ImageDialogComponent, isStandalone: true, selector: "ng-component", inputs: { editor: "editor" }, viewQueries: [{ propertyName: "srcInput", first: true, predicate: ["srcInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
93
- <kendo-dialog-titlebar (close)="onCancelAction()">
94
- {{ textFor('insertImage') }}
95
- </kendo-dialog-titlebar>
96
- <div class="k-form k-form-md">
97
- <kendo-formfield>
98
- <kendo-label
99
- labelCssClass="k-form-label"
100
- [for]="srcInput"
101
- [text]="textFor('imageWebAddress')"
102
- ></kendo-label>
103
- <kendo-textbox
104
- #srcInput
105
- [formControl]="src"
106
- ></kendo-textbox>
107
- </kendo-formfield>
108
- <kendo-formfield>
109
- <kendo-label
110
- labelCssClass="k-form-label"
111
- [for]="altTextInput"
112
- [text]="textFor('imageAltText')"
113
- ></kendo-label>
114
- <kendo-textbox
115
- #altTextInput
116
- [formControl]="alt"
117
- ></kendo-textbox>
118
- </kendo-formfield>
119
- <kendo-formfield>
120
- <kendo-label
121
- labelCssClass="k-form-label"
122
- [for]="widthInput"
123
- [text]="textFor('imageWidth')"
124
- ></kendo-label>
125
- <kendo-textbox
126
- #widthInput
127
- [formControl]="width"
128
- ></kendo-textbox>
129
- </kendo-formfield>
130
- <kendo-formfield>
131
- <kendo-label
132
- [for]="heightInput"
133
- [text]="textFor('imageHeight')"
134
- labelCssClass="k-form-label"
135
- ></kendo-label>
136
- <kendo-textbox
137
- #heightInput
138
- [formControl]="height"
139
- ></kendo-textbox>
140
- </kendo-formfield>
141
- </div>
142
- <kendo-dialog-actions layout="start">
143
- <button
144
- kendoButton
145
- [disabled]="imageData.invalid"
146
- [primary]="true"
147
- (click)="onConfirmAction()"
148
- >{{ textFor('dialogInsert') }}</button>
149
- <button
150
- kendoButton
151
- (click)="onCancelAction()"
152
- >{{ textFor('dialogCancel') }}</button>
153
- </kendo-dialog-actions>
154
- `, isInline: true, dependencies: [{ kind: "component", type: DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { kind: "component", type: FormFieldComponent, selector: "kendo-formfield", inputs: ["showHints", "orientation", "showErrors", "colSpan"] }, { kind: "component", type: LabelComponent, selector: "kendo-label", inputs: ["text", "for", "optional", "labelCssStyle", "labelCssClass"], exportAs: ["kendoLabel"] }, { kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
155
- }
156
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ImageDialogComponent, decorators: [{
157
- type: Component,
158
- args: [{
159
- template: `
160
- <kendo-dialog-titlebar (close)="onCancelAction()">
161
- {{ textFor('insertImage') }}
162
- </kendo-dialog-titlebar>
163
- <div class="k-form k-form-md">
164
- <kendo-formfield>
165
- <kendo-label
166
- labelCssClass="k-form-label"
167
- [for]="srcInput"
168
- [text]="textFor('imageWebAddress')"
169
- ></kendo-label>
170
- <kendo-textbox
171
- #srcInput
172
- [formControl]="src"
173
- ></kendo-textbox>
174
- </kendo-formfield>
175
- <kendo-formfield>
176
- <kendo-label
177
- labelCssClass="k-form-label"
178
- [for]="altTextInput"
179
- [text]="textFor('imageAltText')"
180
- ></kendo-label>
181
- <kendo-textbox
182
- #altTextInput
183
- [formControl]="alt"
184
- ></kendo-textbox>
185
- </kendo-formfield>
186
- <kendo-formfield>
187
- <kendo-label
188
- labelCssClass="k-form-label"
189
- [for]="widthInput"
190
- [text]="textFor('imageWidth')"
191
- ></kendo-label>
192
- <kendo-textbox
193
- #widthInput
194
- [formControl]="width"
195
- ></kendo-textbox>
196
- </kendo-formfield>
197
- <kendo-formfield>
198
- <kendo-label
199
- [for]="heightInput"
200
- [text]="textFor('imageHeight')"
201
- labelCssClass="k-form-label"
202
- ></kendo-label>
203
- <kendo-textbox
204
- #heightInput
205
- [formControl]="height"
206
- ></kendo-textbox>
207
- </kendo-formfield>
208
- </div>
209
- <kendo-dialog-actions layout="start">
210
- <button
211
- kendoButton
212
- [disabled]="imageData.invalid"
213
- [primary]="true"
214
- (click)="onConfirmAction()"
215
- >{{ textFor('dialogInsert') }}</button>
216
- <button
217
- kendoButton
218
- (click)="onCancelAction()"
219
- >{{ textFor('dialogCancel') }}</button>
220
- </kendo-dialog-actions>
221
- `,
222
- standalone: true,
223
- imports: [DialogTitleBarComponent, FormFieldComponent, LabelComponent, TextBoxComponent, ReactiveFormsModule, DialogActionsComponent, ButtonComponent]
224
- }]
225
- }], ctorParameters: () => [{ type: i1.DialogRef }, { type: i2.EditorLocalizationService }], propDecorators: { editor: [{
226
- type: Input
227
- }], srcInput: [{
228
- type: ViewChild,
229
- args: ['srcInput']
230
- }] } });
@@ -1,79 +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 { Component, Input } from '@angular/core';
6
- import { DialogRef, DialogContentBase, DialogActionsComponent, DialogTitleBarComponent } from '@progress/kendo-angular-dialog';
7
- import { ButtonComponent } from '@progress/kendo-angular-buttons';
8
- import { EditorLocalizationService } from '../localization/editor-localization.service';
9
- import { EditorComponent } from '../editor.component';
10
- import { PopupTableGridComponent } from '../tools/tables/popup-table-grid.component';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "@progress/kendo-angular-dialog";
13
- import * as i2 from "../localization/editor-localization.service";
14
- /**
15
- * @hidden
16
- */
17
- export class InsertTableDialogComponent extends DialogContentBase {
18
- dialog;
19
- localization;
20
- editor;
21
- constructor(dialog, localization) {
22
- super(dialog);
23
- this.dialog = dialog;
24
- this.localization = localization;
25
- }
26
- onCancelAction() {
27
- this.dialog.close();
28
- this.editor.view.focus();
29
- }
30
- onCellClick(args) {
31
- this.dialog.close();
32
- this.editor.exec("insertTable", args);
33
- this.editor.view.focus();
34
- }
35
- setData(args) {
36
- this.editor = args.editor;
37
- }
38
- textFor(key) {
39
- return this.localization.get(key);
40
- }
41
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InsertTableDialogComponent, deps: [{ token: i1.DialogRef }, { token: i2.EditorLocalizationService }], target: i0.ɵɵFactoryTarget.Component });
42
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InsertTableDialogComponent, isStandalone: true, selector: "ng-component", inputs: { editor: "editor" }, usesInheritance: true, ngImport: i0, template: `
43
- <kendo-dialog-titlebar (close)="onCancelAction()">
44
- {{ textFor('insertTable') }}
45
- </kendo-dialog-titlebar>
46
- <div [style.text-align]="'center'">
47
- <kendo-popup-table-grid (cellClick)="onCellClick($event)"></kendo-popup-table-grid>
48
- </div>
49
- <kendo-dialog-actions layout="start">
50
- <button
51
- kendoButton
52
- (click)="onCancelAction()"
53
- >{{ textFor('dialogCancel') }}</button>
54
- </kendo-dialog-actions>
55
- `, isInline: true, dependencies: [{ kind: "component", type: DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { kind: "component", type: PopupTableGridComponent, selector: "kendo-popup-table-grid", outputs: ["cellClick", "tableWizardClick"] }, { kind: "component", type: DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
56
- }
57
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InsertTableDialogComponent, decorators: [{
58
- type: Component,
59
- args: [{
60
- template: `
61
- <kendo-dialog-titlebar (close)="onCancelAction()">
62
- {{ textFor('insertTable') }}
63
- </kendo-dialog-titlebar>
64
- <div [style.text-align]="'center'">
65
- <kendo-popup-table-grid (cellClick)="onCellClick($event)"></kendo-popup-table-grid>
66
- </div>
67
- <kendo-dialog-actions layout="start">
68
- <button
69
- kendoButton
70
- (click)="onCancelAction()"
71
- >{{ textFor('dialogCancel') }}</button>
72
- </kendo-dialog-actions>
73
- `,
74
- standalone: true,
75
- imports: [DialogTitleBarComponent, PopupTableGridComponent, DialogActionsComponent, ButtonComponent]
76
- }]
77
- }], ctorParameters: () => [{ type: i1.DialogRef }, { type: i2.EditorLocalizationService }], propDecorators: { editor: [{
78
- type: Input
79
- }] } });
@@ -1,112 +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 { Component, ViewChild, Input } from '@angular/core';
6
- import { DialogRef, DialogContentBase, DialogActionsComponent, DialogTitleBarComponent } from '@progress/kendo-angular-dialog';
7
- import { TextAreaComponent } from '@progress/kendo-angular-inputs';
8
- import { EditorLocalizationService } from '../localization/editor-localization.service';
9
- import { ButtonComponent } from '@progress/kendo-angular-buttons';
10
- import * as i0 from "@angular/core";
11
- import * as i1 from "@progress/kendo-angular-dialog";
12
- import * as i2 from "../localization/editor-localization.service";
13
- /**
14
- * @hidden
15
- */
16
- export class SourceDialogComponent extends DialogContentBase {
17
- dialog;
18
- localization;
19
- editor;
20
- textarea;
21
- data = '';
22
- constructor(dialog, localization) {
23
- super(dialog);
24
- this.dialog = dialog;
25
- this.localization = localization;
26
- }
27
- onCancelAction() {
28
- this.dialog.close();
29
- }
30
- onConfirmAction() {
31
- this.editor.exec('setHTML', this.getData());
32
- this.dialog.close();
33
- this.editor.view.focus();
34
- }
35
- getData() {
36
- return this.textarea.value;
37
- }
38
- setData() {
39
- this.data = this.indent(this.editor.getSource());
40
- }
41
- textFor(key) {
42
- return this.localization.get(key);
43
- }
44
- indent(content) {
45
- return content
46
- .replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi, '</$1>\n')
47
- .replace(/<(ul|ol)([^>]*)><li/gi, '<$1$2>\n<li')
48
- .replace(/<br \/>/gi, '<br />\n')
49
- .replace(/\n$/, '');
50
- }
51
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SourceDialogComponent, deps: [{ token: i1.DialogRef }, { token: i2.EditorLocalizationService }], target: i0.ɵɵFactoryTarget.Component });
52
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SourceDialogComponent, isStandalone: true, selector: "ng-component", inputs: { editor: "editor" }, viewQueries: [{ propertyName: "textarea", first: true, predicate: ["textarea"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
53
- <kendo-dialog-titlebar (close)="onCancelAction()">
54
- {{ textFor('viewSource') }}
55
- </kendo-dialog-titlebar>
56
- <kendo-textarea
57
- #textarea
58
- class="k-editor-textarea"
59
- flow="horizontal"
60
- resizable="none"
61
- [value]="data"
62
- [style.height.%]="100"
63
- ></kendo-textarea>
64
- <kendo-dialog-actions layout="start">
65
- <button
66
- kendoButton
67
- [primary]="true"
68
- (click)="onConfirmAction()"
69
- >{{ textFor('dialogUpdate') }}</button>
70
- <button
71
- kendoButton
72
- (click)="onCancelAction()"
73
- >{{ textFor('dialogCancel') }}</button>
74
- </kendo-dialog-actions>
75
- `, isInline: true, dependencies: [{ kind: "component", type: DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { kind: "component", type: TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "inputAttributes", "adornmentsOrientation", "rows", "cols", "maxlength", "maxResizableRows", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { kind: "component", type: DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
76
- }
77
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SourceDialogComponent, decorators: [{
78
- type: Component,
79
- args: [{
80
- template: `
81
- <kendo-dialog-titlebar (close)="onCancelAction()">
82
- {{ textFor('viewSource') }}
83
- </kendo-dialog-titlebar>
84
- <kendo-textarea
85
- #textarea
86
- class="k-editor-textarea"
87
- flow="horizontal"
88
- resizable="none"
89
- [value]="data"
90
- [style.height.%]="100"
91
- ></kendo-textarea>
92
- <kendo-dialog-actions layout="start">
93
- <button
94
- kendoButton
95
- [primary]="true"
96
- (click)="onConfirmAction()"
97
- >{{ textFor('dialogUpdate') }}</button>
98
- <button
99
- kendoButton
100
- (click)="onCancelAction()"
101
- >{{ textFor('dialogCancel') }}</button>
102
- </kendo-dialog-actions>
103
- `,
104
- standalone: true,
105
- imports: [DialogTitleBarComponent, TextAreaComponent, DialogActionsComponent, ButtonComponent]
106
- }]
107
- }], ctorParameters: () => [{ type: i1.DialogRef }, { type: i2.EditorLocalizationService }], propDecorators: { editor: [{
108
- type: Input
109
- }], textarea: [{
110
- type: ViewChild,
111
- args: ['textarea', { static: true }]
112
- }] } });
@@ -1,95 +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 { EditorComponent } from './editor.component';
6
- import { EditorFormatComponent } from './tools/format/editor-format.component';
7
- import { EditorFontSizeComponent } from './tools/fontsize/editor-fontsize.component';
8
- import { EditorFontFamilyComponent } from './tools/fontfamily/editor-fontfamily.component';
9
- import { EditorColorPickerComponent } from './tools/colorpicker/editor-colorpicker.component';
10
- import { EditorInsertTableButtonComponent } from './tools/tables/editor-insert-table-button.component';
11
- import { EditorAlignLeftButtonDirective } from './tools/alignment/editor-align-left-button.directive';
12
- import { EditorAlignCenterButtonDirective } from './tools/alignment/editor-align-center-button.directive';
13
- import { EditorAlignRightButtonDirective } from './tools/alignment/editor-align-right-button.directive';
14
- import { EditorAlignJustifyButtonDirective } from './tools/alignment/editor-align-justify-button.directive';
15
- import { EditorBlockquoteDirective } from './tools/blockquote/editor-blockquote-button.directive';
16
- import { EditorRedoButtonDirective } from './tools/history/editor-redo-button.directive';
17
- import { EditorUndoButtonDirective } from './tools/history/editor-undo-button.directive';
18
- import { EditorInsertImageButtonDirective } from './tools/image/editor-insert-image-button.directive';
19
- import { EditorIndentButtonDirective } from './tools/indentation/editor-indent-button.directive';
20
- import { EditorOutdentButtonDirective } from './tools/indentation/editor-outdent-button.directive';
21
- import { EditorCreateLinkButtonDirective } from './tools/link/editor-create-link-button.directive';
22
- import { EditorUnlinkButtonDirective } from './tools/link/editor-unlink-button.directive';
23
- import { EditorInsertOrderedListButtonDirective } from './tools/list/editor-insert-ordered-list-button.directive';
24
- import { EditorInsertUnorderedListButtonDirective } from './tools/list/editor-insert-unordered-list-button.directive';
25
- import { EditorViewSourceButtonDirective } from './tools/source/editor-view-source-button.directive';
26
- import { EditorBoldButtonDirective } from './tools/typographical-emphasis/editor-bold-button.directive';
27
- import { EditorItalicButtonDirective } from './tools/typographical-emphasis/editor-italic-button.directive';
28
- import { EditorUnderlineButtonDirective } from './tools/typographical-emphasis/editor-underline-button.directive';
29
- import { EditorStrikethroughButtonDirective } from './tools/typographical-emphasis/editor-strikethrough-button.directive';
30
- import { EditorSubscriptButtonDirective } from './tools/typographical-emphasis/editor-subscript-button.directive';
31
- import { EditorSuperscriptButtonDirective } from './tools/typographical-emphasis/editor-superscript-button.directive';
32
- import { EditorInsertFileButtonDirective } from './tools/link/editor-insert-file-button.directive';
33
- import { EditorForeColorDirective } from './tools/colorpicker/editor-fore-color.directive';
34
- import { EditorBackColorDirective } from './tools/colorpicker/editor-back-color.directive';
35
- import { EditorCleanFormattingButtonDirective } from './tools/editor-clean-formatting-button.directive';
36
- import { EditorAddColumnBeforeButtonDirective } from './tools/tables/editor-add-column-before-button.directive';
37
- import { EditorAddColumnAfterButtonDirective } from './tools/tables/editor-add-column-after-button.directive';
38
- import { EditorAddRowBeforeButtonDirective } from './tools/tables/editor-add-row-before-button.directive';
39
- import { EditorAddRowAfterButtonDirective } from './tools/tables/editor-add-row-after-button.directive';
40
- import { EditorDeleteColumnButtonDirective } from './tools/tables/editor-delete-column-button.directive';
41
- import { EditorDeleteRowButtonDirective } from './tools/tables/editor-delete-row-button.directive';
42
- import { EditorDeleteTableButtonDirective } from './tools/tables/editor-delete-table-button.directive';
43
- import { CustomMessagesComponent } from './localization/custom-messages.component';
44
- import { EditorPrintDirective } from './tools/print/editor-print-button.directive';
45
- import { EditorSelectAllButtonDirective } from './tools/select-all/select-all-button.directive';
46
- import { EditorSplitCellButtonDirective } from './tools/tables/editor-split-cell-button.directive';
47
- import { EditorMergeCellsButtonDirective } from './tools/tables/editor-merge-cells-button.directive';
48
- /**
49
- * Utility array that contains all `Editor` related components and directives.
50
- */
51
- export const KENDO_EDITOR = [
52
- EditorComponent,
53
- EditorAlignLeftButtonDirective,
54
- EditorAlignCenterButtonDirective,
55
- EditorAlignRightButtonDirective,
56
- EditorAlignJustifyButtonDirective,
57
- EditorInsertFileButtonDirective,
58
- EditorRedoButtonDirective,
59
- EditorUndoButtonDirective,
60
- EditorInsertImageButtonDirective,
61
- EditorIndentButtonDirective,
62
- EditorOutdentButtonDirective,
63
- EditorCreateLinkButtonDirective,
64
- EditorUnlinkButtonDirective,
65
- EditorInsertOrderedListButtonDirective,
66
- EditorInsertUnorderedListButtonDirective,
67
- EditorViewSourceButtonDirective,
68
- EditorBoldButtonDirective,
69
- EditorItalicButtonDirective,
70
- EditorUnderlineButtonDirective,
71
- EditorStrikethroughButtonDirective,
72
- EditorSubscriptButtonDirective,
73
- EditorSuperscriptButtonDirective,
74
- EditorForeColorDirective,
75
- EditorBackColorDirective,
76
- EditorCleanFormattingButtonDirective,
77
- EditorAddColumnBeforeButtonDirective,
78
- EditorAddColumnAfterButtonDirective,
79
- EditorAddRowBeforeButtonDirective,
80
- EditorAddRowAfterButtonDirective,
81
- EditorDeleteColumnButtonDirective,
82
- EditorDeleteRowButtonDirective,
83
- EditorDeleteTableButtonDirective,
84
- CustomMessagesComponent,
85
- EditorPrintDirective,
86
- EditorSelectAllButtonDirective,
87
- EditorBlockquoteDirective,
88
- EditorFontSizeComponent,
89
- EditorFontFamilyComponent,
90
- EditorFormatComponent,
91
- EditorColorPickerComponent,
92
- EditorInsertTableButtonComponent,
93
- EditorMergeCellsButtonDirective,
94
- EditorSplitCellButtonDirective
95
- ];