@openui5/sap.f 1.141.2 → 1.142.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/REUSE.toml +39 -1
- package/THIRDPARTY.txt +36 -3
- package/package.json +19 -4
- package/src/sap/f/.library +34 -3
- package/src/sap/f/Avatar.js +1 -1
- package/src/sap/f/AvatarGroup.js +1 -1
- package/src/sap/f/AvatarGroupItem.js +1 -1
- package/src/sap/f/CalendarAppointmentInCard.js +1 -1
- package/src/sap/f/CalendarInCard.js +1 -1
- package/src/sap/f/Card.js +1 -1
- package/src/sap/f/CardBase.js +1 -1
- package/src/sap/f/DynamicPage.js +30 -12
- package/src/sap/f/DynamicPageAccessibleLandmarkInfo.js +1 -1
- package/src/sap/f/DynamicPageHeader.js +1 -1
- package/src/sap/f/DynamicPageTitle.js +1 -1
- package/src/sap/f/FlexibleColumnLayout.js +1 -1
- package/src/sap/f/FlexibleColumnLayoutAccessibleLandmarkInfo.js +1 -1
- package/src/sap/f/FlexibleColumnLayoutData.js +1 -1
- package/src/sap/f/FlexibleColumnLayoutDataForDesktop.js +1 -1
- package/src/sap/f/FlexibleColumnLayoutDataForTablet.js +1 -1
- package/src/sap/f/FlexibleColumnLayoutRenderer.js +2 -0
- package/src/sap/f/FlexibleColumnLayoutSemanticHelper.js +1 -1
- package/src/sap/f/GridContainer.js +1 -1
- package/src/sap/f/GridContainerItemLayoutData.js +1 -1
- package/src/sap/f/GridContainerSettings.js +2 -2
- package/src/sap/f/GridList.js +1 -1
- package/src/sap/f/GridListItem.js +1 -1
- package/src/sap/f/IllustratedMessage.js +1 -1
- package/src/sap/f/Illustration.js +1 -1
- package/src/sap/f/PlanningCalendarInCardLegend.js +1 -1
- package/src/sap/f/ProductSwitch.js +1 -1
- package/src/sap/f/ProductSwitchItem.js +1 -1
- package/src/sap/f/SearchManager.js +1 -1
- package/src/sap/f/ShellBar.js +1 -1
- package/src/sap/f/SidePanel.js +1 -1
- package/src/sap/f/SidePanelItem.js +1 -1
- package/src/sap/f/cards/BaseHeader.js +1 -1
- package/src/sap/f/cards/Header.js +1 -1
- package/src/sap/f/cards/NumericHeader.js +1 -1
- package/src/sap/f/cards/NumericIndicators.js +1 -1
- package/src/sap/f/cards/NumericSideIndicator.js +1 -1
- package/src/sap/f/cards/loading/AnalyticalPlaceholder.js +1 -1
- package/src/sap/f/cards/loading/CalendarPlaceholder.js +1 -1
- package/src/sap/f/cards/loading/GenericPlaceholder.js +1 -1
- package/src/sap/f/cards/loading/ListPlaceholder.js +1 -1
- package/src/sap/f/cards/loading/ObjectPlaceholder.js +1 -1
- package/src/sap/f/cards/loading/PlaceholderBase.js +1 -1
- package/src/sap/f/cards/loading/TablePlaceholder.js +1 -1
- package/src/sap/f/cards/loading/TimelinePlaceholder.js +1 -1
- package/src/sap/f/changeHandler/MoveDynamicPageTitleActions.js +1 -1
- package/src/sap/f/delegate/GridContainerItemNavigation.js +1 -1
- package/src/sap/f/delegate/GridItemNavigation.js +1 -1
- package/src/sap/f/dnd/GridDragOver.js +1 -1
- package/src/sap/f/dnd/GridDropInfo.js +1 -1
- package/src/sap/f/gen/ui5/webcomponents/dist/Avatar.js +238 -0
- package/src/sap/f/gen/ui5/webcomponents/dist/Button.js +339 -0
- package/src/sap/f/gen/ui5/webcomponents/dist/Label.js +125 -0
- package/src/sap/f/gen/ui5/webcomponents/dist/ListItem.js +140 -0
- package/src/sap/f/gen/ui5/webcomponents/dist/ListItemBase.js +64 -0
- package/src/sap/f/gen/ui5/webcomponents/dist/ListItemGroup.js +207 -0
- package/src/sap/f/gen/ui5/webcomponents/dist/Menu.js +280 -0
- package/src/sap/f/gen/ui5/webcomponents/dist/MenuItem.js +347 -0
- package/src/sap/f/gen/ui5/webcomponents.js +2819 -0
- package/src/sap/f/gen/ui5/webcomponents_base.js +572 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/IllustratedMessage.js +211 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/NotificationList.js +204 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/NotificationListGroupItem.js +164 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/NotificationListItem.js +243 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/NotificationListItemBase.js +87 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/Search.js +248 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/SearchItem.js +125 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/SearchItemGroup.js +60 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/SearchItemShowMore.js +88 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/SearchMessageArea.js +76 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/SearchScope.js +81 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/ShellBar.js +655 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/ShellBarBranding.js +122 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/ShellBarItem.js +139 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/ShellBarSearch.js +232 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/ShellBarSpacer.js +74 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/UserMenu.js +279 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/UserMenuAccount.js +129 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori/dist/UserMenuItem.js +83 -0
- package/src/sap/f/gen/ui5/webcomponents_fiori.js +1648 -0
- package/src/sap/f/library.js +2 -2
- package/src/sap/f/semantic/AddAction.js +1 -1
- package/src/sap/f/semantic/CloseAction.js +1 -1
- package/src/sap/f/semantic/CopyAction.js +1 -1
- package/src/sap/f/semantic/DeleteAction.js +1 -1
- package/src/sap/f/semantic/DiscussInJamAction.js +1 -1
- package/src/sap/f/semantic/EditAction.js +1 -1
- package/src/sap/f/semantic/ExitFullScreenAction.js +1 -1
- package/src/sap/f/semantic/FavoriteAction.js +1 -1
- package/src/sap/f/semantic/FlagAction.js +1 -1
- package/src/sap/f/semantic/FooterMainAction.js +1 -1
- package/src/sap/f/semantic/FullScreenAction.js +1 -1
- package/src/sap/f/semantic/MainAction.js +1 -1
- package/src/sap/f/semantic/MessagesIndicator.js +1 -1
- package/src/sap/f/semantic/NegativeAction.js +1 -1
- package/src/sap/f/semantic/PositiveAction.js +1 -1
- package/src/sap/f/semantic/PrintAction.js +1 -1
- package/src/sap/f/semantic/SemanticButton.js +1 -1
- package/src/sap/f/semantic/SemanticConfiguration.js +1 -1
- package/src/sap/f/semantic/SemanticControl.js +1 -1
- package/src/sap/f/semantic/SemanticPage.js +1 -1
- package/src/sap/f/semantic/SemanticToggleButton.js +1 -1
- package/src/sap/f/semantic/SendEmailAction.js +1 -1
- package/src/sap/f/semantic/SendMessageAction.js +1 -1
- package/src/sap/f/semantic/ShareInJamAction.js +1 -1
- package/src/sap/f/semantic/TitleMainAction.js +1 -1
- package/src/sap/f/shellBar/AdditionalContentSupport.js +1 -1
- package/src/sap/f/shellBar/CoPilot.js +1 -1
- package/src/sap/f/shellBar/ControlSpacer.js +1 -1
- package/src/sap/f/shellBar/Search.js +1 -1
- package/src/sap/f/themes/base/Card.less +8 -2
- package/src/sap/f/themes/base/CardHeaders.less +25 -3
- package/src/sap/f/themes/base/DynamicPage.less +6 -1
- package/src/sap/f/thirdparty/AccessibilityTextsHelper.js +13 -0
- package/src/sap/f/thirdparty/Avatar.js +453 -0
- package/src/sap/f/thirdparty/BusyIndicator.js +233 -0
- package/src/sap/f/thirdparty/Button.js +7 -0
- package/src/sap/f/thirdparty/Button2.js +656 -0
- package/src/sap/f/thirdparty/FocusableElements.js +10 -0
- package/src/sap/f/thirdparty/Icon.js +313 -0
- package/src/sap/f/thirdparty/Icons.js +234 -0
- package/src/sap/f/thirdparty/IllustratedMessage.js +1297 -0
- package/src/sap/f/thirdparty/Label.js +115 -0
- package/src/sap/f/thirdparty/Link.js +316 -0
- package/src/sap/f/thirdparty/List.js +1253 -0
- package/src/sap/f/thirdparty/ListBoxItemGroupTemplate.js +14 -0
- package/src/sap/f/thirdparty/ListItemAdditionalText.css.js +10 -0
- package/src/sap/f/thirdparty/ListItemBase.js +251 -0
- package/src/sap/f/thirdparty/ListItemCustom.js +1689 -0
- package/src/sap/f/thirdparty/ListItemGroup.js +637 -0
- package/src/sap/f/thirdparty/Menu.js +389 -0
- package/src/sap/f/thirdparty/MenuItem.js +10 -0
- package/src/sap/f/thirdparty/MenuItem2.js +762 -0
- package/src/sap/f/thirdparty/NotificationList.js +291 -0
- package/src/sap/f/thirdparty/NotificationListGroupItem.js +310 -0
- package/src/sap/f/thirdparty/NotificationListItem.js +534 -0
- package/src/sap/f/thirdparty/NotificationListItemBase.js +98 -0
- package/src/sap/f/thirdparty/ResponsivePopover.js +2312 -0
- package/src/sap/f/thirdparty/SearchItem.css.js +10 -0
- package/src/sap/f/thirdparty/SearchItem.js +152 -0
- package/src/sap/f/thirdparty/SearchItemGroup.js +44 -0
- package/src/sap/f/thirdparty/SearchItemShowMore.js +86 -0
- package/src/sap/f/thirdparty/SearchMessageArea.js +49 -0
- package/src/sap/f/thirdparty/SearchScope.js +39 -0
- package/src/sap/f/thirdparty/ShellBar.js +1809 -0
- package/src/sap/f/thirdparty/ShellBarBranding.js +119 -0
- package/src/sap/f/thirdparty/ShellBarItem.js +89 -0
- package/src/sap/f/thirdparty/ShellBarSearch.js +7 -0
- package/src/sap/f/thirdparty/ShellBarSearch2.js +3453 -0
- package/src/sap/f/thirdparty/ShellBarSpacer.js +40 -0
- package/src/sap/f/thirdparty/Tag.js +302 -0
- package/src/sap/f/thirdparty/Text.js +127 -0
- package/src/sap/f/thirdparty/Title.js +167 -0
- package/src/sap/f/thirdparty/UserMenu.js +950 -0
- package/src/sap/f/thirdparty/UserMenuAccount.js +114 -0
- package/src/sap/f/thirdparty/UserMenuItem.js +61 -0
- package/src/sap/f/thirdparty/ValueState.js +7 -0
- package/src/sap/f/thirdparty/WrappingType.js +24 -0
- package/src/sap/f/thirdparty/_dynamics/InputComposition.js +35 -0
- package/src/sap/f/thirdparty/_dynamics/InputSuggestions.js +397 -0
- package/src/sap/f/thirdparty/_dynamics/ListItemStandardExpandableTextTemplate.js +193 -0
- package/src/sap/f/thirdparty/_dynamics/SAP-icons-TNT.js +585 -0
- package/src/sap/f/thirdparty/_dynamics/SAP-icons-TNT2.js +585 -0
- package/src/sap/f/thirdparty/_dynamics/SAP-icons-business-suite.js +1194 -0
- package/src/sap/f/thirdparty/_dynamics/SAP-icons-business-suite2.js +1194 -0
- package/src/sap/f/thirdparty/_dynamics/SAP-icons.js +2509 -0
- package/src/sap/f/thirdparty/_dynamics/SAP-icons2.js +2509 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_ar.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_ar2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_bg.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_bg2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_ca.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_ca2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_cnr.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_cnr2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_cs.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_cs2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_cy.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_cy2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_da.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_da2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_de.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_de2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_el.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_el2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_en.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_en2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_en_GB.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_en_GB2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_en_US_sappsd.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_en_US_sappsd2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_en_US_saprigi.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_en_US_saprigi2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_en_US_saptrc.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_en_US_saptrc2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_es.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_es2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_es_MX.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_es_MX2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_et.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_et2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_fi.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_fi2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_fr.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_fr2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_fr_CA.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_fr_CA2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_hi.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_hi2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_hr.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_hr2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_hu.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_hu2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_id.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_id2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_it.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_it2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_iw.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_iw2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_ja.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_ja2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_kk.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_kk2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_ko.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_ko2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_lt.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_lt2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_lv.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_lv2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_mk.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_mk2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_ms.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_ms2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_nl.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_nl2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_no.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_no2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_pl.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_pl2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_pt.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_pt2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_pt_PT.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_pt_PT2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_ro.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_ro2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_ru.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_ru2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_sh.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_sh2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_sk.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_sk2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_sl.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_sl2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_sr.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_sr2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_sv.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_sv2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_th.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_th2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_tr.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_tr2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_uk.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_uk2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_vi.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_vi2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_zh_CN.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_zh_CN2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_zh_TW.js +866 -0
- package/src/sap/f/thirdparty/_dynamics/messagebundle_zh_TW2.js +611 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css10.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css11.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css12.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css13.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css14.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css15.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css16.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css17.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css18.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css19.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css20.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css21.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css22.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css23.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css24.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css25.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css26.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css27.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css4.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css5.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css6.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css7.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css8.js +7 -0
- package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css9.js +7 -0
- package/src/sap/f/thirdparty/encodeXML.js +87 -0
- package/src/sap/f/thirdparty/event-strict.js +7 -0
- package/src/sap/f/thirdparty/generateHighlightedMarkup.js +9 -0
- package/src/sap/f/thirdparty/i18n-defaults.js +119 -0
- package/src/sap/f/thirdparty/i18n-defaults2.js +159 -0
- package/src/sap/f/thirdparty/information.js +100 -0
- package/src/sap/f/thirdparty/information2.js +13 -0
- package/src/sap/f/thirdparty/overflow.js +25 -0
- package/src/sap/f/thirdparty/parameters-bundle.css.js +11 -0
- package/src/sap/f/thirdparty/parameters-bundle.css2.js +44 -0
- package/src/sap/f/thirdparty/parameters-bundle.css3.js +8 -0
- package/src/sap/f/thirdparty/query.js +7 -0
- package/src/sap/f/thirdparty/slim-arrow-down.js +44 -0
- package/src/sap/f/thirdparty/sys-enter-2.js +7 -0
- package/src/sap/f/thirdparty/toLowercaseEnumValue.js +7 -0
- package/src/sap/f/thirdparty/ui5/webcomponents_icons/AllIcons.js +26 -0
- package/src/sap/f/thirdparty/ui5/webcomponents_icons_business_suite/AllIcons.js +26 -0
- package/src/sap/f/thirdparty/ui5/webcomponents_icons_tnt/AllIcons.js +26 -0
- package/src/sap/f/thirdparty/webcomponents-base.js +7 -0
- package/src/sap/f/thirdparty/webcomponents-fiori.js +5 -0
- package/src/sap/f/thirdparty/webcomponents.js +4611 -0
- package/src/sap/f/thirdparty/willShowContent.js +7 -0
- package/ui5-build.yaml +55 -0
- package/ui5.yaml +46 -0
|
@@ -0,0 +1,1809 @@
|
|
|
1
|
+
sap.ui.define(['require', 'sap/f/thirdparty/webcomponents', 'sap/f/thirdparty/Icons', 'sap/f/thirdparty/event-strict', 'sap/f/thirdparty/parameters-bundle.css', 'sap/f/thirdparty/parameters-bundle.css2', 'sap/f/thirdparty/AccessibilityTextsHelper', 'sap/f/thirdparty/ListItemBase', 'sap/f/thirdparty/ListItemCustom', 'sap/f/thirdparty/Icon', 'sap/f/thirdparty/WrappingType', 'sap/f/thirdparty/List', 'sap/f/thirdparty/ResponsivePopover', 'sap/f/thirdparty/Button2', 'sap/f/thirdparty/Tag', 'sap/f/thirdparty/Menu', 'sap/f/thirdparty/slim-arrow-down', 'sap/f/thirdparty/overflow', 'sap/f/thirdparty/parameters-bundle.css3', 'sap/f/thirdparty/i18n-defaults', 'sap/f/thirdparty/FocusableElements', 'sap/f/thirdparty/information', 'sap/f/thirdparty/i18n-defaults2', 'sap/f/thirdparty/ListItemAdditionalText.css', 'sap/f/thirdparty/ValueState', 'sap/f/thirdparty/Label', 'sap/f/thirdparty/toLowercaseEnumValue', 'sap/f/thirdparty/ListItemGroup', 'sap/f/thirdparty/BusyIndicator', 'sap/f/thirdparty/willShowContent', 'sap/f/thirdparty/Title', 'sap/f/thirdparty/MenuItem2'], (function (require, webcomponentsBase, Icons, eventStrict, parametersBundle_css$1, parametersBundle_css, AccessibilityTextsHelper, ListItemBase, ListItemCustom, Icon, WrappingType, List, ResponsivePopover, Button, Tag, Menu, slimArrowDown, overflow, parametersBundle_css$2, i18nDefaults, FocusableElements, information, i18nDefaults$1, ListItemAdditionalText_css, ValueState, Label, toLowercaseEnumValue, ListItemGroup, BusyIndicator, willShowContent, Title, MenuItem) { 'use strict';
|
|
2
|
+
|
|
3
|
+
const predefinedHooks = {
|
|
4
|
+
imageBegin,
|
|
5
|
+
iconBegin,
|
|
6
|
+
iconEnd,
|
|
7
|
+
listItemContent
|
|
8
|
+
};
|
|
9
|
+
function ListItemStandardTemplate(hooks) {
|
|
10
|
+
const currentHooks = { ...predefinedHooks, ...hooks };
|
|
11
|
+
return ListItemCustom.ListItemTemplate.call(this, currentHooks);
|
|
12
|
+
}
|
|
13
|
+
function listItemContent() {
|
|
14
|
+
return parametersBundle_css.jsxs(parametersBundle_css.Fragment, { children: [parametersBundle_css.jsxs("div", { class: "ui5-li-text-wrapper", children: [renderTitle.call(this), renderDescription.call(this), !this.typeActive && parametersBundle_css.jsx("span", { class: "ui5-hidden-text", children: this.type })] }), !this.description && renderAdditionalText.call(this)] });
|
|
15
|
+
}
|
|
16
|
+
function renderTitle() {
|
|
17
|
+
if (this.wrappingType === WrappingType.WrappingType.Normal) {
|
|
18
|
+
return this.expandableTextTemplate?.call(this, {
|
|
19
|
+
className: "ui5-li-title",
|
|
20
|
+
text: this._textContent,
|
|
21
|
+
maxCharacters: this._maxCharacters,
|
|
22
|
+
part: "title",
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return (parametersBundle_css.jsx("span", { part: "title", class: "ui5-li-title", children: this.text ? this.text : parametersBundle_css.jsx("slot", {}) }));
|
|
26
|
+
}
|
|
27
|
+
function renderDescription() {
|
|
28
|
+
if (!this.description) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
if (this.wrappingType === WrappingType.WrappingType.Normal) {
|
|
32
|
+
return (parametersBundle_css.jsxs("div", { class: "ui5-li-description-info-wrapper", children: [this.expandableTextTemplate?.call(this, {
|
|
33
|
+
className: "ui5-li-desc",
|
|
34
|
+
text: this.description,
|
|
35
|
+
maxCharacters: this._maxCharacters,
|
|
36
|
+
part: "description",
|
|
37
|
+
}), renderAdditionalText.call(this)] }));
|
|
38
|
+
}
|
|
39
|
+
return (parametersBundle_css.jsxs("div", { class: "ui5-li-description-info-wrapper", children: [parametersBundle_css.jsx("span", { part: "description", class: "ui5-li-desc", children: this.description }), renderAdditionalText.call(this)] }));
|
|
40
|
+
}
|
|
41
|
+
function renderAdditionalText() {
|
|
42
|
+
if (!this.additionalText) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
return parametersBundle_css.jsx("span", { part: "additional-text", class: "ui5-li-additional-text", children: this.additionalText });
|
|
46
|
+
}
|
|
47
|
+
function imageBegin() {
|
|
48
|
+
if (this.hasImage) {
|
|
49
|
+
return parametersBundle_css.jsx("div", { class: "ui5-li-image", children: parametersBundle_css.jsx("slot", { name: "image" }) });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function iconBegin() {
|
|
53
|
+
if (this.displayIconBegin) {
|
|
54
|
+
return parametersBundle_css.jsx(Icon.Icon, { part: "icon", name: this.icon, class: "ui5-li-icon", mode: "Decorative" });
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function iconEnd() {
|
|
58
|
+
if (this.displayIconEnd) {
|
|
59
|
+
return parametersBundle_css.jsx(Icon.Icon, { part: "icon", name: this.icon, class: "ui5-li-icon", mode: "Decorative" });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
var __decorate$2 = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
64
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
65
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
66
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
67
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
68
|
+
};
|
|
69
|
+
var ListItemStandard_1;
|
|
70
|
+
/**
|
|
71
|
+
* Maximum number of characters to display for small screens (Size S)
|
|
72
|
+
* @private
|
|
73
|
+
*/
|
|
74
|
+
const MAX_CHARACTERS_SIZE_S = 100;
|
|
75
|
+
/**
|
|
76
|
+
* Maximum number of characters to display for medium and larger screens (Size M and above)
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
const MAX_CHARACTERS_SIZE_M = 300;
|
|
80
|
+
/**
|
|
81
|
+
* @class
|
|
82
|
+
* The `ui5-li` represents the simplest type of item for a `ui5-list`.
|
|
83
|
+
*
|
|
84
|
+
* This is a list item,
|
|
85
|
+
* providing the most common use cases such as `text`,
|
|
86
|
+
* `image` and `icon`.
|
|
87
|
+
|
|
88
|
+
* @csspart title - Used to style the title of the list item
|
|
89
|
+
* @csspart description - Used to style the description of the list item
|
|
90
|
+
* @csspart additional-text - Used to style the additionalText of the list item
|
|
91
|
+
* @csspart icon - Used to style the icon of the list item
|
|
92
|
+
* @csspart native-li - Used to style the main li tag of the list item
|
|
93
|
+
* @csspart content - Used to style the content area of the list item
|
|
94
|
+
* @csspart detail-button - Used to style the button rendered when the list item is of type detail
|
|
95
|
+
* @csspart delete-button - Used to style the button rendered when the list item is in delete mode
|
|
96
|
+
* @csspart radio - Used to style the radio button rendered when the list item is in single selection mode
|
|
97
|
+
* @csspart checkbox - Used to style the checkbox rendered when the list item is in multiple selection mode
|
|
98
|
+
* @constructor
|
|
99
|
+
* @extends ListItem
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
102
|
+
let ListItemStandard = ListItemStandard_1 = class ListItemStandard extends ListItemCustom.ListItem {
|
|
103
|
+
constructor() {
|
|
104
|
+
super(...arguments);
|
|
105
|
+
/**
|
|
106
|
+
* Defines whether the `icon` should be displayed in the beginning of the list item or in the end.
|
|
107
|
+
*
|
|
108
|
+
* @default false
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
this.iconEnd = false;
|
|
112
|
+
/**
|
|
113
|
+
* Defines the state of the `additionalText`.
|
|
114
|
+
*
|
|
115
|
+
* Available options are: `"None"` (by default), `"Positive"`, `"Critical"`, `"Information"` and `"Negative"`.
|
|
116
|
+
* @default "None"
|
|
117
|
+
* @public
|
|
118
|
+
* @since 1.0.0-rc.15
|
|
119
|
+
*/
|
|
120
|
+
this.additionalTextState = "None";
|
|
121
|
+
/**
|
|
122
|
+
* Defines whether the item is movable.
|
|
123
|
+
* @default false
|
|
124
|
+
* @public
|
|
125
|
+
* @since 2.0.0
|
|
126
|
+
*/
|
|
127
|
+
this.movable = false;
|
|
128
|
+
/**
|
|
129
|
+
* Defines if the text of the component should wrap when it's too long.
|
|
130
|
+
* When set to "Normal", the content (title, description) will be wrapped
|
|
131
|
+
* using the `ui5-expandable-text` component.<br/>
|
|
132
|
+
*
|
|
133
|
+
* The text can wrap up to 100 characters on small screens (size S) and
|
|
134
|
+
* up to 300 characters on larger screens (size M and above). When text exceeds
|
|
135
|
+
* these limits, it truncates with an ellipsis followed by a text expansion trigger.
|
|
136
|
+
*
|
|
137
|
+
* Available options are:
|
|
138
|
+
* - `None` (default) - The text will truncate with an ellipsis.
|
|
139
|
+
* - `Normal` - The text will wrap (without truncation).
|
|
140
|
+
*
|
|
141
|
+
* @default "None"
|
|
142
|
+
* @public
|
|
143
|
+
* @since 2.10.0
|
|
144
|
+
*/
|
|
145
|
+
this.wrappingType = "None";
|
|
146
|
+
/**
|
|
147
|
+
* Indicates if the list item has text content.
|
|
148
|
+
* @private
|
|
149
|
+
*/
|
|
150
|
+
this.hasTitle = false;
|
|
151
|
+
this._hasImage = false;
|
|
152
|
+
}
|
|
153
|
+
onBeforeRendering() {
|
|
154
|
+
super.onBeforeRendering();
|
|
155
|
+
this.hasTitle = !!(this.text || this.textContent);
|
|
156
|
+
this._hasImage = this.hasImage;
|
|
157
|
+
// Only load ExpandableText if "Normal" wrapping is used
|
|
158
|
+
if (this.wrappingType === "Normal") {
|
|
159
|
+
// If feature is already loaded (preloaded by the user via importing ListItemStandardExpandableText.js), the template is already available
|
|
160
|
+
if (ListItemStandard_1.ExpandableTextTemplate) {
|
|
161
|
+
this.expandableTextTemplate = ListItemStandard_1.ExpandableTextTemplate;
|
|
162
|
+
// If feature is not preloaded, load the template dynamically
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
new Promise(function (resolve, reject) { require(['sap/f/thirdparty/_dynamics/ListItemStandardExpandableTextTemplate'], resolve, reject); }).then(module => {
|
|
166
|
+
this.expandableTextTemplate = module.default;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Returns the content text, either from text property or from the default slot
|
|
173
|
+
* @private
|
|
174
|
+
*/
|
|
175
|
+
get _textContent() {
|
|
176
|
+
return this.text || this.textContent || "";
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Determines the maximum characters to display based on the current media range.
|
|
180
|
+
* - Size S: 100 characters
|
|
181
|
+
* - Size M and larger: 300 characters
|
|
182
|
+
* @private
|
|
183
|
+
*/
|
|
184
|
+
get _maxCharacters() {
|
|
185
|
+
return this.mediaRange === "S" ? MAX_CHARACTERS_SIZE_S : MAX_CHARACTERS_SIZE_M;
|
|
186
|
+
}
|
|
187
|
+
get displayIconBegin() {
|
|
188
|
+
return !!(this.icon && !this.iconEnd);
|
|
189
|
+
}
|
|
190
|
+
get displayIconEnd() {
|
|
191
|
+
return !!(this.icon && this.iconEnd);
|
|
192
|
+
}
|
|
193
|
+
get hasImage() {
|
|
194
|
+
return !!this.image.length;
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
__decorate$2([
|
|
198
|
+
webcomponentsBase.s()
|
|
199
|
+
], ListItemStandard.prototype, "text", void 0);
|
|
200
|
+
__decorate$2([
|
|
201
|
+
webcomponentsBase.s()
|
|
202
|
+
], ListItemStandard.prototype, "description", void 0);
|
|
203
|
+
__decorate$2([
|
|
204
|
+
webcomponentsBase.s()
|
|
205
|
+
], ListItemStandard.prototype, "icon", void 0);
|
|
206
|
+
__decorate$2([
|
|
207
|
+
webcomponentsBase.s({ type: Boolean })
|
|
208
|
+
], ListItemStandard.prototype, "iconEnd", void 0);
|
|
209
|
+
__decorate$2([
|
|
210
|
+
webcomponentsBase.s()
|
|
211
|
+
], ListItemStandard.prototype, "additionalText", void 0);
|
|
212
|
+
__decorate$2([
|
|
213
|
+
webcomponentsBase.s()
|
|
214
|
+
], ListItemStandard.prototype, "additionalTextState", void 0);
|
|
215
|
+
__decorate$2([
|
|
216
|
+
webcomponentsBase.s({ type: Boolean })
|
|
217
|
+
], ListItemStandard.prototype, "movable", void 0);
|
|
218
|
+
__decorate$2([
|
|
219
|
+
webcomponentsBase.s()
|
|
220
|
+
], ListItemStandard.prototype, "accessibleName", void 0);
|
|
221
|
+
__decorate$2([
|
|
222
|
+
webcomponentsBase.s()
|
|
223
|
+
], ListItemStandard.prototype, "wrappingType", void 0);
|
|
224
|
+
__decorate$2([
|
|
225
|
+
webcomponentsBase.s({ type: Boolean })
|
|
226
|
+
], ListItemStandard.prototype, "hasTitle", void 0);
|
|
227
|
+
__decorate$2([
|
|
228
|
+
webcomponentsBase.s({ type: Boolean })
|
|
229
|
+
], ListItemStandard.prototype, "_hasImage", void 0);
|
|
230
|
+
__decorate$2([
|
|
231
|
+
webcomponentsBase.s({ noAttribute: true })
|
|
232
|
+
], ListItemStandard.prototype, "expandableTextTemplate", void 0);
|
|
233
|
+
__decorate$2([
|
|
234
|
+
webcomponentsBase.d({ type: Node, "default": true })
|
|
235
|
+
], ListItemStandard.prototype, "content", void 0);
|
|
236
|
+
__decorate$2([
|
|
237
|
+
webcomponentsBase.d()
|
|
238
|
+
], ListItemStandard.prototype, "image", void 0);
|
|
239
|
+
ListItemStandard = ListItemStandard_1 = __decorate$2([
|
|
240
|
+
webcomponentsBase.m({
|
|
241
|
+
tag: "ui5-li",
|
|
242
|
+
renderer: parametersBundle_css.y,
|
|
243
|
+
template: ListItemStandardTemplate,
|
|
244
|
+
})
|
|
245
|
+
], ListItemStandard);
|
|
246
|
+
ListItemStandard.define();
|
|
247
|
+
var ListItemStandard$1 = ListItemStandard;
|
|
248
|
+
|
|
249
|
+
function ButtonTemplate() {
|
|
250
|
+
return parametersBundle_css.jsx(Tag.Tag, { design: "Critical", "hide-state-icon": true, children: this.effectiveText });
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
Icons.p("@" + "ui5" + "/" + "webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
|
|
254
|
+
Icons.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => parametersBundle_css$1.defaultTheme);
|
|
255
|
+
var buttonBadgeCss = `[ui5-tag]::part(root){border:.0625rem solid var(--sapContent_BadgeBorderColor);background-color:var(--sapContent_BadgeBackground);color:var(--sapContent_BadgeTextColor);height:1rem;border-radius:.5rem;display:flex;align-items:center}:host([design="AttentionDot"]) [ui5-tag]::part(root){min-width:var(--_ui5-v2-15-0-button-badge-diameter);min-height:var(--_ui5-v2-15-0-button-badge-diameter);height:var(--_ui5-v2-15-0-button-badge-diameter);width:var(--_ui5-v2-15-0-button-badge-diameter);border-radius:100%}
|
|
256
|
+
`;
|
|
257
|
+
|
|
258
|
+
var __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
259
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
260
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
261
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
262
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
263
|
+
};
|
|
264
|
+
/**
|
|
265
|
+
* @class
|
|
266
|
+
*
|
|
267
|
+
* The `ui5-button-badge` component defines a badge that appears in the `ui5-button`.
|
|
268
|
+
*
|
|
269
|
+
* ### ES6 Module Import
|
|
270
|
+
*
|
|
271
|
+
* `import "@ui5/webcomponents/dist/ButtonBadge.js";`
|
|
272
|
+
* @constructor
|
|
273
|
+
* @extends UI5Element
|
|
274
|
+
* @since 2.7.0
|
|
275
|
+
* @public
|
|
276
|
+
*/
|
|
277
|
+
let ButtonBadge = class ButtonBadge extends webcomponentsBase.b {
|
|
278
|
+
constructor() {
|
|
279
|
+
super(...arguments);
|
|
280
|
+
/**
|
|
281
|
+
* Defines the badge placement and appearance.
|
|
282
|
+
* - **InlineText** - displayed inside the button after its text, and recommended for **compact** density.
|
|
283
|
+
* - **OverlayText** - displayed at the top-end corner of the button, and recommended for **cozy** density.
|
|
284
|
+
* - **AttentionDot** - displayed at the top-end corner of the button as a dot, and suitable for both **cozy** and **compact** densities.
|
|
285
|
+
* @since 2.7.0
|
|
286
|
+
* @public
|
|
287
|
+
*/
|
|
288
|
+
this.design = "AttentionDot";
|
|
289
|
+
/**
|
|
290
|
+
* Defines the text of the component.
|
|
291
|
+
*
|
|
292
|
+
* **Note:** Text is not applied when the `design` property is set to `AttentionDot`.
|
|
293
|
+
*
|
|
294
|
+
* **Note:** The badge component only accepts numeric values and the "+" symbol. Using other characters or formats may result in unpredictable behavior, which is not guaranteed or supported.
|
|
295
|
+
* @since 2.7.0
|
|
296
|
+
* @public
|
|
297
|
+
*/
|
|
298
|
+
this.text = "";
|
|
299
|
+
}
|
|
300
|
+
get effectiveText() {
|
|
301
|
+
return this.design === Button.ButtonBadgeDesign.AttentionDot ? "" : this.text;
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
__decorate$1([
|
|
305
|
+
webcomponentsBase.s()
|
|
306
|
+
], ButtonBadge.prototype, "design", void 0);
|
|
307
|
+
__decorate$1([
|
|
308
|
+
webcomponentsBase.s()
|
|
309
|
+
], ButtonBadge.prototype, "text", void 0);
|
|
310
|
+
ButtonBadge = __decorate$1([
|
|
311
|
+
webcomponentsBase.m({
|
|
312
|
+
tag: "ui5-button-badge",
|
|
313
|
+
renderer: parametersBundle_css.y,
|
|
314
|
+
template: ButtonTemplate,
|
|
315
|
+
styles: buttonBadgeCss,
|
|
316
|
+
})
|
|
317
|
+
], ButtonBadge);
|
|
318
|
+
ButtonBadge.define();
|
|
319
|
+
var ButtonBadge$1 = ButtonBadge;
|
|
320
|
+
|
|
321
|
+
const name$5 = "da";
|
|
322
|
+
const pathData$5 = "M36 163l220 305 221-306-89-130H137zm220 349q-8 0-13-7L3 172q-3-5-3-10t3-9L117 6q5-6 12-6h267q9 0 13 7l100 146q3 4 3 9t-3 10L269 505q-5 7-13 7zm120-326q-26 9-39.5 22.5T315 248q-3 8-11 8t-11-8q-8-26-21.5-39.5T232 186q-8-2-8-10t8-11q26-9 39.5-22.5T293 103q3-7 11-7t11 7q8 26 21.5 39.5T376 165q8 3 8 11 0 3-1.5 6t-6.5 4z";
|
|
323
|
+
const ltr$5 = true;
|
|
324
|
+
const collection$5 = "SAP-icons-v4";
|
|
325
|
+
const packageName$5 = "@ui5/webcomponents-icons";
|
|
326
|
+
|
|
327
|
+
Icons.y(name$5, { pathData: pathData$5, ltr: ltr$5, collection: collection$5, packageName: packageName$5 });
|
|
328
|
+
|
|
329
|
+
const name$4 = "da";
|
|
330
|
+
const pathData$4 = "M256.499 511.002q-12.975 0-20.959-10.979L5.988 180.647q-11.976-14.97 0-29.941L114.776 9.98Q122.76 0 134.736 0h255.502q14.97 0 20.959 10.979l95.813 140.725q9.98 14.97 0 28.943L277.458 500.023q-7.984 10.979-20.959 10.979zM57.887 166.674l198.612 275.462 198.612-276.46-77.848-114.775H147.712zm318.378 19.961q-25.95 7.985-39.423 21.459t-22.456 39.423q-1.996 7.984-9.98 7.984t-10.98-7.984q-8.982-25.95-22.455-39.423t-39.423-21.459q-7.985-2.994-7.985-10.978t7.985-10.979q25.95-7.984 39.423-21.957t22.456-39.922q2.994-7.984 10.978-7.984t9.981 7.984q8.982 25.95 22.456 39.922t39.423 21.957q7.985 2.995 7.985 10.979t-7.985 10.978z";
|
|
331
|
+
const ltr$4 = true;
|
|
332
|
+
const collection$4 = "SAP-icons-v5";
|
|
333
|
+
const packageName$4 = "@ui5/webcomponents-icons";
|
|
334
|
+
|
|
335
|
+
Icons.y(name$4, { pathData: pathData$4, ltr: ltr$4, collection: collection$4, packageName: packageName$4 });
|
|
336
|
+
|
|
337
|
+
var da = "da";
|
|
338
|
+
|
|
339
|
+
const name$3 = "bell";
|
|
340
|
+
const pathData$3 = "M32 416q0-7 15-21t31-40.5 25.5-67.5-1.5-101q-5-29 3-54.5t25-45 42-33T225 35q0-15 7-25t24-10q14 0 22.5 9t8.5 26q26 5 50 18t41 33 24.5 45.5T404 186q-12 60-1.5 101t27.5 67.5 33.5 40.5 16.5 21q0 14-9 23t-23 9H320q0 26-19 45t-45 19-45-19-19-45H64q-14 0-23-9t-9-23zm39 0h369q-10-11-25.5-30.5t-28-48.5-18-68 4.5-89q5-25-2.5-44T354 106q-19-23-42-32.5T256 64q-32 0-57.5 9.5T154 106q-10 11-18 30t-3 44q9 50 4 89t-16 68-25.5 48.5T71 416z";
|
|
341
|
+
const ltr$3 = false;
|
|
342
|
+
const collection$3 = "SAP-icons-v4";
|
|
343
|
+
const packageName$3 = "@ui5/webcomponents-icons";
|
|
344
|
+
|
|
345
|
+
Icons.y(name$3, { pathData: pathData$3, ltr: ltr$3, collection: collection$3, packageName: packageName$3 });
|
|
346
|
+
|
|
347
|
+
const name$2 = "bell";
|
|
348
|
+
const pathData$2 = "M475 374q5 7 5 16 0 11-7 18.5t-18 7.5H334q-5 27-27 45.5T256 480t-51-18.5-27-45.5H58q-11 0-18.5-7.5T32 390q0-10 6-16 1-1 8-9.5T61 341t14.5-35.5T82 260v-20q0-100 45-154t129-54 129.5 54T431 240v20q0 25 6.5 45.5T452 341t15 23.5 8 9.5zm-69-9q-11-20-19-46.5t-8-58.5v-20q0-32-5.5-60t-20-50-38-34.5T256 83t-59.5 12.5-38 34.5-20 50-5.5 60v20q0 32-8 58.5T106 365h300z";
|
|
349
|
+
const ltr$2 = false;
|
|
350
|
+
const collection$2 = "SAP-icons-v5";
|
|
351
|
+
const packageName$2 = "@ui5/webcomponents-icons";
|
|
352
|
+
|
|
353
|
+
Icons.y(name$2, { pathData: pathData$2, ltr: ltr$2, collection: collection$2, packageName: packageName$2 });
|
|
354
|
+
|
|
355
|
+
var bell = "bell";
|
|
356
|
+
|
|
357
|
+
const name$1 = "grid";
|
|
358
|
+
const pathData$1 = "M394 362h55q14 0 22.5 9t8.5 23v54q0 14-8.5 23t-22.5 9h-55q-14 0-22.5-9t-8.5-23v-54q0-14 8.5-23t22.5-9zM228 197h55q14 0 22.5 9t8.5 23v54q0 13-9 22.5t-22 9.5h-55q-13 0-22-9.5t-9-22.5v-54q0-14 8.5-23t22.5-9zm135-79V64q0-14 8.5-23t22.5-9h55q14 0 22.5 9t8.5 23v54q0 13-9 22.5t-22 9.5h-55q-13 0-22-9.5t-9-22.5zm31 79h55q14 0 22.5 9t8.5 23v54q0 13-9 22.5t-22 9.5h-55q-13 0-22-9.5t-9-22.5v-54q0-14 8.5-23t22.5-9zM63 32h55q14 0 22.5 9t8.5 23v54q0 13-9 22.5t-22 9.5H63q-13 0-22-9.5T32 118V64q0-14 8.5-23T63 32zM32 229q0-14 8.5-23t22.5-9h55q14 0 22.5 9t8.5 23v54q0 13-9 22.5t-22 9.5H63q-13 0-22-9.5T32 283v-54zm31 133h55q14 0 22.5 9t8.5 23v54q0 13-9 22.5t-22 9.5H63q-13 0-22-9.5T32 448v-54q0-14 8.5-23t22.5-9zM228 32h55q14 0 22.5 9t8.5 23v54q0 13-9 22.5t-22 9.5h-55q-13 0-22-9.5t-9-22.5V64q0-14 8.5-23t22.5-9zm-31 362q0-14 8.5-23t22.5-9h55q14 0 22.5 9t8.5 23v54q0 13-9 22.5t-22 9.5h-55q-13 0-22-9.5t-9-22.5v-54z";
|
|
359
|
+
const ltr$1 = false;
|
|
360
|
+
const collection$1 = "SAP-icons-v4";
|
|
361
|
+
const packageName$1 = "@ui5/webcomponents-icons";
|
|
362
|
+
|
|
363
|
+
Icons.y(name$1, { pathData: pathData$1, ltr: ltr$1, collection: collection$1, packageName: packageName$1 });
|
|
364
|
+
|
|
365
|
+
const name = "grid";
|
|
366
|
+
const pathData = "M80 128q-20 0-34-14T32 80t14-34 34-14 34 14 14 34-14 34-34 14zm176 0q-20 0-34-14t-14-34 14-34 34-14 34 14 14 34-14 34-34 14zm176 0q-20 0-34-14t-14-34 14-34 34-14 34 14 14 34-14 34-34 14zM80 208q20 0 34 14t14 34-14 34-34 14-34-14-14-34 14-34 34-14zm176 0q20 0 34 14t14 34-14 34-34 14-34-14-14-34 14-34 34-14zm176 0q20 0 34 14t14 34-14 34-34 14-34-14-14-34 14-34 34-14zM80 384q20 0 34 14t14 34-14 34-34 14-34-14-14-34 14-34 34-14zm176 0q20 0 34 14t14 34-14 34-34 14-34-14-14-34 14-34 34-14zm176 0q20 0 34 14t14 34-14 34-34 14-34-14-14-34 14-34 34-14z";
|
|
367
|
+
const ltr = false;
|
|
368
|
+
const collection = "SAP-icons-v5";
|
|
369
|
+
const packageName = "@ui5/webcomponents-icons";
|
|
370
|
+
|
|
371
|
+
Icons.y(name, { pathData, ltr, collection, packageName });
|
|
372
|
+
|
|
373
|
+
var grid = "grid";
|
|
374
|
+
|
|
375
|
+
function n(e,o){let t=null,l=null;return function(...u){if(l){t=u;return}e(...u),l=setTimeout(()=>{t&&(e(...t),t=null),l=null;},o);}}
|
|
376
|
+
|
|
377
|
+
function PopoversTemplate() {
|
|
378
|
+
return (parametersBundle_css.jsxs(parametersBundle_css.Fragment, { children: [parametersBundle_css.jsx(ResponsivePopover.Popover, { class: "ui5-shellbar-menu-popover", hideArrow: true, placement: "Bottom", preventInitialFocus: true, onBeforeOpen: this._menuPopoverBeforeOpen, onClose: this._menuPopoverAfterClose, children: parametersBundle_css.jsx(List.List, { separators: "None", selectionMode: "Single", onItemClick: this._menuItemPress, children: parametersBundle_css.jsx("slot", { name: "menuItems" }) }) }), parametersBundle_css.jsx(ResponsivePopover.Popover, { class: "ui5-shellbar-overflow-popover", placement: "Bottom", preventInitialFocus: true, horizontalAlign: this.popoverHorizontalAlign, hideArrow: true, onBeforeOpen: this._overflowPopoverBeforeOpen, onClose: this._overflowPopoverAfterClose, children: parametersBundle_css.jsx(List.List, { separators: "None", onItemClick: this._handleActionListClick, children: this._hiddenIcons.map((icon, index) => (parametersBundle_css.jsx(ListItemStandard$1, { "data-count": icon.count, "data-ui5-external-action-item-id": icon.refItemid, "data-ui5-stable": icon.stableDomRef, icon: icon.icon ? icon.icon : "", type: "Active", "onui5-_press": icon.press, tooltip: icon.tooltip, accessibilityAttributes: this.accInfo.search.accessibilityAttributes, children: icon.text }, index))) }) })] }));
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
function ShellBarTemplate() {
|
|
382
|
+
return (parametersBundle_css.jsxs(parametersBundle_css.Fragment, { children: [parametersBundle_css.jsxs("header", { class: this.classes.wrapper, "aria-label": this._shellbarText, onKeyDown: this._onKeyDown, part: "root", children: [parametersBundle_css.jsxs("div", { class: "ui5-shellbar-overflow-container ui5-shellbar-overflow-container-left", children: [this.startButton.length > 0 && parametersBundle_css.jsx("slot", { name: "startButton" }), this.hasBranding && (parametersBundle_css.jsx("slot", { name: "branding" })), this.hasMenuItems && !this.hasBranding && (parametersBundle_css.jsxs(parametersBundle_css.Fragment, { children: [!this.showLogoInMenuButton && this.hasLogo && singleLogo.call(this), this.showTitleInMenuButton && parametersBundle_css.jsx("h1", { class: "ui5-hidden-text", children: this.primaryTitle }), this.showMenuButton && (parametersBundle_css.jsx(parametersBundle_css.Fragment, { children: parametersBundle_css.jsxs("button", { class: {
|
|
383
|
+
"ui5-shellbar-menu-button": true,
|
|
384
|
+
...this.classes.button,
|
|
385
|
+
}, onClick: this._headerPress, "aria-haspopup": "menu", "aria-expanded": this._menuPopoverExpanded, "aria-label": this._brandingText, "data-ui5-stable": "menu", tabIndex: 0, children: [this.showLogoInMenuButton && (parametersBundle_css.jsx("span", { class: "ui5-shellbar-logo", "aria-label": this._logoText, title: this._logoText, children: parametersBundle_css.jsx("slot", { name: "logo" }) })), this.showTitleInMenuButton && (parametersBundle_css.jsx("div", { class: "ui5-shellbar-menu-button-title", children: this.primaryTitle })), parametersBundle_css.jsx(Icon.Icon, { class: "ui5-shellbar-menu-button-arrow", name: slimArrowDown.slimArrowDown })] }) }))] })), this.hasMenuItems && (
|
|
386
|
+
// The secondary title remains visible when both menu items and the branding slot are present,
|
|
387
|
+
// as the branding slot has higher priority and takes precedence in visibility.
|
|
388
|
+
parametersBundle_css.jsx(parametersBundle_css.Fragment, { children: this.secondaryTitle && !this.isSBreakPoint && (parametersBundle_css.jsx("div", { style: { display: "block" }, class: "ui5-shellbar-secondary-title", "data-ui5-stable": "secondary-title", children: this.secondaryTitle })) })), !this.hasMenuItems && (parametersBundle_css.jsxs(parametersBundle_css.Fragment, { children: [this.isSBreakPoint && this.hasLogo && !this.hasBranding && singleLogo.call(this), !this.isSBreakPoint && (this.hasLogo || this.primaryTitle) && (parametersBundle_css.jsxs(parametersBundle_css.Fragment, { children: [!this.hasBranding && combinedLogo.call(this), this.secondaryTitle && (this.primaryTitle || this.hasBranding) && (parametersBundle_css.jsx("h2", { class: "ui5-shellbar-secondary-title", "data-ui5-stable": "secondary-title", children: this.secondaryTitle }))] }))] }))] }), this.hasMidContent && (parametersBundle_css.jsx("div", { class: "ui5-shellbar-overflow-container ui5-shellbar-mid-content", children: parametersBundle_css.jsx("slot", { name: "midContent" }) })), parametersBundle_css.jsx("div", { class: "ui5-shellbar-overflow-container ui5-shellbar-overflow-container-right", children: parametersBundle_css.jsxs("div", { class: "ui5-shellbar-overflow-container-right-inner", children: [this.hasContentItems && (parametersBundle_css.jsxs("div", { class: "ui5-shellbar-content-items", role: this._contentItemsRole, "aria-label": this._contentItemsText, children: [this.showStartSeparator && (parametersBundle_css.jsx("div", { class: {
|
|
389
|
+
"ui5-shellbar-separator": true,
|
|
390
|
+
"ui5-shellbar-separator-start": true,
|
|
391
|
+
} })), this.startContent.map(item => {
|
|
392
|
+
const itemInfo = this._contentInfo.find(info => info.id === item._individualSlot);
|
|
393
|
+
return (parametersBundle_css.jsxs("div", { id: item._individualSlot, class: itemInfo?.classes, children: [this.shouldIncludeSeparator(itemInfo, this.startContentInfoSorted) && (
|
|
394
|
+
// never displayed, only "packed" with last item that was hidden, used for measurement purposes
|
|
395
|
+
parametersBundle_css.jsx("div", { class: {
|
|
396
|
+
"ui5-shellbar-separator": true,
|
|
397
|
+
"ui5-shellbar-separator-start": true,
|
|
398
|
+
} })), parametersBundle_css.jsx("slot", { name: item._individualSlot })] }, item._individualSlot));
|
|
399
|
+
}), parametersBundle_css.jsx("div", { class: "ui5-shellbar-spacer" }), this.endContent.map(item => {
|
|
400
|
+
const itemInfo = this._contentInfo.find(info => info.id === item._individualSlot);
|
|
401
|
+
return (parametersBundle_css.jsxs("div", { id: item._individualSlot, class: itemInfo?.classes, children: [parametersBundle_css.jsx("slot", { name: item._individualSlot }), this.shouldIncludeSeparator(itemInfo, this.endContentInfoSorted) && (
|
|
402
|
+
// never displayed, only "packed" with last item that was hidden, used for measurement purposes
|
|
403
|
+
parametersBundle_css.jsx("div", { class: {
|
|
404
|
+
"ui5-shellbar-separator": true,
|
|
405
|
+
"ui5-shellbar-separator-end": true,
|
|
406
|
+
} }))] }, item._individualSlot));
|
|
407
|
+
}), this.showEndSeparator && (parametersBundle_css.jsx("div", { class: {
|
|
408
|
+
"ui5-shellbar-separator": true,
|
|
409
|
+
"ui5-shellbar-separator-end": true,
|
|
410
|
+
} }))] })), !this.hasContentItems && parametersBundle_css.jsx("div", { class: "ui5-shellbar-spacer" }), parametersBundle_css.jsxs("div", { class: "ui5-shellbar-overflow-container-right-child", role: this._rightChildRole, children: [this.hasSearchField && (parametersBundle_css.jsxs(parametersBundle_css.Fragment, { children: [this.showFullWidthSearch && (parametersBundle_css.jsxs("div", { class: "ui5-shellbar-search-full-width-wrapper", style: this.styles.searchField, children: [parametersBundle_css.jsx("div", { class: "ui5-shellbar-search-full-field", children: parametersBundle_css.jsx("slot", { name: "searchField" }) }), parametersBundle_css.jsx(Button.Button, { onClick: this._handleCancelButtonPress, class: "ui5-shellbar-button ui5-shellbar-cancel-button", "data-ui5-stable": "cancel-search", children: this._cancelBtnText })] })), parametersBundle_css.jsx("div", { id: this.hasSelfCollapsibleSearch ? `${this._id}-item-1` : undefined, class: this.classes.searchField, style: this.styles.searchField, children: parametersBundle_css.jsx("slot", { name: "searchField" }) }), !(this.hasSelfCollapsibleSearch || this.hideSearchButton) && (parametersBundle_css.jsx(Button.Button, { id: `${this._id}-item-1`, class: {
|
|
411
|
+
"ui5-shellbar-button": true,
|
|
412
|
+
"ui5-shellbar-search-button": true,
|
|
413
|
+
"ui5-shellbar-search-item-for-arrow-nav": true,
|
|
414
|
+
...this.classes.search,
|
|
415
|
+
}, icon: "sap-icon://search", "data-ui5-text": "Search", "data-ui5-notifications-count": this.notificationsCount, "data-ui5-stable": "toggle-search", onClick: this._handleSearchIconPress, tooltip: this._searchBtnOpen, "aria-label": this._searchBtnOpen, "aria-expanded": this.showSearchField, accessibilityAttributes: this.accInfo.search.accessibilityAttributes }))] })), this.hasAssistant && (parametersBundle_css.jsx("div", { id: `${this._id}-assistant`, class: this.classes.assistant, children: parametersBundle_css.jsx("slot", { name: "assistant" }) })), this.showNotifications && (parametersBundle_css.jsx(Button.Button, { id: `${this._id}-item-2`, class: {
|
|
416
|
+
"ui5-shellbar-button": true,
|
|
417
|
+
"ui5-shellbar-bell-button": true,
|
|
418
|
+
"ui5-shellbar-items-for-arrow-nav": true,
|
|
419
|
+
...this.classes.notification,
|
|
420
|
+
}, icon: "sap-icon://bell", "data-ui5-text": "Notifications", onClick: this._handleNotificationsPress, tooltip: this._notificationsText, accessibilityAttributes: this.accInfo.notifications.accessibilityAttributes, "data-ui5-stable": "notifications", children: this.notificationsCount && (parametersBundle_css.jsx(ButtonBadge$1, { slot: "badge", design: "OverlayText", text: this.notificationsCount })) })), this.customItemsInfo.map(item => (parametersBundle_css.jsx(Button.Button, { id: item.id, class: `${item.classes} ui5-shellbar-items-for-arrow-nav`, icon: item.icon, tooltip: item.tooltip, "data-ui5-notifications-count": this.notificationsCount, "data-ui5-external-action-item-id": item.refItemid, "data-ui5-stable": item.icon && !this.isIconHidden(item.icon) ? item.stableDomRef : undefined, onClick: item.press, accessibilityAttributes: item.accessibilityAttributes, children: item.count && (parametersBundle_css.jsx(ButtonBadge$1, { slot: "badge", design: "OverlayText", text: item.count })) }, item.id)))] })] }) }), parametersBundle_css.jsx(Button.Button, { id: `${this._id}-item-5`, class: {
|
|
421
|
+
"ui5-shellbar-button": true,
|
|
422
|
+
"ui5-shellbar-overflow-button": true,
|
|
423
|
+
"ui5-shellbar-items-for-arrow-nav": true,
|
|
424
|
+
...this.classes.overflow,
|
|
425
|
+
}, icon: "sap-icon://overflow", onClick: this._handleOverflowPress, tooltip: this._overflowText, accessibilityAttributes: this.accInfo.overflow.accessibilityAttributes, "data-ui5-stable": "overflow", children: this._overflowNotifications && (parametersBundle_css.jsx(ButtonBadge$1, { slot: "badge", design: this._overflowNotifications === " " ? "AttentionDot" : "OverlayText", text: this._overflowNotifications === " " ? "" : this._overflowNotifications })) }), this.hasProfile && profileButton.call(this), this.showProductSwitch && (parametersBundle_css.jsx(Button.Button, { id: `${this._id}-item-4`, class: "ui5-shellbar-no-overflow-button ui5-shellbar-button ui5-shellbar-button-product-switch ui5-shellbar-items-for-arrow-nav", icon: "sap-icon://grid", "data-ui5-text": "Product Switch", onClick: this._handleProductSwitchPress, tooltip: this._productsText, "aria-label": this._productSwitchBtnText, "aria-haspopup": "dialog", "aria-expanded": this.accInfo.products.accessibilityAttributes.expanded, accessibilityAttributes: this.accInfo.products.accessibilityAttributes, "data-ui5-stable": "product-switch" }))] }), PopoversTemplate.call(this)] }));
|
|
426
|
+
}
|
|
427
|
+
function profileButton() {
|
|
428
|
+
return (parametersBundle_css.jsx(Button.Button, { "data-profile-btn": true, id: `${this._id}-item-3`, onClick: this._handleProfilePress, tooltip: this._profileText, class: "ui5-shellbar-button ui5-shellbar-image-button ui5-shellbar-no-overflow-button ui5-shellbar-items-for-arrow-nav", "aria-label": this.imageBtnText, "aria-haspopup": "dialog", accessibilityAttributes: this.accInfo.profile.accessibilityAttributes, "data-ui5-stable": "profile", children: parametersBundle_css.jsx("slot", { name: "profile" }) }));
|
|
429
|
+
}
|
|
430
|
+
function singleLogo() {
|
|
431
|
+
return (parametersBundle_css.jsx("span", { role: this.accLogoRole, class: "ui5-shellbar-logo", "aria-label": this._logoText, title: this._logoText, onClick: this._logoPress, onKeyDown: this._logoKeydown, onKeyUp: this._logoKeyup, tabIndex: 0, "data-ui5-stable": "logo", children: parametersBundle_css.jsx("slot", { name: "logo" }) }));
|
|
432
|
+
}
|
|
433
|
+
function combinedLogo() {
|
|
434
|
+
return (parametersBundle_css.jsxs("div", { role: this.accLogoRole, class: "ui5-shellbar-logo-area", onClick: this._logoPress, tabIndex: 0, onKeyDown: this._logoKeydown, onKeyUp: this._logoKeyup, "aria-label": this.accessibilityAttributes.branding?.name || this._logoAreaText, children: [this.hasLogo && (parametersBundle_css.jsx("span", { class: "ui5-shellbar-logo", title: this._logoText, "data-ui5-stable": "logo", children: parametersBundle_css.jsx("slot", { name: "logo" }) })), parametersBundle_css.jsx("div", { class: "ui5-shellbar-headings", children: this.primaryTitle && (parametersBundle_css.jsx("h1", { class: "ui5-shellbar-title", children: parametersBundle_css.jsx("bdi", { children: this.primaryTitle }) })) })] }));
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
Icons.p("@" + "ui5" + "/" + "webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
|
|
438
|
+
Icons.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s" + "-" + "f" + "i" + "o" + "r" + "i", "sap_horizon", async () => parametersBundle_css$2.defaultTheme);
|
|
439
|
+
var shellBarStyles = `.ui5-hidden-text{position:absolute;clip:rect(1px,1px,1px,1px);user-select:none;left:-1000px;top:-1000px;pointer-events:none;font-size:0}:host(:not([hidden])){display:inline-block;width:100%;max-width:100%;background:var(--sapShellColor);box-sizing:border-box}:host{--_ui5-v2-15-0_input_placeholder_color: var(--sapShell_InteractiveTextColor);--_ui5-v2-15-0_input_border_radius: var(--_ui5-v2-15-0_shellbar_input_border_radius);--_ui5-v2-15-0_input_focus_border_radius: var(--_ui5-v2-15-0_shellbar_input_focus_border_radius);--_ui5-v2-15-0_input_background_color: var(--_ui5-v2-15-0_shellbar_input_background_color);--_ui5-v2-15-0_input_focus_outline_color: var(--_ui5-v2-15-0_shellbar_input_focus_outline_color);--_ui5-v2-15-0_input_margin_top_bottom: 0;box-shadow:inset 0 -.0625rem 0 0 var(--sapPageHeader_BorderColor);--_ui5-v2-15-0_button_base_min_width: 2.25rem;--_ui5-v2-15-0_button_base_padding: .5625rem;--_ui5-v2-15-0_button_base_height: var(--sapElement_Height);--_ui5-v2-15-0-button-badge-diameter: .75rem}.ui5-shellbar-root{position:relative;display:flex;justify-content:space-between;align-items:center;height:var(--_ui5-v2-15-0_shellbar_root_height);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;box-sizing:border-box}.ui5-shellbar-menu-button,.ui5-shellbar-button,.ui5-shellbar-image-button,::slotted([ui5-toggle-button]:not([slot^="content"])),::slotted([ui5-button]:not([slot^="content"])){height:2.25rem;padding:0;margin-inline-start:var(--_ui5-v2-15-0-shellbar-overflow-button-margin);border:.0625rem solid var(--sapButton_Lite_BorderColor);background:var(--sapButton_Lite_Background);outline-color:var(--_ui5-v2-15-0_shellbar_logo_outline_color);color:var(--sapShell_TextColor);box-sizing:border-box;cursor:pointer;border-radius:var(--_ui5-v2-15-0_shellbar_button_border_radius);position:relative;font-weight:700;white-space:initial;overflow:initial;text-overflow:initial;line-height:inherit;letter-spacing:inherit;word-spacing:inherit}::slotted([ui5-toggle-button][slot="assistant"]){margin-inline-start:0}.ui5-shellbar-assistant-button{margin-inline-start:var(--_ui5-v2-15-0-shellbar-overflow-button-margin)}::slotted([ui5-button][slot="startButton"]){margin-inline-start:0}::slotted([ui5-toggle-button]:hover),::slotted([ui5-button]:hover),.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:hover,.ui5-shellbar-button:hover,.ui5-shellbar-image-button:hover,::slotted([ui5-button][slot="midContent"]:hover){background:var(--sapShell_Hover_Background);border-color:var(--sapButton_Lite_Hover_BorderColor);color:var(--sapShell_TextColor)}::slotted([ui5-toggle-button][slot="assistant"][pressed]),::slotted([ui5-toggle-button][slot="assistant"][pressed]:hover:not([active])){color:var(--sapShell_Assistant_ForegroundColor)}::slotted([ui5-toggle-button][active]),::slotted([ui5-button][active]),.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:active,.ui5-shellbar-button[active],.ui5-shellbar-image-button:active{background:var(--sapShell_Active_Background);border-color:var(--sapButton_Lite_Active_BorderColor);color:var(--_ui5-v2-15-0_shellbar_button_active_color)}:host([desktop]) .ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:focus,.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:focus-visible{outline:var(--_ui5-v2-15-0_shellbar_logo_outline);outline-offset:var(--_ui5-v2-15-0_shellbar_outline_offset)}slot[name=profile]{min-width:0}::slotted([ui5-avatar][slot="profile"]){display:block;width:2rem;height:2rem;min-width:0;min-height:2rem;font-size:var(--_ui5-v2-15-0_avatar_fontsize_XS);font-weight:400}.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive::-moz-focus-inner{border:none}.ui5-shellbar-menu-button-arrow,.ui5-shellbar-menu-button-title,.ui5-shellbar-title{display:inline-block;font-family:var(--sapFontSemiboldDuplexFamily);margin:0;font-size:var(--_ui5-v2-15-0_shellbar_menu_button_title_font_size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--sapShell_SubBrand_TextColor)}:host(:not([primary-title])) .ui5-shellbar-menu-button{min-width:2.25rem;justify-content:center}.ui5-shellbar-secondary-title{display:inline-block;font-size:var(--sapFontSmallSize);color:var(--sapShell_TextColor);font-weight:400;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin:0;text-align:start}.ui5-shellbar-headings{display:flex;flex-direction:column;justify-content:center;height:100%;overflow:hidden;margin-inline-start:.25rem}.ui5-shellbar-menu-button--interactive .ui5-shellbar-menu-button-arrow{margin-inline-start:.375rem}.ui5-shellbar-overflow-container{display:flex;justify-content:center;align-items:center;height:100%;overflow:hidden}.ui5-shellbar-overflow-container-middle{align-self:flex-start;height:var(--_ui5-v2-15-0_shellbar_overflow_container_middle_height);width:0;flex-shrink:0}.ui5-shellbar-mid-content{height:var(--_ui5-v2-15-0_shellbar_overflow_container_middle_height)}:host([breakpoint-size="S"]) .ui5-shellbar-menu-button{margin-inline-start:0}:host([breakpoint-size="S"]){padding:0 1rem}:host([breakpoint-size="S"]) .ui5-shellbar-search-full-width-wrapper{padding:0 1rem}:host([breakpoint-size="M"]){padding:0 2rem}:host([breakpoint-size="M"]) .ui5-shellbar-search-full-width-wrapper{padding:0 2rem}:host([breakpoint-size="L"]){padding:0 2rem}:host([breakpoint-size="XL"]){padding:0 3rem}:host([breakpoint-size="XXL"]){padding:0 3rem}.ui5-shellbar-logo{overflow:hidden;cursor:pointer;max-height:2rem}.ui5-shellbar-logo-area{overflow:hidden;display:flex;align-items:center;padding:.25rem .5rem .25rem .25rem;box-sizing:border-box;cursor:pointer;background:var(--sapButton_Lite_Background);border:1px solid var(--sapButton_Lite_BorderColor);color:var(--sapShell_TextColor);margin-inline-start:.125rem}.ui5-shellbar-logo:focus,.ui5-shellbar-logo-area:focus{outline:var(--_ui5-v2-15-0_shellbar_logo_outline);border-radius:var(--_ui5-v2-15-0_shellbar_logo_border_radius)}.ui5-shellbar-overflow-container>.ui5-shellbar-logo:hover,.ui5-shellbar-logo-area:hover{box-shadow:var(--_ui5-v2-15-0_shellbar_button_box_shadow);border-radius:var(--_ui5-v2-15-0_shellbar_logo_border_radius)}.ui5-shellbar-logo-area:active:focus{background:var(--sapShell_Active_Background);border:1px solid var(--sapButton_Lite_Active_BorderColor);color:var(--sapShell_Active_TextColor)}.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:hover{box-shadow:var(--_ui5-v2-15-0_shellbar_button_box_shadow)}.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:active{box-shadow:var(--_ui5-v2-15-0_shellbar_button_box_shadow_active)}.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:active .ui5-shellbar-menu-button-arrow,.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:active .ui5-shellbar-menu-button-title{color:var(--sapShell_Active_TextColor)}.ui5-shellbar-menu-button .ui5-shellbar-logo:hover{box-shadow:none}.ui5-shellbar-button{width:2.5rem;box-sizing:border-box}.ui5-shellbar-button,::slotted([ui5-button][slot="startButton"]){--_ui5-v2-15-0_button_focused_border: var(--_ui5-v2-15-0_shellbar_button_focused_border)}.ui5-shellbar-cancel-button,.ui5-shellbar-cancel-button:hover{color:var(--_ui5-v2-15-0-shellbar_cancel-button-color)}.ui5-shellbar-image-button{display:flex;justify-content:center;align-items:center;min-width:auto;height:2.5rem;--_ui5-v2-15-0_button_focused_border_radius: var(--_ui5-v2-15-0_shellbar_image_button_border_radius);border-radius:var(--_ui5-v2-15-0_shellbar_image_button_border_radius)}.ui5-shellbar-overflow-container-left{padding:0;justify-content:flex-start;max-width:75%;flex-shrink:0}.ui5-shellbar-overflow-container-left>:nth-child(n){margin-inline-end:.5rem}.ui5-shellbar-menu-button{white-space:nowrap;overflow:hidden;display:flex;align-items:center;padding:.25rem .5rem;cursor:text;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive{-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;background:var(--sapButton_Lite_Background);border:var(--_ui5-v2-15-0_shellbar_button_border);color:var(--sapShell_TextColor)}:host(:not([with-logo])) .ui5-shellbar-menu-button{margin-inline-start:0}.ui5-shellbar-overflow-container-right{flex-grow:1;justify-content:flex-end}.ui5-shellbar-overflow-container-right .ui5-shellbar-overflow-container-right-child{display:flex;justify-content:flex-end;height:inherit;align-items:center}.ui5-shellbar-overflow-container-right-inner{display:flex;flex-grow:1}.ui5-shellbar-content-items{display:flex;justify-content:center;align-items:center;flex-grow:1;min-width:max-content}.ui5-shellbar-spacer{flex-grow:1;height:1px;flex-basis:1rem;flex-shrink:1}.ui5-shellbar-separator{flex-grow:0;flex-shrink:0;height:var(--_ui5-v2-15-0-shellbar-separator-height);width:1px;background-color:var(--_ui5-v2-15-0-shellbar_separator-color)}.ui5-shellbar-separator-end{margin-inline-start:.5rem}:host([breakpoint-size="S"]) .ui5-shellbar-overflow-container-right{padding-inline-start:0}::slotted([hidden]){visibility:hidden;order:-1;position:absolute}.ui5-shellbar-content-item{display:flex;align-items:center;flex-shrink:0;padding-inline-start:var(--_ui5-v2-15-0-shellbar-content-margin-start)}.ui5-shellbar-overflow-container-right-child .ui5-shellbar-bell-button [slot=badge],.ui5-shellbar-overflow-container-right-child .ui5-shellbar-custom-item [slot=badge]{inset-inline-end:var(--_ui5-v2-15-0-shellbar-notification-btn-count-offset)}.ui5-shellbar-menu-button{margin-inline-start:.5rem}.ui5-shellbar-search-field{padding-inline-start:var(--_ui5-v2-15-0-shellbar-content-margin-start);min-width:var(--_ui5-v2-15-0_shellbar_search_field_width);align-items:center;flex-grow:1;margin-inline-start:.5rem}.ui5-shellbar-overflow-container-right-child>:first-child{margin-inline-start:0}.ui5-shellbar-search-full-width-wrapper .ui5-shellbar-search-full-field{height:2.25rem;width:100%}.ui5-shellbar-search-full-width-wrapper{position:absolute;bottom:.0625rem;left:0;background:var(--sapShellColor);height:100%;width:100%;z-index:1001;display:flex;align-items:center;box-sizing:border-box}.ui5-shellbar-search-full-width-wrapper .ui5-shellbar-button{width:auto}.ui5-shellbar-search-full-width-wrapper ::slotted([ui5-shellbar-search]){max-width:unset}::slotted([ui5-input]){background:var(--_ui5-v2-15-0_shellbar_search_field_background);border:var(--_ui5-v2-15-0_shellbar_search_field_border);box-shadow:var(--_ui5-v2-15-0_shellbar_search_field_box_shadow);color:var(--_ui5-v2-15-0_shellbar_search_field_color);height:2.25rem;width:100%;min-width:var(--_ui5-v2-15-0_shellbar_search_field_width)}:host([breakpoint-size="M"]) ::slotted([ui5-input]),:host([breakpoint-size="S"]) ::slotted([ui5-input]){min-width:1rem}:host([breakpoint-size="M"][show-search-field]) .ui5-shellbar-overflow-container-right-child{flex-grow:1}::slotted([ui5-input]:hover){background:var(--_ui5-v2-15-0_shellbar_search_field_background_hover);box-shadow:var(--_ui5-v2-15-0_shellbar_search_field_box_shadow_hover)}::slotted([ui5-input][focused]){outline:var(--_ui5-v2-15-0_shellbar_search_field_outline_focused)}::slotted([slot="logo"]){max-height:2rem;pointer-events:none}.ui5-shellbar-co-pilot-placeholder{width:2.75rem;height:2.75rem}.ui5-shellbar-coPilot-pressed,.ui5-shellbar-coPilot-pressed:hover{color:var(--sapShell_Assistant_ForegroundColor)}::slotted([ui5-button][slot="startButton"]){margin-inline:0 .5rem;justify-content:center;align-items:center}::slotted([ui5-button][data-profile-btn]){width:auto}::slotted(.ui5-shellbar-hidden-button),.ui5-shellbar-hidden-button,.ui5-shellbar-invisible-button{visibility:hidden;order:-1;opacity:0;min-width:0;width:0;margin:0;padding:0;padding-inline-start:0;border:0;margin-inline-start:0}
|
|
440
|
+
`;
|
|
441
|
+
|
|
442
|
+
Icons.p("@" + "ui5" + "/" + "webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
|
|
443
|
+
Icons.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s" + "-" + "f" + "i" + "o" + "r" + "i", "sap_horizon", async () => parametersBundle_css$2.defaultTheme);
|
|
444
|
+
var ShellBarPopoverCss = `.ui5-shellbar-menu-popover::part(content),.ui5-shellbar-overflow-popover::part(content){padding:0}.ui5-shellbar-overflow-popover [ui5-li]::part(icon){color:var(--sapList_TextColor)}.ui5-shellbar-overflow-popover [ui5-li]::part(title){font-size:var(--sapFontSize)}.ui5-shellbar-overflow-popover [ui5-li]:after{position:relative;width:fit-content;height:1rem;min-width:1rem;background:var(--sapContent_BadgeBackground);border:var(--_ui5-v2-15-0_shellbar_button_badge_border);color:var(--sapContent_BadgeTextColor);bottom:calc(100% + .0625rem);left:1.25rem;padding:0 .3125rem;border-radius:.5rem;display:flex;justify-content:center;align-items:center;font-size:var(--sapFontSmallSize);font-family:var(--sapFontFamily);z-index:2;box-sizing:border-box;pointer-events:none}.ui5-shellbar-overflow-popover [ui5-li][data-count]:after{content:attr(data-count)}
|
|
445
|
+
`;
|
|
446
|
+
|
|
447
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
448
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
449
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
450
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
451
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
452
|
+
};
|
|
453
|
+
var ShellBar_1;
|
|
454
|
+
const RESIZE_THROTTLE_RATE = 200; // ms
|
|
455
|
+
// actions always visible in lean mode, order is important
|
|
456
|
+
const PREDEFINED_PLACE_ACTIONS = ["feedback", "sys-help"];
|
|
457
|
+
/**
|
|
458
|
+
* @class
|
|
459
|
+
* ### Overview
|
|
460
|
+
*
|
|
461
|
+
* The `ui5-shellbar` is meant to serve as an application header
|
|
462
|
+
* and includes numerous built-in features, such as: logo, profile image/icon, title, search field, notifications and so on.
|
|
463
|
+
*
|
|
464
|
+
* ### Stable DOM Refs
|
|
465
|
+
*
|
|
466
|
+
* You can use the following stable DOM refs for the `ui5-shellbar`:
|
|
467
|
+
*
|
|
468
|
+
* - logo
|
|
469
|
+
* - notifications
|
|
470
|
+
* - overflow
|
|
471
|
+
* - profile
|
|
472
|
+
* - product-switch
|
|
473
|
+
*
|
|
474
|
+
* ### Keyboard Handling
|
|
475
|
+
*
|
|
476
|
+
* #### Fast Navigation
|
|
477
|
+
* This component provides a build in fast navigation group which can be used via [F6] / [Shift] + [F6] / [Ctrl] + [Alt/Option] / [Down] or [Ctrl] + [Alt/Option] + [Up].
|
|
478
|
+
* In order to use this functionality, you need to import the following module:
|
|
479
|
+
* `import "@ui5/webcomponents-base/dist/features/F6Navigation.js"`
|
|
480
|
+
*
|
|
481
|
+
* ### ES6 Module Import
|
|
482
|
+
* `import "@ui5/webcomponents-fiori/dist/ShellBar.js";`
|
|
483
|
+
* @csspart root - Used to style the outermost wrapper of the `ui5-shellbar`
|
|
484
|
+
* @constructor
|
|
485
|
+
* @extends UI5Element
|
|
486
|
+
* @public
|
|
487
|
+
* @since 0.8.0
|
|
488
|
+
*/
|
|
489
|
+
let ShellBar = ShellBar_1 = class ShellBar extends webcomponentsBase.b {
|
|
490
|
+
static get FIORI_3_BREAKPOINTS() {
|
|
491
|
+
return [
|
|
492
|
+
599,
|
|
493
|
+
1023,
|
|
494
|
+
1439,
|
|
495
|
+
1919,
|
|
496
|
+
10000,
|
|
497
|
+
];
|
|
498
|
+
}
|
|
499
|
+
static get FIORI_3_BREAKPOINTS_MAP() {
|
|
500
|
+
return {
|
|
501
|
+
"599": "S",
|
|
502
|
+
"1023": "M",
|
|
503
|
+
"1439": "L",
|
|
504
|
+
"1919": "XL",
|
|
505
|
+
"10000": "XXL",
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
constructor() {
|
|
509
|
+
super();
|
|
510
|
+
/**
|
|
511
|
+
* Defines the visibility state of the search button.
|
|
512
|
+
*
|
|
513
|
+
* **Note:** The `hideSearchButton` property is in an experimental state and is a subject to change.
|
|
514
|
+
* @default false
|
|
515
|
+
* @public
|
|
516
|
+
*/
|
|
517
|
+
this.hideSearchButton = false;
|
|
518
|
+
/**
|
|
519
|
+
* Disables the automatic search field expansion/collapse when the available space is not enough.
|
|
520
|
+
*
|
|
521
|
+
* **Note:** The `disableSearchCollapse` property is in an experimental state and is a subject to change.
|
|
522
|
+
* @default false
|
|
523
|
+
* @public
|
|
524
|
+
*/
|
|
525
|
+
this.disableSearchCollapse = false;
|
|
526
|
+
/**
|
|
527
|
+
* Defines, if the notification icon would be displayed.
|
|
528
|
+
* @default false
|
|
529
|
+
* @public
|
|
530
|
+
*/
|
|
531
|
+
this.showNotifications = false;
|
|
532
|
+
/**
|
|
533
|
+
* Defines, if the product switch icon would be displayed.
|
|
534
|
+
* @default false
|
|
535
|
+
* @public
|
|
536
|
+
*/
|
|
537
|
+
this.showProductSwitch = false;
|
|
538
|
+
/**
|
|
539
|
+
* Defines, if the Search Field would be displayed when there is a valid `searchField` slot.
|
|
540
|
+
*
|
|
541
|
+
* **Note:** By default the Search Field is not displayed.
|
|
542
|
+
* @default false
|
|
543
|
+
* @public
|
|
544
|
+
*/
|
|
545
|
+
this.showSearchField = false;
|
|
546
|
+
/**
|
|
547
|
+
* Defines additional accessibility attributes on different areas of the component.
|
|
548
|
+
*
|
|
549
|
+
* The accessibilityAttributes object has the following fields,
|
|
550
|
+
* where each field is an object supporting one or more accessibility attributes:
|
|
551
|
+
*
|
|
552
|
+
* - **logo** - `logo.role` and `logo.name`.
|
|
553
|
+
* - **notifications** - `notifications.expanded` and `notifications.hasPopup`.
|
|
554
|
+
* - **profile** - `profile.expanded`, `profile.hasPopup` and `profile.name`.
|
|
555
|
+
* - **product** - `product.expanded` and `product.hasPopup`.
|
|
556
|
+
* - **search** - `search.hasPopup`.
|
|
557
|
+
* - **overflow** - `overflow.expanded` and `overflow.hasPopup`.
|
|
558
|
+
* - **branding** - `branding.name`.
|
|
559
|
+
*
|
|
560
|
+
* The accessibility attributes support the following values:
|
|
561
|
+
*
|
|
562
|
+
* - **role**: Defines the accessible ARIA role of the logo area.
|
|
563
|
+
* Accepts the following string values: `button` or `link`.
|
|
564
|
+
*
|
|
565
|
+
* - **expanded**: Indicates whether the button, or another grouping element it controls,
|
|
566
|
+
* is currently expanded or collapsed.
|
|
567
|
+
* Accepts the following string values: `true` or `false`.
|
|
568
|
+
*
|
|
569
|
+
* - **hasPopup**: Indicates the availability and type of interactive popup element,
|
|
570
|
+
* such as menu or dialog, that can be triggered by the button.
|
|
571
|
+
*
|
|
572
|
+
* Accepts the following string values: `dialog`, `grid`, `listbox`, `menu` or `tree`.
|
|
573
|
+
* - **name**: Defines the accessible ARIA name of the area.
|
|
574
|
+
* Accepts any string.
|
|
575
|
+
*
|
|
576
|
+
* @default {}
|
|
577
|
+
* @public
|
|
578
|
+
* @since 1.10.0
|
|
579
|
+
*/
|
|
580
|
+
this.accessibilityAttributes = {};
|
|
581
|
+
/**
|
|
582
|
+
* @private
|
|
583
|
+
*/
|
|
584
|
+
this.breakpointSize = "S";
|
|
585
|
+
/**
|
|
586
|
+
* @private
|
|
587
|
+
*/
|
|
588
|
+
this.withLogo = false;
|
|
589
|
+
this._itemsInfo = [];
|
|
590
|
+
this._contentInfo = [];
|
|
591
|
+
this._menuPopoverExpanded = false;
|
|
592
|
+
this._overflowPopoverExpanded = false;
|
|
593
|
+
this.showFullWidthSearch = false;
|
|
594
|
+
this._cachedHiddenContent = [];
|
|
595
|
+
this._lastOffsetWidth = 0;
|
|
596
|
+
this._observableContent = [];
|
|
597
|
+
this._autoRestoreSearchField = false;
|
|
598
|
+
this._onSearchOpenBound = this._onSearchOpen.bind(this);
|
|
599
|
+
this._onSearchCloseBound = this._onSearchClose.bind(this);
|
|
600
|
+
this._onSearchBound = this._onSearch.bind(this);
|
|
601
|
+
this._hiddenIcons = [];
|
|
602
|
+
this._isInitialRendering = true;
|
|
603
|
+
this._overflowNotifications = null;
|
|
604
|
+
// marks if preventDefault() is called in item's press handler
|
|
605
|
+
this._defaultItemPressPrevented = false;
|
|
606
|
+
this.contentItemsObserver = new MutationObserver(() => {
|
|
607
|
+
this._handleActionsOverflow();
|
|
608
|
+
});
|
|
609
|
+
this._headerPress = () => {
|
|
610
|
+
if (this.hasMenuItems) {
|
|
611
|
+
const menuPopover = this._getMenuPopover();
|
|
612
|
+
menuPopover.opener = this.shadowRoot.querySelector(".ui5-shellbar-menu-button");
|
|
613
|
+
menuPopover.open = true;
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
this._handleResize = n(() => {
|
|
617
|
+
this.menuPopover = this._getMenuPopover();
|
|
618
|
+
this.overflowPopover = this._getOverflowPopover();
|
|
619
|
+
this.overflowPopover.open = false;
|
|
620
|
+
if (this._lastOffsetWidth !== this.offsetWidth) {
|
|
621
|
+
this._overflowActions();
|
|
622
|
+
if (this.autoSearchField) {
|
|
623
|
+
this._updateSearchFieldState();
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}, RESIZE_THROTTLE_RATE);
|
|
627
|
+
}
|
|
628
|
+
_onSearchOpen(e) {
|
|
629
|
+
if (e.target !== this.search) {
|
|
630
|
+
this._detachSearchFieldListeners(e.target);
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
if (Icons.d()) {
|
|
634
|
+
this.setSearchState(true);
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
_onSearchClose(e) {
|
|
638
|
+
if (e.target !== this.search) {
|
|
639
|
+
this._detachSearchFieldListeners(e.target);
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
642
|
+
if (Icons.d()) {
|
|
643
|
+
this.setSearchState(false);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
_onSearch(e) {
|
|
647
|
+
if (e.target !== this.search) {
|
|
648
|
+
this._detachSearchFieldListeners(e.target);
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
651
|
+
// Decide when to toggle the search field:
|
|
652
|
+
// - On mobile, the search opens on its own (we don’t interfere).
|
|
653
|
+
// - If there’s already a value, onSearch is responsible for triggering the search (we don’t interfere)
|
|
654
|
+
// - If the field is closed, we must open it regardless.
|
|
655
|
+
if (Icons.d() || (this.search?.value && this.showSearchField)) {
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
this.setSearchState(!this.showSearchField);
|
|
659
|
+
}
|
|
660
|
+
_updateSearchFieldState() {
|
|
661
|
+
const spacerWidth = this.shadowRoot.querySelector(".ui5-shellbar-spacer") ? this.shadowRoot.querySelector(".ui5-shellbar-spacer").getBoundingClientRect().width : 0;
|
|
662
|
+
const searchFieldWidth = this.domCalculatedValues("--_ui5_shellbar_search_field_width");
|
|
663
|
+
if (this.showFullWidthSearch) {
|
|
664
|
+
this.setSearchState(true);
|
|
665
|
+
return;
|
|
666
|
+
}
|
|
667
|
+
if ((spacerWidth <= searchFieldWidth && this.contentItemsHidden.length !== 0) && this.showSearchField) {
|
|
668
|
+
this.setSearchState(false);
|
|
669
|
+
this._autoRestoreSearchField = true;
|
|
670
|
+
}
|
|
671
|
+
else if (spacerWidth > searchFieldWidth && this._autoRestoreSearchField) {
|
|
672
|
+
this.setSearchState(true);
|
|
673
|
+
this._autoRestoreSearchField = false;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
_onKeyDown(e) {
|
|
677
|
+
if (!webcomponentsBase.D(e) && !webcomponentsBase.R(e) && !webcomponentsBase.M(e) && !webcomponentsBase.n(e)) {
|
|
678
|
+
return;
|
|
679
|
+
}
|
|
680
|
+
const domRef = this.getDomRef();
|
|
681
|
+
if (!domRef) {
|
|
682
|
+
// If the component is not rendered yet, we should not handle the keydown event
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
685
|
+
const activeElement = webcomponentsBase.t();
|
|
686
|
+
if (!activeElement) {
|
|
687
|
+
return;
|
|
688
|
+
}
|
|
689
|
+
// Check if the active elements should "steal" the navigation
|
|
690
|
+
if (this._allowChildNavigation(activeElement, e)) {
|
|
691
|
+
return;
|
|
692
|
+
}
|
|
693
|
+
const items = ListItemBase.b(domRef).filter(el => this._isVisible(el));
|
|
694
|
+
const currentIndex = items.findIndex(el => el === activeElement);
|
|
695
|
+
// Only handle arrow navigation if the focus is on a ShellBar item
|
|
696
|
+
if (currentIndex !== -1) {
|
|
697
|
+
e.preventDefault();
|
|
698
|
+
// Focus navigation based on the key pressed
|
|
699
|
+
if (webcomponentsBase.D(e)) {
|
|
700
|
+
this._focusPreviousItem(items, currentIndex);
|
|
701
|
+
}
|
|
702
|
+
else if (webcomponentsBase.R(e)) {
|
|
703
|
+
this._focusNextItem(items, currentIndex);
|
|
704
|
+
}
|
|
705
|
+
else if (webcomponentsBase.M(e)) {
|
|
706
|
+
// Move focus to the first ShellBar item
|
|
707
|
+
items[0]?.focus();
|
|
708
|
+
}
|
|
709
|
+
else if (webcomponentsBase.n(e)) {
|
|
710
|
+
// Move focus to the last ShellBar item
|
|
711
|
+
items[items.length - 1]?.focus();
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
_allowChildNavigation(activeElement, e) {
|
|
716
|
+
if (activeElement.tagName === "INPUT" || activeElement.tagName === "TEXTAREA") {
|
|
717
|
+
return this._allowInputNavigation(activeElement, e);
|
|
718
|
+
}
|
|
719
|
+
return false; // Default to false for other elements
|
|
720
|
+
}
|
|
721
|
+
_allowInputNavigation(inputElement, e) {
|
|
722
|
+
const cursorPosition = inputElement.selectionStart || 0;
|
|
723
|
+
const textLength = inputElement.value.length;
|
|
724
|
+
// Allow internal navigation if cursor is not at the boundaries
|
|
725
|
+
if ((webcomponentsBase.D(e) && cursorPosition > 0)
|
|
726
|
+
|| (webcomponentsBase.R(e) && cursorPosition < textLength)) {
|
|
727
|
+
return true;
|
|
728
|
+
}
|
|
729
|
+
// Let ShellBar handle navigation if at boundaries
|
|
730
|
+
return false;
|
|
731
|
+
}
|
|
732
|
+
_focusNextItem(items, currentIndex) {
|
|
733
|
+
if (currentIndex < items.length - 1) {
|
|
734
|
+
(items[currentIndex + 1]).focus(); // Focus the next element
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
_focusPreviousItem(items, currentIndex) {
|
|
738
|
+
if (currentIndex > 0) {
|
|
739
|
+
(items[currentIndex - 1]).focus(); // Focus the previous element
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
_isVisible(element) {
|
|
743
|
+
const style = getComputedStyle(element);
|
|
744
|
+
return style.display !== "none" && style.visibility !== "hidden" && element.offsetWidth > 0 && element.offsetHeight > 0;
|
|
745
|
+
}
|
|
746
|
+
_getRightChildItems() {
|
|
747
|
+
return [
|
|
748
|
+
...this.searchField,
|
|
749
|
+
...this.shadowRoot.querySelectorAll(".ui5-shellbar-search-item-for-arrow-nav"),
|
|
750
|
+
...this.assistant,
|
|
751
|
+
...this.shadowRoot.querySelectorAll(".ui5-shellbar-items-for-arrow-nav"),
|
|
752
|
+
];
|
|
753
|
+
}
|
|
754
|
+
_menuItemPress(e) {
|
|
755
|
+
const shouldContinue = this.fireDecoratorEvent("menu-item-click", {
|
|
756
|
+
item: e.detail.item,
|
|
757
|
+
});
|
|
758
|
+
if (shouldContinue) {
|
|
759
|
+
this.menuPopover.open = false;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
_logoPress() {
|
|
763
|
+
this.fireDecoratorEvent("logo-click", {
|
|
764
|
+
targetRef: this.shadowRoot.querySelector(".ui5-shellbar-logo"),
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
_menuPopoverBeforeOpen() {
|
|
768
|
+
this._menuPopoverExpanded = true;
|
|
769
|
+
if (this.menuPopover.content && this.menuPopover.content.length) {
|
|
770
|
+
this.menuPopover.content[0].focusFirstItem();
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
_menuPopoverAfterClose() {
|
|
774
|
+
this._menuPopoverExpanded = false;
|
|
775
|
+
}
|
|
776
|
+
_overflowPopoverBeforeOpen() {
|
|
777
|
+
this._overflowPopoverExpanded = true;
|
|
778
|
+
if (this.overflowPopover.content && this.overflowPopover.content.length) {
|
|
779
|
+
this.overflowPopover.content[0].focusFirstItem();
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
_overflowPopoverAfterClose() {
|
|
783
|
+
this._overflowPopoverExpanded = false;
|
|
784
|
+
}
|
|
785
|
+
_logoKeyup(e) {
|
|
786
|
+
if (webcomponentsBase.A(e)) {
|
|
787
|
+
this._logoPress();
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
_logoKeydown(e) {
|
|
791
|
+
if (webcomponentsBase.A(e)) {
|
|
792
|
+
e.preventDefault();
|
|
793
|
+
return;
|
|
794
|
+
}
|
|
795
|
+
if (webcomponentsBase.b$1(e)) {
|
|
796
|
+
this._logoPress();
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
_calculateCSSREMValue(styleSet, propertyName) {
|
|
800
|
+
return Number(styleSet.getPropertyValue(propertyName).replace("rem", "")) * parseInt(getComputedStyle(document.body).getPropertyValue("font-size"));
|
|
801
|
+
}
|
|
802
|
+
domCalculatedValues(cssVar) {
|
|
803
|
+
const shellbarComputerStyle = getComputedStyle(this.getDomRef());
|
|
804
|
+
return this._calculateCSSREMValue(shellbarComputerStyle, Icons.d$1(cssVar)); // px
|
|
805
|
+
}
|
|
806
|
+
onBeforeRendering() {
|
|
807
|
+
this.withLogo = this.hasLogo;
|
|
808
|
+
this._hiddenIcons = this._itemsInfo.filter(info => {
|
|
809
|
+
const isHidden = (info.classes.indexOf("ui5-shellbar-hidden-button") !== -1);
|
|
810
|
+
const isSet = info.classes.indexOf("ui5-shellbar-invisible-button") === -1;
|
|
811
|
+
const isOverflowIcon = info.classes.indexOf("ui5-shellbar-overflow-button") !== -1;
|
|
812
|
+
const isImageIcon = info.classes.indexOf("ui5-shellbar-image-button") !== -1;
|
|
813
|
+
const shouldStayOnScreen = isOverflowIcon || (isImageIcon && this.hasProfile);
|
|
814
|
+
return isHidden && isSet && !shouldStayOnScreen;
|
|
815
|
+
});
|
|
816
|
+
this._observeContentItems();
|
|
817
|
+
// search field shouldn't be expanded initially in full width mode
|
|
818
|
+
if (this.showFullWidthSearch && this._isInitialRendering) {
|
|
819
|
+
this.setSearchState(false);
|
|
820
|
+
this._autoRestoreSearchField = true;
|
|
821
|
+
}
|
|
822
|
+
if (isSelfCollapsibleSearch(this.search)) {
|
|
823
|
+
if (Icons.d()) {
|
|
824
|
+
this.search.open = this.showSearchField;
|
|
825
|
+
}
|
|
826
|
+
else {
|
|
827
|
+
this.search.collapsed = !this.showSearchField;
|
|
828
|
+
}
|
|
829
|
+
this._detachSearchFieldListeners(this.search);
|
|
830
|
+
this._attachSearchFieldListeners(this.search);
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* Use this method to change the state of the search filed according to internal logic.
|
|
835
|
+
* An event is fired to notify the change.
|
|
836
|
+
*/
|
|
837
|
+
async setSearchState(expanded) {
|
|
838
|
+
if (expanded === this.showSearchField) {
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
this.showSearchField = expanded;
|
|
842
|
+
await Icons.f$1();
|
|
843
|
+
this.fireDecoratorEvent("search-field-toggle", { expanded });
|
|
844
|
+
}
|
|
845
|
+
onAfterRendering() {
|
|
846
|
+
this._lastOffsetWidth = this.offsetWidth;
|
|
847
|
+
this._overflowActions();
|
|
848
|
+
this.onInitialRendering();
|
|
849
|
+
}
|
|
850
|
+
async onInitialRendering() {
|
|
851
|
+
if (this._isInitialRendering) {
|
|
852
|
+
await Icons.f$1();
|
|
853
|
+
if (this.autoSearchField) {
|
|
854
|
+
this._updateSearchFieldState();
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
this._isInitialRendering = false;
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* Closes the overflow area.
|
|
861
|
+
* Useful to manually close the overflow after having suppressed automatic closing with preventDefault() of ShellbarItem's press event
|
|
862
|
+
* @public
|
|
863
|
+
*/
|
|
864
|
+
closeOverflow() {
|
|
865
|
+
if (this.overflowPopover) {
|
|
866
|
+
this.overflowPopover.open = false;
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
_handleBarBreakpoints() {
|
|
870
|
+
const width = this.getBoundingClientRect().width;
|
|
871
|
+
const breakpoints = ShellBar_1.FIORI_3_BREAKPOINTS;
|
|
872
|
+
const size = breakpoints.find(bp1 => width <= bp1) || ShellBar_1.FIORI_3_BREAKPOINTS[ShellBar_1.FIORI_3_BREAKPOINTS.length - 1];
|
|
873
|
+
const mappedSize = ShellBar_1.FIORI_3_BREAKPOINTS_MAP[size];
|
|
874
|
+
if (this.breakpointSize !== mappedSize) {
|
|
875
|
+
this.breakpointSize = mappedSize;
|
|
876
|
+
}
|
|
877
|
+
this.branding.forEach(brandingEl => {
|
|
878
|
+
brandingEl._isSBreakPoint = this.isSBreakPoint;
|
|
879
|
+
});
|
|
880
|
+
}
|
|
881
|
+
_hideItems(items) {
|
|
882
|
+
items.forEach(item => {
|
|
883
|
+
if (item.classes.indexOf("ui5-shellbar-no-overflow-button") === -1) {
|
|
884
|
+
item.classes = `${item.classes} ui5-shellbar-hidden-button`;
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
return items;
|
|
888
|
+
}
|
|
889
|
+
_resetItemsVisibility(items) {
|
|
890
|
+
items.forEach(item => {
|
|
891
|
+
item.classList.remove("ui5-shellbar-hidden-button");
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
_handleActionsOverflow() {
|
|
895
|
+
const inner = this.overflowInner;
|
|
896
|
+
const wrapper = this.overflowWrapper;
|
|
897
|
+
const hidableDomElements = this.hidableDomElements;
|
|
898
|
+
const hiddenItems = [];
|
|
899
|
+
let lastHiddenIndex = 0;
|
|
900
|
+
this._resetItemsVisibility(hidableDomElements);
|
|
901
|
+
for (let i = 0; i < hidableDomElements.length; i++) {
|
|
902
|
+
if (inner?.offsetWidth === wrapper?.offsetWidth) {
|
|
903
|
+
lastHiddenIndex = i;
|
|
904
|
+
break;
|
|
905
|
+
}
|
|
906
|
+
const item = hidableDomElements[i];
|
|
907
|
+
hiddenItems.push(item.id);
|
|
908
|
+
item.classList.add("ui5-shellbar-hidden-button");
|
|
909
|
+
}
|
|
910
|
+
if (hiddenItems.length === 1 && !this.showSearchField) {
|
|
911
|
+
const nextItemToHide = hidableDomElements[++lastHiddenIndex];
|
|
912
|
+
if (nextItemToHide) {
|
|
913
|
+
hiddenItems.push(nextItemToHide.id);
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
const itemsInfo = this._getItemsInfo().filter(item => item.show && item.classes.indexOf("ui5-shellbar-no-overflow-button") === -1);
|
|
917
|
+
const contentInfo = this._getContentInfo().sort((a, b) => a.hideOrder - b.hideOrder);
|
|
918
|
+
const itemsToHide = [...itemsInfo, ...contentInfo].filter(item => hiddenItems.includes(item.id));
|
|
919
|
+
this._hideItems(itemsToHide);
|
|
920
|
+
return { itemsInfo, contentInfo };
|
|
921
|
+
}
|
|
922
|
+
_overflowActions() {
|
|
923
|
+
this._handleBarBreakpoints();
|
|
924
|
+
const { itemsInfo, contentInfo } = this._handleActionsOverflow();
|
|
925
|
+
this._updateItemsInfo(itemsInfo);
|
|
926
|
+
this._updateContentInfo(contentInfo);
|
|
927
|
+
this._updateOverflowNotifications();
|
|
928
|
+
this.showFullWidthSearch = this.overflowed && this.showSearchField;
|
|
929
|
+
}
|
|
930
|
+
_toggleActionPopover() {
|
|
931
|
+
const overflowButton = this.shadowRoot.querySelector(".ui5-shellbar-overflow-button");
|
|
932
|
+
const overflowPopover = this._getOverflowPopover();
|
|
933
|
+
overflowPopover.opener = overflowButton;
|
|
934
|
+
overflowPopover.open = true;
|
|
935
|
+
}
|
|
936
|
+
onEnterDOM() {
|
|
937
|
+
webcomponentsBase.f.register(this, this._handleResize);
|
|
938
|
+
if (Icons.f()) {
|
|
939
|
+
this.setAttribute("desktop", "");
|
|
940
|
+
}
|
|
941
|
+
this._attachSearchFieldListeners(this.search);
|
|
942
|
+
}
|
|
943
|
+
onExitDOM() {
|
|
944
|
+
this.contentItemsObserver.disconnect();
|
|
945
|
+
this._observableContent = [];
|
|
946
|
+
webcomponentsBase.f.deregister(this, this._handleResize);
|
|
947
|
+
this._detachSearchFieldListeners(this.search);
|
|
948
|
+
}
|
|
949
|
+
_attachSearchFieldListeners(searchField) {
|
|
950
|
+
if (!searchField) {
|
|
951
|
+
return;
|
|
952
|
+
}
|
|
953
|
+
searchField.addEventListener("ui5-open", this._onSearchOpenBound);
|
|
954
|
+
searchField.addEventListener("ui5-close", this._onSearchCloseBound);
|
|
955
|
+
searchField.addEventListener("ui5-search", this._onSearchBound);
|
|
956
|
+
}
|
|
957
|
+
_detachSearchFieldListeners(searchField) {
|
|
958
|
+
if (!searchField) {
|
|
959
|
+
return;
|
|
960
|
+
}
|
|
961
|
+
searchField.removeEventListener("ui5-open", this._onSearchOpenBound);
|
|
962
|
+
searchField.removeEventListener("ui5-close", this._onSearchCloseBound);
|
|
963
|
+
searchField.removeEventListener("ui5-search", this._onSearchBound);
|
|
964
|
+
}
|
|
965
|
+
_handleSearchIconPress() {
|
|
966
|
+
const searchButtonRef = this.shadowRoot.querySelector(".ui5-shellbar-search-button");
|
|
967
|
+
const defaultPrevented = !this.fireDecoratorEvent("search-button-click", {
|
|
968
|
+
targetRef: searchButtonRef,
|
|
969
|
+
searchFieldVisible: this.showSearchField,
|
|
970
|
+
});
|
|
971
|
+
if (defaultPrevented) {
|
|
972
|
+
return;
|
|
973
|
+
}
|
|
974
|
+
this.setSearchState(!this.showSearchField);
|
|
975
|
+
if (!this.showSearchField) {
|
|
976
|
+
return;
|
|
977
|
+
}
|
|
978
|
+
const input = this.searchField[0];
|
|
979
|
+
// update the state immediately
|
|
980
|
+
if (input) {
|
|
981
|
+
input.focused = true;
|
|
982
|
+
}
|
|
983
|
+
// move the focus later
|
|
984
|
+
setTimeout(() => {
|
|
985
|
+
if (input) {
|
|
986
|
+
input.focus();
|
|
987
|
+
}
|
|
988
|
+
}, 100);
|
|
989
|
+
}
|
|
990
|
+
async _handleActionListClick() {
|
|
991
|
+
if (!this._defaultItemPressPrevented) {
|
|
992
|
+
this.closeOverflow();
|
|
993
|
+
// wait for DOM to be updated when ui5-popover is closed, otherwise if Enter key is hold
|
|
994
|
+
// there will be no visual indication that this has happened
|
|
995
|
+
await Icons.f$1();
|
|
996
|
+
}
|
|
997
|
+
this._defaultItemPressPrevented = false;
|
|
998
|
+
}
|
|
999
|
+
_handleCustomActionPress(e) {
|
|
1000
|
+
const target = e.target;
|
|
1001
|
+
const refItemId = target.getAttribute("data-ui5-external-action-item-id");
|
|
1002
|
+
if (refItemId) {
|
|
1003
|
+
const shellbarItem = this.items.find(item => {
|
|
1004
|
+
return item._id === refItemId;
|
|
1005
|
+
});
|
|
1006
|
+
const prevented = shellbarItem.fireClickEvent(e);
|
|
1007
|
+
this._defaultItemPressPrevented = prevented;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
_handleOverflowPress() {
|
|
1011
|
+
this._toggleActionPopover();
|
|
1012
|
+
}
|
|
1013
|
+
_handleNotificationsPress(e) {
|
|
1014
|
+
const notificationIconRef = this.shadowRoot.querySelector(".ui5-shellbar-bell-button"), target = e.target;
|
|
1015
|
+
this._defaultItemPressPrevented = !this.fireDecoratorEvent("notifications-click", {
|
|
1016
|
+
targetRef: notificationIconRef.classList.contains("ui5-shellbar-hidden-button") ? target : notificationIconRef,
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
_handleProfilePress() {
|
|
1020
|
+
this.fireDecoratorEvent("profile-click", {
|
|
1021
|
+
targetRef: this.shadowRoot.querySelector(".ui5-shellbar-image-button"),
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
_handleCancelButtonPress() {
|
|
1025
|
+
const cancelButtonRef = this.shadowRoot.querySelector(".ui5-shellbar-cancel-button");
|
|
1026
|
+
const clearDefaultPrevented = !this.fireDecoratorEvent("search-field-clear", {
|
|
1027
|
+
targetRef: cancelButtonRef,
|
|
1028
|
+
});
|
|
1029
|
+
this.showFullWidthSearch = false;
|
|
1030
|
+
this.setSearchState(false);
|
|
1031
|
+
if (!clearDefaultPrevented) {
|
|
1032
|
+
this._clearSearchFieldValue();
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
_handleProductSwitchPress(e) {
|
|
1036
|
+
const buttonRef = this.shadowRoot.querySelector(".ui5-shellbar-button-product-switch"), target = e.target;
|
|
1037
|
+
this._defaultItemPressPrevented = !this.fireDecoratorEvent("product-switch-click", {
|
|
1038
|
+
targetRef: buttonRef.classList.contains("ui5-shellbar-hidden-button") ? target : buttonRef,
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
_clearSearchFieldValue() {
|
|
1042
|
+
if (this.search) {
|
|
1043
|
+
this.search.value = "";
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* Returns the `logo` DOM ref.
|
|
1048
|
+
* @public
|
|
1049
|
+
* @default null
|
|
1050
|
+
* @since 1.0.0-rc.16
|
|
1051
|
+
*/
|
|
1052
|
+
get logoDomRef() {
|
|
1053
|
+
return this.shadowRoot.querySelector(`*[data-ui5-stable="logo"]`);
|
|
1054
|
+
}
|
|
1055
|
+
/**
|
|
1056
|
+
* Returns the `notifications` icon DOM ref.
|
|
1057
|
+
* @public
|
|
1058
|
+
* @default null
|
|
1059
|
+
* @since 1.0.0-rc.16
|
|
1060
|
+
*/
|
|
1061
|
+
get notificationsDomRef() {
|
|
1062
|
+
return this.shadowRoot.querySelector(`*[data-ui5-stable="notifications"]`);
|
|
1063
|
+
}
|
|
1064
|
+
/**
|
|
1065
|
+
* Returns the `overflow` icon DOM ref.
|
|
1066
|
+
* @public
|
|
1067
|
+
* @default null
|
|
1068
|
+
* @since 1.0.0-rc.16
|
|
1069
|
+
*/
|
|
1070
|
+
get overflowDomRef() {
|
|
1071
|
+
return this.shadowRoot.querySelector(`*[data-ui5-stable="overflow"]`);
|
|
1072
|
+
}
|
|
1073
|
+
/**
|
|
1074
|
+
* Returns the `profile` icon DOM ref.
|
|
1075
|
+
* @public
|
|
1076
|
+
* @default null
|
|
1077
|
+
* @since 1.0.0-rc.16
|
|
1078
|
+
*/
|
|
1079
|
+
get profileDomRef() {
|
|
1080
|
+
return this.shadowRoot.querySelector(`*[data-ui5-stable="profile"]`);
|
|
1081
|
+
}
|
|
1082
|
+
/**
|
|
1083
|
+
* Returns the `product-switch` icon DOM ref.
|
|
1084
|
+
* @public
|
|
1085
|
+
* @default null
|
|
1086
|
+
* @since 1.0.0-rc.16
|
|
1087
|
+
*/
|
|
1088
|
+
get productSwitchDomRef() {
|
|
1089
|
+
return this.shadowRoot.querySelector(`*[data-ui5-stable="product-switch"]`);
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Returns the `search` icon DOM ref.
|
|
1093
|
+
* @returns The search icon DOM ref
|
|
1094
|
+
* @public
|
|
1095
|
+
* @since 2.10.0
|
|
1096
|
+
*/
|
|
1097
|
+
async getSearchButtonDomRef() {
|
|
1098
|
+
await Icons.f$1();
|
|
1099
|
+
return this.shadowRoot.querySelector(`*[data-ui5-stable="toggle-search"]`);
|
|
1100
|
+
}
|
|
1101
|
+
_getContentInfo() {
|
|
1102
|
+
return [
|
|
1103
|
+
...this.contentItemsSorted.map(item => {
|
|
1104
|
+
return {
|
|
1105
|
+
hideOrder: parseInt(item.getAttribute("data-hide-order") || "0"),
|
|
1106
|
+
id: item.slot,
|
|
1107
|
+
classes: "ui5-shellbar-content-item",
|
|
1108
|
+
show: false,
|
|
1109
|
+
};
|
|
1110
|
+
}),
|
|
1111
|
+
];
|
|
1112
|
+
}
|
|
1113
|
+
/**
|
|
1114
|
+
* Returns all items that will be placed in the right of the bar as icons / dom elements.
|
|
1115
|
+
*/
|
|
1116
|
+
_getItemsInfo() {
|
|
1117
|
+
const items = [
|
|
1118
|
+
{
|
|
1119
|
+
icon: slimArrowDown.search,
|
|
1120
|
+
text: this._searchText,
|
|
1121
|
+
classes: `${this.searchField.length ? "" : "ui5-shellbar-invisible-button"} ui5-shellbar-search-button ui5-shellbar-button`,
|
|
1122
|
+
id: `${this._id}-item-${1}`,
|
|
1123
|
+
press: this._handleSearchIconPress.bind(this),
|
|
1124
|
+
show: !!this.searchField.length,
|
|
1125
|
+
tooltip: this._searchText,
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
icon: da,
|
|
1129
|
+
text: "Assistant",
|
|
1130
|
+
classes: `${this.assistant.length ? "" : "ui5-shellbar-invisible-button"} ui5-shellbar-assistant-button`,
|
|
1131
|
+
id: `${this._id}-assistant`,
|
|
1132
|
+
show: !!this.assistant.length,
|
|
1133
|
+
press: () => { },
|
|
1134
|
+
tooltip: this.assistant.length ? (this.assistant[0].getAttribute("text") || this.assistant[0].getAttribute("title") || undefined) : undefined,
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
icon: bell,
|
|
1138
|
+
title: this._notificationsText,
|
|
1139
|
+
text: ShellBar_1.i18nBundle.getText(i18nDefaults.SHELLBAR_NOTIFICATIONS_NO_COUNT),
|
|
1140
|
+
count: this.notificationsCount,
|
|
1141
|
+
classes: `${this.showNotifications ? "" : "ui5-shellbar-invisible-button"} ui5-shellbar-bell-button ui5-shellbar-button`,
|
|
1142
|
+
id: `${this._id}-item-${2}`,
|
|
1143
|
+
show: this.showNotifications,
|
|
1144
|
+
press: this._handleNotificationsPress.bind(this),
|
|
1145
|
+
tooltip: this._notificationsText,
|
|
1146
|
+
},
|
|
1147
|
+
// sort feedback and help to always be last
|
|
1148
|
+
...this.items.sort((a, b) => {
|
|
1149
|
+
const aIndex = PREDEFINED_PLACE_ACTIONS.indexOf(a.icon || "");
|
|
1150
|
+
const bIndex = PREDEFINED_PLACE_ACTIONS.indexOf(b.icon || "");
|
|
1151
|
+
return aIndex - bIndex;
|
|
1152
|
+
}).map((item) => {
|
|
1153
|
+
item._getRealDomRef = () => this.shadowRoot.querySelector(`*[data-ui5-stable=${item.stableDomRef}]`);
|
|
1154
|
+
// check if included for lean mode
|
|
1155
|
+
const show = !!item.icon || false;
|
|
1156
|
+
return {
|
|
1157
|
+
icon: item.icon,
|
|
1158
|
+
id: item._id,
|
|
1159
|
+
count: item.count || undefined,
|
|
1160
|
+
refItemid: item._id,
|
|
1161
|
+
text: item.text,
|
|
1162
|
+
classes: "ui5-shellbar-custom-item ui5-shellbar-button",
|
|
1163
|
+
show,
|
|
1164
|
+
press: this._handleCustomActionPress.bind(this),
|
|
1165
|
+
custom: true,
|
|
1166
|
+
title: item.title,
|
|
1167
|
+
stableDomRef: item.stableDomRef,
|
|
1168
|
+
tooltip: item.title || item.text,
|
|
1169
|
+
accessibilityAttributes: item.accessibilityAttributes,
|
|
1170
|
+
};
|
|
1171
|
+
}),
|
|
1172
|
+
{
|
|
1173
|
+
icon: overflow.overflow,
|
|
1174
|
+
text: "Overflow",
|
|
1175
|
+
classes: "ui5-shellbar-hidden-button ui5-shellbar-no-overflow-button ui5-shellbar-overflow-button ui5-shellbar-button",
|
|
1176
|
+
id: `${this.id}-item-${5}`,
|
|
1177
|
+
press: this._handleOverflowPress.bind(this),
|
|
1178
|
+
show: true,
|
|
1179
|
+
tooltip: this._overflowText,
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
text: "Person",
|
|
1183
|
+
classes: `${this.hasProfile ? "" : "ui5-shellbar-invisible-button"} ui5-shellbar-no-overflow-button ui5-shellbar-image-button ui5-shellbar-button`,
|
|
1184
|
+
profile: true,
|
|
1185
|
+
id: `${this._id}-item-${3}`,
|
|
1186
|
+
show: this.hasProfile,
|
|
1187
|
+
press: this._handleProfilePress.bind(this),
|
|
1188
|
+
tooltip: this._profileText,
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
icon: grid,
|
|
1192
|
+
text: this._productsText,
|
|
1193
|
+
classes: `${this.showProductSwitch ? "" : "ui5-shellbar-invisible-button"} ui5-shellbar-no-overflow-button ui5-shellbar-button ui5-shellbar-image-button ui5-shellbar-button-product-switch`,
|
|
1194
|
+
id: `${this._id}-item-${4}`,
|
|
1195
|
+
show: this.showProductSwitch,
|
|
1196
|
+
press: this._handleProductSwitchPress.bind(this),
|
|
1197
|
+
tooltip: this._productsText,
|
|
1198
|
+
},
|
|
1199
|
+
];
|
|
1200
|
+
return items;
|
|
1201
|
+
}
|
|
1202
|
+
_updateItemsInfo(newItemsInfo) {
|
|
1203
|
+
const isDifferent = JSON.stringify(this._itemsInfo) !== JSON.stringify(newItemsInfo);
|
|
1204
|
+
if (isDifferent) {
|
|
1205
|
+
this._itemsInfo = newItemsInfo;
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
_updateContentInfo(newContentInfo) {
|
|
1209
|
+
const isDifferent = JSON.stringify(this._contentInfo) !== JSON.stringify(newContentInfo);
|
|
1210
|
+
if (isDifferent) {
|
|
1211
|
+
this._contentInfo = newContentInfo;
|
|
1212
|
+
this._fireContentItemVisibilityChangeEvent();
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
_fireContentItemVisibilityChangeEvent() {
|
|
1216
|
+
const hiddenByClass = this._contentInfo
|
|
1217
|
+
.filter(item => item.classes.indexOf("ui5-shellbar-hidden-button") !== -1)
|
|
1218
|
+
.map(item => item.id);
|
|
1219
|
+
this.fireDecoratorEvent("content-item-visibility-change", {
|
|
1220
|
+
items: this.contentItems.filter(item => hiddenByClass.includes(item.slot)),
|
|
1221
|
+
});
|
|
1222
|
+
}
|
|
1223
|
+
_updateOverflowNotifications() {
|
|
1224
|
+
const notificationsArr = [];
|
|
1225
|
+
let overflowNotifications = null;
|
|
1226
|
+
this._itemsInfo.forEach(item => {
|
|
1227
|
+
if (item.count && item.classes.includes("ui5-shellbar-hidden-button")) {
|
|
1228
|
+
notificationsArr.push(item.count);
|
|
1229
|
+
}
|
|
1230
|
+
});
|
|
1231
|
+
if (notificationsArr.length === 1) {
|
|
1232
|
+
overflowNotifications = notificationsArr[0];
|
|
1233
|
+
}
|
|
1234
|
+
else if (notificationsArr.length > 1) {
|
|
1235
|
+
overflowNotifications = " ";
|
|
1236
|
+
}
|
|
1237
|
+
this._overflowNotifications = overflowNotifications;
|
|
1238
|
+
}
|
|
1239
|
+
_observeContentItems() {
|
|
1240
|
+
if (this.hasMatchingContent) {
|
|
1241
|
+
return;
|
|
1242
|
+
}
|
|
1243
|
+
this.contentItems.forEach(item => {
|
|
1244
|
+
if (!this._observableContent.includes(item)) {
|
|
1245
|
+
this.contentItemsObserver.observe(item, {
|
|
1246
|
+
characterData: false,
|
|
1247
|
+
childList: false,
|
|
1248
|
+
subtree: false,
|
|
1249
|
+
attributes: true,
|
|
1250
|
+
attributeFilter: ["data-hide-order"],
|
|
1251
|
+
});
|
|
1252
|
+
}
|
|
1253
|
+
});
|
|
1254
|
+
this._observableContent = this.contentItems;
|
|
1255
|
+
}
|
|
1256
|
+
_getOverflowPopover() {
|
|
1257
|
+
return this.shadowRoot.querySelector(".ui5-shellbar-overflow-popover");
|
|
1258
|
+
}
|
|
1259
|
+
_getMenuPopover() {
|
|
1260
|
+
return this.shadowRoot.querySelector(".ui5-shellbar-menu-popover");
|
|
1261
|
+
}
|
|
1262
|
+
isIconHidden(name) {
|
|
1263
|
+
const itemInfo = this._itemsInfo.find(item => item.icon === name);
|
|
1264
|
+
if (!itemInfo) {
|
|
1265
|
+
return false;
|
|
1266
|
+
}
|
|
1267
|
+
return itemInfo.classes.indexOf("ui5-shellbar-hidden-button") !== -1;
|
|
1268
|
+
}
|
|
1269
|
+
get hasMatchingContent() {
|
|
1270
|
+
if (this._observableContent.length !== this.contentItems.length) {
|
|
1271
|
+
return false;
|
|
1272
|
+
}
|
|
1273
|
+
const observableContentSet = new WeakSet(this._observableContent);
|
|
1274
|
+
return this.contentItems.every(item => observableContentSet.has(item));
|
|
1275
|
+
}
|
|
1276
|
+
get contentItemsSorted() {
|
|
1277
|
+
return this.contentItems.toReversed().sort((a, b) => {
|
|
1278
|
+
return parseInt(a.getAttribute("data-hide-order") || "0") - parseInt(b.getAttribute("data-hide-order") || "0");
|
|
1279
|
+
});
|
|
1280
|
+
}
|
|
1281
|
+
get contentItemsWrappersSorted() {
|
|
1282
|
+
return this.contentItemsSorted.map(item => this.shadowRoot.querySelector(`#${item.slot}`)).filter(item => item !== null);
|
|
1283
|
+
}
|
|
1284
|
+
get autoSearchField() {
|
|
1285
|
+
const onFocus = document.activeElement === this.searchField[0];
|
|
1286
|
+
const hasValue = this.searchField[0]?.value?.length > 0;
|
|
1287
|
+
const disableSearchCollapse = this.disableSearchCollapse || onFocus || hasValue;
|
|
1288
|
+
if (disableSearchCollapse) {
|
|
1289
|
+
return false;
|
|
1290
|
+
}
|
|
1291
|
+
return this.showSearchField || this._autoRestoreSearchField;
|
|
1292
|
+
}
|
|
1293
|
+
get startContentInfoSorted() {
|
|
1294
|
+
return this._contentInfo
|
|
1295
|
+
.filter(item => this.startContent.find(contentItem => contentItem.slot === item.id))
|
|
1296
|
+
.sort((a, b) => a.hideOrder - b.hideOrder);
|
|
1297
|
+
}
|
|
1298
|
+
get endContentInfoSorted() {
|
|
1299
|
+
return this._contentInfo
|
|
1300
|
+
.filter(item => this.endContent.find(contentItem => contentItem.slot === item.id))
|
|
1301
|
+
.sort((a, b) => a.hideOrder - b.hideOrder);
|
|
1302
|
+
}
|
|
1303
|
+
get showStartSeparator() {
|
|
1304
|
+
return this.startContentInfoSorted.some(item => !item.classes.includes("ui5-shellbar-hidden-button"));
|
|
1305
|
+
}
|
|
1306
|
+
get showEndSeparator() {
|
|
1307
|
+
return this.endContentInfoSorted.some(item => !item.classes.includes("ui5-shellbar-hidden-button"));
|
|
1308
|
+
}
|
|
1309
|
+
shouldIncludeSeparator(itemInfo, contentInfo) {
|
|
1310
|
+
// once the last item from the start/end content was hidden, the
|
|
1311
|
+
// separator is "packed" with it in order to account for any next measurements
|
|
1312
|
+
if (!itemInfo) {
|
|
1313
|
+
return false;
|
|
1314
|
+
}
|
|
1315
|
+
const lastVisibleItem = contentInfo.at(-1);
|
|
1316
|
+
return lastVisibleItem?.id === itemInfo.id && itemInfo.classes.indexOf("ui5-shellbar-hidden-button") > -1;
|
|
1317
|
+
}
|
|
1318
|
+
get classes() {
|
|
1319
|
+
return {
|
|
1320
|
+
wrapper: {
|
|
1321
|
+
"ui5-shellbar-root": true,
|
|
1322
|
+
"ui5-shellbar-with-searchfield": this.hasSearchField,
|
|
1323
|
+
},
|
|
1324
|
+
button: {
|
|
1325
|
+
"ui5-shellbar-menu-button--interactive": this.hasMenuItems,
|
|
1326
|
+
},
|
|
1327
|
+
notification: {
|
|
1328
|
+
"ui5-shellbar-hidden-button": this.isIconHidden("bell"),
|
|
1329
|
+
},
|
|
1330
|
+
search: {
|
|
1331
|
+
"ui5-shellbar-hidden-button": this.isIconHidden("search"),
|
|
1332
|
+
"ui5-shellbar-search-toggle": true,
|
|
1333
|
+
},
|
|
1334
|
+
overflow: {
|
|
1335
|
+
"ui5-shellbar-hidden-button": this._hiddenIcons.length === 0,
|
|
1336
|
+
},
|
|
1337
|
+
assistant: {
|
|
1338
|
+
"ui5-shellbar-hidden-button": this.isIconHidden("assistant"),
|
|
1339
|
+
"ui5-shellbar-assistant-button": true,
|
|
1340
|
+
},
|
|
1341
|
+
searchField: {
|
|
1342
|
+
"ui5-shellbar-search-field": this.showSearchField,
|
|
1343
|
+
"ui5-shellbar-search-toggle": isSelfCollapsibleSearch(this.search),
|
|
1344
|
+
"ui5-shellbar-hidden-button": !this.showSearchField,
|
|
1345
|
+
},
|
|
1346
|
+
};
|
|
1347
|
+
}
|
|
1348
|
+
get styles() {
|
|
1349
|
+
const styles = {
|
|
1350
|
+
"display": this.showSearchField ? "flex" : "none",
|
|
1351
|
+
};
|
|
1352
|
+
return {
|
|
1353
|
+
searchField: isSelfCollapsibleSearch(this.search) ? {} : styles,
|
|
1354
|
+
};
|
|
1355
|
+
}
|
|
1356
|
+
get customItemsInfo() {
|
|
1357
|
+
return this._itemsInfo.filter(itemInfo => !!itemInfo.custom);
|
|
1358
|
+
}
|
|
1359
|
+
get hasLogo() {
|
|
1360
|
+
return !!this.logo.length;
|
|
1361
|
+
}
|
|
1362
|
+
get showLogoInMenuButton() {
|
|
1363
|
+
return this.hasLogo && (this.breakpointSize === "S");
|
|
1364
|
+
}
|
|
1365
|
+
get showTitleInMenuButton() {
|
|
1366
|
+
return this.primaryTitle && !(this.showLogoInMenuButton);
|
|
1367
|
+
}
|
|
1368
|
+
get showMenuButton() {
|
|
1369
|
+
return this.primaryTitle || this.showLogoInMenuButton;
|
|
1370
|
+
}
|
|
1371
|
+
get popoverHorizontalAlign() {
|
|
1372
|
+
return this.effectiveDir === "rtl" ? "Start" : "End";
|
|
1373
|
+
}
|
|
1374
|
+
get hasAssistant() {
|
|
1375
|
+
return !!this.assistant.length;
|
|
1376
|
+
}
|
|
1377
|
+
get hasBranding() {
|
|
1378
|
+
return !!this.branding.length;
|
|
1379
|
+
}
|
|
1380
|
+
get hasSearchField() {
|
|
1381
|
+
return !!this.searchField.length;
|
|
1382
|
+
}
|
|
1383
|
+
get hasMidContent() {
|
|
1384
|
+
return !!this.midContent.length;
|
|
1385
|
+
}
|
|
1386
|
+
get hasProfile() {
|
|
1387
|
+
return !!this.profile.length;
|
|
1388
|
+
}
|
|
1389
|
+
get hasMenuItems() {
|
|
1390
|
+
return this.menuItems.length > 0;
|
|
1391
|
+
}
|
|
1392
|
+
get imageBtnText() {
|
|
1393
|
+
return AccessibilityTextsHelper.A(this);
|
|
1394
|
+
}
|
|
1395
|
+
get _shellbarText() {
|
|
1396
|
+
return ShellBar_1.i18nBundle.getText(i18nDefaults.SHELLBAR_LABEL);
|
|
1397
|
+
}
|
|
1398
|
+
get _logoText() {
|
|
1399
|
+
return this.accessibilityAttributes.logo?.name || ShellBar_1.i18nBundle.getText(i18nDefaults.SHELLBAR_LOGO);
|
|
1400
|
+
}
|
|
1401
|
+
get _notificationsText() {
|
|
1402
|
+
return ShellBar_1.i18nBundle.getText(i18nDefaults.SHELLBAR_NOTIFICATIONS, this.notificationsCount || 0);
|
|
1403
|
+
}
|
|
1404
|
+
get _cancelBtnText() {
|
|
1405
|
+
return ShellBar_1.i18nBundle.getText(i18nDefaults.SHELLBAR_CANCEL);
|
|
1406
|
+
}
|
|
1407
|
+
get _logoAreaText() {
|
|
1408
|
+
const primaryTitle = this.primaryTitle ?? "";
|
|
1409
|
+
const secondaryTitle = this.secondaryTitle ?? "";
|
|
1410
|
+
return ShellBar_1.i18nBundle.getText(i18nDefaults.SHELLBAR_LOGO_AREA, primaryTitle, secondaryTitle);
|
|
1411
|
+
}
|
|
1412
|
+
get _contentItemsText() {
|
|
1413
|
+
return this._enableContentAreaAccessibility ? ShellBar_1.i18nBundle.getText(i18nDefaults.SHELLBAR_ADDITIONAL_CONTEXT) : undefined;
|
|
1414
|
+
}
|
|
1415
|
+
get _searchFieldDescription() {
|
|
1416
|
+
return ShellBar_1.i18nBundle.getText(i18nDefaults.SHELLBAR_SEARCHFIELD_DESCRIPTION);
|
|
1417
|
+
}
|
|
1418
|
+
get _contentItemsRole() {
|
|
1419
|
+
if (this._enableContentAreaAccessibility) {
|
|
1420
|
+
return "group";
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
get _enableContentAreaAccessibility() {
|
|
1424
|
+
return this.contentItems.length > 1;
|
|
1425
|
+
}
|
|
1426
|
+
get contentItems() {
|
|
1427
|
+
return [...this.startContent, ...this.endContent];
|
|
1428
|
+
}
|
|
1429
|
+
get startContent() {
|
|
1430
|
+
// all items before the first spacer
|
|
1431
|
+
const spacerIndex = this.content.findIndex(child => child.hasAttribute("ui5-shellbar-spacer"));
|
|
1432
|
+
if (spacerIndex === -1) {
|
|
1433
|
+
return this.content;
|
|
1434
|
+
}
|
|
1435
|
+
return this.content.slice(0, spacerIndex);
|
|
1436
|
+
}
|
|
1437
|
+
get endContent() {
|
|
1438
|
+
// all items after the first spacer
|
|
1439
|
+
const spacerIndex = this.content.findIndex(child => child.hasAttribute("ui5-shellbar-spacer"));
|
|
1440
|
+
if (spacerIndex === -1) {
|
|
1441
|
+
return [];
|
|
1442
|
+
}
|
|
1443
|
+
return this.content.slice(spacerIndex + 1);
|
|
1444
|
+
}
|
|
1445
|
+
get _rightChildRole() {
|
|
1446
|
+
const items = this._getRightChildItems();
|
|
1447
|
+
const visibleItems = items.filter(item => {
|
|
1448
|
+
return this._isVisible(item);
|
|
1449
|
+
});
|
|
1450
|
+
if (visibleItems.length === 1) {
|
|
1451
|
+
return;
|
|
1452
|
+
}
|
|
1453
|
+
return "toolbar";
|
|
1454
|
+
}
|
|
1455
|
+
get _searchFieldText() {
|
|
1456
|
+
return ShellBar_1.i18nBundle.getText(i18nDefaults.SHELLBAR_SEARCH_FIELD);
|
|
1457
|
+
}
|
|
1458
|
+
get _searchBtnOpen() {
|
|
1459
|
+
return ShellBar_1.i18nBundle.getText(i18nDefaults.SHELLBAR_SEARCH_BTN_OPEN);
|
|
1460
|
+
}
|
|
1461
|
+
get _productSwitchBtnText() {
|
|
1462
|
+
return ShellBar_1.i18nBundle.getText(i18nDefaults.SHELLBAR_PRODUCT_SWITCH_BTN);
|
|
1463
|
+
}
|
|
1464
|
+
get _profileText() {
|
|
1465
|
+
return this.accessibilityAttributes.profile?.name || ShellBar_1.i18nBundle.getText(i18nDefaults.SHELLBAR_PROFILE);
|
|
1466
|
+
}
|
|
1467
|
+
get _productsText() {
|
|
1468
|
+
return ShellBar_1.i18nBundle.getText(i18nDefaults.SHELLBAR_PRODUCTS);
|
|
1469
|
+
}
|
|
1470
|
+
get _searchText() {
|
|
1471
|
+
return ShellBar_1.i18nBundle.getText(i18nDefaults.SHELLBAR_SEARCH);
|
|
1472
|
+
}
|
|
1473
|
+
get _overflowText() {
|
|
1474
|
+
return ShellBar_1.i18nBundle.getText(i18nDefaults.SHELLBAR_OVERFLOW);
|
|
1475
|
+
}
|
|
1476
|
+
get _brandingText() {
|
|
1477
|
+
return this.accessibilityAttributes.branding?.name || this.primaryTitle;
|
|
1478
|
+
}
|
|
1479
|
+
get hasContentItems() {
|
|
1480
|
+
return this.contentItems.length > 0;
|
|
1481
|
+
}
|
|
1482
|
+
get hidableDomElements() {
|
|
1483
|
+
const items = Array.from(this.shadowRoot.querySelectorAll(".ui5-shellbar-button:not(.ui5-shellbar-search-button):not(.ui5-shellbar-overflow-button):not(.ui5-shellbar-cancel-button):not(.ui5-shellbar-no-overflow-button)"));
|
|
1484
|
+
const assistant = this.shadowRoot.querySelector(".ui5-shellbar-assistant-button");
|
|
1485
|
+
const searchToggle = this.shadowRoot.querySelector(".ui5-shellbar-search-toggle");
|
|
1486
|
+
const contentItems = this.contentItemsWrappersSorted;
|
|
1487
|
+
const firstContentItem = contentItems.pop();
|
|
1488
|
+
const prioritizeContent = this.showSearchField && this.hasSearchField;
|
|
1489
|
+
// order here is important for the responsive behavior, the items will be
|
|
1490
|
+
// measured and hidden in the order they are returned until no overlap is detected
|
|
1491
|
+
let itemsToHide = [];
|
|
1492
|
+
if (prioritizeContent) {
|
|
1493
|
+
// search field was toggled, the content items should make space for it
|
|
1494
|
+
const overflowItems = [...items, assistant];
|
|
1495
|
+
const visibleItems = overflowItems.filter(item => item && !item.classList.contains("ui5-shellbar-hidden-button"));
|
|
1496
|
+
const hiddenItems = overflowItems.filter(item => item && item.classList.contains("ui5-shellbar-hidden-button"));
|
|
1497
|
+
itemsToHide = [
|
|
1498
|
+
...hiddenItems,
|
|
1499
|
+
...contentItems,
|
|
1500
|
+
firstContentItem,
|
|
1501
|
+
...visibleItems,
|
|
1502
|
+
];
|
|
1503
|
+
}
|
|
1504
|
+
else {
|
|
1505
|
+
// search field is close, actions should go to the overflow first
|
|
1506
|
+
itemsToHide = [
|
|
1507
|
+
...items.toReversed(),
|
|
1508
|
+
assistant,
|
|
1509
|
+
...contentItems,
|
|
1510
|
+
searchToggle,
|
|
1511
|
+
firstContentItem,
|
|
1512
|
+
];
|
|
1513
|
+
}
|
|
1514
|
+
return itemsToHide.filter(Boolean);
|
|
1515
|
+
}
|
|
1516
|
+
get contentItemsHidden() {
|
|
1517
|
+
return this.contentItemsWrappersSorted.filter(item => item.classList.contains("ui5-shellbar-hidden-button"));
|
|
1518
|
+
}
|
|
1519
|
+
get overflowWrapper() {
|
|
1520
|
+
return this.shadowRoot.querySelector(".ui5-shellbar-overflow-container-right");
|
|
1521
|
+
}
|
|
1522
|
+
get overflowInner() {
|
|
1523
|
+
return this.shadowRoot.querySelector(".ui5-shellbar-overflow-container-right-inner");
|
|
1524
|
+
}
|
|
1525
|
+
get overflowed() {
|
|
1526
|
+
const wrapper = this.overflowWrapper;
|
|
1527
|
+
const inner = this.overflowInner;
|
|
1528
|
+
if (!wrapper || !inner) {
|
|
1529
|
+
return false;
|
|
1530
|
+
}
|
|
1531
|
+
return inner.offsetWidth > wrapper.offsetWidth;
|
|
1532
|
+
}
|
|
1533
|
+
get accInfo() {
|
|
1534
|
+
const overflowExpanded = this.accessibilityAttributes.overflow?.expanded;
|
|
1535
|
+
return {
|
|
1536
|
+
notifications: {
|
|
1537
|
+
"title": this._notificationsText,
|
|
1538
|
+
"accessibilityAttributes": {
|
|
1539
|
+
expanded: this.accessibilityAttributes.notifications?.expanded,
|
|
1540
|
+
hasPopup: this.accessibilityAttributes.notifications?.hasPopup,
|
|
1541
|
+
},
|
|
1542
|
+
},
|
|
1543
|
+
profile: {
|
|
1544
|
+
"title": this._profileText,
|
|
1545
|
+
"accessibilityAttributes": {
|
|
1546
|
+
hasPopup: this.accessibilityAttributes.profile?.hasPopup,
|
|
1547
|
+
expanded: this.accessibilityAttributes.profile?.expanded,
|
|
1548
|
+
},
|
|
1549
|
+
},
|
|
1550
|
+
products: {
|
|
1551
|
+
"title": this._productsText,
|
|
1552
|
+
"accessibilityAttributes": {
|
|
1553
|
+
hasPopup: this.accessibilityAttributes.product?.hasPopup,
|
|
1554
|
+
expanded: this.accessibilityAttributes.product?.expanded,
|
|
1555
|
+
},
|
|
1556
|
+
},
|
|
1557
|
+
search: {
|
|
1558
|
+
"title": this._searchText,
|
|
1559
|
+
"accessibilityAttributes": {
|
|
1560
|
+
hasPopup: this.accessibilityAttributes.search?.hasPopup,
|
|
1561
|
+
},
|
|
1562
|
+
},
|
|
1563
|
+
overflow: {
|
|
1564
|
+
"title": this._overflowText,
|
|
1565
|
+
"accessibilityAttributes": {
|
|
1566
|
+
hasPopup: this.accessibilityAttributes.overflow?.hasPopup || "menu",
|
|
1567
|
+
expanded: overflowExpanded === undefined ? this._overflowPopoverExpanded : overflowExpanded,
|
|
1568
|
+
},
|
|
1569
|
+
},
|
|
1570
|
+
branding: {
|
|
1571
|
+
"title": this._brandingText,
|
|
1572
|
+
"accessibilityAttributes": {
|
|
1573
|
+
name: this.accessibilityAttributes.branding?.name,
|
|
1574
|
+
},
|
|
1575
|
+
},
|
|
1576
|
+
};
|
|
1577
|
+
}
|
|
1578
|
+
get accLogoRole() {
|
|
1579
|
+
return this.accessibilityAttributes.logo?.role || "link";
|
|
1580
|
+
}
|
|
1581
|
+
get isSBreakPoint() {
|
|
1582
|
+
return this.breakpointSize === "S";
|
|
1583
|
+
}
|
|
1584
|
+
get hasSelfCollapsibleSearch() {
|
|
1585
|
+
return isSelfCollapsibleSearch(this.search);
|
|
1586
|
+
}
|
|
1587
|
+
get search() {
|
|
1588
|
+
return this.searchField.length ? this.searchField[0] : null;
|
|
1589
|
+
}
|
|
1590
|
+
};
|
|
1591
|
+
__decorate([
|
|
1592
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1593
|
+
], ShellBar.prototype, "hideSearchButton", void 0);
|
|
1594
|
+
__decorate([
|
|
1595
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1596
|
+
], ShellBar.prototype, "disableSearchCollapse", void 0);
|
|
1597
|
+
__decorate([
|
|
1598
|
+
webcomponentsBase.s()
|
|
1599
|
+
], ShellBar.prototype, "primaryTitle", void 0);
|
|
1600
|
+
__decorate([
|
|
1601
|
+
webcomponentsBase.s()
|
|
1602
|
+
], ShellBar.prototype, "secondaryTitle", void 0);
|
|
1603
|
+
__decorate([
|
|
1604
|
+
webcomponentsBase.s()
|
|
1605
|
+
], ShellBar.prototype, "notificationsCount", void 0);
|
|
1606
|
+
__decorate([
|
|
1607
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1608
|
+
], ShellBar.prototype, "showNotifications", void 0);
|
|
1609
|
+
__decorate([
|
|
1610
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1611
|
+
], ShellBar.prototype, "showProductSwitch", void 0);
|
|
1612
|
+
__decorate([
|
|
1613
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1614
|
+
], ShellBar.prototype, "showSearchField", void 0);
|
|
1615
|
+
__decorate([
|
|
1616
|
+
webcomponentsBase.s({ type: Object })
|
|
1617
|
+
], ShellBar.prototype, "accessibilityAttributes", void 0);
|
|
1618
|
+
__decorate([
|
|
1619
|
+
webcomponentsBase.s()
|
|
1620
|
+
], ShellBar.prototype, "breakpointSize", void 0);
|
|
1621
|
+
__decorate([
|
|
1622
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1623
|
+
], ShellBar.prototype, "withLogo", void 0);
|
|
1624
|
+
__decorate([
|
|
1625
|
+
webcomponentsBase.s({ type: Object })
|
|
1626
|
+
], ShellBar.prototype, "_itemsInfo", void 0);
|
|
1627
|
+
__decorate([
|
|
1628
|
+
webcomponentsBase.s({ type: Object })
|
|
1629
|
+
], ShellBar.prototype, "_contentInfo", void 0);
|
|
1630
|
+
__decorate([
|
|
1631
|
+
webcomponentsBase.s({ type: Boolean, noAttribute: true })
|
|
1632
|
+
], ShellBar.prototype, "_menuPopoverExpanded", void 0);
|
|
1633
|
+
__decorate([
|
|
1634
|
+
webcomponentsBase.s({ type: Boolean, noAttribute: true })
|
|
1635
|
+
], ShellBar.prototype, "_overflowPopoverExpanded", void 0);
|
|
1636
|
+
__decorate([
|
|
1637
|
+
webcomponentsBase.s({ type: Boolean, noAttribute: true })
|
|
1638
|
+
], ShellBar.prototype, "showFullWidthSearch", void 0);
|
|
1639
|
+
__decorate([
|
|
1640
|
+
webcomponentsBase.d()
|
|
1641
|
+
], ShellBar.prototype, "assistant", void 0);
|
|
1642
|
+
__decorate([
|
|
1643
|
+
webcomponentsBase.d()
|
|
1644
|
+
], ShellBar.prototype, "branding", void 0);
|
|
1645
|
+
__decorate([
|
|
1646
|
+
webcomponentsBase.d({ type: HTMLElement, "default": true, invalidateOnChildChange: true })
|
|
1647
|
+
], ShellBar.prototype, "items", void 0);
|
|
1648
|
+
__decorate([
|
|
1649
|
+
webcomponentsBase.d()
|
|
1650
|
+
], ShellBar.prototype, "profile", void 0);
|
|
1651
|
+
__decorate([
|
|
1652
|
+
webcomponentsBase.d()
|
|
1653
|
+
], ShellBar.prototype, "logo", void 0);
|
|
1654
|
+
__decorate([
|
|
1655
|
+
webcomponentsBase.d()
|
|
1656
|
+
], ShellBar.prototype, "menuItems", void 0);
|
|
1657
|
+
__decorate([
|
|
1658
|
+
webcomponentsBase.d({
|
|
1659
|
+
type: HTMLElement,
|
|
1660
|
+
invalidateOnChildChange: true,
|
|
1661
|
+
})
|
|
1662
|
+
], ShellBar.prototype, "searchField", void 0);
|
|
1663
|
+
__decorate([
|
|
1664
|
+
webcomponentsBase.d()
|
|
1665
|
+
], ShellBar.prototype, "startButton", void 0);
|
|
1666
|
+
__decorate([
|
|
1667
|
+
webcomponentsBase.d()
|
|
1668
|
+
], ShellBar.prototype, "midContent", void 0);
|
|
1669
|
+
__decorate([
|
|
1670
|
+
webcomponentsBase.d({ type: HTMLElement, individualSlots: true })
|
|
1671
|
+
], ShellBar.prototype, "content", void 0);
|
|
1672
|
+
__decorate([
|
|
1673
|
+
parametersBundle_css$1.i("@ui5/webcomponents-fiori")
|
|
1674
|
+
], ShellBar, "i18nBundle", void 0);
|
|
1675
|
+
ShellBar = ShellBar_1 = __decorate([
|
|
1676
|
+
webcomponentsBase.m({
|
|
1677
|
+
tag: "ui5-shellbar",
|
|
1678
|
+
fastNavigation: true,
|
|
1679
|
+
languageAware: true,
|
|
1680
|
+
renderer: parametersBundle_css.y,
|
|
1681
|
+
template: ShellBarTemplate,
|
|
1682
|
+
styles: [shellBarStyles, ShellBarPopoverCss],
|
|
1683
|
+
dependencies: [
|
|
1684
|
+
Button.Button,
|
|
1685
|
+
Icon.Icon,
|
|
1686
|
+
List.List,
|
|
1687
|
+
ResponsivePopover.Popover,
|
|
1688
|
+
ListItemStandard$1,
|
|
1689
|
+
Menu,
|
|
1690
|
+
ButtonBadge$1,
|
|
1691
|
+
],
|
|
1692
|
+
})
|
|
1693
|
+
/**
|
|
1694
|
+
*
|
|
1695
|
+
* Fired, when the notification icon is activated.
|
|
1696
|
+
* @param {HTMLElement} targetRef dom ref of the activated element
|
|
1697
|
+
* @public
|
|
1698
|
+
*/
|
|
1699
|
+
,
|
|
1700
|
+
eventStrict.l("notifications-click", {
|
|
1701
|
+
cancelable: true,
|
|
1702
|
+
bubbles: true,
|
|
1703
|
+
})
|
|
1704
|
+
/**
|
|
1705
|
+
* Fired, when the profile slot is present.
|
|
1706
|
+
* @param {HTMLElement} targetRef dom ref of the activated element
|
|
1707
|
+
* @public
|
|
1708
|
+
*/
|
|
1709
|
+
,
|
|
1710
|
+
eventStrict.l("profile-click", {
|
|
1711
|
+
bubbles: true,
|
|
1712
|
+
})
|
|
1713
|
+
/**
|
|
1714
|
+
* Fired, when the product switch icon is activated.
|
|
1715
|
+
*
|
|
1716
|
+
* **Note:** You can prevent closing of overflow popover by calling `event.preventDefault()`.
|
|
1717
|
+
* @param {HTMLElement} targetRef dom ref of the activated element
|
|
1718
|
+
* @public
|
|
1719
|
+
*/
|
|
1720
|
+
,
|
|
1721
|
+
eventStrict.l("product-switch-click", {
|
|
1722
|
+
cancelable: true,
|
|
1723
|
+
bubbles: true,
|
|
1724
|
+
})
|
|
1725
|
+
/**
|
|
1726
|
+
* Fired, when the logo is activated.
|
|
1727
|
+
* @param {HTMLElement} targetRef dom ref of the activated element
|
|
1728
|
+
* @since 0.10
|
|
1729
|
+
* @public
|
|
1730
|
+
*/
|
|
1731
|
+
,
|
|
1732
|
+
eventStrict.l("logo-click", {
|
|
1733
|
+
bubbles: true,
|
|
1734
|
+
})
|
|
1735
|
+
/**
|
|
1736
|
+
* Fired, when a menu item is activated
|
|
1737
|
+
*
|
|
1738
|
+
* **Note:** You can prevent closing of overflow popover by calling `event.preventDefault()`.
|
|
1739
|
+
* @param {HTMLElement} item DOM ref of the activated list item
|
|
1740
|
+
* @since 0.10
|
|
1741
|
+
* @public
|
|
1742
|
+
*/
|
|
1743
|
+
,
|
|
1744
|
+
eventStrict.l("menu-item-click", {
|
|
1745
|
+
bubbles: true,
|
|
1746
|
+
cancelable: true,
|
|
1747
|
+
})
|
|
1748
|
+
/**
|
|
1749
|
+
* Fired, when the search button is activated.
|
|
1750
|
+
*
|
|
1751
|
+
* **Note:** You can prevent expanding/collapsing of the search field by calling `event.preventDefault()`.
|
|
1752
|
+
* @param {HTMLElement} targetRef dom ref of the activated element
|
|
1753
|
+
* @param {Boolean} searchFieldVisible whether the search field is visible
|
|
1754
|
+
* @public
|
|
1755
|
+
*/
|
|
1756
|
+
,
|
|
1757
|
+
eventStrict.l("search-button-click", {
|
|
1758
|
+
cancelable: true,
|
|
1759
|
+
bubbles: true,
|
|
1760
|
+
})
|
|
1761
|
+
/**
|
|
1762
|
+
* Fired, when the search field is expanded or collapsed.
|
|
1763
|
+
* @since 2.10.0
|
|
1764
|
+
* @param {Boolean} expanded whether the search field is expanded
|
|
1765
|
+
* @public
|
|
1766
|
+
*/
|
|
1767
|
+
,
|
|
1768
|
+
eventStrict.l("search-field-toggle", {
|
|
1769
|
+
bubbles: true,
|
|
1770
|
+
})
|
|
1771
|
+
/**
|
|
1772
|
+
* Fired, when the search cancel button is activated.
|
|
1773
|
+
*
|
|
1774
|
+
* **Note:** You can prevent the default behavior (clearing the search field value) by calling `event.preventDefault()`. The search will still be closed.
|
|
1775
|
+
* **Note:** The `search-field-clear` event is in an experimental state and is a subject to change.
|
|
1776
|
+
* @param {HTMLElement} targetRef dom ref of the cancel button element
|
|
1777
|
+
* @since 2.14.0
|
|
1778
|
+
* @public
|
|
1779
|
+
*/
|
|
1780
|
+
,
|
|
1781
|
+
eventStrict.l("search-field-clear", {
|
|
1782
|
+
cancelable: true,
|
|
1783
|
+
bubbles: true,
|
|
1784
|
+
})
|
|
1785
|
+
/**
|
|
1786
|
+
* Fired, when an item from the content slot is hidden or shown.
|
|
1787
|
+
* **Note:** The `content-item-visibility-change` event is in an experimental state and is a subject to change.
|
|
1788
|
+
*
|
|
1789
|
+
* @param {Array<HTMLElement>} array of all the items that are hidden
|
|
1790
|
+
* @public
|
|
1791
|
+
* @since 2.7.0
|
|
1792
|
+
*/
|
|
1793
|
+
,
|
|
1794
|
+
eventStrict.l("content-item-visibility-change", {
|
|
1795
|
+
bubbles: true,
|
|
1796
|
+
})
|
|
1797
|
+
], ShellBar);
|
|
1798
|
+
const isSelfCollapsibleSearch = (searchField) => {
|
|
1799
|
+
if (searchField) {
|
|
1800
|
+
return "collapsed" in searchField && "open" in searchField;
|
|
1801
|
+
}
|
|
1802
|
+
return false;
|
|
1803
|
+
};
|
|
1804
|
+
ShellBar.define();
|
|
1805
|
+
var ShellBar$1 = ShellBar;
|
|
1806
|
+
|
|
1807
|
+
return ShellBar$1;
|
|
1808
|
+
|
|
1809
|
+
}));
|