@progress/kendo-angular-toolbar 25.3.0-develop.8 → 25.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,16 +3,16 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from '@angular/core';
6
- import { EventEmitter, Injectable, inject, ElementRef, Input, ViewChild, Directive, Output, forwardRef, HostBinding, Component, ViewContainerRef, HostListener, ContentChildren, isDevMode, ViewChildren, NgModule } from '@angular/core';
6
+ import { EventEmitter, Injectable, inject, ElementRef, Input, ViewChild, Directive, Output, forwardRef, HostBinding, Component, ViewContainerRef, HostListener, ContentChildren, isDevMode, ViewChildren, signal, computed, afterNextRender, ChangeDetectionStrategy, NgModule } from '@angular/core';
7
7
  import * as i2 from '@progress/kendo-angular-popup';
8
- import { PopupService } from '@progress/kendo-angular-popup';
9
- import { normalizeKeys, Keys, isPresent as isPresent$1, isDocumentAvailable, getLicenseMessage, shouldShowValidationUI, guid, parseCSSClassNames, ResizeSensorComponent, WatermarkOverlayComponent, provideComponentName, ResizeBatchService } from '@progress/kendo-angular-common';
8
+ import { PopupComponent, PopupService } from '@progress/kendo-angular-popup';
9
+ import { isDocumentAvailable, normalizeKeys, Keys, isPresent as isPresent$1, getLicenseMessage, shouldShowValidationUI, guid, parseCSSClassNames, ResizeSensorComponent, WatermarkOverlayComponent, provideComponentName, hasObservers, DraggableDirective, ResizeBatchService } from '@progress/kendo-angular-common';
10
10
  import * as i1 from '@progress/kendo-angular-l10n';
11
11
  import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
12
12
  import { validatePackage } from '@progress/kendo-licensing';
13
13
  import { take, filter, takeUntil } from 'rxjs/operators';
14
14
  import { Subject, Subscription, merge, fromEvent } from 'rxjs';
15
- import { chevronLeftIcon, chevronRightIcon, moreHorizontalIcon, moreVerticalIcon, chevronDownIcon } from '@progress/kendo-svg-icons';
15
+ import { chevronLeftIcon, chevronRightIcon, moreHorizontalIcon, moreVerticalIcon, chevronDownIcon, handleDragDotsIcon } from '@progress/kendo-svg-icons';
16
16
  import { ButtonComponent, ButtonGroupComponent, DropDownButtonComponent, SplitButtonComponent } from '@progress/kendo-angular-buttons';
17
17
  import { NgTemplateOutlet, NgClass, NgStyle } from '@angular/common';
18
18
  import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
@@ -26,8 +26,8 @@ const packageMetadata = {
26
26
  productName: 'Kendo UI for Angular',
27
27
  productCode: 'KENDOUIANGULAR',
28
28
  productCodes: ['KENDOUIANGULAR'],
29
- publishDate: 1791272713,
30
- version: '25.3.0-develop.8',
29
+ publishDate: 1791387621,
30
+ version: '25.3.0',
31
31
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
32
32
  };
33
33
 
@@ -46,6 +46,121 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImpo
46
46
  type: Injectable
47
47
  }] });
48
48
 
49
+ const DEFAULT_SCROLL_BEHAVIOR = 'smooth';
50
+ const DEFAULT_SCROLL_SPEED = 100;
51
+ /**
52
+ * @hidden
53
+ */
54
+ class ScrollService {
55
+ ngZone;
56
+ localization;
57
+ owner;
58
+ position = 0;
59
+ scrollButtonActiveStateChange = new Subject();
60
+ get scrollElement() {
61
+ return this.owner.scrollContainer?.nativeElement;
62
+ }
63
+ get scrollContainerOverflowSize() {
64
+ if (!isDocumentAvailable()) {
65
+ return 0;
66
+ }
67
+ if (!this.scrollElement) {
68
+ return 0;
69
+ }
70
+ const overflowSize = Math.floor(this.scrollElement.scrollWidth - this.scrollElement.getBoundingClientRect().width);
71
+ return overflowSize < 0 ? 0 : overflowSize;
72
+ }
73
+ get toolsOverflow() {
74
+ return this.scrollContainerOverflowSize > 0;
75
+ }
76
+ constructor(ngZone, localization) {
77
+ this.ngZone = ngZone;
78
+ this.localization = localization;
79
+ }
80
+ toggleScrollButtonsState() {
81
+ const toolbar = this.owner;
82
+ if (!toolbar.hasScrollButtons) {
83
+ return;
84
+ }
85
+ const currentPrevButtonActive = !this.isDisabled('prev');
86
+ const currentNextButtonActive = !this.isDisabled('next');
87
+ const defaultOffset = 1;
88
+ const rtlDelta = this.localization.rtl ? -1 : 1;
89
+ const calculatedPrevButtonActive = (this.position * rtlDelta) > 0 && this.scrollContainerOverflowSize > 0;
90
+ const calculatedNextButtonActive = (this.position * rtlDelta) < this.scrollContainerOverflowSize - defaultOffset && this.scrollContainerOverflowSize > 0;
91
+ if (calculatedPrevButtonActive !== currentPrevButtonActive) {
92
+ this.ngZone.run(() => this.toggleButtonActiveState('prev', calculatedPrevButtonActive));
93
+ }
94
+ if (calculatedNextButtonActive !== currentNextButtonActive) {
95
+ this.ngZone.run(() => this.toggleButtonActiveState('next', calculatedNextButtonActive));
96
+ }
97
+ }
98
+ onScroll(e) {
99
+ this.position = e.target.scrollLeft;
100
+ this.toggleScrollButtonsState();
101
+ }
102
+ scrollTools(direction) {
103
+ this.calculateListPosition(direction, DEFAULT_SCROLL_SPEED);
104
+ if (this.scrollElement) {
105
+ this.scrollElement.scrollTo({ left: this.position, behavior: DEFAULT_SCROLL_BEHAVIOR });
106
+ }
107
+ this.toggleScrollButtonsState();
108
+ }
109
+ updateScrollPosition(element) {
110
+ this.position = element.scrollLeft;
111
+ }
112
+ scrollIntoView(element) {
113
+ const container = this.scrollElement;
114
+ if (!container || !element || !container.contains(element)) {
115
+ return;
116
+ }
117
+ const containerRect = container.getBoundingClientRect();
118
+ const elementRect = element.getBoundingClientRect();
119
+ if (elementRect.left < containerRect.left) {
120
+ container.scrollLeft += elementRect.left - containerRect.left;
121
+ }
122
+ else if (elementRect.right > containerRect.right) {
123
+ container.scrollLeft += elementRect.right - containerRect.right;
124
+ }
125
+ }
126
+ calculateListPosition(direction, scrollSpeed) {
127
+ if (direction === 'prev') {
128
+ if (!this.localization.rtl) {
129
+ this.position = this.position - scrollSpeed <= 0 ? 0 : this.position - scrollSpeed;
130
+ }
131
+ else {
132
+ this.position = this.position + scrollSpeed >= 0 ? 0 : this.position + scrollSpeed;
133
+ }
134
+ }
135
+ else if (direction === 'next' && this.position < this.scrollContainerOverflowSize) {
136
+ if (this.position + scrollSpeed > this.scrollContainerOverflowSize) {
137
+ if (this.localization.rtl) {
138
+ this.position = -this.scrollContainerOverflowSize;
139
+ }
140
+ else {
141
+ this.position = this.scrollContainerOverflowSize;
142
+ }
143
+ return;
144
+ }
145
+ if (this.localization.rtl) {
146
+ this.position -= scrollSpeed;
147
+ }
148
+ else {
149
+ this.position += scrollSpeed;
150
+ }
151
+ }
152
+ }
153
+ toggleButtonActiveState(buttonType, active) {
154
+ this.scrollButtonActiveStateChange.next({ buttonType, active });
155
+ }
156
+ isDisabled = (buttonType) => this.owner[`${buttonType}ScrollButton`]?.nativeElement.classList.contains('k-disabled');
157
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: ScrollService, deps: [{ token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
158
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: ScrollService });
159
+ }
160
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: ScrollService, decorators: [{
161
+ type: Injectable
162
+ }], ctorParameters: () => [{ type: i0.NgZone }, { type: i1.LocalizationService }] });
163
+
49
164
  /**
50
165
  * @hidden
51
166
  */
@@ -302,13 +417,15 @@ const normalizeOverflowSettings = (overflow) => {
302
417
  */
303
418
  class NavigationService {
304
419
  zone;
420
+ scrollService;
305
421
  overflowButton;
306
422
  focused = { renderedTool: null, index: -1 };
307
423
  renderedTools = [];
308
424
  isPopupFocused = false;
309
425
  isOverflowButtonFocused = false;
310
- constructor(zone) {
426
+ constructor(zone, scrollService) {
311
427
  this.zone = zone;
428
+ this.scrollService = scrollService;
312
429
  }
313
430
  setRenderedTools(rts) {
314
431
  this.renderedTools = rts;
@@ -409,18 +526,22 @@ class NavigationService {
409
526
  if (!renderedTool) {
410
527
  const focusableRTs = this.getFocusableTools();
411
528
  const lastFocusedRT = focusableRTs.find(rt => rt === this.focused.renderedTool) || focusableRTs[0];
412
- // guard against only disabled tools
413
529
  if (lastFocusedRT) {
414
530
  this.focused.renderedTool = lastFocusedRT;
415
531
  this.focused.index = this.getFocusableTools().findIndex(rt => rt === lastFocusedRT);
416
- // if event is undefined, then this means that the tool is the first one in the overflow popup
417
532
  lastFocusedRT.tool.focus(ev);
533
+ if (isDocumentAvailable()) {
534
+ this.scrollService.scrollIntoView(document.activeElement);
535
+ }
418
536
  }
419
537
  }
420
538
  else if (renderedTool.tool.canFocus && renderedTool.tool.canFocus()) {
421
539
  this.focused.renderedTool = renderedTool;
422
540
  this.focused.index = this.getFocusableTools().findIndex(rt => rt === renderedTool);
423
541
  renderedTool.tool.focus(ev);
542
+ if (isDocumentAvailable()) {
543
+ this.scrollService.scrollIntoView(document.activeElement);
544
+ }
424
545
  this.blurOverflowButton();
425
546
  }
426
547
  });
@@ -442,12 +563,12 @@ class NavigationService {
442
563
  return (isPresent(this.overflowButton) &&
443
564
  window.getComputedStyle(this.overflowButton.nativeElement).getPropertyValue('visibility') === 'visible');
444
565
  }
445
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: NavigationService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
566
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: NavigationService, deps: [{ token: i0.NgZone }, { token: ScrollService }], target: i0.ɵɵFactoryTarget.Injectable });
446
567
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: NavigationService });
447
568
  }
448
569
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: NavigationService, decorators: [{
449
570
  type: Injectable
450
- }], ctorParameters: () => [{ type: i0.NgZone }] });
571
+ }], ctorParameters: () => [{ type: i0.NgZone }, { type: ScrollService }] });
451
572
 
