@@ -27,7 +27,7 @@ import type ToolbarAlign from "./types/ToolbarAlign.js";
2727import type ToolbarDesign from "./types/ToolbarDesign.js" ;
2828import ToolbarItemOverflowBehavior from "./types/ToolbarItemOverflowBehavior.js" ;
2929
30- import type ToolbarItem from "./ToolbarItem .js" ;
30+ import type ToolbarItemBase from "./ToolbarItemBase .js" ;
3131import type ToolbarSeparator from "./ToolbarSeparator.js" ;
3232
3333import type Button from "./Button.js" ;
@@ -155,11 +155,11 @@ class Toolbar extends UI5Element {
155155 @slot ( {
156156 "default" : true , type : HTMLElement , invalidateOnChildChange : true , individualSlots : true ,
157157 } )
158- items ! : DefaultSlot < ToolbarItem >
158+ items ! : DefaultSlot < ToolbarItemBase >
159159
160160 _onResize ! : ResizeObserverCallback ;
161161 _onCloseOverflow ! : EventListener ;
162- itemsToOverflow : Array < ToolbarItem > = [ ] ;
162+ itemsToOverflow : Array < ToolbarItemBase > = [ ] ;
163163 itemsWidth = 0 ;
164164 minContentWidth = 0 ;
165165
@@ -194,11 +194,11 @@ class Toolbar extends UI5Element {
194194 }
195195
196196 get alwaysOverflowItems ( ) {
197- return this . items . filter ( ( item : ToolbarItem ) => item . overflowPriority === ToolbarItemOverflowBehavior . AlwaysOverflow ) ;
197+ return this . items . filter ( item => item . overflowPriority === ToolbarItemOverflowBehavior . AlwaysOverflow ) ;
198198 }
199199
200200 get movableItems ( ) {
201- return this . items . filter ( ( item : ToolbarItem ) => item . overflowPriority !== ToolbarItemOverflowBehavior . AlwaysOverflow && item . overflowPriority !== ToolbarItemOverflowBehavior . NeverOverflow ) ;
201+ return this . items . filter ( item => item . overflowPriority !== ToolbarItemOverflowBehavior . AlwaysOverflow && item . overflowPriority !== ToolbarItemOverflowBehavior . NeverOverflow ) ;
202202 }
203203
204204 get overflowItems ( ) {
@@ -216,7 +216,7 @@ class Toolbar extends UI5Element {
216216 }
217217
218218 get interactiveItems ( ) {
219- return this . items . filter ( ( item : ToolbarItem ) => item . isInteractive ) ;
219+ return this . items . filter ( ( item : ToolbarItemBase ) => item . isInteractive ) ;
220220 }
221221
222222 /**
@@ -264,7 +264,7 @@ class Toolbar extends UI5Element {
264264 }
265265
266266 get hasFlexibleSpacers ( ) {
267- return this . items . some ( ( item : ToolbarItem ) => item . hasFlexibleWidth ) ;
267+ return this . items . some ( ( item : ToolbarItemBase ) => item . hasFlexibleWidth ) ;
268268 }
269269
270270 /**
@@ -306,7 +306,7 @@ class Toolbar extends UI5Element {
306306 } ) ;
307307 }
308308
309- addItemsAdditionalProperties ( item : ToolbarItem ) {
309+ addItemsAdditionalProperties ( item : ToolbarItemBase ) {
310310 item . isOverflowed = this . overflowItems . indexOf ( item ) !== - 1 ;
311311 const itemWrapper = this . shadowRoot ! . querySelector ( `#${ item . _individualSlot } ` ) as HTMLElement ;
312312 if ( item . hasOverflow && ! item . isOverflowed && itemWrapper ) {
@@ -386,7 +386,7 @@ class Toolbar extends UI5Element {
386386 let totalWidth = 0 ,
387387 minWidth = 0 ;
388388
389- this . items . forEach ( ( item : ToolbarItem ) => {
389+ this . items . forEach ( item => {
390390 const itemWidth = this . getItemWidth ( item ) ;
391391 totalWidth += itemWidth ;
392392 if ( item . overflowPriority === ToolbarItemOverflowBehavior . NeverOverflow ) {
@@ -437,7 +437,7 @@ class Toolbar extends UI5Element {
437437 }
438438
439439 distributeItemsThatAlwaysOverflow ( ) {
440- this . alwaysOverflowItems . forEach ( ( item : ToolbarItem ) => {
440+ this . alwaysOverflowItems . forEach ( ( item : ToolbarItemBase ) => {
441441 this . itemsToOverflow . push ( item ) ;
442442 } ) ;
443443 }
@@ -450,7 +450,7 @@ class Toolbar extends UI5Element {
450450 } ) ;
451451 }
452452
453- shouldShowSeparatorInOverflow ( separatorIdx : number , overflowItems : Array < ToolbarItem > ) {
453+ shouldShowSeparatorInOverflow ( separatorIdx : number , overflowItems : Array < ToolbarItemBase > ) {
454454 let foundPrevNonSeparatorItem = false ;
455455 let foundNextNonSeperatorItem = false ;
456456
@@ -514,7 +514,7 @@ class Toolbar extends UI5Element {
514514 this . contentWidth = 0 ; // re-render
515515 }
516516
517- getItemWidth ( item : ToolbarItem ) : number {
517+ getItemWidth ( item : ToolbarItemBase ) : number {
518518 // Spacer width - always 0 for flexible spacers, so that they shrink, otherwise - measure the width normally
519519 if ( item . ignoreSpace || item . isSeparator ) {
520520 return 0 ;
0 commit comments