@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,595 +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, ElementRef, forwardRef, ViewChild, Input, EventEmitter, Output, QueryList, ViewChildren, isDevMode, Renderer2, NgZone } from '@angular/core';
|
|
6
|
-
import { ToolBarToolComponent } from './toolbar-tool.component';
|
|
7
|
-
import { DropDownButtonComponent } from '@progress/kendo-angular-buttons';
|
|
8
|
-
import { getValueForLocation, makePeeker, getIndexOfFocused, getPrevKey, getNextKey, seekFocusedIndex, areEqual } from '../util';
|
|
9
|
-
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
10
|
-
import { NgClass } from '@angular/common';
|
|
11
|
-
import { take } from 'rxjs/operators';
|
|
12
|
-
import { ToolBarComponent } from '../toolbar.component';
|
|
13
|
-
import { normalizeKeys } from '@progress/kendo-angular-common';
|
|
14
|
-
import * as i0 from "@angular/core";
|
|
15
|
-
import * as i1 from "../toolbar.component";
|
|
16
|
-
/**
|
|
17
|
-
* Represents the [Kendo UI ToolBar DropDownButton for Angular](slug:controltypes_toolbar#drop-down-buttons).
|
|
18
|
-
*
|
|
19
|
-
* Use this component to add a button that opens a popup with a list of items in the ToolBar.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```html
|
|
23
|
-
* <kendo-toolbar>
|
|
24
|
-
* <kendo-toolbar-dropdownbutton text="Paste Variations" [data]="data">
|
|
25
|
-
* </kendo-toolbar-dropdownbutton>
|
|
26
|
-
* </kendo-toolbar>
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
31
|
-
zone;
|
|
32
|
-
renderer;
|
|
33
|
-
host;
|
|
34
|
-
/**
|
|
35
|
-
* Shows the default arrow icon or lets you provide a custom one.
|
|
36
|
-
* @default false
|
|
37
|
-
*/
|
|
38
|
-
arrowIcon = false;
|
|
39
|
-
/**
|
|
40
|
-
* Sets the `title` attribute of the underlying button element.
|
|
41
|
-
* @default ''
|
|
42
|
-
*/
|
|
43
|
-
title = '';
|
|
44
|
-
// showText and showIcon showIcon should be declared first
|
|
45
|
-
/**
|
|
46
|
-
* Controls the button text visibility.
|
|
47
|
-
* @default 'always'
|
|
48
|
-
*/
|
|
49
|
-
set showText(value) {
|
|
50
|
-
this._showText = value;
|
|
51
|
-
this.setTextDisplayMode();
|
|
52
|
-
}
|
|
53
|
-
get showText() {
|
|
54
|
-
return this._showText;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Controls the button icon visibility.
|
|
58
|
-
* @default 'always'
|
|
59
|
-
*/
|
|
60
|
-
set showIcon(value) {
|
|
61
|
-
this._showIcon = value;
|
|
62
|
-
}
|
|
63
|
-
get showIcon() {
|
|
64
|
-
return this._showIcon;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Sets the text of the DropDownButton
|
|
68
|
-
* ([see example](slug:controltypes_toolbar#toc-drop-down-buttons)).
|
|
69
|
-
*/
|
|
70
|
-
set text(text) {
|
|
71
|
-
this._text = text;
|
|
72
|
-
this.setTextDisplayMode();
|
|
73
|
-
}
|
|
74
|
-
get text() {
|
|
75
|
-
return this._text;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Sets the icon rendered next to the button text.
|
|
79
|
-
*/
|
|
80
|
-
set icon(icon) {
|
|
81
|
-
this.toolbarOptions.icon = getValueForLocation(icon, this.showIcon, false);
|
|
82
|
-
this.overflowOptions.icon = getValueForLocation(icon, this.showIcon, true);
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Sets the `SVGIcon` rendered in the button.
|
|
86
|
-
* Accepts an [existing Kendo SVG icon](slug:svgicon_list) or a custom one.
|
|
87
|
-
*/
|
|
88
|
-
set svgIcon(icon) {
|
|
89
|
-
const isIconSet = this.toolbarOptions.icon || this.overflowOptions.icon;
|
|
90
|
-
const isIconClassSet = this.toolbarOptions.iconClass || this.overflowOptions.iconClass;
|
|
91
|
-
if (isDevMode() &&
|
|
92
|
-
icon &&
|
|
93
|
-
isIconSet &&
|
|
94
|
-
isIconClassSet) {
|
|
95
|
-
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
96
|
-
}
|
|
97
|
-
this.toolbarOptions.svgIcon = getValueForLocation(icon, this.showIcon, false);
|
|
98
|
-
this.overflowOptions.svgIcon = getValueForLocation(icon, this.showIcon, true);
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Sets a custom CSS class icon rendered next to the button text.
|
|
102
|
-
*/
|
|
103
|
-
set iconClass(iconClass) {
|
|
104
|
-
this.toolbarOptions.iconClass = getValueForLocation(iconClass, this.showIcon, false);
|
|
105
|
-
this.overflowOptions.iconClass = getValueForLocation(iconClass, this.showIcon, true);
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Sets a URL for the image displayed next to the button text.
|
|
109
|
-
*/
|
|
110
|
-
set imageUrl(imageUrl) {
|
|
111
|
-
this.toolbarOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, false);
|
|
112
|
-
this.overflowOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, true);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Configures the popup of the DropDownButton.
|
|
116
|
-
* Accepts a `PopupSettings` object that allows you to customize the popup behavior and appearance.
|
|
117
|
-
*/
|
|
118
|
-
set popupSettings(settings) {
|
|
119
|
-
this._popupSettings = Object.assign({ animate: true, popupClass: '' }, settings);
|
|
120
|
-
}
|
|
121
|
-
get popupSettings() {
|
|
122
|
-
return this._popupSettings;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* @hidden
|
|
126
|
-
*/
|
|
127
|
-
set look(look) {
|
|
128
|
-
if (look) {
|
|
129
|
-
this.fillMode = look === 'default' ? 'solid' : look;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* @hidden
|
|
134
|
-
*/
|
|
135
|
-
set primary(primary) {
|
|
136
|
-
this.themeColor = primary ? 'primary' : 'base';
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Sets the fill mode for the button.
|
|
140
|
-
* The fill mode represents the background and border styles.
|
|
141
|
-
* @default 'solid'
|
|
142
|
-
*/
|
|
143
|
-
fillMode = 'solid';
|
|
144
|
-
/**
|
|
145
|
-
* Sets the predefined theme color for the button.
|
|
146
|
-
* The theme color applies to the background, border, and text
|
|
147
|
-
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-themeColor)).
|
|
148
|
-
* @default 'base'
|
|
149
|
-
*/
|
|
150
|
-
themeColor = 'base';
|
|
151
|
-
/**
|
|
152
|
-
* Sets the CSS classes for the main button.
|
|
153
|
-
* Accepts values supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
|
|
154
|
-
*/
|
|
155
|
-
buttonClass;
|
|
156
|
-
/**
|
|
157
|
-
* Sets the data item field that repesents the item text.
|
|
158
|
-
* If the data contains only primitive values, do not set this property.
|
|
159
|
-
*/
|
|
160
|
-
textField;
|
|
161
|
-
/**
|
|
162
|
-
* When `true`, disables the DropDownButton.
|
|
163
|
-
*/
|
|
164
|
-
disabled;
|
|
165
|
-
/**
|
|
166
|
-
* Sets the data of the DropDownButton
|
|
167
|
-
* ([see example](slug:controltypes_toolbar#drop-down-buttons)).
|
|
168
|
-
*
|
|
169
|
-
* > Provide the data as an array-like list.
|
|
170
|
-
*/
|
|
171
|
-
set data(data) {
|
|
172
|
-
this._data = data || [];
|
|
173
|
-
}
|
|
174
|
-
get data() {
|
|
175
|
-
if (!this._data) {
|
|
176
|
-
this.data = [];
|
|
177
|
-
}
|
|
178
|
-
return this._data;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Fires each time the user clicks a DropDownButton item.
|
|
182
|
-
* The event data contains the clicked item's data.
|
|
183
|
-
*/
|
|
184
|
-
itemClick = new EventEmitter();
|
|
185
|
-
/**
|
|
186
|
-
* Fires when the popup is about to open.
|
|
187
|
-
* This event is preventable. If you cancel the event, the popup stays closed.
|
|
188
|
-
*/
|
|
189
|
-
open = new EventEmitter();
|
|
190
|
-
/**
|
|
191
|
-
* Fires when the popup is about to close.
|
|
192
|
-
* This event is preventable. If you cancel the event, the popup stays open.
|
|
193
|
-
*/
|
|
194
|
-
close = new EventEmitter();
|
|
195
|
-
dropdownButton;
|
|
196
|
-
toolbarDropDownButton;
|
|
197
|
-
sectionDropDownButton;
|
|
198
|
-
overflowListItems;
|
|
199
|
-
toolbarOptions = {
|
|
200
|
-
text: '',
|
|
201
|
-
icon: '',
|
|
202
|
-
iconClass: '',
|
|
203
|
-
svgIcon: null,
|
|
204
|
-
imageUrl: ''
|
|
205
|
-
};
|
|
206
|
-
overflowOptions = {
|
|
207
|
-
text: '',
|
|
208
|
-
icon: '',
|
|
209
|
-
iconClass: '',
|
|
210
|
-
svgIcon: null,
|
|
211
|
-
imageUrl: ''
|
|
212
|
-
};
|
|
213
|
-
get overflowButtons() {
|
|
214
|
-
return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
|
|
215
|
-
}
|
|
216
|
-
_data;
|
|
217
|
-
_popupSettings = { animate: true, popupClass: '' };
|
|
218
|
-
focusedIndex = -1;
|
|
219
|
-
_showText;
|
|
220
|
-
_showIcon;
|
|
221
|
-
_text;
|
|
222
|
-
propertyChangeSub;
|
|
223
|
-
getNextKey;
|
|
224
|
-
getPrevKey;
|
|
225
|
-
constructor(zone, renderer, host) {
|
|
226
|
-
super();
|
|
227
|
-
this.zone = zone;
|
|
228
|
-
this.renderer = renderer;
|
|
229
|
-
this.host = host;
|
|
230
|
-
this.getNextKey = getNextKey();
|
|
231
|
-
this.getPrevKey = getPrevKey();
|
|
232
|
-
this.isBuiltInTool = true;
|
|
233
|
-
this.propertyChangeSub = this.host.propertyChange.subscribe(change => {
|
|
234
|
-
if (change.property === 'showText' || change.property === 'showIcon') {
|
|
235
|
-
this[change.property] = change.value;
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
ngOnInit() {
|
|
240
|
-
this.setTextDisplayMode();
|
|
241
|
-
}
|
|
242
|
-
ngOnDestroy() {
|
|
243
|
-
if (this.propertyChangeSub) {
|
|
244
|
-
this.propertyChangeSub.unsubscribe();
|
|
245
|
-
this.propertyChangeSub = null;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
ngAfterViewInit() {
|
|
249
|
-
this.zone.onStable.pipe(take(1)).subscribe(() => {
|
|
250
|
-
const dropdownButton = this[`${this.location}DropDownButton`];
|
|
251
|
-
if (dropdownButton?.button) {
|
|
252
|
-
this.renderer.addClass(dropdownButton.button.nativeElement, 'k-toolbar-menu-button');
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* @hidden
|
|
258
|
-
*/
|
|
259
|
-
onButtonListClick(ev) {
|
|
260
|
-
this.focusedIndex = this.overflowListItems
|
|
261
|
-
.toArray()
|
|
262
|
-
.findIndex(b => b.nativeElement.contains(ev.target));
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* @hidden
|
|
266
|
-
*/
|
|
267
|
-
get size() {
|
|
268
|
-
return this.host.size;
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* @hidden
|
|
272
|
-
*/
|
|
273
|
-
canFocus() {
|
|
274
|
-
return !this.disabled;
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* @hidden
|
|
278
|
-
*/
|
|
279
|
-
focus(ev = {}) {
|
|
280
|
-
if (!this.overflows || this.location === 'section') {
|
|
281
|
-
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
|
|
282
|
-
this[`${this.location}DropDownButton`]?.focus();
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
else if (this.overflowButtons.length > 0) {
|
|
286
|
-
this.focusedIndex = getIndexOfFocused(this.getPrevKey(), this.getNextKey(), this.overflowButtons.map(ob => ob.nativeElement))(ev);
|
|
287
|
-
this.focusButton(this.focusedIndex, ev);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* @hidden
|
|
292
|
-
*/
|
|
293
|
-
handleKey(ev) {
|
|
294
|
-
const code = normalizeKeys(ev);
|
|
295
|
-
if (!this.overflows && (code === this.getPrevKey(this.overflows) || code === this.getNextKey(this.overflows))) {
|
|
296
|
-
return false;
|
|
297
|
-
}
|
|
298
|
-
if (this.overflows && this.location !== 'section') {
|
|
299
|
-
const peekAtIndex = makePeeker(this.overflowButtons);
|
|
300
|
-
const isUnmodified = areEqual(this.focusedIndex);
|
|
301
|
-
this.focusedIndex = seekFocusedIndex(this.getPrevKey(), this.getNextKey(), peekAtIndex)(this.focusedIndex, ev);
|
|
302
|
-
this.focusButton(this.focusedIndex, ev);
|
|
303
|
-
return !isUnmodified(this.focusedIndex);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* @hidden
|
|
308
|
-
*/
|
|
309
|
-
getText(dataItem) {
|
|
310
|
-
if (dataItem) {
|
|
311
|
-
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* @hidden
|
|
316
|
-
*/
|
|
317
|
-
handleClick(ev, item, index) {
|
|
318
|
-
this.onButtonListClick(ev);
|
|
319
|
-
const dataItem = this.data[index];
|
|
320
|
-
if (item.click) {
|
|
321
|
-
item.click(dataItem);
|
|
322
|
-
}
|
|
323
|
-
this.itemClick.emit(dataItem);
|
|
324
|
-
}
|
|
325
|
-
focusButton(index, ev) {
|
|
326
|
-
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
|
|
327
|
-
this.overflowButtons[index].nativeElement.focus();
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
setTextDisplayMode() {
|
|
331
|
-
this.toolbarOptions.text = this.showText === 'menu' || this.showText === 'never' ? undefined : this.text;
|
|
332
|
-
this.overflowOptions.text = this.showText === 'toolbar' || this.showText === 'never' ? undefined : this.text;
|
|
333
|
-
}
|
|
334
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1.ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
335
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ToolBarDropDownButtonComponent, isStandalone: true, selector: "kendo-toolbar-dropdownbutton", inputs: { arrowIcon: "arrowIcon", title: "title", showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", popupSettings: "popupSettings", look: "look", primary: "primary", fillMode: "fillMode", themeColor: "themeColor", buttonClass: "buttonClass", textField: "textField", disabled: "disabled", data: "data" }, outputs: { itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarDropDownButtonComponent) }], viewQueries: [{ propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "toolbarDropDownButton", first: true, predicate: ["toolbarDropDownButton"], descendants: true }, { propertyName: "sectionDropDownButton", first: true, predicate: ["sectionDropDownButton"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarDropDownButton"], usesInheritance: true, ngImport: i0, template: `
|
|
336
|
-
<ng-template #toolbarTemplate>
|
|
337
|
-
<kendo-dropdownbutton #toolbarDropDownButton
|
|
338
|
-
[icon]="toolbarOptions.icon"
|
|
339
|
-
[iconClass]="toolbarOptions.iconClass"
|
|
340
|
-
[svgIcon]="toolbarOptions.svgIcon"
|
|
341
|
-
[imageUrl]="toolbarOptions.imageUrl"
|
|
342
|
-
[arrowIcon]="arrowIcon"
|
|
343
|
-
[buttonClass]="buttonClass"
|
|
344
|
-
[disabled]="disabled"
|
|
345
|
-
[size]="size"
|
|
346
|
-
[tabIndex]="-1"
|
|
347
|
-
[data]="data"
|
|
348
|
-
[buttonAttributes]="{'title': title}"
|
|
349
|
-
[textField]="textField"
|
|
350
|
-
[popupSettings]="popupSettings"
|
|
351
|
-
[fillMode]="fillMode"
|
|
352
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
353
|
-
(open)="open.emit($event)"
|
|
354
|
-
(close)="close.emit($event)"
|
|
355
|
-
(itemClick)="itemClick.emit($event)"
|
|
356
|
-
>
|
|
357
|
-
{{ toolbarOptions.text }}
|
|
358
|
-
</kendo-dropdownbutton>
|
|
359
|
-
</ng-template>
|
|
360
|
-
|
|
361
|
-
<ng-template #popupTemplate>
|
|
362
|
-
<div
|
|
363
|
-
tabindex="-1"
|
|
364
|
-
role="menuitem"
|
|
365
|
-
class="k-item k-menu-item k-disabled"
|
|
366
|
-
[ngClass]="buttonClass">
|
|
367
|
-
<span
|
|
368
|
-
[ngClass]="{'k-link': true, 'k-menu-link': true}"
|
|
369
|
-
>
|
|
370
|
-
@if (overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon) {
|
|
371
|
-
<kendo-icon-wrapper
|
|
372
|
-
[name]="overflowOptions.icon"
|
|
373
|
-
[customFontClass]="overflowOptions.iconClass"
|
|
374
|
-
[svgIcon]="overflowOptions.svgIcon"
|
|
375
|
-
></kendo-icon-wrapper>
|
|
376
|
-
}
|
|
377
|
-
@if (overflowOptions.text) {
|
|
378
|
-
<span class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
379
|
-
}
|
|
380
|
-
</span>
|
|
381
|
-
</div>
|
|
382
|
-
@for (item of data; track item; let i = $index) {
|
|
383
|
-
<div #listItem
|
|
384
|
-
tabindex="-1"
|
|
385
|
-
role="menuitem"
|
|
386
|
-
class="k-item k-menu-item"
|
|
387
|
-
[class.k-disabled]="disabled || item.disabled"
|
|
388
|
-
(click)="handleClick($event, item, i)">
|
|
389
|
-
<span
|
|
390
|
-
class="k-link k-menu-link"
|
|
391
|
-
[ngClass]="item.cssClass"
|
|
392
|
-
>
|
|
393
|
-
@if (item.icon || item.iconClass || item.svgIcon) {
|
|
394
|
-
<kendo-icon-wrapper
|
|
395
|
-
[name]="item.icon"
|
|
396
|
-
[customFontClass]="item.iconClass"
|
|
397
|
-
[svgIcon]="item.svgIcon"
|
|
398
|
-
></kendo-icon-wrapper>
|
|
399
|
-
}
|
|
400
|
-
@if (getText(item)) {
|
|
401
|
-
<span class="k-menu-link-text">{{ getText(item) }}</span>
|
|
402
|
-
}
|
|
403
|
-
</span>
|
|
404
|
-
</div>
|
|
405
|
-
}
|
|
406
|
-
</ng-template>
|
|
407
|
-
|
|
408
|
-
<ng-template #sectionTemplate>
|
|
409
|
-
<kendo-dropdownbutton #sectionDropDownButton
|
|
410
|
-
[icon]="toolbarOptions.icon"
|
|
411
|
-
[iconClass]="toolbarOptions.iconClass"
|
|
412
|
-
[svgIcon]="toolbarOptions.svgIcon"
|
|
413
|
-
[imageUrl]="toolbarOptions.imageUrl"
|
|
414
|
-
[arrowIcon]="arrowIcon"
|
|
415
|
-
[buttonClass]="buttonClass"
|
|
416
|
-
[disabled]="disabled"
|
|
417
|
-
[size]="size"
|
|
418
|
-
[tabIndex]="-1"
|
|
419
|
-
[data]="data"
|
|
420
|
-
[buttonAttributes]="{'title': title}"
|
|
421
|
-
[textField]="textField"
|
|
422
|
-
[popupSettings]="popupSettings"
|
|
423
|
-
[fillMode]="fillMode"
|
|
424
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
425
|
-
(open)="open.emit($event)"
|
|
426
|
-
(close)="close.emit($event)"
|
|
427
|
-
(itemClick)="itemClick.emit($event)"
|
|
428
|
-
>
|
|
429
|
-
{{ toolbarOptions.text }}
|
|
430
|
-
</kendo-dropdownbutton>
|
|
431
|
-
</ng-template>
|
|
432
|
-
`, isInline: true, dependencies: [{ kind: "component", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["arrowIcon", "icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor", "buttonAttributes"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }, { 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"] }] });
|
|
433
|
-
}
|
|
434
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolBarDropDownButtonComponent, decorators: [{
|
|
435
|
-
type: Component,
|
|
436
|
-
args: [{
|
|
437
|
-
exportAs: 'kendoToolBarDropDownButton',
|
|
438
|
-
providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarDropDownButtonComponent) }],
|
|
439
|
-
selector: 'kendo-toolbar-dropdownbutton',
|
|
440
|
-
template: `
|
|
441
|
-
<ng-template #toolbarTemplate>
|
|
442
|
-
<kendo-dropdownbutton #toolbarDropDownButton
|
|
443
|
-
[icon]="toolbarOptions.icon"
|
|
444
|
-
[iconClass]="toolbarOptions.iconClass"
|
|
445
|
-
[svgIcon]="toolbarOptions.svgIcon"
|
|
446
|
-
[imageUrl]="toolbarOptions.imageUrl"
|
|
447
|
-
[arrowIcon]="arrowIcon"
|
|
448
|
-
[buttonClass]="buttonClass"
|
|
449
|
-
[disabled]="disabled"
|
|
450
|
-
[size]="size"
|
|
451
|
-
[tabIndex]="-1"
|
|
452
|
-
[data]="data"
|
|
453
|
-
[buttonAttributes]="{'title': title}"
|
|
454
|
-
[textField]="textField"
|
|
455
|
-
[popupSettings]="popupSettings"
|
|
456
|
-
[fillMode]="fillMode"
|
|
457
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
458
|
-
(open)="open.emit($event)"
|
|
459
|
-
(close)="close.emit($event)"
|
|
460
|
-
(itemClick)="itemClick.emit($event)"
|
|
461
|
-
>
|
|
462
|
-
{{ toolbarOptions.text }}
|
|
463
|
-
</kendo-dropdownbutton>
|
|
464
|
-
</ng-template>
|
|
465
|
-
|
|
466
|
-
<ng-template #popupTemplate>
|
|
467
|
-
<div
|
|
468
|
-
tabindex="-1"
|
|
469
|
-
role="menuitem"
|
|
470
|
-
class="k-item k-menu-item k-disabled"
|
|
471
|
-
[ngClass]="buttonClass">
|
|
472
|
-
<span
|
|
473
|
-
[ngClass]="{'k-link': true, 'k-menu-link': true}"
|
|
474
|
-
>
|
|
475
|
-
@if (overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon) {
|
|
476
|
-
<kendo-icon-wrapper
|
|
477
|
-
[name]="overflowOptions.icon"
|
|
478
|
-
[customFontClass]="overflowOptions.iconClass"
|
|
479
|
-
[svgIcon]="overflowOptions.svgIcon"
|
|
480
|
-
></kendo-icon-wrapper>
|
|
481
|
-
}
|
|
482
|
-
@if (overflowOptions.text) {
|
|
483
|
-
<span class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
484
|
-
}
|
|
485
|
-
</span>
|
|
486
|
-
</div>
|
|
487
|
-
@for (item of data; track item; let i = $index) {
|
|
488
|
-
<div #listItem
|
|
489
|
-
tabindex="-1"
|
|
490
|
-
role="menuitem"
|
|
491
|
-
class="k-item k-menu-item"
|
|
492
|
-
[class.k-disabled]="disabled || item.disabled"
|
|
493
|
-
(click)="handleClick($event, item, i)">
|
|
494
|
-
<span
|
|
495
|
-
class="k-link k-menu-link"
|
|
496
|
-
[ngClass]="item.cssClass"
|
|
497
|
-
>
|
|
498
|
-
@if (item.icon || item.iconClass || item.svgIcon) {
|
|
499
|
-
<kendo-icon-wrapper
|
|
500
|
-
[name]="item.icon"
|
|
501
|
-
[customFontClass]="item.iconClass"
|
|
502
|
-
[svgIcon]="item.svgIcon"
|
|
503
|
-
></kendo-icon-wrapper>
|
|
504
|
-
}
|
|
505
|
-
@if (getText(item)) {
|
|
506
|
-
<span class="k-menu-link-text">{{ getText(item) }}</span>
|
|
507
|
-
}
|
|
508
|
-
</span>
|
|
509
|
-
</div>
|
|
510
|
-
}
|
|
511
|
-
</ng-template>
|
|
512
|
-
|
|
513
|
-
<ng-template #sectionTemplate>
|
|
514
|
-
<kendo-dropdownbutton #sectionDropDownButton
|
|
515
|
-
[icon]="toolbarOptions.icon"
|
|
516
|
-
[iconClass]="toolbarOptions.iconClass"
|
|
517
|
-
[svgIcon]="toolbarOptions.svgIcon"
|
|
518
|
-
[imageUrl]="toolbarOptions.imageUrl"
|
|
519
|
-
[arrowIcon]="arrowIcon"
|
|
520
|
-
[buttonClass]="buttonClass"
|
|
521
|
-
[disabled]="disabled"
|
|
522
|
-
[size]="size"
|
|
523
|
-
[tabIndex]="-1"
|
|
524
|
-
[data]="data"
|
|
525
|
-
[buttonAttributes]="{'title': title}"
|
|
526
|
-
[textField]="textField"
|
|
527
|
-
[popupSettings]="popupSettings"
|
|
528
|
-
[fillMode]="fillMode"
|
|
529
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
530
|
-
(open)="open.emit($event)"
|
|
531
|
-
(close)="close.emit($event)"
|
|
532
|
-
(itemClick)="itemClick.emit($event)"
|
|
533
|
-
>
|
|
534
|
-
{{ toolbarOptions.text }}
|
|
535
|
-
</kendo-dropdownbutton>
|
|
536
|
-
</ng-template>
|
|
537
|
-
`,
|
|
538
|
-
standalone: true,
|
|
539
|
-
imports: [DropDownButtonComponent, NgClass, IconWrapperComponent]
|
|
540
|
-
}]
|
|
541
|
-
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: i1.ToolBarComponent }], propDecorators: { arrowIcon: [{
|
|
542
|
-
type: Input
|
|
543
|
-
}], title: [{
|
|
544
|
-
type: Input
|
|
545
|
-
}], showText: [{
|
|
546
|
-
type: Input
|
|
547
|
-
}], showIcon: [{
|
|
548
|
-
type: Input
|
|
549
|
-
}], text: [{
|
|
550
|
-
type: Input
|
|
551
|
-
}], icon: [{
|
|
552
|
-
type: Input
|
|
553
|
-
}], svgIcon: [{
|
|
554
|
-
type: Input
|
|
555
|
-
}], iconClass: [{
|
|
556
|
-
type: Input
|
|
557
|
-
}], imageUrl: [{
|
|
558
|
-
type: Input
|
|
559
|
-
}], popupSettings: [{
|
|
560
|
-
type: Input
|
|
561
|
-
}], look: [{
|
|
562
|
-
type: Input
|
|
563
|
-
}], primary: [{
|
|
564
|
-
type: Input
|
|
565
|
-
}], fillMode: [{
|
|
566
|
-
type: Input
|
|
567
|
-
}], themeColor: [{
|
|
568
|
-
type: Input
|
|
569
|
-
}], buttonClass: [{
|
|
570
|
-
type: Input
|
|
571
|
-
}], textField: [{
|
|
572
|
-
type: Input
|
|
573
|
-
}], disabled: [{
|
|
574
|
-
type: Input
|
|
575
|
-
}], data: [{
|
|
576
|
-
type: Input
|
|
577
|
-
}], itemClick: [{
|
|
578
|
-
type: Output
|
|
579
|
-
}], open: [{
|
|
580
|
-
type: Output
|
|
581
|
-
}], close: [{
|
|
582
|
-
type: Output
|
|
583
|
-
}], dropdownButton: [{
|
|
584
|
-
type: ViewChild,
|
|
585
|
-
args: ['dropdownButton', { read: ElementRef, static: true }]
|
|
586
|
-
}], toolbarDropDownButton: [{
|
|
587
|
-
type: ViewChild,
|
|
588
|
-
args: ['toolbarDropDownButton', { static: false }]
|
|
589
|
-
}], sectionDropDownButton: [{
|
|
590
|
-
type: ViewChild,
|
|
591
|
-
args: ['sectionDropDownButton', { static: false }]
|
|
592
|
-
}], overflowListItems: [{
|
|
593
|
-
type: ViewChildren,
|
|
594
|
-
args: ['listItem']
|
|
595
|
-
}] } });
|
|
@@ -1,96 +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, ElementRef } from '@angular/core';
|
|
6
|
-
import { ToolBarToolComponent } from './toolbar-tool.component';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* Represents the [Kendo UI ToolBar Separator for Angular]({% slug controltypes_toolbar %}#toc-separators).
|
|
10
|
-
*
|
|
11
|
-
* Use this component to add a visual separator between ToolBar tools.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```html
|
|
15
|
-
* <kendo-toolbar>
|
|
16
|
-
* <kendo-toolbar-button text="Button 1"></kendo-toolbar-button>
|
|
17
|
-
* <kendo-toolbar-separator></kendo-toolbar-separator>
|
|
18
|
-
* <kendo-toolbar-button text="Button 2"></kendo-toolbar-button>
|
|
19
|
-
* </kendo-toolbar>
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export class ToolBarSeparatorComponent extends ToolBarToolComponent {
|
|
23
|
-
separator;
|
|
24
|
-
constructor() {
|
|
25
|
-
super();
|
|
26
|
-
this.isBuiltInTool = true;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @hidden
|
|
30
|
-
*/
|
|
31
|
-
canFocus() {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
// If this is not here, the docs display info from its parent(ToolBarToolComponent).
|
|
35
|
-
/**
|
|
36
|
-
* @hidden
|
|
37
|
-
*/
|
|
38
|
-
focus() {
|
|
39
|
-
/* noop */
|
|
40
|
-
}
|
|
41
|
-
// If this is not here, the docs display info from its parent(ToolBarToolComponent).
|
|
42
|
-
/**
|
|
43
|
-
* @hidden
|
|
44
|
-
*/
|
|
45
|
-
handleKey() {
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
ngAfterViewInit() {
|
|
49
|
-
if (!this.popupTemplate) {
|
|
50
|
-
this.popupTemplate = this.toolbarTemplate;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolBarSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
54
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ToolBarSeparatorComponent, isStandalone: true, selector: "kendo-toolbar-separator", providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarSeparatorComponent) }], viewQueries: [{ propertyName: "separator", first: true, predicate: ["separator"], descendants: true }], exportAs: ["kendoToolBarSeparator"], usesInheritance: true, ngImport: i0, template: `
|
|
55
|
-
<ng-template #toolbarTemplate>
|
|
56
|
-
<div class="k-separator k-toolbar-separator"></div>
|
|
57
|
-
</ng-template>
|
|
58
|
-
|
|
59
|
-
<ng-template #sectionTemplate>
|
|
60
|
-
<div class="k-separator k-toolbar-separator"></div>
|
|
61
|
-
</ng-template>
|
|
62
|
-
|
|
63
|
-
<ng-template #popupTemplate>
|
|
64
|
-
<div class="k-item k-menu-item">
|
|
65
|
-
<div class="k-separator k-separator-horizontal"></div>
|
|
66
|
-
</div>
|
|
67
|
-
</ng-template>
|
|
68
|
-
`, isInline: true });
|
|
69
|
-
}
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolBarSeparatorComponent, decorators: [{
|
|
71
|
-
type: Component,
|
|
72
|
-
args: [{
|
|
73
|
-
exportAs: 'kendoToolBarSeparator',
|
|
74
|
-
providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarSeparatorComponent) }],
|
|
75
|
-
selector: 'kendo-toolbar-separator',
|
|
76
|
-
template: `
|
|
77
|
-
<ng-template #toolbarTemplate>
|
|
78
|
-
<div class="k-separator k-toolbar-separator"></div>
|
|
79
|
-
</ng-template>
|
|
80
|
-
|
|
81
|
-
<ng-template #sectionTemplate>
|
|
82
|
-
<div class="k-separator k-toolbar-separator"></div>
|
|
83
|
-
</ng-template>
|
|
84
|
-
|
|
85
|
-
<ng-template #popupTemplate>
|
|
86
|
-
<div class="k-item k-menu-item">
|
|
87
|
-
<div class="k-separator k-separator-horizontal"></div>
|
|
88
|
-
</div>
|
|
89
|
-
</ng-template>
|
|
90
|
-
`,
|
|
91
|
-
standalone: true
|
|
92
|
-
}]
|
|
93
|
-
}], ctorParameters: () => [], propDecorators: { separator: [{
|
|
94
|
-
type: ViewChild,
|
|
95
|
-
args: ['separator', { static: false }]
|
|
96
|
-
}] } });
|