@ui5/webcomponents 2.6.0-rc.4 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +10 -4
- package/cypress/specs/F6.cy.ts +134 -0
- package/cypress/specs/List.cy.ts +1 -0
- package/cypress/specs/Table.cy.ts +606 -0
- package/cypress/specs/Toast.cy.ts +1 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Avatar.d.ts +1 -1
- package/dist/Avatar.js +0 -2
- package/dist/Avatar.js.map +1 -1
- package/dist/AvatarGroup.d.ts +1 -1
- package/dist/AvatarGroup.js +0 -2
- package/dist/AvatarGroup.js.map +1 -1
- package/dist/Breadcrumbs.d.ts +5 -4
- package/dist/Breadcrumbs.js +1 -18
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/BusyIndicator.js +0 -2
- package/dist/BusyIndicator.js.map +1 -1
- package/dist/Button.js +0 -2
- package/dist/Button.js.map +1 -1
- package/dist/Calendar.d.ts +3 -2
- package/dist/Calendar.js +1 -16
- package/dist/Calendar.js.map +1 -1
- package/dist/CalendarLegend.d.ts +2 -1
- package/dist/CalendarLegend.js +1 -2
- package/dist/CalendarLegend.js.map +1 -1
- package/dist/Card.js +0 -3
- package/dist/Card.js.map +1 -1
- package/dist/Carousel.js +0 -6
- package/dist/Carousel.js.map +1 -1
- package/dist/CheckBox.js +0 -6
- package/dist/CheckBox.js.map +1 -1
- package/dist/ColorPalette.d.ts +2 -2
- package/dist/ColorPalette.js +1 -7
- package/dist/ColorPalette.js.map +1 -1
- package/dist/ColorPalettePopover.d.ts +2 -2
- package/dist/ColorPalettePopover.js +0 -10
- package/dist/ColorPalettePopover.js.map +1 -1
- package/dist/ColorPaletteTemplate.js +1 -2
- package/dist/ColorPaletteTemplate.js.map +1 -1
- package/dist/ColorPicker.js +0 -8
- package/dist/ColorPicker.js.map +1 -1
- package/dist/ComboBox.d.ts +6 -4
- package/dist/ComboBox.js +5 -28
- package/dist/ComboBox.js.map +1 -1
- package/dist/DatePicker.d.ts +3 -3
- package/dist/DatePicker.js +0 -14
- package/dist/DatePicker.js.map +1 -1
- package/dist/DateRangePicker.js +0 -2
- package/dist/DateRangePicker.js.map +1 -1
- package/dist/DateTimePicker.js +0 -15
- package/dist/DateTimePicker.js.map +1 -1
- package/dist/Dialog.js +0 -5
- package/dist/Dialog.js.map +1 -1
- package/dist/DropIndicator.js +0 -1
- package/dist/DropIndicator.js.map +1 -1
- package/dist/ExpandableText.d.ts +2 -2
- package/dist/ExpandableText.js +2 -12
- package/dist/ExpandableText.js.map +1 -1
- package/dist/FileUploader.d.ts +2 -2
- package/dist/FileUploader.js +0 -8
- package/dist/FileUploader.js.map +1 -1
- package/dist/Form.js +0 -2
- package/dist/Form.js.map +1 -1
- package/dist/Input.d.ts +2 -2
- package/dist/Input.js +1 -8
- package/dist/Input.js.map +1 -1
- package/dist/InputPopoverTemplate.d.ts +1 -1
- package/dist/InputPopoverTemplate.js +1 -18
- package/dist/InputPopoverTemplate.js.map +1 -1
- package/dist/Link.js +0 -2
- package/dist/Link.js.map +1 -1
- package/dist/List.d.ts +2 -2
- package/dist/List.js +1 -4
- package/dist/List.js.map +1 -1
- package/dist/ListItem.js +0 -8
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemGroup.d.ts +2 -2
- package/dist/ListItemGroup.js +0 -4
- package/dist/ListItemGroup.js.map +1 -1
- package/dist/ListItemStandard.js +0 -7
- package/dist/ListItemStandard.js.map +1 -1
- package/dist/Menu.d.ts +4 -2
- package/dist/Menu.js +2 -14
- package/dist/Menu.js.map +1 -1
- package/dist/MenuItem.d.ts +1 -1
- package/dist/MenuItem.js +0 -5
- package/dist/MenuItem.js.map +1 -1
- package/dist/MenuSeparator.js +0 -4
- package/dist/MenuSeparator.js.map +1 -1
- package/dist/MessageStrip.js +0 -3
- package/dist/MessageStrip.js.map +1 -1
- package/dist/MultiInput.d.ts +2 -2
- package/dist/MultiInput.js +1 -12
- package/dist/MultiInput.js.map +1 -1
- package/dist/Option.js +0 -4
- package/dist/Option.js.map +1 -1
- package/dist/Panel.js +0 -3
- package/dist/Panel.js.map +1 -1
- package/dist/Popup.js +0 -4
- package/dist/Popup.js.map +1 -1
- package/dist/ProgressIndicator.js +0 -2
- package/dist/ProgressIndicator.js.map +1 -1
- package/dist/RadioButton.js +0 -2
- package/dist/RadioButton.js.map +1 -1
- package/dist/RangeSlider.js +0 -3
- package/dist/RangeSlider.js.map +1 -1
- package/dist/RatingIndicator.js +0 -2
- package/dist/RatingIndicator.js.map +1 -1
- package/dist/ResponsivePopover.d.ts +1 -1
- package/dist/ResponsivePopover.js +0 -7
- package/dist/ResponsivePopover.js.map +1 -1
- package/dist/SegmentedButton.d.ts +2 -1
- package/dist/SegmentedButton.js +1 -2
- package/dist/SegmentedButton.js.map +1 -1
- package/dist/SegmentedButtonItem.js +0 -2
- package/dist/SegmentedButtonItem.js.map +1 -1
- package/dist/Slider.js +0 -3
- package/dist/Slider.js.map +1 -1
- package/dist/SplitButton.d.ts +1 -1
- package/dist/SplitButton.js +0 -2
- package/dist/SplitButton.js.map +1 -1
- package/dist/StepInput.d.ts +1 -1
- package/dist/StepInput.js +0 -6
- package/dist/StepInput.js.map +1 -1
- package/dist/Switch.js +0 -2
- package/dist/Switch.js.map +1 -1
- package/dist/Tab.d.ts +1 -1
- package/dist/Tab.js +0 -8
- package/dist/Tab.js.map +1 -1
- package/dist/TabContainer.d.ts +3 -3
- package/dist/TabContainer.js +0 -14
- package/dist/TabContainer.js.map +1 -1
- package/dist/TableRow.d.ts +2 -0
- package/dist/TableRow.js +2 -0
- package/dist/TableRow.js.map +1 -1
- package/dist/TableVirtualizer.d.ts +1 -0
- package/dist/TableVirtualizer.js +1 -0
- package/dist/TableVirtualizer.js.map +1 -1
- package/dist/Tag.js +0 -4
- package/dist/Tag.js.map +1 -1
- package/dist/TextArea.d.ts +1 -1
- package/dist/TextArea.js +0 -3
- package/dist/TextArea.js.map +1 -1
- package/dist/TimePicker.d.ts +3 -3
- package/dist/TimePicker.js +0 -16
- package/dist/TimePicker.js.map +1 -1
- package/dist/TimeSelectionClocks.d.ts +2 -2
- package/dist/TimeSelectionClocks.js +0 -10
- package/dist/TimeSelectionClocks.js.map +1 -1
- package/dist/TimeSelectionInputs.d.ts +1 -1
- package/dist/TimeSelectionInputs.js +0 -8
- package/dist/TimeSelectionInputs.js.map +1 -1
- package/dist/Token.js +0 -2
- package/dist/Token.js.map +1 -1
- package/dist/Tokenizer.d.ts +4 -2
- package/dist/Tokenizer.js +2 -14
- package/dist/Tokenizer.js.map +1 -1
- package/dist/Toolbar.d.ts +2 -3
- package/dist/Toolbar.js +1 -11
- package/dist/Toolbar.js.map +1 -1
- package/dist/ToolbarButton.js +0 -2
- package/dist/ToolbarButton.js.map +1 -1
- package/dist/ToolbarRegistry.d.ts +1 -2
- package/dist/ToolbarRegistry.js +1 -4
- package/dist/ToolbarRegistry.js.map +1 -1
- package/dist/ToolbarSelect.js +0 -3
- package/dist/ToolbarSelect.js.map +1 -1
- package/dist/Tree.d.ts +4 -2
- package/dist/Tree.js +2 -10
- package/dist/Tree.js.map +1 -1
- package/dist/TreeItemBase.js +0 -5
- package/dist/TreeItemBase.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 +13 -8
- package/dist/custom-elements.json +3 -3
- package/dist/features/ColorPaletteMoreColors.d.ts +2 -4
- package/dist/features/ColorPaletteMoreColors.js +3 -9
- package/dist/features/ColorPaletteMoreColors.js.map +1 -1
- package/dist/features/ColorPaletteMoreColorsTemplate.d.ts +2 -0
- package/dist/features/ColorPaletteMoreColorsTemplate.js +8 -0
- package/dist/features/ColorPaletteMoreColorsTemplate.js.map +1 -0
- package/dist/features/InputSuggestions.d.ts +6 -6
- package/dist/features/InputSuggestions.js +6 -14
- package/dist/features/InputSuggestions.js.map +1 -1
- package/dist/features/InputSuggestionsTemplate.d.ts +3 -0
- package/dist/features/InputSuggestionsTemplate.js +22 -0
- package/dist/features/InputSuggestionsTemplate.js.map +1 -0
- 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/themes/Avatar.css.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +1 -1
- package/dist/generated/themes/CalendarHeader.css.js +1 -1
- package/dist/generated/themes/CalendarHeader.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegend.css.d.ts +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.d.ts +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.d.ts +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.d.ts +1 -1
- package/dist/generated/themes/CardHeader.css.js +1 -1
- package/dist/generated/themes/CardHeader.css.js.map +1 -1
- package/dist/generated/themes/Carousel.css.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +1 -1
- package/dist/generated/themes/ListItemBase.css.js +1 -1
- package/dist/generated/themes/ListItemBase.css.js.map +1 -1
- package/dist/generated/themes/ListItemCustom.css.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopover.css.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +1 -1
- package/dist/generated/themes/Token.css.js +1 -1
- package/dist/generated/themes/Token.css.js.map +1 -1
- package/dist/generated/themes/Tokenizer.css.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +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.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.d.ts +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.d.ts +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.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.d.ts +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.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.d.ts +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/web-types.json +2 -2
- package/package.json +9 -9
- package/src/ColorPaletteTemplate.tsx +1 -2
- package/src/InputPopoverTemplate.tsx +2 -102
- package/src/features/ColorPaletteMoreColorsTemplate.tsx +30 -0
- package/src/features/InputSuggestionsTemplate.tsx +108 -0
- package/src/themes/TabInStrip.css +1 -5
- package/dist/ColorPaletteDialogTemplate.d.ts +0 -2
- package/dist/ColorPaletteDialogTemplate.js +0 -9
- package/dist/ColorPaletteDialogTemplate.js.map +0 -1
- package/src/ColorPaletteDialogTemplate.tsx +0 -35
package/dist/ListItemGroup.js
CHANGED
|
@@ -14,13 +14,10 @@ import DragRegistry from "@ui5/webcomponents-base/dist/util/dragAndDrop/DragRegi
|
|
|
14
14
|
import { findClosestPosition } from "@ui5/webcomponents-base/dist/util/dragAndDrop/findClosestPosition.js";
|
|
15
15
|
import Orientation from "@ui5/webcomponents-base/dist/types/Orientation.js";
|
|
16
16
|
import MovePlacement from "@ui5/webcomponents-base/dist/types/MovePlacement.js";
|
|
17
|
-
import DropIndicator from "./DropIndicator.js";
|
|
18
17
|
// Template
|
|
19
18
|
import ListItemGroupTemplate from "./ListItemGroupTemplate.js";
|
|
20
19
|
// Styles
|
|
21
20
|
import ListItemGroupCss from "./generated/themes/ListItemGroup.css.js";
|
|
22
|
-
import ListItemStandard from "./ListItemStandard.js";
|
|
23
|
-
import ListItemGroupHeader from "./ListItemGroupHeader.js";
|
|
24
21
|
/**
|
|
25
22
|
* @class
|
|
26
23
|
* ### Overview
|
|
@@ -151,7 +148,6 @@ ListItemGroup = __decorate([
|
|
|
151
148
|
languageAware: true,
|
|
152
149
|
template: ListItemGroupTemplate,
|
|
153
150
|
styles: [ListItemGroupCss],
|
|
154
|
-
dependencies: [ListItemStandard, ListItemGroupHeader, DropIndicator],
|
|
155
151
|
})
|
|
156
152
|
/**
|
|
157
153
|
* Fired when a movable list item is moved over a potential drop target during a dragging operation.
|
|
@@ -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,yDAAyD,CAAC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AAE,cAAc;QACnB,QAAQ,EAAE,WAAW;QACrB,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 jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.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 \"./ListItemGroupTemplate.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: jsxRenderer,\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"]}
|
|
1
|
+
{"version":3,"file":"ListItemGroup.js","sourceR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,EAAE,cAAc;QACnB,QAAQ,EAAE,WAAW;QACrB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,qBAAqB;QAC/B,MAAM,EAAE,CAAC,gBAAgB,CAAC;KAC1B,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 jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.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 type DropIndicator from \"./DropIndicator.js\";\nimport type ListItemBase from \"./ListItemBase.js\";\n\n// Template\nimport ListItemGroupTemplate from \"./ListItemGroupTemplate.js\";\n\n// Styles\nimport ListItemGroupCss from \"./generated/themes/ListItemGroup.css.js\";\nimport type 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: jsxRenderer,\n\tlanguageAware: true,\n\ttemplate: ListItemGroupTemplate,\n\tstyles: [ListItemGroupCss],\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/ListItemStandard.js
CHANGED
|
@@ -9,8 +9,6 @@ import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.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
11
|
import ListItem from "./ListItem.js";
|
|
12
|
-
import Icon from "./Icon.js";
|
|
13
|
-
import Avatar from "./Avatar.js";
|
|
14
12
|
import ListItemStandardTemplate from "./ListItemStandardTemplate.js";
|
|
15
13
|
/**
|
|
16
14
|
* @class
|
|
@@ -132,11 +130,6 @@ ListItemStandard = __decorate([
|
|
|
132
130
|
tag: "ui5-li",
|
|
133
131
|
renderer: jsxRenderer,
|
|
134
132
|
template: ListItemStandardTemplate,
|
|
135
|
-
dependencies: [
|
|
136
|
-
...ListItem.dependencies,
|
|
137
|
-
Icon,
|
|
138
|
-
Avatar,
|
|
139
|
-
],
|
|
140
133
|
})
|
|
141
134
|
], ListItemStandard);
|
|
142
135
|
ListItemStandard.define();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemStandard.js","sourceRoot":"","sources":["../src/ListItemStandard.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,QAAQ,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ListItemStandard.js","sourceRoot":"","sources":["../src/ListItemStandard.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,QAAQ,MAAM,eAAe,CAAC;AAGrC,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAMH,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,QAAQ;IAAvC;;QAsBC;;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AAE,IAAI,EAAE,OAAO,EAAE,CAAC;mDACV;AAYlB;IADC,IAAI,EAAE;+CACoB;AArGtB,gBAAgB;IALrB,aAAa,CAAC;QACd,GAAG,EAAE,QAAQ;QACb,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,wBAAwB;KAClC,CAAC;GACI,gBAAgB,CAwHrB;AAED,gBAAgB,CAAC,MAAM,EAAE,CAAC;AAE1B,eAAe,gBAAgB,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport type ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport ListItem from \"./ListItem.js\";\nimport type { IAccessibleListItem } from \"./ListItem.js\";\nimport type WrappingType from \"./types/WrappingType.js\";\nimport ListItemStandardTemplate from \"./ListItemStandardTemplate.js\";\n\n/**\n * @class\n * The `ui5-li` represents the simplest type of item for a `ui5-list`.\n *\n * This is a list item,\n * providing the most common use cases such as `text`,\n * `image` and `icon`.\n\n * @csspart title - Used to style the title of the list item\n * @csspart description - Used to style the description of the list item\n * @csspart additional-text - Used to style the additionalText of the list item\n * @csspart icon - Used to style the icon of the list item\n * @csspart native-li - Used to style the main li tag of the list item\n * @csspart content - Used to style the content area of the list item\n * @csspart detail-button - Used to style the button rendered when the list item is of type detail\n * @csspart delete-button - Used to style the button rendered when the list item is in delete mode\n * @csspart radio - Used to style the radio button rendered when the list item is in single selection mode\n * @csspart checkbox - Used to style the checkbox rendered when the list item is in multiple selection mode\n * @slot {Node[]} default - 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 * @constructor\n * @extends ListItem\n * @public\n */\n@customElement({\n\ttag: \"ui5-li\",\n\trenderer: jsxRenderer,\n\ttemplate: ListItemStandardTemplate,\n})\nclass ListItemStandard extends ListItem implements IAccessibleListItem {\n\t/**\n\t * Defines the description displayed right under the item text, if such is present.\n\t * @default undefined\n\t * @public\n\t * @since 0.8.0\n\t */\n\t@property()\n\tdescription?: string;\n\n\t/**\n\t * Defines the `icon` source URI.\n\t *\n\t * **Note:**\n\t * SAP-icons font provides numerous built-in icons. To find all the available icons, see the\n\t * [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 the `icon` should be displayed in the beginning of the list item or in the end.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\ticonEnd = false;\n\n\t/**\n\t * Defines the `additionalText`, displayed in the end of the list item.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\tadditionalText?: string;\n\n\t/**\n\t * Defines the state of the `additionalText`.\n\t *\n\t * Available options are: `\"None\"` (by default), `\"Positive\"`, `\"Critical\"`, `\"Information\"` and `\"Negative\"`.\n\t * @default \"None\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\tadditionalTextState: `${ValueState}` = \"None\";\n\n\t/**\n\t * Defines whether the item is movable.\n\t * @default false\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property({ type: Boolean })\n\tmovable = false;\n\n\t/**\n\t * Defines the text alternative of the component.\n\t * Note: If not provided a default text alternative will be set, if present.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\tdeclare accessibleName?: string;\n\n\t/**\n\t * Defines if the text of the component should wrap, they truncate by default.\n\t *\n\t * **Note:** this property takes affect only if text node is provided to default slot of the component\n\t * @default \"None\"\n\t * @private\n\t * @since 1.5.0\n\t */\n\t@property()\n\twrappingType: `${WrappingType}` = \"None\";\n\n\t/**\n\t * Indicates if the list item has text content.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\thasTitle = false;\n\n\t@property({ type: Boolean })\n\t_hasImage = false;\n\n\t/**\n\t * **Note:** While the slot allows option for setting custom avatar, to match the\n\t * design guidelines, please use the `ui5-avatar` with it's default size - S.\n\t *\n\t * **Note:** If bigger `ui5-avatar` needs to be used, then the size of the\n\t * `ui5-li` should be customized in order to fit.\n\t * @since 2.0.0\n\t * @public\n\t */\n\t@slot()\n\timage!: Array<HTMLElement>;\n\n\tonBeforeRendering() {\n\t\tsuper.onBeforeRendering();\n\t\tthis.hasTitle = !!this.textContent;\n\t\tthis._hasImage = this.hasImage;\n\t}\n\n\tget displayIconBegin(): boolean {\n\t\treturn !!(this.icon && !this.iconEnd);\n\t}\n\n\tget displayIconEnd(): boolean {\n\t\treturn !!(this.icon && this.iconEnd);\n\t}\n\n\tget hasImage(): boolean {\n\t\treturn !!this.image.length;\n\t}\n}\n\nListItemStandard.define();\n\nexport default ListItemStandard;\n"]}
|
package/dist/Menu.d.ts
CHANGED
|
@@ -3,8 +3,10 @@ import type { UI5CustomEvent } from "@ui5/webcomponents-base";
|
|
|
3
3
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
4
4
|
import "@ui5/webcomponents-icons/dist/slim-arrow-right.js";
|
|
5
5
|
import type { Timeout } from "@ui5/webcomponents-base/dist/types.js";
|
|
6
|
-
import ResponsivePopover from "./ResponsivePopover.js";
|
|
7
|
-
import MenuItem from "./MenuItem.js";
|
|
6
|
+
import type ResponsivePopover from "./ResponsivePopover.js";
|
|
7
|
+
import type MenuItem from "./MenuItem.js";
|
|
8
|
+
import "./MenuItem.js";
|
|
9
|
+
import "./MenuSeparator.js";
|
|
8
10
|
import type { ListItemClickEventDetail } from "./List.js";
|
|
9
11
|
/**
|
|
10
12
|
* Interface for components that may be slotted inside a `ui5-menu`.
|
package/dist/Menu.js
CHANGED
|
@@ -17,12 +17,8 @@ import "@ui5/webcomponents-icons/dist/slim-arrow-right.js";
|
|
|
17
17
|
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
18
18
|
import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js";
|
|
19
19
|
import DOMReferenceConverter from "@ui5/webcomponents-base/dist/converters/DOMReference.js";
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import List from "./List.js";
|
|
23
|
-
import BusyIndicator from "./BusyIndicator.js";
|
|
24
|
-
import MenuItem from "./MenuItem.js";
|
|
25
|
-
import MenuSeparator from "./MenuSeparator.js";
|
|
20
|
+
import "./MenuItem.js";
|
|
21
|
+
import "./MenuSeparator.js";
|
|
26
22
|
import menuTemplate from "./MenuTemplate.js";
|
|
27
23
|
import { MENU_CLOSE_BUTTON_ARIA_LABEL, MENU_POPOVER_ACCESSIBLE_NAME, } from "./generated/i18n/i18n-defaults.js";
|
|
28
24
|
// Styles
|
|
@@ -253,14 +249,6 @@ Menu = Menu_1 = __decorate([
|
|
|
253
249
|
renderer: jsxRenderer,
|
|
254
250
|
styles: menuCss,
|
|
255
251
|
template: menuTemplate,
|
|
256
|
-
dependencies: [
|
|
257
|
-
ResponsivePopover,
|
|
258
|
-
Button,
|
|
259
|
-
List,
|
|
260
|
-
MenuItem,
|
|
261
|
-
MenuSeparator,
|
|
262
|
-
BusyIndicator,
|
|
263
|
-
],
|
|
264
252
|
})
|
|
265
253
|
/**
|
|
266
254
|
* Fired when an item is being clicked.
|
package/dist/Menu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../src/Menu.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,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,OAA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AAC;AAEd,eAAe,IAAI,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { UI5CustomEvent } from \"@ui5/webcomponents-base\";\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 jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.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 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 \"./MenuTemplate.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: jsxRenderer,\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: UI5CustomEvent<ResponsivePopover, \"before-close\">) {\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,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omponents-base/dist/UI5Element.js\";\nimport type { UI5CustomEvent } from \"@ui5/webcomponents-base\";\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 jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.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 type ResponsivePopover from \"./ResponsivePopover.js\";\nimport type MenuItem from \"./MenuItem.js\";\nimport \"./MenuItem.js\";\nimport \"./MenuSeparator.js\";\nimport type {\n\tListItemClickEventDetail,\n} from \"./List.js\";\nimport menuTemplate from \"./MenuTemplate.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: jsxRenderer,\n\tstyles: menuCss,\n\ttemplate: menuTemplate,\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: UI5CustomEvent<ResponsivePopover, \"before-close\">) {\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
|
@@ -3,7 +3,7 @@ import "@ui5/webcomponents-icons/dist/nav-back.js";
|
|
|
3
3
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
4
4
|
import type { ListItemAccessibilityAttributes } from "./ListItem.js";
|
|
5
5
|
import ListItem from "./ListItem.js";
|
|
6
|
-
import ResponsivePopover from "./ResponsivePopover.js";
|
|
6
|
+
import type ResponsivePopover from "./ResponsivePopover.js";
|
|
7
7
|
import type PopoverPlacement from "./types/PopoverPlacement.js";
|
|
8
8
|
import type { IMenuItem } from "./Menu.js";
|
|
9
9
|
type MenuBeforeOpenEventDetail = {
|
package/dist/MenuItem.js
CHANGED
|
@@ -14,10 +14,6 @@ import { isPhone } from "@ui5/webcomponents-base/dist/Device.js";
|
|
|
14
14
|
import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js";
|
|
15
15
|
import "@ui5/webcomponents-icons/dist/nav-back.js";
|
|
16
16
|
import ListItem from "./ListItem.js";
|
|
17
|
-
import ResponsivePopover from "./ResponsivePopover.js";
|
|
18
|
-
import List from "./List.js";
|
|
19
|
-
import Icon from "./Icon.js";
|
|
20
|
-
import BusyIndicator from "./BusyIndicator.js";
|
|
21
17
|
import MenuItemTemplate from "./MenuItemTemplate.js";
|
|
22
18
|
import { MENU_BACK_BUTTON_ARIA_LABEL, MENU_CLOSE_BUTTON_ARIA_LABEL, MENU_POPOVER_ACCESSIBLE_NAME, } from "./generated/i18n/i18n-defaults.js";
|
|
23
19
|
// Styles
|
|
@@ -247,7 +243,6 @@ MenuItem = MenuItem_1 = __decorate([
|
|
|
247
243
|
renderer: jsxRenderer,
|
|
248
244
|
template: MenuItemTemplate,
|
|
249
245
|
styles: [ListItem.styles, menuItemCss],
|
|
250
|
-
dependencies: [...ListItem.dependencies, ResponsivePopover, List, BusyIndicator, Icon],
|
|
251
246
|
})
|
|
252
247
|
], MenuItem);
|
|
253
248
|
MenuItem.define();
|
package/dist/MenuItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.js","sourceRoot":"","sources":["../src/MenuItem.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAE3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,O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AAC;CACD,CAAA;AApRA;IADC,QAAQ,EAAE;sCACG;AAed;IADC,QAAQ,EAAE;gDACa;AAaxB;IADC,QAAQ,EAAE;sCACG;AAUd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0CACX;AAWjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACZ;AAShB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CACP;AASpB;IADC,QAAQ,EAAE;gDACa;AASxB;IADC,QAAQ,EAAE;yCACM;AAejB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yDACmC;AAM9D;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;mDACrB;AAgB1B;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,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;IAPb,aAAa,CAAC;QACd,GAAG,EAAE,eAAe;QACpB,QAAQ,EAAE,WAAW;QACrB,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,CA2Rb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport type { AccessibilityAttributes, UI5CustomEvent } from \"@ui5/webcomponents-base\";\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 { 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 \"./MenuItemTemplate.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 { 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\trenderer: jsxRenderer,\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\tsuper.onBeforeRendering();\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\" as const,\n\t\t\tariaHaspopup: this.hasSubmenu ? \"menu\" as const : 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: UI5CustomEvent<ResponsivePopover, \"before-close\">) {\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,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAE3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,2CAA2C,CAAC;AAGnD,OAAO,QAAQ,MAAM,eAAe,CAAC;AAGrC,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,EACN,2BAA2B,EAC3B,4BAA4B,EAC5B,4BAA4B,GAC5B,MAAM,mCAAmC,CAAC;AAG3C,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;QAEH,iBAAY,GAAG,IAAI,CAAC;QAoBpB;;;;;;;;;;;WAWG;QAEH,4BAAuB,GA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AAC;QACd,GAAG,EAAE,eAAe;QACpB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,gBAAgB;QAC1B,MAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;KACtC,CAAC;GACI,QAAQ,CA2Rb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport type { AccessibilityAttributes, UI5CustomEvent } from \"@ui5/webcomponents-base\";\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 { 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 type ResponsivePopover from \"./ResponsivePopover.js\";\nimport type PopoverPlacement from \"./types/PopoverPlacement.js\";\nimport MenuItemTemplate from \"./MenuItemTemplate.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 { 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\trenderer: jsxRenderer,\n\ttemplate: MenuItemTemplate,\n\tstyles: [ListItem.styles, menuItemCss],\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\tsuper.onBeforeRendering();\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\" as const,\n\t\t\tariaHaspopup: this.hasSubmenu ? \"menu\" as const : 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: UI5CustomEvent<ResponsivePopover, \"before-close\">) {\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/MenuSeparator.js
CHANGED
|
@@ -9,7 +9,6 @@ import jsxRendererer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js"
|
|
|
9
9
|
import menuSeparatorTemplate from "./MenuSeparatorTemplate.js";
|
|
10
10
|
import menuSeparatorCss from "./generated/themes/MenuSeparator.css.js";
|
|
11
11
|
import ListItemBase from "./ListItemBase.js";
|
|
12
|
-
import ListItemCustom from "./ListItemCustom.js";
|
|
13
12
|
/**
|
|
14
13
|
* @class
|
|
15
14
|
* The `ui5-menu-separator` represents a horizontal line to separate menu items inside a `ui5-menu`.
|
|
@@ -49,9 +48,6 @@ MenuSeparator = __decorate([
|
|
|
49
48
|
renderer: jsxRendererer,
|
|
50
49
|
styles: [menuSeparatorCss],
|
|
51
50
|
template: menuSeparatorTemplate,
|
|
52
|
-
dependencies: [
|
|
53
|
-
ListItemCustom,
|
|
54
|
-
],
|
|
55
51
|
})
|
|
56
52
|
], MenuSeparator);
|
|
57
53
|
MenuSeparator.define();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuSeparator.js","sourceRoot":"","sources":["../src/MenuSeparator.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,aAAa,MAAM,sDAAsD,CAAC;AAEjF,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,gBAAgB,MAAM,yCAAyC,CAAC;AACvE,OAAO,YAAY,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"MenuSeparator.js","sourceRoot":"","sources":["../src/MenuSeparator.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,aAAa,MAAM,sDAAsD,CAAC;AAEjF,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,gBAAgB,MAAM,yCAAyC,CAAC;AACvE,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C;;;;;;;;GAQG;AAQH,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,YAAY;IAGvC,IAAI,WAAW;QACd,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,OAAO;QACV,OAAO;YACN,IAAI,EAAE;gBACL,oBAAoB,EAAE,IAAI;aAC1B;SACD,CAAC;IACH,CAAC;IAED;;OAEG;IACH,IAAI,UAAU;QACb,OAAO,KAAK,CAAC;IACd,CAAC;IAED;;OAEG;IACH,IAAI,UAAU;QACb,OAAO,KAAK,CAAC;IACd,CAAC;CACD,CAAA;AA5BK,aAAa;IAPlB,aAAa,CAAC;QACd,GAAG,EAAE,oBAAoB;QACzB,QAAQ,EAAE,aAAa;QACvB,MAAM,EAAE,CAAC,gBAAgB,CAAC;QAC1B,QAAQ,EAAE,qBAAqB;KAC/B,CAAC;GAEI,aAAa,CA4BlB;AACD,aAAa,CAAC,MAAM,EAAE,CAAC;AAEvB,eAAe,aAAa,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport jsxRendererer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type { ClassMap } from \"@ui5/webcomponents-base/dist/types.js\";\nimport menuSeparatorTemplate from \"./MenuSeparatorTemplate.js\";\nimport menuSeparatorCss from \"./generated/themes/MenuSeparator.css.js\";\nimport ListItemBase from \"./ListItemBase.js\";\nimport type { IMenuItem } from \"./Menu.js\";\n/**\n * @class\n * The `ui5-menu-separator` represents a horizontal line to separate menu items inside a `ui5-menu`.\n * @constructor\n * @extends ListItemBase\n * @implements {IMenuItem}\n * @public\n * @since 2.0.0\n */\n@customElement({\n\ttag: \"ui5-menu-separator\",\n\trenderer: jsxRendererer,\n\tstyles: [menuSeparatorCss],\n\ttemplate: menuSeparatorTemplate,\n})\n\nclass MenuSeparator extends ListItemBase implements IMenuItem {\n\teventDetails!: ListItemBase[\"eventDetails\"];\n\n\tget isSeparator() {\n\t\treturn true;\n\t}\n\n\tget classes(): ClassMap {\n\t\treturn {\n\t\t\tmain: {\n\t\t\t\t\"ui5-menu-separator\": true,\n\t\t\t},\n\t\t};\n\t}\n\n\t/**\n\t * @override\n\t */\n\tget _focusable() {\n\t\treturn false;\n\t}\n\n\t/**\n\t * @override\n\t */\n\tget _pressable() {\n\t\treturn false;\n\t}\n}\nMenuSeparator.define();\n\nexport default MenuSeparator;\n"]}
|
package/dist/MessageStrip.js
CHANGED
|
@@ -13,8 +13,6 @@ import customElement from "@ui5/webcomponents-base/dist/decorators/customElement
|
|
|
13
13
|
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
14
14
|
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
|
15
15
|
import MessageStripTemplate from "./MessageStripTemplate.js";
|
|
16
|
-
import Icon from "./Icon.js";
|
|
17
|
-
import Button from "./Button.js";
|
|
18
16
|
import { MESSAGE_STRIP_CLOSE_BUTTON_INFORMATION, MESSAGE_STRIP_CLOSE_BUTTON_POSITIVE, MESSAGE_STRIP_CLOSE_BUTTON_NEGATIVE, MESSAGE_STRIP_CLOSE_BUTTON_CRITICAL, MESSAGE_STRIP_CLOSE_BUTTON_CUSTOM, MESSAGE_STRIP_CLOSABLE, MESSAGE_STRIP_ERROR, MESSAGE_STRIP_WARNING, MESSAGE_STRIP_SUCCESS, MESSAGE_STRIP_INFORMATION, MESSAGE_STRIP_CUSTOM, } from "./generated/i18n/i18n-defaults.js";
|
|
19
17
|
// Styles
|
|
20
18
|
import messageStripCss from "./generated/themes/MessageStrip.css.js";
|
|
@@ -176,7 +174,6 @@ MessageStrip = MessageStrip_1 = __decorate([
|
|
|
176
174
|
renderer: jsxRenderer,
|
|
177
175
|
template: MessageStripTemplate,
|
|
178
176
|
styles: messageStripCss,
|
|
179
|
-
dependencies: [Icon, Button],
|
|
180
177
|
})
|
|
181
178
|
/**
|
|
182
179
|
* Fired when the close button is pressed either with a
|
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,yDAAyD,CAAC;AAC5E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AAGrF,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,oBAAoB,MAAM,2BAA2B,CAAC;AAE7D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EACN,sCAAsC,EACtC,mCAAmC,EACnC,mCAAmC,EACnC,mCAAmC,EACnC,iCAAiC,EACjC,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,GACpB,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAA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;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,WAAW;QACrB,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,CA0HjB;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 I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type MessageStripDesign from \"./types/MessageStripDesign.js\";\nimport MessageStripTemplate from \"./MessageStripTemplate.js\";\nimport type { IIcon } from \"./Icon.js\";\nimport Icon from \"./Icon.js\";\nimport Button from \"./Button.js\";\nimport {\n\tMESSAGE_STRIP_CLOSE_BUTTON_INFORMATION,\n\tMESSAGE_STRIP_CLOSE_BUTTON_POSITIVE,\n\tMESSAGE_STRIP_CLOSE_BUTTON_NEGATIVE,\n\tMESSAGE_STRIP_CLOSE_BUTTON_CRITICAL,\n\tMESSAGE_STRIP_CLOSE_BUTTON_CUSTOM,\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\ntype DesignCloseButtonTooltip = 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: jsxRenderer,\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\tstatic closeButtonMappings(): DesignCloseButtonTooltip {\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_CLOSE_BUTTON_INFORMATION),\n\t\t\tPositive: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_POSITIVE),\n\t\t\tNegative: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_NEGATIVE),\n\t\t\tCritical: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_CRITICAL),\n\t\t\tColorSet1: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_CUSTOM),\n\t\t\tColorSet2: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_CUSTOM),\n\t\t};\n\t}\n\n\tget _closeButtonText() {\n\t\treturn MessageStrip.closeButtonMappings()[this.design];\n\t}\n\n\tget _closableText() {\n\t\treturn MessageStrip.i18nBundle.getText(MESSAGE_STRIP_CLOSABLE);\n\t}\n\n\tget iconProvided() {\n\t\treturn this.icon.length > 0;\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;AAGrF,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,oBAAoB,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EACN,sCAAsC,EACtC,mCAAmC,EACnC,mCAAmC,EACnC,mCAAmC,EACnC,iCAAiC,EACjC,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,GACpB,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAErE,IAAK,oBAOJ;AAPD,WAAK,oBAAoB;IACxB,oEAA4C,CAAA;IAC5C,qEAA6C,CAAA;IAC7C,qEAA6C,C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hB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qDACJ;AAYxB;IADC,IAAI,EAAE;0CACa;AAGb;IADN,IAAI,CAAC,oBAAoB,CAAC;sCACG;AA3DzB,YAAY;IAhBjB,aAAa,CAAC;QACd,GAAG,EAAE,mBAAmB;QACxB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,oBAAoB;QAC9B,MAAM,EAAE,eAAe;KACvB,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,YAAY,CA0HjB;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 I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type MessageStripDesign from \"./types/MessageStripDesign.js\";\nimport MessageStripTemplate from \"./MessageStripTemplate.js\";\nimport type { IIcon } from \"./Icon.js\";\nimport {\n\tMESSAGE_STRIP_CLOSE_BUTTON_INFORMATION,\n\tMESSAGE_STRIP_CLOSE_BUTTON_POSITIVE,\n\tMESSAGE_STRIP_CLOSE_BUTTON_NEGATIVE,\n\tMESSAGE_STRIP_CLOSE_BUTTON_CRITICAL,\n\tMESSAGE_STRIP_CLOSE_BUTTON_CUSTOM,\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\ntype DesignCloseButtonTooltip = 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: jsxRenderer,\n\ttemplate: MessageStripTemplate,\n\tstyles: messageStripCss,\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\tstatic closeButtonMappings(): DesignCloseButtonTooltip {\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_CLOSE_BUTTON_INFORMATION),\n\t\t\tPositive: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_POSITIVE),\n\t\t\tNegative: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_NEGATIVE),\n\t\t\tCritical: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_CRITICAL),\n\t\t\tColorSet1: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_CUSTOM),\n\t\t\tColorSet2: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_CUSTOM),\n\t\t};\n\t}\n\n\tget _closeButtonText() {\n\t\treturn MessageStrip.closeButtonMappings()[this.design];\n\t}\n\n\tget _closableText() {\n\t\treturn MessageStrip.i18nBundle.getText(MESSAGE_STRIP_CLOSABLE);\n\t}\n\n\tget iconProvided() {\n\t\treturn this.icon.length > 0;\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/MultiInput.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
|
2
2
|
import type { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
|
|
3
3
|
import type { IFormInputElement } from "@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js";
|
|
4
4
|
import Input from "./Input.js";
|
|
5
|
-
import Token from "./Token.js";
|
|
6
|
-
import Tokenizer from "./Tokenizer.js";
|
|
5
|
+
import type Token from "./Token.js";
|
|
6
|
+
import type Tokenizer from "./Tokenizer.js";
|
|
7
7
|
import type { TokenizerTokenDeleteEventDetail } from "./Tokenizer.js";
|
|
8
8
|
import type { InputSelectionChangeEventDetail as MultiInputSelectionChangeEventDetail } from "./Input.js";
|
|
9
9
|
interface IToken extends UI5Element, ITabbable {
|
package/dist/MultiInput.js
CHANGED
|
@@ -16,9 +16,7 @@ import { MULTIINPUT_ROLEDESCRIPTION_TEXT, MULTIINPUT_VALUE_HELP_LABEL } from "./
|
|
|
16
16
|
import Input from "./Input.js";
|
|
17
17
|
import MultiInputTemplate from "./MultiInputTemplate.js";
|
|
18
18
|
import styles from "./generated/themes/MultiInput.css.js";
|
|
19
|
-
import
|
|
20
|
-
import Tokenizer, { getTokensCountText } from "./Tokenizer.js";
|
|
21
|
-
import Icon from "./Icon.js";
|
|
19
|
+
import { getTokensCountText } from "./Tokenizer.js";
|
|
22
20
|
/**
|
|
23
21
|
* @class
|
|
24
22
|
* ### Overview
|
|
@@ -292,15 +290,6 @@ MultiInput = MultiInput_1 = __decorate([
|
|
|
292
290
|
formAssociated: true,
|
|
293
291
|
template: MultiInputTemplate,
|
|
294
292
|
styles: [Input.styles, styles],
|
|
295
|
-
get dependencies() {
|
|
296
|
-
return [
|
|
297
|
-
...Input.dependencies,
|
|
298
|
-
Input,
|
|
299
|
-
Tokenizer,
|
|
300
|
-
Token,
|
|
301
|
-
Icon,
|
|
302
|
-
];
|
|
303
|
-
},
|
|
304
293
|
})
|
|
305
294
|
/**
|
|
306
295
|
* Fired when the value help icon is pressed
|