@sapudex/web-components 0.230.2 → 0.231.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.
Files changed (230) hide show
  1. package/dist/MastheadCountrySelector.d.ts +3 -0
  2. package/dist/MastheadCountrySelector.js +8 -1
  3. package/dist/MastheadCountrySelector.js.map +1 -1
  4. package/dist/MastheadItem.d.ts +12 -1
  5. package/dist/MastheadItem.js +60 -8
  6. package/dist/MastheadItem.js.map +1 -1
  7. package/dist/MastheadMenu.d.ts +2 -1
  8. package/dist/MastheadMenu.js +19 -11
  9. package/dist/MastheadMenu.js.map +1 -1
  10. package/dist/MastheadMobileMenu.d.ts +4 -0
  11. package/dist/MastheadMobileMenu.js +55 -5
  12. package/dist/MastheadMobileMenu.js.map +1 -1
  13. package/dist/MastheadShell.js +4 -0
  14. package/dist/MastheadShell.js.map +1 -1
  15. package/dist/MediaPlayer.d.ts +310 -173
  16. package/dist/MediaPlayer.js +0 -1
  17. package/dist/MediaPlayer.js.map +1 -1
  18. package/dist/SecondaryNavigation.d.ts +10 -0
  19. package/dist/SecondaryNavigation.js +40 -0
  20. package/dist/SecondaryNavigation.js.map +1 -1
  21. package/dist/assets/{bundle.esm-edd066ac.js → bundle.esm-47166f9b.js} +147 -147
  22. package/dist/assets/messagebundle_ar-4acbb276.js +1 -0
  23. package/dist/assets/messagebundle_bg-76df681f.js +1 -0
  24. package/dist/assets/messagebundle_cs-5488afab.js +1 -0
  25. package/dist/assets/messagebundle_da-7b8fee05.js +1 -0
  26. package/dist/assets/messagebundle_de-6c3b79cd.js +1 -0
  27. package/dist/assets/messagebundle_el-6f926401.js +1 -0
  28. package/dist/assets/messagebundle_es-b32ec403.js +1 -0
  29. package/dist/assets/messagebundle_et-bac74fdc.js +1 -0
  30. package/dist/assets/messagebundle_fi-3485fac7.js +1 -0
  31. package/dist/assets/messagebundle_fr-4fea234b.js +1 -0
  32. package/dist/assets/messagebundle_hr-455c228f.js +1 -0
  33. package/dist/assets/messagebundle_hu-a8d556d9.js +1 -0
  34. package/dist/assets/messagebundle_it-014d7d0c.js +1 -0
  35. package/dist/assets/messagebundle_iw-630f53fd.js +1 -0
  36. package/dist/assets/messagebundle_ko-fd7c94a4.js +1 -0
  37. package/dist/assets/messagebundle_lt-93f8402d.js +1 -0
  38. package/dist/assets/messagebundle_lv-db65919a.js +1 -0
  39. package/dist/assets/messagebundle_nl-08fb0493.js +1 -0
  40. package/dist/assets/messagebundle_no-af05c854.js +1 -0
  41. package/dist/assets/messagebundle_pl-f65552a3.js +1 -0
  42. package/dist/assets/messagebundle_pt-c00237ba.js +1 -0
  43. package/dist/assets/messagebundle_ro-8387820d.js +1 -0
  44. package/dist/assets/messagebundle_ru-8aaf2b34.js +1 -0
  45. package/dist/assets/messagebundle_sk-bccab7cc.js +1 -0
  46. package/dist/assets/messagebundle_sl-9f2d28b6.js +1 -0
  47. package/dist/assets/messagebundle_sr-58be5960.js +1 -0
  48. package/dist/assets/messagebundle_sv-a0fbe175.js +1 -0
  49. package/dist/assets/messagebundle_tr-64ad7959.js +1 -0
  50. package/dist/assets/messagebundle_uk-7c63d422.js +1 -0
  51. package/dist/assets/messagebundle_zh_CN-6234699a.js +1 -0
  52. package/dist/assets/messagebundle_zh_TW-62cc17d9.js +1 -0
  53. package/dist/css/themes/MastheadItem.css +1 -1
  54. package/dist/css/themes/MastheadShell.css +1 -1
  55. package/dist/css/themes/Modal.css +1 -1
  56. package/dist/css/themes/RatingIndicator.css +1 -1
  57. package/dist/css/themes/Slider.css +1 -1
  58. package/dist/custom-elements-internal.json +91 -75
  59. package/dist/custom-elements.json +89 -75
  60. package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
  61. package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
  62. package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
  63. package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
  64. package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
  65. package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
  66. package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
  67. package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
  68. package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
  69. package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
  70. package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
  71. package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
  72. package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
  73. package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
  74. package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
  75. package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
  76. package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
  77. package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
  78. package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
  79. package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
  80. package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
  81. package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
  82. package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
  83. package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
  84. package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
  85. package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
  86. package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
  87. package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
  88. package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
  89. package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
  90. package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
  91. package/dist/generated/templates/MastheadItemTemplate.lit.js +6 -6
  92. package/dist/generated/templates/MastheadItemTemplate.lit.js.map +1 -1
  93. package/dist/generated/templates/MastheadMobileMenuTemplate.lit.js +11 -11
  94. package/dist/generated/templates/MastheadMobileMenuTemplate.lit.js.map +1 -1
  95. package/dist/generated/templates/SecondaryNavigationTemplate.lit.js +1 -1
  96. package/dist/generated/templates/SecondaryNavigationTemplate.lit.js.map +1 -1
  97. package/dist/generated/themes/MastheadItem.css.js +1 -1
  98. package/dist/generated/themes/MastheadItem.css.js.map +1 -1
  99. package/dist/generated/themes/MastheadShell.css.js +1 -1
  100. package/dist/generated/themes/MastheadShell.css.js.map +1 -1
  101. package/dist/generated/themes/Modal.css.js +1 -1
  102. package/dist/generated/themes/Modal.css.js.map +1 -1
  103. package/dist/generated/themes/RatingIndicator.css.js +1 -1
  104. package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
  105. package/dist/generated/themes/Slider.css.js +1 -1
  106. package/dist/generated/themes/Slider.css.js.map +1 -1
  107. package/dist/i18n/messagebundle_ar.properties +3 -0
  108. package/dist/i18n/messagebundle_bg.properties +3 -0
  109. package/dist/i18n/messagebundle_cs.properties +3 -0
  110. package/dist/i18n/messagebundle_da.properties +3 -0
  111. package/dist/i18n/messagebundle_de.properties +3 -0
  112. package/dist/i18n/messagebundle_el.properties +3 -0
  113. package/dist/i18n/messagebundle_es.properties +3 -0
  114. package/dist/i18n/messagebundle_et.properties +3 -0
  115. package/dist/i18n/messagebundle_fi.properties +3 -0
  116. package/dist/i18n/messagebundle_fr.properties +3 -0
  117. package/dist/i18n/messagebundle_hr.properties +3 -0
  118. package/dist/i18n/messagebundle_hu.properties +3 -0
  119. package/dist/i18n/messagebundle_it.properties +3 -0
  120. package/dist/i18n/messagebundle_iw.properties +3 -1
  121. package/dist/i18n/messagebundle_ko.properties +3 -0
  122. package/dist/i18n/messagebundle_lt.properties +3 -0
  123. package/dist/i18n/messagebundle_lv.properties +3 -0
  124. package/dist/i18n/messagebundle_nl.properties +3 -0
  125. package/dist/i18n/messagebundle_no.properties +3 -0
  126. package/dist/i18n/messagebundle_pl.properties +3 -0
  127. package/dist/i18n/messagebundle_pt.properties +3 -0
  128. package/dist/i18n/messagebundle_pt_BR.properties +3 -0
  129. package/dist/i18n/messagebundle_ro.properties +3 -0
  130. package/dist/i18n/messagebundle_ru.properties +3 -0
  131. package/dist/i18n/messagebundle_sk.properties +3 -0
  132. package/dist/i18n/messagebundle_sl.properties +3 -0
  133. package/dist/i18n/messagebundle_sr.properties +3 -1
  134. package/dist/i18n/messagebundle_sv.properties +3 -0
  135. package/dist/i18n/messagebundle_tr.properties +3 -0
  136. package/dist/i18n/messagebundle_uk.properties +3 -0
  137. package/dist/i18n/messagebundle_zh_CN.properties +3 -1
  138. package/dist/i18n/messagebundle_zh_TW.properties +3 -0
  139. package/dist/types/AnalyticsName.d.ts +2 -2
  140. package/dist/types/AnalyticsName.js +1 -1
  141. package/dist/types/AnalyticsName.js.map +1 -1
  142. package/dist/vscode.html-custom-data.json +1 -1
  143. package/dist/web-types.json +10 -2
  144. package/package.json +1 -1
  145. package/src/MastheadCountrySelector.ts +11 -1
  146. package/src/MastheadItem.hbs +23 -15
  147. package/src/MastheadItem.ts +76 -9
  148. package/src/MastheadMenu.ts +25 -12
  149. package/src/MastheadMobileMenu.hbs +12 -1
  150. package/src/MastheadMobileMenu.ts +61 -6
  151. package/src/MastheadShell.ts +4 -0
  152. package/src/MediaPlayer.ts +0 -1
  153. package/src/SecondaryNavigation.hbs +6 -1
  154. package/src/SecondaryNavigation.ts +51 -0
  155. package/src/generated/templates/MastheadItemTemplate.lit.ts +6 -6
  156. package/src/generated/templates/MastheadMobileMenuTemplate.lit.ts +11 -11
  157. package/src/generated/templates/SecondaryNavigationTemplate.lit.ts +1 -1
  158. package/src/generated/themes/MastheadItem.css.ts +1 -1
  159. package/src/generated/themes/MastheadShell.css.ts +1 -1
  160. package/src/generated/themes/Modal.css.ts +1 -1
  161. package/src/generated/themes/RatingIndicator.css.ts +1 -1
  162. package/src/generated/themes/Slider.css.ts +1 -1
  163. package/src/i18n/messagebundle_ar.properties +3 -0
  164. package/src/i18n/messagebundle_bg.properties +3 -0
  165. package/src/i18n/messagebundle_cs.properties +3 -0
  166. package/src/i18n/messagebundle_da.properties +3 -0
  167. package/src/i18n/messagebundle_de.properties +3 -0
  168. package/src/i18n/messagebundle_el.properties +3 -0
  169. package/src/i18n/messagebundle_es.properties +3 -0
  170. package/src/i18n/messagebundle_et.properties +3 -0
  171. package/src/i18n/messagebundle_fi.properties +3 -0
  172. package/src/i18n/messagebundle_fr.properties +3 -0
  173. package/src/i18n/messagebundle_hr.properties +3 -0
  174. package/src/i18n/messagebundle_hu.properties +3 -0
  175. package/src/i18n/messagebundle_it.properties +3 -0
  176. package/src/i18n/messagebundle_iw.properties +3 -1
  177. package/src/i18n/messagebundle_ko.properties +3 -0
  178. package/src/i18n/messagebundle_lt.properties +3 -0
  179. package/src/i18n/messagebundle_lv.properties +3 -0
  180. package/src/i18n/messagebundle_nl.properties +3 -0
  181. package/src/i18n/messagebundle_no.properties +3 -0
  182. package/src/i18n/messagebundle_pl.properties +3 -0
  183. package/src/i18n/messagebundle_pt.properties +3 -0
  184. package/src/i18n/messagebundle_pt_BR.properties +3 -0
  185. package/src/i18n/messagebundle_ro.properties +3 -0
  186. package/src/i18n/messagebundle_ru.properties +3 -0
  187. package/src/i18n/messagebundle_sk.properties +3 -0
  188. package/src/i18n/messagebundle_sl.properties +3 -0
  189. package/src/i18n/messagebundle_sr.properties +3 -1
  190. package/src/i18n/messagebundle_sv.properties +3 -0
  191. package/src/i18n/messagebundle_tr.properties +3 -0
  192. package/src/i18n/messagebundle_uk.properties +3 -0
  193. package/src/i18n/messagebundle_zh_CN.properties +3 -1
  194. package/src/i18n/messagebundle_zh_TW.properties +3 -0
  195. package/src/themes/MastheadItem.css +16 -0
  196. package/src/themes/MastheadShell.css +6 -1
  197. package/src/themes/Modal.css +2 -2
  198. package/src/types/AnalyticsName.ts +2 -2
  199. package/dist/assets/messagebundle_ar-bb470511.js +0 -1
  200. package/dist/assets/messagebundle_bg-a533dfab.js +0 -1
  201. package/dist/assets/messagebundle_cs-c70a7f36.js +0 -1
  202. package/dist/assets/messagebundle_da-e292cac5.js +0 -1
  203. package/dist/assets/messagebundle_de-5c108de6.js +0 -1
  204. package/dist/assets/messagebundle_el-44746e0b.js +0 -1
  205. package/dist/assets/messagebundle_es-c0c1060f.js +0 -1
  206. package/dist/assets/messagebundle_et-a5f15d3b.js +0 -1
  207. package/dist/assets/messagebundle_fi-f4b8eb82.js +0 -1
  208. package/dist/assets/messagebundle_fr-af18ac46.js +0 -1
  209. package/dist/assets/messagebundle_hr-d893e46d.js +0 -1
  210. package/dist/assets/messagebundle_hu-230c58c9.js +0 -1
  211. package/dist/assets/messagebundle_it-5bf1436c.js +0 -1
  212. package/dist/assets/messagebundle_iw-dd60afc4.js +0 -1
  213. package/dist/assets/messagebundle_ko-c450bda3.js +0 -1
  214. package/dist/assets/messagebundle_lt-87ab0529.js +0 -1
  215. package/dist/assets/messagebundle_lv-fc413852.js +0 -1
  216. package/dist/assets/messagebundle_nl-34d7e236.js +0 -1
  217. package/dist/assets/messagebundle_no-f22648fb.js +0 -1
  218. package/dist/assets/messagebundle_pl-10303f09.js +0 -1
  219. package/dist/assets/messagebundle_pt-b7a40c67.js +0 -1
  220. package/dist/assets/messagebundle_ro-94628623.js +0 -1
  221. package/dist/assets/messagebundle_ru-1f6595ba.js +0 -1
  222. package/dist/assets/messagebundle_sk-89eabac1.js +0 -1
  223. package/dist/assets/messagebundle_sl-d56532f1.js +0 -1
  224. package/dist/assets/messagebundle_sr-cf7f3b32.js +0 -1
  225. package/dist/assets/messagebundle_sv-3a3b20d3.js +0 -1
  226. package/dist/assets/messagebundle_tr-33b16d09.js +0 -1
  227. package/dist/assets/messagebundle_uk-82e1f2c1.js +0 -1
  228. package/dist/assets/messagebundle_zh_CN-15ca05aa.js +0 -1
  229. package/dist/assets/messagebundle_zh_TW-ad6445e7.js +0 -1
  230. package/dist/assets/play-a1304ca2.svg +0 -3
