@sapudex/web-components 2.31.0 → 2.32.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 (85) hide show
  1. package/cypress/specs/Breadcrumbs.cy.tsx +26 -0
  2. package/cypress/specs/MediaPlayer.cy.tsx +209 -0
  3. package/cypress/specs/SecondaryNavigationDesktop.cy.tsx +74 -21
  4. package/cypress/specs/SecondaryNavigationMobile.cy.tsx +58 -1
  5. package/cypress/specs/TabNavigation.cy.tsx +603 -39
  6. package/cypress/support/component-imports.instrumented.ts +2 -0
  7. package/cypress/support/component-imports.src.ts +2 -0
  8. package/dist/Breadcrumbs.d.ts +5 -0
  9. package/dist/Breadcrumbs.js +8 -1
  10. package/dist/Breadcrumbs.js.map +1 -1
  11. package/dist/MastheadItem.js +5 -4
  12. package/dist/MastheadItem.js.map +1 -1
  13. package/dist/MediaPlayer.d.ts +15 -0
  14. package/dist/MediaPlayer.js +28 -0
  15. package/dist/MediaPlayer.js.map +1 -1
  16. package/dist/SecondaryNavigation.d.ts +12 -2
  17. package/dist/SecondaryNavigation.js +59 -8
  18. package/dist/SecondaryNavigation.js.map +1 -1
  19. package/dist/SecondaryNavigationItem.d.ts +0 -1
  20. package/dist/SecondaryNavigationItem.js +0 -4
  21. package/dist/SecondaryNavigationItem.js.map +1 -1
  22. package/dist/SecondaryNavigationSubItem.js +1 -1
  23. package/dist/SecondaryNavigationSubItem.js.map +1 -1
  24. package/dist/Tab.d.ts +1 -1
  25. package/dist/Tab.js +3 -3
  26. package/dist/Tab.js.map +1 -1
  27. package/dist/TabNavigation.d.ts +64 -0
  28. package/dist/TabNavigation.js +124 -1
  29. package/dist/TabNavigation.js.map +1 -1
  30. package/dist/assets/{InputSuggestions-i2kFpCfC.js → InputSuggestions-CHLLTki3.js} +1 -1
  31. package/dist/assets/{ListItemStandardExpandableTextTemplate-C1ceDaxu.js → ListItemStandardExpandableTextTemplate-vM1eIFe4.js} +1 -1
  32. package/dist/assets/{bundle.esm-DQ3cxywT.js → bundle.esm-fUZ1I3qm.js} +219 -219
  33. package/dist/assets/messagebundle_en-iNqRB1VZ.js +1 -0
  34. package/dist/css/themes/BreadcrumbsPopover.css +1 -1
  35. package/dist/css/themes/RatingIndicator.css +1 -1
  36. package/dist/css/themes/Slider.css +1 -1
  37. package/dist/css/themes/TabNavigation.css +1 -1
  38. package/dist/custom-elements-internal.json +375 -154
  39. package/dist/custom-elements.json +288 -139
  40. package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
  41. package/dist/generated/i18n/i18n-defaults.js +1 -1
  42. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  43. package/dist/generated/templates/SecondaryNavigationTemplate.lit.js +1 -1
  44. package/dist/generated/templates/SecondaryNavigationTemplate.lit.js.map +1 -1
  45. package/dist/generated/templates/TabNavigationTemplate.lit.js +10 -8
  46. package/dist/generated/templates/TabNavigationTemplate.lit.js.map +1 -1
  47. package/dist/generated/themes/BreadcrumbsPopover.css.d.ts +1 -1
  48. package/dist/generated/themes/BreadcrumbsPopover.css.js +1 -1
  49. package/dist/generated/themes/BreadcrumbsPopover.css.js.map +1 -1
  50. package/dist/generated/themes/RatingIndicator.css.d.ts +1 -1
  51. package/dist/generated/themes/RatingIndicator.css.js +1 -1
  52. package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
  53. package/dist/generated/themes/Slider.css.d.ts +1 -1
  54. package/dist/generated/themes/Slider.css.js +1 -1
  55. package/dist/generated/themes/Slider.css.js.map +1 -1
  56. package/dist/generated/themes/TabNavigation.css.d.ts +1 -1
  57. package/dist/generated/themes/TabNavigation.css.js +1 -1
  58. package/dist/generated/themes/TabNavigation.css.js.map +1 -1
  59. package/dist/messagebundle.properties +1 -1
  60. package/dist/messagebundle_en.properties +1 -1
  61. package/dist/vscode.html-custom-data.json +23 -3
  62. package/dist/web-types.json +64 -4
  63. package/package.json +1 -1
  64. package/src/Breadcrumbs.ts +9 -1
  65. package/src/MastheadItem.ts +5 -4
  66. package/src/MediaPlayer.ts +35 -0
  67. package/src/SecondaryNavigation.hbs +1 -0
  68. package/src/SecondaryNavigation.ts +77 -9
  69. package/src/SecondaryNavigationItem.ts +0 -6
  70. package/src/SecondaryNavigationSubItem.ts +1 -1
  71. package/src/Tab.ts +4 -4
  72. package/src/TabNavigation.hbs +15 -0
  73. package/src/TabNavigation.ts +134 -1
  74. package/src/generated/i18n/i18n-defaults.ts +1 -1
  75. package/src/generated/templates/SecondaryNavigationTemplate.lit.ts +1 -1
  76. package/src/generated/templates/TabNavigationTemplate.lit.ts +10 -8
  77. package/src/generated/themes/BreadcrumbsPopover.css.ts +1 -1
  78. package/src/generated/themes/RatingIndicator.css.ts +1 -1
  79. package/src/generated/themes/Slider.css.ts +1 -1
  80. package/src/generated/themes/TabNavigation.css.ts +1 -1
  81. package/src/i18n/messagebundle.properties +1 -1
  82. package/src/i18n/messagebundle_en.properties +1 -1
  83. package/src/themes/BreadcrumbsPopover.css +2 -2
  84. package/src/themes/TabNavigation.css +27 -16
  85. package/dist/assets/messagebundle_en-DWAgV5VH.js +0 -1
