@progress/kendo-angular-toolbar 19.0.0-develop.3 → 19.0.0-develop.31
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/codemods/template-transformer/index.js +94 -0
- package/codemods/utils.js +553 -0
- package/codemods/v19/toolbar-button-showicon.js +53 -0
- package/codemods/v19/toolbar-button-showtext.js +53 -0
- package/display-mode.d.ts +9 -3
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/renderer.component.mjs +38 -9
- package/esm2022/toolbar.component.mjs +52 -6
- package/esm2022/tools/toolbar-button.component.mjs +43 -9
- package/esm2022/tools/toolbar-buttongroup.component.mjs +17 -3
- package/esm2022/tools/toolbar-dropdownbutton.component.mjs +44 -13
- package/esm2022/tools/toolbar-splitbutton.component.mjs +42 -10
- package/esm2022/tools/toolbar-tool.component.mjs +4 -0
- package/esm2022/util.mjs +3 -1
- package/fesm2022/progress-kendo-angular-toolbar.mjs +236 -53
- package/package.json +29 -8
- package/renderer.component.d.ts +1 -0
- package/toolbar.component.d.ts +23 -2
- package/tools/toolbar-button.component.d.ts +18 -5
- package/tools/toolbar-buttongroup.component.d.ts +7 -1
- package/tools/toolbar-dropdownbutton.component.d.ts +14 -4
- package/tools/toolbar-splitbutton.component.d.ts +14 -4
- package/tools/toolbar-tool.component.d.ts +4 -0
|
@@ -6,7 +6,7 @@ import * as i0 from '@angular/core';
|
|
|
6
6
|
import { EventEmitter, Injectable, inject, ElementRef, Directive, ViewChild, Input, Output, forwardRef, Component, HostBinding, ViewContainerRef, ContentChildren, HostListener, isDevMode, ViewChildren, NgModule } from '@angular/core';
|
|
7
7
|
import * as i2 from '@progress/kendo-angular-popup';
|
|
8
8
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
9
|
-
import { Keys, isDocumentAvailable, guid, ResizeSensorComponent, ResizeBatchService } from '@progress/kendo-angular-common';
|
|
9
|
+
import { Keys, isPresent as isPresent$1, isDocumentAvailable, guid, ResizeSensorComponent, ResizeBatchService } from '@progress/kendo-angular-common';
|
|
10
10
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
11
11
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
12
12
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
@@ -26,8 +26,8 @@ const packageMetadata = {
|
|
|
26
26
|
productName: 'Kendo UI for Angular',
|
|
27
27
|
productCode: 'KENDOUIANGULAR',
|
|
28
28
|
productCodes: ['KENDOUIANGULAR'],
|
|
29
|
-
publishDate:
|
|
30
|
-
version: '19.0.0-develop.
|
|
29
|
+
publishDate: 1747923818,
|
|
30
|
+
version: '19.0.0-develop.31',
|
|
31
31
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -222,8 +222,10 @@ const getValueForLocation = (property, displayMode, overflows) => {
|
|
|
222
222
|
switch (displayMode) {
|
|
223
223
|
case 'toolbar':
|
|
224
224
|
return overflows ? undefined : property;
|
|
225
|
-
case '
|
|
225
|
+
case 'menu':
|
|
226
226
|
return overflows ? property : undefined;
|
|
227
|
+
case 'never':
|
|
228
|
+
return;
|
|
227
229
|
default:
|
|
228
230
|
return property;
|
|
229
231
|
}
|
|
@@ -447,6 +449,10 @@ class ToolBarToolComponent {
|
|
|
447
449
|
visibility;
|
|
448
450
|
element;
|
|
449
451
|
isBuiltInTool = false;
|
|
452
|
+
/**
|
|
453
|
+
* @hidden
|
|
454
|
+
*/
|
|
455
|
+
isHidden = false;
|
|
450
456
|
/**
|
|
451
457
|
* @hidden
|
|
452
458
|
*/
|
|
@@ -646,24 +652,38 @@ class ToolBarRendererComponent {
|
|
|
646
652
|
if (this.resizable) {
|
|
647
653
|
if (this.location === 'toolbar') {
|
|
648
654
|
this.template = this.tool.toolbarTemplate;
|
|
649
|
-
this.
|
|
650
|
-
this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
|
|
655
|
+
this.hideTool();
|
|
651
656
|
}
|
|
652
657
|
else if (this.location === 'section') {
|
|
653
658
|
this.template = this.tool.toolbarTemplate;
|
|
654
|
-
this.
|
|
655
|
-
|
|
659
|
+
if (this.tool.isHidden) {
|
|
660
|
+
this.hideTool();
|
|
661
|
+
}
|
|
662
|
+
else {
|
|
663
|
+
this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
|
|
664
|
+
this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
|
|
665
|
+
}
|
|
656
666
|
}
|
|
657
667
|
else {
|
|
658
668
|
this.template = this.tool.popupTemplate;
|
|
659
|
-
this.
|
|
669
|
+
if (this.tool.isHidden) {
|
|
670
|
+
this.hideTool();
|
|
671
|
+
}
|
|
672
|
+
else {
|
|
673
|
+
this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
|
|
674
|
+
}
|
|
660
675
|
}
|
|
661
676
|
}
|
|
662
677
|
else {
|
|
663
678
|
this.tool.overflows = false;
|
|
664
679
|
this.template = this.tool.toolbarTemplate;
|
|
665
|
-
this.
|
|
666
|
-
|
|
680
|
+
if (this.tool.isHidden) {
|
|
681
|
+
this.hideTool();
|
|
682
|
+
}
|
|
683
|
+
else {
|
|
684
|
+
this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
|
|
685
|
+
this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
|
|
686
|
+
}
|
|
667
687
|
}
|
|
668
688
|
}
|
|
669
689
|
ngOnDestroy() {
|
|
@@ -690,7 +710,13 @@ class ToolBarRendererComponent {
|
|
|
690
710
|
}
|
|
691
711
|
refresh() {
|
|
692
712
|
this.tool.location = this.location;
|
|
693
|
-
if (this.
|
|
713
|
+
if (!isPresent$1(this.internalComponentRef)) {
|
|
714
|
+
return;
|
|
715
|
+
}
|
|
716
|
+
if (this.tool.isHidden) {
|
|
717
|
+
this.hideTool();
|
|
718
|
+
}
|
|
719
|
+
else if (this.resizable) {
|
|
694
720
|
if (this.location === 'toolbar') {
|
|
695
721
|
this.renderer.setStyle(this.internalComponentRef, 'visibility', this.tool.visibility);
|
|
696
722
|
this.renderer.setStyle(this.internalComponentRef, 'display', this.tool.toolbarDisplay);
|
|
@@ -698,8 +724,12 @@ class ToolBarRendererComponent {
|
|
|
698
724
|
else {
|
|
699
725
|
this.renderer.setStyle(this.internalComponentRef, 'display', this.tool.overflowDisplay);
|
|
700
726
|
}
|
|
701
|
-
this.updateTools();
|
|
702
727
|
}
|
|
728
|
+
else {
|
|
729
|
+
this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
|
|
730
|
+
this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
|
|
731
|
+
}
|
|
732
|
+
this.updateTools();
|
|
703
733
|
}
|
|
704
734
|
setAttribute(element, attr, value) {
|
|
705
735
|
this.renderer.setAttribute(element, attr, value);
|
|
@@ -725,6 +755,10 @@ class ToolBarRendererComponent {
|
|
|
725
755
|
}
|
|
726
756
|
}
|
|
727
757
|
}
|
|
758
|
+
hideTool() {
|
|
759
|
+
this.renderer.setStyle(this.internalComponentRef, 'visibility', 'hidden');
|
|
760
|
+
this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
|
|
761
|
+
}
|
|
728
762
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarRendererComponent, deps: [{ token: i0.Renderer2 }, { token: RendererService }, { token: RefreshService }, { token: ToolbarToolsService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
729
763
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarRendererComponent, isStandalone: true, selector: "[kendoToolbarRenderer]", inputs: { tool: "tool", location: "location", resizable: "resizable" }, outputs: { rendererClick: "rendererClick" }, providers: [RendererService], ngImport: i0 });
|
|
730
764
|
}
|
|
@@ -1197,6 +1231,36 @@ class ToolBarComponent {
|
|
|
1197
1231
|
get tabIndex() {
|
|
1198
1232
|
return this.tabindex;
|
|
1199
1233
|
}
|
|
1234
|
+
/**
|
|
1235
|
+
* Specifies the icons visibility for all tools in the ToolBar.
|
|
1236
|
+
* This can be overridden by the `showIcon` property of each tool.
|
|
1237
|
+
*/
|
|
1238
|
+
set showIcon(value) {
|
|
1239
|
+
if (this._showIcon === value) {
|
|
1240
|
+
return;
|
|
1241
|
+
}
|
|
1242
|
+
const normalizedValue = this.normalizeDisplayValue(value);
|
|
1243
|
+
this._showIcon = value;
|
|
1244
|
+
this.propertyChange.emit({
|
|
1245
|
+
property: 'showIcon',
|
|
1246
|
+
value: normalizedValue
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
/**
|
|
1250
|
+
* Specifies the text visibility for all tools in the ToolBar.
|
|
1251
|
+
* This can be overridden by the `showText` property of each tool.
|
|
1252
|
+
*/
|
|
1253
|
+
set showText(value) {
|
|
1254
|
+
if (this._showText === value) {
|
|
1255
|
+
return;
|
|
1256
|
+
}
|
|
1257
|
+
const normalizedValue = this.normalizeDisplayValue(value);
|
|
1258
|
+
this._showText = value;
|
|
1259
|
+
this.propertyChange.emit({
|
|
1260
|
+
property: 'showText',
|
|
1261
|
+
value: normalizedValue
|
|
1262
|
+
});
|
|
1263
|
+
}
|
|
1200
1264
|
/**
|
|
1201
1265
|
* Fires when the overflow popup of the ToolBar is opened.
|
|
1202
1266
|
*/
|
|
@@ -1253,6 +1317,10 @@ class ToolBarComponent {
|
|
|
1253
1317
|
* @hidden
|
|
1254
1318
|
*/
|
|
1255
1319
|
nextButtonIcon = caretAltRightIcon;
|
|
1320
|
+
/**
|
|
1321
|
+
* @hidden
|
|
1322
|
+
*/
|
|
1323
|
+
propertyChange = new EventEmitter();
|
|
1256
1324
|
hostClass = true;
|
|
1257
1325
|
get scrollableClass() {
|
|
1258
1326
|
return this.isScrollMode;
|
|
@@ -1271,6 +1339,8 @@ class ToolBarComponent {
|
|
|
1271
1339
|
cachedGap;
|
|
1272
1340
|
_size = DEFAULT_SIZE;
|
|
1273
1341
|
_fillMode = DEFAULT_FILL_MODE;
|
|
1342
|
+
_showText = 'always';
|
|
1343
|
+
_showIcon = 'always';
|
|
1274
1344
|
overflowButtonClickedTime = null;
|
|
1275
1345
|
showAutoButtons = false;
|
|
1276
1346
|
scrollButtonStateChangeSub;
|
|
@@ -1808,10 +1878,10 @@ class ToolBarComponent {
|
|
|
1808
1878
|
if (containerWidth > childrenWidth) {
|
|
1809
1879
|
for (let i = this.overflowTools.length - 1; i >= 0; i--) {
|
|
1810
1880
|
width = this.showFirstHiddenTool(containerWidth, childrenWidth);
|
|
1811
|
-
if (width) {
|
|
1881
|
+
if (width > 0) {
|
|
1812
1882
|
childrenWidth += width + this.gap;
|
|
1813
1883
|
}
|
|
1814
|
-
else {
|
|
1884
|
+
else if (width === 0) {
|
|
1815
1885
|
break;
|
|
1816
1886
|
}
|
|
1817
1887
|
}
|
|
@@ -1846,7 +1916,7 @@ class ToolBarComponent {
|
|
|
1846
1916
|
tool.overflows = true;
|
|
1847
1917
|
}
|
|
1848
1918
|
this.refreshService.refresh(tool);
|
|
1849
|
-
return renderedElement.width; // returns 0 if `overflows` is true
|
|
1919
|
+
return tool.isHidden ? -1 : renderedElement.width; // returns 0 if `overflows` is true and -1 if the tool is hidden
|
|
1850
1920
|
}
|
|
1851
1921
|
setPopupContentDimensions(isSection) {
|
|
1852
1922
|
const popupContentContainer = this.popupRef.popup.instance.contentContainer.nativeElement;
|
|
@@ -1972,8 +2042,14 @@ class ToolBarComponent {
|
|
|
1972
2042
|
}
|
|
1973
2043
|
});
|
|
1974
2044
|
}
|
|
2045
|
+
normalizeDisplayValue(value) {
|
|
2046
|
+
if (typeof value === 'boolean') {
|
|
2047
|
+
return value ? 'always' : 'never';
|
|
2048
|
+
}
|
|
2049
|
+
return value;
|
|
2050
|
+
}
|
|
1975
2051
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", 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 }, { token: ToolbarToolsService }, { token: ScrollService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1976
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarComponent, isStandalone: true, selector: "kendo-toolbar", inputs: { overflow: "overflow", resizable: "resizable", popupSettings: "popupSettings", fillMode: "fillMode", 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", "class.k-toolbar-scrollable": "this.scrollableClass", "class.k-toolbar-section": "this.sectionClass", "attr.role": "this.role", "attr.dir": "this.getDir", "class.k-toolbar-resizable": "this.resizableClass" } }, providers: [
|
|
2052
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarComponent, isStandalone: true, selector: "kendo-toolbar", inputs: { overflow: "overflow", resizable: "resizable", popupSettings: "popupSettings", fillMode: "fillMode", tabindex: "tabindex", size: "size", tabIndex: "tabIndex", showIcon: "showIcon", showText: "showText" }, outputs: { open: "open", close: "close" }, host: { listeners: { "focus": "onFocus($event)", "focusout": "onFocusOut($event)" }, properties: { "class.k-toolbar": "this.hostClass", "class.k-toolbar-scrollable": "this.scrollableClass", "class.k-toolbar-section": "this.sectionClass", "attr.role": "this.role", "attr.dir": "this.getDir", "class.k-toolbar-resizable": "this.resizableClass" } }, providers: [
|
|
1977
2053
|
RefreshService,
|
|
1978
2054
|
NavigationService,
|
|
1979
2055
|
LocalizationService,
|
|
@@ -2399,7 +2475,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2399
2475
|
<kendo-resize-sensor *ngIf="overflowEnabled" #resizeSensor></kendo-resize-sensor>
|
|
2400
2476
|
`,
|
|
2401
2477
|
standalone: true,
|
|
2402
|
-
imports: [NgTemplateOutlet, LocalizedToolbarMessagesDirective, NgFor, ToolBarRendererComponent, NgIf, ButtonComponent, NgClass, ResizeSensorComponent,
|
|
2478
|
+
imports: [NgTemplateOutlet, LocalizedToolbarMessagesDirective, NgFor, ToolBarRendererComponent, NgIf, ButtonComponent, NgClass, ResizeSensorComponent, ToolbarScrollableButtonComponent]
|
|
2403
2479
|
}]
|
|
2404
2480
|
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2.PopupService }, { type: RefreshService }, { type: NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: ToolbarToolsService }, { type: ScrollService }]; }, propDecorators: { overflow: [{
|
|
2405
2481
|
type: Input
|
|
@@ -2416,6 +2492,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2416
2492
|
}], tabIndex: [{
|
|
2417
2493
|
type: Input,
|
|
2418
2494
|
args: ['tabIndex']
|
|
2495
|
+
}], showIcon: [{
|
|
2496
|
+
type: Input
|
|
2497
|
+
}], showText: [{
|
|
2498
|
+
type: Input
|
|
2419
2499
|
}], open: [{
|
|
2420
2500
|
type: Output
|
|
2421
2501
|
}], close: [{
|
|
@@ -2488,9 +2568,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2488
2568
|
class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
2489
2569
|
element;
|
|
2490
2570
|
zone;
|
|
2571
|
+
host;
|
|
2491
2572
|
// showText and showIcon showIcon should be declared first
|
|
2492
2573
|
/**
|
|
2493
|
-
* Specifies
|
|
2574
|
+
* Specifies the button text visibility.
|
|
2494
2575
|
*/
|
|
2495
2576
|
set showText(value) {
|
|
2496
2577
|
this._showText = value;
|
|
@@ -2500,9 +2581,15 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2500
2581
|
return this._showText;
|
|
2501
2582
|
}
|
|
2502
2583
|
/**
|
|
2503
|
-
* Specifies
|
|
2584
|
+
* Specifies the button icon visibility.
|
|
2504
2585
|
*/
|
|
2505
|
-
showIcon
|
|
2586
|
+
set showIcon(value) {
|
|
2587
|
+
this._showIcon = value;
|
|
2588
|
+
this.setTextDisplayMode();
|
|
2589
|
+
}
|
|
2590
|
+
get showIcon() {
|
|
2591
|
+
return this._showIcon;
|
|
2592
|
+
}
|
|
2506
2593
|
/**
|
|
2507
2594
|
* Specifies the text of the Button ([see example]({% slug controltypes_toolbar %}#toc-buttons)).
|
|
2508
2595
|
*/
|
|
@@ -2513,6 +2600,12 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2513
2600
|
get text() {
|
|
2514
2601
|
return this._text;
|
|
2515
2602
|
}
|
|
2603
|
+
/**
|
|
2604
|
+
* @hidden
|
|
2605
|
+
*/
|
|
2606
|
+
get size() {
|
|
2607
|
+
return this.host.size;
|
|
2608
|
+
}
|
|
2516
2609
|
/**
|
|
2517
2610
|
* Specifies custom inline CSS styles of the Button.
|
|
2518
2611
|
*/
|
|
@@ -2663,17 +2756,29 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2663
2756
|
toolbarButtonElement;
|
|
2664
2757
|
sectionButtonElement;
|
|
2665
2758
|
overflowButtonElement;
|
|
2666
|
-
_showText
|
|
2759
|
+
_showText;
|
|
2760
|
+
_showIcon;
|
|
2667
2761
|
_text;
|
|
2668
|
-
|
|
2762
|
+
propertyChangeSub;
|
|
2763
|
+
constructor(element, zone, host) {
|
|
2669
2764
|
super();
|
|
2670
2765
|
this.element = element;
|
|
2671
2766
|
this.zone = zone;
|
|
2767
|
+
this.host = host;
|
|
2672
2768
|
this.isBuiltInTool = true;
|
|
2769
|
+
this.propertyChangeSub = this.host.propertyChange.subscribe(change => {
|
|
2770
|
+
if (change.property === 'showText' || change.property === 'showIcon') {
|
|
2771
|
+
this[change.property] = change.value;
|
|
2772
|
+
}
|
|
2773
|
+
});
|
|
2673
2774
|
}
|
|
2674
2775
|
ngOnInit() {
|
|
2675
2776
|
this.setTextDisplayMode();
|
|
2676
2777
|
}
|
|
2778
|
+
ngOnDestroy() {
|
|
2779
|
+
this.propertyChangeSub.unsubscribe();
|
|
2780
|
+
this.propertyChangeSub = null;
|
|
2781
|
+
}
|
|
2677
2782
|
/**
|
|
2678
2783
|
* @hidden
|
|
2679
2784
|
*/
|
|
@@ -2720,16 +2825,19 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2720
2825
|
this.selected = state;
|
|
2721
2826
|
this.selectedChange.emit(state);
|
|
2722
2827
|
}
|
|
2828
|
+
/**
|
|
2829
|
+
* @hidden
|
|
2830
|
+
*/
|
|
2723
2831
|
getButton() {
|
|
2724
2832
|
return this[`${this.location}ButtonElement`]?.nativeElement;
|
|
2725
2833
|
}
|
|
2726
2834
|
setTextDisplayMode() {
|
|
2727
|
-
this.toolbarOptions.text = this.showText === '
|
|
2835
|
+
this.toolbarOptions.text = this.showText === 'menu' || this.showText === 'never' ? undefined : this.text;
|
|
2728
2836
|
this.zone.onStable.pipe(take(1)).subscribe(() => {
|
|
2729
|
-
this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
|
|
2837
|
+
this.overflowOptions.text = this.showText === 'toolbar' || this.showText === 'never' ? undefined : this.text;
|
|
2730
2838
|
});
|
|
2731
2839
|
}
|
|
2732
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
2840
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
2733
2841
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarButtonComponent, isStandalone: true, 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: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "sectionButtonElement", first: true, predicate: ["sectionButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, ngImport: i0, template: `
|
|
2734
2842
|
<ng-template #toolbarTemplate>
|
|
2735
2843
|
<button
|
|
@@ -2739,6 +2847,7 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2739
2847
|
[tabindex]="tabIndex"
|
|
2740
2848
|
type="button"
|
|
2741
2849
|
kendoButton
|
|
2850
|
+
[size]="size"
|
|
2742
2851
|
[ngStyle]="style"
|
|
2743
2852
|
[ngClass]="className"
|
|
2744
2853
|
[attr.title]="title"
|
|
@@ -2792,6 +2901,7 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2792
2901
|
[tabindex]="tabIndex"
|
|
2793
2902
|
type="button"
|
|
2794
2903
|
kendoButton
|
|
2904
|
+
[size]="size"
|
|
2795
2905
|
[ngStyle]="style"
|
|
2796
2906
|
[ngClass]="className"
|
|
2797
2907
|
[attr.title]="title"
|
|
@@ -2829,6 +2939,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2829
2939
|
[tabindex]="tabIndex"
|
|
2830
2940
|
type="button"
|
|
2831
2941
|
kendoButton
|
|
2942
|
+
[size]="size"
|
|
2832
2943
|
[ngStyle]="style"
|
|
2833
2944
|
[ngClass]="className"
|
|
2834
2945
|
[attr.title]="title"
|
|
@@ -2882,6 +2993,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2882
2993
|
[tabindex]="tabIndex"
|
|
2883
2994
|
type="button"
|
|
2884
2995
|
kendoButton
|
|
2996
|
+
[size]="size"
|
|
2885
2997
|
[ngStyle]="style"
|
|
2886
2998
|
[ngClass]="className"
|
|
2887
2999
|
[attr.title]="title"
|
|
@@ -2906,7 +3018,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2906
3018
|
standalone: true,
|
|
2907
3019
|
imports: [ButtonComponent, NgStyle, NgClass, NgIf, IconWrapperComponent, BadgeComponent],
|
|
2908
3020
|
}]
|
|
2909
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { showText: [{
|
|
3021
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: ToolBarComponent }]; }, propDecorators: { showText: [{
|
|
2910
3022
|
type: Input
|
|
2911
3023
|
}], showIcon: [{
|
|
2912
3024
|
type: Input
|
|
@@ -2962,6 +3074,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2962
3074
|
*/
|
|
2963
3075
|
class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
2964
3076
|
localization;
|
|
3077
|
+
host;
|
|
2965
3078
|
/**
|
|
2966
3079
|
* By default, the ButtonGroup is enabled. To disable the whole group of buttons, set its `disabled`
|
|
2967
3080
|
* attribute to `true`. To disable a specific button, set the `disabled` attribute of the button to
|
|
@@ -3018,9 +3131,10 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
3018
3131
|
focusedIndex = -1;
|
|
3019
3132
|
getNextKey;
|
|
3020
3133
|
getPrevKey;
|
|
3021
|
-
constructor(localization) {
|
|
3134
|
+
constructor(localization, host) {
|
|
3022
3135
|
super();
|
|
3023
3136
|
this.localization = localization;
|
|
3137
|
+
this.host = host;
|
|
3024
3138
|
this.getNextKey = getNextKey(this.localization.rtl);
|
|
3025
3139
|
this.getPrevKey = getPrevKey(this.localization.rtl);
|
|
3026
3140
|
this.isBuiltInTool = true;
|
|
@@ -3115,13 +3229,19 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
3115
3229
|
return button.overflowOptions.svgIcon;
|
|
3116
3230
|
}
|
|
3117
3231
|
}
|
|
3232
|
+
/**
|
|
3233
|
+
* @hidden
|
|
3234
|
+
*/
|
|
3235
|
+
get size() {
|
|
3236
|
+
return this.host.size;
|
|
3237
|
+
}
|
|
3118
3238
|
focusButton(index, ev) {
|
|
3119
3239
|
// Guard against focusing twice on mousedown.
|
|
3120
3240
|
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
|
|
3121
3241
|
this.buttonElements[index]?.focus();
|
|
3122
3242
|
}
|
|
3123
3243
|
}
|
|
3124
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3244
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }, { token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
3125
3245
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarButtonGroupComponent, isStandalone: true, selector: "kendo-toolbar-buttongroup", inputs: { disabled: "disabled", fillMode: "fillMode", selection: "selection", width: "width", look: "look" }, providers: [LocalizationService, { provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonGroupComponent) }], queries: [{ propertyName: "buttonComponents", predicate: i0.forwardRef(function () { return ToolBarButtonComponent; }) }], viewQueries: [{ propertyName: "toolbarButtonGroup", first: true, predicate: ["toolbarButtonGroup"], descendants: true }, { propertyName: "sectionButtonGroup", first: true, predicate: ["sectionButtonGroup"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarButtonGroup"], usesInheritance: true, ngImport: i0, template: `
|
|
3126
3246
|
<ng-template #toolbarTemplate>
|
|
3127
3247
|
<kendo-buttongroup
|
|
@@ -3142,6 +3262,7 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
3142
3262
|
[ngClass]="button.className"
|
|
3143
3263
|
[attr.title]="button.title"
|
|
3144
3264
|
[disabled]="button.disabled"
|
|
3265
|
+
[size]="size"
|
|
3145
3266
|
[togglable]="button.togglable"
|
|
3146
3267
|
[selected]="button.selected"
|
|
3147
3268
|
[attr.aria-pressed]="button.selected ? true : false"
|
|
@@ -3203,6 +3324,7 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
3203
3324
|
[ngClass]="button.className"
|
|
3204
3325
|
[attr.title]="button.title"
|
|
3205
3326
|
[disabled]="button.disabled"
|
|
3327
|
+
[size]="size"
|
|
3206
3328
|
[togglable]="button.togglable"
|
|
3207
3329
|
[selected]="button.selected"
|
|
3208
3330
|
[attr.aria-pressed]="button.selected ? true : false"
|
|
@@ -3248,6 +3370,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3248
3370
|
[ngClass]="button.className"
|
|
3249
3371
|
[attr.title]="button.title"
|
|
3250
3372
|
[disabled]="button.disabled"
|
|
3373
|
+
[size]="size"
|
|
3251
3374
|
[togglable]="button.togglable"
|
|
3252
3375
|
[selected]="button.selected"
|
|
3253
3376
|
[attr.aria-pressed]="button.selected ? true : false"
|
|
@@ -3309,6 +3432,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3309
3432
|
[ngClass]="button.className"
|
|
3310
3433
|
[attr.title]="button.title"
|
|
3311
3434
|
[disabled]="button.disabled"
|
|
3435
|
+
[size]="size"
|
|
3312
3436
|
[togglable]="button.togglable"
|
|
3313
3437
|
[selected]="button.selected"
|
|
3314
3438
|
[attr.aria-pressed]="button.selected ? true : false"
|
|
@@ -3330,7 +3454,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3330
3454
|
standalone: true,
|
|
3331
3455
|
imports: [ButtonGroupComponent, NgFor, ButtonComponent, NgStyle, NgClass, NgIf, IconWrapperComponent]
|
|
3332
3456
|
}]
|
|
3333
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { disabled: [{
|
|
3457
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: ToolBarComponent }]; }, propDecorators: { disabled: [{
|
|
3334
3458
|
type: Input
|
|
3335
3459
|
}], fillMode: [{
|
|
3336
3460
|
type: Input
|
|
@@ -3360,6 +3484,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3360
3484
|
class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
3361
3485
|
zone;
|
|
3362
3486
|
renderer;
|
|
3487
|
+
host;
|
|
3363
3488
|
/**
|
|
3364
3489
|
* Allows showing the default arrow icon or providing alternative one instead.
|
|
3365
3490
|
* @default false
|
|
@@ -3372,7 +3497,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
3372
3497
|
title = '';
|
|
3373
3498
|
// showText and showIcon showIcon should be declared first
|
|
3374
3499
|
/**
|
|
3375
|
-
*
|
|
3500
|
+
* Specifies the button text visibility.
|
|
3376
3501
|
*/
|
|
3377
3502
|
set showText(value) {
|
|
3378
3503
|
this._showText = value;
|
|
@@ -3382,9 +3507,14 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
3382
3507
|
return this._showText;
|
|
3383
3508
|
}
|
|
3384
3509
|
/**
|
|
3385
|
-
*
|
|
3510
|
+
* Specifies the button icon visibility.
|
|
3386
3511
|
*/
|
|
3387
|
-
showIcon
|
|
3512
|
+
set showIcon(value) {
|
|
3513
|
+
this._showIcon = value;
|
|
3514
|
+
}
|
|
3515
|
+
get showIcon() {
|
|
3516
|
+
return this._showIcon;
|
|
3517
|
+
}
|
|
3388
3518
|
/**
|
|
3389
3519
|
* Sets the text of the DropDownButton
|
|
3390
3520
|
* ([see example](slug:controltypes_toolbar#toc-drop-down-buttons)).
|
|
@@ -3559,26 +3689,40 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
3559
3689
|
_data;
|
|
3560
3690
|
_popupSettings = { animate: true, popupClass: '' };
|
|
3561
3691
|
focusedIndex = -1;
|
|
3562
|
-
_showText
|
|
3692
|
+
_showText;
|
|
3693
|
+
_showIcon;
|
|
3563
3694
|
_text;
|
|
3695
|
+
propertyChangeSub;
|
|
3564
3696
|
getNextKey;
|
|
3565
3697
|
getPrevKey;
|
|
3566
|
-
constructor(zone, renderer) {
|
|
3698
|
+
constructor(zone, renderer, host) {
|
|
3567
3699
|
super();
|
|
3568
3700
|
this.zone = zone;
|
|
3569
3701
|
this.renderer = renderer;
|
|
3702
|
+
this.host = host;
|
|
3570
3703
|
this.getNextKey = getNextKey();
|
|
3571
3704
|
this.getPrevKey = getPrevKey();
|
|
3572
3705
|
this.isBuiltInTool = true;
|
|
3706
|
+
this.propertyChangeSub = this.host.propertyChange.subscribe(change => {
|
|
3707
|
+
if (change.property === 'showText' || change.property === 'showIcon') {
|
|
3708
|
+
this[change.property] = change.value;
|
|
3709
|
+
}
|
|
3710
|
+
});
|
|
3573
3711
|
}
|
|
3574
3712
|
ngOnInit() {
|
|
3575
3713
|
this.setTextDisplayMode();
|
|
3576
3714
|
}
|
|
3715
|
+
ngOnDestroy() {
|
|
3716
|
+
if (this.propertyChangeSub) {
|
|
3717
|
+
this.propertyChangeSub.unsubscribe();
|
|
3718
|
+
this.propertyChangeSub = null;
|
|
3719
|
+
}
|
|
3720
|
+
}
|
|
3577
3721
|
ngAfterViewInit() {
|
|
3578
3722
|
this.zone.onStable.pipe(take(1)).subscribe(() => {
|
|
3579
|
-
const
|
|
3580
|
-
if (
|
|
3581
|
-
this.renderer.addClass(
|
|
3723
|
+
const dropdownButton = this[`${this.location}DropDownButton`];
|
|
3724
|
+
if (dropdownButton?.button) {
|
|
3725
|
+
this.renderer.addClass(dropdownButton.button.nativeElement, 'k-toolbar-menu-button');
|
|
3582
3726
|
}
|
|
3583
3727
|
});
|
|
3584
3728
|
}
|
|
@@ -3590,6 +3734,12 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
3590
3734
|
.toArray()
|
|
3591
3735
|
.findIndex(b => b.nativeElement.contains(ev.target));
|
|
3592
3736
|
}
|
|
3737
|
+
/**
|
|
3738
|
+
* @hidden
|
|
3739
|
+
*/
|
|
3740
|
+
get size() {
|
|
3741
|
+
return this.host.size;
|
|
3742
|
+
}
|
|
3593
3743
|
/**
|
|
3594
3744
|
* @hidden
|
|
3595
3745
|
*/
|
|
@@ -3632,7 +3782,6 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
3632
3782
|
if (dataItem) {
|
|
3633
3783
|
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
3634
3784
|
}
|
|
3635
|
-
return undefined;
|
|
3636
3785
|
}
|
|
3637
3786
|
/**
|
|
3638
3787
|
* @hidden
|
|
@@ -3651,10 +3800,10 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
3651
3800
|
}
|
|
3652
3801
|
}
|
|
3653
3802
|
setTextDisplayMode() {
|
|
3654
|
-
this.toolbarOptions.text = this.showText === '
|
|
3655
|
-
this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
|
|
3803
|
+
this.toolbarOptions.text = this.showText === 'menu' || this.showText === 'never' ? undefined : this.text;
|
|
3804
|
+
this.overflowOptions.text = this.showText === 'toolbar' || this.showText === 'never' ? undefined : this.text;
|
|
3656
3805
|
}
|
|
3657
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
3806
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
3658
3807
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarDropDownButtonComponent, isStandalone: true, selector: "kendo-toolbar-dropdownbutton", inputs: { arrowIcon: "arrowIcon", title: "title", showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", svgIcon: "svgIcon", 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: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "toolbarDropDownButton", first: true, predicate: ["toolbarDropDownButton"], descendants: true }, { propertyName: "sectionDropDownButton", first: true, predicate: ["sectionDropDownButton"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarDropDownButton"], usesInheritance: true, ngImport: i0, template: `
|
|
3659
3808
|
<ng-template #toolbarTemplate>
|
|
3660
3809
|
<kendo-dropdownbutton #toolbarDropDownButton
|
|
@@ -3665,6 +3814,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
3665
3814
|
[arrowIcon]="arrowIcon"
|
|
3666
3815
|
[buttonClass]="buttonClass"
|
|
3667
3816
|
[disabled]="disabled"
|
|
3817
|
+
[size]="size"
|
|
3668
3818
|
[tabIndex]="-1"
|
|
3669
3819
|
[data]="data"
|
|
3670
3820
|
[buttonAttributes]="{'title': title}"
|
|
@@ -3730,6 +3880,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
3730
3880
|
[arrowIcon]="arrowIcon"
|
|
3731
3881
|
[buttonClass]="buttonClass"
|
|
3732
3882
|
[disabled]="disabled"
|
|
3883
|
+
[size]="size"
|
|
3733
3884
|
[tabIndex]="-1"
|
|
3734
3885
|
[data]="data"
|
|
3735
3886
|
[buttonAttributes]="{'title': title}"
|
|
@@ -3762,6 +3913,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3762
3913
|
[arrowIcon]="arrowIcon"
|
|
3763
3914
|
[buttonClass]="buttonClass"
|
|
3764
3915
|
[disabled]="disabled"
|
|
3916
|
+
[size]="size"
|
|
3765
3917
|
[tabIndex]="-1"
|
|
3766
3918
|
[data]="data"
|
|
3767
3919
|
[buttonAttributes]="{'title': title}"
|
|
@@ -3827,6 +3979,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3827
3979
|
[arrowIcon]="arrowIcon"
|
|
3828
3980
|
[buttonClass]="buttonClass"
|
|
3829
3981
|
[disabled]="disabled"
|
|
3982
|
+
[size]="size"
|
|
3830
3983
|
[tabIndex]="-1"
|
|
3831
3984
|
[data]="data"
|
|
3832
3985
|
[buttonAttributes]="{'title': title}"
|
|
@@ -3845,7 +3998,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3845
3998
|
standalone: true,
|
|
3846
3999
|
imports: [DropDownButtonComponent, NgClass, NgIf, IconWrapperComponent, NgFor]
|
|
3847
4000
|
}]
|
|
3848
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { arrowIcon: [{
|
|
4001
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: ToolBarComponent }]; }, propDecorators: { arrowIcon: [{
|
|
3849
4002
|
type: Input
|
|
3850
4003
|
}], title: [{
|
|
3851
4004
|
type: Input
|
|
@@ -3905,9 +4058,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3905
4058
|
* Represents the [Kendo UI ToolBar SplitButton for Angular](slug:controltypes_toolbar#toc-split-buttons).
|
|
3906
4059
|
*/
|
|
3907
4060
|
class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
4061
|
+
host;
|
|
3908
4062
|
// showText and showIcon showIcon should be declared first
|
|
3909
4063
|
/**
|
|
3910
|
-
* Specifies
|
|
4064
|
+
* Specifies the button text visibility.
|
|
3911
4065
|
*/
|
|
3912
4066
|
set showText(value) {
|
|
3913
4067
|
this._showText = value;
|
|
@@ -3917,9 +4071,15 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
3917
4071
|
return this._showText;
|
|
3918
4072
|
}
|
|
3919
4073
|
/**
|
|
3920
|
-
* Specifies
|
|
4074
|
+
* Specifies the button icon visibility.
|
|
3921
4075
|
*/
|
|
3922
|
-
showIcon
|
|
4076
|
+
set showIcon(value) {
|
|
4077
|
+
this._showIcon = value;
|
|
4078
|
+
this.setTextDisplayMode();
|
|
4079
|
+
}
|
|
4080
|
+
get showIcon() {
|
|
4081
|
+
return this._showIcon;
|
|
4082
|
+
}
|
|
3923
4083
|
/**
|
|
3924
4084
|
* Sets the text of the SplitButton ([see example](slug:controltypes_toolbar#toc-split-buttons)).
|
|
3925
4085
|
*/
|
|
@@ -4100,25 +4260,39 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4100
4260
|
ngOnInit() {
|
|
4101
4261
|
this.setTextDisplayMode();
|
|
4102
4262
|
}
|
|
4263
|
+
ngOnDestroy() {
|
|
4264
|
+
if (this.propertyChangeSub) {
|
|
4265
|
+
this.propertyChangeSub.unsubscribe();
|
|
4266
|
+
this.propertyChangeSub = null;
|
|
4267
|
+
}
|
|
4268
|
+
}
|
|
4103
4269
|
get overflowButtons() {
|
|
4104
4270
|
return [this.overflowMainButton, ...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
|
|
4105
4271
|
}
|
|
4106
4272
|
_data;
|
|
4107
4273
|
_popupSettings = { animate: true, popupClass: '' };
|
|
4108
4274
|
focusedIndex = -1;
|
|
4109
|
-
_showText
|
|
4275
|
+
_showText;
|
|
4276
|
+
_showIcon;
|
|
4110
4277
|
_text;
|
|
4278
|
+
propertyChangeSub;
|
|
4111
4279
|
getNextKey;
|
|
4112
4280
|
getPrevKey;
|
|
4113
4281
|
toolbarSplitButton;
|
|
4114
4282
|
sectionSplitButton;
|
|
4115
4283
|
overflowMainButton;
|
|
4116
4284
|
overflowListItems;
|
|
4117
|
-
constructor() {
|
|
4285
|
+
constructor(host) {
|
|
4118
4286
|
super();
|
|
4287
|
+
this.host = host;
|
|
4119
4288
|
this.getNextKey = getNextKey();
|
|
4120
4289
|
this.getPrevKey = getPrevKey();
|
|
4121
4290
|
this.isBuiltInTool = true;
|
|
4291
|
+
this.propertyChangeSub = this.host.propertyChange.subscribe(change => {
|
|
4292
|
+
if (change.property === 'showText' || change.property === 'showIcon') {
|
|
4293
|
+
this[change.property] = change.value;
|
|
4294
|
+
}
|
|
4295
|
+
});
|
|
4122
4296
|
}
|
|
4123
4297
|
/**
|
|
4124
4298
|
* @hidden
|
|
@@ -4139,6 +4313,12 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4139
4313
|
canFocus() {
|
|
4140
4314
|
return !this.disabled;
|
|
4141
4315
|
}
|
|
4316
|
+
/**
|
|
4317
|
+
* @hidden
|
|
4318
|
+
*/
|
|
4319
|
+
get size() {
|
|
4320
|
+
return this.host.size;
|
|
4321
|
+
}
|
|
4142
4322
|
/**
|
|
4143
4323
|
* @hidden
|
|
4144
4324
|
*/
|
|
@@ -4175,7 +4355,6 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4175
4355
|
if (dataItem) {
|
|
4176
4356
|
return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
|
|
4177
4357
|
}
|
|
4178
|
-
return undefined;
|
|
4179
4358
|
}
|
|
4180
4359
|
/**
|
|
4181
4360
|
* @hidden
|
|
@@ -4194,10 +4373,10 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4194
4373
|
}
|
|
4195
4374
|
}
|
|
4196
4375
|
setTextDisplayMode() {
|
|
4197
|
-
this.toolbarOptions.text = this.showText === '
|
|
4198
|
-
this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
|
|
4376
|
+
this.toolbarOptions.text = this.showText === 'menu' || this.showText === 'never' ? undefined : this.text;
|
|
4377
|
+
this.overflowOptions.text = this.showText === 'toolbar' || this.showText === 'never' ? undefined : this.text;
|
|
4199
4378
|
}
|
|
4200
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarSplitButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4379
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarSplitButtonComponent, deps: [{ token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
4201
4380
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarSplitButtonComponent, isStandalone: true, selector: "kendo-toolbar-splitbutton", inputs: { showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", popupSettings: "popupSettings", fillMode: "fillMode", themeColor: "themeColor", look: "look", buttonClass: "buttonClass", arrowButtonClass: "arrowButtonClass", arrowButtonIcon: "arrowButtonIcon", arrowButtonSvgIcon: "arrowButtonSvgIcon", textField: "textField", data: "data" }, outputs: { buttonClick: "buttonClick", itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarSplitButtonComponent) }], viewQueries: [{ propertyName: "toolbarSplitButton", first: true, predicate: ["toolbarSplitButton"], descendants: true }, { propertyName: "sectionSplitButton", first: true, predicate: ["sectionSplitButton"], 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: `
|
|
4202
4381
|
<ng-template #toolbarTemplate>
|
|
4203
4382
|
<kendo-splitbutton
|
|
@@ -4214,6 +4393,7 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4214
4393
|
[arrowButtonIcon]="arrowButtonIcon"
|
|
4215
4394
|
[arrowButtonSvgIcon]="arrowButtonSvgIcon"
|
|
4216
4395
|
[disabled]="disabled"
|
|
4396
|
+
[size]="size"
|
|
4217
4397
|
[tabIndex]="-1"
|
|
4218
4398
|
[textField]="textField"
|
|
4219
4399
|
[popupSettings]="popupSettings"
|
|
@@ -4283,6 +4463,7 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4283
4463
|
[arrowButtonIcon]="arrowButtonIcon"
|
|
4284
4464
|
[arrowButtonSvgIcon]="arrowButtonSvgIcon"
|
|
4285
4465
|
[disabled]="disabled"
|
|
4466
|
+
[size]="size"
|
|
4286
4467
|
[tabIndex]="-1"
|
|
4287
4468
|
[textField]="textField"
|
|
4288
4469
|
[popupSettings]="popupSettings"
|
|
@@ -4318,6 +4499,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
4318
4499
|
[arrowButtonIcon]="arrowButtonIcon"
|
|
4319
4500
|
[arrowButtonSvgIcon]="arrowButtonSvgIcon"
|
|
4320
4501
|
[disabled]="disabled"
|
|
4502
|
+
[size]="size"
|
|
4321
4503
|
[tabIndex]="-1"
|
|
4322
4504
|
[textField]="textField"
|
|
4323
4505
|
[popupSettings]="popupSettings"
|
|
@@ -4387,6 +4569,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
4387
4569
|
[arrowButtonIcon]="arrowButtonIcon"
|
|
4388
4570
|
[arrowButtonSvgIcon]="arrowButtonSvgIcon"
|
|
4389
4571
|
[disabled]="disabled"
|
|
4572
|
+
[size]="size"
|
|
4390
4573
|
[tabIndex]="-1"
|
|
4391
4574
|
[textField]="textField"
|
|
4392
4575
|
[popupSettings]="popupSettings"
|
|
@@ -4402,7 +4585,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
4402
4585
|
standalone: true,
|
|
4403
4586
|
imports: [SplitButtonComponent, NgClass, NgIf, IconWrapperComponent, NgFor]
|
|
4404
4587
|
}]
|
|
4405
|
-
}], ctorParameters: function () { return []; }, propDecorators: { showText: [{
|
|
4588
|
+
}], ctorParameters: function () { return [{ type: ToolBarComponent }]; }, propDecorators: { showText: [{
|
|
4406
4589
|
type: Input
|
|
4407
4590
|
}], showIcon: [{
|
|
4408
4591
|
type: Input
|