@progress/kendo-angular-toolbar 18.1.0-develop.3 → 18.1.0-develop.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/common/overflow-mode.d.ts +8 -0
  2. package/common/overflow-settings.d.ts +53 -0
  3. package/common/scroll-buttons.d.ts +12 -0
  4. package/esm2022/common/overflow-mode.mjs +5 -0
  5. package/esm2022/common/overflow-settings.mjs +5 -0
  6. package/esm2022/common/scroll-buttons.mjs +5 -0
  7. package/esm2022/localization/messages.mjs +14 -2
  8. package/esm2022/navigation.service.mjs +5 -3
  9. package/esm2022/package-metadata.mjs +2 -2
  10. package/esm2022/renderer.component.mjs +8 -0
  11. package/esm2022/scroll.service.mjs +102 -0
  12. package/esm2022/scrollable-button.component.mjs +162 -0
  13. package/esm2022/toolbar.component.mjs +716 -124
  14. package/esm2022/tools/toolbar-button.component.mjs +62 -2
  15. package/esm2022/tools/toolbar-buttongroup.component.mjs +87 -6
  16. package/esm2022/tools/toolbar-dropdownbutton.component.mjs +67 -11
  17. package/esm2022/tools/toolbar-separator.component.mjs +8 -0
  18. package/esm2022/tools/toolbar-splitbutton.component.mjs +61 -5
  19. package/esm2022/tools/toolbar-tool.component.mjs +9 -1
  20. package/esm2022/tools/tools.service.mjs +3 -0
  21. package/esm2022/util.mjs +17 -0
  22. package/fesm2022/progress-kendo-angular-toolbar.mjs +1300 -155
  23. package/index.d.ts +3 -0
  24. package/localization/messages.d.ts +10 -2
  25. package/package.json +9 -9
  26. package/render-location.d.ts +1 -1
  27. package/scroll.service.d.ts +42 -0
  28. package/scrollable-button.component.d.ts +44 -0
  29. package/toolbar.component.d.ts +77 -6
  30. package/tools/toolbar-button.component.d.ts +1 -0
  31. package/tools/toolbar-buttongroup.component.d.ts +1 -0
  32. package/tools/toolbar-dropdownbutton.component.d.ts +2 -1
  33. package/tools/toolbar-splitbutton.component.d.ts +1 -0
  34. package/tools/toolbar-tool.component.d.ts +6 -0
  35. package/tools/tools.service.d.ts +1 -0
  36. package/util.d.ts +5 -0
@@ -3,7 +3,7 @@
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, Directive, ViewChild, Input, Output, forwardRef, ViewContainerRef, Component, ContentChildren, HostBinding, HostListener, isDevMode, ViewChildren, NgModule } from '@angular/core';
6
+ import { EventEmitter, Injectable, inject, ElementRef, Directive, ViewChild, Input, Output, forwardRef, Component, HostBinding, HostListener, ViewContainerRef, ContentChildren, isDevMode, ViewChildren, NgModule } from '@angular/core';
7
7
  import * as i2 from '@progress/kendo-angular-popup';
8
8
  import { PopupService } from '@progress/kendo-angular-popup';
9
9
  import { Keys, isDocumentAvailable, guid, ResizeSensorComponent, ResizeBatchService } from '@progress/kendo-angular-common';
@@ -12,7 +12,7 @@ import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/k
12
12
  import { validatePackage } from '@progress/kendo-licensing';
13
13
  import { take, filter, takeUntil } from 'rxjs/operators';
14
14
  import { Subject, Subscription, merge, fromEvent } from 'rxjs';
15
- import { moreVerticalIcon, caretAltDownIcon } from '@progress/kendo-svg-icons';
15
+ import { caretAltLeftIcon, caretAltRightIcon, moreHorizontalIcon, moreVerticalIcon, caretAltDownIcon } from '@progress/kendo-svg-icons';
16
16
  import { ButtonComponent, ButtonGroupComponent, DropDownButtonComponent, SplitButtonComponent } from '@progress/kendo-angular-buttons';
17
17
  import { NgTemplateOutlet, NgFor, NgIf, NgClass, NgStyle } from '@angular/common';
18
18
  import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
@@ -25,8 +25,8 @@ const packageMetadata = {
25
25
  productName: 'Kendo UI for Angular',
26
26
  productCode: 'KENDOUIANGULAR',
27
27
  productCodes: ['KENDOUIANGULAR'],
28
- publishDate: 1738245757,
29
- version: '18.1.0-develop.3',
28
+ publishDate: 1739264198,
29
+ version: '18.1.0-develop.31',
30
30
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
31
31
  };
32
32
 
@@ -263,6 +263,23 @@ const getStylingClasses = (componentType, stylingOption, previousValue, newValue
263
263
  * nodeType 1 is Element, nodeType 3 is Text
264
264
  */
265
265
  const isElementOrTextNode = n => n.nodeType === 1 || n.nodeType === 3;
266
+ /**
267
+ * @hidden
268
+ */
269
+ const normalizeOverflowSettings = (overflow) => {
270
+ const defaultOverflowSettings = { mode: 'none', scrollButtons: 'auto', scrollButtonsPosition: 'split' };
271
+ let normalizedSettings = {};
272
+ if (typeof overflow === 'object') {
273
+ normalizedSettings = Object.assign(defaultOverflowSettings, overflow);
274
+ }
275
+ else if (typeof overflow === 'boolean') {
276
+ normalizedSettings = overflow ? Object.assign(defaultOverflowSettings, { mode: 'menu' }) : defaultOverflowSettings;
277
+ }
278
+ else {
279
+ normalizedSettings = Object.assign(defaultOverflowSettings, { mode: overflow });
280
+ }
281
+ return normalizedSettings;
282
+ };
266
283
 
267
284
  /**
268
285
  * @hidden
@@ -399,9 +416,11 @@ class NavigationService {
399
416
  }
400
417
  }
401
418
  focusOverflowButton() {
402
- this.isOverflowButtonFocused = true;
403
- this.overflowButton.nativeElement.tabIndex = 0;
404
- this.overflowButton.nativeElement.focus();
419
+ if (this.overflowButton) {
420
+ this.isOverflowButtonFocused = true;
421
+ this.overflowButton.nativeElement.tabIndex = 0;
422
+ this.overflowButton.nativeElement.focus();
423
+ }
405
424
  }
406
425
  isOverflowButtonVisible() {
407
426
  return (isPresent(this.overflowButton) &&
@@ -420,12 +439,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
420
439
  */
421
440
  class ToolBarToolComponent {
422
441
  toolbarTemplate;
442
+ sectionTemplate;
423
443
  popupTemplate;
424
444
  tabIndex = -1; //Focus movement inside the toolbar is managed using roving tabindex.
425
445
  overflows = true;
426
446
  visibility;
427
447
  element;
428
448
  isBuiltInTool = false;
449
+ /**
450
+ * @hidden
451
+ */
452
+ location;
429
453
  constructor() {
430
454
  this.element = inject(ElementRef);
431
455
  }
@@ -467,7 +491,7 @@ class ToolBarToolComponent {
467
491
  return false;
468
492
  }
469
493
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarToolComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
470
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarToolComponent, isStandalone: true, inputs: { responsive: "responsive" }, viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }], ngImport: i0 });
494
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", 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 });
471
495
  }
472
496
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarToolComponent, decorators: [{
473
497
  type: Directive,
@@ -477,6 +501,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
477
501
  }], ctorParameters: function () { return []; }, propDecorators: { toolbarTemplate: [{
478
502
  type: ViewChild,
479
503
  args: ['toolbarTemplate', { static: true }]
504
+ }], sectionTemplate: [{
505
+ type: ViewChild,
506
+ args: ['sectionTemplate', { static: true }]
480
507
  }], popupTemplate: [{
481
508
  type: ViewChild,
482
509
  args: ['popupTemplate', { static: true }]
@@ -561,6 +588,9 @@ class ToolbarToolsService {
561
588
  renderedTools = [];
562
589
  overflowTools = [];
563
590
  allTools = [];
591
+ reset() {
592
+ this.renderedTools = this.overflowTools = this.allTools = [];
593
+ }
564
594
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarToolsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
565
595
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarToolsService });
566
596
  }
@@ -601,6 +631,7 @@ class ToolBarRendererComponent {
601
631
  if (!viewContainerRootNodes || viewContainerRootNodes.length === 0) {
602
632
  return;
603
633
  }
634
+ this.tool.location = this.location;
604
635
  this.internalComponentRef = viewContainerRootNodes[0];
605
636
  this.element = this.tool.element;
606
637
  this.internalComponentRef.addEventListener('click', this.onClick);
@@ -617,6 +648,11 @@ class ToolBarRendererComponent {
617
648
  this.renderer.setStyle(this.internalComponentRef, 'visibility', 'hidden');
618
649
  this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
619
650
  }
651
+ else if (this.location === 'section') {
652
+ this.template = this.tool.toolbarTemplate;
653
+ this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
654
+ this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
655
+ }
620
656
  else {
621
657
  this.template = this.tool.popupTemplate;
622
658
  this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
@@ -652,6 +688,7 @@ class ToolBarRendererComponent {
652
688
  return this.internalComponentRef?.style?.display !== 'none';
653
689
  }
654
690
  refresh() {
691
+ this.tool.location = this.location;
655
692
  if (this.resizable && this.internalComponentRef) {
656
693
  if (this.location === 'toolbar') {
657
694
  this.renderer.setStyle(this.internalComponentRef, 'visibility', this.tool.visibility);
@@ -670,6 +707,7 @@ class ToolBarRendererComponent {
670
707
  this.rendererClick.emit({ context: this, event: ev });
671
708
  };
672
709
  updateTools() {
710
+ this.tool.location = this.location;
673
711
  const isInToolbar = this.toolsService.renderedTools.some(t => t.tool === this.tool);
674
712
  const isInPopup = this.toolsService.overflowTools.some(t => t.tool === this.tool);
675
713
  if (this.location === 'toolbar') {
@@ -711,11 +749,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
711
749
  */
712
750
  class ToolbarMessages extends ComponentMessages {
713
751
  /**
714
- * The title of the **more tools** button in a responsive ToolBar
752
+ * The title of the **More Tools** button in a responsive ToolBar
715
753
  */
716
754
  moreToolsTitle;
755
+ /**
756
+ * The title for the **Previous Tool** button when the Toolbar is scrollable.
757
+ */
758
+ previousToolButton;
759
+ /**
760
+ * The title for the **Next Tool** button when the Toolbar is scrollable.
761
+ */
762
+ nextToolButton;
717
763
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
718
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ToolbarMessages, selector: "kendo-toolbar-messages-base", inputs: { moreToolsTitle: "moreToolsTitle" }, usesInheritance: true, ngImport: i0 });
764
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ToolbarMessages, selector: "kendo-toolbar-messages-base", inputs: { moreToolsTitle: "moreToolsTitle", previousToolButton: "previousToolButton", nextToolButton: "nextToolButton" }, usesInheritance: true, ngImport: i0 });
719
765
  }
720
766
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarMessages, decorators: [{
721
767
  type: Directive,
@@ -725,6 +771,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
725
771
  }]
726
772
  }], propDecorators: { moreToolsTitle: [{
727
773
  type: Input
774
+ }], previousToolButton: [{
775
+ type: Input
776
+ }], nextToolButton: [{
777
+ type: Input
728
778
  }] } });
729
779
 