@@ -105,7 +105,7 @@ AVATAR_TEXT=Avatar
105
105
  CALENDAR_ICON=Open Calendar icon
106
106
  LIST_ITEM_EDIT_ICON=Edit list item entry
107
107
  LIST_ITEM_DELETE_ICON=Delete list item entry
108
- BACK_BUTTON_LABEL=back button label
108
+ BACK_BUTTON_LABEL=return back
109
109
  STATUS_BADGE_TEXT=Status Badge
110
110
  STATUS_BADGE_EDIT_TITLE=Click to edit profile
111
111
  STATUS_BADGE_INFORMATION_TITLE=Click to open profile information
@@ -2340,7 +2340,7 @@
2340
2340
  },
2341
2341
  {
2342
2342
  "name": "udex-media-player",
2343
- "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-media-player</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/MediaPlayer.js\";</code>\n\n\n---\n\n\n\n\n### **Events:**\n - **videoStart** - Fires when video is played\n- **videoPause** - Fires when video is paused\n- **videoComplete** - Fires when video is watched\n- **videoReady** - Fires when video is ready\n- **videoProgress** - Fires when video watching progress changed\n- **video25** - Fires when 25% of video is watched\n- **video50** - Fires when 50% of video is watched\n- **video75** - Fires when 75% of video is watched\n\n### **Methods:**\n - **getPlayer(): _HTMLVideoElement | HTMLAudioElement | YoutubePlayer | VimeoPlayer | null_** - Returns video element\n\n### **Slots:**\n - **default** - Placeholder for all html `track` elements to provide video subtitles.\nExample: `<track kind='captions' src='./videoSubtitles.vtt' srclang='en' label='English' default />`\nMore information: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track",
2343
+ "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-media-player</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/MediaPlayer.js\";</code>\n\n\n---\n\n\n\n\n### **Events:**\n - **videoStart** - Fires when video is played\n- **videoPause** - Fires when video is paused\n- **videoComplete** - Fires when video is watched\n- **videoReady** - Fires when video is ready\n- **videoProgress** - Fires when video watching progress changed\n- **video25** - Fires when 25% of video is watched\n- **video50** - Fires when 50% of video is watched\n- **video75** - Fires when 75% of video is watched\n- **videojsReady** - Fires when the VideoJS library is loaded but before the player is created.\nUse this event to register custom VideoJS plugins via\n<code>event.detail.videojs.registerPlugin()</code>.\n\n### **Methods:**\n - **registerPlugin(name: _string_, plugin: _(...args: any[]) => any_): _void_** - Registers a custom VideoJS plugin to be applied before player initialization.\nMust be called before the component renders.\nFor plugins registered after rendering, use the videojsReady event instead.\n- **getPlayer(): _HTMLVideoElement | HTMLAudioElement | YoutubePlayer | VimeoPlayer | null_** - Returns video element\n\n### **Slots:**\n - **default** - Placeholder for all html `track` elements to provide video subtitles.\nExample: `<track kind='captions' src='./videoSubtitles.vtt' srclang='en' label='English' default />`\nMore information: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track",
2344
2344
  "attributes": [
2345
2345
  {
2346
2346
  "name": "options",
@@ -3115,7 +3115,7 @@
3115
3115
  },
3116
3116
  {
3117
3117
  "name": "udex-secondary-navigation",
3118
- "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-secondary-navigation</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/SecondaryNavigation.js\";</code>\n\n\n---\n\n\n\n\n### **Events:**\n - **item-click** - Fires when item is clicked\n- **heading-click** - The event is triggered on user interaction with a secondary navigation heading\n\n### **Slots:**\n - **breadcrumbs** - Slot for breadcrumbs.\n- **buttons** - Slot for action buttons.",
3118
+ "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-secondary-navigation</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/SecondaryNavigation.js\";</code>\n\n\n---\n\n\n\n\n### **Events:**\n - **item-click** - Fires when item is clicked\n- **heading-click** - The event is triggered on user interaction with a secondary navigation heading\n- **mobile-menu-opener-click** - The event is triggered on user interaction with the mobile menu opener\n\n### **Slots:**\n - **breadcrumbs** - Slot for breadcrumbs.\n- **buttons** - Slot for action buttons.",
3119
3119
  "attributes": [
3120
3120
  {
3121
3121
  "name": "mobile-menu-opener-aria-label",
@@ -3930,7 +3930,7 @@
3930
3930
  },
3931
3931
  {
3932
3932
  "name": "udex-tab-navigation",
3933
- "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n<h3>Usage</h3>\n\nFor the <code>udex-tab-navigation</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/TabNavigation.js\";</code>\n\n\n---\n\n\n\n\n### **Events:**\n - **click** - Fires when the tab was clicked.\n- **tab-select** - Fired when a tab is selected.\n\n### **Slots:**\n - **default** - Defines the tabs and content.",
3933
+ "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n<h3>Usage</h3>\n\nFor the <code>udex-tab-navigation</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/TabNavigation.js\";</code>\n\n\n---\n\n\n\n\n### **Events:**\n - **click** - Fires when the tab was clicked.\n- **tab-select** - Fired when a tab is selected.\n\n### **Slots:**\n - **default** - Defines the tabs and content.\n- **footer** - Defines optional content rendered below the tab list in Vertical orientation.\nUse to place a button or any action element beneath the tabs.",
3934
3934
  "attributes": [
3935
3935
  {
3936
3936
  "name": "ud-exsize-more-button",
@@ -3947,6 +3947,26 @@
3947
3947
  "description": "Defines the orientation of the tab navigation.",
3948
3948
  "values": [{ "name": "Vertical" }, { "name": "Horizontal" }]
3949
3949
  },
3950
+ {
3951
+ "name": "placement",
3952
+ "description": "Defines the placement of the tab strip relative to the content area.\nApplies to Vertical orientation only.",
3953
+ "values": [{ "name": "Start" }, { "name": "End" }]
3954
+ },
3955
+ {
3956
+ "name": "vertical-alignment",
3957
+ "description": "Defines the vertical alignment of the tab strip relative to the content area.\nApplies to Vertical orientation only.",
3958
+ "values": [{ "name": "Top" }, { "name": "Center" }]
3959
+ },
3960
+ {
3961
+ "name": "auto-play",
3962
+ "description": "Enables automatic tab switching for Vertical orientation.",
3963
+ "values": []
3964
+ },
3965
+ {
3966
+ "name": "auto-play-interval",
3967
+ "description": "Defines the interval in milliseconds between automatic tab switches.\nApplies only when autoPlay is enabled.",
3968
+ "values": []
3969
+ },
3950
3970
  {
3951
3971
  "name": "icon-without-background",
3952
3972
  "description": "Defines the background color of the component.",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@sapudex/web-components",
4
- "version": "2.31.0",
4
+ "version": "2.32.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -5194,7 +5194,7 @@
5194
5194
  },
5195
5195
  {
5196
5196
  "name": "udex-media-player",
5197
- "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-media-player</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/MediaPlayer.js\";</code>\n---\n\n\n### **Events:**\n - **videoStart** - Fires when video is played\n- **videoPause** - Fires when video is paused\n- **videoComplete** - Fires when video is watched\n- **videoReady** - Fires when video is ready\n- **videoProgress** - Fires when video watching progress changed\n- **video25** - Fires when 25% of video is watched\n- **video50** - Fires when 50% of video is watched\n- **video75** - Fires when 75% of video is watched\n\n### **Methods:**\n - **getPlayer(): _HTMLVideoElement | HTMLAudioElement | YoutubePlayer | VimeoPlayer | null_** - Returns video element\n\n### **Slots:**\n - **default** - Placeholder for all html `track` elements to provide video subtitles.\nExample: `<track kind='captions' src='./videoSubtitles.vtt' srclang='en' label='English' default />`\nMore information: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track",
5197
+ "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-media-player</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/MediaPlayer.js\";</code>\n---\n\n\n### **Events:**\n - **videoStart** - Fires when video is played\n- **videoPause** - Fires when video is paused\n- **videoComplete** - Fires when video is watched\n- **videoReady** - Fires when video is ready\n- **videoProgress** - Fires when video watching progress changed\n- **video25** - Fires when 25% of video is watched\n- **video50** - Fires when 50% of video is watched\n- **video75** - Fires when 75% of video is watched\n- **videojsReady** - Fires when the VideoJS library is loaded but before the player is created.\nUse this event to register custom VideoJS plugins via\n<code>event.detail.videojs.registerPlugin()</code>.\n\n### **Methods:**\n - **registerPlugin(name: _string_, plugin: _(...args: any[]) => any_): _void_** - Registers a custom VideoJS plugin to be applied before player initialization.\nMust be called before the component renders.\nFor plugins registered after rendering, use the videojsReady event instead.\n- **getPlayer(): _HTMLVideoElement | HTMLAudioElement | YoutubePlayer | VimeoPlayer | null_** - Returns video element\n\n### **Slots:**\n - **default** - Placeholder for all html `track` elements to provide video subtitles.\nExample: `<track kind='captions' src='./videoSubtitles.vtt' srclang='en' label='English' default />`\nMore information: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track",
5198
5198
  "doc-url": "",
5199
5199
  "attributes": [
5200
5200
  {
@@ -5299,6 +5299,10 @@
5299
5299
  {
5300
5300
  "name": "video75",
5301
5301
  "description": "Fires when 75% of video is watched"
5302
+ },
5303
+ {
5304
+ "name": "videojsReady",
5305
+ "description": "Fires when the VideoJS library is loaded but before the player is created.\nUse this event to register custom VideoJS plugins via\n<code>event.detail.videojs.registerPlugin()</code>."
5302
5306
  }
5303
5307
  ],
5304
5308
  "js": {
@@ -5398,6 +5402,10 @@
5398
5402
  {
5399
5403
  "name": "video75",
5400
5404
  "description": "Fires when 75% of video is watched"
5405
+ },
5406
+ {
5407
+ "name": "videojsReady",
5408
+ "description": "Fires when the VideoJS library is loaded but before the player is created.\nUse this event to register custom VideoJS plugins via\n<code>event.detail.videojs.registerPlugin()</code>."
5401
5409
  }
5402
5410
  ]
5403
5411
  }
@@ -6794,7 +6802,7 @@
6794
6802
  },
6795
6803
  {
6796
6804
  "name": "udex-secondary-navigation",
6797
- "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-secondary-navigation</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/SecondaryNavigation.js\";</code>\n---\n\n\n### **Events:**\n - **item-click** - Fires when item is clicked\n- **heading-click** - The event is triggered on user interaction with a secondary navigation heading\n\n### **Slots:**\n - **breadcrumbs** - Slot for breadcrumbs.\n- **buttons** - Slot for action buttons.",
6805
+ "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-secondary-navigation</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/SecondaryNavigation.js\";</code>\n---\n\n\n### **Events:**\n - **item-click** - Fires when item is clicked\n- **heading-click** - The event is triggered on user interaction with a secondary navigation heading\n- **mobile-menu-opener-click** - The event is triggered on user interaction with the mobile menu opener\n\n### **Slots:**\n - **breadcrumbs** - Slot for breadcrumbs.\n- **buttons** - Slot for action buttons.",
6798
6806
  "doc-url": "",
6799
6807
  "attributes": [
6800
6808
  {
@@ -6835,6 +6843,10 @@
6835
6843
  {
6836
6844
  "name": "heading-click",
6837
6845
  "description": "The event is triggered on user interaction with a secondary navigation heading"
6846
+ },
6847
+ {
6848
+ "name": "mobile-menu-opener-click",
6849
+ "description": "The event is triggered on user interaction with the mobile menu opener"
6838
6850
  }
6839
6851
  ],
6840
6852
  "js": {
@@ -6873,6 +6885,10 @@
6873
6885
  {
6874
6886
  "name": "heading-click",
6875
6887
  "description": "The event is triggered on user interaction with a secondary navigation heading"
6888
+ },
6889
+ {
6890
+ "name": "mobile-menu-opener-click",
6891
+ "description": "The event is triggered on user interaction with the mobile menu opener"
6876
6892
  }
6877
6893
  ]
6878
6894
  }
@@ -8499,7 +8515,7 @@
8499
8515
  },
8500
8516
  {
8501
8517
  "name": "udex-tab-navigation",
8502
- "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n<h3>Usage</h3>\n\nFor the <code>udex-tab-navigation</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/TabNavigation.js\";</code>\n---\n\n\n### **Events:**\n - **click** - Fires when the tab was clicked.\n- **tab-select** - Fired when a tab is selected.\n\n### **Slots:**\n - **default** - Defines the tabs and content.",
8518
+ "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n<h3>Usage</h3>\n\nFor the <code>udex-tab-navigation</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/TabNavigation.js\";</code>\n---\n\n\n### **Events:**\n - **click** - Fires when the tab was clicked.\n- **tab-select** - Fired when a tab is selected.\n\n### **Slots:**\n - **default** - Defines the tabs and content.\n- **footer** - Defines optional content rendered below the tab list in Vertical orientation.\nUse to place a button or any action element beneath the tabs.",
8503
8519
  "doc-url": "",
8504
8520
  "attributes": [
8505
8521
  {
@@ -8526,6 +8542,26 @@
8526
8542
  "default": "\"Horizontal\""
8527
8543
  }
8528
8544
  },
8545
+ {
8546
+ "name": "placement",
8547
+ "description": "Defines the placement of the tab strip relative to the content area.\nApplies to Vertical orientation only.",
8548
+ "value": { "type": "\"Start\" | \"End\"", "default": "\"Start\"" }
8549
+ },
8550
+ {
8551
+ "name": "vertical-alignment",
8552
+ "description": "Defines the vertical alignment of the tab strip relative to the content area.\nApplies to Vertical orientation only.",
8553
+ "value": { "type": "\"Top\" | \"Center\"", "default": "\"Top\"" }
8554
+ },
8555
+ {
8556
+ "name": "auto-play",
8557
+ "description": "Enables automatic tab switching for Vertical orientation.",
8558
+ "value": { "type": "boolean", "default": "false" }
8559
+ },
8560
+ {
8561
+ "name": "auto-play-interval",
8562
+ "description": "Defines the interval in milliseconds between automatic tab switches.\nApplies only when autoPlay is enabled.",
8563
+ "value": { "type": "number", "default": "5000" }
8564
+ },
8529
8565
  {
8530
8566
  "name": "icon-without-background",
8531
8567
  "description": "Defines the background color of the component.",
@@ -8536,6 +8572,10 @@
8536
8572
  {
8537
8573
  "name": "default",
8538
8574
  "description": "Defines the tabs and content."
8575
+ },
8576
+ {
8577
+ "name": "footer",
8578
+ "description": "Defines optional content rendered below the tab list in Vertical orientation.\nUse to place a button or any action element beneath the tabs."
8539
8579
  }
8540
8580
  ],
8541
8581
  "events": [
@@ -8565,6 +8605,26 @@
8565
8605
  "description": "Defines the orientation of the tab navigation.",
8566
8606
  "value": { "type": "\"Vertical\" | \"Horizontal\"" }
8567
8607
  },
8608
+ {
8609
+ "name": "placement",
8610
+ "description": "Defines the placement of the tab strip relative to the content area.\nApplies to Vertical orientation only.",
8611
+ "value": { "type": "\"Start\" | \"End\"" }
8612
+ },
8613
+ {
8614
+ "name": "vertical-alignment",
8615
+ "description": "Defines the vertical alignment of the tab strip relative to the content area.\nApplies to Vertical orientation only.",
8616
+ "value": { "type": "\"Top\" | \"Center\"" }
8617
+ },
8618
+ {
8619
+ "name": "auto-play",
8620
+ "description": "Enables automatic tab switching for Vertical orientation.",
8621
+ "value": { "type": "boolean" }
8622
+ },
8623
+ {
8624
+ "name": "auto-play-interval",
8625
+ "description": "Defines the interval in milliseconds between automatic tab switches.\nApplies only when autoPlay is enabled.",
8626
+ "value": { "type": "number" }
8627
+ },
8568
8628
  {
8569
8629
  "name": "icon-without-background",
8570
8630
  "description": "Defines the background color of the component.",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@sapudex/web-components",
4
- "version": "2.31.0",
4
+ "version": "2.32.0",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
7
7
  },
@@ -33,6 +33,12 @@ type UDExBreadcrumbsItemClickEventDetail = {
33
33
  ctrlKey?: boolean;
34
34
  metaKey?: boolean;
35
35
  shiftKey?: boolean;
36
+ source?: UDExBreadcrumbsClickEventSource;
37
+ }
38
+
39
+ enum UDExBreadcrumbsClickEventSource {
40
+ Main = "main",
41
+ Dropdown = "dropdown",
36
42
  }
37
43
 
38
44
  /**
@@ -66,6 +72,7 @@ type UDExBreadcrumbsItemClickEventDetail = {
66
72
  * @param { boolean } ctrlKey
67
73
  * @param { boolean } metaKey
68
74
  * @param { boolean } shiftKey
75
+ * @param { UDExBreadcrumbsClickEventSource } source The source of the click event
69
76
  */
70
77
  @event("item-click", { cancelable: true, bubbles: true })
71
78
 
@@ -173,7 +180,7 @@ class UDExBreadcrumbs extends UI5Element {
173
180
  return;
174
181
  }
175
182
 
176
- if (this.fireDecoratorEvent("item-click", { item })) {
183
+ if (this.fireDecoratorEvent("item-click", { item, source: UDExBreadcrumbsClickEventSource.Dropdown })) {
177
184
  window.open(item.href, item.target || "_self", "noopener,noreferrer");
178
185
  this._toggleDropdown();
179
186
  }
@@ -198,6 +205,7 @@ class UDExBreadcrumbs extends UI5Element {
198
205
  ctrlKey,
199
206
  metaKey,
200
207
  shiftKey,
208
+ source: UDExBreadcrumbsClickEventSource.Main,
201
209
  })) {
202
210
  e.preventDefault();
203
211
  }
@@ -491,6 +491,7 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
491
491
 
492
492
  calculateMarginInlineStart(rect: DOMRect): number | null {
493
493
  const { left, right } = rect;
494
+ const viewportWidth = document.documentElement.clientWidth;
494
495
 
495
496
  if (this.isLtrDirection && left < 0) {
496
497
  return left * -1 + 15;
@@ -500,12 +501,12 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
500
501
  return left - 15;
501
502
  }
502
503
 
503
- if (this.isRtlDirection && right > window.innerWidth) {
504
- return right - window.innerWidth + 15;
504
+ if (this.isRtlDirection && right > viewportWidth) {
505
+ return right - viewportWidth + 15;
505
506
  }
506
507
 
507
- if (this.isLtrDirection && right > window.innerWidth) {
508
- return window.innerWidth - right - 15;
508
+ if (this.isLtrDirection && right > viewportWidth) {
509
+ return viewportWidth - right - 15;
509
510
  }
510
511
 
511
512
  return null;
@@ -35,6 +35,10 @@ type UDExMediaPlayerVideoProgressEventDetail = {
35
35
  progress: number,
36
36
  }
37
37
 
38
+ type UDExMediaPlayerVideojsReadyEventDetail = {
39
+ videojs: any,
40
+ }
41
+
38
42
  /**
39
43
  * @class
40
44
  *
@@ -117,6 +121,15 @@ type UDExMediaPlayerVideoProgressEventDetail = {
117
121
  * @public
118
122
  */
119
123
  @event("video75", { bubbles: true })
124
+ /**
125
+ * Fires when the VideoJS library is loaded but before the player is created.
126
+ * Use this event to register custom VideoJS plugins via
127
+ * <code>event.detail.videojs.registerPlugin()</code>.
128
+ *
129
+ * @public
130
+ * @param {object} videojs the VideoJS constructor object
131
+ */
132
+ @event("videojsReady", { bubbles: true })
120
133
  class UDExMediaPlayer extends UI5Element {
121
134
  eventDetails!: {
122
135
  "videoStart": void,
@@ -127,6 +140,7 @@ class UDExMediaPlayer extends UI5Element {
127
140
  "video25": void,
128
141
  "video50": void,
129
142
  "video75": void,
143
+ "videojsReady": UDExMediaPlayerVideojsReadyEventDetail,
130
144
  };
131
145
  /**
132
146
  * Defines the options object of video.js element
@@ -251,6 +265,20 @@ class UDExMediaPlayer extends UI5Element {
251
265
  videoStart!: boolean;
252
266
  videoReady!: boolean;
253
267
  videoProgress!: number;
268
+ private _pendingPlugins: Array<{ name: string; plugin: (...args: any[]) => any }> = [];
269
+
270
+ /**
271
+ * Registers a custom VideoJS plugin to be applied before player initialization.
272
+ * Must be called before the component renders.
273
+ * For plugins registered after rendering, use the videojsReady event instead.
274
+ *
275
+ * @param name - The plugin name
276
+ * @param plugin - The plugin function or class
277
+ * @public
278
+ */
279
+ registerPlugin(name: string, plugin: (...args: any[]) => any): void {
280
+ this._pendingPlugins.push({ name, plugin });
281
+ }
254
282
 
255
283
  getPlayedTime = (target: EventTarget): number => {
256
284
  const progressControl = (target as any)?.player.controlBar?.progressControl?.childNameIndex_.seekBar;
@@ -518,6 +546,13 @@ class UDExMediaPlayer extends UI5Element {
518
546
  window.videojs = videojs;
519
547
  }
520
548
 
549
+ this._pendingPlugins.forEach(({ name, plugin }) => {
550
+ videojs.registerPlugin(name, plugin);
551
+ });
552
+ this._pendingPlugins = [];
553
+
554
+ this.fireDecoratorEvent("videojsReady", { videojs });
555
+
521
556
  const options = this.getOptionsValue();
522
557
  const language: string = options?.language;
523
558
  if (language) {
@@ -70,6 +70,7 @@
70
70
  aria-label="{{mobileMenuOpenerAriaLabel}}"
71
71
  label="{{heading}}"
72
72
  mobile-link-title="{{title}}"
73
+ @ui5-nav-item-click="{{handleMobileMenuOpenerClick}}"
73
74
  @ui5-sub-item-click="{{handleSubItemClick}}"
74
75
  _is-mobile-menu-opener
75
76
  .subItems="{{this.parsedItems}}">
@@ -34,8 +34,10 @@ type UDExSecondaryNavigationClickEventDetail = {
34
34
  originalEvent: Event,
35
35
  clickedItem: NavItem;
36
36
  clickedIndex: number;
37
+ isMore?: boolean,
37
38
  isMobile?: boolean,
38
39
  analyticsName: AnalyticsName,
40
+ analyticsPath: Array<string>,
39
41
  sourceNode: HTMLElement,
40
42
  };
41
43
 
@@ -45,6 +47,12 @@ type UDExSecondaryNavigationHeadingClickEventDetail = {
45
47
  sourceNode: HTMLElement,
46
48
  };
47
49
 
50
+ type UDExSecondaryNavigationMobileMenuOpenerClickEventDetail = {
51
+ originalEvent: Event,
52
+ analyticsName: AnalyticsName,
53
+ sourceNode: HTMLElement,
54
+ };
55
+
48
56
  /**
49
57
  * @class
50
58
  *
@@ -97,10 +105,23 @@ type UDExSecondaryNavigationHeadingClickEventDetail = {
97
105
  */
98
106
  @event("heading-click", { cancelable: true, bubbles: true })
99
107
 
108
+ /**
109
+ * The event is triggered on user interaction with the mobile menu opener
110
+ *
111
+ * @allowPreventDefault
112
+ * @public
113
+ * @param {Event} originalEvent The original event object
114
+ * @param {AnalyticsName} analyticsName The analytics name for the mobile menu opener
115
+ * @param {HTMLElement} sourceNode The source node of the mobile menu opener
116
+ *
117
+ */
118
+ @event("mobile-menu-opener-click", { cancelable: true, bubbles: true })
119
+
100
120
  class UDExSecondaryNavigation extends UI5Element {
101
121
  eventDetails!: {
102
122
  "item-click": UDExSecondaryNavigationClickEventDetail,
103
123
  "heading-click": UDExSecondaryNavigationHeadingClickEventDetail,
124
+ "mobile-menu-opener-click": UDExSecondaryNavigationMobileMenuOpenerClickEventDetail,
104
125
  };
105
126
  /**
106
127
  * Defines an aria label for the mobile menu opener
@@ -247,7 +268,7 @@ class UDExSecondaryNavigation extends UI5Element {
247
268
  });
248
269
 
249
270
  if ((steps.at(-1) || 0) <= availableWidth) {
250
- this._visibleItems.splice(0, Infinity, ...this.parsedItems);
271
+ this._visibleItems = [...this.parsedItems];
251
272
  this._showMoreButton = false;
252
273
  this.refreshRendering();
253
274
  return;
@@ -256,8 +277,8 @@ class UDExSecondaryNavigation extends UI5Element {
256
277
  if (this.parsedItems) {
257
278
  // @ts-ignore
258
279
  const lastVisibleIndex: number = steps.findLastIndex((size: number) => size < (availableWidth - moreButtonWidth - itemsGap));
259
- this._visibleItems.splice(0, Infinity, ...this.parsedItems.slice(0, lastVisibleIndex + 1));
260
- this._overflowItems.splice(0, Infinity, ...this.parsedItems.slice(lastVisibleIndex + 1));
280
+ this._visibleItems = this.parsedItems.slice(0, lastVisibleIndex + 1);
281
+ this._overflowItems = this.parsedItems.slice(lastVisibleIndex + 1);
261
282
  this._showMoreButton = true;
262
283
  this.refreshRendering();
263
284
  }
@@ -345,7 +366,7 @@ class UDExSecondaryNavigation extends UI5Element {
345
366
  active,
346
367
  mobileLinkTitle,
347
368
  items: subItems,
348
- });
369
+ }, this.getAnalyticsPath(title, path), title === this.moreButtonText);
349
370
 
350
371
  if (prevented) {
351
372
  e.preventDefault();
@@ -366,7 +387,9 @@ class UDExSecondaryNavigation extends UI5Element {
366
387
  const { originalEvent: actualOriginalEvent, index } = e.detail;
367
388
  const item = e.detail.item as UDExSecondaryNavigationSubItem;
368
389
  const { items } = item as NavItem;
369
- const prevented = !this.fireEventItemClick(actualOriginalEvent, index, item);
390
+ const analyticsPath = this.getAnalyticsPath(item.title, item.path);
391
+ const isMore = this._clickedNavItem?.title === this.moreButtonText;
392
+ const prevented = !this.fireEventItemClick(actualOriginalEvent, index, item, analyticsPath, isMore);
370
393
 
371
394
  if (prevented) {
372
395
  e.preventDefault();
@@ -397,10 +420,14 @@ class UDExSecondaryNavigation extends UI5Element {
397
420
  {
398
421
  items, target, path, title, active, mobileLinkTitle,
399
422
  }: NavItem,
423
+ analyticsPath: Array<string> = [],
424
+ isMore: boolean = false,
400
425
  ): boolean {
401
426
  return this.fireDecoratorEvent("item-click", {
402
427
  ...(this.isMobileScreen && { isMobile: true }),
428
+ ...(isMore && { isMore: true }),
403
429
  analyticsName: AnalyticsName.HeaderSub,
430
+ analyticsPath,
404
431
  sourceNode: e?.currentTarget as HTMLElement,
405
432
  originalEvent: e,
406
433
  clickedItem: {
@@ -415,25 +442,62 @@ class UDExSecondaryNavigation extends UI5Element {
415
442
  });
416
443
  }
417
444
 
445
+ getAnalyticsPath(clickedTitle: string, clickedPath?: string): Array<string> {
446
+ const getLabel = (item: NavItem) => (this.isMobileScreen ? (item.mobileLinkTitle || item.title) : item.title);
447
+ const findPath = (items: Array<NavItem>, parentPath: Array<string>): Array<string> | null => items.reduce<Array<string> | null>((found, item) => {
448
+ if (found !== null) {
449
+ return found;
450
+ }
451
+ if (item.title === clickedTitle && (!clickedPath || item.path === clickedPath)) {
452
+ return [...parentPath, getLabel(item)];
453
+ }
454
+ if (item.items?.length) {
455
+ return findPath(item.items, [...parentPath, getLabel(item)]);
456
+ }
457
+ return null;
458
+ }, null);
459
+ return findPath(this.parsedItems, []) || [];
460
+ }
461
+
418
462
  setActiveItem(navItems: Array<NavItem>, clickedItem: UDExSecondaryNavigationItemBase): void {
419
- const updateNav = (items: Array<NavItem>, { title, path }: UDExSecondaryNavigationItemBase) => {
463
+ const updateNav = (items: Array<NavItem>, { title, path }: UDExSecondaryNavigationItemBase): boolean => {
464
+ let hasActiveDescendant = false;
465
+
420
466
  items.forEach(item => {
421
467
  if (item.title === title && (item.path === path || !item.path)) {
422
468
  item.active = true;
469
+ hasActiveDescendant = true;
423
470
  return;
424
471
  }
425
- delete item.active;
426
472
 
427
473
  if (item.items) {
428
- updateNav(item.items, clickedItem);
474
+ const childIsActive = updateNav(item.items, clickedItem);
475
+ if (childIsActive) {
476
+ item.active = true;
477
+ hasActiveDescendant = true;
478
+ } else {
479
+ delete item.active;
480
+ }
481
+ } else {
482
+ delete item.active;
429
483
  }
430
484
  });
485
+
486
+ return hasActiveDescendant;
431
487
  };
432
488
 
433
489
  updateNav(navItems, clickedItem);
434
490
  this.navItems = JSON.stringify(navItems);
435
491
  }
436
492
 
493
+ handleMobileMenuOpenerClick(e: CustomEvent): void {
494
+ this.fireDecoratorEvent("mobile-menu-opener-click", {
495
+ analyticsName: AnalyticsName.HeaderSub,
496
+ sourceNode: e.target as HTMLElement,
497
+ originalEvent: e,
498
+ });
499
+ }
500
+
437
501
  handleOutsideClick(): void {
438
502
  document.addEventListener("mousedown", this.outsideClickListener);
439
503
  }
@@ -545,4 +609,8 @@ class UDExSecondaryNavigation extends UI5Element {
545
609
  UDExSecondaryNavigation.define();
546
610
 
547
611
  export default UDExSecondaryNavigation;
548
- export type { UDExSecondaryNavigationClickEventDetail, UDExSecondaryNavigationHeadingClickEventDetail };
612
+ export type {
613
+ UDExSecondaryNavigationClickEventDetail,
614
+ UDExSecondaryNavigationHeadingClickEventDetail,
615
+ UDExSecondaryNavigationMobileMenuOpenerClickEventDetail,
616
+ };
@@ -166,7 +166,6 @@ class UDExSecondaryNavigationItem extends UDExSecondaryNavigationItemBase {
166
166
  _dropdownHistory: Array<Array<NavItem>> = [];
167
167
  _shouldFocusFirstSubItem!: boolean;
168
168
  _subTitle!: string | undefined;
169
- _shouldResetTabIndex!: boolean;
170
169
  _shouldSetTabIndex!: boolean;
171
170
 
172
171
  onAfterRendering(): void {
@@ -187,11 +186,6 @@ class UDExSecondaryNavigationItem extends UDExSecondaryNavigationItemBase {
187
186
  this._tabIndex = "0";
188
187
  this._shouldSetTabIndex = false;
189
188
  }
190
-
191
- if (this._shouldResetTabIndex) {
192
- this._tabIndex = "-1";
193
- this._shouldResetTabIndex = false;
194
- }
195
189
  }
196
190
 
197
191
  onBeforeRendering() : void {
@@ -121,7 +121,7 @@ class UDExSecondaryNavigationSubItem extends UDExSecondaryNavigationItemBase {
121
121
 
122
122
  get backButtonAriaLabel(): string {
123
123
  const label = translate(UDExSecondaryNavigationSubItem, BACK_BUTTON_LABEL);
124
- return `${label} ${this.itemLabel}`;
124
+ return `${this.itemLabel}, ${label}`;
125
125
  }
126
126
  }
127
127
 
package/src/Tab.ts CHANGED
@@ -299,6 +299,10 @@ class UDExTab extends UI5Element implements ITab {
299
299
  return this.effectiveSelected && this.hasBodyText && this._isVertical;
300
300
  }
301
301
 
302
+ get hasBodyTextOrLink(): boolean {
303
+ return this._isVertical && (this.hasBodyText || this.hasLinkSlot);
304
+ }
305
+
302
306
  get hasLinkSlot(): boolean {
303
307
  return this.link && this.link.length > 0;
304
308
  }
@@ -314,10 +318,6 @@ class UDExTab extends UI5Element implements ITab {
314
318
  return this.link.map(l => l.outerHTML).join("");
315
319
  }
316
320
 
317
- get hasBodyTextOrLink(): boolean {
318
- return this._isVertical && (this.hasBodyText || this.hasLinkSlot);
319
- }
320
-
321
321
  get effectiveSelected(): boolean {
322
322
  return this.selected || this._selected;
323
323
  }
@@ -4,6 +4,16 @@
4
4
  class="udex-tab-navigation__header"
5
5
  part="tab-navigation-header"
6
6
  @keydown="{{handleKeyDown}}">
7
+ {{#if showPlayButton}}
8
+ <udex-button
9
+ class="udex-tab-navigation__play-button"
10
+ design="Tertiary"
11
+ size="Large"
12
+ icon="{{playBtnIcon}}"
13
+ tooltip="{{playBtnTooltipText}}"
14
+ @click="{{onPlayButtonClick}}">
15
+ </udex-button>
16
+ {{/if}}
7
17
  <div
8
18
  id="{{_id}}-header-tabs"
9
19
  class="udex-tab-navigation__header-tabs"
@@ -49,6 +59,11 @@
49
59
  {{#if this._overflowItems.length}}
50
60
  {{tabNavigationPopover}}
51
61
  {{/if}}
62
+ {{#if showFooterSlot}}
63
+ <div class="udex-tab-navigation__footer" part="tab-navigation-footer">
64
+ <slot name="footer"></slot>
65
+ </div>
66
+ {{/if}}
52
67
  </div>
53
68
  <div
54
69
  class="udex-tab-navigation__content"