@progress/kendo-angular-toolbar 11.0.0-develop.102 → 11.0.0-develop.103
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/common/{constants.d.ts → size.d.ts} +3 -2
- package/esm2020/common/{constants.mjs → size.mjs} +1 -4
- package/esm2020/package-metadata.mjs +1 -1
- package/esm2020/renderer.component.mjs +5 -1
- package/esm2020/toolbar.component.mjs +88 -27
- package/esm2020/tools/toolbar-button.component.mjs +69 -44
- package/esm2020/tools/toolbar-buttongroup.component.mjs +82 -69
- package/esm2020/tools/toolbar-dropdownbutton.component.mjs +100 -55
- package/esm2020/tools/toolbar-separator.component.mjs +12 -0
- package/esm2020/tools/toolbar-splitbutton.component.mjs +103 -64
- package/esm2020/util.mjs +24 -0
- package/fesm2015/progress-kendo-angular-toolbar.mjs +569 -345
- package/fesm2020/progress-kendo-angular-toolbar.mjs +568 -345
- package/index.d.ts +1 -0
- package/package.json +6 -6
- package/renderer.component.d.ts +1 -0
- package/toolbar.component.d.ts +18 -2
- package/tools/toolbar-button.component.d.ts +18 -1
- package/tools/toolbar-buttongroup.component.d.ts +15 -4
- package/tools/toolbar-dropdownbutton.component.d.ts +14 -2
- package/tools/toolbar-splitbutton.component.d.ts +15 -3
- package/util.d.ts +21 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { EventEmitter, Injectable, Component, Input, Output, HostBinding, HostListener, Directive, forwardRef, ViewContainerRef, ContentChildren, ViewChild, ViewChildren, ElementRef, NgModule } from '@angular/core';
|
|
7
|
-
import * as i2 from '@progress/kendo-angular-popup';
|
|
7
|
+
import * as i2$1 from '@progress/kendo-angular-popup';
|
|
8
8
|
import { PopupModule } from '@progress/kendo-angular-popup';
|
|
9
9
|
import * as i6 from '@progress/kendo-angular-common';
|
|
10
10
|
import { Keys, guid, isDocumentAvailable, ResizeSensorModule } from '@progress/kendo-angular-common';
|
|
@@ -13,7 +13,7 @@ import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/k
|
|
|
13
13
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
14
14
|
import { take, filter, takeUntil } from 'rxjs/operators';
|
|
15
15
|
import { Subject, Subscription, merge, fromEvent } from 'rxjs';
|
|
16
|
-
import * as
|
|
16
|
+
import * as i2 from '@angular/common';
|
|
17
17
|
import { CommonModule } from '@angular/common';
|
|
18
18
|
import * as i1$1 from '@progress/kendo-angular-buttons';
|
|
19
19
|
import { DropDownButtonComponent, ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
@@ -25,7 +25,7 @@ const packageMetadata = {
|
|
|
25
25
|
name: '@progress/kendo-angular-toolbar',
|
|
26
26
|
productName: 'Kendo UI for Angular',
|
|
27
27
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
28
|
-
publishDate:
|
|
28
|
+
publishDate: 1673523460,
|
|
29
29
|
version: '',
|
|
30
30
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
31
31
|
};
|
|
@@ -229,6 +229,30 @@ const getValueForLocation = (property, displayMode, overflows) => {
|
|
|
229
229
|
return property;
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
|
+
/**
|
|
233
|
+
* @hidden
|
|
234
|
+
*/
|
|
235
|
+
const SIZES = {
|
|
236
|
+
small: 'sm',
|
|
237
|
+
medium: 'md',
|
|
238
|
+
large: 'lg'
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* @hidden
|
|
242
|
+
*
|
|
243
|
+
* Returns the styling classes to be added and removed
|
|
244
|
+
*/
|
|
245
|
+
const getStylingClasses = (componentType, stylingOption, previousValue, newValue) => {
|
|
246
|
+
switch (stylingOption) {
|
|
247
|
+
case 'size':
|
|
248
|
+
return {
|
|
249
|
+
toRemove: `k-${componentType}-${SIZES[previousValue]}`,
|
|
250
|
+
toAdd: newValue !== 'none' ? `k-${componentType}-${SIZES[newValue]}` : ''
|
|
251
|
+
};
|
|
252
|
+
default:
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
};
|
|
232
256
|
|
|
233
257
|
/**
|
|
234
258
|
* @hidden
|
|
@@ -462,11 +486,6 @@ class PreventableEvent {
|
|
|
462
486
|
}
|
|
463
487
|
}
|
|
464
488
|
|
|
465
|
-
/**
|
|
466
|
-
* @hidden
|
|
467
|
-
*/
|
|
468
|
-
const defaultPopupWidth = '150px';
|
|
469
|
-
|
|
470
489
|
/**
|
|
471
490
|
* @hidden
|
|
472
491
|
*/
|
|
@@ -522,6 +541,7 @@ class ToolBarRendererComponent {
|
|
|
522
541
|
this.rendererService = rendererService;
|
|
523
542
|
this.refreshService = refreshService;
|
|
524
543
|
this.rendererClick = new EventEmitter();
|
|
544
|
+
this.hostClass = true;
|
|
525
545
|
this.rendererService.element = element;
|
|
526
546
|
this.rendererService.renderer = this;
|
|
527
547
|
this.refreshSubscription = this.refreshService.onRefresh.subscribe((tool) => {
|
|
@@ -603,14 +623,14 @@ class ToolBarRendererComponent {
|
|
|
603
623
|
}
|
|
604
624
|
}
|
|
605
625
|
ToolBarRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarRendererComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: RendererService }, { token: RefreshService }], target: i0.ɵɵFactoryTarget.Component });
|
|
606
|
-
ToolBarRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarRendererComponent, selector: "kendo-toolbar-renderer", inputs: { tool: "tool", location: "location", resizable: "resizable" }, outputs: { rendererClick: "rendererClick" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.k-spacer": "this.spacerClass" } }, providers: [RendererService], exportAs: ["kendoToolBarRenderer"], ngImport: i0, template: `
|
|
626
|
+
ToolBarRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarRendererComponent, selector: "kendo-toolbar-renderer", inputs: { tool: "tool", location: "location", resizable: "resizable" }, outputs: { rendererClick: "rendererClick" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.k-spacer": "this.spacerClass", "class.k-toolbar-renderer": "this.hostClass" } }, providers: [RendererService], exportAs: ["kendoToolBarRenderer"], ngImport: i0, template: `
|
|
607
627
|
<ng-container *ngIf="location === 'toolbar'">
|
|
608
628
|
<ng-template [ngTemplateOutlet]="template"></ng-template>
|
|
609
629
|
</ng-container>
|
|
610
630
|
<ng-container *ngIf="location === 'overflow' && tool.responsive">
|
|
611
631
|
<ng-template [ngTemplateOutlet]="template"></ng-template>
|
|
612
632
|
</ng-container>
|
|
613
|
-
`, isInline: true, directives: [{ type:
|
|
633
|
+
`, isInline: true, directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
614
634
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarRendererComponent, decorators: [{
|
|
615
635
|
type: Component,
|
|
616
636
|
args: [{
|
|
@@ -637,6 +657,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
637
657
|
}], spacerClass: [{
|
|
638
658
|
type: HostBinding,
|
|
639
659
|
args: ['class.k-spacer']
|
|
660
|
+
}], hostClass: [{
|
|
661
|
+
type: HostBinding,
|
|
662
|
+
args: ['class.k-toolbar-renderer']
|
|
640
663
|
}], onClick: [{
|
|
641
664
|
type: HostListener,
|
|
642
665
|
args: ['click', ['$event']]
|
|
@@ -688,6 +711,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
688
711
|
}]
|
|
689
712
|
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
690
713
|
|
|
714
|
+
const DEFAULT_SIZE = 'medium';
|
|
691
715
|
const getInitialPopupSettings = (isRtl) => ({
|
|
692
716
|
animate: true,
|
|
693
717
|
anchorAlign: { horizontal: isRtl ? 'left' : 'right', vertical: 'bottom' },
|
|
@@ -722,8 +746,9 @@ class ToolBarComponent {
|
|
|
722
746
|
* Fires when the overflow popup of the ToolBar is closed.
|
|
723
747
|
*/
|
|
724
748
|
this.close = new EventEmitter();
|
|
725
|
-
this.
|
|
749
|
+
this.hostClass = true;
|
|
726
750
|
this.cancelRenderedToolsSubscription$ = new Subject();
|
|
751
|
+
this._size = DEFAULT_SIZE;
|
|
727
752
|
this.subscriptions = new Subscription();
|
|
728
753
|
this.popupSubs = new Subscription();
|
|
729
754
|
this.role = 'toolbar';
|
|
@@ -738,6 +763,9 @@ class ToolBarComponent {
|
|
|
738
763
|
validatePackage(packageMetadata);
|
|
739
764
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
740
765
|
}
|
|
766
|
+
get overflowClass() {
|
|
767
|
+
return `k-button-${SIZES[this.size]}`;
|
|
768
|
+
}
|
|
741
769
|
/**
|
|
742
770
|
* @hidden
|
|
743
771
|
*/
|
|
@@ -760,6 +788,23 @@ class ToolBarComponent {
|
|
|
760
788
|
get popupSettings() {
|
|
761
789
|
return this._popupSettings || getInitialPopupSettings(this.localization.rtl);
|
|
762
790
|
}
|
|
791
|
+
/**
|
|
792
|
+
* Specifies the padding of all Toolbar elements.
|
|
793
|
+
*
|
|
794
|
+
* The possible values are:
|
|
795
|
+
* * `small`
|
|
796
|
+
* * `medium` (default)
|
|
797
|
+
* * `large`
|
|
798
|
+
* * `none`
|
|
799
|
+
*/
|
|
800
|
+
set size(size) {
|
|
801
|
+
const newSize = size ? size : DEFAULT_SIZE;
|
|
802
|
+
this.handleClasses(newSize, 'size');
|
|
803
|
+
this._size = newSize;
|
|
804
|
+
}
|
|
805
|
+
get size() {
|
|
806
|
+
return this._size;
|
|
807
|
+
}
|
|
763
808
|
/**
|
|
764
809
|
* @hidden
|
|
765
810
|
*/
|
|
@@ -881,6 +926,7 @@ class ToolBarComponent {
|
|
|
881
926
|
}
|
|
882
927
|
this.navigationService.setRenderedTools(this.renderedTools.toArray());
|
|
883
928
|
this.subscriptions.add(this.renderedTools.changes.subscribe((rts) => this.navigationService.setRenderedTools(rts.toArray())));
|
|
929
|
+
this.handleClasses(this.size, 'size');
|
|
884
930
|
}
|
|
885
931
|
ngOnInit() {
|
|
886
932
|
this.subscriptions.add(this.localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr')));
|
|
@@ -951,7 +997,7 @@ class ToolBarComponent {
|
|
|
951
997
|
content: this.popupTemplate,
|
|
952
998
|
appendTo: this.appendTo,
|
|
953
999
|
animate: this.popupSettings.animate,
|
|
954
|
-
popupClass: this.popupSettings.popupClass,
|
|
1000
|
+
popupClass: this.normalizePopupClasses(this.popupSettings.popupClass),
|
|
955
1001
|
positionMode: 'absolute'
|
|
956
1002
|
});
|
|
957
1003
|
this.setPopupContentDimensions();
|
|
@@ -968,7 +1014,10 @@ class ToolBarComponent {
|
|
|
968
1014
|
this.shrink(containerWidth, this.childrenWidth);
|
|
969
1015
|
this.stretch(containerWidth, this.childrenWidth);
|
|
970
1016
|
this.displayAnchor();
|
|
971
|
-
this.resizeSensor
|
|
1017
|
+
this.resizeSensor?.acceptSize();
|
|
1018
|
+
if (this.popupOpen) {
|
|
1019
|
+
this.toggle();
|
|
1020
|
+
}
|
|
972
1021
|
}
|
|
973
1022
|
}
|
|
974
1023
|
/**
|
|
@@ -977,6 +1026,7 @@ class ToolBarComponent {
|
|
|
977
1026
|
onPopupOpen() {
|
|
978
1027
|
this.zone.runOutsideAngular(() => {
|
|
979
1028
|
this.overflowKeydownListener = this.renderer.listen(this.popupRef.popupElement, 'keydown', (ev) => {
|
|
1029
|
+
const currentTool = this.overflowRenderedTools.toArray().find(tool => closest(ev.target, (el) => el === tool.element.nativeElement));
|
|
980
1030
|
switch (ev.keyCode) {
|
|
981
1031
|
case Keys.ArrowUp:
|
|
982
1032
|
this.zone.run(() => {
|
|
@@ -999,6 +1049,16 @@ class ToolBarComponent {
|
|
|
999
1049
|
this.navigationService.resetNavigation();
|
|
1000
1050
|
});
|
|
1001
1051
|
break;
|
|
1052
|
+
case Keys.Enter:
|
|
1053
|
+
case Keys.Space:
|
|
1054
|
+
this.zone.run(() => {
|
|
1055
|
+
if (currentTool) {
|
|
1056
|
+
ev.preventDefault();
|
|
1057
|
+
ev.target.click();
|
|
1058
|
+
ev.target.focus();
|
|
1059
|
+
}
|
|
1060
|
+
});
|
|
1061
|
+
break;
|
|
1002
1062
|
default:
|
|
1003
1063
|
break;
|
|
1004
1064
|
}
|
|
@@ -1029,11 +1089,11 @@ class ToolBarComponent {
|
|
|
1029
1089
|
}
|
|
1030
1090
|
displayAnchor() {
|
|
1031
1091
|
const visibility = this.allTools.filter(t => t.overflows && t.responsive).length > 0 ? 'visible' : 'hidden';
|
|
1032
|
-
this.renderer.setStyle(this.overflowButton.nativeElement, 'visibility', visibility);
|
|
1092
|
+
this.overflowButton && this.renderer.setStyle(this.overflowButton.nativeElement, 'visibility', visibility);
|
|
1033
1093
|
}
|
|
1034
1094
|
get popupWidth() {
|
|
1035
1095
|
if (!this.popupSettings || !this.popupSettings.width) {
|
|
1036
|
-
return
|
|
1096
|
+
return 'auto';
|
|
1037
1097
|
}
|
|
1038
1098
|
return isNaN(this.popupSettings.width) ? this.popupSettings.width : `${this.popupSettings.width}px`;
|
|
1039
1099
|
}
|
|
@@ -1141,9 +1201,37 @@ class ToolBarComponent {
|
|
|
1141
1201
|
this.popupRef = null;
|
|
1142
1202
|
}
|
|
1143
1203
|
}
|
|
1204
|
+
handleClasses(value, input) {
|
|
1205
|
+
const elem = this.element.nativeElement;
|
|
1206
|
+
const classes = getStylingClasses('toolbar', input, this[input], value);
|
|
1207
|
+
if (classes.toRemove) {
|
|
1208
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
1209
|
+
}
|
|
1210
|
+
if (classes.toAdd) {
|
|
1211
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
normalizePopupClasses(classList) {
|
|
1215
|
+
let classes = ['k-menu-popup', 'k-toolbar-popup'];
|
|
1216
|
+
if (!classList) {
|
|
1217
|
+
return classes;
|
|
1218
|
+
}
|
|
1219
|
+
if (typeof classList === 'string') {
|
|
1220
|
+
classes.push(...classList.split(' '));
|
|
1221
|
+
}
|
|
1222
|
+
else if (Array.isArray(classList)) {
|
|
1223
|
+
classes = [...classes, ...classList];
|
|
1224
|
+
}
|
|
1225
|
+
else {
|
|
1226
|
+
for (const cl in classList) {
|
|
1227
|
+
classes.push(classList[cl]);
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
return classes;
|
|
1231
|
+
}
|
|
1144
1232
|
}
|
|
1145
|
-
ToolBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarComponent, deps: [{ token: i1.LocalizationService }, { token: i2.PopupService }, { token: RefreshService }, { token: NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1146
|
-
ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarComponent, selector: "kendo-toolbar", inputs: { overflow: "overflow", resizable: "resizable", popupSettings: "popupSettings", tabindex: "tabindex", tabIndex: "tabIndex" }, outputs: { open: "open", close: "close" }, host: { listeners: { "focus": "onFocus($event)", "focusout": "onFocusOut($event)" }, properties: { "class.k-
|
|
1233
|
+
ToolBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarComponent, deps: [{ token: i1.LocalizationService }, { token: i2$1.PopupService }, { token: RefreshService }, { token: NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1234
|
+
ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarComponent, selector: "kendo-toolbar", inputs: { overflow: "overflow", resizable: "resizable", popupSettings: "popupSettings", tabindex: "tabindex", size: "size", tabIndex: "tabIndex" }, outputs: { open: "open", close: "close" }, host: { listeners: { "focus": "onFocus($event)", "focusout": "onFocusOut($event)" }, properties: { "class.k-toolbar": "this.hostClass", "attr.role": "this.role", "attr.dir": "this.getDir", "class.k-toolbar-resizable": "this.resizableClass" } }, providers: [
|
|
1147
1235
|
RefreshService,
|
|
1148
1236
|
NavigationService,
|
|
1149
1237
|
LocalizationService,
|
|
@@ -1179,19 +1267,19 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
1179
1267
|
[style.visibility]="'hidden'"
|
|
1180
1268
|
[style.position]="'relative'"
|
|
1181
1269
|
[style.margin-inline-start]="'auto'"
|
|
1182
|
-
class="k-overflow-
|
|
1270
|
+
class="k-toolbar-overflow-button k-button k-button-flat k-button-flat-base k-icon-button"
|
|
1271
|
+
[ngClass]="overflowClass"
|
|
1183
1272
|
(click)="showPopup()"
|
|
1184
1273
|
>
|
|
1185
|
-
<span class="k-icon k-i-more-vertical"></span>
|
|
1274
|
+
<span class="k-button-icon k-icon k-i-more-vertical"></span>
|
|
1186
1275
|
</button>
|
|
1187
1276
|
<ng-template #popupTemplate>
|
|
1188
|
-
<
|
|
1189
|
-
class="k-
|
|
1277
|
+
<div
|
|
1278
|
+
class="k-menu-group k-menu-group-md"
|
|
1190
1279
|
role="menu"
|
|
1191
1280
|
[id]="popupId"
|
|
1192
1281
|
[attr.aria-labelledby]="overflowBtnId">
|
|
1193
1282
|
<ng-container *ngFor="let tool of allTools; let index = index">
|
|
1194
|
-
<li class="k-item" role="menuitem">
|
|
1195
1283
|
<kendo-toolbar-renderer
|
|
1196
1284
|
#overflowRenderer
|
|
1197
1285
|
(rendererClick)="onRendererClick($event)"
|
|
@@ -1199,13 +1287,12 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
1199
1287
|
[resizable]="overflow"
|
|
1200
1288
|
[tool]="tool"
|
|
1201
1289
|
></kendo-toolbar-renderer>
|
|
1202
|
-
</li>
|
|
1203
1290
|
</ng-container>
|
|
1204
|
-
</
|
|
1291
|
+
</div>
|
|
1205
1292
|
</ng-template>
|
|
1206
1293
|
<ng-container #container></ng-container>
|
|
1207
1294
|
<kendo-resize-sensor *ngIf="overflow" #resizeSensor></kendo-resize-sensor>
|
|
1208
|
-
`, isInline: true, components: [{ type: ToolBarRendererComponent, selector: "kendo-toolbar-renderer", inputs: ["tool", "location", "resizable"], outputs: ["rendererClick"], exportAs: ["kendoToolBarRenderer"] }, { type: i6.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: LocalizedToolbarMessagesDirective, selector: "[kendoToolbarLocalizedMessages]" }, { type:
|
|
1295
|
+
`, isInline: true, components: [{ type: ToolBarRendererComponent, selector: "kendo-toolbar-renderer", inputs: ["tool", "location", "resizable"], outputs: ["rendererClick"], exportAs: ["kendoToolBarRenderer"] }, { type: i6.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: LocalizedToolbarMessagesDirective, selector: "[kendoToolbarLocalizedMessages]" }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1209
1296
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarComponent, decorators: [{
|
|
1210
1297
|
type: Component,
|
|
1211
1298
|
args: [{
|
|
@@ -1248,19 +1335,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1248
1335
|
[style.visibility]="'hidden'"
|
|
1249
1336
|
[style.position]="'relative'"
|
|
1250
1337
|
[style.margin-inline-start]="'auto'"
|
|
1251
|
-
class="k-overflow-
|
|
1338
|
+
class="k-toolbar-overflow-button k-button k-button-flat k-button-flat-base k-icon-button"
|
|
1339
|
+
[ngClass]="overflowClass"
|
|
1252
1340
|
(click)="showPopup()"
|
|
1253
1341
|
>
|
|
1254
|
-
<span class="k-icon k-i-more-vertical"></span>
|
|
1342
|
+
<span class="k-button-icon k-icon k-i-more-vertical"></span>
|
|
1255
1343
|
</button>
|
|
1256
1344
|
<ng-template #popupTemplate>
|
|
1257
|
-
<
|
|
1258
|
-
class="k-
|
|
1345
|
+
<div
|
|
1346
|
+
class="k-menu-group k-menu-group-md"
|
|
1259
1347
|
role="menu"
|
|
1260
1348
|
[id]="popupId"
|
|
1261
1349
|
[attr.aria-labelledby]="overflowBtnId">
|
|
1262
1350
|
<ng-container *ngFor="let tool of allTools; let index = index">
|
|
1263
|
-
<li class="k-item" role="menuitem">
|
|
1264
1351
|
<kendo-toolbar-renderer
|
|
1265
1352
|
#overflowRenderer
|
|
1266
1353
|
(rendererClick)="onRendererClick($event)"
|
|
@@ -1268,15 +1355,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1268
1355
|
[resizable]="overflow"
|
|
1269
1356
|
[tool]="tool"
|
|
1270
1357
|
></kendo-toolbar-renderer>
|
|
1271
|
-
</li>
|
|
1272
1358
|
</ng-container>
|
|
1273
|
-
</
|
|
1359
|
+
</div>
|
|
1274
1360
|
</ng-template>
|
|
1275
1361
|
<ng-container #container></ng-container>
|
|
1276
1362
|
<kendo-resize-sensor *ngIf="overflow" #resizeSensor></kendo-resize-sensor>
|
|
1277
1363
|
`
|
|
1278
1364
|
}]
|
|
1279
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2.PopupService }, { type: RefreshService }, { type: NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { overflow: [{
|
|
1365
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2$1.PopupService }, { type: RefreshService }, { type: NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { overflow: [{
|
|
1280
1366
|
type: Input
|
|
1281
1367
|
}], resizable: [{
|
|
1282
1368
|
type: Input
|
|
@@ -1284,6 +1370,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1284
1370
|
type: Input
|
|
1285
1371
|
}], tabindex: [{
|
|
1286
1372
|
type: Input
|
|
1373
|
+
}], size: [{
|
|
1374
|
+
type: Input
|
|
1287
1375
|
}], tabIndex: [{
|
|
1288
1376
|
type: Input,
|
|
1289
1377
|
args: ['tabIndex']
|
|
@@ -1312,10 +1400,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1312
1400
|
}], overflowRenderedTools: [{
|
|
1313
1401
|
type: ViewChildren,
|
|
1314
1402
|
args: ['overflowRenderer']
|
|
1315
|
-
}],
|
|
1316
|
-
type: HostBinding,
|
|
1317
|
-
args: ['class.k-widget']
|
|
1318
|
-
}, {
|
|
1403
|
+
}], hostClass: [{
|
|
1319
1404
|
type: HostBinding,
|
|
1320
1405
|
args: ['class.k-toolbar']
|
|
1321
1406
|
}], onFocus: [{
|
|
@@ -1339,8 +1424,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1339
1424
|
* Represents the [Kendo UI ToolBar Button tool for Angular]({% slug controltypes_toolbar %}#toc-buttons).
|
|
1340
1425
|
*/
|
|
1341
1426
|
class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
1342
|
-
constructor() {
|
|
1427
|
+
constructor(element) {
|
|
1343
1428
|
super();
|
|
1429
|
+
this.element = element;
|
|
1344
1430
|
/**
|
|
1345
1431
|
* Specifies where button icon should be displayed
|
|
1346
1432
|
*/
|
|
@@ -1499,6 +1585,40 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
1499
1585
|
this.getButton().tabIndex = -1;
|
|
1500
1586
|
return false;
|
|
1501
1587
|
}
|
|
1588
|
+
/**
|
|
1589
|
+
* @hidden
|
|
1590
|
+
*/
|
|
1591
|
+
get toolbarButtonClass() {
|
|
1592
|
+
return this.toggleable ? 'k-toolbar-toggle-button' : 'k-toolbar-button';
|
|
1593
|
+
}
|
|
1594
|
+
/**
|
|
1595
|
+
* @hidden
|
|
1596
|
+
*/
|
|
1597
|
+
handleClick(ev) {
|
|
1598
|
+
this.click.emit(ev);
|
|
1599
|
+
if (this.toggleable) {
|
|
1600
|
+
this.selected = !this.selected;
|
|
1601
|
+
this.selectedChange.emit(this.selected);
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
/**
|
|
1605
|
+
* @hidden
|
|
1606
|
+
*/
|
|
1607
|
+
getIconClasses() {
|
|
1608
|
+
if (this.overflowOptions.icon) {
|
|
1609
|
+
return `k-icon k-i-${this.overflowOptions.icon}`;
|
|
1610
|
+
}
|
|
1611
|
+
else if (this.overflowOptions.iconClass) {
|
|
1612
|
+
return this.overflowOptions.iconClass;
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
/**
|
|
1616
|
+
* @hidden
|
|
1617
|
+
*/
|
|
1618
|
+
selectedChangeHandler(state) {
|
|
1619
|
+
this.selected = state;
|
|
1620
|
+
this.selectedChange.emit(state);
|
|
1621
|
+
}
|
|
1502
1622
|
getButton() {
|
|
1503
1623
|
return (this.overflows ? this.overflowButtonElement : this.toolbarButtonElement).nativeElement;
|
|
1504
1624
|
}
|
|
@@ -1507,11 +1627,12 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
1507
1627
|
this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
|
|
1508
1628
|
}
|
|
1509
1629
|
}
|
|
1510
|
-
ToolBarButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1630
|
+
ToolBarButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1511
1631
|
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: `
|
|
1512
1632
|
<ng-template #toolbarTemplate>
|
|
1513
1633
|
<button
|
|
1514
1634
|
#toolbarButton
|
|
1635
|
+
[class]="toolbarButtonClass"
|
|
1515
1636
|
[tabindex]="tabIndex"
|
|
1516
1637
|
type="button"
|
|
1517
1638
|
kendoButton
|
|
@@ -1528,37 +1649,31 @@ ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1528
1649
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
1529
1650
|
(click)="click.emit($event)"
|
|
1530
1651
|
(pointerdown)="pointerdown.emit($event)"
|
|
1531
|
-
(selectedChange)="
|
|
1652
|
+
(selectedChange)="selectedChangeHandler($event)"
|
|
1532
1653
|
(blur)="onBlur()"
|
|
1533
1654
|
>
|
|
1534
1655
|
{{ toolbarOptions.text }}
|
|
1535
1656
|
</button>
|
|
1536
1657
|
</ng-template>
|
|
1537
1658
|
<ng-template #popupTemplate>
|
|
1538
|
-
<
|
|
1659
|
+
<div
|
|
1539
1660
|
#overflowButton
|
|
1540
1661
|
tabindex="-1"
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
class
|
|
1544
|
-
[ngStyle]="style"
|
|
1662
|
+
role="menuitem"
|
|
1663
|
+
class="k-item k-menu-item"
|
|
1664
|
+
[class.k-disabled]="disabled"
|
|
1545
1665
|
[ngClass]="className"
|
|
1546
|
-
[
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
(click)="click.emit($event)"
|
|
1556
|
-
(selectedChange)="selectedChange.emit($event)"
|
|
1557
|
-
>
|
|
1558
|
-
{{ overflowOptions.text }}
|
|
1559
|
-
</button>
|
|
1666
|
+
[ngStyle]="style"
|
|
1667
|
+
(click)="handleClick($event)">
|
|
1668
|
+
<span
|
|
1669
|
+
class="k-link k-menu-link"
|
|
1670
|
+
[class.k-selected]="selected">
|
|
1671
|
+
<span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
|
|
1672
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
1673
|
+
</span>
|
|
1674
|
+
</div>
|
|
1560
1675
|
</ng-template>
|
|
1561
|
-
`, isInline: true, components: [{ type: i1$1.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:
|
|
1676
|
+
`, isInline: true, components: [{ type: i1$1.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: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1562
1677
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonComponent, decorators: [{
|
|
1563
1678
|
type: Component,
|
|
1564
1679
|
args: [{
|
|
@@ -1569,6 +1684,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1569
1684
|
<ng-template #toolbarTemplate>
|
|
1570
1685
|
<button
|
|
1571
1686
|
#toolbarButton
|
|
1687
|
+
[class]="toolbarButtonClass"
|
|
1572
1688
|
[tabindex]="tabIndex"
|
|
1573
1689
|
type="button"
|
|
1574
1690
|
kendoButton
|
|
@@ -1585,39 +1701,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1585
1701
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
1586
1702
|
(click)="click.emit($event)"
|
|
1587
1703
|
(pointerdown)="pointerdown.emit($event)"
|
|
1588
|
-
(selectedChange)="
|
|
1704
|
+
(selectedChange)="selectedChangeHandler($event)"
|
|
1589
1705
|
(blur)="onBlur()"
|
|
1590
1706
|
>
|
|
1591
1707
|
{{ toolbarOptions.text }}
|
|
1592
1708
|
</button>
|
|
1593
1709
|
</ng-template>
|
|
1594
1710
|
<ng-template #popupTemplate>
|
|
1595
|
-
<
|
|
1711
|
+
<div
|
|
1596
1712
|
#overflowButton
|
|
1597
1713
|
tabindex="-1"
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
class
|
|
1601
|
-
[ngStyle]="style"
|
|
1714
|
+
role="menuitem"
|
|
1715
|
+
class="k-item k-menu-item"
|
|
1716
|
+
[class.k-disabled]="disabled"
|
|
1602
1717
|
[ngClass]="className"
|
|
1603
|
-
[
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
(click)="click.emit($event)"
|
|
1613
|
-
(selectedChange)="selectedChange.emit($event)"
|
|
1614
|
-
>
|
|
1615
|
-
{{ overflowOptions.text }}
|
|
1616
|
-
</button>
|
|
1718
|
+
[ngStyle]="style"
|
|
1719
|
+
(click)="handleClick($event)">
|
|
1720
|
+
<span
|
|
1721
|
+
class="k-link k-menu-link"
|
|
1722
|
+
[class.k-selected]="selected">
|
|
1723
|
+
<span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
|
|
1724
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
1725
|
+
</span>
|
|
1726
|
+
</div>
|
|
1617
1727
|
</ng-template>
|
|
1618
1728
|
`
|
|
1619
1729
|
}]
|
|
1620
|
-
}], ctorParameters: function () { return []; }, propDecorators: { showText: [{
|
|
1730
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { showText: [{
|
|
1621
1731
|
type: Input
|
|
1622
1732
|
}], showIcon: [{
|
|
1623
1733
|
type: Input
|
|
@@ -1693,9 +1803,14 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1693
1803
|
}
|
|
1694
1804
|
}
|
|
1695
1805
|
get buttonElements() {
|
|
1696
|
-
|
|
1697
|
-
.
|
|
1698
|
-
|
|
1806
|
+
if (this.overflows) {
|
|
1807
|
+
return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))].map(el => el.nativeElement);
|
|
1808
|
+
}
|
|
1809
|
+
else {
|
|
1810
|
+
return this.toolbarButtonGroup
|
|
1811
|
+
.buttons.filter(b => !b.isDisabled)
|
|
1812
|
+
.map(b => b.element);
|
|
1813
|
+
}
|
|
1699
1814
|
}
|
|
1700
1815
|
/**
|
|
1701
1816
|
* @hidden
|
|
@@ -1717,6 +1832,20 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1717
1832
|
button.selected = state;
|
|
1718
1833
|
button.selectedChange.emit(state);
|
|
1719
1834
|
}
|
|
1835
|
+
/**
|
|
1836
|
+
* @hidden
|
|
1837
|
+
*/
|
|
1838
|
+
overflowSelectedChangeHandler(button) {
|
|
1839
|
+
if (this.selection === 'multiple') {
|
|
1840
|
+
button.selected = !button.selected;
|
|
1841
|
+
}
|
|
1842
|
+
else {
|
|
1843
|
+
const filteredButtons = this.buttonComponents.filter(b => b !== button);
|
|
1844
|
+
filteredButtons.forEach(b => b.selected = false);
|
|
1845
|
+
button.selected = !button.selected;
|
|
1846
|
+
}
|
|
1847
|
+
button.selectedChange.emit(button.selected);
|
|
1848
|
+
}
|
|
1720
1849
|
/**
|
|
1721
1850
|
* @hidden
|
|
1722
1851
|
*/
|
|
@@ -1751,8 +1880,24 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1751
1880
|
this.focusButton(this.focusedIndex, ev);
|
|
1752
1881
|
return !isUnmodified(this.focusedIndex);
|
|
1753
1882
|
}
|
|
1754
|
-
|
|
1755
|
-
|
|
1883
|
+
/**
|
|
1884
|
+
* @hidden
|
|
1885
|
+
*/
|
|
1886
|
+
handleClick(ev, button) {
|
|
1887
|
+
button.click.emit(ev);
|
|
1888
|
+
this.onButtonClick(ev);
|
|
1889
|
+
this.overflowSelectedChangeHandler(button);
|
|
1890
|
+
}
|
|
1891
|
+
/**
|
|
1892
|
+
* @hidden
|
|
1893
|
+
*/
|
|
1894
|
+
getIconClasses(button) {
|
|
1895
|
+
if (button.overflowOptions.icon) {
|
|
1896
|
+
return `k-icon k-i-${button.overflowOptions.icon}`;
|
|
1897
|
+
}
|
|
1898
|
+
else if (button.overflowOptions.iconClass) {
|
|
1899
|
+
return button.overflowOptions.iconClass;
|
|
1900
|
+
}
|
|
1756
1901
|
}
|
|
1757
1902
|
focusButton(index, ev) {
|
|
1758
1903
|
// Guard against focusing twice on mousedown.
|
|
@@ -1762,9 +1907,10 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1762
1907
|
}
|
|
1763
1908
|
}
|
|
1764
1909
|
ToolBarButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1765
|
-
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: "
|
|
1910
|
+
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: `
|
|
1766
1911
|
<ng-template #toolbarTemplate>
|
|
1767
1912
|
<kendo-buttongroup
|
|
1913
|
+
class="k-toolbar-button-group"
|
|
1768
1914
|
#toolbarButtonGroup
|
|
1769
1915
|
[tabIndex]="-1"
|
|
1770
1916
|
[selection]="selection"
|
|
@@ -1796,37 +1942,25 @@ ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
1796
1942
|
</kendo-buttongroup>
|
|
1797
1943
|
</ng-template>
|
|
1798
1944
|
<ng-template #popupTemplate>
|
|
1799
|
-
<
|
|
1800
|
-
#
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
[width]="width"
|
|
1806
|
-
>
|
|
1807
|
-
<span
|
|
1808
|
-
kendoButton
|
|
1809
|
-
class="k-overflow-button"
|
|
1810
|
-
*ngFor="let button of buttonComponents"
|
|
1945
|
+
<ng-container *ngFor="let button of buttonComponents">
|
|
1946
|
+
<div #listItem
|
|
1947
|
+
tabindex="-1"
|
|
1948
|
+
role="menuitem"
|
|
1949
|
+
class="k-item k-menu-item"
|
|
1950
|
+
[class.k-disabled]="disabled || button.disabled"
|
|
1811
1951
|
[ngStyle]="button.style"
|
|
1812
1952
|
[ngClass]="button.className"
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
(click)="button.click.emit($event); onButtonClick($event)"
|
|
1823
|
-
(selectedChange)="selectedChangeHandler($event, button)"
|
|
1824
|
-
>
|
|
1825
|
-
{{ button.overflowOptions.text }}
|
|
1826
|
-
</span>
|
|
1827
|
-
</kendo-buttongroup>
|
|
1953
|
+
(click)="handleClick($event, button)">
|
|
1954
|
+
<span
|
|
1955
|
+
class="k-link k-menu-link"
|
|
1956
|
+
[class.k-selected]="button.selected">
|
|
1957
|
+
<span *ngIf="button.overflowOptions.icon || button.overflowOptions.iconClass" [ngClass]="getIconClasses(button)"></span>
|
|
1958
|
+
<span *ngIf="button.overflowOptions.text" class="k-menu-link-text">{{button.overflowOptions.text}}</span>
|
|
1959
|
+
</span>
|
|
1960
|
+
</div>
|
|
1961
|
+
</ng-container>
|
|
1828
1962
|
</ng-template>
|
|
1829
|
-
`, isInline: true, components: [{ type: i1$1.ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { type: i1$1.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:
|
|
1963
|
+
`, isInline: true, components: [{ type: i1$1.ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { type: i1$1.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: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1830
1964
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonGroupComponent, decorators: [{
|
|
1831
1965
|
type: Component,
|
|
1832
1966
|
args: [{
|
|
@@ -1836,6 +1970,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1836
1970
|
template: `
|
|
1837
1971
|
<ng-template #toolbarTemplate>
|
|
1838
1972
|
<kendo-buttongroup
|
|
1973
|
+
class="k-toolbar-button-group"
|
|
1839
1974
|
#toolbarButtonGroup
|
|
1840
1975
|
[tabIndex]="-1"
|
|
1841
1976
|
[selection]="selection"
|
|
@@ -1867,35 +2002,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1867
2002
|
</kendo-buttongroup>
|
|
1868
2003
|
</ng-template>
|
|
1869
2004
|
<ng-template #popupTemplate>
|
|
1870
|
-
<
|
|
1871
|
-
#
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
[width]="width"
|
|
1877
|
-
>
|
|
1878
|
-
<span
|
|
1879
|
-
kendoButton
|
|
1880
|
-
class="k-overflow-button"
|
|
1881
|
-
*ngFor="let button of buttonComponents"
|
|
2005
|
+
<ng-container *ngFor="let button of buttonComponents">
|
|
2006
|
+
<div #listItem
|
|
2007
|
+
tabindex="-1"
|
|
2008
|
+
role="menuitem"
|
|
2009
|
+
class="k-item k-menu-item"
|
|
2010
|
+
[class.k-disabled]="disabled || button.disabled"
|
|
1882
2011
|
[ngStyle]="button.style"
|
|
1883
2012
|
[ngClass]="button.className"
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
(click)="button.click.emit($event); onButtonClick($event)"
|
|
1894
|
-
(selectedChange)="selectedChangeHandler($event, button)"
|
|
1895
|
-
>
|
|
1896
|
-
{{ button.overflowOptions.text }}
|
|
1897
|
-
</span>
|
|
1898
|
-
</kendo-buttongroup>
|
|
2013
|
+
(click)="handleClick($event, button)">
|
|
2014
|
+
<span
|
|
2015
|
+
class="k-link k-menu-link"
|
|
2016
|
+
[class.k-selected]="button.selected">
|
|
2017
|
+
<span *ngIf="button.overflowOptions.icon || button.overflowOptions.iconClass" [ngClass]="getIconClasses(button)"></span>
|
|
2018
|
+
<span *ngIf="button.overflowOptions.text" class="k-menu-link-text">{{button.overflowOptions.text}}</span>
|
|
2019
|
+
</span>
|
|
2020
|
+
</div>
|
|
2021
|
+
</ng-container>
|
|
1899
2022
|
</ng-template>
|
|
1900
2023
|
`
|
|
1901
2024
|
}]
|
|
@@ -1913,102 +2036,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1913
2036
|
}], popupTemplate: [{
|
|
1914
2037
|
type: ViewChild,
|
|
1915
2038
|
args: ['popupTemplate', { static: true }]
|
|
1916
|
-
}], buttonComponents: [{
|
|
1917
|
-
type: ContentChildren,
|
|
1918
|
-
args: [forwardRef(() => ToolBarButtonComponent)]
|
|
1919
2039
|
}], toolbarButtonGroup: [{
|
|
1920
2040
|
type: ViewChild,
|
|
1921
2041
|
args: ['toolbarButtonGroup', { static: false }]
|
|
1922
|
-
}],
|
|
1923
|
-
type: ViewChild,
|
|
1924
|
-
args: ['overflowButtonGroup', { static: false }]
|
|
1925
|
-
}] } });
|
|
1926
|
-
|
|
1927
|
-
/**
|
|
1928
|
-
* @hidden
|
|
1929
|
-
*/
|
|
1930
|
-
class ToolBarButtonListComponent {
|
|
1931
|
-
constructor() {
|
|
1932
|
-
this.disabled = false;
|
|
1933
|
-
this.fillMode = 'solid';
|
|
1934
|
-
this.themeColor = 'base';
|
|
1935
|
-
this.itemClick = new EventEmitter();
|
|
1936
|
-
}
|
|
1937
|
-
getText(dataItem) {
|
|
1938
|
-
if (dataItem) {
|
|
1939
|
-
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
1940
|
-
}
|
|
1941
|
-
return undefined;
|
|
1942
|
-
}
|
|
1943
|
-
onClick(item, index) {
|
|
1944
|
-
const dataItem = this.data[index];
|
|
1945
|
-
if (item.click) {
|
|
1946
|
-
item.click(dataItem);
|
|
1947
|
-
}
|
|
1948
|
-
this.itemClick.emit(dataItem);
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
ToolBarButtonListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1952
|
-
ToolBarButtonListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarButtonListComponent, selector: "kendo-toolbar-buttonlist", inputs: { data: "data", textField: "textField", disabled: "disabled", fillMode: "fillMode", themeColor: "themeColor" }, outputs: { itemClick: "itemClick" }, viewQueries: [{ propertyName: "buttons", predicate: ["button"], descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
1953
|
-
<button
|
|
1954
|
-
#button
|
|
1955
|
-
type="button"
|
|
1956
|
-
tabindex="-1"
|
|
1957
|
-
kendoButton
|
|
1958
|
-
[style.padding-left.px]="16"
|
|
1959
|
-
class="k-overflow-button"
|
|
1960
|
-
*ngFor="let item of data; let i = index"
|
|
1961
|
-
[disabled]="disabled || item.disabled"
|
|
1962
|
-
[icon]="item.icon"
|
|
1963
|
-
[iconClass]="item.iconClass"
|
|
1964
|
-
[imageUrl]="item.imageUrl"
|
|
1965
|
-
[fillMode]="fillMode"
|
|
1966
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
1967
|
-
(click)="onClick(item, i)"
|
|
1968
|
-
>
|
|
1969
|
-
{{ getText(item) }}
|
|
1970
|
-
</button>
|
|
1971
|
-
`, isInline: true, components: [{ type: i1$1.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: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1972
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonListComponent, decorators: [{
|
|
1973
|
-
type: Component,
|
|
1974
|
-
args: [{
|
|
1975
|
-
selector: 'kendo-toolbar-buttonlist',
|
|
1976
|
-
template: `
|
|
1977
|
-
<button
|
|
1978
|
-
#button
|
|
1979
|
-
type="button"
|
|
1980
|
-
tabindex="-1"
|
|
1981
|
-
kendoButton
|
|
1982
|
-
[style.padding-left.px]="16"
|
|
1983
|
-
class="k-overflow-button"
|
|
1984
|
-
*ngFor="let item of data; let i = index"
|
|
1985
|
-
[disabled]="disabled || item.disabled"
|
|
1986
|
-
[icon]="item.icon"
|
|
1987
|
-
[iconClass]="item.iconClass"
|
|
1988
|
-
[imageUrl]="item.imageUrl"
|
|
1989
|
-
[fillMode]="fillMode"
|
|
1990
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
1991
|
-
(click)="onClick(item, i)"
|
|
1992
|
-
>
|
|
1993
|
-
{{ getText(item) }}
|
|
1994
|
-
</button>
|
|
1995
|
-
`
|
|
1996
|
-
}]
|
|
1997
|
-
}], propDecorators: { data: [{
|
|
1998
|
-
type: Input
|
|
1999
|
-
}], textField: [{
|
|
2000
|
-
type: Input
|
|
2001
|
-
}], disabled: [{
|
|
2002
|
-
type: Input
|
|
2003
|
-
}], fillMode: [{
|
|
2004
|
-
type: Input
|
|
2005
|
-
}], themeColor: [{
|
|
2006
|
-
type: Input
|
|
2007
|
-
}], itemClick: [{
|
|
2008
|
-
type: Output
|
|
2009
|
-
}], buttons: [{
|
|
2042
|
+
}], overflowListItems: [{
|
|
2010
2043
|
type: ViewChildren,
|
|
2011
|
-
args: ['
|
|
2044
|
+
args: ['listItem']
|
|
2045
|
+
}], buttonComponents: [{
|
|
2046
|
+
type: ContentChildren,
|
|
2047
|
+
args: [forwardRef(() => ToolBarButtonComponent)]
|
|
2012
2048
|
}] } });
|
|
2013
2049
|
|
|
2014
2050
|
/**
|
|
@@ -2164,13 +2200,13 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
2164
2200
|
this.setTextDisplayMode();
|
|
2165
2201
|
}
|
|
2166
2202
|
get overflowButtons() {
|
|
2167
|
-
return [...this.
|
|
2203
|
+
return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
|
|
2168
2204
|
}
|
|
2169
2205
|
/**
|
|
2170
2206
|
* @hidden
|
|
2171
2207
|
*/
|
|
2172
2208
|
onButtonListClick(ev) {
|
|
2173
|
-
this.focusedIndex = this.
|
|
2209
|
+
this.focusedIndex = this.overflowListItems
|
|
2174
2210
|
.toArray()
|
|
2175
2211
|
.findIndex(b => b.nativeElement.contains(ev.target));
|
|
2176
2212
|
}
|
|
@@ -2209,6 +2245,47 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
2209
2245
|
return !isUnmodified(this.focusedIndex);
|
|
2210
2246
|
}
|
|
2211
2247
|
}
|
|
2248
|
+
/**
|
|
2249
|
+
* @hidden
|
|
2250
|
+
*/
|
|
2251
|
+
getIconClasses(item) {
|
|
2252
|
+
if (item) {
|
|
2253
|
+
if (item.icon) {
|
|
2254
|
+
return `k-icon k-i-${item.icon}`;
|
|
2255
|
+
}
|
|
2256
|
+
else if (item.iconClass) {
|
|
2257
|
+
return item.iconClass;
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
else {
|
|
2261
|
+
if (this.overflowOptions.icon) {
|
|
2262
|
+
return `k-icon k-i-${this.overflowOptions.icon}`;
|
|
2263
|
+
}
|
|
2264
|
+
else if (this.overflowOptions.iconClass) {
|
|
2265
|
+
return this.overflowOptions.iconClass;
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
/**
|
|
2270
|
+
* @hidden
|
|
2271
|
+
*/
|
|
2272
|
+
getText(dataItem) {
|
|
2273
|
+
if (dataItem) {
|
|
2274
|
+
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
2275
|
+
}
|
|
2276
|
+
return undefined;
|
|
2277
|
+
}
|
|
2278
|
+
/**
|
|
2279
|
+
* @hidden
|
|
2280
|
+
*/
|
|
2281
|
+
handleClick(ev, item, index) {
|
|
2282
|
+
this.onButtonListClick(ev);
|
|
2283
|
+
const dataItem = this.data[index];
|
|
2284
|
+
if (item.click) {
|
|
2285
|
+
item.click(dataItem);
|
|
2286
|
+
}
|
|
2287
|
+
this.itemClick.emit(dataItem);
|
|
2288
|
+
}
|
|
2212
2289
|
focusButton(index, ev) {
|
|
2213
2290
|
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
|
|
2214
2291
|
this.overflowButtons[index].nativeElement.focus();
|
|
@@ -2220,10 +2297,11 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
2220
2297
|
}
|
|
2221
2298
|
}
|
|
2222
2299
|
ToolBarDropDownButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2223
|
-
ToolBarDropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarDropDownButtonComponent, selector: "kendo-toolbar-dropdownbutton", inputs: { showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", 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: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "dropDownButtonComponent", first: true, predicate: DropDownButtonComponent, descendants: true }, { propertyName: "toolbarDropDownButton", first: true, predicate: ["toolbarDropDownButton"], descendants: true }, { propertyName: "
|
|
2300
|
+
ToolBarDropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarDropDownButtonComponent, selector: "kendo-toolbar-dropdownbutton", inputs: { showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", 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: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "dropDownButtonComponent", first: true, predicate: DropDownButtonComponent, descendants: true }, { propertyName: "toolbarDropDownButton", first: true, predicate: ["toolbarDropDownButton"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarDropDownButton"], usesInheritance: true, ngImport: i0, template: `
|
|
2224
2301
|
<ng-template #toolbarTemplate>
|
|
2225
2302
|
<kendo-dropdownbutton
|
|
2226
2303
|
#toolbarDropDownButton
|
|
2304
|
+
class="k-toolbar-menu-button"
|
|
2227
2305
|
[icon]="toolbarOptions.icon"
|
|
2228
2306
|
[iconClass]="toolbarOptions.iconClass"
|
|
2229
2307
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
@@ -2243,31 +2321,33 @@ ToolBarDropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2243
2321
|
</kendo-dropdownbutton>
|
|
2244
2322
|
</ng-template>
|
|
2245
2323
|
<ng-template #popupTemplate>
|
|
2246
|
-
<
|
|
2247
|
-
type="button"
|
|
2324
|
+
<div
|
|
2248
2325
|
tabindex="-1"
|
|
2249
|
-
|
|
2250
|
-
class="k-
|
|
2251
|
-
[
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
>
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
[disabled]="disabled"
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2326
|
+
role="menuitem"
|
|
2327
|
+
class="k-item k-menu-item k-disabled"
|
|
2328
|
+
[ngClass]="buttonClass">
|
|
2329
|
+
<span
|
|
2330
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}">
|
|
2331
|
+
<span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
|
|
2332
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2333
|
+
</span>
|
|
2334
|
+
</div>
|
|
2335
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2336
|
+
<div #listItem
|
|
2337
|
+
tabindex="-1"
|
|
2338
|
+
role="menuitem"
|
|
2339
|
+
class="k-item k-menu-item"
|
|
2340
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2341
|
+
(click)="handleClick($event, item, i)">
|
|
2342
|
+
<span
|
|
2343
|
+
class="k-link k-menu-link">
|
|
2344
|
+
<span *ngIf="item.icon || item.iconClass" [ngClass]="getIconClasses(item)"></span>
|
|
2345
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2346
|
+
</span>
|
|
2347
|
+
</div>
|
|
2348
|
+
</ng-container>
|
|
2269
2349
|
</ng-template>
|
|
2270
|
-
`, isInline: true, components: [{ type: i1$1.DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }, { type:
|
|
2350
|
+
`, isInline: true, components: [{ type: i1$1.DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
2271
2351
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarDropDownButtonComponent, decorators: [{
|
|
2272
2352
|
type: Component,
|
|
2273
2353
|
args: [{
|
|
@@ -2278,6 +2358,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2278
2358
|
<ng-template #toolbarTemplate>
|
|
2279
2359
|
<kendo-dropdownbutton
|
|
2280
2360
|
#toolbarDropDownButton
|
|
2361
|
+
class="k-toolbar-menu-button"
|
|
2281
2362
|
[icon]="toolbarOptions.icon"
|
|
2282
2363
|
[iconClass]="toolbarOptions.iconClass"
|
|
2283
2364
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
@@ -2297,29 +2378,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2297
2378
|
</kendo-dropdownbutton>
|
|
2298
2379
|
</ng-template>
|
|
2299
2380
|
<ng-template #popupTemplate>
|
|
2300
|
-
<
|
|
2301
|
-
type="button"
|
|
2381
|
+
<div
|
|
2302
2382
|
tabindex="-1"
|
|
2303
|
-
|
|
2304
|
-
class="k-
|
|
2305
|
-
[
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
>
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
[disabled]="disabled"
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2383
|
+
role="menuitem"
|
|
2384
|
+
class="k-item k-menu-item k-disabled"
|
|
2385
|
+
[ngClass]="buttonClass">
|
|
2386
|
+
<span
|
|
2387
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}">
|
|
2388
|
+
<span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
|
|
2389
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2390
|
+
</span>
|
|
2391
|
+
</div>
|
|
2392
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2393
|
+
<div #listItem
|
|
2394
|
+
tabindex="-1"
|
|
2395
|
+
role="menuitem"
|
|
2396
|
+
class="k-item k-menu-item"
|
|
2397
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2398
|
+
(click)="handleClick($event, item, i)">
|
|
2399
|
+
<span
|
|
2400
|
+
class="k-link k-menu-link">
|
|
2401
|
+
<span *ngIf="item.icon || item.iconClass" [ngClass]="getIconClasses(item)"></span>
|
|
2402
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2403
|
+
</span>
|
|
2404
|
+
</div>
|
|
2405
|
+
</ng-container>
|
|
2323
2406
|
</ng-template>
|
|
2324
2407
|
`
|
|
2325
2408
|
}]
|
|
@@ -2371,12 +2454,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2371
2454
|
}], dropDownButtonComponent: [{
|
|
2372
2455
|
type: ViewChild,
|
|
2373
2456
|
args: [DropDownButtonComponent, { static: false }]
|
|
2457
|
+
}], overflowListItems: [{
|
|
2458
|
+
type: ViewChildren,
|
|
2459
|
+
args: ['listItem']
|
|
2374
2460
|
}], toolbarDropDownButton: [{
|
|
2375
2461
|
type: ViewChild,
|
|
2376
2462
|
args: ['toolbarDropDownButton', { static: false }]
|
|
2377
|
-
}], overflowDropDownButtonButtonList: [{
|
|
2378
|
-
type: ViewChild,
|
|
2379
|
-
args: ['overflowDropDownButtonButtonList', { static: false }]
|
|
2380
2463
|
}] } });
|
|
2381
2464
|
|
|
2382
2465
|
/**
|
|
@@ -2541,7 +2624,7 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
2541
2624
|
this.setTextDisplayMode();
|
|
2542
2625
|
}
|
|
2543
2626
|
get overflowButtons() {
|
|
2544
|
-
return [this.
|
|
2627
|
+
return [this.overflowMainButton, ...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
|
|
2545
2628
|
}
|
|
2546
2629
|
/**
|
|
2547
2630
|
* @hidden
|
|
@@ -2591,6 +2674,47 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
2591
2674
|
return !isUnmodified(this.focusedIndex);
|
|
2592
2675
|
}
|
|
2593
2676
|
}
|
|
2677
|
+
/**
|
|
2678
|
+
* @hidden
|
|
2679
|
+
*/
|
|
2680
|
+
getIconClasses(item) {
|
|
2681
|
+
if (item) {
|
|
2682
|
+
if (item.icon) {
|
|
2683
|
+
return `k-icon k-i-${item.icon}`;
|
|
2684
|
+
}
|
|
2685
|
+
else if (item.iconClass) {
|
|
2686
|
+
return item.iconClass;
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2689
|
+
else {
|
|
2690
|
+
if (this.overflowOptions.icon) {
|
|
2691
|
+
return `k-icon k-i-${this.overflowOptions.icon}`;
|
|
2692
|
+
}
|
|
2693
|
+
else if (this.overflowOptions.iconClass) {
|
|
2694
|
+
return this.overflowOptions.iconClass;
|
|
2695
|
+
}
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
/**
|
|
2699
|
+
* @hidden
|
|
2700
|
+
*/
|
|
2701
|
+
getText(dataItem) {
|
|
2702
|
+
if (dataItem) {
|
|
2703
|
+
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
2704
|
+
}
|
|
2705
|
+
return undefined;
|
|
2706
|
+
}
|
|
2707
|
+
/**
|
|
2708
|
+
* @hidden
|
|
2709
|
+
*/
|
|
2710
|
+
handleClick(ev, item, index) {
|
|
2711
|
+
this.onButtonListClick(ev);
|
|
2712
|
+
const dataItem = this.data[index];
|
|
2713
|
+
if (item.click) {
|
|
2714
|
+
item.click(dataItem);
|
|
2715
|
+
}
|
|
2716
|
+
this.itemClick.emit(dataItem);
|
|
2717
|
+
}
|
|
2594
2718
|
focusButton(index, ev) {
|
|
2595
2719
|
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown' || ev.type === 'click') {
|
|
2596
2720
|
this.overflowButtons[index].nativeElement.focus();
|
|
@@ -2602,10 +2726,11 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
2602
2726
|
}
|
|
2603
2727
|
}
|
|
2604
2728
|
ToolBarSplitButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarSplitButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2605
|
-
ToolBarSplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarSplitButtonComponent, selector: "kendo-toolbar-splitbutton", inputs: { showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", popupSettings: "popupSettings", fillMode: "fillMode", themeColor: "themeColor", look: "look", buttonClass: "buttonClass", arrowButtonClass: "arrowButtonClass", arrowButtonIcon: "arrowButtonIcon", textField: "textField", data: "data" }, outputs: { buttonClick: "buttonClick", itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarSplitButtonComponent) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarSplitButton", first: true, predicate: ["toolbarSplitButton"], descendants: true }, { propertyName: "
|
|
2729
|
+
ToolBarSplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarSplitButtonComponent, selector: "kendo-toolbar-splitbutton", inputs: { showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", popupSettings: "popupSettings", fillMode: "fillMode", themeColor: "themeColor", look: "look", buttonClass: "buttonClass", arrowButtonClass: "arrowButtonClass", arrowButtonIcon: "arrowButtonIcon", textField: "textField", data: "data" }, outputs: { buttonClick: "buttonClick", itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarSplitButtonComponent) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarSplitButton", first: true, predicate: ["toolbarSplitButton"], descendants: true }, { propertyName: "overflowMainButton", first: true, predicate: ["overflowMainButton"], descendants: true, read: ElementRef }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarSplitButton"], usesInheritance: true, ngImport: i0, template: `
|
|
2606
2730
|
<ng-template #toolbarTemplate>
|
|
2607
2731
|
<kendo-splitbutton
|
|
2608
2732
|
#toolbarSplitButton
|
|
2733
|
+
class="k-toolbar-split-button"
|
|
2609
2734
|
[data]="data"
|
|
2610
2735
|
[text]="toolbarOptions.text"
|
|
2611
2736
|
[icon]="toolbarOptions.icon"
|
|
@@ -2628,36 +2753,35 @@ ToolBarSplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
2628
2753
|
</kendo-splitbutton>
|
|
2629
2754
|
</ng-template>
|
|
2630
2755
|
<ng-template #popupTemplate>
|
|
2631
|
-
<
|
|
2632
|
-
#overflowSplitButton
|
|
2633
|
-
type="button"
|
|
2756
|
+
<div #overflowMainButton
|
|
2634
2757
|
tabindex="-1"
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
class="k-overflow-button"
|
|
2639
|
-
[disabled]="disabled"
|
|
2640
|
-
[icon]="overflowOptions.icon"
|
|
2641
|
-
[iconClass]="overflowOptions.iconClass"
|
|
2642
|
-
[imageUrl]="overflowOptions.imageUrl"
|
|
2758
|
+
role="menuitem"
|
|
2759
|
+
class="k-item k-menu-item"
|
|
2760
|
+
[class.k-disabled]="disabled"
|
|
2643
2761
|
[ngClass]="buttonClass"
|
|
2644
|
-
(click)="onMainButtonClick($event)"
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2762
|
+
(click)="onMainButtonClick($event)">
|
|
2763
|
+
<span
|
|
2764
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}">
|
|
2765
|
+
<span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
|
|
2766
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2767
|
+
</span>
|
|
2768
|
+
</div>
|
|
2769
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2770
|
+
<div #listItem
|
|
2771
|
+
tabindex="-1"
|
|
2772
|
+
role="menuitem"
|
|
2773
|
+
class="k-item k-menu-item"
|
|
2774
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2775
|
+
(click)="handleClick($event, item, i)">
|
|
2776
|
+
<span
|
|
2777
|
+
class="k-link k-menu-link">
|
|
2778
|
+
<span *ngIf="item.icon || item.iconClass" [ngClass]="getIconClasses(item)"></span>
|
|
2779
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2780
|
+
</span>
|
|
2781
|
+
</div>
|
|
2782
|
+
</ng-container>
|
|
2659
2783
|
</ng-template>
|
|
2660
|
-
`, isInline: true, components: [{ type: i1$1.SplitButtonComponent, selector: "kendo-splitbutton", inputs: ["text", "icon", "svgIcon", "iconClass", "type", "imageUrl", "size", "rounded", "fillMode", "themeColor", "disabled", "popupSettings", "tabIndex", "textField", "data", "buttonClass", "arrowButtonClass", "arrowButtonIcon", "arrowButtonSvgIcon"], outputs: ["buttonClick", "itemClick", "focus", "blur", "open", "close"], exportAs: ["kendoSplitButton"] }, { type:
|
|
2784
|
+
`, isInline: true, components: [{ type: i1$1.SplitButtonComponent, selector: "kendo-splitbutton", inputs: ["text", "icon", "svgIcon", "iconClass", "type", "imageUrl", "size", "rounded", "fillMode", "themeColor", "disabled", "popupSettings", "tabIndex", "textField", "data", "buttonClass", "arrowButtonClass", "arrowButtonIcon", "arrowButtonSvgIcon"], outputs: ["buttonClick", "itemClick", "focus", "blur", "open", "close"], exportAs: ["kendoSplitButton"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
2661
2785
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarSplitButtonComponent, decorators: [{
|
|
2662
2786
|
type: Component,
|
|
2663
2787
|
args: [{
|
|
@@ -2668,6 +2792,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2668
2792
|
<ng-template #toolbarTemplate>
|
|
2669
2793
|
<kendo-splitbutton
|
|
2670
2794
|
#toolbarSplitButton
|
|
2795
|
+
class="k-toolbar-split-button"
|
|
2671
2796
|
[data]="data"
|
|
2672
2797
|
[text]="toolbarOptions.text"
|
|
2673
2798
|
[icon]="toolbarOptions.icon"
|
|
@@ -2690,34 +2815,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2690
2815
|
</kendo-splitbutton>
|
|
2691
2816
|
</ng-template>
|
|
2692
2817
|
<ng-template #popupTemplate>
|
|
2693
|
-
<
|
|
2694
|
-
#overflowSplitButton
|
|
2695
|
-
type="button"
|
|
2818
|
+
<div #overflowMainButton
|
|
2696
2819
|
tabindex="-1"
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
class="k-overflow-button"
|
|
2701
|
-
[disabled]="disabled"
|
|
2702
|
-
[icon]="overflowOptions.icon"
|
|
2703
|
-
[iconClass]="overflowOptions.iconClass"
|
|
2704
|
-
[imageUrl]="overflowOptions.imageUrl"
|
|
2820
|
+
role="menuitem"
|
|
2821
|
+
class="k-item k-menu-item"
|
|
2822
|
+
[class.k-disabled]="disabled"
|
|
2705
2823
|
[ngClass]="buttonClass"
|
|
2706
|
-
(click)="onMainButtonClick($event)"
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2824
|
+
(click)="onMainButtonClick($event)">
|
|
2825
|
+
<span
|
|
2826
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}">
|
|
2827
|
+
<span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
|
|
2828
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2829
|
+
</span>
|
|
2830
|
+
</div>
|
|
2831
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2832
|
+
<div #listItem
|
|
2833
|
+
tabindex="-1"
|
|
2834
|
+
role="menuitem"
|
|
2835
|
+
class="k-item k-menu-item"
|
|
2836
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2837
|
+
(click)="handleClick($event, item, i)">
|
|
2838
|
+
<span
|
|
2839
|
+
class="k-link k-menu-link">
|
|
2840
|
+
<span *ngIf="item.icon || item.iconClass" [ngClass]="getIconClasses(item)"></span>
|
|
2841
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2842
|
+
</span>
|
|
2843
|
+
</div>
|
|
2844
|
+
</ng-container>
|
|
2721
2845
|
</ng-template>
|
|
2722
2846
|
`
|
|
2723
2847
|
}]
|
|
@@ -2770,12 +2894,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2770
2894
|
}], toolbarSplitButton: [{
|
|
2771
2895
|
type: ViewChild,
|
|
2772
2896
|
args: ['toolbarSplitButton', { static: false }]
|
|
2773
|
-
}],
|
|
2774
|
-
type: ViewChild,
|
|
2775
|
-
args: ['overflowSplitButton', { read: ElementRef, static: false }]
|
|
2776
|
-
}], overflowSplitButtonButtonList: [{
|
|
2897
|
+
}], overflowMainButton: [{
|
|
2777
2898
|
type: ViewChild,
|
|
2778
|
-
args: ['
|
|
2899
|
+
args: ['overflowMainButton', { read: ElementRef }]
|
|
2900
|
+
}], overflowListItems: [{
|
|
2901
|
+
type: ViewChildren,
|
|
2902
|
+
args: ['listItem']
|
|
2779
2903
|
}] } });
|
|
2780
2904
|
|
|
2781
2905
|
/**
|
|
@@ -2816,6 +2940,12 @@ ToolBarSeparatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
2816
2940
|
<ng-template #toolbarTemplate>
|
|
2817
2941
|
<div class="k-separator"></div>
|
|
2818
2942
|
</ng-template>
|
|
2943
|
+
|
|
2944
|
+
<ng-template #popupTemplate>
|
|
2945
|
+
<div class="k-item k-menu-item">
|
|
2946
|
+
<div class="k-separator k-separator-horizontal"></div>
|
|
2947
|
+
</div>
|
|
2948
|
+
</ng-template>
|
|
2819
2949
|
`, isInline: true });
|
|
2820
2950
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarSeparatorComponent, decorators: [{
|
|
2821
2951
|
type: Component,
|
|
@@ -2827,6 +2957,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2827
2957
|
<ng-template #toolbarTemplate>
|
|
2828
2958
|
<div class="k-separator"></div>
|
|
2829
2959
|
</ng-template>
|
|
2960
|
+
|
|
2961
|
+
<ng-template #popupTemplate>
|
|
2962
|
+
<div class="k-item k-menu-item">
|
|
2963
|
+
<div class="k-separator k-separator-horizontal"></div>
|
|
2964
|
+
</div>
|
|
2965
|
+
</ng-template>
|
|
2830
2966
|
`
|
|
2831
2967
|
}]
|
|
2832
2968
|
}], ctorParameters: function () { return []; }, propDecorators: { toolbarTemplate: [{
|
|
@@ -2895,6 +3031,93 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2895
3031
|
args: ['popupTemplate', { static: true }]
|
|
2896
3032
|
}] } });
|
|
2897
3033
|
|
|
3034
|
+
/**
|
|
3035
|
+
* @hidden
|
|
3036
|
+
*/
|
|
3037
|
+
class ToolBarButtonListComponent {
|
|
3038
|
+
constructor() {
|
|
3039
|
+
this.disabled = false;
|
|
3040
|
+
this.fillMode = 'solid';
|
|
3041
|
+
this.themeColor = 'base';
|
|
3042
|
+
this.itemClick = new EventEmitter();
|
|
3043
|
+
}
|
|
3044
|
+
getText(dataItem) {
|
|
3045
|
+
if (dataItem) {
|
|
3046
|
+
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
3047
|
+
}
|
|
3048
|
+
return undefined;
|
|
3049
|
+
}
|
|
3050
|
+
onClick(item, index) {
|
|
3051
|
+
const dataItem = this.data[index];
|
|
3052
|
+
if (item.click) {
|
|
3053
|
+
item.click(dataItem);
|
|
3054
|
+
}
|
|
3055
|
+
this.itemClick.emit(dataItem);
|
|
3056
|
+
}
|
|
3057
|
+
}
|
|
3058
|
+
ToolBarButtonListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3059
|
+
ToolBarButtonListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarButtonListComponent, selector: "kendo-toolbar-buttonlist", inputs: { data: "data", textField: "textField", disabled: "disabled", fillMode: "fillMode", themeColor: "themeColor" }, outputs: { itemClick: "itemClick" }, viewQueries: [{ propertyName: "buttons", predicate: ["button"], descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
3060
|
+
<button
|
|
3061
|
+
#button
|
|
3062
|
+
type="button"
|
|
3063
|
+
tabindex="-1"
|
|
3064
|
+
kendoButton
|
|
3065
|
+
[style.padding-left.px]="16"
|
|
3066
|
+
class="k-overflow-button"
|
|
3067
|
+
*ngFor="let item of data; let i = index"
|
|
3068
|
+
[disabled]="disabled || item.disabled"
|
|
3069
|
+
[icon]="item.icon"
|
|
3070
|
+
[iconClass]="item.iconClass"
|
|
3071
|
+
[imageUrl]="item.imageUrl"
|
|
3072
|
+
[fillMode]="fillMode"
|
|
3073
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
3074
|
+
(click)="onClick(item, i)"
|
|
3075
|
+
>
|
|
3076
|
+
{{ getText(item) }}
|
|
3077
|
+
</button>
|
|
3078
|
+
`, isInline: true, components: [{ type: i1$1.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: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
3079
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonListComponent, decorators: [{
|
|
3080
|
+
type: Component,
|
|
3081
|
+
args: [{
|
|
3082
|
+
selector: 'kendo-toolbar-buttonlist',
|
|
3083
|
+
template: `
|
|
3084
|
+
<button
|
|
3085
|
+
#button
|
|
3086
|
+
type="button"
|
|
3087
|
+
tabindex="-1"
|
|
3088
|
+
kendoButton
|
|
3089
|
+
[style.padding-left.px]="16"
|
|
3090
|
+
class="k-overflow-button"
|
|
3091
|
+
*ngFor="let item of data; let i = index"
|
|
3092
|
+
[disabled]="disabled || item.disabled"
|
|
3093
|
+
[icon]="item.icon"
|
|
3094
|
+
[iconClass]="item.iconClass"
|
|
3095
|
+
[imageUrl]="item.imageUrl"
|
|
3096
|
+
[fillMode]="fillMode"
|
|
3097
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
3098
|
+
(click)="onClick(item, i)"
|
|
3099
|
+
>
|
|
3100
|
+
{{ getText(item) }}
|
|
3101
|
+
</button>
|
|
3102
|
+
`
|
|
3103
|
+
}]
|
|
3104
|
+
}], propDecorators: { data: [{
|
|
3105
|
+
type: Input
|
|
3106
|
+
}], textField: [{
|
|
3107
|
+
type: Input
|
|
3108
|
+
}], disabled: [{
|
|
3109
|
+
type: Input
|
|
3110
|
+
}], fillMode: [{
|
|
3111
|
+
type: Input
|
|
3112
|
+
}], themeColor: [{
|
|
3113
|
+
type: Input
|
|
3114
|
+
}], itemClick: [{
|
|
3115
|
+
type: Output
|
|
3116
|
+
}], buttons: [{
|
|
3117
|
+
type: ViewChildren,
|
|
3118
|
+
args: ['button', { read: ElementRef }]
|
|
3119
|
+
}] } });
|
|
3120
|
+
|
|
2898
3121
|
/**
|
|
2899
3122
|
* Custom component messages override default component messages.
|
|
2900
3123
|
*/
|