packages/main/src/ShellBar.js
/**
	 * Returns all items that will be placed in the right of the bar as icons / dom elements.
	 * @param {Boolean} showOverflowButton Determines if overflow button should be visible (not overflowing)
	 */
Returns all items that will be placed in the right of the bar as icons / dom elements.
@param {Boolean} showOverflowButton Determines if overflow button should be visible (not overflowing)
Returns all items that will be placed in the right of the bar as icons / dom elements . @param { Boolean } showOverflowButton Determines if overflow button should be visible ( not overflowing )
_getAllItems(showOverflowButton) {
		let domOrder = -1;
		const items = [
			{
				src: "sap-icon://search",
				text: "Search",
				classes: `${this.searchField ? "" : "sapWCShellBarUnsetIcon"} sapWCShellBarSearchIcon sapWCShellBarIconButton`,
				priority: 4,
				domOrder: this.searchField ? (++domOrder) : -1,
				style: `order: ${this.searchField ? 1 : -10}`,
				id: `${this._id}-item-${1}`,
				press: this._handleSearchIconPress.bind(this),
				_tabIndex: "-1",
			},
			...this.items.map((item, index) => {
				return {
					src: item.src,
					id: item._id,
					refItemid: item._id,
					text: item.text,
					classes: "sapWCShellBarItemCustomAction sapWCShellBarIconButton",
					priority: 1,
					domOrder: (++domOrder),
					style: `order: ${2}`,
					show: true,
					press: this._handleCustomActionPress.bind(this),
					_tabIndex: "-1",
				};
			}),
			{
				src: "sap-icon://bell",
				text: "Notifications",
				classes: `${this.showNotifications ? "" : "sapWCShellBarUnsetIcon"} sapWCShellBarBellIcon sapWCShellBarIconButton`,
				priority: 3,
				style: `order: ${this.showNotifications ? 3 : -10}`,
				id: `${this._id}-item-${2}`,
				show: this.showNotifications,
				domOrder: this.showNotifications ? (++domOrder) : -1,
				press: this._handleNotificationsPress.bind(this),
				_tabIndex: "-1",
			},
			{
				src: "sap-icon://overflow",
				text: "Overflow",
				classes: `${showOverflowButton ? "" : "sapWCShellBarHiddenIcon"} sapWCOverflowButtonShown sapWCShellBarOverflowIcon sapWCShellBarIconButton`,
				priority: 5,
				order: 4,
				style: `order: ${showOverflowButton ? 4 : -1}`,
				domOrder: showOverflowButton ? (++domOrder) : -1,
				id: `${this.id}-item-${5}`,
				press: this._handleOverflowPress.bind(this),
				_tabIndex: "-1",
				show: true,
			},
			{
				text: "Person",
				classes: `${this.profile ? "" : "sapWCShellBarUnsetIcon"} sapWCShellBarImageButton sapWCShellBarIconButton`,
				priority: 4,
				subclasses: "sapWCShellBarImageButtonImage",
				style: `order: ${this.profile ? 5 : -10};`,
				subStyles: `${this.profile ? `background-image: url(${this.profile})` : ""}`,
				id: `${this._id}-item-${3}`,
				domOrder: this.profile ? (++domOrder) : -1,
				show: this.profile,
				press: this._handleProfilePress.bind(this),
				_tabIndex: "-1",
			},
			{
				src: "sap-icon://grid",
				text: "Product Switch",
				classes: `${this.showProductSwitch ? "" : "sapWCShellBarUnsetIcon"} sapWCShellBarIconButton sapWCShellBarIconProductSwitch`,
				priority: 2,
				style: `order: ${this.showProductSwitch ? 6 : -10}`,
				id: `${this._id}-item-${4}`,
				show: this.showProductSwitch,
				domOrder: this.showProductSwitch ? (++domOrder) : -1,
				press: this._handleProductSwitchPress.bind(this),
				_tabIndex: "-1",
			},
		];
		return items;
	}
_getAllItems ( showOverflowButton ) { let domOrder = - 1 ; const items = [ { src : "sap-icon://search" , text : "Search" , classes : ` ${ this . searchField ? "" : "sapWCShellBarUnsetIcon" } ` , priority : 4 , domOrder : this . searchField ? ( ++ domOrder ) : - 1 , style : ` ${ this . searchField ? 1 : - 10 } ` , id : ` ${ this . _id } ${ 1 } ` , press : this . _handleSearchIconPress . bind ( this ) , _tabIndex : "-1" , } , ... this . items . map ( ( item , index ) => { return { src : item . src , id : item . _id , refItemid : item . _id , text : item . text , classes : "sapWCShellBarItemCustomAction sapWCShellBarIconButton" , priority : 1 , domOrder : ( ++ domOrder ) , style : ` ${ 2 } ` , show : true , press : this . _handleCustomActionPress . bind ( this ) , _tabIndex : "-1" , } ; } ) , { src : "sap-icon://bell" , text : "Notifications" , classes : ` ${ this . showNotifications ? "" : "sapWCShellBarUnsetIcon" } ` , priority : 3 , style : ` ${ this . showNotifications ? 3 : - 10 } ` , id : ` ${ this . _id } ${ 2 } ` , show : this . showNotifications , domOrder : this . showNotifications ? ( ++ domOrder ) : - 1 , press : this . _handleNotificationsPress . bind ( this ) , _tabIndex : "-1" , } , { src : "sap-icon://overflow" , text : "Overflow" , classes : ` ${ showOverflowButton ? "" : "sapWCShellBarHiddenIcon" } ` , priority : 5 , order : 4 , style : ` ${ showOverflowButton ? 4 : - 1 } ` , domOrder : showOverflowButton ? ( ++ domOrder ) : - 1 , id : ` ${ this . id } ${ 5 } ` , press : this . _handleOverflowPress . bind ( this ) , _tabIndex : "-1" , show : true , } , { text : "Person" , classes : ` ${ this . profile ? "" : "sapWCShellBarUnsetIcon" } ` , priority : 4 , subclasses : "sapWCShellBarImageButtonImage" , style : ` ${ this . profile ? 5 : - 10 } ` , subStyles : ` ${ this . profile ? ` ${ this . profile } ` : "" } ` , id : ` ${ this . _id } ${ 3 } ` , domOrder : this . profile ? ( ++ domOrder ) : - 1 , show : this . profile , press : this . _handleProfilePress . bind ( this ) , _tabIndex : "-1" , } , { src : "sap-icon://grid" , text : "Product Switch" , classes : ` ${ this . showProductSwitch ? "" : "sapWCShellBarUnsetIcon" } ` , priority : 2 , style : ` ${ this . showProductSwitch ? 6 : - 10 } ` , id : ` ${ this . _id } ${ 4 } ` , show : this . showProductSwitch , domOrder : this . showProductSwitch ? ( ++ domOrder ) : - 1 , press : this . _handleProductSwitchPress . bind ( this ) , _tabIndex : "-1" , } , ] ; return items ; }
Returns all items that will be placed in the right of the bar as icons / dom elements.
Returns all items that will be placed in the right of the bar as icons / dom elements .