@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
|
@@ -11,9 +11,9 @@ import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/k
|
|
|
11
11
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
12
|
import { take, filter, takeUntil } from 'rxjs/operators';
|
|
13
13
|
import { Subject, Subscription, merge, fromEvent } from 'rxjs';
|
|
14
|
-
import * as i2 from '@progress/kendo-angular-popup';
|
|
14
|
+
import * as i2$1 from '@progress/kendo-angular-popup';
|
|
15
15
|
import { PopupModule } from '@progress/kendo-angular-popup';
|
|
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();
|
|
@@ -963,12 +1009,16 @@ class ToolBarComponent {
|
|
|
963
1009
|
* @hidden
|
|
964
1010
|
*/
|
|
965
1011
|
onResize() {
|
|
1012
|
+
var _a;
|
|
966
1013
|
if (isDocumentAvailable()) {
|
|
967
1014
|
const containerWidth = innerWidth(this.element.nativeElement) - this.overflowAnchorWidth;
|
|
968
1015
|
this.shrink(containerWidth, this.childrenWidth);
|
|
969
1016
|
this.stretch(containerWidth, this.childrenWidth);
|
|
970
1017
|
this.displayAnchor();
|
|
971
|
-
this.resizeSensor.acceptSize();
|
|
1018
|
+
(_a = this.resizeSensor) === null || _a === void 0 ? void 0 : _a.acceptSize();
|
|
1019
|
+
if (this.popupOpen) {
|
|
1020
|
+
this.toggle();
|
|
1021
|
+
}
|
|
972
1022
|
}
|
|
973
1023
|
}
|
|
974
1024
|
/**
|
|
@@ -977,6 +1027,7 @@ class ToolBarComponent {
|
|
|
977
1027
|
onPopupOpen() {
|
|
978
1028
|
this.zone.runOutsideAngular(() => {
|
|
979
1029
|
this.overflowKeydownListener = this.renderer.listen(this.popupRef.popupElement, 'keydown', (ev) => {
|
|
1030
|
+
const currentTool = this.overflowRenderedTools.toArray().find(tool => closest(ev.target, (el) => el === tool.element.nativeElement));
|
|
980
1031
|
switch (ev.keyCode) {
|
|
981
1032
|
case Keys.ArrowUp:
|
|
982
1033
|
this.zone.run(() => {
|
|
@@ -999,6 +1050,16 @@ class ToolBarComponent {
|
|
|
999
1050
|
this.navigationService.resetNavigation();
|
|
1000
1051
|
});
|
|
1001
1052
|
break;
|
|
1053
|
+
case Keys.Enter:
|
|
1054
|
+
case Keys.Space:
|
|
1055
|
+
this.zone.run(() => {
|
|
1056
|
+
if (currentTool) {
|
|
1057
|
+
ev.preventDefault();
|
|
1058
|
+
ev.target.click();
|
|
1059
|
+
ev.target.focus();
|
|
1060
|
+
}
|
|
1061
|
+
});
|
|
1062
|
+
break;
|
|
1002
1063
|
default:
|
|
1003
1064
|
break;
|
|
1004
1065
|
}
|
|
@@ -1029,11 +1090,11 @@ class ToolBarComponent {
|
|
|
1029
1090
|
}
|
|
1030
1091
|
displayAnchor() {
|
|
1031
1092
|
const visibility = this.allTools.filter(t => t.overflows && t.responsive).length > 0 ? 'visible' : 'hidden';
|
|
1032
|
-
this.renderer.setStyle(this.overflowButton.nativeElement, 'visibility', visibility);
|
|
1093
|
+
this.overflowButton && this.renderer.setStyle(this.overflowButton.nativeElement, 'visibility', visibility);
|
|
1033
1094
|
}
|
|
1034
1095
|
get popupWidth() {
|
|
1035
1096
|
if (!this.popupSettings || !this.popupSettings.width) {
|
|
1036
|
-
return
|
|
1097
|
+
return 'auto';
|
|
1037
1098
|
}
|
|
1038
1099
|
return isNaN(this.popupSettings.width) ? this.popupSettings.width : `${this.popupSettings.width}px`;
|
|
1039
1100
|
}
|
|
@@ -1141,9 +1202,37 @@ class ToolBarComponent {
|
|
|
1141
1202
|
this.popupRef = null;
|
|
1142
1203
|
}
|
|
1143
1204
|
}
|
|
1205
|
+
handleClasses(value, input) {
|
|
1206
|
+
const elem = this.element.nativeElement;
|
|
1207
|
+
const classes = getStylingClasses('toolbar', input, this[input], value);
|
|
1208
|
+
if (classes.toRemove) {
|
|
1209
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
1210
|
+
}
|
|
1211
|
+
if (classes.toAdd) {
|
|
1212
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
normalizePopupClasses(classList) {
|
|
1216
|
+
let classes = ['k-menu-popup', 'k-toolbar-popup'];
|
|
1217
|
+
if (!classList) {
|
|
1218
|
+
return classes;
|
|
1219
|
+
}
|
|
1220
|
+
if (typeof classList === 'string') {
|
|
1221
|
+
classes.push(...classList.split(' '));
|
|
1222
|
+
}
|
|
1223
|
+
else if (Array.isArray(classList)) {
|
|
1224
|
+
classes = [...classes, ...classList];
|
|
1225
|
+
}
|
|
1226
|
+
else {
|
|
1227
|
+
for (const cl in classList) {
|
|
1228
|
+
classes.push(classList[cl]);
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
return classes;
|
|
1232
|
+
}
|
|
1144
1233
|
}
|
|
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-
|
|
1234
|
+
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 });
|
|
1235
|
+
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
1236
|
RefreshService,
|
|
1148
1237
|
NavigationService,
|
|
1149
1238
|
LocalizationService,
|
|
@@ -1179,19 +1268,19 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
1179
1268
|
[style.visibility]="'hidden'"
|
|
1180
1269
|
[style.position]="'relative'"
|
|
1181
1270
|
[style.margin-inline-start]="'auto'"
|
|
1182
|
-
class="k-overflow-
|
|
1271
|
+
class="k-toolbar-overflow-button k-button k-button-flat k-button-flat-base k-icon-button"
|
|
1272
|
+
[ngClass]="overflowClass"
|
|
1183
1273
|
(click)="showPopup()"
|
|
1184
1274
|
>
|
|
1185
|
-
<span class="k-icon k-i-more-vertical"></span>
|
|
1275
|
+
<span class="k-button-icon k-icon k-i-more-vertical"></span>
|
|
1186
1276
|
</button>
|
|
1187
1277
|
<ng-template #popupTemplate>
|
|
1188
|
-
<
|
|
1189
|
-
class="k-
|
|
1278
|
+
<div
|
|
1279
|
+
class="k-menu-group k-menu-group-md"
|
|
1190
1280
|
role="menu"
|
|
1191
1281
|
[id]="popupId"
|
|
1192
1282
|
[attr.aria-labelledby]="overflowBtnId">
|
|
1193
1283
|
<ng-container *ngFor="let tool of allTools; let index = index">
|
|
1194
|
-
<li class="k-item" role="menuitem">
|
|
1195
1284
|
<kendo-toolbar-renderer
|
|
1196
1285
|
#overflowRenderer
|
|
1197
1286
|
(rendererClick)="onRendererClick($event)"
|
|
@@ -1199,13 +1288,12 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
1199
1288
|
[resizable]="overflow"
|
|
1200
1289
|
[tool]="tool"
|
|
1201
1290
|
></kendo-toolbar-renderer>
|
|
1202
|
-
</li>
|
|
1203
1291
|
</ng-container>
|
|
1204
|
-
</
|
|
1292
|
+
</div>
|
|
1205
1293
|
</ng-template>
|
|
1206
1294
|
<ng-container #container></ng-container>
|
|
1207
1295
|
<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:
|
|
1296
|
+
`, 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
1297
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarComponent, decorators: [{
|
|
1210
1298
|
type: Component,
|
|
1211
1299
|
args: [{
|
|
@@ -1248,19 +1336,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1248
1336
|
[style.visibility]="'hidden'"
|
|
1249
1337
|
[style.position]="'relative'"
|
|
1250
1338
|
[style.margin-inline-start]="'auto'"
|
|
1251
|
-
class="k-overflow-
|
|
1339
|
+
class="k-toolbar-overflow-button k-button k-button-flat k-button-flat-base k-icon-button"
|
|
1340
|
+
[ngClass]="overflowClass"
|
|
1252
1341
|
(click)="showPopup()"
|
|
1253
1342
|
>
|
|
1254
|
-
<span class="k-icon k-i-more-vertical"></span>
|
|
1343
|
+
<span class="k-button-icon k-icon k-i-more-vertical"></span>
|
|
1255
1344
|
</button>
|
|
1256
1345
|
<ng-template #popupTemplate>
|
|
1257
|
-
<
|
|
1258
|
-
class="k-
|
|
1346
|
+
<div
|
|
1347
|
+
class="k-menu-group k-menu-group-md"
|
|
1259
1348
|
role="menu"
|
|
1260
1349
|
[id]="popupId"
|
|
1261
1350
|
[attr.aria-labelledby]="overflowBtnId">
|
|
1262
1351
|
<ng-container *ngFor="let tool of allTools; let index = index">
|
|
1263
|
-
<li class="k-item" role="menuitem">
|
|
1264
1352
|
<kendo-toolbar-renderer
|
|
1265
1353
|
#overflowRenderer
|
|
1266
1354
|
(rendererClick)="onRendererClick($event)"
|
|
@@ -1268,15 +1356,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1268
1356
|
[resizable]="overflow"
|
|
1269
1357
|
[tool]="tool"
|
|
1270
1358
|
></kendo-toolbar-renderer>
|
|
1271
|
-
</li>
|
|
1272
1359
|
</ng-container>
|
|
1273
|
-
</
|
|
1360
|
+
</div>
|
|
1274
1361
|
</ng-template>
|
|
1275
1362
|
<ng-container #container></ng-container>
|
|
1276
1363
|
<kendo-resize-sensor *ngIf="overflow" #resizeSensor></kendo-resize-sensor>
|
|
1277
1364
|
`
|
|
1278
1365
|
}]
|
|
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: [{
|
|
1366
|
+
}], 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
1367
|
type: Input
|
|
1281
1368
|
}], resizable: [{
|
|
1282
1369
|
type: Input
|
|
@@ -1284,6 +1371,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1284
1371
|
type: Input
|
|
1285
1372
|
}], tabindex: [{
|
|
1286
1373
|
type: Input
|
|
1374
|
+
}], size: [{
|
|
1375
|
+
type: Input
|
|
1287
1376
|
}], tabIndex: [{
|
|
1288
1377
|
type: Input,
|
|
1289
1378
|
args: ['tabIndex']
|
|
@@ -1312,10 +1401,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1312
1401
|
}], overflowRenderedTools: [{
|
|
1313
1402
|
type: ViewChildren,
|
|
1314
1403
|
args: ['overflowRenderer']
|
|
1315
|
-
}],
|
|
1316
|
-
type: HostBinding,
|
|
1317
|
-
args: ['class.k-widget']
|
|
1318
|
-
}, {
|
|
1404
|
+
}], hostClass: [{
|
|
1319
1405
|
type: HostBinding,
|
|
1320
1406
|
args: ['class.k-toolbar']
|
|
1321
1407
|
}], onFocus: [{
|
|
@@ -1339,8 +1425,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1339
1425
|
* Represents the [Kendo UI ToolBar Button tool for Angular]({% slug controltypes_toolbar %}#toc-buttons).
|
|
1340
1426
|
*/
|
|
1341
1427
|
class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
1342
|
-
constructor() {
|
|
1428
|
+
constructor(element) {
|
|
1343
1429
|
super();
|
|
1430
|
+
this.element = element;
|
|
1344
1431
|
/**
|
|
1345
1432
|
* Specifies where button icon should be displayed
|
|
1346
1433
|
*/
|
|
@@ -1499,6 +1586,40 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
1499
1586
|
this.getButton().tabIndex = -1;
|
|
1500
1587
|
return false;
|
|
1501
1588
|
}
|
|
1589
|
+
/**
|
|
1590
|
+
* @hidden
|
|
1591
|
+
*/
|
|
1592
|
+
get toolbarButtonClass() {
|
|
1593
|
+
return this.toggleable ? 'k-toolbar-toggle-button' : 'k-toolbar-button';
|
|
1594
|
+
}
|
|
1595
|
+
/**
|
|
1596
|
+
* @hidden
|
|
1597
|
+
*/
|
|
1598
|
+
handleClick(ev) {
|
|
1599
|
+
this.click.emit(ev);
|
|
1600
|
+
if (this.toggleable) {
|
|
1601
|
+
this.selected = !this.selected;
|
|
1602
|
+
this.selectedChange.emit(this.selected);
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
/**
|
|
1606
|
+
* @hidden
|
|
1607
|
+
*/
|
|
1608
|
+
getIconClasses() {
|
|
1609
|
+
if (this.overflowOptions.icon) {
|
|
1610
|
+
return `k-icon k-i-${this.overflowOptions.icon}`;
|
|
1611
|
+
}
|
|
1612
|
+
else if (this.overflowOptions.iconClass) {
|
|
1613
|
+
return this.overflowOptions.iconClass;
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
/**
|
|
1617
|
+
* @hidden
|
|
1618
|
+
*/
|
|
1619
|
+
selectedChangeHandler(state) {
|
|
1620
|
+
this.selected = state;
|
|
1621
|
+
this.selectedChange.emit(state);
|
|
1622
|
+
}
|
|
1502
1623
|
getButton() {
|
|
1503
1624
|
return (this.overflows ? this.overflowButtonElement : this.toolbarButtonElement).nativeElement;
|
|
1504
1625
|
}
|
|
@@ -1507,11 +1628,12 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
1507
1628
|
this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
|
|
1508
1629
|
}
|
|
1509
1630
|
}
|
|
1510
|
-
ToolBarButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1631
|
+
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
1632
|
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
1633
|
<ng-template #toolbarTemplate>
|
|
1513
1634
|
<button
|
|
1514
1635
|
#toolbarButton
|
|
1636
|
+
[class]="toolbarButtonClass"
|
|
1515
1637
|
[tabindex]="tabIndex"
|
|
1516
1638
|
type="button"
|
|
1517
1639
|
kendoButton
|
|
@@ -1528,37 +1650,31 @@ ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1528
1650
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
1529
1651
|
(click)="click.emit($event)"
|
|
1530
1652
|
(pointerdown)="pointerdown.emit($event)"
|
|
1531
|
-
(selectedChange)="
|
|
1653
|
+
(selectedChange)="selectedChangeHandler($event)"
|
|
1532
1654
|
(blur)="onBlur()"
|
|
1533
1655
|
>
|
|
1534
1656
|
{{ toolbarOptions.text }}
|
|
1535
1657
|
</button>
|
|
1536
1658
|
</ng-template>
|
|
1537
1659
|
<ng-template #popupTemplate>
|
|
1538
|
-
<
|
|
1660
|
+
<div
|
|
1539
1661
|
#overflowButton
|
|
1540
1662
|
tabindex="-1"
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
class
|
|
1544
|
-
[ngStyle]="style"
|
|
1663
|
+
role="menuitem"
|
|
1664
|
+
class="k-item k-menu-item"
|
|
1665
|
+
[class.k-disabled]="disabled"
|
|
1545
1666
|
[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>
|
|
1667
|
+
[ngStyle]="style"
|
|
1668
|
+
(click)="handleClick($event)">
|
|
1669
|
+
<span
|
|
1670
|
+
class="k-link k-menu-link"
|
|
1671
|
+
[class.k-selected]="selected">
|
|
1672
|
+
<span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
|
|
1673
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
1674
|
+
</span>
|
|
1675
|
+
</div>
|
|
1560
1676
|
</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:
|
|
1677
|
+
`, 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
1678
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonComponent, decorators: [{
|
|
1563
1679
|
type: Component,
|
|
1564
1680
|
args: [{
|
|
@@ -1569,6 +1685,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1569
1685
|
<ng-template #toolbarTemplate>
|
|
1570
1686
|
<button
|
|
1571
1687
|
#toolbarButton
|
|
1688
|
+
[class]="toolbarButtonClass"
|
|
1572
1689
|
[tabindex]="tabIndex"
|
|
1573
1690
|
type="button"
|
|
1574
1691
|
kendoButton
|
|
@@ -1585,39 +1702,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1585
1702
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
1586
1703
|
(click)="click.emit($event)"
|
|
1587
1704
|
(pointerdown)="pointerdown.emit($event)"
|
|
1588
|
-
(selectedChange)="
|
|
1705
|
+
(selectedChange)="selectedChangeHandler($event)"
|
|
1589
1706
|
(blur)="onBlur()"
|
|
1590
1707
|
>
|
|
1591
1708
|
{{ toolbarOptions.text }}
|
|
1592
1709
|
</button>
|
|
1593
1710
|
</ng-template>
|
|
1594
1711
|
<ng-template #popupTemplate>
|
|
1595
|
-
<
|
|
1712
|
+
<div
|
|
1596
1713
|
#overflowButton
|
|
1597
1714
|
tabindex="-1"
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
class
|
|
1601
|
-
[ngStyle]="style"
|
|
1715
|
+
role="menuitem"
|
|
1716
|
+
class="k-item k-menu-item"
|
|
1717
|
+
[class.k-disabled]="disabled"
|
|
1602
1718
|
[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>
|
|
1719
|
+
[ngStyle]="style"
|
|
1720
|
+
(click)="handleClick($event)">
|
|
1721
|
+
<span
|
|
1722
|
+
class="k-link k-menu-link"
|
|
1723
|
+
[class.k-selected]="selected">
|
|
1724
|
+
<span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
|
|
1725
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
1726
|
+
</span>
|
|
1727
|
+
</div>
|
|
1617
1728
|
</ng-template>
|
|
1618
1729
|
`
|
|
1619
1730
|
}]
|
|
1620
|
-
}], ctorParameters: function () { return []; }, propDecorators: { showText: [{
|
|
1731
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { showText: [{
|
|
1621
1732
|
type: Input
|
|
1622
1733
|
}], showIcon: [{
|
|
1623
1734
|
type: Input
|
|
@@ -1693,9 +1804,14 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1693
1804
|
}
|
|
1694
1805
|
}
|
|
1695
1806
|
get buttonElements() {
|
|
1696
|
-
|
|
1697
|
-
.
|
|
1698
|
-
|
|
1807
|
+
if (this.overflows) {
|
|
1808
|
+
return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))].map(el => el.nativeElement);
|
|
1809
|
+
}
|
|
1810
|
+
else {
|
|
1811
|
+
return this.toolbarButtonGroup
|
|
1812
|
+
.buttons.filter(b => !b.isDisabled)
|
|
1813
|
+
.map(b => b.element);
|
|
1814
|
+
}
|
|
1699
1815
|
}
|
|
1700
1816
|
/**
|
|
1701
1817
|
* @hidden
|
|
@@ -1717,6 +1833,20 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1717
1833
|
button.selected = state;
|
|
1718
1834
|
button.selectedChange.emit(state);
|
|
1719
1835
|
}
|
|
1836
|
+
/**
|
|
1837
|
+
* @hidden
|
|
1838
|
+
*/
|
|
1839
|
+
overflowSelectedChangeHandler(button) {
|
|
1840
|
+
if (this.selection === 'multiple') {
|
|
1841
|
+
button.selected = !button.selected;
|
|
1842
|
+
}
|
|
1843
|
+
else {
|
|
1844
|
+
const filteredButtons = this.buttonComponents.filter(b => b !== button);
|
|
1845
|
+
filteredButtons.forEach(b => b.selected = false);
|
|
1846
|
+
button.selected = !button.selected;
|
|
1847
|
+
}
|
|
1848
|
+
button.selectedChange.emit(button.selected);
|
|
1849
|
+
}
|
|
1720
1850
|
/**
|
|
1721
1851
|
* @hidden
|
|
1722
1852
|
*/
|
|
@@ -1751,8 +1881,24 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1751
1881
|
this.focusButton(this.focusedIndex, ev);
|
|
1752
1882
|
return !isUnmodified(this.focusedIndex);
|
|
1753
1883
|
}
|
|
1754
|
-
|
|
1755
|
-
|
|
1884
|
+
/**
|
|
1885
|
+
* @hidden
|
|
1886
|
+
*/
|
|
1887
|
+
handleClick(ev, button) {
|
|
1888
|
+
button.click.emit(ev);
|
|
1889
|
+
this.onButtonClick(ev);
|
|
1890
|
+
this.overflowSelectedChangeHandler(button);
|
|
1891
|
+
}
|
|
1892
|
+
/**
|
|
1893
|
+
* @hidden
|
|
1894
|
+
*/
|
|
1895
|
+
getIconClasses(button) {
|
|
1896
|
+
if (button.overflowOptions.icon) {
|
|
1897
|
+
return `k-icon k-i-${button.overflowOptions.icon}`;
|
|
1898
|
+
}
|
|
1899
|
+
else if (button.overflowOptions.iconClass) {
|
|
1900
|
+
return button.overflowOptions.iconClass;
|
|
1901
|
+
}
|
|
1756
1902
|
}
|
|
1757
1903
|
focusButton(index, ev) {
|
|
1758
1904
|
var _a;
|
|
@@ -1763,9 +1909,10 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1763
1909
|
}
|
|
1764
1910
|
}
|
|
1765
1911
|
ToolBarButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1766
|
-
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: "
|
|
1912
|
+
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: `
|
|
1767
1913
|
<ng-template #toolbarTemplate>
|
|
1768
1914
|
<kendo-buttongroup
|
|
1915
|
+
class="k-toolbar-button-group"
|
|
1769
1916
|
#toolbarButtonGroup
|
|
1770
1917
|
[tabIndex]="-1"
|
|
1771
1918
|
[selection]="selection"
|
|
@@ -1797,37 +1944,25 @@ ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
1797
1944
|
</kendo-buttongroup>
|
|
1798
1945
|
</ng-template>
|
|
1799
1946
|
<ng-template #popupTemplate>
|
|
1800
|
-
<
|
|
1801
|
-
#
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
[width]="width"
|
|
1807
|
-
>
|
|
1808
|
-
<span
|
|
1809
|
-
kendoButton
|
|
1810
|
-
class="k-overflow-button"
|
|
1811
|
-
*ngFor="let button of buttonComponents"
|
|
1947
|
+
<ng-container *ngFor="let button of buttonComponents">
|
|
1948
|
+
<div #listItem
|
|
1949
|
+
tabindex="-1"
|
|
1950
|
+
role="menuitem"
|
|
1951
|
+
class="k-item k-menu-item"
|
|
1952
|
+
[class.k-disabled]="disabled || button.disabled"
|
|
1812
1953
|
[ngStyle]="button.style"
|
|
1813
1954
|
[ngClass]="button.className"
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
(click)="button.click.emit($event); onButtonClick($event)"
|
|
1824
|
-
(selectedChange)="selectedChangeHandler($event, button)"
|
|
1825
|
-
>
|
|
1826
|
-
{{ button.overflowOptions.text }}
|
|
1827
|
-
</span>
|
|
1828
|
-
</kendo-buttongroup>
|
|
1955
|
+
(click)="handleClick($event, button)">
|
|
1956
|
+
<span
|
|
1957
|
+
class="k-link k-menu-link"
|
|
1958
|
+
[class.k-selected]="button.selected">
|
|
1959
|
+
<span *ngIf="button.overflowOptions.icon || button.overflowOptions.iconClass" [ngClass]="getIconClasses(button)"></span>
|
|
1960
|
+
<span *ngIf="button.overflowOptions.text" class="k-menu-link-text">{{button.overflowOptions.text}}</span>
|
|
1961
|
+
</span>
|
|
1962
|
+
</div>
|
|
1963
|
+
</ng-container>
|
|
1829
1964
|
</ng-template>
|
|
1830
|
-
`, 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:
|
|
1965
|
+
`, 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"] }] });
|
|
1831
1966
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonGroupComponent, decorators: [{
|
|
1832
1967
|
type: Component,
|
|
1833
1968
|
args: [{
|
|
@@ -1837,6 +1972,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1837
1972
|
template: `
|
|
1838
1973
|
<ng-template #toolbarTemplate>
|
|
1839
1974
|
<kendo-buttongroup
|
|
1975
|
+
class="k-toolbar-button-group"
|
|
1840
1976
|
#toolbarButtonGroup
|
|
1841
1977
|
[tabIndex]="-1"
|
|
1842
1978
|
[selection]="selection"
|
|
@@ -1868,35 +2004,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1868
2004
|
</kendo-buttongroup>
|
|
1869
2005
|
</ng-template>
|
|
1870
2006
|
<ng-template #popupTemplate>
|
|
1871
|
-
<
|
|
1872
|
-
#
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
[width]="width"
|
|
1878
|
-
>
|
|
1879
|
-
<span
|
|
1880
|
-
kendoButton
|
|
1881
|
-
class="k-overflow-button"
|
|
1882
|
-
*ngFor="let button of buttonComponents"
|
|
2007
|
+
<ng-container *ngFor="let button of buttonComponents">
|
|
2008
|
+
<div #listItem
|
|
2009
|
+
tabindex="-1"
|
|
2010
|
+
role="menuitem"
|
|
2011
|
+
class="k-item k-menu-item"
|
|
2012
|
+
[class.k-disabled]="disabled || button.disabled"
|
|
1883
2013
|
[ngStyle]="button.style"
|
|
1884
2014
|
[ngClass]="button.className"
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
(click)="button.click.emit($event); onButtonClick($event)"
|
|
1895
|
-
(selectedChange)="selectedChangeHandler($event, button)"
|
|
1896
|
-
>
|
|
1897
|
-
{{ button.overflowOptions.text }}
|
|
1898
|
-
</span>
|
|
1899
|
-
</kendo-buttongroup>
|
|
2015
|
+
(click)="handleClick($event, button)">
|
|
2016
|
+
<span
|
|
2017
|
+
class="k-link k-menu-link"
|
|
2018
|
+
[class.k-selected]="button.selected">
|
|
2019
|
+
<span *ngIf="button.overflowOptions.icon || button.overflowOptions.iconClass" [ngClass]="getIconClasses(button)"></span>
|
|
2020
|
+
<span *ngIf="button.overflowOptions.text" class="k-menu-link-text">{{button.overflowOptions.text}}</span>
|
|
2021
|
+
</span>
|
|
2022
|
+
</div>
|
|
2023
|
+
</ng-container>
|
|
1900
2024
|
</ng-template>
|
|
1901
2025
|
`
|
|
1902
2026
|
}]
|
|
@@ -1914,102 +2038,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1914
2038
|
}], popupTemplate: [{
|
|
1915
2039
|
type: ViewChild,
|
|
1916
2040
|
args: ['popupTemplate', { static: true }]
|
|
1917
|
-
}], buttonComponents: [{
|
|
1918
|
-
type: ContentChildren,
|
|
1919
|
-
args: [forwardRef(() => ToolBarButtonComponent)]
|
|
1920
2041
|
}], toolbarButtonGroup: [{
|
|
1921
2042
|
type: ViewChild,
|
|
1922
2043
|
args: ['toolbarButtonGroup', { static: false }]
|
|
1923
|
-
}],
|
|
1924
|
-
type: ViewChild,
|
|
1925
|
-
args: ['overflowButtonGroup', { static: false }]
|
|
1926
|
-
}] } });
|
|
1927
|
-
|
|
1928
|
-
/**
|
|
1929
|
-
* @hidden
|
|
1930
|
-
*/
|
|
1931
|
-
class ToolBarButtonListComponent {
|
|
1932
|
-
constructor() {
|
|
1933
|
-
this.disabled = false;
|
|
1934
|
-
this.fillMode = 'solid';
|
|
1935
|
-
this.themeColor = 'base';
|
|
1936
|
-
this.itemClick = new EventEmitter();
|
|
1937
|
-
}
|
|
1938
|
-
getText(dataItem) {
|
|
1939
|
-
if (dataItem) {
|
|
1940
|
-
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
1941
|
-
}
|
|
1942
|
-
return undefined;
|
|
1943
|
-
}
|
|
1944
|
-
onClick(item, index) {
|
|
1945
|
-
const dataItem = this.data[index];
|
|
1946
|
-
if (item.click) {
|
|
1947
|
-
item.click(dataItem);
|
|
1948
|
-
}
|
|
1949
|
-
this.itemClick.emit(dataItem);
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1952
|
-
ToolBarButtonListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1953
|
-
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: `
|
|
1954
|
-
<button
|
|
1955
|
-
#button
|
|
1956
|
-
type="button"
|
|
1957
|
-
tabindex="-1"
|
|
1958
|
-
kendoButton
|
|
1959
|
-
[style.padding-left.px]="16"
|
|
1960
|
-
class="k-overflow-button"
|
|
1961
|
-
*ngFor="let item of data; let i = index"
|
|
1962
|
-
[disabled]="disabled || item.disabled"
|
|
1963
|
-
[icon]="item.icon"
|
|
1964
|
-
[iconClass]="item.iconClass"
|
|
1965
|
-
[imageUrl]="item.imageUrl"
|
|
1966
|
-
[fillMode]="fillMode"
|
|
1967
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
1968
|
-
(click)="onClick(item, i)"
|
|
1969
|
-
>
|
|
1970
|
-
{{ getText(item) }}
|
|
1971
|
-
</button>
|
|
1972
|
-
`, 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"] }] });
|
|
1973
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonListComponent, decorators: [{
|
|
1974
|
-
type: Component,
|
|
1975
|
-
args: [{
|
|
1976
|
-
selector: 'kendo-toolbar-buttonlist',
|
|
1977
|
-
template: `
|
|
1978
|
-
<button
|
|
1979
|
-
#button
|
|
1980
|
-
type="button"
|
|
1981
|
-
tabindex="-1"
|
|
1982
|
-
kendoButton
|
|
1983
|
-
[style.padding-left.px]="16"
|
|
1984
|
-
class="k-overflow-button"
|
|
1985
|
-
*ngFor="let item of data; let i = index"
|
|
1986
|
-
[disabled]="disabled || item.disabled"
|
|
1987
|
-
[icon]="item.icon"
|
|
1988
|
-
[iconClass]="item.iconClass"
|
|
1989
|
-
[imageUrl]="item.imageUrl"
|
|
1990
|
-
[fillMode]="fillMode"
|
|
1991
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
1992
|
-
(click)="onClick(item, i)"
|
|
1993
|
-
>
|
|
1994
|
-
{{ getText(item) }}
|
|
1995
|
-
</button>
|
|
1996
|
-
`
|
|
1997
|
-
}]
|
|
1998
|
-
}], propDecorators: { data: [{
|
|
1999
|
-
type: Input
|
|
2000
|
-
}], textField: [{
|
|
2001
|
-
type: Input
|
|
2002
|
-
}], disabled: [{
|
|
2003
|
-
type: Input
|
|
2004
|
-
}], fillMode: [{
|
|
2005
|
-
type: Input
|
|
2006
|
-
}], themeColor: [{
|
|
2007
|
-
type: Input
|
|
2008
|
-
}], itemClick: [{
|
|
2009
|
-
type: Output
|
|
2010
|
-
}], buttons: [{
|
|
2044
|
+
}], overflowListItems: [{
|
|
2011
2045
|
type: ViewChildren,
|
|
2012
|
-
args: ['
|
|
2046
|
+
args: ['listItem']
|
|
2047
|
+
}], buttonComponents: [{
|
|
2048
|
+
type: ContentChildren,
|
|
2049
|
+
args: [forwardRef(() => ToolBarButtonComponent)]
|
|
2013
2050
|
}] } });
|
|
2014
2051
|
|
|
2015
2052
|
/**
|
|
@@ -2165,13 +2202,13 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
2165
2202
|
this.setTextDisplayMode();
|
|
2166
2203
|
}
|
|
2167
2204
|
get overflowButtons() {
|
|
2168
|
-
return [...this.
|
|
2205
|
+
return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
|
|
2169
2206
|
}
|
|
2170
2207
|
/**
|
|
2171
2208
|
* @hidden
|
|
2172
2209
|
*/
|
|
2173
2210
|
onButtonListClick(ev) {
|
|
2174
|
-
this.focusedIndex = this.
|
|
2211
|
+
this.focusedIndex = this.overflowListItems
|
|
2175
2212
|
.toArray()
|
|
2176
2213
|
.findIndex(b => b.nativeElement.contains(ev.target));
|
|
2177
2214
|
}
|
|
@@ -2210,6 +2247,47 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
2210
2247
|
return !isUnmodified(this.focusedIndex);
|
|
2211
2248
|
}
|
|
2212
2249
|
}
|
|
2250
|
+
/**
|
|
2251
|
+
* @hidden
|
|
2252
|
+
*/
|
|
2253
|
+
getIconClasses(item) {
|
|
2254
|
+
if (item) {
|
|
2255
|
+
if (item.icon) {
|
|
2256
|
+
return `k-icon k-i-${item.icon}`;
|
|
2257
|
+
}
|
|
2258
|
+
else if (item.iconClass) {
|
|
2259
|
+
return item.iconClass;
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
else {
|
|
2263
|
+
if (this.overflowOptions.icon) {
|
|
2264
|
+
return `k-icon k-i-${this.overflowOptions.icon}`;
|
|
2265
|
+
}
|
|
2266
|
+
else if (this.overflowOptions.iconClass) {
|
|
2267
|
+
return this.overflowOptions.iconClass;
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
/**
|
|
2272
|
+
* @hidden
|
|
2273
|
+
*/
|
|
2274
|
+
getText(dataItem) {
|
|
2275
|
+
if (dataItem) {
|
|
2276
|
+
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
2277
|
+
}
|
|
2278
|
+
return undefined;
|
|
2279
|
+
}
|
|
2280
|
+
/**
|
|
2281
|
+
* @hidden
|
|
2282
|
+
*/
|
|
2283
|
+
handleClick(ev, item, index) {
|
|
2284
|
+
this.onButtonListClick(ev);
|
|
2285
|
+
const dataItem = this.data[index];
|
|
2286
|
+
if (item.click) {
|
|
2287
|
+
item.click(dataItem);
|
|
2288
|
+
}
|
|
2289
|
+
this.itemClick.emit(dataItem);
|
|
2290
|
+
}
|
|
2213
2291
|
focusButton(index, ev) {
|
|
2214
2292
|
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
|
|
2215
2293
|
this.overflowButtons[index].nativeElement.focus();
|
|
@@ -2221,10 +2299,11 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
2221
2299
|
}
|
|
2222
2300
|
}
|
|
2223
2301
|
ToolBarDropDownButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2224
|
-
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: "
|
|
2302
|
+
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: `
|
|
2225
2303
|
<ng-template #toolbarTemplate>
|
|
2226
2304
|
<kendo-dropdownbutton
|
|
2227
2305
|
#toolbarDropDownButton
|
|
2306
|
+
class="k-toolbar-menu-button"
|
|
2228
2307
|
[icon]="toolbarOptions.icon"
|
|
2229
2308
|
[iconClass]="toolbarOptions.iconClass"
|
|
2230
2309
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
@@ -2244,31 +2323,33 @@ ToolBarDropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2244
2323
|
</kendo-dropdownbutton>
|
|
2245
2324
|
</ng-template>
|
|
2246
2325
|
<ng-template #popupTemplate>
|
|
2247
|
-
<
|
|
2248
|
-
type="button"
|
|
2326
|
+
<div
|
|
2249
2327
|
tabindex="-1"
|
|
2250
|
-
|
|
2251
|
-
class="k-
|
|
2252
|
-
[
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
>
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
[disabled]="disabled"
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2328
|
+
role="menuitem"
|
|
2329
|
+
class="k-item k-menu-item k-disabled"
|
|
2330
|
+
[ngClass]="buttonClass">
|
|
2331
|
+
<span
|
|
2332
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}">
|
|
2333
|
+
<span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
|
|
2334
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2335
|
+
</span>
|
|
2336
|
+
</div>
|
|
2337
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2338
|
+
<div #listItem
|
|
2339
|
+
tabindex="-1"
|
|
2340
|
+
role="menuitem"
|
|
2341
|
+
class="k-item k-menu-item"
|
|
2342
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2343
|
+
(click)="handleClick($event, item, i)">
|
|
2344
|
+
<span
|
|
2345
|
+
class="k-link k-menu-link">
|
|
2346
|
+
<span *ngIf="item.icon || item.iconClass" [ngClass]="getIconClasses(item)"></span>
|
|
2347
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2348
|
+
</span>
|
|
2349
|
+
</div>
|
|
2350
|
+
</ng-container>
|
|
2270
2351
|
</ng-template>
|
|
2271
|
-
`, 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:
|
|
2352
|
+
`, 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"] }] });
|
|
2272
2353
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarDropDownButtonComponent, decorators: [{
|
|
2273
2354
|
type: Component,
|
|
2274
2355
|
args: [{
|
|
@@ -2279,6 +2360,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2279
2360
|
<ng-template #toolbarTemplate>
|
|
2280
2361
|
<kendo-dropdownbutton
|
|
2281
2362
|
#toolbarDropDownButton
|
|
2363
|
+
class="k-toolbar-menu-button"
|
|
2282
2364
|
[icon]="toolbarOptions.icon"
|
|
2283
2365
|
[iconClass]="toolbarOptions.iconClass"
|
|
2284
2366
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
@@ -2298,29 +2380,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2298
2380
|
</kendo-dropdownbutton>
|
|
2299
2381
|
</ng-template>
|
|
2300
2382
|
<ng-template #popupTemplate>
|
|
2301
|
-
<
|
|
2302
|
-
type="button"
|
|
2383
|
+
<div
|
|
2303
2384
|
tabindex="-1"
|
|
2304
|
-
|
|
2305
|
-
class="k-
|
|
2306
|
-
[
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
>
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
[disabled]="disabled"
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2385
|
+
role="menuitem"
|
|
2386
|
+
class="k-item k-menu-item k-disabled"
|
|
2387
|
+
[ngClass]="buttonClass">
|
|
2388
|
+
<span
|
|
2389
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}">
|
|
2390
|
+
<span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
|
|
2391
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2392
|
+
</span>
|
|
2393
|
+
</div>
|
|
2394
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2395
|
+
<div #listItem
|
|
2396
|
+
tabindex="-1"
|
|
2397
|
+
role="menuitem"
|
|
2398
|
+
class="k-item k-menu-item"
|
|
2399
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2400
|
+
(click)="handleClick($event, item, i)">
|
|
2401
|
+
<span
|
|
2402
|
+
class="k-link k-menu-link">
|
|
2403
|
+
<span *ngIf="item.icon || item.iconClass" [ngClass]="getIconClasses(item)"></span>
|
|
2404
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2405
|
+
</span>
|
|
2406
|
+
</div>
|
|
2407
|
+
</ng-container>
|
|
2324
2408
|
</ng-template>
|
|
2325
2409
|
`
|
|
2326
2410
|
}]
|
|
@@ -2372,12 +2456,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2372
2456
|
}], dropDownButtonComponent: [{
|
|
2373
2457
|
type: ViewChild,
|
|
2374
2458
|
args: [DropDownButtonComponent, { static: false }]
|
|
2459
|
+
}], overflowListItems: [{
|
|
2460
|
+
type: ViewChildren,
|
|
2461
|
+
args: ['listItem']
|
|
2375
2462
|
}], toolbarDropDownButton: [{
|
|
2376
2463
|
type: ViewChild,
|
|
2377
2464
|
args: ['toolbarDropDownButton', { static: false }]
|
|
2378
|
-
}], overflowDropDownButtonButtonList: [{
|
|
2379
|
-
type: ViewChild,
|
|
2380
|
-
args: ['overflowDropDownButtonButtonList', { static: false }]
|
|
2381
2465
|
}] } });
|
|
2382
2466
|
|
|
2383
2467
|
/**
|
|
@@ -2542,7 +2626,7 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
2542
2626
|
this.setTextDisplayMode();
|
|
2543
2627
|
}
|
|
2544
2628
|
get overflowButtons() {
|
|
2545
|
-
return [this.
|
|
2629
|
+
return [this.overflowMainButton, ...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
|
|
2546
2630
|
}
|
|
2547
2631
|
/**
|
|
2548
2632
|
* @hidden
|
|
@@ -2592,6 +2676,47 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
2592
2676
|
return !isUnmodified(this.focusedIndex);
|
|
2593
2677
|
}
|
|
2594
2678
|
}
|
|
2679
|
+
/**
|
|
2680
|
+
* @hidden
|
|
2681
|
+
*/
|
|
2682
|
+
getIconClasses(item) {
|
|
2683
|
+
if (item) {
|
|
2684
|
+
if (item.icon) {
|
|
2685
|
+
return `k-icon k-i-${item.icon}`;
|
|
2686
|
+
}
|
|
2687
|
+
else if (item.iconClass) {
|
|
2688
|
+
return item.iconClass;
|
|
2689
|
+
}
|
|
2690
|
+
}
|
|
2691
|
+
else {
|
|
2692
|
+
if (this.overflowOptions.icon) {
|
|
2693
|
+
return `k-icon k-i-${this.overflowOptions.icon}`;
|
|
2694
|
+
}
|
|
2695
|
+
else if (this.overflowOptions.iconClass) {
|
|
2696
|
+
return this.overflowOptions.iconClass;
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2699
|
+
}
|
|
2700
|
+
/**
|
|
2701
|
+
* @hidden
|
|
2702
|
+
*/
|
|
2703
|
+
getText(dataItem) {
|
|
2704
|
+
if (dataItem) {
|
|
2705
|
+
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
2706
|
+
}
|
|
2707
|
+
return undefined;
|
|
2708
|
+
}
|
|
2709
|
+
/**
|
|
2710
|
+
* @hidden
|
|
2711
|
+
*/
|
|
2712
|
+
handleClick(ev, item, index) {
|
|
2713
|
+
this.onButtonListClick(ev);
|
|
2714
|
+
const dataItem = this.data[index];
|
|
2715
|
+
if (item.click) {
|
|
2716
|
+
item.click(dataItem);
|
|
2717
|
+
}
|
|
2718
|
+
this.itemClick.emit(dataItem);
|
|
2719
|
+
}
|
|
2595
2720
|
focusButton(index, ev) {
|
|
2596
2721
|
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown' || ev.type === 'click') {
|
|
2597
2722
|
this.overflowButtons[index].nativeElement.focus();
|
|
@@ -2603,10 +2728,11 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
2603
2728
|
}
|
|
2604
2729
|
}
|
|
2605
2730
|
ToolBarSplitButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarSplitButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2606
|
-
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: "
|
|
2731
|
+
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: `
|
|
2607
2732
|
<ng-template #toolbarTemplate>
|
|
2608
2733
|
<kendo-splitbutton
|
|
2609
2734
|
#toolbarSplitButton
|
|
2735
|
+
class="k-toolbar-split-button"
|
|
2610
2736
|
[data]="data"
|
|
2611
2737
|
[text]="toolbarOptions.text"
|
|
2612
2738
|
[icon]="toolbarOptions.icon"
|
|
@@ -2629,36 +2755,35 @@ ToolBarSplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
2629
2755
|
</kendo-splitbutton>
|
|
2630
2756
|
</ng-template>
|
|
2631
2757
|
<ng-template #popupTemplate>
|
|
2632
|
-
<
|
|
2633
|
-
#overflowSplitButton
|
|
2634
|
-
type="button"
|
|
2758
|
+
<div #overflowMainButton
|
|
2635
2759
|
tabindex="-1"
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
class="k-overflow-button"
|
|
2640
|
-
[disabled]="disabled"
|
|
2641
|
-
[icon]="overflowOptions.icon"
|
|
2642
|
-
[iconClass]="overflowOptions.iconClass"
|
|
2643
|
-
[imageUrl]="overflowOptions.imageUrl"
|
|
2760
|
+
role="menuitem"
|
|
2761
|
+
class="k-item k-menu-item"
|
|
2762
|
+
[class.k-disabled]="disabled"
|
|
2644
2763
|
[ngClass]="buttonClass"
|
|
2645
|
-
(click)="onMainButtonClick($event)"
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2764
|
+
(click)="onMainButtonClick($event)">
|
|
2765
|
+
<span
|
|
2766
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}">
|
|
2767
|
+
<span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
|
|
2768
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2769
|
+
</span>
|
|
2770
|
+
</div>
|
|
2771
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2772
|
+
<div #listItem
|
|
2773
|
+
tabindex="-1"
|
|
2774
|
+
role="menuitem"
|
|
2775
|
+
class="k-item k-menu-item"
|
|
2776
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2777
|
+
(click)="handleClick($event, item, i)">
|
|
2778
|
+
<span
|
|
2779
|
+
class="k-link k-menu-link">
|
|
2780
|
+
<span *ngIf="item.icon || item.iconClass" [ngClass]="getIconClasses(item)"></span>
|
|
2781
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2782
|
+
</span>
|
|
2783
|
+
</div>
|
|
2784
|
+
</ng-container>
|
|
2660
2785
|
</ng-template>
|
|
2661
|
-
`, 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:
|
|
2786
|
+
`, 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"] }] });
|
|
2662
2787
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarSplitButtonComponent, decorators: [{
|
|
2663
2788
|
type: Component,
|
|
2664
2789
|
args: [{
|
|
@@ -2669,6 +2794,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2669
2794
|
<ng-template #toolbarTemplate>
|
|
2670
2795
|
<kendo-splitbutton
|
|
2671
2796
|
#toolbarSplitButton
|
|
2797
|
+
class="k-toolbar-split-button"
|
|
2672
2798
|
[data]="data"
|
|
2673
2799
|
[text]="toolbarOptions.text"
|
|
2674
2800
|
[icon]="toolbarOptions.icon"
|
|
@@ -2691,34 +2817,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2691
2817
|
</kendo-splitbutton>
|
|
2692
2818
|
</ng-template>
|
|
2693
2819
|
<ng-template #popupTemplate>
|
|
2694
|
-
<
|
|
2695
|
-
#overflowSplitButton
|
|
2696
|
-
type="button"
|
|
2820
|
+
<div #overflowMainButton
|
|
2697
2821
|
tabindex="-1"
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
class="k-overflow-button"
|
|
2702
|
-
[disabled]="disabled"
|
|
2703
|
-
[icon]="overflowOptions.icon"
|
|
2704
|
-
[iconClass]="overflowOptions.iconClass"
|
|
2705
|
-
[imageUrl]="overflowOptions.imageUrl"
|
|
2822
|
+
role="menuitem"
|
|
2823
|
+
class="k-item k-menu-item"
|
|
2824
|
+
[class.k-disabled]="disabled"
|
|
2706
2825
|
[ngClass]="buttonClass"
|
|
2707
|
-
(click)="onMainButtonClick($event)"
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2826
|
+
(click)="onMainButtonClick($event)">
|
|
2827
|
+
<span
|
|
2828
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}">
|
|
2829
|
+
<span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
|
|
2830
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2831
|
+
</span>
|
|
2832
|
+
</div>
|
|
2833
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2834
|
+
<div #listItem
|
|
2835
|
+
tabindex="-1"
|
|
2836
|
+
role="menuitem"
|
|
2837
|
+
class="k-item k-menu-item"
|
|
2838
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2839
|
+
(click)="handleClick($event, item, i)">
|
|
2840
|
+
<span
|
|
2841
|
+
class="k-link k-menu-link">
|
|
2842
|
+
<span *ngIf="item.icon || item.iconClass" [ngClass]="getIconClasses(item)"></span>
|
|
2843
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2844
|
+
</span>
|
|
2845
|
+
</div>
|
|
2846
|
+
</ng-container>
|
|
2722
2847
|
</ng-template>
|
|
2723
2848
|
`
|
|
2724
2849
|
}]
|
|
@@ -2771,12 +2896,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2771
2896
|
}], toolbarSplitButton: [{
|
|
2772
2897
|
type: ViewChild,
|
|
2773
2898
|
args: ['toolbarSplitButton', { static: false }]
|
|
2774
|
-
}],
|
|
2775
|
-
type: ViewChild,
|
|
2776
|
-
args: ['overflowSplitButton', { read: ElementRef, static: false }]
|
|
2777
|
-
}], overflowSplitButtonButtonList: [{
|
|
2899
|
+
}], overflowMainButton: [{
|
|
2778
2900
|
type: ViewChild,
|
|
2779
|
-
args: ['
|
|
2901
|
+
args: ['overflowMainButton', { read: ElementRef }]
|
|
2902
|
+
}], overflowListItems: [{
|
|
2903
|
+
type: ViewChildren,
|
|
2904
|
+
args: ['listItem']
|
|
2780
2905
|
}] } });
|
|
2781
2906
|
|
|
2782
2907
|
/**
|
|
@@ -2817,6 +2942,12 @@ ToolBarSeparatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
2817
2942
|
<ng-template #toolbarTemplate>
|
|
2818
2943
|
<div class="k-separator"></div>
|
|
2819
2944
|
</ng-template>
|
|
2945
|
+
|
|
2946
|
+
<ng-template #popupTemplate>
|
|
2947
|
+
<div class="k-item k-menu-item">
|
|
2948
|
+
<div class="k-separator k-separator-horizontal"></div>
|
|
2949
|
+
</div>
|
|
2950
|
+
</ng-template>
|
|
2820
2951
|
`, isInline: true });
|
|
2821
2952
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarSeparatorComponent, decorators: [{
|
|
2822
2953
|
type: Component,
|
|
@@ -2828,6 +2959,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2828
2959
|
<ng-template #toolbarTemplate>
|
|
2829
2960
|
<div class="k-separator"></div>
|
|
2830
2961
|
</ng-template>
|
|
2962
|
+
|
|
2963
|
+
<ng-template #popupTemplate>
|
|
2964
|
+
<div class="k-item k-menu-item">
|
|
2965
|
+
<div class="k-separator k-separator-horizontal"></div>
|
|
2966
|
+
</div>
|
|
2967
|
+
</ng-template>
|
|
2831
2968
|
`
|
|
2832
2969
|
}]
|
|
2833
2970
|
}], ctorParameters: function () { return []; }, propDecorators: { toolbarTemplate: [{
|
|
@@ -2896,6 +3033,93 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2896
3033
|
args: ['popupTemplate', { static: true }]
|
|
2897
3034
|
}] } });
|
|
2898
3035
|
|
|
3036
|
+
/**
|
|
3037
|
+
* @hidden
|
|
3038
|
+
*/
|
|
3039
|
+
class ToolBarButtonListComponent {
|
|
3040
|
+
constructor() {
|
|
3041
|
+
this.disabled = false;
|
|
3042
|
+
this.fillMode = 'solid';
|
|
3043
|
+
this.themeColor = 'base';
|
|
3044
|
+
this.itemClick = new EventEmitter();
|
|
3045
|
+
}
|
|
3046
|
+
getText(dataItem) {
|
|
3047
|
+
if (dataItem) {
|
|
3048
|
+
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
3049
|
+
}
|
|
3050
|
+
return undefined;
|
|
3051
|
+
}
|
|
3052
|
+
onClick(item, index) {
|
|
3053
|
+
const dataItem = this.data[index];
|
|
3054
|
+
if (item.click) {
|
|
3055
|
+
item.click(dataItem);
|
|
3056
|
+
}
|
|
3057
|
+
this.itemClick.emit(dataItem);
|
|
3058
|
+
}
|
|
3059
|
+
}
|
|
3060
|
+
ToolBarButtonListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3061
|
+
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: `
|
|
3062
|
+
<button
|
|
3063
|
+
#button
|
|
3064
|
+
type="button"
|
|
3065
|
+
tabindex="-1"
|
|
3066
|
+
kendoButton
|
|
3067
|
+
[style.padding-left.px]="16"
|
|
3068
|
+
class="k-overflow-button"
|
|
3069
|
+
*ngFor="let item of data; let i = index"
|
|
3070
|
+
[disabled]="disabled || item.disabled"
|
|
3071
|
+
[icon]="item.icon"
|
|
3072
|
+
[iconClass]="item.iconClass"
|
|
3073
|
+
[imageUrl]="item.imageUrl"
|
|
3074
|
+
[fillMode]="fillMode"
|
|
3075
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
3076
|
+
(click)="onClick(item, i)"
|
|
3077
|
+
>
|
|
3078
|
+
{{ getText(item) }}
|
|
3079
|
+
</button>
|
|
3080
|
+
`, 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"] }] });
|
|
3081
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonListComponent, decorators: [{
|
|
3082
|
+
type: Component,
|
|
3083
|
+
args: [{
|
|
3084
|
+
selector: 'kendo-toolbar-buttonlist',
|
|
3085
|
+
template: `
|
|
3086
|
+
<button
|
|
3087
|
+
#button
|
|
3088
|
+
type="button"
|
|
3089
|
+
tabindex="-1"
|
|
3090
|
+
kendoButton
|
|
3091
|
+
[style.padding-left.px]="16"
|
|
3092
|
+
class="k-overflow-button"
|
|
3093
|
+
*ngFor="let item of data; let i = index"
|
|
3094
|
+
[disabled]="disabled || item.disabled"
|
|
3095
|
+
[icon]="item.icon"
|
|
3096
|
+
[iconClass]="item.iconClass"
|
|
3097
|
+
[imageUrl]="item.imageUrl"
|
|
3098
|
+
[fillMode]="fillMode"
|
|
3099
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
3100
|
+
(click)="onClick(item, i)"
|
|
3101
|
+
>
|
|
3102
|
+
{{ getText(item) }}
|
|
3103
|
+
</button>
|
|
3104
|
+
`
|
|
3105
|
+
}]
|
|
3106
|
+
}], propDecorators: { data: [{
|
|
3107
|
+
type: Input
|
|
3108
|
+
}], textField: [{
|
|
3109
|
+
type: Input
|
|
3110
|
+
}], disabled: [{
|
|
3111
|
+
type: Input
|
|
3112
|
+
}], fillMode: [{
|
|
3113
|
+
type: Input
|
|
3114
|
+
}], themeColor: [{
|
|
3115
|
+
type: Input
|
|
3116
|
+
}], itemClick: [{
|
|
3117
|
+
type: Output
|
|
3118
|
+
}], buttons: [{
|
|
3119
|
+
type: ViewChildren,
|
|
3120
|
+
args: ['button', { read: ElementRef }]
|
|
3121
|
+
}] } });
|
|
3122
|
+
|
|
2899
3123
|
/**
|
|
2900
3124
|
* Custom component messages override default component messages.
|
|
2901
3125
|
*/
|