730
780
  /**
@@ -758,6 +808,251 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
758
808
  }]
759
809
  }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
760
810
 
811
+ const DEFAULT_SCROLL_BEHAVIOR = 'smooth';
812
+ const DEFAULT_SCROLL_SPEED = 100;
813
+ /**
814
+ * @hidden
815
+ */
816
+ class ScrollService {
817
+ ngZone;
818
+ localization;
819
+ owner;
820
+ position = 0;
821
+ scrollButtonActiveStateChange = new Subject();
822
+ get scrollElement() {
823
+ return this.owner.scrollContainer?.nativeElement;
824
+ }
825
+ get scrollContainerOverflowSize() {
826
+ if (!isDocumentAvailable()) {
827
+ return 0;
828
+ }
829
+ if (!this.scrollElement) {
830
+ return 0;
831
+ }
832
+ const overflowSize = Math.floor(this.scrollElement.scrollWidth - this.scrollElement.getBoundingClientRect().width);
833
+ return overflowSize < 0 ? 0 : overflowSize;
834
+ }
835
+ get toolsOverflow() {
836
+ return this.scrollContainerOverflowSize > 0;
837
+ }
838
+ constructor(ngZone, localization) {
839
+ this.ngZone = ngZone;
840
+ this.localization = localization;
841
+ }
842
+ toggleScrollButtonsState() {
843
+ const toolbar = this.owner;
844
+ if (!toolbar.hasScrollButtons) {
845
+ return;
846
+ }
847
+ const currentPrevButtonActive = !this.isDisabled('prev');
848
+ const currentNextButtonActive = !this.isDisabled('next');
849
+ const defaultOffset = 1;
850
+ const rtlDelta = this.localization.rtl ? -1 : 1;
851
+ const calculatedPrevButtonActive = (this.position * rtlDelta) > 0 && this.scrollContainerOverflowSize > 0;
852
+ const calculatedNextButtonActive = (this.position * rtlDelta) < this.scrollContainerOverflowSize - defaultOffset && this.scrollContainerOverflowSize > 0;
853
+ if (calculatedPrevButtonActive !== currentPrevButtonActive) {
854
+ this.ngZone.run(() => this.toggleButtonActiveState('prev', calculatedPrevButtonActive));
855
+ }
856
+ if (calculatedNextButtonActive !== currentNextButtonActive) {
857
+ this.ngZone.run(() => this.toggleButtonActiveState('next', calculatedNextButtonActive));
858
+ }
859
+ }
860
+ onScroll(e) {
861
+ this.position = e.target.scrollLeft;
862
+ this.toggleScrollButtonsState();
863
+ }
864
+ scrollTools(direction) {
865
+ this.calculateListPosition(direction, DEFAULT_SCROLL_SPEED);
866
+ if (this.scrollElement) {
867
+ this.scrollElement.scrollTo({ left: this.position, behavior: DEFAULT_SCROLL_BEHAVIOR });
868
+ }
869
+ this.toggleScrollButtonsState();
870
+ }
871
+ calculateListPosition(direction, scrollSpeed) {
872
+ if (direction === 'prev') {
873
+ if (!this.localization.rtl) {
874
+ this.position = this.position - scrollSpeed <= 0 ? 0 : this.position - scrollSpeed;
875
+ }
876
+ else {
877
+ this.position = this.position + scrollSpeed >= 0 ? 0 : this.position + scrollSpeed;
878
+ }
879
+ }
880
+ else if (direction === 'next' && this.position < this.scrollContainerOverflowSize) {
881
+ if (this.position + scrollSpeed > this.scrollContainerOverflowSize) {
882
+ this.position = this.scrollContainerOverflowSize;
883
+ return;
884
+ }
885
+ if (this.localization.rtl) {
886
+ this.position -= scrollSpeed;
887
+ }
888
+ else {
889
+ this.position += scrollSpeed;
890
+ }
891
+ }
892
+ }
893
+ toggleButtonActiveState(buttonType, active) {
894
+ this.scrollButtonActiveStateChange.next({ buttonType, active });
895
+ }
896
+ isDisabled = (buttonType) => this.owner[`${buttonType}ScrollButton`]?.nativeElement.classList.contains('k-disabled');
897
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ScrollService, deps: [{ token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
898
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ScrollService });
899
+ }
900
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ScrollService, decorators: [{
901
+ type: Injectable
902
+ }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.LocalizationService }]; } });
903
+
904
+ const DIRECTION_CLASSES = {
905
+ left: 'caret-alt-left',
906
+ right: 'caret-alt-right'
907
+ };
908
+ /**
909
+ * @hidden
910
+ */
911
+ class ToolbarScrollableButtonComponent {
912
+ host;
913
+ renderer;
914
+ ngZone;
915
+ localization;
916
+ get prevClass() {
917
+ return this.prev;
918
+ }
919
+ get nextClass() {
920
+ return !this.prev;
921
+ }
922
+ /**
923
+ * @hidden
924
+ */
925
+ onMouseDown(ev) {
926
+ ev.preventDefault();
927
+ ev.stopImmediatePropagation();
928
+ }
929
+ role = 'button';
930
+ prev = false;
931
+ overflow;
932
+ onClick = new EventEmitter();
933
+ get iconClass() {
934
+ return this.scrollButtonIconClass;
935
+ }
936
+ get customIconClass() {
937
+ return this.customScrollButtonIconClass;
938
+ }
939
+ get svgIcon() {
940
+ return this.scrollButtonSVGIcon;
941
+ }
942
+ caretAltLeftIcon = caretAltLeftIcon;
943
+ caretAltRightIcon = caretAltRightIcon;
944
+ subs = new Subscription();
945
+ constructor(host, renderer, ngZone, localization) {
946
+ this.host = host;
947
+ this.renderer = renderer;
948
+ this.ngZone = ngZone;
949
+ this.localization = localization;
950
+ }
951
+ ngAfterViewInit() {
952
+ this.ngZone.runOutsideAngular(() => {
953
+ this.subs.add(this.renderer.listen(this.host.nativeElement, 'click', this.clickHandler));
954
+ });
955
+ }
956
+ ngOnDestroy() {
957
+ this.subs.unsubscribe();
958
+ }
959
+ clickHandler = () => {
960
+ const buttonType = this.prev ? 'prev' : 'next';
961
+ this.onClick.emit(buttonType);
962
+ };
963
+ get scrollButtonIconClass() {
964
+ const defaultPrevIcon = !this.localization.rtl ?
965
+ DIRECTION_CLASSES.left :
966
+ DIRECTION_CLASSES.right;
967
+ const defaultNextIcon = !this.localization.rtl ?
968
+ DIRECTION_CLASSES.right :
969
+ DIRECTION_CLASSES.left;
970
+ if (typeof this.overflow === 'object') {
971
+ const prevIcon = typeof this.overflow.prevButtonIcon === 'undefined' ? defaultPrevIcon : '';
972
+ const nextIcon = typeof this.overflow.nextButtonIcon === 'undefined' ? defaultNextIcon : '';
973
+ if (prevIcon && this.prev) {
974
+ return prevIcon;
975
+ }
976
+ else if (nextIcon && !this.prev) {
977
+ return nextIcon;
978
+ }
979
+ }
980
+ }
981
+ get customScrollButtonIconClass() {
982
+ if (typeof this.overflow === 'object') {
983
+ const prevIcon = this.overflow.prevButtonIcon;
984
+ const nextIcon = this.overflow.nextButtonIcon;
985
+ if (prevIcon && this.prev) {
986
+ return `k-icon ${prevIcon}`;
987
+ }
988
+ if (nextIcon && !this.prev) {
989
+ return `k-icon ${nextIcon}`;
990
+ }
991
+ }
992
+ }
993
+ get scrollButtonSVGIcon() {
994
+ const defaultPrevSVGIcon = !this.localization.rtl ?
995
+ this.caretAltLeftIcon :
996
+ this.caretAltRightIcon;
997
+ const defaultNextSVGIcon = !this.localization.rtl ?
998
+ this.caretAltRightIcon :
999
+ this.caretAltLeftIcon;
1000
+ if (typeof this.overflow === 'object') {
1001
+ const prevIcon = this.overflow.prevSVGButtonIcon !== undefined ? this.overflow.prevSVGButtonIcon : defaultPrevSVGIcon;
1002
+ const nextIcon = this.overflow.nextSVGButtonIcon !== undefined ? this.overflow.nextSVGButtonIcon : defaultNextSVGIcon;
1003
+ if (prevIcon || nextIcon) {
1004
+ return this.prev ? prevIcon : nextIcon;
1005
+ }
1006
+ }
1007
+ }
1008
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarScrollableButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
1009
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolbarScrollableButtonComponent, isStandalone: true, selector: "[kendoToolbarScrollableButton]", inputs: { prev: "prev", overflow: "overflow" }, outputs: { onClick: "onClick" }, host: { listeners: { "mousedown": "onMouseDown($event)" }, properties: { "class.k-toolbar-prev": "this.prevClass", "class.k-toolbar-next": "this.nextClass", "attr.role": "this.role" } }, ngImport: i0, template: `
1010
+ <kendo-icon-wrapper
1011
+ [name]="iconClass"
1012
+ [customFontClass]="customIconClass"
1013
+ [svgIcon]="svgIcon"
1014
+ innerCssClass="k-button-icon"
1015
+ >
1016
+ </kendo-icon-wrapper>
1017
+ `, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
1018
+ }
1019
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarScrollableButtonComponent, decorators: [{
1020
+ type: Component,
1021
+ args: [{
1022
+ template: `
1023
+ <kendo-icon-wrapper
1024
+ [name]="iconClass"
1025
+ [customFontClass]="customIconClass"
1026
+ [svgIcon]="svgIcon"
1027
+ innerCssClass="k-button-icon"
1028
+ >
1029
+ </kendo-icon-wrapper>
1030
+ `,
1031
+ // eslint-disable-next-line @angular-eslint/component-selector
1032
+ selector: '[kendoToolbarScrollableButton]',
1033
+ standalone: true,
1034
+ imports: [IconWrapperComponent]
1035
+ }]
1036
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.LocalizationService }]; }, propDecorators: { prevClass: [{
1037
+ type: HostBinding,
1038
+ args: ['class.k-toolbar-prev']
1039
+ }], nextClass: [{
1040
+ type: HostBinding,
1041
+ args: ['class.k-toolbar-next']
1042
+ }], onMouseDown: [{
1043
+ type: HostListener,
1044
+ args: ['mousedown', ['$event']]
1045
+ }], role: [{
1046
+ type: HostBinding,
1047
+ args: ['attr.role']
1048
+ }], prev: [{
1049
+ type: Input
1050
+ }], overflow: [{
1051
+ type: Input
1052
+ }], onClick: [{
1053
+ type: Output
1054
+ }] } });
1055
+
761
1056
  /* eslint-disable no-case-declarations */
762
1057
  const DEFAULT_SIZE = 'medium';
763
1058
  const DEFAULT_FILL_MODE = 'solid';
