@ui5/webcomponents-fiori 2.19.2 → 2.20.0-rc.1

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 (218) hide show
  1. package/CHANGELOG.md +12 -3
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/DynamicPage.js +8 -2
  4. package/dist/DynamicPage.js.map +1 -1
  5. package/dist/ShellBar.d.ts +231 -304
  6. package/dist/ShellBar.js +506 -980
  7. package/dist/ShellBar.js.map +1 -1
  8. package/dist/ShellBarItem.d.ts +15 -31
  9. package/dist/ShellBarItem.js +36 -25
  10. package/dist/ShellBarItem.js.map +1 -1
  11. package/dist/ShellBarItemTemplate.d.ts +2 -0
  12. package/dist/ShellBarItemTemplate.js +11 -0
  13. package/dist/ShellBarItemTemplate.js.map +1 -0
  14. package/dist/ShellBarTemplate.js +53 -55
  15. package/dist/ShellBarTemplate.js.map +1 -1
  16. package/dist/UserMenu.d.ts +10 -1
  17. package/dist/UserMenu.js +9 -1
  18. package/dist/UserMenu.js.map +1 -1
  19. package/dist/UserMenuAccount.js +0 -2
  20. package/dist/UserMenuAccount.js.map +1 -1
  21. package/dist/UserMenuItem.d.ts +0 -1
  22. package/dist/UserMenuItem.js +0 -1
  23. package/dist/UserMenuItem.js.map +1 -1
  24. package/dist/UserMenuItemGroup.d.ts +0 -1
  25. package/dist/UserMenuItemGroup.js +0 -1
  26. package/dist/UserMenuItemGroup.js.map +1 -1
  27. package/dist/UserMenuTemplate.js +3 -1
  28. package/dist/UserMenuTemplate.js.map +1 -1
  29. package/dist/UserSettingsAccountView.js +0 -2
  30. package/dist/UserSettingsAccountView.js.map +1 -1
  31. package/dist/UserSettingsAppearanceView.js +0 -2
  32. package/dist/UserSettingsAppearanceView.js.map +1 -1
  33. package/dist/UserSettingsAppearanceViewGroup.d.ts +0 -1
  34. package/dist/UserSettingsAppearanceViewGroup.js +0 -1
  35. package/dist/UserSettingsAppearanceViewGroup.js.map +1 -1
  36. package/dist/UserSettingsAppearanceViewItem.js +0 -2
  37. package/dist/UserSettingsAppearanceViewItem.js.map +1 -1
  38. package/dist/UserSettingsDialog.d.ts +0 -1
  39. package/dist/UserSettingsDialog.js +0 -1
  40. package/dist/UserSettingsDialog.js.map +1 -1
  41. package/dist/UserSettingsItem.d.ts +0 -1
  42. package/dist/UserSettingsItem.js +0 -1
  43. package/dist/UserSettingsItem.js.map +1 -1
  44. package/dist/UserSettingsView.d.ts +0 -1
  45. package/dist/UserSettingsView.js +0 -1
  46. package/dist/UserSettingsView.js.map +1 -1
  47. package/dist/css/themes/ShellBar.css +1 -1
  48. package/dist/css/themes/ShellBarItem.css +1 -0
  49. package/dist/css/themes/ShellBarLegacy.css +1 -0
  50. package/dist/css/themes/ShellBarSearchLegacy.css +1 -0
  51. package/dist/custom-elements-internal.json +363 -750
  52. package/dist/custom-elements.json +324 -609
  53. package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
  54. package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
  55. package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
  56. package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
  57. package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
  58. package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
  59. package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
  60. package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
  61. package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
  62. package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
  63. package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
  64. package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
  65. package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
  66. package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
  67. package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
  68. package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
  69. package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
  70. package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
  71. package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
  72. package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
  73. package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
  74. package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
  75. package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
  76. package/dist/generated/assets/i18n/messagebundle_id.json +1 -1
  77. package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
  78. package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
  79. package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
  80. package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
  81. package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
  82. package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
  83. package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
  84. package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
  85. package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
  86. package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
  87. package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
  88. package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
  89. package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
  90. package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
  91. package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
  92. package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
  93. package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
  94. package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
  95. package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
  96. package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
  97. package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
  98. package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
  99. package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
  100. package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
  101. package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
  102. package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
  103. package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
  104. package/dist/generated/i18n/i18n-defaults.d.ts +2 -1
  105. package/dist/generated/i18n/i18n-defaults.js +2 -1
  106. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  107. package/dist/generated/themes/ShellBar.css.d.ts +1 -1
  108. package/dist/generated/themes/ShellBar.css.js +1 -1
  109. package/dist/generated/themes/ShellBar.css.js.map +1 -1
  110. package/dist/generated/themes/ShellBarItem.css.d.ts +2 -0
  111. package/dist/generated/themes/ShellBarItem.css.js +8 -0
  112. package/dist/generated/themes/ShellBarItem.css.js.map +1 -0
  113. package/dist/generated/themes/ShellBarLegacy.css.d.ts +2 -0
  114. package/dist/generated/themes/ShellBarLegacy.css.js +8 -0
  115. package/dist/generated/themes/ShellBarLegacy.css.js.map +1 -0
  116. package/dist/generated/themes/ShellBarSearchLegacy.css.d.ts +2 -0
  117. package/dist/generated/themes/ShellBarSearchLegacy.css.js +8 -0
  118. package/dist/generated/themes/ShellBarSearchLegacy.css.js.map +1 -0
  119. package/dist/shellbar/IShellBarSearchController.d.ts +28 -0
  120. package/dist/shellbar/IShellBarSearchController.js +2 -0
  121. package/dist/shellbar/IShellBarSearchController.js.map +1 -0
  122. package/dist/shellbar/ShellBarAccessibility.d.ts +42 -0
  123. package/dist/shellbar/ShellBarAccessibility.js +50 -0
  124. package/dist/shellbar/ShellBarAccessibility.js.map +1 -0
  125. package/dist/shellbar/ShellBarItemNavigation.d.ts +18 -0
  126. package/dist/shellbar/ShellBarItemNavigation.js +86 -0
  127. package/dist/shellbar/ShellBarItemNavigation.js.map +1 -0
  128. package/dist/shellbar/ShellBarLegacy.d.ts +46 -0
  129. package/dist/shellbar/ShellBarLegacy.js +138 -0
  130. package/dist/shellbar/ShellBarLegacy.js.map +1 -0
  131. package/dist/shellbar/ShellBarOverflow.d.ts +51 -0
  132. package/dist/shellbar/ShellBarOverflow.js +159 -0
  133. package/dist/shellbar/ShellBarOverflow.js.map +1 -0
  134. package/dist/shellbar/ShellBarSearch.d.ts +59 -0
  135. package/dist/shellbar/ShellBarSearch.js +145 -0
  136. package/dist/shellbar/ShellBarSearch.js.map +1 -0
  137. package/dist/shellbar/ShellBarSearchLegacy.d.ts +65 -0
  138. package/dist/shellbar/ShellBarSearchLegacy.js +116 -0
  139. package/dist/shellbar/ShellBarSearchLegacy.js.map +1 -0
  140. package/dist/shellbar/templates/ShellBarLegacyTemplate.d.ts +20 -0
  141. package/dist/shellbar/templates/ShellBarLegacyTemplate.js +71 -0
  142. package/dist/shellbar/templates/ShellBarLegacyTemplate.js.map +1 -0
  143. package/dist/shellbar/templates/ShellBarSearchLegacyTemplate.d.ts +5 -0
  144. package/dist/shellbar/templates/ShellBarSearchLegacyTemplate.js +18 -0
  145. package/dist/shellbar/templates/ShellBarSearchLegacyTemplate.js.map +1 -0
  146. package/dist/shellbar/templates/ShellBarSearchTemplate.d.ts +4 -0
  147. package/dist/shellbar/templates/ShellBarSearchTemplate.js +17 -0
  148. package/dist/shellbar/templates/ShellBarSearchTemplate.js.map +1 -0
  149. package/dist/vscode.html-custom-data.json +29 -79
  150. package/dist/web-types.json +75 -239
  151. package/package.json +8 -8
  152. package/src/ShellBarItemTemplate.tsx +36 -0
  153. package/src/ShellBarTemplate.tsx +222 -300
  154. package/src/UserMenuTemplate.tsx +11 -3
  155. package/src/i18n/messagebundle.properties +3 -0
  156. package/src/i18n/messagebundle_ar.properties +2 -0
  157. package/src/i18n/messagebundle_bg.properties +6 -4
  158. package/src/i18n/messagebundle_ca.properties +2 -0
  159. package/src/i18n/messagebundle_cnr.properties +2 -0
  160. package/src/i18n/messagebundle_cs.properties +2 -0
  161. package/src/i18n/messagebundle_cy.properties +2 -0
  162. package/src/i18n/messagebundle_da.properties +2 -0
  163. package/src/i18n/messagebundle_de.properties +2 -0
  164. package/src/i18n/messagebundle_el.properties +2 -0
  165. package/src/i18n/messagebundle_en.properties +2 -0
  166. package/src/i18n/messagebundle_en_GB.properties +2 -0
  167. package/src/i18n/messagebundle_en_US_sappsd.properties +2 -0
  168. package/src/i18n/messagebundle_en_US_saprigi.properties +2 -0
  169. package/src/i18n/messagebundle_en_US_saptrc.properties +2 -0
  170. package/src/i18n/messagebundle_es.properties +2 -0
  171. package/src/i18n/messagebundle_es_MX.properties +2 -0
  172. package/src/i18n/messagebundle_et.properties +2 -0
  173. package/src/i18n/messagebundle_fi.properties +2 -0
  174. package/src/i18n/messagebundle_fr.properties +2 -0
  175. package/src/i18n/messagebundle_fr_CA.properties +2 -0
  176. package/src/i18n/messagebundle_hi.properties +2 -0
  177. package/src/i18n/messagebundle_hr.properties +2 -0
  178. package/src/i18n/messagebundle_hu.properties +2 -0
  179. package/src/i18n/messagebundle_id.properties +3 -1
  180. package/src/i18n/messagebundle_it.properties +2 -0
  181. package/src/i18n/messagebundle_iw.properties +2 -0
  182. package/src/i18n/messagebundle_ja.properties +2 -0
  183. package/src/i18n/messagebundle_kk.properties +2 -0
  184. package/src/i18n/messagebundle_ko.properties +2 -0
  185. package/src/i18n/messagebundle_lt.properties +2 -0
  186. package/src/i18n/messagebundle_lv.properties +2 -0
  187. package/src/i18n/messagebundle_mk.properties +2 -0
  188. package/src/i18n/messagebundle_ms.properties +2 -0
  189. package/src/i18n/messagebundle_nl.properties +2 -0
  190. package/src/i18n/messagebundle_no.properties +2 -0
  191. package/src/i18n/messagebundle_pl.properties +2 -0
  192. package/src/i18n/messagebundle_pt.properties +2 -0
  193. package/src/i18n/messagebundle_pt_PT.properties +2 -0
  194. package/src/i18n/messagebundle_ro.properties +2 -0
  195. package/src/i18n/messagebundle_ru.properties +2 -0
  196. package/src/i18n/messagebundle_sh.properties +2 -0
  197. package/src/i18n/messagebundle_sk.properties +2 -0
  198. package/src/i18n/messagebundle_sl.properties +2 -0
  199. package/src/i18n/messagebundle_sr.properties +2 -0
  200. package/src/i18n/messagebundle_sv.properties +2 -0
  201. package/src/i18n/messagebundle_th.properties +2 -0
  202. package/src/i18n/messagebundle_tr.properties +2 -0
  203. package/src/i18n/messagebundle_uk.properties +2 -0
  204. package/src/i18n/messagebundle_vi.properties +2 -0
  205. package/src/i18n/messagebundle_zh_CN.properties +2 -0
  206. package/src/i18n/messagebundle_zh_TW.properties +2 -0
  207. package/src/shellbar/templates/ShellBarLegacyTemplate.tsx +190 -0
  208. package/src/shellbar/templates/ShellBarSearchLegacyTemplate.tsx +61 -0
  209. package/src/shellbar/templates/ShellBarSearchTemplate.tsx +40 -0
  210. package/src/themes/NavigationLayout.css +1 -0
  211. package/src/themes/ShellBar.css +189 -372
  212. package/src/themes/ShellBarItem.css +43 -0
  213. package/src/themes/ShellBarLegacy.css +174 -0
  214. package/src/themes/ShellBarSearchLegacy.css +44 -0
  215. package/dist/ShellBarPopoverTemplate.d.ts +0 -2
  216. package/dist/ShellBarPopoverTemplate.js +0 -9
  217. package/dist/ShellBarPopoverTemplate.js.map +0 -1
  218. package/src/ShellBarPopoverTemplate.tsx +0 -50