452
573
  /**
453
574
  * Represents the base ToolBar Tool component for Angular.
@@ -881,107 +1002,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImpo
881
1002
  }]
882
1003
  }], ctorParameters: () => [{ type: i1.LocalizationService }] });
883
1004
 
884
- const DEFAULT_SCROLL_BEHAVIOR = 'smooth';
885
- const DEFAULT_SCROLL_SPEED = 100;
886
- /**
887
- * @hidden
888
- */
889
- class ScrollService {
890
- ngZone;
891
- localization;
892
- owner;
893
- position = 0;
894
- scrollButtonActiveStateChange = new Subject();
895
- get scrollElement() {
896
- return this.owner.scrollContainer?.nativeElement;
897
- }
898
- get scrollContainerOverflowSize() {
899
- if (!isDocumentAvailable()) {
900
- return 0;
901
- }
902
- if (!this.scrollElement) {
903
- return 0;
904
- }
905
- const overflowSize = Math.floor(this.scrollElement.scrollWidth - this.scrollElement.getBoundingClientRect().width);
906
- return overflowSize < 0 ? 0 : overflowSize;
907
- }
908
- get toolsOverflow() {
909
- return this.scrollContainerOverflowSize > 0;
910
- }
911
- constructor(ngZone, localization) {
912
- this.ngZone = ngZone;
913
- this.localization = localization;
914
- }
915
- toggleScrollButtonsState() {
916
- const toolbar = this.owner;
917
- if (!toolbar.hasScrollButtons) {
918
- return;
919
- }
920
- const currentPrevButtonActive = !this.isDisabled('prev');
921
- const currentNextButtonActive = !this.isDisabled('next');
922
- const defaultOffset = 1;
923
- const rtlDelta = this.localization.rtl ? -1 : 1;
924
- const calculatedPrevButtonActive = (this.position * rtlDelta) > 0 && this.scrollContainerOverflowSize > 0;
925
- const calculatedNextButtonActive = (this.position * rtlDelta) < this.scrollContainerOverflowSize - defaultOffset && this.scrollContainerOverflowSize > 0;
926
- if (calculatedPrevButtonActive !== currentPrevButtonActive) {
927
- this.ngZone.run(() => this.toggleButtonActiveState('prev', calculatedPrevButtonActive));
928
- }
929
- if (calculatedNextButtonActive !== currentNextButtonActive) {
930
- this.ngZone.run(() => this.toggleButtonActiveState('next', calculatedNextButtonActive));
931
- }
932
- }
933
- onScroll(e) {
934
- this.position = e.target.scrollLeft;
935
- this.toggleScrollButtonsState();
936
- }
937
- scrollTools(direction) {
938
- this.calculateListPosition(direction, DEFAULT_SCROLL_SPEED);
939
- if (this.scrollElement) {
940
- this.scrollElement.scrollTo({ left: this.position, behavior: DEFAULT_SCROLL_BEHAVIOR });
941
- }
942
- this.toggleScrollButtonsState();
943
- }
944
- updateScrollPosition(element) {
945
- this.position = element.scrollLeft;
946
- }
947
- calculateListPosition(direction, scrollSpeed) {
948
- if (direction === 'prev') {
949
- if (!this.localization.rtl) {
950
- this.position = this.position - scrollSpeed <= 0 ? 0 : this.position - scrollSpeed;
951
- }
952
- else {
953
- this.position = this.position + scrollSpeed >= 0 ? 0 : this.position + scrollSpeed;
954
- }
955
- }
956
- else if (direction === 'next' && this.position < this.scrollContainerOverflowSize) {
957
- if (this.position + scrollSpeed > this.scrollContainerOverflowSize) {
958
- if (this.localization.rtl) {
959
- this.position = -this.scrollContainerOverflowSize;
960
- }
961
- else {
962
- this.position = this.scrollContainerOverflowSize;
963
- }
964
- return;
965
- }
966
- if (this.localization.rtl) {
967
- this.position -= scrollSpeed;
968
- }
969
- else {
970
- this.position += scrollSpeed;
971
- }
972
- }
973
- }
974
- toggleButtonActiveState(buttonType, active) {
975
- this.scrollButtonActiveStateChange.next({ buttonType, active });
976
- }
977
- isDisabled = (buttonType) => this.owner[`${buttonType}ScrollButton`]?.nativeElement.classList.contains('k-disabled');
978
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: ScrollService, deps: [{ token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
979
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: ScrollService });
980
- }
981
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: ScrollService, decorators: [{
982
- type: Injectable
983
- }], ctorParameters: () => [{ type: i0.NgZone }, { type: i1.LocalizationService }] });
984
-
985
1005
  const DIRECTION_CLASSES = {
986
1006
  left: 'chevron-left',
987
1007
  right: 'chevron-right'
@@ -1221,6 +1241,10 @@ class ToolBarComponent {
1221
1241
  get isScrollMode() {
1222
1242
  return this.normalizedOverflow.mode === 'scroll';
1223
1243
  }
1244
+ /**
1245
+ * @hidden
1246
+ */
1247
+ scrollButtonClasses = [];
1224
1248
  /**
1225
1249
  * @hidden
1226
1250
  */
@@ -1252,6 +1276,7 @@ class ToolBarComponent {
1252
1276
  set fillMode(fillMode) {
1253
1277
  this.handleClasses(fillMode, 'fillMode');
1254
1278
  this._fillMode = fillMode;
1279
+ this.updateScrollButtonClasses();
1255
1280
  }
1256
1281
  get fillMode() {
1257
1282
  return this._fillMode;
@@ -1270,6 +1295,7 @@ class ToolBarComponent {
1270
1295
  set size(size) {
1271
1296
  this.handleClasses(size, 'size');
1272
1297
  this._size = size;
1298
+ this.updateScrollButtonClasses();
1273
1299
  }
1274
1300
  get size() {
1275
1301
  return this._size;
@@ -1323,7 +1349,17 @@ class ToolBarComponent {
1323
1349
  * Emits when the overflow popup of the ToolBar closes.
1324
1350
  */
1325
1351
  close = new EventEmitter();
1326
- allTools;
1352
+ contentTools;
1353
+ /**
1354
+ * @hidden
1355
+ */
1356
+ toolsSource = null;
1357
+ /**
1358
+ * @hidden
1359
+ */
1360
+ get allTools() {
1361
+ return this.toolsSource ?? this.contentTools;
1362
+ }
1327
1363
  overflowButton;
1328
1364
  popupTemplate;
1329
1365
  popupSectionTemplate;
@@ -1972,6 +2008,9 @@ class ToolBarComponent {
1972
2008
  const renderedElement = this.toolsService.renderedTools.find((r) => {
1973
2009
  return r.tool === tool;
1974
2010
  });
2011
+ if (!isPresent(renderedElement)) {
2012
+ return null;
2013
+ }
1975
2014
  const width = renderedElement.width;
1976
2015
  tool.overflows = this.showMenu;
1977
2016
  this.refreshService.refresh(tool);
@@ -1983,6 +2022,9 @@ class ToolBarComponent {
1983
2022
  return null;
1984
2023
  }
1985
2024
  const renderedElement = this.toolsService.renderedTools.find((r) => r.tool === tool);
2025
+ if (!isPresent(renderedElement)) {
2026
+ return 0;
2027
+ }
1986
2028
  tool.overflows = false;
1987
2029
  tool.visibility = 'hidden';
1988
2030
  this.refreshService.refresh(tool);
@@ -2015,6 +2057,13 @@ class ToolBarComponent {
2015
2057
  this._open = false;
2016
2058
  }
2017
2059
  }
2060
+ updateScrollButtonClasses() {
2061
+ const size = SIZES[this._size];
2062
+ this.scrollButtonClasses = [
2063
+ size && `k-button-${size}`,
2064
+ this._fillMode && `k-button-${this._fillMode}`
2065
+ ].filter(Boolean);
2066
+ }
2018
2067
  handleClasses(value, input) {
2019
2068
  const elem = this.element.nativeElement;
2020
2069
  const classes = getStylingClasses('toolbar', input, this[input], value);
@@ -2120,7 +2169,7 @@ class ToolBarComponent {
2120
2169
  return value;
2121
2170
  }
2122
2171
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.32", 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 });
2123
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.32", type: ToolBarComponent, isStandalone: true, selector: "kendo-toolbar", inputs: { overflow: "overflow", resizable: "resizable", popupSettings: "popupSettings", fillMode: "fillMode", tabindex: "tabindex", size: "size", tabIndex: "tabIndex", showIcon: "showIcon", showText: "showText" }, outputs: { open: "open", close: "close" }, host: { listeners: { "focus": "onFocus($event)", "focusout": "onFocusOut($event)" }, properties: { "class.k-toolbar": "this.hostClass", "class.k-toolbar-scrollable": "this.scrollableClass", "class.k-toolbar-section": "this.sectionClass", "attr.role": "this.role", "attr.dir": "this.getDir", "class.k-toolbar-resizable": "this.resizableClass" } }, providers: [
2172
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.32", type: ToolBarComponent, isStandalone: true, selector: "kendo-toolbar", inputs: { overflow: "overflow", resizable: "resizable", popupSettings: "popupSettings", fillMode: "fillMode", tabindex: "tabindex", size: "size", tabIndex: "tabIndex", showIcon: "showIcon", showText: "showText", toolsSource: "toolsSource" }, outputs: { open: "open", close: "close" }, host: { listeners: { "focus": "onFocus($event)", "focusout": "onFocusOut($event)" }, properties: { "class.k-toolbar": "this.hostClass", "class.k-toolbar-scrollable": "this.scrollableClass", "class.k-toolbar-section": "this.sectionClass", "attr.role": "this.role", "attr.dir": "this.getDir", "class.k-toolbar-resizable": "this.resizableClass" } }, providers: [
2124
2173
  RefreshService,
2125
2174
  NavigationService,
2126
2175
  LocalizationService,
@@ -2131,7 +2180,7 @@ class ToolBarComponent {
2131
2180
  useValue: 'kendo.toolbar'
2132
2181
  },
2133
2182
  provideComponentName('toolbar')
2134
- ], 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: `
2183
+ ], queries: [{ propertyName: "contentTools", predicate: ToolBarToolComponent }], viewQueries: [{ propertyName: "overflowButton", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "popupSectionTemplate", first: true, predicate: ["popupSectionTemplate"], descendants: true, static: true }, { propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true, read: ElementRef }, { propertyName: "resizeSensor", first: true, predicate: ["resizeSensor"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "prevScrollButton", first: true, predicate: ["prevScrollButton"], descendants: true, read: ElementRef }, { propertyName: "nextScrollButton", first: true, predicate: ["nextScrollButton"], descendants: true, read: ElementRef }, { propertyName: "startButtonGroup", first: true, predicate: ["startButtonGroup"], descendants: true, read: ElementRef }, { propertyName: "endButtonGroup", first: true, predicate: ["endButtonGroup"], descendants: true, read: ElementRef }, { propertyName: "scrollSeparator", first: true, predicate: ["scrollSeparator"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBar"], usesOnChanges: true, ngImport: i0, template: `
2135
2184
  <ng-container kendoToolbarLocalizedMessages
2136
2185
  i18n-moreToolsTitle="kendo.toolbar.moreToolsTitle|The title of the **more tools** button in a responsive ToolBar"
2137
2186
  moreToolsTitle="More tools"
@@ -2151,11 +2200,7 @@ class ToolBarComponent {
2151
2200
  [overflow]="normalizedOverflow"
2152
2201
  [title]="getScrollButtonTitle('prev')"
2153
2202
  class="k-toolbar-prev k-icon-button k-button"
2154
- [ngClass]="{
2155
- 'k-button-sm': size === 'small',
2156
- 'k-button-md': size === 'medium',
2157
- 'k-button-lg': size === 'large'
2158
- }"
2203
+ [ngClass]="scrollButtonClasses"
2159
2204
  (onClick)="scrollTools($event)">
2160
2205
  </span>
2161
2206
  }
@@ -2167,11 +2212,7 @@ class ToolBarComponent {
2167
2212
  [overflow]="normalizedOverflow"
2168
2213
  [title]="getScrollButtonTitle('prev')"
2169
2214
  class="k-toolbar-prev k-icon-button k-button"
2170
- [ngClass]="{
2171
- 'k-button-sm': size === 'small',
2172
- 'k-button-md': size === 'medium',
2173
- 'k-button-lg': size === 'large'
2174
- }"
2215
+ [ngClass]="scrollButtonClasses"
2175
2216
  (onClick)="scrollTools($event)">
2176
2217
  </span>
2177
2218
  <span #nextScrollButton
@@ -2180,11 +2221,7 @@ class ToolBarComponent {
2180
2221
  [overflow]="normalizedOverflow"
2181
2222
  [title]="getScrollButtonTitle('next')"
2182
2223
  class="k-toolbar-next k-icon-button k-button"
2183
- [ngClass]="{
2184
- 'k-button-sm': size === 'small',
2185
- 'k-button-md': size === 'medium',
2186
- 'k-button-lg': size === 'large'
2187
- }"
2224
+ [ngClass]="scrollButtonClasses"
2188
2225
  (onClick)="scrollTools($event)">
2189
2226
  </span>
2190
2227
  </div>
@@ -2260,11 +2297,7 @@ class ToolBarComponent {
2260
2297
  [overflow]="normalizedOverflow"
2261
2298
  [title]="getScrollButtonTitle('next')"
2262
2299
  class="k-toolbar-next k-icon-button k-button"
2263
- [ngClass]="{
2264
- 'k-button-sm': size === 'small',
2265
- 'k-button-md': size === 'medium',
2266
- 'k-button-lg': size === 'large'
2267
- }"
2300
+ [ngClass]="scrollButtonClasses"
2268
2301
  (onClick)="scrollTools($event)">
2269
2302
  </span>
2270
2303
  }
@@ -2276,11 +2309,7 @@ class ToolBarComponent {
2276
2309
  [overflow]="normalizedOverflow"
2277
2310
  [title]="getScrollButtonTitle('prev')"
2278
2311
  class="k-toolbar-prev k-icon-button k-button"
2279
- [ngClass]="{
2280
- 'k-button-sm': size === 'small',
2281
- 'k-button-md': size === 'medium',
2282
- 'k-button-lg': size === 'large'
2283
- }"
2312
+ [ngClass]="scrollButtonClasses"
2284
2313
  (onClick)="scrollTools($event)">
2285
2314
  </span>
2286
2315
  <span #nextScrollButton
@@ -2289,11 +2318,7 @@ class ToolBarComponent {
2289
2318
  [overflow]="normalizedOverflow"
2290
2319
  [title]="getScrollButtonTitle('next')"
2291
2320
  class="k-toolbar-next k-icon-button k-button"
2292
- [ngClass]="{
2293
- 'k-button-sm': size === 'small',
2294
- 'k-button-md': size === 'medium',
2295
- 'k-button-lg': size === 'large'
2296
- }"
2321
+ [ngClass]="scrollButtonClasses"
2297
2322
  (onClick)="scrollTools($event)">
2298
2323
  </span>
2299
2324
  </div>
@@ -2392,11 +2417,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImpo
2392
2417
  [overflow]="normalizedOverflow"
2393
2418
  [title]="getScrollButtonTitle('prev')"
2394
2419
  class="k-toolbar-prev k-icon-button k-button"
2395
- [ngClass]="{
2396
- 'k-button-sm': size === 'small',
2397
- 'k-button-md': size === 'medium',
2398
- 'k-button-lg': size === 'large'
2399
- }"
2420
+ [ngClass]="scrollButtonClasses"
2400
2421
  (onClick)="scrollTools($event)">
2401
2422
  </span>
2402
2423
  }
@@ -2408,11 +2429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImpo
2408
2429
  [overflow]="normalizedOverflow"
2409
2430
  [title]="getScrollButtonTitle('prev')"
2410
2431
  class="k-toolbar-prev k-icon-button k-button"
2411
- [ngClass]="{
2412
- 'k-button-sm': size === 'small',
2413
- 'k-button-md': size === 'medium',
2414
- 'k-button-lg': size === 'large'
2415
- }"
2432
+ [ngClass]="scrollButtonClasses"
2416
2433
  (onClick)="scrollTools($event)">
2417
2434
  </span>
2418
2435
  <span #nextScrollButton
@@ -2421,11 +2438,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImpo
2421
2438
  [overflow]="normalizedOverflow"
2422
2439
  [title]="getScrollButtonTitle('next')"
2423
2440
  class="k-toolbar-next k-icon-button k-button"
2424
- [ngClass]="{
2425
- 'k-button-sm': size === 'small',
2426
- 'k-button-md': size === 'medium',
2427
- 'k-button-lg': size === 'large'
2428
- }"
2441
+ [ngClass]="scrollButtonClasses"
2429
2442
  (onClick)="scrollTools($event)">
2430
2443
  </span>
2431
2444
  </div>
@@ -2501,11 +2514,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImpo
2501
2514
  [overflow]="normalizedOverflow"
2502
2515
  [title]="getScrollButtonTitle('next')"
2503
2516
  class="k-toolbar-next k-icon-button k-button"
2504
- [ngClass]="{
2505
- 'k-button-sm': size === 'small',
2506
- 'k-button-md': size === 'medium',
2507
- 'k-button-lg': size === 'large'
2508
- }"
2517
+ [ngClass]="scrollButtonClasses"
2509
2518
  (onClick)="scrollTools($event)">