@@ -780,13 +1075,27 @@ class ToolBarComponent {
780
1075
  renderer;
781
1076
  _cdr;
782
1077
  toolsService;
1078
+ scrollService;
783
1079
  get overflowClass() {
784
1080
  return `k-button-${SIZES[this.size]}`;
785
1081
  }
786
1082
  /**
787
- * Hides the overflowing tools in a popup.
1083
+ * Configures the overflow mode. Used to specify how tools will be rendered when the total size of all tools is greater than the size of the Toolbar container.
1084
+ * @default false
788
1085
  */
789
- overflow = false;
1086
+ set overflow(overflow) {
1087
+ this._overflow = overflow;
1088
+ this.zone.onStable.pipe(take(1)).subscribe(() => this.onResize());
1089
+ }
1090
+ get overflow() {
1091
+ return this._overflow;
1092
+ }
1093
+ get show() {
1094
+ const buttonsVisibility = this.normalizedOverflow.scrollButtons;
1095
+ const showAuto = buttonsVisibility === 'auto' && this.showAutoButtons;
1096
+ const showAlways = buttonsVisibility === 'visible';
1097
+ return this.isScrollMode && (showAuto || showAlways);
1098
+ }
790
1099
  /**
791
1100
  * @hidden
792
1101
  */
@@ -794,10 +1103,39 @@ class ToolBarComponent {
794
1103
  this.overflow = value;
795
1104
  }
796
1105
  get resizable() {
797
- return this.overflow;
1106
+ return this.showMenu;
798
1107
  }
799
1108
  /**
800
- * Configures the popup of the ToolBar overflow button ([see example]({% slug responsive_toolbar %}#toc-popup-customization)).
1109
+ * @hidden
1110
+ */
1111
+ get hasScrollButtons() {
1112
+ const visible = this.normalizedOverflow.mode === 'scroll' && this.normalizedOverflow.scrollButtons !== 'hidden';
1113
+ const position = this.normalizedOverflow.scrollButtonsPosition;
1114
+ return {
1115
+ visible,
1116
+ position
1117
+ };
1118
+ }
1119
+ /**
1120
+ * @hidden
1121
+ */
1122
+ get isScrollMode() {
1123
+ return this.normalizedOverflow.mode === 'scroll';
1124
+ }
1125
+ /**
1126
+ * @hidden
1127
+ */
1128
+ get showMenu() {
1129
+ return this.normalizedOverflow.mode === 'menu' || this.normalizedOverflow.mode === 'section';
1130
+ }
1131
+ /**
1132
+ * @hidden
1133
+ */
1134
+ get overflowEnabled() {
1135
+ return this.normalizedOverflow.mode !== 'none';
1136
+ }
1137
+ /**
1138
+ * Configures the popup of the ToolBar overflow button ([see example](slug:responsive_toolbar#customizing-the-popup)).
801
1139
  *
802
1140
  * The available options are:
803
1141
  * - `animate: Boolean`&mdash;Controls the popup animation. By default, the open and close animations are enabled.
@@ -864,8 +1202,15 @@ class ToolBarComponent {
864
1202
  allTools;
865
1203
  overflowButton;
866
1204
  popupTemplate;
1205
+ popupSectionTemplate;
1206
+ scrollContainer;
867
1207
  resizeSensor;
868
1208
  container;
1209
+ prevScrollButton;
1210
+ nextScrollButton;
1211
+ startButtonGroup;
1212
+ endButtonGroup;
1213
+ scrollSeparator;
869
1214
  popupRef;
870
1215
  direction;
871
1216
  get appendTo() {
@@ -894,17 +1239,40 @@ class ToolBarComponent {
894
1239
  get popupOpen() {
895
1240
  return this._open;
896
1241
  }
1242
+ /**
1243
+ * @hidden
1244
+ */
1245
+ prevButtonIcon = caretAltLeftIcon;
1246
+ /**
1247
+ * @hidden
1248
+ */
1249
+ nextButtonIcon = caretAltRightIcon;
897
1250
  hostClass = true;
1251
+ get scrollableClass() {
1252
+ return this.isScrollMode;
1253
+ }
1254
+ get sectionClass() {
1255
+ return this.normalizedOverflow.mode === 'section';
1256
+ }
1257
+ _overflow = false;
898
1258
  _popupSettings;
899
1259
  cachedOverflowAnchorWidth;
900
1260
  _open;
901
1261
  toolbarKeydownListener;
902
1262
  overflowKeydownListener;
1263
+ sectionKeydownListener;
903
1264
  cancelRenderedToolsSubscription$ = new Subject();
904
1265
  cachedGap;
905
1266
  _size = DEFAULT_SIZE;
906
1267
  _fillMode = DEFAULT_FILL_MODE;
907
1268
  overflowButtonClickedTime = null;
1269
+ showAutoButtons = false;
1270
+ /**
1271
+ * @hidden
1272
+ */
1273
+ get normalizedOverflow() {
1274
+ return normalizeOverflowSettings(this.overflow);
1275
+ }
908
1276
  subscriptions = new Subscription();
909
1277
  popupSubs = new Subscription();
910
1278
  /**
@@ -932,12 +1300,11 @@ class ToolBarComponent {
932
1300
  return this.direction;
933
1301
  }
934
1302
  get resizableClass() {
935
- return this.overflow;
1303
+ return this.resizable;
936
1304
  }
937
- moreVerticalIcon = moreVerticalIcon;
938
1305
  constructor(localization, popupService, refreshService, navigationService,
939
1306
  // Needs to be public as it is being accessed in the Editor component
940
- element, zone, renderer, _cdr, toolsService) {
1307
+ element, zone, renderer, _cdr, toolsService, scrollService) {
941
1308
  this.localization = localization;
942
1309
  this.popupService = popupService;
943
1310
  this.refreshService = refreshService;
@@ -947,13 +1314,19 @@ class ToolBarComponent {
947
1314
  this.renderer = renderer;
948
1315
  this._cdr = _cdr;
949
1316
  this.toolsService = toolsService;
1317
+ this.scrollService = scrollService;
950
1318
  validatePackage(packageMetadata);
951
1319
  this.direction = localization.rtl ? 'rtl' : 'ltr';
1320
+ this.scrollService.owner = this;
952
1321
  }
953
1322
  ngAfterContentInit() {
954
1323
  this.toolsService.allTools = this.allTools.toArray();
955
1324
  this.subscriptions.add(this.allTools.changes.subscribe(() => {
1325
+ this.toolsService.reset();
956
1326
  this.toolsService.allTools = this.allTools.toArray();
1327
+ this.allTools.forEach((tool) => {
1328
+ this.refreshService.refresh(tool);
1329
+ });
957
1330
  this.zone.onStable.pipe(take(1)).subscribe(() => this.onResize());
958
1331
  }));
959
1332
  }
@@ -1010,9 +1383,11 @@ class ToolBarComponent {
1010
1383
  }
1011
1384
  });
1012
1385
  });
1013
- if (this.overflow) {
1386
+ if (this.overflowEnabled) {
1014
1387
  this.subscriptions.add(merge(this.resizeSensor.resize, this.toolsService.renderedToolsChange).subscribe(() => this.onResize()));
1015
- this.navigationService.overflowButton = this.overflowButton;
1388
+ if (this.showMenu) {
1389
+ this.navigationService.overflowButton = this.overflowButton;
1390
+ }
1016
1391
  // because of https://github.com/telerik/kendo-angular-buttons/pull/276
1017
1392
  // button icons are not rendered until onResize() is called
1018
1393
  this.zone.runOutsideAngular(() => {
@@ -1023,6 +1398,38 @@ class ToolBarComponent {
1023
1398
  });
1024
1399
  });
1025
1400
  }
1401
+ if (this.isScrollMode) {
1402
+ if (this.show) {
1403
+ if (this.normalizedOverflow.scrollButtons === 'visible' && !this.scrollService.toolsOverflow) {
1404
+ this.renderer.addClass(this.nextScrollButton.nativeElement, 'k-disabled');
1405
+ this.renderer.addClass(this.prevScrollButton.nativeElement, 'k-disabled');
1406
+ }
1407
+ else {
1408
+ const buttonToDisable = this.direction === 'rtl' ? this.nextScrollButton : this.prevScrollButton;
1409
+ this.renderer.addClass(buttonToDisable.nativeElement, 'k-disabled');
1410
+ }
1411
+ }
1412
+ if (this.hasScrollButtons.visible) {
1413
+ this.subscriptions.add(this.scrollService.scrollButtonActiveStateChange.subscribe((activeButtonSettings) => {
1414
+ if (this.show) {
1415
+ const action = activeButtonSettings.active ? 'remove' : 'add';
1416
+ const scrollButton = this[`${activeButtonSettings.buttonType}ScrollButton`].nativeElement;
1417
+ this.renderer[`${action}Class`](scrollButton, 'k-disabled');
1418
+ action === 'add' && this[`${activeButtonSettings.buttonType}ScrollButton`].nativeElement.blur();
1419
+ }
1420
+ }));
1421
+ }
1422
+ this.zone.runOutsideAngular(() => {
1423
+ this.subscriptions.add(this.renderer.listen(this.scrollContainer.nativeElement, 'scroll', (e) => {
1424
+ if (!this.hasScrollButtons.visible) {
1425
+ this.setScrollableOverlayClasses();
1426
+ }
1427
+ else {
1428
+ this.scrollService.onScroll(e);
1429
+ }
1430
+ }));
1431
+ });
1432
+ }
1026
1433
  this.navigationService.setRenderedTools(this.toolsService.renderedTools);
1027
1434
  const stylingOptions = ['size', 'fillMode'];
1028
1435
  stylingOptions.forEach(option => {
@@ -1056,6 +1463,10 @@ class ToolBarComponent {
1056
1463
  this.cancelRenderedToolsSubscription$.next();
1057
1464
  this.subscriptions.unsubscribe();
1058
1465
  }
1466
+ /**
1467
+ * @hidden
1468
+ */
1469
+ showOverflowSeparator = false;
1059
1470
  /**
1060
1471
  * @hidden
1061
1472
  */
@@ -1068,6 +1479,31 @@ class ToolBarComponent {
1068
1479
  get cdr() {
1069
1480
  return this._cdr;
1070
1481
  }
1482
+ /**
1483
+ * @hidden
1484
+ */
1485
+ get sectionSizeClass() {
1486
+ return this.size === 'none' ? '' : `k-toolbar-items-list-${SIZES[this.size]}`;
1487
+ }
1488
+ /**
1489
+ * @hidden
1490
+ */
1491
+ getScrollButtonTitle(buttonType) {
1492
+ let currentButton;
1493
+ if (this.localization.rtl) {
1494
+ currentButton = buttonType === 'prev' ? 'nextToolButton' : 'previousToolButton';
1495
+ }
1496
+ else {
1497
+ currentButton = buttonType === 'prev' ? 'previousToolButton' : 'nextToolButton';
1498
+ }
1499
+ return this.localization.get(currentButton);
1500
+ }
1501
+ /**
1502
+ * @hidden
1503
+ */
1504
+ scrollTools(dir) {
1505
+ this.scrollService.scrollTools(dir);
1506
+ }
1071
1507
  /**
1072
1508
  * @hidden
1073
1509
  */
@@ -1075,6 +1511,17 @@ class ToolBarComponent {
1075
1511
  this.navigationService.click(data);
1076
1512
  this.element.nativeElement.setAttribute('tabindex', '-1');
1077
1513
  }
1514
+ /**
1515
+ * @hidden
1516
+ */
1517
+ overflowButtonIcon(iconType) {
1518
+ if (iconType === 'svg') {
1519
+ return this.normalizedOverflow.mode === 'section' ? moreHorizontalIcon : moreVerticalIcon;
1520
+ }
1521
+ else {
1522
+ return this.normalizedOverflow.mode === 'section' ? 'more-horizontal' : 'more-vertical';
1523
+ }
1524
+ }
1078
1525
  /**
1079
1526
  * @hidden
1080
1527
  */
@@ -1093,17 +1540,30 @@ class ToolBarComponent {
1093
1540
  this.popupRef = null;
1094
1541
  }
1095
1542
  if (this.popupOpen) {
1096
- this.popupRef = this.popupService.open({
1097
- anchor: this.overflowButton,
1098
- anchorAlign: this.popupSettings.anchorAlign,
1099
- popupAlign: this.popupSettings.popupAlign,
1100
- content: this.popupTemplate,
1101
- appendTo: this.appendTo,
1102
- animate: this.popupSettings.animate,
1103
- popupClass: this.normalizePopupClasses(this.popupSettings.popupClass),
1104
- positionMode: 'absolute'
1105
- });
1106
- this.setPopupContentDimensions();
1543
+ let settings;
1544
+ const isSection = this.normalizedOverflow.mode === 'section';
1545
+ if (isSection) {
1546
+ settings = {
1547
+ anchor: this.element.nativeElement,
1548
+ content: this.popupSectionTemplate,
1549
+ popupClass: this.normalizePopupClasses(),
1550
+ positionMode: 'absolute'
1551
+ };
1552
+ }
1553
+ else {
1554
+ settings = {
1555
+ anchor: this.overflowButton,
1556
+ anchorAlign: this.popupSettings.anchorAlign,
1557
+ popupAlign: this.popupSettings.popupAlign,
1558
+ content: this.popupTemplate,
1559
+ appendTo: this.appendTo,
1560
+ animate: this.popupSettings.animate,
1561
+ popupClass: this.normalizePopupClasses(this.popupSettings.popupClass),
1562
+ positionMode: 'absolute'
1563
+ };
1564
+ }
1565
+ this.popupRef = this.popupService.open(settings);
1566
+ this.setPopupContentDimensions(isSection);
1107
1567
  this.popupSubs.add(this.popupRef.popupOpen.subscribe(this.onPopupOpen.bind(this)));
1108
1568
  this.popupSubs.add(this.popupRef.popupClose.subscribe(this.onPopupClose.bind(this)));
1109
1569
  }
@@ -1113,15 +1573,51 @@ class ToolBarComponent {
1113
1573
  */
1114
1574
  onResize() {
1115
1575
  if (isDocumentAvailable()) {
1116
- const containerWidth = innerWidth(this.element.nativeElement) - this.overflowAnchorWidth;
1117
- this.shrink(containerWidth, this.childrenWidth);
1118
- this.stretch(containerWidth, this.childrenWidth);
1119
- this.displayAnchor();
1120
- this.resizeSensor?.acceptSize();
1121
- const isImmediateResize = (Date.now() - this.overflowButtonClickedTime) < immediateResizeThreshold;
1122
- if (this.popupOpen && !isImmediateResize) {
1123
- this.toggle();
1576
+ if (this.showMenu) {
1577
+ const containerWidth = innerWidth(this.element.nativeElement) - this.overflowAnchorWidth;
1578
+ this.shrink(containerWidth, this.childrenWidth);
1579
+ this.stretch(containerWidth, this.childrenWidth);
1580
+ this.displayAnchor();
1581
+ const isImmediateResize = (Date.now() - this.overflowButtonClickedTime) < immediateResizeThreshold;
1582
+ if (this.popupOpen && !isImmediateResize) {
1583
+ this.toggle();
1584
+ }
1585
+ }
1586
+ else if (this.isScrollMode) {
1587
+ if (this.normalizedOverflow.scrollButtons === 'auto') {
1588
+ const containerWidth = innerWidth(this.element.nativeElement);
1589
+ let scrollButtonsWidth = 0;
1590
+ if (this.showAutoButtons) {
1591
+ const separatorWidth = this.scrollSeparator.nativeElement.getBoundingClientRect().width + 2 * this.gap;
1592
+ if (this.hasScrollButtons.position === 'split') {
1593
+ scrollButtonsWidth = innerWidth(this.prevScrollButton.nativeElement) + innerWidth(this.nextScrollButton.nativeElement) + 2 * separatorWidth;
1594
+ }
1595
+ else if (this.hasScrollButtons.position === 'end') {
1596
+ scrollButtonsWidth = innerWidth(this.endButtonGroup.nativeElement) + separatorWidth;
1597
+ }
1598
+ else {
1599
+ scrollButtonsWidth = innerWidth(this.startButtonGroup.nativeElement) + separatorWidth;
1600
+ }
1601
+ }
1602
+ const shouldShowButtons = (this.childrenWidth + scrollButtonsWidth) > containerWidth;
1603
+ if (shouldShowButtons !== this.showAutoButtons) {
1604
+ this.showAutoButtons = shouldShowButtons;
1605
+ this.cdr.detectChanges();
1606
+ }
1607
+ this.scrollService.toggleScrollButtonsState();
1608
+ }
1609
+ else if (!this.hasScrollButtons.visible) {
1610
+ this.setScrollableOverlayClasses();
1611
+ }
1612
+ else if (!this.scrollService.toolsOverflow) {
1613
+ this.renderer.addClass(this.nextScrollButton.nativeElement, 'k-disabled');
1614
+ this.renderer.addClass(this.prevScrollButton.nativeElement, 'k-disabled');
1615
+ }
1616
+ else {
1617
+ this.scrollService.toggleScrollButtonsState();
1618
+ }
1124
1619
  }
1620
+ this.resizeSensor?.acceptSize();
1125
1621
  }
1126
1622
  }
1127
1623
  /**
@@ -1129,45 +1625,94 @@ class ToolBarComponent {
1129
1625
  */
1130
1626
  onPopupOpen() {
1131
1627
  this.zone.runOutsideAngular(() => {
1132
- this.overflowKeydownListener = this.renderer.listen(this.popupRef.popupElement, 'keydown', (ev) => {
1133
- switch (ev.keyCode) {
1134
- case Keys.ArrowUp:
1135
- this.zone.run(() => {
1136
- ev.preventDefault();
1137
- this.navigationService.focusPrev(ev);
1138
- });
1139
- break;
1140
- case Keys.ArrowDown:
1141
- this.zone.run(() => {
1142
- ev.preventDefault();
1143
- this.navigationService.focusNext(ev);
1144
- });
1145
- break;
1146
- case Keys.Escape:
1147
- this.zone.run(() => this.toggle(false));
1148
- const eventArgs = new PreventableEvent();
1149
- this.close.emit(eventArgs);
1150
- break;
1151
- case Keys.Tab:
1152
- this.zone.run(() => {
1153
- this.toggle(false);
1154
- this.navigationService.resetNavigation();
1155
- });
1156
- break;
1157
- case Keys.Enter:
1158
- case Keys.Space:
1159
- this.zone.run(() => {
1160
- if (ev.target.closest('.k-menu-item')) {
1628
+ if (this.normalizedOverflow.mode === 'section') {
1629
+ this.sectionKeydownListener = this.renderer.listen(this.popupRef.popupElement, 'keydown', (ev) => {
1630
+ switch (ev.keyCode) {
1631
+ case Keys.ArrowLeft:
1632
+ this.zone.run(() => {
1161
1633
  ev.preventDefault();
1162
- ev.target.click();
1163
- ev.target.focus();
1164
- }
1165
- });
1166
- break;
1167
- default:
1168
- break;
1169
- }
1170
- });
1634
+ if (this.direction === 'ltr') {
1635
+ this.navigationService.focusPrev(ev);
1636
+ }
1637
+ else {
1638
+ this.navigationService.focusNext(ev);
1639
+ }
1640
+ // prevents ExpressionChangedAfterItHasBeenCheckedError when tools with popup are opened/closed asynchronously
1641
+ this.element.nativeElement.setAttribute('tabindex', '-1');
1642
+ });
1643
+ break;
1644
+ case Keys.ArrowRight:
1645
+ this.zone.run(() => {
1646
+ ev.preventDefault();
1647
+ if (this.direction === 'ltr') {
1648
+ this.navigationService.focusNext(ev);
1649
+ }
1650
+ else {
1651
+ this.navigationService.focusPrev(ev);
1652
+ }
1653
+ // prevents ExpressionChangedAfterItHasBeenCheckedError when tools with popup are opened/closed asynchronously
1654
+ this.element.nativeElement.setAttribute('tabindex', '-1');
1655
+ });
1656
+ break;
1657
+ case Keys.Escape: {
1658
+ this.zone.run(() => this.toggle(false));
1659
+ const eventArgs = new PreventableEvent();
1660
+ this.close.emit(eventArgs);
1661
+ break;
1662
+ }
1663
+ case Keys.Tab:
1664
+ this.zone.run(() => {
1665
+ this.toggle(false);
1666
+ this.navigationService.resetNavigation();
1667
+ });
1668
+ break;
1669
+ default:
1670
+ break;
1671
+ }
1672
+ });
1673
+ }
1674
+ else {
1675
+ this.overflowKeydownListener = this.renderer.listen(this.popupRef.popupElement, 'keydown', (ev) => {
1676
+ switch (ev.keyCode) {
1677
+ case Keys.ArrowUp:
1678
+ this.zone.run(() => {
1679
+ ev.preventDefault();
1680
+ this.navigationService.focusPrev(ev);
1681
+ });
1682
+ break;
1683
+ case Keys.ArrowDown:
1684
+ this.zone.run(() => {
1685
+ ev.preventDefault();
1686
+ this.navigationService.focusNext(ev);
1687
+ });
1688
+ break;
1689
+ case Keys.Escape: {
1690
+ this.zone.run(() => this.toggle(false));
1691
+ const eventArgs = new PreventableEvent();
1692
+ this.close.emit(eventArgs);
1693
+ break;
1694
+ }
1695
+ case Keys.Tab:
1696
+ this.zone.run(() => {
1697
+ this.toggle(false);
1698
+ this.navigationService.resetNavigation();
1699
+ });
1700
+ break;
1701
+ case Keys.Enter:
1702
+ case Keys.Space:
1703
+ this.zone.run(() => {
1704
+ if (ev.target.closest('.k-menu-item')) {
1705
+ ev.preventDefault();
1706
+ ev.target.click();
1707
+ ev.target.focus();
1708
+ }
1709
+ });
1710
+ break;
1711
+ default:
1712
+ break;
1713
+ }
1714
+ });
1715
+ }
1171
1716
  });
1172
1717
  this.cancelRenderedToolsSubscription$.next();
1173
1718
  this.navigationService.setRenderedTools(this.toolsService.overflowTools);
@@ -1190,6 +1735,9 @@ class ToolBarComponent {
1190
1735
  if (this.overflowKeydownListener) {
1191
1736
  this.overflowKeydownListener();
1192
1737
  }
1738
+ if (this.sectionKeydownListener) {
1739
+ this.sectionKeydownListener();
1740
+ }
1193
1741
  this.renderer.removeAttribute(this.overflowButton.nativeElement, 'aria-controls');
1194
1742
  }
1195
1743
  /**
@@ -1203,6 +1751,11 @@ class ToolBarComponent {
1203
1751
  displayAnchor() {
1204
1752
  const visibility = this.allTools.filter(t => t.overflows && t.responsive).length > 0 ? 'visible' : 'hidden';
1205
1753
  this.overflowButton && this.renderer.setStyle(this.overflowButton.nativeElement, 'visibility', visibility);
1754
+ const isVisible = visibility === 'visible';
1755
+ if (isVisible !== this.showOverflowSeparator) {
1756
+ this.showOverflowSeparator = isVisible;
1757
+ this.cdr.detectChanges();
1758
+ }
1206
1759
  }
1207
1760
  get popupWidth() {
1208
1761
  if (!this.popupSettings || !this.popupSettings.width) {
@@ -1217,7 +1770,7 @@ class ToolBarComponent {
1217
1770
  return isNaN(this.popupSettings.height) ? this.popupSettings.height : `${this.popupSettings.height}px`;
1218
1771
  }
1219
1772
  get overflowAnchorWidth() {
1220
- if (!this.overflow) {
1773
+ if (!this.showMenu) {
1221
1774
  return 0;
1222
1775
  }
1223
1776
  if (!this.cachedOverflowAnchorWidth) {
@@ -1284,7 +1837,7 @@ class ToolBarComponent {
1284
1837
  return r.tool === tool;
1285
1838
  });
1286
1839
  const width = renderedElement.width;
1287
- tool.overflows = this.overflow;
1840
+ tool.overflows = this.showMenu;
1288
1841
  this.refreshService.refresh(tool);
1289
1842
  return width;
1290
1843
  }
@@ -1306,11 +1859,17 @@ class ToolBarComponent {
1306
1859
  this.refreshService.refresh(tool);
1307
1860
  return renderedElement.width; // returns 0 if `overflows` is true
1308
1861
  }
1309
- setPopupContentDimensions() {
1862
+ setPopupContentDimensions(isSection) {
1310
1863
  const popupContentContainer = this.popupRef.popup.instance.contentContainer.nativeElement;
1311
- popupContentContainer.style.width = this.popupWidth;
1312
- popupContentContainer.style.height = this.popupHeight;
1313
- popupContentContainer.style.overflow = 'auto';
1864
+ if (isSection) {
1865
+ const toolbarWidth = this.element.nativeElement.getBoundingClientRect().width;
1866
+ popupContentContainer.style.width = `${toolbarWidth}px`;
1867
+ }
1868
+ else {
1869
+ popupContentContainer.style.width = this.popupWidth;
1870
+ popupContentContainer.style.height = this.popupHeight;
1871
+ popupContentContainer.style.overflow = 'auto';
1872
+ }
1314
1873
  }
1315
1874
  destroyPopup() {
1316
1875
  if (this.popupRef) {
@@ -1330,7 +1889,10 @@ class ToolBarComponent {
1330
1889
  }
1331
1890
  }
1332
1891
  normalizePopupClasses(classList) {
1333
- let classes = ['k-menu-popup', 'k-toolbar-popup'];
1892
+ let classes = ['k-toolbar-popup'];
1893
+ if (this.normalizedOverflow.mode === 'menu') {
1894
+ classes.push('k-menu-popup');
1895
+ }
1334
1896
  if (!classList) {
1335
1897
  return classes;
1336
1898
  }
@@ -1347,62 +1909,204 @@ class ToolBarComponent {
1347
1909
  }
1348
1910
  return classes;
1349
1911
  }
1350
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarComponent, deps: [{ token: i1.LocalizationService }, { token: i2.PopupService }, { token: RefreshService }, { token: NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: ToolbarToolsService }], target: i0.ɵɵFactoryTarget.Component });
1351
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarComponent, isStandalone: true, selector: "kendo-toolbar", inputs: { overflow: "overflow", resizable: "resizable", popupSettings: "popupSettings", fillMode: "fillMode", tabindex: "tabindex", size: "size", tabIndex: "tabIndex" }, outputs: { open: "open", close: "close" }, host: { listeners: { "focus": "onFocus($event)", "focusout": "onFocusOut($event)" }, properties: { "class.k-toolbar": "this.hostClass", "attr.role": "this.role", "attr.dir": "this.getDir", "class.k-toolbar-resizable": "this.resizableClass" } }, providers: [
1912
+ setScrollableOverlayClasses() {
1913
+ const wrapper = this.element.nativeElement;
1914
+ const container = this.scrollContainer?.nativeElement;
1915
+ if (!container) {
1916
+ return;
1917
+ }
1918
+ const scrollOffset = container.scrollLeft;
1919
+ const defaultOffset = 1;
1920
+ if (this.scrollService.toolsOverflow) {
1921
+ this.renderer.addClass(wrapper, 'k-toolbar-scrollable-overlay');
1922
+ if (scrollOffset === 0) {
1923
+ this.renderer.removeClass(wrapper, 'k-toolbar-scrollable-end');
1924
+ this.renderer.addClass(wrapper, 'k-toolbar-scrollable-start');
1925
+ }
1926
+ else if ((scrollOffset > 0 && scrollOffset < this.scrollService.scrollContainerOverflowSize - defaultOffset) || (scrollOffset < 0 && Math.abs(scrollOffset) < this.scrollService.scrollContainerOverflowSize - defaultOffset)) {
1927
+ this.renderer.removeClass(wrapper, 'k-toolbar-scrollable-end');
1928
+ this.renderer.removeClass(wrapper, 'k-toolbar-scrollable-start');
1929
+ }
1930
+ else {
1931
+ this.renderer.removeClass(wrapper, 'k-toolbar-scrollable-start');
1932
+ this.renderer.addClass(wrapper, 'k-toolbar-scrollable-end');
1933
+ }
1934
+ }
1935
+ else {
1936
+ this.renderer.removeClass(wrapper, 'k-toolbar-scrollable-overlay');
1937
+ this.renderer.removeClass(wrapper, 'k-toolbar-scrollable-end');
1938
+ this.renderer.removeClass(wrapper, 'k-toolbar-scrollable-start');
1939
+ }
1940
+ }
1941
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarComponent, deps: [{ token: i1.LocalizationService }, { token: i2.PopupService }, { token: RefreshService }, { token: NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: ToolbarToolsService }, { token: ScrollService }], target: i0.ɵɵFactoryTarget.Component });
1942
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarComponent, isStandalone: true, selector: "kendo-toolbar", inputs: { overflow: "overflow", resizable: "resizable", popupSettings: "popupSettings", fillMode: "fillMode", tabindex: "tabindex", size: "size", tabIndex: "tabIndex" }, outputs: { open: "open", close: "close" }, host: { listeners: { "focus": "onFocus($event)", "focusout": "onFocusOut($event)" }, properties: { "class.k-toolbar": "this.hostClass", "class.k-toolbar-scrollable": "this.scrollableClass", "class.k-toolbar-section": "this.sectionClass", "attr.role": "this.role", "attr.dir": "this.getDir", "class.k-toolbar-resizable": "this.resizableClass" } }, providers: [
1352
1943
  RefreshService,
1353
1944
  NavigationService,
1354
1945
  LocalizationService,
1355
1946
  ToolbarToolsService,
1947
+ ScrollService,
1356
1948
  {
1357
1949
  provide: L10N_PREFIX,
1358
1950
  useValue: 'kendo.toolbar'
1359
1951
  }
1360
- ], queries: [{ propertyName: "allTools", predicate: ToolBarToolComponent }], viewQueries: [{ propertyName: "overflowButton", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "resizeSensor", first: true, predicate: ["resizeSensor"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], exportAs: ["kendoToolBar"], usesOnChanges: true, ngImport: i0, template: `
1952
+ ], queries: [{ propertyName: "allTools", predicate: ToolBarToolComponent }], viewQueries: [{ propertyName: "overflowButton", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "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"], usesOnChanges: true, ngImport: i0, template: `
1361
1953
  <ng-container kendoToolbarLocalizedMessages
1362
- i18n-moreToolsTitle="kendo.toolbar.moreToolsTitle|The title of the **more tools** button in a responsive ToolBar"
1363
- moreToolsTitle="More tools"
1954
+ i18n-moreToolsTitle="kendo.toolbar.moreToolsTitle|The title of the **more tools** button in a responsive ToolBar"
1955
+ moreToolsTitle="More tools"
1956
+
1957
+ i18n-previousToolButton="kendo.toolbar.previousToolButton|The title for the **Previous Tool** button when the Toolbar is scrollable."
1958
+ previousToolButton="Scroll left"
1959
+
1960
+ i18n-nextToolButton="kendo.toolbar.nextToolButton|The title for the **Next Tool** button when the Toolbar is scrollable."
1961
+ nextToolButton="Scroll right"
1364
1962
  >
1365
1963
  </ng-container>
1366
- <ng-container *ngFor="let tool of allTools; let index = index"
1367
- kendoToolbarRenderer
1368
- [tool]="tool"
1369
- location="toolbar"
1370
- [resizable]="overflow"
1371
- (rendererClick)="onRendererClick($event)"
1372
- [ngTemplateOutlet]="tool.isBuiltInTool ? tool.toolbarTemplate : wrapper">
1373
- <ng-template #wrapper>
1374
- <div class="k-toolbar-item">
1375
- <ng-container [ngTemplateOutlet]="tool.toolbarTemplate"></ng-container>
1376
- </div>
1377
- </ng-template>
1964
+ <ng-container *ngIf="show && (hasScrollButtons.position === 'split' || hasScrollButtons.position === 'start')">
1965
+ <span *ngIf="hasScrollButtons.position === 'split'" #prevScrollButton
1966
+ kendoToolbarScrollableButton
1967
+ [prev]="true"
1968
+ [overflow]="normalizedOverflow"
1969
+ [title]="getScrollButtonTitle('prev')"
1970
+ class="k-toolbar-prev k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
1971
+ [ngClass]="{
1972
+ 'k-button-sm': size === 'small',
1973
+ 'k-button-md': size === 'medium' || !size,
1974
+ 'k-button-lg': size === 'large'
1975
+ }"
1976
+ (onClick)="scrollTools($event)">
1977
+ </span>
1978
+ <div class="k-button-group k-button-group-solid" *ngIf="hasScrollButtons.position === 'start'" #startButtonGroup>
1979
+ <span #prevScrollButton
1980
+ kendoToolbarScrollableButton
1981
+ [prev]="true"
1982
+ [overflow]="normalizedOverflow"
1983
+ [title]="getScrollButtonTitle('prev')"
1984
+ class="k-toolbar-prev k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
1985
+ [ngClass]="{
1986
+ 'k-button-sm': size === 'small',
1987
+ 'k-button-md': size === 'medium' || !size,
1988
+ 'k-button-lg': size === 'large'
1989
+ }"
1990
+ (onClick)="scrollTools($event)">
1991
+ </span>
1992
+ <span #nextScrollButton
1993
+ kendoToolbarScrollableButton
1994
+ [prev]="false"
1995
+ [overflow]="normalizedOverflow"
1996
+ [title]="getScrollButtonTitle('next')"
1997
+ class="k-toolbar-next k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
1998
+ [ngClass]="{
1999
+ 'k-button-sm': size === 'small',
2000
+ 'k-button-md': size === 'medium' || !size,
2001
+ 'k-button-lg': size === 'large'
2002
+ }"
2003
+ (onClick)="scrollTools($event)">
2004
+ </span>
2005
+ </div>
2006
+ <div class="k-toolbar-separator k-toolbar-button-separator k-separator" #scrollSeparator></div>
1378
2007
  </ng-container>
2008
+ <div class="k-toolbar-items k-toolbar-items-scroll" *ngIf="isScrollMode; else noScroll" #scrollContainer>
2009
+ <ng-container *ngFor="let tool of allTools; let index = index"
2010
+ kendoToolbarRenderer
2011
+ [tool]="tool"
2012
+ location="toolbar"
2013
+ [resizable]="resizable"
2014
+ (rendererClick)="onRendererClick($event)"
2015
+ [ngTemplateOutlet]="tool.isBuiltInTool ? tool.toolbarTemplate : wrapper">
2016
+ <ng-template #wrapper>
2017
+ <div class="k-toolbar-item">
2018
+ <ng-container [ngTemplateOutlet]="tool.toolbarTemplate"></ng-container>
2019
+ </div>
2020
+ </ng-template>
2021
+ </ng-container>
2022
+ </div>
2023
+ <ng-template #noScroll>
2024
+ <ng-container *ngFor="let tool of allTools; let index = index"
2025
+ kendoToolbarRenderer
2026
+ [tool]="tool"
2027
+ location="toolbar"
2028
+ [resizable]="resizable"
2029
+ (rendererClick)="onRendererClick($event)"
2030
+ [ngTemplateOutlet]="tool.isBuiltInTool ? tool.toolbarTemplate : wrapper">
2031
+ <ng-template #wrapper>
2032
+ <div class="k-toolbar-item">
2033
+ <ng-container [ngTemplateOutlet]="tool.toolbarTemplate"></ng-container>
2034
+ </div>
2035
+ </ng-template>
2036
+ </ng-container>
2037
+ </ng-template>
2038
+ <div class="k-toolbar-separator k-toolbar-button-separator k-separator" *ngIf="showOverflowSeparator"></div>
1379
2039
  <button
1380
2040
  kendoButton
1381
2041
  fillMode="flat"
1382
2042
  #overflowButton
1383
2043
  type="button"
1384
- icon="more-vertical"
1385
- [svgIcon]="moreVerticalIcon"
2044
+ [icon]="overflowButtonIcon('font')"
2045
+ [svgIcon]="overflowButtonIcon('svg')"
1386
2046
  tabindex="-1"
1387
2047
  [title]="moreToolsTitle"
1388
2048
  [attr.aria-label]="moreToolsTitle"
1389
2049
  [attr.aria-expanded]="popupOpen"
1390
2050
  [id]="overflowBtnId"
1391
- aria-haspopup="menu"
1392
- *ngIf="overflow"
2051
+ [attr.aria-haspopup]="normalizedOverflow.mode === 'section' ? null : 'menu'"
2052
+ *ngIf="showMenu"
1393
2053
  [style.visibility]="'hidden'"
1394
2054
  [style.position]="'relative'"
1395
- [style.margin-inline-start]="'auto'"
1396
2055
  class="k-toolbar-overflow-button"
1397
2056
  [ngClass]="overflowClass"
1398
2057
  (click)="showPopup()"
1399
2058
  >
1400
2059
  </button>
2060
+ <ng-container *ngIf="show && (hasScrollButtons.position === 'split' || hasScrollButtons.position === 'end')">
2061
+ <div class="k-toolbar-separator k-toolbar-button-separator k-separator"></div>
2062
+ <span *ngIf="hasScrollButtons.position === 'split'" #nextScrollButton
2063
+ kendoToolbarScrollableButton
2064
+ [prev]="false"
2065
+ [overflow]="normalizedOverflow"
2066
+ [title]="getScrollButtonTitle('next')"
2067
+ class="k-toolbar-next k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
2068
+ [ngClass]="{
2069
+ 'k-button-sm': size === 'small',
2070
+ 'k-button-md': size === 'medium' || !size,
2071
+ 'k-button-lg': size === 'large'
2072
+ }"
2073
+ (onClick)="scrollTools($event)">
2074
+ </span>
2075
+ <div class="k-button-group k-button-group-solid" *ngIf="hasScrollButtons.position === 'end'" #endButtonGroup>
2076
+ <span #prevScrollButton
2077
+ kendoToolbarScrollableButton
2078
+ [prev]="true"
2079
+ [overflow]="normalizedOverflow"
2080
+ [title]="getScrollButtonTitle('prev')"
2081
+ class="k-toolbar-prev k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
2082
+ [ngClass]="{
2083
+ 'k-button-sm': size === 'small',
2084
+ 'k-button-md': size === 'medium' || !size,
2085
+ 'k-button-lg': size === 'large'
2086
+ }"
2087
+ (onClick)="scrollTools($event)">
2088
+ </span>
2089
+ <span #nextScrollButton
2090
+ kendoToolbarScrollableButton
2091
+ [prev]="false"
2092
+ [overflow]="normalizedOverflow"
2093
+ [title]="getScrollButtonTitle('next')"
2094
+ class="k-toolbar-next k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
2095
+ [ngClass]="{
2096
+ 'k-button-sm': size === 'small',
2097
+ 'k-button-md': size === 'medium' || !size,
2098
+ 'k-button-lg': size === 'large'
2099
+ }"
2100
+ (onClick)="scrollTools($event)">
2101
+ </span>
2102
+ </div>
2103
+ </ng-container>
1401
2104
  <ng-template #popupTemplate>
1402
2105
  <div
1403
2106
  class="k-menu-group k-menu-group-md"
1404
2107
  role="menu"
1405
2108
  [id]="popupId"
2109
+ [attr.dir]="direction === 'rtl' ? 'rtl' : null"
1406
2110
  [attr.aria-labelledby]="overflowBtnId">
1407
2111
  <ng-container *ngFor="let tool of overflowTools; let index = index">
1408
2112
  <ng-template
@@ -1410,7 +2114,7 @@ class ToolBarComponent {
1410
2114
  kendoToolbarRenderer
1411
2115
  [tool]="tool"
1412
2116
  location="overflow"
1413
- [resizable]="overflow"
2117
+ [resizable]="resizable"
1414
2118
  (rendererClick)="onRendererClick($event)"
1415
2119
  [ngTemplateOutlet]="tool.isBuiltInTool ? tool.popupTemplate : popupWrapper"></ng-template>
1416
2120
  <ng-template #popupWrapper>
@@ -1421,9 +2125,29 @@ class ToolBarComponent {
1421
2125
  </ng-container>
1422
2126
  </div>
1423
2127
  </ng-template>
2128
+ <ng-template #popupSectionTemplate>
2129
+ <span class="k-toolbar-items-list k-toolbar-items-list-solid"
2130
+ [ngClass]="sectionSizeClass"
2131
+ role="toolbar"
2132
+ [id]="popupId"
2133
+ [attr.dir]="direction === 'rtl' ? 'rtl' : null"
2134
+ [attr.aria-labelledby]="overflowBtnId">
2135
+ <ng-container *ngFor="let tool of overflowTools; let index = index"
2136
+ kendoToolbarRenderer
2137
+ [tool]="tool"
2138
+ location="section"
2139
+ [resizable]="resizable"
2140
+ (rendererClick)="onRendererClick($event)"
2141
+ [ngTemplateOutlet]="tool.isBuiltInTool ? tool.sectionTemplate : wrapper">
2142
+ <ng-template #wrapper>
2143
+ <ng-container [ngTemplateOutlet]="tool.sectionTemplate"></ng-container>
2144
+ </ng-template>
2145
+ </ng-container>
2146
+ </span>
2147
+ </ng-template>
1424
2148
  <ng-container #container></ng-container>
1425
- <kendo-resize-sensor *ngIf="overflow" #resizeSensor></kendo-resize-sensor>
1426
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: LocalizedToolbarMessagesDirective, selector: "[kendoToolbarLocalizedMessages]" }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: ToolBarRendererComponent, selector: "[kendoToolbarRenderer]", inputs: ["tool", "location", "resizable"], outputs: ["rendererClick"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], 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"] }] });
2149
+ <kendo-resize-sensor *ngIf="overflowEnabled" #resizeSensor></kendo-resize-sensor>
2150
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: LocalizedToolbarMessagesDirective, selector: "[kendoToolbarLocalizedMessages]" }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: ToolBarRendererComponent, selector: "[kendoToolbarRenderer]", inputs: ["tool", "location", "resizable"], outputs: ["rendererClick"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], 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"] }] });
1427
2151
  }
1428
2152
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarComponent, decorators: [{
1429
2153
  type: Component,
@@ -1434,6 +2158,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1434
2158
  NavigationService,
1435
2159
  LocalizationService,
1436
2160
  ToolbarToolsService,
2161
+ ScrollService,
1437
2162
  {
1438
2163
  provide: L10N_PREFIX,
1439
2164
  useValue: 'kendo.toolbar'
@@ -1442,50 +2167,162 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1442
2167
  selector: 'kendo-toolbar',
1443
2168
  template: `
1444
2169
  <ng-container kendoToolbarLocalizedMessages
1445
- i18n-moreToolsTitle="kendo.toolbar.moreToolsTitle|The title of the **more tools** button in a responsive ToolBar"
1446
- moreToolsTitle="More tools"
2170
+ i18n-moreToolsTitle="kendo.toolbar.moreToolsTitle|The title of the **more tools** button in a responsive ToolBar"
2171
+ moreToolsTitle="More tools"
2172
+
2173
+ i18n-previousToolButton="kendo.toolbar.previousToolButton|The title for the **Previous Tool** button when the Toolbar is scrollable."
2174
+ previousToolButton="Scroll left"
2175
+
2176
+ i18n-nextToolButton="kendo.toolbar.nextToolButton|The title for the **Next Tool** button when the Toolbar is scrollable."
2177
+ nextToolButton="Scroll right"
1447
2178
  >
1448
2179
  </ng-container>
1449
- <ng-container *ngFor="let tool of allTools; let index = index"
1450
- kendoToolbarRenderer
1451
- [tool]="tool"
1452
- location="toolbar"
1453
- [resizable]="overflow"
1454
- (rendererClick)="onRendererClick($event)"
1455
- [ngTemplateOutlet]="tool.isBuiltInTool ? tool.toolbarTemplate : wrapper">
1456
- <ng-template #wrapper>
1457
- <div class="k-toolbar-item">
1458
- <ng-container [ngTemplateOutlet]="tool.toolbarTemplate"></ng-container>
1459
- </div>
1460
- </ng-template>
2180
+ <ng-container *ngIf="show && (hasScrollButtons.position === 'split' || hasScrollButtons.position === 'start')">
2181
+ <span *ngIf="hasScrollButtons.position === 'split'" #prevScrollButton
2182
+ kendoToolbarScrollableButton
2183
+ [prev]="true"
2184
+ [overflow]="normalizedOverflow"
2185
+ [title]="getScrollButtonTitle('prev')"
2186
+ class="k-toolbar-prev k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
2187
+ [ngClass]="{
2188
+ 'k-button-sm': size === 'small',
2189
+ 'k-button-md': size === 'medium' || !size,
2190
+ 'k-button-lg': size === 'large'
2191
+ }"
2192
+ (onClick)="scrollTools($event)">
2193
+ </span>
2194
+ <div class="k-button-group k-button-group-solid" *ngIf="hasScrollButtons.position === 'start'" #startButtonGroup>
2195
+ <span #prevScrollButton
2196
+ kendoToolbarScrollableButton
2197
+ [prev]="true"
2198
+ [overflow]="normalizedOverflow"
2199
+ [title]="getScrollButtonTitle('prev')"
2200
+ class="k-toolbar-prev k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
2201
+ [ngClass]="{
2202
+ 'k-button-sm': size === 'small',
2203
+ 'k-button-md': size === 'medium' || !size,
2204
+ 'k-button-lg': size === 'large'
2205
+ }"
2206
+ (onClick)="scrollTools($event)">
2207
+ </span>
2208
+ <span #nextScrollButton
2209
+ kendoToolbarScrollableButton
2210
+ [prev]="false"
2211
+ [overflow]="normalizedOverflow"
2212
+ [title]="getScrollButtonTitle('next')"
2213
+ class="k-toolbar-next k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
2214
+ [ngClass]="{
2215
+ 'k-button-sm': size === 'small',
2216
+ 'k-button-md': size === 'medium' || !size,
2217
+ 'k-button-lg': size === 'large'
2218
+ }"
2219
+ (onClick)="scrollTools($event)">
2220
+ </span>
2221
+ </div>
2222
+ <div class="k-toolbar-separator k-toolbar-button-separator k-separator" #scrollSeparator></div>
1461
2223
  </ng-container>
2224
+ <div class="k-toolbar-items k-toolbar-items-scroll" *ngIf="isScrollMode; else noScroll" #scrollContainer>
2225
+ <ng-container *ngFor="let tool of allTools; let index = index"
2226
+ kendoToolbarRenderer
2227
+ [tool]="tool"
2228
+ location="toolbar"
2229
+ [resizable]="resizable"
2230
+ (rendererClick)="onRendererClick($event)"
2231
+ [ngTemplateOutlet]="tool.isBuiltInTool ? tool.toolbarTemplate : wrapper">
2232
+ <ng-template #wrapper>
2233
+ <div class="k-toolbar-item">
2234
+ <ng-container [ngTemplateOutlet]="tool.toolbarTemplate"></ng-container>
2235
+ </div>
2236
+ </ng-template>
2237
+ </ng-container>
2238
+ </div>
2239
+ <ng-template #noScroll>
2240
+ <ng-container *ngFor="let tool of allTools; let index = index"
2241
+ kendoToolbarRenderer
2242
+ [tool]="tool"
2243
+ location="toolbar"
2244
+ [resizable]="resizable"
2245
+ (rendererClick)="onRendererClick($event)"
2246
+ [ngTemplateOutlet]="tool.isBuiltInTool ? tool.toolbarTemplate : wrapper">
2247
+ <ng-template #wrapper>
2248
+ <div class="k-toolbar-item">
2249
+ <ng-container [ngTemplateOutlet]="tool.toolbarTemplate"></ng-container>
2250
+ </div>
2251
+ </ng-template>
2252
+ </ng-container>
2253
+ </ng-template>
2254
+ <div class="k-toolbar-separator k-toolbar-button-separator k-separator" *ngIf="showOverflowSeparator"></div>
1462
2255
  <button
1463
2256
  kendoButton
1464
2257
  fillMode="flat"
1465
2258
  #overflowButton
1466
2259
  type="button"
1467
- icon="more-vertical"
1468
- [svgIcon]="moreVerticalIcon"
2260
+ [icon]="overflowButtonIcon('font')"
2261
+ [svgIcon]="overflowButtonIcon('svg')"
1469
2262
  tabindex="-1"
1470
2263
  [title]="moreToolsTitle"
1471
2264
  [attr.aria-label]="moreToolsTitle"
1472
2265
  [attr.aria-expanded]="popupOpen"
1473
2266
  [id]="overflowBtnId"
1474
- aria-haspopup="menu"
1475
- *ngIf="overflow"
2267
+ [attr.aria-haspopup]="normalizedOverflow.mode === 'section' ? null : 'menu'"
2268
+ *ngIf="showMenu"
1476
2269
  [style.visibility]="'hidden'"
1477
2270
  [style.position]="'relative'"
1478
- [style.margin-inline-start]="'auto'"
1479
2271
  class="k-toolbar-overflow-button"
1480
2272
  [ngClass]="overflowClass"
1481
2273
  (click)="showPopup()"
1482
2274
  >
1483
2275
  </button>
2276
+ <ng-container *ngIf="show && (hasScrollButtons.position === 'split' || hasScrollButtons.position === 'end')">
2277
+ <div class="k-toolbar-separator k-toolbar-button-separator k-separator"></div>
2278
+ <span *ngIf="hasScrollButtons.position === 'split'" #nextScrollButton
2279
+ kendoToolbarScrollableButton
2280
+ [prev]="false"
2281
+ [overflow]="normalizedOverflow"
2282
+ [title]="getScrollButtonTitle('next')"
2283
+ class="k-toolbar-next k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
2284
+ [ngClass]="{
2285
+ 'k-button-sm': size === 'small',
2286
+ 'k-button-md': size === 'medium' || !size,
2287
+ 'k-button-lg': size === 'large'
2288
+ }"
2289
+ (onClick)="scrollTools($event)">
2290
+ </span>
2291
+ <div class="k-button-group k-button-group-solid" *ngIf="hasScrollButtons.position === 'end'" #endButtonGroup>
2292
+ <span #prevScrollButton
2293
+ kendoToolbarScrollableButton
2294
+ [prev]="true"
2295
+ [overflow]="normalizedOverflow"
2296
+ [title]="getScrollButtonTitle('prev')"
2297
+ class="k-toolbar-prev k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
2298
+ [ngClass]="{
2299
+ 'k-button-sm': size === 'small',
2300
+ 'k-button-md': size === 'medium' || !size,
2301
+ 'k-button-lg': size === 'large'
2302
+ }"
2303
+ (onClick)="scrollTools($event)">
2304
+ </span>
2305
+ <span #nextScrollButton
2306
+ kendoToolbarScrollableButton
2307
+ [prev]="false"
2308
+ [overflow]="normalizedOverflow"
2309
+ [title]="getScrollButtonTitle('next')"
2310
+ class="k-toolbar-next k-icon-button k-button k-button-solid k-button-solid-base k-rounded-md"
2311
+ [ngClass]="{
2312
+ 'k-button-sm': size === 'small',
2313
+ 'k-button-md': size === 'medium' || !size,
2314
+ 'k-button-lg': size === 'large'
2315
+ }"
2316
+ (onClick)="scrollTools($event)">
2317
+ </span>
2318
+ </div>
2319
+ </ng-container>
1484
2320
  <ng-template #popupTemplate>
1485
2321
  <div
1486
2322
  class="k-menu-group k-menu-group-md"
1487
2323
  role="menu"
1488
2324
  [id]="popupId"
2325
+ [attr.dir]="direction === 'rtl' ? 'rtl' : null"
1489
2326
  [attr.aria-labelledby]="overflowBtnId">
1490
2327
  <ng-container *ngFor="let tool of overflowTools; let index = index">
1491
2328
  <ng-template
@@ -1493,7 +2330,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1493
2330
  kendoToolbarRenderer
1494
2331
  [tool]="tool"
1495
2332
  location="overflow"
1496
- [resizable]="overflow"
2333
+ [resizable]="resizable"
1497
2334
  (rendererClick)="onRendererClick($event)"
1498
2335
  [ngTemplateOutlet]="tool.isBuiltInTool ? tool.popupTemplate : popupWrapper"></ng-template>
1499
2336
  <ng-template #popupWrapper>
@@ -1504,13 +2341,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1504
2341
  </ng-container>
1505
2342
  </div>
1506
2343
  </ng-template>
2344
+ <ng-template #popupSectionTemplate>
2345
+ <span class="k-toolbar-items-list k-toolbar-items-list-solid"
2346
+ [ngClass]="sectionSizeClass"
2347
+ role="toolbar"
2348
+ [id]="popupId"
2349
+ [attr.dir]="direction === 'rtl' ? 'rtl' : null"
2350
+ [attr.aria-labelledby]="overflowBtnId">
2351
+ <ng-container *ngFor="let tool of overflowTools; let index = index"
2352
+ kendoToolbarRenderer
2353
+ [tool]="tool"
2354
+ location="section"
2355
+ [resizable]="resizable"
2356
+ (rendererClick)="onRendererClick($event)"
2357
+ [ngTemplateOutlet]="tool.isBuiltInTool ? tool.sectionTemplate : wrapper">
2358
+ <ng-template #wrapper>
2359
+ <ng-container [ngTemplateOutlet]="tool.sectionTemplate"></ng-container>
2360
+ </ng-template>
2361
+ </ng-container>
2362
+ </span>
2363
+ </ng-template>
1507
2364
  <ng-container #container></ng-container>
1508
- <kendo-resize-sensor *ngIf="overflow" #resizeSensor></kendo-resize-sensor>
2365
+ <kendo-resize-sensor *ngIf="overflowEnabled" #resizeSensor></kendo-resize-sensor>
1509
2366
  `,
1510
2367
  standalone: true,
1511
- imports: [NgTemplateOutlet, LocalizedToolbarMessagesDirective, NgFor, ToolBarRendererComponent, NgIf, ButtonComponent, NgClass, ResizeSensorComponent]
2368
+ imports: [NgTemplateOutlet, LocalizedToolbarMessagesDirective, NgFor, ToolBarRendererComponent, NgIf, ButtonComponent, NgClass, ResizeSensorComponent, ButtonGroupComponent, ToolbarScrollableButtonComponent]
1512
2369
  }]
1513
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2.PopupService }, { type: RefreshService }, { type: NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: ToolbarToolsService }]; }, propDecorators: { overflow: [{
2370
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2.PopupService }, { type: RefreshService }, { type: NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: ToolbarToolsService }, { type: ScrollService }]; }, propDecorators: { overflow: [{
1514
2371
  type: Input
1515
2372
  }], resizable: [{
1516
2373
  type: Input
@@ -1538,15 +2395,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1538
2395
  }], popupTemplate: [{
1539
2396
  type: ViewChild,
1540
2397
  args: ['popupTemplate', { static: true }]
2398
+ }], popupSectionTemplate: [{
2399
+ type: ViewChild,
2400
+ args: ['popupSectionTemplate', { static: true }]
2401
+ }], scrollContainer: [{
2402
+ type: ViewChild,
2403
+ args: ['scrollContainer', { read: ElementRef, static: false }]
1541
2404
  }], resizeSensor: [{
1542
2405
  type: ViewChild,
1543
2406
  args: ['resizeSensor', { static: false }]
1544
2407
  }], container: [{
1545
2408
  type: ViewChild,
1546
2409
  args: ['container', { read: ViewContainerRef, static: true }]
2410
+ }], prevScrollButton: [{
2411
+ type: ViewChild,
2412
+ args: ['prevScrollButton', { read: ElementRef }]
2413
+ }], nextScrollButton: [{
2414
+ type: ViewChild,
2415
+ args: ['nextScrollButton', { read: ElementRef }]
2416
+ }], startButtonGroup: [{
2417
+ type: ViewChild,
2418
+ args: ['startButtonGroup', { read: ElementRef }]
2419
+ }], endButtonGroup: [{
2420
+ type: ViewChild,
2421
+ args: ['endButtonGroup', { read: ElementRef }]
2422
+ }], scrollSeparator: [{
2423
+ type: ViewChild,
2424
+ args: ['scrollSeparator', { read: ElementRef }]
1547
2425
  }], hostClass: [{
1548
2426
  type: HostBinding,
1549
2427
  args: ['class.k-toolbar']
2428
+ }], scrollableClass: [{
2429
+ type: HostBinding,
2430
+ args: ['class.k-toolbar-scrollable']
2431
+ }], sectionClass: [{
2432
+ type: HostBinding,
2433
+ args: ['class.k-toolbar-section']
1550
2434
  }], onFocus: [{
1551
2435
  type: HostListener,
1552
2436
  args: ['focus', ['$event']]
@@ -1739,6 +2623,7 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
1739
2623
  imageUrl: ''
1740
2624
  };
1741
2625
  toolbarButtonElement;
2626
+ sectionButtonElement;
1742
2627
  overflowButtonElement;
1743
2628
  _showText = 'both';
1744
2629
  _text;
@@ -1798,7 +2683,7 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
1798
2683
  this.selectedChange.emit(state);
1799
2684
  }
1800
2685
  getButton() {
1801
- return (this.overflowButtonElement || this.toolbarButtonElement).nativeElement;
2686
+ return this[`${this.location}ButtonElement`]?.nativeElement;
1802
2687
  }
1803
2688
  setTextDisplayMode() {
1804
2689
  this.toolbarOptions.text = this.showText === 'overflow' ? undefined : this.text;
@@ -1807,7 +2692,7 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
1807
2692
  });
1808
2693
  }
1809
2694
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
1810
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarButtonComponent, isStandalone: true, selector: "kendo-toolbar-button", inputs: { showText: "showText", showIcon: "showIcon", text: "text", style: "style", className: "className", title: "title", disabled: "disabled", toggleable: "toggleable", look: "look", togglable: "togglable", selected: "selected", fillMode: "fillMode", themeColor: "themeColor", icon: "icon", iconClass: "iconClass", svgIcon: "svgIcon", imageUrl: "imageUrl" }, outputs: { click: "click", pointerdown: "pointerdown", selectedChange: "selectedChange" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent) }], viewQueries: [{ propertyName: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, ngImport: i0, template: `
2695
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarButtonComponent, isStandalone: true, selector: "kendo-toolbar-button", inputs: { showText: "showText", showIcon: "showIcon", text: "text", style: "style", className: "className", title: "title", disabled: "disabled", toggleable: "toggleable", look: "look", togglable: "togglable", selected: "selected", fillMode: "fillMode", themeColor: "themeColor", icon: "icon", iconClass: "iconClass", svgIcon: "svgIcon", imageUrl: "imageUrl" }, outputs: { click: "click", pointerdown: "pointerdown", selectedChange: "selectedChange" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent) }], viewQueries: [{ propertyName: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "sectionButtonElement", first: true, predicate: ["sectionButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, ngImport: i0, template: `
1811
2696
  <ng-template #toolbarTemplate>
1812
2697
  <button
1813
2698
  #toolbarButton
@@ -1860,6 +2745,34 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
1860
2745
  </span>
1861
2746
  </div>
1862
2747
  </ng-template>
2748
+ <ng-template #sectionTemplate>
2749
+ <button
2750
+ #sectionButton
2751
+ [class.k-toolbar-button]="!toggleable"
2752
+ [class.k-toolbar-toggle-button]="toggleable"
2753
+ [tabindex]="tabIndex"
2754
+ type="button"
2755
+ kendoButton
2756
+ [ngStyle]="style"
2757
+ [ngClass]="className"
2758
+ [attr.title]="title"
2759
+ [disabled]="disabled"
2760
+ [toggleable]="toggleable"
2761
+ [fillMode]="fillMode"
2762
+ [themeColor]="fillMode ? themeColor : null"
2763
+ [selected]="selected"
2764
+ [icon]="toolbarOptions.icon"
2765
+ [iconClass]="toolbarOptions.iconClass"
2766
+ [svgIcon]="toolbarOptions.svgIcon"
2767
+ [imageUrl]="toolbarOptions.imageUrl"
2768
+ (click)="click.emit($event)"
2769
+ (pointerdown)="pointerdown.emit($event)"
2770
+ (selectedChange)="selectedChangeHandler($event)"
2771
+ (blur)="onBlur()"
2772
+ >
2773
+ {{ toolbarOptions.text }}
2774
+ </button>
2775
+ </ng-template>
1863
2776
  `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
1864
2777
  }
1865
2778
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonComponent, decorators: [{
@@ -1921,6 +2834,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1921
2834
  </span>
1922
2835
  </div>
1923
2836
  </ng-template>
2837
+ <ng-template #sectionTemplate>
2838
+ <button
2839
+ #sectionButton
2840
+ [class.k-toolbar-button]="!toggleable"
2841
+ [class.k-toolbar-toggle-button]="toggleable"
2842
+ [tabindex]="tabIndex"
2843
+ type="button"
2844
+ kendoButton
2845
+ [ngStyle]="style"
2846
+ [ngClass]="className"
2847
+ [attr.title]="title"
2848
+ [disabled]="disabled"
2849
+ [toggleable]="toggleable"
2850
+ [fillMode]="fillMode"
2851
+ [themeColor]="fillMode ? themeColor : null"
2852
+ [selected]="selected"
2853
+ [icon]="toolbarOptions.icon"
2854
+ [iconClass]="toolbarOptions.iconClass"
2855
+ [svgIcon]="toolbarOptions.svgIcon"
2856
+ [imageUrl]="toolbarOptions.imageUrl"
2857
+ (click)="click.emit($event)"
2858
+ (pointerdown)="pointerdown.emit($event)"
2859
+ (selectedChange)="selectedChangeHandler($event)"
2860
+ (blur)="onBlur()"
2861
+ >
2862
+ {{ toolbarOptions.text }}
2863
+ </button>
2864
+ </ng-template>
1924
2865
  `,
1925
2866
  standalone: true,
1926
2867
  imports: [ButtonComponent, NgStyle, NgClass, NgIf, IconWrapperComponent]
@@ -1968,6 +2909,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1968
2909
  }], toolbarButtonElement: [{
1969
2910
  type: ViewChild,
1970
2911
  args: ['toolbarButton', { read: ElementRef }]
2912
+ }], sectionButtonElement: [{
2913
+ type: ViewChild,
2914
+ args: ['sectionButton', { read: ElementRef }]
1971
2915
  }], overflowButtonElement: [{
1972
2916
  type: ViewChild,
1973
2917
  args: ['overflowButton', { read: ElementRef }]
@@ -2013,12 +2957,18 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
2013
2957
  }
2014
2958
  }
2015
2959
  toolbarButtonGroup;
2960
+ sectionButtonGroup;
2016
2961
  overflowListItems;
2017
2962
  buttonComponents;
2018
2963
  get buttonElements() {
2019
- if (this.overflows) {
2964
+ if (this.overflows && this.location === 'overflow') {
2020
2965
  return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))].map(el => el.nativeElement);
2021
2966
  }
2967
+ else if (this.overflows && this.location === 'section') {
2968
+ return this.sectionButtonGroup
2969
+ .buttons.filter(b => !b.isDisabled)
2970
+ .map(b => b.element);
2971
+ }
2022
2972
  else {
2023
2973
  return this.toolbarButtonGroup
2024
2974
  .buttons.filter(b => !b.isDisabled)
@@ -2086,8 +3036,8 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
2086
3036
  * @hidden
2087
3037
  */
2088
3038
  focus(ev = {}) {
2089
- const nextKey = this.getNextKey(this.overflows);
2090
- const prevKey = this.getPrevKey(this.overflows);
3039
+ const nextKey = this.getNextKey((this.overflows && this.location === 'overflow'));
3040
+ const prevKey = this.getPrevKey((this.overflows && this.location === 'overflow'));
2091
3041
  this.focusedIndex = getIndexOfFocused(prevKey, nextKey, this.buttonElements)(ev);
2092
3042
  this.focusButton(this.focusedIndex, ev);
2093
3043
  }
@@ -2095,8 +3045,8 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
2095
3045
  * @hidden
2096
3046
  */
2097
3047
  handleKey(ev) {
2098
- const nextKey = this.getNextKey(this.overflows);
2099
- const prevKey = this.getPrevKey(this.overflows);
3048
+ const nextKey = this.getNextKey((this.overflows && this.location === 'overflow'));
3049
+ const prevKey = this.getPrevKey((this.overflows && this.location === 'overflow'));
2100
3050
  const peekAtIndex = makePeeker(this.buttonElements);
2101
3051
  const isUnmodified = areEqual(this.focusedIndex);
2102
3052
  this.focusedIndex = seekFocusedIndex(prevKey, nextKey, peekAtIndex)(this.focusedIndex, ev);
@@ -2132,7 +3082,7 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
2132
3082
  }
2133
3083
  }
2134
3084
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
2135
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarButtonGroupComponent, isStandalone: true, selector: "kendo-toolbar-buttongroup", inputs: { disabled: "disabled", fillMode: "fillMode", selection: "selection", width: "width", look: "look" }, providers: [LocalizationService, { provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonGroupComponent) }], queries: [{ propertyName: "buttonComponents", predicate: i0.forwardRef(function () { return ToolBarButtonComponent; }) }], viewQueries: [{ propertyName: "toolbarButtonGroup", first: true, predicate: ["toolbarButtonGroup"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarButtonGroup"], usesInheritance: true, ngImport: i0, template: `
3085
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarButtonGroupComponent, isStandalone: true, selector: "kendo-toolbar-buttongroup", inputs: { disabled: "disabled", fillMode: "fillMode", selection: "selection", width: "width", look: "look" }, providers: [LocalizationService, { provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonGroupComponent) }], queries: [{ propertyName: "buttonComponents", predicate: i0.forwardRef(function () { return ToolBarButtonComponent; }) }], viewQueries: [{ propertyName: "toolbarButtonGroup", first: true, predicate: ["toolbarButtonGroup"], descendants: true }, { propertyName: "sectionButtonGroup", first: true, predicate: ["sectionButtonGroup"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarButtonGroup"], usesInheritance: true, ngImport: i0, template: `
2136
3086
  <ng-template #toolbarTemplate>
2137
3087
  <kendo-buttongroup
2138
3088
  class="k-toolbar-button-group k-button-group-{{fillMode}}"
@@ -2194,6 +3144,42 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
2194
3144
  </span>
2195
3145
  </div>
2196
3146
  </ng-template>
3147
+ <ng-template #sectionTemplate>
3148
+ <kendo-buttongroup
3149
+ class="k-toolbar-button-group k-button-group-{{fillMode}}"
3150
+ #sectionButtonGroup
3151
+ [tabIndex]="-1"
3152
+ [selection]="selection"
3153
+ [disabled]="disabled"
3154
+ [width]="width"
3155
+ (navigate)="onNavigate($event)"
3156
+ (focus)="onFocus()"
3157
+ >
3158
+ <button
3159
+ kendoButton
3160
+ type="button"
3161
+ *ngFor="let button of buttonComponents"
3162
+ [ngStyle]="button.style"
3163
+ [ngClass]="button.className"
3164
+ [attr.title]="button.title"
3165
+ [disabled]="button.disabled"
3166
+ [togglable]="button.togglable"
3167
+ [selected]="button.selected"
3168
+ [attr.aria-pressed]="button.selected ? true : false"
3169
+ [fillMode]="button.fillMode"
3170
+ [themeColor]="button.fillMode ? button.themeColor : null"
3171
+ [icon]="button.toolbarOptions.icon"
3172
+ [iconClass]="button.toolbarOptions.iconClass"
3173
+ [svgIcon]="button.toolbarOptions.svgIcon"
3174
+ [imageUrl]="button.toolbarOptions.imageUrl"
3175
+ (click)="button.click.emit($event); onButtonClick($event)"
3176
+ (pointerdown)="button.pointerdown.emit($event)"
3177
+ (selectedChange)="selectedChangeHandler($event, button)"
3178
+ >
3179
+ {{ button.toolbarOptions.text }}
3180
+ </button>
3181
+ </kendo-buttongroup>
3182
+ </ng-template>
2197
3183
  `, isInline: true, dependencies: [{ kind: "component", type: ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
2198
3184
  }
2199
3185
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonGroupComponent, decorators: [{
@@ -2264,6 +3250,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2264
3250
  </span>
2265
3251
  </div>
2266
3252
  </ng-template>
3253
+ <ng-template #sectionTemplate>
3254
+ <kendo-buttongroup
3255
+ class="k-toolbar-button-group k-button-group-{{fillMode}}"
3256
+ #sectionButtonGroup
3257
+ [tabIndex]="-1"
3258
+ [selection]="selection"
3259
+ [disabled]="disabled"
3260
+ [width]="width"
3261
+ (navigate)="onNavigate($event)"
3262
+ (focus)="onFocus()"
3263
+ >
3264
+ <button
3265
+ kendoButton
3266
+ type="button"
3267
+ *ngFor="let button of buttonComponents"
3268
+ [ngStyle]="button.style"
3269
+ [ngClass]="button.className"
3270
+ [attr.title]="button.title"
3271
+ [disabled]="button.disabled"
3272
+ [togglable]="button.togglable"
3273
+ [selected]="button.selected"
3274
+ [attr.aria-pressed]="button.selected ? true : false"
3275
+ [fillMode]="button.fillMode"
3276
+ [themeColor]="button.fillMode ? button.themeColor : null"
3277
+ [icon]="button.toolbarOptions.icon"
3278
+ [iconClass]="button.toolbarOptions.iconClass"
3279
+ [svgIcon]="button.toolbarOptions.svgIcon"
3280
+ [imageUrl]="button.toolbarOptions.imageUrl"
3281
+ (click)="button.click.emit($event); onButtonClick($event)"
3282
+ (pointerdown)="button.pointerdown.emit($event)"
3283
+ (selectedChange)="selectedChangeHandler($event, button)"
3284
+ >
3285
+ {{ button.toolbarOptions.text }}
3286
+ </button>
3287
+ </kendo-buttongroup>
3288
+ </ng-template>
2267
3289
  `,
2268
3290
  standalone: true,
2269
3291
  imports: [ButtonGroupComponent, NgFor, ButtonComponent, NgStyle, NgClass, NgIf, IconWrapperComponent]
@@ -2281,6 +3303,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2281
3303
  }], toolbarButtonGroup: [{
2282
3304
  type: ViewChild,
2283
3305
  args: ['toolbarButtonGroup', { static: false }]
3306
+ }], sectionButtonGroup: [{
3307
+ type: ViewChild,
3308
+ args: ['sectionButtonGroup', { static: false }]
2284
3309
  }], overflowListItems: [{
2285
3310
  type: ViewChildren,
2286
3311
  args: ['listItem']
@@ -2471,7 +3496,8 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
2471
3496
  */
2472
3497
  close = new EventEmitter();
2473
3498
  dropdownButton;
2474
- dropDownButtonComponent;
3499
+ toolbarDropDownButton;
3500
+ sectionDropDownButton;
2475
3501
  overflowListItems;
2476
3502
  toolbarOptions = {
2477
3503
  text: '',
@@ -2509,7 +3535,9 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
2509
3535
  this.setTextDisplayMode();
2510
3536
  }
2511
3537
  ngAfterViewInit() {
2512
- this.zone.onStable.pipe(take(1)).subscribe(() => (this.renderer.addClass(this.dropDownButtonComponent.button.nativeElement, 'k-toolbar-menu-button')));
3538
+ this.zone.onStable.pipe(take(1)).subscribe(() => {
3539
+ this.renderer.addClass(this[`${this.location}DropDownButton`].button.nativeElement, 'k-toolbar-menu-button');
3540
+ });
2513
3541
  }
2514
3542
  /**
2515
3543
  * @hidden
@@ -2529,9 +3557,9 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
2529
3557
  * @hidden
2530
3558
  */
2531
3559
  focus(ev = {}) {
2532
- if (!this.overflows) {
2533
- if (ev.type === 'focus' || ev.type === 'keydown') {
2534
- this.dropDownButtonComponent?.focus();
3560
+ if (!this.overflows || this.location === 'section') {
3561
+ if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
3562
+ this[`${this.location}DropDownButton`]?.focus();
2535
3563
  }
2536
3564
  }
2537
3565
  else if (this.overflowButtons.length > 0) {
@@ -2546,7 +3574,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
2546
3574
  if (!this.overflows && (ev.keyCode === this.getPrevKey(this.overflows) || ev.keyCode === this.getNextKey(this.overflows))) {
2547
3575
  return false;
2548
3576
  }
2549
- if (this.overflows) {
3577
+ if (this.overflows && this.location !== 'section') {
2550
3578
  const peekAtIndex = makePeeker(this.overflowButtons);
2551
3579
  const isUnmodified = areEqual(this.focusedIndex);
2552
3580
  this.focusedIndex = seekFocusedIndex(this.getPrevKey(), this.getNextKey(), peekAtIndex)(this.focusedIndex, ev);
@@ -2584,9 +3612,9 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
2584
3612
  this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
2585
3613
  }
2586
3614
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
2587
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarDropDownButtonComponent, isStandalone: true, selector: "kendo-toolbar-dropdownbutton", inputs: { arrowIcon: "arrowIcon", title: "title", showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", popupSettings: "popupSettings", look: "look", primary: "primary", fillMode: "fillMode", themeColor: "themeColor", buttonClass: "buttonClass", textField: "textField", disabled: "disabled", data: "data" }, outputs: { itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarDropDownButtonComponent) }], viewQueries: [{ propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "dropDownButtonComponent", first: true, predicate: DropDownButtonComponent, descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarDropDownButton"], usesInheritance: true, ngImport: i0, template: `
3615
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarDropDownButtonComponent, isStandalone: true, selector: "kendo-toolbar-dropdownbutton", inputs: { arrowIcon: "arrowIcon", title: "title", showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", popupSettings: "popupSettings", look: "look", primary: "primary", fillMode: "fillMode", themeColor: "themeColor", buttonClass: "buttonClass", textField: "textField", disabled: "disabled", data: "data" }, outputs: { itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarDropDownButtonComponent) }], viewQueries: [{ propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "toolbarDropDownButton", first: true, predicate: ["toolbarDropDownButton"], descendants: true }, { propertyName: "sectionDropDownButton", first: true, predicate: ["sectionDropDownButton"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarDropDownButton"], usesInheritance: true, ngImport: i0, template: `
2588
3616
  <ng-template #toolbarTemplate>
2589
- <kendo-dropdownbutton
3617
+ <kendo-dropdownbutton #toolbarDropDownButton
2590
3618
  [icon]="toolbarOptions.icon"
2591
3619
  [iconClass]="toolbarOptions.iconClass"
2592
3620
  [svgIcon]="toolbarOptions.svgIcon"
@@ -2608,6 +3636,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
2608
3636
  {{ toolbarOptions.text }}
2609
3637
  </kendo-dropdownbutton>
2610
3638
  </ng-template>
3639
+
2611
3640
  <ng-template #popupTemplate>
2612
3641
  <div
2613
3642
  tabindex="-1"
@@ -2648,6 +3677,30 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
2648
3677
  </div>
2649
3678
  </ng-container>
2650
3679
  </ng-template>
3680
+
3681
+ <ng-template #sectionTemplate>
3682
+ <kendo-dropdownbutton #sectionDropDownButton
3683
+ [icon]="toolbarOptions.icon"
3684
+ [iconClass]="toolbarOptions.iconClass"
3685
+ [svgIcon]="toolbarOptions.svgIcon"
3686
+ [imageUrl]="toolbarOptions.imageUrl"
3687
+ [arrowIcon]="arrowIcon"
3688
+ [buttonClass]="buttonClass"
3689
+ [disabled]="disabled"
3690
+ [tabIndex]="-1"
3691
+ [data]="data"
3692
+ [buttonAttributes]="{'title': title}"
3693
+ [textField]="textField"
3694
+ [popupSettings]="popupSettings"
3695
+ [fillMode]="fillMode"
3696
+ [themeColor]="fillMode ? themeColor : null"
3697
+ (open)="open.emit($event)"
3698
+ (close)="close.emit($event)"
3699
+ (itemClick)="itemClick.emit($event)"
3700
+ >
3701
+ {{ toolbarOptions.text }}
3702
+ </kendo-dropdownbutton>
3703
+ </ng-template>
2651
3704
  `, 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: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
2652
3705
  }
2653
3706
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarDropDownButtonComponent, decorators: [{
@@ -2658,7 +3711,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2658
3711
  selector: 'kendo-toolbar-dropdownbutton',
2659
3712
  template: `
2660
3713
  <ng-template #toolbarTemplate>
2661
- <kendo-dropdownbutton
3714
+ <kendo-dropdownbutton #toolbarDropDownButton
2662
3715
  [icon]="toolbarOptions.icon"
2663
3716
  [iconClass]="toolbarOptions.iconClass"
2664
3717
  [svgIcon]="toolbarOptions.svgIcon"
@@ -2680,6 +3733,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2680
3733
  {{ toolbarOptions.text }}
2681
3734
  </kendo-dropdownbutton>
2682
3735
  </ng-template>
3736
+
2683
3737
  <ng-template #popupTemplate>
2684
3738
  <div
2685
3739
  tabindex="-1"
@@ -2720,6 +3774,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2720
3774
  </div>
2721
3775
  </ng-container>
2722
3776
  </ng-template>
3777
+
3778
+ <ng-template #sectionTemplate>
3779
+ <kendo-dropdownbutton #sectionDropDownButton
3780
+ [icon]="toolbarOptions.icon"
3781
+ [iconClass]="toolbarOptions.iconClass"
3782
+ [svgIcon]="toolbarOptions.svgIcon"
3783
+ [imageUrl]="toolbarOptions.imageUrl"
3784
+ [arrowIcon]="arrowIcon"
3785
+ [buttonClass]="buttonClass"
3786
+ [disabled]="disabled"
3787
+ [tabIndex]="-1"
3788
+ [data]="data"
3789
+ [buttonAttributes]="{'title': title}"
3790
+ [textField]="textField"
3791
+ [popupSettings]="popupSettings"
3792
+ [fillMode]="fillMode"
3793
+ [themeColor]="fillMode ? themeColor : null"
3794
+ (open)="open.emit($event)"
3795
+ (close)="close.emit($event)"
3796
+ (itemClick)="itemClick.emit($event)"
3797
+ >
3798
+ {{ toolbarOptions.text }}
3799
+ </kendo-dropdownbutton>
3800
+ </ng-template>
2723
3801
  `,
2724
3802
  standalone: true,
2725
3803
  imports: [DropDownButtonComponent, NgClass, NgIf, IconWrapperComponent, NgFor]
@@ -2769,9 +3847,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2769
3847
  }], dropdownButton: [{
2770
3848
  type: ViewChild,
2771
3849
  args: ['dropdownButton', { read: ElementRef, static: true }]
2772
- }], dropDownButtonComponent: [{
3850
+ }], toolbarDropDownButton: [{
2773
3851
  type: ViewChild,
2774
- args: [DropDownButtonComponent, { static: false }]
3852
+ args: ['toolbarDropDownButton', { static: false }]
3853
+ }], sectionDropDownButton: [{
3854
+ type: ViewChild,
3855
+ args: ['sectionDropDownButton', { static: false }]
2775
3856
  }], overflowListItems: [{
2776
3857
  type: ViewChildren,
2777
3858
  args: ['listItem']
@@ -2987,6 +4068,7 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
2987
4068
  getNextKey;
2988
4069
  getPrevKey;
2989
4070
  toolbarSplitButton;
4071
+ sectionSplitButton;
2990
4072
  overflowMainButton;
2991
4073
  overflowListItems;
2992
4074
  constructor() {
@@ -3018,9 +4100,9 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
3018
4100
  * @hidden
3019
4101
  */
3020
4102
  focus(ev = {}) {
3021
- if (!this.overflows) {
3022
- if (ev.type === 'focus' || ev.type === 'keydown') {
3023
- this.toolbarSplitButton.focus();
4103
+ if (!this.overflows || this.location === 'section') {
4104
+ if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
4105
+ this[`${this.location}SplitButton`].focus();
3024
4106
  }
3025
4107
  }
3026
4108
  else if (this.overflowButtons.length > 0) {
@@ -3064,7 +4146,7 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
3064
4146
  this.itemClick.emit(dataItem);
3065
4147
  }
3066
4148
  focusButton(index, ev) {
3067
- if (!ev.type || ev.type === 'focus' || ev.type === 'keydown' || ev.type === 'click') {
4149
+ if ((!ev.type || ev.type === 'focus' || ev.type === 'keydown' || ev.type === 'click') && this.location !== 'section') {
3068
4150
  this.overflowButtons[index].nativeElement.focus();
3069
4151
  }
3070
4152
  }
@@ -3073,7 +4155,7 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
3073
4155
  this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
3074
4156
  }
3075
4157
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarSplitButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3076
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarSplitButtonComponent, isStandalone: true, selector: "kendo-toolbar-splitbutton", inputs: { showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", popupSettings: "popupSettings", fillMode: "fillMode", themeColor: "themeColor", look: "look", buttonClass: "buttonClass", arrowButtonClass: "arrowButtonClass", arrowButtonIcon: "arrowButtonIcon", arrowButtonSvgIcon: "arrowButtonSvgIcon", textField: "textField", data: "data" }, outputs: { buttonClick: "buttonClick", itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarSplitButtonComponent) }], viewQueries: [{ propertyName: "toolbarSplitButton", first: true, predicate: ["toolbarSplitButton"], descendants: true }, { propertyName: "overflowMainButton", first: true, predicate: ["overflowMainButton"], descendants: true, read: ElementRef }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarSplitButton"], usesInheritance: true, ngImport: i0, template: `
4158
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarSplitButtonComponent, isStandalone: true, selector: "kendo-toolbar-splitbutton", inputs: { showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", popupSettings: "popupSettings", fillMode: "fillMode", themeColor: "themeColor", look: "look", buttonClass: "buttonClass", arrowButtonClass: "arrowButtonClass", arrowButtonIcon: "arrowButtonIcon", arrowButtonSvgIcon: "arrowButtonSvgIcon", textField: "textField", data: "data" }, outputs: { buttonClick: "buttonClick", itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarSplitButtonComponent) }], viewQueries: [{ propertyName: "toolbarSplitButton", first: true, predicate: ["toolbarSplitButton"], descendants: true }, { propertyName: "sectionSplitButton", first: true, predicate: ["sectionSplitButton"], descendants: true }, { propertyName: "overflowMainButton", first: true, predicate: ["overflowMainButton"], descendants: true, read: ElementRef }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarSplitButton"], usesInheritance: true, ngImport: i0, template: `
3077
4159
  <ng-template #toolbarTemplate>
3078
4160
  <kendo-splitbutton
3079
4161
  #toolbarSplitButton
@@ -3143,6 +4225,32 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
3143
4225
  </div>
3144
4226
  </ng-container>
3145
4227
  </ng-template>
4228
+ <ng-template #sectionTemplate>
4229
+ <kendo-splitbutton
4230
+ #sectionSplitButton
4231
+ class="k-toolbar-split-button"
4232
+ [data]="data"
4233
+ [text]="toolbarOptions.text"
4234
+ [icon]="toolbarOptions.icon"
4235
+ [iconClass]="toolbarOptions.iconClass"
4236
+ [svgIcon]="toolbarOptions.svgIcon"
4237
+ [imageUrl]="toolbarOptions.imageUrl"
4238
+ [buttonClass]="buttonClass"
4239
+ [arrowButtonClass]="arrowButtonClass"
4240
+ [arrowButtonIcon]="arrowButtonIcon"
4241
+ [arrowButtonSvgIcon]="arrowButtonSvgIcon"
4242
+ [disabled]="disabled"
4243
+ [tabIndex]="-1"
4244
+ [textField]="textField"
4245
+ [popupSettings]="popupSettings"
4246
+ [fillMode]="fillMode"
4247
+ [themeColor]="fillMode ? themeColor : null"
4248
+ (buttonClick)="buttonClick.emit($event)"
4249
+ (open)="open.emit($event)"
4250
+ (close)="close.emit($event)"
4251
+ (itemClick)="itemClick.emit($event)"
4252
+ ></kendo-splitbutton>
4253
+ </ng-template>
3146
4254
  `, 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: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
3147
4255
  }
3148
4256
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarSplitButtonComponent, decorators: [{
@@ -3221,6 +4329,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3221
4329
  </div>
3222
4330
  </ng-container>
3223
4331
  </ng-template>
4332
+ <ng-template #sectionTemplate>
4333
+ <kendo-splitbutton
4334
+ #sectionSplitButton
4335
+ class="k-toolbar-split-button"
4336
+ [data]="data"
4337
+ [text]="toolbarOptions.text"
4338
+ [icon]="toolbarOptions.icon"
4339
+ [iconClass]="toolbarOptions.iconClass"
4340
+ [svgIcon]="toolbarOptions.svgIcon"
4341
+ [imageUrl]="toolbarOptions.imageUrl"
4342
+ [buttonClass]="buttonClass"
4343
+ [arrowButtonClass]="arrowButtonClass"
4344
+ [arrowButtonIcon]="arrowButtonIcon"
4345
+ [arrowButtonSvgIcon]="arrowButtonSvgIcon"
4346
+ [disabled]="disabled"
4347
+ [tabIndex]="-1"
4348
+ [textField]="textField"
4349
+ [popupSettings]="popupSettings"
4350
+ [fillMode]="fillMode"
4351
+ [themeColor]="fillMode ? themeColor : null"
4352
+ (buttonClick)="buttonClick.emit($event)"
4353
+ (open)="open.emit($event)"
4354
+ (close)="close.emit($event)"
4355
+ (itemClick)="itemClick.emit($event)"
4356
+ ></kendo-splitbutton>
4357
+ </ng-template>
3224
4358
  `,
3225
4359
  standalone: true,
3226
4360
  imports: [SplitButtonComponent, NgClass, NgIf, IconWrapperComponent, NgFor]
@@ -3272,6 +4406,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3272
4406
  }], toolbarSplitButton: [{
3273
4407
  type: ViewChild,
3274
4408
  args: ['toolbarSplitButton', { static: false }]
4409
+ }], sectionSplitButton: [{
4410
+ type: ViewChild,
4411
+ args: ['sectionSplitButton', { static: false }]
3275
4412
  }], overflowMainButton: [{
3276
4413
  type: ViewChild,
3277
4414
  args: ['overflowMainButton', { read: ElementRef }]
@@ -3320,6 +4457,10 @@ class ToolBarSeparatorComponent extends ToolBarToolComponent {
3320
4457
  <div class="k-separator k-toolbar-separator"></div>
3321
4458
  </ng-template>
3322
4459
 
4460
+ <ng-template #sectionTemplate>
4461
+ <div class="k-separator k-toolbar-separator"></div>
4462
+ </ng-template>
4463
+
3323
4464
  <ng-template #popupTemplate>
3324
4465
  <div class="k-item k-menu-item">
3325
4466
  <div class="k-separator k-separator-horizontal"></div>
@@ -3338,6 +4479,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3338
4479
  <div class="k-separator k-toolbar-separator"></div>
3339
4480
  </ng-template>
3340
4481
 
4482
+ <ng-template #sectionTemplate>
4483
+ <div class="k-separator k-toolbar-separator"></div>
4484
+ </ng-template>
4485
+
3341
4486
  <ng-template #popupTemplate>
3342
4487
  <div class="k-item k-menu-item">
3343
4488
  <div class="k-separator k-separator-horizontal"></div>