@openui5/sap.f 1.141.1 → 1.142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/REUSE.toml +38 -0
- package/THIRDPARTY.txt +34 -1
- 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 +3 -4
- 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 +2825 -0
- package/src/sap/f/gen/ui5/webcomponents_base.js +578 -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 +1654 -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 +4301 -0
- package/src/sap/f/thirdparty/webcomponents-base2.js +7 -0
- package/src/sap/f/thirdparty/webcomponents-fiori.js +146 -0
- package/src/sap/f/thirdparty/webcomponents.js +170 -0
- package/src/sap/f/thirdparty/willShowContent.js +7 -0
- package/ui5-build.yaml +54 -0
- package/ui5.yaml +46 -0
|
@@ -0,0 +1,1689 @@
|
|
|
1
|
+
sap.ui.define(['exports', 'sap/f/thirdparty/webcomponents-base', 'sap/f/thirdparty/parameters-bundle.css2', 'sap/f/thirdparty/FocusableElements', 'sap/f/thirdparty/event-strict', 'sap/f/thirdparty/parameters-bundle.css', 'sap/f/thirdparty/Icons', 'sap/f/thirdparty/information', 'sap/f/thirdparty/List', 'sap/f/thirdparty/ListItemBase', 'sap/f/thirdparty/i18n-defaults2', 'sap/f/thirdparty/ListItemAdditionalText.css', 'sap/f/thirdparty/Button2', 'sap/f/thirdparty/Icon', 'sap/f/thirdparty/ValueState', 'sap/f/thirdparty/AccessibilityTextsHelper', 'sap/f/thirdparty/Label'], (function (exports, webcomponentsBase, parametersBundle_css, FocusableElements, eventStrict, parametersBundle_css$1, Icons, information, List, ListItemBase, i18nDefaults, ListItemAdditionalText_css, Button, Icon, ValueState, AccessibilityTextsHelper, Label) { 'use strict';
|
|
2
|
+
|
|
3
|
+
const name$b = "slim-arrow-right";
|
|
4
|
+
const pathData$b = "M357.5 233q10 10 10 23t-10 23l-165 165q-12 11-23 0t0-23l160-159q6-6 0-12l-159-159q-5-5-5-11t5-11 11-5 11 5z";
|
|
5
|
+
const ltr$b = false;
|
|
6
|
+
const collection$b = "SAP-icons-v4";
|
|
7
|
+
const packageName$b = "sap/f/gen/ui5/webcomponents-icons";
|
|
8
|
+
|
|
9
|
+
Icons.y(name$b, { pathData: pathData$b, ltr: ltr$b, collection: collection$b, packageName: packageName$b });
|
|
10
|
+
|
|
11
|
+
const name$a = "slim-arrow-right";
|
|
12
|
+
const pathData$a = "M186 416q-11 0-18.5-7.5T160 390q0-10 8-18l121-116-121-116q-8-8-8-18 0-11 7.5-18.5T186 96q10 0 17 7l141 134q8 8 8 19 0 12-8 18L203 409q-7 7-17 7z";
|
|
13
|
+
const ltr$a = false;
|
|
14
|
+
const collection$a = "SAP-icons-v5";
|
|
15
|
+
const packageName$a = "sap/f/gen/ui5/webcomponents-icons";
|
|
16
|
+
|
|
17
|
+
Icons.y(name$a, { pathData: pathData$a, ltr: ltr$a, collection: collection$a, packageName: packageName$a });
|
|
18
|
+
|
|
19
|
+
var slimArrowRight = "slim-arrow-right";
|
|
20
|
+
|
|
21
|
+
const name$9 = "edit";
|
|
22
|
+
const pathData$9 = "M475 104q5 7 5 12 0 6-5 11L150 453q-4 4-8 4L32 480l22-110q0-5 4-9L384 36q4-4 11-4t11 4zm-121 99l-46-45L84 381l46 46zm87-88l-46-44-64 64 45 45z";
|
|
23
|
+
const ltr$9 = false;
|
|
24
|
+
const collection$9 = "SAP-icons-v4";
|
|
25
|
+
const packageName$9 = "sap/f/gen/ui5/webcomponents-icons";
|
|
26
|
+
|
|
27
|
+
Icons.y(name$9, { pathData: pathData$9, ltr: ltr$9, collection: collection$9, packageName: packageName$9 });
|
|
28
|
+
|
|
29
|
+
const name$8 = "edit";
|
|
30
|
+
const pathData$8 = "M505 94q7 7 7 18t-6 17L130 505q-7 7-18 7H26q-11 0-18.5-7.5T0 486v-86q1-10 6-16L382 7q7-7 18-7t18 7zm-55 18l-50-50-50 50 50 50zm-86 86l-50-50L62 400l50 50z";
|
|
31
|
+
const ltr$8 = false;
|
|
32
|
+
const collection$8 = "SAP-icons-v5";
|
|
33
|
+
const packageName$8 = "sap/f/gen/ui5/webcomponents-icons";
|
|
34
|
+
|
|
35
|
+
Icons.y(name$8, { pathData: pathData$8, ltr: ltr$8, collection: collection$8, packageName: packageName$8 });
|
|
36
|
+
|
|
37
|
+
var edit = "edit";
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Different types of Highlight .
|
|
41
|
+
*
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
var Highlight;
|
|
45
|
+
(function (Highlight) {
|
|
46
|
+
/**
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
Highlight["None"] = "None";
|
|
50
|
+
/**
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
Highlight["Positive"] = "Positive";
|
|
54
|
+
/**
|
|
55
|
+
* @public
|
|
56
|
+
*/
|
|
57
|
+
Highlight["Critical"] = "Critical";
|
|
58
|
+
/**
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
Highlight["Negative"] = "Negative";
|
|
62
|
+
/**
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
Highlight["Information"] = "Information";
|
|
66
|
+
})(Highlight || (Highlight = {}));
|
|
67
|
+
var Highlight$1 = Highlight;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Different list item types.
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
var ListItemType;
|
|
74
|
+
(function (ListItemType) {
|
|
75
|
+
/**
|
|
76
|
+
* Indicates the list item does not have any active feedback when item is pressed.
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
ListItemType["Inactive"] = "Inactive";
|
|
80
|
+
/**
|
|
81
|
+
* Indicates that the item is clickable via active feedback when item is pressed.
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
|
+
ListItemType["Active"] = "Active";
|
|
85
|
+
/**
|
|
86
|
+
* Enables detail button of the list item that fires detail-click event.
|
|
87
|
+
* @public
|
|
88
|
+
*/
|
|
89
|
+
ListItemType["Detail"] = "Detail";
|
|
90
|
+
/**
|
|
91
|
+
* Enables the type of navigation, which is specified to add an arrow at the end of the items and fires navigate-click event.
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
94
|
+
ListItemType["Navigation"] = "Navigation";
|
|
95
|
+
})(ListItemType || (ListItemType = {}));
|
|
96
|
+
var ListItemType$1 = ListItemType;
|
|
97
|
+
|
|
98
|
+
Icons.p("@" + "ui5" + "/" + "sap/f/thirdparty/webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
|
|
99
|
+
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);
|
|
100
|
+
var styles = `.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([navigated]) .ui5-li-root .ui5-li-navigated{width:.1875rem;position:absolute;right:0;top:0;bottom:0;background-color:var(--sapList_SelectionBorderColor)}:host([active][actionable]) .ui5-li-root .ui5-li-icon{color:var(--sapList_Active_TextColor)}:host([active][actionable]) .ui5-li-title,:host([active][actionable]) .ui5-li-desc,:host([active][actionable]) .ui5-li-additional-text{color:var(--sapList_Active_TextColor)}:host([active][actionable]) .ui5-li-additional-text{text-shadow:none}:host([additional-text-state="Critical"]) .ui5-li-additional-text{color:var(--sapCriticalTextColor)}:host([additional-text-state="Positive"]) .ui5-li-additional-text{color:var(--sapPositiveTextColor)}:host([additional-text-state="Negative"]) .ui5-li-additional-text{color:var(--sapNegativeTextColor)}:host([additional-text-state="Information"]) .ui5-li-additional-text{color:var(--sapInformativeTextColor)}:host([has-title][description]){height:5rem}:host([has-title][image]){height:5rem}:host([_has-image]){height:5rem}:host([image]) .ui5-li-content{height:3rem}::slotted(img[slot="image"]){width:var(--_ui5-v2-15-0_list_item_img_size);height:var(--_ui5-v2-15-0_list_item_img_size);border-radius:var(--ui5-v2-15-0-avatar-border-radius);object-fit:contain}::slotted([ui5-icon][slot="image"]){color:var(--sapContent_NonInteractiveIconColor);min-width:var(--_ui5-v2-15-0_list_item_icon_size);min-height:var(--_ui5-v2-15-0_list_item_icon_size);padding-inline-end:var(--_ui5-v2-15-0_list_item_icon_padding-inline-end)}::slotted([ui5-avatar][slot="image"]){min-width:var(--_ui5-v2-15-0_list_item_img_size);min-height:var(--_ui5-v2-15-0_list_item_img_size);margin-top:var(--_ui5-v2-15-0_list_item_img_top_margin);margin-bottom:var(--_ui5-v2-15-0_list_item_img_bottom_margin);margin-inline-end:var(--_ui5-v2-15-0_list_item_img_hn_margin)}:host([wrapping-type="None"][description]) .ui5-li-root{padding:1rem}:host([description]) .ui5-li-content{height:3rem}:host([has-title][description]) .ui5-li-title{padding-bottom:.5rem}.ui5-li-text-wrapper{flex-direction:column}:host([description]) .ui5-li-text-wrapper{justify-content:space-between;padding:.125rem 0}.ui5-li-description-info-wrapper{display:flex;justify-content:space-between}.ui5-li-additional-text,:host(:not([wrapping-type="Normal"])) .ui5-li-title,.ui5-li-desc{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host([wrapping-type="Normal"]){height:auto}:host([wrapping-type="Normal"]) .ui5-li-content{margin:var(--_ui5-v2-15-0_list_item_content_vertical_offset) 0}.ui5-li-desc{color:var(--sapContent_LabelColor);font-size:var(--sapFontSize)}:host([description]) .ui5-li-additional-text{align-self:flex-end}.ui5-li-icon{min-width:var(--_ui5-v2-15-0_list_item_icon_size);min-height:var(--_ui5-v2-15-0_list_item_icon_size);color:var(--sapContent_NonInteractiveIconColor);padding-inline-end:var(--_ui5-v2-15-0_list_item_icon_padding-inline-end)}:host([icon-end]) .ui5-li-icon{padding-inline-start:var(--_ui5-v2-15-0_list_item_icon_padding-inline-end)}.ui5-li-detailbtn,.ui5-li-deletebtn{display:flex;align-items:center;margin-left:var(--_ui5-v2-15-0_list_buttons_left_space)}.ui5-li-multisel-cb,.ui5-li-singlesel-radiobtn{flex-shrink:0}:host([description]) .ui5-li-singlesel-radiobtn{align-self:flex-start;margin-top:var(--_ui5-v2-15-0_list_item_selection_btn_margin_top)}:host([description]) .ui5-li-multisel-cb{align-self:flex-start;margin-top:var(--_ui5-v2-15-0_list_item_selection_btn_margin_top)}:host([_selection-mode="SingleStart"][wrapping-type]) .ui5-li-root{padding-inline:0 1rem}:host([_selection-mode="Multiple"][wrapping-type]) .ui5-li-root{padding-inline:0 1rem}:host([_selection-mode="SingleEnd"][wrapping-type]) .ui5-li-root{padding-inline:1rem 0}:host [ui5-checkbox].ui5-li-singlesel-radiobtn{margin-right:var(--_ui5-v2-15-0_list_item_cb_margin_right)}.ui5-li-highlight{position:absolute;width:.375rem;bottom:0;left:0;top:0;border-inline-end:.0625rem solid var(--ui5-v2-15-0-listitem-background-color);box-sizing:border-box}:host([highlight="Negative"]) .ui5-li-highlight{background:var(--sapNegativeTextColor)}:host([highlight="Critical"]) .ui5-li-highlight{background:var(--sapCriticalTextColor)}:host([highlight="Positive"]) .ui5-li-highlight{background:var(--sapPositiveTextColor)}:host([highlight="Information"]) .ui5-li-highlight{background:var(--sapInformativeTextColor)}:host([wrapping-type="Normal"][description]),:host([wrapping-type="Normal"][has-title][description]),:host([wrapping-type="Normal"][has-title][image]){height:auto;min-height:5rem}:host([wrapping-type="Normal"][description]) .ui5-li-content,:host([wrapping-type="Normal"][image]) .ui5-li-content{height:auto;min-height:3rem}:host([wrapping-type="Normal"][has-title][description]) .ui5-li-title{padding-bottom:.75rem}:host([wrapping-type="Normal"][additional-text]) .ui5-li-additional-text{padding-inline-start:.75rem}:host([wrapping-type="Normal"]) .ui5-li-description-info-wrapper{flex-direction:column}:host([wrapping-type="Normal"]) .ui5-li-description-info-wrapper .ui5-li-additional-text{white-space:normal}:host([wrapping-type="Normal"]) .ui5-li-multisel-cb,:host([wrapping-type="Normal"]) .ui5-li-singlesel-radiobtn{display:flex;align-self:flex-start}:host([wrapping-type="Normal"][description]) .ui5-li-multisel-cb,:host([wrapping-type="Normal"][description]) .ui5-li-singlesel-radiobtn{margin-top:0}:host([wrapping-type="Normal"]) .ui5-li-icon,:host([wrapping-type="Normal"]) .ui5-li-image{display:flex;align-self:flex-start}:host([wrapping-type="Normal"][icon-end]) .ui5-li-icon{margin-top:var(--_ui5-v2-15-0_list_item_content_vertical_offset)}:host([wrapping-type="Normal"]) ::slotted([ui5-avatar][slot="image"]){margin-top:0;margin-bottom:0}:host([wrapping-type="Normal"]) .ui5-li-detailbtn,:host([wrapping-type="Normal"]) .ui5-li-deletebtn{margin-inline-start:.875rem}
|
|
101
|
+
`;
|
|
102
|
+
|
|
103
|
+
var __decorate$3 = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
104
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
105
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
106
|
+
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;
|
|
107
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
108
|
+
};
|
|
109
|
+
var ListItem_1;
|
|
110
|
+
/**
|
|
111
|
+
* @class
|
|
112
|
+
* A class to serve as a base
|
|
113
|
+
* for the `ListItemStandard` and `ListItemCustom` classes.
|
|
114
|
+
* @constructor
|
|
115
|
+
* @abstract
|
|
116
|
+
* @extends ListItemBase
|
|
117
|
+
* @public
|
|
118
|
+
*/
|
|
119
|
+
let ListItem = ListItem_1 = class ListItem extends ListItemBase.ListItemBase {
|
|
120
|
+
constructor() {
|
|
121
|
+
super();
|
|
122
|
+
/**
|
|
123
|
+
* Defines the visual indication and behavior of the list items.
|
|
124
|
+
* Available options are `Active` (by default), `Inactive`, `Detail` and `Navigation`.
|
|
125
|
+
*
|
|
126
|
+
* **Note:** When set to `Active` or `Navigation`, the item will provide visual response upon press and hover,
|
|
127
|
+
* while with type `Inactive` and `Detail` - will not.
|
|
128
|
+
* @default "Active"
|
|
129
|
+
* @public
|
|
130
|
+
*/
|
|
131
|
+
this.type = "Active";
|
|
132
|
+
/**
|
|
133
|
+
* Defines the additional accessibility attributes that will be applied to the component.
|
|
134
|
+
* The following fields are supported:
|
|
135
|
+
*
|
|
136
|
+
* - **ariaSetsize**: Defines the number of items in the current set when not all items in the set are present in the DOM.
|
|
137
|
+
* **Note:** The value is an integer reflecting the number of items in the complete set. If the size of the entire set is unknown, set `-1`.
|
|
138
|
+
*
|
|
139
|
+
* - **ariaPosinset**: Defines an element's number or position in the current set when not all items are present in the DOM.
|
|
140
|
+
* **Note:** The value is an integer greater than or equal to 1, and less than or equal to the size of the set when that size is known.
|
|
141
|
+
*
|
|
142
|
+
* @default {}
|
|
143
|
+
* @public
|
|
144
|
+
* @since 1.15.0
|
|
145
|
+
*/
|
|
146
|
+
this.accessibilityAttributes = {};
|
|
147
|
+
/**
|
|
148
|
+
* The navigated state of the list item.
|
|
149
|
+
* If set to `true`, a navigation indicator is displayed at the end of the list item.
|
|
150
|
+
* @default false
|
|
151
|
+
* @public
|
|
152
|
+
* @since 1.10.0
|
|
153
|
+
*/
|
|
154
|
+
this.navigated = false;
|
|
155
|
+
/**
|
|
156
|
+
* Indicates if the list item is active, e.g pressed down with the mouse or the keyboard keys.
|
|
157
|
+
* @private
|
|
158
|
+
*/
|
|
159
|
+
this.active = false;
|
|
160
|
+
/**
|
|
161
|
+
* Defines the highlight state of the list items.
|
|
162
|
+
* Available options are: `"None"` (by default), `"Positive"`, `"Critical"`, `"Information"` and `"Negative"`.
|
|
163
|
+
* @default "None"
|
|
164
|
+
* @public
|
|
165
|
+
* @since 1.24
|
|
166
|
+
*/
|
|
167
|
+
this.highlight = "None";
|
|
168
|
+
/**
|
|
169
|
+
* Used to define the role of the list item.
|
|
170
|
+
* @private
|
|
171
|
+
* @default "ListItem"
|
|
172
|
+
* @since 1.3.0
|
|
173
|
+
*
|
|
174
|
+
*/
|
|
175
|
+
this.accessibleRole = "ListItem";
|
|
176
|
+
this._selectionMode = "None";
|
|
177
|
+
/**
|
|
178
|
+
* Defines the current media query size.
|
|
179
|
+
* @default "S"
|
|
180
|
+
* @private
|
|
181
|
+
*/
|
|
182
|
+
this.mediaRange = "S";
|
|
183
|
+
this.deactivateByKey = (e) => {
|
|
184
|
+
if (webcomponentsBase.b$1(e)) {
|
|
185
|
+
this.deactivate();
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
this.deactivate = () => {
|
|
189
|
+
if (this.active) {
|
|
190
|
+
this.active = false;
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
onBeforeRendering() {
|
|
195
|
+
super.onBeforeRendering();
|
|
196
|
+
this.actionable = (this.type === ListItemType$1.Active || this.type === ListItemType$1.Navigation) && (this._selectionMode !== List.ListSelectionMode.Delete);
|
|
197
|
+
}
|
|
198
|
+
onEnterDOM() {
|
|
199
|
+
super.onEnterDOM();
|
|
200
|
+
document.addEventListener("mouseup", this.deactivate);
|
|
201
|
+
document.addEventListener("touchend", this.deactivate);
|
|
202
|
+
document.addEventListener("keyup", this.deactivateByKey);
|
|
203
|
+
}
|
|
204
|
+
onExitDOM() {
|
|
205
|
+
document.removeEventListener("mouseup", this.deactivate);
|
|
206
|
+
document.removeEventListener("keyup", this.deactivateByKey);
|
|
207
|
+
document.removeEventListener("touchend", this.deactivate);
|
|
208
|
+
}
|
|
209
|
+
async _onkeydown(e) {
|
|
210
|
+
if ((webcomponentsBase.A(e) || webcomponentsBase.b$1(e)) && this._isTargetSelfFocusDomRef(e)) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
super._onkeydown(e);
|
|
214
|
+
const itemActive = this.type === ListItemType$1.Active, itemNavigated = this.typeNavigation;
|
|
215
|
+
if ((webcomponentsBase.A(e) || webcomponentsBase.b$1(e)) && (itemActive || itemNavigated)) {
|
|
216
|
+
this.activate();
|
|
217
|
+
}
|
|
218
|
+
if (webcomponentsBase.ro(e)) {
|
|
219
|
+
const activeElement = webcomponentsBase.t();
|
|
220
|
+
const focusDomRef = this.getFocusDomRef();
|
|
221
|
+
if (activeElement === focusDomRef) {
|
|
222
|
+
const firstFocusable = await FocusableElements.b(focusDomRef);
|
|
223
|
+
firstFocusable?.focus();
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
focusDomRef.focus();
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
_onkeyup(e) {
|
|
231
|
+
super._onkeyup(e);
|
|
232
|
+
if (webcomponentsBase.A(e) || webcomponentsBase.b$1(e)) {
|
|
233
|
+
this.deactivate();
|
|
234
|
+
}
|
|
235
|
+
if (this.modeDelete && webcomponentsBase.X(e)) {
|
|
236
|
+
this.onDelete();
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
_onmousedown() {
|
|
240
|
+
this.activate();
|
|
241
|
+
}
|
|
242
|
+
_onmouseup() {
|
|
243
|
+
if (this.getFocusDomRef().matches(":has(:focus-within)")) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
this.deactivate();
|
|
247
|
+
}
|
|
248
|
+
_ontouchend() {
|
|
249
|
+
this._onmouseup();
|
|
250
|
+
}
|
|
251
|
+
_onfocusin(e) {
|
|
252
|
+
super._onfocusin(e);
|
|
253
|
+
if (e.target !== this.getFocusDomRef()) {
|
|
254
|
+
this.deactivate();
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
_onfocusout(e) {
|
|
258
|
+
if (e.target !== this.getFocusDomRef()) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
this.deactivate();
|
|
262
|
+
}
|
|
263
|
+
_ondragstart(e) {
|
|
264
|
+
if (!e.dataTransfer) {
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
if (e.target === this._listItem) {
|
|
268
|
+
webcomponentsBase.D$1.setDraggedElement(this);
|
|
269
|
+
this.setAttribute("data-moving", "");
|
|
270
|
+
e.dataTransfer.dropEffect = "move";
|
|
271
|
+
e.dataTransfer.effectAllowed = "move";
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
_ondragend(e) {
|
|
275
|
+
if (e.target === this._listItem) {
|
|
276
|
+
webcomponentsBase.D$1.clearDraggedElement();
|
|
277
|
+
this.removeAttribute("data-moving");
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
_isTargetSelfFocusDomRef(e) {
|
|
281
|
+
const target = e.target, focusDomRef = this.getFocusDomRef();
|
|
282
|
+
return target !== focusDomRef;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Called when selection components in Single (ui5-radio-button)
|
|
286
|
+
* and Multi (ui5-checkbox) selection modes are used.
|
|
287
|
+
*/
|
|
288
|
+
onMultiSelectionComponentPress(e) {
|
|
289
|
+
if (this.isInactive) {
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
this.fireDecoratorEvent("selection-requested", { item: this, selected: e.target.checked, selectionComponentPressed: true });
|
|
293
|
+
}
|
|
294
|
+
onSingleSelectionComponentPress(e) {
|
|
295
|
+
if (this.isInactive) {
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
this.fireDecoratorEvent("selection-requested", { item: this, selected: !e.target.checked, selectionComponentPressed: true });
|
|
299
|
+
}
|
|
300
|
+
activate() {
|
|
301
|
+
if (this.type === ListItemType$1.Active || this.type === ListItemType$1.Navigation) {
|
|
302
|
+
this.active = true;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
onDelete() {
|
|
306
|
+
this.fireDecoratorEvent("selection-requested", { item: this, selectionComponentPressed: false });
|
|
307
|
+
}
|
|
308
|
+
onDetailClick() {
|
|
309
|
+
this.fireDecoratorEvent("detail-click", { item: this, selected: this.selected });
|
|
310
|
+
}
|
|
311
|
+
fireItemPress(e) {
|
|
312
|
+
if (this.isInactive) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
super.fireItemPress(e);
|
|
316
|
+
if (document.activeElement !== this) {
|
|
317
|
+
this.focus();
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
get isInactive() {
|
|
321
|
+
return this.type === ListItemType$1.Inactive || this.type === ListItemType$1.Detail;
|
|
322
|
+
}
|
|
323
|
+
get placeSelectionElementBefore() {
|
|
324
|
+
return this._selectionMode === List.ListSelectionMode.Multiple
|
|
325
|
+
|| this._selectionMode === List.ListSelectionMode.SingleStart;
|
|
326
|
+
}
|
|
327
|
+
get placeSelectionElementAfter() {
|
|
328
|
+
return !this.placeSelectionElementBefore
|
|
329
|
+
&& (this._selectionMode === List.ListSelectionMode.SingleEnd || this._selectionMode === List.ListSelectionMode.Delete);
|
|
330
|
+
}
|
|
331
|
+
get modeSingleSelect() {
|
|
332
|
+
return [
|
|
333
|
+
List.ListSelectionMode.SingleStart,
|
|
334
|
+
List.ListSelectionMode.SingleEnd,
|
|
335
|
+
List.ListSelectionMode.Single,
|
|
336
|
+
].includes(this._selectionMode);
|
|
337
|
+
}
|
|
338
|
+
get modeMultiple() {
|
|
339
|
+
return this._selectionMode === List.ListSelectionMode.Multiple;
|
|
340
|
+
}
|
|
341
|
+
get modeDelete() {
|
|
342
|
+
return this._selectionMode === List.ListSelectionMode.Delete;
|
|
343
|
+
}
|
|
344
|
+
get typeDetail() {
|
|
345
|
+
return this.type === ListItemType$1.Detail;
|
|
346
|
+
}
|
|
347
|
+
get typeNavigation() {
|
|
348
|
+
return this.type === ListItemType$1.Navigation;
|
|
349
|
+
}
|
|
350
|
+
get typeActive() {
|
|
351
|
+
return this.type === ListItemType$1.Active;
|
|
352
|
+
}
|
|
353
|
+
get _ariaSelected() {
|
|
354
|
+
if (this.modeMultiple || this.modeSingleSelect) {
|
|
355
|
+
return this.selected;
|
|
356
|
+
}
|
|
357
|
+
return undefined;
|
|
358
|
+
}
|
|
359
|
+
get listItemAccessibleRole() {
|
|
360
|
+
return (this._forcedAccessibleRole || this.accessibleRole.toLowerCase());
|
|
361
|
+
}
|
|
362
|
+
get ariaSelectedText() {
|
|
363
|
+
let ariaSelectedText;
|
|
364
|
+
// Selected state needs to be supported separately since now the role mapping is list -> listitem[]
|
|
365
|
+
// to avoid the issue of nesting interactive elements, ex. (option -> radio/checkbox);
|
|
366
|
+
// The text is added to aria-describedby because as part of the aria-labelledby
|
|
367
|
+
// the whole content of the item is readout when the aria-labelledby value is changed.
|
|
368
|
+
if (this._ariaSelected !== undefined) {
|
|
369
|
+
ariaSelectedText = this._ariaSelected ? ListItem_1.i18nBundle.getText(i18nDefaults.LIST_ITEM_SELECTED) : ListItem_1.i18nBundle.getText(i18nDefaults.LIST_ITEM_NOT_SELECTED);
|
|
370
|
+
}
|
|
371
|
+
return ariaSelectedText;
|
|
372
|
+
}
|
|
373
|
+
get deleteText() {
|
|
374
|
+
return ListItem_1.i18nBundle.getText(i18nDefaults.DELETE);
|
|
375
|
+
}
|
|
376
|
+
get hasDeleteButtonSlot() {
|
|
377
|
+
return !!this.deleteButton.length;
|
|
378
|
+
}
|
|
379
|
+
get _accessibleNameRef() {
|
|
380
|
+
if (this.accessibleName) {
|
|
381
|
+
// accessibleName is set - return labels excluding content
|
|
382
|
+
return `${this._id}-invisibleText`;
|
|
383
|
+
}
|
|
384
|
+
// accessibleName is not set - return _accInfo.listItemAriaLabel including content
|
|
385
|
+
return `${this._id}-content ${this._id}-invisibleText`;
|
|
386
|
+
}
|
|
387
|
+
get ariaLabelledByText() {
|
|
388
|
+
const texts = [
|
|
389
|
+
this._accInfo.listItemAriaLabel,
|
|
390
|
+
this.accessibleName,
|
|
391
|
+
this.typeActive ? ListItem_1.i18nBundle.getText(i18nDefaults.LIST_ITEM_ACTIVE) : undefined,
|
|
392
|
+
].filter(Boolean);
|
|
393
|
+
return texts.join(" ");
|
|
394
|
+
}
|
|
395
|
+
get _accInfo() {
|
|
396
|
+
return {
|
|
397
|
+
role: this.listItemAccessibleRole,
|
|
398
|
+
ariaExpanded: undefined,
|
|
399
|
+
ariaLevel: undefined,
|
|
400
|
+
ariaLabel: ListItem_1.i18nBundle.getText(i18nDefaults.ARIA_LABEL_LIST_ITEM_CHECKBOX),
|
|
401
|
+
ariaLabelRadioButton: ListItem_1.i18nBundle.getText(i18nDefaults.ARIA_LABEL_LIST_ITEM_RADIO_BUTTON),
|
|
402
|
+
ariaSelectedText: this.ariaSelectedText,
|
|
403
|
+
ariaHaspopup: this.accessibilityAttributes.hasPopup,
|
|
404
|
+
setsize: this.accessibilityAttributes.ariaSetsize,
|
|
405
|
+
posinset: this.accessibilityAttributes.ariaPosinset,
|
|
406
|
+
tooltip: this.tooltip,
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
get _hasHighlightColor() {
|
|
410
|
+
return this.highlight !== Highlight$1.None;
|
|
411
|
+
}
|
|
412
|
+
get hasConfigurableMode() {
|
|
413
|
+
return true;
|
|
414
|
+
}
|
|
415
|
+
get _listItem() {
|
|
416
|
+
return this.shadowRoot.querySelector("li");
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
__decorate$3([
|
|
420
|
+
webcomponentsBase.s()
|
|
421
|
+
], ListItem.prototype, "type", void 0);
|
|
422
|
+
__decorate$3([
|
|
423
|
+
webcomponentsBase.s({ type: Object })
|
|
424
|
+
], ListItem.prototype, "accessibilityAttributes", void 0);
|
|
425
|
+
__decorate$3([
|
|
426
|
+
webcomponentsBase.s({ type: Boolean })
|
|
427
|
+
], ListItem.prototype, "navigated", void 0);
|
|
428
|
+
__decorate$3([
|
|
429
|
+
webcomponentsBase.s()
|
|
430
|
+
], ListItem.prototype, "tooltip", void 0);
|
|
431
|
+
__decorate$3([
|
|
432
|
+
webcomponentsBase.s({ type: Boolean })
|
|
433
|
+
], ListItem.prototype, "active", void 0);
|
|
434
|
+
__decorate$3([
|
|
435
|
+
webcomponentsBase.s()
|
|
436
|
+
], ListItem.prototype, "highlight", void 0);
|
|
437
|
+
__decorate$3([
|
|
438
|
+
webcomponentsBase.s({ type: Boolean })
|
|
439
|
+
], ListItem.prototype, "selected", void 0);
|
|
440
|
+
__decorate$3([
|
|
441
|
+
webcomponentsBase.s()
|
|
442
|
+
], ListItem.prototype, "accessibleRole", void 0);
|
|
443
|
+
__decorate$3([
|
|
444
|
+
webcomponentsBase.s()
|
|
445
|
+
], ListItem.prototype, "_forcedAccessibleRole", void 0);
|
|
446
|
+
__decorate$3([
|
|
447
|
+
webcomponentsBase.s()
|
|
448
|
+
], ListItem.prototype, "_selectionMode", void 0);
|
|
449
|
+
__decorate$3([
|
|
450
|
+
webcomponentsBase.s()
|
|
451
|
+
], ListItem.prototype, "mediaRange", void 0);
|
|
452
|
+
__decorate$3([
|
|
453
|
+
webcomponentsBase.d()
|
|
454
|
+
], ListItem.prototype, "deleteButton", void 0);
|
|
455
|
+
__decorate$3([
|
|
456
|
+
parametersBundle_css$1.i("sap/f/gen/ui5/webcomponents")
|
|
457
|
+
], ListItem, "i18nBundle", void 0);
|
|
458
|
+
ListItem = ListItem_1 = __decorate$3([
|
|
459
|
+
webcomponentsBase.m({
|
|
460
|
+
languageAware: true,
|
|
461
|
+
renderer: parametersBundle_css.y,
|
|
462
|
+
styles: [
|
|
463
|
+
ListItemBase.ListItemBase.styles,
|
|
464
|
+
ListItemAdditionalText_css.listItemAdditionalTextCss,
|
|
465
|
+
styles,
|
|
466
|
+
],
|
|
467
|
+
})
|
|
468
|
+
/**
|
|
469
|
+
* Fired when the user clicks on the detail button when type is `Detail`.
|
|
470
|
+
* @public
|
|
471
|
+
*/
|
|
472
|
+
,
|
|
473
|
+
eventStrict.l("detail-click", {
|
|
474
|
+
bubbles: true,
|
|
475
|
+
}),
|
|
476
|
+
eventStrict.l("selection-requested", {
|
|
477
|
+
bubbles: true,
|
|
478
|
+
})
|
|
479
|
+
], ListItem);
|
|
480
|
+
var ListItem$1 = ListItem;
|
|
481
|
+
|
|
482
|
+
class RadioButtonGroup {
|
|
483
|
+
static hasGroup(groupName) {
|
|
484
|
+
return this.groups.has(groupName);
|
|
485
|
+
}
|
|
486
|
+
static getGroup(groupName) {
|
|
487
|
+
return this.groups.get(groupName);
|
|
488
|
+
}
|
|
489
|
+
static getCheckedRadioFromGroup(groupName) {
|
|
490
|
+
return this.checkedRadios.get(groupName);
|
|
491
|
+
}
|
|
492
|
+
static removeGroup(groupName) {
|
|
493
|
+
this.checkedRadios.delete(groupName);
|
|
494
|
+
return this.groups.delete(groupName);
|
|
495
|
+
}
|
|
496
|
+
static addToGroup(radioBtn, groupName) {
|
|
497
|
+
if (this.hasGroup(groupName)) {
|
|
498
|
+
this.enforceSingleSelection(radioBtn, groupName);
|
|
499
|
+
if (this.getGroup(groupName)) {
|
|
500
|
+
this.getGroup(groupName).push(radioBtn);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
else {
|
|
504
|
+
this.createGroup(radioBtn, groupName);
|
|
505
|
+
}
|
|
506
|
+
this.updateTabOrder(groupName);
|
|
507
|
+
}
|
|
508
|
+
static removeFromGroup(radioBtn, groupName) {
|
|
509
|
+
const group = this.getGroup(groupName);
|
|
510
|
+
if (!group) {
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
const checkedRadio = this.getCheckedRadioFromGroup(groupName);
|
|
514
|
+
// Remove the radio button from the given group
|
|
515
|
+
group.forEach((_radioBtn, idx, arr) => {
|
|
516
|
+
if (radioBtn._id === _radioBtn._id) {
|
|
517
|
+
return arr.splice(idx, 1);
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
if (checkedRadio === radioBtn) {
|
|
521
|
+
this.checkedRadios.set(groupName, null);
|
|
522
|
+
}
|
|
523
|
+
// Remove the group if it is empty
|
|
524
|
+
if (!group.length) {
|
|
525
|
+
this.removeGroup(groupName);
|
|
526
|
+
}
|
|
527
|
+
this.updateTabOrder(groupName);
|
|
528
|
+
}
|
|
529
|
+
static createGroup(radioBtn, groupName) {
|
|
530
|
+
if (radioBtn.checked) {
|
|
531
|
+
this.checkedRadios.set(groupName, radioBtn);
|
|
532
|
+
}
|
|
533
|
+
this.groups.set(groupName, [radioBtn]);
|
|
534
|
+
}
|
|
535
|
+
static selectNextItem(item, groupName) {
|
|
536
|
+
const group = this.getGroup(groupName);
|
|
537
|
+
if (!group) {
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
const groupLength = group.length, currentItemPosition = group.indexOf(item);
|
|
541
|
+
if (groupLength <= 1) {
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
const nextItemToFocus = this._nextFocusable(currentItemPosition, group);
|
|
545
|
+
if (!nextItemToFocus) {
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
this.updateSelectionInGroup(nextItemToFocus, groupName);
|
|
549
|
+
}
|
|
550
|
+
static updateFormValidity(groupName) {
|
|
551
|
+
const group = this.getGroup(groupName);
|
|
552
|
+
if (!group) {
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
const hasRequired = group.some(r => r.required);
|
|
556
|
+
const hasChecked = group.some(r => r.checked);
|
|
557
|
+
group.forEach(r => {
|
|
558
|
+
r._groupChecked = hasChecked;
|
|
559
|
+
r._groupRequired = hasRequired;
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
static updateTabOrder(groupName) {
|
|
563
|
+
const group = this.getGroup(groupName);
|
|
564
|
+
if (!group) {
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
const hasCheckedRadio = group.some(radioBtn => radioBtn.checked);
|
|
568
|
+
group.filter(radioBtn => !radioBtn.disabled).forEach((radioBtn, idx) => {
|
|
569
|
+
let activeElement = webcomponentsBase.t();
|
|
570
|
+
if (activeElement?.classList.contains("ui5-radio-root")) {
|
|
571
|
+
activeElement = activeElement.getRootNode();
|
|
572
|
+
if (activeElement instanceof ShadowRoot) {
|
|
573
|
+
activeElement = activeElement.host;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
if (hasCheckedRadio) {
|
|
577
|
+
if (activeElement?.hasAttribute("ui5-radio-button") && activeElement.readonly) {
|
|
578
|
+
radioBtn._tabIndex = activeElement === radioBtn && radioBtn.readonly ? 0 : -1;
|
|
579
|
+
}
|
|
580
|
+
else {
|
|
581
|
+
radioBtn._tabIndex = radioBtn.checked ? 0 : -1;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
else {
|
|
585
|
+
radioBtn._tabIndex = idx === 0 ? 0 : -1;
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
static selectPreviousItem(item, groupName) {
|
|
590
|
+
const group = this.getGroup(groupName);
|
|
591
|
+
if (!group) {
|
|
592
|
+
return;
|
|
593
|
+
}
|
|
594
|
+
const groupLength = group.length, currentItemPosition = group.indexOf(item);
|
|
595
|
+
if (groupLength <= 1) {
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
const previousItemToFocus = this._previousFocusable(currentItemPosition, group);
|
|
599
|
+
if (!previousItemToFocus) {
|
|
600
|
+
return;
|
|
601
|
+
}
|
|
602
|
+
this.updateSelectionInGroup(previousItemToFocus, groupName);
|
|
603
|
+
}
|
|
604
|
+
static selectItem(item, groupName) {
|
|
605
|
+
this.updateSelectionInGroup(item, groupName);
|
|
606
|
+
this.updateTabOrder(groupName);
|
|
607
|
+
this.updateFormValidity(groupName);
|
|
608
|
+
}
|
|
609
|
+
static updateSelectionInGroup(radioBtnToSelect, groupName) {
|
|
610
|
+
const checkedRadio = this.getCheckedRadioFromGroup(groupName);
|
|
611
|
+
if (checkedRadio && !radioBtnToSelect.readonly) {
|
|
612
|
+
this._deselectRadio(checkedRadio);
|
|
613
|
+
this.checkedRadios.set(groupName, radioBtnToSelect);
|
|
614
|
+
}
|
|
615
|
+
// the focusable radio buttons are the enabled and the read-only ones, but only the enabled are selectable
|
|
616
|
+
if (radioBtnToSelect) {
|
|
617
|
+
radioBtnToSelect.focus();
|
|
618
|
+
if (!radioBtnToSelect.readonly) {
|
|
619
|
+
this._selectRadio(radioBtnToSelect);
|
|
620
|
+
}
|
|
621
|
+
else {
|
|
622
|
+
// Ensure updateTabOrder is called after focus
|
|
623
|
+
setTimeout(() => {
|
|
624
|
+
this.updateTabOrder(groupName);
|
|
625
|
+
}, 0);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
static _deselectRadio(radioBtn) {
|
|
630
|
+
if (radioBtn) {
|
|
631
|
+
radioBtn.checked = false;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
static _selectRadio(radioBtn) {
|
|
635
|
+
radioBtn.checked = true;
|
|
636
|
+
radioBtn._checked = true;
|
|
637
|
+
radioBtn.fireDecoratorEvent("change");
|
|
638
|
+
}
|
|
639
|
+
static _nextFocusable(pos, group) {
|
|
640
|
+
if (!group) {
|
|
641
|
+
return null;
|
|
642
|
+
}
|
|
643
|
+
const groupLength = group.length;
|
|
644
|
+
let nextRadioToFocus = null;
|
|
645
|
+
if (pos === groupLength - 1) {
|
|
646
|
+
if (group[0].disabled) {
|
|
647
|
+
return this._nextFocusable(1, group);
|
|
648
|
+
}
|
|
649
|
+
nextRadioToFocus = group[0];
|
|
650
|
+
}
|
|
651
|
+
else if (group[pos + 1].disabled) {
|
|
652
|
+
return this._nextFocusable(pos + 1, group);
|
|
653
|
+
}
|
|
654
|
+
else {
|
|
655
|
+
nextRadioToFocus = group[pos + 1];
|
|
656
|
+
}
|
|
657
|
+
return nextRadioToFocus;
|
|
658
|
+
}
|
|
659
|
+
static _previousFocusable(pos, group) {
|
|
660
|
+
const groupLength = group.length;
|
|
661
|
+
let previousRadioToFocus = null;
|
|
662
|
+
if (pos === 0) {
|
|
663
|
+
if (group[groupLength - 1].disabled) {
|
|
664
|
+
return this._previousFocusable(groupLength - 1, group);
|
|
665
|
+
}
|
|
666
|
+
previousRadioToFocus = group[groupLength - 1];
|
|
667
|
+
}
|
|
668
|
+
else if (group[pos - 1].disabled) {
|
|
669
|
+
return this._previousFocusable(pos - 1, group);
|
|
670
|
+
}
|
|
671
|
+
else {
|
|
672
|
+
previousRadioToFocus = group[pos - 1];
|
|
673
|
+
}
|
|
674
|
+
return previousRadioToFocus;
|
|
675
|
+
}
|
|
676
|
+
static enforceSingleSelection(radioBtn, groupName) {
|
|
677
|
+
const checkedRadio = this.getCheckedRadioFromGroup(groupName);
|
|
678
|
+
if (radioBtn.checked) {
|
|
679
|
+
if (!checkedRadio) {
|
|
680
|
+
this.checkedRadios.set(groupName, radioBtn);
|
|
681
|
+
}
|
|
682
|
+
else if (radioBtn !== checkedRadio) {
|
|
683
|
+
this._deselectRadio(checkedRadio);
|
|
684
|
+
this.checkedRadios.set(groupName, radioBtn);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
else if (radioBtn === checkedRadio) {
|
|
688
|
+
this.checkedRadios.set(groupName, null);
|
|
689
|
+
}
|
|
690
|
+
this.updateTabOrder(groupName);
|
|
691
|
+
this.updateFormValidity(groupName);
|
|
692
|
+
}
|
|
693
|
+
static get groups() {
|
|
694
|
+
if (!this._groups) {
|
|
695
|
+
this._groups = new Map();
|
|
696
|
+
}
|
|
697
|
+
return this._groups;
|
|
698
|
+
}
|
|
699
|
+
static get checkedRadios() {
|
|
700
|
+
if (!this._checkedRadios) {
|
|
701
|
+
this._checkedRadios = new Map();
|
|
702
|
+
}
|
|
703
|
+
return this._checkedRadios;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
function RadioButtonTemplate() {
|
|
708
|
+
return (parametersBundle_css.jsxs("div", { role: "radio", class: "ui5-radio-root", "aria-checked": this.checked, "aria-disabled": this.effectiveAriaDisabled, "aria-describedby": this.effectiveAriaDescribedBy, "aria-label": this.ariaLabelText, tabindex: this.effectiveTabIndex, onClick: this._onclick, onKeyDown: this._onkeydown, onKeyUp: this._onkeyup, onMouseDown: this._onmousedown, onMouseUp: this._onmouseup, onFocusOut: this._onfocusout, children: [parametersBundle_css.jsxs("div", { class: {
|
|
709
|
+
"ui5-radio-inner": true,
|
|
710
|
+
"ui5-radio-inner--hoverable": !this.disabled && !this.readonly && Icons.f(),
|
|
711
|
+
}, children: [parametersBundle_css.jsxs("svg", { class: "ui5-radio-svg", focusable: "false", "aria-hidden": "true", children: [parametersBundle_css.jsx("circle", { part: "outer-ring", class: "ui5-radio-svg-outer", cx: "50%", cy: "50%", r: "50%" }), parametersBundle_css.jsx("circle", { part: "inner-ring", class: "ui5-radio-svg-inner", cx: "50%", cy: "50%" })] }), parametersBundle_css.jsx("input", { type: "radio", required: this.required, checked: this.checked, readonly: this.readonly, disabled: this.disabled, name: this.name, "data-sap-no-tab-ref": true })] }), this.text &&
|
|
712
|
+
parametersBundle_css.jsx(Label, { id: `${this._id}-label`, class: "ui5-radio-label", for: this._id, wrappingType: this.wrappingType, children: this.text }), this.hasValueState &&
|
|
713
|
+
parametersBundle_css.jsx("span", { id: `${this._id}-descr`, class: "ui5-hidden-text", children: this.valueStateText })] }));
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
Icons.p("@" + "ui5" + "/" + "sap/f/thirdparty/webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
|
|
717
|
+
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);
|
|
718
|
+
var radioButtonCss = `.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}:host{min-width:var(--_ui5-v2-15-0_radio_button_min_width);max-width:100%;text-overflow:ellipsis;overflow:hidden;color:var(--_ui5-v2-15-0_radio_button_color);border-radius:var(--_ui5-v2-15-0_radio_button_border_radius)}:host(:not([disabled])) .ui5-radio-root{cursor:pointer}:host([checked]){color:var(--_ui5-v2-15-0_radio_button_checked_fill)}:host([checked]) .ui5-radio-svg-inner{fill:var(--_ui5-v2-15-0_radio_button_inner_ring_color)}:host([checked]) .ui5-radio-svg-outer{stroke:var(--_ui5-v2-15-0_radio_button_outer_ring_color)}:host([disabled]) .ui5-radio-root{color:var(--_ui5-v2-15-0_radio_button_color);opacity:var(--sapContent_DisabledOpacity)}:host([disabled][checked]) .ui5-radio-svg-outer{stroke:var(--_ui5-v2-15-0_radio_button_color)}:host(:not([disabled])[desktop]) .ui5-radio-root:focus:before,:host(:not([disabled])) .ui5-radio-root:focus-visible:before{content:"";display:var(--_ui5-v2-15-0_radio_button_focus_outline);position:absolute;inset:var(--_ui5-v2-15-0_radio_button_focus_dist);pointer-events:none;border:var(--_ui5-v2-15-0_radio_button_border_width) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);border-radius:var(--_ui5-v2-15-0_radio_button_border_radius)}:host(:not([value-state="Negative"]):not([value-state="Critical"]):not([value-state="Positive"]):not([value-state="Information"])) .ui5-radio-root:hover .ui5-radio-inner--hoverable .ui5-radio-svg-outer{stroke:var(--_ui5-v2-15-0_radio_button_outer_ring_hover_color)}:host(:not([value-state="Negative"]):not([value-state="Critical"]):not([value-state="Positive"]):not([value-state="Information"])[checked]) .ui5-radio-root:hover .ui5-radio-inner--hoverable .ui5-radio-svg-outer{stroke:var(--_ui5-v2-15-0_radio_button_outer_ring_checked_hover_color)}.ui5-radio-root:hover .ui5-radio-inner--hoverable .ui5-radio-svg-outer,:host([checked]) .ui5-radio-root:hover .ui5-radio-inner--hoverable .ui5-radio-svg-outer{fill:var(--_ui5-v2-15-0_radio_button_hover_fill)}:host([active][checked]:not([value-state]):not([disabled]):not([readonly])) .ui5-radio-svg-outer{stroke:var(--_ui5-v2-15-0_radio_button_outer_ring_checked_hover_color)}:host([active]:not([checked]):not([value-state]):not([disabled]):not([readonly])) .ui5-radio-svg-outer{stroke:var(--_ui5-v2-15-0_radio_button_outer_ring_active_color)}:host([text]) .ui5-radio-root{padding-inline-end:var(--_ui5-v2-15-0_radio_button_border_width)}:host([text][desktop]) .ui5-radio-root:focus:before,:host([text]) .ui5-radio-root:focus-visible:before{inset-inline-end:0px}:host([text]) .ui5-radio-inner{padding:var(--_ui5-v2-15-0_radio_button_outer_ring_padding_with_label)}:host([checked][readonly]) .ui5-radio-svg-inner{fill:var(--_ui5-v2-15-0_radio_button_read_only_inner_ring_color)}:host([readonly]) .ui5-radio-root .ui5-radio-svg-outer{fill:var(--sapField_ReadOnly_Background);stroke:var(--sapField_ReadOnly_BorderColor);stroke-dasharray:var(--_ui5-v2-15-0_radio_button_read_only_border_type);stroke-width:var(--_ui5-v2-15-0_radio_button_read_only_border_width)}:host([value-state="Negative"]) .ui5-radio-svg-outer,:host([value-state="Critical"]) .ui5-radio-svg-outer{stroke-width:var(--sapField_InvalidBorderWidth)}:host([value-state="Information"]) .ui5-radio-svg-outer{stroke-width:var(--_ui5-v2-15-0_radio_button_information_border_width)}:host([value-state="Negative"][checked]) .ui5-radio-svg-inner{fill:var(--_ui5-v2-15-0_radio_button_checked_error_fill)}:host([value-state="Negative"]) .ui5-radio-svg-outer,:host([value-state="Negative"]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable:hover .ui5-radio-svg-outer{stroke:var(--sapField_InvalidColor);fill:var(--sapField_InvalidBackground)}:host([value-state="Negative"]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable .ui5-radio-svg-outer{fill:var(--_ui5-v2-15-0_radio_button_hover_fill_error)}:host([value-state="Critical"][checked]) .ui5-radio-svg-inner{fill:var(--_ui5-v2-15-0_radio_button_checked_warning_fill)}:host([value-state="Critical"]) .ui5-radio-svg-outer,:host([value-state="Critical"]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable:hover .ui5-radio-svg-outer{stroke:var(--sapField_WarningColor);fill:var(--sapField_WarningBackground)}:host([value-state="Critical"]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable .ui5-radio-svg-outer{fill:var(--_ui5-v2-15-0_radio_button_hover_fill_warning)}:host([value-state="Positive"][checked]) .ui5-radio-svg-inner{fill:var(--_ui5-v2-15-0_radio_button_checked_success_fill)}:host([value-state="Positive"]) .ui5-radio-svg-outer,:host([value-state="Positive"]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable:hover .ui5-radio-svg-outer{stroke:var(--sapField_SuccessColor);fill:var(--sapField_SuccessBackground)}:host([value-state="Positive"]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable .ui5-radio-svg-outer{fill:var(--_ui5-v2-15-0_radio_button_hover_fill_success)}:host([value-state="Information"][checked]) .ui5-radio-svg-inner{fill:var(--_ui5-v2-15-0_radio_button_checked_information_fill)}:host([value-state="Information"]) .ui5-radio-svg-outer,:host([value-state="Information"]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable:hover .ui5-radio-svg-outer{stroke:var(--sapField_InformationColor);fill:var(--sapField_InformationBackground)}:host([value-state="Information"]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable .ui5-radio-svg-outer{fill:var(--_ui5-v2-15-0_radio_button_hover_fill_information)}:host([value-state="Negative"]) .ui5-radio-root,:host([value-state="Critical"]) .ui5-radio-root,:host([value-state="Information"]) .ui5-radio-root{stroke-dasharray:var(--_ui5-v2-15-0_radio_button_warning_error_border_dash)}.ui5-radio-root{height:auto;position:relative;display:inline-flex;flex-wrap:nowrap;outline:none;max-width:100%;box-sizing:border-box;border:var(--_ui5-v2-15-0_radio_button_border);border-radius:var(--_ui5-v2-15-0_radio_button_border_radius)}.ui5-radio-inner{display:flex;align-items:center;padding:var(--_ui5-v2-15-0_radio_button_outer_ring_padding);flex-shrink:0;height:var(--_ui5-v2-15-0_radio_button_inner_size);font-size:1rem;pointer-events:none;vertical-align:top}.ui5-radio-inner{outline:none}.ui5-radio-inner input{-webkit-appearance:none;visibility:hidden;width:0;left:0;position:absolute;font-size:inherit;margin:0}[ui5-label].ui5-radio-label{display:flex;align-items:center;padding-inline-end:var(--_ui5-v2-15-0_radio_button_label_offset);padding-block:var(--_ui5-v2-15-0_radio_button_label_side_padding);vertical-align:top;max-width:100%;pointer-events:none;color:var(--_ui5-v2-15-0_radio_button_label_color);overflow-wrap:break-word}:host([wrapping-type="None"][text]) .ui5-radio-root{height:var(--_ui5-v2-15-0_radio_button_height)}:host([wrapping-type="None"][text]) [ui5-label].ui5-radio-label{text-overflow:ellipsis;overflow:hidden}.ui5-radio-svg{height:var(--_ui5-v2-15-0_radio_button_svg_size);width:var(--_ui5-v2-15-0_radio_button_svg_size);overflow:visible;pointer-events:none}.ui5-radio-svg-outer{fill:var(--_ui5-v2-15-0_radio_button_outer_ring_bg);stroke:currentColor;stroke-width:var(--_ui5-v2-15-0_radio_button_outer_ring_width)}.ui5-radio-svg-inner{fill:none;r:var(--_ui5-v2-15-0_radio_button_inner_ring_radius)}.ui5-radio-svg-outer,.ui5-radio-svg-inner{flex-shrink:0}:host(.ui5-li-singlesel-radiobtn) .ui5-radio-root .ui5-radio-inner .ui5-radio-svg-outer{fill:var(--sapList_Background)}
|
|
719
|
+
`;
|
|
720
|
+
|
|
721
|
+
var __decorate$2 = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
722
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
723
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
724
|
+
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;
|
|
725
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
726
|
+
};
|
|
727
|
+
var RadioButton_1;
|
|
728
|
+
let isGlobalHandlerAttached$1 = false;
|
|
729
|
+
let activeRadio;
|
|
730
|
+
/**
|
|
731
|
+
* @class
|
|
732
|
+
*
|
|
733
|
+
* ### Overview
|
|
734
|
+
*
|
|
735
|
+
* The `ui5-radio-button` component enables users to select a single option from a set of options.
|
|
736
|
+
* When a `ui5-radio-button` is selected by the user, the
|
|
737
|
+
* `change` event is fired.
|
|
738
|
+
* When a `ui5-radio-button` that is within a group is selected, the one
|
|
739
|
+
* that was previously selected gets automatically deselected. You can group radio buttons by using the `name` property.
|
|
740
|
+
*
|
|
741
|
+
* **Note:** If `ui5-radio-button` is not part of a group, it can be selected once, but can not be deselected back.
|
|
742
|
+
*
|
|
743
|
+
* ### Keyboard Handling
|
|
744
|
+
*
|
|
745
|
+
* Once the `ui5-radio-button` is on focus, it might be selected by pressing the Space and Enter keys.
|
|
746
|
+
*
|
|
747
|
+
* The Arrow Down/Arrow Up and Arrow Left/Arrow Right keys can be used to change selection between next/previous radio buttons in one group,
|
|
748
|
+
* while TAB and SHIFT + TAB can be used to enter or leave the radio button group.
|
|
749
|
+
*
|
|
750
|
+
* **Note:** On entering radio button group, the focus goes to the currently selected radio button.
|
|
751
|
+
*
|
|
752
|
+
* ### ES6 Module Import
|
|
753
|
+
*
|
|
754
|
+
* `import "sap/f/gen/ui5/webcomponents/dist/RadioButton";`
|
|
755
|
+
* @constructor
|
|
756
|
+
* @extends UI5Element
|
|
757
|
+
* @public
|
|
758
|
+
* @csspart outer-ring - Used to style the outer ring of the `ui5-radio-button`.
|
|
759
|
+
* @csspart inner-ring - Used to style the inner ring of the `ui5-radio-button`.
|
|
760
|
+
*/
|
|
761
|
+
let RadioButton = RadioButton_1 = class RadioButton extends webcomponentsBase.b {
|
|
762
|
+
get formValidityMessage() {
|
|
763
|
+
return RadioButton_1.i18nBundle.getText(i18nDefaults.FORM_SELECTABLE_REQUIRED2);
|
|
764
|
+
}
|
|
765
|
+
get formValidity() {
|
|
766
|
+
return { valueMissing: this._groupRequired && !this._groupChecked };
|
|
767
|
+
}
|
|
768
|
+
async formElementAnchor() {
|
|
769
|
+
return this.getFocusDomRefAsync();
|
|
770
|
+
}
|
|
771
|
+
get formFormattedValue() {
|
|
772
|
+
return this.checked ? (this.value || "on") : null;
|
|
773
|
+
}
|
|
774
|
+
constructor() {
|
|
775
|
+
super();
|
|
776
|
+
/**
|
|
777
|
+
* Defines whether the component is disabled.
|
|
778
|
+
*
|
|
779
|
+
* **Note:** A disabled component is completely noninteractive.
|
|
780
|
+
* @default false
|
|
781
|
+
* @public
|
|
782
|
+
*/
|
|
783
|
+
this.disabled = false;
|
|
784
|
+
/**
|
|
785
|
+
* Defines whether the component is read-only.
|
|
786
|
+
*
|
|
787
|
+
* **Note:** A read-only component isn't editable or selectable.
|
|
788
|
+
* However, because it's focusable, it still provides visual feedback upon user interaction.
|
|
789
|
+
* @default false
|
|
790
|
+
* @public
|
|
791
|
+
*/
|
|
792
|
+
this.readonly = false;
|
|
793
|
+
/**
|
|
794
|
+
* Defines whether the component is required.
|
|
795
|
+
* @default false
|
|
796
|
+
* @public
|
|
797
|
+
* @since 1.9.0
|
|
798
|
+
*/
|
|
799
|
+
this.required = false;
|
|
800
|
+
/**
|
|
801
|
+
* Defines whether the component is checked or not.
|
|
802
|
+
*
|
|
803
|
+
* **Note:** The property value can be changed with user interaction,
|
|
804
|
+
* either by clicking/tapping on the component,
|
|
805
|
+
* or by using the Space or Enter key.
|
|
806
|
+
*
|
|
807
|
+
* **Note:** Only enabled radio buttons can be checked.
|
|
808
|
+
* Read-only radio buttons are not selectable, and therefore are always unchecked.
|
|
809
|
+
* @default false
|
|
810
|
+
* @formEvents change
|
|
811
|
+
* @formProperty
|
|
812
|
+
* @public
|
|
813
|
+
* @since 1.0.0-rc.15
|
|
814
|
+
*/
|
|
815
|
+
this.checked = false;
|
|
816
|
+
/**
|
|
817
|
+
* Defines the value state of the component.
|
|
818
|
+
* @default "None"
|
|
819
|
+
* @public
|
|
820
|
+
*/
|
|
821
|
+
this.valueState = "None";
|
|
822
|
+
/**
|
|
823
|
+
* Defines the form value of the component.
|
|
824
|
+
* When a form with a radio button group is submitted, the group's value
|
|
825
|
+
* will be the value of the currently selected radio button.
|
|
826
|
+
* @default ""
|
|
827
|
+
* @public
|
|
828
|
+
*/
|
|
829
|
+
this.value = "";
|
|
830
|
+
/**
|
|
831
|
+
* Defines whether the component text wraps when there is not enough space.
|
|
832
|
+
*
|
|
833
|
+
* **Note:** for option "Normal" the text will wrap and the words will not be broken based on hyphenation.
|
|
834
|
+
* @default "Normal"
|
|
835
|
+
* @public
|
|
836
|
+
*/
|
|
837
|
+
this.wrappingType = "Normal";
|
|
838
|
+
/**
|
|
839
|
+
* Defines the active state (pressed or not) of the component.
|
|
840
|
+
* @default false
|
|
841
|
+
* @private
|
|
842
|
+
*/
|
|
843
|
+
this.active = false;
|
|
844
|
+
/**
|
|
845
|
+
* Defines if the component is selected in specific group
|
|
846
|
+
* @default false
|
|
847
|
+
* @private
|
|
848
|
+
*/
|
|
849
|
+
this._groupChecked = false;
|
|
850
|
+
this._groupRequired = false;
|
|
851
|
+
this._name = "";
|
|
852
|
+
this._checked = false;
|
|
853
|
+
this._deactivate = () => {
|
|
854
|
+
if (activeRadio) {
|
|
855
|
+
activeRadio.active = false;
|
|
856
|
+
}
|
|
857
|
+
};
|
|
858
|
+
if (!isGlobalHandlerAttached$1) {
|
|
859
|
+
document.addEventListener("mouseup", this._deactivate);
|
|
860
|
+
isGlobalHandlerAttached$1 = true;
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
onAfterRendering() {
|
|
864
|
+
this.syncGroup();
|
|
865
|
+
}
|
|
866
|
+
onEnterDOM() {
|
|
867
|
+
if (Icons.f()) {
|
|
868
|
+
this.setAttribute("desktop", "");
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
onExitDOM() {
|
|
872
|
+
this.syncGroup(true);
|
|
873
|
+
}
|
|
874
|
+
syncGroup(forceRemove) {
|
|
875
|
+
const oldGroup = this._name;
|
|
876
|
+
const currentGroup = this.name;
|
|
877
|
+
const oldChecked = this._checked;
|
|
878
|
+
const currentChecked = this.checked;
|
|
879
|
+
if (forceRemove) {
|
|
880
|
+
RadioButtonGroup.removeFromGroup(this, oldGroup);
|
|
881
|
+
}
|
|
882
|
+
if (currentGroup !== oldGroup) {
|
|
883
|
+
if (oldGroup) {
|
|
884
|
+
// remove the control from the previous group
|
|
885
|
+
RadioButtonGroup.removeFromGroup(this, oldGroup);
|
|
886
|
+
}
|
|
887
|
+
if (currentGroup) {
|
|
888
|
+
// add the control to the existing group
|
|
889
|
+
RadioButtonGroup.addToGroup(this, currentGroup);
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
else if (currentGroup && this.isConnected) {
|
|
893
|
+
RadioButtonGroup.enforceSingleSelection(this, currentGroup);
|
|
894
|
+
}
|
|
895
|
+
if (this.name && currentChecked !== oldChecked) {
|
|
896
|
+
RadioButtonGroup.updateTabOrder(this.name);
|
|
897
|
+
}
|
|
898
|
+
this._name = this.name || "";
|
|
899
|
+
this._checked = this.checked;
|
|
900
|
+
}
|
|
901
|
+
_onclick() {
|
|
902
|
+
return this.toggle();
|
|
903
|
+
}
|
|
904
|
+
_handleDown(e) {
|
|
905
|
+
const currentGroup = this.name;
|
|
906
|
+
if (!currentGroup) {
|
|
907
|
+
return;
|
|
908
|
+
}
|
|
909
|
+
e.preventDefault();
|
|
910
|
+
RadioButtonGroup.selectNextItem(this, currentGroup);
|
|
911
|
+
}
|
|
912
|
+
_handleUp(e) {
|
|
913
|
+
const currentGroup = this.name;
|
|
914
|
+
if (!currentGroup) {
|
|
915
|
+
return;
|
|
916
|
+
}
|
|
917
|
+
e.preventDefault();
|
|
918
|
+
RadioButtonGroup.selectPreviousItem(this, currentGroup);
|
|
919
|
+
}
|
|
920
|
+
_onkeydown(e) {
|
|
921
|
+
if (webcomponentsBase.A(e)) {
|
|
922
|
+
this.active = true;
|
|
923
|
+
return e.preventDefault();
|
|
924
|
+
}
|
|
925
|
+
if (webcomponentsBase.b$1(e)) {
|
|
926
|
+
this.active = true;
|
|
927
|
+
return this.toggle();
|
|
928
|
+
}
|
|
929
|
+
const isRTL = this.effectiveDir === "rtl";
|
|
930
|
+
if (webcomponentsBase._(e) || (!isRTL && webcomponentsBase.R(e)) || (isRTL && webcomponentsBase.D(e))) {
|
|
931
|
+
this._handleDown(e);
|
|
932
|
+
}
|
|
933
|
+
if (webcomponentsBase.P(e) || (!isRTL && webcomponentsBase.D(e)) || (isRTL && webcomponentsBase.R(e))) {
|
|
934
|
+
this._handleUp(e);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
_onkeyup(e) {
|
|
938
|
+
if (webcomponentsBase.A(e)) {
|
|
939
|
+
this.toggle();
|
|
940
|
+
}
|
|
941
|
+
this.active = false;
|
|
942
|
+
}
|
|
943
|
+
_onmousedown() {
|
|
944
|
+
this.active = true;
|
|
945
|
+
activeRadio = this; // eslint-disable-line
|
|
946
|
+
}
|
|
947
|
+
_onmouseup() {
|
|
948
|
+
this.active = false;
|
|
949
|
+
}
|
|
950
|
+
_onfocusout() {
|
|
951
|
+
this.active = false;
|
|
952
|
+
}
|
|
953
|
+
toggle() {
|
|
954
|
+
if (!this.canToggle()) {
|
|
955
|
+
return this;
|
|
956
|
+
}
|
|
957
|
+
if (!this.name) {
|
|
958
|
+
this.checked = !this.checked;
|
|
959
|
+
this.fireDecoratorEvent("change");
|
|
960
|
+
return this;
|
|
961
|
+
}
|
|
962
|
+
RadioButtonGroup.selectItem(this, this.name);
|
|
963
|
+
return this;
|
|
964
|
+
}
|
|
965
|
+
canToggle() {
|
|
966
|
+
return !(this.disabled || this.readonly || this.checked);
|
|
967
|
+
}
|
|
968
|
+
get effectiveAriaDisabled() {
|
|
969
|
+
return (this.disabled || this.readonly) ? true : undefined;
|
|
970
|
+
}
|
|
971
|
+
get ariaLabelText() {
|
|
972
|
+
return [AccessibilityTextsHelper.A(this), this.text].filter(Boolean).join(" ");
|
|
973
|
+
}
|
|
974
|
+
get effectiveAriaDescribedBy() {
|
|
975
|
+
return this.hasValueState ? `${this._id}-descr` : undefined;
|
|
976
|
+
}
|
|
977
|
+
get hasValueState() {
|
|
978
|
+
return this.valueState !== ValueState.o.None;
|
|
979
|
+
}
|
|
980
|
+
get valueStateText() {
|
|
981
|
+
switch (this.valueState) {
|
|
982
|
+
case ValueState.o.Negative:
|
|
983
|
+
return RadioButton_1.i18nBundle.getText(i18nDefaults.VALUE_STATE_ERROR);
|
|
984
|
+
case ValueState.o.Critical:
|
|
985
|
+
return RadioButton_1.i18nBundle.getText(i18nDefaults.VALUE_STATE_WARNING);
|
|
986
|
+
case ValueState.o.Positive:
|
|
987
|
+
return RadioButton_1.i18nBundle.getText(i18nDefaults.VALUE_STATE_SUCCESS);
|
|
988
|
+
case ValueState.o.Information:
|
|
989
|
+
return RadioButton_1.i18nBundle.getText(i18nDefaults.VALUE_STATE_INFORMATION);
|
|
990
|
+
default:
|
|
991
|
+
return "";
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
get effectiveTabIndex() {
|
|
995
|
+
const tabindex = this.getAttribute("tabindex");
|
|
996
|
+
if (this.disabled) {
|
|
997
|
+
return -1;
|
|
998
|
+
}
|
|
999
|
+
if (this.name) {
|
|
1000
|
+
return this._tabIndex;
|
|
1001
|
+
}
|
|
1002
|
+
return tabindex ? parseInt(tabindex) : 0;
|
|
1003
|
+
}
|
|
1004
|
+
};
|
|
1005
|
+
__decorate$2([
|
|
1006
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1007
|
+
], RadioButton.prototype, "disabled", void 0);
|
|
1008
|
+
__decorate$2([
|
|
1009
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1010
|
+
], RadioButton.prototype, "readonly", void 0);
|
|
1011
|
+
__decorate$2([
|
|
1012
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1013
|
+
], RadioButton.prototype, "required", void 0);
|
|
1014
|
+
__decorate$2([
|
|
1015
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1016
|
+
], RadioButton.prototype, "checked", void 0);
|
|
1017
|
+
__decorate$2([
|
|
1018
|
+
webcomponentsBase.s()
|
|
1019
|
+
], RadioButton.prototype, "text", void 0);
|
|
1020
|
+
__decorate$2([
|
|
1021
|
+
webcomponentsBase.s()
|
|
1022
|
+
], RadioButton.prototype, "valueState", void 0);
|
|
1023
|
+
__decorate$2([
|
|
1024
|
+
webcomponentsBase.s()
|
|
1025
|
+
], RadioButton.prototype, "name", void 0);
|
|
1026
|
+
__decorate$2([
|
|
1027
|
+
webcomponentsBase.s()
|
|
1028
|
+
], RadioButton.prototype, "value", void 0);
|
|
1029
|
+
__decorate$2([
|
|
1030
|
+
webcomponentsBase.s()
|
|
1031
|
+
], RadioButton.prototype, "wrappingType", void 0);
|
|
1032
|
+
__decorate$2([
|
|
1033
|
+
webcomponentsBase.s()
|
|
1034
|
+
], RadioButton.prototype, "accessibleName", void 0);
|
|
1035
|
+
__decorate$2([
|
|
1036
|
+
webcomponentsBase.s()
|
|
1037
|
+
], RadioButton.prototype, "accessibleNameRef", void 0);
|
|
1038
|
+
__decorate$2([
|
|
1039
|
+
webcomponentsBase.s({ type: Number })
|
|
1040
|
+
], RadioButton.prototype, "_tabIndex", void 0);
|
|
1041
|
+
__decorate$2([
|
|
1042
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1043
|
+
], RadioButton.prototype, "active", void 0);
|
|
1044
|
+
__decorate$2([
|
|
1045
|
+
webcomponentsBase.s({ type: Boolean, noAttribute: true })
|
|
1046
|
+
], RadioButton.prototype, "_groupChecked", void 0);
|
|
1047
|
+
__decorate$2([
|
|
1048
|
+
webcomponentsBase.s({ type: Boolean, noAttribute: true })
|
|
1049
|
+
], RadioButton.prototype, "_groupRequired", void 0);
|
|
1050
|
+
__decorate$2([
|
|
1051
|
+
parametersBundle_css$1.i("sap/f/gen/ui5/webcomponents")
|
|
1052
|
+
], RadioButton, "i18nBundle", void 0);
|
|
1053
|
+
RadioButton = RadioButton_1 = __decorate$2([
|
|
1054
|
+
webcomponentsBase.m({
|
|
1055
|
+
tag: "ui5-radio-button",
|
|
1056
|
+
languageAware: true,
|
|
1057
|
+
formAssociated: true,
|
|
1058
|
+
renderer: parametersBundle_css.y,
|
|
1059
|
+
template: RadioButtonTemplate,
|
|
1060
|
+
styles: radioButtonCss,
|
|
1061
|
+
})
|
|
1062
|
+
/**
|
|
1063
|
+
* Fired when the component checked state changes.
|
|
1064
|
+
* @public
|
|
1065
|
+
* @since 1.0.0-rc.15
|
|
1066
|
+
*/
|
|
1067
|
+
,
|
|
1068
|
+
eventStrict.l("change", {
|
|
1069
|
+
bubbles: true,
|
|
1070
|
+
})
|
|
1071
|
+
], RadioButton);
|
|
1072
|
+
RadioButton.define();
|
|
1073
|
+
var RadioButton$1 = RadioButton;
|
|
1074
|
+
|
|
1075
|
+
Icons.p("@" + "ui5" + "/" + "sap/f/thirdparty/webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
|
|
1076
|
+
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);
|
|
1077
|
+
var checkboxCss = `.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{-webkit-tap-highlight-color:rgba(0,0,0,0)}:host(:not([hidden])){display:inline-block}:host([required]){vertical-align:middle}:host{overflow:hidden;max-width:100%;outline:none;border-radius:var(--_ui5-v2-15-0_checkbox_border_radius);transition:var(--_ui5-v2-15-0_checkbox_transition);cursor:pointer;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}:host([disabled]){cursor:default}:host([disabled]) .ui5-checkbox-root{opacity:var(--_ui5-v2-15-0_checkbox_disabled_opacity)}:host([disabled]) .ui5-checkbox-inner{border-color:var(--_ui5-v2-15-0_checkbox_inner_disabled_border_color)}:host([disabled]) .ui5-checkbox-label{color:var(--_ui5-v2-15-0_checkbox_disabled_label_color)}:host([readonly]:not([value-state="Critical"]):not([value-state="Negative"])) .ui5-checkbox-inner{background:var(--sapField_ReadOnly_Background);border:var(--_ui5-v2-15-0_checkbox_inner_readonly_border);color:var(--sapField_TextColor)}:host(:not([wrapping-type="None"])[text]) .ui5-checkbox-root{min-height:auto;box-sizing:border-box;align-items:flex-start;padding-top:var(--_ui5-v2-15-0_checkbox_root_side_padding);padding-bottom:var(--_ui5-v2-15-0_checkbox_root_side_padding)}:host(:not([wrapping-type="None"])[text]) .ui5-checkbox-root .ui5-checkbox-label{overflow-wrap:break-word;align-self:center}:host([desktop][text]:not([wrapping-type="None"])) .ui5-checkbox-root:focus:before,.ui5-checkbox-root[text]:focus-visible:before{inset-block:var(--_ui5-v2-15-0_checkbox_wrapped_focus_inset_block)}:host([value-state="Negative"]) .ui5-checkbox-inner,:host([value-state="Negative"]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--sapField_InvalidBackground);border:var(--_ui5-v2-15-0_checkbox_inner_error_border);color:var(--sapField_InvalidColor)}:host([value-state="Negative"]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--_ui5-v2-15-0_checkbox_inner_error_background_hover)}:host([value-state="Critical"]) .ui5-checkbox-inner,:host([value-state="Critical"]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--sapField_WarningBackground);border:var(--_ui5-v2-15-0_checkbox_inner_warning_border);color:var(--_ui5-v2-15-0_checkbox_inner_warning_color)}:host([value-state="Critical"]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--_ui5-v2-15-0_checkbox_inner_warning_background_hover)}:host([value-state="Information"]) .ui5-checkbox-inner,:host([value-state="Information"]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--sapField_InformationBackground);border:var(--_ui5-v2-15-0_checkbox_inner_information_border);color:var(--_ui5-v2-15-0_checkbox_inner_information_color)}:host([value-state="Information"]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--_ui5-v2-15-0_checkbox_inner_information_background_hover)}:host([value-state="Positive"]) .ui5-checkbox-inner,:host([value-state="Positive"]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--sapField_SuccessBackground);border:var(--_ui5-v2-15-0_checkbox_inner_success_border);color:var(--sapField_SuccessColor)}:host([value-state="Positive"]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--_ui5-v2-15-0_checkbox_inner_success_background_hover)}:host([value-state="Critical"]) .ui5-checkbox-icon,:host([value-state="Critical"][indeterminate]) .ui5-checkbox-inner:after{color:var(--_ui5-v2-15-0_checkbox_checkmark_warning_color)}.ui5-checkbox-root{position:relative;display:inline-flex;align-items:center;max-width:100%;min-height:var(--_ui5-v2-15-0_checkbox_width_height);min-width:var(--_ui5-v2-15-0_checkbox_width_height);padding:0 var(--_ui5-v2-15-0_checkbox_wrapper_padding);outline:none;transition:var(--_ui5-v2-15-0_checkbox_transition);border:var(--_ui5-v2-15-0_checkbox_default_focus_border);border-radius:var(--_ui5-v2-15-0_checkbox_border_radius);box-sizing:border-box}:host([desktop]) .ui5-checkbox-root:focus:before,.ui5-checkbox-root:focus-visible:before{display:var(--_ui5-v2-15-0_checkbox_focus_outline_display);content:"";position:absolute;inset-inline:var(--_ui5-v2-15-0_checkbox_focus_position);inset-block:var(--_ui5-v2-15-0_checkbox_focus_position);border:var(--_ui5-v2-15-0_checkbox_focus_outline);border-radius:var(--_ui5-v2-15-0_checkbox_focus_border_radius)}:host([text]) .ui5-checkbox-root{padding-inline-end:var(--_ui5-v2-15-0_checkbox_right_focus_distance)}:host([text]) .ui5-checkbox-root:focus:before,:host([text]) .ui5-checkbox-root:focus-visible:before{inset-inline-end:0}:host(:hover:not([disabled])){background:var(--_ui5-v2-15-0_checkbox_outer_hover_background)}.ui5-checkbox--hoverable .ui5-checkbox-label:hover{color:var(--_ui5-v2-15-0_checkbox_label_color)}:host(:not([active]):not([checked]):not([value-state])) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner,:host(:not([active]):not([checked])[value-state="None"]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--_ui5-v2-15-0_checkbox_hover_background);border-color:var(--_ui5-v2-15-0_checkbox_inner_hover_border_color)}:host(:not([active])[checked]:not([value-state])) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner,:host(:not([active])[checked][value-state="None"]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--_ui5-v2-15-0_checkbox_hover_background);border-color:var(--_ui5-v2-15-0_checkbox_inner_hover_checked_border_color)}:host([checked]:not([value-state])) .ui5-checkbox-inner,:host([checked][value-state="None"]) .ui5-checkbox-inner{border-color:var(--_ui5-v2-15-0_checkbox_inner_selected_border_color)}:host([active]:not([checked]):not([value-state]):not([disabled])) .ui5-checkbox-inner,:host([active]:not([checked])[value-state="None"]:not([disabled])) .ui5-checkbox-inner{border-color:var(--_ui5-v2-15-0_checkbox_inner_active_border_color);background-color:var(--_ui5-v2-15-0_checkbox_active_background)}:host([active][checked]:not([value-state]):not([disabled])) .ui5-checkbox-inner,:host([active][checked][value-state="None"]:not([disabled])) .ui5-checkbox-inner{border-color:var(--_ui5-v2-15-0_checkbox_inner_selected_border_color);background-color:var(--_ui5-v2-15-0_checkbox_active_background)}.ui5-checkbox-inner{min-width:var(--_ui5-v2-15-0_checkbox_inner_width_height);max-width:var(--_ui5-v2-15-0_checkbox_inner_width_height);height:var(--_ui5-v2-15-0_checkbox_inner_width_height);max-height:var(--_ui5-v2-15-0_checkbox_inner_width_height);border:var(--_ui5-v2-15-0_checkbox_inner_border);border-radius:var(--_ui5-v2-15-0_checkbox_inner_border_radius);background:var(--_ui5-v2-15-0_checkbox_inner_background);color:var(--_ui5-v2-15-0_checkbox_checkmark_color);box-sizing:border-box;position:relative;cursor:inherit}:host([indeterminate][checked]) .ui5-checkbox-inner:after{content:"";background-color:currentColor;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:var(--_ui5-v2-15-0_checkbox_partially_icon_size);height:var(--_ui5-v2-15-0_checkbox_partially_icon_size)}:host input{-webkit-appearance:none;visibility:hidden;width:0;left:0;position:absolute;font-size:inherit}.ui5-checkbox-root .ui5-checkbox-label{margin-inline-start:var(--_ui5-v2-15-0_checkbox_label_offset);cursor:inherit;text-overflow:ellipsis;overflow:hidden;pointer-events:none;color:var(--_ui5-v2-15-0_checkbox_label_color)}.ui5-checkbox-icon{width:var(--_ui5-v2-15-0_checkbox_icon_size);height:var(--_ui5-v2-15-0_checkbox_icon_size);color:currentColor;cursor:inherit;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}:host([display-only]){cursor:default}:host([display-only]) .ui5-checkbox-display-only-icon-inner [ui5-icon]{color:var(--sapTextColor)}:host([display-only]) .ui5-checkbox-display-only-icon-inner{min-width:var(--_ui5-v2-15-0_checkbox_inner_width_height);max-width:var(--_ui5-v2-15-0_checkbox_inner_width_height);height:var(--_ui5-v2-15-0_checkbox_inner_width_height);max-height:var(--_ui5-v2-15-0_checkbox_inner_width_height);display:flex;align-items:center;justify-content:center}
|
|
1078
|
+
`;
|
|
1079
|
+
|
|
1080
|
+
const name$7 = "accept";
|
|
1081
|
+
const pathData$7 = "M455.8 94q9 9 3 19l-222 326q-4 8-12 9t-14-5l-151-167q-5-5-4.5-11t5.5-11l25-25q12-12 23 0l96 96q5 5 13 4.5t12-8.5l175-249q4-7 11.5-8t13.5 4z";
|
|
1082
|
+
const ltr$7 = true;
|
|
1083
|
+
const collection$7 = "SAP-icons-v4";
|
|
1084
|
+
const packageName$7 = "sap/f/gen/ui5/webcomponents-icons";
|
|
1085
|
+
|
|
1086
|
+
Icons.y(name$7, { pathData: pathData$7, ltr: ltr$7, collection: collection$7, packageName: packageName$7 });
|
|
1087
|
+
|
|
1088
|
+
const name$6 = "accept";
|
|
1089
|
+
const pathData$6 = "M187 416q-12 0-20-9L71 299q-7-7-7-17 0-11 7.5-18.5T90 256q12 0 19 9l77 87 217-247q8-9 19-9t18.5 7.5T448 122q0 10-6 16L206 407q-7 9-19 9z";
|
|
1090
|
+
const ltr$6 = true;
|
|
1091
|
+
const collection$6 = "SAP-icons-v5";
|
|
1092
|
+
const packageName$6 = "sap/f/gen/ui5/webcomponents-icons";
|
|
1093
|
+
|
|
1094
|
+
Icons.y(name$6, { pathData: pathData$6, ltr: ltr$6, collection: collection$6, packageName: packageName$6 });
|
|
1095
|
+
|
|
1096
|
+
var checkIcon = "accept";
|
|
1097
|
+
|
|
1098
|
+
const name$5 = "complete";
|
|
1099
|
+
const pathData$5 = "M431.958 320h32v128q0 14-9.5 23t-22.5 9h-384q-14 0-23-9t-9-23V64q0-13 9-22.5t23-9.5h128v32h-128v384h384V320zm60-295q7 7 2 16l-185 272q-3 6-10 7t-12-4l-125-139q-9-9 0-18l21-21q10-10 19 0l80 80q5 5 11.5 4t9.5-8l146-207q3-6 9.5-7t11.5 4z";
|
|
1100
|
+
const ltr$5 = true;
|
|
1101
|
+
const collection$5 = "SAP-icons-v4";
|
|
1102
|
+
const packageName$5 = "sap/f/gen/ui5/webcomponents-icons";
|
|
1103
|
+
|
|
1104
|
+
Icons.y(name$5, { pathData: pathData$5, ltr: ltr$5, collection: collection$5, packageName: packageName$5 });
|
|
1105
|
+
|
|
1106
|
+
const name$4 = "complete";
|
|
1107
|
+
const pathData$4 = "M438 224q11 0 18.5 7.5T464 250v140q0 38-26 64t-64 26H106q-38 0-64-26t-26-64V122q0-38 26-64t64-26h237q11 0 18 7.5t7 18.5-7 18-18 7H106q-16 0-27.5 11.5T67 122v268q0 16 11.5 27.5T106 429h268q16 0 27.5-11.5T413 390V250q0-11 7-18.5t18-7.5zm32-192q11 0 18.5 7.5T496 58q0 10-7 17L257 312q-6 8-18 8-10 0-18-8l-70-71q-7-7-7-18t7.5-18 18.5-7 18 7l51 53L452 40q8-8 18-8z";
|
|
1108
|
+
const ltr$4 = true;
|
|
1109
|
+
const collection$4 = "SAP-icons-v5";
|
|
1110
|
+
const packageName$4 = "sap/f/gen/ui5/webcomponents-icons";
|
|
1111
|
+
|
|
1112
|
+
Icons.y(name$4, { pathData: pathData$4, ltr: ltr$4, collection: collection$4, packageName: packageName$4 });
|
|
1113
|
+
|
|
1114
|
+
var complete = "complete";
|
|
1115
|
+
|
|
1116
|
+
const name$3 = "border";
|
|
1117
|
+
const pathData$3 = "M448 32q13 0 22.5 9t9.5 23v384q0 14-9.5 23t-22.5 9H64q-14 0-23-9t-9-23V64q0-14 9-23t23-9h384zm0 32H64v384h384V64z";
|
|
1118
|
+
const ltr$3 = false;
|
|
1119
|
+
const collection$3 = "SAP-icons-v4";
|
|
1120
|
+
const packageName$3 = "sap/f/gen/ui5/webcomponents-icons";
|
|
1121
|
+
|
|
1122
|
+
Icons.y(name$3, { pathData: pathData$3, ltr: ltr$3, collection: collection$3, packageName: packageName$3 });
|
|
1123
|
+
|
|
1124
|
+
const name$2 = "border";
|
|
1125
|
+
const pathData$2 = "M390 480H122q-38 0-64-26t-26-64V122q0-38 26-64t64-26h268q38 0 64 26t26 64v268q0 38-26 64t-64 26zM122 83q-17 0-28 11t-11 28v268q0 17 11 28t28 11h268q17 0 28-11t11-28V122q0-17-11-28t-28-11H122z";
|
|
1126
|
+
const ltr$2 = false;
|
|
1127
|
+
const collection$2 = "SAP-icons-v5";
|
|
1128
|
+
const packageName$2 = "sap/f/gen/ui5/webcomponents-icons";
|
|
1129
|
+
|
|
1130
|
+
Icons.y(name$2, { pathData: pathData$2, ltr: ltr$2, collection: collection$2, packageName: packageName$2 });
|
|
1131
|
+
|
|
1132
|
+
var border = "border";
|
|
1133
|
+
|
|
1134
|
+
const name$1 = "tri-state";
|
|
1135
|
+
const pathData$1 = "M448 32q13 0 22.5 9.5T480 64v384q0 14-9.5 23t-22.5 9H64q-14 0-23-9t-9-23V64q0-13 9-22.5T64 32h384zm0 32H64v384h384V64zM160 345V169q0-8 8-8h176q8 0 8 8v176q0 8-8 8H168q-8 0-8-8z";
|
|
1136
|
+
const ltr$1 = false;
|
|
1137
|
+
const collection$1 = "SAP-icons-v4";
|
|
1138
|
+
const packageName$1 = "sap/f/gen/ui5/webcomponents-icons";
|
|
1139
|
+
|
|
1140
|
+
Icons.y(name$1, { pathData: pathData$1, ltr: ltr$1, collection: collection$1, packageName: packageName$1 });
|
|
1141
|
+
|
|
1142
|
+
const name = "tri-state";
|
|
1143
|
+
const pathData = "M390 32q38 0 64 26t26 64v268q0 38-26 64t-64 26H122q-38 0-64-26t-26-64V122q0-38 26-64t64-26h268zm39 90q0-17-11-28t-28-11H122q-17 0-28 11t-11 28v268q0 17 11 28t28 11h268q17 0 28-11t11-28V122zm-77 38v192H160V160h192z";
|
|
1144
|
+
const ltr = false;
|
|
1145
|
+
const collection = "SAP-icons-v5";
|
|
1146
|
+
const packageName = "sap/f/gen/ui5/webcomponents-icons";
|
|
1147
|
+
|
|
1148
|
+
Icons.y(name, { pathData, ltr, collection, packageName });
|
|
1149
|
+
|
|
1150
|
+
var triState = "tri-state";
|
|
1151
|
+
|
|
1152
|
+
function CheckBoxTemplate() {
|
|
1153
|
+
return (parametersBundle_css.jsxs("div", { class: {
|
|
1154
|
+
"ui5-checkbox-root": true,
|
|
1155
|
+
"ui5-checkbox--hoverable": !this.disabled && !this.readonly && Icons.f(),
|
|
1156
|
+
}, role: this.accInfo.role, part: "root", "aria-checked": this.accInfo.ariaChecked, "aria-readonly": this.accInfo.ariaReadonly, "aria-disabled": this.accInfo.ariaDisabled, "aria-label": this.ariaLabelText, "aria-labelledby": this.ariaLabelledBy, "aria-describedby": this.ariaDescribedBy, "aria-required": this.accInfo.ariaRequired, tabindex: this.accInfo.tabindex, onMouseDown: this._onmousedown, onMouseUp: this._onmouseup, onKeyDown: this._onkeydown, onKeyUp: this._onkeyup, onClick: this._onclick, onFocusOut: this._onfocusout, children: [this.isDisplayOnly ?
|
|
1157
|
+
parametersBundle_css.jsx("div", { class: "ui5-checkbox-display-only-icon-inner", children: parametersBundle_css.jsx(Icon.Icon, { "aria-hidden": "true", name: displayOnlyIcon.call(this), class: "ui5-checkbox-display-only-icon", part: "icon" }) })
|
|
1158
|
+
:
|
|
1159
|
+
parametersBundle_css.jsx("div", { id: `${this._id}-CbBg`, class: "ui5-checkbox-inner", children: this.isCompletelyChecked &&
|
|
1160
|
+
parametersBundle_css.jsx(Icon.Icon, { "aria-hidden": "true", name: checkIcon, class: "ui5-checkbox-icon", part: "icon" }) }), this.accInfo.role === "checkbox" &&
|
|
1161
|
+
parametersBundle_css.jsx("input", { id: `${this._id}-CB`, type: "checkbox", checked: this.checked, value: this.value, readonly: this.readonly, disabled: this.disabled, tabindex: -1, "aria-hidden": "true", "data-sap-no-tab-ref": true }), this.text &&
|
|
1162
|
+
parametersBundle_css.jsx(Label, { id: `${this._id}-label`, part: "label", class: "ui5-checkbox-label", wrappingType: this.wrappingType, required: this.required, children: this.text }), this.hasValueState &&
|
|
1163
|
+
parametersBundle_css.jsx("span", { id: `${this._id}-descr`, class: "ui5-hidden-text", children: this.valueStateText })] }));
|
|
1164
|
+
}
|
|
1165
|
+
function displayOnlyIcon() {
|
|
1166
|
+
if (this.isCompletelyChecked) {
|
|
1167
|
+
return complete;
|
|
1168
|
+
}
|
|
1169
|
+
if (this.checked && this.indeterminate) {
|
|
1170
|
+
return triState;
|
|
1171
|
+
}
|
|
1172
|
+
return border;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
var __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1176
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1177
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1178
|
+
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;
|
|
1179
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1180
|
+
};
|
|
1181
|
+
var CheckBox_1;
|
|
1182
|
+
let isGlobalHandlerAttached = false;
|
|
1183
|
+
let activeCb;
|
|
1184
|
+
/**
|
|
1185
|
+
* @class
|
|
1186
|
+
*
|
|
1187
|
+
* ### Overview
|
|
1188
|
+
*
|
|
1189
|
+
* Allows the user to set a binary value, such as true/false or yes/no for an item.
|
|
1190
|
+
*
|
|
1191
|
+
* The `ui5-checkbox` component consists of a box and a label that describes its purpose.
|
|
1192
|
+
* If it's checked, an indicator is displayed inside the box.
|
|
1193
|
+
* To check/uncheck the `ui5-checkbox`, the user has to click or tap the square
|
|
1194
|
+
* box or its label.
|
|
1195
|
+
*
|
|
1196
|
+
* The `ui5-checkbox` component only has 2 states - checked and unchecked.
|
|
1197
|
+
* Clicking or tapping toggles the `ui5-checkbox` between checked and unchecked state.
|
|
1198
|
+
*
|
|
1199
|
+
* ### Usage
|
|
1200
|
+
*
|
|
1201
|
+
* You can define the checkbox text with via the `text` property. If the text exceeds the available width, it is truncated by default.
|
|
1202
|
+
* In case you prefer text to truncate, set the `wrappingType` property to "None".
|
|
1203
|
+
* The touchable area for toggling the `ui5-checkbox` ends where the text ends.
|
|
1204
|
+
*
|
|
1205
|
+
* You can disable the `ui5-checkbox` by setting the `disabled` property to
|
|
1206
|
+
* `true`,
|
|
1207
|
+
* or use the `ui5-checkbox` in read-only mode by setting the `readonly`
|
|
1208
|
+
* property to `true`.
|
|
1209
|
+
*
|
|
1210
|
+
* ### Keyboard Handling
|
|
1211
|
+
*
|
|
1212
|
+
* The user can use the following keyboard shortcuts to toggle the checked state of the `ui5-checkbox`.
|
|
1213
|
+
*
|
|
1214
|
+
* - [Space],[Enter] - Toggles between different states: checked, not checked.
|
|
1215
|
+
*
|
|
1216
|
+
* ### ES6 Module Import
|
|
1217
|
+
*
|
|
1218
|
+
* `import "sap/f/gen/ui5/webcomponents/dist/CheckBox.js";`
|
|
1219
|
+
* @constructor
|
|
1220
|
+
* @extends UI5Element
|
|
1221
|
+
* @public
|
|
1222
|
+
* @csspart root - Used to style the outermost wrapper of the `ui5-checkbox`
|
|
1223
|
+
* @csspart label - Used to style the label of the `ui5-checkbox`
|
|
1224
|
+
* @csspart icon - Used to style the icon of the `ui5-checkbox`
|
|
1225
|
+
*/
|
|
1226
|
+
let CheckBox = CheckBox_1 = class CheckBox extends webcomponentsBase.b {
|
|
1227
|
+
get formValidityMessage() {
|
|
1228
|
+
return CheckBox_1.i18nBundle.getText(i18nDefaults.FORM_CHECKABLE_REQUIRED);
|
|
1229
|
+
}
|
|
1230
|
+
get formValidity() {
|
|
1231
|
+
return { valueMissing: this.required && !this.checked };
|
|
1232
|
+
}
|
|
1233
|
+
async formElementAnchor() {
|
|
1234
|
+
return this.getFocusDomRefAsync();
|
|
1235
|
+
}
|
|
1236
|
+
get formFormattedValue() {
|
|
1237
|
+
return this.checked ? this.value : null;
|
|
1238
|
+
}
|
|
1239
|
+
constructor() {
|
|
1240
|
+
super();
|
|
1241
|
+
/**
|
|
1242
|
+
* Defines whether the component is disabled.
|
|
1243
|
+
*
|
|
1244
|
+
* **Note:** A disabled component is completely noninteractive.
|
|
1245
|
+
* @default false
|
|
1246
|
+
* @public
|
|
1247
|
+
*/
|
|
1248
|
+
this.disabled = false;
|
|
1249
|
+
/**
|
|
1250
|
+
* Defines whether the component is read-only.
|
|
1251
|
+
*
|
|
1252
|
+
* **Note:** A read-only component is not editable,
|
|
1253
|
+
* but still provides visual feedback upon user interaction.
|
|
1254
|
+
* @default false
|
|
1255
|
+
* @public
|
|
1256
|
+
*/
|
|
1257
|
+
this.readonly = false;
|
|
1258
|
+
/**
|
|
1259
|
+
* Determines whether the `ui5-checkbox` is in display only state.
|
|
1260
|
+
*
|
|
1261
|
+
* When set to `true`, the `ui5-checkbox` is not interactive, not editable, not focusable
|
|
1262
|
+
* and not in the tab chain. This setting is used for forms in review mode.
|
|
1263
|
+
*
|
|
1264
|
+
* **Note:** When the property `disabled` is set to `true` this property has no effect.
|
|
1265
|
+
* @since 1.22.0
|
|
1266
|
+
* @public
|
|
1267
|
+
* @default false
|
|
1268
|
+
*/
|
|
1269
|
+
this.displayOnly = false;
|
|
1270
|
+
/**
|
|
1271
|
+
* Defines whether the component is required.
|
|
1272
|
+
*
|
|
1273
|
+
* **Note:** We advise against using the text property of the checkbox when there is a
|
|
1274
|
+
* label associated with it to avoid having two required asterisks.
|
|
1275
|
+
* @default false
|
|
1276
|
+
* @public
|
|
1277
|
+
* @since 1.3.0
|
|
1278
|
+
*/
|
|
1279
|
+
this.required = false;
|
|
1280
|
+
/**
|
|
1281
|
+
* Defines whether the component is displayed as partially checked.
|
|
1282
|
+
*
|
|
1283
|
+
* **Note:** The indeterminate state can be set only programmatically and can’t be achieved by user
|
|
1284
|
+
* interaction and the resulting visual state depends on the values of the `indeterminate`
|
|
1285
|
+
* and `checked` properties:
|
|
1286
|
+
*
|
|
1287
|
+
* - If the component is checked and indeterminate, it will be displayed as partially checked
|
|
1288
|
+
* - If the component is checked and it is not indeterminate, it will be displayed as checked
|
|
1289
|
+
* - If the component is not checked, it will be displayed as not checked regardless value of the indeterminate attribute
|
|
1290
|
+
* @default false
|
|
1291
|
+
* @public
|
|
1292
|
+
* @since 1.0.0-rc.15
|
|
1293
|
+
*/
|
|
1294
|
+
this.indeterminate = false;
|
|
1295
|
+
/**
|
|
1296
|
+
* Defines if the component is checked.
|
|
1297
|
+
*
|
|
1298
|
+
* **Note:** The property can be changed with user interaction,
|
|
1299
|
+
* either by cliking/tapping on the component, or by
|
|
1300
|
+
* pressing the Enter or Space key.
|
|
1301
|
+
* @default false
|
|
1302
|
+
* @formEvents change
|
|
1303
|
+
* @formProperty
|
|
1304
|
+
* @public
|
|
1305
|
+
*/
|
|
1306
|
+
this.checked = false;
|
|
1307
|
+
/**
|
|
1308
|
+
* Defines the value state of the component.
|
|
1309
|
+
* @default "None"
|
|
1310
|
+
* @public
|
|
1311
|
+
*/
|
|
1312
|
+
this.valueState = "None";
|
|
1313
|
+
/**
|
|
1314
|
+
* Defines whether the component text wraps when there is not enough space.
|
|
1315
|
+
*
|
|
1316
|
+
* **Note:** for option "Normal" the text will wrap and the words will not be broken based on hyphenation.
|
|
1317
|
+
* **Note:** for option "None" the text will be truncated with an ellipsis.
|
|
1318
|
+
* @default "Normal"
|
|
1319
|
+
* @public
|
|
1320
|
+
*/
|
|
1321
|
+
this.wrappingType = "Normal";
|
|
1322
|
+
/**
|
|
1323
|
+
* Defines the form value of the component that is submitted when the checkbox is checked.
|
|
1324
|
+
*
|
|
1325
|
+
* When a form containing `ui5-checkbox` elements is submitted, only the values of the
|
|
1326
|
+
* **checked** checkboxes are included in the form data sent to the server. Unchecked
|
|
1327
|
+
* checkboxes do not contribute any data to the form submission.
|
|
1328
|
+
*
|
|
1329
|
+
* This property is particularly useful for **checkbox groups**, where multiple checkboxes with the same `name` but different `value` properties can be used to represent a set of related options.
|
|
1330
|
+
*
|
|
1331
|
+
* @default "on"
|
|
1332
|
+
* @public
|
|
1333
|
+
*/
|
|
1334
|
+
this.value = "on";
|
|
1335
|
+
/**
|
|
1336
|
+
* Defines the active state (pressed or not) of the component.
|
|
1337
|
+
* @private
|
|
1338
|
+
*/
|
|
1339
|
+
this.active = false;
|
|
1340
|
+
this._deactivate = () => {
|
|
1341
|
+
if (activeCb) {
|
|
1342
|
+
activeCb.active = false;
|
|
1343
|
+
}
|
|
1344
|
+
};
|
|
1345
|
+
if (!isGlobalHandlerAttached) {
|
|
1346
|
+
document.addEventListener("mouseup", this._deactivate);
|
|
1347
|
+
isGlobalHandlerAttached = true;
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
onEnterDOM() {
|
|
1351
|
+
if (Icons.f()) {
|
|
1352
|
+
this.setAttribute("desktop", "");
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
_onclick() {
|
|
1356
|
+
this.toggle();
|
|
1357
|
+
}
|
|
1358
|
+
_onmousedown() {
|
|
1359
|
+
if (this.readonly || this.disabled) {
|
|
1360
|
+
return;
|
|
1361
|
+
}
|
|
1362
|
+
this.active = true;
|
|
1363
|
+
activeCb = this; // eslint-disable-line
|
|
1364
|
+
}
|
|
1365
|
+
_onmouseup() {
|
|
1366
|
+
this.active = false;
|
|
1367
|
+
}
|
|
1368
|
+
_onfocusout() {
|
|
1369
|
+
this.active = false;
|
|
1370
|
+
}
|
|
1371
|
+
_onkeydown(e) {
|
|
1372
|
+
if (webcomponentsBase.A(e)) {
|
|
1373
|
+
e.preventDefault();
|
|
1374
|
+
}
|
|
1375
|
+
if (this.readonly || this.disabled) {
|
|
1376
|
+
return;
|
|
1377
|
+
}
|
|
1378
|
+
if (webcomponentsBase.b$1(e)) {
|
|
1379
|
+
this.toggle();
|
|
1380
|
+
}
|
|
1381
|
+
this.active = true;
|
|
1382
|
+
}
|
|
1383
|
+
_onkeyup(e) {
|
|
1384
|
+
if (webcomponentsBase.A(e)) {
|
|
1385
|
+
this.toggle();
|
|
1386
|
+
}
|
|
1387
|
+
this.active = false;
|
|
1388
|
+
}
|
|
1389
|
+
toggle() {
|
|
1390
|
+
if (this.canToggle()) {
|
|
1391
|
+
const lastState = {
|
|
1392
|
+
checked: this.checked,
|
|
1393
|
+
indeterminate: this.indeterminate,
|
|
1394
|
+
};
|
|
1395
|
+
if (this.indeterminate) {
|
|
1396
|
+
this.indeterminate = false;
|
|
1397
|
+
this.checked = true;
|
|
1398
|
+
}
|
|
1399
|
+
else {
|
|
1400
|
+
this.checked = !this.checked;
|
|
1401
|
+
}
|
|
1402
|
+
const changePrevented = !this.fireDecoratorEvent("change");
|
|
1403
|
+
// Angular two way data binding
|
|
1404
|
+
const valueChangePrevented = !this.fireDecoratorEvent("value-changed");
|
|
1405
|
+
if (changePrevented || valueChangePrevented) {
|
|
1406
|
+
this.checked = lastState.checked;
|
|
1407
|
+
this.indeterminate = lastState.indeterminate;
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
return this;
|
|
1411
|
+
}
|
|
1412
|
+
canToggle() {
|
|
1413
|
+
return !(this.disabled || this.readonly || this.displayOnly);
|
|
1414
|
+
}
|
|
1415
|
+
valueStateTextMappings() {
|
|
1416
|
+
return {
|
|
1417
|
+
"Negative": CheckBox_1.i18nBundle.getText(i18nDefaults.VALUE_STATE_ERROR),
|
|
1418
|
+
"Critical": CheckBox_1.i18nBundle.getText(i18nDefaults.VALUE_STATE_WARNING),
|
|
1419
|
+
"Positive": CheckBox_1.i18nBundle.getText(i18nDefaults.VALUE_STATE_SUCCESS),
|
|
1420
|
+
};
|
|
1421
|
+
}
|
|
1422
|
+
get ariaLabelText() {
|
|
1423
|
+
return AccessibilityTextsHelper.A(this) || AccessibilityTextsHelper.M(this);
|
|
1424
|
+
}
|
|
1425
|
+
get classes() {
|
|
1426
|
+
return {
|
|
1427
|
+
main: {
|
|
1428
|
+
"ui5-checkbox--hoverable": !this.disabled && !this.readonly && Icons.f(),
|
|
1429
|
+
},
|
|
1430
|
+
};
|
|
1431
|
+
}
|
|
1432
|
+
get ariaReadonly() {
|
|
1433
|
+
return this.readonly || this.displayOnly ? "true" : undefined;
|
|
1434
|
+
}
|
|
1435
|
+
get effectiveAriaDisabled() {
|
|
1436
|
+
return this.disabled ? "true" : undefined;
|
|
1437
|
+
}
|
|
1438
|
+
get effectiveAriaChecked() {
|
|
1439
|
+
return this.indeterminate && this.checked ? "mixed" : this.checked;
|
|
1440
|
+
}
|
|
1441
|
+
get ariaLabelledBy() {
|
|
1442
|
+
if (!this.ariaLabelText) {
|
|
1443
|
+
return this.text ? `${this._id}-label` : undefined;
|
|
1444
|
+
}
|
|
1445
|
+
return undefined;
|
|
1446
|
+
}
|
|
1447
|
+
get ariaDescribedBy() {
|
|
1448
|
+
return this.hasValueState ? `${this._id}-descr` : undefined;
|
|
1449
|
+
}
|
|
1450
|
+
get hasValueState() {
|
|
1451
|
+
return this.valueState !== ValueState.o.None;
|
|
1452
|
+
}
|
|
1453
|
+
get valueStateText() {
|
|
1454
|
+
if (this.valueState !== ValueState.o.None && this.valueState !== ValueState.o.Information) {
|
|
1455
|
+
return this.valueStateTextMappings()[this.valueState];
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
get effectiveTabIndex() {
|
|
1459
|
+
const tabindex = this.getAttribute("tabindex");
|
|
1460
|
+
if (this.tabbable) {
|
|
1461
|
+
return tabindex ? parseInt(tabindex) : 0;
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
get tabbable() {
|
|
1465
|
+
return !this.disabled && !this.displayOnly;
|
|
1466
|
+
}
|
|
1467
|
+
get isCompletelyChecked() {
|
|
1468
|
+
return this.checked && !this.indeterminate;
|
|
1469
|
+
}
|
|
1470
|
+
get isDisplayOnly() {
|
|
1471
|
+
return this.displayOnly && !this.disabled;
|
|
1472
|
+
}
|
|
1473
|
+
get accInfo() {
|
|
1474
|
+
return {
|
|
1475
|
+
"role": this._accInfo ? this._accInfo.role : "checkbox",
|
|
1476
|
+
"ariaChecked": this._accInfo ? this._accInfo.ariaChecked : this.effectiveAriaChecked,
|
|
1477
|
+
"ariaReadonly": this._accInfo ? this._accInfo.ariaReadonly : this.ariaReadonly,
|
|
1478
|
+
"ariaDisabled": this._accInfo ? this._accInfo.ariaDisabled : this.effectiveAriaDisabled,
|
|
1479
|
+
"ariaRequired": this._accInfo ? this._accInfo.ariaRequired : this.required,
|
|
1480
|
+
"tabindex": this._accInfo ? this._accInfo.tabindex : this.effectiveTabIndex,
|
|
1481
|
+
};
|
|
1482
|
+
}
|
|
1483
|
+
};
|
|
1484
|
+
__decorate$1([
|
|
1485
|
+
webcomponentsBase.s()
|
|
1486
|
+
], CheckBox.prototype, "accessibleNameRef", void 0);
|
|
1487
|
+
__decorate$1([
|
|
1488
|
+
webcomponentsBase.s()
|
|
1489
|
+
], CheckBox.prototype, "accessibleName", void 0);
|
|
1490
|
+
__decorate$1([
|
|
1491
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1492
|
+
], CheckBox.prototype, "disabled", void 0);
|
|
1493
|
+
__decorate$1([
|
|
1494
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1495
|
+
], CheckBox.prototype, "readonly", void 0);
|
|
1496
|
+
__decorate$1([
|
|
1497
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1498
|
+
], CheckBox.prototype, "displayOnly", void 0);
|
|
1499
|
+
__decorate$1([
|
|
1500
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1501
|
+
], CheckBox.prototype, "required", void 0);
|
|
1502
|
+
__decorate$1([
|
|
1503
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1504
|
+
], CheckBox.prototype, "indeterminate", void 0);
|
|
1505
|
+
__decorate$1([
|
|
1506
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1507
|
+
], CheckBox.prototype, "checked", void 0);
|
|
1508
|
+
__decorate$1([
|
|
1509
|
+
webcomponentsBase.s()
|
|
1510
|
+
], CheckBox.prototype, "text", void 0);
|
|
1511
|
+
__decorate$1([
|
|
1512
|
+
webcomponentsBase.s()
|
|
1513
|
+
], CheckBox.prototype, "valueState", void 0);
|
|
1514
|
+
__decorate$1([
|
|
1515
|
+
webcomponentsBase.s()
|
|
1516
|
+
], CheckBox.prototype, "wrappingType", void 0);
|
|
1517
|
+
__decorate$1([
|
|
1518
|
+
webcomponentsBase.s()
|
|
1519
|
+
], CheckBox.prototype, "name", void 0);
|
|
1520
|
+
__decorate$1([
|
|
1521
|
+
webcomponentsBase.s()
|
|
1522
|
+
], CheckBox.prototype, "value", void 0);
|
|
1523
|
+
__decorate$1([
|
|
1524
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1525
|
+
], CheckBox.prototype, "active", void 0);
|
|
1526
|
+
__decorate$1([
|
|
1527
|
+
webcomponentsBase.s({ type: Object })
|
|
1528
|
+
], CheckBox.prototype, "_accInfo", void 0);
|
|
1529
|
+
__decorate$1([
|
|
1530
|
+
parametersBundle_css$1.i("sap/f/gen/ui5/webcomponents")
|
|
1531
|
+
], CheckBox, "i18nBundle", void 0);
|
|
1532
|
+
CheckBox = CheckBox_1 = __decorate$1([
|
|
1533
|
+
webcomponentsBase.m({
|
|
1534
|
+
tag: "ui5-checkbox",
|
|
1535
|
+
languageAware: true,
|
|
1536
|
+
formAssociated: true,
|
|
1537
|
+
renderer: parametersBundle_css.y,
|
|
1538
|
+
template: CheckBoxTemplate,
|
|
1539
|
+
styles: checkboxCss,
|
|
1540
|
+
})
|
|
1541
|
+
/**
|
|
1542
|
+
* Fired when the component checked state changes.
|
|
1543
|
+
* @public
|
|
1544
|
+
*/
|
|
1545
|
+
,
|
|
1546
|
+
eventStrict.l("change", {
|
|
1547
|
+
bubbles: true,
|
|
1548
|
+
cancelable: true,
|
|
1549
|
+
})
|
|
1550
|
+
/**
|
|
1551
|
+
* Fired to make Angular two way data binding work properly.
|
|
1552
|
+
* @private
|
|
1553
|
+
*/
|
|
1554
|
+
,
|
|
1555
|
+
eventStrict.l("value-changed", {
|
|
1556
|
+
bubbles: true,
|
|
1557
|
+
cancelable: true,
|
|
1558
|
+
})
|
|
1559
|
+
], CheckBox);
|
|
1560
|
+
CheckBox.define();
|
|
1561
|
+
var CheckBox$1 = CheckBox;
|
|
1562
|
+
|
|
1563
|
+
const predefinedHooks$1 = {
|
|
1564
|
+
listItemPreContent,
|
|
1565
|
+
listItemContent: listItemContent$1,
|
|
1566
|
+
imageBegin,
|
|
1567
|
+
iconBegin,
|
|
1568
|
+
iconEnd,
|
|
1569
|
+
selectionElement,
|
|
1570
|
+
};
|
|
1571
|
+
function ListItemTemplate(hooks) {
|
|
1572
|
+
const currentHooks = { ...predefinedHooks$1, ...hooks };
|
|
1573
|
+
return parametersBundle_css.jsxs("li", { part: "native-li", "data-sap-focus-ref": true, tabindex: this._effectiveTabIndex, class: this.classes.main, onFocusIn: this._onfocusin, onFocusOut: this._onfocusout, onKeyUp: this._onkeyup, onKeyDown: this._onkeydown, onMouseUp: this._onmouseup, onMouseDown: this._onmousedown, onTouchStart: this._onmousedown, onTouchEnd: this._ontouchend, onClick: this._onclick, draggable: this.movable, onDragStart: this._ondragstart, onDragEnd: this._ondragend, role: this._accInfo.role, title: this._accInfo.tooltip, "aria-expanded": this._accInfo.ariaExpanded, "aria-level": this._accInfo.ariaLevel, "aria-haspopup": this._accInfo.ariaHaspopup, "aria-posinset": this._accInfo.posinset, "aria-setsize": this._accInfo.setsize, "aria-describedby": `${this._id}-invisibleText-describedby`, "aria-labelledby": this._accessibleNameRef, "aria-disabled": this._ariaDisabled, "aria-selected": this._accInfo.ariaSelected, "aria-checked": this._accInfo.ariaChecked, "aria-owns": this._accInfo.ariaOwns, "aria-keyshortcuts": this._accInfo.ariaKeyShortcuts, children: [currentHooks.listItemPreContent.call(this), this.placeSelectionElementBefore && selectionElement.call(this), this._hasHighlightColor && parametersBundle_css.jsx("div", { class: "ui5-li-highlight" }), parametersBundle_css.jsxs("div", { part: "content", id: `${this._id}-content`, class: "ui5-li-content", children: [currentHooks.imageBegin.call(this), currentHooks.iconBegin.call(this), currentHooks.listItemContent.call(this)] }), currentHooks.iconEnd.call(this), this.typeDetail && (parametersBundle_css.jsx("div", { class: "ui5-li-detailbtn", children: parametersBundle_css.jsx(Button.Button, { part: "detail-button", design: "Transparent", onClick: this.onDetailClick, icon: edit }) })), this.typeNavigation && (parametersBundle_css.jsx(Icon.Icon, { name: slimArrowRight })), this.navigated && (parametersBundle_css.jsx("div", { class: "ui5-li-navigated" })), this.placeSelectionElementAfter && (currentHooks.selectionElement.call(this)), parametersBundle_css.jsx("span", { id: `${this._id}-invisibleText`, class: "ui5-hidden-text", children: this.ariaLabelledByText }), parametersBundle_css.jsx("span", { id: `${this._id}-invisibleText-describedby`, class: "ui5-hidden-text", children: this._accInfo.ariaSelectedText })] });
|
|
1574
|
+
}
|
|
1575
|
+
function listItemPreContent() { }
|
|
1576
|
+
function listItemContent$1() { }
|
|
1577
|
+
function imageBegin() { }
|
|
1578
|
+
function iconBegin() { }
|
|
1579
|
+
function iconEnd() { }
|
|
1580
|
+
function selectionElement() {
|
|
1581
|
+
switch (true) {
|
|
1582
|
+
case this.modeSingleSelect:
|
|
1583
|
+
return (parametersBundle_css.jsx(RadioButton$1, { part: "radio", disabled: this.isInactive, accessibleName: this._accInfo.ariaLabelRadioButton, tabindex: -1, id: `${this._id}-singleSelectionElement`, class: "ui5-li-singlesel-radiobtn", checked: this.selected, onChange: this.onSingleSelectionComponentPress }));
|
|
1584
|
+
case this.modeMultiple:
|
|
1585
|
+
return (parametersBundle_css.jsx(CheckBox$1, { part: "checkbox", disabled: this.isInactive, indeterminate: this.indeterminate, tabindex: -1, id: `${this._id}-multiSelectionElement`, class: "ui5-li-multisel-cb", checked: this.selected, accessibleName: this._accInfo.ariaLabel, onChange: this.onMultiSelectionComponentPress }));
|
|
1586
|
+
case this.modeDelete:
|
|
1587
|
+
return (parametersBundle_css.jsx("div", { class: "ui5-li-deletebtn", children: this.hasDeleteButtonSlot ?
|
|
1588
|
+
(parametersBundle_css.jsx("slot", { name: "deleteButton" })) : (parametersBundle_css.jsx(Button.Button, { part: "delete-button", tabindex: -1, "data-sap-no-tab-ref": true, id: `${this._id}-deleteSelectionElement`, design: "Transparent", icon: information.decline, onClick: this.onDelete, tooltip: this.deleteText })) }));
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
const predefinedHooks = {
|
|
1593
|
+
listItemContent,
|
|
1594
|
+
};
|
|
1595
|
+
function ListItemCustomTemplate(hooks) {
|
|
1596
|
+
const currentHooks = { ...predefinedHooks, ...hooks };
|
|
1597
|
+
return ListItemTemplate.call(this, currentHooks);
|
|
1598
|
+
}
|
|
1599
|
+
function listItemContent() {
|
|
1600
|
+
return parametersBundle_css.jsx("slot", {});
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
Icons.p("@" + "ui5" + "/" + "sap/f/thirdparty/webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
|
|
1604
|
+
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);
|
|
1605
|
+
var ListItemCustomCss = `:host(:not([hidden])){display:block}:host{min-height:var(--_ui5-v2-15-0_list_item_base_height);height:auto;box-sizing:border-box}.ui5-li-root.ui5-custom-li-root{pointer-events:inherit;min-height:inherit}.ui5-li-root.ui5-custom-li-root .ui5-li-content{pointer-events:inherit}[ui5-checkbox].ui5-li-singlesel-radiobtn,[ui5-radio-button].ui5-li-singlesel-radiobtn{display:flex;align-items:center}.ui5-li-root.ui5-custom-li-root,[ui5-checkbox].ui5-li-singlesel-radiobtn,[ui5-radio-button].ui5-li-singlesel-radiobtn{min-width:var(--_ui5-v2-15-0_custom_list_item_rb_min_width)}:host([_selection-mode="SingleStart"]) .ui5-li-root.ui5-custom-li-root{padding-inline:0 1rem}:host([_selection-mode="Multiple"]) .ui5-li-root.ui5-custom-li-root{padding-inline:0 1rem}:host([_selection-mode="SingleEnd"]) .ui5-li-root.ui5-custom-li-root{padding-inline:1rem 0}
|
|
1606
|
+
`;
|
|
1607
|
+
|
|
1608
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1609
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1610
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1611
|
+
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;
|
|
1612
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1613
|
+
};
|
|
1614
|
+
/**
|
|
1615
|
+
* @class
|
|
1616
|
+
*
|
|
1617
|
+
* A component to be used as custom list item within the `ui5-list`
|
|
1618
|
+
* the same way as the standard `ui5-li`.
|
|
1619
|
+
*
|
|
1620
|
+
* The component accepts arbitrary HTML content to allow full customization.
|
|
1621
|
+
* @csspart native-li - Used to style the main li tag of the list item
|
|
1622
|
+
* @csspart content - Used to style the content area of the list item
|
|
1623
|
+
* @csspart detail-button - Used to style the button rendered when the list item is of type detail
|
|
1624
|
+
* @csspart delete-button - Used to style the button rendered when the list item is in delete mode
|
|
1625
|
+
* @csspart radio - Used to style the radio button rendered when the list item is in single selection mode
|
|
1626
|
+
* @csspart checkbox - Used to style the checkbox rendered when the list item is in multiple selection mode
|
|
1627
|
+
* @slot {Node[]} default - Defines the content of the component.
|
|
1628
|
+
* @constructor
|
|
1629
|
+
* @extends ListItem
|
|
1630
|
+
* @public
|
|
1631
|
+
*/
|
|
1632
|
+
let ListItemCustom = class ListItemCustom extends ListItem$1 {
|
|
1633
|
+
constructor() {
|
|
1634
|
+
super(...arguments);
|
|
1635
|
+
/**
|
|
1636
|
+
* Defines whether the item is movable.
|
|
1637
|
+
* @default false
|
|
1638
|
+
* @public
|
|
1639
|
+
* @since 2.0.0
|
|
1640
|
+
*/
|
|
1641
|
+
this.movable = false;
|
|
1642
|
+
}
|
|
1643
|
+
async _onkeydown(e) {
|
|
1644
|
+
const isTab = webcomponentsBase.x(e) || webcomponentsBase.V(e);
|
|
1645
|
+
const isFocused = this.matches(":focus");
|
|
1646
|
+
if (!isTab && !isFocused && !webcomponentsBase.ro(e)) {
|
|
1647
|
+
return;
|
|
1648
|
+
}
|
|
1649
|
+
await super._onkeydown(e);
|
|
1650
|
+
}
|
|
1651
|
+
_onkeyup(e) {
|
|
1652
|
+
const isTab = webcomponentsBase.x(e) || webcomponentsBase.V(e);
|
|
1653
|
+
const isFocused = this.matches(":focus");
|
|
1654
|
+
if (!isTab && !isFocused && !webcomponentsBase.ro(e)) {
|
|
1655
|
+
return;
|
|
1656
|
+
}
|
|
1657
|
+
super._onkeyup(e);
|
|
1658
|
+
}
|
|
1659
|
+
get classes() {
|
|
1660
|
+
const result = super.classes;
|
|
1661
|
+
result.main["ui5-custom-li-root"] = true;
|
|
1662
|
+
return result;
|
|
1663
|
+
}
|
|
1664
|
+
};
|
|
1665
|
+
__decorate([
|
|
1666
|
+
webcomponentsBase.s({ type: Boolean })
|
|
1667
|
+
], ListItemCustom.prototype, "movable", void 0);
|
|
1668
|
+
__decorate([
|
|
1669
|
+
webcomponentsBase.s()
|
|
1670
|
+
], ListItemCustom.prototype, "accessibleName", void 0);
|
|
1671
|
+
ListItemCustom = __decorate([
|
|
1672
|
+
webcomponentsBase.m({
|
|
1673
|
+
tag: "ui5-li-custom",
|
|
1674
|
+
template: ListItemCustomTemplate,
|
|
1675
|
+
renderer: parametersBundle_css.y,
|
|
1676
|
+
styles: [ListItem$1.styles, ListItemCustomCss],
|
|
1677
|
+
})
|
|
1678
|
+
], ListItemCustom);
|
|
1679
|
+
ListItemCustom.define();
|
|
1680
|
+
var ListItemCustom$1 = ListItemCustom;
|
|
1681
|
+
|
|
1682
|
+
exports.ListItem = ListItem$1;
|
|
1683
|
+
exports.ListItemCustom = ListItemCustom$1;
|
|
1684
|
+
exports.ListItemTemplate = ListItemTemplate;
|
|
1685
|
+
exports.checkIcon = checkIcon;
|
|
1686
|
+
exports.edit = edit;
|
|
1687
|
+
exports.slimArrowRight = slimArrowRight;
|
|
1688
|
+
|
|
1689
|
+
}));
|