2510
2519
  </span>
2511
2520
  }
@@ -2517,11 +2526,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImpo
2517
2526
  [overflow]="normalizedOverflow"
2518
2527
  [title]="getScrollButtonTitle('prev')"
2519
2528
  class="k-toolbar-prev k-icon-button k-button"
2520
- [ngClass]="{
2521
- 'k-button-sm': size === 'small',
2522
- 'k-button-md': size === 'medium',
2523
- 'k-button-lg': size === 'large'
2524
- }"
2529
+ [ngClass]="scrollButtonClasses"
2525
2530
  (onClick)="scrollTools($event)">
2526
2531
  </span>
2527
2532
  <span #nextScrollButton
@@ -2530,11 +2535,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImpo
2530
2535
  [overflow]="normalizedOverflow"
2531
2536
  [title]="getScrollButtonTitle('next')"
2532
2537
  class="k-toolbar-next k-icon-button k-button"
2533
- [ngClass]="{
2534
- 'k-button-sm': size === 'small',
2535
- 'k-button-md': size === 'medium',
2536
- 'k-button-lg': size === 'large'
2537
- }"
2538
+ [ngClass]="scrollButtonClasses"
2538
2539
  (onClick)="scrollTools($event)">
2539
2540
  </span>
2540
2541
  </div>
@@ -2621,9 +2622,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImpo
2621
2622
  type: Output
