@progress/kendo-angular-toolbar 11.0.0-develop.99 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.txt +17 -17
- package/common/{constants.d.ts → size.d.ts} +3 -2
- package/esm2020/common/{constants.mjs → size.mjs} +1 -4
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/renderer.component.mjs +5 -1
- package/esm2020/toolbar.component.mjs +105 -33
- package/esm2020/toolbar.module.mjs +4 -3
- package/esm2020/tools/toolbar-button.component.mjs +99 -48
- package/esm2020/tools/toolbar-buttongroup.component.mjs +101 -70
- package/esm2020/tools/toolbar-buttonlist.component.mjs +2 -0
- package/esm2020/tools/toolbar-dropdownbutton.component.mjs +107 -54
- package/esm2020/tools/toolbar-separator.component.mjs +12 -0
- package/esm2020/tools/toolbar-splitbutton.component.mjs +114 -63
- package/esm2020/util.mjs +24 -0
- package/fesm2015/progress-kendo-angular-toolbar.mjs +648 -351
- package/fesm2020/progress-kendo-angular-toolbar.mjs +647 -351
- package/index.d.ts +1 -0
- package/package.json +8 -7
- package/renderer.component.d.ts +1 -0
- package/schematics/ngAdd/index.js +4 -2
- package/tool-options.d.ts +2 -0
- package/toolbar.component.d.ts +21 -3
- package/toolbar.module.d.ts +2 -1
- package/tools/toolbar-button.component.d.ts +23 -3
- package/tools/toolbar-buttongroup.component.d.ts +15 -4
- package/tools/toolbar-dropdownbutton.component.d.ts +10 -2
- package/tools/toolbar-splitbutton.component.d.ts +11 -3
- package/util.d.ts +22 -1
|
@@ -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,
|
|
6
|
+
import { EventEmitter, Injectable, Component, Input, Output, HostBinding, HostListener, Directive, forwardRef, ElementRef, ViewContainerRef, ContentChildren, ViewChild, ViewChildren, isDevMode, NgModule } from '@angular/core';
|
|
7
7
|
import * as i2 from '@progress/kendo-angular-popup';
|
|
8
8
|
import { PopupModule } from '@progress/kendo-angular-popup';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i7 from '@progress/kendo-angular-common';
|
|
10
10
|
import { Keys, guid, isDocumentAvailable, ResizeSensorModule } from '@progress/kendo-angular-common';
|
|
11
11
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
12
12
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
13
13
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
14
14
|
import { take, filter, takeUntil } from 'rxjs/operators';
|
|
15
15
|
import { Subject, Subscription, merge, fromEvent } from 'rxjs';
|
|
16
|
+
import { moreVerticalIcon } from '@progress/kendo-svg-icons';
|
|
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: 1674032337,
|
|
32
|
+
version: '11.0.0',
|
|
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();
|
|
@@ -968,7 +1020,10 @@ class ToolBarComponent {
|
|
|
968
1020
|
this.shrink(containerWidth, this.childrenWidth);
|
|
969
1021
|
this.stretch(containerWidth, this.childrenWidth);
|
|
970
1022
|
this.displayAnchor();
|
|
971
|
-
this.resizeSensor
|
|
1023
|
+
this.resizeSensor?.acceptSize();
|
|
1024
|
+
if (this.popupOpen) {
|
|
1025
|
+
this.toggle();
|
|
1026
|
+
}
|
|
972
1027
|
}
|
|
973
1028
|
}
|
|
974
1029
|
/**
|
|
@@ -977,6 +1032,7 @@ class ToolBarComponent {
|
|
|
977
1032
|
onPopupOpen() {
|
|
978
1033
|
this.zone.runOutsideAngular(() => {
|
|
979
1034
|
this.overflowKeydownListener = this.renderer.listen(this.popupRef.popupElement, 'keydown', (ev) => {
|
|
1035
|
+
const currentTool = this.overflowRenderedTools.toArray().find(tool => closest(ev.target, (el) => el === tool.element.nativeElement));
|
|
980
1036
|
switch (ev.keyCode) {
|
|
981
1037
|
case Keys.ArrowUp:
|
|
982
1038
|
this.zone.run(() => {
|
|
@@ -999,6 +1055,16 @@ class ToolBarComponent {
|
|
|
999
1055
|
this.navigationService.resetNavigation();
|
|
1000
1056
|
});
|
|
1001
1057
|
break;
|
|
1058
|
+
case Keys.Enter:
|
|
1059
|
+
case Keys.Space:
|
|
1060
|
+
this.zone.run(() => {
|
|
1061
|
+
if (currentTool) {
|
|
1062
|
+
ev.preventDefault();
|
|
1063
|
+
ev.target.click();
|
|
1064
|
+
ev.target.focus();
|
|
1065
|
+
}
|
|
1066
|
+
});
|
|
1067
|
+
break;
|
|
1002
1068
|
default:
|
|
1003
1069
|
break;
|
|
1004
1070
|
}
|
|
@@ -1029,11 +1095,11 @@ class ToolBarComponent {
|
|
|
1029
1095
|
}
|
|
1030
1096
|
displayAnchor() {
|
|
1031
1097
|
const visibility = this.allTools.filter(t => t.overflows && t.responsive).length > 0 ? 'visible' : 'hidden';
|
|
1032
|
-
this.renderer.setStyle(this.overflowButton.nativeElement, 'visibility', visibility);
|
|
1098
|
+
this.overflowButton && this.renderer.setStyle(this.overflowButton.nativeElement, 'visibility', visibility);
|
|
1033
1099
|
}
|
|
1034
1100
|
get popupWidth() {
|
|
1035
1101
|
if (!this.popupSettings || !this.popupSettings.width) {
|
|
1036
|
-
return
|
|
1102
|
+
return 'auto';
|
|
1037
1103
|
}
|
|
1038
1104
|
return isNaN(this.popupSettings.width) ? this.popupSettings.width : `${this.popupSettings.width}px`;
|
|
1039
1105
|
}
|
|
@@ -1141,9 +1207,37 @@ class ToolBarComponent {
|
|
|
1141
1207
|
this.popupRef = null;
|
|
1142
1208
|
}
|
|
1143
1209
|
}
|
|
1210
|
+
handleClasses(value, input) {
|
|
1211
|
+
const elem = this.element.nativeElement;
|
|
1212
|
+
const classes = getStylingClasses('toolbar', input, this[input], value);
|
|
1213
|
+
if (classes.toRemove) {
|
|
1214
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
1215
|
+
}
|
|
1216
|
+
if (classes.toAdd) {
|
|
1217
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
normalizePopupClasses(classList) {
|
|
1221
|
+
let classes = ['k-menu-popup', 'k-toolbar-popup'];
|
|
1222
|
+
if (!classList) {
|
|
1223
|
+
return classes;
|
|
1224
|
+
}
|
|
1225
|
+
if (typeof classList === 'string') {
|
|
1226
|
+
classes.push(...classList.split(' '));
|
|
1227
|
+
}
|
|
1228
|
+
else if (Array.isArray(classList)) {
|
|
1229
|
+
classes = [...classes, ...classList];
|
|
1230
|
+
}
|
|
1231
|
+
else {
|
|
1232
|
+
for (const cl in classList) {
|
|
1233
|
+
classes.push(classList[cl]);
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
return classes;
|
|
1237
|
+
}
|
|
1144
1238
|
}
|
|
1145
1239
|
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-
|
|
1240
|
+
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
1241
|
RefreshService,
|
|
1148
1242
|
NavigationService,
|
|
1149
1243
|
LocalizationService,
|
|
@@ -1151,7 +1245,7 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
1151
1245
|
provide: L10N_PREFIX,
|
|
1152
1246
|
useValue: 'kendo.toolbar'
|
|
1153
1247
|
}
|
|
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: `
|
|
1248
|
+
], 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
1249
|
<ng-container kendoToolbarLocalizedMessages
|
|
1156
1250
|
i18n-moreToolsTitle="kendo.toolbar.moreToolsTitle|The title of the **more tools** button in a responsive ToolBar"
|
|
1157
1251
|
moreToolsTitle="More tools"
|
|
@@ -1167,8 +1261,12 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
1167
1261
|
></kendo-toolbar-renderer>
|
|
1168
1262
|
</ng-container>
|
|
1169
1263
|
<button
|
|
1264
|
+
kendoButton
|
|
1265
|
+
fillMode="flat"
|
|
1170
1266
|
#overflowButton
|
|
1171
1267
|
type="button"
|
|
1268
|
+
icon="more-vertical"
|
|
1269
|
+
[svgIcon]="moreVerticalIcon"
|
|
1172
1270
|
tabindex="-1"
|
|
1173
1271
|
[title]="moreToolsTitle"
|
|
1174
1272
|
[attr.aria-label]="moreToolsTitle"
|
|
@@ -1179,19 +1277,18 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
1179
1277
|
[style.visibility]="'hidden'"
|
|
1180
1278
|
[style.position]="'relative'"
|
|
1181
1279
|
[style.margin-inline-start]="'auto'"
|
|
1182
|
-
class="k-overflow-
|
|
1280
|
+
class="k-toolbar-overflow-button"
|
|
1281
|
+
[ngClass]="overflowClass"
|
|
1183
1282
|
(click)="showPopup()"
|
|
1184
1283
|
>
|
|
1185
|
-
<span class="k-icon k-i-more-vertical"></span>
|
|
1186
1284
|
</button>
|
|
1187
1285
|
<ng-template #popupTemplate>
|
|
1188
|
-
<
|
|
1189
|
-
class="k-
|
|
1286
|
+
<div
|
|
1287
|
+
class="k-menu-group k-menu-group-md"
|
|
1190
1288
|
role="menu"
|
|
1191
1289
|
[id]="popupId"
|
|
1192
1290
|
[attr.aria-labelledby]="overflowBtnId">
|
|
1193
1291
|
<ng-container *ngFor="let tool of allTools; let index = index">
|
|
1194
|
-
<li class="k-item" role="menuitem">
|
|
1195
1292
|
<kendo-toolbar-renderer
|
|
1196
1293
|
#overflowRenderer
|
|
1197
1294
|
(rendererClick)="onRendererClick($event)"
|
|
@@ -1199,13 +1296,12 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
1199
1296
|
[resizable]="overflow"
|
|
1200
1297
|
[tool]="tool"
|
|
1201
1298
|
></kendo-toolbar-renderer>
|
|
1202
|
-
</li>
|
|
1203
1299
|
</ng-container>
|
|
1204
|
-
</
|
|
1300
|
+
</div>
|
|
1205
1301
|
</ng-template>
|
|
1206
1302
|
<ng-container #container></ng-container>
|
|
1207
1303
|
<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:
|
|
1304
|
+
`, 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
1305
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarComponent, decorators: [{
|
|
1210
1306
|
type: Component,
|
|
1211
1307
|
args: [{
|
|
@@ -1236,8 +1332,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1236
1332
|
></kendo-toolbar-renderer>
|
|
1237
1333
|
</ng-container>
|
|
1238
1334
|
<button
|
|
1335
|
+
kendoButton
|
|
1336
|
+
fillMode="flat"
|
|
1239
1337
|
#overflowButton
|
|
1240
1338
|
type="button"
|
|
1339
|
+
icon="more-vertical"
|
|
1340
|
+
[svgIcon]="moreVerticalIcon"
|
|
1241
1341
|
tabindex="-1"
|
|
1242
1342
|
[title]="moreToolsTitle"
|
|
1243
1343
|
[attr.aria-label]="moreToolsTitle"
|
|
@@ -1248,19 +1348,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1248
1348
|
[style.visibility]="'hidden'"
|
|
1249
1349
|
[style.position]="'relative'"
|
|
1250
1350
|
[style.margin-inline-start]="'auto'"
|
|
1251
|
-
class="k-overflow-
|
|
1351
|
+
class="k-toolbar-overflow-button"
|
|
1352
|
+
[ngClass]="overflowClass"
|
|
1252
1353
|
(click)="showPopup()"
|
|
1253
1354
|
>
|
|
1254
|
-
<span class="k-icon k-i-more-vertical"></span>
|
|
1255
1355
|
</button>
|
|
1256
1356
|
<ng-template #popupTemplate>
|
|
1257
|
-
<
|
|
1258
|
-
class="k-
|
|
1357
|
+
<div
|
|
1358
|
+
class="k-menu-group k-menu-group-md"
|
|
1259
1359
|
role="menu"
|
|
1260
1360
|
[id]="popupId"
|
|
1261
1361
|
[attr.aria-labelledby]="overflowBtnId">
|
|
1262
1362
|
<ng-container *ngFor="let tool of allTools; let index = index">
|
|
1263
|
-
<li class="k-item" role="menuitem">
|
|
1264
1363
|
<kendo-toolbar-renderer
|
|
1265
1364
|
#overflowRenderer
|
|
1266
1365
|
(rendererClick)="onRendererClick($event)"
|
|
@@ -1268,9 +1367,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1268
1367
|
[resizable]="overflow"
|
|
1269
1368
|
[tool]="tool"
|
|
1270
1369
|
></kendo-toolbar-renderer>
|
|
1271
|
-
</li>
|
|
1272
1370
|
</ng-container>
|
|
1273
|
-
</
|
|
1371
|
+
</div>
|
|
1274
1372
|
</ng-template>
|
|
1275
1373
|
<ng-container #container></ng-container>
|
|
1276
1374
|
<kendo-resize-sensor *ngIf="overflow" #resizeSensor></kendo-resize-sensor>
|
|
@@ -1284,6 +1382,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1284
1382
|
type: Input
|
|
1285
1383
|
}], tabindex: [{
|
|
1286
1384
|
type: Input
|
|
1385
|
+
}], size: [{
|
|
1386
|
+
type: Input
|
|
1287
1387
|
}], tabIndex: [{
|
|
1288
1388
|
type: Input,
|
|
1289
1389
|
args: ['tabIndex']
|
|
@@ -1296,7 +1396,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1296
1396
|
args: [ToolBarToolComponent]
|
|
1297
1397
|
}], overflowButton: [{
|
|
1298
1398
|
type: ViewChild,
|
|
1299
|
-
args: ['overflowButton', { static: false }]
|
|
1399
|
+
args: ['overflowButton', { static: false, read: ElementRef }]
|
|
1300
1400
|
}], popupTemplate: [{
|
|
1301
1401
|
type: ViewChild,
|
|
1302
1402
|
args: ['popupTemplate', { static: true }]
|
|
@@ -1312,10 +1412,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1312
1412
|
}], overflowRenderedTools: [{
|
|
1313
1413
|
type: ViewChildren,
|
|
1314
1414
|
args: ['overflowRenderer']
|
|
1315
|
-
}],
|
|
1316
|
-
type: HostBinding,
|
|
1317
|
-
args: ['class.k-widget']
|
|
1318
|
-
}, {
|
|
1415
|
+
}], hostClass: [{
|
|
1319
1416
|
type: HostBinding,
|
|
1320
1417
|
args: ['class.k-toolbar']
|
|
1321
1418
|
}], onFocus: [{
|
|
@@ -1339,8 +1436,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1339
1436
|
* Represents the [Kendo UI ToolBar Button tool for Angular]({% slug controltypes_toolbar %}#toc-buttons).
|
|
1340
1437
|
*/
|
|
1341
1438
|
class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
1342
|
-
constructor() {
|
|
1439
|
+
constructor(element, zone) {
|
|
1343
1440
|
super();
|
|
1441
|
+
this.element = element;
|
|
1442
|
+
this.zone = zone;
|
|
1344
1443
|
/**
|
|
1345
1444
|
* Specifies where button icon should be displayed
|
|
1346
1445
|
*/
|
|
@@ -1403,12 +1502,14 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
1403
1502
|
text: '',
|
|
1404
1503
|
icon: '',
|
|
1405
1504
|
iconClass: '',
|
|
1505
|
+
svgIcon: null,
|
|
1406
1506
|
imageUrl: ''
|
|
1407
1507
|
};
|
|
1408
1508
|
this.overflowOptions = {
|
|
1409
1509
|
text: '',
|
|
1410
1510
|
icon: '',
|
|
1411
1511
|
iconClass: '',
|
|
1512
|
+
svgIcon: null,
|
|
1412
1513
|
imageUrl: ''
|
|
1413
1514
|
};
|
|
1414
1515
|
this._showText = 'both';
|
|
@@ -1459,6 +1560,20 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
1459
1560
|
this.toolbarOptions.iconClass = getValueForLocation(iconClass, this.showIcon, false);
|
|
1460
1561
|
this.overflowOptions.iconClass = getValueForLocation(iconClass, this.showIcon, true);
|
|
1461
1562
|
}
|
|
1563
|
+
/**
|
|
1564
|
+
* Defines an SVGIcon to be rendered within the button.
|
|
1565
|
+
* The input can take either an [existing Kendo SVG icon](slug:svgicon_list) or a custom one.
|
|
1566
|
+
*/
|
|
1567
|
+
set svgIcon(icon) {
|
|
1568
|
+
if (isDevMode() &&
|
|
1569
|
+
icon &&
|
|
1570
|
+
(this.toolbarOptions.icon || this.overflowOptions.icon) &&
|
|
1571
|
+
(this.toolbarOptions.iconClass || this.overflowOptions.iconClass)) {
|
|
1572
|
+
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
1573
|
+
}
|
|
1574
|
+
this.toolbarOptions.svgIcon = getValueForLocation(icon, this.showIcon, false);
|
|
1575
|
+
this.overflowOptions.svgIcon = getValueForLocation(icon, this.showIcon, true);
|
|
1576
|
+
}
|
|
1462
1577
|
/**
|
|
1463
1578
|
* Defines a URL which is used for an `img` element inside the Button.
|
|
1464
1579
|
* The URL can be relative or absolute. If relative, it is evaluated with relation to the web page URL.
|
|
@@ -1499,19 +1614,45 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
1499
1614
|
this.getButton().tabIndex = -1;
|
|
1500
1615
|
return false;
|
|
1501
1616
|
}
|
|
1617
|
+
/**
|
|
1618
|
+
* @hidden
|
|
1619
|
+
*/
|
|
1620
|
+
get toolbarButtonClass() {
|
|
1621
|
+
return this.toggleable ? 'k-toolbar-toggle-button' : 'k-toolbar-button';
|
|
1622
|
+
}
|
|
1623
|
+
/**
|
|
1624
|
+
* @hidden
|
|
1625
|
+
*/
|
|
1626
|
+
handleClick(ev) {
|
|
1627
|
+
this.click.emit(ev);
|
|
1628
|
+
if (this.toggleable) {
|
|
1629
|
+
this.selected = !this.selected;
|
|
1630
|
+
this.selectedChange.emit(this.selected);
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
/**
|
|
1634
|
+
* @hidden
|
|
1635
|
+
*/
|
|
1636
|
+
selectedChangeHandler(state) {
|
|
1637
|
+
this.selected = state;
|
|
1638
|
+
this.selectedChange.emit(state);
|
|
1639
|
+
}
|
|
1502
1640
|
getButton() {
|
|
1503
1641
|
return (this.overflows ? this.overflowButtonElement : this.toolbarButtonElement).nativeElement;
|
|
1504
1642
|
}
|
|
1505
1643
|
setTextDisplayMode() {
|
|
1506
1644
|
this.toolbarOptions.text = this.showText === 'overflow' ? undefined : this.text;
|
|
1507
|
-
this.
|
|
1645
|
+
this.zone.onStable.pipe(take(1)).subscribe(() => {
|
|
1646
|
+
this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
|
|
1647
|
+
});
|
|
1508
1648
|
}
|
|
1509
1649
|
}
|
|
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: `
|
|
1650
|
+
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 });
|
|
1651
|
+
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
1652
|
<ng-template #toolbarTemplate>
|
|
1513
1653
|
<button
|
|
1514
1654
|
#toolbarButton
|
|
1655
|
+
[class]="toolbarButtonClass"
|
|
1515
1656
|
[tabindex]="tabIndex"
|
|
1516
1657
|
type="button"
|
|
1517
1658
|
kendoButton
|
|
@@ -1525,40 +1666,41 @@ ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1525
1666
|
[selected]="selected"
|
|
1526
1667
|
[icon]="toolbarOptions.icon"
|
|
1527
1668
|
[iconClass]="toolbarOptions.iconClass"
|
|
1669
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
1528
1670
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
1529
1671
|
(click)="click.emit($event)"
|
|
1530
1672
|
(pointerdown)="pointerdown.emit($event)"
|
|
1531
|
-
(selectedChange)="
|
|
1673
|
+
(selectedChange)="selectedChangeHandler($event)"
|
|
1532
1674
|
(blur)="onBlur()"
|
|
1533
1675
|
>
|
|
1534
1676
|
{{ toolbarOptions.text }}
|
|
1535
1677
|
</button>
|
|
1536
1678
|
</ng-template>
|
|
1537
1679
|
<ng-template #popupTemplate>
|
|
1538
|
-
<
|
|
1680
|
+
<div
|
|
1539
1681
|
#overflowButton
|
|
1540
1682
|
tabindex="-1"
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
class
|
|
1544
|
-
[ngStyle]="style"
|
|
1683
|
+
role="menuitem"
|
|
1684
|
+
class="k-item k-menu-item"
|
|
1685
|
+
[class.k-disabled]="disabled"
|
|
1545
1686
|
[ngClass]="className"
|
|
1546
|
-
[
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1687
|
+
[ngStyle]="style"
|
|
1688
|
+
(click)="handleClick($event)">
|
|
1689
|
+
<span
|
|
1690
|
+
class="k-link k-menu-link"
|
|
1691
|
+
[class.k-selected]="selected"
|
|
1692
|
+
>
|
|
1693
|
+
<kendo-icon-wrapper
|
|
1694
|
+
*ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
|
|
1695
|
+
[name]="overflowOptions.icon"
|
|
1696
|
+
[customFontClass]="overflowOptions.iconClass"
|
|
1697
|
+
[svgIcon]="overflowOptions.svgIcon"
|
|
1698
|
+
></kendo-icon-wrapper>
|
|
1699
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
1700
|
+
</span>
|
|
1701
|
+
</div>
|
|
1560
1702
|
</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"] }] });
|
|
1703
|
+
`, 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
1704
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonComponent, decorators: [{
|
|
1563
1705
|
type: Component,
|
|
1564
1706
|
args: [{
|
|
@@ -1569,6 +1711,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1569
1711
|
<ng-template #toolbarTemplate>
|
|
1570
1712
|
<button
|
|
1571
1713
|
#toolbarButton
|
|
1714
|
+
[class]="toolbarButtonClass"
|
|
1572
1715
|
[tabindex]="tabIndex"
|
|
1573
1716
|
type="button"
|
|
1574
1717
|
kendoButton
|
|
@@ -1582,42 +1725,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1582
1725
|
[selected]="selected"
|
|
1583
1726
|
[icon]="toolbarOptions.icon"
|
|
1584
1727
|
[iconClass]="toolbarOptions.iconClass"
|
|
1728
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
1585
1729
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
1586
1730
|
(click)="click.emit($event)"
|
|
1587
1731
|
(pointerdown)="pointerdown.emit($event)"
|
|
1588
|
-
(selectedChange)="
|
|
1732
|
+
(selectedChange)="selectedChangeHandler($event)"
|
|
1589
1733
|
(blur)="onBlur()"
|
|
1590
1734
|
>
|
|
1591
1735
|
{{ toolbarOptions.text }}
|
|
1592
1736
|
</button>
|
|
1593
1737
|
</ng-template>
|
|
1594
1738
|
<ng-template #popupTemplate>
|
|
1595
|
-
<
|
|
1739
|
+
<div
|
|
1596
1740
|
#overflowButton
|
|
1597
1741
|
tabindex="-1"
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
class
|
|
1601
|
-
[ngStyle]="style"
|
|
1742
|
+
role="menuitem"
|
|
1743
|
+
class="k-item k-menu-item"
|
|
1744
|
+
[class.k-disabled]="disabled"
|
|
1602
1745
|
[ngClass]="className"
|
|
1603
|
-
[
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1746
|
+
[ngStyle]="style"
|
|
1747
|
+
(click)="handleClick($event)">
|
|
1748
|
+
<span
|
|
1749
|
+
class="k-link k-menu-link"
|
|
1750
|
+
[class.k-selected]="selected"
|
|
1751
|
+
>
|
|
1752
|
+
<kendo-icon-wrapper
|
|
1753
|
+
*ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
|
|
1754
|
+
[name]="overflowOptions.icon"
|
|
1755
|
+
[customFontClass]="overflowOptions.iconClass"
|
|
1756
|
+
[svgIcon]="overflowOptions.svgIcon"
|
|
1757
|
+
></kendo-icon-wrapper>
|
|
1758
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
1759
|
+
</span>
|
|
1760
|
+
</div>
|
|
1617
1761
|
</ng-template>
|
|
1618
1762
|
`
|
|
1619
1763
|
}]
|
|
1620
|
-
}], ctorParameters: function () { return []; }, propDecorators: { showText: [{
|
|
1764
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { showText: [{
|
|
1621
1765
|
type: Input
|
|
1622
1766
|
}], showIcon: [{
|
|
1623
1767
|
type: Input
|
|
@@ -1647,6 +1791,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1647
1791
|
type: Input
|
|
1648
1792
|
}], iconClass: [{
|
|
1649
1793
|
type: Input
|
|
1794
|
+
}], svgIcon: [{
|
|
1795
|
+
type: Input
|
|
1650
1796
|
}], imageUrl: [{
|
|
1651
1797
|
type: Input
|
|
1652
1798
|
}], click: [{
|
|
@@ -1693,9 +1839,14 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1693
1839
|
}
|
|
1694
1840
|
}
|
|
1695
1841
|
get buttonElements() {
|
|
1696
|
-
|
|
1697
|
-
.
|
|
1698
|
-
|
|
1842
|
+
if (this.overflows) {
|
|
1843
|
+
return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))].map(el => el.nativeElement);
|
|
1844
|
+
}
|
|
1845
|
+
else {
|
|
1846
|
+
return this.toolbarButtonGroup
|
|
1847
|
+
.buttons.filter(b => !b.isDisabled)
|
|
1848
|
+
.map(b => b.element);
|
|
1849
|
+
}
|
|
1699
1850
|
}
|
|
1700
1851
|
/**
|
|
1701
1852
|
* @hidden
|
|
@@ -1717,6 +1868,20 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1717
1868
|
button.selected = state;
|
|
1718
1869
|
button.selectedChange.emit(state);
|
|
1719
1870
|
}
|
|
1871
|
+
/**
|
|
1872
|
+
* @hidden
|
|
1873
|
+
*/
|
|
1874
|
+
overflowSelectedChangeHandler(button) {
|
|
1875
|
+
if (this.selection === 'multiple') {
|
|
1876
|
+
button.selected = !button.selected;
|
|
1877
|
+
}
|
|
1878
|
+
else {
|
|
1879
|
+
const filteredButtons = this.buttonComponents.filter(b => b !== button);
|
|
1880
|
+
filteredButtons.forEach(b => b.selected = false);
|
|
1881
|
+
button.selected = !button.selected;
|
|
1882
|
+
}
|
|
1883
|
+
button.selectedChange.emit(button.selected);
|
|
1884
|
+
}
|
|
1720
1885
|
/**
|
|
1721
1886
|
* @hidden
|
|
1722
1887
|
*/
|
|
@@ -1751,8 +1916,27 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1751
1916
|
this.focusButton(this.focusedIndex, ev);
|
|
1752
1917
|
return !isUnmodified(this.focusedIndex);
|
|
1753
1918
|
}
|
|
1754
|
-
|
|
1755
|
-
|
|
1919
|
+
/**
|
|
1920
|
+
* @hidden
|
|
1921
|
+
*/
|
|
1922
|
+
handleClick(ev, button) {
|
|
1923
|
+
button.click.emit(ev);
|
|
1924
|
+
this.onButtonClick(ev);
|
|
1925
|
+
this.overflowSelectedChangeHandler(button);
|
|
1926
|
+
}
|
|
1927
|
+
/**
|
|
1928
|
+
* @hidden
|
|
1929
|
+
*/
|
|
1930
|
+
getIconClasses(button) {
|
|
1931
|
+
if (button.overflowOptions.icon) {
|
|
1932
|
+
return `${button.overflowOptions.icon}`;
|
|
1933
|
+
}
|
|
1934
|
+
if (button.overflowOptions.iconClass) {
|
|
1935
|
+
return button.overflowOptions.iconClass;
|
|
1936
|
+
}
|
|
1937
|
+
if (button.overflowOptions.svgIcon) {
|
|
1938
|
+
return button.overflowOptions.svgIcon;
|
|
1939
|
+
}
|
|
1756
1940
|
}
|
|
1757
1941
|
focusButton(index, ev) {
|
|
1758
1942
|
// Guard against focusing twice on mousedown.
|
|
@@ -1762,9 +1946,10 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
1762
1946
|
}
|
|
1763
1947
|
}
|
|
1764
1948
|
ToolBarButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1765
|
-
ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarButtonGroupComponent, selector: "kendo-toolbar-buttongroup", inputs: { disabled: "disabled", selection: "selection", width: "width", look: "look" }, providers: [LocalizationService, { provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonGroupComponent) }], queries: [{ propertyName: "buttonComponents", predicate: i0.forwardRef(function () { return ToolBarButtonComponent; }) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarButtonGroup", first: true, predicate: ["toolbarButtonGroup"], descendants: true }, { propertyName: "
|
|
1949
|
+
ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarButtonGroupComponent, selector: "kendo-toolbar-buttongroup", inputs: { disabled: "disabled", selection: "selection", width: "width", look: "look" }, providers: [LocalizationService, { provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonGroupComponent) }], queries: [{ propertyName: "buttonComponents", predicate: i0.forwardRef(function () { return ToolBarButtonComponent; }) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarButtonGroup", first: true, predicate: ["toolbarButtonGroup"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarButtonGroup"], usesInheritance: true, ngImport: i0, template: `
|
|
1766
1950
|
<ng-template #toolbarTemplate>
|
|
1767
1951
|
<kendo-buttongroup
|
|
1952
|
+
class="k-toolbar-button-group"
|
|
1768
1953
|
#toolbarButtonGroup
|
|
1769
1954
|
[tabIndex]="-1"
|
|
1770
1955
|
[selection]="selection"
|
|
@@ -1786,6 +1971,7 @@ ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
1786
1971
|
[themeColor]="button.fillMode ? button.themeColor : null"
|
|
1787
1972
|
[icon]="button.toolbarOptions.icon"
|
|
1788
1973
|
[iconClass]="button.toolbarOptions.iconClass"
|
|
1974
|
+
[svgIcon]="button.toolbarOptions.svgIcon"
|
|
1789
1975
|
[imageUrl]="button.toolbarOptions.imageUrl"
|
|
1790
1976
|
(click)="button.click.emit($event); onButtonClick($event)"
|
|
1791
1977
|
(pointerdown)="button.pointerdown.emit($event)"
|
|
@@ -1796,37 +1982,31 @@ ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
1796
1982
|
</kendo-buttongroup>
|
|
1797
1983
|
</ng-template>
|
|
1798
1984
|
<ng-template #popupTemplate>
|
|
1799
|
-
<
|
|
1800
|
-
#
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
[width]="width"
|
|
1806
|
-
>
|
|
1807
|
-
<span
|
|
1808
|
-
kendoButton
|
|
1809
|
-
class="k-overflow-button"
|
|
1810
|
-
*ngFor="let button of buttonComponents"
|
|
1985
|
+
<ng-container *ngFor="let button of buttonComponents">
|
|
1986
|
+
<div #listItem
|
|
1987
|
+
tabindex="-1"
|
|
1988
|
+
role="menuitem"
|
|
1989
|
+
class="k-item k-menu-item"
|
|
1990
|
+
[class.k-disabled]="disabled || button.disabled"
|
|
1811
1991
|
[ngStyle]="button.style"
|
|
1812
1992
|
[ngClass]="button.className"
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
</
|
|
1827
|
-
</
|
|
1993
|
+
(click)="handleClick($event, button)">
|
|
1994
|
+
<span
|
|
1995
|
+
class="k-link k-menu-link"
|
|
1996
|
+
[class.k-selected]="button.selected"
|
|
1997
|
+
>
|
|
1998
|
+
<kendo-icon-wrapper
|
|
1999
|
+
*ngIf="button.overflowOptions.icon || button.overflowOptions.iconClass || button.overflowOptions.svgIcon"
|
|
2000
|
+
[name]="button.overflowOptions.icon"
|
|
2001
|
+
[customFontClass]="button.overflowOptions.iconClass"
|
|
2002
|
+
[svgIcon]="button.overflowOptions.svgIcon"
|
|
2003
|
+
></kendo-icon-wrapper>
|
|
2004
|
+
<span *ngIf="button.overflowOptions.text" class="k-menu-link-text">{{button.overflowOptions.text}}</span>
|
|
2005
|
+
</span>
|
|
2006
|
+
</div>
|
|
2007
|
+
</ng-container>
|
|
1828
2008
|
</ng-template>
|
|
1829
|
-
`, isInline: true, components: [{ type: i1$1.ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { type: i1$1.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
2009
|
+
`, 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"] }] });
|
|
1830
2010
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonGroupComponent, decorators: [{
|
|
1831
2011
|
type: Component,
|
|
1832
2012
|
args: [{
|
|
@@ -1836,6 +2016,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1836
2016
|
template: `
|
|
1837
2017
|
<ng-template #toolbarTemplate>
|
|
1838
2018
|
<kendo-buttongroup
|
|
2019
|
+
class="k-toolbar-button-group"
|
|
1839
2020
|
#toolbarButtonGroup
|
|
1840
2021
|
[tabIndex]="-1"
|
|
1841
2022
|
[selection]="selection"
|
|
@@ -1857,6 +2038,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1857
2038
|
[themeColor]="button.fillMode ? button.themeColor : null"
|
|
1858
2039
|
[icon]="button.toolbarOptions.icon"
|
|
1859
2040
|
[iconClass]="button.toolbarOptions.iconClass"
|
|
2041
|
+
[svgIcon]="button.toolbarOptions.svgIcon"
|
|
1860
2042
|
[imageUrl]="button.toolbarOptions.imageUrl"
|
|
1861
2043
|
(click)="button.click.emit($event); onButtonClick($event)"
|
|
1862
2044
|
(pointerdown)="button.pointerdown.emit($event)"
|
|
@@ -1867,35 +2049,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1867
2049
|
</kendo-buttongroup>
|
|
1868
2050
|
</ng-template>
|
|
1869
2051
|
<ng-template #popupTemplate>
|
|
1870
|
-
<
|
|
1871
|
-
#
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
[width]="width"
|
|
1877
|
-
>
|
|
1878
|
-
<span
|
|
1879
|
-
kendoButton
|
|
1880
|
-
class="k-overflow-button"
|
|
1881
|
-
*ngFor="let button of buttonComponents"
|
|
2052
|
+
<ng-container *ngFor="let button of buttonComponents">
|
|
2053
|
+
<div #listItem
|
|
2054
|
+
tabindex="-1"
|
|
2055
|
+
role="menuitem"
|
|
2056
|
+
class="k-item k-menu-item"
|
|
2057
|
+
[class.k-disabled]="disabled || button.disabled"
|
|
1882
2058
|
[ngStyle]="button.style"
|
|
1883
2059
|
[ngClass]="button.className"
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
</
|
|
1898
|
-
</
|
|
2060
|
+
(click)="handleClick($event, button)">
|
|
2061
|
+
<span
|
|
2062
|
+
class="k-link k-menu-link"
|
|
2063
|
+
[class.k-selected]="button.selected"
|
|
2064
|
+
>
|
|
2065
|
+
<kendo-icon-wrapper
|
|
2066
|
+
*ngIf="button.overflowOptions.icon || button.overflowOptions.iconClass || button.overflowOptions.svgIcon"
|
|
2067
|
+
[name]="button.overflowOptions.icon"
|
|
2068
|
+
[customFontClass]="button.overflowOptions.iconClass"
|
|
2069
|
+
[svgIcon]="button.overflowOptions.svgIcon"
|
|
2070
|
+
></kendo-icon-wrapper>
|
|
2071
|
+
<span *ngIf="button.overflowOptions.text" class="k-menu-link-text">{{button.overflowOptions.text}}</span>
|
|
2072
|
+
</span>
|
|
2073
|
+
</div>
|
|
2074
|
+
</ng-container>
|
|
1899
2075
|
</ng-template>
|
|
1900
2076
|
`
|
|
1901
2077
|
}]
|
|
@@ -1913,102 +2089,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1913
2089
|
}], popupTemplate: [{
|
|
1914
2090
|
type: ViewChild,
|
|
1915
2091
|
args: ['popupTemplate', { static: true }]
|
|
1916
|
-
}], buttonComponents: [{
|
|
1917
|
-
type: ContentChildren,
|
|
1918
|
-
args: [forwardRef(() => ToolBarButtonComponent)]
|
|
1919
2092
|
}], toolbarButtonGroup: [{
|
|
1920
2093
|
type: ViewChild,
|
|
1921
2094
|
args: ['toolbarButtonGroup', { static: false }]
|
|
1922
|
-
}],
|
|
1923
|
-
type: ViewChild,
|
|
1924
|
-
args: ['overflowButtonGroup', { static: false }]
|
|
1925
|
-
}] } });
|
|
1926
|
-
|
|
1927
|
-
/**
|
|
1928
|
-
* @hidden
|
|
1929
|
-
*/
|
|
1930
|
-
class ToolBarButtonListComponent {
|
|
1931
|
-
constructor() {
|
|
1932
|
-
this.disabled = false;
|
|
1933
|
-
this.fillMode = 'solid';
|
|
1934
|
-
this.themeColor = 'base';
|
|
1935
|
-
this.itemClick = new EventEmitter();
|
|
1936
|
-
}
|
|
1937
|
-
getText(dataItem) {
|
|
1938
|
-
if (dataItem) {
|
|
1939
|
-
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
1940
|
-
}
|
|
1941
|
-
return undefined;
|
|
1942
|
-
}
|
|
1943
|
-
onClick(item, index) {
|
|
1944
|
-
const dataItem = this.data[index];
|
|
1945
|
-
if (item.click) {
|
|
1946
|
-
item.click(dataItem);
|
|
1947
|
-
}
|
|
1948
|
-
this.itemClick.emit(dataItem);
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
ToolBarButtonListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1952
|
-
ToolBarButtonListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarButtonListComponent, selector: "kendo-toolbar-buttonlist", inputs: { data: "data", textField: "textField", disabled: "disabled", fillMode: "fillMode", themeColor: "themeColor" }, outputs: { itemClick: "itemClick" }, viewQueries: [{ propertyName: "buttons", predicate: ["button"], descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
1953
|
-
<button
|
|
1954
|
-
#button
|
|
1955
|
-
type="button"
|
|
1956
|
-
tabindex="-1"
|
|
1957
|
-
kendoButton
|
|
1958
|
-
[style.padding-left.px]="16"
|
|
1959
|
-
class="k-overflow-button"
|
|
1960
|
-
*ngFor="let item of data; let i = index"
|
|
1961
|
-
[disabled]="disabled || item.disabled"
|
|
1962
|
-
[icon]="item.icon"
|
|
1963
|
-
[iconClass]="item.iconClass"
|
|
1964
|
-
[imageUrl]="item.imageUrl"
|
|
1965
|
-
[fillMode]="fillMode"
|
|
1966
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
1967
|
-
(click)="onClick(item, i)"
|
|
1968
|
-
>
|
|
1969
|
-
{{ getText(item) }}
|
|
1970
|
-
</button>
|
|
1971
|
-
`, isInline: true, components: [{ type: i1$1.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1972
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonListComponent, decorators: [{
|
|
1973
|
-
type: Component,
|
|
1974
|
-
args: [{
|
|
1975
|
-
selector: 'kendo-toolbar-buttonlist',
|
|
1976
|
-
template: `
|
|
1977
|
-
<button
|
|
1978
|
-
#button
|
|
1979
|
-
type="button"
|
|
1980
|
-
tabindex="-1"
|
|
1981
|
-
kendoButton
|
|
1982
|
-
[style.padding-left.px]="16"
|
|
1983
|
-
class="k-overflow-button"
|
|
1984
|
-
*ngFor="let item of data; let i = index"
|
|
1985
|
-
[disabled]="disabled || item.disabled"
|
|
1986
|
-
[icon]="item.icon"
|
|
1987
|
-
[iconClass]="item.iconClass"
|
|
1988
|
-
[imageUrl]="item.imageUrl"
|
|
1989
|
-
[fillMode]="fillMode"
|
|
1990
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
1991
|
-
(click)="onClick(item, i)"
|
|
1992
|
-
>
|
|
1993
|
-
{{ getText(item) }}
|
|
1994
|
-
</button>
|
|
1995
|
-
`
|
|
1996
|
-
}]
|
|
1997
|
-
}], propDecorators: { data: [{
|
|
1998
|
-
type: Input
|
|
1999
|
-
}], textField: [{
|
|
2000
|
-
type: Input
|
|
2001
|
-
}], disabled: [{
|
|
2002
|
-
type: Input
|
|
2003
|
-
}], fillMode: [{
|
|
2004
|
-
type: Input
|
|
2005
|
-
}], themeColor: [{
|
|
2006
|
-
type: Input
|
|
2007
|
-
}], itemClick: [{
|
|
2008
|
-
type: Output
|
|
2009
|
-
}], buttons: [{
|
|
2095
|
+
}], overflowListItems: [{
|
|
2010
2096
|
type: ViewChildren,
|
|
2011
|
-
args: ['
|
|
2097
|
+
args: ['listItem']
|
|
2098
|
+
}], buttonComponents: [{
|
|
2099
|
+
type: ContentChildren,
|
|
2100
|
+
args: [forwardRef(() => ToolBarButtonComponent)]
|
|
2012
2101
|
}] } });
|
|
2013
2102
|
|
|
2014
2103
|
/**
|
|
@@ -2071,12 +2160,14 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
2071
2160
|
text: '',
|
|
2072
2161
|
icon: '',
|
|
2073
2162
|
iconClass: '',
|
|
2163
|
+
svgIcon: null,
|
|
2074
2164
|
imageUrl: ''
|
|
2075
2165
|
};
|
|
2076
2166
|
this.overflowOptions = {
|
|
2077
2167
|
text: '',
|
|
2078
2168
|
icon: '',
|
|
2079
2169
|
iconClass: '',
|
|
2170
|
+
svgIcon: null,
|
|
2080
2171
|
imageUrl: ''
|
|
2081
2172
|
};
|
|
2082
2173
|
this._popupSettings = { animate: true, popupClass: '' };
|
|
@@ -2164,13 +2255,13 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
2164
2255
|
this.setTextDisplayMode();
|
|
2165
2256
|
}
|
|
2166
2257
|
get overflowButtons() {
|
|
2167
|
-
return [...this.
|
|
2258
|
+
return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
|
|
2168
2259
|
}
|
|
2169
2260
|
/**
|
|
2170
2261
|
* @hidden
|
|
2171
2262
|
*/
|
|
2172
2263
|
onButtonListClick(ev) {
|
|
2173
|
-
this.focusedIndex = this.
|
|
2264
|
+
this.focusedIndex = this.overflowListItems
|
|
2174
2265
|
.toArray()
|
|
2175
2266
|
.findIndex(b => b.nativeElement.contains(ev.target));
|
|
2176
2267
|
}
|
|
@@ -2209,6 +2300,26 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
2209
2300
|
return !isUnmodified(this.focusedIndex);
|
|
2210
2301
|
}
|
|
2211
2302
|
}
|
|
2303
|
+
/**
|
|
2304
|
+
* @hidden
|
|
2305
|
+
*/
|
|
2306
|
+
getText(dataItem) {
|
|
2307
|
+
if (dataItem) {
|
|
2308
|
+
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
2309
|
+
}
|
|
2310
|
+
return undefined;
|
|
2311
|
+
}
|
|
2312
|
+
/**
|
|
2313
|
+
* @hidden
|
|
2314
|
+
*/
|
|
2315
|
+
handleClick(ev, item, index) {
|
|
2316
|
+
this.onButtonListClick(ev);
|
|
2317
|
+
const dataItem = this.data[index];
|
|
2318
|
+
if (item.click) {
|
|
2319
|
+
item.click(dataItem);
|
|
2320
|
+
}
|
|
2321
|
+
this.itemClick.emit(dataItem);
|
|
2322
|
+
}
|
|
2212
2323
|
focusButton(index, ev) {
|
|
2213
2324
|
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
|
|
2214
2325
|
this.overflowButtons[index].nativeElement.focus();
|
|
@@ -2220,12 +2331,14 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
2220
2331
|
}
|
|
2221
2332
|
}
|
|
2222
2333
|
ToolBarDropDownButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2223
|
-
ToolBarDropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarDropDownButtonComponent, selector: "kendo-toolbar-dropdownbutton", inputs: { showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", popupSettings: "popupSettings", look: "look", primary: "primary", fillMode: "fillMode", themeColor: "themeColor", buttonClass: "buttonClass", textField: "textField", disabled: "disabled", data: "data" }, outputs: { itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarDropDownButtonComponent) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "dropDownButtonComponent", first: true, predicate: DropDownButtonComponent, descendants: true }, { propertyName: "toolbarDropDownButton", first: true, predicate: ["toolbarDropDownButton"], descendants: true }, { propertyName: "
|
|
2334
|
+
ToolBarDropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarDropDownButtonComponent, selector: "kendo-toolbar-dropdownbutton", inputs: { showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", popupSettings: "popupSettings", look: "look", primary: "primary", fillMode: "fillMode", themeColor: "themeColor", buttonClass: "buttonClass", textField: "textField", disabled: "disabled", data: "data" }, outputs: { itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarDropDownButtonComponent) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "dropDownButtonComponent", first: true, predicate: DropDownButtonComponent, descendants: true }, { propertyName: "toolbarDropDownButton", first: true, predicate: ["toolbarDropDownButton"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarDropDownButton"], usesInheritance: true, ngImport: i0, template: `
|
|
2224
2335
|
<ng-template #toolbarTemplate>
|
|
2225
2336
|
<kendo-dropdownbutton
|
|
2226
2337
|
#toolbarDropDownButton
|
|
2338
|
+
class="k-toolbar-menu-button"
|
|
2227
2339
|
[icon]="toolbarOptions.icon"
|
|
2228
2340
|
[iconClass]="toolbarOptions.iconClass"
|
|
2341
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
2229
2342
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
2230
2343
|
[buttonClass]="buttonClass"
|
|
2231
2344
|
[disabled]="disabled"
|
|
@@ -2243,31 +2356,45 @@ ToolBarDropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2243
2356
|
</kendo-dropdownbutton>
|
|
2244
2357
|
</ng-template>
|
|
2245
2358
|
<ng-template #popupTemplate>
|
|
2246
|
-
<
|
|
2247
|
-
type="button"
|
|
2359
|
+
<div
|
|
2248
2360
|
tabindex="-1"
|
|
2249
|
-
|
|
2250
|
-
class="k-
|
|
2251
|
-
[
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2361
|
+
role="menuitem"
|
|
2362
|
+
class="k-item k-menu-item k-disabled"
|
|
2363
|
+
[ngClass]="buttonClass">
|
|
2364
|
+
<span
|
|
2365
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}"
|
|
2366
|
+
>
|
|
2367
|
+
<kendo-icon-wrapper
|
|
2368
|
+
*ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
|
|
2369
|
+
[name]="overflowOptions.icon"
|
|
2370
|
+
[customFontClass]="overflowOptions.iconClass"
|
|
2371
|
+
[svgIcon]="overflowOptions.svgIcon"
|
|
2372
|
+
></kendo-icon-wrapper>
|
|
2373
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2374
|
+
</span>
|
|
2375
|
+
</div>
|
|
2376
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2377
|
+
<div #listItem
|
|
2378
|
+
tabindex="-1"
|
|
2379
|
+
role="menuitem"
|
|
2380
|
+
class="k-item k-menu-item"
|
|
2381
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2382
|
+
(click)="handleClick($event, item, i)">
|
|
2383
|
+
<span
|
|
2384
|
+
class="k-link k-menu-link"
|
|
2385
|
+
>
|
|
2386
|
+
<kendo-icon-wrapper
|
|
2387
|
+
*ngIf="item.icon || item.iconClass || item.svgIcon"
|
|
2388
|
+
[name]="item.icon"
|
|
2389
|
+
[customFontClass]="item.iconClass"
|
|
2390
|
+
[svgIcon]="item.svgIcon"
|
|
2391
|
+
></kendo-icon-wrapper>
|
|
2392
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2393
|
+
</span>
|
|
2394
|
+
</div>
|
|
2395
|
+
</ng-container>
|
|
2269
2396
|
</ng-template>
|
|
2270
|
-
`, isInline: true, components: [{ type: i1$1.DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }, { type:
|
|
2397
|
+
`, 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"] }] });
|
|
2271
2398
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarDropDownButtonComponent, decorators: [{
|
|
2272
2399
|
type: Component,
|
|
2273
2400
|
args: [{
|
|
@@ -2278,8 +2405,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2278
2405
|
<ng-template #toolbarTemplate>
|
|
2279
2406
|
<kendo-dropdownbutton
|
|
2280
2407
|
#toolbarDropDownButton
|
|
2408
|
+
class="k-toolbar-menu-button"
|
|
2281
2409
|
[icon]="toolbarOptions.icon"
|
|
2282
2410
|
[iconClass]="toolbarOptions.iconClass"
|
|
2411
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
2283
2412
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
2284
2413
|
[buttonClass]="buttonClass"
|
|
2285
2414
|
[disabled]="disabled"
|
|
@@ -2297,29 +2426,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2297
2426
|
</kendo-dropdownbutton>
|
|
2298
2427
|
</ng-template>
|
|
2299
2428
|
<ng-template #popupTemplate>
|
|
2300
|
-
<
|
|
2301
|
-
type="button"
|
|
2429
|
+
<div
|
|
2302
2430
|
tabindex="-1"
|
|
2303
|
-
|
|
2304
|
-
class="k-
|
|
2305
|
-
[
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2431
|
+
role="menuitem"
|
|
2432
|
+
class="k-item k-menu-item k-disabled"
|
|
2433
|
+
[ngClass]="buttonClass">
|
|
2434
|
+
<span
|
|
2435
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}"
|
|
2436
|
+
>
|
|
2437
|
+
<kendo-icon-wrapper
|
|
2438
|
+
*ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
|
|
2439
|
+
[name]="overflowOptions.icon"
|
|
2440
|
+
[customFontClass]="overflowOptions.iconClass"
|
|
2441
|
+
[svgIcon]="overflowOptions.svgIcon"
|
|
2442
|
+
></kendo-icon-wrapper>
|
|
2443
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2444
|
+
</span>
|
|
2445
|
+
</div>
|
|
2446
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2447
|
+
<div #listItem
|
|
2448
|
+
tabindex="-1"
|
|
2449
|
+
role="menuitem"
|
|
2450
|
+
class="k-item k-menu-item"
|
|
2451
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2452
|
+
(click)="handleClick($event, item, i)">
|
|
2453
|
+
<span
|
|
2454
|
+
class="k-link k-menu-link"
|
|
2455
|
+
>
|
|
2456
|
+
<kendo-icon-wrapper
|
|
2457
|
+
*ngIf="item.icon || item.iconClass || item.svgIcon"
|
|
2458
|
+
[name]="item.icon"
|
|
2459
|
+
[customFontClass]="item.iconClass"
|
|
2460
|
+
[svgIcon]="item.svgIcon"
|
|
2461
|
+
></kendo-icon-wrapper>
|
|
2462
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2463
|
+
</span>
|
|
2464
|
+
</div>
|
|
2465
|
+
</ng-container>
|
|
2323
2466
|
</ng-template>
|
|
2324
2467
|
`
|
|
2325
2468
|
}]
|
|
@@ -2371,12 +2514,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2371
2514
|
}], dropDownButtonComponent: [{
|
|
2372
2515
|
type: ViewChild,
|
|
2373
2516
|
args: [DropDownButtonComponent, { static: false }]
|
|
2517
|
+
}], overflowListItems: [{
|
|
2518
|
+
type: ViewChildren,
|
|
2519
|
+
args: ['listItem']
|
|
2374
2520
|
}], toolbarDropDownButton: [{
|
|
2375
2521
|
type: ViewChild,
|
|
2376
2522
|
args: ['toolbarDropDownButton', { static: false }]
|
|
2377
|
-
}], overflowDropDownButtonButtonList: [{
|
|
2378
|
-
type: ViewChild,
|
|
2379
|
-
args: ['overflowDropDownButtonButtonList', { static: false }]
|
|
2380
2523
|
}] } });
|
|
2381
2524
|
|
|
2382
2525
|
/**
|
|
@@ -2451,12 +2594,14 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
2451
2594
|
text: '',
|
|
2452
2595
|
icon: '',
|
|
2453
2596
|
iconClass: '',
|
|
2597
|
+
svgIcon: null,
|
|
2454
2598
|
imageUrl: ''
|
|
2455
2599
|
};
|
|
2456
2600
|
this.overflowOptions = {
|
|
2457
2601
|
text: '',
|
|
2458
2602
|
icon: '',
|
|
2459
2603
|
iconClass: '',
|
|
2604
|
+
svgIcon: null,
|
|
2460
2605
|
imageUrl: ''
|
|
2461
2606
|
};
|
|
2462
2607
|
this._popupSettings = { animate: true, popupClass: '' };
|
|
@@ -2541,7 +2686,7 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
2541
2686
|
this.setTextDisplayMode();
|
|
2542
2687
|
}
|
|
2543
2688
|
get overflowButtons() {
|
|
2544
|
-
return [this.
|
|
2689
|
+
return [this.overflowMainButton, ...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
|
|
2545
2690
|
}
|
|
2546
2691
|
/**
|
|
2547
2692
|
* @hidden
|
|
@@ -2591,6 +2736,26 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
2591
2736
|
return !isUnmodified(this.focusedIndex);
|
|
2592
2737
|
}
|
|
2593
2738
|
}
|
|
2739
|
+
/**
|
|
2740
|
+
* @hidden
|
|
2741
|
+
*/
|
|
2742
|
+
getText(dataItem) {
|
|
2743
|
+
if (dataItem) {
|
|
2744
|
+
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
2745
|
+
}
|
|
2746
|
+
return undefined;
|
|
2747
|
+
}
|
|
2748
|
+
/**
|
|
2749
|
+
* @hidden
|
|
2750
|
+
*/
|
|
2751
|
+
handleClick(ev, item, index) {
|
|
2752
|
+
this.onButtonListClick(ev);
|
|
2753
|
+
const dataItem = this.data[index];
|
|
2754
|
+
if (item.click) {
|
|
2755
|
+
item.click(dataItem);
|
|
2756
|
+
}
|
|
2757
|
+
this.itemClick.emit(dataItem);
|
|
2758
|
+
}
|
|
2594
2759
|
focusButton(index, ev) {
|
|
2595
2760
|
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown' || ev.type === 'click') {
|
|
2596
2761
|
this.overflowButtons[index].nativeElement.focus();
|
|
@@ -2602,14 +2767,16 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
2602
2767
|
}
|
|
2603
2768
|
}
|
|
2604
2769
|
ToolBarSplitButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarSplitButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2605
|
-
ToolBarSplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarSplitButtonComponent, selector: "kendo-toolbar-splitbutton", inputs: { showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", popupSettings: "popupSettings", fillMode: "fillMode", themeColor: "themeColor", look: "look", buttonClass: "buttonClass", arrowButtonClass: "arrowButtonClass", arrowButtonIcon: "arrowButtonIcon", textField: "textField", data: "data" }, outputs: { buttonClick: "buttonClick", itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarSplitButtonComponent) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarSplitButton", first: true, predicate: ["toolbarSplitButton"], descendants: true }, { propertyName: "
|
|
2770
|
+
ToolBarSplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarSplitButtonComponent, selector: "kendo-toolbar-splitbutton", inputs: { showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", popupSettings: "popupSettings", fillMode: "fillMode", themeColor: "themeColor", look: "look", buttonClass: "buttonClass", arrowButtonClass: "arrowButtonClass", arrowButtonIcon: "arrowButtonIcon", textField: "textField", data: "data" }, outputs: { buttonClick: "buttonClick", itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarSplitButtonComponent) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarSplitButton", first: true, predicate: ["toolbarSplitButton"], descendants: true }, { propertyName: "overflowMainButton", first: true, predicate: ["overflowMainButton"], descendants: true, read: ElementRef }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarSplitButton"], usesInheritance: true, ngImport: i0, template: `
|
|
2606
2771
|
<ng-template #toolbarTemplate>
|
|
2607
2772
|
<kendo-splitbutton
|
|
2608
2773
|
#toolbarSplitButton
|
|
2774
|
+
class="k-toolbar-split-button"
|
|
2609
2775
|
[data]="data"
|
|
2610
2776
|
[text]="toolbarOptions.text"
|
|
2611
2777
|
[icon]="toolbarOptions.icon"
|
|
2612
2778
|
[iconClass]="toolbarOptions.iconClass"
|
|
2779
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
2613
2780
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
2614
2781
|
[buttonClass]="buttonClass"
|
|
2615
2782
|
[arrowButtonClass]="arrowButtonClass"
|
|
@@ -2628,36 +2795,49 @@ ToolBarSplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
2628
2795
|
</kendo-splitbutton>
|
|
2629
2796
|
</ng-template>
|
|
2630
2797
|
<ng-template #popupTemplate>
|
|
2631
|
-
<
|
|
2632
|
-
#overflowSplitButton
|
|
2633
|
-
type="button"
|
|
2798
|
+
<div #overflowMainButton
|
|
2634
2799
|
tabindex="-1"
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
class="k-overflow-button"
|
|
2639
|
-
[disabled]="disabled"
|
|
2640
|
-
[icon]="overflowOptions.icon"
|
|
2641
|
-
[iconClass]="overflowOptions.iconClass"
|
|
2642
|
-
[imageUrl]="overflowOptions.imageUrl"
|
|
2800
|
+
role="menuitem"
|
|
2801
|
+
class="k-item k-menu-item"
|
|
2802
|
+
[class.k-disabled]="disabled"
|
|
2643
2803
|
[ngClass]="buttonClass"
|
|
2644
|
-
(click)="onMainButtonClick($event)"
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
>
|
|
2658
|
-
|
|
2804
|
+
(click)="onMainButtonClick($event)">
|
|
2805
|
+
<span
|
|
2806
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}"
|
|
2807
|
+
>
|
|
2808
|
+
<kendo-icon-wrapper
|
|
2809
|
+
*ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
|
|
2810
|
+
[name]="overflowOptions.icon"
|
|
2811
|
+
[customFontClass]="overflowOptions.iconClass"
|
|
2812
|
+
[svgIcon]="overflowOptions.svgIcon"
|
|
2813
|
+
>
|
|
2814
|
+
</kendo-icon-wrapper>
|
|
2815
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2816
|
+
</span>
|
|
2817
|
+
</div>
|
|
2818
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2819
|
+
<div #listItem
|
|
2820
|
+
tabindex="-1"
|
|
2821
|
+
role="menuitem"
|
|
2822
|
+
class="k-item k-menu-item"
|
|
2823
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2824
|
+
(click)="handleClick($event, item, i)">
|
|
2825
|
+
<span
|
|
2826
|
+
class="k-link k-menu-link"
|
|
2827
|
+
>
|
|
2828
|
+
<kendo-icon-wrapper
|
|
2829
|
+
*ngIf="item.icon || item.iconClass || item.svgIcon"
|
|
2830
|
+
[name]="item.icon"
|
|
2831
|
+
[customFontClass]="item.iconClass"
|
|
2832
|
+
[svgIcon]="item.svgIcon"
|
|
2833
|
+
>
|
|
2834
|
+
</kendo-icon-wrapper>
|
|
2835
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2836
|
+
</span>
|
|
2837
|
+
</div>
|
|
2838
|
+
</ng-container>
|
|
2659
2839
|
</ng-template>
|
|
2660
|
-
`, isInline: true, components: [{ type: i1$1.SplitButtonComponent, selector: "kendo-splitbutton", inputs: ["text", "icon", "svgIcon", "iconClass", "type", "imageUrl", "size", "rounded", "fillMode", "themeColor", "disabled", "popupSettings", "tabIndex", "textField", "data", "buttonClass", "arrowButtonClass", "arrowButtonIcon", "arrowButtonSvgIcon"], outputs: ["buttonClick", "itemClick", "focus", "blur", "open", "close"], exportAs: ["kendoSplitButton"] }, { type:
|
|
2840
|
+
`, 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"] }] });
|
|
2661
2841
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarSplitButtonComponent, decorators: [{
|
|
2662
2842
|
type: Component,
|
|
2663
2843
|
args: [{
|
|
@@ -2668,10 +2848,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2668
2848
|
<ng-template #toolbarTemplate>
|
|
2669
2849
|
<kendo-splitbutton
|
|
2670
2850
|
#toolbarSplitButton
|
|
2851
|
+
class="k-toolbar-split-button"
|
|
2671
2852
|
[data]="data"
|
|
2672
2853
|
[text]="toolbarOptions.text"
|
|
2673
2854
|
[icon]="toolbarOptions.icon"
|
|
2674
2855
|
[iconClass]="toolbarOptions.iconClass"
|
|
2856
|
+
[svgIcon]="toolbarOptions.svgIcon"
|
|
2675
2857
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
2676
2858
|
[buttonClass]="buttonClass"
|
|
2677
2859
|
[arrowButtonClass]="arrowButtonClass"
|
|
@@ -2690,34 +2872,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2690
2872
|
</kendo-splitbutton>
|
|
2691
2873
|
</ng-template>
|
|
2692
2874
|
<ng-template #popupTemplate>
|
|
2693
|
-
<
|
|
2694
|
-
#overflowSplitButton
|
|
2695
|
-
type="button"
|
|
2875
|
+
<div #overflowMainButton
|
|
2696
2876
|
tabindex="-1"
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
class="k-overflow-button"
|
|
2701
|
-
[disabled]="disabled"
|
|
2702
|
-
[icon]="overflowOptions.icon"
|
|
2703
|
-
[iconClass]="overflowOptions.iconClass"
|
|
2704
|
-
[imageUrl]="overflowOptions.imageUrl"
|
|
2877
|
+
role="menuitem"
|
|
2878
|
+
class="k-item k-menu-item"
|
|
2879
|
+
[class.k-disabled]="disabled"
|
|
2705
2880
|
[ngClass]="buttonClass"
|
|
2706
|
-
(click)="onMainButtonClick($event)"
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
>
|
|
2720
|
-
|
|
2881
|
+
(click)="onMainButtonClick($event)">
|
|
2882
|
+
<span
|
|
2883
|
+
[ngClass]="{'k-link': true, 'k-menu-link': true}"
|
|
2884
|
+
>
|
|
2885
|
+
<kendo-icon-wrapper
|
|
2886
|
+
*ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
|
|
2887
|
+
[name]="overflowOptions.icon"
|
|
2888
|
+
[customFontClass]="overflowOptions.iconClass"
|
|
2889
|
+
[svgIcon]="overflowOptions.svgIcon"
|
|
2890
|
+
>
|
|
2891
|
+
</kendo-icon-wrapper>
|
|
2892
|
+
<span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
|
|
2893
|
+
</span>
|
|
2894
|
+
</div>
|
|
2895
|
+
<ng-container *ngFor="let item of data; let i = index">
|
|
2896
|
+
<div #listItem
|
|
2897
|
+
tabindex="-1"
|
|
2898
|
+
role="menuitem"
|
|
2899
|
+
class="k-item k-menu-item"
|
|
2900
|
+
[class.k-disabled]="disabled || item.disabled"
|
|
2901
|
+
(click)="handleClick($event, item, i)">
|
|
2902
|
+
<span
|
|
2903
|
+
class="k-link k-menu-link"
|
|
2904
|
+
>
|
|
2905
|
+
<kendo-icon-wrapper
|
|
2906
|
+
*ngIf="item.icon || item.iconClass || item.svgIcon"
|
|
2907
|
+
[name]="item.icon"
|
|
2908
|
+
[customFontClass]="item.iconClass"
|
|
2909
|
+
[svgIcon]="item.svgIcon"
|
|
2910
|
+
>
|
|
2911
|
+
</kendo-icon-wrapper>
|
|
2912
|
+
<span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
|
|
2913
|
+
</span>
|
|
2914
|
+
</div>
|
|
2915
|
+
</ng-container>
|
|
2721
2916
|
</ng-template>
|
|
2722
2917
|
`
|
|
2723
2918
|
}]
|
|
@@ -2770,12 +2965,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2770
2965
|
}], toolbarSplitButton: [{
|
|
2771
2966
|
type: ViewChild,
|
|
2772
2967
|
args: ['toolbarSplitButton', { static: false }]
|
|
2773
|
-
}],
|
|
2774
|
-
type: ViewChild,
|
|
2775
|
-
args: ['overflowSplitButton', { read: ElementRef, static: false }]
|
|
2776
|
-
}], overflowSplitButtonButtonList: [{
|
|
2968
|
+
}], overflowMainButton: [{
|
|
2777
2969
|
type: ViewChild,
|
|
2778
|
-
args: ['
|
|
2970
|
+
args: ['overflowMainButton', { read: ElementRef }]
|
|
2971
|
+
}], overflowListItems: [{
|
|
2972
|
+
type: ViewChildren,
|
|
2973
|
+
args: ['listItem']
|
|
2779
2974
|
}] } });
|
|
2780
2975
|
|
|
2781
2976
|
/**
|
|
@@ -2816,6 +3011,12 @@ ToolBarSeparatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
2816
3011
|
<ng-template #toolbarTemplate>
|
|
2817
3012
|
<div class="k-separator"></div>
|
|
2818
3013
|
</ng-template>
|
|
3014
|
+
|
|
3015
|
+
<ng-template #popupTemplate>
|
|
3016
|
+
<div class="k-item k-menu-item">
|
|
3017
|
+
<div class="k-separator k-separator-horizontal"></div>
|
|
3018
|
+
</div>
|
|
3019
|
+
</ng-template>
|
|
2819
3020
|
`, isInline: true });
|
|
2820
3021
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarSeparatorComponent, decorators: [{
|
|
2821
3022
|
type: Component,
|
|
@@ -2827,6 +3028,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2827
3028
|
<ng-template #toolbarTemplate>
|
|
2828
3029
|
<div class="k-separator"></div>
|
|
2829
3030
|
</ng-template>
|
|
3031
|
+
|
|
3032
|
+
<ng-template #popupTemplate>
|
|
3033
|
+
<div class="k-item k-menu-item">
|
|
3034
|
+
<div class="k-separator k-separator-horizontal"></div>
|
|
3035
|
+
</div>
|
|
3036
|
+
</ng-template>
|
|
2830
3037
|
`
|
|
2831
3038
|
}]
|
|
2832
3039
|
}], ctorParameters: function () { return []; }, propDecorators: { toolbarTemplate: [{
|
|
@@ -2895,6 +3102,95 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2895
3102
|
args: ['popupTemplate', { static: true }]
|
|
2896
3103
|
}] } });
|
|
2897
3104
|
|
|
3105
|
+
/**
|
|
3106
|
+
* @hidden
|
|
3107
|
+
*/
|
|
3108
|
+
class ToolBarButtonListComponent {
|
|
3109
|
+
constructor() {
|
|
3110
|
+
this.disabled = false;
|
|
3111
|
+
this.fillMode = 'solid';
|
|
3112
|
+
this.themeColor = 'base';
|
|
3113
|
+
this.itemClick = new EventEmitter();
|
|
3114
|
+
}
|
|
3115
|
+
getText(dataItem) {
|
|
3116
|
+
if (dataItem) {
|
|
3117
|
+
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
3118
|
+
}
|
|
3119
|
+
return undefined;
|
|
3120
|
+
}
|
|
3121
|
+
onClick(item, index) {
|
|
3122
|
+
const dataItem = this.data[index];
|
|
3123
|
+
if (item.click) {
|
|
3124
|
+
item.click(dataItem);
|
|
3125
|
+
}
|
|
3126
|
+
this.itemClick.emit(dataItem);
|
|
3127
|
+
}
|
|
3128
|
+
}
|
|
3129
|
+
ToolBarButtonListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3130
|
+
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: `
|
|
3131
|
+
<button
|
|
3132
|
+
#button
|
|
3133
|
+
type="button"
|
|
3134
|
+
tabindex="-1"
|
|
3135
|
+
kendoButton
|
|
3136
|
+
[style.padding-left.px]="16"
|
|
3137
|
+
class="k-overflow-button"
|
|
3138
|
+
*ngFor="let item of data; let i = index"
|
|
3139
|
+
[disabled]="disabled || item.disabled"
|
|
3140
|
+
[icon]="item.icon"
|
|
3141
|
+
[iconClass]="item.iconClass"
|
|
3142
|
+
[svgIcon]="item.svgIcon"
|
|
3143
|
+
[imageUrl]="item.imageUrl"
|
|
3144
|
+
[fillMode]="fillMode"
|
|
3145
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
3146
|
+
(click)="onClick(item, i)"
|
|
3147
|
+
>
|
|
3148
|
+
{{ getText(item) }}
|
|
3149
|
+
</button>
|
|
3150
|
+
`, 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"] }] });
|
|
3151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonListComponent, decorators: [{
|
|
3152
|
+
type: Component,
|
|
3153
|
+
args: [{
|
|
3154
|
+
selector: 'kendo-toolbar-buttonlist',
|
|
3155
|
+
template: `
|
|
3156
|
+
<button
|
|
3157
|
+
#button
|
|
3158
|
+
type="button"
|
|
3159
|
+
tabindex="-1"
|
|
3160
|
+
kendoButton
|
|
3161
|
+
[style.padding-left.px]="16"
|
|
3162
|
+
class="k-overflow-button"
|
|
3163
|
+
*ngFor="let item of data; let i = index"
|
|
3164
|
+
[disabled]="disabled || item.disabled"
|
|
3165
|
+
[icon]="item.icon"
|
|
3166
|
+
[iconClass]="item.iconClass"
|
|
3167
|
+
[svgIcon]="item.svgIcon"
|
|
3168
|
+
[imageUrl]="item.imageUrl"
|
|
3169
|
+
[fillMode]="fillMode"
|
|
3170
|
+
[themeColor]="fillMode ? themeColor : null"
|
|
3171
|
+
(click)="onClick(item, i)"
|
|
3172
|
+
>
|
|
3173
|
+
{{ getText(item) }}
|
|
3174
|
+
</button>
|
|
3175
|
+
`
|
|
3176
|
+
}]
|
|
3177
|
+
}], propDecorators: { data: [{
|
|
3178
|
+
type: Input
|
|
3179
|
+
}], textField: [{
|
|
3180
|
+
type: Input
|
|
3181
|
+
}], disabled: [{
|
|
3182
|
+
type: Input
|
|
3183
|
+
}], fillMode: [{
|
|
3184
|
+
type: Input
|
|
3185
|
+
}], themeColor: [{
|
|
3186
|
+
type: Input
|
|
3187
|
+
}], itemClick: [{
|
|
3188
|
+
type: Output
|
|
3189
|
+
}], buttons: [{
|
|
3190
|
+
type: ViewChildren,
|
|
3191
|
+
args: ['button', { read: ElementRef }]
|
|
3192
|
+
}] } });
|
|
3193
|
+
|
|
2898
3194
|
/**
|
|
2899
3195
|
* Custom component messages override default component messages.
|
|
2900
3196
|
*/
|
|
@@ -2967,20 +3263,20 @@ ToolBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
2967
3263
|
ToolBarSpacerComponent, ToolBarRendererComponent,
|
|
2968
3264
|
ToolBarButtonListComponent,
|
|
2969
3265
|
ToolbarCustomMessagesComponent,
|
|
2970
|
-
LocalizedToolbarMessagesDirective], imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule], exports: [ToolBarComponent, ToolBarToolComponent,
|
|
3266
|
+
LocalizedToolbarMessagesDirective], imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule, IconsModule], exports: [ToolBarComponent, ToolBarToolComponent,
|
|
2971
3267
|
ToolBarButtonComponent,
|
|
2972
3268
|
ToolBarButtonGroupComponent,
|
|
2973
3269
|
ToolBarDropDownButtonComponent,
|
|
2974
3270
|
ToolBarSplitButtonComponent,
|
|
2975
3271
|
ToolBarSeparatorComponent,
|
|
2976
3272
|
ToolBarSpacerComponent, ToolbarCustomMessagesComponent, LocalizedToolbarMessagesDirective] });
|
|
2977
|
-
ToolBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarModule, imports: [[CommonModule, ButtonsModule, PopupModule, ResizeSensorModule]] });
|
|
3273
|
+
ToolBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarModule, imports: [[CommonModule, ButtonsModule, PopupModule, ResizeSensorModule, IconsModule]] });
|
|
2978
3274
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarModule, decorators: [{
|
|
2979
3275
|
type: NgModule,
|
|
2980
3276
|
args: [{
|
|
2981
3277
|
declarations: [ToolBarComponent, TOOLBAR_TOOLS, TOOLBAR_COMMON],
|
|
2982
3278
|
exports: [ToolBarComponent, TOOLBAR_TOOLS, ToolbarCustomMessagesComponent, LocalizedToolbarMessagesDirective],
|
|
2983
|
-
imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule]
|
|
3279
|
+
imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule, IconsModule]
|
|
2984
3280
|
}]
|
|
2985
3281
|
}] });
|
|
2986
3282
|
|