@@ -10,6 +10,7 @@ import "@ui5/webcomponents-icons/dist/search.js";
10
10
  import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
11
11
  import { isEscape } from "@ui5/webcomponents-base/dist/Keys.js";
12
12
  import { isDesktop } from "@ui5/webcomponents-base/dist/Device.js";
13
+ import { getFirstFocusableElement } from "@ui5/webcomponents-base/dist/util/FocusableElements.js";
13
14
  import {
14
15
  OPENS_IN_A_NEW_WINDOW, PROFILE, CART, COUNTRY_SELECTOR, SUPPORT, SEARCH,
15
16
  } from "./generated/i18n/i18n-defaults.js";
@@ -17,10 +18,11 @@ import UDExMastheadMenu from "./MastheadMenu.js";
17
18
  import UDExAvatar from "./Avatar.js";
18
19
  import "@ui5/webcomponents-icons/dist/slim-arrow-down.js";
19
20
  import UDExMastheadShell from "./MastheadShell.js";
20
- import MastheadItemTemplate from "./generated/templates/MastheadItemTemplate.lit.js";
21
+ import UDExMastheadMenuItem from "./MastheadMenuItem.js";
21
22
  import { Target } from "./types/common.js";
22
23
  import { BreakpointUtils } from "./utils/Breakpoints.js";