2622
2623
  }], close: [{
2623
2624
  type: Output
2624
- }], allTools: [{
2625
+ }], contentTools: [{
2625
2626
  type: ContentChildren,
2626
2627
  args: [ToolBarToolComponent]
2628
+ }], toolsSource: [{
2629
+ type: Input
2627
2630
  }], overflowButton: [{
2628
2631
  type: ViewChild,
2629
2632
  args: ['overflowButton', { static: false, read: ElementRef }]
@@ -2720,7 +2723,7 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2720
2723
  */
2721
2724
  set showIcon(value) {
2722
2725
  this._showIcon = value;
2723
- this.setTextDisplayMode();
2726
+ this.setIconDisplayMode();
2724
2727
  }
2725
2728
  get showIcon() {
2726
2729
  return this._showIcon;
@@ -2810,40 +2813,37 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2810
2813
  * The icon is rendered inside the Button by a `span.k-icon` element.
2811
2814
  */
2812
2815
  set icon(icon) {
2813
- this.toolbarOptions.icon = getValueForLocation(icon, this.showIcon, false);
2814
- this.overflowOptions.icon = getValueForLocation(icon, this.showIcon, true);
2816
+ this._icon = icon;
2817
+ this.setIconDisplayMode();
2815
2818
  }
2816
2819
  /**
2817
2820
  * Defines a CSS class or multiple classes to be applied to a `span` element inside the Button.
2818
2821
  * Allows the usage of custom icons.
2819
2822
  */
2820
2823
  set iconClass(iconClass) {
2821
- this.toolbarOptions.iconClass = getValueForLocation(iconClass, this.showIcon, false);
2822
- this.overflowOptions.iconClass = getValueForLocation(iconClass, this.showIcon, true);
2824
+ this._iconClass = iconClass;
2825
+ this.setIconDisplayMode();
2823
2826
  }
2824
2827
  /**
2825
2828
  * Defines an SVGIcon to be rendered within the button.
2826
2829
  * Accepts either an [existing Kendo SVG icon](https://www.telerik.com/kendo-angular-ui/components/icons/svgicon/svgicon-list) or a custom one.
2827
2830
  */
2828
2831
  set svgIcon(icon) {
2829
- const isIconSet = this.toolbarOptions.icon || this.overflowOptions.icon;
2830
- const isIconClassSet = this.toolbarOptions.iconClass || this.overflowOptions.iconClass;
2831
- if (isDevMode() &&
2832
- icon &&
2833
- isIconSet &&
2834
- isIconClassSet) {
2832
+ const isIconSet = this._icon;
2833
+ const isIconClassSet = this._iconClass;
2834
+ if (isDevMode() && icon && isIconSet && isIconClassSet) {
2835
2835
  throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
2836
2836
  }
2837
- this.toolbarOptions.svgIcon = getValueForLocation(icon, this.showIcon, false);
2838
- this.overflowOptions.svgIcon = getValueForLocation(icon, this.showIcon, true);
2837
+ this._svgIcon = icon;
2838
+ this.setIconDisplayMode();
2839
2839
  }
2840
2840
  /**
2841
2841
  * Defines a URL for an image to be rendered inside the Button.
2842
2842
  * The URL can be relative or absolute.
2843
2843
  */
2844
2844
  set imageUrl(imageUrl) {
2845
- this.toolbarOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, false);
2846
- this.overflowOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, true);
2845
+ this._imageUrl = imageUrl;
2846
+ this.setIconDisplayMode();
2847
2847
  }
2848
2848
  /**
2849
2849
  * Fires each time the Button is clicked.
@@ -2863,14 +2863,14 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2863
2863
  icon: '',
2864
2864
  iconClass: '',
2865
2865
  svgIcon: null,
2866
- imageUrl: ''
2866
+ imageUrl: '',
2867
2867
  };
2868
2868
  overflowOptions = {
2869
2869
  text: '',
2870
2870
  icon: '',
2871
2871
  iconClass: '',
2872
2872
  svgIcon: null,
2873
- imageUrl: ''
2873
+ imageUrl: '',
2874
2874
  };
2875
2875
  /**
2876
2876
  * @hidden
@@ -2886,6 +2886,10 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2886
2886
  _showText;
2887
2887
  _showIcon;
2888
2888
  _text;
2889
+ _icon;
2890
+ _iconClass;
2891
+ _svgIcon;
2892
+ _imageUrl;
2889
2893
  propertyChangeSub;
2890
2894
  constructor(element, zone, host) {
2891
2895
  super();
@@ -2975,6 +2979,16 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2975
2979
  this.overflowOptions.text = this.showText === 'toolbar' || this.showText === 'never' ? undefined : this.text;
2976
2980
  });
2977
2981
  }
2982
+ setIconDisplayMode() {
2983
+ this.toolbarOptions.icon = getValueForLocation(this._icon, this.showIcon, false);
2984
+ this.overflowOptions.icon = getValueForLocation(this._icon, this.showIcon, true);
2985
+ this.toolbarOptions.iconClass = getValueForLocation(this._iconClass, this.showIcon, false);
2986
+ this.overflowOptions.iconClass = getValueForLocation(this._iconClass, this.showIcon, true);
2987
+ this.toolbarOptions.svgIcon = getValueForLocation(this._svgIcon, this.showIcon, false);
2988
+ this.overflowOptions.svgIcon = getValueForLocation(this._svgIcon, this.showIcon, true);
2989
+ this.toolbarOptions.imageUrl = getValueForLocation(this._imageUrl, this.showIcon, false);
2990
+ this.overflowOptions.imageUrl = getValueForLocation(this._imageUrl, this.showIcon, true);
2991
+ }
2978
2992
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
2979
2993
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.32", type: ToolBarButtonComponent, isStandalone: true, selector: "kendo-toolbar-button", inputs: { showText: "showText", showIcon: "showIcon", text: "text", style: "style", className: "className", title: "title", disabled: "disabled", toggleable: "toggleable", look: "look", togglable: "togglable", selected: "selected", fillMode: "fillMode", rounded: "rounded", themeColor: "themeColor", icon: "icon", iconClass: "iconClass", svgIcon: "svgIcon", imageUrl: "imageUrl" }, outputs: { click: "click", pointerdown: "pointerdown", selectedChange: "selectedChange" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent) }], viewQueries: [{ propertyName: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "sectionButtonElement", first: true, predicate: ["sectionButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
2980
2994
  <ng-template #toolbarTemplate>
@@ -3878,6 +3892,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3878
3892
  */
3879
3893
  set showIcon(value) {
3880
3894
  this._showIcon = value;
3895
+ this.setIconDisplayMode();
3881
3896
  }
3882
3897
  get showIcon() {
3883
3898
  return this._showIcon;
@@ -3897,38 +3912,38 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3897
3912
  * Sets the icon rendered next to the button text.
3898
3913
  */
3899
3914
  set icon(icon) {
3900
- this.toolbarOptions.icon = getValueForLocation(icon, this.showIcon, false);
3901
- this.overflowOptions.icon = getValueForLocation(icon, this.showIcon, true);
3915
+ this._icon = icon;
3916
+ this.setIconDisplayMode();
3902
3917
  }
3903
3918
  /**
3904
3919
  * Sets the `SVGIcon` rendered in the button.
3905
3920
  * Accepts an [existing Kendo SVG icon](https://www.telerik.com/kendo-angular-ui/components/icons/svgicon/svgicon-list) or a custom one.
3906
3921
  */
3907
3922
  set svgIcon(icon) {
3908
- const isIconSet = this.toolbarOptions.icon || this.overflowOptions.icon;
3909
- const isIconClassSet = this.toolbarOptions.iconClass || this.overflowOptions.iconClass;
3923
+ const isIconSet = this._icon;
3924
+ const isIconClassSet = this._iconClass;
3910
3925
  if (isDevMode() &&
3911
3926
  icon &&
3912
3927
  isIconSet &&
3913
3928
  isIconClassSet) {
3914
3929
  throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
3915
3930
  }
3916
- this.toolbarOptions.svgIcon = getValueForLocation(icon, this.showIcon, false);
3917
- this.overflowOptions.svgIcon = getValueForLocation(icon, this.showIcon, true);
3931
+ this._svgIcon = icon;
3932
+ this.setIconDisplayMode();
3918
3933
  }
3919
3934
  /**
3920
3935
  * Sets a custom CSS class icon rendered next to the button text.
3921
3936
  */
3922
3937
  set iconClass(iconClass) {
3923
- this.toolbarOptions.iconClass = getValueForLocation(iconClass, this.showIcon, false);
3924
- this.overflowOptions.iconClass = getValueForLocation(iconClass, this.showIcon, true);
3938
+ this._iconClass = iconClass;
3939
+ this.setIconDisplayMode();
3925
3940
  }
3926
3941
  /**
3927
3942
  * Sets a URL for the image displayed next to the button text.
3928
3943
  */
3929
3944
  set imageUrl(imageUrl) {
3930
- this.toolbarOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, false);
3931
- this.overflowOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, true);
3945
+ this._imageUrl = imageUrl;
3946
+ this.setIconDisplayMode();
3932
3947
  }
3933
3948
  /**
3934
3949
  * Configures the popup of the DropDownButton.
@@ -4036,6 +4051,10 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
4036
4051
  _showText;
4037
4052
  _showIcon;
4038
4053
  _text;
4054
+ _icon;
4055
+ _iconClass;
4056
+ _svgIcon;
4057
+ _imageUrl;
4039
4058
  propertyChangeSub;
4040
4059
  getNextKey;
4041
4060
  getPrevKey;
@@ -4148,6 +4167,16 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
4148
4167
  this.toolbarOptions.text = this.showText === 'menu' || this.showText === 'never' ? undefined : this.text;
4149
4168
  this.overflowOptions.text = this.showText === 'toolbar' || this.showText === 'never' ? undefined : this.text;
4150
4169
  }
4170
+ setIconDisplayMode() {
4171
+ this.toolbarOptions.icon = getValueForLocation(this._icon, this.showIcon, false);
4172
+ this.overflowOptions.icon = getValueForLocation(this._icon, this.showIcon, true);
4173
+ this.toolbarOptions.iconClass = getValueForLocation(this._iconClass, this.showIcon, false);
4174
+ this.overflowOptions.iconClass = getValueForLocation(this._iconClass, this.showIcon, true);
4175
+ this.toolbarOptions.svgIcon = getValueForLocation(this._svgIcon, this.showIcon, false);
4176
+ this.overflowOptions.svgIcon = getValueForLocation(this._svgIcon, this.showIcon, true);
4177
+ this.toolbarOptions.imageUrl = getValueForLocation(this._imageUrl, this.showIcon, false);
4178
+ this.overflowOptions.imageUrl = getValueForLocation(this._imageUrl, this.showIcon, true);
4179
+ }
4151
4180
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
4152
4181
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.32", 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: `
4153
4182
  <ng-template #toolbarTemplate>
@@ -4444,7 +4473,7 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4444
4473
  */
4445
4474
  set showIcon(value) {
4446
4475
  this._showIcon = value;
4447
- this.setTextDisplayMode();
4476
+ this.setIconDisplayMode();
4448
4477
  }
4449
4478
  get showIcon() {
4450
4479
  return this._showIcon;
@@ -4464,38 +4493,38 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4464
4493
  * ([see example](https://www.telerik.com/kendo-angular-ui/components/toolbar/control-types#split-buttons)).
4465
4494
  */
4466
4495
  set icon(icon) {
4467
- this.toolbarOptions.icon = getValueForLocation(icon, this.showIcon, false);
4468
- this.overflowOptions.icon = getValueForLocation(icon, this.showIcon, true);
4496
+ this._icon = icon;
4497
+ this.setIconDisplayMode();
4469
4498
  }
4470
4499
  /**
4471
4500
  * Sets the `SVGIcon` rendered in the main button.
4472
4501
  * Accepts an [existing Kendo SVG icon](https://www.telerik.com/kendo-angular-ui/components/icons/svgicon/svgicon-list) or a custom one.
4473
4502
  */
4474
4503
  set svgIcon(icon) {
4475
- const isIconSet = this.toolbarOptions.icon || this.overflowOptions.icon;
4476
- const isIconClassSet = this.toolbarOptions.iconClass || this.overflowOptions.iconClass;
4504
+ const isIconSet = this._icon;
4505
+ const isIconClassSet = this._iconClass;
4477
4506
  if (isDevMode() &&
4478
4507
  icon &&
4479
4508
  isIconSet &&
4480
4509
  isIconClassSet) {
4481
4510
  throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
4482
4511
  }
4483
- this.toolbarOptions.svgIcon = getValueForLocation(icon, this.showIcon, false);
4484
- this.overflowOptions.svgIcon = getValueForLocation(icon, this.showIcon, true);
4512
+ this._svgIcon = icon;
4513
+ this.setIconDisplayMode();
4485
4514
  }
4486
4515
  /**
4487
4516
  * Sets a custom CSS class icon rendered next to the button text.
4488
4517
  */
4489
4518
  set iconClass(iconClass) {
4490
- this.toolbarOptions.iconClass = getValueForLocation(iconClass, this.showIcon, false);
4491
- this.overflowOptions.iconClass = getValueForLocation(iconClass, this.showIcon, true);
4519
+ this._iconClass = iconClass;
4520
+ this.setIconDisplayMode();
4492
4521
  }
4493
4522
  /**
4494
4523
  * Sets a URL for the image displayed next to the button text.
4495
4524
  */
4496
4525
  set imageUrl(imageUrl) {
4497
- this.toolbarOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, false);
4498
- this.overflowOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, true);
4526
+ this._imageUrl = imageUrl;
4527
+ this.setIconDisplayMode();
4499
4528
  }
4500
4529
  /**
4501
4530
  * When `true`, disables a SplitButton item.
@@ -4621,6 +4650,10 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4621
4650
  _showText;
4622
4651
  _showIcon;
4623
4652
  _text;
4653
+ _icon;
4654
+ _iconClass;
4655
+ _svgIcon;
4656
+ _imageUrl;
4624
4657
  propertyChangeSub;
4625
4658
  getNextKey;
4626
4659
  getPrevKey;
@@ -4723,6 +4756,16 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4723
4756
  this.toolbarOptions.text = this.showText === 'menu' || this.showText === 'never' ? undefined : this.text;
4724
4757
  this.overflowOptions.text = this.showText === 'toolbar' || this.showText === 'never' ? undefined : this.text;
4725
4758
  }
4759
+ setIconDisplayMode() {
4760
+ this.toolbarOptions.icon = getValueForLocation(this._icon, this.showIcon, false);
4761
+ this.overflowOptions.icon = getValueForLocation(this._icon, this.showIcon, true);
4762
+ this.toolbarOptions.iconClass = getValueForLocation(this._iconClass, this.showIcon, false);
4763
+ this.overflowOptions.iconClass = getValueForLocation(this._iconClass, this.showIcon, true);
4764
+ this.toolbarOptions.svgIcon = getValueForLocation(this._svgIcon, this.showIcon, false);
4765
+ this.overflowOptions.svgIcon = getValueForLocation(this._svgIcon, this.showIcon, true);
4766
+ this.toolbarOptions.imageUrl = getValueForLocation(this._imageUrl, this.showIcon, false);
4767
+ this.overflowOptions.imageUrl = getValueForLocation(this._imageUrl, this.showIcon, true);
4768
+ }
4726
4769
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: ToolBarSplitButtonComponent, deps: [{ token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
4727
4770
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.32", 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: `
4728
4771
  <ng-template #toolbarTemplate>
@@ -5210,6 +5253,956 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImpo
5210
5253
  }]
5211
5254
  }], ctorParameters: () => [{ type: i1.LocalizationService }] });
5212
5255
 
5256
+ /**
5257
+ * @hidden
5258
+ */
5259
+ class FloatingToolBarMessages extends ComponentMessages {
5260
+ /**
5261
+ * Sets the accessible name of the FloatingToolBar drag handle.
5262
+ */
5263
+ set dragHandleTitle(value) {
5264
+ this._dragHandleTitle.set(value);
5265
+ }
5266
+ get dragHandleTitle() {
5267
+ return this._dragHandleTitle();
5268
+ }
5269
+ /**
5270
+ * Sets the title of the More Tools button in the hosted ToolBar. When unset, the FloatingToolBar's localized default is used.
5271
+ */
5272
+ set moreToolsTitle(value) {
5273
+ this._moreToolsTitle.set(value);
5274
+ }
5275
+ get moreToolsTitle() {
5276
+ return this._moreToolsTitle();
5277
+ }
5278
+ /**
5279
+ * Sets the title of the previous scroll button in the hosted ToolBar. When unset, the FloatingToolBar's localized default is used.
5280
+ */
5281
+ set previousToolButton(value) {
5282
+ this._previousToolButton.set(value);
5283
+ }
5284
+ get previousToolButton() {
5285
+ return this._previousToolButton();
5286
+ }
5287
+ /**
5288
+ * Sets the title of the next scroll button in the hosted ToolBar. When unset, the FloatingToolBar's localized default is used.
5289
+ */
5290
+ set nextToolButton(value) {
5291
+ this._nextToolButton.set(value);
5292
+ }
5293
+ get nextToolButton() {
5294
+ return this._nextToolButton();
5295
+ }
5296
+ _dragHandleTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_dragHandleTitle" }] : []));
5297
+ _moreToolsTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_moreToolsTitle" }] : []));
5298
+ _previousToolButton = signal(undefined, ...(ngDevMode ? [{ debugName: "_previousToolButton" }] : []));
5299
+ _nextToolButton = signal(undefined, ...(ngDevMode ? [{ debugName: "_nextToolButton" }] : []));
5300
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: FloatingToolBarMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
5301
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.32", type: FloatingToolBarMessages, isStandalone: true, selector: "kendo-floatingtoolbar-messages-base", inputs: { dragHandleTitle: "dragHandleTitle", moreToolsTitle: "moreToolsTitle", previousToolButton: "previousToolButton", nextToolButton: "nextToolButton" }, usesInheritance: true, ngImport: i0 });
5302
+ }
5303
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: FloatingToolBarMessages, decorators: [{
5304
+ type: Directive,
5305
+ args: [{
5306
+ selector: 'kendo-floatingtoolbar-messages-base'
5307
+ }]
5308
+ }], propDecorators: { dragHandleTitle: [{
5309
+ type: Input
5310
+ }], moreToolsTitle: [{
5311
+ type: Input
5312
+ }], previousToolButton: [{
5313
+ type: Input
5314
+ }], nextToolButton: [{
5315
+ type: Input
5316
+ }] } });
5317
+
5318
+ /**
5319
+ * @hidden
5320
+ */
5321
+ class LocalizedFloatingToolBarMessagesDirective extends FloatingToolBarMessages {
5322
+ service;
5323
+ constructor(service) {
5324
+ super();
5325
+ this.service = service;
5326
+ }
5327
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: LocalizedFloatingToolBarMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
5328
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.32", type: LocalizedFloatingToolBarMessagesDirective, isStandalone: true, selector: "[kendoFloatingToolBarLocalizedMessages]", providers: [
5329
+ {
5330
+ provide: FloatingToolBarMessages,
5331
+ useExisting: forwardRef(() => LocalizedFloatingToolBarMessagesDirective)
5332
+ }
5333
+ ], usesInheritance: true, ngImport: i0 });
5334
+ }
5335
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: LocalizedFloatingToolBarMessagesDirective, decorators: [{
5336
+ type: Directive,
5337
+ args: [{
5338
+ providers: [
5339
+ {
5340
+ provide: FloatingToolBarMessages,
5341
+ useExisting: forwardRef(() => LocalizedFloatingToolBarMessagesDirective)
5342
+ }
5343
+ ],
5344
+ selector: '[kendoFloatingToolBarLocalizedMessages]',
5345
+ standalone: true
5346
+ }]
5347
+ }], ctorParameters: () => [{ type: i1.LocalizationService }] });
5348
+
5349
+ /**
5350
+ * Arguments for the `dragStart` event of the FloatingToolBar.
5351
+ */
5352
+ class FloatingToolBarDragStartEvent extends PreventableEvent {
5353
+ sender;
5354
+ top;
5355
+ left;
5356
+ constructor(sender, top, left) {
5357
+ super();
5358
+ this.sender = sender;
5359
+ this.top = top;
5360
+ this.left = left;
5361
+ }
5362
+ /**
5363
+ * Prevents the FloatingToolBar from starting a pointer drag or keyboard move mode.
5364
+ */
5365
+ preventDefault() {
5366
+ super.preventDefault();
5367
+ }
5368
+ }
5369
+ /**
5370
+ * Arguments for the `move` event of the FloatingToolBar.
5371
+ */
5372
+ class FloatingToolBarMoveEvent {
5373
+ sender;
5374
+ top;
5375
+ left;
5376
+ constructor(sender, top, left) {
5377
+ this.sender = sender;
5378
+ this.top = top;
5379
+ this.left = left;
5380
+ }
5381
+ }
5382
+ /**
5383
+ * Arguments for the `dragEnd` event of the FloatingToolBar.
5384
+ */
5385
+ class FloatingToolBarDragEndEvent {
5386
+ sender;
5387
+ top;
5388
+ left;
5389
+ constructor(sender, top, left) {
5390
+ this.sender = sender;
5391
+ this.top = top;
5392
+ this.left = left;
5393
+ }
5394
+ }
5395
+
5396
+ /**
5397
+ * @hidden
5398
+ */
5399
+ const clampToBounds = (point, size, viewport, origin) => {
5400
+ const viewportPoint = origin
5401
+ ? { left: point.left + origin.left, top: point.top + origin.top }
5402
+ : { left: point.left - viewport.scrollX, top: point.top - viewport.scrollY };
5403
+ const maxLeft = Math.max(0, viewport.width - size.width);
5404
+ const maxTop = Math.max(0, viewport.height - size.height);
5405
+ const left = Math.min(Math.max(viewportPoint.left, 0), maxLeft);
5406
+ const top = Math.min(Math.max(viewportPoint.top, 0), maxTop);
5407
+ return origin
5408
+ ? { left: left - origin.left, top: top - origin.top }
5409
+ : { left: left + viewport.scrollX, top: top + viewport.scrollY };
5410
+ };
5411
+ /**
5412
+ * @hidden
5413
+ */
5414
+ const getPositioningOrigin = (offsetParent) => {
5415
+ const isStaticBody = offsetParent === offsetParent?.ownerDocument.body
5416
+ && (getComputedStyle(offsetParent).position || 'static') === 'static';
5417
+ if (!offsetParent || isStaticBody) {
5418
+ return undefined;
5419
+ }
5420
+ const rect = offsetParent.getBoundingClientRect();
5421
+ return {
5422
+ left: rect.left + offsetParent.clientLeft - offsetParent.scrollLeft,
5423
+ top: rect.top + offsetParent.clientTop - offsetParent.scrollTop
5424
+ };
5425
+ };
5426
+ /**
5427
+ * @hidden
5428
+ */
5429
+ const resolveAnchorElement = (anchor) => (anchor instanceof ElementRef ? anchor.nativeElement : anchor) ?? undefined;
5430
+ /**
5431
+ * @hidden
5432
+ */
5433
+ const containsFocusTarget = (target, hostElement, overflowPopup) => !!target && (hostElement.contains(target) || !!overflowPopup?.contains(target));
5434
+ /**
5435
+ * @hidden
5436
+ */
5437
+ const preventDefaultAndStopPropagation = (ev) => {
5438
+ ev.preventDefault();
5439
+ ev.stopPropagation();
5440
+ };
5441
+ const EDITABLE_SELECTOR = 'input, textarea, select, [role="textbox"], [role="searchbox"], [role="combobox"]';
5442
+ /**
5443
+ * @hidden
5444
+ */
5445
+ const isEditableTarget = (target) => {
5446
+ const element = target;
5447
+ return !!element && (!!element.isContentEditable || !!element.closest?.(EDITABLE_SELECTOR));
5448
+ };
5449
+ /**
5450
+ * @hidden
5451
+ */
5452
+ const ARROW_DELTAS = {
5453
+ ArrowLeft: { left: -10, top: 0 },
5454
+ ArrowRight: { left: 10, top: 0 },
5455
+ ArrowUp: { left: 0, top: -10 },
5456
+ ArrowDown: { left: 0, top: 10 }
5457
+ };
5458
+ // The Popup's own default, which it treats as "no explicit offset".
5459
+ const DEFAULT_OFFSET = { left: -10000, top: 0 };
5460
+ const DEFAULT_COLLISION = { horizontal: 'fit', vertical: 'flip' };
5461
+ const SIDE_COLLISION = { horizontal: 'flip', vertical: 'fit' };
5462
+ // The viewport is the drag boundary, and flipping mid-drag would jump the toolbar away from the pointer.
5463
+ const DRAG_COLLISION = { horizontal: 'fit', vertical: 'fit' };
5464
+ // Matching point alignments make flipping inert, so a released drag offset can scroll out of view naturally.
5465
+ const POSITIONED_COLLISION = { horizontal: 'flip', vertical: 'flip' };
5466
+ const DRAG_ALIGN = { horizontal: 'left', vertical: 'top' };
5467
+ const ANCHOR_ALIGN = {
5468
+ top: { horizontal: 'center', vertical: 'top' },
5469
+ bottom: { horizontal: 'center', vertical: 'bottom' },
5470
+ left: { horizontal: 'left', vertical: 'center' },
5471
+ right: { horizontal: 'right', vertical: 'center' }
5472
+ };
5473
+ const POPUP_ALIGN = {
5474
+ top: { horizontal: 'center', vertical: 'bottom' },
5475
+ bottom: { horizontal: 'center', vertical: 'top' },
5476
+ left: { horizontal: 'right', vertical: 'center' },
5477
+ right: { horizontal: 'left', vertical: 'center' }
5478
+ };
5479
+ /**
5480
+ * @hidden
5481
+ */
5482
+ const resolvePopupPosition = (options) => {
5483
+ const { anchor, container, position, containerAlign, margin, dragOffset, dragging } = options;
5484
+ if (dragOffset) {
5485
+ return {
5486
+ anchor: undefined,
5487
+ anchorAlign: DRAG_ALIGN,
5488
+ popupAlign: DRAG_ALIGN,
5489
+ collision: dragging ? DRAG_COLLISION : POSITIONED_COLLISION,
5490
+ margin: undefined,
5491
+ offset: dragOffset
5492
+ };
5493
+ }
5494
+ if (anchor) {
5495
+ return {
5496
+ anchor,
5497
+ anchorAlign: ANCHOR_ALIGN[position],
5498
+ popupAlign: POPUP_ALIGN[position],
5499
+ collision: position === 'left' || position === 'right' ? SIDE_COLLISION : DEFAULT_COLLISION,
5500
+ margin,
5501
+ offset: DEFAULT_OFFSET
5502
+ };
5503
+ }
5504
+ // Aligning the same point of both elements places the toolbar inside its container.
5505
+ return {
5506
+ anchor: container,
5507
+ anchorAlign: containerAlign,
5508
+ popupAlign: containerAlign,
5509
+ collision: DEFAULT_COLLISION,
5510
+ margin,
5511
+ offset: DEFAULT_OFFSET
5512
+ };
5513
+ };
5514
+
5515
+ /**
5516
+ * Represents the Kendo UI FloatingToolBar component for Angular. Hosts the {@link ToolBarComponent}
5517
+ * inside a floating {@link PopupComponent} container.
5518
+ *
5519
+ * @example
5520
+ * ```html
5521
+ * <kendo-floatingtoolbar>
5522
+ * <kendo-toolbar-button text="Button"></kendo-toolbar-button>
5523
+ * </kendo-floatingtoolbar>
5524
+ * ```
5525
+ */
5526
+ class FloatingToolBarComponent {
5527
+ hostElement;
5528
+ ngZone;
5529
+ injector;
5530
+ renderer;
5531
+ localization;
5532
+ changeDetectorRef;
5533
+ // Re-projected tools never reach the internal ToolBar's own content query.
5534
+ projectedTools;
5535
+ popupComponent;
5536
+ toolbarComponent;
5537
+ dragHandle;
5538
+ /**
5539
+ * Sets the element the FloatingToolBar is positioned against. When not set, the component
5540
+ * is positioned within its containing element based on the `containerAlign` option.
5541
+ */
5542
+ set anchor(value) {
5543
+ if (resolveAnchorElement(this._anchor()) === resolveAnchorElement(value)) {
5544
+ return;
5545
+ }
5546
+ this.cancelActiveDrag();
5547
+ this._dragOffset.set(null);
5548
+ this._anchor.set(value);
5549
+ }
5550
+ get anchor() { return this._anchor(); }
5551
+ /**
5552
+ * Sets the preferred side of the anchor the FloatingToolBar is rendered on.
5553
+ * Collision handling can render the component on the opposite side when the preferred side does not fit.
5554
+ * Applies when `anchor` is set.
5555
+ *
5556
+ * @default 'top'
5557
+ */
5558
+ set position(value) { this._position.set(value); }
5559
+ get position() { return this._position(); }
5560
+ /**
5561
+ * Sets the position of the FloatingToolBar within its containing element.
5562
+ * Applies when `anchor` is not set.
5563
+ *
5564
+ * @default { horizontal: 'center', vertical: 'top' }
5565
+ */
5566
+ set containerAlign(value) { this._containerAlign.set(value); }
5567
+ get containerAlign() { return this._containerAlign(); }
5568
+ /**
5569
+ * Sets the horizontal and vertical spacing in pixels between the FloatingToolBar and the element it is
5570
+ * positioned against. When no anchor is provided, the spacing is applied relative to the containing element.
5571
+ *
5572
+ * @default { horizontal: 0, vertical: 0 }
5573
+ */
5574
+ set margin(value) { this._margin.set(value); }
5575
+ get margin() { return this._margin(); }
5576
+ /**
5577
+ * Sets the width of the FloatingToolBar. Numeric values are treated as pixels.
5578
+ */
5579
+ set width(value) {
5580
+ this._width.set(typeof value === 'number' ? `${value}px` : value);
5581
+ this.updatePopupSize();
5582
+ }
5583
+ get width() { return this._width(); }
5584
+ /**
5585
+ * Sets the maximum width of the FloatingToolBar. Numeric values are treated as pixels.
5586
+ */
5587
+ set maxWidth(value) {
5588
+ this._maxWidth.set(typeof value === 'number' ? `${value}px` : value);
5589
+ this.updatePopupSize();
5590
+ }
5591
+ get maxWidth() { return this._maxWidth(); }
5592
+ /**
5593
+ * Sets how the FloatingToolBar renders tools when their total size is greater than the available width.
5594
+ * @default 'none'
5595
+ */
5596
+ set overflow(value) { this._overflow.set(value); }
5597
+ get overflow() { return this._overflow(); }
5598
+ /**
5599
+ * Sets the size of the FloatingToolBar and the tools it hosts. The default value is set by the Kendo theme.
5600
+ */
5601
+ set size(value) { this._size.set(value); }
5602
+ get size() { return this._size(); }
5603
+ /**
5604
+ * Sets the background and border styles of the FloatingToolBar. The default value is set by the Kendo theme.
5605
+ */
5606
+ set fillMode(value) { this._fillMode.set(value); }
5607
+ get fillMode() { return this._fillMode(); }
5608
+ /**
5609
+ * Controls whether the user can reposition the FloatingToolBar with the pointer or the keyboard. When enabled, the
5610
+ * component renders a drag handle before the hosted Toolbar.
5611
+ *
5612
+ * Press `M` while a Toolbar tool or the drag handle has focus to enter move mode. Focus moves
5613
+ * to the drag handle, where you can use the arrow keys to move the FloatingToolBar by 10 pixels at a time.
5614
+ * Press `Enter` or `Space`, or move focus away from the drag handle, to finish, or press `Escape` to restore the starting position.
5615
+ *
5616
+ * @default false
5617
+ */
5618
+ set draggable(value) {
5619
+ if (!value) {
5620
+ this.cancelActiveDrag();
5621
+ }
5622
+ this._draggable.set(value);
5623
+ }
5624
+ get draggable() { return this._draggable(); }
5625
+ /**
5626
+ * Sets the accessible name of the FloatingToolBar.
5627
+ */
5628
+ set ariaLabel(value) { this._ariaLabel.set(value); }
5629
+ get ariaLabel() { return this._ariaLabel(); }
5630
+ /**
5631
+ * Fires when a pointer drag or the keyboard move mode starts. Cancelable — calling `preventDefault()` keeps the
5632
+ * FloatingToolBar in place.
5633
+ */
5634
+ dragStart = new EventEmitter();
5635
+ /**
5636
+ * Fires when the user moves the FloatingToolBar with the pointer or the keyboard.
5637
+ */
5638
+ move = new EventEmitter();
5639
+ /**
5640
+ * Fires when a pointer drag ends or the keyboard move mode is committed or canceled.
5641
+ */
5642
+ dragEnd = new EventEmitter();
5643
+ /**
5644
+ * @hidden
5645
+ *
5646
+ * Projected tools subscribe to this after resolving this component as their ToolBar host.
5647
+ */
5648
+ propertyChange = new EventEmitter();
5649
+ dragHandleIcon = handleDragDotsIcon;
5650
+ direction;
5651
+ moveMode = computed(() => this.keyboardMoveOrigin() !== null, ...(ngDevMode ? [{ debugName: "moveMode" }] : []));
5652
+ popupClass = computed(() => {
5653
+ const size = SIZES[this._size()];
5654
+ const fillMode = this._fillMode();
5655
+ return [
5656
+ 'k-floating-toolbar',
5657
+ size && `k-floating-toolbar-${size}`,
5658
+ fillMode && `k-floating-toolbar-${fillMode}`
5659
+ ].filter(Boolean).join(' ');
5660
+ }, ...(ngDevMode ? [{ debugName: "popupClass" }] : []));
5661
+ popupPosition = computed(() => resolvePopupPosition({
5662
+ anchor: this._anchor(),
5663
+ container: this.containerElement,
5664
+ position: this._position(),
5665
+ containerAlign: this._containerAlign(),
5666
+ margin: this._margin(),
5667
+ dragOffset: this._dragOffset(),
5668
+ dragging: this.pointerDragging() || this.keyboardMoveOrigin() !== null
5669
+ }), ...(ngDevMode ? [{ debugName: "popupPosition" }] : []));
5670
+ popupPositionMode = computed(() => (this._draggable() || this._dragOffset()) ? 'absolute' : 'fixed', ...(ngDevMode ? [{ debugName: "popupPositionMode" }] : []));
5671
+ get dragHandleTitle() {
5672
+ return this.localization.get('dragHandleTitle');
5673
+ }
5674
+ _anchor = signal(undefined, ...(ngDevMode ? [{ debugName: "_anchor" }] : []));
5675
+ _position = signal('top', ...(ngDevMode ? [{ debugName: "_position" }] : []));
5676
+ _containerAlign = signal({ horizontal: 'center', vertical: 'top' }, ...(ngDevMode ? [{ debugName: "_containerAlign" }] : []));
5677
+ _margin = signal({ horizontal: 0, vertical: 0 }, ...(ngDevMode ? [{ debugName: "_margin" }] : []));
5678
+ _width = signal(undefined, ...(ngDevMode ? [{ debugName: "_width" }] : []));
5679
+ _maxWidth = signal(undefined, ...(ngDevMode ? [{ debugName: "_maxWidth" }] : []));
5680
+ _overflow = signal('none', ...(ngDevMode ? [{ debugName: "_overflow" }] : []));
5681
+ _size = signal(undefined, ...(ngDevMode ? [{ debugName: "_size" }] : []));
5682
+ _fillMode = signal(undefined, ...(ngDevMode ? [{ debugName: "_fillMode" }] : []));
5683
+ _draggable = signal(false, ...(ngDevMode ? [{ debugName: "_draggable" }] : []));
5684
+ _ariaLabel = signal(undefined, ...(ngDevMode ? [{ debugName: "_ariaLabel" }] : []));
5685
+ _dragOffset = signal(null, ...(ngDevMode ? [{ debugName: "_dragOffset" }] : []));
5686
+ keyboardMoveOrigin = signal(null, ...(ngDevMode ? [{ debugName: "keyboardMoveOrigin" }] : []));
5687
+ preMoveDragOffset = null;
5688
+ pointerDragging = signal(false, ...(ngDevMode ? [{ debugName: "pointerDragging" }] : []));
5689
+ pointerDrag = null;
5690
+ focusReturnTarget = null;
5691
+ isFocusWithinComponent = false;
5692
+ subscriptions = new Subscription();
5693
+ constructor(hostElement, ngZone, injector, renderer, localization, changeDetectorRef) {
5694
+ this.hostElement = hostElement;
5695
+ this.ngZone = ngZone;
5696
+ this.injector = injector;
5697
+ this.renderer = renderer;
5698
+ this.localization = localization;
5699
+ this.changeDetectorRef = changeDetectorRef;
5700
+ validatePackage(packageMetadata);
5701
+ this.direction = localization.rtl ? 'rtl' : 'ltr';
5702
+ if (isDocumentAvailable()) {
5703
+ this.focusReturnTarget = document.activeElement;
5704
+ }
5705
+ }
5706
+ ngOnInit() {
5707
+ this.subscriptions.add(this.localization.changes.subscribe(({ rtl }) => {
5708
+ this.direction = rtl ? 'rtl' : 'ltr';
5709
+ this.changeDetectorRef.markForCheck();
5710
+ }));
5711
+ }
5712
+ ngAfterViewInit() {
5713
+ this.updatePopupSize();
5714
+ if (!isDocumentAvailable()) {
5715
+ return;
5716
+ }
5717
+ const hostEl = this.hostElement.nativeElement;
5718
+ this.ngZone.runOutsideAngular(() => {
5719
+ this.subscriptions.add(this.renderer.listen(hostEl, 'keydown', (ev) => this.onKeydown(ev)));
5720
+ this.subscriptions.add(this.renderer.listen(hostEl, 'focusin', (ev) => this.onFocusIn(ev)));
5721
+ this.subscriptions.add(this.renderer.listen(hostEl, 'focusout', (ev) => this.onFocusOut(ev)));
5722
+ });
5723
+ }
5724
+ ngOnDestroy() {
5725
+ const keyboardMoveOrigin = this.keyboardMoveOrigin();
5726
+ if (this.pointerDrag?.started || keyboardMoveOrigin) {
5727
+ const activeDragPosition = this._dragOffset() ?? keyboardMoveOrigin;
5728
+ if (activeDragPosition && hasObservers(this.dragEnd)) {
5729
+ this.dragEnd.emit(new FloatingToolBarDragEndEvent(this, activeDragPosition.top, activeDragPosition.left));
5730
+ }
5731
+ }
5732
+ this.restoreFocus();
5733
+ this.subscriptions.unsubscribe();
5734
+ }
5735
+ /**
5736
+ * Moves the focus into the FloatingToolBar at its current roving tabindex position.
5737
+ */
5738
+ focus() {
5739
+ this.focusFirstTool();
5740
+ }
5741
+ /**
5742
+ * Sets the FloatingToolBar position using the provided `top` and `left` coordinates.
5743
+ * The position is clamped to the viewport.
5744
+ */
5745
+ setPosition(position) {
5746
+ const popupElement = this.popupComponent?.container.nativeElement;
5747
+ const popupRect = isDocumentAvailable() && popupElement ? popupElement.getBoundingClientRect() : undefined;
5748
+ this._dragOffset.set(this.clampToViewport(position.left, position.top, popupRect?.width ?? 0, popupRect?.height ?? 0));
5749
+ }
5750
+ messageFor(key) {
5751
+ return this.localization.get(key);
5752
+ }
5753
+ handlePress(ev) {
5754
+ if (this.keyboardMoveOrigin()) {
5755
+ this.finishKeyboardMoveMode();
5756
+ }
5757
+ if (!ev.isTouch) {
5758
+ ev.originalEvent?.preventDefault();
5759
+ }
5760
+ // Recorded on press so the first move keeps its own pointer delta.
5761
+ const { left, top } = this.currentPosition();
5762
+ const { width, height } = this.popupComponent.container.nativeElement.getBoundingClientRect();
5763
+ this.pointerDrag = { startLeft: left, startTop: top, clientX: ev.clientX, clientY: ev.clientY, width, height, started: false };
5764
+ }
5765
+ handleDrag(ev) {
5766
+ const drag = this.pointerDrag;
5767
+ if (!drag) {
5768
+ return;
5769
+ }
5770
+ if (!drag.started) {
5771
+ const start = { left: drag.startLeft, top: drag.startTop };
5772
+ const allowed = !hasObservers(this.dragStart) || this.ngZone.run(() => this.emitDragStart(start));
5773
+ if (!allowed) {
5774
+ this.pointerDrag = null;
5775
+ return;
5776
+ }
5777
+ drag.started = true;
5778
+ this.pointerDragging.set(true);
5779
+ }
5780
+ this.updatePositionAndEmitMove(this.clampToViewport(drag.startLeft + ev.clientX - drag.clientX, drag.startTop + ev.clientY - drag.clientY, drag.width, drag.height));
5781
+ }
5782
+ handleRelease() {
5783
+ const dragStarted = this.pointerDrag?.started;
5784
+ this.pointerDrag = null;
5785
+ this.pointerDragging.set(false);
5786
+ if (dragStarted && hasObservers(this.dragEnd)) {
5787
+ const { left, top } = this.currentPosition();
5788
+ this.ngZone.run(() => this.dragEnd.emit(new FloatingToolBarDragEndEvent(this, top, left)));
5789
+ }
5790
+ }
5791
+ get containerElement() {
5792
+ return isDocumentAvailable() ? this.hostElement.nativeElement.parentElement ?? undefined : undefined;
5793
+ }
5794
+ updatePopupSize() {
5795
+ const popupElement = this.popupComponent?.contentContainer?.nativeElement;
5796
+ if (!popupElement) {
5797
+ return;
5798
+ }
5799
+ const width = this._width();
5800
+ if (isPresent$1(width)) {
5801
+ this.renderer.setStyle(popupElement, 'width', width);
5802
+ }
5803
+ else {
5804
+ this.renderer.removeStyle(popupElement, 'width');
5805
+ }
5806
+ const maxWidth = this._maxWidth();
5807
+ if (isPresent$1(maxWidth)) {
5808
+ this.renderer.setStyle(popupElement, 'max-width', maxWidth);
5809
+ }
5810
+ else {
5811
+ this.renderer.removeStyle(popupElement, 'max-width');
5812
+ }
5813
+ }
5814
+ restoreFocus() {
5815
+ if (!this.isFocusWithinComponent || !this.focusReturnTarget?.isConnected) {
5816
+ return;
5817
+ }
5818
+ const active = document.activeElement;
5819
+ const isFocusTargetWithinComponent = containsFocusTarget(active, this.hostElement.nativeElement, this.toolbarComponent?.popupRef?.popupElement);
5820
+ if (!active || active === document.body || isFocusTargetWithinComponent) {
5821
+ this.focusReturnTarget.focus();
5822
+ }
5823
+ }
5824
+ cancelActiveDrag() {
5825
+ const hasActiveDrag = this.keyboardMoveOrigin() !== null || this.pointerDrag?.started;
5826
+ const position = hasActiveDrag ? this.currentPosition() : null;
5827
+ this.keyboardMoveOrigin.set(null);
5828
+ this.pointerDrag = null;
5829
+ this.pointerDragging.set(false);
5830
+ if (position) {
5831
+ afterNextRender(() => {
5832
+ if (hasObservers(this.dragEnd)) {
5833
+ this.ngZone.run(() => this.dragEnd.emit(new FloatingToolBarDragEndEvent(this, position.top, position.left)));
5834
+ }
5835
+ }, { injector: this.injector });
5836
+ }
5837
+ }
5838
+ focusFirstTool() {
5839
+ this.projectedTools?.find((item) => item.canFocus() && !item.overflows)?.focus();
5840
+ }
5841
+ onFocusIn(ev) {
5842
+ const related = ev.relatedTarget;
5843
+ const isFocusTargetWithinComponent = containsFocusTarget(related, this.hostElement.nativeElement, this.toolbarComponent?.popupRef?.popupElement);
5844
+ if (!this.isFocusWithinComponent && related && !isFocusTargetWithinComponent) {
5845
+ this.focusReturnTarget = related;
5846
+ }
5847
+ this.isFocusWithinComponent = true;
5848
+ if (ev.target === this.toolbarComponent?.element.nativeElement) {
5849
+ this.focusFirstTool();
5850
+ }
5851
+ if (this.keyboardMoveOrigin() && ev.target !== this.dragHandle?.nativeElement) {
5852
+ this.finishKeyboardMoveMode();
5853
+ }
5854
+ }
5855
+ onFocusOut(ev) {
5856
+ const hostEl = this.hostElement.nativeElement;
5857
+ const related = ev.relatedTarget;
5858
+ if (related) {
5859
+ this.isFocusWithinComponent = containsFocusTarget(related, hostEl, this.toolbarComponent?.popupRef?.popupElement);
5860
+ if (!hostEl.contains(related)) {
5861
+ this.finishKeyboardMoveMode();
5862
+ }
5863
+ return;
5864
+ }
5865
+ this.ngZone.runOutsideAngular(() => {
5866
+ setTimeout(() => {
5867
+ if (hostEl.isConnected && !containsFocusTarget(document.activeElement, hostEl, this.toolbarComponent?.popupRef?.popupElement)) {
5868
+ this.isFocusWithinComponent = false;
5869
+ this.finishKeyboardMoveMode();
5870
+ }
5871
+ });
5872
+ });
5873
+ }
5874
+ onKeydown(ev) {
5875
+ if (!this.draggable) {
5876
+ return;
5877
+ }
5878
+ const onHandle = ev.target === this.dragHandle?.nativeElement;
5879
+ const key = normalizeKeys(ev);
5880
+ if (this.keyboardMoveOrigin()) {
5881
+ if (onHandle) {
5882
+ this.handleMoveModeKey(ev, key);
5883
+ }
5884
+ return;
5885
+ }
5886
+ const isMoveCommand = key === Keys.KeyM && !ev.ctrlKey && !ev.altKey && !ev.metaKey && !isEditableTarget(ev.target);
5887
+ if (isMoveCommand) {
5888
+ this.enterKeyboardMoveMode(ev, onHandle);
5889
+ }
5890
+ }
5891
+ enterKeyboardMoveMode(ev, onHandle) {
5892
+ const start = this.currentPosition();
5893
+ this.ngZone.run(() => {
5894
+ if (!this.emitDragStart(start)) {
5895
+ return;
5896
+ }
5897
+ preventDefaultAndStopPropagation(ev);
5898
+ this.preMoveDragOffset = this._dragOffset();
5899
+ this.keyboardMoveOrigin.set(start);
5900
+ if (!onHandle) {
5901
+ this.dragHandle?.nativeElement.focus();
5902
+ }
5903
+ });
5904
+ }
5905
+ handleMoveModeKey(ev, key) {
5906
+ const delta = ARROW_DELTAS[ev.key];
5907
+ if (delta) {
5908
+ preventDefaultAndStopPropagation(ev);
5909
+ const current = this.currentPosition();
5910
+ const { width, height } = this.popupComponent.container.nativeElement.getBoundingClientRect();
5911
+ this.updatePositionAndEmitMove(this.clampToViewport(current.left + delta.left, current.top + delta.top, width, height));
5912
+ }
5913
+ else if (key === Keys.Enter || key === Keys.Space) {
5914
+ preventDefaultAndStopPropagation(ev);
5915
+ this.finishKeyboardMoveMode();
5916
+ }
5917
+ else if (key === Keys.Escape) {
5918
+ preventDefaultAndStopPropagation(ev);
5919
+ this.cancelKeyboardMoveMode();
5920
+ }
5921
+ }
5922
+ finishKeyboardMoveMode() {
5923
+ if (!this.keyboardMoveOrigin()) {
5924
+ return;
5925
+ }
5926
+ const { left, top } = this.currentPosition();
5927
+ this.ngZone.run(() => {
5928
+ this.keyboardMoveOrigin.set(null);
5929
+ this.dragEnd.emit(new FloatingToolBarDragEndEvent(this, top, left));
5930
+ });
5931
+ }
5932
+ cancelKeyboardMoveMode() {
5933
+ const origin = this.keyboardMoveOrigin();
5934
+ if (!origin) {
5935
+ return;
5936
+ }
5937
+ const current = this.currentPosition();
5938
+ const moved = current.left !== origin.left || current.top !== origin.top;
5939
+ this.ngZone.run(() => {
5940
+ this.keyboardMoveOrigin.set(null);
5941
+ this._dragOffset.set(this.preMoveDragOffset);
5942
+ if (moved) {
5943
+ this.move.emit(new FloatingToolBarMoveEvent(this, origin.top, origin.left));
5944
+ }
5945
+ this.dragEnd.emit(new FloatingToolBarDragEndEvent(this, origin.top, origin.left));
5946
+ });
5947
+ }
5948
+ emitDragStart({ left, top }) {
5949
+ const event = new FloatingToolBarDragStartEvent(this, top, left);
5950
+ this.dragStart.emit(event);
5951
+ return !event.isDefaultPrevented();
5952
+ }
5953
+ updatePositionAndEmitMove(position) {
5954
+ this._dragOffset.set(position);
5955
+ if (hasObservers(this.move)) {
5956
+ this.ngZone.run(() => this.move.emit(new FloatingToolBarMoveEvent(this, position.top, position.left)));
5957
+ }
5958
+ }
5959
+ currentPosition() {
5960
+ const dragged = this._dragOffset();
5961
+ if (dragged) {
5962
+ return dragged;
5963
+ }
5964
+ const popupElement = this.popupComponent.container.nativeElement;
5965
+ const { left, top } = popupElement.style;
5966
+ const position = { left: parseFloat(left) || 0, top: parseFloat(top) || 0 };
5967
+ if (this.popupPositionMode() === 'absolute' && popupElement.offsetParent) {
5968
+ return position;
5969
+ }
5970
+ const scrollX = isDocumentAvailable() ? window.scrollX || 0 : 0;
5971
+ const scrollY = isDocumentAvailable() ? window.scrollY || 0 : 0;
5972
+ return { left: position.left + scrollX, top: position.top + scrollY };
5973
+ }
5974
+ clampToViewport(left, top, width, height) {
5975
+ if (!isDocumentAvailable()) {
5976
+ return { left, top };
5977
+ }
5978
+ const popupElement = this.popupComponent?.container.nativeElement;
5979
+ const offsetParent = (popupElement?.offsetParent ?? this.hostElement.nativeElement.offsetParent);
5980
+ const { clientWidth, clientHeight } = document.documentElement;
5981
+ const viewport = {
5982
+ width: clientWidth || window.innerWidth,
5983
+ height: clientHeight || window.innerHeight,
5984
+ scrollX: window.scrollX || 0,
5985
+ scrollY: window.scrollY || 0
5986
+ };
5987
+ return clampToBounds({ left, top }, { width, height }, viewport, getPositioningOrigin(offsetParent));
5988
+ }
5989
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: FloatingToolBarComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
5990
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.32", type: FloatingToolBarComponent, isStandalone: true, selector: "kendo-floatingtoolbar", inputs: { anchor: "anchor", position: "position", containerAlign: "containerAlign", margin: "margin", width: "width", maxWidth: "maxWidth", overflow: "overflow", size: "size", fillMode: "fillMode", draggable: "draggable", ariaLabel: "ariaLabel" }, outputs: { dragStart: "dragStart", move: "move", dragEnd: "dragEnd" }, host: { properties: { "attr.dir": "this.direction" } }, providers: [
5991
+ LocalizationService,
5992
+ { provide: L10N_PREFIX, useValue: 'kendo.floatingtoolbar' },
5993
+ provideComponentName('floatingtoolbar'),
5994
+ // Re-projected tools resolve their ToolBar host through this element injector.
5995
+ { provide: ToolBarComponent, useExisting: forwardRef(() => FloatingToolBarComponent) }
5996
+ ], queries: [{ propertyName: "projectedTools", predicate: ToolBarToolComponent }], viewQueries: [{ propertyName: "popupComponent", first: true, predicate: PopupComponent, descendants: true }, { propertyName: "toolbarComponent", first: true, predicate: ToolBarComponent, descendants: true }, { propertyName: "dragHandle", first: true, predicate: ["dragHandle"], descendants: true }], exportAs: ["kendoFloatingToolBar"], ngImport: i0, template: `
5997
+ <ng-container kendoFloatingToolBarLocalizedMessages
5998
+ i18n-dragHandleTitle="kendo.floatingtoolbar.dragHandleTitle|The title of the drag handle of the FloatingToolBar"
5999
+ dragHandleTitle="Drag to reposition"
6000
+ i18n-moreToolsTitle="kendo.floatingtoolbar.moreToolsTitle|The title of the More Tools button in the hosted FloatingToolBar"
6001
+ moreToolsTitle="More tools"
6002
+ i18n-previousToolButton="kendo.floatingtoolbar.previousToolButton|The title of the previous scroll button in the hosted FloatingToolBar"
6003
+ previousToolButton="Scroll left"
6004
+ i18n-nextToolButton="kendo.floatingtoolbar.nextToolButton|The title of the next scroll button in the hosted FloatingToolBar"
6005
+ nextToolButton="Scroll right">
6006
+ </ng-container>
6007
+ <kendo-popup #popup
6008
+ [animate]="false"
6009
+ [positionMode]="popupPositionMode()"
6010
+ [popupClass]="popupClass()"
6011
+ [anchor]="popupPosition().anchor"
6012
+ [offset]="popupPosition().offset"
6013
+ [anchorAlign]="popupPosition().anchorAlign"
6014
+ [popupAlign]="popupPosition().popupAlign"
6015
+ [collision]="popupPosition().collision"
6016
+ [margin]="popupPosition().margin">
6017
+ @if (draggable) {
6018
+ <div #dragHandle
6019
+ class="k-floating-toolbar-drag-handle k-touch-action-none"
6020
+ role="button"
6021
+ tabindex="0"
6022
+ [attr.aria-label]="dragHandleTitle"
6023
+ [attr.aria-pressed]="moveMode()"
6024
+ kendoDraggable
6025
+ (kendoPress)="handlePress($event)"
6026
+ (kendoDrag)="handleDrag($event)"
6027
+ (kendoRelease)="handleRelease()">
6028
+ <kendo-icon-wrapper name="handle-drag-dots" [svgIcon]="dragHandleIcon"></kendo-icon-wrapper>
6029
+ </div>
6030
+ <div class="k-separator k-separator-vertical"></div>
6031
+ }
6032
+ <kendo-toolbar
6033
+ [size]="size"
6034
+ [fillMode]="fillMode"
6035
+ [overflow]="overflow"
6036
+ [attr.aria-label]="ariaLabel"
6037
+ [toolsSource]="projectedTools">
6038
+ <kendo-toolbar-messages
6039
+ [moreToolsTitle]="messageFor('moreToolsTitle')"
6040
+ [previousToolButton]="messageFor('previousToolButton')"
6041
+ [nextToolButton]="messageFor('nextToolButton')">
6042
+ </kendo-toolbar-messages>
6043
+ <ng-content></ng-content>
6044
+ </kendo-toolbar>
6045
+ </kendo-popup>
6046
+ `, isInline: true, dependencies: [{ kind: "component", type: PopupComponent, selector: "kendo-popup", inputs: ["animate", "anchor", "anchorAlign", "collision", "popupAlign", "copyAnchorStyles", "popupClass", "positionMode", "offset", "margin"], outputs: ["anchorViewportLeave", "close", "open", "positionChange"], exportAs: ["kendo-popup"] }, { kind: "component", type: ToolBarComponent, selector: "kendo-toolbar", inputs: ["overflow", "resizable", "popupSettings", "fillMode", "tabindex", "size", "tabIndex", "showIcon", "showText", "toolsSource"], outputs: ["open", "close"], exportAs: ["kendoToolBar"] }, { kind: "component", type: ToolbarCustomMessagesComponent, selector: "kendo-toolbar-messages" }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: LocalizedFloatingToolBarMessagesDirective, selector: "[kendoFloatingToolBarLocalizedMessages]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6047
+ }
6048
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: FloatingToolBarComponent, decorators: [{
6049
+ type: Component,
6050
+ args: [{
6051
+ selector: 'kendo-floatingtoolbar',
6052
+ exportAs: 'kendoFloatingToolBar',
6053
+ standalone: true,
6054
+ providers: [
6055
+ LocalizationService,
6056
+ { provide: L10N_PREFIX, useValue: 'kendo.floatingtoolbar' },
6057
+ provideComponentName('floatingtoolbar'),
6058
+ // Re-projected tools resolve their ToolBar host through this element injector.
6059
+ { provide: ToolBarComponent, useExisting: forwardRef(() => FloatingToolBarComponent) }
6060
+ ],
6061
+ changeDetection: ChangeDetectionStrategy.OnPush,
6062
+ imports: [PopupComponent, ToolBarComponent, ToolbarCustomMessagesComponent, IconWrapperComponent, DraggableDirective, LocalizedFloatingToolBarMessagesDirective],
6063
+ template: `
6064
+ <ng-container kendoFloatingToolBarLocalizedMessages
6065
+ i18n-dragHandleTitle="kendo.floatingtoolbar.dragHandleTitle|The title of the drag handle of the FloatingToolBar"
6066
+ dragHandleTitle="Drag to reposition"
6067
+ i18n-moreToolsTitle="kendo.floatingtoolbar.moreToolsTitle|The title of the More Tools button in the hosted FloatingToolBar"
6068
+ moreToolsTitle="More tools"
6069
+ i18n-previousToolButton="kendo.floatingtoolbar.previousToolButton|The title of the previous scroll button in the hosted FloatingToolBar"
6070
+ previousToolButton="Scroll left"
6071
+ i18n-nextToolButton="kendo.floatingtoolbar.nextToolButton|The title of the next scroll button in the hosted FloatingToolBar"
6072
+ nextToolButton="Scroll right">
6073
+ </ng-container>
6074
+ <kendo-popup #popup
6075
+ [animate]="false"
6076
+ [positionMode]="popupPositionMode()"
6077
+ [popupClass]="popupClass()"
6078
+ [anchor]="popupPosition().anchor"
6079
+ [offset]="popupPosition().offset"
6080
+ [anchorAlign]="popupPosition().anchorAlign"
6081
+ [popupAlign]="popupPosition().popupAlign"
6082
+ [collision]="popupPosition().collision"
6083
+ [margin]="popupPosition().margin">
6084
+ @if (draggable) {
6085
+ <div #dragHandle
6086
+ class="k-floating-toolbar-drag-handle k-touch-action-none"
6087
+ role="button"
6088
+ tabindex="0"
6089
+ [attr.aria-label]="dragHandleTitle"
6090
+ [attr.aria-pressed]="moveMode()"
6091
+ kendoDraggable
6092
+ (kendoPress)="handlePress($event)"
6093
+ (kendoDrag)="handleDrag($event)"
6094
+ (kendoRelease)="handleRelease()">
6095
+ <kendo-icon-wrapper name="handle-drag-dots" [svgIcon]="dragHandleIcon"></kendo-icon-wrapper>
6096
+ </div>
6097
+ <div class="k-separator k-separator-vertical"></div>
6098
+ }
6099
+ <kendo-toolbar
6100
+ [size]="size"
6101
+ [fillMode]="fillMode"
6102
+ [overflow]="overflow"
6103
+ [attr.aria-label]="ariaLabel"
6104
+ [toolsSource]="projectedTools">
6105
+ <kendo-toolbar-messages
6106
+ [moreToolsTitle]="messageFor('moreToolsTitle')"
6107
+ [previousToolButton]="messageFor('previousToolButton')"
6108
+ [nextToolButton]="messageFor('nextToolButton')">
6109
+ </kendo-toolbar-messages>
6110
+ <ng-content></ng-content>
6111
+ </kendo-toolbar>
6112
+ </kendo-popup>
6113
+ `
6114
+ }]
6115
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Injector }, { type: i0.Renderer2 }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }], propDecorators: { projectedTools: [{
6116
+ type: ContentChildren,
6117
+ args: [ToolBarToolComponent]
6118
+ }], popupComponent: [{
6119
+ type: ViewChild,
6120
+ args: [PopupComponent]
6121
+ }], toolbarComponent: [{
6122
+ type: ViewChild,
6123
+ args: [ToolBarComponent]
6124
+ }], dragHandle: [{
6125
+ type: ViewChild,
6126
+ args: ['dragHandle']
6127
+ }], anchor: [{
6128
+ type: Input
6129
+ }], position: [{
6130
+ type: Input
6131
+ }], containerAlign: [{
6132
+ type: Input
6133
+ }], margin: [{
6134
+ type: Input
6135
+ }], width: [{
6136
+ type: Input
6137
+ }], maxWidth: [{
6138
+ type: Input
6139
+ }], overflow: [{
6140
+ type: Input
6141
+ }], size: [{
6142
+ type: Input
6143
+ }], fillMode: [{
6144
+ type: Input
6145
+ }], draggable: [{
6146
+ type: Input
6147
+ }], ariaLabel: [{
6148
+ type: Input
6149
+ }], dragStart: [{
6150
+ type: Output
6151
+ }], move: [{
6152
+ type: Output
6153
+ }], dragEnd: [{
6154
+ type: Output
6155
+ }], direction: [{
6156
+ type: HostBinding,
6157
+ args: ['attr.dir']
6158
+ }] } });
6159
+
6160
+ /**
6161
+ * Represents the custom messages component of the FloatingToolBar.
6162
+ *
6163
+ * Use this component to override default messages for the FloatingToolBar.
6164
+ *
6165
+ * @example
6166
+ * ```html
6167
+ * <kendo-floatingtoolbar>
6168
+ * <kendo-floatingtoolbar-messages
6169
+ * dragHandleTitle="Drag to reposition">
6170
+ * </kendo-floatingtoolbar-messages>
6171
+ * </kendo-floatingtoolbar>
6172
+ * ```
6173
+ */
6174
+ class FloatingToolBarCustomMessagesComponent extends FloatingToolBarMessages {
6175
+ service;
6176
+ constructor(service) {
6177
+ super();
6178
+ this.service = service;
6179
+ }
6180
+ get override() {
6181
+ return true;
6182
+ }
6183
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: FloatingToolBarCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
6184
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.32", type: FloatingToolBarCustomMessagesComponent, isStandalone: true, selector: "kendo-floatingtoolbar-messages", providers: [
6185
+ {
6186
+ provide: FloatingToolBarMessages,
6187
+ useExisting: forwardRef(() => FloatingToolBarCustomMessagesComponent)
6188
+ }
6189
+ ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
6190
+ }
6191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: FloatingToolBarCustomMessagesComponent, decorators: [{
6192
+ type: Component,
6193
+ args: [{
6194
+ providers: [
6195
+ {
6196
+ provide: FloatingToolBarMessages,
6197
+ useExisting: forwardRef(() => FloatingToolBarCustomMessagesComponent)
6198
+ }
6199
+ ],
6200
+ selector: 'kendo-floatingtoolbar-messages',
6201
+ template: ``,
6202
+ standalone: true
6203
+ }]
6204
+ }], ctorParameters: () => [{ type: i1.LocalizationService }] });
6205
+
5213
6206
  /**
5214
6207
  * Use this utility array to access all `@progress/kendo-angular-toolbar`-related components and directives in a standalone Angular component.
5215
6208
  *
@@ -5240,7 +6233,9 @@ const KENDO_TOOLBAR = [
5240
6233
  ToolBarSeparatorComponent,
5241
6234
  ToolBarSpacerComponent,
5242
6235
  ToolBarSplitButtonComponent,
5243
- ToolBarToolComponent
6236
+ ToolBarToolComponent,
6237
+ FloatingToolBarComponent,
6238
+ FloatingToolBarCustomMessagesComponent
5244
6239
  ];
5245
6240
 
5246
6241
  // IMPORTANT: NgModule export kept for backwards compatibility
@@ -5259,8 +6254,8 @@ const KENDO_TOOLBAR = [
5259
6254
  */