@@ -1,32 +1,49 @@
1
1
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
2
  import type { Slot, DefaultSlot } from "@ui5/webcomponents-base/dist/UI5Element.js";
3
- import type { ListItemClickEventDetail } from "@ui5/webcomponents/dist/List.js";
4
- import type { ResizeObserverCallback } from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js";
5
- import Popover from "@ui5/webcomponents/dist/Popover.js";
6
- import Button from "@ui5/webcomponents/dist/Button.js";
7
- import type { IButton } from "@ui5/webcomponents/dist/Button.js";
8
3
  import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
9
- import type { ClassMap, AccessibilityAttributes, AriaRole, UI5CustomEvent } from "@ui5/webcomponents-base";
10
- import type ListItemBase from "@ui5/webcomponents/dist/ListItemBase.js";
11
- import type ShellBarItem from "./ShellBarItem.js";
12
- import type { ShellBarItemAccessibilityAttributes } from "./ShellBarItem.js";
4
+ import type { IButton } from "@ui5/webcomponents/dist/Button.js";
5
+ import type { IShellBarSearchController } from "./shellbar/IShellBarSearchController.js";
6
+ import ShellBarLegacy from "./shellbar/ShellBarLegacy.js";
7
+ import ShellBarOverflow from "./shellbar/ShellBarOverflow.js";
8
+ import ShellBarAccessibility from "./shellbar/ShellBarAccessibility.js";
9
+ import ShellBarItemNavigation from "./shellbar/ShellBarItemNavigation.js";
10
+ import ShellBarItem from "./ShellBarItem.js";
13
11
  import type ShellBarBranding from "./ShellBarBranding.js";
