@progress/kendo-angular-toolbar 25.3.1-develop.2 → 25.4.0-develop.10
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.
|
@@ -3,15 +3,15 @@
|
|
|
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, inject, ElementRef, Input, ViewChild, Directive, Output, forwardRef, HostBinding, Component, ViewContainerRef, HostListener, ContentChildren, isDevMode, ViewChildren,
|
|
6
|
+
import { EventEmitter, Injectable, signal, afterNextRender, inject, ElementRef, Input, ViewChild, Directive, Output, forwardRef, HostBinding, ChangeDetectionStrategy, Component, computed, ViewContainerRef, HostListener, ContentChildren, isDevMode, ViewChildren, NgModule } from '@angular/core';
|
|
7
7
|
import * as i2 from '@progress/kendo-angular-popup';
|
|
8
8
|
import { PopupComponent, PopupService } from '@progress/kendo-angular-popup';
|
|
9
9
|
import { isDocumentAvailable, normalizeKeys, Keys, isPresent as isPresent$1, getLicenseMessage, shouldShowValidationUI, guid, parseCSSClassNames, ResizeSensorComponent, WatermarkOverlayComponent, provideComponentName, hasObservers, DraggableDirective, 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';
|
|
13
|
-
import { take, filter, takeUntil } from 'rxjs/operators';
|
|
14
13
|
import { Subject, Subscription, merge, fromEvent } from 'rxjs';
|
|
14
|
+
import { filter, takeUntil } from 'rxjs/operators';
|
|
15
15
|
import { chevronLeftIcon, chevronRightIcon, moreHorizontalIcon, moreVerticalIcon, chevronDownIcon, handleDragDotsIcon } from '@progress/kendo-svg-icons';
|
|
16
16
|
import { ButtonComponent, ButtonGroupComponent, DropDownButtonComponent, SplitButtonComponent } from '@progress/kendo-angular-buttons';
|
|
17
17
|
import { NgTemplateOutlet, NgClass, NgStyle } from '@angular/common';
|
|
@@ -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: '25.
|
|
29
|
+
publishDate: 1792513888,
|
|
30
|
+
version: '25.4.0-develop.10',
|
|
31
31
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -39,10 +39,10 @@ class RefreshService {
|
|
|
39
39
|
refresh(tool) {
|
|
40
40
|
this.onRefresh.emit(tool);
|
|
41
41
|
}
|
|
42
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
43
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: RefreshService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
43
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: RefreshService });
|
|
44
44
|
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: RefreshService, decorators: [{
|
|
46
46
|
type: Injectable
|
|
47
47
|
}] });
|
|
48
48
|
|
|
@@ -52,8 +52,8 @@ const DEFAULT_SCROLL_SPEED = 100;
|
|
|
52
52
|
* @hidden
|
|
53
53
|
*/
|
|
54
54
|
class ScrollService {
|
|
55
|
-
ngZone;
|
|
56
55
|
localization;
|
|
56
|
+
ngZone;
|
|
57
57
|
owner;
|
|
58
58
|
position = 0;
|
|
59
59
|
scrollButtonActiveStateChange = new Subject();
|
|
@@ -73,9 +73,9 @@ class ScrollService {
|
|
|
73
73
|
get toolsOverflow() {
|
|
74
74
|
return this.scrollContainerOverflowSize > 0;
|
|
75
75
|
}
|
|
76
|
-
constructor(
|
|
77
|
-
this.ngZone = ngZone;
|
|
76
|
+
constructor(localization, ngZone) {
|
|
78
77
|
this.localization = localization;
|
|
78
|
+
this.ngZone = ngZone;
|
|
79
79
|
}
|
|
80
80
|
toggleScrollButtonsState() {
|
|
81
81
|
const toolbar = this.owner;
|
|
@@ -89,7 +89,7 @@ class ScrollService {
|
|
|
89
89
|
const calculatedPrevButtonActive = (this.position * rtlDelta) > 0 && this.scrollContainerOverflowSize > 0;
|
|
90
90
|
const calculatedNextButtonActive = (this.position * rtlDelta) < this.scrollContainerOverflowSize - defaultOffset && this.scrollContainerOverflowSize > 0;
|
|
91
91
|
if (calculatedPrevButtonActive !== currentPrevButtonActive) {
|
|
92
|
-
this.
|
|
92
|
+
this.toggleButtonActiveState('prev', calculatedPrevButtonActive);
|
|
93
93
|
}
|
|
94
94
|
if (calculatedNextButtonActive !== currentNextButtonActive) {
|
|
95
95
|
this.ngZone.run(() => this.toggleButtonActiveState('next', calculatedNextButtonActive));
|
|
@@ -154,12 +154,12 @@ class ScrollService {
|
|
|
154
154
|
this.scrollButtonActiveStateChange.next({ buttonType, active });
|
|
155
155
|
}
|
|
156
156
|
isDisabled = (buttonType) => this.owner[`${buttonType}ScrollButton`]?.nativeElement.classList.contains('k-disabled');
|
|
157
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
158
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
157
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ScrollService, deps: [{ token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
158
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ScrollService });
|
|
159
159
|
}
|
|
160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ScrollService, decorators: [{
|
|
161
161
|
type: Injectable
|
|
162
|
-
}], ctorParameters: () => [{ type:
|
|
162
|
+
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.NgZone }] });
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
165
|
* @hidden
|
|
@@ -416,19 +416,19 @@ const normalizeOverflowSettings = (overflow) => {
|
|
|
416
416
|
* @hidden
|
|
417
417
|
*/
|
|
418
418
|
class NavigationService {
|
|
419
|
-
zone;
|
|
420
419
|
scrollService;
|
|
420
|
+
injector;
|
|
421
421
|
overflowButton;
|
|
422
422
|
focused = { renderedTool: null, index: -1 };
|
|
423
|
-
renderedTools = [];
|
|
423
|
+
renderedTools = signal([], ...(ngDevMode ? [{ debugName: "renderedTools" }] : []));
|
|
424
424
|
isPopupFocused = false;
|
|
425
425
|
isOverflowButtonFocused = false;
|
|
426
|
-
constructor(
|
|
427
|
-
this.zone = zone;
|
|
426
|
+
constructor(scrollService, injector) {
|
|
428
427
|
this.scrollService = scrollService;
|
|
428
|
+
this.injector = injector;
|
|
429
429
|
}
|
|
430
430
|
setRenderedTools(rts) {
|
|
431
|
-
this.renderedTools
|
|
431
|
+
this.renderedTools.set(rts);
|
|
432
432
|
}
|
|
433
433
|
click({ context, event: ev }) {
|
|
434
434
|
if (this.focused.renderedTool !== context && ev) {
|
|
@@ -518,11 +518,11 @@ class NavigationService {
|
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
getFocusableTools() {
|
|
521
|
-
return this.renderedTools.filter(rt => (rt.tool.overflows === this.isPopupFocused) && rt.tool.canFocus());
|
|
521
|
+
return this.renderedTools().filter(rt => (rt.tool.overflows === this.isPopupFocused) && rt.tool.canFocus());
|
|
522
522
|
}
|
|
523
523
|
focus(renderedTool, ev) {
|
|
524
|
-
// running the code below in
|
|
525
|
-
|
|
524
|
+
// running the code below in afterNextRender fixes issue #2939
|
|
525
|
+
afterNextRender(() => {
|
|
526
526
|
if (!renderedTool) {
|
|
527
527
|
const focusableRTs = this.getFocusableTools();
|
|
528
528
|
const lastFocusedRT = focusableRTs.find(rt => rt === this.focused.renderedTool) || focusableRTs[0];
|
|
@@ -544,7 +544,7 @@ class NavigationService {
|
|
|
544
544
|
}
|
|
545
545
|
this.blurOverflowButton();
|
|
546
546
|
}
|
|
547
|
-
});
|
|
547
|
+
}, { injector: this.injector });
|
|
548
548
|
}
|
|
549
549
|
blurOverflowButton() {
|
|
550
550
|
if (this.overflowButton) {
|
|
@@ -563,12 +563,12 @@ class NavigationService {
|
|
|
563
563
|
return (isPresent(this.overflowButton) &&
|
|
564
564
|
window.getComputedStyle(this.overflowButton.nativeElement).getPropertyValue('visibility') === 'visible');
|
|
565
565
|
}
|
|
566
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
567
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
566
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: NavigationService, deps: [{ token: ScrollService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
567
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: NavigationService });
|
|
568
568
|
}
|
|
569
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: NavigationService, decorators: [{
|
|
570
570
|
type: Injectable
|
|
571
|
-
}], ctorParameters: () => [{ type:
|
|
571
|
+
}], ctorParameters: () => [{ type: ScrollService }, { type: i0.Injector }] });
|
|
572
572
|
|
|
573
573
|
/**
|
|
574
574
|
* Represents the base ToolBar Tool component for Angular.
|
|
@@ -597,11 +597,36 @@ class ToolBarToolComponent {
|
|
|
597
597
|
toolbarTemplate;
|
|
598
598
|
sectionTemplate;
|
|
599
599
|
popupTemplate;
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
600
|
+
//Focus movement inside the toolbar is managed using roving tabindex.
|
|
601
|
+
set tabIndex(value) {
|
|
602
|
+
this._tabIndex.set(value);
|
|
603
|
+
}
|
|
604
|
+
get tabIndex() {
|
|
605
|
+
return this._tabIndex();
|
|
606
|
+
}
|
|
603
607
|
element;
|
|
604
|
-
|
|
608
|
+
set overflows(value) {
|
|
609
|
+
this._overflows.set(value);
|
|
610
|
+
}
|
|
611
|
+
get overflows() {
|
|
612
|
+
return this._overflows();
|
|
613
|
+
}
|
|
614
|
+
set visibility(value) {
|
|
615
|
+
this._visibility.set(value);
|
|
616
|
+
}
|
|
617
|
+
get visibility() {
|
|
618
|
+
return this._visibility();
|
|
619
|
+
}
|
|
620
|
+
set isBuiltInTool(value) {
|
|
621
|
+
this._isBuiltInTool.set(value);
|
|
622
|
+
}
|
|
623
|
+
get isBuiltInTool() {
|
|
624
|
+
return this._isBuiltInTool();
|
|
625
|
+
}
|
|
626
|
+
_isBuiltInTool = signal(false, ...(ngDevMode ? [{ debugName: "_isBuiltInTool" }] : []));
|
|
627
|
+
_location = signal(null, ...(ngDevMode ? [{ debugName: "_location" }] : []));
|
|
628
|
+
_overflows = signal(true, ...(ngDevMode ? [{ debugName: "_overflows" }] : []));
|
|
629
|
+
_visibility = signal(null, ...(ngDevMode ? [{ debugName: "_visibility" }] : []));
|
|
605
630
|
/**
|
|
606
631
|
* @hidden
|
|
607
632
|
*/
|
|
@@ -609,7 +634,12 @@ class ToolBarToolComponent {
|
|
|
609
634
|
/**
|
|
610
635
|
* @hidden
|
|
611
636
|
*/
|
|
612
|
-
location
|
|
637
|
+
set location(value) {
|
|
638
|
+
this._location.set(value);
|
|
639
|
+
}
|
|
640
|
+
get location() {
|
|
641
|
+
return this._location();
|
|
642
|
+
}
|
|
613
643
|
constructor() {
|
|
614
644
|
this.element = inject(ElementRef);
|
|
615
645
|
}
|
|
@@ -650,10 +680,11 @@ class ToolBarToolComponent {
|
|
|
650
680
|
handleKey(_ev) {
|
|
651
681
|
return false;
|
|
652
682
|
}
|
|
653
|
-
|
|
654
|
-
static
|
|
683
|
+
_tabIndex = signal(-1, ...(ngDevMode ? [{ debugName: "_tabIndex" }] : []));
|
|
684
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarToolComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
685
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.33", type: ToolBarToolComponent, isStandalone: true, inputs: { responsive: "responsive" }, viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "sectionTemplate", first: true, predicate: ["sectionTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }], ngImport: i0 });
|
|
655
686
|
}
|
|
656
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
687
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarToolComponent, decorators: [{
|
|
657
688
|
type: Directive,
|
|
658
689
|
args: [{
|
|
659
690
|
standalone: true
|
|
@@ -732,10 +763,10 @@ class RendererService {
|
|
|
732
763
|
setAttribute(element, attr, value) {
|
|
733
764
|
this.renderer.setAttribute(element, attr, value);
|
|
734
765
|
}
|
|
735
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
736
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
766
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: RendererService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
767
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: RendererService });
|
|
737
768
|
}
|
|
738
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
769
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: RendererService, decorators: [{
|
|
739
770
|
type: Injectable
|
|
740
771
|
}] });
|
|
741
772
|
|
|
@@ -745,16 +776,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
745
776
|
class ToolbarToolsService {
|
|
746
777
|
renderedToolsChange = new Subject();
|
|
747
778
|
overflowToolsChange = new Subject();
|
|
748
|
-
renderedTools = [];
|
|
749
|
-
overflowTools = [];
|
|
750
|
-
allTools = [];
|
|
779
|
+
renderedTools = signal([], ...(ngDevMode ? [{ debugName: "renderedTools" }] : []));
|
|
780
|
+
overflowTools = signal([], ...(ngDevMode ? [{ debugName: "overflowTools" }] : []));
|
|
781
|
+
allTools = signal([], ...(ngDevMode ? [{ debugName: "allTools" }] : []));
|
|
751
782
|
reset() {
|
|
752
|
-
this.renderedTools
|
|
783
|
+
this.renderedTools.set([]);
|
|
784
|
+
this.overflowTools.set([]);
|
|
785
|
+
this.allTools.set([]);
|
|
753
786
|
}
|
|
754
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
755
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
787
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolbarToolsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
788
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolbarToolsService });
|
|
756
789
|
}
|
|
757
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
790
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolbarToolsService, decorators: [{
|
|
758
791
|
type: Injectable
|
|
759
792
|
}] });
|
|
760
793
|
|
|
@@ -768,9 +801,24 @@ class ToolBarRendererComponent {
|
|
|
768
801
|
refreshService;
|
|
769
802
|
toolsService;
|
|
770
803
|
viewContainer;
|
|
771
|
-
tool
|
|
772
|
-
|
|
773
|
-
|
|
804
|
+
set tool(value) {
|
|
805
|
+
this._tool.set(value);
|
|
806
|
+
}
|
|
807
|
+
get tool() {
|
|
808
|
+
return this._tool();
|
|
809
|
+
}
|
|
810
|
+
set location(value) {
|
|
811
|
+
this._location.set(value);
|
|
812
|
+
}
|
|
813
|
+
get location() {
|
|
814
|
+
return this._location();
|
|
815
|
+
}
|
|
816
|
+
set resizable(value) {
|
|
817
|
+
this._resizable.set(value);
|
|
818
|
+
}
|
|
819
|
+
get resizable() {
|
|
820
|
+
return this._resizable();
|
|
821
|
+
}
|
|
774
822
|
rendererClick = new EventEmitter();
|
|
775
823
|
template;
|
|
776
824
|
element;
|
|
@@ -779,6 +827,9 @@ class ToolBarRendererComponent {
|
|
|
779
827
|
}
|
|
780
828
|
refreshSubscription;
|
|
781
829
|
internalComponentRef;
|
|
830
|
+
_tool = signal(null, ...(ngDevMode ? [{ debugName: "_tool" }] : []));
|
|
831
|
+
_location = signal(null, ...(ngDevMode ? [{ debugName: "_location" }] : []));
|
|
832
|
+
_resizable = signal(false, ...(ngDevMode ? [{ debugName: "_resizable" }] : []));
|
|
782
833
|
constructor(renderer, rendererService, refreshService, toolsService, viewContainer) {
|
|
783
834
|
this.renderer = renderer;
|
|
784
835
|
this.rendererService = rendererService;
|
|
@@ -800,6 +851,13 @@ class ToolBarRendererComponent {
|
|
|
800
851
|
ngOnDestroy() {
|
|
801
852
|
this.refreshSubscription?.unsubscribe();
|
|
802
853
|
this.internalComponentRef?.removeEventListener('click', this.onClick);
|
|
854
|
+
if (this.location === 'toolbar') {
|
|
855
|
+
this.toolsService.renderedTools.set(this.toolsService.renderedTools().filter(t => t !== this));
|
|
856
|
+
this.toolsService.renderedToolsChange.next(this.toolsService.renderedTools());
|
|
857
|
+
}
|
|
858
|
+
else {
|
|
859
|
+
this.toolsService.overflowTools.set(this.toolsService.overflowTools().filter(t => t !== this));
|
|
860
|
+
}
|
|
803
861
|
}
|
|
804
862
|
ngAfterViewInit() {
|
|
805
863
|
const viewContainerRootNodes = this.viewContainer.get(0)?.rootNodes?.filter(isElementOrTextNode);
|
|
@@ -899,19 +957,22 @@ class ToolBarRendererComponent {
|
|
|
899
957
|
};
|
|
900
958
|
updateTools() {
|
|
901
959
|
this.tool.location = this.location;
|
|
902
|
-
const isInToolbar = this.toolsService.renderedTools.some(t => t.tool === this.tool);
|
|
903
|
-
const isInPopup = this.toolsService.overflowTools.some(t => t.tool === this.tool);
|
|
960
|
+
const isInToolbar = this.toolsService.renderedTools().some(t => t.tool === this.tool);
|
|
961
|
+
const isInPopup = this.toolsService.overflowTools().some(t => t.tool === this.tool);
|
|
904
962
|
if (this.location === 'toolbar') {
|
|
905
|
-
|
|
906
|
-
|
|
963
|
+
if (isInPopup) {
|
|
964
|
+
this.toolsService.overflowTools.set(this.toolsService.overflowTools().filter(t => t.tool !== this.tool));
|
|
965
|
+
}
|
|
966
|
+
if (!isInToolbar) {
|
|
967
|
+
this.toolsService.renderedTools.update(tools => [...tools, this]);
|
|
968
|
+
this.toolsService.renderedToolsChange.next(this.toolsService.renderedTools());
|
|
969
|
+
}
|
|
907
970
|
}
|
|
908
971
|
else {
|
|
909
972
|
if (!isInPopup) {
|
|
910
|
-
this.toolsService.overflowTools.
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
return this.toolsService.allTools.indexOf(t1.tool) - this.toolsService.allTools.indexOf(t2.tool);
|
|
914
|
-
});
|
|
973
|
+
this.toolsService.overflowTools.update(tools =>
|
|
974
|
+
// ensures correct navigation order in Popup
|
|
975
|
+
[...tools, this].sort((t1, t2) => this.toolsService.allTools().indexOf(t1.tool) - this.toolsService.allTools().indexOf(t2.tool)));
|
|
915
976
|
}
|
|
916
977
|
}
|
|
917
978
|
}
|
|
@@ -919,10 +980,10 @@ class ToolBarRendererComponent {
|
|
|
919
980
|
this.renderer.setStyle(this.internalComponentRef, 'visibility', 'hidden');
|
|
920
981
|
this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
|
|
921
982
|
}
|
|
922
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
923
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
983
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarRendererComponent, deps: [{ token: i0.Renderer2 }, { token: RendererService }, { token: RefreshService }, { token: ToolbarToolsService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
984
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.33", type: ToolBarRendererComponent, isStandalone: true, selector: "[kendoToolbarRenderer]", inputs: { tool: "tool", location: "location", resizable: "resizable" }, outputs: { rendererClick: "rendererClick" }, providers: [RendererService], ngImport: i0 });
|
|
924
985
|
}
|
|
925
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
986
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarRendererComponent, decorators: [{
|
|
926
987
|
type: Directive,
|
|
927
988
|
args: [{
|
|
928
989
|
providers: [RendererService],
|
|
@@ -946,19 +1007,37 @@ class ToolbarMessages extends ComponentMessages {
|
|
|
946
1007
|
/**
|
|
947
1008
|
* Sets the title of the **More Tools** button in a responsive ToolBar.
|
|
948
1009
|
*/
|
|
949
|
-
moreToolsTitle
|
|
1010
|
+
set moreToolsTitle(value) {
|
|
1011
|
+
this._moreToolsTitle.set(value);
|
|
1012
|
+
}
|
|
1013
|
+
get moreToolsTitle() {
|
|
1014
|
+
return this._moreToolsTitle();
|
|
1015
|
+
}
|
|
950
1016
|
/**
|
|
951
1017
|
* Sets the title for the **Previous Tool** button when the ToolBar is scrollable.
|
|
952
1018
|
*/
|
|
953
|
-
previousToolButton
|
|
1019
|
+
set previousToolButton(value) {
|
|
1020
|
+
this._previousToolButton.set(value);
|
|
1021
|
+
}
|
|
1022
|
+
get previousToolButton() {
|
|
1023
|
+
return this._previousToolButton();
|
|
1024
|
+
}
|
|
954
1025
|
/**
|
|
955
1026
|
* Sets the title for the **Next Tool** button when the ToolBar is scrollable.
|
|
956
1027
|
*/
|
|
957
|
-
nextToolButton
|
|
958
|
-
|
|
959
|
-
|
|
1028
|
+
set nextToolButton(value) {
|
|
1029
|
+
this._nextToolButton.set(value);
|
|
1030
|
+
}
|
|
1031
|
+
get nextToolButton() {
|
|
1032
|
+
return this._nextToolButton();
|
|
1033
|
+
}
|
|
1034
|
+
_moreToolsTitle = signal(null, ...(ngDevMode ? [{ debugName: "_moreToolsTitle" }] : []));
|
|
1035
|
+
_previousToolButton = signal(null, ...(ngDevMode ? [{ debugName: "_previousToolButton" }] : []));
|
|
1036
|
+
_nextToolButton = signal(null, ...(ngDevMode ? [{ debugName: "_nextToolButton" }] : []));
|
|
1037
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolbarMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1038
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.33", type: ToolbarMessages, isStandalone: true, selector: "kendo-toolbar-messages-base", inputs: { moreToolsTitle: "moreToolsTitle", previousToolButton: "previousToolButton", nextToolButton: "nextToolButton" }, usesInheritance: true, ngImport: i0 });
|
|
960
1039
|
}
|
|
961
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1040
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolbarMessages, decorators: [{
|
|
962
1041
|
type: Directive,
|
|
963
1042
|
args: [{
|
|
964
1043
|
selector: 'kendo-toolbar-messages-base'
|
|
@@ -980,15 +1059,15 @@ class LocalizedToolbarMessagesDirective extends ToolbarMessages {
|
|
|
980
1059
|
super();
|
|
981
1060
|
this.service = service;
|
|
982
1061
|
}
|
|
983
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
984
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1062
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: LocalizedToolbarMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1063
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.33", type: LocalizedToolbarMessagesDirective, isStandalone: true, selector: "[kendoToolbarLocalizedMessages]", providers: [
|
|
985
1064
|
{
|
|
986
1065
|
provide: ToolbarMessages,
|
|
987
1066
|
useExisting: forwardRef(() => LocalizedToolbarMessagesDirective)
|
|
988
1067
|
}
|
|
989
1068
|
], usesInheritance: true, ngImport: i0 });
|
|
990
1069
|
}
|
|
991
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1070
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: LocalizedToolbarMessagesDirective, decorators: [{
|
|
992
1071
|
type: Directive,
|
|
993
1072
|
args: [{
|
|
994
1073
|
providers: [
|
|
@@ -1012,8 +1091,8 @@ const DIRECTION_CLASSES = {
|
|
|
1012
1091
|
class ToolbarScrollableButtonComponent {
|
|
1013
1092
|
host;
|
|
1014
1093
|
renderer;
|
|
1015
|
-
ngZone;
|
|
1016
1094
|
localization;
|
|
1095
|
+
ngZone;
|
|
1017
1096
|
get prevClass() {
|
|
1018
1097
|
return this.prev;
|
|
1019
1098
|
}
|
|
@@ -1036,11 +1115,11 @@ class ToolbarScrollableButtonComponent {
|
|
|
1036
1115
|
chevronLeftIcon = chevronLeftIcon;
|
|
1037
1116
|
chevronRightIcon = chevronRightIcon;
|
|
1038
1117
|
subs = new Subscription();
|
|
1039
|
-
constructor(host, renderer,
|
|
1118
|
+
constructor(host, renderer, localization, ngZone) {
|
|
1040
1119
|
this.host = host;
|
|
1041
1120
|
this.renderer = renderer;
|
|
1042
|
-
this.ngZone = ngZone;
|
|
1043
1121
|
this.localization = localization;
|
|
1122
|
+
this.ngZone = ngZone;
|
|
1044
1123
|
}
|
|
1045
1124
|
ngAfterViewInit() {
|
|
1046
1125
|
this.ngZone.runOutsideAngular(() => {
|
|
@@ -1099,8 +1178,8 @@ class ToolbarScrollableButtonComponent {
|
|
|
1099
1178
|
}
|
|
1100
1179
|
}
|
|
1101
1180
|
}
|
|
1102
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1103
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1181
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolbarScrollableButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1182
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.33", type: ToolbarScrollableButtonComponent, isStandalone: true, selector: "[kendoToolbarScrollableButton]", inputs: { prev: "prev", overflow: "overflow" }, outputs: { onClick: "onClick" }, host: { properties: { "class.k-toolbar-prev": "this.prevClass", "class.k-toolbar-next": "this.nextClass", "attr.role": "this.role" } }, ngImport: i0, template: `
|
|
1104
1183
|
<kendo-icon-wrapper
|
|
1105
1184
|
[name]="iconClass"
|
|
1106
1185
|
[customFontClass]="customIconClass"
|
|
@@ -1108,9 +1187,9 @@ class ToolbarScrollableButtonComponent {
|
|
|
1108
1187
|
innerCssClass="k-button-icon"
|
|
1109
1188
|
>
|
|
1110
1189
|
</kendo-icon-wrapper>
|
|
1111
|
-
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
1190
|
+
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1112
1191
|
}
|
|
1113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolbarScrollableButtonComponent, decorators: [{
|
|
1114
1193
|
type: Component,
|
|
1115
1194
|
args: [{
|
|
1116
1195
|
template: `
|
|
@@ -1124,9 +1203,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
1124
1203
|
`,
|
|
1125
1204
|
selector: '[kendoToolbarScrollableButton]',
|
|
1126
1205
|
standalone: true,
|
|
1206
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1127
1207
|
imports: [IconWrapperComponent]
|
|
1128
1208
|
}]
|
|
1129
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type:
|
|
1209
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.LocalizationService }, { type: i0.NgZone }], propDecorators: { prevClass: [{
|
|
1130
1210
|
type: HostBinding,
|
|
1131
1211
|
args: ['class.k-toolbar-prev']
|
|
1132
1212
|
}], nextClass: [{
|
|
@@ -1182,11 +1262,12 @@ class ToolBarComponent {
|
|
|
1182
1262
|
refreshService;
|
|
1183
1263
|
navigationService;
|
|
1184
1264
|
element;
|
|
1185
|
-
zone;
|
|
1186
1265
|
renderer;
|
|
1187
1266
|
_cdr;
|
|
1188
1267
|
toolsService;
|
|
1189
1268
|
scrollService;
|
|
1269
|
+
injector;
|
|
1270
|
+
zone;
|
|
1190
1271
|
get overflowClass() {
|
|
1191
1272
|
return this.size ? `k-button-${SIZES[this.size]}` : '';
|
|
1192
1273
|
}
|
|
@@ -1199,19 +1280,19 @@ class ToolBarComponent {
|
|
|
1199
1280
|
if (this.isScrollMode) {
|
|
1200
1281
|
this.removeSubscriptions(['scrollButtonStateChangeSub', 'scrollContainerScrollSub']);
|
|
1201
1282
|
}
|
|
1202
|
-
this._overflow
|
|
1283
|
+
this._overflow.set(overflow);
|
|
1203
1284
|
if (this.isScrollMode) {
|
|
1204
1285
|
this.handleScrollModeUpdates();
|
|
1205
1286
|
}
|
|
1206
1287
|
this.setScrollableOverlayClasses();
|
|
1207
|
-
|
|
1288
|
+
afterNextRender(() => this.onResize(), { injector: this.injector });
|
|
1208
1289
|
}
|
|
1209
1290
|
get overflow() {
|
|
1210
|
-
return this._overflow;
|
|
1291
|
+
return this._overflow();
|
|
1211
1292
|
}
|
|
1212
1293
|
get showScrollButtons() {
|
|
1213
1294
|
const buttonsVisibility = this.normalizedOverflow.scrollButtons;
|
|
1214
|
-
const showAuto = buttonsVisibility === 'auto' && this.
|
|
1295
|
+
const showAuto = buttonsVisibility === 'auto' && this._showAutoButtons();
|
|
1215
1296
|
const showAlways = buttonsVisibility === 'visible';
|
|
1216
1297
|
return this.isScrollMode && (showAuto || showAlways);
|
|
1217
1298
|
}
|
|
@@ -1244,7 +1325,9 @@ class ToolBarComponent {
|
|
|
1244
1325
|
/**
|
|
1245
1326
|
* @hidden
|
|
1246
1327
|
*/
|
|
1247
|
-
scrollButtonClasses
|
|
1328
|
+
get scrollButtonClasses() {
|
|
1329
|
+
return this._scrollButtonClasses();
|
|
1330
|
+
}
|
|
1248
1331
|
/**
|
|
1249
1332
|
* @hidden
|
|
1250
1333
|
*/
|
|
@@ -1263,10 +1346,10 @@ class ToolBarComponent {
|
|
|
1263
1346
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/toolbar/responsive-toolbar#customizing-the-popup)).
|
|
1264
1347
|
*/
|
|
1265
1348
|
set popupSettings(settings) {
|
|
1266
|
-
this._popupSettings
|
|
1349
|
+
this._popupSettings.set(Object.assign({}, getInitialPopupSettings(this.localization.rtl), settings));
|
|
1267
1350
|
}
|
|
1268
1351
|
get popupSettings() {
|
|
1269
|
-
return this._popupSettings || getInitialPopupSettings(this.localization.rtl);
|
|
1352
|
+
return this._popupSettings() || getInitialPopupSettings(this.localization.rtl);
|
|
1270
1353
|
}
|
|
1271
1354
|
/**
|
|
1272
1355
|
* Sets the fill mode for the ToolBar.
|
|
@@ -1275,11 +1358,10 @@ class ToolBarComponent {
|
|
|
1275
1358
|
*/
|
|
1276
1359
|
set fillMode(fillMode) {
|
|
1277
1360
|
this.handleClasses(fillMode, 'fillMode');
|
|
1278
|
-
this._fillMode
|
|
1279
|
-
this.updateScrollButtonClasses();
|
|
1361
|
+
this._fillMode.set(fillMode);
|
|
1280
1362
|
}
|
|
1281
1363
|
get fillMode() {
|
|
1282
|
-
return this._fillMode;
|
|
1364
|
+
return this._fillMode();
|
|
1283
1365
|
}
|
|
1284
1366
|
/**
|
|
1285
1367
|
* Sets the `tabindex` attribute of the ToolBar.
|
|
@@ -1287,18 +1369,23 @@ class ToolBarComponent {
|
|
|
1287
1369
|
*
|
|
1288
1370
|
* @default 0
|
|
1289
1371
|
*/
|
|
1290
|
-
tabindex
|
|
1372
|
+
set tabindex(value) {
|
|
1373
|
+
this._tabindex.set(value);
|
|
1374
|
+
this.element.nativeElement.setAttribute('tabindex', value.toString());
|
|
1375
|
+
}
|
|
1376
|
+
get tabindex() {
|
|
1377
|
+
return this._tabindex();
|
|
1378
|
+
}
|
|
1291
1379
|
/**
|
|
1292
1380
|
* Sets the size for all ToolBar elements.
|
|
1293
1381
|
* Use this property to control the padding of the ToolBar elements. The default value is set by the Kendo theme.
|
|
1294
1382
|
*/
|
|
1295
1383
|
set size(size) {
|
|
1296
1384
|
this.handleClasses(size, 'size');
|
|
1297
|
-
this._size
|
|
1298
|
-
this.updateScrollButtonClasses();
|
|
1385
|
+
this._size.set(size);
|
|
1299
1386
|
}
|
|
1300
1387
|
get size() {
|
|
1301
|
-
return this._size;
|
|
1388
|
+
return this._size();
|
|
1302
1389
|
}
|
|
1303
1390
|
/**
|
|
1304
1391
|
* @hidden
|
|
@@ -1315,11 +1402,11 @@ class ToolBarComponent {
|
|
|
1315
1402
|
* @default 'always'
|
|
1316
1403
|
*/
|
|
1317
1404
|
set showIcon(value) {
|
|
1318
|
-
if (this._showIcon === value) {
|
|
1405
|
+
if (this._showIcon() === value) {
|
|
1319
1406
|
return;
|
|
1320
1407
|
}
|
|
1321
1408
|
const normalizedValue = this.normalizeDisplayValue(value);
|
|
1322
|
-
this._showIcon
|
|
1409
|
+
this._showIcon.set(value);
|
|
1323
1410
|
this.propertyChange.emit({
|
|
1324
1411
|
property: 'showIcon',
|
|
1325
1412
|
value: normalizedValue
|
|
@@ -1331,11 +1418,11 @@ class ToolBarComponent {
|
|
|
1331
1418
|
* @default 'always'
|
|
1332
1419
|
*/
|
|
1333
1420
|
set showText(value) {
|
|
1334
|
-
if (this._showText === value) {
|
|
1421
|
+
if (this._showText() === value) {
|
|
1335
1422
|
return;
|
|
1336
1423
|
}
|
|
1337
1424
|
const normalizedValue = this.normalizeDisplayValue(value);
|
|
1338
|
-
this._showText
|
|
1425
|
+
this._showText.set(value);
|
|
1339
1426
|
this.propertyChange.emit({
|
|
1340
1427
|
property: 'showText',
|
|
1341
1428
|
value: normalizedValue
|
|
@@ -1371,8 +1458,16 @@ class ToolBarComponent {
|
|
|
1371
1458
|
startButtonGroup;
|
|
1372
1459
|
endButtonGroup;
|
|
1373
1460
|
scrollSeparator;
|
|
1374
|
-
popupRef
|
|
1375
|
-
|
|
1461
|
+
set popupRef(value) {
|
|
1462
|
+
this._popupRef.set(value);
|
|
1463
|
+
}
|
|
1464
|
+
get popupRef() {
|
|
1465
|
+
return this._popupRef();
|
|
1466
|
+
}
|
|
1467
|
+
_popupRef = signal(null, ...(ngDevMode ? [{ debugName: "_popupRef" }] : []));
|
|
1468
|
+
get direction() {
|
|
1469
|
+
return this._direction();
|
|
1470
|
+
}
|
|
1376
1471
|
get appendTo() {
|
|
1377
1472
|
const { appendTo } = this.popupSettings;
|
|
1378
1473
|
if (!appendTo || appendTo === 'root') {
|
|
@@ -1397,7 +1492,7 @@ class ToolBarComponent {
|
|
|
1397
1492
|
this.toggle(open);
|
|
1398
1493
|
}
|
|
1399
1494
|
get popupOpen() {
|
|
1400
|
-
return this._open;
|
|
1495
|
+
return this._open();
|
|
1401
1496
|
}
|
|
1402
1497
|
/**
|
|
1403
1498
|
* @hidden
|
|
@@ -1418,21 +1513,32 @@ class ToolBarComponent {
|
|
|
1418
1513
|
get sectionClass() {
|
|
1419
1514
|
return this.normalizedOverflow.mode === 'section';
|
|
1420
1515
|
}
|
|
1421
|
-
_overflow = false;
|
|
1422
|
-
_popupSettings;
|
|
1423
|
-
cachedOverflowAnchorWidth;
|
|
1424
|
-
_open;
|
|
1516
|
+
_overflow = signal(false, ...(ngDevMode ? [{ debugName: "_overflow" }] : []));
|
|
1517
|
+
_popupSettings = signal(undefined, ...(ngDevMode ? [{ debugName: "_popupSettings" }] : []));
|
|
1518
|
+
cachedOverflowAnchorWidth = signal(null, ...(ngDevMode ? [{ debugName: "cachedOverflowAnchorWidth" }] : []));
|
|
1519
|
+
_open = signal(false, ...(ngDevMode ? [{ debugName: "_open" }] : []));
|
|
1520
|
+
_direction = signal('ltr', ...(ngDevMode ? [{ debugName: "_direction" }] : []));
|
|
1521
|
+
_tabindex = signal(0, ...(ngDevMode ? [{ debugName: "_tabindex" }] : []));
|
|
1425
1522
|
toolbarKeydownListener;
|
|
1426
1523
|
overflowKeydownListener;
|
|
1427
1524
|
sectionKeydownListener;
|
|
1428
1525
|
cancelRenderedToolsSubscription$ = new Subject();
|
|
1429
|
-
cachedGap;
|
|
1430
|
-
_size = undefined;
|
|
1431
|
-
_fillMode = undefined;
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1526
|
+
cachedGap = signal(null, ...(ngDevMode ? [{ debugName: "cachedGap" }] : []));
|
|
1527
|
+
_size = signal(undefined, ...(ngDevMode ? [{ debugName: "_size" }] : []));
|
|
1528
|
+
_fillMode = signal(undefined, ...(ngDevMode ? [{ debugName: "_fillMode" }] : []));
|
|
1529
|
+
_scrollButtonClasses = computed(() => {
|
|
1530
|
+
const size = SIZES[this._size()];
|
|
1531
|
+
const fillMode = this._fillMode();
|
|
1532
|
+
return [
|
|
1533
|
+
size && `k-button-${size}`,
|
|
1534
|
+
fillMode && `k-button-${fillMode}`
|
|
1535
|
+
].filter(Boolean);
|
|
1536
|
+
}, ...(ngDevMode ? [{ debugName: "_scrollButtonClasses" }] : []));
|
|
1537
|
+
_showText = signal('always', ...(ngDevMode ? [{ debugName: "_showText" }] : []));
|
|
1538
|
+
_showIcon = signal('always', ...(ngDevMode ? [{ debugName: "_showIcon" }] : []));
|
|
1539
|
+
overflowButtonClickedTime = signal(null, ...(ngDevMode ? [{ debugName: "overflowButtonClickedTime" }] : []));
|
|
1540
|
+
_showAutoButtons = signal(false, ...(ngDevMode ? [{ debugName: "_showAutoButtons" }] : []));
|
|
1541
|
+
_showOverflowSeparator = signal(false, ...(ngDevMode ? [{ debugName: "_showOverflowSeparator" }] : []));
|
|
1436
1542
|
scrollButtonStateChangeSub;
|
|
1437
1543
|
scrollContainerScrollSub;
|
|
1438
1544
|
/**
|
|
@@ -1485,37 +1591,38 @@ class ToolBarComponent {
|
|
|
1485
1591
|
licenseMessage;
|
|
1486
1592
|
constructor(localization, popupService, refreshService, navigationService,
|
|
1487
1593
|
// Needs to be public as it is being accessed in the Editor component
|
|
1488
|
-
element,
|
|
1594
|
+
element, renderer, _cdr, toolsService, scrollService, injector, zone) {
|
|
1489
1595
|
this.localization = localization;
|
|
1490
1596
|
this.popupService = popupService;
|
|
1491
1597
|
this.refreshService = refreshService;
|
|
1492
1598
|
this.navigationService = navigationService;
|
|
1493
1599
|
this.element = element;
|
|
1494
|
-
this.zone = zone;
|
|
1495
1600
|
this.renderer = renderer;
|
|
1496
1601
|
this._cdr = _cdr;
|
|
1497
1602
|
this.toolsService = toolsService;
|
|
1498
1603
|
this.scrollService = scrollService;
|
|
1604
|
+
this.injector = injector;
|
|
1605
|
+
this.zone = zone;
|
|
1499
1606
|
const isValid = validatePackage(packageMetadata);
|
|
1500
1607
|
this.licenseMessage = getLicenseMessage(packageMetadata);
|
|
1501
1608
|
this.showLicenseWatermark = shouldShowValidationUI(isValid);
|
|
1502
|
-
this.
|
|
1609
|
+
this._direction.set(localization.rtl ? 'rtl' : 'ltr');
|
|
1503
1610
|
this.scrollService.owner = this;
|
|
1504
1611
|
}
|
|
1505
1612
|
ngAfterContentInit() {
|
|
1506
|
-
this.toolsService.allTools
|
|
1613
|
+
this.toolsService.allTools.set(this.allTools.toArray());
|
|
1507
1614
|
this.subscriptions.add(this.allTools.changes.subscribe(() => {
|
|
1508
1615
|
this.toolsService.reset();
|
|
1509
|
-
this.toolsService.allTools
|
|
1616
|
+
this.toolsService.allTools.set(this.allTools.toArray());
|
|
1510
1617
|
this.allTools.forEach((tool) => {
|
|
1511
1618
|
this.refreshService.refresh(tool);
|
|
1512
1619
|
});
|
|
1513
|
-
|
|
1620
|
+
afterNextRender(() => this.onResize(), { injector: this.injector });
|
|
1514
1621
|
}));
|
|
1515
1622
|
}
|
|
1516
1623
|
ngAfterViewInit() {
|
|
1517
|
-
this.toolsService.renderedToolsChange.next(this.toolsService.renderedTools);
|
|
1518
|
-
this.toolsService.overflowToolsChange.next(this.toolsService.overflowTools);
|
|
1624
|
+
this.toolsService.renderedToolsChange.next(this.toolsService.renderedTools());
|
|
1625
|
+
this.toolsService.overflowToolsChange.next(this.toolsService.overflowTools());
|
|
1519
1626
|
const element = this.element.nativeElement;
|
|
1520
1627
|
if (!element.getAttribute('tabindex')) {
|
|
1521
1628
|
this.element.nativeElement.setAttribute('tabindex', '0');
|
|
@@ -1579,13 +1686,19 @@ class ToolBarComponent {
|
|
|
1579
1686
|
}
|
|
1580
1687
|
// because of https://github.com/telerik/kendo-angular-buttons/pull/276
|
|
1581
1688
|
// button icons are not rendered until onResize() is called
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
this.
|
|
1585
|
-
|
|
1689
|
+
afterNextRender(() => {
|
|
1690
|
+
this.zone.run(() => {
|
|
1691
|
+
this.onResize();
|
|
1692
|
+
});
|
|
1693
|
+
// check if still needed after the Editor migration
|
|
1694
|
+
this.zone.runOutsideAngular(() => {
|
|
1695
|
+
setTimeout(() => {
|
|
1696
|
+
this.zone.run(() => {
|
|
1697
|
+
this.onResize();
|
|
1698
|
+
});
|
|
1586
1699
|
});
|
|
1587
1700
|
});
|
|
1588
|
-
});
|
|
1701
|
+
}, { injector: this.injector });
|
|
1589
1702
|
}
|
|
1590
1703
|
if (this.isScrollMode) {
|
|
1591
1704
|
this.handleScrollModeUpdates();
|
|
@@ -1595,11 +1708,11 @@ class ToolBarComponent {
|
|
|
1595
1708
|
this.focusedByPointer = true;
|
|
1596
1709
|
}
|
|
1597
1710
|
}));
|
|
1598
|
-
this.navigationService.setRenderedTools(this.toolsService.renderedTools);
|
|
1711
|
+
this.navigationService.setRenderedTools(this.toolsService.renderedTools());
|
|
1599
1712
|
}
|
|
1600
1713
|
ngOnInit() {
|
|
1601
|
-
this.subscriptions.add(this.localization.changes.subscribe(({ rtl }) =>
|
|
1602
|
-
|
|
1714
|
+
this.subscriptions.add(this.localization.changes.subscribe(({ rtl }) => this._direction.set(rtl ? 'rtl' : 'ltr')));
|
|
1715
|
+
afterNextRender(() => this.onResize(), { injector: this.injector });
|
|
1603
1716
|
if (isDocumentAvailable()) {
|
|
1604
1717
|
this.zone.runOutsideAngular(() => this.subscriptions.add(fromEvent(document, 'click')
|
|
1605
1718
|
.pipe(filter(() => !!this.popupRef), filter((ev) => !this.popupRef.popup.instance.container.nativeElement.contains(ev.target)), filter((ev) => !this.overflowButton.nativeElement.contains(ev.target)))
|
|
@@ -1610,12 +1723,6 @@ class ToolBarComponent {
|
|
|
1610
1723
|
})));
|
|
1611
1724
|
}
|
|
1612
1725
|
}
|
|
1613
|
-
ngOnChanges(changes) {
|
|
1614
|
-
if (changes['tabindex']) {
|
|
1615
|
-
// prevents ExpressionChangedAfterItHasBeenCheckedError when tools with popup are opened/closed asynchronously
|
|
1616
|
-
this.element.nativeElement.setAttribute('tabindex', changes['tabindex'].currentValue.toString());
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
1726
|
ngOnDestroy() {
|
|
1620
1727
|
this.destroyPopup();
|
|
1621
1728
|
if (this.toolbarKeydownListener) {
|
|
@@ -1627,7 +1734,9 @@ class ToolBarComponent {
|
|
|
1627
1734
|
/**
|
|
1628
1735
|
* @hidden
|
|
1629
1736
|
*/
|
|
1630
|
-
showOverflowSeparator
|
|
1737
|
+
get showOverflowSeparator() {
|
|
1738
|
+
return this._showOverflowSeparator();
|
|
1739
|
+
}
|
|
1631
1740
|
/**
|
|
1632
1741
|
* @hidden
|
|
1633
1742
|
*/
|
|
@@ -1689,13 +1798,13 @@ class ToolBarComponent {
|
|
|
1689
1798
|
showPopup() {
|
|
1690
1799
|
this.popupOpen = !this.popupOpen;
|
|
1691
1800
|
this.navigationService.click({ context: undefined, event: undefined });
|
|
1692
|
-
this.overflowButtonClickedTime
|
|
1801
|
+
this.overflowButtonClickedTime.set(Date.now());
|
|
1693
1802
|
}
|
|
1694
1803
|
/**
|
|
1695
1804
|
* Toggles the visibility of the overflow popup.
|
|
1696
1805
|
*/
|
|
1697
1806
|
toggle(popupOpen) {
|
|
1698
|
-
this._open
|
|
1807
|
+
this._open.set(popupOpen !== undefined ? popupOpen : !this.popupOpen);
|
|
1699
1808
|
if (this.popupRef) {
|
|
1700
1809
|
this.popupRef.close();
|
|
1701
1810
|
this.popupRef = null;
|
|
@@ -1739,7 +1848,7 @@ class ToolBarComponent {
|
|
|
1739
1848
|
this.shrink(containerWidth, this.childrenWidth);
|
|
1740
1849
|
this.stretch(containerWidth, this.childrenWidth);
|
|
1741
1850
|
this.displayAnchor();
|
|
1742
|
-
const isImmediateResize = (Date.now() - this.overflowButtonClickedTime) < immediateResizeThreshold;
|
|
1851
|
+
const isImmediateResize = (Date.now() - this.overflowButtonClickedTime()) < immediateResizeThreshold;
|
|
1743
1852
|
if (this.popupOpen && !isImmediateResize) {
|
|
1744
1853
|
const eventArgs = new PreventableEvent();
|
|
1745
1854
|
this.close.emit(eventArgs);
|
|
@@ -1753,7 +1862,7 @@ class ToolBarComponent {
|
|
|
1753
1862
|
if (this.normalizedOverflow.scrollButtons === 'auto') {
|
|
1754
1863
|
const containerWidth = innerWidth(this.element.nativeElement);
|
|
1755
1864
|
let scrollButtonsWidth = 0;
|
|
1756
|
-
if (this.
|
|
1865
|
+
if (this._showAutoButtons()) {
|
|
1757
1866
|
const separatorWidth = this.scrollSeparator.nativeElement.getBoundingClientRect().width + 2 * this.gap;
|
|
1758
1867
|
if (this.hasScrollButtons.position === 'split') {
|
|
1759
1868
|
scrollButtonsWidth = innerWidth(this.prevScrollButton.nativeElement) + innerWidth(this.nextScrollButton.nativeElement) + 2 * separatorWidth;
|
|
@@ -1766,8 +1875,8 @@ class ToolBarComponent {
|
|
|
1766
1875
|
}
|
|
1767
1876
|
}
|
|
1768
1877
|
const shouldShowButtons = (this.childrenWidth + scrollButtonsWidth) > containerWidth;
|
|
1769
|
-
if (shouldShowButtons !== this.
|
|
1770
|
-
this.
|
|
1878
|
+
if (shouldShowButtons !== this._showAutoButtons()) {
|
|
1879
|
+
this._showAutoButtons.set(shouldShowButtons);
|
|
1771
1880
|
this.cdr.detectChanges();
|
|
1772
1881
|
}
|
|
1773
1882
|
this.scrollService.toggleScrollButtonsState();
|
|
@@ -1884,11 +1993,13 @@ class ToolBarComponent {
|
|
|
1884
1993
|
}
|
|
1885
1994
|
});
|
|
1886
1995
|
this.cancelRenderedToolsSubscription$.next(undefined);
|
|
1887
|
-
this.navigationService.setRenderedTools(this.toolsService.overflowTools);
|
|
1996
|
+
this.navigationService.setRenderedTools(this.toolsService.overflowTools());
|
|
1888
1997
|
this.navigationService.moveFocusToPopup();
|
|
1889
1998
|
this.toolsService.overflowToolsChange
|
|
1890
1999
|
.pipe(takeUntil(this.cancelRenderedToolsSubscription$))
|
|
1891
|
-
.subscribe((rts) =>
|
|
2000
|
+
.subscribe((rts) => {
|
|
2001
|
+
this.navigationService.setRenderedTools(rts);
|
|
2002
|
+
});
|
|
1892
2003
|
this.renderer.setAttribute(this.overflowButton.nativeElement, 'aria-controls', this.popupId);
|
|
1893
2004
|
}
|
|
1894
2005
|
/**
|
|
@@ -1896,7 +2007,7 @@ class ToolBarComponent {
|
|
|
1896
2007
|
*/
|
|
1897
2008
|
onPopupClose() {
|
|
1898
2009
|
this.cancelRenderedToolsSubscription$.next(undefined);
|
|
1899
|
-
this.navigationService.setRenderedTools(this.toolsService.renderedTools);
|
|
2010
|
+
this.navigationService.setRenderedTools(this.toolsService.renderedTools());
|
|
1900
2011
|
this.toolsService.renderedToolsChange
|
|
1901
2012
|
.pipe(takeUntil(this.cancelRenderedToolsSubscription$))
|
|
1902
2013
|
.subscribe((rts) => this.navigationService.setRenderedTools(rts));
|
|
@@ -1921,22 +2032,21 @@ class ToolBarComponent {
|
|
|
1921
2032
|
const visibility = this.allTools.filter(t => t.overflows && t.responsive).length > 0 ? 'visible' : 'hidden';
|
|
1922
2033
|
this.overflowButton && this.renderer.setStyle(this.overflowButton.nativeElement, 'visibility', visibility);
|
|
1923
2034
|
const isVisible = visibility === 'visible';
|
|
1924
|
-
if (isVisible !== this.
|
|
1925
|
-
this.
|
|
1926
|
-
this.cdr.detectChanges();
|
|
2035
|
+
if (isVisible !== this._showOverflowSeparator()) {
|
|
2036
|
+
this._showOverflowSeparator.set(isVisible);
|
|
1927
2037
|
}
|
|
1928
2038
|
if (!isVisible) {
|
|
1929
2039
|
this.destroyPopup();
|
|
1930
2040
|
}
|
|
1931
2041
|
}
|
|
1932
2042
|
get popupWidth() {
|
|
1933
|
-
if (!this.popupSettings
|
|
2043
|
+
if (!this.popupSettings?.width) {
|
|
1934
2044
|
return 'auto';
|
|
1935
2045
|
}
|
|
1936
2046
|
return isNaN(this.popupSettings.width) ? this.popupSettings.width : `${this.popupSettings.width}px`;
|
|
1937
2047
|
}
|
|
1938
2048
|
get popupHeight() {
|
|
1939
|
-
if (!this.popupSettings
|
|
2049
|
+
if (!this.popupSettings?.height) {
|
|
1940
2050
|
return;
|
|
1941
2051
|
}
|
|
1942
2052
|
return isNaN(this.popupSettings.height) ? this.popupSettings.height : `${this.popupSettings.height}px`;
|
|
@@ -1945,21 +2055,21 @@ class ToolBarComponent {
|
|
|
1945
2055
|
if (!this.showMenu) {
|
|
1946
2056
|
return 0;
|
|
1947
2057
|
}
|
|
1948
|
-
if (!this.cachedOverflowAnchorWidth) {
|
|
1949
|
-
this.cachedOverflowAnchorWidth
|
|
2058
|
+
if (!this.cachedOverflowAnchorWidth()) {
|
|
2059
|
+
this.cachedOverflowAnchorWidth.set(this.overflowButton.nativeElement.offsetWidth);
|
|
1950
2060
|
}
|
|
1951
|
-
return this.cachedOverflowAnchorWidth;
|
|
2061
|
+
return this.cachedOverflowAnchorWidth();
|
|
1952
2062
|
}
|
|
1953
2063
|
get gap() {
|
|
1954
|
-
if (isPresent(this.cachedGap)) {
|
|
1955
|
-
return this.cachedGap;
|
|
2064
|
+
if (isPresent(this.cachedGap())) {
|
|
2065
|
+
return this.cachedGap();
|
|
1956
2066
|
}
|
|
1957
2067
|
const computedGap = getComputedStyle(this.element.nativeElement).gap;
|
|
1958
|
-
this.cachedGap
|
|
1959
|
-
return this.cachedGap;
|
|
2068
|
+
this.cachedGap.set(isPresent(computedGap) ? parseInt(computedGap, 10) : 0);
|
|
2069
|
+
return this.cachedGap();
|
|
1960
2070
|
}
|
|
1961
2071
|
get childrenWidth() {
|
|
1962
|
-
const width = this.toolsService.renderedTools.reduce((totalWidth, tool) => tool.width + totalWidth + (tool.isDisplayed() ? this.gap : 0), 0);
|
|
2072
|
+
const width = this.toolsService.renderedTools().reduce((totalWidth, tool) => tool.width + totalWidth + (tool.isDisplayed() ? this.gap : 0), 0);
|
|
1963
2073
|
return Math.ceil(width);
|
|
1964
2074
|
}
|
|
1965
2075
|
get visibleTools() {
|
|
@@ -2005,7 +2115,7 @@ class ToolBarComponent {
|
|
|
2005
2115
|
if (!tool) {
|
|
2006
2116
|
return null;
|
|
2007
2117
|
}
|
|
2008
|
-
const renderedElement = this.toolsService.renderedTools.find((r) => {
|
|
2118
|
+
const renderedElement = this.toolsService.renderedTools().find((r) => {
|
|
2009
2119
|
return r.tool === tool;
|
|
2010
2120
|
});
|
|
2011
2121
|
if (!isPresent(renderedElement)) {
|
|
@@ -2021,8 +2131,8 @@ class ToolBarComponent {
|
|
|
2021
2131
|
if (!tool) {
|
|
2022
2132
|
return null;
|
|
2023
2133
|
}
|
|
2024
|
-
const renderedElement = this.toolsService.renderedTools.find((r) => r.tool === tool);
|
|
2025
|
-
if (!
|
|
2134
|
+
const renderedElement = this.toolsService.renderedTools().find((r) => r.tool === tool);
|
|
2135
|
+
if (!renderedElement) {
|
|
2026
2136
|
return 0;
|
|
2027
2137
|
}
|
|
2028
2138
|
tool.overflows = false;
|
|
@@ -2054,16 +2164,9 @@ class ToolBarComponent {
|
|
|
2054
2164
|
this.popupSubs.unsubscribe();
|
|
2055
2165
|
this.popupRef.close();
|
|
2056
2166
|
this.popupRef = null;
|
|
2057
|
-
this._open
|
|
2167
|
+
this._open.set(false);
|
|
2058
2168
|
}
|
|
2059
2169
|
}
|
|
2060
|
-
updateScrollButtonClasses() {
|
|
2061
|
-
const size = SIZES[this._size];
|
|
2062
|
-
this.scrollButtonClasses = [
|
|
2063
|
-
size && `k-button-${size}`,
|
|
2064
|
-
this._fillMode && `k-button-${this._fillMode}`
|
|
2065
|
-
].filter(Boolean);
|
|
2066
|
-
}
|
|
2067
2170
|
handleClasses(value, input) {
|
|
2068
2171
|
const elem = this.element.nativeElement;
|
|
2069
2172
|
const classes = getStylingClasses('toolbar', input, this[input], value);
|
|
@@ -2168,8 +2271,8 @@ class ToolBarComponent {
|
|
|
2168
2271
|
}
|
|
2169
2272
|
return value;
|
|
2170
2273
|
}
|
|
2171
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2172
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2274
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarComponent, deps: [{ token: i1.LocalizationService }, { token: i2.PopupService }, { token: RefreshService }, { token: NavigationService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: ToolbarToolsService }, { token: ScrollService }, { token: i0.Injector }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
2275
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", 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", toolsSource: "toolsSource" }, 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: [
|
|
2173
2276
|
RefreshService,
|
|
2174
2277
|
NavigationService,
|
|
2175
2278
|
LocalizationService,
|
|
@@ -2180,7 +2283,7 @@ class ToolBarComponent {
|
|
|
2180
2283
|
useValue: 'kendo.toolbar'
|
|
2181
2284
|
},
|
|
2182
2285
|
provideComponentName('toolbar')
|
|
2183
|
-
], queries: [{ propertyName: "contentTools", predicate: ToolBarToolComponent }], viewQueries: [{ propertyName: "overflowButton", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "popupSectionTemplate", first: true, predicate: ["popupSectionTemplate"], descendants: true, static: true }, { propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true, read: ElementRef }, { propertyName: "resizeSensor", first: true, predicate: ["resizeSensor"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "prevScrollButton", first: true, predicate: ["prevScrollButton"], descendants: true, read: ElementRef }, { propertyName: "nextScrollButton", first: true, predicate: ["nextScrollButton"], descendants: true, read: ElementRef }, { propertyName: "startButtonGroup", first: true, predicate: ["startButtonGroup"], descendants: true, read: ElementRef }, { propertyName: "endButtonGroup", first: true, predicate: ["endButtonGroup"], descendants: true, read: ElementRef }, { propertyName: "scrollSeparator", first: true, predicate: ["scrollSeparator"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBar"],
|
|
2286
|
+
], queries: [{ propertyName: "contentTools", predicate: ToolBarToolComponent }], viewQueries: [{ propertyName: "overflowButton", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "popupSectionTemplate", first: true, predicate: ["popupSectionTemplate"], descendants: true, static: true }, { propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true, read: ElementRef }, { propertyName: "resizeSensor", first: true, predicate: ["resizeSensor"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "prevScrollButton", first: true, predicate: ["prevScrollButton"], descendants: true, read: ElementRef }, { propertyName: "nextScrollButton", first: true, predicate: ["nextScrollButton"], descendants: true, read: ElementRef }, { propertyName: "startButtonGroup", first: true, predicate: ["startButtonGroup"], descendants: true, read: ElementRef }, { propertyName: "endButtonGroup", first: true, predicate: ["endButtonGroup"], descendants: true, read: ElementRef }, { propertyName: "scrollSeparator", first: true, predicate: ["scrollSeparator"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBar"], ngImport: i0, template: `
|
|
2184
2287
|
<ng-container kendoToolbarLocalizedMessages
|
|
2185
2288
|
i18n-moreToolsTitle="kendo.toolbar.moreToolsTitle|The title of the **more tools** button in a responsive ToolBar"
|
|
2186
2289
|
moreToolsTitle="More tools"
|
|
@@ -2378,9 +2481,9 @@ class ToolBarComponent {
|
|
|
2378
2481
|
@if (showLicenseWatermark) {
|
|
2379
2482
|
<div kendoWatermarkOverlay [licenseMessage]="licenseMessage"></div>
|
|
2380
2483
|
}
|
|
2381
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: LocalizedToolbarMessagesDirective, selector: "[kendoToolbarLocalizedMessages]" }, { kind: "directive", type: ToolBarRendererComponent, selector: "[kendoToolbarRenderer]", inputs: ["tool", "location", "resizable"], outputs: ["rendererClick"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: ToolbarScrollableButtonComponent, selector: "[kendoToolbarScrollableButton]", inputs: ["prev", "overflow"], outputs: ["onClick"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay], kendo-watermark-overlay", inputs: ["licenseMessage"] }] });
|
|
2484
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: LocalizedToolbarMessagesDirective, selector: "[kendoToolbarLocalizedMessages]" }, { kind: "directive", type: ToolBarRendererComponent, selector: "[kendoToolbarRenderer]", inputs: ["tool", "location", "resizable"], outputs: ["rendererClick"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: ToolbarScrollableButtonComponent, selector: "[kendoToolbarScrollableButton]", inputs: ["prev", "overflow"], outputs: ["onClick"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay], kendo-watermark-overlay", inputs: ["licenseMessage"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2382
2485
|
}
|
|
2383
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarComponent, decorators: [{
|
|
2384
2487
|
type: Component,
|
|
2385
2488
|
args: [{
|
|
2386
2489
|
exportAs: 'kendoToolBar',
|
|
@@ -2597,9 +2700,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
2597
2700
|
}
|
|
2598
2701
|
`,
|
|
2599
2702
|
standalone: true,
|
|
2703
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2600
2704
|
imports: [NgTemplateOutlet, LocalizedToolbarMessagesDirective, ToolBarRendererComponent, ButtonComponent, NgClass, ResizeSensorComponent, ToolbarScrollableButtonComponent, WatermarkOverlayComponent]
|
|
2601
2705
|
}]
|
|
2602
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.PopupService }, { type: RefreshService }, { type: NavigationService }, { type: i0.ElementRef }, { type: i0.
|
|
2706
|
+
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.PopupService }, { type: RefreshService }, { type: NavigationService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: ToolbarToolsService }, { type: ScrollService }, { type: i0.Injector }, { type: i0.NgZone }], propDecorators: { overflow: [{
|
|
2603
2707
|
type: Input
|
|
2604
2708
|
}], resizable: [{
|
|
2605
2709
|
type: Input
|
|
@@ -2701,8 +2805,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
2701
2805
|
*/
|
|
2702
2806
|
class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
2703
2807
|
element;
|
|
2704
|
-
|
|
2808
|
+
injector;
|
|
2705
2809
|
host;
|
|
2810
|
+
cdr;
|
|
2706
2811
|
// showText and showIcon showIcon should be declared first
|
|
2707
2812
|
/**
|
|
2708
2813
|
* Specifies the button text visibility.
|
|
@@ -2710,11 +2815,11 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2710
2815
|
* @default 'always'
|
|
2711
2816
|
*/
|
|
2712
2817
|
set showText(value) {
|
|
2713
|
-
this._showText
|
|
2818
|
+
this._showText.set(value);
|
|
2714
2819
|
this.setTextDisplayMode();
|
|
2715
2820
|
}
|
|
2716
2821
|
get showText() {
|
|
2717
|
-
return this._showText;
|
|
2822
|
+
return this._showText();
|
|
2718
2823
|
}
|
|
2719
2824
|
/**
|
|
2720
2825
|
* Specifies the button icon visibility.
|
|
@@ -2722,22 +2827,22 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2722
2827
|
* @default 'always'
|
|
2723
2828
|
*/
|
|
2724
2829
|
set showIcon(value) {
|
|
2725
|
-
this._showIcon
|
|
2830
|
+
this._showIcon.set(value);
|
|
2726
2831
|
this.setIconDisplayMode();
|
|
2727
2832
|
}
|
|
2728
2833
|
get showIcon() {
|
|
2729
|
-
return this._showIcon;
|
|
2834
|
+
return this._showIcon();
|
|
2730
2835
|
}
|
|
2731
2836
|
/**
|
|
2732
2837
|
* Specifies the text of the Button
|
|
2733
2838
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/toolbar/control-types#buttons)).
|
|
2734
2839
|
*/
|
|
2735
2840
|
set text(text) {
|
|
2736
|
-
this._text
|
|
2841
|
+
this._text.set(text);
|
|
2737
2842
|
this.setTextDisplayMode();
|
|
2738
2843
|
}
|
|
2739
2844
|
get text() {
|
|
2740
|
-
return this._text;
|
|
2845
|
+
return this._text();
|
|
2741
2846
|
}
|
|
2742
2847
|
/**
|
|
2743
2848
|
* @hidden
|
|
@@ -2748,30 +2853,55 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2748
2853
|
/**
|
|
2749
2854
|
* Specifies custom inline CSS styles for the Button.
|
|
2750
2855
|
*/
|
|
2751
|
-
style
|
|
2856
|
+
set style(value) {
|
|
2857
|
+
this._style.set(value);
|
|
2858
|
+
}
|
|
2859
|
+
get style() {
|
|
2860
|
+
return this._style();
|
|
2861
|
+
}
|
|
2752
2862
|
/**
|
|
2753
2863
|
* Specifies custom CSS class names to be added to the Button.
|
|
2754
2864
|
*/
|
|
2755
|
-
className
|
|
2865
|
+
set className(value) {
|
|
2866
|
+
this._className.set(value);
|
|
2867
|
+
}
|
|
2868
|
+
get className() {
|
|
2869
|
+
return this._className();
|
|
2870
|
+
}
|
|
2756
2871
|
/**
|
|
2757
2872
|
* Specifies the `title` attribute of the Button.
|
|
2758
2873
|
*
|
|
2759
2874
|
* @remarks
|
|
2760
2875
|
* This property is related to accessibility.
|
|
2761
2876
|
*/
|
|
2762
|
-
title
|
|
2877
|
+
set title(value) {
|
|
2878
|
+
this._title.set(value);
|
|
2879
|
+
}
|
|
2880
|
+
get title() {
|
|
2881
|
+
return this._title();
|
|
2882
|
+
}
|
|
2763
2883
|
/**
|
|
2764
2884
|
* Disables the Button when set to `true`
|
|
2765
2885
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/toolbar/control-types#buttons)).
|
|
2766
2886
|
*/
|
|
2767
|
-
disabled
|
|
2887
|
+
set disabled(value) {
|
|
2888
|
+
this._disabled.set(value);
|
|
2889
|
+
}
|
|
2890
|
+
get disabled() {
|
|
2891
|
+
return this._disabled();
|
|
2892
|
+
}
|
|
2768
2893
|
/**
|
|
2769
2894
|
* Provides visual styling to indicate if the Button is active
|
|
2770
2895
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/toolbar/control-types#toggle-buttons)).
|
|
2771
2896
|
* For toggleable buttons, set this to `true`.
|
|
2772
2897
|
* @default false
|
|
2773
2898
|
*/
|
|
2774
|
-
toggleable
|
|
2899
|
+
set toggleable(value) {
|
|
2900
|
+
this._toggleable.set(value);
|
|
2901
|
+
}
|
|
2902
|
+
get toggleable() {
|
|
2903
|
+
return this._toggleable();
|
|
2904
|
+
}
|
|
2775
2905
|
/**
|
|
2776
2906
|
* @hidden
|
|
2777
2907
|
*/
|
|
@@ -2794,26 +2924,46 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2794
2924
|
* Use with the `toggleable` property.
|
|
2795
2925
|
* @default false
|
|
2796
2926
|
*/
|
|
2797
|
-
selected
|
|
2927
|
+
set selected(value) {
|
|
2928
|
+
this._selected.set(value);
|
|
2929
|
+
}
|
|
2930
|
+
get selected() {
|
|
2931
|
+
return this._selected();
|
|
2932
|
+
}
|
|
2798
2933
|
/**
|
|
2799
2934
|
* Specifies the background and border styles of the Button. The default value is set by the Kendo theme.
|
|
2800
2935
|
*/
|
|
2801
|
-
fillMode
|
|
2936
|
+
set fillMode(value) {
|
|
2937
|
+
this._fillMode.set(value);
|
|
2938
|
+
}
|
|
2939
|
+
get fillMode() {
|
|
2940
|
+
return this._fillMode();
|
|
2941
|
+
}
|
|
2802
2942
|
/**
|
|
2803
2943
|
* Specifies the border radius of the Button. The default value is set by the Kendo theme.
|
|
2804
2944
|
*/
|
|
2805
|
-
rounded
|
|
2945
|
+
set rounded(value) {
|
|
2946
|
+
this._rounded.set(value);
|
|
2947
|
+
}
|
|
2948
|
+
get rounded() {
|
|
2949
|
+
return this._rounded();
|
|
2950
|
+
}
|
|
2806
2951
|
/**
|
|
2807
2952
|
* Specifies the predefined theme color of the Button. The default value is set by the Kendo theme.
|
|
2808
2953
|
*/
|
|
2809
|
-
themeColor
|
|
2954
|
+
set themeColor(value) {
|
|
2955
|
+
this._themeColor.set(value);
|
|
2956
|
+
}
|
|
2957
|
+
get themeColor() {
|
|
2958
|
+
return this._themeColor();
|
|
2959
|
+
}
|
|
2810
2960
|
/**
|
|
2811
2961
|
* Defines the name for an existing icon in a Kendo UI theme
|
|
2812
2962
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/toolbar/control-types#buttons)).
|
|
2813
2963
|
* The icon is rendered inside the Button by a `span.k-icon` element.
|
|
2814
2964
|
*/
|
|
2815
2965
|
set icon(icon) {
|
|
2816
|
-
this._icon
|
|
2966
|
+
this._icon.set(icon);
|
|
2817
2967
|
this.setIconDisplayMode();
|
|
2818
2968
|
}
|
|
2819
2969
|
/**
|
|
@@ -2821,7 +2971,7 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2821
2971
|
* Allows the usage of custom icons.
|
|
2822
2972
|
*/
|
|
2823
2973
|
set iconClass(iconClass) {
|
|
2824
|
-
this._iconClass
|
|
2974
|
+
this._iconClass.set(iconClass);
|
|
2825
2975
|
this.setIconDisplayMode();
|
|
2826
2976
|
}
|
|
2827
2977
|
/**
|
|
@@ -2829,12 +2979,12 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2829
2979
|
* Accepts either an [existing Kendo SVG icon](https://www.telerik.com/kendo-angular-ui/components/icons/svgicon/svgicon-list) or a custom one.
|
|
2830
2980
|
*/
|
|
2831
2981
|
set svgIcon(icon) {
|
|
2832
|
-
const isIconSet = this._icon;
|
|
2833
|
-
const isIconClassSet = this._iconClass;
|
|
2982
|
+
const isIconSet = this._icon();
|
|
2983
|
+
const isIconClassSet = this._iconClass();
|
|
2834
2984
|
if (isDevMode() && icon && isIconSet && isIconClassSet) {
|
|
2835
2985
|
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
2836
2986
|
}
|
|
2837
|
-
this._svgIcon
|
|
2987
|
+
this._svgIcon.set(icon);
|
|
2838
2988
|
this.setIconDisplayMode();
|
|
2839
2989
|
}
|
|
2840
2990
|
/**
|
|
@@ -2842,7 +2992,7 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2842
2992
|
* The URL can be relative or absolute.
|
|
2843
2993
|
*/
|
|
2844
2994
|
set imageUrl(imageUrl) {
|
|
2845
|
-
this._imageUrl
|
|
2995
|
+
this._imageUrl.set(imageUrl);
|
|
2846
2996
|
this.setIconDisplayMode();
|
|
2847
2997
|
}
|
|
2848
2998
|
/**
|
|
@@ -2858,44 +3008,91 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2858
3008
|
* The event argument is the new selected state (Boolean).
|
|
2859
3009
|
*/
|
|
2860
3010
|
selectedChange = new EventEmitter();
|
|
2861
|
-
toolbarOptions
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
imageUrl: '',
|
|
2874
|
-
};
|
|
3011
|
+
set toolbarOptions(value) {
|
|
3012
|
+
this._toolbarOptions.set(value);
|
|
3013
|
+
}
|
|
3014
|
+
get toolbarOptions() {
|
|
3015
|
+
return this._toolbarOptions();
|
|
3016
|
+
}
|
|
3017
|
+
set overflowOptions(value) {
|
|
3018
|
+
this._overflowOptions.set(value);
|
|
3019
|
+
}
|
|
3020
|
+
get overflowOptions() {
|
|
3021
|
+
return this._overflowOptions();
|
|
3022
|
+
}
|
|
2875
3023
|
/**
|
|
2876
3024
|
* @hidden
|
|
2877
3025
|
*/
|
|
2878
|
-
hasBadgeContainer
|
|
3026
|
+
set hasBadgeContainer(value) {
|
|
3027
|
+
this._hasBadgeContainer.set(value);
|
|
3028
|
+
}
|
|
3029
|
+
get hasBadgeContainer() {
|
|
3030
|
+
return this._hasBadgeContainer();
|
|
3031
|
+
}
|
|
2879
3032
|
/**
|
|
2880
3033
|
* @hidden
|
|
2881
3034
|
*/
|
|
2882
|
-
showBadge
|
|
3035
|
+
set showBadge(value) {
|
|
3036
|
+
this._showBadge.set(value);
|
|
3037
|
+
}
|
|
3038
|
+
get showBadge() {
|
|
3039
|
+
return this._showBadge();
|
|
3040
|
+
}
|
|
3041
|
+
/**
|
|
3042
|
+
* @hidden
|
|
3043
|
+
*/
|
|
3044
|
+
set location(value) {
|
|
3045
|
+
super.location = value;
|
|
3046
|
+
this.cdr.markForCheck();
|
|
3047
|
+
}
|
|
3048
|
+
/**
|
|
3049
|
+
* @hidden
|
|
3050
|
+
*/
|
|
3051
|
+
get location() {
|
|
3052
|
+
return super.location;
|
|
3053
|
+
}
|
|
2883
3054
|
toolbarButtonElement;
|
|
2884
3055
|
sectionButtonElement;
|
|
2885
3056
|
overflowButtonElement;
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
3057
|
+
_icon = signal(null, ...(ngDevMode ? [{ debugName: "_icon" }] : []));
|
|
3058
|
+
_iconClass = signal(null, ...(ngDevMode ? [{ debugName: "_iconClass" }] : []));
|
|
3059
|
+
_svgIcon = signal(null, ...(ngDevMode ? [{ debugName: "_svgIcon" }] : []));
|
|
3060
|
+
_imageUrl = signal(null, ...(ngDevMode ? [{ debugName: "_imageUrl" }] : []));
|
|
3061
|
+
_showText = signal(null, ...(ngDevMode ? [{ debugName: "_showText" }] : []));
|
|
3062
|
+
_showIcon = signal(null, ...(ngDevMode ? [{ debugName: "_showIcon" }] : []));
|
|
3063
|
+
_text = signal(null, ...(ngDevMode ? [{ debugName: "_text" }] : []));
|
|
3064
|
+
_style = signal(null, ...(ngDevMode ? [{ debugName: "_style" }] : []));
|
|
3065
|
+
_className = signal(null, ...(ngDevMode ? [{ debugName: "_className" }] : []));
|
|
3066
|
+
_title = signal(null, ...(ngDevMode ? [{ debugName: "_title" }] : []));
|
|
3067
|
+
_disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
|
|
3068
|
+
_toggleable = signal(false, ...(ngDevMode ? [{ debugName: "_toggleable" }] : []));
|
|
3069
|
+
_selected = signal(false, ...(ngDevMode ? [{ debugName: "_selected" }] : []));
|
|
3070
|
+
_fillMode = signal(undefined, ...(ngDevMode ? [{ debugName: "_fillMode" }] : []));
|
|
3071
|
+
_rounded = signal(undefined, ...(ngDevMode ? [{ debugName: "_rounded" }] : []));
|
|
3072
|
+
_themeColor = signal(undefined, ...(ngDevMode ? [{ debugName: "_themeColor" }] : []));
|
|
3073
|
+
_hasBadgeContainer = signal(false, ...(ngDevMode ? [{ debugName: "_hasBadgeContainer" }] : []));
|
|
3074
|
+
_showBadge = signal(false, ...(ngDevMode ? [{ debugName: "_showBadge" }] : []));
|
|
2893
3075
|
propertyChangeSub;
|
|
2894
|
-
|
|
3076
|
+
_overflowOptions = signal({
|
|
3077
|
+
text: '',
|
|
3078
|
+
icon: '',
|
|
3079
|
+
iconClass: '',
|
|
3080
|
+
svgIcon: null,
|
|
3081
|
+
imageUrl: ''
|
|
3082
|
+
}, ...(ngDevMode ? [{ debugName: "_overflowOptions" }] : []));
|
|
3083
|
+
_toolbarOptions = signal({
|
|
3084
|
+
text: '',
|
|
3085
|
+
icon: '',
|
|
3086
|
+
iconClass: '',
|
|
3087
|
+
svgIcon: null,
|
|
3088
|
+
imageUrl: ''
|
|
3089
|
+
}, ...(ngDevMode ? [{ debugName: "_toolbarOptions" }] : []));
|
|
3090
|
+
constructor(element, injector, host, cdr) {
|
|
2895
3091
|
super();
|
|
2896
3092
|
this.element = element;
|
|
2897
|
-
this.
|
|
3093
|
+
this.injector = injector;
|
|
2898
3094
|
this.host = host;
|
|
3095
|
+
this.cdr = cdr;
|
|
2899
3096
|
this.isBuiltInTool = true;
|
|
2900
3097
|
this.propertyChangeSub = this.host.propertyChange.subscribe(change => {
|
|
2901
3098
|
if (change.property === 'showText' || change.property === 'showIcon') {
|
|
@@ -2910,17 +3107,6 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2910
3107
|
this.propertyChangeSub.unsubscribe();
|
|
2911
3108
|
this.propertyChangeSub = null;
|
|
2912
3109
|
}
|
|
2913
|
-
ngOnChanges(changes) {
|
|
2914
|
-
if (changes['rounded']) {
|
|
2915
|
-
this.rounded = changes['rounded'].currentValue;
|
|
2916
|
-
}
|
|
2917
|
-
if (changes['themeColor']) {
|
|
2918
|
-
this.themeColor = changes['themeColor'].currentValue;
|
|
2919
|
-
}
|
|
2920
|
-
if (changes['showText']) {
|
|
2921
|
-
this.showText = changes['showText'].currentValue;
|
|
2922
|
-
}
|
|
2923
|
-
}
|
|
2924
3110
|
/**
|
|
2925
3111
|
* @hidden
|
|
2926
3112
|
*/
|
|
@@ -2974,23 +3160,31 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
2974
3160
|
return this[`${this.location}ButtonElement`]?.nativeElement;
|
|
2975
3161
|
}
|
|
2976
3162
|
setTextDisplayMode() {
|
|
2977
|
-
|
|
2978
|
-
this.
|
|
2979
|
-
|
|
2980
|
-
|
|
3163
|
+
const toolbarText = this.showText === 'menu' || this.showText === 'never' ? undefined : this.text;
|
|
3164
|
+
this._toolbarOptions.update(options => ({ ...options, text: toolbarText }));
|
|
3165
|
+
afterNextRender(() => {
|
|
3166
|
+
const overflowText = this.showText === 'toolbar' || this.showText === 'never' ? undefined : this.text;
|
|
3167
|
+
this._overflowOptions.update(options => ({ ...options, text: overflowText }));
|
|
3168
|
+
}, { injector: this.injector });
|
|
2981
3169
|
}
|
|
2982
3170
|
setIconDisplayMode() {
|
|
2983
|
-
this.
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
this.
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
3171
|
+
this._toolbarOptions.update(options => ({
|
|
3172
|
+
...options,
|
|
3173
|
+
icon: getValueForLocation(this._icon(), this.showIcon, false),
|
|
3174
|
+
iconClass: getValueForLocation(this._iconClass(), this.showIcon, false),
|
|
3175
|
+
svgIcon: getValueForLocation(this._svgIcon(), this.showIcon, false),
|
|
3176
|
+
imageUrl: getValueForLocation(this._imageUrl(), this.showIcon, false)
|
|
3177
|
+
}));
|
|
3178
|
+
this._overflowOptions.update(options => ({
|
|
3179
|
+
...options,
|
|
3180
|
+
icon: getValueForLocation(this._icon(), this.showIcon, true),
|
|
3181
|
+
iconClass: getValueForLocation(this._iconClass(), this.showIcon, true),
|
|
3182
|
+
svgIcon: getValueForLocation(this._svgIcon(), this.showIcon, true),
|
|
3183
|
+
imageUrl: getValueForLocation(this._imageUrl(), this.showIcon, true)
|
|
3184
|
+
}));
|
|
3185
|
+
}
|
|
3186
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.Injector }, { token: ToolBarComponent }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3187
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", 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", rounded: "rounded", 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: `
|
|
2994
3188
|
<ng-template #toolbarTemplate>
|
|
2995
3189
|
@if (hasBadgeContainer) {
|
|
2996
3190
|
<kendo-badge-container>
|
|
@@ -3162,9 +3356,9 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
|
|
|
3162
3356
|
</button>
|
|
3163
3357
|
}
|
|
3164
3358
|
</ng-template>
|
|
3165
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: BadgeComponent, selector: "kendo-badge", inputs: ["align", "size", "fill", "themeColor", "rounded", "position", "cutoutBorder"] }, { kind: "component", type: BadgeContainerComponent, selector: "kendo-badge-container" }] });
|
|
3359
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: BadgeComponent, selector: "kendo-badge", inputs: ["align", "size", "fill", "themeColor", "rounded", "position", "cutoutBorder"] }, { kind: "component", type: BadgeContainerComponent, selector: "kendo-badge-container" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3166
3360
|
}
|
|
3167
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarButtonComponent, decorators: [{
|
|
3168
3362
|
type: Component,
|
|
3169
3363
|
args: [{
|
|
3170
3364
|
exportAs: 'kendoToolBarButton',
|
|
@@ -3344,9 +3538,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
3344
3538
|
</ng-template>
|
|
3345
3539
|
`,
|
|
3346
3540
|
standalone: true,
|
|
3541
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3347
3542
|
imports: [ButtonComponent, NgStyle, NgClass, IconWrapperComponent, BadgeComponent, BadgeContainerComponent],
|
|
3348
3543
|
}]
|
|
3349
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.
|
|
3544
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Injector }, { type: ToolBarComponent }, { type: i0.ChangeDetectorRef }], propDecorators: { showText: [{
|
|
3350
3545
|
type: Input
|
|
3351
3546
|
}], showIcon: [{
|
|
3352
3547
|
type: Input
|
|
@@ -3421,28 +3616,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
3421
3616
|
class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
3422
3617
|
localization;
|
|
3423
3618
|
host;
|
|
3619
|
+
cdr;
|
|
3424
3620
|
/**
|
|
3425
3621
|
* When `true`, disables the whole group of buttons.
|
|
3426
3622
|
* If you set the `disabled` property of the group, it overrides the `disabled` property of individual buttons.
|
|
3427
3623
|
*/
|
|
3428
|
-
disabled
|
|
3624
|
+
set disabled(value) {
|
|
3625
|
+
this._disabled.set(value);
|
|
3626
|
+
}
|
|
3627
|
+
get disabled() {
|
|
3628
|
+
return this._disabled();
|
|
3629
|
+
}
|
|
3429
3630
|
/**
|
|
3430
3631
|
* @hidden
|
|
3431
3632
|
*
|
|
3432
3633
|
* Used to set different fillmode in Spreadsheet and Toolbar to comply with referent rendering.
|
|
3433
3634
|
* @default undefined
|
|
3434
3635
|
*/
|
|
3435
|
-
fillMode
|
|
3636
|
+
set fillMode(value) {
|
|
3637
|
+
this._fillMode.set(value);
|
|
3638
|
+
}
|
|
3639
|
+
get fillMode() {
|
|
3640
|
+
return this._fillMode();
|
|
3641
|
+
}
|
|
3436
3642
|
/**
|
|
3437
3643
|
* Sets the selection mode of the ButtonGroup.
|
|
3438
3644
|
* @default 'multiple'
|
|
3439
3645
|
*/
|
|
3440
|
-
selection
|
|
3646
|
+
set selection(value) {
|
|
3647
|
+
this._selection.set(value);
|
|
3648
|
+
}
|
|
3649
|
+
get selection() {
|
|
3650
|
+
return this._selection();
|
|
3651
|
+
}
|
|
3441
3652
|
/**
|
|
3442
3653
|
* Sets the width of the ButtonGroup.
|
|
3443
3654
|
* When you set the width of the ButtonGroup, the buttons have the same width and resize to fill the group wrapper.
|
|
3444
3655
|
*/
|
|
3445
|
-
width
|
|
3656
|
+
set width(value) {
|
|
3657
|
+
this._width.set(value);
|
|
3658
|
+
}
|
|
3659
|
+
get width() {
|
|
3660
|
+
return this._width();
|
|
3661
|
+
}
|
|
3446
3662
|
/**
|
|
3447
3663
|
* @hidden
|
|
3448
3664
|
*/
|
|
@@ -3455,6 +3671,19 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
3455
3671
|
sectionButtonGroup;
|
|
3456
3672
|
overflowListItems;
|
|
3457
3673
|
buttonComponents;
|
|
3674
|
+
/**
|
|
3675
|
+
* @hidden
|
|
3676
|
+
*/
|
|
3677
|
+
set location(value) {
|
|
3678
|
+
super.location = value;
|
|
3679
|
+
this.cdr.markForCheck();
|
|
3680
|
+
}
|
|
3681
|
+
/**
|
|
3682
|
+
* @hidden
|
|
3683
|
+
*/
|
|
3684
|
+
get location() {
|
|
3685
|
+
return super.location;
|
|
3686
|
+
}
|
|
3458
3687
|
get buttonElements() {
|
|
3459
3688
|
if (this.overflows && this.location === 'overflow') {
|
|
3460
3689
|
return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))].map(el => el.nativeElement);
|
|
@@ -3470,13 +3699,18 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
3470
3699
|
.map(b => b.element);
|
|
3471
3700
|
}
|
|
3472
3701
|
}
|
|
3473
|
-
|
|
3702
|
+
_disabled = signal(undefined, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
|
|
3703
|
+
_fillMode = signal(undefined, ...(ngDevMode ? [{ debugName: "_fillMode" }] : []));
|
|
3704
|
+
_selection = signal('multiple', ...(ngDevMode ? [{ debugName: "_selection" }] : []));
|
|
3705
|
+
_width = signal(undefined, ...(ngDevMode ? [{ debugName: "_width" }] : []));
|
|
3706
|
+
focusedIndex = signal(-1, ...(ngDevMode ? [{ debugName: "focusedIndex" }] : []));
|
|
3474
3707
|
getNextKey;
|
|
3475
3708
|
getPrevKey;
|
|
3476
|
-
constructor(localization, host) {
|
|
3709
|
+
constructor(localization, host, cdr) {
|
|
3477
3710
|
super();
|
|
3478
3711
|
this.localization = localization;
|
|
3479
3712
|
this.host = host;
|
|
3713
|
+
this.cdr = cdr;
|
|
3480
3714
|
this.getNextKey = getNextKey(this.localization.rtl);
|
|
3481
3715
|
this.getPrevKey = getPrevKey(this.localization.rtl);
|
|
3482
3716
|
this.isBuiltInTool = true;
|
|
@@ -3486,7 +3720,7 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
3486
3720
|
*/
|
|
3487
3721
|
onFocus() {
|
|
3488
3722
|
// triggered on tabin
|
|
3489
|
-
this.focusedIndex
|
|
3723
|
+
this.focusedIndex.set(0);
|
|
3490
3724
|
}
|
|
3491
3725
|
/**
|
|
3492
3726
|
* @hidden
|
|
@@ -3522,8 +3756,8 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
3522
3756
|
* @hidden
|
|
3523
3757
|
*/
|
|
3524
3758
|
onButtonClick(ev) {
|
|
3525
|
-
this.focusedIndex
|
|
3526
|
-
this.focusButton(this.focusedIndex, ev);
|
|
3759
|
+
this.focusedIndex.set(this.buttonElements.findIndex(be => be === ev.target || be.contains(ev.target)));
|
|
3760
|
+
this.focusButton(this.focusedIndex(), ev);
|
|
3527
3761
|
}
|
|
3528
3762
|
/**
|
|
3529
3763
|
* @hidden
|
|
@@ -3537,8 +3771,8 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
3537
3771
|
focus(ev = {}) {
|
|
3538
3772
|
const nextKey = this.getNextKey((this.overflows && this.location === 'overflow'));
|
|
3539
3773
|
const prevKey = this.getPrevKey((this.overflows && this.location === 'overflow'));
|
|
3540
|
-
this.focusedIndex
|
|
3541
|
-
this.focusButton(this.focusedIndex, ev);
|
|
3774
|
+
this.focusedIndex.set(getIndexOfFocused(prevKey, nextKey, this.buttonElements)(ev));
|
|
3775
|
+
this.focusButton(this.focusedIndex(), ev);
|
|
3542
3776
|
}
|
|
3543
3777
|
/**
|
|
3544
3778
|
* @hidden
|
|
@@ -3547,10 +3781,10 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
3547
3781
|
const nextKey = this.getNextKey((this.overflows && this.location === 'overflow'));
|
|
3548
3782
|
const prevKey = this.getPrevKey((this.overflows && this.location === 'overflow'));
|
|
3549
3783
|
const peekAtIndex = makePeeker(this.buttonElements);
|
|
3550
|
-
const isUnmodified = areEqual(this.focusedIndex);
|
|
3551
|
-
this.focusedIndex
|
|
3552
|
-
this.focusButton(this.focusedIndex, ev);
|
|
3553
|
-
return !isUnmodified(this.focusedIndex);
|
|
3784
|
+
const isUnmodified = areEqual(this.focusedIndex());
|
|
3785
|
+
this.focusedIndex.set(seekFocusedIndex(prevKey, nextKey, peekAtIndex)(this.focusedIndex(), ev));
|
|
3786
|
+
this.focusButton(this.focusedIndex(), ev);
|
|
3787
|
+
return !isUnmodified(this.focusedIndex());
|
|
3554
3788
|
}
|
|
3555
3789
|
/**
|
|
3556
3790
|
* @hidden
|
|
@@ -3586,8 +3820,8 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
3586
3820
|
this.buttonElements[index]?.focus();
|
|
3587
3821
|
}
|
|
3588
3822
|
}
|
|
3589
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3590
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3823
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }, { token: ToolBarComponent }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3824
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", 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(() => 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: `
|
|
3591
3825
|
<ng-template #toolbarTemplate>
|
|
3592
3826
|
<kendo-buttongroup
|
|
3593
3827
|
class="k-toolbar-button-group"
|
|
@@ -3697,9 +3931,9 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
|
|
|
3697
3931
|
}
|
|
3698
3932
|
</kendo-buttongroup>
|
|
3699
3933
|
</ng-template>
|
|
3700
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
3934
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3701
3935
|
}
|
|
3702
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3936
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarButtonGroupComponent, decorators: [{
|
|
3703
3937
|
type: Component,
|
|
3704
3938
|
args: [{
|
|
3705
3939
|
exportAs: 'kendoToolBarButtonGroup',
|
|
@@ -3817,9 +4051,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
3817
4051
|
</ng-template>
|
|
3818
4052
|
`,
|
|
3819
4053
|
standalone: true,
|
|
4054
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3820
4055
|
imports: [ButtonGroupComponent, ButtonComponent, NgStyle, NgClass, IconWrapperComponent]
|
|
3821
4056
|
}]
|
|
3822
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: ToolBarComponent }], propDecorators: { disabled: [{
|
|
4057
|
+
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: ToolBarComponent }, { type: i0.ChangeDetectorRef }], propDecorators: { disabled: [{
|
|
3823
4058
|
type: Input
|
|
3824
4059
|
}], fillMode: [{
|
|
3825
4060
|
type: Input
|
|
@@ -3858,14 +4093,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
3858
4093
|
*
|
|
3859
4094
|
*/
|
|
3860
4095
|
class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
3861
|
-
zone;
|
|
3862
|
-
renderer;
|
|
3863
4096
|
host;
|
|
4097
|
+
cdr;
|
|
3864
4098
|
/**
|
|
3865
4099
|
* Shows the default arrow icon or lets you provide a custom one.
|
|
3866
4100
|
* @default false
|
|
3867
4101
|
*/
|
|
3868
|
-
arrowIcon
|
|
4102
|
+
set arrowIcon(value) {
|
|
4103
|
+
this._arrowIcon.set(value);
|
|
4104
|
+
}
|
|
4105
|
+
get arrowIcon() {
|
|
4106
|
+
return this._arrowIcon();
|
|
4107
|
+
}
|
|
3869
4108
|
/**
|
|
3870
4109
|
* Sets the `title` attribute of the underlying button element.
|
|
3871
4110
|
* @default ''
|
|
@@ -3873,46 +4112,51 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
3873
4112
|
* @remarks
|
|
3874
4113
|
* This property is related to accessibility.
|
|
3875
4114
|
*/
|
|
3876
|
-
title
|
|
4115
|
+
set title(value) {
|
|
4116
|
+
this._title.set(value);
|
|
4117
|
+
}
|
|
4118
|
+
get title() {
|
|
4119
|
+
return this._title();
|
|
4120
|
+
}
|
|
3877
4121
|
// showText and showIcon showIcon should be declared first
|
|
3878
4122
|
/**
|
|
3879
4123
|
* Controls the button text visibility.
|
|
3880
4124
|
* @default 'always'
|
|
3881
4125
|
*/
|
|
3882
4126
|
set showText(value) {
|
|
3883
|
-
this._showText
|
|
4127
|
+
this._showText.set(value);
|
|
3884
4128
|
this.setTextDisplayMode();
|
|
3885
4129
|
}
|
|
3886
4130
|
get showText() {
|
|
3887
|
-
return this._showText;
|
|
4131
|
+
return this._showText();
|
|
3888
4132
|
}
|
|
3889
4133
|
/**
|
|
3890
4134
|
* Controls the button icon visibility.
|
|
3891
4135
|
* @default 'always'
|
|
3892
4136
|
*/
|
|
3893
4137
|
set showIcon(value) {
|
|
3894
|
-
this._showIcon
|
|
4138
|
+
this._showIcon.set(value);
|
|
3895
4139
|
this.setIconDisplayMode();
|
|
3896
4140
|
}
|
|
3897
4141
|
get showIcon() {
|
|
3898
|
-
return this._showIcon;
|
|
4142
|
+
return this._showIcon();
|
|
3899
4143
|
}
|
|
3900
4144
|
/**
|
|
3901
4145
|
* Sets the text of the DropDownButton
|
|
3902
4146
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/toolbar/control-types#drop-down-buttons)).
|
|
3903
4147
|
*/
|
|
3904
4148
|
set text(text) {
|
|
3905
|
-
this._text
|
|
4149
|
+
this._text.set(text);
|
|
3906
4150
|
this.setTextDisplayMode();
|
|
3907
4151
|
}
|
|
3908
4152
|
get text() {
|
|
3909
|
-
return this._text;
|
|
4153
|
+
return this._text();
|
|
3910
4154
|
}
|
|
3911
4155
|
/**
|
|
3912
4156
|
* Sets the icon rendered next to the button text.
|
|
3913
4157
|
*/
|
|
3914
4158
|
set icon(icon) {
|
|
3915
|
-
this._icon
|
|
4159
|
+
this._icon.set(icon);
|
|
3916
4160
|
this.setIconDisplayMode();
|
|
3917
4161
|
}
|
|
3918
4162
|
/**
|
|
@@ -3920,29 +4164,29 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
3920
4164
|
* Accepts an [existing Kendo SVG icon](https://www.telerik.com/kendo-angular-ui/components/icons/svgicon/svgicon-list) or a custom one.
|
|
3921
4165
|
*/
|
|
3922
4166
|
set svgIcon(icon) {
|
|
3923
|
-
const isIconSet = this._icon;
|
|
3924
|
-
const isIconClassSet = this._iconClass;
|
|
4167
|
+
const isIconSet = this._icon();
|
|
4168
|
+
const isIconClassSet = this._iconClass();
|
|
3925
4169
|
if (isDevMode() &&
|
|
3926
4170
|
icon &&
|
|
3927
4171
|
isIconSet &&
|
|
3928
4172
|
isIconClassSet) {
|
|
3929
4173
|
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
3930
4174
|
}
|
|
3931
|
-
this._svgIcon
|
|
4175
|
+
this._svgIcon.set(icon);
|
|
3932
4176
|
this.setIconDisplayMode();
|
|
3933
4177
|
}
|
|
3934
4178
|
/**
|
|
3935
4179
|
* Sets a custom CSS class icon rendered next to the button text.
|
|
3936
4180
|
*/
|
|
3937
4181
|
set iconClass(iconClass) {
|
|
3938
|
-
this._iconClass
|
|
4182
|
+
this._iconClass.set(iconClass);
|
|
3939
4183
|
this.setIconDisplayMode();
|
|
3940
4184
|
}
|
|
3941
4185
|
/**
|
|
3942
4186
|
* Sets a URL for the image displayed next to the button text.
|
|
3943
4187
|
*/
|
|
3944
4188
|
set imageUrl(imageUrl) {
|
|
3945
|
-
this._imageUrl
|
|
4189
|
+
this._imageUrl.set(imageUrl);
|
|
3946
4190
|
this.setIconDisplayMode();
|
|
3947
4191
|
}
|
|
3948
4192
|
/**
|
|
@@ -3950,10 +4194,10 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
3950
4194
|
* Accepts a `PopupSettings` object that allows you to customize the popup behavior and appearance.
|
|
3951
4195
|
*/
|
|
3952
4196
|
set popupSettings(settings) {
|
|
3953
|
-
this._popupSettings
|
|
4197
|
+
this._popupSettings.set(Object.assign({ animate: true, popupClass: '' }, settings));
|
|
3954
4198
|
}
|
|
3955
4199
|
get popupSettings() {
|
|
3956
|
-
return this._popupSettings;
|
|
4200
|
+
return this._popupSettings();
|
|
3957
4201
|
}
|
|
3958
4202
|
/**
|
|
3959
4203
|
* @hidden
|
|
@@ -3973,27 +4217,52 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
3973
4217
|
* Sets the fill mode for the button.
|
|
3974
4218
|
* The fill mode represents the background and border styles. The default value is set by the Kendo theme.
|
|
3975
4219
|
*/
|
|
3976
|
-
fillMode
|
|
4220
|
+
set fillMode(value) {
|
|
4221
|
+
this._fillMode.set(value);
|
|
4222
|
+
}
|
|
4223
|
+
get fillMode() {
|
|
4224
|
+
return this._fillMode();
|
|
4225
|
+
}
|
|
3977
4226
|
/**
|
|
3978
4227
|
* Sets the predefined theme color for the button.
|
|
3979
4228
|
* The theme color applies to the background, border, and text
|
|
3980
4229
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/buttons/api/dropdownbuttoncomponent#themecolor)). The default value is set by the Kendo theme.
|
|
3981
4230
|
*/
|
|
3982
|
-
themeColor
|
|
4231
|
+
set themeColor(value) {
|
|
4232
|
+
this._themeColor.set(value);
|
|
4233
|
+
}
|
|
4234
|
+
get themeColor() {
|
|
4235
|
+
return this._themeColor();
|
|
4236
|
+
}
|
|
3983
4237
|
/**
|
|
3984
4238
|
* Sets the CSS classes for the main button.
|
|
3985
4239
|
* Accepts values supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
|
|
3986
4240
|
*/
|
|
3987
|
-
buttonClass
|
|
4241
|
+
set buttonClass(value) {
|
|
4242
|
+
this._buttonClass.set(value);
|
|
4243
|
+
}
|
|
4244
|
+
get buttonClass() {
|
|
4245
|
+
return this._buttonClass();
|
|
4246
|
+
}
|
|
3988
4247
|
/**
|
|
3989
4248
|
* Sets the data item field that repesents the item text.
|
|
3990
4249
|
* If the data contains only primitive values, do not set this property.
|
|
3991
4250
|
*/
|
|
3992
|
-
textField
|
|
4251
|
+
set textField(value) {
|
|
4252
|
+
this._textField.set(value);
|
|
4253
|
+
}
|
|
4254
|
+
get textField() {
|
|
4255
|
+
return this._textField();
|
|
4256
|
+
}
|
|
3993
4257
|
/**
|
|
3994
4258
|
* When `true`, disables the DropDownButton.
|
|
3995
4259
|
*/
|
|
3996
|
-
disabled
|
|
4260
|
+
set disabled(value) {
|
|
4261
|
+
this._disabled.set(value);
|
|
4262
|
+
}
|
|
4263
|
+
get disabled() {
|
|
4264
|
+
return this._disabled();
|
|
4265
|
+
}
|
|
3997
4266
|
/**
|
|
3998
4267
|
* Sets the data of the DropDownButton
|
|
3999
4268
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/toolbar/control-types#drop-down-buttons)).
|
|
@@ -4001,13 +4270,10 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
4001
4270
|
* > Provide the data as an array-like list.
|
|
4002
4271
|
*/
|
|
4003
4272
|
set data(data) {
|
|
4004
|
-
this._data
|
|
4273
|
+
this._data.set(data || []);
|
|
4005
4274
|
}
|
|
4006
4275
|
get data() {
|
|
4007
|
-
|
|
4008
|
-
this.data = [];
|
|
4009
|
-
}
|
|
4010
|
-
return this._data;
|
|
4276
|
+
return this._data();
|
|
4011
4277
|
}
|
|
4012
4278
|
/**
|
|
4013
4279
|
* Fires each time the user clicks a DropDownButton item.
|
|
@@ -4045,24 +4311,43 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
4045
4311
|
get overflowButtons() {
|
|
4046
4312
|
return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
|
|
4047
4313
|
}
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4314
|
+
/**
|
|
4315
|
+
* @hidden
|
|
4316
|
+
*/
|
|
4317
|
+
set location(value) {
|
|
4318
|
+
super.location = value;
|
|
4319
|
+
this.cdr.markForCheck();
|
|
4320
|
+
}
|
|
4321
|
+
/**
|
|
4322
|
+
* @hidden
|
|
4323
|
+
*/
|
|
4324
|
+
get location() {
|
|
4325
|
+
return super.location;
|
|
4326
|
+
}
|
|
4327
|
+
_data = signal([], ...(ngDevMode ? [{ debugName: "_data" }] : []));
|
|
4328
|
+
_popupSettings = signal({ animate: true, popupClass: '' }, ...(ngDevMode ? [{ debugName: "_popupSettings" }] : []));
|
|
4329
|
+
focusedIndex = signal(-1, ...(ngDevMode ? [{ debugName: "focusedIndex" }] : []));
|
|
4330
|
+
_showText = signal(null, ...(ngDevMode ? [{ debugName: "_showText" }] : []));
|
|
4331
|
+
_showIcon = signal(null, ...(ngDevMode ? [{ debugName: "_showIcon" }] : []));
|
|
4332
|
+
_text = signal(null, ...(ngDevMode ? [{ debugName: "_text" }] : []));
|
|
4333
|
+
_arrowIcon = signal(false, ...(ngDevMode ? [{ debugName: "_arrowIcon" }] : []));
|
|
4334
|
+
_title = signal('', ...(ngDevMode ? [{ debugName: "_title" }] : []));
|
|
4335
|
+
_fillMode = signal(undefined, ...(ngDevMode ? [{ debugName: "_fillMode" }] : []));
|
|
4336
|
+
_themeColor = signal(undefined, ...(ngDevMode ? [{ debugName: "_themeColor" }] : []));
|
|
4337
|
+
_buttonClass = signal(undefined, ...(ngDevMode ? [{ debugName: "_buttonClass" }] : []));
|
|
4338
|
+
_textField = signal(undefined, ...(ngDevMode ? [{ debugName: "_textField" }] : []));
|
|
4339
|
+
_disabled = signal(undefined, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
|
|
4340
|
+
_icon = signal(null, ...(ngDevMode ? [{ debugName: "_icon" }] : []));
|
|
4341
|
+
_iconClass = signal(null, ...(ngDevMode ? [{ debugName: "_iconClass" }] : []));
|
|
4342
|
+
_svgIcon = signal(null, ...(ngDevMode ? [{ debugName: "_svgIcon" }] : []));
|
|
4343
|
+
_imageUrl = signal(null, ...(ngDevMode ? [{ debugName: "_imageUrl" }] : []));
|
|
4058
4344
|
propertyChangeSub;
|
|
4059
4345
|
getNextKey;
|
|
4060
4346
|
getPrevKey;
|
|
4061
|
-
constructor(
|
|
4347
|
+
constructor(host, cdr) {
|
|
4062
4348
|
super();
|
|
4063
|
-
this.zone = zone;
|
|
4064
|
-
this.renderer = renderer;
|
|
4065
4349
|
this.host = host;
|
|
4350
|
+
this.cdr = cdr;
|
|
4066
4351
|
this.getNextKey = getNextKey();
|
|
4067
4352
|
this.getPrevKey = getPrevKey();
|
|
4068
4353
|
this.isBuiltInTool = true;
|
|
@@ -4081,21 +4366,16 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
4081
4366
|
this.propertyChangeSub = null;
|
|
4082
4367
|
}
|
|
4083
4368
|
}
|
|
4084
|
-
|
|
4085
|
-
this.
|
|
4086
|
-
const dropdownButton = this[`${this.location}DropDownButton`];
|
|
4087
|
-
if (dropdownButton?.button) {
|
|
4088
|
-
this.renderer.addClass(dropdownButton.button.nativeElement, 'k-toolbar-menu-button');
|
|
4089
|
-
}
|
|
4090
|
-
});
|
|
4369
|
+
get toolbarMenuButtonClass() {
|
|
4370
|
+
return this.buttonClass ? `k-toolbar-menu-button ${this.buttonClass}` : 'k-toolbar-menu-button';
|
|
4091
4371
|
}
|
|
4092
4372
|
/**
|
|
4093
4373
|
* @hidden
|
|
4094
4374
|
*/
|
|
4095
4375
|
onButtonListClick(ev) {
|
|
4096
|
-
this.focusedIndex
|
|
4376
|
+
this.focusedIndex.set(this.overflowListItems
|
|
4097
4377
|
.toArray()
|
|
4098
|
-
.findIndex(b => b.nativeElement.contains(ev.target));
|
|
4378
|
+
.findIndex(b => b.nativeElement.contains(ev.target)));
|
|
4099
4379
|
}
|
|
4100
4380
|
/**
|
|
4101
4381
|
* @hidden
|
|
@@ -4119,8 +4399,8 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
4119
4399
|
}
|
|
4120
4400
|
}
|
|
4121
4401
|
else if (this.overflowButtons.length > 0) {
|
|
4122
|
-
this.focusedIndex
|
|
4123
|
-
this.focusButton(this.focusedIndex, ev);
|
|
4402
|
+
this.focusedIndex.set(getIndexOfFocused(this.getPrevKey(), this.getNextKey(), this.overflowButtons.map(ob => ob.nativeElement))(ev));
|
|
4403
|
+
this.focusButton(this.focusedIndex(), ev);
|
|
4124
4404
|
}
|
|
4125
4405
|
}
|
|
4126
4406
|
/**
|
|
@@ -4133,10 +4413,10 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
4133
4413
|
}
|
|
4134
4414
|
if (this.overflows && this.location !== 'section') {
|
|
4135
4415
|
const peekAtIndex = makePeeker(this.overflowButtons);
|
|
4136
|
-
const isUnmodified = areEqual(this.focusedIndex);
|
|
4137
|
-
this.focusedIndex
|
|
4138
|
-
this.focusButton(this.focusedIndex, ev);
|
|
4139
|
-
return !isUnmodified(this.focusedIndex);
|
|
4416
|
+
const isUnmodified = areEqual(this.focusedIndex());
|
|
4417
|
+
this.focusedIndex.set(seekFocusedIndex(this.getPrevKey(), this.getNextKey(), peekAtIndex)(this.focusedIndex(), ev));
|
|
4418
|
+
this.focusButton(this.focusedIndex(), ev);
|
|
4419
|
+
return !isUnmodified(this.focusedIndex());
|
|
4140
4420
|
}
|
|
4141
4421
|
}
|
|
4142
4422
|
/**
|
|
@@ -4168,17 +4448,17 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
4168
4448
|
this.overflowOptions.text = this.showText === 'toolbar' || this.showText === 'never' ? undefined : this.text;
|
|
4169
4449
|
}
|
|
4170
4450
|
setIconDisplayMode() {
|
|
4171
|
-
this.toolbarOptions.icon = getValueForLocation(this._icon, this.showIcon, false);
|
|
4172
|
-
this.overflowOptions.icon = getValueForLocation(this._icon, this.showIcon, true);
|
|
4173
|
-
this.toolbarOptions.iconClass = getValueForLocation(this._iconClass, this.showIcon, false);
|
|
4174
|
-
this.overflowOptions.iconClass = getValueForLocation(this._iconClass, this.showIcon, true);
|
|
4175
|
-
this.toolbarOptions.svgIcon = getValueForLocation(this._svgIcon, this.showIcon, false);
|
|
4176
|
-
this.overflowOptions.svgIcon = getValueForLocation(this._svgIcon, this.showIcon, true);
|
|
4177
|
-
this.toolbarOptions.imageUrl = getValueForLocation(this._imageUrl, this.showIcon, false);
|
|
4178
|
-
this.overflowOptions.imageUrl = getValueForLocation(this._imageUrl, this.showIcon, true);
|
|
4179
|
-
}
|
|
4180
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4181
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4451
|
+
this.toolbarOptions.icon = getValueForLocation(this._icon(), this.showIcon, false);
|
|
4452
|
+
this.overflowOptions.icon = getValueForLocation(this._icon(), this.showIcon, true);
|
|
4453
|
+
this.toolbarOptions.iconClass = getValueForLocation(this._iconClass(), this.showIcon, false);
|
|
4454
|
+
this.overflowOptions.iconClass = getValueForLocation(this._iconClass(), this.showIcon, true);
|
|
4455
|
+
this.toolbarOptions.svgIcon = getValueForLocation(this._svgIcon(), this.showIcon, false);
|
|
4456
|
+
this.overflowOptions.svgIcon = getValueForLocation(this._svgIcon(), this.showIcon, true);
|
|
4457
|
+
this.toolbarOptions.imageUrl = getValueForLocation(this._imageUrl(), this.showIcon, false);
|
|
4458
|
+
this.overflowOptions.imageUrl = getValueForLocation(this._imageUrl(), this.showIcon, true);
|
|
4459
|
+
}
|
|
4460
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [{ token: ToolBarComponent }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4461
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", 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: `
|
|
4182
4462
|
<ng-template #toolbarTemplate>
|
|
4183
4463
|
<kendo-dropdownbutton #toolbarDropDownButton
|
|
4184
4464
|
[icon]="toolbarOptions.icon"
|
|
@@ -4186,7 +4466,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
4186
4466
|
[svgIcon]="toolbarOptions.svgIcon"
|
|
4187
4467
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
4188
4468
|
[arrowIcon]="arrowIcon"
|
|
4189
|
-
[buttonClass]="
|
|
4469
|
+
[buttonClass]="toolbarMenuButtonClass"
|
|
4190
4470
|
[disabled]="disabled"
|
|
4191
4471
|
[size]="size"
|
|
4192
4472
|
[tabIndex]="-1"
|
|
@@ -4258,7 +4538,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
4258
4538
|
[svgIcon]="toolbarOptions.svgIcon"
|
|
4259
4539
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
4260
4540
|
[arrowIcon]="arrowIcon"
|
|
4261
|
-
[buttonClass]="
|
|
4541
|
+
[buttonClass]="toolbarMenuButtonClass"
|
|
4262
4542
|
[disabled]="disabled"
|
|
4263
4543
|
[size]="size"
|
|
4264
4544
|
[tabIndex]="-1"
|
|
@@ -4275,9 +4555,9 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
4275
4555
|
{{ toolbarOptions.text }}
|
|
4276
4556
|
</kendo-dropdownbutton>
|
|
4277
4557
|
</ng-template>
|
|
4278
|
-
`, isInline: true, dependencies: [{ kind: "component", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["arrowIcon", "icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor", "buttonAttributes"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
4558
|
+
`, isInline: true, dependencies: [{ kind: "component", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["arrowIcon", "icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor", "buttonAttributes"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4279
4559
|
}
|
|
4280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarDropDownButtonComponent, decorators: [{
|
|
4281
4561
|
type: Component,
|
|
4282
4562
|
args: [{
|
|
4283
4563
|
exportAs: 'kendoToolBarDropDownButton',
|
|
@@ -4291,7 +4571,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
4291
4571
|
[svgIcon]="toolbarOptions.svgIcon"
|
|
4292
4572
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
4293
4573
|
[arrowIcon]="arrowIcon"
|
|
4294
|
-
[buttonClass]="
|
|
4574
|
+
[buttonClass]="toolbarMenuButtonClass"
|
|
4295
4575
|
[disabled]="disabled"
|
|
4296
4576
|
[size]="size"
|
|
4297
4577
|
[tabIndex]="-1"
|
|
@@ -4363,7 +4643,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
4363
4643
|
[svgIcon]="toolbarOptions.svgIcon"
|
|
4364
4644
|
[imageUrl]="toolbarOptions.imageUrl"
|
|
4365
4645
|
[arrowIcon]="arrowIcon"
|
|
4366
|
-
[buttonClass]="
|
|
4646
|
+
[buttonClass]="toolbarMenuButtonClass"
|
|
4367
4647
|
[disabled]="disabled"
|
|
4368
4648
|
[size]="size"
|
|
4369
4649
|
[tabIndex]="-1"
|
|
@@ -4382,9 +4662,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
4382
4662
|
</ng-template>
|
|
4383
4663
|
`,
|
|
4384
4664
|
standalone: true,
|
|
4665
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4385
4666
|
imports: [DropDownButtonComponent, NgClass, IconWrapperComponent]
|
|
4386
4667
|
}]
|
|
4387
|
-
}], ctorParameters: () => [{ type:
|
|
4668
|
+
}], ctorParameters: () => [{ type: ToolBarComponent }, { type: i0.ChangeDetectorRef }], propDecorators: { arrowIcon: [{
|
|
4388
4669
|
type: Input
|
|
4389
4670
|
}], title: [{
|
|
4390
4671
|
type: Input
|
|
@@ -4455,45 +4736,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
4455
4736
|
*/
|
|
4456
4737
|
class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
4457
4738
|
host;
|
|
4739
|
+
cdr;
|
|
4458
4740
|
// showText and showIcon showIcon should be declared first
|
|
4459
4741
|
/**
|
|
4460
4742
|
* Controls the button text visibility.
|
|
4461
4743
|
* @default 'always'
|
|
4462
4744
|
*/
|
|
4463
4745
|
set showText(value) {
|
|
4464
|
-
this._showText
|
|
4746
|
+
this._showText.set(value);
|
|
4465
4747
|
this.setTextDisplayMode();
|
|
4466
4748
|
}
|
|
4467
4749
|
get showText() {
|
|
4468
|
-
return this._showText;
|
|
4750
|
+
return this._showText();
|
|
4469
4751
|
}
|
|
4470
4752
|
/**
|
|
4471
4753
|
* Controls the button icon visibility.
|
|
4472
4754
|
* @default 'always'
|
|
4473
4755
|
*/
|
|
4474
4756
|
set showIcon(value) {
|
|
4475
|
-
this._showIcon
|
|
4757
|
+
this._showIcon.set(value);
|
|
4476
4758
|
this.setIconDisplayMode();
|
|
4477
4759
|
}
|
|
4478
4760
|
get showIcon() {
|
|
4479
|
-
return this._showIcon;
|
|
4761
|
+
return this._showIcon();
|
|
4480
4762
|
}
|
|
4481
4763
|
/**
|
|
4482
4764
|
* Sets the text of the SplitButton ([see example](https://www.telerik.com/kendo-angular-ui/components/toolbar/control-types#split-buttons)).
|
|
4483
4765
|
*/
|
|
4484
4766
|
set text(text) {
|
|
4485
|
-
this._text
|
|
4767
|
+
this._text.set(text);
|
|
4486
4768
|
this.setTextDisplayMode();
|
|
4487
4769
|
}
|
|
4488
4770
|
get text() {
|
|
4489
|
-
return this._text;
|
|
4771
|
+
return this._text();
|
|
4490
4772
|
}
|
|
4491
4773
|
/**
|
|
4492
4774
|
* Sets the icon rendered next to the button text
|
|
4493
4775
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/toolbar/control-types#split-buttons)).
|
|
4494
4776
|
*/
|
|
4495
4777
|
set icon(icon) {
|
|
4496
|
-
this._icon
|
|
4778
|
+
this._icon.set(icon);
|
|
4497
4779
|
this.setIconDisplayMode();
|
|
4498
4780
|
}
|
|
4499
4781
|
/**
|
|
@@ -4501,59 +4783,74 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4501
4783
|
* Accepts an [existing Kendo SVG icon](https://www.telerik.com/kendo-angular-ui/components/icons/svgicon/svgicon-list) or a custom one.
|
|
4502
4784
|
*/
|
|
4503
4785
|
set svgIcon(icon) {
|
|
4504
|
-
const isIconSet = this._icon;
|
|
4505
|
-
const isIconClassSet = this._iconClass;
|
|
4786
|
+
const isIconSet = this._icon();
|
|
4787
|
+
const isIconClassSet = this._iconClass();
|
|
4506
4788
|
if (isDevMode() &&
|
|
4507
4789
|
icon &&
|
|
4508
4790
|
isIconSet &&
|
|
4509
4791
|
isIconClassSet) {
|
|
4510
4792
|
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
4511
4793
|
}
|
|
4512
|
-
this._svgIcon
|
|
4794
|
+
this._svgIcon.set(icon);
|
|
4513
4795
|
this.setIconDisplayMode();
|
|
4514
4796
|
}
|
|
4515
4797
|
/**
|
|
4516
4798
|
* Sets a custom CSS class icon rendered next to the button text.
|
|
4517
4799
|
*/
|
|
4518
4800
|
set iconClass(iconClass) {
|
|
4519
|
-
this._iconClass
|
|
4801
|
+
this._iconClass.set(iconClass);
|
|
4520
4802
|
this.setIconDisplayMode();
|
|
4521
4803
|
}
|
|
4522
4804
|
/**
|
|
4523
4805
|
* Sets a URL for the image displayed next to the button text.
|
|
4524
4806
|
*/
|
|
4525
4807
|
set imageUrl(imageUrl) {
|
|
4526
|
-
this._imageUrl
|
|
4808
|
+
this._imageUrl.set(imageUrl);
|
|
4527
4809
|
this.setIconDisplayMode();
|
|
4528
4810
|
}
|
|
4529
4811
|
/**
|
|
4530
4812
|
* When `true`, disables a SplitButton item.
|
|
4531
4813
|
*/
|
|
4532
|
-
disabled
|
|
4814
|
+
set disabled(value) {
|
|
4815
|
+
this._disabled.set(value);
|
|
4816
|
+
}
|
|
4817
|
+
get disabled() {
|
|
4818
|
+
return this._disabled();
|
|
4819
|
+
}
|
|
4533
4820
|
/**
|
|
4534
4821
|
* Configures the popup of the SplitButton.
|
|
4535
4822
|
* Accepts a `PopupSettings` object that allows you to customize the popup behavior and appearance.
|
|
4536
4823
|
|
|
4537
4824
|
*/
|
|
4538
4825
|
set popupSettings(value) {
|
|
4539
|
-
this._popupSettings
|
|
4826
|
+
this._popupSettings.set(value);
|
|
4540
4827
|
}
|
|
4541
4828
|
get popupSettings() {
|
|
4542
|
-
if (!this._popupSettings) {
|
|
4543
|
-
this._popupSettings
|
|
4829
|
+
if (!this._popupSettings()) {
|
|
4830
|
+
this._popupSettings.set({ animate: true, popupClass: '' });
|
|
4544
4831
|
}
|
|
4545
|
-
return this._popupSettings;
|
|
4832
|
+
return this._popupSettings();
|
|
4546
4833
|
}
|
|
4547
4834
|
/**
|
|
4548
4835
|
* Sets the fill mode for the button.
|
|
4549
4836
|
* The fill mode represents the background and border styles. The default value is set by the Kendo theme.
|
|
4550
4837
|
*/
|
|
4551
|
-
fillMode
|
|
4838
|
+
set fillMode(value) {
|
|
4839
|
+
this._fillMode.set(value);
|
|
4840
|
+
}
|
|
4841
|
+
get fillMode() {
|
|
4842
|
+
return this._fillMode();
|
|
4843
|
+
}
|
|
4552
4844
|
/**
|
|
4553
4845
|
* Sets the predefined theme color for the button.
|
|
4554
4846
|
* The theme color applies to the background, border, and text. The default value is set by the Kendo theme.
|
|
4555
4847
|
*/
|
|
4556
|
-
themeColor
|
|
4848
|
+
set themeColor(value) {
|
|
4849
|
+
this._themeColor.set(value);
|
|
4850
|
+
}
|
|
4851
|
+
get themeColor() {
|
|
4852
|
+
return this._themeColor();
|
|
4853
|
+
}
|
|
4557
4854
|
/**
|
|
4558
4855
|
* @hidden
|
|
4559
4856
|
*/
|
|
@@ -4566,38 +4863,63 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4566
4863
|
* Sets the CSS classes for the main button.
|
|
4567
4864
|
* Accepts values supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
|
|
4568
4865
|
*/
|
|
4569
|
-
buttonClass
|
|
4866
|
+
set buttonClass(value) {
|
|
4867
|
+
this._buttonClass.set(value);
|
|
4868
|
+
}
|
|
4869
|
+
get buttonClass() {
|
|
4870
|
+
return this._buttonClass();
|
|
4871
|
+
}
|
|
4570
4872
|
/**
|
|
4571
4873
|
* Sets the CSS classes for the arrow button that opens the popup.
|
|
4572
4874
|
* Accepts values supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
|
|
4573
4875
|
*/
|
|
4574
|
-
arrowButtonClass
|
|
4876
|
+
set arrowButtonClass(value) {
|
|
4877
|
+
this._arrowButtonClass.set(value);
|
|
4878
|
+
}
|
|
4879
|
+
get arrowButtonClass() {
|
|
4880
|
+
return this._arrowButtonClass();
|
|
4881
|
+
}
|
|
4575
4882
|
/**
|
|
4576
4883
|
* Sets the name of the [font icon](https://www.telerik.com/kendo-angular-ui/components/styling/icons#icons-list) for the arrow button.
|
|
4577
4884
|
*/
|
|
4578
|
-
arrowButtonIcon
|
|
4885
|
+
set arrowButtonIcon(value) {
|
|
4886
|
+
this._arrowButtonIcon.set(value);
|
|
4887
|
+
}
|
|
4888
|
+
get arrowButtonIcon() {
|
|
4889
|
+
return this._arrowButtonIcon();
|
|
4890
|
+
}
|
|
4579
4891
|
/**
|
|
4580
4892
|
* Sets the [`SVGIcon`](https://www.telerik.com/kendo-angular-ui/components/icons/api/svgicon) for the arrow button.
|
|
4581
4893
|
*/
|
|
4582
|
-
arrowButtonSvgIcon
|
|
4894
|
+
set arrowButtonSvgIcon(value) {
|
|
4895
|
+
this._arrowButtonSvgIcon.set(value);
|
|
4896
|
+
}
|
|
4897
|
+
get arrowButtonSvgIcon() {
|
|
4898
|
+
return this._arrowButtonSvgIcon();
|
|
4899
|
+
}
|
|
4583
4900
|
/**
|
|
4584
4901
|
* Sets the text field for the button-list popup.
|
|
4585
4902
|
* @default 'text'
|
|
4586
4903
|
*/
|
|
4587
|
-
textField
|
|
4904
|
+
set textField(value) {
|
|
4905
|
+
this._textField.set(value);
|
|
4906
|
+
}
|
|
4907
|
+
get textField() {
|
|
4908
|
+
return this._textField();
|
|
4909
|
+
}
|
|
4588
4910
|
/**
|
|
4589
4911
|
* Sets the data of the SplitButton ([see example](https://www.telerik.com/kendo-angular-ui/components/toolbar/control-types#split-buttons)).
|
|
4590
4912
|
*
|
|
4591
4913
|
* > Provide the data as an array-like list.
|
|
4592
4914
|
*/
|
|
4593
4915
|
set data(data) {
|
|
4594
|
-
this._data
|
|
4916
|
+
this._data.set(data || []);
|
|
4595
4917
|
}
|
|
4596
4918
|
get data() {
|
|
4597
|
-
if (!this._data) {
|
|
4598
|
-
this.
|
|
4919
|
+
if (!this._data()) {
|
|
4920
|
+
this._data.set([]);
|
|
4599
4921
|
}
|
|
4600
|
-
return this._data;
|
|
4922
|
+
return this._data();
|
|
4601
4923
|
}
|
|
4602
4924
|
/**
|
|
4603
4925
|
* Fires when the user clicks the main button.
|
|
@@ -4644,16 +4966,24 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4644
4966
|
get overflowButtons() {
|
|
4645
4967
|
return [this.overflowMainButton, ...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
|
|
4646
4968
|
}
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4969
|
+
_icon = signal(null, ...(ngDevMode ? [{ debugName: "_icon" }] : []));
|
|
4970
|
+
_iconClass = signal(null, ...(ngDevMode ? [{ debugName: "_iconClass" }] : []));
|
|
4971
|
+
_svgIcon = signal(null, ...(ngDevMode ? [{ debugName: "_svgIcon" }] : []));
|
|
4972
|
+
_imageUrl = signal(null, ...(ngDevMode ? [{ debugName: "_imageUrl" }] : []));
|
|
4973
|
+
_data = signal([], ...(ngDevMode ? [{ debugName: "_data" }] : []));
|
|
4974
|
+
_popupSettings = signal({ animate: true, popupClass: '' }, ...(ngDevMode ? [{ debugName: "_popupSettings" }] : []));
|
|
4975
|
+
focusedIndex = signal(-1, ...(ngDevMode ? [{ debugName: "focusedIndex" }] : []));
|
|
4976
|
+
_showText = signal(null, ...(ngDevMode ? [{ debugName: "_showText" }] : []));
|
|
4977
|
+
_showIcon = signal(null, ...(ngDevMode ? [{ debugName: "_showIcon" }] : []));
|
|
4978
|
+
_text = signal(null, ...(ngDevMode ? [{ debugName: "_text" }] : []));
|
|
4979
|
+
_disabled = signal(undefined, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
|
|
4980
|
+
_fillMode = signal(undefined, ...(ngDevMode ? [{ debugName: "_fillMode" }] : []));
|
|
4981
|
+
_themeColor = signal(undefined, ...(ngDevMode ? [{ debugName: "_themeColor" }] : []));
|
|
4982
|
+
_buttonClass = signal(undefined, ...(ngDevMode ? [{ debugName: "_buttonClass" }] : []));
|
|
4983
|
+
_arrowButtonClass = signal(undefined, ...(ngDevMode ? [{ debugName: "_arrowButtonClass" }] : []));
|
|
4984
|
+
_arrowButtonIcon = signal('chevron-down', ...(ngDevMode ? [{ debugName: "_arrowButtonIcon" }] : []));
|
|
4985
|
+
_arrowButtonSvgIcon = signal(chevronDownIcon, ...(ngDevMode ? [{ debugName: "_arrowButtonSvgIcon" }] : []));
|
|
4986
|
+
_textField = signal('text', ...(ngDevMode ? [{ debugName: "_textField" }] : []));
|
|
4657
4987
|
propertyChangeSub;
|
|
4658
4988
|
getNextKey;
|
|
4659
4989
|
getPrevKey;
|
|
@@ -4661,9 +4991,23 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4661
4991
|
sectionSplitButton;
|
|
4662
4992
|
overflowMainButton;
|
|
4663
4993
|
overflowListItems;
|
|
4664
|
-
|
|
4994
|
+
/**
|
|
4995
|
+
* @hidden
|
|
4996
|
+
*/
|
|
4997
|
+
set location(value) {
|
|
4998
|
+
super.location = value;
|
|
4999
|
+
this.cdr.markForCheck();
|
|
5000
|
+
}
|
|
5001
|
+
/**
|
|
5002
|
+
* @hidden
|
|
5003
|
+
*/
|
|
5004
|
+
get location() {
|
|
5005
|
+
return super.location;
|
|
5006
|
+
}
|
|
5007
|
+
constructor(host, cdr) {
|
|
4665
5008
|
super();
|
|
4666
5009
|
this.host = host;
|
|
5010
|
+
this.cdr = cdr;
|
|
4667
5011
|
this.getNextKey = getNextKey();
|
|
4668
5012
|
this.getPrevKey = getPrevKey();
|
|
4669
5013
|
this.isBuiltInTool = true;
|
|
@@ -4677,14 +5021,14 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4677
5021
|
* @hidden
|
|
4678
5022
|
*/
|
|
4679
5023
|
onButtonListClick(ev) {
|
|
4680
|
-
this.focusedIndex
|
|
5024
|
+
this.focusedIndex.set(this.overflowButtons.findIndex(b => b.nativeElement.contains(ev.target)));
|
|
4681
5025
|
}
|
|
4682
5026
|
/**
|
|
4683
5027
|
* @hidden
|
|
4684
5028
|
*/
|
|
4685
5029
|
onMainButtonClick(ev) {
|
|
4686
5030
|
this.buttonClick.emit(ev);
|
|
4687
|
-
this.focusedIndex
|
|
5031
|
+
this.focusedIndex.set(0);
|
|
4688
5032
|
}
|
|
4689
5033
|
/**
|
|
4690
5034
|
* @hidden
|
|
@@ -4704,12 +5048,12 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4704
5048
|
focus(ev = {}) {
|
|
4705
5049
|
if (!this.overflows || this.location === 'section') {
|
|
4706
5050
|
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
|
|
4707
|
-
this[`${this.location}SplitButton`]
|
|
5051
|
+
this[`${this.location}SplitButton`]?.focus();
|
|
4708
5052
|
}
|
|
4709
5053
|
}
|
|
4710
5054
|
else if (this.overflowButtons.length > 0) {
|
|
4711
|
-
this.focusedIndex
|
|
4712
|
-
this.focusButton(this.focusedIndex, ev);
|
|
5055
|
+
this.focusedIndex.set(getIndexOfFocused(this.getPrevKey(), this.getNextKey(), this.overflowButtons.map(ob => ob.nativeElement))(ev));
|
|
5056
|
+
this.focusButton(this.focusedIndex(), ev);
|
|
4713
5057
|
}
|
|
4714
5058
|
}
|
|
4715
5059
|
/**
|
|
@@ -4722,10 +5066,10 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4722
5066
|
}
|
|
4723
5067
|
if (this.overflows) {
|
|
4724
5068
|
const peekAtIndex = makePeeker(this.overflowButtons);
|
|
4725
|
-
const isUnmodified = areEqual(this.focusedIndex);
|
|
4726
|
-
this.focusedIndex
|
|
4727
|
-
this.focusButton(this.focusedIndex, ev);
|
|
4728
|
-
return !isUnmodified(this.focusedIndex);
|
|
5069
|
+
const isUnmodified = areEqual(this.focusedIndex());
|
|
5070
|
+
this.focusedIndex.set(seekFocusedIndex(this.getPrevKey(), this.getNextKey(), peekAtIndex)(this.focusedIndex(), ev));
|
|
5071
|
+
this.focusButton(this.focusedIndex(), ev);
|
|
5072
|
+
return !isUnmodified(this.focusedIndex());
|
|
4729
5073
|
}
|
|
4730
5074
|
}
|
|
4731
5075
|
/**
|
|
@@ -4757,17 +5101,17 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4757
5101
|
this.overflowOptions.text = this.showText === 'toolbar' || this.showText === 'never' ? undefined : this.text;
|
|
4758
5102
|
}
|
|
4759
5103
|
setIconDisplayMode() {
|
|
4760
|
-
this.toolbarOptions.icon = getValueForLocation(this._icon, this.showIcon, false);
|
|
4761
|
-
this.overflowOptions.icon = getValueForLocation(this._icon, this.showIcon, true);
|
|
4762
|
-
this.toolbarOptions.iconClass = getValueForLocation(this._iconClass, this.showIcon, false);
|
|
4763
|
-
this.overflowOptions.iconClass = getValueForLocation(this._iconClass, this.showIcon, true);
|
|
4764
|
-
this.toolbarOptions.svgIcon = getValueForLocation(this._svgIcon, this.showIcon, false);
|
|
4765
|
-
this.overflowOptions.svgIcon = getValueForLocation(this._svgIcon, this.showIcon, true);
|
|
4766
|
-
this.toolbarOptions.imageUrl = getValueForLocation(this._imageUrl, this.showIcon, false);
|
|
4767
|
-
this.overflowOptions.imageUrl = getValueForLocation(this._imageUrl, this.showIcon, true);
|
|
4768
|
-
}
|
|
4769
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4770
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
5104
|
+
this.toolbarOptions.icon = getValueForLocation(this._icon(), this.showIcon, false);
|
|
5105
|
+
this.overflowOptions.icon = getValueForLocation(this._icon(), this.showIcon, true);
|
|
5106
|
+
this.toolbarOptions.iconClass = getValueForLocation(this._iconClass(), this.showIcon, false);
|
|
5107
|
+
this.overflowOptions.iconClass = getValueForLocation(this._iconClass(), this.showIcon, true);
|
|
5108
|
+
this.toolbarOptions.svgIcon = getValueForLocation(this._svgIcon(), this.showIcon, false);
|
|
5109
|
+
this.overflowOptions.svgIcon = getValueForLocation(this._svgIcon(), this.showIcon, true);
|
|
5110
|
+
this.toolbarOptions.imageUrl = getValueForLocation(this._imageUrl(), this.showIcon, false);
|
|
5111
|
+
this.overflowOptions.imageUrl = getValueForLocation(this._imageUrl(), this.showIcon, true);
|
|
5112
|
+
}
|
|
5113
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarSplitButtonComponent, deps: [{ token: ToolBarComponent }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5114
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", 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: `
|
|
4771
5115
|
<ng-template #toolbarTemplate>
|
|
4772
5116
|
<kendo-splitbutton
|
|
4773
5117
|
#toolbarSplitButton
|
|
@@ -4871,9 +5215,9 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4871
5215
|
(itemClick)="itemClick.emit($event)"
|
|
4872
5216
|
></kendo-splitbutton>
|
|
4873
5217
|
</ng-template>
|
|
4874
|
-
`, isInline: true, dependencies: [{ kind: "component", type: SplitButtonComponent, selector: "kendo-splitbutton", inputs: ["text", "icon", "svgIcon", "iconClass", "type", "imageUrl", "size", "rounded", "fillMode", "themeColor", "disabled", "popupSettings", "tabIndex", "textField", "data", "arrowButtonClass", "arrowButtonIcon", "arrowButtonSvgIcon", "buttonAttributes"], outputs: ["buttonClick", "itemClick", "focus", "blur", "open", "close"], exportAs: ["kendoSplitButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
5218
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SplitButtonComponent, selector: "kendo-splitbutton", inputs: ["text", "icon", "svgIcon", "iconClass", "type", "imageUrl", "size", "rounded", "fillMode", "themeColor", "disabled", "popupSettings", "tabIndex", "textField", "data", "arrowButtonClass", "arrowButtonIcon", "arrowButtonSvgIcon", "buttonAttributes"], outputs: ["buttonClick", "itemClick", "focus", "blur", "open", "close"], exportAs: ["kendoSplitButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4875
5219
|
}
|
|
4876
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5220
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarSplitButtonComponent, decorators: [{
|
|
4877
5221
|
type: Component,
|
|
4878
5222
|
args: [{
|
|
4879
5223
|
exportAs: 'kendoToolBarSplitButton',
|
|
@@ -4985,9 +5329,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
4985
5329
|
</ng-template>
|
|
4986
5330
|
`,
|
|
4987
5331
|
standalone: true,
|
|
5332
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4988
5333
|
imports: [SplitButtonComponent, NgClass, IconWrapperComponent]
|
|
4989
5334
|
}]
|
|
4990
|
-
}], ctorParameters: () => [{ type: ToolBarComponent }], propDecorators: { showText: [{
|
|
5335
|
+
}], ctorParameters: () => [{ type: ToolBarComponent }, { type: i0.ChangeDetectorRef }], propDecorators: { showText: [{
|
|
4991
5336
|
type: Input
|
|
4992
5337
|
}], showIcon: [{
|
|
4993
5338
|
type: Input
|
|
@@ -5090,8 +5435,8 @@ class ToolBarSeparatorComponent extends ToolBarToolComponent {
|
|
|
5090
5435
|
this.popupTemplate = this.toolbarTemplate;
|
|
5091
5436
|
}
|
|
5092
5437
|
}
|
|
5093
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5094
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
5438
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5439
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.33", type: ToolBarSeparatorComponent, isStandalone: true, selector: "kendo-toolbar-separator", providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarSeparatorComponent) }], viewQueries: [{ propertyName: "separator", first: true, predicate: ["separator"], descendants: true }], exportAs: ["kendoToolBarSeparator"], usesInheritance: true, ngImport: i0, template: `
|
|
5095
5440
|
<ng-template #toolbarTemplate>
|
|
5096
5441
|
<div class="k-separator k-toolbar-separator"></div>
|
|
5097
5442
|
</ng-template>
|
|
@@ -5105,9 +5450,9 @@ class ToolBarSeparatorComponent extends ToolBarToolComponent {
|
|
|
5105
5450
|
<div class="k-separator k-separator-horizontal"></div>
|
|
5106
5451
|
</div>
|
|
5107
5452
|
</ng-template>
|
|
5108
|
-
`, isInline: true });
|
|
5453
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5109
5454
|
}
|
|
5110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5455
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarSeparatorComponent, decorators: [{
|
|
5111
5456
|
type: Component,
|
|
5112
5457
|
args: [{
|
|
5113
5458
|
exportAs: 'kendoToolBarSeparator',
|
|
@@ -5128,7 +5473,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
5128
5473
|
</div>
|
|
5129
5474
|
</ng-template>
|
|
5130
5475
|
`,
|
|
5131
|
-
standalone: true
|
|
5476
|
+
standalone: true,
|
|
5477
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
5132
5478
|
}]
|
|
5133
5479
|
}], ctorParameters: () => [], propDecorators: { separator: [{
|
|
5134
5480
|
type: ViewChild,
|
|
@@ -5183,14 +5529,14 @@ class ToolBarSpacerComponent extends ToolBarToolComponent {
|
|
|
5183
5529
|
this.popupTemplate = this.toolbarTemplate;
|
|
5184
5530
|
}
|
|
5185
5531
|
}
|
|
5186
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5187
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
5532
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarSpacerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5533
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.33", type: ToolBarSpacerComponent, isStandalone: true, selector: "kendo-toolbar-spacer", providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarSpacerComponent) }], exportAs: ["kendoToolBarSpacer"], usesInheritance: true, ngImport: i0, template: `
|
|
5188
5534
|
<ng-template #toolbarTemplate>
|
|
5189
5535
|
<div class="k-spacer"></div>
|
|
5190
5536
|
</ng-template>
|
|
5191
|
-
`, isInline: true });
|
|
5537
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5192
5538
|
}
|
|
5193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5539
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarSpacerComponent, decorators: [{
|
|
5194
5540
|
type: Component,
|
|
5195
5541
|
args: [{
|
|
5196
5542
|
exportAs: 'kendoToolBarSpacer',
|
|
@@ -5201,7 +5547,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
5201
5547
|
<div class="k-spacer"></div>
|
|
5202
5548
|
</ng-template>
|
|
5203
5549
|
`,
|
|
5204
|
-
standalone: true
|
|
5550
|
+
standalone: true,
|
|
5551
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
5205
5552
|
}]
|
|
5206
5553
|
}], ctorParameters: () => [] });
|
|
5207
5554
|
|
|
@@ -5230,15 +5577,15 @@ class ToolbarCustomMessagesComponent extends ToolbarMessages {
|
|
|
5230
5577
|
get override() {
|
|
5231
5578
|
return true;
|
|
5232
5579
|
}
|
|
5233
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5234
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
5580
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolbarCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5581
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.33", type: ToolbarCustomMessagesComponent, isStandalone: true, selector: "kendo-toolbar-messages", providers: [
|
|
5235
5582
|
{
|
|
5236
5583
|
provide: ToolbarMessages,
|
|
5237
5584
|
useExisting: forwardRef(() => ToolbarCustomMessagesComponent)
|
|
5238
5585
|
}
|
|
5239
5586
|
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
5240
5587
|
}
|
|
5241
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5588
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolbarCustomMessagesComponent, decorators: [{
|
|
5242
5589
|
type: Component,
|
|
5243
5590
|
args: [{
|
|
5244
5591
|
providers: [
|
|
@@ -5293,14 +5640,14 @@ class FloatingToolBarMessages extends ComponentMessages {
|
|
|
5293
5640
|
get nextToolButton() {
|
|
5294
5641
|
return this._nextToolButton();
|
|
5295
5642
|
}
|
|
5296
|
-
_dragHandleTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_dragHandleTitle" }] :
|
|
5297
|
-
_moreToolsTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_moreToolsTitle" }] :
|
|
5298
|
-
_previousToolButton = signal(undefined, ...(ngDevMode ? [{ debugName: "_previousToolButton" }] :
|
|
5299
|
-
_nextToolButton = signal(undefined, ...(ngDevMode ? [{ debugName: "_nextToolButton" }] :
|
|
5300
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5301
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
5643
|
+
_dragHandleTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_dragHandleTitle" }] : []));
|
|
5644
|
+
_moreToolsTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_moreToolsTitle" }] : []));
|
|
5645
|
+
_previousToolButton = signal(undefined, ...(ngDevMode ? [{ debugName: "_previousToolButton" }] : []));
|
|
5646
|
+
_nextToolButton = signal(undefined, ...(ngDevMode ? [{ debugName: "_nextToolButton" }] : []));
|
|
5647
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FloatingToolBarMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
5648
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.33", type: FloatingToolBarMessages, isStandalone: true, selector: "kendo-floatingtoolbar-messages-base", inputs: { dragHandleTitle: "dragHandleTitle", moreToolsTitle: "moreToolsTitle", previousToolButton: "previousToolButton", nextToolButton: "nextToolButton" }, usesInheritance: true, ngImport: i0 });
|
|
5302
5649
|
}
|
|
5303
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5650
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FloatingToolBarMessages, decorators: [{
|
|
5304
5651
|
type: Directive,
|
|
5305
5652
|
args: [{
|
|
5306
5653
|
selector: 'kendo-floatingtoolbar-messages-base'
|
|
@@ -5324,15 +5671,15 @@ class LocalizedFloatingToolBarMessagesDirective extends FloatingToolBarMessages
|
|
|
5324
5671
|
super();
|
|
5325
5672
|
this.service = service;
|
|
5326
5673
|
}
|
|
5327
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5328
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
5674
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: LocalizedFloatingToolBarMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5675
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.33", type: LocalizedFloatingToolBarMessagesDirective, isStandalone: true, selector: "[kendoFloatingToolBarLocalizedMessages]", providers: [
|
|
5329
5676
|
{
|
|
5330
5677
|
provide: FloatingToolBarMessages,
|
|
5331
5678
|
useExisting: forwardRef(() => LocalizedFloatingToolBarMessagesDirective)
|
|
5332
5679
|
}
|
|
5333
5680
|
], usesInheritance: true, ngImport: i0 });
|
|
5334
5681
|
}
|
|
5335
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5682
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: LocalizedFloatingToolBarMessagesDirective, decorators: [{
|
|
5336
5683
|
type: Directive,
|
|
5337
5684
|
args: [{
|
|
5338
5685
|
providers: [
|
|
@@ -5347,7 +5694,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
5347
5694
|
}], ctorParameters: () => [{ type: i1.LocalizationService }] });
|
|
5348
5695
|
|
|
5349
5696
|
/**
|
|
5350
|
-
*
|
|
5697
|
+
* Specifies the arguments for the `dragStart` event of the FloatingToolBar.
|
|
5351
5698
|
*/
|
|
5352
5699
|
class FloatingToolBarDragStartEvent extends PreventableEvent {
|
|
5353
5700
|
sender;
|
|
@@ -5367,7 +5714,7 @@ class FloatingToolBarDragStartEvent extends PreventableEvent {
|
|
|
5367
5714
|
}
|
|
5368
5715
|
}
|
|
5369
5716
|
/**
|
|
5370
|
-
*
|
|
5717
|
+
* Specifies the arguments for the `move` event of the FloatingToolBar.
|
|
5371
5718
|
*/
|
|
5372
5719
|
class FloatingToolBarMoveEvent {
|
|
5373
5720
|
sender;
|
|
@@ -5380,7 +5727,7 @@ class FloatingToolBarMoveEvent {
|
|
|
5380
5727
|
}
|
|
5381
5728
|
}
|
|
5382
5729
|
/**
|
|
5383
|
-
*
|
|
5730
|
+
* Specifies the arguments for the `dragEnd` event of the FloatingToolBar.
|
|
5384
5731
|
*/
|
|
5385
5732
|
class FloatingToolBarDragEndEvent {
|
|
5386
5733
|
sender;
|
|
@@ -5522,6 +5869,17 @@ const resolvePopupPosition = (options) => {
|
|
|
5522
5869
|
* <kendo-toolbar-button text="Button"></kendo-toolbar-button>
|
|
5523
5870
|
* </kendo-floatingtoolbar>
|
|
5524
5871
|
* ```
|
|
5872
|
+
*
|
|
5873
|
+
* @remarks
|
|
5874
|
+
* Supported children components are:
|
|
5875
|
+
* {@link ToolBarButtonComponent},
|
|
5876
|
+
* {@link ToolBarButtonGroupComponent},
|
|
5877
|
+
* {@link ToolBarDropDownButtonComponent},
|
|
5878
|
+
* {@link ToolBarSplitButtonComponent},
|
|
5879
|
+
* {@link ToolBarSeparatorComponent},
|
|
5880
|
+
* {@link ToolBarSpacerComponent},
|
|
5881
|
+
* {@link ToolBarToolComponent},
|
|
5882
|
+
* {@link FloatingToolBarCustomMessagesComponent}
|
|
5525
5883
|
*/
|
|
5526
5884
|
class FloatingToolBarComponent {
|
|
5527
5885
|
hostElement;
|
|
@@ -5538,6 +5896,7 @@ class FloatingToolBarComponent {
|
|
|
5538
5896
|
/**
|
|
5539
5897
|
* Sets the element the FloatingToolBar is positioned against. When not set, the component
|
|
5540
5898
|
* is positioned within its containing element based on the `containerAlign` option.
|
|
5899
|
+
* Setting a different anchor resets the position set by dragging.
|
|
5541
5900
|
*/
|
|
5542
5901
|
set anchor(value) {
|
|
5543
5902
|
if (resolveAnchorElement(this._anchor()) === resolveAnchorElement(value)) {
|
|
@@ -5606,12 +5965,13 @@ class FloatingToolBarComponent {
|
|
|
5606
5965
|
set fillMode(value) { this._fillMode.set(value); }
|
|
5607
5966
|
get fillMode() { return this._fillMode(); }
|
|
5608
5967
|
/**
|
|
5609
|
-
* Controls whether the user can reposition the FloatingToolBar with the pointer or the keyboard.
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5968
|
+
* Controls whether the user can reposition the FloatingToolBar with the pointer or the keyboard.
|
|
5969
|
+
* When enabled, the component renders a drag handle before the hosted ToolBar.
|
|
5970
|
+
*
|
|
5971
|
+
* Drag the handle with a pointer to reposition the FloatingToolBar.
|
|
5972
|
+
* To use the keyboard, press `M` while a ToolBar tool or the drag handle has focus. Focus moves to the drag handle,
|
|
5973
|
+
* where you can use the arrow keys to move the FloatingToolBar by 10 pixels at a time.
|
|
5974
|
+
* Press `Enter` or `Space`, or move focus away from the drag handle, to finish the move. Press `Escape` to restore the starting position.
|
|
5615
5975
|
*
|
|
5616
5976
|
* @default false
|
|
5617
5977
|
*/
|
|
@@ -5634,10 +5994,12 @@ class FloatingToolBarComponent {
|
|
|
5634
5994
|
dragStart = new EventEmitter();
|
|
5635
5995
|
/**
|
|
5636
5996
|
* Fires when the user moves the FloatingToolBar with the pointer or the keyboard.
|
|
5997
|
+
* When a keyboard move is canceled, fires with the starting position.
|
|
5637
5998
|
*/
|
|
5638
5999
|
move = new EventEmitter();
|
|
5639
6000
|
/**
|
|
5640
6001
|
* Fires when a pointer drag ends or the keyboard move mode is committed or canceled.
|
|
6002
|
+
* Also fires when an active drag stops because `anchor` changes, `draggable` is set to `false`, or the component is destroyed.
|
|
5641
6003
|
*/
|
|
5642
6004
|
dragEnd = new EventEmitter();
|
|
5643
6005
|
/**
|
|
@@ -5647,8 +6009,10 @@ class FloatingToolBarComponent {
|
|
|
5647
6009
|
*/
|
|
5648
6010
|
propertyChange = new EventEmitter();
|
|
5649
6011
|
dragHandleIcon = handleDragDotsIcon;
|
|
5650
|
-
direction
|
|
5651
|
-
|
|
6012
|
+
get direction() {
|
|
6013
|
+
return this._direction();
|
|
6014
|
+
}
|
|
6015
|
+
moveMode = computed(() => this.keyboardMoveOrigin() !== null, ...(ngDevMode ? [{ debugName: "moveMode" }] : []));
|
|
5652
6016
|
popupClass = computed(() => {
|
|
5653
6017
|
const size = SIZES[this._size()];
|
|
5654
6018
|
const fillMode = this._fillMode();
|
|
@@ -5657,7 +6021,7 @@ class FloatingToolBarComponent {
|
|
|
5657
6021
|
size && `k-floating-toolbar-${size}`,
|
|
5658
6022
|
fillMode && `k-floating-toolbar-${fillMode}`
|
|
5659
6023
|
].filter(Boolean).join(' ');
|
|
5660
|
-
}, ...(ngDevMode ? [{ debugName: "popupClass" }] :
|
|
6024
|
+
}, ...(ngDevMode ? [{ debugName: "popupClass" }] : []));
|
|
5661
6025
|
popupPosition = computed(() => resolvePopupPosition({
|
|
5662
6026
|
anchor: this._anchor(),
|
|
5663
6027
|
container: this.containerElement,
|
|
@@ -5666,26 +6030,27 @@ class FloatingToolBarComponent {
|
|
|
5666
6030
|
margin: this._margin(),
|
|
5667
6031
|
dragOffset: this._dragOffset(),
|
|
5668
6032
|
dragging: this.pointerDragging() || this.keyboardMoveOrigin() !== null
|
|
5669
|
-
}), ...(ngDevMode ? [{ debugName: "popupPosition" }] :
|
|
5670
|
-
popupPositionMode = computed(() => (this._draggable() || this._dragOffset()) ? 'absolute' : 'fixed', ...(ngDevMode ? [{ debugName: "popupPositionMode" }] :
|
|
6033
|
+
}), ...(ngDevMode ? [{ debugName: "popupPosition" }] : []));
|
|
6034
|
+
popupPositionMode = computed(() => (this._draggable() || this._dragOffset()) ? 'absolute' : 'fixed', ...(ngDevMode ? [{ debugName: "popupPositionMode" }] : []));
|
|
5671
6035
|
get dragHandleTitle() {
|
|
5672
6036
|
return this.localization.get('dragHandleTitle');
|
|
5673
6037
|
}
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
6038
|
+
_direction = signal('ltr', ...(ngDevMode ? [{ debugName: "_direction" }] : []));
|
|
6039
|
+
_anchor = signal(undefined, ...(ngDevMode ? [{ debugName: "_anchor" }] : []));
|
|
6040
|
+
_position = signal('top', ...(ngDevMode ? [{ debugName: "_position" }] : []));
|
|
6041
|
+
_containerAlign = signal({ horizontal: 'center', vertical: 'top' }, ...(ngDevMode ? [{ debugName: "_containerAlign" }] : []));
|
|
6042
|
+
_margin = signal({ horizontal: 0, vertical: 0 }, ...(ngDevMode ? [{ debugName: "_margin" }] : []));
|
|
6043
|
+
_width = signal(undefined, ...(ngDevMode ? [{ debugName: "_width" }] : []));
|
|
6044
|
+
_maxWidth = signal(undefined, ...(ngDevMode ? [{ debugName: "_maxWidth" }] : []));
|
|
6045
|
+
_overflow = signal('none', ...(ngDevMode ? [{ debugName: "_overflow" }] : []));
|
|
6046
|
+
_size = signal(undefined, ...(ngDevMode ? [{ debugName: "_size" }] : []));
|
|
6047
|
+
_fillMode = signal(undefined, ...(ngDevMode ? [{ debugName: "_fillMode" }] : []));
|
|
6048
|
+
_draggable = signal(false, ...(ngDevMode ? [{ debugName: "_draggable" }] : []));
|
|
6049
|
+
_ariaLabel = signal(undefined, ...(ngDevMode ? [{ debugName: "_ariaLabel" }] : []));
|
|
6050
|
+
_dragOffset = signal(null, ...(ngDevMode ? [{ debugName: "_dragOffset" }] : []));
|
|
6051
|
+
keyboardMoveOrigin = signal(null, ...(ngDevMode ? [{ debugName: "keyboardMoveOrigin" }] : []));
|
|
5687
6052
|
preMoveDragOffset = null;
|
|
5688
|
-
pointerDragging = signal(false, ...(ngDevMode ? [{ debugName: "pointerDragging" }] :
|
|
6053
|
+
pointerDragging = signal(false, ...(ngDevMode ? [{ debugName: "pointerDragging" }] : []));
|
|
5689
6054
|
pointerDrag = null;
|
|
5690
6055
|
focusReturnTarget = null;
|
|
5691
6056
|
isFocusWithinComponent = false;
|
|
@@ -5698,14 +6063,14 @@ class FloatingToolBarComponent {
|
|
|
5698
6063
|
this.localization = localization;
|
|
5699
6064
|
this.changeDetectorRef = changeDetectorRef;
|
|
5700
6065
|
validatePackage(packageMetadata);
|
|
5701
|
-
this.
|
|
6066
|
+
this._direction.set(localization.rtl ? 'rtl' : 'ltr');
|
|
5702
6067
|
if (isDocumentAvailable()) {
|
|
5703
6068
|
this.focusReturnTarget = document.activeElement;
|
|
5704
6069
|
}
|
|
5705
6070
|
}
|
|
5706
6071
|
ngOnInit() {
|
|
5707
6072
|
this.subscriptions.add(this.localization.changes.subscribe(({ rtl }) => {
|
|
5708
|
-
this.
|
|
6073
|
+
this._direction.set(rtl ? 'rtl' : 'ltr');
|
|
5709
6074
|
this.changeDetectorRef.markForCheck();
|
|
5710
6075
|
}));
|
|
5711
6076
|
}
|
|
@@ -5733,14 +6098,15 @@ class FloatingToolBarComponent {
|
|
|
5733
6098
|
this.subscriptions.unsubscribe();
|
|
5734
6099
|
}
|
|
5735
6100
|
/**
|
|
5736
|
-
* Moves the focus
|
|
6101
|
+
* Moves the focus to the first focusable tool that is not in the overflow menu.
|
|
5737
6102
|
*/
|
|
5738
6103
|
focus() {
|
|
5739
|
-
this.
|
|
6104
|
+
this.toolbarComponent?.element.nativeElement.focus();
|
|
5740
6105
|
}
|
|
5741
6106
|
/**
|
|
5742
6107
|
* Sets the FloatingToolBar position using the provided `top` and `left` coordinates.
|
|
5743
6108
|
* The position is clamped to the viewport.
|
|
6109
|
+
* Does not emit the `move` event.
|
|
5744
6110
|
*/
|
|
5745
6111
|
setPosition(position) {
|
|
5746
6112
|
const popupElement = this.popupComponent?.container.nativeElement;
|
|
@@ -5986,8 +6352,8 @@ class FloatingToolBarComponent {
|
|
|
5986
6352
|
};
|
|
5987
6353
|
return clampToBounds({ left, top }, { width, height }, viewport, getPositioningOrigin(offsetParent));
|
|
5988
6354
|
}
|
|
5989
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5990
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
6355
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FloatingToolBarComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
6356
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: FloatingToolBarComponent, isStandalone: true, selector: "kendo-floatingtoolbar", inputs: { anchor: "anchor", position: "position", containerAlign: "containerAlign", margin: "margin", width: "width", maxWidth: "maxWidth", overflow: "overflow", size: "size", fillMode: "fillMode", draggable: "draggable", ariaLabel: "ariaLabel" }, outputs: { dragStart: "dragStart", move: "move", dragEnd: "dragEnd" }, host: { properties: { "attr.dir": "this.direction" } }, providers: [
|
|
5991
6357
|
LocalizationService,
|
|
5992
6358
|
{ provide: L10N_PREFIX, useValue: 'kendo.floatingtoolbar' },
|
|
5993
6359
|
provideComponentName('floatingtoolbar'),
|
|
@@ -6045,7 +6411,7 @@ class FloatingToolBarComponent {
|
|
|
6045
6411
|
</kendo-popup>
|
|
6046
6412
|
`, isInline: true, dependencies: [{ kind: "component", type: PopupComponent, selector: "kendo-popup", inputs: ["animate", "anchor", "anchorAlign", "collision", "popupAlign", "copyAnchorStyles", "popupClass", "positionMode", "offset", "margin"], outputs: ["anchorViewportLeave", "close", "open", "positionChange"], exportAs: ["kendo-popup"] }, { kind: "component", type: ToolBarComponent, selector: "kendo-toolbar", inputs: ["overflow", "resizable", "popupSettings", "fillMode", "tabindex", "size", "tabIndex", "showIcon", "showText", "toolsSource"], outputs: ["open", "close"], exportAs: ["kendoToolBar"] }, { kind: "component", type: ToolbarCustomMessagesComponent, selector: "kendo-toolbar-messages" }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: LocalizedFloatingToolBarMessagesDirective, selector: "[kendoFloatingToolBarLocalizedMessages]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6047
6413
|
}
|
|
6048
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
6414
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FloatingToolBarComponent, decorators: [{
|
|
6049
6415
|
type: Component,
|
|
6050
6416
|
args: [{
|
|
6051
6417
|
selector: 'kendo-floatingtoolbar',
|
|
@@ -6180,15 +6546,15 @@ class FloatingToolBarCustomMessagesComponent extends FloatingToolBarMessages {
|
|
|
6180
6546
|
get override() {
|
|
6181
6547
|
return true;
|
|
6182
6548
|
}
|
|
6183
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
6184
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
6549
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FloatingToolBarCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6550
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.33", type: FloatingToolBarCustomMessagesComponent, isStandalone: true, selector: "kendo-floatingtoolbar-messages", providers: [
|
|
6185
6551
|
{
|
|
6186
6552
|
provide: FloatingToolBarMessages,
|
|
6187
6553
|
useExisting: forwardRef(() => FloatingToolBarCustomMessagesComponent)
|
|
6188
6554
|
}
|
|
6189
6555
|
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
6190
6556
|
}
|
|
6191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
6557
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FloatingToolBarCustomMessagesComponent, decorators: [{
|
|
6192
6558
|
type: Component,
|
|
6193
6559
|
args: [{
|
|
6194
6560
|
providers: [
|
|
@@ -6253,11 +6619,11 @@ const KENDO_TOOLBAR = [
|
|
|
6253
6619
|
* ```
|
|
6254
6620
|
*/
|
|
6255
6621
|
class ToolBarModule {
|
|
6256
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
6257
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
6258
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
6622
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6623
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.33", ngImport: i0, type: ToolBarModule, imports: [ToolBarComponent, ToolbarCustomMessagesComponent, ToolBarButtonComponent, ToolBarButtonGroupComponent, ToolBarDropDownButtonComponent, ToolBarSeparatorComponent, ToolBarSpacerComponent, ToolBarSplitButtonComponent, ToolBarToolComponent, FloatingToolBarComponent, FloatingToolBarCustomMessagesComponent], exports: [ToolBarComponent, ToolbarCustomMessagesComponent, ToolBarButtonComponent, ToolBarButtonGroupComponent, ToolBarDropDownButtonComponent, ToolBarSeparatorComponent, ToolBarSpacerComponent, ToolBarSplitButtonComponent, ToolBarToolComponent, FloatingToolBarComponent, FloatingToolBarCustomMessagesComponent] });
|
|
6624
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarModule, providers: [IconsService, PopupService, ResizeBatchService], imports: [ToolBarComponent, ToolBarButtonComponent, ToolBarButtonGroupComponent, ToolBarDropDownButtonComponent, ToolBarSplitButtonComponent, FloatingToolBarComponent] });
|
|
6259
6625
|
}
|
|
6260
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
6626
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ToolBarModule, decorators: [{
|
|
6261
6627
|
type: NgModule,
|
|
6262
6628
|
args: [{
|
|
6263
6629
|
exports: [...KENDO_TOOLBAR],
|