5260
6255
  class ToolBarModule {
5261
6256
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: ToolBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5262
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.32", ngImport: i0, type: ToolBarModule, imports: [ToolBarComponent, ToolbarCustomMessagesComponent, ToolBarButtonComponent, ToolBarButtonGroupComponent, ToolBarDropDownButtonComponent, ToolBarSeparatorComponent, ToolBarSpacerComponent, ToolBarSplitButtonComponent, ToolBarToolComponent], exports: [ToolBarComponent, ToolbarCustomMessagesComponent, ToolBarButtonComponent, ToolBarButtonGroupComponent, ToolBarDropDownButtonComponent, ToolBarSeparatorComponent, ToolBarSpacerComponent, ToolBarSplitButtonComponent, ToolBarToolComponent] });
5263
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: ToolBarModule, providers: [IconsService, PopupService, ResizeBatchService], imports: [ToolBarComponent, ToolBarButtonComponent, ToolBarButtonGroupComponent, ToolBarDropDownButtonComponent, ToolBarSplitButtonComponent] });
6257
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.32", ngImport: i0, type: ToolBarModule, imports: [ToolBarComponent, ToolbarCustomMessagesComponent, ToolBarButtonComponent, ToolBarButtonGroupComponent, ToolBarDropDownButtonComponent, ToolBarSeparatorComponent, ToolBarSpacerComponent, ToolBarSplitButtonComponent, ToolBarToolComponent, FloatingToolBarComponent, FloatingToolBarCustomMessagesComponent], exports: [ToolBarComponent, ToolbarCustomMessagesComponent, ToolBarButtonComponent, ToolBarButtonGroupComponent, ToolBarDropDownButtonComponent, ToolBarSeparatorComponent, ToolBarSpacerComponent, ToolBarSplitButtonComponent, ToolBarToolComponent, FloatingToolBarComponent, FloatingToolBarCustomMessagesComponent] });
6258
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: ToolBarModule, providers: [IconsService, PopupService, ResizeBatchService], imports: [ToolBarComponent, ToolBarButtonComponent, ToolBarButtonGroupComponent, ToolBarDropDownButtonComponent, ToolBarSplitButtonComponent, FloatingToolBarComponent] });
5264
6259
  }
