@@ -2,6 +2,7 @@ import Bootstrap from "@ui5/webcomponents-base/src/Bootstrap";
2
2
import { getRTL } from "@ui5/webcomponents-base/src/Configuration" ;
3
3
import URI from "@ui5/webcomponents-base/src/types/URI" ;
4
4
import WebComponent from "@ui5/webcomponents-base/src/WebComponent" ;
5
+ import Function from "@ui5/webcomponents-base/src/types/Function" ;
5
6
import { addCustomCSS } from "@ui5/webcomponents-base/src/theming/CustomStyle" ;
6
7
import ResizeHandler from "@ui5/webcomponents-base/src/delegate/ResizeHandler" ;
7
8
import ItemNavigation from "@ui5/webcomponents-base/src/delegate/ItemNavigation" ;
@@ -136,6 +137,14 @@ const metadata = {
136
137
_header : {
137
138
type : Object ,
138
139
} ,
140
+
141
+ _logoPress : {
142
+ type : Function ,
143
+ } ,
144
+
145
+ _coPilotPress : {
146
+ type : Function ,
147
+ } ,
139
148
} ,
140
149
141
150
slots : /** @lends sap.ui.webcomponents.main.ShellBar.prototype */ {
@@ -231,6 +240,32 @@ const metadata = {
231
240
targetRef : { type : HTMLElement } ,
232
241
} ,
233
242
} ,
243
+
244
+ /**
245
+ * Fired, when the logo is pressed.
246
+ *
247
+ * @event
248
+ * @param {HTMLElement } targetRef dom ref of the clicked element
249
+ * @public
250
+ */
251
+ logoPress : {
252
+ detail : {
253
+ targetRef : { type : HTMLElement } ,
254
+ } ,
255
+ } ,
256
+
257
+ /**
258
+ * Fired, when the co pilot is pressed.
259
+ *
260
+ * @event
261
+ * @param {HTMLElement } targetRef dom ref of the clicked element
262
+ * @public
263
+ */
264
+ coPilotPress : {
265
+ detail : {
266
+ targetRef : { type : HTMLElement } ,
267
+ } ,
268
+ } ,
234
269
} ,
235
270
} ;
236
271
@@ -374,6 +409,18 @@ class ShellBar extends WebComponent {
374
409
this . shadowRoot . querySelector ( "ui5-popover" ) . close ( ) ;
375
410
this . _overflowActions ( ) ;
376
411
} ;
412
+
413
+ this . _logoPress = event => {
414
+ this . fireEvent ( "logoPress" , {
415
+ targetRef : this . shadowRoot . querySelector ( ".sapWCShellBarLogo" ) ,
416
+ } ) ;
417
+ } ;
418
+
419
+ this . _coPilotPress = event => {
420
+ this . fireEvent ( "coPilotPress" , {
421
+ targetRef : this . shadowRoot . querySelector ( ".ui5-shellbar-coPilot" ) ,
422
+ } ) ;
423
+ } ;
377
424
}
378
425
379
426
onBeforeRendering ( ) {
0 commit comments