@progress/kendo-angular-toolbar 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-toolbar.mjs +62 -62
- package/localization/messages.d.ts +1 -1
- package/package.json +12 -20
- package/esm2022/common/fillmode.mjs +0 -5
- package/esm2022/common/overflow-mode.mjs +0 -5
- package/esm2022/common/overflow-settings.mjs +0 -5
- package/esm2022/common/preventable-event.mjs +0 -25
- package/esm2022/common/renderer-click.mjs +0 -5
- package/esm2022/common/scroll-buttons.mjs +0 -5
- package/esm2022/common/size.mjs +0 -5
- package/esm2022/direction.mjs +0 -5
- package/esm2022/directives.mjs +0 -45
- package/esm2022/display-mode.mjs +0 -5
- package/esm2022/group-selection-settings.mjs +0 -5
- package/esm2022/index.mjs +0 -17
- package/esm2022/localization/custom-messages.component.mjs +0 -56
- package/esm2022/localization/localized-toolbar-messages.directive.mjs +0 -39
- package/esm2022/localization/messages.mjs +0 -39
- package/esm2022/navigation.service.mjs +0 -159
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/popup-settings.mjs +0 -5
- package/esm2022/progress-kendo-angular-toolbar.mjs +0 -8
- package/esm2022/refresh.service.mjs +0 -20
- package/esm2022/render-location.mjs +0 -5
- package/esm2022/renderer.component.mjs +0 -191
- package/esm2022/renderer.service.mjs +0 -52
- package/esm2022/scroll.service.mjs +0 -110
- package/esm2022/scrollable-button.component.mjs +0 -152
- package/esm2022/tool-options.mjs +0 -5
- package/esm2022/toolbar.component.mjs +0 -1582
- package/esm2022/toolbar.module.mjs +0 -46
- package/esm2022/tools/toolbar-button.component.mjs +0 -712
- package/esm2022/tools/toolbar-buttongroup.component.mjs +0 -448
- package/esm2022/tools/toolbar-dropdownbutton.component.mjs +0 -595
- package/esm2022/tools/toolbar-separator.component.mjs +0 -96
- package/esm2022/tools/toolbar-spacer.component.mjs +0 -76
- package/esm2022/tools/toolbar-splitbutton.component.mjs +0 -607
- package/esm2022/tools/toolbar-tool.component.mjs +0 -106
- package/esm2022/tools/tools.service.mjs +0 -25
- package/esm2022/util.mjs +0 -244
|
@@ -1,712 +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, forwardRef, ViewChild, Input, Output, EventEmitter, ElementRef, isDevMode, NgZone } from '@angular/core';
|
|
6
|
-
import { ToolBarToolComponent } from './toolbar-tool.component';
|
|
7
|
-
import { getValueForLocation } from '../util';
|
|
8
|
-
import { ButtonComponent } from '@progress/kendo-angular-buttons';
|
|
9
|
-
import { take } from 'rxjs/operators';
|
|
10
|
-
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
11
|
-
import { BadgeComponent, BadgeContainerComponent } from '@progress/kendo-angular-indicators';
|
|
12
|
-
import { NgStyle, NgClass } from '@angular/common';
|
|
13
|
-
import { ToolBarComponent } from '../toolbar.component';
|
|
14
|
-
import * as i0 from "@angular/core";
|
|
15
|
-
import * as i1 from "../toolbar.component";
|
|
16
|
-
/**
|
|
17
|
-
* Represents the [Kendo UI ToolBar Button tool for Angular]({% slug controltypes_toolbar %}#toc-buttons).
|
|
18
|
-
*
|
|
19
|
-
* Use this component to render a button inside the ToolBar.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```html
|
|
23
|
-
* <kendo-toolbar>
|
|
24
|
-
* <kendo-toolbar-button text="Button"></kendo-toolbar-button>
|
|
25
|
-
* </kendo-toolbar>
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
export class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
30
|
-
element;
|
|
31
|
-
zone;
|
|
32
|
-
host;
|
|
33
|
-
// showText and showIcon showIcon should be declared first
|
|
34
|
-
/**
|
|
35
|
-
* Specifies the button text visibility.
|
|
36
|
-
* Accepts a `DisplayMode` value.
|
|
37
|
-
* @default 'always'
|
|
38
|
-
*/
|
|
39
|
-
set showText(value) {
|
|
40
|
-
this._showText = value;
|
|
41
|
-
this.setTextDisplayMode();
|
|
42
|
-
}
|
|
43
|
-
get showText() {
|
|
44
|
-
return this._showText;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Specifies the button icon visibility.
|
|
48
|
-
* Accepts a `DisplayMode` value.
|
|
49
|
-
* @default 'always'
|
|
50
|
-
*/
|
|
51
|
-
set showIcon(value) {
|
|
52
|
-
this._showIcon = value;
|
|
53
|
-
this.setTextDisplayMode();
|
|
54
|
-
}
|
|
55
|
-
get showIcon() {
|
|
56
|
-
return this._showIcon;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Specifies the text of the Button
|
|
60
|
-
* ([see example]({% slug controltypes_toolbar %}#toc-buttons)).
|
|
61
|
-
*/
|
|
62
|
-
set text(text) {
|
|
63
|
-
this._text = text;
|
|
64
|
-
this.setTextDisplayMode();
|
|
65
|
-
}
|
|
66
|
-
get text() {
|
|
67
|
-
return this._text;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* @hidden
|
|
71
|
-
*/
|
|
72
|
-
get size() {
|
|
73
|
-
return this.host.size;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Specifies custom inline CSS styles for the Button.
|
|
77
|
-
*/
|
|
78
|
-
style;
|
|
79
|
-
/**
|
|
80
|
-
* Specifies custom CSS class names to be added to the Button.
|
|
81
|
-
*/
|
|
82
|
-
className;
|
|
83
|
-
/**
|
|
84
|
-
* Specifies the `title` attribute of the Button.
|
|
85
|
-
*/
|
|
86
|
-
title;
|
|
87
|
-
/**
|
|
88
|
-
* Disables the Button when set to `true`
|
|
89
|
-
* ([see example]({% slug controltypes_toolbar %}#toc-buttons)).
|
|
90
|
-
*/
|
|
91
|
-
disabled;
|
|
92
|
-
/**
|
|
93
|
-
* Provides visual styling to indicate if the Button is active
|
|
94
|
-
* ([see example]({% slug controltypes_toolbar %}#toc-toggle-buttons)).
|
|
95
|
-
* For toggleable buttons, set this to `true`.
|
|
96
|
-
* @default false
|
|
97
|
-
*/
|
|
98
|
-
toggleable = false;
|
|
99
|
-
/**
|
|
100
|
-
* @hidden
|
|
101
|
-
*/
|
|
102
|
-
set look(look) {
|
|
103
|
-
if (look) {
|
|
104
|
-
this.fillMode = look === 'default' ? 'solid' : look;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* @hidden
|
|
109
|
-
*/
|
|
110
|
-
get togglable() {
|
|
111
|
-
return this.toggleable;
|
|
112
|
-
}
|
|
113
|
-
set togglable(value) {
|
|
114
|
-
this.toggleable = value;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Sets the selected state of the Button.
|
|
118
|
-
* Use with the `toggleable` property.
|
|
119
|
-
* @default false
|
|
120
|
-
*/
|
|
121
|
-
selected = false;
|
|
122
|
-
/**
|
|
123
|
-
* Specifies the background and border styles of the Button.
|
|
124
|
-
* Accepts a `ButtonFillMode` value.
|
|
125
|
-
* @default 'solid'
|
|
126
|
-
*/
|
|
127
|
-
fillMode = 'solid';
|
|
128
|
-
/**
|
|
129
|
-
* Specifies the border radius of the Button.
|
|
130
|
-
* Accepts a `ButtonRounded` value.
|
|
131
|
-
*
|
|
132
|
-
* @default 'medium'
|
|
133
|
-
*/
|
|
134
|
-
rounded = 'medium';
|
|
135
|
-
/**
|
|
136
|
-
* Specifies the predefined theme color of the Button.
|
|
137
|
-
* Accepts a `ButtonThemeColor` value.
|
|
138
|
-
* @default 'base'
|
|
139
|
-
*/
|
|
140
|
-
themeColor = 'base';
|
|
141
|
-
/**
|
|
142
|
-
* Defines the name for an existing icon in a Kendo UI theme
|
|
143
|
-
* ([see example]({% slug controltypes_toolbar %}#toc-buttons)).
|
|
144
|
-
* The icon is rendered inside the Button by a `span.k-icon` element.
|
|
145
|
-
*/
|
|
146
|
-
set icon(icon) {
|
|
147
|
-
this.toolbarOptions.icon = getValueForLocation(icon, this.showIcon, false);
|
|
148
|
-
this.overflowOptions.icon = getValueForLocation(icon, this.showIcon, true);
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Defines a CSS class or multiple classes to be applied to a `span` element inside the Button.
|
|
152
|
-
* Allows the usage of custom icons.
|
|
153
|
-
*/
|
|
154
|
-
set iconClass(iconClass) {
|
|
155
|
-
this.toolbarOptions.iconClass = getValueForLocation(iconClass, this.showIcon, false);
|
|
156
|
-
this.overflowOptions.iconClass = getValueForLocation(iconClass, this.showIcon, true);
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Defines an SVGIcon to be rendered within the button.
|
|
160
|
-
* Accepts either an [existing Kendo SVG icon](slug:svgicon_list) or a custom one.
|
|
161
|
-
*/
|
|
162
|
-
set svgIcon(icon) {
|
|
163
|
-
const isIconSet = this.toolbarOptions.icon || this.overflowOptions.icon;
|
|
164
|
-
const isIconClassSet = this.toolbarOptions.iconClass || this.overflowOptions.iconClass;
|
|
165
|
-
if (isDevMode() &&
|
|
166
|
-
icon &&
|
|
167
|
-
isIconSet &&
|
|
168
|
-
isIconClassSet) {
|
|
169
|
-
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
170
|
-
}
|
|
171
|
-
this.toolbarOptions.svgIcon = getValueForLocation(icon, this.showIcon, false);
|
|
172
|
-
this.overflowOptions.svgIcon = getValueForLocation(icon, this.showIcon, true);
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Defines a URL for an image to be rendered inside the Button.
|
|
176
|
-
* The URL can be relative or absolute.
|
|
177
|
-
*/
|
|
178
|
-
set imageUrl(imageUrl) {
|
|
179
|
-
this.toolbarOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, false);
|
|
180
|
-
this.overflowOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, true);
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Fires each time the Button is clicked.
|
|
184
|
-
*/
|
|
185
|
-
click = new EventEmitter();
|
|
186
|
-
/**
|
|
187
|
-
* Fires when the Button's `pointerdown` event is triggered.
|
|
188
|
-
*/
|
|
189
|
-
pointerdown = new EventEmitter();
|
|
190
|
-
/**
|
|
191
|
-
* Fires each time the selected state of a toggleable Button is changed.
|
|
192
|
-
* The event argument is the new selected state (Boolean).
|
|
193
|
-
*/
|
|
194
|
-
selectedChange = new EventEmitter();
|
|
195
|
-
toolbarOptions = {
|
|
196
|
-
text: '',
|
|
197
|
-
icon: '',
|
|
198
|
-
iconClass: '',
|
|
199
|
-
svgIcon: null,
|
|
200
|
-
imageUrl: ''
|
|
201
|
-
};
|
|
202
|
-
overflowOptions = {
|
|
203
|
-
text: '',
|
|
204
|
-
icon: '',
|
|
205
|
-
iconClass: '',
|
|
206
|
-
svgIcon: null,
|
|
207
|
-
imageUrl: ''
|
|
208
|
-
};
|
|
209
|
-
/**
|
|
210
|
-
* @hidden
|
|
211
|
-
*/
|
|
212
|
-
hasBadgeContainer = false;
|
|
213
|
-
/**
|
|
214
|
-
* @hidden
|
|
215
|
-
*/
|
|
216
|
-
showBadge = false;
|
|
217
|
-
toolbarButtonElement;
|
|
218
|
-
sectionButtonElement;
|
|
219
|
-
overflowButtonElement;
|
|
220
|
-
_showText;
|
|
221
|
-
_showIcon;
|
|
222
|
-
_text;
|
|
223
|
-
propertyChangeSub;
|
|
224
|
-
constructor(element, zone, host) {
|
|
225
|
-
super();
|
|
226
|
-
this.element = element;
|
|
227
|
-
this.zone = zone;
|
|
228
|
-
this.host = host;
|
|
229
|
-
this.isBuiltInTool = true;
|
|
230
|
-
this.propertyChangeSub = this.host.propertyChange.subscribe(change => {
|
|
231
|
-
if (change.property === 'showText' || change.property === 'showIcon') {
|
|
232
|
-
this[change.property] = change.value;
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
ngOnInit() {
|
|
237
|
-
this.setTextDisplayMode();
|
|
238
|
-
}
|
|
239
|
-
ngOnDestroy() {
|
|
240
|
-
this.propertyChangeSub.unsubscribe();
|
|
241
|
-
this.propertyChangeSub = null;
|
|
242
|
-
}
|
|
243
|
-
ngOnChanges(changes) {
|
|
244
|
-
if (changes['rounded']) {
|
|
245
|
-
this.rounded = changes['rounded'].currentValue;
|
|
246
|
-
}
|
|
247
|
-
if (changes['themeColor']) {
|
|
248
|
-
this.themeColor = changes['themeColor'].currentValue;
|
|
249
|
-
}
|
|
250
|
-
if (changes['showText']) {
|
|
251
|
-
this.showText = changes['showText'].currentValue;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* @hidden
|
|
256
|
-
*/
|
|
257
|
-
onBlur() {
|
|
258
|
-
this.getButton().tabIndex = -1;
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* @hidden
|
|
262
|
-
*/
|
|
263
|
-
canFocus() {
|
|
264
|
-
return !this.disabled;
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* @hidden
|
|
268
|
-
*/
|
|
269
|
-
focus(ev) {
|
|
270
|
-
// guard against focusing twice on mousedown.
|
|
271
|
-
if (!ev || ev.type === 'focus' || ev.type === 'keydown') {
|
|
272
|
-
this.getButton().focus({ preventScroll: true });
|
|
273
|
-
}
|
|
274
|
-
this.getButton().tabIndex = 0;
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* @hidden
|
|
278
|
-
*/
|
|
279
|
-
handleKey() {
|
|
280
|
-
this.getButton().tabIndex = -1;
|
|
281
|
-
return false;
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* @hidden
|
|
285
|
-
*/
|
|
286
|
-
handleClick(ev) {
|
|
287
|
-
this.click.emit(ev);
|
|
288
|
-
if (this.toggleable) {
|
|
289
|
-
this.selected = !this.selected;
|
|
290
|
-
this.selectedChange.emit(this.selected);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* @hidden
|
|
295
|
-
*/
|
|
296
|
-
selectedChangeHandler(state) {
|
|
297
|
-
this.selected = state;
|
|
298
|
-
this.selectedChange.emit(state);
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* @hidden
|
|
302
|
-
*/
|
|
303
|
-
getButton() {
|
|
304
|
-
return this[`${this.location}ButtonElement`]?.nativeElement;
|
|
305
|
-
}
|
|
306
|
-
setTextDisplayMode() {
|
|
307
|
-
this.toolbarOptions.text = this.showText === 'menu' || this.showText === 'never' ? undefined : this.text;
|
|
308
|
-
this.zone.onStable.pipe(take(1)).subscribe(() => {
|
|
309
|
-
this.overflowOptions.text = this.showText === 'toolbar' || this.showText === 'never' ? undefined : this.text;
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
313
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ToolBarButtonComponent, isStandalone: true, selector: "kendo-toolbar-button", inputs: { showText: "showText", showIcon: "showIcon", text: "text", style: "style", className: "className", title: "title", disabled: "disabled", toggleable: "toggleable", look: "look", togglable: "togglable", selected: "selected", fillMode: "fillMode", rounded: "rounded", themeColor: "themeColor", icon: "icon", iconClass: "iconClass", svgIcon: "svgIcon", imageUrl: "imageUrl" }, outputs: { click: "click", pointerdown: "pointerdown", selectedChange: "selectedChange" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent) }], viewQueries: [{ propertyName: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "sectionButtonElement", first: true, predicate: ["sectionButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
314
|
-
<ng-template #toolbarTemplate>
|
|
315
|
-
@if (hasBadgeContainer) {
|
|
316
|
-
<kendo-badge-container>
|
|
317
|
-
<button
|
|
318
|
-
#toolbarButton
|
|
319
|
-
[class.k-toolbar-button]="!toggleable"
|
|
320
|
-
[class.k-toolbar-toggle-button]="toggleable"
|
|
321
|
-
[tabindex]="tabIndex"
|
|
322
|
-
type="button"
|
|
323
|
-
kendoButton
|
|
324
|
-
[size]="size"
|
|
325
|
-
[ngStyle]="style"
|
|
326
|
-
[ngClass]="className"
|
|
327
|
-
[attr.title]="title"
|
|
328
|
-
[disabled]="disabled"
|
|
329
|
-
[toggleable]="toggleable"
|
|
330
|
-
[fillMode]="fillMode"
|
|
331
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
332
|
-
[rounded]="rounded"
|
|
333
|
-
[selected]="selected"
|
|
334
|
-
[icon]="toolbarOptions.icon"
|
|
335
|
-
[iconClass]="toolbarOptions.iconClass"
|
|
336
|
-
[svgIcon]="toolbarOptions.svgIcon"
|
|
337
|
-
[imageUrl]="toolbarOptions.imageUrl"
|
|
338
|
-
(click)="click.emit($event)"
|
|
339
|
-
(pointerdown)="pointerdown.emit($event)"
|
|
340
|
-
(selectedChange)="selectedChangeHandler($event)"
|
|
341
|
-
(blur)="onBlur()"
|
|
342
|
-
>
|
|
343
|
-
{{ toolbarOptions.text }}
|
|
344
|
-
</button>
|
|
345
|
-
@if (showBadge) {
|
|
346
|
-
<kendo-badge [cutoutBorder]="true" rounded="full"></kendo-badge>
|
|
347
|
-
}
|
|
348
|
-
</kendo-badge-container>
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
@if (!hasBadgeContainer) {
|
|
352
|
-
<button
|
|
353
|
-
#toolbarButton
|
|
354
|
-
[class.k-toolbar-button]="!toggleable"
|
|
355
|
-
[class.k-toolbar-toggle-button]="toggleable"
|
|
356
|
-
[tabindex]="tabIndex"
|
|
357
|
-
type="button"
|
|
358
|
-
kendoButton
|
|
359
|
-
[size]="size"
|
|
360
|
-
[ngStyle]="style"
|
|
361
|
-
[ngClass]="className"
|
|
362
|
-
[attr.title]="title"
|
|
363
|
-
[disabled]="disabled"
|
|
364
|
-
[toggleable]="toggleable"
|
|
365
|
-
[fillMode]="fillMode"
|
|
366
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
367
|
-
[rounded]="rounded"
|
|
368
|
-
[selected]="selected"
|
|
369
|
-
[icon]="toolbarOptions.icon"
|
|
370
|
-
[iconClass]="toolbarOptions.iconClass"
|
|
371
|
-
[svgIcon]="toolbarOptions.svgIcon"
|
|
372
|
-
[imageUrl]="toolbarOptions.imageUrl"
|
|
373
|
-
(click)="click.emit($event)"
|
|
374
|
-
(pointerdown)="pointerdown.emit($event)"
|
|
375
|
-
(selectedChange)="selectedChangeHandler($event)"
|
|
376
|
-
(blur)="onBlur()"
|
|
377
|
-
>
|
|
378
|
-
{{ toolbarOptions.text }}
|
|
379
|
-
</button>
|
|
380
|
-
}
|
|
381
|
-
</ng-template>
|
|
382
|
-
<ng-template #popupTemplate>
|
|
383
|
-
<div
|
|
384
|
-
#overflowButton
|
|
385
|
-
tabindex="-1"
|
|
386
|
-
role="menuitem"
|
|
387
|
-
class="k-item k-menu-item"
|
|
388
|
-
[class.k-disabled]="disabled"
|
|
389
|
-
[ngClass]="className"
|
|
390
|
-
[ngStyle]="style"
|
|
391
|
-
(click)="handleClick($event)">
|
|
392
|
-
<span
|
|
393
|
-
class="k-link k-menu-link"
|
|
394
|
-
[class.k-selected]="selected"
|
|
395
|
-
>
|
|
396
|
-
@if (overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon) {
|
|
397
|
-
<kendo-icon-wrapper
|
|
398
|
-
[name]="overflowOptions.icon"
|
|
399
|
-
[customFontClass]="overflowOptions.iconClass"
|
|
400
|
-
[svgIcon]="overflowOptions.svgIcon"
|
|
401
|
-
></kendo-icon-wrapper>
|
|
402
|
-
}
|
|
403
|
-
@if (overflowOptions.imageUrl) {
|
|
404
|
-
<span class="k-icon k-button-icon">
|
|
405
|
-
<img [src]="overflowOptions.imageUrl" role="presentation" class="k-image" />
|
|
406
|
-
</span>
|
|
407
|
-
}
|
|
408
|
-
@if (overflowOptions.text) {
|
|
409
|
-
<span class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
410
|
-
}
|
|
411
|
-
</span>
|
|
412
|
-
</div>
|
|
413
|
-
</ng-template>
|
|
414
|
-
<ng-template #sectionTemplate>
|
|
415
|
-
@if (hasBadgeContainer) {
|
|
416
|
-
<kendo-badge-container>
|
|
417
|
-
<button
|
|
418
|
-
#sectionButton
|
|
419
|
-
[class.k-toolbar-button]="!toggleable"
|
|
420
|
-
[class.k-toolbar-toggle-button]="toggleable"
|
|
421
|
-
[tabindex]="tabIndex"
|
|
422
|
-
type="button"
|
|
423
|
-
kendoButton
|
|
424
|
-
[size]="size"
|
|
425
|
-
[ngStyle]="style"
|
|
426
|
-
[ngClass]="className"
|
|
427
|
-
[attr.title]="title"
|
|
428
|
-
[disabled]="disabled"
|
|
429
|
-
[toggleable]="toggleable"
|
|
430
|
-
[fillMode]="fillMode"
|
|
431
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
432
|
-
[rounded]="rounded"
|
|
433
|
-
[selected]="selected"
|
|
434
|
-
[icon]="toolbarOptions.icon"
|
|
435
|
-
[iconClass]="toolbarOptions.iconClass"
|
|
436
|
-
[svgIcon]="toolbarOptions.svgIcon"
|
|
437
|
-
[imageUrl]="toolbarOptions.imageUrl"
|
|
438
|
-
(click)="click.emit($event)"
|
|
439
|
-
(pointerdown)="pointerdown.emit($event)"
|
|
440
|
-
(selectedChange)="selectedChangeHandler($event)"
|
|
441
|
-
(blur)="onBlur()"
|
|
442
|
-
>
|
|
443
|
-
{{ toolbarOptions.text }}
|
|
444
|
-
</button>
|
|
445
|
-
@if (showBadge) {
|
|
446
|
-
<kendo-badge [cutoutBorder]="true" rounded="full"></kendo-badge>
|
|
447
|
-
}
|
|
448
|
-
</kendo-badge-container>
|
|
449
|
-
}
|
|
450
|
-
@if (!hasBadgeContainer) {
|
|
451
|
-
<button
|
|
452
|
-
#sectionButton
|
|
453
|
-
[class.k-toolbar-button]="!toggleable"
|
|
454
|
-
[class.k-toolbar-toggle-button]="toggleable"
|
|
455
|
-
[tabindex]="tabIndex"
|
|
456
|
-
type="button"
|
|
457
|
-
kendoButton
|
|
458
|
-
[size]="size"
|
|
459
|
-
[ngStyle]="style"
|
|
460
|
-
[ngClass]="className"
|
|
461
|
-
[attr.title]="title"
|
|
462
|
-
[disabled]="disabled"
|
|
463
|
-
[toggleable]="toggleable"
|
|
464
|
-
[fillMode]="fillMode"
|
|
465
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
466
|
-
[rounded]="rounded"
|
|
467
|
-
[selected]="selected"
|
|
468
|
-
[icon]="toolbarOptions.icon"
|
|
469
|
-
[iconClass]="toolbarOptions.iconClass"
|
|
470
|
-
[svgIcon]="toolbarOptions.svgIcon"
|
|
471
|
-
[imageUrl]="toolbarOptions.imageUrl"
|
|
472
|
-
(click)="click.emit($event)"
|
|
473
|
-
(pointerdown)="pointerdown.emit($event)"
|
|
474
|
-
(selectedChange)="selectedChangeHandler($event)"
|
|
475
|
-
(blur)="onBlur()"
|
|
476
|
-
>
|
|
477
|
-
{{ toolbarOptions.text }}
|
|
478
|
-
</button>
|
|
479
|
-
}
|
|
480
|
-
</ng-template>
|
|
481
|
-
`, isInline: true, dependencies: [{ 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"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: BadgeComponent, selector: "kendo-badge", inputs: ["align", "size", "fill", "themeColor", "rounded", "position", "cutoutBorder"] }, { kind: "component", type: BadgeContainerComponent, selector: "kendo-badge-container" }] });
|
|
482
|
-
}
|
|
483
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolBarButtonComponent, decorators: [{
|
|
484
|
-
type: Component,
|
|
485
|
-
args: [{
|
|
486
|
-
exportAs: 'kendoToolBarButton',
|
|
487
|
-
providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent) }],
|
|
488
|
-
selector: 'kendo-toolbar-button',
|
|
489
|
-
template: `
|
|
490
|
-
<ng-template #toolbarTemplate>
|
|
491
|
-
@if (hasBadgeContainer) {
|
|
492
|
-
<kendo-badge-container>
|
|
493
|
-
<button
|
|
494
|
-
#toolbarButton
|
|
495
|
-
[class.k-toolbar-button]="!toggleable"
|
|
496
|
-
[class.k-toolbar-toggle-button]="toggleable"
|
|
497
|
-
[tabindex]="tabIndex"
|
|
498
|
-
type="button"
|
|
499
|
-
kendoButton
|
|
500
|
-
[size]="size"
|
|
501
|
-
[ngStyle]="style"
|
|
502
|
-
[ngClass]="className"
|
|
503
|
-
[attr.title]="title"
|
|
504
|
-
[disabled]="disabled"
|
|
505
|
-
[toggleable]="toggleable"
|
|
506
|
-
[fillMode]="fillMode"
|
|
507
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
508
|
-
[rounded]="rounded"
|
|
509
|
-
[selected]="selected"
|
|
510
|
-
[icon]="toolbarOptions.icon"
|
|
511
|
-
[iconClass]="toolbarOptions.iconClass"
|
|
512
|
-
[svgIcon]="toolbarOptions.svgIcon"
|
|
513
|
-
[imageUrl]="toolbarOptions.imageUrl"
|
|
514
|
-
(click)="click.emit($event)"
|
|
515
|
-
(pointerdown)="pointerdown.emit($event)"
|
|
516
|
-
(selectedChange)="selectedChangeHandler($event)"
|
|
517
|
-
(blur)="onBlur()"
|
|
518
|
-
>
|
|
519
|
-
{{ toolbarOptions.text }}
|
|
520
|
-
</button>
|
|
521
|
-
@if (showBadge) {
|
|
522
|
-
<kendo-badge [cutoutBorder]="true" rounded="full"></kendo-badge>
|
|
523
|
-
}
|
|
524
|
-
</kendo-badge-container>
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
@if (!hasBadgeContainer) {
|
|
528
|
-
<button
|
|
529
|
-
#toolbarButton
|
|
530
|
-
[class.k-toolbar-button]="!toggleable"
|
|
531
|
-
[class.k-toolbar-toggle-button]="toggleable"
|
|
532
|
-
[tabindex]="tabIndex"
|
|
533
|
-
type="button"
|
|
534
|
-
kendoButton
|
|
535
|
-
[size]="size"
|
|
536
|
-
[ngStyle]="style"
|
|
537
|
-
[ngClass]="className"
|
|
538
|
-
[attr.title]="title"
|
|
539
|
-
[disabled]="disabled"
|
|
540
|
-
[toggleable]="toggleable"
|
|
541
|
-
[fillMode]="fillMode"
|
|
542
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
543
|
-
[rounded]="rounded"
|
|
544
|
-
[selected]="selected"
|
|
545
|
-
[icon]="toolbarOptions.icon"
|
|
546
|
-
[iconClass]="toolbarOptions.iconClass"
|
|
547
|
-
[svgIcon]="toolbarOptions.svgIcon"
|
|
548
|
-
[imageUrl]="toolbarOptions.imageUrl"
|
|
549
|
-
(click)="click.emit($event)"
|
|
550
|
-
(pointerdown)="pointerdown.emit($event)"
|
|
551
|
-
(selectedChange)="selectedChangeHandler($event)"
|
|
552
|
-
(blur)="onBlur()"
|
|
553
|
-
>
|
|
554
|
-
{{ toolbarOptions.text }}
|
|
555
|
-
</button>
|
|
556
|
-
}
|
|
557
|
-
</ng-template>
|
|
558
|
-
<ng-template #popupTemplate>
|
|
559
|
-
<div
|
|
560
|
-
#overflowButton
|
|
561
|
-
tabindex="-1"
|
|
562
|
-
role="menuitem"
|
|
563
|
-
class="k-item k-menu-item"
|
|
564
|
-
[class.k-disabled]="disabled"
|
|
565
|
-
[ngClass]="className"
|
|
566
|
-
[ngStyle]="style"
|
|
567
|
-
(click)="handleClick($event)">
|
|
568
|
-
<span
|
|
569
|
-
class="k-link k-menu-link"
|
|
570
|
-
[class.k-selected]="selected"
|
|
571
|
-
>
|
|
572
|
-
@if (overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon) {
|
|
573
|
-
<kendo-icon-wrapper
|
|
574
|
-
[name]="overflowOptions.icon"
|
|
575
|
-
[customFontClass]="overflowOptions.iconClass"
|
|
576
|
-
[svgIcon]="overflowOptions.svgIcon"
|
|
577
|
-
></kendo-icon-wrapper>
|
|
578
|
-
}
|
|
579
|
-
@if (overflowOptions.imageUrl) {
|
|
580
|
-
<span class="k-icon k-button-icon">
|
|
581
|
-
<img [src]="overflowOptions.imageUrl" role="presentation" class="k-image" />
|
|
582
|
-
</span>
|
|
583
|
-
}
|
|
584
|
-
@if (overflowOptions.text) {
|
|
585
|
-
<span class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
586
|
-
}
|
|
587
|
-
</span>
|
|
588
|
-
</div>
|
|
589
|
-
</ng-template>
|
|
590
|
-
<ng-template #sectionTemplate>
|
|
591
|
-
@if (hasBadgeContainer) {
|
|
592
|
-
<kendo-badge-container>
|
|
593
|
-
<button
|
|
594
|
-
#sectionButton
|
|
595
|
-
[class.k-toolbar-button]="!toggleable"
|
|
596
|
-
[class.k-toolbar-toggle-button]="toggleable"
|
|
597
|
-
[tabindex]="tabIndex"
|
|
598
|
-
type="button"
|
|
599
|
-
kendoButton
|
|
600
|
-
[size]="size"
|
|
601
|
-
[ngStyle]="style"
|
|
602
|
-
[ngClass]="className"
|
|
603
|
-
[attr.title]="title"
|
|
604
|
-
[disabled]="disabled"
|
|
605
|
-
[toggleable]="toggleable"
|
|
606
|
-
[fillMode]="fillMode"
|
|
607
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
608
|
-
[rounded]="rounded"
|
|
609
|
-
[selected]="selected"
|
|
610
|
-
[icon]="toolbarOptions.icon"
|
|
611
|
-
[iconClass]="toolbarOptions.iconClass"
|
|
612
|
-
[svgIcon]="toolbarOptions.svgIcon"
|
|
613
|
-
[imageUrl]="toolbarOptions.imageUrl"
|
|
614
|
-
(click)="click.emit($event)"
|
|
615
|
-
(pointerdown)="pointerdown.emit($event)"
|
|
616
|
-
(selectedChange)="selectedChangeHandler($event)"
|
|
617
|
-
(blur)="onBlur()"
|
|
618
|
-
>
|
|
619
|
-
{{ toolbarOptions.text }}
|
|
620
|
-
</button>
|
|
621
|
-
@if (showBadge) {
|
|
622
|
-
<kendo-badge [cutoutBorder]="true" rounded="full"></kendo-badge>
|
|
623
|
-
}
|
|
624
|
-
</kendo-badge-container>
|
|
625
|
-
}
|
|
626
|
-
@if (!hasBadgeContainer) {
|
|
627
|
-
<button
|
|
628
|
-
#sectionButton
|
|
629
|
-
[class.k-toolbar-button]="!toggleable"
|
|
630
|
-
[class.k-toolbar-toggle-button]="toggleable"
|
|
631
|
-
[tabindex]="tabIndex"
|
|
632
|
-
type="button"
|
|
633
|
-
kendoButton
|
|
634
|
-
[size]="size"
|
|
635
|
-
[ngStyle]="style"
|
|
636
|
-
[ngClass]="className"
|
|
637
|
-
[attr.title]="title"
|
|
638
|
-
[disabled]="disabled"
|
|
639
|
-
[toggleable]="toggleable"
|
|
640
|
-
[fillMode]="fillMode"
|
|
641
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
642
|
-
[rounded]="rounded"
|
|
643
|
-
[selected]="selected"
|
|
644
|
-
[icon]="toolbarOptions.icon"
|
|
645
|
-
[iconClass]="toolbarOptions.iconClass"
|
|
646
|
-
[svgIcon]="toolbarOptions.svgIcon"
|
|
647
|
-
[imageUrl]="toolbarOptions.imageUrl"
|
|
648
|
-
(click)="click.emit($event)"
|
|
649
|
-
(pointerdown)="pointerdown.emit($event)"
|
|
650
|
-
(selectedChange)="selectedChangeHandler($event)"
|
|
651
|
-
(blur)="onBlur()"
|
|
652
|
-
>
|
|
653
|
-
{{ toolbarOptions.text }}
|
|
654
|
-
</button>
|
|
655
|
-
}
|
|
656
|
-
</ng-template>
|
|
657
|
-
`,
|
|
658
|
-
standalone: true,
|
|
659
|
-
imports: [ButtonComponent, NgStyle, NgClass, IconWrapperComponent, BadgeComponent, BadgeContainerComponent],
|
|
660
|
-
}]
|
|
661
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.ToolBarComponent }], propDecorators: { showText: [{
|
|
662
|
-
type: Input
|
|
663
|
-
}], showIcon: [{
|
|
664
|
-
type: Input
|
|
665
|
-
}], text: [{
|
|
666
|
-
type: Input
|
|
667
|
-
}], style: [{
|
|
668
|
-
type: Input
|
|
669
|
-
}], className: [{
|
|
670
|
-
type: Input
|
|
671
|
-
}], title: [{
|
|
672
|
-
type: Input
|
|
673
|
-
}], disabled: [{
|
|
674
|
-
type: Input
|
|
675
|
-
}], toggleable: [{
|
|
676
|
-
type: Input
|
|
677
|
-
}], look: [{
|
|
678
|
-
type: Input
|
|
679
|
-
}], togglable: [{
|
|
680
|
-
type: Input
|
|
681
|
-
}], selected: [{
|
|
682
|
-
type: Input
|
|
683
|
-
}], fillMode: [{
|
|
684
|
-
type: Input
|
|
685
|
-
}], rounded: [{
|
|
686
|
-
type: Input
|
|
687
|
-
}], themeColor: [{
|
|
688
|
-
type: Input
|
|
689
|
-
}], icon: [{
|
|
690
|
-
type: Input
|
|
691
|
-
}], iconClass: [{
|
|
692
|
-
type: Input
|
|
693
|
-
}], svgIcon: [{
|
|
694
|
-
type: Input
|
|
695
|
-
}], imageUrl: [{
|
|
696
|
-
type: Input
|
|
697
|
-
}], click: [{
|
|
698
|
-
type: Output
|
|
699
|
-
}], pointerdown: [{
|
|
700
|
-
type: Output
|
|
701
|
-
}], selectedChange: [{
|
|
702
|
-
type: Output
|
|
703
|
-
}], toolbarButtonElement: [{
|
|
704
|
-
type: ViewChild,
|
|
705
|
-
args: ['toolbarButton', { read: ElementRef }]
|
|
706
|
-
}], sectionButtonElement: [{
|
|
707
|
-
type: ViewChild,
|
|
708
|
-
args: ['sectionButton', { read: ElementRef }]
|
|
709
|
-
}], overflowButtonElement: [{
|
|
710
|
-
type: ViewChild,
|
|
711
|
-
args: ['overflowButton', { read: ElementRef }]
|
|
712
|
-
}] } });
|