5265
6260
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImport: i0, type: ToolBarModule, decorators: [{
5266
6261
  type: NgModule,
@@ -5275,5 +6270,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.32", ngImpo
5275
6270
  * Generated bundle index. Do not edit.
5276
6271
  */
5277
6272
 
5278
- export { KENDO_TOOLBAR, LocalizedToolbarMessagesDirective, RefreshService, ToolBarButtonComponent, ToolBarButtonGroupComponent, ToolBarComponent, ToolBarDropDownButtonComponent, ToolBarModule, ToolBarSeparatorComponent, ToolBarSpacerComponent, ToolBarSplitButtonComponent, ToolBarToolComponent, ToolbarCustomMessagesComponent };
6273
+ export { FloatingToolBarComponent, FloatingToolBarCustomMessagesComponent, FloatingToolBarDragEndEvent, FloatingToolBarDragStartEvent, FloatingToolBarMessages, FloatingToolBarMoveEvent, KENDO_TOOLBAR, LocalizedFloatingToolBarMessagesDirective, LocalizedToolbarMessagesDirective, RefreshService, ToolBarButtonComponent, ToolBarButtonGroupComponent, ToolBarComponent, ToolBarDropDownButtonComponent, ToolBarModule, ToolBarSeparatorComponent, ToolBarSpacerComponent, ToolBarSplitButtonComponent, ToolBarToolComponent, ToolbarCustomMessagesComponent };
5279
6274