@progress/kendo-angular-toolbar 11.0.0-develop.99 → 11.0.1-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.txt +17 -17
- package/common/{constants.d.ts → size.d.ts} +3 -2
- package/esm2020/common/{constants.mjs → size.mjs} +1 -4
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/renderer.component.mjs +5 -1
- package/esm2020/toolbar.component.mjs +105 -33
- package/esm2020/toolbar.module.mjs +4 -3
- package/esm2020/tools/toolbar-button.component.mjs +99 -48
- package/esm2020/tools/toolbar-buttongroup.component.mjs +101 -70
- package/esm2020/tools/toolbar-buttonlist.component.mjs +2 -0
- package/esm2020/tools/toolbar-dropdownbutton.component.mjs +107 -54
- package/esm2020/tools/toolbar-separator.component.mjs +12 -0
- package/esm2020/tools/toolbar-splitbutton.component.mjs +114 -63
- package/esm2020/util.mjs +24 -0
- package/fesm2015/progress-kendo-angular-toolbar.mjs +648 -351
- package/fesm2020/progress-kendo-angular-toolbar.mjs +647 -351
- package/index.d.ts +1 -0
- package/package.json +8 -7
- package/renderer.component.d.ts +1 -0
- package/schematics/ngAdd/index.js +4 -2
- package/tool-options.d.ts +2 -0
- package/toolbar.component.d.ts +21 -3
- package/toolbar.module.d.ts +2 -1
- package/tools/toolbar-button.component.d.ts +23 -3
- package/tools/toolbar-buttongroup.component.d.ts +15 -4
- package/tools/toolbar-dropdownbutton.component.d.ts +10 -2
- package/tools/toolbar-splitbutton.component.d.ts +11 -3
- package/util.d.ts +22 -1
|
@@ -3,20 +3,23 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { EventEmitter, Injectable, Component, Input, Output, HostBinding, HostListener, Directive, forwardRef, ViewContainerRef, ContentChildren, ViewChild, ViewChildren,
|
|
7
|
-
import * as
|
|
6
|
+
import { EventEmitter, Injectable, Component, Input, Output, HostBinding, HostListener, Directive, forwardRef, ElementRef, ViewContainerRef, ContentChildren, ViewChild, ViewChildren, isDevMode, NgModule } from '@angular/core';
|
|
7
|
+
import * as i7 from '@progress/kendo-angular-common';
|
|
8
8
|
import { Keys, guid, isDocumentAvailable, ResizeSensorModule } from '@progress/kendo-angular-common';
|
|
9
9
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
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 { moreVerticalIcon } from '@progress/kendo-svg-icons';
|
|
14
15
|
import * as i2 from '@progress/kendo-angular-popup';
|
|
15
16
|
import { PopupModule } from '@progress/kendo-angular-popup';
|
|
16
17
|
import * as i3 from '@angular/common';
|
|
17
18
|
import { CommonModule } from '@angular/common';
|
|
18
19
|
import * as i1$1 from '@progress/kendo-angular-buttons';
|
|
19
20
|
import { DropDownButtonComponent, ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
21
|
+
import * as i2$1 from '@progress/kendo-angular-icons';
|
|
22
|
+
import { IconsModule } from '@progress/kendo-angular-icons';
|
|
20
23
|
|
|
21
24
|
/**
|
|
22
25
|
* @hidden
|
|
@@ -25,8 +28,8 @@ const packageMetadata = {
|
|
|
25
28
|
name: '@progress/kendo-angular-toolbar',
|
|
26
29
|
productName: 'Kendo UI for Angular',
|
|
27
30
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
28
|
-
publishDate:
|
|
29
|
-
version: '',
|
|
31
|
+
publishDate: 1674059804,
|
|
32
|
+
version: '11.0.1-develop.1',
|
|
30
33
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
31
34
|
};
|
|
32
35
|
|
|
@@ -229,6 +232,30 @@ const getValueForLocation = (property, displayMode, overflows) => {
|
|
|
229
232
|
return property;
|
|
230
233
|
}
|
|
231
234
|
};
|
|
235
|
+
/**
|
|
236
|
+
* @hidden
|
|
237
|
+
*/
|
|
238
|
+
const SIZES = {
|
|
239
|
+
small: 'sm',
|
|
240
|
+
medium: 'md',
|
|
241
|
+
large: 'lg'
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* @hidden
|
|
245
|
+
*
|
|
246
|
+
* Returns the styling classes to be added and removed
|
|
247
|
+
*/
|
|
248
|
+
const getStylingClasses = (componentType, stylingOption, previousValue, newValue) => {
|
|
249
|
+
switch (stylingOption) {
|
|
250
|
+
case 'size':
|
|
251
|
+
return {
|
|
252
|
+
toRemove: `k-${componentType}-${SIZES[previousValue]}`,
|
|
253
|
+
toAdd: newValue !== 'none' ? `k-${componentType}-${SIZES[newValue]}` : ''
|
|
254
|
+
};
|
|
255
|
+
default:
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
};
|
|
232
259
|
|
|
233
260
|
/**
|
|
234
261
|
* @hidden
|
|
@@ -462,11 +489,6 @@ class PreventableEvent {
|
|
|
462
489
|
}
|
|
463
490
|
}
|
|
464
491
|
|
|
465
|
-
/**
|
|
466
|
-
* @hidden
|
|
467
|
-
*/
|
|
468
|
-
const defaultPopupWidth = '150px';
|
|
469
|
-
|
|
470
492
|
/**
|
|
471
493
|
* @hidden
|
|
472
494
|
*/
|
|
@@ -522,6 +544,7 @@ class ToolBarRendererComponent {
|
|
|
522
544
|
this.rendererService = rendererService;
|
|
523
545
|
this.refreshService = refreshService;
|
|
524
546
|
this.rendererClick = new EventEmitter();
|
|
547
|
+
this.hostClass = true;
|
|
525
548
|
this.rendererService.element = element;
|
|
526
549
|
this.rendererService.renderer = this;
|
|
527
550
|
this.refreshSubscription = this.refreshService.onRefresh.subscribe((tool) => {
|
|
@@ -603,7 +626,7 @@ class ToolBarRendererComponent {
|
|
|
603
626
|
}
|
|
604
627
|
}
|
|
605
628
|
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: `
|
|
629
|
+
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
630
|
<ng-container *ngIf="location === 'toolbar'">
|
|
608
631
|
<ng-template [ngTemplateOutlet]="template"></ng-template>
|
|
609
632
|
</ng-container>
|
|
@@ -637,6 +660,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
637
660
|
}], spacerClass: [{
|
|
638
661
|
type: HostBinding,
|
|
639
662
|
args: ['class.k-spacer']
|
|
663
|
+
}], hostClass: [{
|
|
664
|
+
type: HostBinding,
|
|
665
|
+
args: ['class.k-toolbar-renderer']
|
|
640
666
|
}], onClick: [{
|
|
641
667
|
type: HostListener,
|
|
642
668
|
args: ['click', ['$event']]
|
|
@@ -688,6 +714,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
688
714
|
}]
|
|
689
715
|
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
690
716
|
|
|
717
|
+
const DEFAULT_SIZE = 'medium';
|
|
691
718
|
const getInitialPopupSettings = (isRtl) => ({
|
|
692
719
|
animate: true,
|
|
693
720
|
anchorAlign: { horizontal: isRtl ? 'left' : 'right', vertical: 'bottom' },
|
|
@@ -697,7 +724,9 @@ const getInitialPopupSettings = (isRtl) => ({
|
|
|
697
724
|
* Represents the [Kendo UI ToolBar component for Angular]({% slug overview_toolbar %}).
|
|
698
725
|
*/
|
|
699
726
|
class ToolBarComponent {
|
|
700
|
-
constructor(localization, popupService, refreshService, navigationService,
|
|
727
|
+
constructor(localization, popupService, refreshService, navigationService,
|
|
728
|
+
// Needs to be public as it is being accessed in the Editor component
|
|
729
|
+
element, zone, renderer, _cdr) {
|
|
701
730
|
this.localization = localization;
|
|
702
731
|
this.popupService = popupService;
|
|
703
732
|
this.refreshService = refreshService;
|
|
@@ -722,11 +751,13 @@ class ToolBarComponent {
|
|
|
722
751
|
* Fires when the overflow popup of the ToolBar is closed.
|
|
723
752
|
*/
|
|
724
753
|
this.close = new EventEmitter();
|
|
725
|
-
this.
|
|
754
|
+
this.hostClass = true;
|
|
726
755
|
this.cancelRenderedToolsSubscription$ = new Subject();
|
|
756
|
+
this._size = DEFAULT_SIZE;
|
|
727
757
|
this.subscriptions = new Subscription();
|
|
728
758
|
this.popupSubs = new Subscription();
|
|
729
759
|
this.role = 'toolbar';
|
|
760
|
+
this.moreVerticalIcon = moreVerticalIcon;
|
|
730
761
|
/**
|
|
731
762
|
* @hidden
|
|
732
763
|
*/
|
|
@@ -738,6 +769,9 @@ class ToolBarComponent {
|
|
|
738
769
|
validatePackage(packageMetadata);
|
|
739
770
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
740
771
|
}
|
|
772
|
+
get overflowClass() {
|
|
773
|
+
return `k-button-${SIZES[this.size]}`;
|
|
774
|
+
}
|
|
741
775
|
/**
|
|
742
776
|
* @hidden
|
|
743
777
|
*/
|
|
@@ -760,6 +794,23 @@ class ToolBarComponent {
|
|
|
760
794
|
get popupSettings() {
|
|
761
795
|
return this._popupSettings || getInitialPopupSettings(this.localization.rtl);
|
|
762
796
|
}
|
|
797
|
+
/**
|
|
798
|
+
* Specifies the padding of all Toolbar elements.
|
|
799
|
+
*
|
|
800
|
+
* The possible values are:
|
|
801
|
+
* * `small`
|
|
802
|
+
* * `medium` (default)
|
|
803
|
+
* * `large`
|
|
804
|
+
* * `none`
|
|
805
|
+
*/
|
|
806
|
+
set size(size) {
|
|
807
|
+
const newSize = size ? size : DEFAULT_SIZE;
|
|
808
|
+
this.handleClasses(newSize, 'size');
|
|
809
|
+
this._size = newSize;
|
|
810
|
+
}
|
|
811
|
+
get size() {
|
|
812
|
+
return this._size;
|
|
813
|
+
}
|
|
763
814
|
/**
|
|
764
815
|
* @hidden
|
|
765
816
|
*/
|
|
@@ -881,6 +932,7 @@ class ToolBarComponent {
|
|
|
881
932
|
}
|
|
882
933
|
this.navigationService.setRenderedTools(this.renderedTools.toArray());
|
|
883
934
|
this.subscriptions.add(this.renderedTools.changes.subscribe((rts) => this.navigationService.setRenderedTools(rts.toArray())));
|
|
935
|
+
this.handleClasses(this.size, 'size');
|
|
884
936
|
}
|
|
885
937
|
ngOnInit() {
|
|
886
938
|
this.subscriptions.add(this.localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr')));
|
|
@@ -951,7 +1003,7 @@ class ToolBarComponent {
|
|
|
951
1003
|
content: this.popupTemplate,
|
|
952
1004
|
appendTo: this.appendTo,
|
|
953
1005
|
animate: this.popupSettings.animate,
|
|
954
|
-
popupClass: this.popupSettings.popupClass,
|
|
1006
|
+
popupClass: this.normalizePopupClasses(this.popupSettings.popupClass),
|
|
955
1007
|
positionMode: 'absolute'
|
|
956
1008
|
});
|
|
957
1009
|
this.setPopupContentDimensions();
|
|
@@ -963,12 +1015,16 @@ class ToolBarComponent {
|
|
|
963
1015
|
* @hidden
|
|
964
1016
|
*/
|
|
965
1017
|
onResize() {
|
|
1018
|
+
var _a;
|
|
966
1019
|
if (isDocumentAvailable()) {
|
|
967
1020
|
const containerWidth = innerWidth(this.element.nativeElement) - this.overflowAnchorWidth;
|
|
968
1021
|
this.shrink(containerWidth, this.childrenWidth);
|
|
969
1022
|
this.stretch(containerWidth, this.childrenWidth);
|
|
970
1023
|
this.displayAnchor();
|
|
971
|
-
this.resizeSensor.acceptSize();
|
|
1024
|
+
(_a = this.resizeSensor) === null || _a === void 0 ? void 0 : _a.acceptSize();
|
|
1025
|
+
if (this.popupOpen) {
|
|
1026
|
+
this.toggle();
|
|
1027
|
+
}
|
|
972
1028
|
}
|
|
973
1029
|
}
|
|
974
1030
|
/**
|
|
@@ -977,6 +1033,7 @@ class ToolBarComponent {
|
|
|
977
1033
|
onPopupOpen() {
|
|
978
1034
|
this.zone.runOutsideAngular(() => {
|
|
979
1035
|
this.overflowKeydownListener = this.renderer.listen(this.popupRef.popupElement, 'keydown', (ev) => {
|
|
1036
|
+
const currentTool = this.overflowRenderedTools.toArray().find(tool => closest(ev.target, (el) => el === tool.element.nativeElement));
|
|
980
1037
|
switch (ev.keyCode) {
|
|
981
1038
|
case Keys.ArrowUp:
|
|
982
1039
|
this.zone.run(() => {
|
|
@@ -999,6 +1056,16 @@ class ToolBarComponent {
|
|
|
999
1056
|
this.navigationService.resetNavigation();
|
|
1000
1057
|
});
|
|
1001
1058
|
break;
|
|
1059
|
+
case Keys.Enter:
|
|
1060
|
+
case Keys.Space:
|
|
1061
|
+
this.zone.run(() => {
|
|
1062
|
+
if (currentTool) {
|
|
1063
|
+
ev.preventDefault();
|
|
1064
|
+
ev.target.click();
|
|
1065
|
+
ev.target.focus();
|
|
1066
|
+
}
|
|
1067
|
+
});
|
|
1068
|
+
break;
|
|
1002
1069
|
default:
|
|
1003
1070
|
break;
|
|
1004
1071
|
}
|
|
@@ -1029,11 +1096,11 @@ class ToolBarComponent {
|
|
|
1029
1096
|
}
|
|
1030
1097
|
displayAnchor() {
|
|
1031
1098
|
const visibility = this.allTools.filter(t => t.overflows && t.responsive).length > 0 ? 'visible' : 'hidden';
|
|
1032
|
-
this.renderer.setStyle(this.overflowButton.nativeElement, 'visibility', visibility);
|
|
1099
|
+
this.overflowButton && this.renderer.setStyle(this.overflowButton.nativeElement, 'visibility', visibility);
|
|
1033
1100
|
}
|
|
1034
1101
|
get popupWidth() {
|
|
1035
1102
|
if (!this.popupSettings || !this.popupSettings.width) {
|
|
1036
|
-
return
|
|
1103
|
+
return 'auto';
|
|
1037
1104
|
}
|
|
1038
1105
|
return isNaN(this.popupSettings.width) ? this.popupSettings.width : `${this.popupSettings.width}px`;
|
|
1039
1106
|
}
|
|
@@ -1141,9 +1208,37 @@ class ToolBarComponent {
|
|
|
1141
1208
|
this.popupRef = null;
|
|
1142
1209
|
}
|
|
1143
1210
|
}
|
|
1211
|
+
handleClasses(value, input) {
|
|
1212
|
+
const elem = this.element.nativeElement;
|
|
1213
|
+
const classes = getStylingClasses('toolbar', input, this[input], value);
|
|
1214
|
+
if (classes.toRemove) {
|
|
1215
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
1216
|
+
}
|
|
1217
|
+
if (classes.toAdd) {
|
|
1218
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
normalizePopupClasses(classList) {
|
|
1222
|
+
let classes = ['k-menu-popup', 'k-toolbar-popup'];
|
|
1223
|
+
if (!classList) {
|
|
1224
|
+
return classes;
|
|
1225
|
+
}
|
|
1226
|
+
if (typeof classList === 'string') {
|
|
1227
|
+
classes.push(...classList.split(' '));
|
|
1228
|
+
}
|
|
1229
|
+
else if (Array.isArray(classList)) {
|
|
1230
|
+
classes = [...classes, ...classList];
|
|
1231
|
+
}
|
|
1232
|
+
else {
|
|
1233
|
+
for (const cl in classList) {
|
|
1234
|
+
classes.push(classList[cl]);
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
return classes;
|
|
1238
|
+
}
|
|
1144
1239
|
}
|
|
1145
1240
|
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-
|
|
1241
|
+
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
1242
|
RefreshService,
|
|
1148
1243
|
NavigationService,
|
|
1149
1244
|
LocalizationService,
|
|
@@ -1151,7 +1246,7 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
1151
1246
|
provide: L10N_PREFIX,
|
|
1152
1247
|
useValue: 'kendo.toolbar'
|
|
1153
1248
|
}
|
|
1154
|
-
], queries: [{ propertyName: "allTools", predicate: ToolBarToolComponent }], viewQueries: [{ propertyName: "overflowButton", first: true, predicate: ["overflowButton"], descendants: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "resizeSensor", first: true, predicate: ["resizeSensor"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "renderedTools", predicate: ["toolbarRenderer"], descendants: true }, { propertyName: "overflowRenderedTools", predicate: ["overflowRenderer"], descendants: true }], exportAs: ["kendoToolBar"], usesOnChanges: true, ngImport: i0, template: `
|
|
1249
|
+
], queries: [{ propertyName: "allTools", predicate: ToolBarToolComponent }], viewQueries: [{ propertyName: "overflowButton", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "resizeSensor", first: true, predicate: ["resizeSensor"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "renderedTools", predicate: ["toolbarRenderer"], descendants: true }, { propertyName: "overflowRenderedTools", predicate: ["overflowRenderer"], descendants: true }], exportAs: ["kendoToolBar"], usesOnChanges: true, ngImport: i0, template: `
|
|
1155
1250
|
<ng-container kendoToolbarLocalizedMessages
|
|
1156
1251
|
i18n-moreToolsTitle="kendo.toolbar.moreToolsTitle|The title of the **more tools** button in a responsive ToolBar"
|
|
1157
1252
|
moreToolsTitle="More tools"
|
|
@@ -1167,8 +1262,12 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
1167
1262
|
></kendo-toolbar-renderer>
|
|
1168
1263
|
</ng-container>
|
|
1169
1264
|
<button
|
|
1265
|
+
kendoButton
|
|
1266
|
+
fillMode="flat"
|
|
1170
1267
|
#overflowButton
|
|
1171
1268
|
type="button"
|
|
1269
|
+
icon="more-vertical"
|
|
1270
|
+
[svgIcon]="moreVerticalIcon"
|
|
1172
1271
|
tabindex="-1"
|
|
1173
1272
|
[title]="moreToolsTitle"
|
|
1174
1273
|
[attr.aria-label]="moreToolsTitle"
|
|
@@ -1179,19 +1278,18 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
1179
1278
|
[style.visibility]="'hidden'"
|
|
1180
1279
|
[style.position]="'relative'"
|
|
1181
1280
|
[style.margin-inline-start]="'auto'"
|
|
1182
|
-
class="k-overflow-
|
|
1281
|
+
class="k-toolbar-overflow-button"
|
|
1282
|
+
[ngClass]="overflowClass"
|
|
1183
1283
|
(click)="showPopup()"
|
|
1184
1284
|
>
|
|
1185
|
-
<span class="k-icon k-i-more-vertical"></span>
|
|
1186
1285
|
</button>
|
|
1187
1286
|
<ng-template #popupTemplate>
|
|
1188
|
-
<
|
|
1189
|
-
class="k-
|
|
1287
|
+
<div
|
|
1288
|
+
class="k-menu-group k-menu-group-md"
|
|
1190
1289
|
role="menu"
|
|
1191
1290
|
[id]="popupId"
|
|
1192
1291
|
[attr.aria-labelledby]="overflowBtnId">
|
|
1193
1292
|
<ng-container *ngFor="let tool of allTools; let index = index">
|
|
1194
|
-
<li class="k-item" role="menuitem">
|
|
1195
1293
|
<kendo-toolbar-renderer
|
|
1196
1294
|
#overflowRenderer
|
|
1197
1295
|
(rendererClick)="onRendererClick($event)"
|
|
@@ -1199,13 +1297,12 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
1199
1297
|
[resizable]="overflow"
|
|
1200
1298
|
[tool]="tool"
|
|
1201
1299
|
></kendo-toolbar-renderer>
|
|
1202
|
-
</li>
|
|
1203
1300
|
</ng-container>
|
|
1204
|
-
</
|
|
1301
|
+
</div>
|
|
1205
1302
|
</ng-template>
|
|
1206
1303
|
<ng-container #container></ng-container>
|
|
1207
1304
|
<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:
|
|
1305
|
+
`, isInline: true, components: [{ type: ToolBarRendererComponent, selector: "kendo-toolbar-renderer", inputs: ["tool", "location", "resizable"], outputs: ["rendererClick"], exportAs: ["kendoToolBarRenderer"] }, { 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"] }, { type: i7.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: LocalizedToolbarMessagesDirective, selector: "[kendoToolbarLocalizedMessages]" }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1209
1306
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarComponent, decorators: [{
|
|
1210
1307
|
type: Component,
|
|
1211
1308
|
args: [{
|
|
@@ -1236,8 +1333,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1236
1333
|
></kendo-toolbar-renderer>
|
|
1237
1334
|
</ng-container>
|
|
1238
1335
|
<button
|
|
1336
|
+
kendoButton
|
|
1337
|
+
fillMode="flat"
|
|
1239
1338
|
#overflowButton
|
|
1240
1339
|
type="button"
|
|
1340
|
+
icon="more-vertical"
|
|
1341
|
+
[svgIcon]="moreVerticalIcon"
|
|
1241
1342
|
tabindex="-1"
|
|
1242
1343
|
[title]="moreToolsTitle"
|
|
1243
1344
|
[attr.aria-label]="moreToolsTitle"
|
|
@@ -1248,19 +1349,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1248
1349
|
[style.visibility]="'hidden'"
|
|
1249
1350
|
[style.position]="'relative'"
|
|
1250
1351
|
[style.margin-inline-start]="'auto'"
|
|
1251
|
-
class="k-overflow-
|
|
1352
|
+
class="k-toolbar-overflow-button"
|
|
1353
|
+
[ngClass]="overflowClass"
|
|
1252
1354
|
(click)="showPopup()"
|
|
1253
1355
|
>
|
|
1254
|
-
<span class="k-icon k-i-more-vertical"></span>
|
|
1255
1356
|
</button>
|
|
1256
1357
|
<ng-template #popupTemplate>
|
|
1257
|
-
<
|
|
1258
|
-
class="k-
|
|
1358
|
+
<div
|
|
1359
|
+
class="k-menu-group k-menu-group-md"
|
|
1259
1360
|
role="menu"
|
|
1260
1361
|
[id]="popupId"
|
|
1261
1362
|
[attr.aria-labelledby]="overflowBtnId">
|
|
1262
1363
|
<ng-container *ngFor="let tool of allTools; let index = index">
|
|
1263
|
-
<li class="k-item" role="menuitem">
|
|
1264
1364
|
<kendo-toolbar-renderer
|
|
1265
1365
|
#overflowRenderer
|
|
1266
1366
|
(rendererClick)="onRendererClick($event)"
|
|
@@ -1268,9 +1368,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1268
1368
|
[resizable]="overflow"
|
|
1269
1369
|
[tool]="tool"
|
|
1270
1370
|
></kendo-toolbar-renderer>
|
|
1271
|
-
</li>
|
|
1272
1371
|
</ng-container>
|
|
1273
|
-
</
|
|
1372
|
+
</div>
|
|
1274
1373
|
</ng-template>
|
|
1275
1374
|
<ng-container #container></ng-container>
|
|
1276
1375
|
<kendo-resize-sensor *ngIf="overflow" #resizeSensor></kendo-resize-sensor>
|
|
@@ -1284,6 +1383,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1284
1383
|
type: Input
|
|
1285
1384
|
}], tabindex: [{
|
|
1286
1385
|
type: Input
|
|
1386
|
+
}], size: [{
|
|
1387
|
+
type: Input
|
|
1287
1388
|
}], tabIndex: [{
|
|
1288
1389
|
type: Input,
|
|
1289
1390
|
args: ['tabIndex']
|
|
@@ -1296,7 +1397,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1296
1397
|
args: [ToolBarToolComponent]
|
|
1297
1398
|
}], overflowButton: [{
|
|
1298
1399
|
type: ViewChild,
|
|
1299
|
-
args: ['overflowButton', { static: false }]
|
|
1400
|
+
args: ['overflowButton', { static: false, read: ElementRef }]
|
|
1300
1401
|
}], popupTemplate: [{
|
|
1301
1402
|
type: ViewChild,
|
|
1302
1403
|
args: ['popupTemplate', { static: true }]
|
|
@@ -1312,10 +1413,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1312
1413
|
}], overflowRenderedTools: [{
|
|
1313
1414
|
type: ViewChildren,
|
|
1314
1415
|
args: ['overflowRenderer']
|
|
1315
|
-
}],
|
|
1316
|
-
type: HostBinding,
|
|
1317
|
-
args: ['class.k-widget']
|
|
1318
|
-
}, {
|
|
1416
|
+
}], hostClass: [{
|
|
1319
1417
|
type: HostBinding,
|
|
1320
1418
|
args: ['class.k-toolbar']
|
|
1321
1419
|
}], onFocus: [{
|
|
@@ -1339,8 +1437,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1339
1437
|
* Represents the [Kendo UI ToolBar Button tool for Angular]({% slug controltypes_toolbar %}#toc-buttons).
|
|
1340
1438
|
*/
|
|
1341
1439
|
class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
1342
|
-
constructor() {
|
|
1440
|
+
constructor(element, zone) {
|
|
1343
1441
|
super();
|
|
1442
|
+
this.element = element;
|
|
1443
|
+
this.zone = zone;
|
|
1344
1444
|
/**
|
|
1345
1445
|
* Specifies where button icon should be displayed
|
|
1346
1446
|
*/
|
|
@@ -1403,12 +1503,14 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
1403
1503
|
text: '',
|
|
1404
1504
|
icon: '',
|
|
1405
1505
|
iconClass: '',
|
|
1506
|
+
svgIcon: null,
|
|
1406
1507
|
imageUrl: ''
|
|
1407
1508
|
};
|
|
1408
1509
|
this.overflowOptions = {
|
|
1409
1510
|
text: '',
|
|
1410
1511
|
icon: '',
|
|
1411
1512
|
iconClass: '',
|
|
1513
|
+
svgIcon: null,
|
|
1412
1514
|
imageUrl: ''
|
|
1413
1515
|
};
|
|
1414
1516
|
this._showText = 'both';
|
|
@@ -1459,6 +1561,20 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
1459
1561
|
this.toolbarOptions.iconClass = getValueForLocation(iconClass, this.showIcon, false);
|
|
1460
1562
|
this.overflowOptions.iconClass = getValueForLocation(iconClass, this.showIcon, true);
|
|
1461
1563
|
}
|
|
1564
|
+
/**
|
|
1565
|
+
* Defines an SVGIcon to be rendered within the button.
|
|
1566
|
+
* The input can take either an [existing Kendo SVG icon](slug:svgicon_list) or a custom one.
|
|
1567
|
+
*/
|
|
1568
|
+
set svgIcon(icon) {
|
|
1569
|
+
if (isDevMode() &&
|
|
1570
|
+
icon &&
|
|
1571
|
+
(this.toolbarOptions.icon || this.overflowOptions.icon) &&
|
|
1572
|
+
(this.toolbarOptions.iconClass || this.overflowOptions.iconClass)) {
|
|
1573
|
+
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
1574
|
+
}
|
|
1575
|
+
this.toolbarOptions.svgIcon = getValueForLocation(icon, this.showIcon, false);
|
|
1576
|
+
this.overflowOptions.svgIcon = getValueForLocation(icon, this.showIcon, true);
|
|
1577
|
+
}
|
|
1462
1578
|
/**
|
|
1463
1579
|
* Defines a URL which is used for an `img` element inside the Button.
|
|
1464
1580
|
* The URL can be relative or absolute. If relative, it is evaluated with relation to the web page URL.
|
|
@@ -1499,19 +1615,45 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
1499
1615
|
this.getButton().tabIndex = -1;
|
|
1500
1616
|
return false;
|
|
1501
1617
|
}
|
|
1618
|
+
/**
|
|
1619
|
+
* @hidden
|
|
1620
|
+
*/
|
|
1621
|
+
get toolbarButtonClass() {
|
|
1622
|
+
return this.toggleable ? 'k-toolbar-toggle-button' : 'k-toolbar-button';
|
|
1623
|
+
}
|
|
1624
|
+
/**
|
|
1625
|
+
* @hidden
|
|
1626
|
+
*/
|
|
1627
|
+
handleClick(ev) {
|
|
1628
|
+
this.click.emit(ev);
|
|
1629
|
+
if (this.toggleable) {
|
|
1630
|
+
this.selected = !this.selected;
|
|
1631
|
+
this.selectedChange.emit(this.selected);
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
/**
|
|
1635
|
+
* @hidden
|
|
1636
|
+
*/
|
|
1637
|
+
selectedChangeHandler(state) {
|
|
1638
|
+
this.selected = state;
|
|
1639
|
+
this.selectedChange.emit(state);
|
|
1640
|
+
}
|
|
1502
1641
|
getButton() {
|
|
1503
1642
|
return (this.overflows ? this.overflowButtonElement : this.toolbarButtonElement).nativeElement;
|
|
1504
1643
|
}
|
|
1505
1644
|
setTextDisplayMode() {
|
|
1506
1645
|
this.toolbarOptions.text = this.showText === 'overflow' ? undefined : this.text;
|
|
1507
|
-
this.
|
|
1646
|
+
this.zone.onStable.pipe(take(1)).subscribe(() => {
|
|
1647
|
+
this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
|
|
1648
|
+
});
|
|
1508
1649
|
}
|
|
1509
1650
|
}
|
|
1510
|
-
ToolBarButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1511
|
-
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: `
|
|
1651
|
+
ToolBarButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1652
|
+
ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarButtonComponent, selector: "kendo-toolbar-button", inputs: { showText: "showText", showIcon: "showIcon", text: "text", style: "style", className: "className", title: "title", disabled: "disabled", toggleable: "toggleable", look: "look", togglable: "togglable", selected: "selected", fillMode: "fillMode", themeColor: "themeColor", icon: "icon", iconClass: "iconClass", svgIcon: "svgIcon", imageUrl: "imageUrl" }, outputs: { click: "click", pointerdown: "pointerdown", selectedChange: "selectedChange" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, ngImport: i0, template: `
|
|
1512
1653
|
<ng-template #toolbarTemplate>
|
|
1513
1654
|
<button
|
|
1514
1655
|
#toolbarButton
|
|
1656
|
+
[class]="toolbarButtonClass"
|
|
1515
1657
|
[tabindex]="tabIndex"
|
|
1516
1658
|
type="button"
|
|
1517
1659
|
kendoButton
|
|
@@ -1525,40 +1667,41 @@ ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1525
1667
|
[selected]="selected"
|
|
1526
1668
|
[icon]="toolbarOptions.icon"
|
|
1527
1669
|
[iconClass]="toolbarOptions.iconClass"
|
|
1670
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
1528
1671
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
1529
1672
|
(click)="click.emit($event)"
|
|
1530
1673
|
(pointerdown)="pointerdown.emit($event)"
|
|
1531
|
-
(selectedChange)="
|
|
1674
|
+
(selectedChange)="selectedChangeHandler($event)"
|
|
1532
1675
|
(blur)="onBlur()"
|
|
1533
1676
|
>
|
|
1534
1677
|
{{ toolbarOptions.text }}
|
|
1535
1678
|
</button>
|
|
1536
1679
|
</ng-template>
|
|
1537
1680
|
<ng-template #popupTemplate>
|
|
1538
|
-
<
|
|
1681
|
+
<div
|
|
1539
1682
|
#overflowButton
|
|
1540
1683
|
tabindex="-1"
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
class
|
|
1544
|
-
[ngStyle]="style"
|
|
1684
|
+
role="menuitem"
|
|
1685
|
+
class="k-item k-menu-item"
|
|
1686
|
+
[class.k-disabled]="disabled"
|
|
1545
1687
|
[ngClass]="className"
|
|
1546
|
-
[
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1688
|
+
[ngStyle]="style"
|
|
1689
|
+
(click)="handleClick($event)">
|
|
1690
|
+
<span
|
|
1691
|
+
class="k-link k-menu-link"
|
|
1692
|
+
[class.k-selected]="selected"
|
|
1693
|
+
>
|
|
1694
|
+
<kendo-icon-wrapper
|
|
1695
|
+
*ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
|
|
1696
|
+
[name]="overflowOptions.icon"
|
|
1697
|
+
[customFontClass]="overflowOptions.iconClass"
|
|
1698
|
+
[svgIcon]="overflowOptions.svgIcon"
|
|
1699
|
+
></kendo-icon-wrapper>
|
|
1700
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
1701
|
+
</span>
|
|
1702
|
+
</div>
|
|
1560
1703
|
</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: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1704
|
+
`, 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"] }, { type: i2$1.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1562
1705
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonComponent, decorators: [{
|
|
1563
1706
|
type: Component,
|
|
1564
1707
|
args: [{
|
|
@@ -1569,6 +1712,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1569
1712
|
<ng-template #toolbarTemplate>
|
|
1570
1713
|
<button
|
|
1571
1714
|
#toolbarButton
|
|
1715
|
+
[class]="toolbarButtonClass"
|
|
1572
1716
|
[tabindex]="tabIndex"
|
|
1573
1717
|
type="button"
|
|
1574
1718
|
kendoButton
|
|
@@ -1582,42 +1726,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1582
1726
|
[selected]="selected"
|
|
1583
1727
|
[icon]="toolbarOptions.icon"
|
|
1584
1728
|
[iconClass]="toolbarOptions.iconClass"
|
|
1729
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
1585
1730
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
1586
1731
|
(click)="click.emit($event)"
|
|
1587
1732
|
(pointerdown)="pointerdown.emit($event)"
|
|
1588
|
-
(selectedChange)="
|
|
1733
|
+
(selectedChange)="selectedChangeHandler($event)"
|
|
1589
1734
|
(blur)="onBlur()"
|
|
1590
1735
|
>
|
|
1591
1736
|
{{ toolbarOptions.text }}
|
|
1592
1737
|
</button>
|
|
1593
1738
|
</ng-template>
|
|
1594
1739
|
<ng-template #popupTemplate>
|
|
1595
|
-
<
|
|
1740
|
+
<div
|
|
1596
1741
|
#overflowButton
|
|
1597
1742
|
tabindex="-1"
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
class
|
|
1601
|
-
[ngStyle]="style"
|
|
1743
|
+
role="menuitem"
|
|
1744
|
+
class="k-item k-menu-item"
|
|
1745
|
+
[class.k-disabled]="disabled"
|
|
1602
1746
|
[ngClass]="className"
|
|
1603
|
-
[
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1747
|
+
[ngStyle]="style"
|
|
1748
|
+
(click)="handleClick($event)">
|
|
1749
|
+
<span
|
|
1750
|
+
class="k-link k-menu-link"
|
|
1751
|
+
[class.k-selected]="selected"
|
|
1752
|
+
>
|
|
1753
|
+
<kendo-icon-wrapper
|
|
1754
|
+
*ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
|
|
1755
|
+
[name]="overflowOptions.icon"
|
|
1756
|
+
[customFontClass]="overflowOptions.iconClass"
|
|
1757
|
+
[svgIcon]="overflowOptions.svgIcon"
|
|
1758
|
+
></kendo-icon-wrapper>
|
|
1759
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
1760
|
+
</span>
|
|
1761
|
+
</div>
|
|
1617
1762
|
</ng-template>
|
|
1618
1763
|
`
|
|
1619
1764
|
}]
|
|
1620
|
-
}], ctorParameters: function () { return []; }, propDecorators: { showText: [{
|
|
1765
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { showText: [{
|
|
1621
1766
|
type: Input
|
|
1622
1767
|
}], showIcon: [{
|
|
1623
1768
|
type: Input
|
|
@@ -1647,6 +1792,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1647
1792
|
type: Input
|
|
1648
1793
|
}], iconClass: [{
|
|
1649
1794
|
type: Input
|
|
1795
|
+
}], svgIcon: [{
|
|
1796
|
+
type: Input
|
|
1650
1797
|
}], imageUrl: [{
|
|
1651
1798
|
type: Input
|
|
1652
1799
|
}], click: [{
|
|
@@ -1693,9 +1840,14 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1693
1840
|
}
|
|
1694
1841
|
}
|
|
1695
1842
|
get buttonElements() {
|
|
1696
|
-
|
|
1697
|
-
.
|
|
1698
|
-
|
|
1843
|
+
if (this.overflows) {
|
|
1844
|
+
return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))].map(el => el.nativeElement);
|
|
1845
|
+
}
|
|
1846
|
+
else {
|
|
1847
|
+
return this.toolbarButtonGroup
|
|
1848
|
+
.buttons.filter(b => !b.isDisabled)
|
|
1849
|
+
.map(b => b.element);
|
|
1850
|
+
}
|
|
1699
1851
|
}
|
|
1700
1852
|
/**
|
|
1701
1853
|
* @hidden
|
|
@@ -1717,6 +1869,20 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1717
1869
|
button.selected = state;
|
|
1718
1870
|
button.selectedChange.emit(state);
|
|
1719
1871
|
}
|
|
1872
|
+
/**
|
|
1873
|
+
* @hidden
|
|
1874
|
+
*/
|
|
1875
|
+
overflowSelectedChangeHandler(button) {
|
|
1876
|
+
if (this.selection === 'multiple') {
|
|
1877
|
+
button.selected = !button.selected;
|
|
1878
|
+
}
|
|
1879
|
+
else {
|
|
1880
|
+
const filteredButtons = this.buttonComponents.filter(b => b !== button);
|
|
1881
|
+
filteredButtons.forEach(b => b.selected = false);
|
|
1882
|
+
button.selected = !button.selected;
|
|
1883
|
+
}
|
|
1884
|
+
button.selectedChange.emit(button.selected);
|
|
1885
|
+
}
|
|
1720
1886
|
/**
|
|
1721
1887
|
* @hidden
|
|
1722
1888
|
*/
|
|
@@ -1751,8 +1917,27 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1751
1917
|
this.focusButton(this.focusedIndex, ev);
|
|
1752
1918
|
return !isUnmodified(this.focusedIndex);
|
|
1753
1919
|
}
|
|
1754
|
-
|
|
1755
|
-
|
|
1920
|
+
/**
|
|
1921
|
+
* @hidden
|
|
1922
|
+
*/
|
|
1923
|
+
handleClick(ev, button) {
|
|
1924
|
+
button.click.emit(ev);
|
|
1925
|
+
this.onButtonClick(ev);
|
|
1926
|
+
this.overflowSelectedChangeHandler(button);
|
|
1927
|
+
}
|
|
1928
|
+
/**
|
|
1929
|
+
* @hidden
|
|
1930
|
+
*/
|
|
1931
|
+
getIconClasses(button) {
|
|
1932
|
+
if (button.overflowOptions.icon) {
|
|
1933
|
+
return `${button.overflowOptions.icon}`;
|
|
1934
|
+
}
|
|
1935
|
+
if (button.overflowOptions.iconClass) {
|
|
1936
|
+
return button.overflowOptions.iconClass;
|
|
1937
|
+
}
|
|
1938
|
+
if (button.overflowOptions.svgIcon) {
|
|
1939
|
+
return button.overflowOptions.svgIcon;
|
|
1940
|
+
}
|
|
1756
1941
|
}
|
|
1757
1942
|
focusButton(index, ev) {
|
|
1758
1943
|
var _a;
|
|
@@ -1763,9 +1948,10 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1763
1948
|
}
|
|
1764
1949
|
}
|
|
1765
1950
|
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: "
|
|
1951
|
+
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
1952
|
<ng-template #toolbarTemplate>
|
|
1768
1953
|
<kendo-buttongroup
|
|
1954
|
+
class="k-toolbar-button-group"
|
|
1769
1955
|
#toolbarButtonGroup
|
|
1770
1956
|
[tabIndex]="-1"
|
|
1771
1957
|
[selection]="selection"
|
|
@@ -1787,6 +1973,7 @@ ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
1787
1973
|
[themeColor]="button.fillMode ? button.themeColor : null"
|
|
1788
1974
|
[icon]="button.toolbarOptions.icon"
|
|
1789
1975
|
[iconClass]="button.toolbarOptions.iconClass"
|
|
1976
|
+
[svgIcon]="button.toolbarOptions.svgIcon"
|
|
1790
1977
|
[imageUrl]="button.toolbarOptions.imageUrl"
|
|
1791
1978
|
(click)="button.click.emit($event); onButtonClick($event)"
|
|
1792
1979
|
(pointerdown)="button.pointerdown.emit($event)"
|
|
@@ -1797,37 +1984,31 @@ ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
1797
1984
|
</kendo-buttongroup>
|
|
1798
1985
|
</ng-template>
|
|
1799
1986
|
<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"
|
|
1987
|
+
<ng-container *ngFor="let button of buttonComponents">
|
|
1988
|
+
<div #listItem
|
|
1989
|
+
tabindex="-1"
|
|
1990
|
+
role="menuitem"
|
|
1991
|
+
class="k-item k-menu-item"
|
|
1992
|
+
[class.k-disabled]="disabled || button.disabled"
|
|
1812
1993
|
[ngStyle]="button.style"
|
|
1813
1994
|
[ngClass]="button.className"
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
</
|
|
1828
|
-
</
|
|
1995
|
+
(click)="handleClick($event, button)">
|
|
1996
|
+
<span
|
|
1997
|
+
class="k-link k-menu-link"
|
|
1998
|
+
[class.k-selected]="button.selected"
|
|
1999
|
+
>
|
|
2000
|
+
<kendo-icon-wrapper
|
|
2001
|
+
*ngIf="button.overflowOptions.icon || button.overflowOptions.iconClass || button.overflowOptions.svgIcon"
|
|
2002
|
+
[name]="button.overflowOptions.icon"
|
|
2003
|
+
[customFontClass]="button.overflowOptions.iconClass"
|
|
2004
|
+
[svgIcon]="button.overflowOptions.svgIcon"
|
|
2005
|
+
></kendo-icon-wrapper>
|
|
2006
|
+
<span *ngIf="button.overflowOptions.text" class="k-menu-link-text">{{button.overflowOptions.text}}</span>
|
|
2007
|
+
</span>
|
|
2008
|
+
</div>
|
|
2009
|
+
</ng-container>
|
|
1829
2010
|
</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: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
2011
|
+
`, 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"] }, { type: i2$1.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1831
2012
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonGroupComponent, decorators: [{
|
|
1832
2013
|
type: Component,
|
|
1833
2014
|
args: [{
|
|
@@ -1837,6 +2018,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1837
2018
|
template: `
|
|
1838
2019
|
<ng-template #toolbarTemplate>
|
|
1839
2020
|
<kendo-buttongroup
|
|
2021
|
+
class="k-toolbar-button-group"
|
|
1840
2022
|
#toolbarButtonGroup
|
|
1841
2023
|
[tabIndex]="-1"
|
|
1842
2024
|
[selection]="selection"
|
|
@@ -1858,6 +2040,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1858
2040
|
[themeColor]="button.fillMode ? button.themeColor : null"
|
|
1859
2041
|
[icon]="button.toolbarOptions.icon"
|
|
1860
2042
|
[iconClass]="button.toolbarOptions.iconClass"
|
|
2043
|
+
[svgIcon]="button.toolbarOptions.svgIcon"
|
|
1861
2044
|
[imageUrl]="button.toolbarOptions.imageUrl"
|
|
1862
2045
|
(click)="button.click.emit($event); onButtonClick($event)"
|
|
1863
2046
|
(pointerdown)="button.pointerdown.emit($event)"
|
|
@@ -1868,35 +2051,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1868
2051
|
</kendo-buttongroup>
|
|
1869
2052
|
</ng-template>
|
|
1870
2053
|
<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"
|
|
2054
|
+
<ng-container *ngFor="let button of buttonComponents">
|
|
2055
|
+
<div #listItem
|
|
2056
|
+
tabindex="-1"
|
|
2057
|
+
role="menuitem"
|
|
2058
|
+
class="k-item k-menu-item"
|
|
2059
|
+
[class.k-disabled]="disabled || button.disabled"
|
|
1883
2060
|
[ngStyle]="button.style"
|
|
1884
2061
|
[ngClass]="button.className"
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
</
|
|
1899
|
-
</
|
|
2062
|
+
(click)="handleClick($event, button)">
|
|
2063
|
+
<span
|
|
2064
|
+
class="k-link k-menu-link"
|
|
2065
|
+
[class.k-selected]="button.selected"
|
|
2066
|
+
>
|
|
2067
|
+
<kendo-icon-wrapper
|
|
2068
|
+
*ngIf="button.overflowOptions.icon || button.overflowOptions.iconClass || button.overflowOptions.svgIcon"
|
|
2069
|
+
[name]="button.overflowOptions.icon"
|
|
2070
|
+
[customFontClass]="button.overflowOptions.iconClass"
|
|
2071
|
+
[svgIcon]="button.overflowOptions.svgIcon"
|
|
2072
|
+
></kendo-icon-wrapper>
|
|
2073
|
+
<span *ngIf="button.overflowOptions.text" class="k-menu-link-text">{{button.overflowOptions.text}}</span>
|
|
2074
|
+
</span>
|
|
2075
|
+
</div>
|
|
2076
|
+
</ng-container>
|
|
1900
2077
|
</ng-template>
|
|
1901
2078
|
`
|
|
1902
2079
|
}]
|
|
@@ -1914,102 +2091,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1914
2091
|
}], popupTemplate: [{
|
|
1915
2092
|
type: ViewChild,
|
|
1916
2093
|
args: ['popupTemplate', { static: true }]
|
|
1917
|
-
}], buttonComponents: [{
|
|
1918
|
-
type: ContentChildren,
|
|
1919
|
-
args: [forwardRef(() => ToolBarButtonComponent)]
|
|
1920
2094
|
}], toolbarButtonGroup: [{
|
|
1921
2095
|
type: ViewChild,
|
|
1922
2096
|
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: [{
|
|
2097
|
+
}], overflowListItems: [{
|
|
2011
2098
|
type: ViewChildren,
|
|
2012
|
-
args: ['
|
|
2099
|
+
args: ['listItem']
|
|
2100
|
+
}], buttonComponents: [{
|
|
2101
|
+
type: ContentChildren,
|
|
2102
|
+
args: [forwardRef(() => ToolBarButtonComponent)]
|
|
2013
2103
|
}] } });
|
|
2014
2104
|
|
|
2015
2105
|
/**
|
|
@@ -2072,12 +2162,14 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
2072
2162
|
text: '',
|
|
2073
2163
|
icon: '',
|
|
2074
2164
|
iconClass: '',
|
|
2165
|
+
svgIcon: null,
|
|
2075
2166
|
imageUrl: ''
|
|
2076
2167
|
};
|
|
2077
2168
|
this.overflowOptions = {
|
|
2078
2169
|
text: '',
|
|
2079
2170
|
icon: '',
|
|
2080
2171
|
iconClass: '',
|
|
2172
|
+
svgIcon: null,
|
|
2081
2173
|
imageUrl: ''
|
|
2082
2174
|
};
|
|
2083
2175
|
this._popupSettings = { animate: true, popupClass: '' };
|
|
@@ -2165,13 +2257,13 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
2165
2257
|
this.setTextDisplayMode();
|
|
2166
2258
|
}
|
|
2167
2259
|
get overflowButtons() {
|
|
2168
|
-
return [...this.
|
|
2260
|
+
return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
|
|
2169
2261
|
}
|
|
2170
2262
|
/**
|
|
2171
2263
|
* @hidden
|
|
2172
2264
|
*/
|
|
2173
2265
|
onButtonListClick(ev) {
|
|
2174
|
-
this.focusedIndex = this.
|
|
2266
|
+
this.focusedIndex = this.overflowListItems
|
|
2175
2267
|
.toArray()
|
|
2176
2268
|
.findIndex(b => b.nativeElement.contains(ev.target));
|
|
2177
2269
|
}
|
|
@@ -2210,6 +2302,26 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
2210
2302
|
return !isUnmodified(this.focusedIndex);
|
|
2211
2303
|
}
|
|
2212
2304
|
}
|
|
2305
|
+
/**
|
|
2306
|
+
* @hidden
|
|
2307
|
+
*/
|
|
2308
|
+
getText(dataItem) {
|
|
2309
|
+
if (dataItem) {
|
|
2310
|
+
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
2311
|
+
}
|
|
2312
|
+
return undefined;
|
|
2313
|
+
}
|
|
2314
|
+
/**
|
|
2315
|
+
* @hidden
|
|
2316
|
+
*/
|
|
2317
|
+
handleClick(ev, item, index) {
|
|
2318
|
+
this.onButtonListClick(ev);
|
|
2319
|
+
const dataItem = this.data[index];
|
|
2320
|
+
if (item.click) {
|
|
2321
|
+
item.click(dataItem);
|
|
2322
|
+
}
|
|
2323
|
+
this.itemClick.emit(dataItem);
|
|
2324
|
+
}
|
|
2213
2325
|
focusButton(index, ev) {
|
|
2214
2326
|
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
|
|
2215
2327
|
this.overflowButtons[index].nativeElement.focus();
|
|
@@ -2221,12 +2333,14 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
2221
2333
|
}
|
|
2222
2334
|
}
|
|
2223
2335
|
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: "
|
|
2336
|
+
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
2337
|
<ng-template #toolbarTemplate>
|
|
2226
2338
|
<kendo-dropdownbutton
|
|
2227
2339
|
#toolbarDropDownButton
|
|
2340
|
+
class="k-toolbar-menu-button"
|
|
2228
2341
|
[icon]="toolbarOptions.icon"
|
|
2229
2342
|
[iconClass]="toolbarOptions.iconClass"
|
|
2343
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
2230
2344
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
2231
2345
|
[buttonClass]="buttonClass"
|
|
2232
2346
|
[disabled]="disabled"
|
|
@@ -2244,31 +2358,45 @@ ToolBarDropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2244
2358
|
</kendo-dropdownbutton>
|
|
2245
2359
|
</ng-template>
|
|
2246
2360
|
<ng-template #popupTemplate>
|
|
2247
|
-
<
|
|
2248
|
-
type="button"
|
|
2361
|
+
<div
|
|
2249
2362
|
tabindex="-1"
|
|
2250
|
-
|
|
2251
|
-
class="k-
|
|
2252
|
-
[
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2363
|
+
role="menuitem"
|
|
2364
|
+
class="k-item k-menu-item k-disabled"
|
|
2365
|
+
[ngClass]="buttonClass">
|
|
2366
|
+
<span
|
|
2367
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}"
|
|
2368
|
+
>
|
|
2369
|
+
<kendo-icon-wrapper
|
|
2370
|
+
*ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
|
|
2371
|
+
[name]="overflowOptions.icon"
|
|
2372
|
+
[customFontClass]="overflowOptions.iconClass"
|
|
2373
|
+
[svgIcon]="overflowOptions.svgIcon"
|
|
2374
|
+
></kendo-icon-wrapper>
|
|
2375
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2376
|
+
</span>
|
|
2377
|
+
</div>
|
|
2378
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2379
|
+
<div #listItem
|
|
2380
|
+
tabindex="-1"
|
|
2381
|
+
role="menuitem"
|
|
2382
|
+
class="k-item k-menu-item"
|
|
2383
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2384
|
+
(click)="handleClick($event, item, i)">
|
|
2385
|
+
<span
|
|
2386
|
+
class="k-link k-menu-link"
|
|
2387
|
+
>
|
|
2388
|
+
<kendo-icon-wrapper
|
|
2389
|
+
*ngIf="item.icon || item.iconClass || item.svgIcon"
|
|
2390
|
+
[name]="item.icon"
|
|
2391
|
+
[customFontClass]="item.iconClass"
|
|
2392
|
+
[svgIcon]="item.svgIcon"
|
|
2393
|
+
></kendo-icon-wrapper>
|
|
2394
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2395
|
+
</span>
|
|
2396
|
+
</div>
|
|
2397
|
+
</ng-container>
|
|
2270
2398
|
</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:
|
|
2399
|
+
`, 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: i2$1.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
2272
2400
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarDropDownButtonComponent, decorators: [{
|
|
2273
2401
|
type: Component,
|
|
2274
2402
|
args: [{
|
|
@@ -2279,8 +2407,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2279
2407
|
<ng-template #toolbarTemplate>
|
|
2280
2408
|
<kendo-dropdownbutton
|
|
2281
2409
|
#toolbarDropDownButton
|
|
2410
|
+
class="k-toolbar-menu-button"
|
|
2282
2411
|
[icon]="toolbarOptions.icon"
|
|
2283
2412
|
[iconClass]="toolbarOptions.iconClass"
|
|
2413
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
2284
2414
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
2285
2415
|
[buttonClass]="buttonClass"
|
|
2286
2416
|
[disabled]="disabled"
|
|
@@ -2298,29 +2428,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2298
2428
|
</kendo-dropdownbutton>
|
|
2299
2429
|
</ng-template>
|
|
2300
2430
|
<ng-template #popupTemplate>
|
|
2301
|
-
<
|
|
2302
|
-
type="button"
|
|
2431
|
+
<div
|
|
2303
2432
|
tabindex="-1"
|
|
2304
|
-
|
|
2305
|
-
class="k-
|
|
2306
|
-
[
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2433
|
+
role="menuitem"
|
|
2434
|
+
class="k-item k-menu-item k-disabled"
|
|
2435
|
+
[ngClass]="buttonClass">
|
|
2436
|
+
<span
|
|
2437
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}"
|
|
2438
|
+
>
|
|
2439
|
+
<kendo-icon-wrapper
|
|
2440
|
+
*ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
|
|
2441
|
+
[name]="overflowOptions.icon"
|
|
2442
|
+
[customFontClass]="overflowOptions.iconClass"
|
|
2443
|
+
[svgIcon]="overflowOptions.svgIcon"
|
|
2444
|
+
></kendo-icon-wrapper>
|
|
2445
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2446
|
+
</span>
|
|
2447
|
+
</div>
|
|
2448
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2449
|
+
<div #listItem
|
|
2450
|
+
tabindex="-1"
|
|
2451
|
+
role="menuitem"
|
|
2452
|
+
class="k-item k-menu-item"
|
|
2453
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2454
|
+
(click)="handleClick($event, item, i)">
|
|
2455
|
+
<span
|
|
2456
|
+
class="k-link k-menu-link"
|
|
2457
|
+
>
|
|
2458
|
+
<kendo-icon-wrapper
|
|
2459
|
+
*ngIf="item.icon || item.iconClass || item.svgIcon"
|
|
2460
|
+
[name]="item.icon"
|
|
2461
|
+
[customFontClass]="item.iconClass"
|
|
2462
|
+
[svgIcon]="item.svgIcon"
|
|
2463
|
+
></kendo-icon-wrapper>
|
|
2464
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2465
|
+
</span>
|
|
2466
|
+
</div>
|
|
2467
|
+
</ng-container>
|
|
2324
2468
|
</ng-template>
|
|
2325
2469
|
`
|
|
2326
2470
|
}]
|
|
@@ -2372,12 +2516,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2372
2516
|
}], dropDownButtonComponent: [{
|
|
2373
2517
|
type: ViewChild,
|
|
2374
2518
|
args: [DropDownButtonComponent, { static: false }]
|
|
2519
|
+
}], overflowListItems: [{
|
|
2520
|
+
type: ViewChildren,
|
|
2521
|
+
args: ['listItem']
|
|
2375
2522
|
}], toolbarDropDownButton: [{
|
|
2376
2523
|
type: ViewChild,
|
|
2377
2524
|
args: ['toolbarDropDownButton', { static: false }]
|
|
2378
|
-
}], overflowDropDownButtonButtonList: [{
|
|
2379
|
-
type: ViewChild,
|
|
2380
|
-
args: ['overflowDropDownButtonButtonList', { static: false }]
|
|
2381
2525
|
}] } });
|
|
2382
2526
|
|
|
2383
2527
|
/**
|
|
@@ -2452,12 +2596,14 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
2452
2596
|
text: '',
|
|
2453
2597
|
icon: '',
|
|
2454
2598
|
iconClass: '',
|
|
2599
|
+
svgIcon: null,
|
|
2455
2600
|
imageUrl: ''
|
|
2456
2601
|
};
|
|
2457
2602
|
this.overflowOptions = {
|
|
2458
2603
|
text: '',
|
|
2459
2604
|
icon: '',
|
|
2460
2605
|
iconClass: '',
|
|
2606
|
+
svgIcon: null,
|
|
2461
2607
|
imageUrl: ''
|
|
2462
2608
|
};
|
|
2463
2609
|
this._popupSettings = { animate: true, popupClass: '' };
|
|
@@ -2542,7 +2688,7 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
2542
2688
|
this.setTextDisplayMode();
|
|
2543
2689
|
}
|
|
2544
2690
|
get overflowButtons() {
|
|
2545
|
-
return [this.
|
|
2691
|
+
return [this.overflowMainButton, ...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
|
|
2546
2692
|
}
|
|
2547
2693
|
/**
|
|
2548
2694
|
* @hidden
|
|
@@ -2592,6 +2738,26 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
2592
2738
|
return !isUnmodified(this.focusedIndex);
|
|
2593
2739
|
}
|
|
2594
2740
|
}
|
|
2741
|
+
/**
|
|
2742
|
+
* @hidden
|
|
2743
|
+
*/
|
|
2744
|
+
getText(dataItem) {
|
|
2745
|
+
if (dataItem) {
|
|
2746
|
+
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
2747
|
+
}
|
|
2748
|
+
return undefined;
|
|
2749
|
+
}
|
|
2750
|
+
/**
|
|
2751
|
+
* @hidden
|
|
2752
|
+
*/
|
|
2753
|
+
handleClick(ev, item, index) {
|
|
2754
|
+
this.onButtonListClick(ev);
|
|
2755
|
+
const dataItem = this.data[index];
|
|
2756
|
+
if (item.click) {
|
|
2757
|
+
item.click(dataItem);
|
|
2758
|
+
}
|
|
2759
|
+
this.itemClick.emit(dataItem);
|
|
2760
|
+
}
|
|
2595
2761
|
focusButton(index, ev) {
|
|
2596
2762
|
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown' || ev.type === 'click') {
|
|
2597
2763
|
this.overflowButtons[index].nativeElement.focus();
|
|
@@ -2603,14 +2769,16 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
2603
2769
|
}
|
|
2604
2770
|
}
|
|
2605
2771
|
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: "
|
|
2772
|
+
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
2773
|
<ng-template #toolbarTemplate>
|
|
2608
2774
|
<kendo-splitbutton
|
|
2609
2775
|
#toolbarSplitButton
|
|
2776
|
+
class="k-toolbar-split-button"
|
|
2610
2777
|
[data]="data"
|
|
2611
2778
|
[text]="toolbarOptions.text"
|
|
2612
2779
|
[icon]="toolbarOptions.icon"
|
|
2613
2780
|
[iconClass]="toolbarOptions.iconClass"
|
|
2781
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
2614
2782
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
2615
2783
|
[buttonClass]="buttonClass"
|
|
2616
2784
|
[arrowButtonClass]="arrowButtonClass"
|
|
@@ -2629,36 +2797,49 @@ ToolBarSplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
2629
2797
|
</kendo-splitbutton>
|
|
2630
2798
|
</ng-template>
|
|
2631
2799
|
<ng-template #popupTemplate>
|
|
2632
|
-
<
|
|
2633
|
-
#overflowSplitButton
|
|
2634
|
-
type="button"
|
|
2800
|
+
<div #overflowMainButton
|
|
2635
2801
|
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"
|
|
2802
|
+
role="menuitem"
|
|
2803
|
+
class="k-item k-menu-item"
|
|
2804
|
+
[class.k-disabled]="disabled"
|
|
2644
2805
|
[ngClass]="buttonClass"
|
|
2645
|
-
(click)="onMainButtonClick($event)"
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
>
|
|
2659
|
-
|
|
2806
|
+
(click)="onMainButtonClick($event)">
|
|
2807
|
+
<span
|
|
2808
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}"
|
|
2809
|
+
>
|
|
2810
|
+
<kendo-icon-wrapper
|
|
2811
|
+
*ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
|
|
2812
|
+
[name]="overflowOptions.icon"
|
|
2813
|
+
[customFontClass]="overflowOptions.iconClass"
|
|
2814
|
+
[svgIcon]="overflowOptions.svgIcon"
|
|
2815
|
+
>
|
|
2816
|
+
</kendo-icon-wrapper>
|
|
2817
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2818
|
+
</span>
|
|
2819
|
+
</div>
|
|
2820
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2821
|
+
<div #listItem
|
|
2822
|
+
tabindex="-1"
|
|
2823
|
+
role="menuitem"
|
|
2824
|
+
class="k-item k-menu-item"
|
|
2825
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2826
|
+
(click)="handleClick($event, item, i)">
|
|
2827
|
+
<span
|
|
2828
|
+
class="k-link k-menu-link"
|
|
2829
|
+
>
|
|
2830
|
+
<kendo-icon-wrapper
|
|
2831
|
+
*ngIf="item.icon || item.iconClass || item.svgIcon"
|
|
2832
|
+
[name]="item.icon"
|
|
2833
|
+
[customFontClass]="item.iconClass"
|
|
2834
|
+
[svgIcon]="item.svgIcon"
|
|
2835
|
+
>
|
|
2836
|
+
</kendo-icon-wrapper>
|
|
2837
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2838
|
+
</span>
|
|
2839
|
+
</div>
|
|
2840
|
+
</ng-container>
|
|
2660
2841
|
</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:
|
|
2842
|
+
`, 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: i2$1.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
2662
2843
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarSplitButtonComponent, decorators: [{
|
|
2663
2844
|
type: Component,
|
|
2664
2845
|
args: [{
|
|
@@ -2669,10 +2850,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2669
2850
|
<ng-template #toolbarTemplate>
|
|
2670
2851
|
<kendo-splitbutton
|
|
2671
2852
|
#toolbarSplitButton
|
|
2853
|
+
class="k-toolbar-split-button"
|
|
2672
2854
|
[data]="data"
|
|
2673
2855
|
[text]="toolbarOptions.text"
|
|
2674
2856
|
[icon]="toolbarOptions.icon"
|
|
2675
2857
|
[iconClass]="toolbarOptions.iconClass"
|
|
2858
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
2676
2859
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
2677
2860
|
[buttonClass]="buttonClass"
|
|
2678
2861
|
[arrowButtonClass]="arrowButtonClass"
|
|
@@ -2691,34 +2874,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2691
2874
|
</kendo-splitbutton>
|
|
2692
2875
|
</ng-template>
|
|
2693
2876
|
<ng-template #popupTemplate>
|
|
2694
|
-
<
|
|
2695
|
-
#overflowSplitButton
|
|
2696
|
-
type="button"
|
|
2877
|
+
<div #overflowMainButton
|
|
2697
2878
|
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"
|
|
2879
|
+
role="menuitem"
|
|
2880
|
+
class="k-item k-menu-item"
|
|
2881
|
+
[class.k-disabled]="disabled"
|
|
2706
2882
|
[ngClass]="buttonClass"
|
|
2707
|
-
(click)="onMainButtonClick($event)"
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
>
|
|
2721
|
-
|
|
2883
|
+
(click)="onMainButtonClick($event)">
|
|
2884
|
+
<span
|
|
2885
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}"
|
|
2886
|
+
>
|
|
2887
|
+
<kendo-icon-wrapper
|
|
2888
|
+
*ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
|
|
2889
|
+
[name]="overflowOptions.icon"
|
|
2890
|
+
[customFontClass]="overflowOptions.iconClass"
|
|
2891
|
+
[svgIcon]="overflowOptions.svgIcon"
|
|
2892
|
+
>
|
|
2893
|
+
</kendo-icon-wrapper>
|
|
2894
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2895
|
+
</span>
|
|
2896
|
+
</div>
|
|
2897
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2898
|
+
<div #listItem
|
|
2899
|
+
tabindex="-1"
|
|
2900
|
+
role="menuitem"
|
|
2901
|
+
class="k-item k-menu-item"
|
|
2902
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2903
|
+
(click)="handleClick($event, item, i)">
|
|
2904
|
+
<span
|
|
2905
|
+
class="k-link k-menu-link"
|
|
2906
|
+
>
|
|
2907
|
+
<kendo-icon-wrapper
|
|
2908
|
+
*ngIf="item.icon || item.iconClass || item.svgIcon"
|
|
2909
|
+
[name]="item.icon"
|
|
2910
|
+
[customFontClass]="item.iconClass"
|
|
2911
|
+
[svgIcon]="item.svgIcon"
|
|
2912
|
+
>
|
|
2913
|
+
</kendo-icon-wrapper>
|
|
2914
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2915
|
+
</span>
|
|
2916
|
+
</div>
|
|
2917
|
+
</ng-container>
|
|
2722
2918
|
</ng-template>
|
|
2723
2919
|
`
|
|
2724
2920
|
}]
|
|
@@ -2771,12 +2967,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2771
2967
|
}], toolbarSplitButton: [{
|
|
2772
2968
|
type: ViewChild,
|
|
2773
2969
|
args: ['toolbarSplitButton', { static: false }]
|
|
2774
|
-
}],
|
|
2775
|
-
type: ViewChild,
|
|
2776
|
-
args: ['overflowSplitButton', { read: ElementRef, static: false }]
|
|
2777
|
-
}], overflowSplitButtonButtonList: [{
|
|
2970
|
+
}], overflowMainButton: [{
|
|
2778
2971
|
type: ViewChild,
|
|
2779
|
-
args: ['
|
|
2972
|
+
args: ['overflowMainButton', { read: ElementRef }]
|
|
2973
|
+
}], overflowListItems: [{
|
|
2974
|
+
type: ViewChildren,
|
|
2975
|
+
args: ['listItem']
|
|
2780
2976
|
}] } });
|
|
2781
2977
|
|
|
2782
2978
|
/**
|
|
@@ -2817,6 +3013,12 @@ ToolBarSeparatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
2817
3013
|
<ng-template #toolbarTemplate>
|
|
2818
3014
|
<div class="k-separator"></div>
|
|
2819
3015
|
</ng-template>
|
|
3016
|
+
|
|
3017
|
+
<ng-template #popupTemplate>
|
|
3018
|
+
<div class="k-item k-menu-item">
|
|
3019
|
+
<div class="k-separator k-separator-horizontal"></div>
|
|
3020
|
+
</div>
|
|
3021
|
+
</ng-template>
|
|
2820
3022
|
`, isInline: true });
|
|
2821
3023
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarSeparatorComponent, decorators: [{
|
|
2822
3024
|
type: Component,
|
|
@@ -2828,6 +3030,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2828
3030
|
<ng-template #toolbarTemplate>
|
|
2829
3031
|
<div class="k-separator"></div>
|
|
2830
3032
|
</ng-template>
|
|
3033
|
+
|
|
3034
|
+
<ng-template #popupTemplate>
|
|
3035
|
+
<div class="k-item k-menu-item">
|
|
3036
|
+
<div class="k-separator k-separator-horizontal"></div>
|
|
3037
|
+
</div>
|
|
3038
|
+
</ng-template>
|
|
2831
3039
|
`
|
|
2832
3040
|
}]
|
|
2833
3041
|
}], ctorParameters: function () { return []; }, propDecorators: { toolbarTemplate: [{
|
|
@@ -2896,6 +3104,95 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2896
3104
|
args: ['popupTemplate', { static: true }]
|
|
2897
3105
|
}] } });
|
|
2898
3106
|
|
|
3107
|
+
/**
|
|
3108
|
+
* @hidden
|
|
3109
|
+
*/
|
|
3110
|
+
class ToolBarButtonListComponent {
|
|
3111
|
+
constructor() {
|
|
3112
|
+
this.disabled = false;
|
|
3113
|
+
this.fillMode = 'solid';
|
|
3114
|
+
this.themeColor = 'base';
|
|
3115
|
+
this.itemClick = new EventEmitter();
|
|
3116
|
+
}
|
|
3117
|
+
getText(dataItem) {
|
|
3118
|
+
if (dataItem) {
|
|
3119
|
+
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
3120
|
+
}
|
|
3121
|
+
return undefined;
|
|
3122
|
+
}
|
|
3123
|
+
onClick(item, index) {
|
|
3124
|
+
const dataItem = this.data[index];
|
|
3125
|
+
if (item.click) {
|
|
3126
|
+
item.click(dataItem);
|
|
3127
|
+
}
|
|
3128
|
+
this.itemClick.emit(dataItem);
|
|
3129
|
+
}
|
|
3130
|
+
}
|
|
3131
|
+
ToolBarButtonListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3132
|
+
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: `
|
|
3133
|
+
<button
|
|
3134
|
+
#button
|
|
3135
|
+
type="button"
|
|
3136
|
+
tabindex="-1"
|
|
3137
|
+
kendoButton
|
|
3138
|
+
[style.padding-left.px]="16"
|
|
3139
|
+
class="k-overflow-button"
|
|
3140
|
+
*ngFor="let item of data; let i = index"
|
|
3141
|
+
[disabled]="disabled || item.disabled"
|
|
3142
|
+
[icon]="item.icon"
|
|
3143
|
+
[iconClass]="item.iconClass"
|
|
3144
|
+
[svgIcon]="item.svgIcon"
|
|
3145
|
+
[imageUrl]="item.imageUrl"
|
|
3146
|
+
[fillMode]="fillMode"
|
|
3147
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
3148
|
+
(click)="onClick(item, i)"
|
|
3149
|
+
>
|
|
3150
|
+
{{ getText(item) }}
|
|
3151
|
+
</button>
|
|
3152
|
+
`, 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"] }] });
|
|
3153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonListComponent, decorators: [{
|
|
3154
|
+
type: Component,
|
|
3155
|
+
args: [{
|
|
3156
|
+
selector: 'kendo-toolbar-buttonlist',
|
|
3157
|
+
template: `
|
|
3158
|
+
<button
|
|
3159
|
+
#button
|
|
3160
|
+
type="button"
|
|
3161
|
+
tabindex="-1"
|
|
3162
|
+
kendoButton
|
|
3163
|
+
[style.padding-left.px]="16"
|
|
3164
|
+
class="k-overflow-button"
|
|
3165
|
+
*ngFor="let item of data; let i = index"
|
|
3166
|
+
[disabled]="disabled || item.disabled"
|
|
3167
|
+
[icon]="item.icon"
|
|
3168
|
+
[iconClass]="item.iconClass"
|
|
3169
|
+
[svgIcon]="item.svgIcon"
|
|
3170
|
+
[imageUrl]="item.imageUrl"
|
|
3171
|
+
[fillMode]="fillMode"
|
|
3172
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
3173
|
+
(click)="onClick(item, i)"
|
|
3174
|
+
>
|
|
3175
|
+
{{ getText(item) }}
|
|
3176
|
+
</button>
|
|
3177
|
+
`
|
|
3178
|
+
}]
|
|
3179
|
+
}], propDecorators: { data: [{
|
|
3180
|
+
type: Input
|
|
3181
|
+
}], textField: [{
|
|
3182
|
+
type: Input
|
|
3183
|
+
}], disabled: [{
|
|
3184
|
+
type: Input
|
|
3185
|
+
}], fillMode: [{
|
|
3186
|
+
type: Input
|
|
3187
|
+
}], themeColor: [{
|
|
3188
|
+
type: Input
|
|
3189
|
+
}], itemClick: [{
|
|
3190
|
+
type: Output
|
|
3191
|
+
}], buttons: [{
|
|
3192
|
+
type: ViewChildren,
|
|
3193
|
+
args: ['button', { read: ElementRef }]
|
|
3194
|
+
}] } });
|
|
3195
|
+
|
|
2899
3196
|
/**
|
|
2900
3197
|
* Custom component messages override default component messages.
|
|
2901
3198
|
*/
|
|
@@ -2968,20 +3265,20 @@ ToolBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
2968
3265
|
ToolBarSpacerComponent, ToolBarRendererComponent,
|
|
2969
3266
|
ToolBarButtonListComponent,
|
|
2970
3267
|
ToolbarCustomMessagesComponent,
|
|
2971
|
-
LocalizedToolbarMessagesDirective], imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule], exports: [ToolBarComponent, ToolBarToolComponent,
|
|
3268
|
+
LocalizedToolbarMessagesDirective], imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule, IconsModule], exports: [ToolBarComponent, ToolBarToolComponent,
|
|
2972
3269
|
ToolBarButtonComponent,
|
|
2973
3270
|
ToolBarButtonGroupComponent,
|
|
2974
3271
|
ToolBarDropDownButtonComponent,
|
|
2975
3272
|
ToolBarSplitButtonComponent,
|
|
2976
3273
|
ToolBarSeparatorComponent,
|
|
2977
3274
|
ToolBarSpacerComponent, ToolbarCustomMessagesComponent, LocalizedToolbarMessagesDirective] });
|
|
2978
|
-
ToolBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarModule, imports: [[CommonModule, ButtonsModule, PopupModule, ResizeSensorModule]] });
|
|
3275
|
+
ToolBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarModule, imports: [[CommonModule, ButtonsModule, PopupModule, ResizeSensorModule, IconsModule]] });
|
|
2979
3276
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarModule, decorators: [{
|
|
2980
3277
|
type: NgModule,
|
|
2981
3278
|
args: [{
|
|
2982
3279
|
declarations: [ToolBarComponent, TOOLBAR_TOOLS, TOOLBAR_COMMON],
|
|
2983
3280
|
exports: [ToolBarComponent, TOOLBAR_TOOLS, ToolbarCustomMessagesComponent, LocalizedToolbarMessagesDirective],
|
|
2984
|
-
imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule]
|
|
3281
|
+
imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule, IconsModule]
|
|
2985
3282
|
}]
|
|
2986
3283
|
}] });
|
|
2987
3284
|
|