23
24
  import AnalyticsName from "./types/AnalyticsName.js";
25
+ import MastheadItemTemplate from "./generated/templates/MastheadItemTemplate.lit.js";
24
26
 
25
27
  // Styles
26
28
  import MastheadItemCss from "./generated/themes/MastheadItem.css.js";
@@ -304,9 +306,11 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
304
306
  @slot({ type: HTMLElement, "default": true })
305
307
  content?: Array<HTMLElement>;
306
308
 
309
+ @property({ type: Boolean })
310
+ _preventFocusOut!: boolean;
311
+
307
312
  _profileAvatar!: UDExAvatar;
308
313
  _mastheadShell!: UDExMastheadShell;
309
- _isEscPress!: boolean;
310
314
 
311
315
  static i18nBundle: I18nBundle;
312
316
 
@@ -332,15 +336,18 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
332
336
  this.setDropdownInsetStart();
333
337
  }
334
338
 
339
+ if (this.shouldFocusFirstElement) {
340
+ this.applyFocusToFirstElement();
341
+ }
342
+
335
343
  this.handleOutsideClick();
336
- this._isEscPress = false;
337
344
  }
338
345
 
339
346
  handleOutsideClick(): void {
340
347
  document.addEventListener("click", (e: Event) => {
341
348
  const target = e.target as HTMLElement;
342
349
  const item = target.closest("[udex-masthead-item]");
343
- if (item !== this && !this.isMobile) {
350
+ if (item !== this && !this.isMobile && this.selected) {
344
351
  if (this.isDropdownOpened) {
345
352
  this.fireDropdownCloseEvent(this.eventItemTitle, DropdownItemAction.ClickOutside);
346
353
  }
@@ -350,13 +357,27 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
350
357
  });
351
358
  }
352
359
 
360
+ handleMouseDown(): void {
361
+ this._preventFocusOut = true;
362
+ }
363
+
364
+ handleMouseUp(): void {
365
+ this._preventFocusOut = false;
366
+ }
367
+
353
368
  handleFocusout(e: FocusEvent): void {
354
- if (e.relatedTarget === null || this._isEscPress) {
369
+ if (this.isFocusOutPrevented(e)) {
355
370
  return;
356
371
  }
357
372
 
358
- const eTarget = e.target as HTMLElement;
359
- if (!this.isMobile && eTarget.getAttribute("slot") === "dropdown") {
373
+ this.handleFocusOutForDropdowns(e);
374
+ }
375
+
376
+ handleFocusOutForDropdowns(e: FocusEvent): void {
377
+ const relatedTarget = e.relatedTarget as HTMLElement;
378
+ const target = e.target as HTMLElement;
379
+
380
+ if (this.shouldCloseDropdown(relatedTarget, target)) {
360
381
  this.closeDropdown();
361
382
  }
362
383
  }
@@ -372,7 +393,6 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
372
393
  }
373
394
 
374
395
  handleKeyEscape(): void {
375
- this._isEscPress = true;
376
396
  this.closeDropdown();
377
397
  if (this.isProfileBtn) {
378
398
  this._profileAvatar.focus();
@@ -427,7 +447,7 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
427
447
  }
428
448
 
429
449
  setDropdownInsetStart(): void {
430
- const dropdown = this.getDomElement(".udex-masthead-item__dropdown");
450
+ const dropdown = this.dropdownHolder;
431
451
  if (dropdown) {
432
452
  const rect = dropdown.getBoundingClientRect();
433
453
  const marginInlineStart = this.calculateMarginInlineStart(rect);
@@ -460,6 +480,23 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
460
480
  return null;
461
481
  }
462
482
 
483
+ async applyFocusToFirstElement(): Promise<void> {
484
+ const menu = this.querySelector("[udex-masthead-menu]");
485
+
486
+ if (menu) {
487
+ const menuItems = Array.from(menu.shadowRoot?.querySelectorAll<UDExMastheadMenuItem>("[udex-masthead-menu-item]") || []);
488
+ const itemWithUrl = menuItems.find(menuItem => menuItem.url);
489
+ const focusableElement = itemWithUrl?.shadowRoot?.querySelector<HTMLElement>(".udex-masthead-menu-item");
490
+ if (focusableElement) {
491
+ focusableElement.focus();
492
+ return;
493
+ }
494
+ }
495
+
496
+ const focusedElement = await getFirstFocusableElement(this.dropdownHolder);
497
+ focusedElement?.focus();
498
+ }
499
+
463
500
  handleDirection(): void {
464
501
  const directionStyles = window
465
502
  .getComputedStyle(this)
@@ -488,6 +525,32 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
488
525
  return this.parseArrayFromString(this.subItems);
489
526
  }
490
527
 
528
+ private isFocusOutPrevented(e: FocusEvent): boolean {
529
+ return this.isMobile || e.relatedTarget === null || this._preventFocusOut;
530
+ }
531
+
532
+ private isProfileButtonTarget(relatedTarget: HTMLElement | null): boolean {
533
+ return (relatedTarget?.tagName === "UDEX-AVATAR" || relatedTarget?.tagName === "UDEX-MASTHEAD-ITEM") && this.isProfileBtn;
534
+ }
535
+
536
+ private isNavItemTarget(target: HTMLElement): boolean {
537
+ return target.getAttribute("slot") === "dropdown" && !this.isProfileBtn;
538
+ }
539
+
540
+ private isRelatedTargetOutside(relatedTarget: HTMLElement | null): boolean {
541
+ return relatedTarget?.closest("[udex-masthead-item]") === null;
542
+ }
543
+
544
+ private shouldCloseDropdown(relatedTarget: HTMLElement, target:HTMLElement): boolean {
545
+ return this.isRelatedTargetOutside(relatedTarget)
546
+ || this.isProfileButtonTarget(relatedTarget)
547
+ || this.isNavItemTarget(target);
548
+ }
549
+
550
+ get dropdownHolder(): HTMLElement {
551
+ return this.getDomElement(".udex-masthead-item__dropdown")!;
552
+ }
553
+
491
554
  get mastheadShell(): UDExMastheadShell {
492
555
  return document.querySelector<UDExMastheadShell>("[udex-masthead-shell]")!;
493
556
  }
@@ -539,6 +602,10 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
539
602
  return labels.length ? labels.join(" ").trim() : undefined;
540
603
  }
541
604
 
605
+ get shouldFocusFirstElement(): boolean {
606
+ return this.isDropdownOpened && !this._preventFocusOut;
607
+ }
608
+
542
609
  get isDropdownOpened(): boolean {
543
610
  return this.hasDropdownSlot && this.selected;
544
611
  }
@@ -12,6 +12,7 @@ import UDExMastheadMenuItem, { ItemType } from "./MastheadMenuItem.js";
12
12
  import UDExDivider from "./Divider.js";
13
13
  import MastheadMenuTemplate from "./generated/templates/MastheadMenuTemplate.lit.js";
14
14
  import AnalyticsName from "./types/AnalyticsName.js";
15
+ import UDExMastheadItem from "./MastheadItem.js";
15
16
 
16
17
  // Styles
17
18
  import MastheadMenuCss from "./generated/themes/MastheadMenu.css.js";
@@ -37,9 +38,10 @@ export type MenuItem = {
37
38
 
38
39
  export type MenuItemClickEventDetail = {
39
40
  category?: string,
41
+ analyticsPath: Array<string>,
42
+ analyticsName: AnalyticsName,
40
43
  originalEvent: Event,
41
44
  item: UDExMastheadMenuItem,
42
- analyticsName: AnalyticsName,
43
45
  sourceNode: HTMLElement,
44
46
  }
45
47
 
@@ -79,6 +81,9 @@ export type MenuItemClickEventDetail = {
79
81
  category: {
80
82
  type: String,
81
83
  },
84
+ analyticsPath: {
85
+ type: Array<string>,
86
+ },
82
87
  item: {
83
88
  type: HTMLElement,
84
89
  },
@@ -143,18 +148,26 @@ class UDExMastheadMenu extends UI5Element {
143
148
  }
144
149
 
145
150
  handleMenuItemClick(e: Event): void {
146
- const item = e.target as UDExMastheadMenuItem;
147
- const { url, type } = item;
148
- if (url?.length) {
149
- const list = item.closest(".udex-masthead-menu__list") as HTMLElement;
150
- this.fireEvent<MenuItemClickEventDetail>("menu-item-click", {
151
- sourceNode: item.shadowRoot?.querySelector(".udex-masthead-menu-item") as HTMLElement,
152
- analyticsName: AnalyticsName.Header,
153
- item,
154
- originalEvent: e,
155
- ...(type !== ItemType.Heading && { category: list?.getAttribute("category") || "" }),
156
- });
151
+ const menuItem = e.target as UDExMastheadMenuItem;
152
+ if (!menuItem.url?.length) {
153
+ return;
157
154
  }
155
+
156
+ const mainItem = this.closest("[udex-masthead-item]") as UDExMastheadItem;
157
+ const menuList = menuItem.closest(".udex-masthead-menu__list") as HTMLElement;
158
+ const sourceNode = menuItem.shadowRoot?.querySelector(".udex-masthead-menu-item") as HTMLElement;
159
+ const category = menuList?.getAttribute("category") || "";
160
+
161
+ const eventDetail: MenuItemClickEventDetail = {
162
+ analyticsPath: [mainItem?.label, category, menuItem.label].filter(Boolean),
163
+ analyticsName: AnalyticsName.Header,
164
+ originalEvent: e,
165
+ item: menuItem,
166
+ sourceNode,
167
+ ...(menuItem.type !== ItemType.Heading && { category }),
168
+ };
169
+
170
+ this.fireEvent<MenuItemClickEventDetail>("menu-item-click", eventDetail);
158
171
  }
159
172
 
160
173
  focusPreviousItem(item: UDExMastheadMenuItem): void {
@@ -17,6 +17,7 @@
17
17
  @click="{{handleExploreBackToMenuItems}}"
18
18
  label="{{_clickedItem.innerText}}"
19
19
  type="Button"
20
+ is-back
20
21
  has-border
21
22
  icon-start
22
23
  is-explore-back>
@@ -35,6 +36,7 @@
35
36
  @click="{{handleBackToMenuItems}}"
36
37
  label="{{_clickedItem.innerText}}"
37
38
  type="Button"
39
+ is-back
38
40
  has-border
39
41
  icon-start
40
42
  is-back-to-nav>
@@ -51,6 +53,7 @@
51
53
  @click="{{handleBackToCategories}}"
52
54
  label="{{_category.category}}"
53
55
  type="Button"
56
+ is-back
54
57
  has-border
55
58
  icon-start
56
59
  is-back-to-categories>
@@ -68,6 +71,7 @@
68
71
  @keydown="{{handleLeftRightKeys}}"
69
72
  accessible-role="button"
70
73
  type="Button"
74
+ first-level-btn
71
75
  first-level
72
76
  icon-end
73
77
  is-explore
@@ -88,7 +92,8 @@
88
92
  type="Button"
89
93
  has-border
90
94
  icon-end
91
- first-level>
95
+ first-level
96
+ first-level-btn>
92
97
  </udex-masthead-menu-item>
93
98
  {{else}}
94
99
  <udex-masthead-menu-item
@@ -96,6 +101,7 @@
96
101
  url="{{this.href}}"
97
102
  label="{{this.innerText}}"
98
103
  target="{{this.target}}"
104
+ first-level
99
105
  has-border>
100
106
  </udex-masthead-menu-item>
101
107
  {{/if}}
@@ -110,6 +116,7 @@
110
116
  url="{{_clickedItem.href}}"
111
117
  label="{{overviewLinkText}}"
112
118
  @click="{{handleMobileItemEvent}}"
119
+ second-level
113
120
  has-border>
114
121
  </udex-masthead-menu-item>
115
122
  </li>
@@ -125,6 +132,7 @@
125
132
  aria-has-popup="true"
126
133
  type="Button"
127
134
  second-level
135
+ second-level-btn
128
136
  has-border
129
137
  icon-end>
130
138
  </udex-masthead-menu-item>
@@ -136,6 +144,7 @@
136
144
  @click="{{../handleMobileItemEvent}}"
137
145
  url="{{this.url}}"
138
146
  label="{{this.title}}"
147
+ second-level
139
148
  has-border>
140
149
  </udex-masthead-menu-item>
141
150
  </li>
@@ -151,6 +160,7 @@
151
160
  @click="{{../handleMobileCategoryItemEvent}}"
152
161
  url="{{this._category.url}}"
153
162
  label="{{overviewLinkText}}"
163
+ third-level
154
164
  has-border>
155
165
  </udex-masthead-menu-item>
156
166
  </li>
@@ -162,6 +172,7 @@
162
172
  @click="{{../handleMobileCategoryItemEvent}}"
163
173
  label="{{this.title}}"
164
174
  url="{{this.url}}"
175
+ third-level
165
176
  has-border>
166
177
  </udex-masthead-menu-item>
167
178
  </li>
@@ -20,10 +20,12 @@ import MastheadMobileMenuCss from "./generated/themes/MastheadMobileMenu.css.js"
20
20
 
21
21
  export type MobileItemClickEventDetail = {
22
22
  category?: string,
23
+ isBack: boolean,
23
24
  isMobile: boolean,
24
25
  originalEvent: Event,
25
26
  item: UDExMastheadMenuItem,
26
27
  analyticsName: AnalyticsName,
28
+ analyticsPath: Array<string>,
27
29
  sourceNode: HTMLElement,
28
30
  }
29
31
 
@@ -60,6 +62,15 @@ export type MobileItemClickEventDetail = {
60
62
  */
61
63
  @event("item-click", {
62
64
  detail: {
65
+ isBack: {
66
+ type: Boolean,
67
+ },
68
+ isMobile: {
69
+ type: Boolean,
70
+ },
71
+ category: {
72
+ type: String,
73
+ },
63
74
  item: {
64
75
  type: HTMLElement,
65
76
  },
@@ -69,6 +80,9 @@ export type MobileItemClickEventDetail = {
69
80
  analyticsName: {
70
81
  type: AnalyticsName,
71
82
  },
83
+ analyticsPath: {
84
+ type: Array<string>,
85
+ },
72
86
  sourceNode: {
73
87
  type: HTMLElement,
74
88
  },
@@ -140,6 +154,7 @@ class UDExMastheadMobileMenu extends UI5Element {
140
154
  _shouldFocusItemByIndex!: boolean;
141
155
  _shouldFocusExploreBtn!: boolean;
142
156
  _focusedItemIndex!: number;
157
+ _navItem?: UDExMastheadMenuItem;
143
158
 
144
159
  static i18nBundle: I18nBundle;
145
160
 
@@ -318,12 +333,12 @@ class UDExMastheadMobileMenu extends UI5Element {
318
333
  this.fireMobileItemEvent(e);
319
334
  }
320
335
 
321
- if (target.hasAttribute("first-level")) {
336
+ if (target.hasAttribute("first-level-btn")) {
322
337
  this.openCategories(item);
323
338
  this.fireMobileItemEvent(e);
324
339
  }
325
340
 
326
- if (target.hasAttribute("second-level")) {
341
+ if (target.hasAttribute("second-level-btn")) {
327
342
  this.openCategoryItems(e);
328
343
  this.fireMobileItemEvent(e);
329
344
  }
@@ -435,15 +450,19 @@ class UDExMastheadMobileMenu extends UI5Element {
435
450
 
436
451
  fireMobileItemEvent(e: Event, category?: string) {
437
452
  const item = e.target as UDExMastheadMenuItem;
438
-
439
- this.fireEvent<MobileItemClickEventDetail>("item-click", {
453
+ const isBack = item.hasAttribute("is-back");
454
+ const eventDetail: MobileItemClickEventDetail = {
440
455
  ...(category && { category }),
441
- isMobile: true,
442
456
  item,
457
+ isMobile: true,
458
+ isBack,
459
+ analyticsPath: this.buildAnalyticsPath(item),
443
460
  originalEvent: e,
444
461
  analyticsName: AnalyticsName.Header,
445
462
  sourceNode: item.shadowRoot?.querySelector(".udex-masthead-menu-item") as HTMLElement,
446
- }, true, false);
463
+ };
464
+
465
+ this.fireEvent<MobileItemClickEventDetail>("item-click", eventDetail, true, false);
447
466
  }
448
467
 
449
468
  fireExploreSapMobileButton(e: Event) {
@@ -502,6 +521,42 @@ class UDExMastheadMobileMenu extends UI5Element {
502
521
  });
503
522
  }
504
523
 
524
+ buildAnalyticsPath(item: UDExMastheadMenuItem): Array<string> {
525
+ const category = this.getListItemByIndex(0).label.trim();
526
+ const isFirstLevel = item.hasAttribute("first-level");
527
+ const isSecondLevel = item.hasAttribute("second-level");
528
+ const isThirdLevel = item.hasAttribute("third-level");
529
+ const isBackToCategories = item.hasAttribute("is-back-to-categories");
530
+ const shouldResetPath = item.hasAttribute("is-back-to-nav") || this._hideExploreSapBtn;
531
+ const isExploreMode = !this.showExploreBtn && !!this.items.length;
532
+ const clickedLabel = item.label.trim();
533
+ const analyticsPath: Array<string> = [];
534
+
535
+ if (shouldResetPath) {
536
+ this._navItem = undefined;
537
+ analyticsPath.length = 0;
538
+ }
539
+
540
+ if (isFirstLevel) {
541
+ this._navItem = item;
542
+ analyticsPath.push(clickedLabel);
543
+ } else if (isSecondLevel) {
544
+ analyticsPath.push(...(this._navItem ? [category, clickedLabel] : [clickedLabel]));
545
+ } else if (isThirdLevel) {
546
+ analyticsPath.push(...(this._navItem ? [this._navItem.label.trim(), category, clickedLabel] : [category, clickedLabel]));
547
+ } else if (isBackToCategories) {
548
+ if (this._navItem) {
549
+ analyticsPath.push(this._navItem.label.trim());
550
+ }
551
+ }
552
+
553
+ if (isExploreMode) {
554
+ analyticsPath.unshift(this.exploreItem.label);
555
+ }
556
+
557
+ return analyticsPath;
558
+ }
559
+
505
560
  get exploreBtnMenu(): UDExMastheadMenuItem {
506
561
  return this.shadowRoot!.querySelector<UDExMastheadMenuItem>(".udex-masthead-mobile-menu__explore-btn")!;
507
562
  }
@@ -13,6 +13,7 @@ import "@ui5/webcomponents-icons/dist/decline.js";
13
13
  import "@ui5/webcomponents-icons/dist/menu2.js";
14
14
  import "@ui5/webcomponents-icons/dist/search.js";
15
15
  import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
16
+ import { isDesktop } from "@ui5/webcomponents-base/dist/Device.js";
16
17
  import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
17
18
  import { MAIN_LINKS } from "./generated/i18n/i18n-defaults.js";
18
19
  import UDExMastheadItem, { DropdownItemAction } from "./MastheadItem.js";
@@ -405,6 +406,9 @@ class UDExMastheadShell extends UI5Element {
405
406
 
406
407
  onEnterDOM(): void {
407
408
  ResizeHandler.register(this, this._handleResizeBound);
409
+ if (isDesktop()) {
410
+ this.setAttribute("desktop", "");
411
+ }
408
412
  }
409
413
 
410
414
  onExitDOM(): void {
@@ -7,7 +7,6 @@ import event from "@ui5/webcomponents-base/dist/decorators/event.js";
7
7
  import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
8
8
  import Icon from "@ui5/webcomponents/dist/Icon.js";
9
9
  import "@ui5/webcomponents-icons/dist/play.js";
10
- import "@ui5/webcomponents-icons/dist/v5/play.svg";
11
10
  import Player from "video.js/dist/types/player.js";
12
11
  import type SeekBar from "video.js/dist/types/control-bar/progress-control/seek-bar";
13
12
  import UDExMediaPlayerYoutube from "./MediaPlayerYoutube.js";
@@ -8,7 +8,12 @@
8
8
  {{#if title.length}}
9
9
  <div class="udex-secondary-navigation__heading">
10
10
  {{#if titleHref.length}}
11
- <a class="udex-secondary-navigation__title" href="{{titleHref}}">{{title}}</a>
11
+ <a
12
+ class="udex-secondary-navigation__title"
13
+ @click="{{handleHeadingClick}}"
14
+ href="{{titleHref}}">
15
+ {{title}}
16
+ </a>
12
17
  {{else}}
13
18
  <span class="udex-secondary-navigation__title">{{title}}</span>
14
19
  {{/if}}
@@ -17,6 +17,8 @@ import UDExSecondaryNavigationItemBase, { NavItem } from "./SecondaryNavigationI
17
17
  import { MORE } from "./generated/i18n/i18n-defaults.js";
18
18
  import SecondaryNavigationTemplate from "./generated/templates/SecondaryNavigationTemplate.lit.js";
19
19
  import { BreakpointUtils } from "./utils/Breakpoints.js";
20
+ import AnalyticsName from "./types/AnalyticsName.js";
21
+
20
22
  // Styles
21
23
  import SecondaryNavigationCss from "./generated/themes/SecondaryNavigation.css.js";
22
24
 
@@ -27,6 +29,15 @@ export type ItemClickDetail = {
27
29
  originalEvent: Event,
28
30
  clickedItem: NavItem;
29
31
  clickedIndex: number;
32
+ isMobile?: boolean,
33
+ analyticsName: AnalyticsName,
34
+ sourceNode: HTMLElement,
35
+ };
36
+
37
+ export type HeadingClickDetail = {
38
+ originalEvent: Event,
39
+ analyticsName: AnalyticsName,
40
+ sourceNode: HTMLElement,
30
41
  };
31
42
 
32
43
  /**
@@ -71,6 +82,35 @@ export type ItemClickDetail = {
71
82
  clickedIndex: {
72
83
  type: Integer,
73
84
  },
85
+ isMobile: {
86
+ type: Boolean,
87
+ },
88
+ analyticsName: {
89
+ type: AnalyticsName,
90
+ },
91
+ sourceNode: {
92
+ type: HTMLElement,
93
+ },
94
+ },
95
+ })
96
+
97
+ /**
98
+ * Fires when heading is clicked
99
+ *
100
+ * @allowPreventDefault
101
+ * @public
102
+ */
103
+ @event<HeadingClickDetail>("heading-click", {
104
+ detail: {
105
+ originalEvent: {
106
+ type: Event,
107
+ },
108
+ analyticsName: {
109
+ type: AnalyticsName,
110
+ },
111
+ sourceNode: {
112
+ type: HTMLElement,
113
+ },
74
114
  },
75
115
  })
76
116
 
@@ -359,6 +399,14 @@ class UDExSecondaryNavigation extends UI5Element {
359
399
  }
360
400
  }
361
401
 
402
+ handleHeadingClick(e: CustomEvent): void {
403
+ this.fireEvent("heading-click", {
404
+ analyticsName: AnalyticsName.HeaderSub,
405
+ sourceNode: e.target as HTMLElement,
406
+ originalEvent: e,
407
+ }, true);
408
+ }
409
+
362
410
  fireEventItemClick(
363
411
  e: Event,
364
412
  clickedIndex: number,
@@ -367,6 +415,9 @@ class UDExSecondaryNavigation extends UI5Element {
367
415
  }: NavItem,
368
416
  ): boolean {
369
417
  return this.fireEvent("item-click", {
418
+ ...(this.isMobileScreen && { isMobile: true }),
419
+ analyticsName: AnalyticsName.HeaderSub,
420
+ sourceNode: e?.currentTarget as HTMLElement,
370
421
  originalEvent: e,
371
422
  clickedItem: {
372
423
  mobileLinkTitle: mobileLinkTitle || "",
@@ -5,27 +5,27 @@ import type UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
5
5
  import type { ClassMapValue } from "@ui5/webcomponents-base/dist/types.js";
6
6
 
7
7
  function block0 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`${ this.hasHref ? block1.call(this, context, tags, suffix) : block9.call(this, context, tags, suffix) } `;}
8
- function block1 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<a id="${ifDefined(this._id)}" class="${ifDefined(this.additionalClass)}" tabindex="0" role="${ifDefined(this.accessibleRoleName)}" target="${ifDefined(this.target)}" href="${ifDefined(this.href)}" aria-label="${ifDefined(this.accessibleLabel)}" aria-describedby="${ifDefined(this.ariaDescribedBy)}" @click="${this.handleItemClick}">${ this.icon ? block2.call(this, context, tags, suffix) : block3.call(this, context, tags, suffix) }</a>${ this.isTargetBlank ? block8.call(this, context, tags, suffix) : undefined }`;}
8
+ function block1 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<a id="${ifDefined(this._id)}" class="${ifDefined(this.additionalClass)}" tabindex="0" role="${ifDefined(this.accessibleRoleName)}" target="${ifDefined(this.target)}" href="${ifDefined(this.href)}" aria-label="${ifDefined(this.accessibleLabel)}" aria-describedby="${ifDefined(this.ariaDescribedBy)}" @click="${this.handleItemClick}" @mousedown="${this.handleMouseDown}" @mouseup="${this.handleMouseUp}">${ this.icon ? block2.call(this, context, tags, suffix) : block3.call(this, context, tags, suffix) }</a>${ this.isTargetBlank ? block8.call(this, context, tags, suffix) : undefined }`;}
9
9
  function block2 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("ui5-icon", tags, suffix)} class="udex-masthead-item__icon" name="${ifDefined(this.icon)}" show-tooltip="${ifDefined(this.iconAlt)}" accessible-name="${ifDefined(this.iconAlt)}"></${scopeTag("ui5-icon", tags, suffix)}>` : html`<ui5-icon class="udex-masthead-item__icon" name="${ifDefined(this.icon)}" show-tooltip="${ifDefined(this.iconAlt)}" accessible-name="${ifDefined(this.iconAlt)}"></ui5-icon>`;}
10
10
  function block3 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`${ this.image ? block4.call(this, context, tags, suffix) : block6.call(this, context, tags, suffix) }`;}
11
- function block4 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<img class="udex-masthead-item__image" id="${ifDefined(this._id)}_image-alt" src="${ifDefined(this.image)}" alt="${ifDefined(this.imageAlt)}"/>${ this.imageAlt ? block5.call(this, context, tags, suffix) : undefined }`;}
11
+ function block4 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<div class="udex-masthead-item__image-wrap"><img class="udex-masthead-item__image" id="${ifDefined(this._id)}_image-alt" src="${ifDefined(this.image)}" alt="${ifDefined(this.imageAlt)}"/></div>${ this.imageAlt ? block5.call(this, context, tags, suffix) : undefined }`;}
12
12
  function block5 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<span id="image-desc" class="udex-masthead-hidden-text">${ifDefined(this.imageAlt)}</span>`;}
13
13
  function block6 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<span class="udex-masthead-item__text"><slot></slot>${ this.hasArrowDown ? block7.call(this, context, tags, suffix) : undefined }</span>`;}
14
14
  function block7 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("ui5-icon", tags, suffix)} class="udex-masthead-item__dropdown-icon" name="slim-arrow-down"></${scopeTag("ui5-icon", tags, suffix)}>` : html`<ui5-icon class="udex-masthead-item__dropdown-icon" name="slim-arrow-down"></ui5-icon>`;}
15
15
  function block8 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<span id="new-win-desc" class="udex-masthead-hidden-text">${ifDefined(this.openInNewWindowText)}</span>`;}
16
16
  function block9 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`${ this.isProfileBtn ? block10.call(this, context, tags, suffix) : block18.call(this, context, tags, suffix) }`;}
17
- function block10 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<span id="${ifDefined(this._id)}" role="combobox" class="udex-masthead-item__btn ${ifDefined(this.additionalClass)}" aria-expanded="${ifDefined(this.selected)}" aria-describedby="${ifDefined(this.ariaDescribedBy)}" aria-controls="${ifDefined(this._id)}_dropdown" aria-haspopup="${ifDefined(this.hasDropdownSlot)}" aria-label="${ifDefined(this.accessibleLabel)}" @keydown="${this.handleKeyDown}" @click="${this.handleItemClick}">${ this.icon ? block11.call(this, context, tags, suffix) : block12.call(this, context, tags, suffix) }</span>${ this.isDropdownOpened ? block17.call(this, context, tags, suffix) : undefined }`;}
17
+ function block10 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<span id="${ifDefined(this._id)}" role="combobox" class="udex-masthead-item__btn ${ifDefined(this.additionalClass)}" aria-expanded="${ifDefined(this.selected)}" aria-describedby="${ifDefined(this.ariaDescribedBy)}" aria-controls="${ifDefined(this._id)}_dropdown" aria-haspopup="${ifDefined(this.hasDropdownSlot)}" aria-label="${ifDefined(this.accessibleLabel)}" @keydown="${this.handleKeyDown}" @click="${this.handleItemClick}" @mousedown="${this.handleMouseDown}" @mouseup="${this.handleMouseUp}">${ this.icon ? block11.call(this, context, tags, suffix) : block12.call(this, context, tags, suffix) }</span>${ this.isDropdownOpened ? block17.call(this, context, tags, suffix) : undefined }`;}
18
18
  function block11 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("ui5-icon", tags, suffix)} class="udex-masthead-item__icon" name="${ifDefined(this.icon)}" show-tooltip="${ifDefined(this.iconAlt)}" accessible-name="${ifDefined(this.iconAlt)}"></${scopeTag("ui5-icon", tags, suffix)}>` : html`<ui5-icon class="udex-masthead-item__icon" name="${ifDefined(this.icon)}" show-tooltip="${ifDefined(this.iconAlt)}" accessible-name="${ifDefined(this.iconAlt)}"></ui5-icon>`;}
19
19
  function block12 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`${ this.image ? block13.call(this, context, tags, suffix) : block15.call(this, context, tags, suffix) }`;}
20
- function block13 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<img class="udex-masthead-item__image" id="${ifDefined(this._id)}_image-alt" src="${ifDefined(this.image)}" alt="${ifDefined(this.imageAlt)}"/>${ this.imageAlt ? block14.call(this, context, tags, suffix) : undefined }`;}
20
+ function block13 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<div class="udex-masthead-item__image-wrap"><img class="udex-masthead-item__image" id="${ifDefined(this._id)}_image-alt" src="${ifDefined(this.image)}" alt="${ifDefined(this.imageAlt)}"/></div>${ this.imageAlt ? block14.call(this, context, tags, suffix) : undefined }`;}
21
21
  function block14 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<span id="image-desc" class="udex-masthead-hidden-text">${ifDefined(this.imageAlt)}</span>`;}
22
22
  function block15 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<span class="udex-masthead-item__text"><slot></slot>${ this.hasArrowDown ? block16.call(this, context, tags, suffix) : undefined }</span>`;}
23
23
  function block16 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("ui5-icon", tags, suffix)} class="udex-masthead-item__dropdown-icon" name="slim-arrow-down"></${scopeTag("ui5-icon", tags, suffix)}>` : html`<ui5-icon class="udex-masthead-item__dropdown-icon" name="slim-arrow-down"></ui5-icon>`;}
24
24
  function block17 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<div id="${ifDefined(this._id)}_dropdown" class="udex-masthead-item__dropdown" @keydown="${this.handleKeyDown}" @focusout="${this.handleFocusout}"><div class="udex-masthead-item__dropdown-holder"><slot name="dropdown"></slot></div></div>`;}
25
- function block18 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<button role="${ifDefined(this.accessibleRoleName)}" id="${ifDefined(this._id)}" class="udex-masthead-item__btn ${ifDefined(this.additionalClass)}" aria-expanded="${ifDefined(this.selected)}" aria-describedby="${ifDefined(this.ariaDescribedBy)}" aria-haspopup="${ifDefined(this.hasDropdownSlot)}" aria-label="${ifDefined(this.accessibleLabel)}" @keydown="${this.handleKeyDown}" @click="${this.handleItemClick}">${ this.icon ? block19.call(this, context, tags, suffix) : block20.call(this, context, tags, suffix) }</button>${ this.isDropdownOpened ? block25.call(this, context, tags, suffix) : undefined }`;}
25
+ function block18 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<button role="${ifDefined(this.accessibleRoleName)}" id="${ifDefined(this._id)}" class="udex-masthead-item__btn ${ifDefined(this.additionalClass)}" aria-expanded="${ifDefined(this.selected)}" aria-describedby="${ifDefined(this.ariaDescribedBy)}" aria-haspopup="${ifDefined(this.hasDropdownSlot)}" aria-label="${ifDefined(this.accessibleLabel)}" @keydown="${this.handleKeyDown}" @click="${this.handleItemClick}" @mousedown="${this.handleMouseDown}" @mouseup="${this.handleMouseUp}">${ this.icon ? block19.call(this, context, tags, suffix) : block20.call(this, context, tags, suffix) }</button>${ this.isDropdownOpened ? block25.call(this, context, tags, suffix) : undefined }`;}
26
26
  function block19 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("ui5-icon", tags, suffix)} class="udex-masthead-item__icon" name="${ifDefined(this.icon)}" show-tooltip="${ifDefined(this.iconAlt)}" accessible-name="${ifDefined(this.iconAlt)}"></${scopeTag("ui5-icon", tags, suffix)}>` : html`<ui5-icon class="udex-masthead-item__icon" name="${ifDefined(this.icon)}" show-tooltip="${ifDefined(this.iconAlt)}" accessible-name="${ifDefined(this.iconAlt)}"></ui5-icon>`;}
27
27
  function block20 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`${ this.image ? block21.call(this, context, tags, suffix) : block23.call(this, context, tags, suffix) }`;}
28
- function block21 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<img class="udex-masthead-item__image" id="${ifDefined(this._id)}_image-alt" src="${ifDefined(this.image)}" alt="${ifDefined(this.imageAlt)}"/>${ this.imageAlt ? block22.call(this, context, tags, suffix) : undefined }`;}
28
+ function block21 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<div class="udex-masthead-item__image-wrap"><img class="udex-masthead-item__image" id="${ifDefined(this._id)}_image-alt" src="${ifDefined(this.image)}" alt="${ifDefined(this.imageAlt)}"/></div>${ this.imageAlt ? block22.call(this, context, tags, suffix) : undefined }`;}
29
29
  function block22 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<span id="image-desc" class="udex-masthead-hidden-text">${ifDefined(this.imageAlt)}</span>`;}
30
30
  function block23 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return html`<span class="udex-masthead-item__text"><slot></slot>${ this.hasArrowDown ? block24.call(this, context, tags, suffix) : undefined }</span>`;}
31
31
  function block24 (this: MastheadItem, context: UI5Element, tags: string[], suffix: string | undefined) { return suffix ? html`<${scopeTag("ui5-icon", tags, suffix)} class="udex-masthead-item__dropdown-icon" name="slim-arrow-down"></${scopeTag("ui5-icon", tags, suffix)}>` : html`<ui5-icon class="udex-masthead-item__dropdown-icon" name="slim-arrow-down"></ui5-icon>`;}