@ui5/webcomponents 2.27.0-rc.1 → 2.27.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.
- package/CHANGELOG.md +39 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/AvatarBadge.d.ts +16 -0
- package/dist/AvatarBadge.js +6 -0
- package/dist/AvatarBadge.js.map +1 -1
- package/dist/CardHeaderTemplate.js +6 -5
- package/dist/CardHeaderTemplate.js.map +1 -1
- package/dist/DateTimeInput.d.ts +6 -0
- package/dist/DateTimeInput.js +11 -0
- package/dist/DateTimeInput.js.map +1 -1
- package/dist/Filters.js +1 -1
- package/dist/Filters.js.map +1 -1
- package/dist/List.js +4 -1
- package/dist/List.js.map +1 -1
- package/dist/ListItem.d.ts +4 -4
- package/dist/ListItem.js +6 -6
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemGroupBase.d.ts +1 -1
- package/dist/ListItemGroupBase.js +1 -1
- package/dist/ListItemGroupBase.js.map +1 -1
- package/dist/MultiComboBox.js +1 -1
- package/dist/MultiComboBox.js.map +1 -1
- package/dist/NumberInput.d.ts +3 -3
- package/dist/NumberInput.js +2 -2
- package/dist/NumberInput.js.map +1 -1
- package/dist/RatingIndicator.d.ts +1 -5
- package/dist/RatingIndicator.js +6 -11
- package/dist/RatingIndicator.js.map +1 -1
- package/dist/RatingIndicatorTemplate.js +1 -1
- package/dist/RatingIndicatorTemplate.js.map +1 -1
- package/dist/Select.d.ts +1 -0
- package/dist/Select.js.map +1 -1
- package/dist/TableHeaderCell.d.ts +3 -0
- package/dist/TableHeaderCell.js +16 -0
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableHeaderCellTemplate.js +3 -15
- package/dist/TableHeaderCellTemplate.js.map +1 -1
- package/dist/TableHeaderRow.d.ts +2 -0
- package/dist/TableHeaderRow.js +6 -0
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableHeaderRowTemplate.js +6 -7
- package/dist/TableHeaderRowTemplate.js.map +1 -1
- package/dist/TableRow.d.ts +2 -0
- package/dist/TableRow.js +6 -0
- package/dist/TableRow.js.map +1 -1
- package/dist/TableRowActionBase.d.ts +3 -1
- package/dist/TableRowActionBase.js +8 -0
- package/dist/TableRowActionBase.js.map +1 -1
- package/dist/TableRowBase.d.ts +1 -0
- package/dist/TableRowBase.js +3 -0
- package/dist/TableRowBase.js.map +1 -1
- package/dist/TableRowTemplate.js +6 -11
- package/dist/TableRowTemplate.js.map +1 -1
- package/dist/TableSelection.d.ts +5 -0
- package/dist/TableSelection.js +11 -0
- package/dist/TableSelection.js.map +1 -1
- package/dist/TableSelectionBase.d.ts +13 -0
- package/dist/TableSelectionBase.js +18 -0
- package/dist/TableSelectionBase.js.map +1 -1
- package/dist/TableSelectionMulti.d.ts +5 -0
- package/dist/TableSelectionMulti.js +12 -0
- package/dist/TableSelectionMulti.js.map +1 -1
- package/dist/TableSelectionSingle.d.ts +2 -0
- package/dist/TableSelectionSingle.js +4 -0
- package/dist/TableSelectionSingle.js.map +1 -1
- package/dist/TimePicker.d.ts +10 -0
- package/dist/TimePicker.js +51 -11
- package/dist/TimePicker.js.map +1 -1
- package/dist/TimePickerPopoverTemplate.js +1 -1
- package/dist/TimePickerPopoverTemplate.js.map +1 -1
- package/dist/TimePickerTemplate.js +1 -1
- package/dist/TimePickerTemplate.js.map +1 -1
- package/dist/Token.d.ts +1 -0
- package/dist/Token.js +6 -0
- package/dist/Token.js.map +1 -1
- package/dist/Tokenizer.d.ts +6 -0
- package/dist/Tokenizer.js +27 -10
- package/dist/Tokenizer.js.map +1 -1
- package/dist/Toolbar.d.ts +27 -0
- package/dist/Toolbar.js +102 -20
- package/dist/Toolbar.js.map +1 -1
- package/dist/ToolbarItemBase.d.ts +51 -0
- package/dist/ToolbarItemBase.js +65 -0
- package/dist/ToolbarItemBase.js.map +1 -1
- package/dist/css/themes/AvatarBadge.css +1 -1
- package/dist/css/themes/CalendarHeader.css +1 -1
- package/dist/css/themes/CardHeader.css +1 -1
- package/dist/css/themes/DynamicDateRangePopover.css +1 -1
- package/dist/css/themes/ListItemBase.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/Token.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_auto/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hc_auto/parameters-bundle.css +2 -2
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +179 -76
- package/dist/custom-elements.json +167 -72
- package/dist/dynamic-date-range-options/DateRange.js +3 -4
- package/dist/dynamic-date-range-options/DateRange.js.map +1 -1
- package/dist/dynamic-date-range-options/FromDateTime.js +4 -5
- package/dist/dynamic-date-range-options/FromDateTime.js.map +1 -1
- package/dist/dynamic-date-range-options/SingleDate.js +2 -2
- package/dist/dynamic-date-range-options/SingleDate.js.map +1 -1
- package/dist/dynamic-date-range-options/ToDateTime.js +4 -5
- package/dist/dynamic-date-range-options/ToDateTime.js.map +1 -1
- package/dist/dynamic-date-range-options/toDates.d.ts +2 -1
- package/dist/dynamic-date-range-options/toDates.js +5 -1
- package/dist/dynamic-date-range-options/toDates.js.map +1 -1
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_id.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hc_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +3 -1
- package/dist/generated/i18n/i18n-defaults.js +6 -4
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/AvatarBadge.css.d.ts +1 -1
- package/dist/generated/themes/AvatarBadge.css.js +1 -1
- package/dist/generated/themes/AvatarBadge.css.js.map +1 -1
- package/dist/generated/themes/CalendarHeader.css.d.ts +1 -1
- package/dist/generated/themes/CalendarHeader.css.js +1 -1
- package/dist/generated/themes/CalendarHeader.css.js.map +1 -1
- package/dist/generated/themes/CardHeader.css.d.ts +1 -1
- package/dist/generated/themes/CardHeader.css.js +1 -1
- package/dist/generated/themes/CardHeader.css.js.map +1 -1
- package/dist/generated/themes/DynamicDateRangePopover.css.d.ts +1 -1
- package/dist/generated/themes/DynamicDateRangePopover.css.js +1 -1
- package/dist/generated/themes/DynamicDateRangePopover.css.js.map +1 -1
- package/dist/generated/themes/ListItemBase.css.d.ts +1 -1
- package/dist/generated/themes/ListItemBase.css.js +1 -1
- package/dist/generated/themes/ListItemBase.css.js.map +1 -1
- package/dist/generated/themes/RatingIndicator.css.d.ts +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/Token.css.d.ts +1 -1
- package/dist/generated/themes/Token.css.js +1 -1
- package/dist/generated/themes/Token.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js +2 -2
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/types/ListItemType.d.ts +2 -1
- package/dist/types/ListItemType.js +2 -1
- package/dist/types/ListItemType.js.map +1 -1
- package/dist/vscode.html-custom-data.json +38 -18
- package/dist/web-types.json +76 -36
- package/package.json +9 -9
- package/src/CardHeaderTemplate.tsx +19 -20
- package/src/RatingIndicatorTemplate.tsx +0 -1
- package/src/TableHeaderCellTemplate.tsx +4 -16
- package/src/TableHeaderRowTemplate.tsx +15 -15
- package/src/TableRowTemplate.tsx +10 -20
- package/src/TimePickerPopoverTemplate.tsx +1 -0
- package/src/TimePickerTemplate.tsx +1 -0
- package/src/i18n/messagebundle.properties +6 -0
- package/src/i18n/messagebundle_ar.properties +13 -6
- package/src/i18n/messagebundle_bg.properties +13 -6
- package/src/i18n/messagebundle_ca.properties +13 -6
- package/src/i18n/messagebundle_cnr.properties +13 -6
- package/src/i18n/messagebundle_cs.properties +13 -6
- package/src/i18n/messagebundle_cy.properties +13 -6
- package/src/i18n/messagebundle_da.properties +13 -6
- package/src/i18n/messagebundle_de.properties +13 -6
- package/src/i18n/messagebundle_el.properties +13 -6
- package/src/i18n/messagebundle_en.properties +11 -6
- package/src/i18n/messagebundle_en_GB.properties +13 -6
- package/src/i18n/messagebundle_en_US_sappsd.properties +13 -6
- package/src/i18n/messagebundle_en_US_saprigi.properties +6 -0
- package/src/i18n/messagebundle_en_US_saptrc.properties +13 -6
- package/src/i18n/messagebundle_es.properties +13 -6
- package/src/i18n/messagebundle_es_MX.properties +13 -6
- package/src/i18n/messagebundle_et.properties +13 -6
- package/src/i18n/messagebundle_fi.properties +13 -6
- package/src/i18n/messagebundle_fr.properties +13 -6
- package/src/i18n/messagebundle_fr_CA.properties +13 -6
- package/src/i18n/messagebundle_hi.properties +13 -6
- package/src/i18n/messagebundle_hr.properties +13 -6
- package/src/i18n/messagebundle_hu.properties +13 -6
- package/src/i18n/messagebundle_id.properties +13 -6
- package/src/i18n/messagebundle_it.properties +13 -6
- package/src/i18n/messagebundle_iw.properties +13 -6
- package/src/i18n/messagebundle_ja.properties +13 -6
- package/src/i18n/messagebundle_kk.properties +13 -6
- package/src/i18n/messagebundle_ko.properties +13 -6
- package/src/i18n/messagebundle_lt.properties +13 -6
- package/src/i18n/messagebundle_lv.properties +13 -6
- package/src/i18n/messagebundle_mk.properties +13 -6
- package/src/i18n/messagebundle_ms.properties +13 -6
- package/src/i18n/messagebundle_nl.properties +13 -6
- package/src/i18n/messagebundle_no.properties +13 -6
- package/src/i18n/messagebundle_pl.properties +13 -6
- package/src/i18n/messagebundle_pt.properties +13 -6
- package/src/i18n/messagebundle_pt_PT.properties +13 -6
- package/src/i18n/messagebundle_ro.properties +13 -6
- package/src/i18n/messagebundle_ru.properties +13 -6
- package/src/i18n/messagebundle_sh.properties +13 -6
- package/src/i18n/messagebundle_sk.properties +13 -6
- package/src/i18n/messagebundle_sl.properties +13 -6
- package/src/i18n/messagebundle_sr.properties +13 -6
- package/src/i18n/messagebundle_sv.properties +13 -6
- package/src/i18n/messagebundle_th.properties +13 -6
- package/src/i18n/messagebundle_tr.properties +13 -6
- package/src/i18n/messagebundle_uk.properties +13 -6
- package/src/i18n/messagebundle_vi.properties +13 -6
- package/src/i18n/messagebundle_zh_CN.properties +13 -6
- package/src/i18n/messagebundle_zh_TW.properties +13 -6
- package/src/themes/AvatarBadge.css +12 -0
- package/src/themes/CalendarHeader.css +7 -6
- package/src/themes/CardHeader.css +12 -14
- package/src/themes/DynamicDateRangePopover.css +2 -3
- package/src/themes/ListItemBase.css +1 -1
- package/src/themes/RatingIndicator.css +2 -1
- package/src/themes/Token.css +6 -3
- package/src/themes/sap_fiori_3_hcb/CalendarHeader-parameters.css +3 -4
- package/src/themes/sap_fiori_3_hcw/CalendarHeader-parameters.css +3 -4
- package/src/themes/sap_horizon/CalendarHeader-parameters.css +0 -1
- package/src/themes/sap_horizon_dark/CalendarHeader-parameters.css +0 -1
- package/src/themes/sap_horizon_hcb/CalendarHeader-parameters.css +3 -3
- package/src/themes/sap_horizon_hcw/CalendarHeader-parameters.css +3 -3
package/dist/Toolbar.d.ts
CHANGED
|
@@ -11,6 +11,17 @@ import type Popover from "./Popover.js";
|
|
|
11
11
|
type ToolbarMinWidthChangeEventDetail = {
|
|
12
12
|
minWidth: number;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* One step of the overflow distribution algorithm — either a single ungrouped item or
|
|
16
|
+
* all members of one non-empty `overflowGroup`, treated atomically. A unit's order key
|
|
17
|
+
* for the right-to-left distribution walk is the rightmost member's slot index; its
|
|
18
|
+
* width is the sum of member widths.
|
|
19
|
+
*/
|
|
20
|
+
type DistributionUnit = {
|
|
21
|
+
members: Array<ToolbarItemBase>;
|
|
22
|
+
width: number;
|
|
23
|
+
rightmostIndex: number;
|
|
24
|
+
};
|
|
14
25
|
/**
|
|
15
26
|
* @class
|
|
16
27
|
*
|
|
@@ -19,6 +30,14 @@ type ToolbarMinWidthChangeEventDetail = {
|
|
|
19
30
|
* The `ui5-toolbar` component is used to create a horizontal layout with items.
|
|
20
31
|
* The items can be overflowing in a popover, when the space is not enough to show all of them.
|
|
21
32
|
*
|
|
33
|
+
* ### Grouped Overflow
|
|
34
|
+
*
|
|
35
|
+
* Items that share the same non-empty `overflowGroup` string are treated as one atomic
|
|
36
|
+
* unit during overflow distribution: when any member must move into the overflow
|
|
37
|
+
* popover, all members move together. The visible bar always preserves slot order;
|
|
38
|
+
* the group becomes adjacent only inside the popover. See the `overflowGroup` property
|
|
39
|
+
* on `ToolbarItemBase` for the full contract.
|
|
40
|
+
*
|
|
22
41
|
* ### Keyboard Handling
|
|
23
42
|
* The `ui5-toolbar` provides advanced keyboard handling.
|
|
24
43
|
*
|
|
@@ -112,6 +131,7 @@ declare class Toolbar extends UI5Element {
|
|
|
112
131
|
itemsToOverflow: Array<ToolbarItemBase>;
|
|
113
132
|
itemsWidth: number;
|
|
114
133
|
minContentWidth: number;
|
|
134
|
+
_groupingKey: string;
|
|
115
135
|
_lastFocusedItem?: ToolbarItemBase | HTMLElement;
|
|
116
136
|
ITEMS_WIDTH_MAP: Map<string, number>;
|
|
117
137
|
static get styles(): string[];
|
|
@@ -185,6 +205,13 @@ declare class Toolbar extends UI5Element {
|
|
|
185
205
|
processOverflowLayout(): void;
|
|
186
206
|
storeItemsWidth(): void;
|
|
187
207
|
distributeItems(overflowSpace?: number): void;
|
|
208
|
+
/**
|
|
209
|
+
* Buckets `movableItems` (in slot order) into atomic distribution units.
|
|
210
|
+
* Each unit either holds a single ungrouped item or all members of one
|
|
211
|
+
* non-empty `overflowGroup`. A unit's order key is its rightmost member's
|
|
212
|
+
* slot index. Returned units are sorted ascending by that key.
|
|
213
|
+
*/
|
|
214
|
+
buildDistributionUnits(slotIndex: Map<ToolbarItemBase, number>): Array<DistributionUnit>;
|
|
188
215
|
distributeItemsThatAlwaysOverflow(): void;
|
|
189
216
|
setSeperatorsVisibilityInOverflow(): void;
|
|
190
217
|
shouldShowSeparatorInOverflow(separatorIdx: number, overflowItems: Array<ToolbarItemBase>): boolean;
|
package/dist/Toolbar.js
CHANGED
|
@@ -38,6 +38,14 @@ function parsePxValue(styleSet, propertyName) {
|
|
|
38
38
|
* The `ui5-toolbar` component is used to create a horizontal layout with items.
|
|
39
39
|
* The items can be overflowing in a popover, when the space is not enough to show all of them.
|
|
40
40
|
*
|
|
41
|
+
* ### Grouped Overflow
|
|
42
|
+
*
|
|
43
|
+
* Items that share the same non-empty `overflowGroup` string are treated as one atomic
|
|
44
|
+
* unit during overflow distribution: when any member must move into the overflow
|
|
45
|
+
* popover, all members move together. The visible bar always preserves slot order;
|
|
46
|
+
* the group becomes adjacent only inside the popover. See the `overflowGroup` property
|
|
47
|
+
* on `ToolbarItemBase` for the full contract.
|
|
48
|
+
*
|
|
41
49
|
* ### Keyboard Handling
|
|
42
50
|
* The `ui5-toolbar` provides advanced keyboard handling.
|
|
43
51
|
*
|
|
@@ -83,6 +91,9 @@ let Toolbar = Toolbar_1 = class Toolbar extends UI5Element {
|
|
|
83
91
|
this.itemsToOverflow = [];
|
|
84
92
|
this.itemsWidth = 0;
|
|
85
93
|
this.minContentWidth = 0;
|
|
94
|
+
// Snapshot of children's `overflowGroup` values, joined with "|". Tracks whether
|
|
95
|
+
// the grouping decision has changed even when total content width has not.
|
|
96
|
+
this._groupingKey = "";
|
|
86
97
|
this.ITEMS_WIDTH_MAP = new Map();
|
|
87
98
|
this._onResize = this.onResize.bind(this);
|
|
88
99
|
this._onCloseOverflow = this.closeOverflow.bind(this);
|
|
@@ -101,10 +112,10 @@ let Toolbar = Toolbar_1 = class Toolbar extends UI5Element {
|
|
|
101
112
|
+ calculateCSSREMValue(toolbarComputedStyle, "--_ui5-toolbar-padding-right");
|
|
102
113
|
}
|
|
103
114
|
get alwaysOverflowItems() {
|
|
104
|
-
return this.items.filter(item => item.
|
|
115
|
+
return this.items.filter(item => item.effectiveOverflowPriority === ToolbarItemOverflowBehavior.AlwaysOverflow);
|
|
105
116
|
}
|
|
106
117
|
get movableItems() {
|
|
107
|
-
return this.items.filter(item => item.
|
|
118
|
+
return this.items.filter(item => item.effectiveOverflowPriority !== ToolbarItemOverflowBehavior.AlwaysOverflow && item.effectiveOverflowPriority !== ToolbarItemOverflowBehavior.NeverOverflow);
|
|
108
119
|
}
|
|
109
120
|
get overflowItems() {
|
|
110
121
|
// spacers are ignored
|
|
@@ -174,7 +185,8 @@ let Toolbar = Toolbar_1 = class Toolbar extends UI5Element {
|
|
|
174
185
|
onInvalidation(changeInfo) {
|
|
175
186
|
if (changeInfo.reason === "childchange") {
|
|
176
187
|
const currentItemsWidth = this.items.reduce((total, item) => total + this.getItemWidth(item), 0);
|
|
177
|
-
|
|
188
|
+
const currentGroupingKey = this.items.map(item => item.effectiveOverflowGroup).join("|");
|
|
189
|
+
if (currentItemsWidth !== this.itemsWidth || currentGroupingKey !== this._groupingKey) {
|
|
178
190
|
this.onToolbarItemChange();
|
|
179
191
|
}
|
|
180
192
|
}
|
|
@@ -280,7 +292,7 @@ let Toolbar = Toolbar_1 = class Toolbar extends UI5Element {
|
|
|
280
292
|
this.items.forEach(item => {
|
|
281
293
|
const itemWidth = this.getItemWidth(item);
|
|
282
294
|
totalWidth += itemWidth;
|
|
283
|
-
if (item.
|
|
295
|
+
if (item.effectiveOverflowPriority === ToolbarItemOverflowBehavior.NeverOverflow) {
|
|
284
296
|
minWidth += itemWidth;
|
|
285
297
|
}
|
|
286
298
|
this.ITEMS_WIDTH_MAP.set(item._id, itemWidth);
|
|
@@ -293,31 +305,101 @@ let Toolbar = Toolbar_1 = class Toolbar extends UI5Element {
|
|
|
293
305
|
}
|
|
294
306
|
this.itemsWidth = totalWidth;
|
|
295
307
|
this.minContentWidth = minWidth;
|
|
308
|
+
this._groupingKey = this.items.map(item => item.effectiveOverflowGroup).join("|");
|
|
296
309
|
}
|
|
297
310
|
distributeItems(overflowSpace = 0) {
|
|
298
|
-
const movableItems = this.movableItems.reverse();
|
|
299
|
-
let index = 0;
|
|
300
|
-
let currentItem = movableItems[index];
|
|
301
311
|
this.itemsToOverflow = [];
|
|
302
312
|
// distribute items that always overflow
|
|
303
313
|
this.distributeItemsThatAlwaysOverflow();
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
314
|
+
// Bucket movable items (in slot order) into distribution units.
|
|
315
|
+
// A unit is either a single ungrouped item, or a group of items
|
|
316
|
+
// sharing the same non-empty `overflowGroup`. A unit is atomic:
|
|
317
|
+
// when it is pushed into overflow, all its members move together.
|
|
318
|
+
// The unit's representative slot position is its rightmost member's
|
|
319
|
+
// index — that index is what orders the unit during distribution.
|
|
320
|
+
const slotIndex = new Map();
|
|
321
|
+
this.items.forEach((item, idx) => slotIndex.set(item, idx));
|
|
322
|
+
const units = this.buildDistributionUnits(slotIndex);
|
|
323
|
+
// Walk units from rightmost to leftmost, pushing each atomically.
|
|
324
|
+
// A unit is pushed in full as soon as overflowSpace is still positive;
|
|
325
|
+
// the post-push budget is allowed to go negative — over-shoot is accepted
|
|
326
|
+
// by design because a group is indivisible.
|
|
327
|
+
const overflowedItems = [];
|
|
328
|
+
let nextNonOverflowedUnitIndex = units.length - 1;
|
|
329
|
+
for (let i = units.length - 1; i >= 0; i--) {
|
|
330
|
+
if (overflowSpace <= 0) {
|
|
331
|
+
nextNonOverflowedUnitIndex = i;
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
const unit = units[i];
|
|
335
|
+
overflowedItems.push(...unit.members);
|
|
336
|
+
overflowSpace -= unit.width;
|
|
337
|
+
nextNonOverflowedUnitIndex = i - 1;
|
|
338
|
+
}
|
|
339
|
+
// If the last bar item is a separator, force it (and any contiguous
|
|
340
|
+
// trailing separators) into overflow even if there is enough space.
|
|
341
|
+
// Only single-member separator units are considered — pushing a
|
|
342
|
+
// group's entire content (non-separator content included) because its
|
|
343
|
+
// rightmost member happens to be a separator would be wrong.
|
|
344
|
+
while (nextNonOverflowedUnitIndex >= 0) {
|
|
345
|
+
const unit = units[nextNonOverflowedUnitIndex];
|
|
346
|
+
if (unit.members.length === 1 && unit.members[0].isSeparator) {
|
|
347
|
+
overflowedItems.push(...unit.members);
|
|
348
|
+
nextNonOverflowedUnitIndex--;
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
break;
|
|
317
352
|
}
|
|
318
353
|
}
|
|
354
|
+
// itemsToOverflow must be in slot order so popover rendering matches
|
|
355
|
+
// the developer's source order (group members adjacent by construction).
|
|
356
|
+
overflowedItems.sort((a, b) => (slotIndex.get(a) - slotIndex.get(b)));
|
|
357
|
+
this.itemsToOverflow.push(...overflowedItems);
|
|
319
358
|
this.setSeperatorsVisibilityInOverflow();
|
|
320
359
|
}
|
|
360
|
+
/**
|
|
361
|
+
* Buckets `movableItems` (in slot order) into atomic distribution units.
|
|
362
|
+
* Each unit either holds a single ungrouped item or all members of one
|
|
363
|
+
* non-empty `overflowGroup`. A unit's order key is its rightmost member's
|
|
364
|
+
* slot index. Returned units are sorted ascending by that key.
|
|
365
|
+
*/
|
|
366
|
+
buildDistributionUnits(slotIndex) {
|
|
367
|
+
const movable = this.movableItems;
|
|
368
|
+
const groupUnits = new Map();
|
|
369
|
+
const units = [];
|
|
370
|
+
movable.forEach(item => {
|
|
371
|
+
const itemWidth = this.getCachedItemWidth(item._id) || 0;
|
|
372
|
+
const slotIdx = slotIndex.get(item);
|
|
373
|
+
const groupKey = item.effectiveOverflowGroup;
|
|
374
|
+
if (!groupKey) {
|
|
375
|
+
units.push({
|
|
376
|
+
members: [item],
|
|
377
|
+
width: itemWidth,
|
|
378
|
+
rightmostIndex: slotIdx,
|
|
379
|
+
});
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
const existing = groupUnits.get(groupKey);
|
|
383
|
+
if (existing) {
|
|
384
|
+
existing.members.push(item);
|
|
385
|
+
existing.width += itemWidth;
|
|
386
|
+
if (slotIdx > existing.rightmostIndex) {
|
|
387
|
+
existing.rightmostIndex = slotIdx;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
else {
|
|
391
|
+
const unit = {
|
|
392
|
+
members: [item],
|
|
393
|
+
width: itemWidth,
|
|
394
|
+
rightmostIndex: slotIdx,
|
|
395
|
+
};
|
|
396
|
+
groupUnits.set(groupKey, unit);
|
|
397
|
+
units.push(unit);
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
units.sort((a, b) => a.rightmostIndex - b.rightmostIndex);
|
|
401
|
+
return units;
|
|
402
|
+
}
|
|
321
403
|
distributeItemsThatAlwaysOverflow() {
|
|
322
404
|
this.alwaysOverflowItems.forEach((item) => {
|
|
323
405
|
this.itemsToOverflow.push(item);
|
package/dist/Toolbar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../src/Toolbar.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,aAAa,MAAM,wDAAwD,CAAC;AAEnF,OAAO,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,SAAS,EACT,aAAa,GACb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAC1G,OAAO,2CAA2C,CAAC;AAEnD,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EACN,kCAAkC,EAClC,gCAAgC,GAChC,MAAM,mCAAmC,CAAC;AAE3C,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAE3D,OAAO,iBAAiB,MAAM,0CAA0C,CAAC;AAIzE,OAAO,2BAA2B,M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AC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CACR;AAWpB;IAHC,IAAI,CAAC;QACL,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI;KACxF,CAAC;sCACkC;AAzF7B;IADN,IAAI,CAAC,oBAAoB,CAAC;iCACG;AALzB,OAAO;IAbZ,aAAa,CAAC;QACd,GAAG,EAAE,aAAa;QAClB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,eAAe;KACzB,CAAC;IACF;;MAEE;;IACD,KAAK,CAAC,2BAA2B,EAAE;QACnC,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,OAAO,CA+tBZ;AAED,OAAO,CAAC,MAAM,EAAE,CAAC;AAEjB,eAAe,OAAO,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { ChangeInfo, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport {\n\tisLeft,\n\tisRight,\n\tisHome,\n\tisEnd,\n\tisTabNext,\n\tisTabPrevious,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport \"@ui5/webcomponents-icons/dist/overflow.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\n\nimport {\n\tTOOLBAR_OVERFLOW_BUTTON_ARIA_LABEL,\n\tTOOLBAR_POPOVER_AVAILABLE_VALUES,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport ToolbarTemplate from \"./ToolbarTemplate.js\";\nimport ToolbarCss from \"./generated/themes/Toolbar.css.js\";\n\nimport ToolbarPopoverCss from \"./generated/themes/ToolbarPopover.css.js\";\n\nimport type ToolbarAlign from \"./types/ToolbarAlign.js\";\nimport type ToolbarDesign from \"./types/ToolbarDesign.js\";\nimport ToolbarItemOverflowBehavior from \"./types/ToolbarItemOverflowBehavior.js\";\n\nimport ToolbarItemBase from \"./ToolbarItemBase.js\";\nimport type ToolbarSeparator from \"./ToolbarSeparator.js\";\n\nimport type Button from \"./Button.js\";\nimport type Popover from \"./Popover.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\n\ntype ToolbarMinWidthChangeEventDetail = {\n\tminWidth: number,\n};\n\nfunction calculateCSSREMValue(styleSet: CSSStyleDeclaration, propertyName: string): number {\n\treturn Number(styleSet.getPropertyValue(propertyName).replace(\"rem\", \"\")) * parseInt(getComputedStyle(document.body).getPropertyValue(\"font-size\"));\n}\n\nfunction parsePxValue(styleSet: CSSStyleDeclaration, propertyName: string): number {\n\treturn Number(styleSet.getPropertyValue(propertyName).replace(\"px\", \"\"));\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-toolbar` component is used to create a horizontal layout with items.\n * The items can be overflowing in a popover, when the space is not enough to show all of them.\n *\n * ### Keyboard Handling\n * The `ui5-toolbar` provides advanced keyboard handling.\n *\n * - [Left]/[Right] - navigate among toolbar items\n * - [Home]/[End] - move to first/last toolbar item\n * - [Tab] / [Shift]+[Tab] - exit the toolbar\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents/dist/Toolbar.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.17.0\n */\n@customElement({\n\ttag: \"ui5-toolbar\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: ToolbarTemplate,\n})\n/**\n * @private\n*/\n@event(\"_min-content-width-change\", {\n\tbubbles: true,\n})\n\nclass Toolbar extends UI5Element {\n\teventDetails!: {\n\t\t\"_min-content-width-change\": ToolbarMinWidthChangeEventDetail\n\t}\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t/**\n\t * Indicated the direction in which the Toolbar items will be aligned.\n\t * @public\n\t * @default \"End\"\n\t */\n\t@property()\n\talignContent: `${ToolbarAlign}` = \"End\";\n\n\t/**\n\t * Calculated width of the whole toolbar.\n\t * @private\n\t * @default undefined\n\t */\n\t@property({ type: Number })\n\twidth?: number;\n\n\t/**\n\t * Calculated width of the toolbar content.\n\t * @private\n\t * @default undefined\n\t */\n\t@property({ type: Number })\n\tcontentWidth?: number;\n\n\t/**\n\t * Notifies the toolbar if it should show the items in a reverse way if Toolbar Popover needs to be placed on \"Top\" position.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\treverseOverflow = false;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * **Note:** It is strongly recommended to always set this property or `accessibleNameRef`\n\t * when the toolbar has `role=\"toolbar\"` (i.e. when it contains more than one interactive item).\n\t * Without an accessible name, screen readers will announce the toolbar without any context,\n\t * making it harder for keyboard-only and AT users to understand its purpose.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the input.\n\t *\n\t * **Note:** When the toolbar has `role=\"toolbar\"`, at least one of `accessibleName` or\n\t * `accessibleNameRef` should be provided to satisfy WCAG 2.1 success criterion 4.1.2.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the accessible ARIA name of the overflow button of the component.\n\t *\n\t * **Note:** When not set, the built-in translation for \"Additional Options\" is used.\n\t * @default undefined\n\t * @public\n\t * @since 2.22.0\n\t */\n\t@property()\n\toverflowButtonAccessibleName?: string;\n\n\t/**\n\t * Defines the toolbar design.\n\t * @public\n\t * @default \"Solid\"\n\t * @since 2.0.0\n\t */\n\t@property()\n\tdesign: `${ToolbarDesign}` = \"Solid\"\n\n\t@property({ type: Boolean })\n\tpopoverOpen = false;\n\n\t/**\n\t * Defines the items of the component.\n\t *\n\t * **Note:** Use `ui5-toolbar-button`, `ui5-toolbar-select`, `ui5-toolbar-separator` and `ui5-toolbar-spacer` for the most common toolbar actions. To place any other UI5 Web Component into the toolbar and have it participate in overflow handling, wrap it in a `ui5-toolbar-item`.\n\t * @public\n\t */\n\t@slot({\n\t\t\"default\": true, type: HTMLElement, invalidateOnChildChange: true, individualSlots: true,\n\t})\n\titems!: DefaultSlot<ToolbarItemBase>\n\n\t_onResize!: ResizeObserverCallback;\n\t_onCloseOverflow!: EventListener;\n\t_onFocusIn!: (e: FocusEvent) => void;\n\t_onKeyDown!: (e: KeyboardEvent) => void;\n\titemsToOverflow: Array<ToolbarItemBase> = [];\n\titemsWidth = 0;\n\tminContentWidth = 0;\n\t_lastFocusedItem?: ToolbarItemBase | HTMLElement;\n\n\tITEMS_WIDTH_MAP: Map<string, number> = new Map();\n\n\tstatic get styles() {\n\t\treturn [\n\t\t\tToolbarCss,\n\t\t\tToolbarPopoverCss,\n\t\t];\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._onResize = this.onResize.bind(this);\n\t\tthis._onCloseOverflow = this.closeOverflow.bind(this);\n\t\tthis._onFocusIn = this._onfocusin.bind(this);\n\t\tthis._onKeyDown = this._onkeydown.bind(this);\n\t}\n\t/**\n\t * Read-only members\n\t */\n\tget overflowButtonSize(): number {\n\t\treturn this.overflowButtonDOM?.getBoundingClientRect().width || 0;\n\t}\n\tget padding(): number {\n\t\tconst toolbarComputedStyle = getComputedStyle(this.getDomRef()!);\n\t\treturn calculateCSSREMValue(toolbarComputedStyle, \"--_ui5-toolbar-padding-left\")\n\t\t\t+ calculateCSSREMValue(toolbarComputedStyle, \"--_ui5-toolbar-padding-right\");\n\t}\n\n\tget alwaysOverflowItems() {\n\t\treturn this.items.filter(item => item.overflowPriority === ToolbarItemOverflowBehavior.AlwaysOverflow);\n\t}\n\n\tget movableItems() {\n\t\treturn this.items.filter(item => item.overflowPriority !== ToolbarItemOverflowBehavior.AlwaysOverflow && item.overflowPriority !== ToolbarItemOverflowBehavior.NeverOverflow);\n\t}\n\n\tget overflowItems() {\n\t\t// spacers are ignored\n\t\tconst overflowItems = this.itemsToOverflow.filter(item => !item.ignoreSpace);\n\t\treturn this.reverseOverflow ? overflowItems.reverse() : overflowItems;\n\t}\n\n\tget standardItems() {\n\t\treturn this.items.filter(item => this.itemsToOverflow.indexOf(item) === -1);\n\t}\n\n\tget hideOverflowButton() {\n\t\treturn this.itemsToOverflow.filter(item => !(item.ignoreSpace || item.isSeparator)).length === 0;\n\t}\n\n\tget interactiveItems() {\n\t\treturn this.items.filter((item: ToolbarItemBase) => item.isInteractive);\n\t}\n\n\t/**\n\t * Accessibility\n\t */\n\n\tget hasAriaSemantics() {\n\t\treturn this.interactiveItems.length > 1;\n\t}\n\n\tget accessibleRole() {\n\t\treturn this.hasAriaSemantics ? \"toolbar\" as const : undefined;\n\t}\n\n\tget ariaLabelText() {\n\t\treturn this.hasAriaSemantics ? getEffectiveAriaLabelText(this) : undefined;\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\trole: this.accessibleRole,\n\t\t\t\taccessibleName: this.ariaLabelText,\n\t\t\t},\n\t\t\toverflowButton: {\n\t\t\t\taccessibleName: this.overflowButtonAccessibleName || Toolbar.i18nBundle.getText(TOOLBAR_OVERFLOW_BUTTON_ARIA_LABEL),\n\t\t\t\ttooltip: Toolbar.i18nBundle.getText(TOOLBAR_OVERFLOW_BUTTON_ARIA_LABEL),\n\t\t\t\taccessibilityAttributes: {\n\t\t\t\t\texpanded: this.popoverOpen,\n\t\t\t\t\thasPopup: \"menu\" as const,\n\t\t\t\t},\n\t\t\t},\n\t\t\tpopover: {\n\t\t\t\taccessibleName: Toolbar.i18nBundle.getText(TOOLBAR_POPOVER_AVAILABLE_VALUES),\n\t\t\t},\n\t\t};\n\t}\n\n\t/**\n\t * Toolbar Overflow Popover\n\t */\n\n\tget overflowButtonDOM(): Button | null {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-tb-overflow-btn\");\n\t}\n\n\tget hasFlexibleSpacers() {\n\t\treturn this.items.some((item: ToolbarItemBase) => item.hasFlexibleWidth);\n\t}\n\n\t/**\n\t * Lifecycle methods\n\t */\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._onResize);\n\t\tthis.attachListeners();\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._onResize);\n\t\tthis.detachListeners();\n\t}\n\n\tonInvalidation(changeInfo: ChangeInfo) {\n\t\tif (changeInfo.reason === \"childchange\") {\n\t\t\tconst currentItemsWidth = this.items.reduce((total, item) => total + this.getItemWidth(item), 0);\n\t\t\tif (currentItemsWidth !== this.itemsWidth) {\n\t\t\t\tthis.onToolbarItemChange();\n\t\t\t}\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tif (getActiveElement() === this.overflowButtonDOM?.getFocusDomRef() && this.hideOverflowButton) {\n\t\t\tconst items = this.standardItems.filter(item => item.isToolbarNavigatable);\n\t\t\tconst lastItem = items.at(-1);\n\t\t\tif (lastItem) {\n\t\t\t\tthis._lastFocusedItem = lastItem;\n\t\t\t\tlastItem.focusForToolbarNavigation(false);\n\t\t\t}\n\t\t}\n\t\tthis.prePopulateAlwaysOverflowItems();\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished();\n\t\tthis.storeItemsWidth();\n\t\tthis.processOverflowLayout();\n\t\tthis.items.forEach(item => {\n\t\t\tthis.addItemsAdditionalProperties(item);\n\t\t});\n\t\tthis._reconcileLastFocusedItem();\n\t}\n\n\t/**\n\t * Drops the tracked re-entry item once it leaves the navigation chain\n\t * (moved to overflow or removed), so Tab re-entry and arrow/Home/End\n\t * navigation don't silently restart from the first item.\n\t */\n\t_reconcileLastFocusedItem() {\n\t\tif (this._lastFocusedItem instanceof ToolbarItemBase && !this._getNavigationChain().includes(this._lastFocusedItem)) {\n\t\t\tthis._lastFocusedItem = undefined;\n\t\t}\n\t}\n\n\taddItemsAdditionalProperties(item: ToolbarItemBase) {\n\t\titem.isOverflowed = this.overflowItems.indexOf(item) !== -1;\n\t\tconst itemWrapper = this.shadowRoot!.querySelector(`#${item._individualSlot}`) as HTMLElement;\n\t\tif (item.hasOverflow && !item.isOverflowed && itemWrapper) {\n\t\t\t// We need to set the max-width to the self-overflow element in order ot prevent it from taking all the available space,\n\t\t\t// since, unlike the other items, it is allowed to grow and shrink\n\t\t\t// We need to set the max-width to none and its position to absolute to allow the item to grow and measure its width,\n\t\t\t// then when set, the max-width will be cached and we will set its highest value to not cut it when the Toolbar shrinks it\n\t\t\t// on rendering and then we resize it manually.\n\t\t\titemWrapper.style.maxWidth = `none`;\n\t\t\titemWrapper?.classList.add(\"ui5-tb-self-overflow-grow\");\n\t\t\titem._maxWidth = Math.max(this.getItemWidth(item), item._maxWidth);\n\t\t\titemWrapper.style.maxWidth = `${item._maxWidth}px`;\n\t\t\titemWrapper?.classList.remove(\"ui5-tb-self-overflow-grow\");\n\t\t}\n\t}\n\n\t/**\n\t * Returns if the overflow popup is open.\n\t * @public\n\t */\n\tisOverflowOpen(): boolean {\n\t\tconst overflowPopover = this.getOverflowPopover();\n\t\treturn overflowPopover.open;\n\t}\n\n\topenOverflow(): void {\n\t\tconst overflowPopover = this.getOverflowPopover();\n\t\toverflowPopover.opener = this.overflowButtonDOM!;\n\t\toverflowPopover.open = true;\n\t\tthis.reverseOverflow = overflowPopover.actualPlacement === \"Top\";\n\t}\n\n\tcloseOverflow() {\n\t\tconst overflowPopover = this.getOverflowPopover();\n\t\toverflowPopover.open = false;\n\t}\n\n\ttoggleOverflow() {\n\t\tif (this.popoverOpen) {\n\t\t\tthis.closeOverflow();\n\t\t} else {\n\t\t\tthis.openOverflow();\n\t\t}\n\t}\n\n\tgetOverflowPopover(): Popover {\n\t\treturn this.shadowRoot!.querySelector<Popover>(\".ui5-overflow-popover\")!;\n\t}\n\n\t/**\n\t * Layout management\n\t */\n\n\tprocessOverflowLayout() {\n\t\tif (this.offsetWidth === 0) {\n\t\t\treturn;\n\t\t}\n\t\tconst containerWidth = this.offsetWidth - this.padding;\n\t\tconst contentWidth = this.itemsWidth;\n\t\tlet overflowSpace = contentWidth - containerWidth + this.overflowButtonSize;\n\n\t\tif (contentWidth <= containerWidth) {\n\t\t\toverflowSpace = 0;\n\t\t}\n\n\t\t// skip calculation if the width has not been changed or if the items width has not been changed\n\t\tif (this.width === containerWidth && this.contentWidth === contentWidth) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.distributeItems(overflowSpace);\n\t\tthis.width = containerWidth;\n\t\tthis.contentWidth = contentWidth;\n\t}\n\n\tstoreItemsWidth() {\n\t\tlet totalWidth = 0,\n\t\t\tminWidth = 0;\n\n\t\tthis.items.forEach(item => {\n\t\t\tconst itemWidth = this.getItemWidth(item);\n\t\t\ttotalWidth += itemWidth;\n\t\t\tif (item.overflowPriority === ToolbarItemOverflowBehavior.NeverOverflow) {\n\t\t\t\tminWidth += itemWidth;\n\t\t\t}\n\t\t\tthis.ITEMS_WIDTH_MAP.set(item._id, itemWidth);\n\t\t});\n\n\t\tif (minWidth !== this.minContentWidth) {\n\t\t\tconst spaceAroundContent = this.offsetWidth - this.getDomRef()!.offsetWidth;\n\t\t\tthis.fireDecoratorEvent(\"_min-content-width-change\", {\n\t\t\t\tminWidth: minWidth + spaceAroundContent + this.overflowButtonSize,\n\t\t\t});\n\t\t}\n\n\t\tthis.itemsWidth = totalWidth;\n\t\tthis.minContentWidth = minWidth;\n\t}\n\n\tdistributeItems(overflowSpace = 0) {\n\t\tconst movableItems = this.movableItems.reverse();\n\t\tlet index = 0;\n\t\tlet currentItem = movableItems[index];\n\n\t\tthis.itemsToOverflow = [];\n\n\t\t// distribute items that always overflow\n\t\tthis.distributeItemsThatAlwaysOverflow();\n\n\t\twhile (overflowSpace > 0 && currentItem) {\n\t\t\tthis.itemsToOverflow.unshift(currentItem);\n\t\t\toverflowSpace -= this.getCachedItemWidth(currentItem?._id) || 0;\n\t\t\tindex++;\n\t\t\tcurrentItem = movableItems[index];\n\t\t}\n\n\t\t// If the last bar item is a spacer, force it to the overflow even if there is enough space for it\n\t\tif (index < movableItems.length) {\n\t\t\tlet lastItem = movableItems[index];\n\t\t\twhile (index <= movableItems.length - 1 && lastItem.isSeparator) {\n\t\t\t\tthis.itemsToOverflow.unshift(lastItem);\n\t\t\t\tindex++;\n\t\t\t\tlastItem = movableItems[index];\n\t\t\t}\n\t\t}\n\n\t\tthis.setSeperatorsVisibilityInOverflow();\n\t}\n\n\tdistributeItemsThatAlwaysOverflow() {\n\t\tthis.alwaysOverflowItems.forEach((item: ToolbarItemBase) => {\n\t\t\tthis.itemsToOverflow.push(item);\n\t\t});\n\t}\n\n\tsetSeperatorsVisibilityInOverflow() {\n\t\tthis.itemsToOverflow.forEach((item, idx, items) => {\n\t\t\tif (item.isSeparator) {\n\t\t\t\t(item as ToolbarSeparator).visible = this.shouldShowSeparatorInOverflow(idx, items);\n\t\t\t}\n\t\t});\n\t}\n\n\tshouldShowSeparatorInOverflow(separatorIdx: number, overflowItems: Array<ToolbarItemBase>) {\n\t\tlet foundPrevNonSeparatorItem = false;\n\t\tlet foundNextNonSeperatorItem = false;\n\n\t\t// search for non-separator item before and after the seperator\n\t\toverflowItems.forEach((item, idx) => {\n\t\t\tif (idx < separatorIdx && !item.isSeparator) {\n\t\t\t\tfoundPrevNonSeparatorItem = true;\n\t\t\t}\n\t\t\tif (idx > separatorIdx && !item.isSeparator) {\n\t\t\t\tfoundNextNonSeperatorItem = true;\n\t\t\t}\n\t\t});\n\n\t\treturn foundPrevNonSeparatorItem && foundNextNonSeperatorItem;\n\t}\n\n\t/**\n\t * Adds AlwaysOverflow items to overflow to ensure they are never rendered outside overflow (and visual flash is prevented)\n\t */\n\tprePopulateAlwaysOverflowItems() {\n\t\tthis.alwaysOverflowItems.forEach(item => {\n\t\t\tif (!this.itemsToOverflow.includes(item)) {\n\t\t\t\tthis.itemsToOverflow.push(item);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Event Handlers\n\t */\n\n\tonOverflowPopoverClosed() {\n\t\tthis.popoverOpen = false;\n\t}\n\n\tonOverflowPopoverOpened() {\n\t\tthis.popoverOpen = true;\n\t\tconst firstItem = this.overflowItems.find(item => item.isInteractive && !item.hidden);\n\t\tfirstItem?.focusForToolbarNavigation(true);\n\t}\n\n\tonResize() {\n\t\tthis.closeOverflow();\n\t\tthis.storeItemsWidth();\n\t\tthis.processOverflowLayout();\n\t}\n\n\t/**\n\t * Private members\n\t */\n\n\tattachListeners() {\n\t\tthis.addEventListener(\"ui5-close-overflow\", this._onCloseOverflow);\n\t\tthis.addEventListener(\"focusin\", this._onFocusIn);\n\t\tthis.addEventListener(\"keydown\", this._onKeyDown, true);\n\t}\n\n\tdetachListeners() {\n\t\tthis.removeEventListener(\"ui5-close-overflow\", this._onCloseOverflow);\n\t\tthis.removeEventListener(\"focusin\", this._onFocusIn);\n\t\tthis.removeEventListener(\"keydown\", this._onKeyDown, true);\n\t}\n\n\tonToolbarItemChange() {\n\t\t// some items were updated reset the cache and trigger a re-render\n\t\tthis.itemsToOverflow = [];\n\t\tthis.contentWidth = 0; // re-render\n\t}\n\n\tgetItemWidth(item: ToolbarItemBase): number {\n\t\t// Spacer width - always 0 for flexible spacers, so that they shrink, otherwise - measure the width normally\n\t\tif (item.ignoreSpace || item.isSeparator) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst id: string = item._id;\n\t\t// Measure rendered width for spacers with width, and for normal items\n\t\tconst renderedItem = this.shadowRoot!.querySelector<HTMLElement>(`#${item._individualSlot}`);\n\n\t\tlet itemWidth = 0;\n\n\t\tif (renderedItem && !renderedItem.classList.contains(\"ui5-tb-popover-item\") && renderedItem.offsetWidth && item._isRendering === false) {\n\t\t\tconst ItemCSSStyleSet = getComputedStyle(renderedItem);\n\t\t\titemWidth = renderedItem.offsetWidth + parsePxValue(ItemCSSStyleSet, \"margin-inline-end\")\n\t\t\t\t+ parsePxValue(ItemCSSStyleSet, \"margin-inline-start\");\n\t\t} else {\n\t\t\titemWidth = this.getCachedItemWidth(id) || 0;\n\t\t}\n\n\t\treturn Math.ceil(itemWidth);\n\t}\n\n\tgetCachedItemWidth(id: string) {\n\t\treturn this.ITEMS_WIDTH_MAP.get(id);\n\t}\n\n\t/**\n\t * Keyboard Navigation\n\t */\n\n\t_isFocusInsideOverflow(path: Array<EventTarget>): boolean {\n\t\tconst popover = this.getOverflowPopover();\n\t\tif (!popover) {\n\t\t\treturn false;\n\t\t}\n\t\t// Check popover shadow DOM (e.g. focus trap sentinels)\n\t\tif ((path as Node[]).some(node => popover === node || popover.shadowRoot === node)) {\n\t\t\treturn true;\n\t\t}\n\t\t// Check if the event originates from a slotted overflow item (light DOM, not contained by popover)\n\t\tconst overflowItemSet = new Set<ToolbarItemBase>(this.overflowItems);\n\t\treturn (path as Node[]).some(node => overflowItemSet.has(node as ToolbarItemBase));\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tconst path = e.composedPath();\n\n\t\tif (this.popoverOpen && this._isFocusInsideOverflow(path)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentTarget = this._findItemByPath(path)\n\t\t\t|| this._findOverflowButtonByPath(path)\n\t\t\t|| this._findCurrentTargetByActiveElement();\n\n\t\tif (currentTarget) {\n\t\t\tthis._setCurrentItem(currentTarget);\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst path = e.composedPath();\n\n\t\tif (this.popoverOpen && this._isFocusInsideOverflow(path)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isTabNext(e) || isTabPrevious(e)) {\n\t\t\tconst tabTarget = this._findItemByPath(path)\n\t\t\t\t|| this._findOverflowButtonByPath(path)\n\t\t\t\t|| this._findCurrentTargetByActiveElement()\n\t\t\t\t|| this._lastFocusedItem;\n\t\t\tif (tabTarget) {\n\t\t\t\tthis._setCurrentItem(tabTarget);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst isForward = this.effectiveDir === \"rtl\" ? isLeft(e) : isRight(e);\n\t\tconst isBackward = this.effectiveDir === \"rtl\" ? isRight(e) : isLeft(e);\n\t\tconst isHomeKey = isHome(e);\n\t\tconst isEndKey = isEnd(e);\n\n\t\tif (!isForward && !isBackward && !isHomeKey && !isEndKey) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentTarget = this._findItemByPath(path)\n\t\t\t|| this._findOverflowButtonByPath(path)\n\t\t\t|| this._findCurrentTargetByActiveElement()\n\t\t\t|| this._lastFocusedItem;\n\t\tif (!currentTarget) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Items that manage their own internal navigation (Input caret, Breadcrumbs,\n\t\t// checkbox groups) report a boundary state; the toolbar only takes over the\n\t\t// key once the item is at the relevant end.\n\t\tconst navState = currentTarget instanceof ToolbarItemBase ? currentTarget.getArrowNavState() : undefined;\n\n\t\tif (navState && (isForward || isBackward)) {\n\t\t\tconst atEnd = isForward ? navState.atRightEnd : navState.atLeftEnd;\n\t\t\tif (!atEnd) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (navState && (isHomeKey || isEndKey)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isHomeKey) {\n\t\t\tthis._moveToFirst();\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEndKey) {\n\t\t\tthis._moveToLast();\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\tif (isForward || isBackward) {\n\t\t\tif (isForward) {\n\t\t\t\tthis._moveToNext();\n\t\t\t} else {\n\t\t\t\tthis._moveToPrev();\n\t\t\t}\n\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t}\n\t}\n\n\t_findItemByPath(path: Array<EventTarget>): ToolbarItemBase | undefined {\n\t\treturn (path as HTMLElement[]).find((el): el is ToolbarItemBase => el instanceof ToolbarItemBase);\n\t}\n\n\t_findOverflowButtonByPath(path: Array<EventTarget>): HTMLElement | undefined {\n\t\tconst overflowButton = this.overflowButtonDOM;\n\t\tif (!overflowButton) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst active = getActiveElement() as HTMLElement | null;\n\t\treturn path.includes(overflowButton)\n\t\t\t|| !!(active && this._isNodeInsideElement(active, overflowButton))\n\t\t\t? overflowButton\n\t\t\t: undefined;\n\t}\n\n\t_isNodeInsideElement(node: Node, element: HTMLElement) {\n\t\tlet current: Node | null = node;\n\n\t\twhile (current) {\n\t\t\tif (current === element) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tconst root = current.getRootNode?.();\n\t\t\tif (root instanceof ShadowRoot) {\n\t\t\t\tcurrent = root.host;\n\t\t\t} else {\n\t\t\t\tcurrent = current.parentNode;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t_findCurrentTargetByActiveElement(): ToolbarItemBase | HTMLElement | undefined {\n\t\tconst active = getActiveElement() as HTMLElement | null;\n\t\tif (!active) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst overflowButton = this.overflowButtonDOM;\n\t\tif (overflowButton && this._isNodeInsideElement(active, overflowButton)) {\n\t\t\treturn overflowButton;\n\t\t}\n\n\t\t// _getNavigationTargets() already includes the item's focus ref, so a single\n\t\t// membership check per item is enough - no need to test getFocusDomRef separately.\n\t\treturn this._getNavigableItems().find(item => item._getNavigationTargets().some(target => this._isNodeInsideElement(active, target)));\n\t}\n\n\t_getNavigationChain() {\n\t\tconst chain: Array<ToolbarItemBase | HTMLElement> = [...this._getNavigableItems()];\n\t\tconst overflowButton = this.overflowButtonDOM;\n\n\t\tif (!this.hideOverflowButton && overflowButton) {\n\t\t\tchain.push(overflowButton);\n\t\t}\n\n\t\treturn chain;\n\t}\n\n\t_getNavigableItems() {\n\t\treturn this.items.filter(item => item.isToolbarNavigatable && !item.isOverflowed);\n\t}\n\n\t_setCurrentItem(item: ToolbarItemBase | HTMLElement) {\n\t\tthis._lastFocusedItem = item;\n\t}\n\n\t_moveToNext() {\n\t\tthis._moveToItem((current, items) => Math.min(current + 1, items.length - 1), true);\n\t}\n\n\t_moveToPrev() {\n\t\tthis._moveToItem(current => Math.max(current - 1, 0), false);\n\t}\n\n\t_moveToFirst() {\n\t\tthis._moveToItem(() => 0, true);\n\t}\n\n\t_moveToLast() {\n\t\tthis._moveToItem((_, items) => items.length - 1, false);\n\t}\n\n\t_moveToItem(indexCalc: (currentIndex: number, items: Array<ToolbarItemBase | HTMLElement>) => number, isForward: boolean) {\n\t\tconst items = this._getNavigationChain();\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentIndex = this._lastFocusedItem ? items.indexOf(this._lastFocusedItem) : -1;\n\n\t\t// No tracked item in the current chain: enter at the near end for the\n\t\t// pressed direction (first item for forward, last for backward) instead\n\t\t// of coercing to 0 and then stepping past it.\n\t\tif (currentIndex === -1) {\n\t\t\tconst entryItem = items[isForward ? 0 : items.length - 1];\n\t\t\tthis._setCurrentItem(entryItem);\n\t\t\tthis._focusNavigationItem(entryItem, isForward);\n\t\t\treturn;\n\t\t}\n\n\t\tconst nextIndex = indexCalc(currentIndex, items);\n\n\t\tif (nextIndex === currentIndex) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst nextItem = items[nextIndex];\n\t\tthis._setCurrentItem(nextItem);\n\t\tthis._focusNavigationItem(nextItem, isForward);\n\t}\n\n\t_focusNavigationItem(item: ToolbarItemBase | HTMLElement, isForward: boolean) {\n\t\tif (item instanceof ToolbarItemBase) {\n\t\t\titem.focusForToolbarNavigation(isForward);\n\t\t} else {\n\t\t\titem.focus();\n\t\t}\n\t}\n}\n\nToolbar.define();\n\nexport default Toolbar;\nexport type {\n\tToolbarMinWidthChangeEventDetail,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../src/Toolbar.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,aAAa,MAAM,wDAAwD,CAAC;AAEnF,OAAO,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,SAAS,EACT,aAAa,GACb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAC1G,OAAO,2CAA2C,CAAC;AAEnD,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EACN,kCAAkC,EAClC,gCAAgC,GAChC,MAAM,mCAAmC,CAAC;AAE3C,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAE3D,OAAO,iBAAiB,MAAM,0CAA0C,CAAC;AAIzE,OAAO,2BAA2B,MAAM,wCAAwC,CAAC;AAEjF,OAAO,eAAe,MAAM,sBAAsB,CAAC;AAKnD,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AAkBrF,SAAS,oBAAoB,CAAC,QAA6B,EAAE,YAAoB;IAChF,OAAO,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,KA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E,OAAO,EAAE,CAAC;4CACR;AAWpB;IAHC,IAAI,CAAC;QACL,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI;KACxF,CAAC;sCACkC;AAzF7B;IADN,IAAI,CAAC,oBAAoB,CAAC;iCACG;AALzB,OAAO;IAbZ,aAAa,CAAC;QACd,GAAG,EAAE,aAAa;QAClB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,eAAe;KACzB,CAAC;IACF;;MAEE;;IACD,KAAK,CAAC,2BAA2B,EAAE;QACnC,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,OAAO,CA4yBZ;AAED,OAAO,CAAC,MAAM,EAAE,CAAC;AAEjB,eAAe,OAAO,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { ChangeInfo, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport {\n\tisLeft,\n\tisRight,\n\tisHome,\n\tisEnd,\n\tisTabNext,\n\tisTabPrevious,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport \"@ui5/webcomponents-icons/dist/overflow.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\n\nimport {\n\tTOOLBAR_OVERFLOW_BUTTON_ARIA_LABEL,\n\tTOOLBAR_POPOVER_AVAILABLE_VALUES,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport ToolbarTemplate from \"./ToolbarTemplate.js\";\nimport ToolbarCss from \"./generated/themes/Toolbar.css.js\";\n\nimport ToolbarPopoverCss from \"./generated/themes/ToolbarPopover.css.js\";\n\nimport type ToolbarAlign from \"./types/ToolbarAlign.js\";\nimport type ToolbarDesign from \"./types/ToolbarDesign.js\";\nimport ToolbarItemOverflowBehavior from \"./types/ToolbarItemOverflowBehavior.js\";\n\nimport ToolbarItemBase from \"./ToolbarItemBase.js\";\nimport type ToolbarSeparator from \"./ToolbarSeparator.js\";\n\nimport type Button from \"./Button.js\";\nimport type Popover from \"./Popover.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\n\ntype ToolbarMinWidthChangeEventDetail = {\n\tminWidth: number,\n};\n\n/**\n * One step of the overflow distribution algorithm — either a single ungrouped item or\n * all members of one non-empty `overflowGroup`, treated atomically. A unit's order key\n * for the right-to-left distribution walk is the rightmost member's slot index; its\n * width is the sum of member widths.\n */\ntype DistributionUnit = {\n\tmembers: Array<ToolbarItemBase>,\n\twidth: number,\n\trightmostIndex: number,\n};\n\nfunction calculateCSSREMValue(styleSet: CSSStyleDeclaration, propertyName: string): number {\n\treturn Number(styleSet.getPropertyValue(propertyName).replace(\"rem\", \"\")) * parseInt(getComputedStyle(document.body).getPropertyValue(\"font-size\"));\n}\n\nfunction parsePxValue(styleSet: CSSStyleDeclaration, propertyName: string): number {\n\treturn Number(styleSet.getPropertyValue(propertyName).replace(\"px\", \"\"));\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-toolbar` component is used to create a horizontal layout with items.\n * The items can be overflowing in a popover, when the space is not enough to show all of them.\n *\n * ### Grouped Overflow\n *\n * Items that share the same non-empty `overflowGroup` string are treated as one atomic\n * unit during overflow distribution: when any member must move into the overflow\n * popover, all members move together. The visible bar always preserves slot order;\n * the group becomes adjacent only inside the popover. See the `overflowGroup` property\n * on `ToolbarItemBase` for the full contract.\n *\n * ### Keyboard Handling\n * The `ui5-toolbar` provides advanced keyboard handling.\n *\n * - [Left]/[Right] - navigate among toolbar items\n * - [Home]/[End] - move to first/last toolbar item\n * - [Tab] / [Shift]+[Tab] - exit the toolbar\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents/dist/Toolbar.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.17.0\n */\n@customElement({\n\ttag: \"ui5-toolbar\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: ToolbarTemplate,\n})\n/**\n * @private\n*/\n@event(\"_min-content-width-change\", {\n\tbubbles: true,\n})\n\nclass Toolbar extends UI5Element {\n\teventDetails!: {\n\t\t\"_min-content-width-change\": ToolbarMinWidthChangeEventDetail\n\t}\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t/**\n\t * Indicated the direction in which the Toolbar items will be aligned.\n\t * @public\n\t * @default \"End\"\n\t */\n\t@property()\n\talignContent: `${ToolbarAlign}` = \"End\";\n\n\t/**\n\t * Calculated width of the whole toolbar.\n\t * @private\n\t * @default undefined\n\t */\n\t@property({ type: Number })\n\twidth?: number;\n\n\t/**\n\t * Calculated width of the toolbar content.\n\t * @private\n\t * @default undefined\n\t */\n\t@property({ type: Number })\n\tcontentWidth?: number;\n\n\t/**\n\t * Notifies the toolbar if it should show the items in a reverse way if Toolbar Popover needs to be placed on \"Top\" position.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\treverseOverflow = false;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * **Note:** It is strongly recommended to always set this property or `accessibleNameRef`\n\t * when the toolbar has `role=\"toolbar\"` (i.e. when it contains more than one interactive item).\n\t * Without an accessible name, screen readers will announce the toolbar without any context,\n\t * making it harder for keyboard-only and AT users to understand its purpose.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the input.\n\t *\n\t * **Note:** When the toolbar has `role=\"toolbar\"`, at least one of `accessibleName` or\n\t * `accessibleNameRef` should be provided to satisfy WCAG 2.1 success criterion 4.1.2.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the accessible ARIA name of the overflow button of the component.\n\t *\n\t * **Note:** When not set, the built-in translation for \"Additional Options\" is used.\n\t * @default undefined\n\t * @public\n\t * @since 2.22.0\n\t */\n\t@property()\n\toverflowButtonAccessibleName?: string;\n\n\t/**\n\t * Defines the toolbar design.\n\t * @public\n\t * @default \"Solid\"\n\t * @since 2.0.0\n\t */\n\t@property()\n\tdesign: `${ToolbarDesign}` = \"Solid\"\n\n\t@property({ type: Boolean })\n\tpopoverOpen = false;\n\n\t/**\n\t * Defines the items of the component.\n\t *\n\t * **Note:** Use `ui5-toolbar-button`, `ui5-toolbar-select`, `ui5-toolbar-separator` and `ui5-toolbar-spacer` for the most common toolbar actions. To place any other UI5 Web Component into the toolbar and have it participate in overflow handling, wrap it in a `ui5-toolbar-item`.\n\t * @public\n\t */\n\t@slot({\n\t\t\"default\": true, type: HTMLElement, invalidateOnChildChange: true, individualSlots: true,\n\t})\n\titems!: DefaultSlot<ToolbarItemBase>\n\n\t_onResize!: ResizeObserverCallback;\n\t_onCloseOverflow!: EventListener;\n\t_onFocusIn!: (e: FocusEvent) => void;\n\t_onKeyDown!: (e: KeyboardEvent) => void;\n\titemsToOverflow: Array<ToolbarItemBase> = [];\n\titemsWidth = 0;\n\tminContentWidth = 0;\n\t// Snapshot of children's `overflowGroup` values, joined with \"|\". Tracks whether\n\t// the grouping decision has changed even when total content width has not.\n\t_groupingKey = \"\";\n\t_lastFocusedItem?: ToolbarItemBase | HTMLElement;\n\n\tITEMS_WIDTH_MAP: Map<string, number> = new Map();\n\n\tstatic get styles() {\n\t\treturn [\n\t\t\tToolbarCss,\n\t\t\tToolbarPopoverCss,\n\t\t];\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._onResize = this.onResize.bind(this);\n\t\tthis._onCloseOverflow = this.closeOverflow.bind(this);\n\t\tthis._onFocusIn = this._onfocusin.bind(this);\n\t\tthis._onKeyDown = this._onkeydown.bind(this);\n\t}\n\t/**\n\t * Read-only members\n\t */\n\tget overflowButtonSize(): number {\n\t\treturn this.overflowButtonDOM?.getBoundingClientRect().width || 0;\n\t}\n\tget padding(): number {\n\t\tconst toolbarComputedStyle = getComputedStyle(this.getDomRef()!);\n\t\treturn calculateCSSREMValue(toolbarComputedStyle, \"--_ui5-toolbar-padding-left\")\n\t\t\t+ calculateCSSREMValue(toolbarComputedStyle, \"--_ui5-toolbar-padding-right\");\n\t}\n\n\tget alwaysOverflowItems() {\n\t\treturn this.items.filter(item => item.effectiveOverflowPriority === ToolbarItemOverflowBehavior.AlwaysOverflow);\n\t}\n\n\tget movableItems() {\n\t\treturn this.items.filter(item => item.effectiveOverflowPriority !== ToolbarItemOverflowBehavior.AlwaysOverflow && item.effectiveOverflowPriority !== ToolbarItemOverflowBehavior.NeverOverflow);\n\t}\n\n\tget overflowItems() {\n\t\t// spacers are ignored\n\t\tconst overflowItems = this.itemsToOverflow.filter(item => !item.ignoreSpace);\n\t\treturn this.reverseOverflow ? overflowItems.reverse() : overflowItems;\n\t}\n\n\tget standardItems() {\n\t\treturn this.items.filter(item => this.itemsToOverflow.indexOf(item) === -1);\n\t}\n\n\tget hideOverflowButton() {\n\t\treturn this.itemsToOverflow.filter(item => !(item.ignoreSpace || item.isSeparator)).length === 0;\n\t}\n\n\tget interactiveItems() {\n\t\treturn this.items.filter((item: ToolbarItemBase) => item.isInteractive);\n\t}\n\n\t/**\n\t * Accessibility\n\t */\n\n\tget hasAriaSemantics() {\n\t\treturn this.interactiveItems.length > 1;\n\t}\n\n\tget accessibleRole() {\n\t\treturn this.hasAriaSemantics ? \"toolbar\" as const : undefined;\n\t}\n\n\tget ariaLabelText() {\n\t\treturn this.hasAriaSemantics ? getEffectiveAriaLabelText(this) : undefined;\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\trole: this.accessibleRole,\n\t\t\t\taccessibleName: this.ariaLabelText,\n\t\t\t},\n\t\t\toverflowButton: {\n\t\t\t\taccessibleName: this.overflowButtonAccessibleName || Toolbar.i18nBundle.getText(TOOLBAR_OVERFLOW_BUTTON_ARIA_LABEL),\n\t\t\t\ttooltip: Toolbar.i18nBundle.getText(TOOLBAR_OVERFLOW_BUTTON_ARIA_LABEL),\n\t\t\t\taccessibilityAttributes: {\n\t\t\t\t\texpanded: this.popoverOpen,\n\t\t\t\t\thasPopup: \"menu\" as const,\n\t\t\t\t},\n\t\t\t},\n\t\t\tpopover: {\n\t\t\t\taccessibleName: Toolbar.i18nBundle.getText(TOOLBAR_POPOVER_AVAILABLE_VALUES),\n\t\t\t},\n\t\t};\n\t}\n\n\t/**\n\t * Toolbar Overflow Popover\n\t */\n\n\tget overflowButtonDOM(): Button | null {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-tb-overflow-btn\");\n\t}\n\n\tget hasFlexibleSpacers() {\n\t\treturn this.items.some((item: ToolbarItemBase) => item.hasFlexibleWidth);\n\t}\n\n\t/**\n\t * Lifecycle methods\n\t */\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._onResize);\n\t\tthis.attachListeners();\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._onResize);\n\t\tthis.detachListeners();\n\t}\n\n\tonInvalidation(changeInfo: ChangeInfo) {\n\t\tif (changeInfo.reason === \"childchange\") {\n\t\t\tconst currentItemsWidth = this.items.reduce((total, item) => total + this.getItemWidth(item), 0);\n\t\t\tconst currentGroupingKey = this.items.map(item => item.effectiveOverflowGroup).join(\"|\");\n\t\t\tif (currentItemsWidth !== this.itemsWidth || currentGroupingKey !== this._groupingKey) {\n\t\t\t\tthis.onToolbarItemChange();\n\t\t\t}\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tif (getActiveElement() === this.overflowButtonDOM?.getFocusDomRef() && this.hideOverflowButton) {\n\t\t\tconst items = this.standardItems.filter(item => item.isToolbarNavigatable);\n\t\t\tconst lastItem = items.at(-1);\n\t\t\tif (lastItem) {\n\t\t\t\tthis._lastFocusedItem = lastItem;\n\t\t\t\tlastItem.focusForToolbarNavigation(false);\n\t\t\t}\n\t\t}\n\t\tthis.prePopulateAlwaysOverflowItems();\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished();\n\t\tthis.storeItemsWidth();\n\t\tthis.processOverflowLayout();\n\t\tthis.items.forEach(item => {\n\t\t\tthis.addItemsAdditionalProperties(item);\n\t\t});\n\t\tthis._reconcileLastFocusedItem();\n\t}\n\n\t/**\n\t * Drops the tracked re-entry item once it leaves the navigation chain\n\t * (moved to overflow or removed), so Tab re-entry and arrow/Home/End\n\t * navigation don't silently restart from the first item.\n\t */\n\t_reconcileLastFocusedItem() {\n\t\tif (this._lastFocusedItem instanceof ToolbarItemBase && !this._getNavigationChain().includes(this._lastFocusedItem)) {\n\t\t\tthis._lastFocusedItem = undefined;\n\t\t}\n\t}\n\n\taddItemsAdditionalProperties(item: ToolbarItemBase) {\n\t\titem.isOverflowed = this.overflowItems.indexOf(item) !== -1;\n\t\tconst itemWrapper = this.shadowRoot!.querySelector(`#${item._individualSlot}`) as HTMLElement;\n\t\tif (item.hasOverflow && !item.isOverflowed && itemWrapper) {\n\t\t\t// We need to set the max-width to the self-overflow element in order ot prevent it from taking all the available space,\n\t\t\t// since, unlike the other items, it is allowed to grow and shrink\n\t\t\t// We need to set the max-width to none and its position to absolute to allow the item to grow and measure its width,\n\t\t\t// then when set, the max-width will be cached and we will set its highest value to not cut it when the Toolbar shrinks it\n\t\t\t// on rendering and then we resize it manually.\n\t\t\titemWrapper.style.maxWidth = `none`;\n\t\t\titemWrapper?.classList.add(\"ui5-tb-self-overflow-grow\");\n\t\t\titem._maxWidth = Math.max(this.getItemWidth(item), item._maxWidth);\n\t\t\titemWrapper.style.maxWidth = `${item._maxWidth}px`;\n\t\t\titemWrapper?.classList.remove(\"ui5-tb-self-overflow-grow\");\n\t\t}\n\t}\n\n\t/**\n\t * Returns if the overflow popup is open.\n\t * @public\n\t */\n\tisOverflowOpen(): boolean {\n\t\tconst overflowPopover = this.getOverflowPopover();\n\t\treturn overflowPopover.open;\n\t}\n\n\topenOverflow(): void {\n\t\tconst overflowPopover = this.getOverflowPopover();\n\t\toverflowPopover.opener = this.overflowButtonDOM!;\n\t\toverflowPopover.open = true;\n\t\tthis.reverseOverflow = overflowPopover.actualPlacement === \"Top\";\n\t}\n\n\tcloseOverflow() {\n\t\tconst overflowPopover = this.getOverflowPopover();\n\t\toverflowPopover.open = false;\n\t}\n\n\ttoggleOverflow() {\n\t\tif (this.popoverOpen) {\n\t\t\tthis.closeOverflow();\n\t\t} else {\n\t\t\tthis.openOverflow();\n\t\t}\n\t}\n\n\tgetOverflowPopover(): Popover {\n\t\treturn this.shadowRoot!.querySelector<Popover>(\".ui5-overflow-popover\")!;\n\t}\n\n\t/**\n\t * Layout management\n\t */\n\n\tprocessOverflowLayout() {\n\t\tif (this.offsetWidth === 0) {\n\t\t\treturn;\n\t\t}\n\t\tconst containerWidth = this.offsetWidth - this.padding;\n\t\tconst contentWidth = this.itemsWidth;\n\t\tlet overflowSpace = contentWidth - containerWidth + this.overflowButtonSize;\n\n\t\tif (contentWidth <= containerWidth) {\n\t\t\toverflowSpace = 0;\n\t\t}\n\n\t\t// skip calculation if the width has not been changed or if the items width has not been changed\n\t\tif (this.width === containerWidth && this.contentWidth === contentWidth) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.distributeItems(overflowSpace);\n\t\tthis.width = containerWidth;\n\t\tthis.contentWidth = contentWidth;\n\t}\n\n\tstoreItemsWidth() {\n\t\tlet totalWidth = 0,\n\t\t\tminWidth = 0;\n\n\t\tthis.items.forEach(item => {\n\t\t\tconst itemWidth = this.getItemWidth(item);\n\t\t\ttotalWidth += itemWidth;\n\t\t\tif (item.effectiveOverflowPriority === ToolbarItemOverflowBehavior.NeverOverflow) {\n\t\t\t\tminWidth += itemWidth;\n\t\t\t}\n\t\t\tthis.ITEMS_WIDTH_MAP.set(item._id, itemWidth);\n\t\t});\n\n\t\tif (minWidth !== this.minContentWidth) {\n\t\t\tconst spaceAroundContent = this.offsetWidth - this.getDomRef()!.offsetWidth;\n\t\t\tthis.fireDecoratorEvent(\"_min-content-width-change\", {\n\t\t\t\tminWidth: minWidth + spaceAroundContent + this.overflowButtonSize,\n\t\t\t});\n\t\t}\n\n\t\tthis.itemsWidth = totalWidth;\n\t\tthis.minContentWidth = minWidth;\n\t\tthis._groupingKey = this.items.map(item => item.effectiveOverflowGroup).join(\"|\");\n\t}\n\n\tdistributeItems(overflowSpace = 0) {\n\t\tthis.itemsToOverflow = [];\n\n\t\t// distribute items that always overflow\n\t\tthis.distributeItemsThatAlwaysOverflow();\n\n\t\t// Bucket movable items (in slot order) into distribution units.\n\t\t// A unit is either a single ungrouped item, or a group of items\n\t\t// sharing the same non-empty `overflowGroup`. A unit is atomic:\n\t\t// when it is pushed into overflow, all its members move together.\n\t\t// The unit's representative slot position is its rightmost member's\n\t\t// index — that index is what orders the unit during distribution.\n\t\tconst slotIndex = new Map<ToolbarItemBase, number>();\n\t\tthis.items.forEach((item, idx) => slotIndex.set(item, idx));\n\t\tconst units = this.buildDistributionUnits(slotIndex);\n\n\t\t// Walk units from rightmost to leftmost, pushing each atomically.\n\t\t// A unit is pushed in full as soon as overflowSpace is still positive;\n\t\t// the post-push budget is allowed to go negative — over-shoot is accepted\n\t\t// by design because a group is indivisible.\n\t\tconst overflowedItems: Array<ToolbarItemBase> = [];\n\t\tlet nextNonOverflowedUnitIndex = units.length - 1;\n\t\tfor (let i = units.length - 1; i >= 0; i--) {\n\t\t\tif (overflowSpace <= 0) {\n\t\t\t\tnextNonOverflowedUnitIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconst unit = units[i];\n\t\t\toverflowedItems.push(...unit.members);\n\t\t\toverflowSpace -= unit.width;\n\t\t\tnextNonOverflowedUnitIndex = i - 1;\n\t\t}\n\n\t\t// If the last bar item is a separator, force it (and any contiguous\n\t\t// trailing separators) into overflow even if there is enough space.\n\t\t// Only single-member separator units are considered — pushing a\n\t\t// group's entire content (non-separator content included) because its\n\t\t// rightmost member happens to be a separator would be wrong.\n\t\twhile (nextNonOverflowedUnitIndex >= 0) {\n\t\t\tconst unit = units[nextNonOverflowedUnitIndex];\n\t\t\tif (unit.members.length === 1 && unit.members[0].isSeparator) {\n\t\t\t\toverflowedItems.push(...unit.members);\n\t\t\t\tnextNonOverflowedUnitIndex--;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// itemsToOverflow must be in slot order so popover rendering matches\n\t\t// the developer's source order (group members adjacent by construction).\n\t\toverflowedItems.sort((a, b) => (slotIndex.get(a)! - slotIndex.get(b)!));\n\t\tthis.itemsToOverflow.push(...overflowedItems);\n\n\t\tthis.setSeperatorsVisibilityInOverflow();\n\t}\n\n\t/**\n\t * Buckets `movableItems` (in slot order) into atomic distribution units.\n\t * Each unit either holds a single ungrouped item or all members of one\n\t * non-empty `overflowGroup`. A unit's order key is its rightmost member's\n\t * slot index. Returned units are sorted ascending by that key.\n\t */\n\tbuildDistributionUnits(slotIndex: Map<ToolbarItemBase, number>): Array<DistributionUnit> {\n\t\tconst movable = this.movableItems;\n\n\t\tconst groupUnits = new Map<string, DistributionUnit>();\n\t\tconst units: Array<DistributionUnit> = [];\n\n\t\tmovable.forEach(item => {\n\t\t\tconst itemWidth = this.getCachedItemWidth(item._id) || 0;\n\t\t\tconst slotIdx = slotIndex.get(item)!;\n\t\t\tconst groupKey = item.effectiveOverflowGroup;\n\t\t\tif (!groupKey) {\n\t\t\t\tunits.push({\n\t\t\t\t\tmembers: [item],\n\t\t\t\t\twidth: itemWidth,\n\t\t\t\t\trightmostIndex: slotIdx,\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst existing = groupUnits.get(groupKey);\n\t\t\tif (existing) {\n\t\t\t\texisting.members.push(item);\n\t\t\t\texisting.width += itemWidth;\n\t\t\t\tif (slotIdx > existing.rightmostIndex) {\n\t\t\t\t\texisting.rightmostIndex = slotIdx;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst unit: DistributionUnit = {\n\t\t\t\t\tmembers: [item],\n\t\t\t\t\twidth: itemWidth,\n\t\t\t\t\trightmostIndex: slotIdx,\n\t\t\t\t};\n\t\t\t\tgroupUnits.set(groupKey, unit);\n\t\t\t\tunits.push(unit);\n\t\t\t}\n\t\t});\n\n\t\tunits.sort((a, b) => a.rightmostIndex - b.rightmostIndex);\n\t\treturn units;\n\t}\n\n\tdistributeItemsThatAlwaysOverflow() {\n\t\tthis.alwaysOverflowItems.forEach((item: ToolbarItemBase) => {\n\t\t\tthis.itemsToOverflow.push(item);\n\t\t});\n\t}\n\n\tsetSeperatorsVisibilityInOverflow() {\n\t\tthis.itemsToOverflow.forEach((item, idx, items) => {\n\t\t\tif (item.isSeparator) {\n\t\t\t\t(item as ToolbarSeparator).visible = this.shouldShowSeparatorInOverflow(idx, items);\n\t\t\t}\n\t\t});\n\t}\n\n\tshouldShowSeparatorInOverflow(separatorIdx: number, overflowItems: Array<ToolbarItemBase>) {\n\t\tlet foundPrevNonSeparatorItem = false;\n\t\tlet foundNextNonSeperatorItem = false;\n\n\t\t// search for non-separator item before and after the seperator\n\t\toverflowItems.forEach((item, idx) => {\n\t\t\tif (idx < separatorIdx && !item.isSeparator) {\n\t\t\t\tfoundPrevNonSeparatorItem = true;\n\t\t\t}\n\t\t\tif (idx > separatorIdx && !item.isSeparator) {\n\t\t\t\tfoundNextNonSeperatorItem = true;\n\t\t\t}\n\t\t});\n\n\t\treturn foundPrevNonSeparatorItem && foundNextNonSeperatorItem;\n\t}\n\n\t/**\n\t * Adds AlwaysOverflow items to overflow to ensure they are never rendered outside overflow (and visual flash is prevented)\n\t */\n\tprePopulateAlwaysOverflowItems() {\n\t\tthis.alwaysOverflowItems.forEach(item => {\n\t\t\tif (!this.itemsToOverflow.includes(item)) {\n\t\t\t\tthis.itemsToOverflow.push(item);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Event Handlers\n\t */\n\n\tonOverflowPopoverClosed() {\n\t\tthis.popoverOpen = false;\n\t}\n\n\tonOverflowPopoverOpened() {\n\t\tthis.popoverOpen = true;\n\t\tconst firstItem = this.overflowItems.find(item => item.isInteractive && !item.hidden);\n\t\tfirstItem?.focusForToolbarNavigation(true);\n\t}\n\n\tonResize() {\n\t\tthis.closeOverflow();\n\t\tthis.storeItemsWidth();\n\t\tthis.processOverflowLayout();\n\t}\n\n\t/**\n\t * Private members\n\t */\n\n\tattachListeners() {\n\t\tthis.addEventListener(\"ui5-close-overflow\", this._onCloseOverflow);\n\t\tthis.addEventListener(\"focusin\", this._onFocusIn);\n\t\tthis.addEventListener(\"keydown\", this._onKeyDown, true);\n\t}\n\n\tdetachListeners() {\n\t\tthis.removeEventListener(\"ui5-close-overflow\", this._onCloseOverflow);\n\t\tthis.removeEventListener(\"focusin\", this._onFocusIn);\n\t\tthis.removeEventListener(\"keydown\", this._onKeyDown, true);\n\t}\n\n\tonToolbarItemChange() {\n\t\t// some items were updated reset the cache and trigger a re-render\n\t\tthis.itemsToOverflow = [];\n\t\tthis.contentWidth = 0; // re-render\n\t}\n\n\tgetItemWidth(item: ToolbarItemBase): number {\n\t\t// Spacer width - always 0 for flexible spacers, so that they shrink, otherwise - measure the width normally\n\t\tif (item.ignoreSpace || item.isSeparator) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst id: string = item._id;\n\t\t// Measure rendered width for spacers with width, and for normal items\n\t\tconst renderedItem = this.shadowRoot!.querySelector<HTMLElement>(`#${item._individualSlot}`);\n\n\t\tlet itemWidth = 0;\n\n\t\tif (renderedItem && !renderedItem.classList.contains(\"ui5-tb-popover-item\") && renderedItem.offsetWidth && item._isRendering === false) {\n\t\t\tconst ItemCSSStyleSet = getComputedStyle(renderedItem);\n\t\t\titemWidth = renderedItem.offsetWidth + parsePxValue(ItemCSSStyleSet, \"margin-inline-end\")\n\t\t\t\t+ parsePxValue(ItemCSSStyleSet, \"margin-inline-start\");\n\t\t} else {\n\t\t\titemWidth = this.getCachedItemWidth(id) || 0;\n\t\t}\n\n\t\treturn Math.ceil(itemWidth);\n\t}\n\n\tgetCachedItemWidth(id: string) {\n\t\treturn this.ITEMS_WIDTH_MAP.get(id);\n\t}\n\n\t/**\n\t * Keyboard Navigation\n\t */\n\n\t_isFocusInsideOverflow(path: Array<EventTarget>): boolean {\n\t\tconst popover = this.getOverflowPopover();\n\t\tif (!popover) {\n\t\t\treturn false;\n\t\t}\n\t\t// Check popover shadow DOM (e.g. focus trap sentinels)\n\t\tif ((path as Node[]).some(node => popover === node || popover.shadowRoot === node)) {\n\t\t\treturn true;\n\t\t}\n\t\t// Check if the event originates from a slotted overflow item (light DOM, not contained by popover)\n\t\tconst overflowItemSet = new Set<ToolbarItemBase>(this.overflowItems);\n\t\treturn (path as Node[]).some(node => overflowItemSet.has(node as ToolbarItemBase));\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tconst path = e.composedPath();\n\n\t\tif (this.popoverOpen && this._isFocusInsideOverflow(path)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentTarget = this._findItemByPath(path)\n\t\t\t|| this._findOverflowButtonByPath(path)\n\t\t\t|| this._findCurrentTargetByActiveElement();\n\n\t\tif (currentTarget) {\n\t\t\tthis._setCurrentItem(currentTarget);\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst path = e.composedPath();\n\n\t\tif (this.popoverOpen && this._isFocusInsideOverflow(path)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isTabNext(e) || isTabPrevious(e)) {\n\t\t\tconst tabTarget = this._findItemByPath(path)\n\t\t\t\t|| this._findOverflowButtonByPath(path)\n\t\t\t\t|| this._findCurrentTargetByActiveElement()\n\t\t\t\t|| this._lastFocusedItem;\n\t\t\tif (tabTarget) {\n\t\t\t\tthis._setCurrentItem(tabTarget);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst isForward = this.effectiveDir === \"rtl\" ? isLeft(e) : isRight(e);\n\t\tconst isBackward = this.effectiveDir === \"rtl\" ? isRight(e) : isLeft(e);\n\t\tconst isHomeKey = isHome(e);\n\t\tconst isEndKey = isEnd(e);\n\n\t\tif (!isForward && !isBackward && !isHomeKey && !isEndKey) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentTarget = this._findItemByPath(path)\n\t\t\t|| this._findOverflowButtonByPath(path)\n\t\t\t|| this._findCurrentTargetByActiveElement()\n\t\t\t|| this._lastFocusedItem;\n\t\tif (!currentTarget) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Items that manage their own internal navigation (Input caret, Breadcrumbs,\n\t\t// checkbox groups) report a boundary state; the toolbar only takes over the\n\t\t// key once the item is at the relevant end.\n\t\tconst navState = currentTarget instanceof ToolbarItemBase ? currentTarget.getArrowNavState() : undefined;\n\n\t\tif (navState && (isForward || isBackward)) {\n\t\t\tconst atEnd = isForward ? navState.atRightEnd : navState.atLeftEnd;\n\t\t\tif (!atEnd) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (navState && (isHomeKey || isEndKey)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isHomeKey) {\n\t\t\tthis._moveToFirst();\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEndKey) {\n\t\t\tthis._moveToLast();\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\tif (isForward || isBackward) {\n\t\t\tif (isForward) {\n\t\t\t\tthis._moveToNext();\n\t\t\t} else {\n\t\t\t\tthis._moveToPrev();\n\t\t\t}\n\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t}\n\t}\n\n\t_findItemByPath(path: Array<EventTarget>): ToolbarItemBase | undefined {\n\t\treturn (path as HTMLElement[]).find((el): el is ToolbarItemBase => el instanceof ToolbarItemBase);\n\t}\n\n\t_findOverflowButtonByPath(path: Array<EventTarget>): HTMLElement | undefined {\n\t\tconst overflowButton = this.overflowButtonDOM;\n\t\tif (!overflowButton) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst active = getActiveElement() as HTMLElement | null;\n\t\treturn path.includes(overflowButton)\n\t\t\t|| !!(active && this._isNodeInsideElement(active, overflowButton))\n\t\t\t? overflowButton\n\t\t\t: undefined;\n\t}\n\n\t_isNodeInsideElement(node: Node, element: HTMLElement) {\n\t\tlet current: Node | null = node;\n\n\t\twhile (current) {\n\t\t\tif (current === element) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tconst root = current.getRootNode?.();\n\t\t\tif (root instanceof ShadowRoot) {\n\t\t\t\tcurrent = root.host;\n\t\t\t} else {\n\t\t\t\tcurrent = current.parentNode;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t_findCurrentTargetByActiveElement(): ToolbarItemBase | HTMLElement | undefined {\n\t\tconst active = getActiveElement() as HTMLElement | null;\n\t\tif (!active) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst overflowButton = this.overflowButtonDOM;\n\t\tif (overflowButton && this._isNodeInsideElement(active, overflowButton)) {\n\t\t\treturn overflowButton;\n\t\t}\n\n\t\t// _getNavigationTargets() already includes the item's focus ref, so a single\n\t\t// membership check per item is enough - no need to test getFocusDomRef separately.\n\t\treturn this._getNavigableItems().find(item => item._getNavigationTargets().some(target => this._isNodeInsideElement(active, target)));\n\t}\n\n\t_getNavigationChain() {\n\t\tconst chain: Array<ToolbarItemBase | HTMLElement> = [...this._getNavigableItems()];\n\t\tconst overflowButton = this.overflowButtonDOM;\n\n\t\tif (!this.hideOverflowButton && overflowButton) {\n\t\t\tchain.push(overflowButton);\n\t\t}\n\n\t\treturn chain;\n\t}\n\n\t_getNavigableItems() {\n\t\treturn this.items.filter(item => item.isToolbarNavigatable && !item.isOverflowed);\n\t}\n\n\t_setCurrentItem(item: ToolbarItemBase | HTMLElement) {\n\t\tthis._lastFocusedItem = item;\n\t}\n\n\t_moveToNext() {\n\t\tthis._moveToItem((current, items) => Math.min(current + 1, items.length - 1), true);\n\t}\n\n\t_moveToPrev() {\n\t\tthis._moveToItem(current => Math.max(current - 1, 0), false);\n\t}\n\n\t_moveToFirst() {\n\t\tthis._moveToItem(() => 0, true);\n\t}\n\n\t_moveToLast() {\n\t\tthis._moveToItem((_, items) => items.length - 1, false);\n\t}\n\n\t_moveToItem(indexCalc: (currentIndex: number, items: Array<ToolbarItemBase | HTMLElement>) => number, isForward: boolean) {\n\t\tconst items = this._getNavigationChain();\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentIndex = this._lastFocusedItem ? items.indexOf(this._lastFocusedItem) : -1;\n\n\t\t// No tracked item in the current chain: enter at the near end for the\n\t\t// pressed direction (first item for forward, last for backward) instead\n\t\t// of coercing to 0 and then stepping past it.\n\t\tif (currentIndex === -1) {\n\t\t\tconst entryItem = items[isForward ? 0 : items.length - 1];\n\t\t\tthis._setCurrentItem(entryItem);\n\t\t\tthis._focusNavigationItem(entryItem, isForward);\n\t\t\treturn;\n\t\t}\n\n\t\tconst nextIndex = indexCalc(currentIndex, items);\n\n\t\tif (nextIndex === currentIndex) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst nextItem = items[nextIndex];\n\t\tthis._setCurrentItem(nextItem);\n\t\tthis._focusNavigationItem(nextItem, isForward);\n\t}\n\n\t_focusNavigationItem(item: ToolbarItemBase | HTMLElement, isForward: boolean) {\n\t\tif (item instanceof ToolbarItemBase) {\n\t\t\titem.focusForToolbarNavigation(isForward);\n\t\t} else {\n\t\t\titem.focus();\n\t\t}\n\t}\n}\n\nToolbar.define();\n\nexport default Toolbar;\nexport type {\n\tToolbarMinWidthChangeEventDetail,\n};\n"]}
|
|
@@ -15,6 +15,30 @@ declare class ToolbarItemBase extends UI5Element {
|
|
|
15
15
|
* @default "Default"
|
|
16
16
|
*/
|
|
17
17
|
overflowPriority: `${ToolbarItemOverflowBehavior}`;
|
|
18
|
+
/**
|
|
19
|
+
* Co-overflow tag. Items in the same `ui5-toolbar` whose `overflowGroup` is the same
|
|
20
|
+
* non-empty string overflow as one atomic unit: either all visible in the bar, or all
|
|
21
|
+
* in the overflow popover, never split. The empty string (the default) means "no group" —
|
|
22
|
+
* the item participates in overflow independently.
|
|
23
|
+
*
|
|
24
|
+
* The tag is a free-form, case-sensitive string label (e.g. `"filters"`, `"search"`). It is
|
|
25
|
+
* layout-only and carries no ARIA, keyboard, or visual-cluster semantics. Items in a
|
|
26
|
+
* non-empty group must have `overflowPriority = "Default"`; `AlwaysOverflow` and
|
|
27
|
+
* `NeverOverflow` are forbidden inside a group — setting one of those on a grouped item
|
|
28
|
+
* emits a one-shot `console.warn` and the item's priority is treated as `Default` for
|
|
29
|
+
* the layout pass. Spacers (`ui5-toolbar-spacer`) do not participate in grouping; setting
|
|
30
|
+
* a non-empty `overflowGroup` on a spacer emits a one-shot `console.warn` and the spacer's
|
|
31
|
+
* existing overflow behavior is unchanged.
|
|
32
|
+
*
|
|
33
|
+
* The visible bar always preserves slot order — ungrouped items between group members
|
|
34
|
+
* keep their slot positions and the toolbar never reorders DOM children. In the popover
|
|
35
|
+
* group members appear adjacent in slot order.
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
* @default undefined
|
|
39
|
+
* @since 2.27.0
|
|
40
|
+
*/
|
|
41
|
+
overflowGroup?: string;
|
|
18
42
|
/**
|
|
19
43
|
* Defines if the toolbar overflow popup should close upon interaction with the item.
|
|
20
44
|
* It will close by default.
|
|
@@ -31,6 +55,8 @@ declare class ToolbarItemBase extends UI5Element {
|
|
|
31
55
|
focusForToolbarNavigation(isForward: boolean): void;
|
|
32
56
|
getArrowNavState(): ToolbarArrowNavState | undefined;
|
|
33
57
|
_isOverflowed: boolean;
|
|
58
|
+
_overflowGroupPriorityWarned: boolean;
|
|
59
|
+
_overflowGroupSpacerWarned: boolean;
|
|
34
60
|
get isOverflowed(): boolean;
|
|
35
61
|
/**
|
|
36
62
|
* Defines if the toolbar item is overflowed.
|
|
@@ -42,6 +68,12 @@ declare class ToolbarItemBase extends UI5Element {
|
|
|
42
68
|
_maxWidth: number;
|
|
43
69
|
_isRendering: boolean;
|
|
44
70
|
onAfterRendering(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Emits one-time developer warnings for invalid `overflowGroup` configurations.
|
|
73
|
+
* Called once per render from `onAfterRendering` so getters stay pure.
|
|
74
|
+
* Each warning fires at most once per element lifetime via one-shot guards.
|
|
75
|
+
*/
|
|
76
|
+
validateOverflowGroupConstraints(): void;
|
|
45
77
|
/**
|
|
46
78
|
* Defines if the width of the item should be ignored in calculating the whole width of the toolbar
|
|
47
79
|
* @protected
|
|
@@ -74,6 +106,25 @@ declare class ToolbarItemBase extends UI5Element {
|
|
|
74
106
|
* @since 2.21.0
|
|
75
107
|
*/
|
|
76
108
|
get isSpacer(): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Returns the `overflowPriority` actually used by the toolbar's distribution
|
|
111
|
+
* algorithm. Items in a non-empty `overflowGroup` must have `Default` priority;
|
|
112
|
+
* when a developer puts `AlwaysOverflow` or `NeverOverflow` on a
|
|
113
|
+
* grouped non-spacer item, the priority is treated as `"Default"` for layout.
|
|
114
|
+
* Spacers are exempt from this rule and keep their declared priority.
|
|
115
|
+
*
|
|
116
|
+
* @protected
|
|
117
|
+
*/
|
|
118
|
+
get effectiveOverflowPriority(): `${ToolbarItemOverflowBehavior}`;
|
|
119
|
+
/**
|
|
120
|
+
* Returns the `overflowGroup` actually used by the toolbar's distribution
|
|
121
|
+
* algorithm. Spacers cannot participate in grouping; a spacer
|
|
122
|
+
* with a non-empty `overflowGroup` returns `""` so the spacer is treated
|
|
123
|
+
* as ungrouped by the algorithm.
|
|
124
|
+
*
|
|
125
|
+
* @protected
|
|
126
|
+
*/
|
|
127
|
+
get effectiveOverflowGroup(): string | undefined;
|
|
77
128
|
get stableDomRef(): string;
|
|
78
129
|
get classes(): {
|
|
79
130
|
root: {
|
package/dist/ToolbarItemBase.js
CHANGED
|
@@ -40,6 +40,10 @@ class ToolbarItemBase extends UI5Element {
|
|
|
40
40
|
*/
|
|
41
41
|
this.preventOverflowClosing = false;
|
|
42
42
|
this._isOverflowed = false;
|
|
43
|
+
// One-shot guards for `overflowGroup` validation warnings — suppress repeat
|
|
44
|
+
// warnings across re-renders, consistent with `ToolbarItem.checkForWrapper`.
|
|
45
|
+
this._overflowGroupPriorityWarned = false;
|
|
46
|
+
this._overflowGroupSpacerWarned = false;
|
|
43
47
|
this._maxWidth = 0;
|
|
44
48
|
this._isRendering = true;
|
|
45
49
|
}
|
|
@@ -79,6 +83,32 @@ class ToolbarItemBase extends UI5Element {
|
|
|
79
83
|
}
|
|
80
84
|
onAfterRendering() {
|
|
81
85
|
this._isRendering = false;
|
|
86
|
+
this.validateOverflowGroupConstraints();
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Emits one-time developer warnings for invalid `overflowGroup` configurations.
|
|
90
|
+
* Called once per render from `onAfterRendering` so getters stay pure.
|
|
91
|
+
* Each warning fires at most once per element lifetime via one-shot guards.
|
|
92
|
+
*/
|
|
93
|
+
validateOverflowGroupConstraints() {
|
|
94
|
+
if (!this.isSpacer
|
|
95
|
+
&& this.overflowGroup
|
|
96
|
+
&& (this.overflowPriority === "AlwaysOverflow" || this.overflowPriority === "NeverOverflow")) {
|
|
97
|
+
if (!this._overflowGroupPriorityWarned) {
|
|
98
|
+
this._overflowGroupPriorityWarned = true;
|
|
99
|
+
// eslint-disable-next-line no-console
|
|
100
|
+
console.warn(`[ui5-toolbar] ${this.tagName.toLowerCase()} has both overflow-group="${this.overflowGroup}" and overflow-priority="${this.overflowPriority}". `
|
|
101
|
+
+ `Items in a non-empty overflow-group must use overflow-priority="Default"; priority dropped to Default for layout.`, this);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (this.isSpacer && this.overflowGroup) {
|
|
105
|
+
if (!this._overflowGroupSpacerWarned) {
|
|
106
|
+
this._overflowGroupSpacerWarned = true;
|
|
107
|
+
// eslint-disable-next-line no-console
|
|
108
|
+
console.warn(`[ui5-toolbar] ${this.tagName.toLowerCase()} has overflow-group="${this.overflowGroup}". `
|
|
109
|
+
+ `Spacers cannot participate in an overflow-group; the group tag is ignored.`, this);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
82
112
|
}
|
|
83
113
|
/**
|
|
84
114
|
* Defines if the width of the item should be ignored in calculating the whole width of the toolbar
|
|
@@ -126,6 +156,38 @@ class ToolbarItemBase extends UI5Element {
|
|
|
126
156
|
get isSpacer() {
|
|
127
157
|
return false;
|
|
128
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* Returns the `overflowPriority` actually used by the toolbar's distribution
|
|
161
|
+
* algorithm. Items in a non-empty `overflowGroup` must have `Default` priority;
|
|
162
|
+
* when a developer puts `AlwaysOverflow` or `NeverOverflow` on a
|
|
163
|
+
* grouped non-spacer item, the priority is treated as `"Default"` for layout.
|
|
164
|
+
* Spacers are exempt from this rule and keep their declared priority.
|
|
165
|
+
*
|
|
166
|
+
* @protected
|
|
167
|
+
*/
|
|
168
|
+
get effectiveOverflowPriority() {
|
|
169
|
+
const declared = this.overflowPriority;
|
|
170
|
+
if (!this.isSpacer
|
|
171
|
+
&& this.overflowGroup
|
|
172
|
+
&& (declared === "AlwaysOverflow" || declared === "NeverOverflow")) {
|
|
173
|
+
return "Default";
|
|
174
|
+
}
|
|
175
|
+
return declared;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Returns the `overflowGroup` actually used by the toolbar's distribution
|
|
179
|
+
* algorithm. Spacers cannot participate in grouping; a spacer
|
|
180
|
+
* with a non-empty `overflowGroup` returns `""` so the spacer is treated
|
|
181
|
+
* as ungrouped by the algorithm.
|
|
182
|
+
*
|
|
183
|
+
* @protected
|
|
184
|
+
*/
|
|
185
|
+
get effectiveOverflowGroup() {
|
|
186
|
+
if (this.isSpacer && this.overflowGroup) {
|
|
187
|
+
return undefined;
|
|
188
|
+
}
|
|
189
|
+
return this.overflowGroup;
|
|
190
|
+
}
|
|
129
191
|
get stableDomRef() {
|
|
130
192
|
return this.getAttribute("stable-dom-ref") || `${this._id}-stable-dom-ref`;
|
|
131
193
|
}
|
|
@@ -144,6 +206,9 @@ class ToolbarItemBase extends UI5Element {
|
|
|
144
206
|
__decorate([
|
|
145
207
|
property()
|
|
146
208
|
], ToolbarItemBase.prototype, "overflowPriority", void 0);
|
|
209
|
+
__decorate([
|
|
210
|
+
property()
|
|
211
|
+
], ToolbarItemBase.prototype, "overflowGroup", void 0);
|
|
147
212
|
__decorate([
|
|
148
213
|
property({ type: Boolean })
|
|
149
214
|
], ToolbarItemBase.prototype, "preventOverflowClosing", void 0);
|