14
- type ShellBarLogoAccessibilityAttributes = {
15
- role?: Extract<AriaRole, "button" | "link">;
16
- name?: string;
12
+ import type { ShellBarAccessibilityInfo, ShellBarAccessibilityAttributes, ShellBarAreaAccessibilityAttributes, ShellBarLogoAccessibilityAttributes, ShellBarProfileAccessibilityAttributes } from "./shellbar/ShellBarAccessibility.js";
13
+ import type ListItemBase from "@ui5/webcomponents/dist/ListItemBase.js";
14
+ type ShellBarBreakpoint = "S" | "M" | "L" | "XL" | "XXL";
15
+ declare const ShellBarActions: {
16
+ Search: string;
17
+ Profile: string;
18
+ Overflow: string;
19
+ Assistant: string;
20
+ ProductSwitch: string;
21
+ Notifications: string;
17
22
  };
18
- type ShellBarProfileAccessibilityAttributes = Pick<AccessibilityAttributes, "name" | "expanded" | "hasPopup">;
19
- type ShellBarAreaAccessibilityAttributes = Pick<AccessibilityAttributes, "hasPopup" | "expanded">;
20
- type ShellBarBrandingAccessibilityAttributes = Pick<AccessibilityAttributes, "name">;
21
- type ShellBarAccessibilityAttributes = {
22
- logo?: ShellBarLogoAccessibilityAttributes;
23
- notifications?: ShellBarAreaAccessibilityAttributes;
24
- profile?: ShellBarProfileAccessibilityAttributes;
25
- product?: ShellBarAreaAccessibilityAttributes;
26
- search?: ShellBarAreaAccessibilityAttributes;
27
- overflow?: ShellBarAreaAccessibilityAttributes;
28
- branding?: ShellBarBrandingAccessibilityAttributes;
23
+ declare const ShellBarActionsSelectors: {
24
+ Search: string;
25
+ Profile: string;
26
+ Overflow: string;
27
+ Assistant: string;
28
+ ProductSwitch: string;
29
+ Notifications: string;
29
30
  };
31
+ type ShellBarActionId = typeof ShellBarActions[keyof typeof ShellBarActions];
32
+ type ShellBarActionItem = {
33
+ id: ShellBarActionId;
34
+ icon?: string;
35
+ count?: string;
36
+ enabled: boolean;
37
+ selector: string;
38
+ isProtected: boolean;
39
+ stableDomRef?: string;
40
+ };
41
+ interface IShellBarSearchField extends HTMLElement {
42
+ focused: boolean;
43
+ value: string;
44
+ collapsed?: boolean;
45
+ open?: boolean;
46
+ }
30
47
  type ShellBarNotificationsClickEventDetail = {
31
48
  targetRef: HTMLElement;
32
49
  };
@@ -55,35 +72,6 @@ type ShellBarSearchFieldToggleEventDetail = {
55
72
  type ShellBarSearchFieldClearEventDetail = {
56
73
  targetRef: HTMLElement;
57
74
  };
58
- interface IShellBarSearchField extends HTMLElement {
59
- focused: boolean;
60
- value: string;
61
- collapsed?: boolean;
62
- open?: boolean;
63
- }
64
- interface IShellBarHidableItem {
65
- classes: string;
66
- id: string;
67
- show: boolean;
68
- }
69
- interface IShelBarItemInfo extends IShellBarHidableItem {
70
- icon?: string;
71
- text?: string;
72
- count?: string;
73
- custom?: boolean;
74
- title?: string;
75
- stableDomRef?: string;
76
- refItemid?: string;
77
- press: (e: UI5CustomEvent<Button, "click">) => void;
78
- order?: number;
79
- profile?: boolean;
80
- tooltip?: string;
81
- accessibilityAttributes?: ShellBarItemAccessibilityAttributes;
82
- accessibleName?: string;
83
- }
84
- interface IShellBarContentItem extends IShellBarHidableItem {
85
- hideOrder: number;
86
- }
87
75
  /**
88
76
  * @class
89
77
  * ### Overview
@@ -129,37 +117,65 @@ declare class ShellBar extends UI5Element {
129
117
  "content-item-visibility-change": ShellBarContentItemVisibilityChangeEventDetail;
130
118
  };
131
119
  /**
132
- * Defines the visibility state of the search button.
120
+ * Defines a `ui5-button` in the bar that will be placed in the beginning.
121
+ * We encourage this slot to be used for a menu button.
122
+ * It gets overstyled to match ShellBar's styling.
123
+ * @public
124
+ */
125
+ startButton: Slot<IButton>;
126
+ /**
127
+ * Defines the branding slot.
128
+ * The `ui5-shellbar-branding` component is intended to be placed inside this slot.
129
+ * Content placed here takes precedence over the `primaryTitle` property and the `logo` content slot.
133
130
  *
134
- * **Note:** The `hideSearchButton` property is in an experimental state and is a subject to change.
135
- * @default false
131
+ * **Note:** The `branding` slot is in an experimental state and is a subject to change.
132
+ *
133
+ * @since 2.12.0
136
134
  * @public
137
135
  */
138
- hideSearchButton: boolean;
136
+ branding: Slot<ShellBarBranding>;
139
137
  /**
140
- * Disables the automatic search field expansion/collapse when the available space is not enough.
138
+ * Define the items displayed in the content area.
139
+ *
140
+ * Use the `data-hide-order` attribute with numeric value to specify the order of the items to be hidden when the space is not enough.
141
+ * Lower values will be hidden first.
142
+ *
143
+ * **Note:** The `content` slot is in an experimental state and is a subject to change.
141
144
  *
142
- * **Note:** The `disableSearchCollapse` property is in an experimental state and is a subject to change.
143
- * @default false
144
145
  * @public
146
+ * @since 2.7.0
145
147
  */
146
- disableSearchCollapse: boolean;
148
+ content: Slot<HTMLElement>;
147
149
  /**
148
- * Defines the `primaryTitle`.
150
+ * Defines the `ui5-input`, that will be used as a search field.
151
+ * @public
152
+ */
153
+ searchField: Slot<IShellBarSearchField>;
154
+ /**
155
+ * Defines the assistant slot.
149
156
  *
150
- * **Note:** The `primaryTitle` would be hidden on S screen size (less than approx. 700px).
151
- * @default undefined
157
+ * @since 2.0.0
152
158
  * @public
153
159
  */
154
- primaryTitle?: string;
160
+ assistant: Slot<IButton>;
155
161
  /**
156
- * Defines the `secondaryTitle`.
162
+ * Defines the `ui5-shellbar` additional items.
157
163
  *
158
- * **Note:** The `secondaryTitle` would be hidden on S and M screen sizes (less than approx. 1300px).
159
- * @default undefined
164
+ * **Note:**
165
+ * You can use the `<ui5-shellbar-item></ui5-shellbar-item>`.
160
166
  * @public
161
167
  */
162
- secondaryTitle?: string;
168
+ items: DefaultSlot<ShellBarItem>;
169
+ /**
170
+ * You can pass `ui5-avatar` to set the profile image/icon.
171
+ * If no profile slot is set - profile will be excluded from actions.
172
+ *
173
+ * **Note:** We recommend not using the `size` attribute of `ui5-avatar` because
174
+ * it should have specific size by design in the context of `ui5-shellbar` profile.
175
+ * @since 1.0.0-rc.6
176
+ * @public
177
+ */
178
+ profile: Slot<HTMLElement>;
163
179
  /**
164
180
  * Defines the `notificationsCount`,
165
181
  * displayed in the notification icon top-right corner.
@@ -227,51 +243,88 @@ declare class ShellBar extends UI5Element {
227
243
  */
228
244
  breakpointSize: string;
229
245
  /**
246
+ * Actions computed from controllers.
247
+ * @private
248
+ */
249
+ actions: ShellBarActionItem[];
250
+ /**
251
+ * Show overflow button when items are hidden.
252
+ * @private
253
+ */
254
+ showOverflowButton: boolean;
255
+ /**
256
+ * Open state of the overflow popover.
257
+ * @private
258
+ */
259
+ overflowPopoverOpen: boolean;
260
+ /**
261
+ * IDs of items currently hidden due to overflow.
262
+ * Used to trigger rerender for conditional rendering.
263
+ * @private
264
+ */
265
+ hiddenItemsIds: string[];
266
+ /**
267
+ * Show full-screen search overlay.
230
268
  * @private
231
269
  */
232
- withLogo: boolean;
233
- _itemsInfo: Array<IShelBarItemInfo>;
234
- _contentInfo: Array<IShellBarContentItem>;
235
- _menuPopoverExpanded: boolean;
236
- _overflowPopoverExpanded: boolean;
237
270
  showFullWidthSearch: boolean;
238
- _cachedHiddenContent: Array<HTMLElement>;
239
271
  /**
240
- * Defines the assistant slot.
272
+ * Spacer element.
273
+ * @private
274
+ */
275
+ spacer?: HTMLElement;
276
+ /**
277
+ * Outer container of the overflow container.
278
+ * @private
279
+ */
280
+ overflowOuter?: HTMLElement;
281
+ /**
282
+ * Inner container of the overflow container.
283
+ * @private
284
+ */
285
+ overflowInner?: HTMLElement;
286
+ static i18nBundle: I18nBundle;
287
+ private readonly RESIZE_THROTTLE_RATE;
288
+ private handleResizeBound;
289
+ private readonly breakpoints;
290
+ private readonly breakpointMap;
291
+ itemNavigation: ShellBarItemNavigation;
292
+ overflow: ShellBarOverflow;
293
+ accessibility: ShellBarAccessibility;
294
+ private _searchAdaptor;
295
+ private _searchAdaptorLegacy;
296
+ /**
297
+ * Defines the visibility state of the search button.
241
298
  *
242
- * @since 2.0.0
299
+ * **Note:** The `hideSearchButton` property is in an experimental state and is a subject to change.
300
+ * @default false
243
301
  * @public
244
302
  */
245
- assistant: Slot<IButton>;
303
+ hideSearchButton: boolean;
246
304
  /**
247
- * Defines the branding slot.
248
- * The `ui5-shellbar-branding` component is intended to be placed inside this slot.
249
- * Content placed here takes precedence over the `primaryTitle` property and the `logo` content slot.
250
- *
251
- * **Note:** The `branding` slot is in an experimental state and is a subject to change.
305
+ * Disables the automatic search field expansion/collapse when the available space is not enough.
252
306
  *
253
- * @since 2.12.0
307
+ * **Note:** The `disableSearchCollapse` property is in an experimental state and is a subject to change.
308
+ * @default false
254
309
  * @public
255
310
  */
256
- branding: Slot<ShellBarBranding>;
311
+ disableSearchCollapse: boolean;
257
312
  /**
258
- * Defines the `ui5-shellbar` additional items.
313
+ * Defines the `primaryTitle`.
259
314
  *
260
- * **Note:**
261
- * You can use the `<ui5-shellbar-item></ui5-shellbar-item>`.
315
+ * **Note:** The `primaryTitle` would be hidden on S screen size (less than approx. 700px).
316
+ * @default undefined
262
317
  * @public
263
318
  */
264
- items: DefaultSlot<ShellBarItem>;
319
+ primaryTitle?: string;
265
320
  /**
266
- * You can pass `ui5-avatar` to set the profile image/icon.
267
- * If no profile slot is set - profile will be excluded from actions.
321
+ * Defines the `secondaryTitle`.
268
322
  *
269
- * **Note:** We recommend not using the `size` attribute of `ui5-avatar` because
270
- * it should have specific size by design in the context of `ui5-shellbar` profile.
271
- * @since 1.0.0-rc.6
323
+ * **Note:** The `secondaryTitle` would be hidden on S and M screen sizes (less than approx. 1300px).
324
+ * @default undefined
272
325
  * @public
273
326
  */
274
- profile: Slot<HTMLElement>;
327
+ secondaryTitle?: string;
275
328
  /**
276
329
  * Defines the logo of the `ui5-shellbar`.
277
330
  * For example, you can use `ui5-avatar` or `img` elements as logo.
@@ -288,17 +341,10 @@ declare class ShellBar extends UI5Element {
288
341
  */
289
342
  menuItems: Slot<ListItemBase>;
290
343
  /**
291
- * Defines the `ui5-input`, that will be used as a search field.
292
- * @public
293
- */
294
- searchField: Slot<IShellBarSearchField>;
295
- /**
296
- * Defines a `ui5-button` in the bar that will be placed in the beginning.
297
- * We encourage this slot to be used for a menu button.
298
- * It gets overstyled to match ShellBar's styling.
299
- * @public
344
+ * Open state of the menu popover (legacy).
345
+ * @private
300
346
  */
301
- startButton: Slot<IButton>;
347
+ menuPopoverOpen: boolean;
302
348
  /**
303
349
  * The container is positioned in the center of the `ui5-shellbar` and occupies one-third of the total length of the `ui5-shellbar`.
304
350
  *
@@ -306,94 +352,86 @@ declare class ShellBar extends UI5Element {
306
352
  * @private
307
353
  */
308
354
  midContent: Slot<HTMLElement>;
309
- /**
310
- * Define the items displayed in the content area.
311
- *
312
- * Use the `data-hide-order` attribute with numeric value to specify the order of the items to be hidden when the space is not enough.
313
- * Lower values will be hidden first.
314
- *
315
- * **Note:** The `content` slot is in an experimental state and is a subject to change.
316
- *
317
- * @public
318
- * @since 2.7.0
319
- */
320
- content: Slot<HTMLElement>;
321
- static i18nBundle: I18nBundle;
322
- overflowPopover?: Popover | null;
323
- menuPopover?: Popover | null;
324
- _isInitialRendering: boolean;
325
- _defaultItemPressPrevented: boolean;
326
- contentItemsObserver: MutationObserver;
327
- _hiddenIcons: Array<IShelBarItemInfo>;
328
- _handleResize: ResizeObserverCallback;
329
- _overflowNotifications: string | null;
330
- _lastOffsetWidth: number;
331
- _observableContent: Array<HTMLElement>;
332
- _autoRestoreSearchField: boolean;
333
- _onSearchOpenBound: (e: Event) => void;
334
- _onSearchCloseBound: (e: Event) => void;
335
- _onSearchBound: (e: Event) => void;
336
- _headerPress: () => void;
337
- static get FIORI_3_BREAKPOINTS(): number[];
338
- static get FIORI_3_BREAKPOINTS_MAP(): Record<string, string>;
339
- constructor();
340
- _onSearchOpen(e: Event): void;
341
- _onSearchClose(e: Event): void;
342
- _onSearch(e: Event): void;
343
- _updateSearchFieldState(): void;
344
- _onKeyDown(e: KeyboardEvent): void;
345
- private _allowChildNavigation;
346
- private _allowInputNavigation;
347
- _focusNextItem(items: HTMLElement[], currentIndex: number): void;
348
- _focusPreviousItem(items: HTMLElement[], currentIndex: number): void;
349
- _isVisible(element: HTMLElement): boolean;
350
- _getRightChildItems(): HTMLElement[];
351
- _menuItemPress(e: CustomEvent<ListItemClickEventDetail>): void;
352
- _logoPress(): void;
353
- _menuPopoverBeforeOpen(): void;
354
- _menuPopoverAfterClose(): void;
355
- _overflowPopoverBeforeOpen(): void;
356
- _overflowPopoverAfterClose(): void;
357
- _logoKeyup(e: KeyboardEvent): void;
358
- _logoKeydown(e: KeyboardEvent): void;
359
- _calculateCSSREMValue(styleSet: CSSStyleDeclaration, propertyName: string): number;
360
- domCalculatedValues(cssVar: string): number;
355
+ legacyAdaptor?: ShellBarLegacy;
356
+ onEnterDOM(): void;
357
+ onExitDOM(): void;
361
358
  onBeforeRendering(): void;
362
- /**
363
- * Use this method to change the state of the search filed according to internal logic.
364
- * An event is fired to notify the change.
365
- */
366
- setSearchState(expanded: boolean): Promise<void>;
367
359
  onAfterRendering(): void;
368
- onInitialRendering(): Promise<void>;
360
+ private buildActions;
361
+ getAction(actionId: ShellBarActionId): ShellBarActionItem | undefined;
362
+ getActionOverflowText(actionId: ShellBarActionId): string;
363
+ get isSBreakPoint(): boolean;
364
+ private updateBreakpoint;
365
+ private updateOverflow;
366
+ private handleUpdateOverflowResult;
367
+ private handleContentVisibilityChanged;
368
+ private handleResize;
369
+ isHidden(itemId: string): boolean;
370
+ handleOverflowClick(): void;
371
+ onPopoverClose(): void;
369
372
  /**
370
- * Closes the overflow area.
371
- * Useful to manually close the overflow after having suppressed automatic closing with preventDefault() of ShellbarItem's press event
373
+ * Closes the overflow popover.
372
374
  * @public
373
375
  */
374
376
  closeOverflow(): void;
375
- _handleBarBreakpoints(): void;
376
- _hideItems(items: IShellBarHidableItem[]): IShellBarHidableItem[];
377
- _resetItemsVisibility(items: Array<HTMLElement>): void;
378
- _handleActionsOverflow(): {
379
- itemsInfo: IShelBarItemInfo[];
380
- contentInfo: IShellBarContentItem[];
377
+ handleOverflowItemClick(e: MouseEvent): void;
378
+ get overflowItems(): readonly import("./shellbar/ShellBarOverflow.js").ShellBarOverflowItem[];
379
+ /**
380
+ * Returns badge text for overflow button.
381
+ * Shows count if only one item with count is overflowed, otherwise shows attention dot.
382
+ */
383
+ get overflowBadge(): string | undefined;
384
+ get search(): IShellBarSearchField | null;
385
+ get isSelfCollapsibleSearch(): boolean;
386
+ private getSearchDeps;
387
+ get searchAdaptor(): IShellBarSearchController;
388
+ handleSearchButtonClick(): boolean;
389
+ setSearchState(expanded: boolean): Promise<void>;
390
+ handleCancelButtonClick(): void;
391
+ private initLegacyController;
392
+ get hasLegacyFeatures(): boolean;
393
+ _onKeyDown(e: KeyboardEvent): void;
394
+ get startContent(): HTMLElement[];
395
+ get endContent(): HTMLElement[];
396
+ get separatorConfig(): {
397
+ showStartSeparator: boolean;
398
+ showEndSeparator: boolean;
381
399
  };
382
- _overflowActions(): void;
383
- _toggleActionPopover(): void;
384
- onEnterDOM(): void;
385
- onExitDOM(): void;
386
- _attachSearchFieldListeners(searchField: HTMLElement | null): void;
387
- _detachSearchFieldListeners(searchField: HTMLElement | null): void;
388
- _handleSearchIconPress(): void;
389
- _handleActionListClick(): Promise<void>;
390
- _handleCustomActionPress(e: UI5CustomEvent<Button, "click">): void;
391
- _handleOverflowPress(): void;
392
- _handleNotificationsPress(e: UI5CustomEvent<Button, "click">): void;
393
- _handleProfilePress(): void;
394
- _handleCancelButtonPress(): void;
395
- _handleProductSwitchPress(e: UI5CustomEvent<Button, "click">): void;
396
- _clearSearchFieldValue(): void;
400
+ splitContent(content: readonly HTMLElement[]): {
401
+ start: HTMLElement[];
402
+ end: HTMLElement[];
403
+ };
404
+ sortContent(content: readonly HTMLElement[]): HTMLElement[];
405
+ getPackedSeparatorInfo(item: HTMLElement, isStartGroup: boolean): {
406
+ shouldPack: boolean;
407
+ };
408
+ sortItems(items: readonly ShellBarItem[]): ShellBarItem[];
409
+ get actionsAccessibilityInfo(): ShellBarAccessibilityInfo;
410
+ get actionsRole(): "toolbar" | undefined;
411
+ get contentRole(): "group" | undefined;
412
+ get enabledFeatures(): {
413
+ search: boolean;
414
+ profile: boolean;
415
+ content: boolean;
416
+ branding: boolean;
417
+ overflow: boolean;
418
+ assistant: boolean;
419
+ startButton: boolean;
420
+ notifications: boolean;
421
+ productSwitch: boolean;
422
+ };
423
+ get texts(): {
424
+ search: string;
425
+ profile: string;
426
+ shellbar: string;
427
+ products: string;
428
+ overflow: string;
429
+ assistant: string;
430
+ notifications: string;
431
+ notificationsNoCount: string;
432
+ contentItems: string | undefined;
433
+ };
434
+ get popoverHorizontalAlign(): "Start" | "End";
397
435
  /**
398
436
  * Returns the `logo` DOM ref.
399
437
  * @public
@@ -430,127 +468,16 @@ declare class ShellBar extends UI5Element {
430
468
  */
431
469
  get productSwitchDomRef(): HTMLElement | null;
432
470
  /**
433
- * Returns the `search` icon DOM ref.
434
- * @returns The search icon DOM ref
471
+ * Returns the search button DOM reference.
435
472
  * @public
436
- * @since 2.10.0
437
473
  */
438
474
  getSearchButtonDomRef(): Promise<HTMLElement | null>;
439
- _getContentInfo(): Array<IShellBarContentItem>;
440
- /**
441
- * Returns all items that will be placed in the right of the bar as icons / dom elements.
442
- */
443
- _getItemsInfo(): Array<IShelBarItemInfo>;
444
- _updateItemsInfo(newItemsInfo: Array<IShelBarItemInfo>): void;
445
- _updateContentInfo(newContentInfo: Array<IShellBarContentItem>): void;
446
- _fireContentItemVisibilityChangeEvent(): void;
447
- _updateOverflowNotifications(): void;
448
- _observeContentItems(): void;
449
- _getOverflowPopover(): Popover;
450
- _getMenuPopover(): Popover;
451
- isIconHidden(name: string): boolean;
452
- get hasMatchingContent(): boolean;
453
- get contentItemsSorted(): HTMLElement[];
454
- get contentItemsWrappersSorted(): HTMLElement[];
455
- get autoSearchField(): boolean;
456
- get startContentInfoSorted(): IShellBarContentItem[];
457
- get endContentInfoSorted(): IShellBarContentItem[];
458
- get showStartSeparator(): boolean;
459
- get showEndSeparator(): boolean;
460
- shouldIncludeSeparator(itemInfo: IShellBarContentItem | undefined, contentInfo: IShellBarContentItem[]): boolean;
461
- get classes(): ClassMap;
462
- get styles(): {
463
- searchField: {};
464
- };
465
- get customItemsInfo(): IShelBarItemInfo[];
466
- get hasLogo(): boolean;
467
- get showLogoInMenuButton(): boolean;
468
- get showTitleInMenuButton(): boolean | "" | undefined;
469
- get showMenuButton(): string | boolean;
470
- get hasAssistant(): boolean;
471
- get hasBranding(): boolean;
472
- get hasSearchField(): boolean;
473
- get hasMidContent(): boolean;
474
- get hasProfile(): boolean;
475
- get hasMenuItems(): boolean;
476
- get imageBtnText(): string;
477
- get _shellbarText(): string;
478
- get _logoText(): string;
479
- get _notificationsText(): string;
480
- get _cancelBtnText(): string;
481
- get _logoAreaText(): string;
482
- get _contentItemsText(): string | undefined;
483
- get _searchFieldDescription(): string;
484
- get _contentItemsRole(): "group" | undefined;
485
- get _enableContentAreaAccessibility(): boolean;
486
- get contentItems(): HTMLElement[];
487
- get startContent(): HTMLElement[];
488
- get endContent(): HTMLElement[];
489
- get _rightChildRole(): "toolbar" | undefined;
490
- get _searchFieldText(): string;
491
- get _searchBtnOpen(): string;
492
- get _productSwitchBtnText(): string;
493
- get _profileText(): string;
494
- get _productsText(): string;
495
- get _searchText(): string;
496
- get _overflowText(): string;
497
- get _brandingText(): string | undefined;
498
- get hasContentItems(): boolean;
499
- get hidableDomElements(): HTMLElement[];
500
- get contentItemsHidden(): HTMLElement[];
501
- get overflowWrapper(): HTMLElement | null;
502
- get overflowInner(): HTMLElement | null;
503
- get overflowed(): boolean;
504
- get accInfo(): {
505
- notifications: {
506
- title: string;
507
- accessibilityAttributes: {
508
- expanded: boolean | "true" | "false" | undefined;
509
- hasPopup: import("@ui5/webcomponents-base").AriaHasPopup | undefined;
510
- };
511
- };
512
- profile: {
513
- title: string;
514
- accessibilityAttributes: {
515
- hasPopup: import("@ui5/webcomponents-base").AriaHasPopup | undefined;
516
- expanded: boolean | "true" | "false" | undefined;
517
- };
518
- };
519
- products: {
520
- title: string;
521
- accessibilityAttributes: {
522
- hasPopup: import("@ui5/webcomponents-base").AriaHasPopup | undefined;
523
- expanded: boolean | "true" | "false" | undefined;
524
- };
525
- };
526
- search: {
527
- title: string;
528
- accessibilityAttributes: {
529
- hasPopup: import("@ui5/webcomponents-base").AriaHasPopup | undefined;
530
- };
531
- };
532
- overflow: {
533
- title: string;
534
- accessibilityAttributes: {
535
- hasPopup: import("@ui5/webcomponents-base").AriaHasPopup;
536
- expanded: boolean | "true" | "false";
537
- };
538
- };
539
- branding: {
540
- title: string | undefined;
541
- accessibilityAttributes: {
542
- name: string | undefined;
543
- };
544
- };
545
- };
546
- get accLogoRole(): "link" | "button";
547
- get isSBreakPoint(): boolean;
548
- get hasSelfCollapsibleSearch(): boolean;
549
- get search(): IShellBarSearchField | null;
550
- }
551
- interface IShellBarSelfCollapsibleSearch extends UI5Element {
552
- collapsed: boolean;
553
- open: boolean;
475
+ private _fireClickEvent;
476
+ handleNotificationsClick(): boolean;
477
+ handleProfileClick(): boolean;
478
+ handleProductSwitchClick(): boolean;
479
+ getCSSVariable(cssVar: string): string;
554
480
  }
555
481
  export default ShellBar;
556
- export type { ShellBarContentItemVisibilityChangeEventDetail, ShellBarNotificationsClickEventDetail, ShellBarProfileClickEventDetail, ShellBarProductSwitchClickEventDetail, ShellBarLogoClickEventDetail, ShellBarMenuItemClickEventDetail, ShellBarAccessibilityAttributes, ShellBarSearchButtonEventDetail, ShellBarSearchFieldToggleEventDetail, ShellBarSearchFieldClearEventDetail, IShellBarSelfCollapsibleSearch, IShellBarSearchField, };
482
+ export { ShellBarActions, ShellBarActionsSelectors, };
483
+ export type { ShellBarProfileClickEventDetail, ShellBarSearchFieldClearEventDetail, ShellBarSearchFieldToggleEventDetail, ShellBarProductSwitchClickEventDetail, ShellBarNotificationsClickEventDetail, ShellBarContentItemVisibilityChangeEventDetail, ShellBarActionId, ShellBarActionItem, IShellBarSearchField, ShellBarBreakpoint, ShellBarAccessibilityInfo, ShellBarAccessibilityAttributes, ShellBarAreaAccessibilityAttributes, ShellBarProfileAccessibilityAttributes, ShellBarLogoClickEventDetail, ShellBarMenuItemClickEventDetail, ShellBarLogoAccessibilityAttributes, };