@progress/kendo-angular-toolbar 11.0.0-develop.99 → 11.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.
- package/NOTICE.txt +17 -17
- package/common/{constants.d.ts → size.d.ts} +3 -2
- package/esm2020/common/{constants.mjs → size.mjs} +1 -4
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/renderer.component.mjs +5 -1
- package/esm2020/toolbar.component.mjs +105 -33
- package/esm2020/toolbar.module.mjs +4 -3
- package/esm2020/tools/toolbar-button.component.mjs +99 -48
- package/esm2020/tools/toolbar-buttongroup.component.mjs +101 -70
- package/esm2020/tools/toolbar-buttonlist.component.mjs +2 -0
- package/esm2020/tools/toolbar-dropdownbutton.component.mjs +107 -54
- package/esm2020/tools/toolbar-separator.component.mjs +12 -0
- package/esm2020/tools/toolbar-splitbutton.component.mjs +114 -63
- package/esm2020/util.mjs +24 -0
- package/fesm2015/progress-kendo-angular-toolbar.mjs +648 -351
- package/fesm2020/progress-kendo-angular-toolbar.mjs +647 -351
- package/index.d.ts +1 -0
- package/package.json +8 -7
- package/renderer.component.d.ts +1 -0
- package/schematics/ngAdd/index.js +4 -2
- package/tool-options.d.ts +2 -0
- package/toolbar.component.d.ts +21 -3
- package/toolbar.module.d.ts +2 -1
- package/tools/toolbar-button.component.d.ts +23 -3
- package/tools/toolbar-buttongroup.component.d.ts +15 -4
- package/tools/toolbar-dropdownbutton.component.d.ts +10 -2
- package/tools/toolbar-splitbutton.component.d.ts +11 -3
- package/util.d.ts +22 -1
|
@@ -2,18 +2,22 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, TemplateRef, forwardRef, ViewChild, Input, Output, EventEmitter, ElementRef } from '@angular/core';
|
|
5
|
+
import { Component, TemplateRef, forwardRef, ViewChild, Input, Output, EventEmitter, ElementRef, isDevMode, NgZone } from '@angular/core';
|
|
6
6
|
import { ToolBarToolComponent } from './toolbar-tool.component';
|
|
7
7
|
import { getValueForLocation } from '../util';
|
|
8
|
+
import { take } from 'rxjs/operators';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
import * as i1 from "@progress/kendo-angular-buttons";
|
|
10
|
-
import * as i2 from "@angular
|
|
11
|
+
import * as i2 from "@progress/kendo-angular-icons";
|
|
12
|
+
import * as i3 from "@angular/common";
|
|
11
13
|
/**
|
|
12
14
|
* Represents the [Kendo UI ToolBar Button tool for Angular]({% slug controltypes_toolbar %}#toc-buttons).
|
|
13
15
|
*/
|
|
14
16
|
export class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
15
|
-
constructor() {
|
|
17
|
+
constructor(element, zone) {
|
|
16
18
|
super();
|
|
19
|
+
this.element = element;
|
|
20
|
+
this.zone = zone;
|
|
17
21
|
/**
|
|
18
22
|
* Specifies where button icon should be displayed
|
|
19
23
|
*/
|
|
@@ -76,12 +80,14 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
76
80
|
text: '',
|
|
77
81
|
icon: '',
|
|
78
82
|
iconClass: '',
|
|
83
|
+
svgIcon: null,
|
|
79
84
|
imageUrl: ''
|
|
80
85
|
};
|
|
81
86
|
this.overflowOptions = {
|
|
82
87
|
text: '',
|
|
83
88
|
icon: '',
|
|
84
89
|
iconClass: '',
|
|
90
|
+
svgIcon: null,
|
|
85
91
|
imageUrl: ''
|
|
86
92
|
};
|
|
87
93
|
this._showText = 'both';
|
|
@@ -132,6 +138,20 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
132
138
|
this.toolbarOptions.iconClass = getValueForLocation(iconClass, this.showIcon, false);
|
|
133
139
|
this.overflowOptions.iconClass = getValueForLocation(iconClass, this.showIcon, true);
|
|
134
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Defines an SVGIcon to be rendered within the button.
|
|
143
|
+
* The input can take either an [existing Kendo SVG icon](slug:svgicon_list) or a custom one.
|
|
144
|
+
*/
|
|
145
|
+
set svgIcon(icon) {
|
|
146
|
+
if (isDevMode() &&
|
|
147
|
+
icon &&
|
|
148
|
+
(this.toolbarOptions.icon || this.overflowOptions.icon) &&
|
|
149
|
+
(this.toolbarOptions.iconClass || this.overflowOptions.iconClass)) {
|
|
150
|
+
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
151
|
+
}
|
|
152
|
+
this.toolbarOptions.svgIcon = getValueForLocation(icon, this.showIcon, false);
|
|
153
|
+
this.overflowOptions.svgIcon = getValueForLocation(icon, this.showIcon, true);
|
|
154
|
+
}
|
|
135
155
|
/**
|
|
136
156
|
* Defines a URL which is used for an `img` element inside the Button.
|
|
137
157
|
* The URL can be relative or absolute. If relative, it is evaluated with relation to the web page URL.
|
|
@@ -172,19 +192,45 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
172
192
|
this.getButton().tabIndex = -1;
|
|
173
193
|
return false;
|
|
174
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* @hidden
|
|
197
|
+
*/
|
|
198
|
+
get toolbarButtonClass() {
|
|
199
|
+
return this.toggleable ? 'k-toolbar-toggle-button' : 'k-toolbar-button';
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* @hidden
|
|
203
|
+
*/
|
|
204
|
+
handleClick(ev) {
|
|
205
|
+
this.click.emit(ev);
|
|
206
|
+
if (this.toggleable) {
|
|
207
|
+
this.selected = !this.selected;
|
|
208
|
+
this.selectedChange.emit(this.selected);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* @hidden
|
|
213
|
+
*/
|
|
214
|
+
selectedChangeHandler(state) {
|
|
215
|
+
this.selected = state;
|
|
216
|
+
this.selectedChange.emit(state);
|
|
217
|
+
}
|
|
175
218
|
getButton() {
|
|
176
219
|
return (this.overflows ? this.overflowButtonElement : this.toolbarButtonElement).nativeElement;
|
|
177
220
|
}
|
|
178
221
|
setTextDisplayMode() {
|
|
179
222
|
this.toolbarOptions.text = this.showText === 'overflow' ? undefined : this.text;
|
|
180
|
-
this.
|
|
223
|
+
this.zone.onStable.pipe(take(1)).subscribe(() => {
|
|
224
|
+
this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
|
|
225
|
+
});
|
|
181
226
|
}
|
|
182
227
|
}
|
|
183
|
-
ToolBarButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
184
|
-
ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarButtonComponent, 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", themeColor: "themeColor", icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl" }, outputs: { click: "click", pointerdown: "pointerdown", selectedChange: "selectedChange" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, ngImport: i0, template: `
|
|
228
|
+
ToolBarButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
229
|
+
ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarButtonComponent, 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", 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: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, ngImport: i0, template: `
|
|
185
230
|
<ng-template #toolbarTemplate>
|
|
186
231
|
<button
|
|
187
232
|
#toolbarButton
|
|
233
|
+
[class]="toolbarButtonClass"
|
|
188
234
|
[tabindex]="tabIndex"
|
|
189
235
|
type="button"
|
|
190
236
|
kendoButton
|
|
@@ -198,40 +244,41 @@ ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
198
244
|
[selected]="selected"
|
|
199
245
|
[icon]="toolbarOptions.icon"
|
|
200
246
|
[iconClass]="toolbarOptions.iconClass"
|
|
247
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
201
248
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
202
249
|
(click)="click.emit($event)"
|
|
203
250
|
(pointerdown)="pointerdown.emit($event)"
|
|
204
|
-
(selectedChange)="
|
|
251
|
+
(selectedChange)="selectedChangeHandler($event)"
|
|
205
252
|
(blur)="onBlur()"
|
|
206
253
|
>
|
|
207
254
|
{{ toolbarOptions.text }}
|
|
208
255
|
</button>
|
|
209
256
|
</ng-template>
|
|
210
257
|
<ng-template #popupTemplate>
|
|
211
|
-
<
|
|
258
|
+
<div
|
|
212
259
|
#overflowButton
|
|
213
260
|
tabindex="-1"
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
class
|
|
217
|
-
[ngStyle]="style"
|
|
261
|
+
role="menuitem"
|
|
262
|
+
class="k-item k-menu-item"
|
|
263
|
+
[class.k-disabled]="disabled"
|
|
218
264
|
[ngClass]="className"
|
|
219
|
-
[
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
265
|
+
[ngStyle]="style"
|
|
266
|
+
(click)="handleClick($event)">
|
|
267
|
+
<span
|
|
268
|
+
class="k-link k-menu-link"
|
|
269
|
+
[class.k-selected]="selected"
|
|
270
|
+
>
|
|
271
|
+
<kendo-icon-wrapper
|
|
272
|
+
*ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
|
|
273
|
+
[name]="overflowOptions.icon"
|
|
274
|
+
[customFontClass]="overflowOptions.iconClass"
|
|
275
|
+
[svgIcon]="overflowOptions.svgIcon"
|
|
276
|
+
></kendo-icon-wrapper>
|
|
277
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
278
|
+
</span>
|
|
279
|
+
</div>
|
|
233
280
|
</ng-template>
|
|
234
|
-
`, isInline: true, components: [{ type: i1.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type:
|
|
281
|
+
`, isInline: true, components: [{ type: i1.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i2.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
235
282
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonComponent, decorators: [{
|
|
236
283
|
type: Component,
|
|
237
284
|
args: [{
|
|
@@ -242,6 +289,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
242
289
|
<ng-template #toolbarTemplate>
|
|
243
290
|
<button
|
|
244
291
|
#toolbarButton
|
|
292
|
+
[class]="toolbarButtonClass"
|
|
245
293
|
[tabindex]="tabIndex"
|
|
246
294
|
type="button"
|
|
247
295
|
kendoButton
|
|
@@ -255,42 +303,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
255
303
|
[selected]="selected"
|
|
256
304
|
[icon]="toolbarOptions.icon"
|
|
257
305
|
[iconClass]="toolbarOptions.iconClass"
|
|
306
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
258
307
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
259
308
|
(click)="click.emit($event)"
|
|
260
309
|
(pointerdown)="pointerdown.emit($event)"
|
|
261
|
-
(selectedChange)="
|
|
310
|
+
(selectedChange)="selectedChangeHandler($event)"
|
|
262
311
|
(blur)="onBlur()"
|
|
263
312
|
>
|
|
264
313
|
{{ toolbarOptions.text }}
|
|
265
314
|
</button>
|
|
266
315
|
</ng-template>
|
|
267
316
|
<ng-template #popupTemplate>
|
|
268
|
-
<
|
|
317
|
+
<div
|
|
269
318
|
#overflowButton
|
|
270
319
|
tabindex="-1"
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
class
|
|
274
|
-
[ngStyle]="style"
|
|
320
|
+
role="menuitem"
|
|
321
|
+
class="k-item k-menu-item"
|
|
322
|
+
[class.k-disabled]="disabled"
|
|
275
323
|
[ngClass]="className"
|
|
276
|
-
[
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
324
|
+
[ngStyle]="style"
|
|
325
|
+
(click)="handleClick($event)">
|
|
326
|
+
<span
|
|
327
|
+
class="k-link k-menu-link"
|
|
328
|
+
[class.k-selected]="selected"
|
|
329
|
+
>
|
|
330
|
+
<kendo-icon-wrapper
|
|
331
|
+
*ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
|
|
332
|
+
[name]="overflowOptions.icon"
|
|
333
|
+
[customFontClass]="overflowOptions.iconClass"
|
|
334
|
+
[svgIcon]="overflowOptions.svgIcon"
|
|
335
|
+
></kendo-icon-wrapper>
|
|
336
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
337
|
+
</span>
|
|
338
|
+
</div>
|
|
290
339
|
</ng-template>
|
|
291
340
|
`
|
|
292
341
|
}]
|
|
293
|
-
}], ctorParameters: function () { return []; }, propDecorators: { showText: [{
|
|
342
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { showText: [{
|
|
294
343
|
type: Input
|
|
295
344
|
}], showIcon: [{
|
|
296
345
|
type: Input
|
|
@@ -320,6 +369,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
320
369
|
type: Input
|
|
321
370
|
}], iconClass: [{
|
|
322
371
|
type: Input
|
|
372
|
+
}], svgIcon: [{
|
|
373
|
+
type: Input
|
|
323
374
|
}], imageUrl: [{
|
|
324
375
|
type: Input
|
|
325
376
|
}], click: [{
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, TemplateRef, forwardRef, ViewChild, ContentChildren, QueryList, Input } from '@angular/core';
|
|
5
|
+
import { Component, TemplateRef, forwardRef, ViewChild, ContentChildren, QueryList, Input, ViewChildren } from '@angular/core';
|
|
6
6
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
7
|
import { ToolBarToolComponent } from './toolbar-tool.component';
|
|
8
8
|
import { ToolBarButtonComponent } from './toolbar-button.component';
|
|
9
|
-
import { ButtonGroupComponent } from '@progress/kendo-angular-buttons';
|
|
10
9
|
import { makePeeker, getIndexOfFocused, seekFocusedIndex, getNextKey, getPrevKey, areEqual } from '../util';
|
|
10
|
+
import { ButtonGroupComponent } from '@progress/kendo-angular-buttons';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
12
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
13
13
|
import * as i2 from "@progress/kendo-angular-buttons";
|
|
14
|
-
import * as i3 from "@angular
|
|
14
|
+
import * as i3 from "@progress/kendo-angular-icons";
|
|
15
|
+
import * as i4 from "@angular/common";
|
|
15
16
|
/**
|
|
16
17
|
* Represents the Kendo UI Toolbar ButtonGroup for Angular.
|
|
17
18
|
*/
|
|
@@ -36,9 +37,14 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
get buttonElements() {
|
|
39
|
-
|
|
40
|
-
.
|
|
41
|
-
|
|
40
|
+
if (this.overflows) {
|
|
41
|
+
return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))].map(el => el.nativeElement);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return this.toolbarButtonGroup
|
|
45
|
+
.buttons.filter(b => !b.isDisabled)
|
|
46
|
+
.map(b => b.element);
|
|
47
|
+
}
|
|
42
48
|
}
|
|
43
49
|
/**
|
|
44
50
|
* @hidden
|
|
@@ -60,6 +66,20 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
60
66
|
button.selected = state;
|
|
61
67
|
button.selectedChange.emit(state);
|
|
62
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* @hidden
|
|
71
|
+
*/
|
|
72
|
+
overflowSelectedChangeHandler(button) {
|
|
73
|
+
if (this.selection === 'multiple') {
|
|
74
|
+
button.selected = !button.selected;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
const filteredButtons = this.buttonComponents.filter(b => b !== button);
|
|
78
|
+
filteredButtons.forEach(b => b.selected = false);
|
|
79
|
+
button.selected = !button.selected;
|
|
80
|
+
}
|
|
81
|
+
button.selectedChange.emit(button.selected);
|
|
82
|
+
}
|
|
63
83
|
/**
|
|
64
84
|
* @hidden
|
|
65
85
|
*/
|
|
@@ -94,8 +114,27 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
94
114
|
this.focusButton(this.focusedIndex, ev);
|
|
95
115
|
return !isUnmodified(this.focusedIndex);
|
|
96
116
|
}
|
|
97
|
-
|
|
98
|
-
|
|
117
|
+
/**
|
|
118
|
+
* @hidden
|
|
119
|
+
*/
|
|
120
|
+
handleClick(ev, button) {
|
|
121
|
+
button.click.emit(ev);
|
|
122
|
+
this.onButtonClick(ev);
|
|
123
|
+
this.overflowSelectedChangeHandler(button);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* @hidden
|
|
127
|
+
*/
|
|
128
|
+
getIconClasses(button) {
|
|
129
|
+
if (button.overflowOptions.icon) {
|
|
130
|
+
return `${button.overflowOptions.icon}`;
|
|
131
|
+
}
|
|
132
|
+
if (button.overflowOptions.iconClass) {
|
|
133
|
+
return button.overflowOptions.iconClass;
|
|
134
|
+
}
|
|
135
|
+
if (button.overflowOptions.svgIcon) {
|
|
136
|
+
return button.overflowOptions.svgIcon;
|
|
137
|
+
}
|
|
99
138
|
}
|
|
100
139
|
focusButton(index, ev) {
|
|
101
140
|
// Guard against focusing twice on mousedown.
|
|
@@ -105,9 +144,10 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
105
144
|
}
|
|
106
145
|
}
|
|
107
146
|
ToolBarButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
108
|
-
ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarButtonGroupComponent, selector: "kendo-toolbar-buttongroup", inputs: { disabled: "disabled", selection: "selection", width: "width", look: "look" }, providers: [LocalizationService, { provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonGroupComponent) }], queries: [{ propertyName: "buttonComponents", predicate: i0.forwardRef(function () { return ToolBarButtonComponent; }) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarButtonGroup", first: true, predicate: ["toolbarButtonGroup"], descendants: true }, { propertyName: "
|
|
147
|
+
ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarButtonGroupComponent, selector: "kendo-toolbar-buttongroup", inputs: { disabled: "disabled", selection: "selection", width: "width", look: "look" }, providers: [LocalizationService, { provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonGroupComponent) }], queries: [{ propertyName: "buttonComponents", predicate: i0.forwardRef(function () { return ToolBarButtonComponent; }) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarButtonGroup", first: true, predicate: ["toolbarButtonGroup"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarButtonGroup"], usesInheritance: true, ngImport: i0, template: `
|
|
109
148
|
<ng-template #toolbarTemplate>
|
|
110
149
|
<kendo-buttongroup
|
|
150
|
+
class="k-toolbar-button-group"
|
|
111
151
|
#toolbarButtonGroup
|
|
112
152
|
[tabIndex]="-1"
|
|
113
153
|
[selection]="selection"
|
|
@@ -129,6 +169,7 @@ ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
129
169
|
[themeColor]="button.fillMode ? button.themeColor : null"
|
|
130
170
|
[icon]="button.toolbarOptions.icon"
|
|
131
171
|
[iconClass]="button.toolbarOptions.iconClass"
|
|
172
|
+
[svgIcon]="button.toolbarOptions.svgIcon"
|
|
132
173
|
[imageUrl]="button.toolbarOptions.imageUrl"
|
|
133
174
|
(click)="button.click.emit($event); onButtonClick($event)"
|
|
134
175
|
(pointerdown)="button.pointerdown.emit($event)"
|
|
@@ -139,37 +180,31 @@ ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
139
180
|
</kendo-buttongroup>
|
|
140
181
|
</ng-template>
|
|
141
182
|
<ng-template #popupTemplate>
|
|
142
|
-
<
|
|
143
|
-
#
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
[width]="width"
|
|
149
|
-
>
|
|
150
|
-
<span
|
|
151
|
-
kendoButton
|
|
152
|
-
class="k-overflow-button"
|
|
153
|
-
*ngFor="let button of buttonComponents"
|
|
183
|
+
<ng-container *ngFor="let button of buttonComponents">
|
|
184
|
+
<div #listItem
|
|
185
|
+
tabindex="-1"
|
|
186
|
+
role="menuitem"
|
|
187
|
+
class="k-item k-menu-item"
|
|
188
|
+
[class.k-disabled]="disabled || button.disabled"
|
|
154
189
|
[ngStyle]="button.style"
|
|
155
190
|
[ngClass]="button.className"
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
</
|
|
170
|
-
</
|
|
191
|
+
(click)="handleClick($event, button)">
|
|
192
|
+
<span
|
|
193
|
+
class="k-link k-menu-link"
|
|
194
|
+
[class.k-selected]="button.selected"
|
|
195
|
+
>
|
|
196
|
+
<kendo-icon-wrapper
|
|
197
|
+
*ngIf="button.overflowOptions.icon || button.overflowOptions.iconClass || button.overflowOptions.svgIcon"
|
|
198
|
+
[name]="button.overflowOptions.icon"
|
|
199
|
+
[customFontClass]="button.overflowOptions.iconClass"
|
|
200
|
+
[svgIcon]="button.overflowOptions.svgIcon"
|
|
201
|
+
></kendo-icon-wrapper>
|
|
202
|
+
<span *ngIf="button.overflowOptions.text" class="k-menu-link-text">{{button.overflowOptions.text}}</span>
|
|
203
|
+
</span>
|
|
204
|
+
</div>
|
|
205
|
+
</ng-container>
|
|
171
206
|
</ng-template>
|
|
172
|
-
`, isInline: true, components: [{ type: i2.ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { type: i2.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type:
|
|
207
|
+
`, isInline: true, components: [{ type: i2.ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { type: i2.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i3.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
173
208
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonGroupComponent, decorators: [{
|
|
174
209
|
type: Component,
|
|
175
210
|
args: [{
|
|
@@ -179,6 +214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
179
214
|
template: `
|
|
180
215
|
<ng-template #toolbarTemplate>
|
|
181
216
|
<kendo-buttongroup
|
|
217
|
+
class="k-toolbar-button-group"
|
|
182
218
|
#toolbarButtonGroup
|
|
183
219
|
[tabIndex]="-1"
|
|
184
220
|
[selection]="selection"
|
|
@@ -200,6 +236,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
200
236
|
[themeColor]="button.fillMode ? button.themeColor : null"
|
|
201
237
|
[icon]="button.toolbarOptions.icon"
|
|
202
238
|
[iconClass]="button.toolbarOptions.iconClass"
|
|
239
|
+
[svgIcon]="button.toolbarOptions.svgIcon"
|
|
203
240
|
[imageUrl]="button.toolbarOptions.imageUrl"
|
|
204
241
|
(click)="button.click.emit($event); onButtonClick($event)"
|
|
205
242
|
(pointerdown)="button.pointerdown.emit($event)"
|
|
@@ -210,35 +247,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
210
247
|
</kendo-buttongroup>
|
|
211
248
|
</ng-template>
|
|
212
249
|
<ng-template #popupTemplate>
|
|
213
|
-
<
|
|
214
|
-
#
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
[width]="width"
|
|
220
|
-
>
|
|
221
|
-
<span
|
|
222
|
-
kendoButton
|
|
223
|
-
class="k-overflow-button"
|
|
224
|
-
*ngFor="let button of buttonComponents"
|
|
250
|
+
<ng-container *ngFor="let button of buttonComponents">
|
|
251
|
+
<div #listItem
|
|
252
|
+
tabindex="-1"
|
|
253
|
+
role="menuitem"
|
|
254
|
+
class="k-item k-menu-item"
|
|
255
|
+
[class.k-disabled]="disabled || button.disabled"
|
|
225
256
|
[ngStyle]="button.style"
|
|
226
257
|
[ngClass]="button.className"
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
</
|
|
241
|
-
</
|
|
258
|
+
(click)="handleClick($event, button)">
|
|
259
|
+
<span
|
|
260
|
+
class="k-link k-menu-link"
|
|
261
|
+
[class.k-selected]="button.selected"
|
|
262
|
+
>
|
|
263
|
+
<kendo-icon-wrapper
|
|
264
|
+
*ngIf="button.overflowOptions.icon || button.overflowOptions.iconClass || button.overflowOptions.svgIcon"
|
|
265
|
+
[name]="button.overflowOptions.icon"
|
|
266
|
+
[customFontClass]="button.overflowOptions.iconClass"
|
|
267
|
+
[svgIcon]="button.overflowOptions.svgIcon"
|
|
268
|
+
></kendo-icon-wrapper>
|
|
269
|
+
<span *ngIf="button.overflowOptions.text" class="k-menu-link-text">{{button.overflowOptions.text}}</span>
|
|
270
|
+
</span>
|
|
271
|
+
</div>
|
|
272
|
+
</ng-container>
|
|
242
273
|
</ng-template>
|
|
243
274
|
`
|
|
244
275
|
}]
|
|
@@ -256,13 +287,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
256
287
|
}], popupTemplate: [{
|
|
257
288
|
type: ViewChild,
|
|
258
289
|
args: ['popupTemplate', { static: true }]
|
|
259
|
-
}], buttonComponents: [{
|
|
260
|
-
type: ContentChildren,
|
|
261
|
-
args: [forwardRef(() => ToolBarButtonComponent)]
|
|
262
290
|
}], toolbarButtonGroup: [{
|
|
263
291
|
type: ViewChild,
|
|
264
292
|
args: ['toolbarButtonGroup', { static: false }]
|
|
265
|
-
}],
|
|
266
|
-
type:
|
|
267
|
-
args: ['
|
|
293
|
+
}], overflowListItems: [{
|
|
294
|
+
type: ViewChildren,
|
|
295
|
+
args: ['listItem']
|
|
296
|
+
}], buttonComponents: [{
|
|
297
|
+
type: ContentChildren,
|
|
298
|
+
args: [forwardRef(() => ToolBarButtonComponent)]
|
|
268
299
|
}] } });
|
|
@@ -43,6 +43,7 @@ ToolBarButtonListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
43
43
|
[disabled]="disabled || item.disabled"
|
|
44
44
|
[icon]="item.icon"
|
|
45
45
|
[iconClass]="item.iconClass"
|
|
46
|
+
[svgIcon]="item.svgIcon"
|
|
46
47
|
[imageUrl]="item.imageUrl"
|
|
47
48
|
[fillMode]="fillMode"
|
|
48
49
|
[themeColor]="fillMode ? themeColor : null"
|
|
@@ -67,6 +68,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
67
68
|
[disabled]="disabled || item.disabled"
|
|
68
69
|
[icon]="item.icon"
|
|
69
70
|
[iconClass]="item.iconClass"
|
|
71
|
+
[svgIcon]="item.svgIcon"
|
|
70
72
|
[imageUrl]="item.imageUrl"
|
|
71
73
|
[fillMode]="fillMode"
|
|
72
74
|
[themeColor]="fillMode ? themeColor : null"
|