@ui5/webcomponents 2.5.0-rc.2 → 2.5.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/cypress/specs/Button.cy.ts +84 -70
- package/cypress/specs/FormSupport.cy.ts +64 -0
- package/cypress/specs/Link.cy.ts +16 -0
- package/cypress/specs/List.cy.ts +84 -0
- package/cypress/specs/Menu.cy.ts +39 -0
- package/cypress/specs/RatingIndicator.cy.ts +39 -0
- package/cypress/specs/TableVirtualizer.cy.ts +246 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Avatar.d.ts +3 -0
- package/dist/Avatar.js +1 -1
- package/dist/Avatar.js.map +1 -1
- package/dist/AvatarGroup.d.ts +4 -0
- package/dist/AvatarGroup.js +2 -13
- package/dist/AvatarGroup.js.map +1 -1
- package/dist/Bar.d.ts +3 -0
- package/dist/Bar.js +3 -0
- package/dist/Bar.js.map +1 -1
- package/dist/Breadcrumbs.d.ts +7 -4
- package/dist/Breadcrumbs.js +1 -23
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Button.d.ts +12 -0
- package/dist/Button.js +7 -1
- package/dist/Button.js.map +1 -1
- package/dist/Calendar.d.ts +7 -2
- package/dist/Calendar.js +11 -22
- package/dist/Calendar.js.map +1 -1
- package/dist/CalendarLegend.d.ts +4 -0
- package/dist/CalendarLegend.js +1 -4
- package/dist/CalendarLegend.js.map +1 -1
- package/dist/CardHeader.d.ts +3 -0
- package/dist/CardHeader.js +1 -1
- package/dist/CardHeader.js.map +1 -1
- package/dist/Carousel.d.ts +3 -0
- package/dist/Carousel.js +1 -7
- package/dist/Carousel.js.map +1 -1
- package/dist/CheckBox.d.ts +4 -0
- package/dist/CheckBox.js +1 -1
- package/dist/CheckBox.js.map +1 -1
- package/dist/ColorPalette.d.ts +3 -0
- package/dist/ColorPalette.js +2 -11
- package/dist/ColorPalette.js.map +1 -1
- package/dist/ColorPalettePopover.d.ts +4 -0
- package/dist/ColorPalettePopover.js +1 -9
- package/dist/ColorPalettePopover.js.map +1 -1
- package/dist/ColorPicker.d.ts +3 -0
- package/dist/ColorPicker.js +1 -1
- package/dist/ColorPicker.js.map +1 -1
- package/dist/ComboBox.d.ts +5 -0
- package/dist/ComboBox.js +1 -7
- package/dist/ComboBox.js.map +1 -1
- package/dist/DatePicker.d.ts +9 -1
- package/dist/DatePicker.js +2 -44
- package/dist/DatePicker.js.map +1 -1
- package/dist/DayPicker.d.ts +4 -0
- package/dist/DayPicker.js +1 -1
- package/dist/DayPicker.js.map +1 -1
- package/dist/Dialog.d.ts +1 -0
- package/dist/Dialog.js.map +1 -1
- package/dist/FileUploader.d.ts +4 -0
- package/dist/FileUploader.js +1 -13
- package/dist/FileUploader.js.map +1 -1
- package/dist/Icon.d.ts +3 -0
- package/dist/Icon.js +1 -1
- package/dist/Icon.js.map +1 -1
- package/dist/Input.d.ts +10 -0
- package/dist/Input.js +2 -28
- package/dist/Input.js.map +1 -1
- package/dist/Link.d.ts +11 -0
- package/dist/Link.js +7 -19
- package/dist/Link.js.map +1 -1
- package/dist/List.d.ts +13 -0
- package/dist/List.js +29 -84
- package/dist/List.js.map +1 -1
- package/dist/ListItem.d.ts +7 -0
- package/dist/ListItem.js +1 -4
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemBase.d.ts +9 -2
- package/dist/ListItemBase.js +1 -1
- package/dist/ListItemBase.js.map +1 -1
- package/dist/ListItemGroup.d.ts +4 -0
- package/dist/ListItemGroup.js +1 -21
- package/dist/ListItemGroup.js.map +1 -1
- package/dist/Menu.d.ts +8 -0
- package/dist/Menu.js +13 -38
- package/dist/Menu.js.map +1 -1
- package/dist/MenuItem.d.ts +1 -0
- package/dist/MenuItem.js +8 -0
- package/dist/MenuItem.js.map +1 -1
- package/dist/MessageStrip.d.ts +3 -0
- package/dist/MessageStrip.js +1 -1
- package/dist/MessageStrip.js.map +1 -1
- package/dist/MonthPicker.d.ts +4 -0
- package/dist/MonthPicker.js +1 -1
- package/dist/MonthPicker.js.map +1 -1
- package/dist/MultiComboBox.d.ts +7 -0
- package/dist/MultiComboBox.js +1 -9
- package/dist/MultiComboBox.js.map +1 -1
- package/dist/MultiComboBoxItem.d.ts +4 -0
- package/dist/MultiComboBoxItem.js +1 -1
- package/dist/MultiComboBoxItem.js.map +1 -1
- package/dist/MultiInput.d.ts +4 -0
- package/dist/MultiInput.js +1 -7
- package/dist/MultiInput.js.map +1 -1
- package/dist/Panel.d.ts +3 -0
- package/dist/Panel.js +1 -1
- package/dist/Panel.js.map +1 -1
- package/dist/Popover.js +7 -2
- package/dist/Popover.js.map +1 -1
- package/dist/Popup.d.ts +7 -0
- package/dist/Popup.js +4 -12
- package/dist/Popup.js.map +1 -1
- package/dist/RadioButton.d.ts +3 -0
- package/dist/RadioButton.js +1 -1
- package/dist/RadioButton.js.map +1 -1
- package/dist/RatingIndicator.d.ts +4 -0
- package/dist/RatingIndicator.js +4 -1
- package/dist/RatingIndicator.js.map +1 -1
- package/dist/ResponsivePopover.d.ts +5 -3
- package/dist/ResponsivePopover.js +10 -8
- package/dist/ResponsivePopover.js.map +1 -1
- package/dist/SegmentedButton.d.ts +3 -0
- package/dist/SegmentedButton.js +2 -9
- package/dist/SegmentedButton.js.map +1 -1
- package/dist/Select.d.ts +8 -0
- package/dist/Select.js +1 -13
- package/dist/Select.js.map +1 -1
- package/dist/SliderBase.d.ts +4 -0
- package/dist/SliderBase.js +1 -1
- package/dist/SliderBase.js.map +1 -1
- package/dist/SplitButton.d.ts +4 -0
- package/dist/SplitButton.js +1 -1
- package/dist/SplitButton.js.map +1 -1
- package/dist/StepInput.d.ts +4 -0
- package/dist/StepInput.js +2 -16
- package/dist/StepInput.js.map +1 -1
- package/dist/Switch.d.ts +4 -0
- package/dist/Switch.js +1 -1
- package/dist/Switch.js.map +1 -1
- package/dist/TabContainer.d.ts +5 -0
- package/dist/TabContainer.js +1 -31
- package/dist/TabContainer.js.map +1 -1
- package/dist/Table.d.ts +12 -1
- package/dist/Table.js +20 -11
- package/dist/Table.js.map +1 -1
- package/dist/TableGrowing.d.ts +4 -1
- package/dist/TableGrowing.js +2 -2
- package/dist/TableGrowing.js.map +1 -1
- package/dist/TableNavigation.js +6 -1
- package/dist/TableNavigation.js.map +1 -1
- package/dist/TableRow.d.ts +7 -0
- package/dist/TableRow.js +13 -0
- package/dist/TableRow.js.map +1 -1
- package/dist/TableSelection.d.ts +3 -0
- package/dist/TableSelection.js +1 -1
- package/dist/TableSelection.js.map +1 -1
- package/dist/TableUtils.d.ts +2 -1
- package/dist/TableUtils.js +10 -1
- package/dist/TableUtils.js.map +1 -1
- package/dist/TableVirtualizer.d.ts +99 -0
- package/dist/TableVirtualizer.js +251 -0
- package/dist/TableVirtualizer.js.map +1 -0
- package/dist/Tag.d.ts +3 -0
- package/dist/Tag.js +1 -1
- package/dist/Tag.js.map +1 -1
- package/dist/TextArea.d.ts +7 -0
- package/dist/TextArea.js +5 -5
- package/dist/TextArea.js.map +1 -1
- package/dist/TimePicker.d.ts +8 -1
- package/dist/TimePicker.js +1 -29
- package/dist/TimePicker.js.map +1 -1
- package/dist/TimePickerClock.d.ts +3 -0
- package/dist/TimePickerClock.js +7 -21
- package/dist/TimePickerClock.js.map +1 -1
- package/dist/TimePickerInternals.d.ts +3 -0
- package/dist/TimePickerInternals.js +1 -5
- package/dist/TimePickerInternals.js.map +1 -1
- package/dist/TimeSelectionClocks.d.ts +3 -0
- package/dist/TimeSelectionClocks.js +1 -1
- package/dist/TimeSelectionClocks.js.map +1 -1
- package/dist/TimeSelectionInputs.d.ts +3 -0
- package/dist/TimeSelectionInputs.js +1 -1
- package/dist/TimeSelectionInputs.js.map +1 -1
- package/dist/Toast.d.ts +3 -0
- package/dist/Toast.js +1 -1
- package/dist/Toast.js.map +1 -1
- package/dist/Token.d.ts +6 -2
- package/dist/Token.js +1 -5
- package/dist/Token.js.map +1 -1
- package/dist/Tokenizer.d.ts +6 -0
- package/dist/Tokenizer.js +1 -10
- package/dist/Tokenizer.js.map +1 -1
- package/dist/Toolbar.d.ts +3 -0
- package/dist/Toolbar.js +2 -7
- package/dist/Toolbar.js.map +1 -1
- package/dist/ToolbarButton.d.ts +3 -0
- package/dist/ToolbarButton.js +5 -2
- package/dist/ToolbarButton.js.map +1 -1
- package/dist/ToolbarSelect.d.ts +5 -0
- package/dist/ToolbarSelect.js +1 -7
- package/dist/ToolbarSelect.js.map +1 -1
- package/dist/Tree.d.ts +11 -0
- package/dist/Tree.js +1 -56
- package/dist/Tree.js.map +1 -1
- package/dist/TreeItemBase.d.ts +5 -0
- package/dist/TreeItemBase.js +1 -10
- package/dist/TreeItemBase.js.map +1 -1
- package/dist/YearPicker.d.ts +4 -0
- package/dist/YearPicker.js +1 -1
- package/dist/YearPicker.js.map +1 -1
- package/dist/bundle.esm.js +1 -0
- package/dist/bundle.esm.js.map +1 -1
- package/dist/css/themes/Avatar.css +1 -1
- package/dist/css/themes/AvatarGroup.css +1 -1
- package/dist/css/themes/Bar.css +1 -1
- package/dist/css/themes/Breadcrumbs.css +1 -1
- package/dist/css/themes/BusyIndicator.css +1 -1
- package/dist/css/themes/Button.css +1 -1
- package/dist/css/themes/Calendar.css +1 -1
- package/dist/css/themes/CalendarHeader.css +1 -1
- package/dist/css/themes/CalendarLegend.css +1 -1
- package/dist/css/themes/CalendarLegendItem.css +1 -1
- package/dist/css/themes/Card.css +1 -1
- package/dist/css/themes/CardHeader.css +1 -1
- package/dist/css/themes/Carousel.css +1 -1
- package/dist/css/themes/CheckBox.css +1 -1
- package/dist/css/themes/ColorPalette.css +1 -1
- package/dist/css/themes/ColorPaletteItem.css +1 -1
- package/dist/css/themes/ColorPalettePopover.css +1 -1
- package/dist/css/themes/ColorPicker.css +1 -1
- package/dist/css/themes/ComboBox.css +1 -1
- package/dist/css/themes/ComboBoxItem.css +1 -1
- package/dist/css/themes/DatePicker.css +1 -1
- package/dist/css/themes/DateTimePickerPopover.css +1 -1
- package/dist/css/themes/DayPicker.css +1 -1
- package/dist/css/themes/Dialog.css +1 -1
- package/dist/css/themes/FileUploader.css +1 -1
- package/dist/css/themes/Form.css +1 -1
- package/dist/css/themes/FormItem.css +1 -1
- package/dist/css/themes/FormItemSpan.css +1 -1
- package/dist/css/themes/GrowingButton.css +1 -1
- package/dist/css/themes/Icon.css +1 -1
- package/dist/css/themes/Input.css +1 -1
- package/dist/css/themes/InputIcon.css +1 -1
- package/dist/css/themes/InputSharedStyles.css +1 -1
- package/dist/css/themes/Link.css +1 -1
- package/dist/css/themes/List.css +1 -1
- package/dist/css/themes/ListItem.css +1 -1
- package/dist/css/themes/ListItemBase.css +1 -1
- package/dist/css/themes/ListItemCustom.css +1 -1
- package/dist/css/themes/ListItemGroup.css +1 -1
- package/dist/css/themes/ListItemGroupHeader.css +1 -1
- package/dist/css/themes/ListItemIcon.css +1 -1
- package/dist/css/themes/Menu.css +1 -1
- package/dist/css/themes/MenuItem.css +1 -1
- package/dist/css/themes/MessageStrip.css +1 -1
- package/dist/css/themes/MonthPicker.css +1 -1
- package/dist/css/themes/MultiComboBox.css +1 -1
- package/dist/css/themes/MultiComboBoxItem.css +1 -1
- package/dist/css/themes/MultiComboBoxPopover.css +1 -1
- package/dist/css/themes/MultiInput.css +1 -1
- package/dist/css/themes/NavigationMenu.css +1 -1
- package/dist/css/themes/NavigationMenuItem.css +1 -1
- package/dist/css/themes/OptionBase.css +1 -1
- package/dist/css/themes/Panel.css +1 -1
- package/dist/css/themes/Popover.css +1 -1
- package/dist/css/themes/PopupsCommon.css +1 -1
- package/dist/css/themes/ProgressIndicator.css +1 -1
- package/dist/css/themes/RadioButton.css +1 -1
- package/dist/css/themes/RangeSlider.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/ResponsivePopover.css +1 -1
- package/dist/css/themes/ResponsivePopoverCommon.css +1 -1
- package/dist/css/themes/SegmentedButton.css +1 -1
- package/dist/css/themes/SegmentedButtonItem.css +1 -1
- package/dist/css/themes/Select.css +1 -1
- package/dist/css/themes/SliderBase.css +1 -1
- package/dist/css/themes/SplitButton.css +1 -1
- package/dist/css/themes/StepInput.css +1 -1
- package/dist/css/themes/SuggestionItem.css +1 -1
- package/dist/css/themes/SuggestionItemCustom.css +1 -1
- package/dist/css/themes/Switch.css +1 -1
- package/dist/css/themes/TabContainer.css +1 -1
- package/dist/css/themes/TabInOverflow.css +1 -1
- package/dist/css/themes/TabInStrip.css +1 -1
- package/dist/css/themes/TabSemanticIcon.css +1 -1
- package/dist/css/themes/TabSeparatorInOverflow.css +1 -1
- package/dist/css/themes/Table.css +1 -1
- package/dist/css/themes/TableCellBase.css +1 -1
- package/dist/css/themes/TableHeaderRow.css +1 -1
- package/dist/css/themes/TableRow.css +1 -1
- package/dist/css/themes/TableRowBase.css +1 -1
- package/dist/css/themes/Tag.css +1 -1
- package/dist/css/themes/Text.css +1 -1
- package/dist/css/themes/TextArea.css +1 -1
- package/dist/css/themes/TimePicker.css +1 -1
- package/dist/css/themes/Toast.css +1 -1
- package/dist/css/themes/ToggleButton.css +1 -1
- package/dist/css/themes/Token.css +1 -1
- package/dist/css/themes/Tokenizer.css +1 -1
- package/dist/css/themes/TokenizerPopover.css +1 -1
- package/dist/css/themes/Toolbar.css +1 -1
- package/dist/css/themes/ToolbarPopover.css +1 -1
- package/dist/css/themes/TreeItem.css +1 -1
- package/dist/css/themes/ValueStateMessage.css +1 -1
- package/dist/css/themes/YearPicker.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw_exp/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +270 -8
- package/dist/custom-elements.json +220 -0
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/templates/BarTemplate.lit.js +1 -1
- package/dist/generated/templates/BarTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ButtonTemplate.lit.js +1 -1
- package/dist/generated/templates/ButtonTemplate.lit.js.map +1 -1
- package/dist/generated/templates/LinkTemplate.lit.js +1 -1
- package/dist/generated/templates/LinkTemplate.lit.js.map +1 -1
- package/dist/generated/templates/RatingIndicatorTemplate.lit.js +1 -1
- package/dist/generated/templates/RatingIndicatorTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ResponsivePopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/ResponsivePopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TableTemplate.lit.js +1 -1
- package/dist/generated/templates/TableTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToggleButtonTemplate.lit.js +1 -1
- package/dist/generated/templates/ToggleButtonTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToggleSpinButtonTemplate.lit.js +1 -1
- package/dist/generated/templates/ToggleSpinButtonTemplate.lit.js.map +1 -1
- package/dist/generated/themes/Avatar.css.js +1 -1
- package/dist/generated/themes/Avatar.css.js.map +1 -1
- package/dist/generated/themes/AvatarGroup.css.js +1 -1
- package/dist/generated/themes/AvatarGroup.css.js.map +1 -1
- package/dist/generated/themes/Bar.css.js +1 -1
- package/dist/generated/themes/Bar.css.js.map +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js.map +1 -1
- package/dist/generated/themes/BusyIndicator.css.js +1 -1
- package/dist/generated/themes/BusyIndicator.css.js.map +1 -1
- package/dist/generated/themes/Button.css.js +1 -1
- package/dist/generated/themes/Button.css.js.map +1 -1
- package/dist/generated/themes/Calendar.css.js +1 -1
- package/dist/generated/themes/Calendar.css.js.map +1 -1
- package/dist/generated/themes/CalendarHeader.css.js +1 -1
- package/dist/generated/themes/CalendarHeader.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegend.css.js +1 -1
- package/dist/generated/themes/CalendarLegend.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js.map +1 -1
- package/dist/generated/themes/Card.css.js +1 -1
- package/dist/generated/themes/Card.css.js.map +1 -1
- package/dist/generated/themes/CardHeader.css.js +1 -1
- package/dist/generated/themes/CardHeader.css.js.map +1 -1
- package/dist/generated/themes/Carousel.css.js +1 -1
- package/dist/generated/themes/Carousel.css.js.map +1 -1
- package/dist/generated/themes/CheckBox.css.js +1 -1
- package/dist/generated/themes/CheckBox.css.js.map +1 -1
- package/dist/generated/themes/ColorPalette.css.js +1 -1
- package/dist/generated/themes/ColorPalette.css.js.map +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js.map +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js.map +1 -1
- package/dist/generated/themes/ColorPicker.css.js +1 -1
- package/dist/generated/themes/ColorPicker.css.js.map +1 -1
- package/dist/generated/themes/ComboBox.css.js +1 -1
- package/dist/generated/themes/ComboBox.css.js.map +1 -1
- package/dist/generated/themes/ComboBoxItem.css.js +1 -1
- package/dist/generated/themes/ComboBoxItem.css.js.map +1 -1
- package/dist/generated/themes/DatePicker.css.js +1 -1
- package/dist/generated/themes/DatePicker.css.js.map +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js.map +1 -1
- package/dist/generated/themes/DayPicker.css.js +1 -1
- package/dist/generated/themes/DayPicker.css.js.map +1 -1
- package/dist/generated/themes/Dialog.css.js +1 -1
- package/dist/generated/themes/Dialog.css.js.map +1 -1
- package/dist/generated/themes/FileUploader.css.js +1 -1
- package/dist/generated/themes/FileUploader.css.js.map +1 -1
- package/dist/generated/themes/Form.css.js +1 -1
- package/dist/generated/themes/Form.css.js.map +1 -1
- package/dist/generated/themes/FormItem.css.js +1 -1
- package/dist/generated/themes/FormItem.css.js.map +1 -1
- package/dist/generated/themes/FormItemSpan.css.js +1 -1
- package/dist/generated/themes/FormItemSpan.css.js.map +1 -1
- package/dist/generated/themes/GrowingButton.css.js +1 -1
- package/dist/generated/themes/GrowingButton.css.js.map +1 -1
- package/dist/generated/themes/Icon.css.js +1 -1
- package/dist/generated/themes/Icon.css.js.map +1 -1
- package/dist/generated/themes/Input.css.js +1 -1
- package/dist/generated/themes/Input.css.js.map +1 -1
- package/dist/generated/themes/InputIcon.css.js +1 -1
- package/dist/generated/themes/InputIcon.css.js.map +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js.map +1 -1
- package/dist/generated/themes/Link.css.js +1 -1
- package/dist/generated/themes/Link.css.js.map +1 -1
- package/dist/generated/themes/List.css.js +1 -1
- package/dist/generated/themes/List.css.js.map +1 -1
- package/dist/generated/themes/ListItem.css.js +1 -1
- package/dist/generated/themes/ListItem.css.js.map +1 -1
- package/dist/generated/themes/ListItemBase.css.js +1 -1
- package/dist/generated/themes/ListItemBase.css.js.map +1 -1
- package/dist/generated/themes/ListItemCustom.css.js +1 -1
- package/dist/generated/themes/ListItemCustom.css.js.map +1 -1
- package/dist/generated/themes/ListItemGroup.css.js +1 -1
- package/dist/generated/themes/ListItemGroup.css.js.map +1 -1
- package/dist/generated/themes/ListItemGroupHeader.css.js +1 -1
- package/dist/generated/themes/ListItemGroupHeader.css.js.map +1 -1
- package/dist/generated/themes/ListItemIcon.css.js +1 -1
- package/dist/generated/themes/ListItemIcon.css.js.map +1 -1
- package/dist/generated/themes/Menu.css.js +1 -1
- package/dist/generated/themes/Menu.css.js.map +1 -1
- package/dist/generated/themes/MenuItem.css.js +1 -1
- package/dist/generated/themes/MenuItem.css.js.map +1 -1
- package/dist/generated/themes/MessageStrip.css.js +1 -1
- package/dist/generated/themes/MessageStrip.css.js.map +1 -1
- package/dist/generated/themes/MonthPicker.css.js +1 -1
- package/dist/generated/themes/MonthPicker.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBox.css.js +1 -1
- package/dist/generated/themes/MultiComboBox.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBoxItem.css.js +1 -1
- package/dist/generated/themes/MultiComboBoxItem.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js.map +1 -1
- package/dist/generated/themes/MultiInput.css.js +1 -1
- package/dist/generated/themes/MultiInput.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenu.css.js +1 -1
- package/dist/generated/themes/NavigationMenu.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenuItem.css.js +1 -1
- package/dist/generated/themes/NavigationMenuItem.css.js.map +1 -1
- package/dist/generated/themes/OptionBase.css.js +1 -1
- package/dist/generated/themes/OptionBase.css.js.map +1 -1
- package/dist/generated/themes/Panel.css.js +1 -1
- package/dist/generated/themes/Panel.css.js.map +1 -1
- package/dist/generated/themes/Popover.css.js +1 -1
- package/dist/generated/themes/Popover.css.js.map +1 -1
- package/dist/generated/themes/PopupsCommon.css.js +1 -1
- package/dist/generated/themes/PopupsCommon.css.js.map +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js.map +1 -1
- package/dist/generated/themes/RadioButton.css.js +1 -1
- package/dist/generated/themes/RadioButton.css.js.map +1 -1
- package/dist/generated/themes/RangeSlider.css.js +1 -1
- package/dist/generated/themes/RangeSlider.css.js.map +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js.map +1 -1
- package/dist/generated/themes/SegmentedButton.css.js +1 -1
- package/dist/generated/themes/SegmentedButton.css.js.map +1 -1
- package/dist/generated/themes/SegmentedButtonItem.css.js +1 -1
- package/dist/generated/themes/SegmentedButtonItem.css.js.map +1 -1
- package/dist/generated/themes/Select.css.js +1 -1
- package/dist/generated/themes/Select.css.js.map +1 -1
- package/dist/generated/themes/SliderBase.css.js +1 -1
- package/dist/generated/themes/SliderBase.css.js.map +1 -1
- package/dist/generated/themes/SplitButton.css.js +1 -1
- package/dist/generated/themes/SplitButton.css.js.map +1 -1
- package/dist/generated/themes/StepInput.css.js +1 -1
- package/dist/generated/themes/StepInput.css.js.map +1 -1
- package/dist/generated/themes/SuggestionItem.css.js +1 -1
- package/dist/generated/themes/SuggestionItem.css.js.map +1 -1
- package/dist/generated/themes/SuggestionItemCustom.css.js +1 -1
- package/dist/generated/themes/SuggestionItemCustom.css.js.map +1 -1
- package/dist/generated/themes/Switch.css.js +1 -1
- package/dist/generated/themes/Switch.css.js.map +1 -1
- package/dist/generated/themes/TabContainer.css.js +1 -1
- package/dist/generated/themes/TabContainer.css.js.map +1 -1
- package/dist/generated/themes/TabInOverflow.css.js +1 -1
- package/dist/generated/themes/TabInOverflow.css.js.map +1 -1
- package/dist/generated/themes/TabInStrip.css.js +1 -1
- package/dist/generated/themes/TabInStrip.css.js.map +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js.map +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js.map +1 -1
- package/dist/generated/themes/Table.css.js +1 -1
- package/dist/generated/themes/Table.css.js.map +1 -1
- package/dist/generated/themes/TableCellBase.css.js +1 -1
- package/dist/generated/themes/TableCellBase.css.js.map +1 -1
- package/dist/generated/themes/TableHeaderRow.css.js +1 -1
- package/dist/generated/themes/TableHeaderRow.css.js.map +1 -1
- package/dist/generated/themes/TableRow.css.js +1 -1
- package/dist/generated/themes/TableRow.css.js.map +1 -1
- package/dist/generated/themes/TableRowBase.css.js +1 -1
- package/dist/generated/themes/TableRowBase.css.js.map +1 -1
- package/dist/generated/themes/Tag.css.js +1 -1
- package/dist/generated/themes/Tag.css.js.map +1 -1
- package/dist/generated/themes/Text.css.js +1 -1
- package/dist/generated/themes/Text.css.js.map +1 -1
- package/dist/generated/themes/TextArea.css.js +1 -1
- package/dist/generated/themes/TextArea.css.js.map +1 -1
- package/dist/generated/themes/TimePicker.css.js +1 -1
- package/dist/generated/themes/TimePicker.css.js.map +1 -1
- package/dist/generated/themes/Toast.css.js +1 -1
- package/dist/generated/themes/Toast.css.js.map +1 -1
- package/dist/generated/themes/ToggleButton.css.js +1 -1
- package/dist/generated/themes/ToggleButton.css.js.map +1 -1
- package/dist/generated/themes/Token.css.js +1 -1
- package/dist/generated/themes/Token.css.js.map +1 -1
- package/dist/generated/themes/Tokenizer.css.js +1 -1
- package/dist/generated/themes/Tokenizer.css.js.map +1 -1
- package/dist/generated/themes/TokenizerPopover.css.js +1 -1
- package/dist/generated/themes/TokenizerPopover.css.js.map +1 -1
- package/dist/generated/themes/Toolbar.css.js +1 -1
- package/dist/generated/themes/Toolbar.css.js.map +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js.map +1 -1
- package/dist/generated/themes/TreeItem.css.js +1 -1
- package/dist/generated/themes/TreeItem.css.js.map +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js.map +1 -1
- package/dist/generated/themes/YearPicker.css.js +1 -1
- package/dist/generated/themes/YearPicker.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +43 -1
- package/dist/web-types.json +107 -2
- package/package.json +9 -9
- package/src/Bar.hbs +3 -3
- package/src/Button.hbs +1 -0
- package/src/Link.hbs +1 -0
- package/src/RatingIndicator.hbs +1 -1
- package/src/ResponsivePopover.hbs +2 -2
- package/src/Table.hbs +6 -1
- package/src/i18n/messagebundle_ar.properties +2 -0
- package/src/i18n/messagebundle_bg.properties +2 -0
- package/src/i18n/messagebundle_ca.properties +2 -0
- package/src/i18n/messagebundle_cnr.properties +2 -0
- package/src/i18n/messagebundle_cs.properties +2 -0
- package/src/i18n/messagebundle_cy.properties +2 -0
- package/src/i18n/messagebundle_da.properties +2 -0
- package/src/i18n/messagebundle_de.properties +2 -0
- package/src/i18n/messagebundle_el.properties +2 -0
- package/src/i18n/messagebundle_en_GB.properties +2 -0
- package/src/i18n/messagebundle_es.properties +2 -0
- package/src/i18n/messagebundle_es_MX.properties +2 -0
- package/src/i18n/messagebundle_et.properties +2 -0
- package/src/i18n/messagebundle_fi.properties +2 -0
- package/src/i18n/messagebundle_fr.properties +2 -0
- package/src/i18n/messagebundle_fr_CA.properties +2 -0
- package/src/i18n/messagebundle_hi.properties +2 -0
- package/src/i18n/messagebundle_hr.properties +2 -0
- package/src/i18n/messagebundle_hu.properties +2 -0
- package/src/i18n/messagebundle_id.properties +2 -0
- package/src/i18n/messagebundle_it.properties +2 -0
- package/src/i18n/messagebundle_iw.properties +2 -0
- package/src/i18n/messagebundle_ja.properties +2 -0
- package/src/i18n/messagebundle_kk.properties +2 -0
- package/src/i18n/messagebundle_ko.properties +2 -0
- package/src/i18n/messagebundle_lt.properties +2 -0
- package/src/i18n/messagebundle_lv.properties +2 -0
- package/src/i18n/messagebundle_mk.properties +2 -0
- package/src/i18n/messagebundle_ms.properties +2 -0
- package/src/i18n/messagebundle_nl.properties +2 -0
- package/src/i18n/messagebundle_no.properties +2 -0
- package/src/i18n/messagebundle_pl.properties +2 -0
- package/src/i18n/messagebundle_pt.properties +2 -0
- package/src/i18n/messagebundle_pt_PT.properties +2 -0
- package/src/i18n/messagebundle_ro.properties +2 -0
- package/src/i18n/messagebundle_ru.properties +2 -0
- package/src/i18n/messagebundle_sh.properties +2 -0
- package/src/i18n/messagebundle_sk.properties +2 -0
- package/src/i18n/messagebundle_sl.properties +2 -0
- package/src/i18n/messagebundle_sr.properties +2 -0
- package/src/i18n/messagebundle_sv.properties +2 -0
- package/src/i18n/messagebundle_th.properties +2 -0
- package/src/i18n/messagebundle_tr.properties +2 -0
- package/src/i18n/messagebundle_uk.properties +2 -0
- package/src/i18n/messagebundle_vi.properties +2 -0
- package/src/i18n/messagebundle_zh_CN.properties +2 -0
- package/src/i18n/messagebundle_zh_TW.properties +2 -0
- package/src/themes/ListItem.css +4 -0
- package/src/themes/ListItemBase.css +8 -0
- package/src/themes/RatingIndicator.css +1 -0
- package/src/themes/Table.css +15 -2
- package/src/themes/TableCellBase.css +1 -1
- package/src/themes/TableRow.css +5 -0
- package/src/themes/Tag.css +10 -0
- package/src/themes/base/RatingIndicator-parameters.css +3 -2
- package/src/themes/base/Tag-parameters.css +6 -0
- package/src/themes/sap_fiori_3_hcb/Tag-parameters.css +2 -0
- package/src/themes/sap_fiori_3_hcw/Tag-parameters.css +2 -0
- package/src/themes/sap_horizon/RatingIndicator-parameters.css +0 -2
- package/src/themes/sap_horizon_dark/RatingIndicator-parameters.css +0 -2
- package/src/themes/sap_horizon_hcb/RatingIndicator-parameters.css +0 -1
- package/src/themes/sap_horizon_hcb/Tag-parameters.css +2 -0
- package/src/themes/sap_horizon_hcw/RatingIndicator-parameters.css +0 -1
- package/src/themes/sap_horizon_hcw/Tag-parameters.css +2 -0
package/dist/ListItemGroup.js
CHANGED
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
8
|
-
import event from "@ui5/webcomponents-base/dist/decorators/event.js";
|
|
8
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
9
9
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
10
10
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
11
11
|
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
@@ -164,16 +164,6 @@ ListItemGroup = __decorate([
|
|
|
164
164
|
*/
|
|
165
165
|
,
|
|
166
166
|
event("move-over", {
|
|
167
|
-
detail: {
|
|
168
|
-
/**
|
|
169
|
-
* @public
|
|
170
|
-
*/
|
|
171
|
-
source: { type: Object },
|
|
172
|
-
/**
|
|
173
|
-
* @public
|
|
174
|
-
*/
|
|
175
|
-
destination: { type: Object },
|
|
176
|
-
},
|
|
177
167
|
bubbles: true,
|
|
178
168
|
cancelable: true,
|
|
179
169
|
})
|
|
@@ -188,16 +178,6 @@ ListItemGroup = __decorate([
|
|
|
188
178
|
*/
|
|
189
179
|
,
|
|
190
180
|
event("move", {
|
|
191
|
-
detail: {
|
|
192
|
-
/**
|
|
193
|
-
* @public
|
|
194
|
-
*/
|
|
195
|
-
source: { type: Object },
|
|
196
|
-
/**
|
|
197
|
-
* @public
|
|
198
|
-
*/
|
|
199
|
-
destination: { type: Object },
|
|
200
|
-
},
|
|
201
181
|
bubbles: true,
|
|
202
182
|
})
|
|
203
183
|
], ListItemGroup);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemGroup.js","sourceRoot":"","sources":["../src/ListItemGroup.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,YAAY,MAAM,+DAA+D,CAAC;AACzF,OAAO,E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AEF;;;;;;;;OAQG;;IAEF,KAAK,CAA+B,WAAW,EAAE;QACjD,MAAM,EAAE;YACP;;eAEG;YACH,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACxB;;eAEG;YACH,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SAC7B;QACD,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;KAChB,CAAC;IAEF;;;;;;;;OAQG;;IACF,KAAK,CAA+B,MAAM,EAAE;QAC5C,MAAM,EAAE;YACP;;eAEG;YACH,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACxB;;eAEG;YACH,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SAC7B;QACD,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,aAAa,CAqJlB;AAED,aAAa,CAAC,MAAM,EAAE,CAAC;AAEvB,MAAM,yBAAyB,GAAG,CAAC,MAAW,EAA2B,EAAE;IAC1E,OAAO,iBAAiB,IAAI,MAAM,CAAC;AACpC,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC;AAC7B,OAAO,EAAE,yBAAyB,EAAE,CAAC","sourcesContent":["import slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport DragRegistry from \"@ui5/webcomponents-base/dist/util/dragAndDrop/DragRegistry.js\";\nimport { findClosestPosition } from \"@ui5/webcomponents-base/dist/util/dragAndDrop/findClosestPosition.js\";\nimport Orientation from \"@ui5/webcomponents-base/dist/types/Orientation.js\";\nimport MovePlacement from \"@ui5/webcomponents-base/dist/types/MovePlacement.js\";\nimport DropIndicator from \"./DropIndicator.js\";\nimport type ListItemBase from \"./ListItemBase.js\";\n\n// Template\nimport ListItemGroupTemplate from \"./generated/templates/ListItemGroupTemplate.lit.js\";\n\n// Styles\nimport ListItemGroupCss from \"./generated/themes/ListItemGroup.css.js\";\nimport ListItemStandard from \"./ListItemStandard.js\";\nimport ListItemGroupHeader from \"./ListItemGroupHeader.js\";\n\ntype ListItemGroupMoveEventDetail = {\n\tsource: {\n\t\telement: HTMLElement,\n\t},\n\tdestination: {\n\t\telement: HTMLElement,\n\t\tplacement: `${MovePlacement}`,\n\t}\n}\n\n/**\n * @class\n * ### Overview\n * The `ui5-li-group` is a special list item, used only to create groups of list items.\n *\n * This is the item to use inside a `ui5-list`.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents/dist/ListItemGroup.js\";`\n * @csspart header - Used to style the header item of the group\n * @constructor\n * @extends UI5Element\n * @public\n * @since 2.0.0\n */\n@customElement({\n\ttag: \"ui5-li-group\",\n\trenderer: litRender,\n\tlanguageAware: true,\n\ttemplate: ListItemGroupTemplate,\n\tstyles: [ListItemGroupCss],\n\tdependencies: [ListItemStandard, ListItemGroupHeader, DropIndicator],\n})\n\n/**\n * Fired when a movable list item is moved over a potential drop target during a dragging operation.\n *\n * If the new position is valid, prevent the default action of the event using `preventDefault()`.\n * @param {object} source Contains information about the moved element under `element` property.\n * @param {object} destination Contains information about the destination of the moved element. Has `element` and `placement` properties.\n * @public\n * @since 2.1.0\n */\n\n@event<ListItemGroupMoveEventDetail>(\"move-over\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tsource: { type: Object },\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tdestination: { type: Object },\n\t},\n\tbubbles: true,\n\tcancelable: true,\n})\n\n/**\n * Fired when a movable list item is dropped onto a drop target.\n *\n * **Note:** `move` event is fired only if there was a preceding `move-over` with prevented default action.\n * @param {object} source Contains information about the moved element under `element` property.\n * @param {object} destination Contains information about the destination of the moved element. Has `element` and `placement` properties.\n * @public\n * @since 2.1.0\n */\n@event<ListItemGroupMoveEventDetail>(\"move\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tsource: { type: Object },\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tdestination: { type: Object },\n\t},\n\tbubbles: true,\n})\n\nclass ListItemGroup extends UI5Element {\n\t/**\n\t * Defines the header text of the <code>ui5-li-group</code>.\n\t * @public\n\t * @default undefined\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Defines the accessible name of the header.\n\t * @public\n\t * @default undefined\n\t */\n\t@property()\n\theaderAccessibleName?: string;\n\n\t/**\n\t * Defines the items of the <code>ui5-li-group</code>.\n\t * @public\n\t */\n\t@slot({\n\t\t\"default\": true,\n\t\tinvalidateOnChildChange: true,\n\t\ttype: HTMLElement,\n\t})\n\titems!: Array<ListItemBase>;\n\n\t/**\n\t * Indicates whether the header is focused\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused = false;\n\n\t/**\n\t* Defines the header of the component.\n\t*\n\t* **Note:** Using this slot, the default header text of group and the value of `headerText` property will be overwritten.\n\t* @public\n\t*/\n\t@slot({ type: HTMLElement })\n\theader!: Array<ListItemBase>;\n\n\tonEnterDOM() {\n\t\tDragRegistry.subscribe(this);\n\t}\n\n\tonExitDOM() {\n\t\tDragRegistry.unsubscribe(this);\n\t}\n\n\tget groupHeaderItem() {\n\t\treturn this.shadowRoot!.querySelector<ListItemGroupHeader>(\"[ui5-li-group-header]\")!;\n\t}\n\n\tget hasHeader(): boolean {\n\t\treturn !!this.headerText || this.hasFormattedHeader;\n\t}\n\n\tget hasFormattedHeader(): boolean {\n\t\treturn !!this.header.length;\n\t}\n\n\tget isListItemGroup() {\n\t\treturn true;\n\t}\n\n\tget dropIndicatorDOM(): DropIndicator | null {\n\t\treturn this.shadowRoot!.querySelector(\"[ui5-drop-indicator]\");\n\t}\n\n\t_ondragenter(e: DragEvent) {\n\t\te.preventDefault();\n\t}\n\n\t_ondragleave(e: DragEvent) {\n\t\tif (e.relatedTarget instanceof Node && this.shadowRoot!.contains(e.relatedTarget)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.dropIndicatorDOM!.targetReference = null;\n\t}\n\n\t_ondragover(e: DragEvent) {\n\t\tconst draggedElement = DragRegistry.getDraggedElement();\n\n\t\tif (!(e.target instanceof HTMLElement) || !draggedElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst closestPosition = findClosestPosition(\n\t\t\tthis.items,\n\t\t\te.clientY,\n\t\t\tOrientation.Vertical,\n\t\t);\n\n\t\tif (!closestPosition) {\n\t\t\tthis.dropIndicatorDOM!.targetReference = null;\n\t\t\treturn;\n\t\t}\n\n\t\tlet placements = closestPosition.placements;\n\n\t\tif (closestPosition.element === draggedElement) {\n\t\t\tplacements = placements.filter(placement => placement !== MovePlacement.On);\n\t\t}\n\n\t\tconst placementAccepted = placements.some(placement => {\n\t\t\tconst beforeItemMovePrevented = !this.fireDecoratorEvent<ListItemGroupMoveEventDetail>(\"move-over\", {\n\t\t\t\tsource: {\n\t\t\t\t\telement: draggedElement,\n\t\t\t\t},\n\t\t\t\tdestination: {\n\t\t\t\t\telement: closestPosition.element,\n\t\t\t\t\tplacement,\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tif (beforeItemMovePrevented) {\n\t\t\t\te.preventDefault();\n\t\t\t\tthis.dropIndicatorDOM!.targetReference = closestPosition.element;\n\t\t\t\tthis.dropIndicatorDOM!.placement = placement;\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t});\n\n\t\tif (!placementAccepted) {\n\t\t\tthis.dropIndicatorDOM!.targetReference = null;\n\t\t}\n\t}\n\n\t_ondrop(e: DragEvent) {\n\t\te.preventDefault();\n\n\t\tthis.fireDecoratorEvent<ListItemGroupMoveEventDetail>(\"move\", {\n\t\t\tsource: {\n\t\t\t\telement: DragRegistry.getDraggedElement()!,\n\t\t\t},\n\t\t\tdestination: {\n\t\t\t\telement: this.dropIndicatorDOM!.targetReference!,\n\t\t\t\tplacement: this.dropIndicatorDOM!.placement,\n\t\t\t},\n\t\t});\n\n\t\tthis.dropIndicatorDOM!.targetReference = null;\n\t}\n}\n\nListItemGroup.define();\n\nconst isInstanceOfListItemGroup = (object: any): object is ListItemGroup => {\n\treturn \"isListItemGroup\" in object;\n};\n\nexport default ListItemGroup;\nexport { isInstanceOfListItemGroup };\nexport type { ListItemGroupMoveEventDetail };\n"]}
|
|
1
|
+
{"version":3,"file":"ListItemGroup.js","sourceRoot":"","sources":["../src/ListItemGroup.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,YAAY,MAAM,+DAA+D,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sEAAsE,CAAC;AAC3G,OAAO,WAAW,MAAM,mDAAmD,CAAC;AAC5E,OAAO,aAAa,MAAM,qDAAqD,CAAC;AAChF,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAG/C,WAAW;AACX,OAAO,qBAAqB,MAAM,oDAAoD,CAAC;AAEvF,SAAS;AACT,OAAO,gBAAgB,MAAM,yCAAyC,CAAC;AACvE,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAY3D;;;;;;;;;;;;;;GAcG;AAsCH,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;IAAtC;;QAgCC;;;WAGG;QAEH,YAAO,GAAG,KAAK,CAAC;IAoHjB,CAAC;IAzGA,UAAU;QACT,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS;QACR,YAAY,CAAC,W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,gBAAiB,CAAC,eAAe,GAAG,IAAI,CAAC;IAC/C,CAAC;CACD,CAAA;AA9IA;IADC,QAAQ,EAAE;iDACS;AAQpB;IADC,QAAQ,EAAE;2DACmB;AAW9B;IALC,IAAI,CAAC;QACL,SAAS,EAAE,IAAI;QACf,uBAAuB,EAAE,IAAI;QAC7B,IAAI,EAAE,WAAW;KACjB,CAAC;4CAC0B;AAO5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CACZ;AAShB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;6CACC;AA9CxB,aAAa;IArClB,aAAa,CAAC;QACd,GAAG,EAAE,cAAc;QACnB,QAAQ,EAAE,SAAS;QACnB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,qBAAqB;QAC/B,MAAM,EAAE,CAAC,gBAAgB,CAAC;QAC1B,YAAY,EAAE,CAAC,gBAAgB,EAAE,mBAAmB,EAAE,aAAa,CAAC;KACpE,CAAC;IAEF;;;;;;;;OAQG;;IAEF,KAAK,CAAC,WAAW,EAAE;QACnB,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;KAChB,CAAC;IAEF;;;;;;;;OAQG;;IACF,KAAK,CAAC,MAAM,EAAE;QACd,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,aAAa,CAyJlB;AAED,aAAa,CAAC,MAAM,EAAE,CAAC;AAEvB,MAAM,yBAAyB,GAAG,CAAC,MAAW,EAA2B,EAAE;IAC1E,OAAO,iBAAiB,IAAI,MAAM,CAAC;AACpC,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC;AAC7B,OAAO,EAAE,yBAAyB,EAAE,CAAC","sourcesContent":["import slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport DragRegistry from \"@ui5/webcomponents-base/dist/util/dragAndDrop/DragRegistry.js\";\nimport { findClosestPosition } from \"@ui5/webcomponents-base/dist/util/dragAndDrop/findClosestPosition.js\";\nimport Orientation from \"@ui5/webcomponents-base/dist/types/Orientation.js\";\nimport MovePlacement from \"@ui5/webcomponents-base/dist/types/MovePlacement.js\";\nimport DropIndicator from \"./DropIndicator.js\";\nimport type ListItemBase from \"./ListItemBase.js\";\n\n// Template\nimport ListItemGroupTemplate from \"./generated/templates/ListItemGroupTemplate.lit.js\";\n\n// Styles\nimport ListItemGroupCss from \"./generated/themes/ListItemGroup.css.js\";\nimport ListItemStandard from \"./ListItemStandard.js\";\nimport ListItemGroupHeader from \"./ListItemGroupHeader.js\";\n\ntype ListItemGroupMoveEventDetail = {\n\tsource: {\n\t\telement: HTMLElement,\n\t},\n\tdestination: {\n\t\telement: HTMLElement,\n\t\tplacement: `${MovePlacement}`,\n\t}\n}\n\n/**\n * @class\n * ### Overview\n * The `ui5-li-group` is a special list item, used only to create groups of list items.\n *\n * This is the item to use inside a `ui5-list`.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents/dist/ListItemGroup.js\";`\n * @csspart header - Used to style the header item of the group\n * @constructor\n * @extends UI5Element\n * @public\n * @since 2.0.0\n */\n@customElement({\n\ttag: \"ui5-li-group\",\n\trenderer: litRender,\n\tlanguageAware: true,\n\ttemplate: ListItemGroupTemplate,\n\tstyles: [ListItemGroupCss],\n\tdependencies: [ListItemStandard, ListItemGroupHeader, DropIndicator],\n})\n\n/**\n * Fired when a movable list item is moved over a potential drop target during a dragging operation.\n *\n * If the new position is valid, prevent the default action of the event using `preventDefault()`.\n * @param {object} source Contains information about the moved element under `element` property.\n * @param {object} destination Contains information about the destination of the moved element. Has `element` and `placement` properties.\n * @public\n * @since 2.1.0\n */\n\n@event(\"move-over\", {\n\tbubbles: true,\n\tcancelable: true,\n})\n\n/**\n * Fired when a movable list item is dropped onto a drop target.\n *\n * **Note:** `move` event is fired only if there was a preceding `move-over` with prevented default action.\n * @param {object} source Contains information about the moved element under `element` property.\n * @param {object} destination Contains information about the destination of the moved element. Has `element` and `placement` properties.\n * @public\n * @since 2.1.0\n */\n@event(\"move\", {\n\tbubbles: true,\n})\n\nclass ListItemGroup extends UI5Element {\n\teventDetails!: {\n\t\t\"move-over\": ListItemGroupMoveEventDetail,\n\t\t\"move\": ListItemGroupMoveEventDetail,\n\t}\n\t/**\n\t * Defines the header text of the <code>ui5-li-group</code>.\n\t * @public\n\t * @default undefined\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Defines the accessible name of the header.\n\t * @public\n\t * @default undefined\n\t */\n\t@property()\n\theaderAccessibleName?: string;\n\n\t/**\n\t * Defines the items of the <code>ui5-li-group</code>.\n\t * @public\n\t */\n\t@slot({\n\t\t\"default\": true,\n\t\tinvalidateOnChildChange: true,\n\t\ttype: HTMLElement,\n\t})\n\titems!: Array<ListItemBase>;\n\n\t/**\n\t * Indicates whether the header is focused\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused = false;\n\n\t/**\n\t* Defines the header of the component.\n\t*\n\t* **Note:** Using this slot, the default header text of group and the value of `headerText` property will be overwritten.\n\t* @public\n\t*/\n\t@slot({ type: HTMLElement })\n\theader!: Array<ListItemBase>;\n\n\tonEnterDOM() {\n\t\tDragRegistry.subscribe(this);\n\t}\n\n\tonExitDOM() {\n\t\tDragRegistry.unsubscribe(this);\n\t}\n\n\tget groupHeaderItem() {\n\t\treturn this.shadowRoot!.querySelector<ListItemGroupHeader>(\"[ui5-li-group-header]\")!;\n\t}\n\n\tget hasHeader(): boolean {\n\t\treturn !!this.headerText || this.hasFormattedHeader;\n\t}\n\n\tget hasFormattedHeader(): boolean {\n\t\treturn !!this.header.length;\n\t}\n\n\tget isListItemGroup() {\n\t\treturn true;\n\t}\n\n\tget dropIndicatorDOM(): DropIndicator | null {\n\t\treturn this.shadowRoot!.querySelector(\"[ui5-drop-indicator]\");\n\t}\n\n\t_ondragenter(e: DragEvent) {\n\t\te.preventDefault();\n\t}\n\n\t_ondragleave(e: DragEvent) {\n\t\tif (e.relatedTarget instanceof Node && this.shadowRoot!.contains(e.relatedTarget)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.dropIndicatorDOM!.targetReference = null;\n\t}\n\n\t_ondragover(e: DragEvent) {\n\t\tconst draggedElement = DragRegistry.getDraggedElement();\n\n\t\tif (!(e.target instanceof HTMLElement) || !draggedElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst closestPosition = findClosestPosition(\n\t\t\tthis.items,\n\t\t\te.clientY,\n\t\t\tOrientation.Vertical,\n\t\t);\n\n\t\tif (!closestPosition) {\n\t\t\tthis.dropIndicatorDOM!.targetReference = null;\n\t\t\treturn;\n\t\t}\n\n\t\tlet placements = closestPosition.placements;\n\n\t\tif (closestPosition.element === draggedElement) {\n\t\t\tplacements = placements.filter(placement => placement !== MovePlacement.On);\n\t\t}\n\n\t\tconst placementAccepted = placements.some(placement => {\n\t\t\tconst beforeItemMovePrevented = !this.fireDecoratorEvent(\"move-over\", {\n\t\t\t\tsource: {\n\t\t\t\t\telement: draggedElement,\n\t\t\t\t},\n\t\t\t\tdestination: {\n\t\t\t\t\telement: closestPosition.element,\n\t\t\t\t\tplacement,\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tif (beforeItemMovePrevented) {\n\t\t\t\te.preventDefault();\n\t\t\t\tthis.dropIndicatorDOM!.targetReference = closestPosition.element;\n\t\t\t\tthis.dropIndicatorDOM!.placement = placement;\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t});\n\n\t\tif (!placementAccepted) {\n\t\t\tthis.dropIndicatorDOM!.targetReference = null;\n\t\t}\n\t}\n\n\t_ondrop(e: DragEvent) {\n\t\te.preventDefault();\n\n\t\tthis.fireDecoratorEvent(\"move\", {\n\t\t\tsource: {\n\t\t\t\telement: DragRegistry.getDraggedElement()!,\n\t\t\t},\n\t\t\tdestination: {\n\t\t\t\telement: this.dropIndicatorDOM!.targetReference!,\n\t\t\t\tplacement: this.dropIndicatorDOM!.placement,\n\t\t\t},\n\t\t});\n\n\t\tthis.dropIndicatorDOM!.targetReference = null;\n\t}\n}\n\nListItemGroup.define();\n\nconst isInstanceOfListItemGroup = (object: any): object is ListItemGroup => {\n\treturn \"isListItemGroup\" in object;\n};\n\nexport default ListItemGroup;\nexport { isInstanceOfListItemGroup };\nexport type { ListItemGroupMoveEventDetail };\n"]}
|
package/dist/Menu.d.ts
CHANGED
|
@@ -62,6 +62,13 @@ type MenuBeforeCloseEventDetail = {
|
|
|
62
62
|
* @public
|
|
63
63
|
*/
|
|
64
64
|
declare class Menu extends UI5Element {
|
|
65
|
+
eventDetails: {
|
|
66
|
+
"item-click": MenuItemClickEventDetail;
|
|
67
|
+
"before-open": MenuBeforeOpenEventDetail;
|
|
68
|
+
"open": void;
|
|
69
|
+
"before-close": MenuBeforeCloseEventDetail;
|
|
70
|
+
"close": void;
|
|
71
|
+
};
|
|
65
72
|
/**
|
|
66
73
|
* Defines the header text of the menu (displayed on mobile).
|
|
67
74
|
* @default undefined
|
|
@@ -118,6 +125,7 @@ declare class Menu extends UI5Element {
|
|
|
118
125
|
_openItemSubMenu(item: MenuItem): void;
|
|
119
126
|
_closeItemSubMenu(item: MenuItem): void;
|
|
120
127
|
_itemMouseOver(e: MouseEvent): void;
|
|
128
|
+
focus(focusOptions?: FocusOptions): Promise<void>;
|
|
121
129
|
_startOpenTimeout(item: MenuItem): void;
|
|
122
130
|
_itemClick(e: CustomEvent<ListItemClickEventDetail>): void;
|
|
123
131
|
_itemKeyDown(e: KeyboardEvent): void;
|
package/dist/Menu.js
CHANGED
|
@@ -9,12 +9,13 @@ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
|
9
9
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
10
10
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
11
11
|
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
12
|
-
import event from "@ui5/webcomponents-base/dist/decorators/event.js";
|
|
12
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
13
13
|
import { isLeft, isRight, isEnter, } from "@ui5/webcomponents-base/dist/Keys.js";
|
|
14
14
|
import { isPhone, isDesktop, } from "@ui5/webcomponents-base/dist/Device.js";
|
|
15
15
|
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
|
16
16
|
import "@ui5/webcomponents-icons/dist/slim-arrow-right.js";
|
|
17
17
|
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
18
|
+
import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js";
|
|
18
19
|
import DOMReferenceConverter from "@ui5/webcomponents-base/dist/converters/DOMReference.js";
|
|
19
20
|
import ResponsivePopover from "./ResponsivePopover.js";
|
|
20
21
|
import Button from "./Button.js";
|
|
@@ -148,6 +149,14 @@ let Menu = Menu_1 = class Menu extends UI5Element {
|
|
|
148
149
|
}
|
|
149
150
|
}
|
|
150
151
|
}
|
|
152
|
+
async focus(focusOptions) {
|
|
153
|
+
await renderFinished();
|
|
154
|
+
const firstMenuItem = this._menuItems[0];
|
|
155
|
+
if (firstMenuItem) {
|
|
156
|
+
return firstMenuItem.focus(focusOptions);
|
|
157
|
+
}
|
|
158
|
+
return super.focus(focusOptions);
|
|
159
|
+
}
|
|
151
160
|
_startOpenTimeout(item) {
|
|
152
161
|
clearTimeout(this._timeout);
|
|
153
162
|
this._timeout = setTimeout(() => {
|
|
@@ -263,22 +272,7 @@ Menu = Menu_1 = __decorate([
|
|
|
263
272
|
* @public
|
|
264
273
|
*/
|
|
265
274
|
,
|
|
266
|
-
event("item-click"
|
|
267
|
-
detail: {
|
|
268
|
-
/**
|
|
269
|
-
* @public
|
|
270
|
-
*/
|
|
271
|
-
item: {
|
|
272
|
-
type: HTMLElement,
|
|
273
|
-
},
|
|
274
|
-
/**
|
|
275
|
-
* @public
|
|
276
|
-
*/
|
|
277
|
-
text: {
|
|
278
|
-
type: String,
|
|
279
|
-
},
|
|
280
|
-
},
|
|
281
|
-
})
|
|
275
|
+
event("item-click")
|
|
282
276
|
/**
|
|
283
277
|
* Fired before the menu is opened. This event can be cancelled, which will prevent the menu from opening. **This event does not bubble.**
|
|
284
278
|
*
|
|
@@ -289,17 +283,7 @@ Menu = Menu_1 = __decorate([
|
|
|
289
283
|
* @param { HTMLElement } item The `ui5-menu-item` that triggers opening of the sub-menu or undefined when fired upon root menu opening.
|
|
290
284
|
*/
|
|
291
285
|
,
|
|
292
|
-
event("before-open"
|
|
293
|
-
detail: {
|
|
294
|
-
/**
|
|
295
|
-
* @public
|
|
296
|
-
* @since 1.14.0
|
|
297
|
-
*/
|
|
298
|
-
item: {
|
|
299
|
-
type: HTMLElement,
|
|
300
|
-
},
|
|
301
|
-
},
|
|
302
|
-
})
|
|
286
|
+
event("before-open")
|
|
303
287
|
/**
|
|
304
288
|
* Fired after the menu is opened. **This event does not bubble.**
|
|
305
289
|
* @public
|
|
@@ -315,16 +299,7 @@ Menu = Menu_1 = __decorate([
|
|
|
315
299
|
* @since 1.10.0
|
|
316
300
|
*/
|
|
317
301
|
,
|
|
318
|
-
event("before-close"
|
|
319
|
-
detail: {
|
|
320
|
-
/**
|
|
321
|
-
* @public
|
|
322
|
-
*/
|
|
323
|
-
escPressed: {
|
|
324
|
-
type: Boolean,
|
|
325
|
-
},
|
|
326
|
-
},
|
|
327
|
-
})
|
|
302
|
+
event("before-close")
|
|
328
303
|
/**
|
|
329
304
|
* Fired after the menu is closed. **This event does not bubble.**
|
|
330
305
|
* @public
|
package/dist/Menu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../src/Menu.ts"],"names":[],"mappings":";;;;;;;AAAA,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OAMG;;IACF,KAAK,CAA6B,cAAc,EAAE;QAClD,MAAM,EAAE;YACP;;eAEG;YACH,UAAU,EAAE;gBACX,IAAI,EAAE,OAAO;aACb;SACD;KACD,CAAC;IAEF;;;;OAIG;;IACF,KAAK,CAAC,OAAO,CAAC;GAET,IAAI,CAyNT;AAED,IAAI,CAAC,MAAM,EAAE,CAAC;AAEd,eAAe,IAAI,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport {\n\tisLeft,\n\tisRight,\n\tisEnter,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport {\n\tisPhone,\n\tisDesktop,\n} from \"@ui5/webcomponents-base/dist/Device.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport type { Timeout } from \"@ui5/webcomponents-base/dist/types.js\";\nimport DOMReferenceConverter from \"@ui5/webcomponents-base/dist/converters/DOMReference.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport type { ResponsivePopoverBeforeCloseEventDetail } from \"./ResponsivePopover.js\";\nimport Button from \"./Button.js\";\nimport List from \"./List.js\";\nimport BusyIndicator from \"./BusyIndicator.js\";\nimport MenuItem from \"./MenuItem.js\";\nimport MenuSeparator from \"./MenuSeparator.js\";\nimport type {\n\tListItemClickEventDetail,\n} from \"./List.js\";\nimport menuTemplate from \"./generated/templates/MenuTemplate.lit.js\";\nimport {\n\tMENU_CLOSE_BUTTON_ARIA_LABEL,\n\tMENU_POPOVER_ACCESSIBLE_NAME,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport menuCss from \"./generated/themes/Menu.css.js\";\n\nconst MENU_OPEN_DELAY = 300;\n\n/**\n * Interface for components that may be slotted inside a `ui5-menu`.\n *\n * **Note:** Use with `ui5-menu-item` or `ui5-menu-separator`. Implementing the interface does not guarantee that any other classes can work with the `ui5-menu`.\n * @public\n */\ninterface IMenuItem extends UI5Element {\n\tisSeparator: boolean;\n}\n\ntype MenuItemClickEventDetail = {\n\titem: MenuItem,\n\ttext: string,\n}\n\ntype MenuBeforeOpenEventDetail = { item?: MenuItem };\ntype MenuBeforeCloseEventDetail = { escPressed: boolean };\n\n/**\n * @class\n *\n * ### Overview\n *\n * `ui5-menu` component represents a hierarchical menu structure.\n *\n * ### Structure\n *\n * The `ui5-menu` can hold two types of entities:\n *\n * - `ui5-menu-item` components\n * - `ui5-menu-separator` - used to separate menu items with a line\n *\n * An arbitrary hierarchy structure can be represented by recursively nesting menu items.\n *\n * ### Keyboard Handling\n *\n * The `ui5-menu` provides advanced keyboard handling.\n * The user can use the following keyboard shortcuts in order to navigate trough the tree:\n *\n * - `Arrow Up` / `Arrow Down` - Navigates up and down the menu items that are currently visible.\n * - `Arrow Right`, `Space` or `Enter` - Opens a sub-menu if there are menu items nested\n * in the currently clicked menu item.\n * - `Arrow Left` or `Escape` - Closes the currently opened sub-menu.\n *\n * Note: if the text ditrection is set to Right-to-left (RTL), `Arrow Right` and `Arrow Left` functionality is swapped.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Menu.js\";`\n * @constructor\n * @extends UI5Element\n * @since 1.3.0\n * @public\n */\n@customElement({\n\ttag: \"ui5-menu\",\n\trenderer: litRender,\n\tstyles: menuCss,\n\ttemplate: menuTemplate,\n\tdependencies: [\n\t\tResponsivePopover,\n\t\tButton,\n\t\tList,\n\t\tMenuItem,\n\t\tMenuSeparator,\n\t\tBusyIndicator,\n\t],\n})\n\n/**\n * Fired when an item is being clicked.\n *\n * **Note:** Since 1.17.0 the event is preventable, allowing the menu to remain open after an item is pressed.\n * @allowPreventDefault\n * @param { HTMLElement } item The currently clicked menu item.\n * @param { string } text The text of the currently clicked menu item.\n * @public\n */\n@event<MenuItemClickEventDetail>(\"item-click\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\titem: {\n\t\t\ttype: HTMLElement,\n\t\t},\n\t\t/**\n\t\t * @public\n\t\t */\n\t\ttext: {\n\t\t\ttype: String,\n\t\t},\n\t},\n})\n\n/**\n * Fired before the menu is opened. This event can be cancelled, which will prevent the menu from opening. **This event does not bubble.**\n *\n * **Note:** Since 1.14.0 the event is also fired before a sub-menu opens.\n * @public\n * @allowPreventDefault\n * @since 1.10.0\n * @param { HTMLElement } item The `ui5-menu-item` that triggers opening of the sub-menu or undefined when fired upon root menu opening.\n */\n@event<MenuBeforeOpenEventDetail>(\"before-open\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t * @since 1.14.0\n\t\t */\n\t\titem: {\n\t\t\ttype: HTMLElement,\n\t\t},\n\t},\n})\n\n/**\n * Fired after the menu is opened. **This event does not bubble.**\n * @public\n * @since 1.10.0\n */\n@event(\"open\")\n\n/**\n * Fired before the menu is closed. This event can be cancelled, which will prevent the menu from closing. **This event does not bubble.**\n * @public\n * @allowPreventDefault\n * @param {boolean} escPressed Indicates that `ESC` key has triggered the event.\n * @since 1.10.0\n */\n@event<MenuBeforeCloseEventDetail>(\"before-close\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tescPressed: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n})\n\n/**\n * Fired after the menu is closed. **This event does not bubble.**\n * @public\n * @since 1.10.0\n */\n@event(\"close\")\n\nclass Menu extends UI5Element {\n\t/**\n\t * Defines the header text of the menu (displayed on mobile).\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Indicates if the menu is open\n\t * @public\n\t * @default false\n\t * @since 1.10.0\n\t */\n\t@property({ type: Boolean })\n\topen = false;\n\n\t/**\n\t * Defines if a loading indicator would be displayed inside the corresponding ui5-menu popover.\n\t * @default false\n\t * @public\n\t * @since 1.13.0\n\t */\n\t@property({ type: Boolean })\n\tloading = false;\n\n\t/**\n\t * Defines the delay in milliseconds, after which the loading indicator will be displayed inside the corresponding ui5-menu popover..\n\t * @default 1000\n\t * @public\n\t * @since 1.13.0\n\t */\n\t@property({ type: Number })\n\tloadingDelay = 1000;\n\n\t/**\n\t * Defines the ID or DOM Reference of the element at which the menu is shown.\n\t * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the popover.\n\t * You can only set the `opener` attribute to a DOM Reference when using JavaScript.\n\t * @public\n\t * @default undefined\n\t * @since 1.10.0\n\t */\n\t@property({ converter: DOMReferenceConverter })\n\topener?: HTMLElement | string;\n\n\t/**\n\t * Defines the items of this component.\n\t *\n\t * **Note:** Use `ui5-menu-item` and `ui5-menu-separator` for their intended design.\n\t * @public\n\t */\n\t@slot({ \"default\": true, type: HTMLElement, invalidateOnChildChange: true })\n\titems!: Array<IMenuItem>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\t_timeout?: Timeout;\n\n\tget isRtl() {\n\t\treturn this.effectiveDir === \"rtl\";\n\t}\n\n\tget labelClose() {\n\t\treturn Menu.i18nBundle.getText(MENU_CLOSE_BUTTON_ARIA_LABEL);\n\t}\n\n\tget isPhone() {\n\t\treturn isPhone();\n\t}\n\n\tget _popover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tget _menuItems() {\n\t\treturn this.items.filter((item): item is MenuItem => !item.isSeparator);\n\t}\n\n\tget acessibleNameText() {\n\t\treturn Menu.i18nBundle.getText(MENU_POPOVER_ACCESSIBLE_NAME);\n\t}\n\n\tonBeforeRendering() {\n\t\tconst siblingsWithIcon = this._menuItems.some(menuItem => !!menuItem.icon);\n\n\t\tthis._menuItems.forEach(item => {\n\t\t\titem._siblingsWithIcon = siblingsWithIcon;\n\t\t});\n\t}\n\n\t_close() {\n\t\tthis.open = false;\n\t}\n\n\t_openItemSubMenu(item: MenuItem) {\n\t\tclearTimeout(this._timeout);\n\n\t\tif (!item._popover || item._popover.open) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fireEvent<MenuBeforeOpenEventDetail>(\"before-open\", {\n\t\t\titem,\n\t\t}, false, false);\n\t\titem._popover.opener = item;\n\t\titem._popover.open = true;\n\t\titem.selected = true;\n\t}\n\n\t_closeItemSubMenu(item: MenuItem) {\n\t\tif (item && item._popover) {\n\t\t\tconst openedSibling = item._menuItems.find(menuItem => menuItem._popover && menuItem._popover.open);\n\t\t\tif (openedSibling) {\n\t\t\t\tthis._closeItemSubMenu(openedSibling);\n\t\t\t}\n\n\t\t\titem._popover.open = false;\n\t\t\titem.selected = false;\n\t\t}\n\t}\n\n\t_itemMouseOver(e: MouseEvent) {\n\t\tif (isDesktop()) {\n\t\t\t// respect mouseover only on desktop\n\t\t\tconst item = e.target as MenuItem;\n\n\t\t\tif (item.hasAttribute(\"ui5-menu-item\")) {\n\t\t\t\titem.focus();\n\n\t\t\t\t// Opens submenu with 300ms delay\n\t\t\t\tthis._startOpenTimeout(item);\n\t\t\t}\n\t\t}\n\t}\n\n\t_startOpenTimeout(item: MenuItem) {\n\t\tclearTimeout(this._timeout);\n\n\t\tthis._timeout = setTimeout(() => {\n\t\t\tconst opener = item.parentElement as MenuItem | Menu;\n\t\t\tconst openedSibling = opener && opener._menuItems.find(menuItem => menuItem._popover && menuItem._popover.open);\n\t\t\tif (openedSibling) {\n\t\t\t\tthis._closeItemSubMenu(openedSibling);\n\t\t\t}\n\n\t\t\tthis._openItemSubMenu(item);\n\t\t}, MENU_OPEN_DELAY);\n\t}\n\n\t_itemClick(e: CustomEvent<ListItemClickEventDetail>) {\n\t\tconst item = e.detail.item as MenuItem;\n\n\t\tif (!item._popover) {\n\t\t\tconst prevented = !this.fireEvent<MenuItemClickEventDetail>(\"item-click\", {\n\t\t\t\t\"item\": item,\n\t\t\t\t\"text\": item.text || \"\",\n\t\t\t}, true, false);\n\n\t\t\tif (!prevented && this._popover) {\n\t\t\t\titem.fireEvent(\"close-menu\", {});\n\t\t\t}\n\t\t} else {\n\t\t\tthis._openItemSubMenu(item);\n\t\t}\n\t}\n\n\t_itemKeyDown(e: KeyboardEvent) {\n\t\tif (!isLeft(e) && !isRight(e)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst shouldCloseMenu = this.isRtl ? isRight(e) : isLeft(e);\n\t\tconst shouldOpenMenu = this.isRtl ? isLeft(e) : isRight(e);\n\t\tconst item = e.target as MenuItem;\n\t\tconst parentElement = item.parentElement as MenuItem;\n\n\t\tif (isEnter(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\t\tif (shouldOpenMenu) {\n\t\t\tthis._openItemSubMenu(item);\n\t\t} else if (shouldCloseMenu && parentElement.hasAttribute(\"ui5-menu-item\") && parentElement._popover) {\n\t\t\tparentElement._popover.open = false;\n\t\t\tparentElement.selected = false;\n\t\t\t(parentElement._popover.opener as HTMLElement)?.focus();\n\t\t}\n\t}\n\n\t_beforePopoverOpen(e: CustomEvent) {\n\t\tconst prevented = !this.fireEvent<MenuBeforeOpenEventDetail>(\"before-open\", {}, true, true);\n\n\t\tif (prevented) {\n\t\t\tthis.open = false;\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_afterPopoverOpen() {\n\t\tthis._menuItems[0]?.focus();\n\t\tthis.fireEvent(\"open\", {}, false, true);\n\t}\n\n\t_beforePopoverClose(e: CustomEvent<ResponsivePopoverBeforeCloseEventDetail>) {\n\t\tconst prevented = !this.fireEvent<MenuBeforeCloseEventDetail>(\"before-close\", { escPressed: e.detail.escPressed }, true, true);\n\n\t\tif (prevented) {\n\t\t\tthis.open = true;\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_afterPopoverClose() {\n\t\tthis.open = false;\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n}\n\nMenu.define();\n\nexport default Menu;\nexport type {\n\tMenuItemClickEventDetail,\n\tMenuBeforeCloseEventDetail,\n\tMenuBeforeOpenEventDetail,\n\tIMenuItem,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../src/Menu.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,EACN,MAAM,EACN,OAAO,EACP,OAAO,GACP,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACN,OAAO,EACP,SAAS,GACT,MAAM,wCAAwC,CAAC;AAChD,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,mDAAmD,CAAC;AAC3D,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAE7E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,qBAAqB,MAAM,yDAAyD,CAAC;AAC5F,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAEvD,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAI/C,OAAO,YAAY,MAAM,2CAA2C,CAAC;AACrE,OAAO,EACN,4BAA4B,EAC5B,4BAA4B,GAC5B,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,OAAO,MAAM,gCAAgC,CAAC;AAErD,MAAM,eAAe,GAAG,GAAG,CAAC;AAoB5B;;;;;;;;;;;;;;;;;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;QACd,GAAG,EAAE,UAAU;QACf,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE;YACb,iBAAiB;YACjB,MAAM;YACN,IAAI;YACJ,QAAQ;YACR,aAAa;YACb,aAAa;SACb;KACD,CAAC;IAEF;;;;;;;;OAQG;;IACF,KAAK,CAAC,YAAY,CAAC;IAEpB;;;;;;;;OAQG;;IACF,KAAK,CAAC,aAAa,CAAC;IAErB;;;;OAIG;;IACF,KAAK,CAAC,MAAM,CAAC;IAEd;;;;;;OAMG;;IACF,KAAK,CAAC,cAAc,CAAC;IAEtB;;;;OAIG;;IACF,KAAK,CAAC,OAAO,CAAC;GAET,IAAI,CA2OT;AAED,IAAI,CAAC,MAAM,EAAE,CAAC;AAEd,eAAe,IAAI,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport {\n\tisLeft,\n\tisRight,\n\tisEnter,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport {\n\tisPhone,\n\tisDesktop,\n} from \"@ui5/webcomponents-base/dist/Device.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport type { Timeout } from \"@ui5/webcomponents-base/dist/types.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport DOMReferenceConverter from \"@ui5/webcomponents-base/dist/converters/DOMReference.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport type { ResponsivePopoverBeforeCloseEventDetail } from \"./ResponsivePopover.js\";\nimport Button from \"./Button.js\";\nimport List from \"./List.js\";\nimport BusyIndicator from \"./BusyIndicator.js\";\nimport MenuItem from \"./MenuItem.js\";\nimport MenuSeparator from \"./MenuSeparator.js\";\nimport type {\n\tListItemClickEventDetail,\n} from \"./List.js\";\nimport menuTemplate from \"./generated/templates/MenuTemplate.lit.js\";\nimport {\n\tMENU_CLOSE_BUTTON_ARIA_LABEL,\n\tMENU_POPOVER_ACCESSIBLE_NAME,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport menuCss from \"./generated/themes/Menu.css.js\";\n\nconst MENU_OPEN_DELAY = 300;\n\n/**\n * Interface for components that may be slotted inside a `ui5-menu`.\n *\n * **Note:** Use with `ui5-menu-item` or `ui5-menu-separator`. Implementing the interface does not guarantee that any other classes can work with the `ui5-menu`.\n * @public\n */\ninterface IMenuItem extends UI5Element {\n\tisSeparator: boolean;\n}\n\ntype MenuItemClickEventDetail = {\n\titem: MenuItem,\n\ttext: string,\n}\n\ntype MenuBeforeOpenEventDetail = { item?: MenuItem };\ntype MenuBeforeCloseEventDetail = { escPressed: boolean };\n\n/**\n * @class\n *\n * ### Overview\n *\n * `ui5-menu` component represents a hierarchical menu structure.\n *\n * ### Structure\n *\n * The `ui5-menu` can hold two types of entities:\n *\n * - `ui5-menu-item` components\n * - `ui5-menu-separator` - used to separate menu items with a line\n *\n * An arbitrary hierarchy structure can be represented by recursively nesting menu items.\n *\n * ### Keyboard Handling\n *\n * The `ui5-menu` provides advanced keyboard handling.\n * The user can use the following keyboard shortcuts in order to navigate trough the tree:\n *\n * - `Arrow Up` / `Arrow Down` - Navigates up and down the menu items that are currently visible.\n * - `Arrow Right`, `Space` or `Enter` - Opens a sub-menu if there are menu items nested\n * in the currently clicked menu item.\n * - `Arrow Left` or `Escape` - Closes the currently opened sub-menu.\n *\n * Note: if the text ditrection is set to Right-to-left (RTL), `Arrow Right` and `Arrow Left` functionality is swapped.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Menu.js\";`\n * @constructor\n * @extends UI5Element\n * @since 1.3.0\n * @public\n */\n@customElement({\n\ttag: \"ui5-menu\",\n\trenderer: litRender,\n\tstyles: menuCss,\n\ttemplate: menuTemplate,\n\tdependencies: [\n\t\tResponsivePopover,\n\t\tButton,\n\t\tList,\n\t\tMenuItem,\n\t\tMenuSeparator,\n\t\tBusyIndicator,\n\t],\n})\n\n/**\n * Fired when an item is being clicked.\n *\n * **Note:** Since 1.17.0 the event is preventable, allowing the menu to remain open after an item is pressed.\n * @allowPreventDefault\n * @param { HTMLElement } item The currently clicked menu item.\n * @param { string } text The text of the currently clicked menu item.\n * @public\n */\n@event(\"item-click\")\n\n/**\n * Fired before the menu is opened. This event can be cancelled, which will prevent the menu from opening. **This event does not bubble.**\n *\n * **Note:** Since 1.14.0 the event is also fired before a sub-menu opens.\n * @public\n * @allowPreventDefault\n * @since 1.10.0\n * @param { HTMLElement } item The `ui5-menu-item` that triggers opening of the sub-menu or undefined when fired upon root menu opening.\n */\n@event(\"before-open\")\n\n/**\n * Fired after the menu is opened. **This event does not bubble.**\n * @public\n * @since 1.10.0\n */\n@event(\"open\")\n\n/**\n * Fired before the menu is closed. This event can be cancelled, which will prevent the menu from closing. **This event does not bubble.**\n * @public\n * @allowPreventDefault\n * @param {boolean} escPressed Indicates that `ESC` key has triggered the event.\n * @since 1.10.0\n */\n@event(\"before-close\")\n\n/**\n * Fired after the menu is closed. **This event does not bubble.**\n * @public\n * @since 1.10.0\n */\n@event(\"close\")\n\nclass Menu extends UI5Element {\n\teventDetails!: {\n\t\t\"item-click\": MenuItemClickEventDetail,\n\t\t\"before-open\": MenuBeforeOpenEventDetail,\n\t\t\"open\": void,\n\t\t\"before-close\": MenuBeforeCloseEventDetail,\n\t\t\"close\": void,\n\t}\n\t/**\n\t * Defines the header text of the menu (displayed on mobile).\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Indicates if the menu is open\n\t * @public\n\t * @default false\n\t * @since 1.10.0\n\t */\n\t@property({ type: Boolean })\n\topen = false;\n\n\t/**\n\t * Defines if a loading indicator would be displayed inside the corresponding ui5-menu popover.\n\t * @default false\n\t * @public\n\t * @since 1.13.0\n\t */\n\t@property({ type: Boolean })\n\tloading = false;\n\n\t/**\n\t * Defines the delay in milliseconds, after which the loading indicator will be displayed inside the corresponding ui5-menu popover..\n\t * @default 1000\n\t * @public\n\t * @since 1.13.0\n\t */\n\t@property({ type: Number })\n\tloadingDelay = 1000;\n\n\t/**\n\t * Defines the ID or DOM Reference of the element at which the menu is shown.\n\t * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the popover.\n\t * You can only set the `opener` attribute to a DOM Reference when using JavaScript.\n\t * @public\n\t * @default undefined\n\t * @since 1.10.0\n\t */\n\t@property({ converter: DOMReferenceConverter })\n\topener?: HTMLElement | string;\n\n\t/**\n\t * Defines the items of this component.\n\t *\n\t * **Note:** Use `ui5-menu-item` and `ui5-menu-separator` for their intended design.\n\t * @public\n\t */\n\t@slot({ \"default\": true, type: HTMLElement, invalidateOnChildChange: true })\n\titems!: Array<IMenuItem>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\t_timeout?: Timeout;\n\n\tget isRtl() {\n\t\treturn this.effectiveDir === \"rtl\";\n\t}\n\n\tget labelClose() {\n\t\treturn Menu.i18nBundle.getText(MENU_CLOSE_BUTTON_ARIA_LABEL);\n\t}\n\n\tget isPhone() {\n\t\treturn isPhone();\n\t}\n\n\tget _popover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tget _menuItems() {\n\t\treturn this.items.filter((item): item is MenuItem => !item.isSeparator);\n\t}\n\n\tget acessibleNameText() {\n\t\treturn Menu.i18nBundle.getText(MENU_POPOVER_ACCESSIBLE_NAME);\n\t}\n\n\tonBeforeRendering() {\n\t\tconst siblingsWithIcon = this._menuItems.some(menuItem => !!menuItem.icon);\n\n\t\tthis._menuItems.forEach(item => {\n\t\t\titem._siblingsWithIcon = siblingsWithIcon;\n\t\t});\n\t}\n\n\t_close() {\n\t\tthis.open = false;\n\t}\n\n\t_openItemSubMenu(item: MenuItem) {\n\t\tclearTimeout(this._timeout);\n\n\t\tif (!item._popover || item._popover.open) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fireEvent<MenuBeforeOpenEventDetail>(\"before-open\", {\n\t\t\titem,\n\t\t}, false, false);\n\t\titem._popover.opener = item;\n\t\titem._popover.open = true;\n\t\titem.selected = true;\n\t}\n\n\t_closeItemSubMenu(item: MenuItem) {\n\t\tif (item && item._popover) {\n\t\t\tconst openedSibling = item._menuItems.find(menuItem => menuItem._popover && menuItem._popover.open);\n\t\t\tif (openedSibling) {\n\t\t\t\tthis._closeItemSubMenu(openedSibling);\n\t\t\t}\n\n\t\t\titem._popover.open = false;\n\t\t\titem.selected = false;\n\t\t}\n\t}\n\n\t_itemMouseOver(e: MouseEvent) {\n\t\tif (isDesktop()) {\n\t\t\t// respect mouseover only on desktop\n\t\t\tconst item = e.target as MenuItem;\n\n\t\t\tif (item.hasAttribute(\"ui5-menu-item\")) {\n\t\t\t\titem.focus();\n\n\t\t\t\t// Opens submenu with 300ms delay\n\t\t\t\tthis._startOpenTimeout(item);\n\t\t\t}\n\t\t}\n\t}\n\n\tasync focus(focusOptions?: FocusOptions): Promise<void> {\n\t\tawait renderFinished();\n\t\tconst firstMenuItem = this._menuItems[0];\n\n\t\tif (firstMenuItem) {\n\t\t\treturn firstMenuItem.focus(focusOptions);\n\t\t}\n\n\t\treturn super.focus(focusOptions);\n\t}\n\n\t_startOpenTimeout(item: MenuItem) {\n\t\tclearTimeout(this._timeout);\n\n\t\tthis._timeout = setTimeout(() => {\n\t\t\tconst opener = item.parentElement as MenuItem | Menu;\n\t\t\tconst openedSibling = opener && opener._menuItems.find(menuItem => menuItem._popover && menuItem._popover.open);\n\t\t\tif (openedSibling) {\n\t\t\t\tthis._closeItemSubMenu(openedSibling);\n\t\t\t}\n\n\t\t\tthis._openItemSubMenu(item);\n\t\t}, MENU_OPEN_DELAY);\n\t}\n\n\t_itemClick(e: CustomEvent<ListItemClickEventDetail>) {\n\t\tconst item = e.detail.item as MenuItem;\n\n\t\tif (!item._popover) {\n\t\t\tconst prevented = !this.fireEvent<MenuItemClickEventDetail>(\"item-click\", {\n\t\t\t\t\"item\": item,\n\t\t\t\t\"text\": item.text || \"\",\n\t\t\t}, true, false);\n\n\t\t\tif (!prevented && this._popover) {\n\t\t\t\titem.fireEvent(\"close-menu\", {});\n\t\t\t}\n\t\t} else {\n\t\t\tthis._openItemSubMenu(item);\n\t\t}\n\t}\n\n\t_itemKeyDown(e: KeyboardEvent) {\n\t\tif (!isLeft(e) && !isRight(e)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst shouldCloseMenu = this.isRtl ? isRight(e) : isLeft(e);\n\t\tconst shouldOpenMenu = this.isRtl ? isLeft(e) : isRight(e);\n\t\tconst item = e.target as MenuItem;\n\t\tconst parentElement = item.parentElement as MenuItem;\n\n\t\tif (isEnter(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\t\tif (shouldOpenMenu) {\n\t\t\tthis._openItemSubMenu(item);\n\t\t} else if (shouldCloseMenu && parentElement.hasAttribute(\"ui5-menu-item\") && parentElement._popover) {\n\t\t\tparentElement._popover.open = false;\n\t\t\tparentElement.selected = false;\n\t\t\t(parentElement._popover.opener as HTMLElement)?.focus();\n\t\t}\n\t}\n\n\t_beforePopoverOpen(e: CustomEvent) {\n\t\tconst prevented = !this.fireEvent<MenuBeforeOpenEventDetail>(\"before-open\", {}, true, true);\n\n\t\tif (prevented) {\n\t\t\tthis.open = false;\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_afterPopoverOpen() {\n\t\tthis._menuItems[0]?.focus();\n\t\tthis.fireEvent(\"open\", {}, false, true);\n\t}\n\n\t_beforePopoverClose(e: CustomEvent<ResponsivePopoverBeforeCloseEventDetail>) {\n\t\tconst prevented = !this.fireEvent<MenuBeforeCloseEventDetail>(\"before-close\", { escPressed: e.detail.escPressed }, true, true);\n\n\t\tif (prevented) {\n\t\t\tthis.open = true;\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_afterPopoverClose() {\n\t\tthis.open = false;\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n}\n\nMenu.define();\n\nexport default Menu;\nexport type {\n\tMenuItemClickEventDetail,\n\tMenuBeforeCloseEventDetail,\n\tMenuBeforeOpenEventDetail,\n\tIMenuItem,\n};\n"]}
|
package/dist/MenuItem.d.ts
CHANGED
|
@@ -166,6 +166,7 @@ declare class MenuItem extends ListItem implements IMenuItem {
|
|
|
166
166
|
get acessibleNameText(): string;
|
|
167
167
|
get isSeparator(): boolean;
|
|
168
168
|
onBeforeRendering(): void;
|
|
169
|
+
focus(focusOptions?: FocusOptions): Promise<void>;
|
|
169
170
|
get _focusable(): boolean;
|
|
170
171
|
get _accInfo(): {
|
|
171
172
|
role: string;
|
package/dist/MenuItem.js
CHANGED
|
@@ -11,6 +11,7 @@ import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
|
11
11
|
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
|
12
12
|
import { isPhone } from "@ui5/webcomponents-base/dist/Device.js";
|
|
13
13
|
import AriaHasPopup from "@ui5/webcomponents-base/dist/types/AriaHasPopup.js";
|
|
14
|
+
import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js";
|
|
14
15
|
import "@ui5/webcomponents-icons/dist/nav-back.js";
|
|
15
16
|
import ListItem from "./ListItem.js";
|
|
16
17
|
import ResponsivePopover from "./ResponsivePopover.js";
|
|
@@ -134,6 +135,13 @@ let MenuItem = MenuItem_1 = class MenuItem extends ListItem {
|
|
|
134
135
|
item._siblingsWithIcon = siblingsWithIcon;
|
|
135
136
|
});
|
|
136
137
|
}
|
|
138
|
+
async focus(focusOptions) {
|
|
139
|
+
await renderFinished();
|
|
140
|
+
if (this.hasSubmenu && this.isSubMenuOpen) {
|
|
141
|
+
return this._menuItems[0].focus(focusOptions);
|
|
142
|
+
}
|
|
143
|
+
return super.focus(focusOptions);
|
|
144
|
+
}
|
|
137
145
|
get _focusable() {
|
|
138
146
|
return true;
|
|
139
147
|
}
|
package/dist/MenuItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.js","sourceRoot":"","sources":["../src/MenuItem.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAE9E,OAAO,2CAA2C,CAAC;AAGnD,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAEvD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,gBAAgB,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EACN,2BAA2B,EAC3B,4BAA4B,EAC5B,4BAA4B,GAC5B,MAAM,mCAAmC,CAAC;AAI3C,SAAS;AACT,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAO7D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAOH,IAAM,QAAQ,gBAAd,MAAM,QAAS,SAAQ,QAAQ;IAA/B;;QAqCC;;;;;;WAMG;QAEH,aAAQ,GAAG,KAAK,CAAC;QAEjB;;;;;;;WAOG;QAEH,YAAO,GAAG,KAAK,CAAC;QAEhB;;;;;WAKG;QA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;GACI,QAAQ,CAgRb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport { isPhone } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport AriaHasPopup from \"@ui5/webcomponents-base/dist/types/AriaHasPopup.js\";\nimport type { AccessibilityAttributes } from \"@ui5/webcomponents-base/dist/types.js\";\nimport \"@ui5/webcomponents-icons/dist/nav-back.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { ListItemAccessibilityAttributes } from \"./ListItem.js\";\nimport ListItem from \"./ListItem.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport type PopoverPlacement from \"./types/PopoverPlacement.js\";\nimport List from \"./List.js\";\nimport Icon from \"./Icon.js\";\nimport BusyIndicator from \"./BusyIndicator.js\";\nimport MenuItemTemplate from \"./generated/templates/MenuItemTemplate.lit.js\";\nimport {\n\tMENU_BACK_BUTTON_ARIA_LABEL,\n\tMENU_CLOSE_BUTTON_ARIA_LABEL,\n\tMENU_POPOVER_ACCESSIBLE_NAME,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport type { ResponsivePopoverBeforeCloseEventDetail } from \"./ResponsivePopover.js\";\nimport type { IMenuItem } from \"./Menu.js\";\n\n// Styles\nimport menuItemCss from \"./generated/themes/MenuItem.css.js\";\n\ntype MenuBeforeOpenEventDetail = { item?: MenuItem };\ntype MenuBeforeCloseEventDetail = { escPressed: boolean };\n\ntype MenuItemAccessibilityAttributes = Pick<AccessibilityAttributes, \"ariaKeyShortcuts\" | \"role\"> & ListItemAccessibilityAttributes;\n\n/**\n * @class\n *\n * ### Overview\n *\n * `ui5-menu-item` is the item to use inside a `ui5-menu`.\n * An arbitrary hierarchy structure can be represented by recursively nesting menu items.\n *\n * ### Usage\n *\n * `ui5-menu-item` represents a node in a `ui5-menu`. The menu itself is rendered as a list,\n * and each `ui5-menu-item` is represented by a list item in that list. Therefore, you should only use\n * `ui5-menu-item` directly in your apps. The `ui5-li` list item is internal for the list, and not intended for public use.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/MenuItem.js\";`\n * @constructor\n * @extends ListItem\n * @implements {IMenuItem}\n * @since 1.3.0\n * @public\n */\n@customElement({\n\ttag: \"ui5-menu-item\",\n\ttemplate: MenuItemTemplate,\n\tstyles: [ListItem.styles, menuItemCss],\n\tdependencies: [...ListItem.dependencies, ResponsivePopover, List, BusyIndicator, Icon],\n})\nclass MenuItem extends ListItem implements IMenuItem {\n\t/**\n\t * Defines the text of the tree item.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ttext?: string;\n\n\t/**\n\t * Defines the `additionalText`, displayed in the end of the menu item.\n\t *\n\t * **Note:** The additional text will not be displayed if there are items added in `items` slot or there are\n\t * components added to `endContent` slot.\n\t *\n\t * The priority of what will be displayed at the end of the menu item is as follows:\n\t * sub-menu arrow (if there are items added in `items` slot) -> components added in `endContent` -> text set to `additionalText`.\n\t * @default undefined\n\t * @public\n\t * @since 1.8.0\n\t */\n\t@property()\n\tadditionalText?: string;\n\n\t/**\n\t * Defines the icon to be displayed as graphical element within the component.\n\t * The SAP-icons font provides numerous options.\n\t *\n\t * **Example:**\n\t *\n\t * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ticon?: string;\n\n\t/**\n\t * Defines whether `ui5-menu-item` is in disabled state.\n\t *\n\t * **Note:** A disabled `ui5-menu-item` is noninteractive.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines the delay in milliseconds, after which the loading indicator will be displayed inside the corresponding ui5-menu popover.\n\t *\n\t * **Note:** If set to `true` a `ui5-busy-indicator` component will be displayed into the related one to the current `ui5-menu-item` sub-menu popover.\n\t * @default false\n\t * @public\n\t * @since 1.13.0\n\t */\n\t@property({ type: Boolean })\n\tloading = false;\n\n\t/**\n\t * Defines the delay in milliseconds, after which the loading indicator will be displayed inside the corresponding ui5-menu popover.\n\t * @default 1000\n\t * @public\n\t * @since 1.13.0\n\t */\n\t@property({ type: Number })\n\tloadingDelay = 1000;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.7.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the text of the tooltip for the menu item.\n\t * @default undefined\n\t * @public\n\t * @since 1.23.0\n\t */\n\t@property()\n\ttooltip?: string;\n\n\t/**\n\t * Defines the additional accessibility attributes that will be applied to the component.\n\t * The following fields are supported:\n\t *\n\t * - **ariaKeyShortcuts**: Indicated the availability of a keyboard shortcuts defined for the menu item.\n\t *\n\t * - **role**: Defines the role of the menu item. If not set, menu item will have default role=\"menuitem\".\n\t *\n\t * @public\n\t * @since 2.1.0\n\t * @default {}\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes: MenuItemAccessibilityAttributes = {};\n\n\t/**\n\t * Indicates whether any of the element siblings have icon.\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_siblingsWithIcon = false;\n\n\t/**\n\t * Defines the items of this component.\n\t *\n\t * **Note:** The slot can hold `ui5-menu-item` and `ui5-menu-separator` items.\n\t *\n\t * If there are items added to this slot, an arrow will be displayed at the end\n\t * of the item in order to indicate that there are items added. In that case components added\n\t * to `endContent` slot or `additionalText` content will not be displayed.\n\t *\n\t * The priority of what will be displayed at the end of the menu item is as follows:\n\t * sub-menu arrow (if there are items added in `items` slot) -> components added in `endContent` -> text set to `additionalText`.\n\t * @public\n\t */\n\t@slot({ \"default\": true, type: HTMLElement, invalidateOnChildChange: true })\n\titems!: Array<IMenuItem>;\n\n\t/**\n\t * Defines the components that should be displayed at the end of the menu item.\n\t *\n\t * **Note:** It is highly recommended to slot only components of type `ui5-button`,`ui5-link`\n\t * or `ui5-icon` in order to preserve the intended design. If there are components added to this slot,\n\t * and there is text set in `additionalText`, it will not be displayed. If there are items added to `items` slot,\n\t * nether `additionalText` nor components added to this slot would be displayed.\n\t *\n\t * The priority of what will be displayed at the end of the menu item is as follows:\n\t * sub-menu arrow (if there are items added in `items` slot) -> components added in `endContent` -> text set to `additionalText`.\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@slot({ type: HTMLElement })\n\tendContent!: Array<HTMLElement>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tget placement(): `${PopoverPlacement}` {\n\t\treturn this.isRtl ? \"Start\" : \"End\";\n\t}\n\n\tget isRtl() {\n\t\treturn this.effectiveDir === \"rtl\";\n\t}\n\n\tget hasSubmenu() {\n\t\treturn !!(this.items.length || this.loading) && !this.disabled;\n\t}\n\n\tget hasEndContent() {\n\t\treturn !!(this.endContent.length);\n\t}\n\n\tget hasIcon() {\n\t\treturn !!this.icon;\n\t}\n\n\tget isSubMenuOpen() {\n\t\treturn this._popover?.open;\n\t}\n\n\tget ariaLabelledByText() {\n\t\treturn `${this.text} ${this.accessibleName}`.trim();\n\t}\n\n\tget menuHeaderTextPhone() {\n\t\treturn this.text;\n\t}\n\n\tget isPhone() {\n\t\treturn isPhone();\n\t}\n\n\tget labelBack() {\n\t\treturn MenuItem.i18nBundle.getText(MENU_BACK_BUTTON_ARIA_LABEL);\n\t}\n\n\tget labelClose() {\n\t\treturn MenuItem.i18nBundle.getText(MENU_CLOSE_BUTTON_ARIA_LABEL);\n\t}\n\n\tget acessibleNameText() {\n\t\treturn MenuItem.i18nBundle.getText(MENU_POPOVER_ACCESSIBLE_NAME);\n\t}\n\n\tget isSeparator(): boolean {\n\t\treturn false;\n\t}\n\n\tonBeforeRendering() {\n\t\tconst siblingsWithIcon = this._menuItems.some(menuItem => !!menuItem.icon);\n\n\t\tthis._menuItems.forEach(item => {\n\t\t\titem._siblingsWithIcon = siblingsWithIcon;\n\t\t});\n\t}\n\n\tget _focusable() {\n\t\treturn true;\n\t}\n\n\tget _accInfo() {\n\t\tconst accInfoSettings = {\n\t\t\trole: this.accessibilityAttributes.role || \"menuitem\",\n\t\t\tariaHaspopup: this.hasSubmenu ? AriaHasPopup.Menu.toLowerCase() as Lowercase<AriaHasPopup> : undefined,\n\t\t\tariaKeyShortcuts: this.accessibilityAttributes.ariaKeyShortcuts,\n\t\t\tariaHidden: !!this.additionalText && !!this.accessibilityAttributes.ariaKeyShortcuts ? true : undefined,\n\t\t};\n\n\t\treturn { ...super._accInfo, ...accInfoSettings };\n\t}\n\n\tget _popover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tget _menuItems() {\n\t\treturn this.items.filter((item): item is MenuItem => !item.isSeparator);\n\t}\n\n\t_closeAll() {\n\t\tif (this._popover) {\n\t\t\tthis._popover.open = false;\n\t\t}\n\t\tthis.selected = false;\n\t\tthis.fireEvent(\"close-menu\", {});\n\t}\n\n\t_close() {\n\t\tif (this._popover) {\n\t\t\tthis._popover.open = false;\n\t\t}\n\t\tthis.selected = false;\n\t}\n\n\t_beforePopoverOpen(e: CustomEvent) {\n\t\tconst prevented = !this.fireEvent<MenuBeforeOpenEventDetail>(\"before-open\", {}, true, false);\n\n\t\tif (prevented) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_afterPopoverOpen() {\n\t\tthis.items[0]?.focus();\n\t\tthis.fireEvent(\"open\", {}, false, false);\n\t}\n\n\t_beforePopoverClose(e: CustomEvent<ResponsivePopoverBeforeCloseEventDetail>) {\n\t\tconst prevented = !this.fireEvent<MenuBeforeCloseEventDetail>(\"before-close\", { escPressed: e.detail.escPressed }, true, false);\n\n\t\tif (prevented) {\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.selected = false;\n\t\tif (e.detail.escPressed) {\n\t\t\tthis.focus();\n\t\t\tif (isPhone()) {\n\t\t\t\tthis.fireEvent(\"close-menu\", {});\n\t\t\t}\n\t\t}\n\t}\n\n\t_afterPopoverClose() {\n\t\tthis.fireEvent(\"close\", {}, false, false);\n\t}\n}\n\nMenuItem.define();\n\nexport default MenuItem;\n\nexport type {\n\tMenuBeforeCloseEventDetail,\n\tMenuBeforeOpenEventDetail,\n\tMenuItemAccessibilityAttributes,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"MenuItem.js","sourceRoot":"","sources":["../src/MenuItem.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAE9E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,2CAA2C,CAAC;AAGnD,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAEvD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,gBAAgB,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EACN,2BAA2B,EAC3B,4BAA4B,EAC5B,4BAA4B,GAC5B,MAAM,mCAAmC,CAAC;AAI3C,SAAS;AACT,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAO7D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAOH,IAAM,QAAQ,gBAAd,MAAM,QAAS,SAAQ,QAAQ;IAA/B;;QAqCC;;;;;;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EAAE,IAAI,EAAE,CAAC;uCACnD;AAgBzB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;4CACI;AAGzB;IADN,IAAI,CAAC,oBAAoB,CAAC;kCACG;AA3IzB,QAAQ;IANb,aAAa,CAAC;QACd,GAAG,EAAE,eAAe;QACpB,QAAQ,EAAE,gBAAgB;QAC1B,MAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;QACtC,YAAY,EAAE,CAAC,GAAG,QAAQ,CAAC,YAAY,EAAE,iBAAiB,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,CAAC;KACtF,CAAC;GACI,QAAQ,CA0Rb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport { isPhone } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport AriaHasPopup from \"@ui5/webcomponents-base/dist/types/AriaHasPopup.js\";\nimport type { AccessibilityAttributes } from \"@ui5/webcomponents-base/dist/types.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport \"@ui5/webcomponents-icons/dist/nav-back.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { ListItemAccessibilityAttributes } from \"./ListItem.js\";\nimport ListItem from \"./ListItem.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport type PopoverPlacement from \"./types/PopoverPlacement.js\";\nimport List from \"./List.js\";\nimport Icon from \"./Icon.js\";\nimport BusyIndicator from \"./BusyIndicator.js\";\nimport MenuItemTemplate from \"./generated/templates/MenuItemTemplate.lit.js\";\nimport {\n\tMENU_BACK_BUTTON_ARIA_LABEL,\n\tMENU_CLOSE_BUTTON_ARIA_LABEL,\n\tMENU_POPOVER_ACCESSIBLE_NAME,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport type { ResponsivePopoverBeforeCloseEventDetail } from \"./ResponsivePopover.js\";\nimport type { IMenuItem } from \"./Menu.js\";\n\n// Styles\nimport menuItemCss from \"./generated/themes/MenuItem.css.js\";\n\ntype MenuBeforeOpenEventDetail = { item?: MenuItem };\ntype MenuBeforeCloseEventDetail = { escPressed: boolean };\n\ntype MenuItemAccessibilityAttributes = Pick<AccessibilityAttributes, \"ariaKeyShortcuts\" | \"role\"> & ListItemAccessibilityAttributes;\n\n/**\n * @class\n *\n * ### Overview\n *\n * `ui5-menu-item` is the item to use inside a `ui5-menu`.\n * An arbitrary hierarchy structure can be represented by recursively nesting menu items.\n *\n * ### Usage\n *\n * `ui5-menu-item` represents a node in a `ui5-menu`. The menu itself is rendered as a list,\n * and each `ui5-menu-item` is represented by a list item in that list. Therefore, you should only use\n * `ui5-menu-item` directly in your apps. The `ui5-li` list item is internal for the list, and not intended for public use.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/MenuItem.js\";`\n * @constructor\n * @extends ListItem\n * @implements {IMenuItem}\n * @since 1.3.0\n * @public\n */\n@customElement({\n\ttag: \"ui5-menu-item\",\n\ttemplate: MenuItemTemplate,\n\tstyles: [ListItem.styles, menuItemCss],\n\tdependencies: [...ListItem.dependencies, ResponsivePopover, List, BusyIndicator, Icon],\n})\nclass MenuItem extends ListItem implements IMenuItem {\n\t/**\n\t * Defines the text of the tree item.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ttext?: string;\n\n\t/**\n\t * Defines the `additionalText`, displayed in the end of the menu item.\n\t *\n\t * **Note:** The additional text will not be displayed if there are items added in `items` slot or there are\n\t * components added to `endContent` slot.\n\t *\n\t * The priority of what will be displayed at the end of the menu item is as follows:\n\t * sub-menu arrow (if there are items added in `items` slot) -> components added in `endContent` -> text set to `additionalText`.\n\t * @default undefined\n\t * @public\n\t * @since 1.8.0\n\t */\n\t@property()\n\tadditionalText?: string;\n\n\t/**\n\t * Defines the icon to be displayed as graphical element within the component.\n\t * The SAP-icons font provides numerous options.\n\t *\n\t * **Example:**\n\t *\n\t * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ticon?: string;\n\n\t/**\n\t * Defines whether `ui5-menu-item` is in disabled state.\n\t *\n\t * **Note:** A disabled `ui5-menu-item` is noninteractive.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines the delay in milliseconds, after which the loading indicator will be displayed inside the corresponding ui5-menu popover.\n\t *\n\t * **Note:** If set to `true` a `ui5-busy-indicator` component will be displayed into the related one to the current `ui5-menu-item` sub-menu popover.\n\t * @default false\n\t * @public\n\t * @since 1.13.0\n\t */\n\t@property({ type: Boolean })\n\tloading = false;\n\n\t/**\n\t * Defines the delay in milliseconds, after which the loading indicator will be displayed inside the corresponding ui5-menu popover.\n\t * @default 1000\n\t * @public\n\t * @since 1.13.0\n\t */\n\t@property({ type: Number })\n\tloadingDelay = 1000;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.7.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the text of the tooltip for the menu item.\n\t * @default undefined\n\t * @public\n\t * @since 1.23.0\n\t */\n\t@property()\n\ttooltip?: string;\n\n\t/**\n\t * Defines the additional accessibility attributes that will be applied to the component.\n\t * The following fields are supported:\n\t *\n\t * - **ariaKeyShortcuts**: Indicated the availability of a keyboard shortcuts defined for the menu item.\n\t *\n\t * - **role**: Defines the role of the menu item. If not set, menu item will have default role=\"menuitem\".\n\t *\n\t * @public\n\t * @since 2.1.0\n\t * @default {}\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes: MenuItemAccessibilityAttributes = {};\n\n\t/**\n\t * Indicates whether any of the element siblings have icon.\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_siblingsWithIcon = false;\n\n\t/**\n\t * Defines the items of this component.\n\t *\n\t * **Note:** The slot can hold `ui5-menu-item` and `ui5-menu-separator` items.\n\t *\n\t * If there are items added to this slot, an arrow will be displayed at the end\n\t * of the item in order to indicate that there are items added. In that case components added\n\t * to `endContent` slot or `additionalText` content will not be displayed.\n\t *\n\t * The priority of what will be displayed at the end of the menu item is as follows:\n\t * sub-menu arrow (if there are items added in `items` slot) -> components added in `endContent` -> text set to `additionalText`.\n\t * @public\n\t */\n\t@slot({ \"default\": true, type: HTMLElement, invalidateOnChildChange: true })\n\titems!: Array<IMenuItem>;\n\n\t/**\n\t * Defines the components that should be displayed at the end of the menu item.\n\t *\n\t * **Note:** It is highly recommended to slot only components of type `ui5-button`,`ui5-link`\n\t * or `ui5-icon` in order to preserve the intended design. If there are components added to this slot,\n\t * and there is text set in `additionalText`, it will not be displayed. If there are items added to `items` slot,\n\t * nether `additionalText` nor components added to this slot would be displayed.\n\t *\n\t * The priority of what will be displayed at the end of the menu item is as follows:\n\t * sub-menu arrow (if there are items added in `items` slot) -> components added in `endContent` -> text set to `additionalText`.\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@slot({ type: HTMLElement })\n\tendContent!: Array<HTMLElement>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tget placement(): `${PopoverPlacement}` {\n\t\treturn this.isRtl ? \"Start\" : \"End\";\n\t}\n\n\tget isRtl() {\n\t\treturn this.effectiveDir === \"rtl\";\n\t}\n\n\tget hasSubmenu() {\n\t\treturn !!(this.items.length || this.loading) && !this.disabled;\n\t}\n\n\tget hasEndContent() {\n\t\treturn !!(this.endContent.length);\n\t}\n\n\tget hasIcon() {\n\t\treturn !!this.icon;\n\t}\n\n\tget isSubMenuOpen() {\n\t\treturn this._popover?.open;\n\t}\n\n\tget ariaLabelledByText() {\n\t\treturn `${this.text} ${this.accessibleName}`.trim();\n\t}\n\n\tget menuHeaderTextPhone() {\n\t\treturn this.text;\n\t}\n\n\tget isPhone() {\n\t\treturn isPhone();\n\t}\n\n\tget labelBack() {\n\t\treturn MenuItem.i18nBundle.getText(MENU_BACK_BUTTON_ARIA_LABEL);\n\t}\n\n\tget labelClose() {\n\t\treturn MenuItem.i18nBundle.getText(MENU_CLOSE_BUTTON_ARIA_LABEL);\n\t}\n\n\tget acessibleNameText() {\n\t\treturn MenuItem.i18nBundle.getText(MENU_POPOVER_ACCESSIBLE_NAME);\n\t}\n\n\tget isSeparator(): boolean {\n\t\treturn false;\n\t}\n\n\tonBeforeRendering() {\n\t\tconst siblingsWithIcon = this._menuItems.some(menuItem => !!menuItem.icon);\n\n\t\tthis._menuItems.forEach(item => {\n\t\t\titem._siblingsWithIcon = siblingsWithIcon;\n\t\t});\n\t}\n\n\tasync focus(focusOptions?: FocusOptions): Promise<void> {\n\t\tawait renderFinished();\n\n\t\tif (this.hasSubmenu && this.isSubMenuOpen) {\n\t\t\treturn this._menuItems[0].focus(focusOptions);\n\t\t}\n\n\t\treturn super.focus(focusOptions);\n\t}\n\n\tget _focusable() {\n\t\treturn true;\n\t}\n\n\tget _accInfo() {\n\t\tconst accInfoSettings = {\n\t\t\trole: this.accessibilityAttributes.role || \"menuitem\",\n\t\t\tariaHaspopup: this.hasSubmenu ? AriaHasPopup.Menu.toLowerCase() as Lowercase<AriaHasPopup> : undefined,\n\t\t\tariaKeyShortcuts: this.accessibilityAttributes.ariaKeyShortcuts,\n\t\t\tariaHidden: !!this.additionalText && !!this.accessibilityAttributes.ariaKeyShortcuts ? true : undefined,\n\t\t};\n\n\t\treturn { ...super._accInfo, ...accInfoSettings };\n\t}\n\n\tget _popover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tget _menuItems() {\n\t\treturn this.items.filter((item): item is MenuItem => !item.isSeparator);\n\t}\n\n\t_closeAll() {\n\t\tif (this._popover) {\n\t\t\tthis._popover.open = false;\n\t\t}\n\t\tthis.selected = false;\n\t\tthis.fireEvent(\"close-menu\", {});\n\t}\n\n\t_close() {\n\t\tif (this._popover) {\n\t\t\tthis._popover.open = false;\n\t\t}\n\t\tthis.selected = false;\n\t}\n\n\t_beforePopoverOpen(e: CustomEvent) {\n\t\tconst prevented = !this.fireEvent<MenuBeforeOpenEventDetail>(\"before-open\", {}, true, false);\n\n\t\tif (prevented) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_afterPopoverOpen() {\n\t\tthis.items[0]?.focus();\n\t\tthis.fireEvent(\"open\", {}, false, false);\n\t}\n\n\t_beforePopoverClose(e: CustomEvent<ResponsivePopoverBeforeCloseEventDetail>) {\n\t\tconst prevented = !this.fireEvent<MenuBeforeCloseEventDetail>(\"before-close\", { escPressed: e.detail.escPressed }, true, false);\n\n\t\tif (prevented) {\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.selected = false;\n\t\tif (e.detail.escPressed) {\n\t\t\tthis.focus();\n\t\t\tif (isPhone()) {\n\t\t\t\tthis.fireEvent(\"close-menu\", {});\n\t\t\t}\n\t\t}\n\t}\n\n\t_afterPopoverClose() {\n\t\tthis.fireEvent(\"close\", {}, false, false);\n\t}\n}\n\nMenuItem.define();\n\nexport default MenuItem;\n\nexport type {\n\tMenuBeforeCloseEventDetail,\n\tMenuBeforeOpenEventDetail,\n\tMenuItemAccessibilityAttributes,\n};\n"]}
|
package/dist/MessageStrip.d.ts
CHANGED
|
@@ -53,6 +53,9 @@ type DesignTypeAnnouncemnt = Record<MessageStripDesign, string>;
|
|
|
53
53
|
* **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.
|
|
54
54
|
*/
|
|
55
55
|
declare class MessageStrip extends UI5Element {
|
|
56
|
+
eventDetails: {
|
|
57
|
+
close: void;
|
|
58
|
+
};
|
|
56
59
|
/**
|
|
57
60
|
* Defines the component type.
|
|
58
61
|
* @default "Information"
|
package/dist/MessageStrip.js
CHANGED
|
@@ -8,7 +8,7 @@ var MessageStrip_1;
|
|
|
8
8
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
9
9
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
10
10
|
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
11
|
-
import event from "@ui5/webcomponents-base/dist/decorators/event.js";
|
|
11
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
12
12
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
13
13
|
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
14
14
|
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
package/dist/MessageStrip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageStrip.js","sourceRoot":"","sources":["../src/MessageStrip.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AAIrF,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,0CAA0C,CAAC;AAClD,OAAO,8CAA8C,CAAC;AACtD,OAAO,8CAA8C,CAAC;AACtD,OAAO,wCAAwC,CAAC;AAChD,OAAO,wCAAwC,CAAC;AAChD,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAC/D,OAAO,oBAAoB,MAAM,mDAAmD,CAAC;AAErF,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EACN,0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,QAAQ;gBAC/B,OAAO,OAAO,CAAC;YAChB,KAAK,kBAAkB,CAAC,WAAW;gBAClC,OAAO,aAAa,CAAC;YACtB;gBACC,OAAO,IAAI,CAAC;QACb,CAAC;IACF,CAAC;IAED,IAAI,aAAa;QAChB,OAAO,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;CACD,CAAA;AA1HA;IADC,QAAQ,EAAE;4CACqC;AAYhD;IADC,QAAQ,EAAE;iDACM;AAajB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CACZ;AAQhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qDACJ;AAYxB;IADC,IAAI,EAAE;0CACa;AAGb;IADN,IAAI,CAAC,oBAAoB,CAAC;sCACG;AAxDzB,YAAY;IAjBjB,aAAa,CAAC;QACd,GAAG,EAAE,mBAAmB;QACxB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,oBAAoB;QAC9B,MAAM,EAAE,eAAe;QACvB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,YAAY,CAkIjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport type { ClassMap } from \"@ui5/webcomponents-base/dist/types.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport \"@ui5/webcomponents-icons/dist/information.js\";\nimport \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\nimport \"@ui5/webcomponents-icons/dist/error.js\";\nimport \"@ui5/webcomponents-icons/dist/alert.js\";\nimport MessageStripDesign from \"./types/MessageStripDesign.js\";\nimport MessageStripTemplate from \"./generated/templates/MessageStripTemplate.lit.js\";\nimport type { IIcon } from \"./Icon.js\";\nimport Icon from \"./Icon.js\";\nimport Button from \"./Button.js\";\nimport {\n\tMESSAGE_STRIP_CLOSE_BUTTON,\n\tMESSAGE_STRIP_CLOSABLE,\n\tMESSAGE_STRIP_ERROR,\n\tMESSAGE_STRIP_WARNING,\n\tMESSAGE_STRIP_SUCCESS,\n\tMESSAGE_STRIP_INFORMATION,\n\tMESSAGE_STRIP_CUSTOM,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport messageStripCss from \"./generated/themes/MessageStrip.css.js\";\n\nenum DesignClassesMapping {\n\tInformation = \"ui5-message-strip-root--info\",\n\tPositive = \"ui5-message-strip-root--positive\",\n\tNegative = \"ui5-message-strip-root--negative\",\n\tCritical = \"ui5-message-strip-root--critical\",\n\tColorSet1 = \"ui5-message-strip-root--color-set-1\",\n\tColorSet2 = \"ui5-message-strip-root--color-set-2\",\n}\n\ntype DesignTypeAnnouncemnt = Record<MessageStripDesign, string>;\n\n/**\n * @class\n *\n * ### Overview\n *\n * The ui5-message-strip component allows for the embedding of application-related messages.\n * It supports four semantic designs, each with its own color and icon: \"Information\", \"Positive\", \"Critical\", and \"Negative\".\n * Additionally, users can choose from two color sets (\"ColorSet1\" and \"ColorSet2\"), each containing 10 predefined color schemes.\n * Each message shows a \"Close\" button, so that it can be removed from the UI, if needed.\n\n * ### Usage\n *\n * For the `ui5-message-strip` component, you can define whether it displays\n * an icon in the beginning and a close button. Moreover, its size and background\n * can be controlled with CSS.\n *\n * ### Keyboard Handling\n *\n * #### Fast Navigation\n * This component provides a build in fast navigation group which can be used via [F6] / [Shift] + [F6] / [Ctrl] + [Alt/Option] / [Down] or [Ctrl] + [Alt/Option] + [Up].\n * In order to use this functionality, you need to import the following module:\n * `import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"`\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/MessageStrip.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 0.9.0\n * @slot {Array<Node>} default\n * Defines the text of the component.\n *\n * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n */\n@customElement({\n\ttag: \"ui5-message-strip\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: MessageStripTemplate,\n\tstyles: messageStripCss,\n\tdependencies: [Icon, Button],\n})\n/**\n * Fired when the close button is pressed either with a\n * click/tap or by using the Enter or Space key.\n * @public\n */\n@event(\"close\", {\n\tbubbles: true,\n})\n\nclass MessageStrip extends UI5Element {\n\t/**\n\t * Defines the component type.\n\t * @default \"Information\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\tdesign: `${MessageStripDesign}` = \"Information\";\n\n\t/**\n\t * Defines the color scheme of the component.\n\t * There are 10 predefined schemes.\n\t * To use one you can set a number from `\"1\"` to `\"10\"`. The `colorScheme` `\"1\"` will be set by default.\n\t *\n\t * @default \"1\"\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tcolorScheme = \"1\"\n\n\t/**\n\t * Defines whether the MessageStrip will show an icon in the beginning.\n\t * You can directly provide an icon with the `icon` slot. Otherwise, the default icon for the type will be used.\n\t *\n\t * * **Note:** If <code>MessageStripDesign.ColorSet1</code> or <code>MessageStripDesign.ColorSet2</code> value is set to the <code>design</code> property, default icon will not be presented.\n\t *\n\t * @default false\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\thideIcon = false\n\n\t/**\n\t * Defines whether the MessageStrip renders close button.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideCloseButton = false;\n\n\t/**\n\t * Defines the content to be displayed as graphical element within the component.\n\t *\n\t * **Note:** If no icon is given, the default icon for the component type will be used.\n\t * The SAP-icons font provides numerous options.\n\t *\n\t * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @public\n\t */\n\t@slot()\n\ticon!: Array<IIcon>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_closeClick() {\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\tstatic designAnnouncementMappings(): DesignTypeAnnouncemnt {\n\t\tconst getTranslation = (text:I18nText): string => {\n\t\t\treturn MessageStrip.i18nBundle.getText(text);\n\t\t};\n\n\t\treturn {\n\t\t\tInformation: getTranslation(MESSAGE_STRIP_INFORMATION),\n\t\t\tPositive: getTranslation(MESSAGE_STRIP_SUCCESS),\n\t\t\tNegative: getTranslation(MESSAGE_STRIP_ERROR),\n\t\t\tCritical: getTranslation(MESSAGE_STRIP_WARNING),\n\t\t\tColorSet1: getTranslation(MESSAGE_STRIP_CUSTOM),\n\t\t\tColorSet2: getTranslation(MESSAGE_STRIP_CUSTOM),\n\t\t};\n\t}\n\n\tget hiddenText() {\n\t\treturn `${MessageStrip.designAnnouncementMappings()[this.design]} ${this.hideCloseButton ? \"\" : this._closableText}`;\n\t}\n\n\tget shouldHideIcon() {\n\t\tif (this.designClasses === DesignClassesMapping.ColorSet1 || this.designClasses === DesignClassesMapping.ColorSet2) {\n\t\t\treturn this.hideIcon || this.icon.length === 0;\n\t\t}\n\n\t\treturn this.hideIcon;\n\t}\n\n\tget _closeButtonText() {\n\t\treturn MessageStrip.i18nBundle.getText(MESSAGE_STRIP_CLOSE_BUTTON);\n\t}\n\n\tget _closableText() {\n\t\treturn MessageStrip.i18nBundle.getText(MESSAGE_STRIP_CLOSABLE);\n\t}\n\n\tget classes(): ClassMap {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"ui5-message-strip-root\": true,\n\t\t\t\t\"ui5-message-strip-root-hide-icon\": this.shouldHideIcon,\n\t\t\t\t\"ui5-message-strip-root-hide-close-button\": this.hideCloseButton,\n\t\t\t\t[this.designClasses]: true,\n\t\t\t},\n\t\t};\n\t}\n\n\tget iconProvided() {\n\t\treturn this.icon.length > 0;\n\t}\n\n\tget standardIconName() {\n\t\tswitch (this.design) {\n\t\tcase MessageStripDesign.Critical:\n\t\t\treturn \"alert\";\n\t\tcase MessageStripDesign.Positive:\n\t\t\treturn \"sys-enter-2\";\n\t\tcase MessageStripDesign.Negative:\n\t\t\treturn \"error\";\n\t\tcase MessageStripDesign.Information:\n\t\t\treturn \"information\";\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tget designClasses() {\n\t\treturn DesignClassesMapping[this.design];\n\t}\n}\n\nMessageStrip.define();\n\nexport default MessageStrip;\n"]}
|
|
1
|
+
{"version":3,"file":"MessageStrip.js","sourceRoot":"","sources":["../src/MessageStrip.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AAIrF,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,0CAA0C,CAAC;AAClD,OAAO,8CAA8C,CAAC;AACtD,OAAO,8CAA8C,CAAC;AACtD,OAAO,wCAAwC,CAAC;AAChD,OAAO,wCAAwC,CAAC;AAChD,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;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,kBAAkB,CAAC,QAAQ;gBAC/B,OAAO,OAAO,CAAC;YAChB,KAAK,kBAAkB,CAAC,QAAQ;gBAC/B,OAAO,aAAa,CAAC;YACtB,KAAK,kBAAkB,CAAC,QAAQ;gBAC/B,OAAO,OAAO,CAAC;YAChB,KAAK,kBAAkB,CAAC,WAAW;gBAClC,OAAO,aAAa,CAAC;YACtB;gBACC,OAAO,IAAI,CAAC;QACb,CAAC;IACF,CAAC;IAED,IAAI,aAAa;QAChB,OAAO,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;CACD,CAAA;AA1HA;IADC,QAAQ,EAAE;4CACqC;AAYhD;IADC,QAAQ,EAAE;iDACM;AAajB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CACZ;AAQhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qDACJ;AAYxB;IADC,IAAI,EAAE;0CACa;AAGb;IADN,IAAI,CAAC,oBAAoB,CAAC;sCACG;AA3DzB,YAAY;IAjBjB,aAAa,CAAC;QACd,GAAG,EAAE,mBAAmB;QACxB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,oBAAoB;QAC9B,MAAM,EAAE,eAAe;QACvB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,YAAY,CAqIjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport type { ClassMap } from \"@ui5/webcomponents-base/dist/types.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport \"@ui5/webcomponents-icons/dist/information.js\";\nimport \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\nimport \"@ui5/webcomponents-icons/dist/error.js\";\nimport \"@ui5/webcomponents-icons/dist/alert.js\";\nimport MessageStripDesign from \"./types/MessageStripDesign.js\";\nimport MessageStripTemplate from \"./generated/templates/MessageStripTemplate.lit.js\";\nimport type { IIcon } from \"./Icon.js\";\nimport Icon from \"./Icon.js\";\nimport Button from \"./Button.js\";\nimport {\n\tMESSAGE_STRIP_CLOSE_BUTTON,\n\tMESSAGE_STRIP_CLOSABLE,\n\tMESSAGE_STRIP_ERROR,\n\tMESSAGE_STRIP_WARNING,\n\tMESSAGE_STRIP_SUCCESS,\n\tMESSAGE_STRIP_INFORMATION,\n\tMESSAGE_STRIP_CUSTOM,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport messageStripCss from \"./generated/themes/MessageStrip.css.js\";\n\nenum DesignClassesMapping {\n\tInformation = \"ui5-message-strip-root--info\",\n\tPositive = \"ui5-message-strip-root--positive\",\n\tNegative = \"ui5-message-strip-root--negative\",\n\tCritical = \"ui5-message-strip-root--critical\",\n\tColorSet1 = \"ui5-message-strip-root--color-set-1\",\n\tColorSet2 = \"ui5-message-strip-root--color-set-2\",\n}\n\ntype DesignTypeAnnouncemnt = Record<MessageStripDesign, string>;\n\n/**\n * @class\n *\n * ### Overview\n *\n * The ui5-message-strip component allows for the embedding of application-related messages.\n * It supports four semantic designs, each with its own color and icon: \"Information\", \"Positive\", \"Critical\", and \"Negative\".\n * Additionally, users can choose from two color sets (\"ColorSet1\" and \"ColorSet2\"), each containing 10 predefined color schemes.\n * Each message shows a \"Close\" button, so that it can be removed from the UI, if needed.\n\n * ### Usage\n *\n * For the `ui5-message-strip` component, you can define whether it displays\n * an icon in the beginning and a close button. Moreover, its size and background\n * can be controlled with CSS.\n *\n * ### Keyboard Handling\n *\n * #### Fast Navigation\n * This component provides a build in fast navigation group which can be used via [F6] / [Shift] + [F6] / [Ctrl] + [Alt/Option] / [Down] or [Ctrl] + [Alt/Option] + [Up].\n * In order to use this functionality, you need to import the following module:\n * `import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"`\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/MessageStrip.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 0.9.0\n * @slot {Array<Node>} default\n * Defines the text of the component.\n *\n * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n */\n@customElement({\n\ttag: \"ui5-message-strip\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: MessageStripTemplate,\n\tstyles: messageStripCss,\n\tdependencies: [Icon, Button],\n})\n/**\n * Fired when the close button is pressed either with a\n * click/tap or by using the Enter or Space key.\n * @public\n */\n@event(\"close\", {\n\tbubbles: true,\n})\n\nclass MessageStrip extends UI5Element {\n\teventDetails!: {\n\t\tclose: void;\n\t}\n\t/**\n\t * Defines the component type.\n\t * @default \"Information\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\tdesign: `${MessageStripDesign}` = \"Information\";\n\n\t/**\n\t * Defines the color scheme of the component.\n\t * There are 10 predefined schemes.\n\t * To use one you can set a number from `\"1\"` to `\"10\"`. The `colorScheme` `\"1\"` will be set by default.\n\t *\n\t * @default \"1\"\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tcolorScheme = \"1\"\n\n\t/**\n\t * Defines whether the MessageStrip will show an icon in the beginning.\n\t * You can directly provide an icon with the `icon` slot. Otherwise, the default icon for the type will be used.\n\t *\n\t * * **Note:** If <code>MessageStripDesign.ColorSet1</code> or <code>MessageStripDesign.ColorSet2</code> value is set to the <code>design</code> property, default icon will not be presented.\n\t *\n\t * @default false\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\thideIcon = false\n\n\t/**\n\t * Defines whether the MessageStrip renders close button.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideCloseButton = false;\n\n\t/**\n\t * Defines the content to be displayed as graphical element within the component.\n\t *\n\t * **Note:** If no icon is given, the default icon for the component type will be used.\n\t * The SAP-icons font provides numerous options.\n\t *\n\t * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @public\n\t */\n\t@slot()\n\ticon!: Array<IIcon>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_closeClick() {\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\tstatic designAnnouncementMappings(): DesignTypeAnnouncemnt {\n\t\tconst getTranslation = (text:I18nText): string => {\n\t\t\treturn MessageStrip.i18nBundle.getText(text);\n\t\t};\n\n\t\treturn {\n\t\t\tInformation: getTranslation(MESSAGE_STRIP_INFORMATION),\n\t\t\tPositive: getTranslation(MESSAGE_STRIP_SUCCESS),\n\t\t\tNegative: getTranslation(MESSAGE_STRIP_ERROR),\n\t\t\tCritical: getTranslation(MESSAGE_STRIP_WARNING),\n\t\t\tColorSet1: getTranslation(MESSAGE_STRIP_CUSTOM),\n\t\t\tColorSet2: getTranslation(MESSAGE_STRIP_CUSTOM),\n\t\t};\n\t}\n\n\tget hiddenText() {\n\t\treturn `${MessageStrip.designAnnouncementMappings()[this.design]} ${this.hideCloseButton ? \"\" : this._closableText}`;\n\t}\n\n\tget shouldHideIcon() {\n\t\tif (this.designClasses === DesignClassesMapping.ColorSet1 || this.designClasses === DesignClassesMapping.ColorSet2) {\n\t\t\treturn this.hideIcon || this.icon.length === 0;\n\t\t}\n\n\t\treturn this.hideIcon;\n\t}\n\n\tget _closeButtonText() {\n\t\treturn MessageStrip.i18nBundle.getText(MESSAGE_STRIP_CLOSE_BUTTON);\n\t}\n\n\tget _closableText() {\n\t\treturn MessageStrip.i18nBundle.getText(MESSAGE_STRIP_CLOSABLE);\n\t}\n\n\tget classes(): ClassMap {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"ui5-message-strip-root\": true,\n\t\t\t\t\"ui5-message-strip-root-hide-icon\": this.shouldHideIcon,\n\t\t\t\t\"ui5-message-strip-root-hide-close-button\": this.hideCloseButton,\n\t\t\t\t[this.designClasses]: true,\n\t\t\t},\n\t\t};\n\t}\n\n\tget iconProvided() {\n\t\treturn this.icon.length > 0;\n\t}\n\n\tget standardIconName() {\n\t\tswitch (this.design) {\n\t\tcase MessageStripDesign.Critical:\n\t\t\treturn \"alert\";\n\t\tcase MessageStripDesign.Positive:\n\t\t\treturn \"sys-enter-2\";\n\t\tcase MessageStripDesign.Negative:\n\t\t\treturn \"error\";\n\t\tcase MessageStripDesign.Information:\n\t\t\treturn \"information\";\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tget designClasses() {\n\t\treturn DesignClassesMapping[this.design];\n\t}\n}\n\nMessageStrip.define();\n\nexport default MessageStrip;\n"]}
|
package/dist/MonthPicker.d.ts
CHANGED
|
@@ -34,6 +34,10 @@ type MonthPickerNavigateEventDetail = {
|
|
|
34
34
|
* @private
|
|
35
35
|
*/
|
|
36
36
|
declare class MonthPicker extends CalendarPart implements ICalendarPicker {
|
|
37
|
+
eventDetails: CalendarPart["eventDetails"] & {
|
|
38
|
+
change: MonthPickerChangeEventDetail;
|
|
39
|
+
navigate: MonthPickerNavigateEventDetail;
|
|
40
|
+
};
|
|
37
41
|
/**
|
|
38
42
|
* An array of UTC timestamps representing the selected date
|
|
39
43
|
* or dates depending on the capabilities of the picker component.
|
package/dist/MonthPicker.js
CHANGED
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var MonthPicker_1;
|
|
8
8
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
9
9
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
10
|
-
import event from "@ui5/webcomponents-base/dist/decorators/event.js";
|
|
10
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
11
11
|
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
|
12
12
|
import getCachedLocaleDataInstance from "@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js";
|
|
13
13
|
import convertMonthNumbersToMonthNames from "@ui5/webcomponents-localization/dist/dates/convertMonthNumbersToMonthNames.js";
|