@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.
- package/fesm2022/progress-kendo-angular-editor.mjs +196 -196
- package/localization/messages.d.ts +1 -1
- package/package.json +20 -28
- package/schematics/ngAdd/index.js +4 -4
- package/tools/shared/editor-command-base.d.ts +1 -1
- package/esm2022/common/active-marks.mjs +0 -5
- package/esm2022/common/apply-to-word-options.mjs +0 -5
- package/esm2022/common/commands.mjs +0 -5
- package/esm2022/common/css-settings.interface.mjs +0 -5
- package/esm2022/common/direction.mjs +0 -5
- package/esm2022/common/error-messages.mjs +0 -16
- package/esm2022/common/font-family-item.interface.mjs +0 -5
- package/esm2022/common/font-size-item.interface.mjs +0 -5
- package/esm2022/common/format-item.interface.mjs +0 -5
- package/esm2022/common/image-data.interface.mjs +0 -5
- package/esm2022/common/link-data.interface.mjs +0 -5
- package/esm2022/common/paste-cleanup-settings.mjs +0 -5
- package/esm2022/common/plugins-function.mjs +0 -5
- package/esm2022/common/predicate.mjs +0 -5
- package/esm2022/common/provider.service.mjs +0 -17
- package/esm2022/common/resizable-options.interface.mjs +0 -5
- package/esm2022/common/styles.mjs +0 -306
- package/esm2022/common/table-data.interface.mjs +0 -5
- package/esm2022/config/command-icons.mjs +0 -93
- package/esm2022/config/commands.mjs +0 -62
- package/esm2022/config/schema.mjs +0 -22
- package/esm2022/config/semantic-nodes.mjs +0 -27
- package/esm2022/config/table-commands.mjs +0 -14
- package/esm2022/config/utils.mjs +0 -96
- package/esm2022/dialogs/colorpicker-dialog.component.mjs +0 -140
- package/esm2022/dialogs/file-link-dialog.component.mjs +0 -252
- package/esm2022/dialogs/font-family-dialog.component.mjs +0 -115
- package/esm2022/dialogs/font-size-dialog.component.mjs +0 -115
- package/esm2022/dialogs/format-dialog.component.mjs +0 -114
- package/esm2022/dialogs/image-dialog.component.mjs +0 -230
- package/esm2022/dialogs/insert-table-dialog.component.mjs +0 -79
- package/esm2022/dialogs/source-dialog.component.mjs +0 -112
- package/esm2022/directives.mjs +0 -95
- package/esm2022/editor-toolbar-state.mjs +0 -280
- package/esm2022/editor.component.mjs +0 -1319
- package/esm2022/editor.module.mjs +0 -89
- package/esm2022/index.mjs +0 -64
- package/esm2022/localization/custom-messages.component.mjs +0 -53
- package/esm2022/localization/editor-localization.service.mjs +0 -31
- package/esm2022/localization/localized-messages.directive.mjs +0 -35
- package/esm2022/localization/messages.mjs +0 -364
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/preventable-events/paste-event.mjs +0 -32
- package/esm2022/preventable-events/preventable-event.mjs +0 -25
- package/esm2022/progress-kendo-angular-editor.mjs +0 -8
- package/esm2022/tools/alignment/editor-align-center-button.directive.mjs +0 -42
- package/esm2022/tools/alignment/editor-align-justify-button.directive.mjs +0 -42
- package/esm2022/tools/alignment/editor-align-left-button.directive.mjs +0 -42
- package/esm2022/tools/alignment/editor-align-right-button.directive.mjs +0 -42
- package/esm2022/tools/blockquote/editor-blockquote-button.directive.mjs +0 -40
- package/esm2022/tools/colorpicker/editor-back-color.directive.mjs +0 -41
- package/esm2022/tools/colorpicker/editor-colorpicker.component.mjs +0 -377
- package/esm2022/tools/colorpicker/editor-fore-color.directive.mjs +0 -37
- package/esm2022/tools/editor-clean-formatting-button.directive.mjs +0 -41
- package/esm2022/tools/fontfamily/editor-fontfamily-dropdownlist.component.mjs +0 -109
- package/esm2022/tools/fontfamily/editor-fontfamily.component.mjs +0 -297
- package/esm2022/tools/fontsize/editor-fontsize-dropdownlist.component.mjs +0 -98
- package/esm2022/tools/fontsize/editor-fontsize.component.mjs +0 -305
- package/esm2022/tools/format/editor-format-dropdownlist.component.mjs +0 -182
- package/esm2022/tools/format/editor-format.component.mjs +0 -283
- package/esm2022/tools/history/editor-redo-button.directive.mjs +0 -42
- package/esm2022/tools/history/editor-undo-button.directive.mjs +0 -42
- package/esm2022/tools/image/editor-insert-image-button.directive.mjs +0 -41
- package/esm2022/tools/indentation/editor-indent-button.directive.mjs +0 -41
- package/esm2022/tools/indentation/editor-outdent-button.directive.mjs +0 -41
- package/esm2022/tools/link/editor-create-link-button.directive.mjs +0 -41
- package/esm2022/tools/link/editor-insert-file-button.directive.mjs +0 -40
- package/esm2022/tools/link/editor-unlink-button.directive.mjs +0 -41
- package/esm2022/tools/list/editor-insert-ordered-list-button.directive.mjs +0 -41
- package/esm2022/tools/list/editor-insert-unordered-list-button.directive.mjs +0 -42
- package/esm2022/tools/print/editor-print-button.directive.mjs +0 -62
- package/esm2022/tools/select-all/select-all-button.directive.mjs +0 -45
- package/esm2022/tools/shared/dropdown-tool.directive.mjs +0 -40
- package/esm2022/tools/shared/editor-command-base.mjs +0 -78
- package/esm2022/tools/shared/editor-command-button.mjs +0 -37
- package/esm2022/tools/shared/editor-command-dialog.mjs +0 -33
- package/esm2022/tools/source/editor-view-source-button.directive.mjs +0 -41
- package/esm2022/tools/tables/editor-add-column-after-button.directive.mjs +0 -42
- package/esm2022/tools/tables/editor-add-column-before-button.directive.mjs +0 -42
- package/esm2022/tools/tables/editor-add-row-after-button.directive.mjs +0 -42
- package/esm2022/tools/tables/editor-add-row-before-button.directive.mjs +0 -42
- package/esm2022/tools/tables/editor-delete-column-button.directive.mjs +0 -42
- package/esm2022/tools/tables/editor-delete-row-button.directive.mjs +0 -42
- package/esm2022/tools/tables/editor-delete-table-button.directive.mjs +0 -42
- package/esm2022/tools/tables/editor-insert-table-button.component.mjs +0 -307
- package/esm2022/tools/tables/editor-merge-cells-button.directive.mjs +0 -44
- package/esm2022/tools/tables/editor-split-cell-button.directive.mjs +0 -44
- package/esm2022/tools/tables/popup-table-grid.component.mjs +0 -117
- package/esm2022/tools/tools.service.mjs +0 -22
- package/esm2022/tools/typographical-emphasis/editor-bold-button.directive.mjs +0 -42
- package/esm2022/tools/typographical-emphasis/editor-italic-button.directive.mjs +0 -42
- package/esm2022/tools/typographical-emphasis/editor-strikethrough-button.directive.mjs +0 -42
- package/esm2022/tools/typographical-emphasis/editor-subscript-button.directive.mjs +0 -42
- package/esm2022/tools/typographical-emphasis/editor-superscript-button.directive.mjs +0 -42
- package/esm2022/tools/typographical-emphasis/editor-underline-button.directive.mjs +0 -42
- package/esm2022/util.mjs +0 -130
|
@@ -1,305 +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, ElementRef, forwardRef, Output, EventEmitter, Renderer2 } from '@angular/core';
|
|
6
|
-
import { ToolBarToolComponent } from '@progress/kendo-angular-toolbar';
|
|
7
|
-
import { fontSizeIcon } from '@progress/kendo-svg-icons';
|
|
8
|
-
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
9
|
-
import { DialogService } from '@progress/kendo-angular-dialog';
|
|
10
|
-
import { outerWidth, isPresent, getUniqueStyleValues } from '../../util';
|
|
11
|
-
import { EditorLocalizationService } from '../../localization/editor-localization.service';
|
|
12
|
-
import { FontSizeDialogComponent } from '../../dialogs/font-size-dialog.component';
|
|
13
|
-
import { FontSizeDropDownListComponent } from './editor-fontsize-dropdownlist.component';
|
|
14
|
-
import { ProviderService } from '../../common/provider.service';
|
|
15
|
-
import { EditorToolsService } from '../tools.service';
|
|
16
|
-
import * as i0 from "@angular/core";
|
|
17
|
-
import * as i1 from "@progress/kendo-angular-dialog";
|
|
18
|
-
import * as i2 from "../../localization/editor-localization.service";
|
|
19
|
-
import * as i3 from "../../common/provider.service";
|
|
20
|
-
import * as i4 from "../tools.service";
|
|
21
|
-
/**
|
|
22
|
-
* Configures a DropDownListComponent as an Editor tool ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
23
|
-
* Use this component to associate a `kendo-dropdownlist` with an Editor command that changes the font size of a content block.
|
|
24
|
-
* The component automatically sets the options and values of the drop-down list.
|
|
25
|
-
* ([see example]({% slug toolbartools_editor %}#toc-dropdownlists))
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```html
|
|
29
|
-
* <kendo-editor>
|
|
30
|
-
* <kendo-toolbar>
|
|
31
|
-
* <kendo-toolbar-dropdownlist kendoEditorFontSize></kendo-toolbar-dropdownlist>
|
|
32
|
-
* </kendo-toolbar>
|
|
33
|
-
* </kendo-editor>
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
export class EditorFontSizeComponent extends ToolBarToolComponent {
|
|
37
|
-
dialogService;
|
|
38
|
-
localization;
|
|
39
|
-
toolsService;
|
|
40
|
-
renderer;
|
|
41
|
-
value;
|
|
42
|
-
disabled = false;
|
|
43
|
-
tabindex = -1;
|
|
44
|
-
/**
|
|
45
|
-
* Overrides the default font size list.
|
|
46
|
-
* Treat numeric values as pixels.
|
|
47
|
-
*/
|
|
48
|
-
set data(sizes) {
|
|
49
|
-
let normalizedSizes;
|
|
50
|
-
if (sizes) {
|
|
51
|
-
normalizedSizes = sizes.map(s => {
|
|
52
|
-
if (typeof s.size === 'number') {
|
|
53
|
-
return { ...s, size: `${s.size}px` };
|
|
54
|
-
}
|
|
55
|
-
return s;
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
this._data = normalizedSizes || this._data;
|
|
59
|
-
}
|
|
60
|
-
get data() {
|
|
61
|
-
return this._data;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Fires when the user updates the value of the drop-down list.
|
|
65
|
-
*/
|
|
66
|
-
valueChange = new EventEmitter();
|
|
67
|
-
element;
|
|
68
|
-
fontSizeDropDownList;
|
|
69
|
-
fontSizeButton;
|
|
70
|
-
/**
|
|
71
|
-
* @hidden
|
|
72
|
-
*/
|
|
73
|
-
defaultItem;
|
|
74
|
-
fontSizeSVGIcon = fontSizeIcon;
|
|
75
|
-
/**
|
|
76
|
-
* @hidden
|
|
77
|
-
*/
|
|
78
|
-
itemDisabled;
|
|
79
|
-
subs;
|
|
80
|
-
editor;
|
|
81
|
-
_data = [
|
|
82
|
-
{ text: '8px', size: '8px' },
|
|
83
|
-
{ text: '10px', size: '10px' },
|
|
84
|
-
{ text: '12px', size: '12px' },
|
|
85
|
-
{ text: '14px', size: '14px' },
|
|
86
|
-
{ text: '18px', size: '18px' },
|
|
87
|
-
{ text: '24px', size: '24px' },
|
|
88
|
-
{ text: '36px', size: '36px' }
|
|
89
|
-
];
|
|
90
|
-
constructor(dialogService, localization, providerService, toolsService, renderer) {
|
|
91
|
-
super();
|
|
92
|
-
this.dialogService = dialogService;
|
|
93
|
-
this.localization = localization;
|
|
94
|
-
this.toolsService = toolsService;
|
|
95
|
-
this.renderer = renderer;
|
|
96
|
-
this.editor = providerService.editor;
|
|
97
|
-
this.isBuiltInTool = true;
|
|
98
|
-
}
|
|
99
|
-
ngOnInit() {
|
|
100
|
-
this.itemDisabled = itemArgs => {
|
|
101
|
-
if (!this.overflows && this.fontSizeDropDownList && !this.fontSizeDropDownList.dropDownList.isOpen) {
|
|
102
|
-
return true; //disable all items in order to prevent navigation when DDL is closed
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
return itemArgs.dataItem.size === null;
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
setTimeout(() => {
|
|
109
|
-
this.defaultItem = { text: this.title, size: null };
|
|
110
|
-
this.toolsService.needsCheck.next(undefined);
|
|
111
|
-
});
|
|
112
|
-
this.subs = this.editor.stateChange.subscribe(({ style }) => {
|
|
113
|
-
// remove units(px, em, rem...)
|
|
114
|
-
// string#match returns array
|
|
115
|
-
this.value = getUniqueStyleValues(style.selected, 'font-size') || null;
|
|
116
|
-
this.disabled = style.disabled;
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* @hidden
|
|
121
|
-
*/
|
|
122
|
-
onValueChange(ev) {
|
|
123
|
-
if (isPresent(ev)) {
|
|
124
|
-
this.editor.exec('fontSize', ev);
|
|
125
|
-
this.editor.view.focus();
|
|
126
|
-
this.valueChange.emit(this.data.find(d => d.size === ev));
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
ngOnDestroy() {
|
|
130
|
-
if (this.subs) {
|
|
131
|
-
this.subs.unsubscribe();
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
get outerWidth() {
|
|
135
|
-
if (this.element) {
|
|
136
|
-
return outerWidth(this.element.nativeElement);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
get title() {
|
|
140
|
-
return this.localization.get('fontSize');
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* @hidden
|
|
144
|
-
*/
|
|
145
|
-
openDialog() {
|
|
146
|
-
const dialogSettings = {
|
|
147
|
-
appendTo: this.editor.dialogContainer,
|
|
148
|
-
content: FontSizeDialogComponent,
|
|
149
|
-
width: 400,
|
|
150
|
-
autoFocusedElement: '.k-picker'
|
|
151
|
-
};
|
|
152
|
-
this.editor.toolbar.toggle(false);
|
|
153
|
-
const dialogContent = this.dialogService.open(dialogSettings).content.instance;
|
|
154
|
-
this.renderer.addClass(dialogContent.dialog.dialog.instance.wrapper.nativeElement.querySelector('.k-window'), 'k-editor-window');
|
|
155
|
-
dialogContent.setData({
|
|
156
|
-
editor: this.editor,
|
|
157
|
-
data: this.data,
|
|
158
|
-
defaultItem: this.defaultItem,
|
|
159
|
-
value: this.value,
|
|
160
|
-
itemDisabled: this.itemDisabled
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* @hidden
|
|
165
|
-
*/
|
|
166
|
-
canFocus() {
|
|
167
|
-
return !this.disabled;
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* @hidden
|
|
171
|
-
*/
|
|
172
|
-
focus() {
|
|
173
|
-
this.tabindex = 0;
|
|
174
|
-
if (this.overflows) {
|
|
175
|
-
this.fontSizeButton?.nativeElement.focus();
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
this.fontSizeDropDownList?.focus();
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* @hidden
|
|
183
|
-
*/
|
|
184
|
-
handleKey() {
|
|
185
|
-
this.tabindex = -1;
|
|
186
|
-
return false;
|
|
187
|
-
}
|
|
188
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorFontSizeComponent, deps: [{ token: i1.DialogService }, { token: i2.EditorLocalizationService }, { token: i3.ProviderService }, { token: i4.EditorToolsService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
189
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: EditorFontSizeComponent, isStandalone: true, selector: "kendo-toolbar-dropdownlist[kendoEditorFontSize]", inputs: { data: "data" }, outputs: { valueChange: "valueChange" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => EditorFontSizeComponent) }], viewQueries: [{ propertyName: "element", first: true, predicate: ["element"], descendants: true }, { propertyName: "fontSizeDropDownList", first: true, predicate: ["element"], descendants: true, read: FontSizeDropDownListComponent }, { propertyName: "fontSizeButton", first: true, predicate: ["fontSizeButton"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: `
|
|
190
|
-
<ng-template #toolbarTemplate>
|
|
191
|
-
<kendo-editor-fontsize-dropdownlist
|
|
192
|
-
#element
|
|
193
|
-
[defaultItem]="defaultItem"
|
|
194
|
-
[data]="data"
|
|
195
|
-
[(value)]="value"
|
|
196
|
-
[itemDisabled]="itemDisabled"
|
|
197
|
-
[title]="title"
|
|
198
|
-
[disabled]="disabled"
|
|
199
|
-
[tabindex]="tabindex"
|
|
200
|
-
(valueChange)="onValueChange($event)"
|
|
201
|
-
>
|
|
202
|
-
</kendo-editor-fontsize-dropdownlist>
|
|
203
|
-
</ng-template>
|
|
204
|
-
<ng-template #popupTemplate>
|
|
205
|
-
<div #fontSizeButton
|
|
206
|
-
tabindex="-1"
|
|
207
|
-
role="menuitem"
|
|
208
|
-
class="k-item k-menu-item"
|
|
209
|
-
[class.k-disabled]="disabled"
|
|
210
|
-
[tabindex]="tabindex"
|
|
211
|
-
(click)="openDialog()">
|
|
212
|
-
<span
|
|
213
|
-
class="k-link k-menu-link">
|
|
214
|
-
<kendo-icon-wrapper name="font-size" [svgIcon]="fontSizeSVGIcon"></kendo-icon-wrapper>
|
|
215
|
-
@if (title) {
|
|
216
|
-
<span class="k-menu-link-text">{{title}}</span>
|
|
217
|
-
}
|
|
218
|
-
</span>
|
|
219
|
-
</div>
|
|
220
|
-
</ng-template>
|
|
221
|
-
<ng-template #sectionTemplate>
|
|
222
|
-
<kendo-editor-fontsize-dropdownlist
|
|
223
|
-
#element
|
|
224
|
-
[defaultItem]="defaultItem"
|
|
225
|
-
[data]="data"
|
|
226
|
-
[(value)]="value"
|
|
227
|
-
[itemDisabled]="itemDisabled"
|
|
228
|
-
[title]="title"
|
|
229
|
-
[disabled]="disabled"
|
|
230
|
-
[tabindex]="tabindex"
|
|
231
|
-
(valueChange)="onValueChange($event)"
|
|
232
|
-
>
|
|
233
|
-
</kendo-editor-fontsize-dropdownlist>
|
|
234
|
-
</ng-template>
|
|
235
|
-
`, isInline: true, dependencies: [{ kind: "component", type: FontSizeDropDownListComponent, selector: "kendo-editor-fontsize-dropdownlist", inputs: ["data", "value", "defaultItem", "itemDisabled", "title", "disabled", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
236
|
-
}
|
|
237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorFontSizeComponent, decorators: [{
|
|
238
|
-
type: Component,
|
|
239
|
-
args: [{
|
|
240
|
-
providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => EditorFontSizeComponent) }],
|
|
241
|
-
selector: 'kendo-toolbar-dropdownlist[kendoEditorFontSize]',
|
|
242
|
-
template: `
|
|
243
|
-
<ng-template #toolbarTemplate>
|
|
244
|
-
<kendo-editor-fontsize-dropdownlist
|
|
245
|
-
#element
|
|
246
|
-
[defaultItem]="defaultItem"
|
|
247
|
-
[data]="data"
|
|
248
|
-
[(value)]="value"
|
|
249
|
-
[itemDisabled]="itemDisabled"
|
|
250
|
-
[title]="title"
|
|
251
|
-
[disabled]="disabled"
|
|
252
|
-
[tabindex]="tabindex"
|
|
253
|
-
(valueChange)="onValueChange($event)"
|
|
254
|
-
>
|
|
255
|
-
</kendo-editor-fontsize-dropdownlist>
|
|
256
|
-
</ng-template>
|
|
257
|
-
<ng-template #popupTemplate>
|
|
258
|
-
<div #fontSizeButton
|
|
259
|
-
tabindex="-1"
|
|
260
|
-
role="menuitem"
|
|
261
|
-
class="k-item k-menu-item"
|
|
262
|
-
[class.k-disabled]="disabled"
|
|
263
|
-
[tabindex]="tabindex"
|
|
264
|
-
(click)="openDialog()">
|
|
265
|
-
<span
|
|
266
|
-
class="k-link k-menu-link">
|
|
267
|
-
<kendo-icon-wrapper name="font-size" [svgIcon]="fontSizeSVGIcon"></kendo-icon-wrapper>
|
|
268
|
-
@if (title) {
|
|
269
|
-
<span class="k-menu-link-text">{{title}}</span>
|
|
270
|
-
}
|
|
271
|
-
</span>
|
|
272
|
-
</div>
|
|
273
|
-
</ng-template>
|
|
274
|
-
<ng-template #sectionTemplate>
|
|
275
|
-
<kendo-editor-fontsize-dropdownlist
|
|
276
|
-
#element
|
|
277
|
-
[defaultItem]="defaultItem"
|
|
278
|
-
[data]="data"
|
|
279
|
-
[(value)]="value"
|
|
280
|
-
[itemDisabled]="itemDisabled"
|
|
281
|
-
[title]="title"
|
|
282
|
-
[disabled]="disabled"
|
|
283
|
-
[tabindex]="tabindex"
|
|
284
|
-
(valueChange)="onValueChange($event)"
|
|
285
|
-
>
|
|
286
|
-
</kendo-editor-fontsize-dropdownlist>
|
|
287
|
-
</ng-template>
|
|
288
|
-
`,
|
|
289
|
-
standalone: true,
|
|
290
|
-
imports: [FontSizeDropDownListComponent, IconWrapperComponent]
|
|
291
|
-
}]
|
|
292
|
-
}], ctorParameters: () => [{ type: i1.DialogService }, { type: i2.EditorLocalizationService }, { type: i3.ProviderService }, { type: i4.EditorToolsService }, { type: i0.Renderer2 }], propDecorators: { data: [{
|
|
293
|
-
type: Input
|
|
294
|
-
}], valueChange: [{
|
|
295
|
-
type: Output
|
|
296
|
-
}], element: [{
|
|
297
|
-
type: ViewChild,
|
|
298
|
-
args: ['element']
|
|
299
|
-
}], fontSizeDropDownList: [{
|
|
300
|
-
type: ViewChild,
|
|
301
|
-
args: ['element', { read: FontSizeDropDownListComponent, static: false }]
|
|
302
|
-
}], fontSizeButton: [{
|
|
303
|
-
type: ViewChild,
|
|
304
|
-
args: ['fontSizeButton', { read: ElementRef }]
|
|
305
|
-
}] } });
|
|
@@ -1,182 +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, ElementRef, Output, EventEmitter } from '@angular/core';
|
|
6
|
-
import { DropDownListComponent, ItemTemplateDirective } from '@progress/kendo-angular-dropdowns';
|
|
7
|
-
import { DropDownToolDirective } from '../shared/dropdown-tool.directive';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export class FormatDropDownListComponent {
|
|
13
|
-
data;
|
|
14
|
-
value;
|
|
15
|
-
defaultItem;
|
|
16
|
-
itemDisabled;
|
|
17
|
-
title;
|
|
18
|
-
disabled;
|
|
19
|
-
tabindex;
|
|
20
|
-
valueChange = new EventEmitter();
|
|
21
|
-
element;
|
|
22
|
-
dropDownList;
|
|
23
|
-
onValueChange(tag) {
|
|
24
|
-
this.valueChange.emit(tag);
|
|
25
|
-
}
|
|
26
|
-
focus() {
|
|
27
|
-
this.dropDownList.focus();
|
|
28
|
-
}
|
|
29
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FormatDropDownListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: FormatDropDownListComponent, isStandalone: true, selector: "kendo-editor-format-dropdownlist", inputs: { data: "data", value: "value", defaultItem: "defaultItem", itemDisabled: "itemDisabled", title: "title", disabled: "disabled", tabindex: "tabindex" }, outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "element", first: true, predicate: ["element"], descendants: true, static: true }, { propertyName: "dropDownList", first: true, predicate: ["element"], descendants: true, read: DropDownListComponent, static: true }], ngImport: i0, template: `
|
|
31
|
-
<kendo-dropdownlist
|
|
32
|
-
#element
|
|
33
|
-
kendoEditorDropDownTool
|
|
34
|
-
[defaultItem]="defaultItem"
|
|
35
|
-
[textField]="'text'"
|
|
36
|
-
[valueField]="'tag'"
|
|
37
|
-
[data]="data"
|
|
38
|
-
[(value)]="value"
|
|
39
|
-
[valuePrimitive]="true"
|
|
40
|
-
[itemDisabled]="itemDisabled"
|
|
41
|
-
[attr.title]="title"
|
|
42
|
-
[disabled]="disabled"
|
|
43
|
-
[tabindex]="tabindex"
|
|
44
|
-
(valueChange)="onValueChange($event)"
|
|
45
|
-
[style.width.em]="13"
|
|
46
|
-
>
|
|
47
|
-
<ng-template kendoDropDownListItemTemplate let-dataItem>
|
|
48
|
-
@switch (dataItem.tag) {
|
|
49
|
-
@case ('h1') {
|
|
50
|
-
<span [style]="'display: block; font-size: 2em; margin-left: 0; font-weight: bold;'">
|
|
51
|
-
{{ dataItem.text }}
|
|
52
|
-
</span>
|
|
53
|
-
}
|
|
54
|
-
@case ('h2') {
|
|
55
|
-
<span [style]="'display: block; font-size: 1.5em; margin-left: 0; font-weight: bold;'">
|
|
56
|
-
{{ dataItem.text }}
|
|
57
|
-
</span>
|
|
58
|
-
}
|
|
59
|
-
@case ('h3') {
|
|
60
|
-
<span [style]="'display: block; font-size: 1.17em; margin-left: 0; font-weight: bold;'">
|
|
61
|
-
{{ dataItem.text }}
|
|
62
|
-
</span>
|
|
63
|
-
}
|
|
64
|
-
@case ('h4') {
|
|
65
|
-
<span [style]="'display: block; font-size: 1em; margin-left: 0; font-weight: bold;'">
|
|
66
|
-
{{ dataItem.text }}
|
|
67
|
-
</span>
|
|
68
|
-
}
|
|
69
|
-
@case ('h5') {
|
|
70
|
-
<span [style]="'display: block; font-size: .83em; margin-left: 0; font-weight: bold;'">
|
|
71
|
-
{{ dataItem.text }}
|
|
72
|
-
</span>
|
|
73
|
-
}
|
|
74
|
-
@case ('h6') {
|
|
75
|
-
<span [style]="'display: block; font-size: .67em; margin-left: 0; font-weight: bold;'">
|
|
76
|
-
{{ dataItem.text }}
|
|
77
|
-
</span>
|
|
78
|
-
}
|
|
79
|
-
@case ('p') {
|
|
80
|
-
<span [style]="'display: block; margin-left: 0;'">
|
|
81
|
-
{{ dataItem.text }}
|
|
82
|
-
</span>
|
|
83
|
-
}
|
|
84
|
-
@default {
|
|
85
|
-
<span>{{ dataItem.text }}</span>
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
</ng-template>
|
|
89
|
-
</kendo-dropdownlist>
|
|
90
|
-
`, isInline: true, dependencies: [{ kind: "component", type: DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "adaptiveTitle", "adaptiveSubtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "directive", type: DropDownToolDirective, selector: "[kendoEditorDropDownTool]" }, { kind: "directive", type: ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }] });
|
|
91
|
-
}
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FormatDropDownListComponent, decorators: [{
|
|
93
|
-
type: Component,
|
|
94
|
-
args: [{
|
|
95
|
-
selector: 'kendo-editor-format-dropdownlist',
|
|
96
|
-
template: `
|
|
97
|
-
<kendo-dropdownlist
|
|
98
|
-
#element
|
|
99
|
-
kendoEditorDropDownTool
|
|
100
|
-
[defaultItem]="defaultItem"
|
|
101
|
-
[textField]="'text'"
|
|
102
|
-
[valueField]="'tag'"
|
|
103
|
-
[data]="data"
|
|
104
|
-
[(value)]="value"
|
|
105
|
-
[valuePrimitive]="true"
|
|
106
|
-
[itemDisabled]="itemDisabled"
|
|
107
|
-
[attr.title]="title"
|
|
108
|
-
[disabled]="disabled"
|
|
109
|
-
[tabindex]="tabindex"
|
|
110
|
-
(valueChange)="onValueChange($event)"
|
|
111
|
-
[style.width.em]="13"
|
|
112
|
-
>
|
|
113
|
-
<ng-template kendoDropDownListItemTemplate let-dataItem>
|
|
114
|
-
@switch (dataItem.tag) {
|
|
115
|
-
@case ('h1') {
|
|
116
|
-
<span [style]="'display: block; font-size: 2em; margin-left: 0; font-weight: bold;'">
|
|
117
|
-
{{ dataItem.text }}
|
|
118
|
-
</span>
|
|
119
|
-
}
|
|
120
|
-
@case ('h2') {
|
|
121
|
-
<span [style]="'display: block; font-size: 1.5em; margin-left: 0; font-weight: bold;'">
|
|
122
|
-
{{ dataItem.text }}
|
|
123
|
-
</span>
|
|
124
|
-
}
|
|
125
|
-
@case ('h3') {
|
|
126
|
-
<span [style]="'display: block; font-size: 1.17em; margin-left: 0; font-weight: bold;'">
|
|
127
|
-
{{ dataItem.text }}
|
|
128
|
-
</span>
|
|
129
|
-
}
|
|
130
|
-
@case ('h4') {
|
|
131
|
-
<span [style]="'display: block; font-size: 1em; margin-left: 0; font-weight: bold;'">
|
|
132
|
-
{{ dataItem.text }}
|
|
133
|
-
</span>
|
|
134
|
-
}
|
|
135
|
-
@case ('h5') {
|
|
136
|
-
<span [style]="'display: block; font-size: .83em; margin-left: 0; font-weight: bold;'">
|
|
137
|
-
{{ dataItem.text }}
|
|
138
|
-
</span>
|
|
139
|
-
}
|
|
140
|
-
@case ('h6') {
|
|
141
|
-
<span [style]="'display: block; font-size: .67em; margin-left: 0; font-weight: bold;'">
|
|
142
|
-
{{ dataItem.text }}
|
|
143
|
-
</span>
|
|
144
|
-
}
|
|
145
|
-
@case ('p') {
|
|
146
|
-
<span [style]="'display: block; margin-left: 0;'">
|
|
147
|
-
{{ dataItem.text }}
|
|
148
|
-
</span>
|
|
149
|
-
}
|
|
150
|
-
@default {
|
|
151
|
-
<span>{{ dataItem.text }}</span>
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
</ng-template>
|
|
155
|
-
</kendo-dropdownlist>
|
|
156
|
-
`,
|
|
157
|
-
standalone: true,
|
|
158
|
-
imports: [DropDownListComponent, DropDownToolDirective, ItemTemplateDirective]
|
|
159
|
-
}]
|
|
160
|
-
}], propDecorators: { data: [{
|
|
161
|
-
type: Input
|
|
162
|
-
}], value: [{
|
|
163
|
-
type: Input
|
|
164
|
-
}], defaultItem: [{
|
|
165
|
-
type: Input
|
|
166
|
-
}], itemDisabled: [{
|
|
167
|
-
type: Input
|
|
168
|
-
}], title: [{
|
|
169
|
-
type: Input
|
|
170
|
-
}], disabled: [{
|
|
171
|
-
type: Input
|
|
172
|
-
}], tabindex: [{
|
|
173
|
-
type: Input
|
|
174
|
-
}], valueChange: [{
|
|
175
|
-
type: Output
|
|
176
|
-
}], element: [{
|
|
177
|
-
type: ViewChild,
|
|
178
|
-
args: ['element', { static: true }]
|
|
179
|
-
}], dropDownList: [{
|
|
180
|
-
type: ViewChild,
|
|
181
|
-
args: ['element', { read: DropDownListComponent, static: true }]
|
|
182
|
-
}] } });
|