@ui5/webcomponents 2.4.0-rc.3 → 2.4.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 +28 -0
- package/cypress/specs/Toolbar.cy.ts +43 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Button.d.ts +2 -4
- package/dist/Button.js +3 -20
- package/dist/Button.js.map +1 -1
- package/dist/DatePicker.d.ts +1 -0
- package/dist/DatePicker.js +18 -0
- package/dist/DatePicker.js.map +1 -1
- package/dist/FileUploader.d.ts +1 -1
- package/dist/FileUploader.js +2 -3
- package/dist/FileUploader.js.map +1 -1
- package/dist/Link.d.ts +0 -1
- package/dist/Link.js +0 -7
- package/dist/Link.js.map +1 -1
- package/dist/List.js +1 -4
- package/dist/List.js.map +1 -1
- package/dist/ListItem.d.ts +5 -4
- package/dist/ListItem.js +17 -12
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemBase.js +3 -4
- package/dist/ListItemBase.js.map +1 -1
- package/dist/SliderBase.d.ts +1 -2
- package/dist/SliderBase.js +6 -8
- package/dist/SliderBase.js.map +1 -1
- package/dist/SplitButton.d.ts +2 -2
- package/dist/SplitButton.js +4 -5
- package/dist/SplitButton.js.map +1 -1
- package/dist/Toolbar.d.ts +2 -1
- package/dist/Toolbar.js +7 -0
- package/dist/Toolbar.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/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/FormLabelSpan.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/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 +88 -0
- package/dist/custom-elements.json +58 -0
- package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/templates/ButtonTemplate.lit.js +1 -1
- package/dist/generated/templates/ButtonTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DatePickerPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/DatePickerPopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DatePickerTemplate.lit.js +1 -1
- package/dist/generated/templates/DatePickerTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DateRangePickerTemplate.lit.js +1 -1
- package/dist/generated/templates/DateRangePickerTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DateTimePickerPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/DateTimePickerPopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DateTimePickerTemplate.lit.js +1 -1
- package/dist/generated/templates/DateTimePickerTemplate.lit.js.map +1 -1
- package/dist/generated/templates/LinkTemplate.lit.js +1 -1
- package/dist/generated/templates/LinkTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ListItemCustomTemplate.lit.js +4 -4
- package/dist/generated/templates/ListItemCustomTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ListItemStandardTemplate.lit.js +4 -4
- package/dist/generated/templates/ListItemStandardTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ListItemTemplate.lit.js +4 -4
- package/dist/generated/templates/ListItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/MenuItemTemplate.lit.js +4 -4
- package/dist/generated/templates/MenuItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/NavigationMenuItemTemplate.lit.js +8 -8
- package/dist/generated/templates/NavigationMenuItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SuggestionListItemTemplate.lit.js +4 -4
- package/dist/generated/templates/SuggestionListItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToggleButtonTemplate.lit.js +1 -1
- package/dist/generated/templates/ToggleButtonTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToggleSpinButtonTemplate.lit.js +1 -1
- package/dist/generated/templates/ToggleSpinButtonTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToolbarButtonTemplate.lit.js +1 -1
- package/dist/generated/templates/ToolbarButtonTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToolbarPopoverSelectTemplate.lit.js +1 -1
- package/dist/generated/templates/ToolbarPopoverSelectTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToolbarPopoverSeparatorTemplate.lit.js +1 -1
- package/dist/generated/templates/ToolbarPopoverSeparatorTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToolbarSelectTemplate.lit.js +1 -1
- package/dist/generated/templates/ToolbarSelectTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ToolbarSeparatorTemplate.lit.js +1 -1
- package/dist/generated/templates/ToolbarSeparatorTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TreeItemBaseTemplate.lit.js +4 -4
- package/dist/generated/templates/TreeItemBaseTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TreeItemCustomTemplate.lit.js +4 -4
- package/dist/generated/templates/TreeItemCustomTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TreeItemTemplate.lit.js +4 -4
- package/dist/generated/templates/TreeItemTemplate.lit.js.map +1 -1
- package/dist/generated/themes/Avatar.css.js +1 -1
- package/dist/generated/themes/Avatar.css.js.map +1 -1
- package/dist/generated/themes/AvatarGroup.css.js +1 -1
- package/dist/generated/themes/AvatarGroup.css.js.map +1 -1
- package/dist/generated/themes/Bar.css.js +1 -1
- package/dist/generated/themes/Bar.css.js.map +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js.map +1 -1
- package/dist/generated/themes/BusyIndicator.css.js +1 -1
- package/dist/generated/themes/BusyIndicator.css.js.map +1 -1
- package/dist/generated/themes/Button.css.js +1 -1
- package/dist/generated/themes/Button.css.js.map +1 -1
- package/dist/generated/themes/Calendar.css.js +1 -1
- package/dist/generated/themes/Calendar.css.js.map +1 -1
- package/dist/generated/themes/CalendarHeader.css.js +1 -1
- package/dist/generated/themes/CalendarHeader.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegend.css.js +1 -1
- package/dist/generated/themes/CalendarLegend.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js.map +1 -1
- package/dist/generated/themes/Card.css.js +1 -1
- package/dist/generated/themes/Card.css.js.map +1 -1
- package/dist/generated/themes/CardHeader.css.js +1 -1
- package/dist/generated/themes/CardHeader.css.js.map +1 -1
- package/dist/generated/themes/Carousel.css.js +1 -1
- package/dist/generated/themes/Carousel.css.js.map +1 -1
- package/dist/generated/themes/CheckBox.css.js +1 -1
- package/dist/generated/themes/CheckBox.css.js.map +1 -1
- package/dist/generated/themes/ColorPalette.css.js +1 -1
- package/dist/generated/themes/ColorPalette.css.js.map +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js.map +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js.map +1 -1
- package/dist/generated/themes/ColorPicker.css.js +1 -1
- package/dist/generated/themes/ColorPicker.css.js.map +1 -1
- package/dist/generated/themes/ComboBox.css.js +1 -1
- package/dist/generated/themes/ComboBox.css.js.map +1 -1
- package/dist/generated/themes/DatePicker.css.js +1 -1
- package/dist/generated/themes/DatePicker.css.js.map +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js.map +1 -1
- package/dist/generated/themes/DayPicker.css.js +1 -1
- package/dist/generated/themes/DayPicker.css.js.map +1 -1
- package/dist/generated/themes/Dialog.css.js +1 -1
- package/dist/generated/themes/Dialog.css.js.map +1 -1
- package/dist/generated/themes/FileUploader.css.js +1 -1
- package/dist/generated/themes/FileUploader.css.js.map +1 -1
- package/dist/generated/themes/Form.css.js +1 -1
- package/dist/generated/themes/Form.css.js.map +1 -1
- package/dist/generated/themes/FormItem.css.js +1 -1
- package/dist/generated/themes/FormItem.css.js.map +1 -1
- package/dist/generated/themes/FormLabelSpan.css.js +1 -1
- package/dist/generated/themes/FormLabelSpan.css.js.map +1 -1
- package/dist/generated/themes/GrowingButton.css.js +1 -1
- package/dist/generated/themes/GrowingButton.css.js.map +1 -1
- package/dist/generated/themes/Icon.css.js +1 -1
- package/dist/generated/themes/Icon.css.js.map +1 -1
- package/dist/generated/themes/Input.css.js +1 -1
- package/dist/generated/themes/Input.css.js.map +1 -1
- package/dist/generated/themes/InputIcon.css.js +1 -1
- package/dist/generated/themes/InputIcon.css.js.map +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js.map +1 -1
- package/dist/generated/themes/Link.css.js +1 -1
- package/dist/generated/themes/Link.css.js.map +1 -1
- package/dist/generated/themes/List.css.js +1 -1
- package/dist/generated/themes/List.css.js.map +1 -1
- package/dist/generated/themes/ListItem.css.js +1 -1
- package/dist/generated/themes/ListItem.css.js.map +1 -1
- package/dist/generated/themes/ListItemBase.css.js +1 -1
- package/dist/generated/themes/ListItemBase.css.js.map +1 -1
- package/dist/generated/themes/ListItemCustom.css.js +1 -1
- package/dist/generated/themes/ListItemCustom.css.js.map +1 -1
- package/dist/generated/themes/ListItemGroup.css.js +1 -1
- package/dist/generated/themes/ListItemGroup.css.js.map +1 -1
- package/dist/generated/themes/ListItemGroupHeader.css.js +1 -1
- package/dist/generated/themes/ListItemGroupHeader.css.js.map +1 -1
- package/dist/generated/themes/ListItemIcon.css.js +1 -1
- package/dist/generated/themes/ListItemIcon.css.js.map +1 -1
- package/dist/generated/themes/Menu.css.js +1 -1
- package/dist/generated/themes/Menu.css.js.map +1 -1
- package/dist/generated/themes/MenuItem.css.js +1 -1
- package/dist/generated/themes/MenuItem.css.js.map +1 -1
- package/dist/generated/themes/MessageStrip.css.js +1 -1
- package/dist/generated/themes/MessageStrip.css.js.map +1 -1
- package/dist/generated/themes/MonthPicker.css.js +1 -1
- package/dist/generated/themes/MonthPicker.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBox.css.js +1 -1
- package/dist/generated/themes/MultiComboBox.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js.map +1 -1
- package/dist/generated/themes/MultiInput.css.js +1 -1
- package/dist/generated/themes/MultiInput.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenu.css.js +1 -1
- package/dist/generated/themes/NavigationMenu.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenuItem.css.js +1 -1
- package/dist/generated/themes/NavigationMenuItem.css.js.map +1 -1
- package/dist/generated/themes/OptionBase.css.js +1 -1
- package/dist/generated/themes/OptionBase.css.js.map +1 -1
- package/dist/generated/themes/Panel.css.js +1 -1
- package/dist/generated/themes/Panel.css.js.map +1 -1
- package/dist/generated/themes/Popover.css.js +1 -1
- package/dist/generated/themes/Popover.css.js.map +1 -1
- package/dist/generated/themes/PopupsCommon.css.js +1 -1
- package/dist/generated/themes/PopupsCommon.css.js.map +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js.map +1 -1
- package/dist/generated/themes/RadioButton.css.js +1 -1
- package/dist/generated/themes/RadioButton.css.js.map +1 -1
- package/dist/generated/themes/RangeSlider.css.js +1 -1
- package/dist/generated/themes/RangeSlider.css.js.map +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js.map +1 -1
- package/dist/generated/themes/SegmentedButton.css.js +1 -1
- package/dist/generated/themes/SegmentedButton.css.js.map +1 -1
- package/dist/generated/themes/SegmentedButtonItem.css.js +1 -1
- package/dist/generated/themes/SegmentedButtonItem.css.js.map +1 -1
- package/dist/generated/themes/Select.css.js +1 -1
- package/dist/generated/themes/Select.css.js.map +1 -1
- package/dist/generated/themes/SliderBase.css.js +1 -1
- package/dist/generated/themes/SliderBase.css.js.map +1 -1
- package/dist/generated/themes/SplitButton.css.js +1 -1
- package/dist/generated/themes/SplitButton.css.js.map +1 -1
- package/dist/generated/themes/StepInput.css.js +1 -1
- package/dist/generated/themes/StepInput.css.js.map +1 -1
- package/dist/generated/themes/SuggestionItem.css.js +1 -1
- package/dist/generated/themes/SuggestionItem.css.js.map +1 -1
- package/dist/generated/themes/SuggestionItemCustom.css.js +1 -1
- package/dist/generated/themes/SuggestionItemCustom.css.js.map +1 -1
- package/dist/generated/themes/Switch.css.js +1 -1
- package/dist/generated/themes/Switch.css.js.map +1 -1
- package/dist/generated/themes/TabContainer.css.js +1 -1
- package/dist/generated/themes/TabContainer.css.js.map +1 -1
- package/dist/generated/themes/TabInOverflow.css.js +1 -1
- package/dist/generated/themes/TabInOverflow.css.js.map +1 -1
- package/dist/generated/themes/TabInStrip.css.js +1 -1
- package/dist/generated/themes/TabInStrip.css.js.map +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js.map +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js.map +1 -1
- package/dist/generated/themes/Table.css.js +1 -1
- package/dist/generated/themes/Table.css.js.map +1 -1
- package/dist/generated/themes/TableCellBase.css.js +1 -1
- package/dist/generated/themes/TableCellBase.css.js.map +1 -1
- package/dist/generated/themes/TableHeaderRow.css.js +1 -1
- package/dist/generated/themes/TableHeaderRow.css.js.map +1 -1
- package/dist/generated/themes/TableRow.css.js +1 -1
- package/dist/generated/themes/TableRow.css.js.map +1 -1
- package/dist/generated/themes/TableRowBase.css.js +1 -1
- package/dist/generated/themes/TableRowBase.css.js.map +1 -1
- package/dist/generated/themes/Tag.css.js +1 -1
- package/dist/generated/themes/Tag.css.js.map +1 -1
- package/dist/generated/themes/Text.css.js +1 -1
- package/dist/generated/themes/Text.css.js.map +1 -1
- package/dist/generated/themes/TextArea.css.js +1 -1
- package/dist/generated/themes/TextArea.css.js.map +1 -1
- package/dist/generated/themes/TimePicker.css.js +1 -1
- package/dist/generated/themes/TimePicker.css.js.map +1 -1
- package/dist/generated/themes/Toast.css.js +1 -1
- package/dist/generated/themes/Toast.css.js.map +1 -1
- package/dist/generated/themes/ToggleButton.css.js +1 -1
- package/dist/generated/themes/ToggleButton.css.js.map +1 -1
- package/dist/generated/themes/Token.css.js +1 -1
- package/dist/generated/themes/Token.css.js.map +1 -1
- package/dist/generated/themes/Tokenizer.css.js +1 -1
- package/dist/generated/themes/Tokenizer.css.js.map +1 -1
- package/dist/generated/themes/TokenizerPopover.css.js +1 -1
- package/dist/generated/themes/TokenizerPopover.css.js.map +1 -1
- package/dist/generated/themes/Toolbar.css.js +1 -1
- package/dist/generated/themes/Toolbar.css.js.map +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js.map +1 -1
- package/dist/generated/themes/TreeItem.css.js +1 -1
- package/dist/generated/themes/TreeItem.css.js.map +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js.map +1 -1
- package/dist/generated/themes/YearPicker.css.js +1 -1
- package/dist/generated/themes/YearPicker.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +3 -3
- package/dist/web-types.json +52 -4
- package/package.json +9 -9
- package/src/Button.hbs +0 -2
- package/src/DatePickerPopover.hbs +1 -0
- package/src/Link.hbs +0 -1
- package/src/ListItem.hbs +2 -2
- package/src/ToolbarButton.hbs +0 -1
- package/src/ToolbarPopoverSelect.hbs +1 -0
- package/src/ToolbarPopoverSeparator.hbs +1 -0
- package/src/ToolbarSelect.hbs +1 -0
- package/src/ToolbarSeparator.hbs +1 -0
- package/src/i18n/messagebundle_en_US_saptrc.properties +195 -195
- package/src/themes/sap_fiori_3/Button-parameters.css +1 -1
- package/src/themes/sap_fiori_3_dark/Button-parameters.css +1 -1
- package/src/themes/sap_fiori_3_hcb/Button-parameters.css +1 -0
- package/src/themes/sap_fiori_3_hcw/Button-parameters.css +1 -0
package/dist/ListItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../src/ListItem.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EACN,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,GAChC,MAAM,sCAAsC,CAAC;AAE9C,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAElG,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,0CAA0C,CAAC;AAClD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,iBAAiB,MAAM,8BAA8B,CAAC;AAC7D,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EACN,MAAM,EACN,6BAA6B,EAC7B,iCAAiC,EACjC,kBAAkB,EAClB,sBAAsB,GACtB,MAAM,mCAAmC,CAAC;AAG3C,SAAS;AACT,OAAO,MAAM,MAAM,oCAAoC,CAAC;AACxD,OAAO,yBAAyB,MAAM,kDAAkD,CAAC;AAEzF,QAAQ;AACR,OAAO,m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;AAOjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACb;AAUf;IADC,QAAQ,EAAE;2CACwB;AAQ3B;IADP,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0CACF;AAU1B;IADC,QAAQ,EAAE;gDAC8C;AAGzD;IADC,QAAQ,EAAE;gDACqC;AAWhD;IADC,IAAI,EAAE;8CACuB;AAavB;IADN,IAAI,CAAC,oBAAoB,CAAC;kCACG;AA7GhB,QAAQ;IA1BtB,aAAa,CAAC;QACd,aAAa,EAAE,IAAI;QACnB,MAAM,EAAE;YACP,YAAY,CAAC,MAAM;YACnB,yBAAyB;YACzB,MAAM;SACN;QACD,YAAY,EAAE;YACb,MAAM;YACN,WAAW;YACX,QAAQ;SACR;KACD,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,cAAc,EAAE;QACtB,OAAO,EAAE,IAAI;KACb,CAAC;IACD,KAAK,CAAC,UAAU,EAAE;QAClB,OAAO,EAAE,IAAI;KACb,CAAC;IACD,KAAK,CAAC,sBAAsB,EAAE;QAC9B,OAAO,EAAE,IAAI;KACb,CAAC;GACa,QAAQ,CAoZtB;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport { getEventMark } from \"@ui5/webcomponents-base/dist/MarkedEvents.js\";\nimport {\n\tisSpace, isEnter, isDelete, isF2,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\nimport { getFirstFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport type { AccessibilityAttributes, PassiveEventListenerObject } from \"@ui5/webcomponents-base/dist/types.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type AriaHasPopup from \"@ui5/webcomponents-base/dist/types/AriaHasPopup.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport \"@ui5/webcomponents-icons/dist/edit.js\";\nimport Highlight from \"./types/Highlight.js\";\nimport ListItemType from \"./types/ListItemType.js\";\nimport ListSelectionMode from \"./types/ListSelectionMode.js\";\nimport ListItemBase from \"./ListItemBase.js\";\nimport RadioButton from \"./RadioButton.js\";\nimport CheckBox from \"./CheckBox.js\";\nimport Button from \"./Button.js\";\nimport type { IButton } from \"./Button.js\";\nimport {\n\tDELETE,\n\tARIA_LABEL_LIST_ITEM_CHECKBOX,\n\tARIA_LABEL_LIST_ITEM_RADIO_BUTTON,\n\tLIST_ITEM_SELECTED,\n\tLIST_ITEM_NOT_SELECTED,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport type ListItemAccessibleRole from \"./types/ListItemAccessibleRole.js\";\n\n// Styles\nimport styles from \"./generated/themes/ListItem.css.js\";\nimport listItemAdditionalTextCss from \"./generated/themes/ListItemAdditionalText.css.js\";\n\n// Icons\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\n\ninterface IAccessibleListItem {\n\taccessibleName?: string;\n\taccessibleNameRef?: string;\n}\n\ntype SelectionRequestEventDetail = {\n\titem: ListItemBase,\n\tselectionComponentPressed: boolean,\n\tselected?: boolean,\n\tkey?: string,\n}\n\ntype AccInfo = {\n\trole?: string;\n\tariaExpanded?: boolean;\n\tariaLevel?: number;\n\tariaLabel: string;\n\tariaLabelRadioButton: string;\n\tariaSelectedText?: string;\n\tariaHaspopup?: `${Lowercase<AriaHasPopup>}`;\n\tposinset?: number;\n\tsetsize?: number;\n\tariaSelected?: boolean;\n\tariaChecked?: boolean;\n\tlistItemAriaLabel?: string;\n\tariaOwns?: string;\n\ttooltip?: string;\n\tariaKeyShortcuts?: string;\n}\n\ntype ListItemAccessibilityAttributes = Pick<AccessibilityAttributes, \"hasPopup\" | \"ariaSetsize\" | \"ariaPosinset\">;\n\n/**\n * @class\n * A class to serve as a base\n * for the `ListItemStandard` and `ListItemCustom` classes.\n * @constructor\n * @abstract\n * @extends ListItemBase\n * @public\n */\n@customElement({\n\tlanguageAware: true,\n\tstyles: [\n\t\tListItemBase.styles,\n\t\tlistItemAdditionalTextCss,\n\t\tstyles,\n\t],\n\tdependencies: [\n\t\tButton,\n\t\tRadioButton,\n\t\tCheckBox,\n\t],\n})\n/**\n * Fired when the user clicks on the detail button when type is `Detail`.\n * @public\n */\n@event(\"detail-click\", {\n\tbubbles: true,\n})\n@event(\"_focused\", {\n\tbubbles: true,\n})\n@event(\"_selection-requested\", {\n\tbubbles: true,\n})\nabstract class ListItem extends ListItemBase {\n\t/**\n\t * Defines the visual indication and behavior of the list items.\n\t * Available options are `Active` (by default), `Inactive`, `Detail` and `Navigation`.\n\t *\n\t * **Note:** When set to `Active` or `Navigation`, the item will provide visual response upon press and hover,\n\t * while with type `Inactive` and `Detail` - will not.\n\t * @default \"Active\"\n\t * @public\n\t*/\n\t@property()\n\ttype: `${ListItemType}` = \"Active\";\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 * - **ariaSetsize**: Defines the number of items in the current set when not all items in the set are present in the DOM.\n\t * **Note:** The value is an integer reflecting the number of items in the complete set. If the size of the entire set is unknown, set `-1`.\n\t *\n\t * \t- **ariaPosinset**: Defines an element's number or position in the current set when not all items are present in the DOM.\n\t * \t**Note:** The value is an integer greater than or equal to 1, and less than or equal to the size of the set when that size is known.\n\t *\n\t * @default {}\n\t * @public\n\t * @since 1.15.0\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes: ListItemAccessibilityAttributes = {};\n\n\t/**\n\t * The navigated state of the list item.\n\t * If set to `true`, a navigation indicator is displayed at the end of the list item.\n\t * @default false\n\t * @public\n\t * @since 1.10.0\n\t */\n\t@property({ type: Boolean })\n\tnavigated = false;\n\n\t/**\n\t * Defines the text of the tooltip that would be displayed for the list 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 * Indicates if the list item is active, e.g pressed down with the mouse or the keyboard keys.\n\t * @private\n\t*/\n\t@property({ type: Boolean })\n\tactive = false;\n\n\t/**\n\t * Defines the highlight state of the list items.\n\t * Available options are: `\"None\"` (by default), `\"Positive\"`, `\"Critical\"`, `\"Information\"` and `\"Negative\"`.\n\t * @default \"None\"\n\t * @public\n\t * @since 1.24\n\t */\n\t@property()\n\thighlight: `${Highlight}` = \"None\";\n\n\t/**\n\t * Defines the selected state of the component.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdeclare selected: boolean;\n\n\t/**\n\t * Used to define the role of the list item.\n\t * @private\n\t * @default \"ListItem\"\n\t * @since 1.3.0\n\t *\n\t */\n\t@property()\n\taccessibleRole: `${ListItemAccessibleRole}` = \"ListItem\";\n\n\t@property()\n\t_selectionMode: `${ListSelectionMode}` = \"None\";\n\n\t/**\n\t * Defines the delete button, displayed in \"Delete\" mode.\n\t * **Note:** While the slot allows custom buttons, to match\n\t * design guidelines, please use the `ui5-button` component.\n\t * **Note:** When the slot is not present, a built-in delete button will be displayed.\n\t * @since 1.9.0\n\t * @public\n\t*/\n\t@slot()\n\tdeleteButton!: Array<IButton>;\n\n\tdeactivateByKey: (e: KeyboardEvent) => void;\n\tdeactivate: () => void;\n\t_ontouchstart: PassiveEventListenerObject;\n\t// used in template, implemented in TreeItemBase, ListItemStandard\n\taccessibleName?: string;\n\t// used in ListItem template but implemented in TreeItemBase\n\tindeterminate?: boolean;\n\t// Used in UploadCollectionItem\n\tdisableDeleteButton?: boolean;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis.deactivateByKey = (e: KeyboardEvent) => {\n\t\t\tif (isEnter(e)) {\n\t\t\t\tthis.deactivate();\n\t\t\t}\n\t\t};\n\n\t\tthis.deactivate = () => {\n\t\t\tif (this.active) {\n\t\t\t\tthis.active = false;\n\t\t\t}\n\t\t};\n\n\t\tconst handleTouchStartEvent = (e: TouchEvent) => {\n\t\t\tthis._onmousedown(e as unknown as MouseEvent);\n\t\t};\n\n\t\tthis._ontouchstart = {\n\t\t\thandleEvent: handleTouchStartEvent,\n\t\t\tpassive: true,\n\t\t};\n\t}\n\n\tonBeforeRendering() {\n\t\tsuper.onBeforeRendering();\n\t\tthis.actionable = (this.type === ListItemType.Active || this.type === ListItemType.Navigation) && (this._selectionMode !== ListSelectionMode.Delete);\n\t}\n\n\tonEnterDOM() {\n\t\tsuper.onEnterDOM();\n\t\tdocument.addEventListener(\"mouseup\", this.deactivate);\n\t\tdocument.addEventListener(\"touchend\", this.deactivate);\n\t\tdocument.addEventListener(\"keyup\", this.deactivateByKey);\n\t}\n\n\tonExitDOM() {\n\t\tdocument.removeEventListener(\"mouseup\", this.deactivate);\n\t\tdocument.removeEventListener(\"keyup\", this.deactivateByKey);\n\t\tdocument.removeEventListener(\"touchend\", this.deactivate);\n\t}\n\n\tasync _onkeydown(e: KeyboardEvent) {\n\t\tif ((isSpace(e) || isEnter(e)) && this._isTargetSelfFocusDomRef(e)) {\n\t\t\treturn;\n\t\t}\n\n\t\tsuper._onkeydown(e);\n\n\t\tconst itemActive = this.type === ListItemType.Active,\n\t\t\titemNavigated = this.typeNavigation;\n\n\t\tif ((isSpace(e) || isEnter(e)) && (itemActive || itemNavigated)) {\n\t\t\tthis.activate();\n\t\t}\n\n\t\tif (isF2(e)) {\n\t\t\tconst activeElement = getActiveElement();\n\t\t\tconst focusDomRef = this.getFocusDomRef()!;\n\n\t\t\tif (activeElement === focusDomRef) {\n\t\t\t\tconst firstFocusable = await getFirstFocusableElement(focusDomRef);\n\t\t\t\tfirstFocusable?.focus();\n\t\t\t} else {\n\t\t\t\tfocusDomRef.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tsuper._onkeyup(e);\n\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tthis.deactivate();\n\t\t}\n\n\t\tif (this.modeDelete && isDelete(e)) {\n\t\t\tthis.onDelete();\n\t\t}\n\t}\n\n\t_onmousedown(e: MouseEvent) {\n\t\tif (getEventMark(e) === \"button\") {\n\t\t\treturn;\n\t\t}\n\t\tthis.activate();\n\t}\n\n\t_onmouseup(e: MouseEvent) {\n\t\tif (getEventMark(e) === \"button\") {\n\t\t\treturn;\n\t\t}\n\t\tthis.deactivate();\n\t}\n\n\t_ontouchend(e: TouchEvent) {\n\t\tthis._onmouseup(e as unknown as MouseEvent);\n\t}\n\n\t_onfocusout() {\n\t\tthis.deactivate();\n\t}\n\n\t_ondragstart(e: DragEvent) {\n\t\tif (!e.dataTransfer) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (e.target === this._listItem) {\n\t\t\tthis.setAttribute(\"data-moving\", \"\");\n\t\t\te.dataTransfer.dropEffect = \"move\";\n\t\t\te.dataTransfer.effectAllowed = \"move\";\n\t\t}\n\t}\n\n\t_ondragend(e: DragEvent) {\n\t\tif (e.target === this._listItem) {\n\t\t\tthis.removeAttribute(\"data-moving\");\n\t\t}\n\t}\n\n\t_isTargetSelfFocusDomRef(e: KeyboardEvent): boolean {\n\t\tconst target = e.target as HTMLElement,\n\t\t\tfocusDomRef = this.getFocusDomRef();\n\n\t\treturn target !== focusDomRef;\n\t}\n\n\t/**\n\t * Called when selection components in Single (ui5-radio-button)\n\t * and Multi (ui5-checkbox) selection modes are used.\n\t */\n\tonMultiSelectionComponentPress(e: MouseEvent) {\n\t\tif (this.isInactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fireDecoratorEvent<SelectionRequestEventDetail>(\"_selection-requested\", { item: this, selected: (e.target as CheckBox).checked, selectionComponentPressed: true });\n\t}\n\n\tonSingleSelectionComponentPress(e: MouseEvent) {\n\t\tif (this.isInactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fireDecoratorEvent<SelectionRequestEventDetail>(\"_selection-requested\", { item: this, selected: !(e.target as RadioButton).checked, selectionComponentPressed: true });\n\t}\n\n\tactivate() {\n\t\tif (this.type === ListItemType.Active || this.type === ListItemType.Navigation) {\n\t\t\tthis.active = true;\n\t\t}\n\t}\n\n\tonDelete() {\n\t\tthis.fireDecoratorEvent<SelectionRequestEventDetail>(\"_selection-requested\", { item: this, selectionComponentPressed: false });\n\t}\n\n\tonDetailClick() {\n\t\tthis.fireDecoratorEvent(\"detail-click\", { item: this, selected: this.selected });\n\t}\n\n\tfireItemPress(e: Event) {\n\t\tif (this.isInactive) {\n\t\t\treturn;\n\t\t}\n\t\tsuper.fireItemPress(e);\n\t}\n\n\tget isInactive() {\n\t\treturn this.type === ListItemType.Inactive || this.type === ListItemType.Detail;\n\t}\n\n\tget placeSelectionElementBefore() {\n\t\treturn this._selectionMode === ListSelectionMode.Multiple\n\t\t\t|| this._selectionMode === ListSelectionMode.SingleStart;\n\t}\n\n\tget placeSelectionElementAfter() {\n\t\treturn !this.placeSelectionElementBefore\n\t\t\t&& (this._selectionMode === ListSelectionMode.SingleEnd || this._selectionMode === ListSelectionMode.Delete);\n\t}\n\n\tget modeSingleSelect() {\n\t\treturn [\n\t\t\tListSelectionMode.SingleStart,\n\t\t\tListSelectionMode.SingleEnd,\n\t\t\tListSelectionMode.Single,\n\t\t].includes(this._selectionMode as ListSelectionMode);\n\t}\n\n\tget modeMultiple() {\n\t\treturn this._selectionMode === ListSelectionMode.Multiple;\n\t}\n\n\tget modeDelete() {\n\t\treturn this._selectionMode === ListSelectionMode.Delete;\n\t}\n\n\t/**\n\t * Used in UploadCollectionItem\n\t */\n\tget renderDeleteButton() {\n\t\treturn this.modeDelete;\n\t}\n\n\t/**\n\t * End\n\t */\n\n\tget typeDetail() {\n\t\treturn this.type === ListItemType.Detail;\n\t}\n\n\tget typeNavigation() {\n\t\treturn this.type === ListItemType.Navigation;\n\t}\n\n\tget typeActive() {\n\t\treturn this.type === ListItemType.Active;\n\t}\n\n\tget _ariaSelected() {\n\t\tif (this.modeMultiple || this.modeSingleSelect) {\n\t\t\treturn this.selected;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tget listItemAccessibleRole() {\n\t\treturn this.accessibleRole.toLowerCase();\n\t}\n\n\tget ariaSelectedText() {\n\t\tlet ariaSelectedText;\n\n\t\t// Selected state needs to be supported separately since now the role mapping is list -> listitem[]\n\t\t// to avoid the issue of nesting interactive elements, ex. (option -> radio/checkbox);\n\t\t// The text is added to aria-describedby because as part of the aria-labelledby\n\t\t// the whole content of the item is readout when the aria-labelledby value is changed.\n\t\tif (this._ariaSelected !== undefined) {\n\t\t\tariaSelectedText = this._ariaSelected ? ListItem.i18nBundle.getText(LIST_ITEM_SELECTED) : ListItem.i18nBundle.getText(LIST_ITEM_NOT_SELECTED);\n\t\t}\n\n\t\treturn ariaSelectedText;\n\t}\n\n\tget deleteText() {\n\t\treturn ListItem.i18nBundle.getText(DELETE);\n\t}\n\n\tget hasDeleteButtonSlot() {\n\t\treturn !!this.deleteButton.length;\n\t}\n\n\tget _accessibleNameRef(): string {\n\t\tif ((this as IAccessibleListItem).accessibleName) {\n\t\t\t// accessibleName is set - return labels excluding content\n\t\t\treturn `${this._id}-invisibleText`;\n\t\t}\n\n\t\t// accessibleName is not set - return _accInfo.listItemAriaLabel including content\n\t\treturn `${this._id}-content ${this._id}-invisibleText`;\n\t}\n\n\tget _accInfo(): AccInfo {\n\t\treturn {\n\t\t\trole: this.listItemAccessibleRole,\n\t\t\tariaExpanded: undefined,\n\t\t\tariaLevel: undefined,\n\t\t\tariaLabel: ListItem.i18nBundle.getText(ARIA_LABEL_LIST_ITEM_CHECKBOX),\n\t\t\tariaLabelRadioButton: ListItem.i18nBundle.getText(ARIA_LABEL_LIST_ITEM_RADIO_BUTTON),\n\t\t\tariaSelectedText: this.ariaSelectedText,\n\t\t\tariaHaspopup: this.accessibilityAttributes.hasPopup,\n\t\t\tsetsize: this.accessibilityAttributes.ariaSetsize,\n\t\t\tposinset: this.accessibilityAttributes.ariaPosinset,\n\t\t\ttooltip: this.tooltip,\n\t\t};\n\t}\n\n\tget _hasHighlightColor() {\n\t\treturn this.highlight !== Highlight.None;\n\t}\n\n\tget hasConfigurableMode() {\n\t\treturn true;\n\t}\n\n\tget _listItem() {\n\t\treturn this.shadowRoot!.querySelector(\"li\");\n\t}\n}\n\nexport default ListItem;\nexport type {\n\tIAccessibleListItem,\n\tSelectionRequestEventDetail,\n\tListItemAccessibilityAttributes,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../src/ListItem.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,EACN,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,GAChC,MAAM,sCAAsC,CAAC;AAE9C,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAElG,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,0CAA0C,CAAC;AAClD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,iBAAiB,MAAM,8BAA8B,CAAC;AAC7D,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EACN,MAAM,EACN,6BAA6B,EAC7B,iCAAiC,EACjC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OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,SAAS;QACZ,OAAO,IAAI,CAAC,UAAW,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;CACD,CAAA;AAlZA;IADC,QAAQ,EAAE;sCACwB;AAiBnC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yDACmC;AAU9D;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2CACV;AASlB;IADC,QAAQ,EAAE;yCACM;AAOjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACb;AAUf;IADC,QAAQ,EAAE;2CACwB;AAQ3B;IADP,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0CACF;AAU1B;IADC,QAAQ,EAAE;gDAC8C;AAGzD;IADC,QAAQ,EAAE;gDACqC;AAWhD;IADC,IAAI,EAAE;8CACuB;AAavB;IADN,IAAI,CAAC,oBAAoB,CAAC;kCACG;AA7GhB,QAAQ;IA1BtB,aAAa,CAAC;QACd,aAAa,EAAE,IAAI;QACnB,MAAM,EAAE;YACP,YAAY,CAAC,MAAM;YACnB,yBAAyB;YACzB,MAAM;SACN;QACD,YAAY,EAAE;YACb,MAAM;YACN,WAAW;YACX,QAAQ;SACR;KACD,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,cAAc,EAAE;QACtB,OAAO,EAAE,IAAI;KACb,CAAC;IACD,KAAK,CAAC,UAAU,EAAE;QAClB,OAAO,EAAE,IAAI;KACb,CAAC;IACD,KAAK,CAAC,sBAAsB,EAAE;QAC9B,OAAO,EAAE,IAAI;KACb,CAAC;GACa,QAAQ,CA6ZtB;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport {\n\tisSpace, isEnter, isDelete, isF2,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\nimport { getFirstFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport type { AccessibilityAttributes, PassiveEventListenerObject } from \"@ui5/webcomponents-base/dist/types.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type AriaHasPopup from \"@ui5/webcomponents-base/dist/types/AriaHasPopup.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport \"@ui5/webcomponents-icons/dist/edit.js\";\nimport Highlight from \"./types/Highlight.js\";\nimport ListItemType from \"./types/ListItemType.js\";\nimport ListSelectionMode from \"./types/ListSelectionMode.js\";\nimport ListItemBase from \"./ListItemBase.js\";\nimport RadioButton from \"./RadioButton.js\";\nimport CheckBox from \"./CheckBox.js\";\nimport Button from \"./Button.js\";\nimport type { IButton } from \"./Button.js\";\nimport {\n\tDELETE,\n\tARIA_LABEL_LIST_ITEM_CHECKBOX,\n\tARIA_LABEL_LIST_ITEM_RADIO_BUTTON,\n\tLIST_ITEM_SELECTED,\n\tLIST_ITEM_NOT_SELECTED,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport type ListItemAccessibleRole from \"./types/ListItemAccessibleRole.js\";\n\n// Styles\nimport styles from \"./generated/themes/ListItem.css.js\";\nimport listItemAdditionalTextCss from \"./generated/themes/ListItemAdditionalText.css.js\";\n\n// Icons\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\n\ninterface IAccessibleListItem {\n\taccessibleName?: string;\n\taccessibleNameRef?: string;\n}\n\ntype SelectionRequestEventDetail = {\n\titem: ListItemBase,\n\tselectionComponentPressed: boolean,\n\tselected?: boolean,\n\tkey?: string,\n}\n\ntype AccInfo = {\n\trole?: string;\n\tariaExpanded?: boolean;\n\tariaLevel?: number;\n\tariaLabel: string;\n\tariaLabelRadioButton: string;\n\tariaSelectedText?: string;\n\tariaHaspopup?: `${Lowercase<AriaHasPopup>}`;\n\tposinset?: number;\n\tsetsize?: number;\n\tariaSelected?: boolean;\n\tariaChecked?: boolean;\n\tlistItemAriaLabel?: string;\n\tariaOwns?: string;\n\ttooltip?: string;\n\tariaKeyShortcuts?: string;\n}\n\ntype ListItemAccessibilityAttributes = Pick<AccessibilityAttributes, \"hasPopup\" | \"ariaSetsize\" | \"ariaPosinset\">;\n\n/**\n * @class\n * A class to serve as a base\n * for the `ListItemStandard` and `ListItemCustom` classes.\n * @constructor\n * @abstract\n * @extends ListItemBase\n * @public\n */\n@customElement({\n\tlanguageAware: true,\n\tstyles: [\n\t\tListItemBase.styles,\n\t\tlistItemAdditionalTextCss,\n\t\tstyles,\n\t],\n\tdependencies: [\n\t\tButton,\n\t\tRadioButton,\n\t\tCheckBox,\n\t],\n})\n/**\n * Fired when the user clicks on the detail button when type is `Detail`.\n * @public\n */\n@event(\"detail-click\", {\n\tbubbles: true,\n})\n@event(\"_focused\", {\n\tbubbles: true,\n})\n@event(\"_selection-requested\", {\n\tbubbles: true,\n})\nabstract class ListItem extends ListItemBase {\n\t/**\n\t * Defines the visual indication and behavior of the list items.\n\t * Available options are `Active` (by default), `Inactive`, `Detail` and `Navigation`.\n\t *\n\t * **Note:** When set to `Active` or `Navigation`, the item will provide visual response upon press and hover,\n\t * while with type `Inactive` and `Detail` - will not.\n\t * @default \"Active\"\n\t * @public\n\t*/\n\t@property()\n\ttype: `${ListItemType}` = \"Active\";\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 * - **ariaSetsize**: Defines the number of items in the current set when not all items in the set are present in the DOM.\n\t * **Note:** The value is an integer reflecting the number of items in the complete set. If the size of the entire set is unknown, set `-1`.\n\t *\n\t * \t- **ariaPosinset**: Defines an element's number or position in the current set when not all items are present in the DOM.\n\t * \t**Note:** The value is an integer greater than or equal to 1, and less than or equal to the size of the set when that size is known.\n\t *\n\t * @default {}\n\t * @public\n\t * @since 1.15.0\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes: ListItemAccessibilityAttributes = {};\n\n\t/**\n\t * The navigated state of the list item.\n\t * If set to `true`, a navigation indicator is displayed at the end of the list item.\n\t * @default false\n\t * @public\n\t * @since 1.10.0\n\t */\n\t@property({ type: Boolean })\n\tnavigated = false;\n\n\t/**\n\t * Defines the text of the tooltip that would be displayed for the list 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 * Indicates if the list item is active, e.g pressed down with the mouse or the keyboard keys.\n\t * @private\n\t*/\n\t@property({ type: Boolean })\n\tactive = false;\n\n\t/**\n\t * Defines the highlight state of the list items.\n\t * Available options are: `\"None\"` (by default), `\"Positive\"`, `\"Critical\"`, `\"Information\"` and `\"Negative\"`.\n\t * @default \"None\"\n\t * @public\n\t * @since 1.24\n\t */\n\t@property()\n\thighlight: `${Highlight}` = \"None\";\n\n\t/**\n\t * Defines the selected state of the component.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdeclare selected: boolean;\n\n\t/**\n\t * Used to define the role of the list item.\n\t * @private\n\t * @default \"ListItem\"\n\t * @since 1.3.0\n\t *\n\t */\n\t@property()\n\taccessibleRole: `${ListItemAccessibleRole}` = \"ListItem\";\n\n\t@property()\n\t_selectionMode: `${ListSelectionMode}` = \"None\";\n\n\t/**\n\t * Defines the delete button, displayed in \"Delete\" mode.\n\t * **Note:** While the slot allows custom buttons, to match\n\t * design guidelines, please use the `ui5-button` component.\n\t * **Note:** When the slot is not present, a built-in delete button will be displayed.\n\t * @since 1.9.0\n\t * @public\n\t*/\n\t@slot()\n\tdeleteButton!: Array<IButton>;\n\n\tdeactivateByKey: (e: KeyboardEvent) => void;\n\tdeactivate: () => void;\n\t_ontouchstart: PassiveEventListenerObject;\n\t// used in template, implemented in TreeItemBase, ListItemStandard\n\taccessibleName?: string;\n\t// used in ListItem template but implemented in TreeItemBase\n\tindeterminate?: boolean;\n\t// Used in UploadCollectionItem\n\tdisableDeleteButton?: boolean;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis.deactivateByKey = (e: KeyboardEvent) => {\n\t\t\tif (isEnter(e)) {\n\t\t\t\tthis.deactivate();\n\t\t\t}\n\t\t};\n\n\t\tthis.deactivate = () => {\n\t\t\tif (this.active) {\n\t\t\t\tthis.active = false;\n\t\t\t}\n\t\t};\n\n\t\tconst handleTouchStartEvent = () => {\n\t\t\tthis._onmousedown();\n\t\t};\n\n\t\tthis._ontouchstart = {\n\t\t\thandleEvent: handleTouchStartEvent,\n\t\t\tpassive: true,\n\t\t};\n\t}\n\n\tonBeforeRendering() {\n\t\tsuper.onBeforeRendering();\n\t\tthis.actionable = (this.type === ListItemType.Active || this.type === ListItemType.Navigation) && (this._selectionMode !== ListSelectionMode.Delete);\n\t}\n\n\tonEnterDOM() {\n\t\tsuper.onEnterDOM();\n\t\tdocument.addEventListener(\"mouseup\", this.deactivate);\n\t\tdocument.addEventListener(\"touchend\", this.deactivate);\n\t\tdocument.addEventListener(\"keyup\", this.deactivateByKey);\n\t}\n\n\tonExitDOM() {\n\t\tdocument.removeEventListener(\"mouseup\", this.deactivate);\n\t\tdocument.removeEventListener(\"keyup\", this.deactivateByKey);\n\t\tdocument.removeEventListener(\"touchend\", this.deactivate);\n\t}\n\n\tasync _onkeydown(e: KeyboardEvent) {\n\t\tif ((isSpace(e) || isEnter(e)) && this._isTargetSelfFocusDomRef(e)) {\n\t\t\treturn;\n\t\t}\n\n\t\tsuper._onkeydown(e);\n\n\t\tconst itemActive = this.type === ListItemType.Active,\n\t\t\titemNavigated = this.typeNavigation;\n\n\t\tif ((isSpace(e) || isEnter(e)) && (itemActive || itemNavigated)) {\n\t\t\tthis.activate();\n\t\t}\n\n\t\tif (isF2(e)) {\n\t\t\tconst activeElement = getActiveElement();\n\t\t\tconst focusDomRef = this.getFocusDomRef()!;\n\n\t\t\tif (activeElement === focusDomRef) {\n\t\t\t\tconst firstFocusable = await getFirstFocusableElement(focusDomRef);\n\t\t\t\tfirstFocusable?.focus();\n\t\t\t} else {\n\t\t\t\tfocusDomRef.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tsuper._onkeyup(e);\n\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tthis.deactivate();\n\t\t}\n\n\t\tif (this.modeDelete && isDelete(e)) {\n\t\t\tthis.onDelete();\n\t\t}\n\t}\n\n\t_onmousedown() {\n\t\tthis.activate();\n\t}\n\n\t_onmouseup() {\n\t\tif (this.getFocusDomRef()!.matches(\":has(:focus-within)\")) {\n\t\t\treturn;\n\t\t}\n\t\tthis.deactivate();\n\t}\n\n\t_ontouchend() {\n\t\tthis._onmouseup();\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tsuper._onfocusin(e);\n\n\t\tif (e.target !== this.getFocusDomRef()) {\n\t\t\tthis.deactivate();\n\t\t}\n\t}\n\n\t_onfocusout(e: FocusEvent) {\n\t\tif (e.target !== this.getFocusDomRef()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.deactivate();\n\t}\n\n\t_ondragstart(e: DragEvent) {\n\t\tif (!e.dataTransfer) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (e.target === this._listItem) {\n\t\t\tthis.setAttribute(\"data-moving\", \"\");\n\t\t\te.dataTransfer.dropEffect = \"move\";\n\t\t\te.dataTransfer.effectAllowed = \"move\";\n\t\t}\n\t}\n\n\t_ondragend(e: DragEvent) {\n\t\tif (e.target === this._listItem) {\n\t\t\tthis.removeAttribute(\"data-moving\");\n\t\t}\n\t}\n\n\t_isTargetSelfFocusDomRef(e: KeyboardEvent): boolean {\n\t\tconst target = e.target as HTMLElement,\n\t\t\tfocusDomRef = this.getFocusDomRef();\n\n\t\treturn target !== focusDomRef;\n\t}\n\n\t/**\n\t * Called when selection components in Single (ui5-radio-button)\n\t * and Multi (ui5-checkbox) selection modes are used.\n\t */\n\tonMultiSelectionComponentPress(e: MouseEvent) {\n\t\tif (this.isInactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fireDecoratorEvent<SelectionRequestEventDetail>(\"_selection-requested\", { item: this, selected: (e.target as CheckBox).checked, selectionComponentPressed: true });\n\t}\n\n\tonSingleSelectionComponentPress(e: MouseEvent) {\n\t\tif (this.isInactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fireDecoratorEvent<SelectionRequestEventDetail>(\"_selection-requested\", { item: this, selected: !(e.target as RadioButton).checked, selectionComponentPressed: true });\n\t}\n\n\tactivate() {\n\t\tif (this.type === ListItemType.Active || this.type === ListItemType.Navigation) {\n\t\t\tthis.active = true;\n\t\t}\n\t}\n\n\tonDelete() {\n\t\tthis.fireDecoratorEvent<SelectionRequestEventDetail>(\"_selection-requested\", { item: this, selectionComponentPressed: false });\n\t}\n\n\tonDetailClick() {\n\t\tthis.fireDecoratorEvent(\"detail-click\", { item: this, selected: this.selected });\n\t}\n\n\tfireItemPress(e: Event) {\n\t\tif (this.isInactive) {\n\t\t\treturn;\n\t\t}\n\t\tsuper.fireItemPress(e);\n\t}\n\n\tget isInactive() {\n\t\treturn this.type === ListItemType.Inactive || this.type === ListItemType.Detail;\n\t}\n\n\tget placeSelectionElementBefore() {\n\t\treturn this._selectionMode === ListSelectionMode.Multiple\n\t\t\t|| this._selectionMode === ListSelectionMode.SingleStart;\n\t}\n\n\tget placeSelectionElementAfter() {\n\t\treturn !this.placeSelectionElementBefore\n\t\t\t&& (this._selectionMode === ListSelectionMode.SingleEnd || this._selectionMode === ListSelectionMode.Delete);\n\t}\n\n\tget modeSingleSelect() {\n\t\treturn [\n\t\t\tListSelectionMode.SingleStart,\n\t\t\tListSelectionMode.SingleEnd,\n\t\t\tListSelectionMode.Single,\n\t\t].includes(this._selectionMode as ListSelectionMode);\n\t}\n\n\tget modeMultiple() {\n\t\treturn this._selectionMode === ListSelectionMode.Multiple;\n\t}\n\n\tget modeDelete() {\n\t\treturn this._selectionMode === ListSelectionMode.Delete;\n\t}\n\n\t/**\n\t * Used in UploadCollectionItem\n\t */\n\tget renderDeleteButton() {\n\t\treturn this.modeDelete;\n\t}\n\n\t/**\n\t * End\n\t */\n\n\tget typeDetail() {\n\t\treturn this.type === ListItemType.Detail;\n\t}\n\n\tget typeNavigation() {\n\t\treturn this.type === ListItemType.Navigation;\n\t}\n\n\tget typeActive() {\n\t\treturn this.type === ListItemType.Active;\n\t}\n\n\tget _ariaSelected() {\n\t\tif (this.modeMultiple || this.modeSingleSelect) {\n\t\t\treturn this.selected;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tget listItemAccessibleRole() {\n\t\treturn this.accessibleRole.toLowerCase();\n\t}\n\n\tget ariaSelectedText() {\n\t\tlet ariaSelectedText;\n\n\t\t// Selected state needs to be supported separately since now the role mapping is list -> listitem[]\n\t\t// to avoid the issue of nesting interactive elements, ex. (option -> radio/checkbox);\n\t\t// The text is added to aria-describedby because as part of the aria-labelledby\n\t\t// the whole content of the item is readout when the aria-labelledby value is changed.\n\t\tif (this._ariaSelected !== undefined) {\n\t\t\tariaSelectedText = this._ariaSelected ? ListItem.i18nBundle.getText(LIST_ITEM_SELECTED) : ListItem.i18nBundle.getText(LIST_ITEM_NOT_SELECTED);\n\t\t}\n\n\t\treturn ariaSelectedText;\n\t}\n\n\tget deleteText() {\n\t\treturn ListItem.i18nBundle.getText(DELETE);\n\t}\n\n\tget hasDeleteButtonSlot() {\n\t\treturn !!this.deleteButton.length;\n\t}\n\n\tget _accessibleNameRef(): string {\n\t\tif ((this as IAccessibleListItem).accessibleName) {\n\t\t\t// accessibleName is set - return labels excluding content\n\t\t\treturn `${this._id}-invisibleText`;\n\t\t}\n\n\t\t// accessibleName is not set - return _accInfo.listItemAriaLabel including content\n\t\treturn `${this._id}-content ${this._id}-invisibleText`;\n\t}\n\n\tget _accInfo(): AccInfo {\n\t\treturn {\n\t\t\trole: this.listItemAccessibleRole,\n\t\t\tariaExpanded: undefined,\n\t\t\tariaLevel: undefined,\n\t\t\tariaLabel: ListItem.i18nBundle.getText(ARIA_LABEL_LIST_ITEM_CHECKBOX),\n\t\t\tariaLabelRadioButton: ListItem.i18nBundle.getText(ARIA_LABEL_LIST_ITEM_RADIO_BUTTON),\n\t\t\tariaSelectedText: this.ariaSelectedText,\n\t\t\tariaHaspopup: this.accessibilityAttributes.hasPopup,\n\t\t\tsetsize: this.accessibilityAttributes.ariaSetsize,\n\t\t\tposinset: this.accessibilityAttributes.ariaPosinset,\n\t\t\ttooltip: this.tooltip,\n\t\t};\n\t}\n\n\tget _hasHighlightColor() {\n\t\treturn this.highlight !== Highlight.None;\n\t}\n\n\tget hasConfigurableMode() {\n\t\treturn true;\n\t}\n\n\tget _listItem() {\n\t\treturn this.shadowRoot!.querySelector(\"li\");\n\t}\n}\n\nexport default ListItem;\nexport type {\n\tIAccessibleListItem,\n\tSelectionRequestEventDetail,\n\tListItemAccessibilityAttributes,\n};\n"]}
|
package/dist/ListItemBase.js
CHANGED
|
@@ -13,7 +13,6 @@ import { getTabbableElements } from "@ui5/webcomponents-base/dist/util/TabbableE
|
|
|
13
13
|
import { isDesktop } from "@ui5/webcomponents-base/dist/Device.js";
|
|
14
14
|
import { isEnter, isSpace, isTabNext, isTabPrevious, } from "@ui5/webcomponents-base/dist/Keys.js";
|
|
15
15
|
import getActiveElement from "@ui5/webcomponents-base/dist/util/getActiveElement.js";
|
|
16
|
-
import { getEventMark } from "@ui5/webcomponents-base/dist/MarkedEvents.js";
|
|
17
16
|
// Styles
|
|
18
17
|
import styles from "./generated/themes/ListItemBase.css.js";
|
|
19
18
|
import draggableElementStyles from "./generated/themes/DraggableElement.css.js";
|
|
@@ -89,7 +88,7 @@ let ListItemBase = class ListItemBase extends UI5Element {
|
|
|
89
88
|
if (isTabPrevious(e)) {
|
|
90
89
|
return this._handleTabPrevious(e);
|
|
91
90
|
}
|
|
92
|
-
if (
|
|
91
|
+
if (this.getFocusDomRef().matches(":has(:focus-within)")) {
|
|
93
92
|
return;
|
|
94
93
|
}
|
|
95
94
|
if (isSpace(e)) {
|
|
@@ -100,7 +99,7 @@ let ListItemBase = class ListItemBase extends UI5Element {
|
|
|
100
99
|
}
|
|
101
100
|
}
|
|
102
101
|
_onkeyup(e) {
|
|
103
|
-
if (
|
|
102
|
+
if (this.getFocusDomRef().matches(":has(:focus-within)")) {
|
|
104
103
|
return;
|
|
105
104
|
}
|
|
106
105
|
if (isSpace(e)) {
|
|
@@ -108,7 +107,7 @@ let ListItemBase = class ListItemBase extends UI5Element {
|
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
109
|
_onclick(e) {
|
|
111
|
-
if (
|
|
110
|
+
if (this.getFocusDomRef().matches(":has(:focus-within)")) {
|
|
112
111
|
return;
|
|
113
112
|
}
|
|
114
113
|
this.fireItemPress(e);
|
package/dist/ListItemBase.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemBase.js","sourceRoot":"","sources":["../src/ListItemBase.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AAGrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,aAAa,GACb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AACrF,OAAO,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QACV,CAAC;QACD,OAAO,IAAI,CAAC,cAAc,CAAC;IAC5B,CAAC;CACD,CAAA;AApLA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CACX;AASjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CACZ;AAOhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CACV;AAGlB;IADC,QAAQ,EAAE;oDACa;AAWxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CACX;AAOjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CACZ;AAOhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDACT;AAnDd,YAAY;IApBjB,aAAa,CAAC;QACd,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,CAAC,MAAM,EAAE,sBAAsB,CAAC;KACxC,CAAC;IACD,KAAK,CAAC,0BAA0B,EAAE;QAClC,OAAO,EAAE,IAAI;KACb,CAAC;IACD,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;IACD,KAAK,CAAC,UAAU,EAAE;QAClB,OAAO,EAAE,IAAI;KACb,CAAC;IACD,KAAK,CAAC,gBAAgB,EAAE;QACxB,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;KAChB,CAAC;IACD,KAAK,CAAC,iBAAiB,EAAE;QACzB,OAAO,EAAE,IAAI;KACb,CAAC;GACI,YAAY,CA2LjB;AAED,eAAe,YAAY,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type { ClassMap } from \"@ui5/webcomponents-base/dist/types.js\";\nimport { getTabbableElements } from \"@ui5/webcomponents-base/dist/util/TabbableElements.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport {\n\tisEnter,\n\tisSpace,\n\tisTabNext,\n\tisTabPrevious,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\nimport { getEventMark } from \"@ui5/webcomponents-base/dist/MarkedEvents.js\";\n\n// Styles\nimport styles from \"./generated/themes/ListItemBase.css.js\";\nimport draggableElementStyles from \"./generated/themes/DraggableElement.css.js\";\n\ntype ListItemBasePressEventDetail = {\n\titem: ListItemBase,\n\tselected: boolean,\n\tkey: string,\n}\n\n/**\n * @class\n * A class to serve as a foundation\n * for the `ListItem` and `ListItemGroupHeader` classes.\n * @constructor\n * @abstract\n * @extends UI5Element\n * @public\n */\n@customElement({\n\trenderer: litRender,\n\tstyles: [styles, draggableElementStyles],\n})\n@event(\"_request-tabindex-change\", {\n\tbubbles: true,\n})\n@event(\"_press\", {\n\tbubbles: true,\n})\n@event(\"_focused\", {\n\tbubbles: true,\n})\n@event(\"_forward-after\", {\n\tbubbles: true,\n\tcancelable: true,\n})\n@event(\"_forward-before\", {\n\tbubbles: true,\n})\nclass ListItemBase extends UI5Element implements ITabbable {\n\t/**\n\t * Defines the selected state of the component.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tselected = false;\n\n\t/**\n\t * Defines whether the item is movable.\n\t * @default false\n\t * @private\n\t * @since 2.0.0\n\t */\n\t@property({ type: Boolean })\n\tmovable = false;\n\n\t/**\n\t* Defines if the list item should display its bottom border.\n\t* @private\n\t*/\n\t@property({ type: Boolean })\n\thasBorder = false;\n\n\t@property()\n\tforcedTabIndex?: string;\n\n\t/**\n\t* Defines whether `ui5-li` is in disabled state.\n\t*\n\t* **Note:** A disabled `ui5-li` is noninteractive.\n\t* @default false\n\t* @protected\n\t* @since 1.0.0-rc.12\n\t*/\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Indicates if the element is on focus\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused = false;\n\n\t/**\n\t * Indicates if the list item is actionable, e.g has hover and pressed effects.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactionable = false;\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\t}\n\n\tonBeforeRendering(): void {\n\t\tthis.actionable = true;\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tthis.fireDecoratorEvent(\"_request-tabindex-change\", e);\n\t\tif (e.target !== this.getFocusDomRef()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"_focused\", e);\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isTabNext(e)) {\n\t\t\treturn this._handleTabNext(e);\n\t\t}\n\n\t\tif (isTabPrevious(e)) {\n\t\t\treturn this._handleTabPrevious(e);\n\t\t}\n\n\t\tif (getEventMark(e) === \"button\") {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.fireItemPress(e);\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (getEventMark(e) === \"button\") {\n\t\t\treturn;\n\t\t}\n\t\tif (isSpace(e)) {\n\t\t\tthis.fireItemPress(e);\n\t\t}\n\t}\n\n\t_onclick(e: MouseEvent) {\n\t\tif (getEventMark(e) === \"button\") {\n\t\t\treturn;\n\t\t}\n\t\tthis.fireItemPress(e);\n\t}\n\n\tfireItemPress(e: Event) {\n\t\tif (this.disabled || !this._pressable) {\n\t\t\treturn;\n\t\t}\n\t\tif (isEnter(e as KeyboardEvent)) {\n\t\t\te.preventDefault();\n\t\t}\n\t\tthis.fireDecoratorEvent<ListItemBasePressEventDetail>(\"_press\", { item: this, selected: this.selected, key: (e as KeyboardEvent).key });\n\t}\n\n\t_handleTabNext(e: KeyboardEvent) {\n\t\tif (this.shouldForwardTabAfter()) {\n\t\t\tif (!this.fireDecoratorEvent(\"_forward-after\")) {\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\n\t_handleTabPrevious(e: KeyboardEvent) {\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (this.shouldForwardTabBefore(target)) {\n\t\t\tthis.fireDecoratorEvent(\"_forward-before\");\n\t\t}\n\t}\n\n\t/**\n\t * Determines if th current list item either has no tabbable content or\n\t * [Tab] is performed onto the last tabbale content item.\n\t */\n\tshouldForwardTabAfter() {\n\t\tconst aContent = getTabbableElements(this.getFocusDomRef()!);\n\n\t\treturn aContent.length === 0 || (aContent[aContent.length - 1] === getActiveElement());\n\t}\n\n\t/**\n\t * Determines if the current list item is target of [SHIFT+TAB].\n\t */\n\tshouldForwardTabBefore(target: HTMLElement) {\n\t\treturn this.getFocusDomRef() === target;\n\t}\n\n\tget classes(): ClassMap {\n\t\treturn {\n\t\t\tmain: {\n\t\t\t\t\"ui5-li-root\": true,\n\t\t\t\t\"ui5-li--focusable\": this._focusable,\n\t\t\t},\n\t\t};\n\t}\n\n\tget _ariaDisabled() {\n\t\treturn this.disabled ? true : undefined;\n\t}\n\n\tget _focusable() {\n\t\treturn !this.disabled;\n\t}\n\n\tget _pressable() {\n\t\treturn true;\n\t}\n\n\tget hasConfigurableMode() {\n\t\treturn false;\n\t}\n\n\tget _effectiveTabIndex() {\n\t\tif (!this._focusable) {\n\t\t\treturn -1;\n\t\t}\n\t\tif (this.selected) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn this.forcedTabIndex;\n\t}\n}\n\nexport default ListItemBase;\n\nexport type {\n\tListItemBasePressEventDetail,\n};\n"]}
|
|
1
|
+
{"version":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AAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;IACD,KAAK,CAAC,UAAU,EAAE;QAClB,OAAO,EAAE,IAAI;KACb,CAAC;IACD,KAAK,CAAC,gBAAgB,EAAE;QACxB,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;KAChB,CAAC;IACD,KAAK,CAAC,iBAAiB,EAAE;QACzB,OAAO,EAAE,IAAI;KACb,CAAC;GACI,YAAY,CA4LjB;AAED,eAAe,YAAY,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type { ClassMap } from \"@ui5/webcomponents-base/dist/types.js\";\nimport { getTabbableElements } from \"@ui5/webcomponents-base/dist/util/TabbableElements.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport {\n\tisEnter,\n\tisSpace,\n\tisTabNext,\n\tisTabPrevious,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\n\n// Styles\nimport styles from \"./generated/themes/ListItemBase.css.js\";\nimport draggableElementStyles from \"./generated/themes/DraggableElement.css.js\";\n\ntype ListItemBasePressEventDetail = {\n\titem: ListItemBase,\n\tselected: boolean,\n\tkey: string,\n}\n\n/**\n * @class\n * A class to serve as a foundation\n * for the `ListItem` and `ListItemGroupHeader` classes.\n * @constructor\n * @abstract\n * @extends UI5Element\n * @public\n */\n@customElement({\n\trenderer: litRender,\n\tstyles: [styles, draggableElementStyles],\n})\n@event(\"_request-tabindex-change\", {\n\tbubbles: true,\n})\n@event(\"_press\", {\n\tbubbles: true,\n})\n@event(\"_focused\", {\n\tbubbles: true,\n})\n@event(\"_forward-after\", {\n\tbubbles: true,\n\tcancelable: true,\n})\n@event(\"_forward-before\", {\n\tbubbles: true,\n})\nclass ListItemBase extends UI5Element implements ITabbable {\n\t/**\n\t * Defines the selected state of the component.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tselected = false;\n\n\t/**\n\t * Defines whether the item is movable.\n\t * @default false\n\t * @private\n\t * @since 2.0.0\n\t */\n\t@property({ type: Boolean })\n\tmovable = false;\n\n\t/**\n\t* Defines if the list item should display its bottom border.\n\t* @private\n\t*/\n\t@property({ type: Boolean })\n\thasBorder = false;\n\n\t@property()\n\tforcedTabIndex?: string;\n\n\t/**\n\t* Defines whether `ui5-li` is in disabled state.\n\t*\n\t* **Note:** A disabled `ui5-li` is noninteractive.\n\t* @default false\n\t* @protected\n\t* @since 1.0.0-rc.12\n\t*/\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Indicates if the element is on focus\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused = false;\n\n\t/**\n\t * Indicates if the list item is actionable, e.g has hover and pressed effects.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactionable = false;\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\t}\n\n\tonBeforeRendering(): void {\n\t\tthis.actionable = true;\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tthis.fireDecoratorEvent(\"_request-tabindex-change\", e);\n\t\tif (e.target !== this.getFocusDomRef()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"_focused\", e);\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isTabNext(e)) {\n\t\t\treturn this._handleTabNext(e);\n\t\t}\n\n\t\tif (isTabPrevious(e)) {\n\t\t\treturn this._handleTabPrevious(e);\n\t\t}\n\n\t\tif (this.getFocusDomRef()!.matches(\":has(:focus-within)\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.fireItemPress(e);\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this.getFocusDomRef()!.matches(\":has(:focus-within)\")) {\n\t\t\treturn;\n\t\t}\n\t\tif (isSpace(e)) {\n\t\t\tthis.fireItemPress(e);\n\t\t}\n\t}\n\n\t_onclick(e: MouseEvent) {\n\t\tif (this.getFocusDomRef()!.matches(\":has(:focus-within)\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fireItemPress(e);\n\t}\n\n\tfireItemPress(e: Event) {\n\t\tif (this.disabled || !this._pressable) {\n\t\t\treturn;\n\t\t}\n\t\tif (isEnter(e as KeyboardEvent)) {\n\t\t\te.preventDefault();\n\t\t}\n\t\tthis.fireDecoratorEvent<ListItemBasePressEventDetail>(\"_press\", { item: this, selected: this.selected, key: (e as KeyboardEvent).key });\n\t}\n\n\t_handleTabNext(e: KeyboardEvent) {\n\t\tif (this.shouldForwardTabAfter()) {\n\t\t\tif (!this.fireDecoratorEvent(\"_forward-after\")) {\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\n\t_handleTabPrevious(e: KeyboardEvent) {\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (this.shouldForwardTabBefore(target)) {\n\t\t\tthis.fireDecoratorEvent(\"_forward-before\");\n\t\t}\n\t}\n\n\t/**\n\t * Determines if th current list item either has no tabbable content or\n\t * [Tab] is performed onto the last tabbale content item.\n\t */\n\tshouldForwardTabAfter() {\n\t\tconst aContent = getTabbableElements(this.getFocusDomRef()!);\n\n\t\treturn aContent.length === 0 || (aContent[aContent.length - 1] === getActiveElement());\n\t}\n\n\t/**\n\t * Determines if the current list item is target of [SHIFT+TAB].\n\t */\n\tshouldForwardTabBefore(target: HTMLElement) {\n\t\treturn this.getFocusDomRef() === target;\n\t}\n\n\tget classes(): ClassMap {\n\t\treturn {\n\t\t\tmain: {\n\t\t\t\t\"ui5-li-root\": true,\n\t\t\t\t\"ui5-li--focusable\": this._focusable,\n\t\t\t},\n\t\t};\n\t}\n\n\tget _ariaDisabled() {\n\t\treturn this.disabled ? true : undefined;\n\t}\n\n\tget _focusable() {\n\t\treturn !this.disabled;\n\t}\n\n\tget _pressable() {\n\t\treturn true;\n\t}\n\n\tget hasConfigurableMode() {\n\t\treturn false;\n\t}\n\n\tget _effectiveTabIndex() {\n\t\tif (!this._focusable) {\n\t\t\treturn -1;\n\t\t}\n\t\tif (this.selected) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn this.forcedTabIndex;\n\t}\n}\n\nexport default ListItemBase;\n\nexport type {\n\tListItemBasePressEventDetail,\n};\n"]}
|
package/dist/SliderBase.d.ts
CHANGED
|
@@ -285,8 +285,7 @@ declare abstract class SliderBase extends UI5Element {
|
|
|
285
285
|
*/
|
|
286
286
|
_createLabels(): void;
|
|
287
287
|
_handleActionKeyPressBase(e: KeyboardEvent, affectedPropName: string): number;
|
|
288
|
-
static
|
|
289
|
-
static _isIncreaseValueAction(e: KeyboardEvent): boolean;
|
|
288
|
+
static _isIncreaseValueAction(e: KeyboardEvent, directionStart: DirectionStart): boolean;
|
|
290
289
|
static _isBigStepAction(e: KeyboardEvent): boolean;
|
|
291
290
|
get _tickmarksCount(): number;
|
|
292
291
|
/**
|
package/dist/SliderBase.js
CHANGED
|
@@ -534,14 +534,12 @@ class SliderBase extends UI5Element {
|
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
_handleActionKeyPressBase(e, affectedPropName) {
|
|
537
|
-
const isUpAction = SliderBase_1._isIncreaseValueAction(e);
|
|
537
|
+
const isUpAction = SliderBase_1._isIncreaseValueAction(e, this.directionStart);
|
|
538
538
|
const isBigStep = SliderBase_1._isBigStepAction(e);
|
|
539
539
|
const currentValue = this[affectedPropName];
|
|
540
540
|
const min = this._effectiveMin;
|
|
541
541
|
const max = this._effectiveMax;
|
|
542
|
-
|
|
543
|
-
// While in ltr, the left arrow key decreases the value, in rtl it should actually increase it.
|
|
544
|
-
let step = this.effectiveDir === "rtl" ? -this._effectiveStep : this._effectiveStep;
|
|
542
|
+
let step = this._effectiveStep;
|
|
545
543
|
// If the action key corresponds to a long step and the slider has more than 10 normal steps,
|
|
546
544
|
// make a jump of 1/10th of the Slider's length, otherwise just use the normal step property.
|
|
547
545
|
step = isBigStep && ((max - min) / step > 10) ? (max - min) / 10 : step;
|
|
@@ -553,10 +551,10 @@ class SliderBase extends UI5Element {
|
|
|
553
551
|
}
|
|
554
552
|
return isUpAction ? step : step * -1;
|
|
555
553
|
}
|
|
556
|
-
static
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
554
|
+
static _isIncreaseValueAction(e, directionStart) {
|
|
555
|
+
if (directionStart === "right") {
|
|
556
|
+
return isUp(e) || isUpCtrl(e) || isLeft(e) || isLeftCtrl(e) || isPlus(e) || isPageUp(e);
|
|
557
|
+
}
|
|
560
558
|
return isUp(e) || isUpCtrl(e) || isRight(e) || isRightCtrl(e) || isPlus(e) || isPageUp(e);
|
|
561
559
|
}
|
|
562
560
|
static _isBigStepAction(e) {
|
package/dist/SliderBase.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderBase.js","sourceRoot":"","sources":["../src/SliderBase.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,aAAa,MAAM,wDAAwD,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAGhF,OAAO,mDAAmD,CAAC;AAC3D,OAAO,EACN,QAAQ,EAAE,MAAM,EAAE,KAAK,EA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,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACnB;AAQR;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACjB;AAWV;IADC,QAAQ,EAAE;wCACG;AAUd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCAClB;AAYT;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDACT;AAUlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDACN;AAQtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CACR;AAYpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;mDACJ;AAQxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CACX;AASjB;IADC,QAAQ,EAAE;kDACa;AAMxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACjB;AAMV;IADC,QAAQ,EAAE;sDACmB;AAG9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDACD;AAG3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oDACH;AAGzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDACD;AApHb,UAAU;IApBxB,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;IAEF;;;;;;;OAOG;GACY,UAAU,CA8vBxB;AAED,eAAe,UAAU,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { isPhone, supportsTouch } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { PassiveEventListenerObject } from \"@ui5/webcomponents-base/dist/types.js\";\nimport \"@ui5/webcomponents-icons/dist/direction-arrows.js\";\nimport {\n\tisEscape, isHome, isEnd, isUp, isDown, isRight, isLeft, isUpCtrl, isDownCtrl, isRightCtrl, isLeftCtrl, isPlus, isMinus, isPageUp, isPageDown, isF2,\n\tisEnter,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\n\n// Styles\nimport sliderBaseStyles from \"./generated/themes/SliderBase.css.js\";\n\ntype StateStorage = {\n\t[key: string]: number | undefined,\n}\n\ntype DirectionStart = \"left\" | \"right\";\n\n/**\n * Fired when the value changes and the user has finished interacting with the slider.\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when the value changes due to user interaction that is not yet finished - during mouse/touch dragging.\n * @public\n */\n@event(\"input\", {\n\tbubbles: true,\n})\n\n/**\n * @class\n *\n * ### Overview\n * @constructor\n * @extends UI5Element\n * @public\n */\nabstract class SliderBase extends UI5Element {\n\t/**\n\t * Defines the minimum value of the slider.\n\t * @default 0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmin = 0;\n\n\t/**\n\t * Defines the maximum value of the slider.\n\t * @default 100\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmax = 100;\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines the size of the slider's selection intervals (e.g. min = 0, max = 10, step = 5 would result in possible selection of the values 0, 5, 10).\n\t *\n\t * **Note:** If set to 0 the slider handle movement is disabled. When negative number or value other than a number, the component fallbacks to its default value.\n\t * @default 1\n\t * @public\n\t */\n\t@property({ type: Number })\n\tstep = 1;\n\n\t/**\n\t * Displays a label with a value on every N-th step.\n\t *\n\t * **Note:** The step and tickmarks properties must be enabled.\n\t * Example - if the step value is set to 2 and the label interval is also specified to 2 - then every second\n\t * tickmark will be labelled, which means every 4th value number.\n\t * @default 0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tlabelInterval = 0;\n\n\t/**\n\t * Enables tickmarks visualization for each step.\n\t *\n\t * **Note:** The step must be a positive number.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTickmarks = false;\n\n\t/**\n\t * Enables handle tooltip displaying the current value.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTooltip = false;\n\n\t/**\n\t *\n\t * Indicates whether input fields should be used as tooltips for the handles.\n\t *\n\t * **Note:** Setting this option to true will only work if showTooltip is set to true.\n\t * **Note:** In order for the component to comply with the accessibility standard, it is recommended to set the editableTooltip property to true.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\teditableTooltip = false;\n\n\t/**\n\t * Defines whether the slider is in disabled state.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.4.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\tvalue = 0;\n\n\t/**\n\t * @private\n\t */\n\t@property()\n\t_tooltipVisibility = \"hidden\";\n\n\t@property({ type: Boolean })\n\t_labelsOverlapping = false;\n\n\t@property({ type: Boolean })\n\t_hiddenTickmarks = false;\n\n\t@property({ type: Boolean })\n\t_isInputValueValid = false;\n\n\t_resizeHandler: ResizeObserverCallback;\n\t_moveHandler: (e: TouchEvent | MouseEvent) => void;\n\t_upHandler: (e: TouchEvent | MouseEvent) => void;\n\t_stateStorage: StateStorage;\n\t_ontouchstart: PassiveEventListenerObject;\n\tnotResized = false;\n\t_isUserInteraction = false;\n\t_isInnerElementFocusing = false;\n\t_oldNumberOfLabels?: number;\n\t_oldMin?: number;\n\t_oldMax?: number;\n\t_labelWidth = 0;\n\t_labelValues?: Array<string>;\n\t_valueOnInteractionStart?: number;\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._resizeHandler = this._handleResize.bind(this);\n\t\tthis._moveHandler = this._handleMove.bind(this);\n\t\tthis._upHandler = this._handleUp.bind(this);\n\n\t\tthis._stateStorage = {\n\t\t\tstep: undefined,\n\t\t\tmin: undefined,\n\t\t\tmax: undefined,\n\t\t\tlabelInterval: undefined,\n\t\t};\n\n\t\tconst handleTouchStartEvent = (e: TouchEvent) => {\n\t\t\tthis._onmousedown(e);\n\t\t};\n\n\t\tthis._ontouchstart = {\n\t\t\thandleEvent: handleTouchStartEvent,\n\t\t\tpassive: true,\n\t\t};\n\t}\n\n\t_handleMove(e: TouchEvent | MouseEvent) {} // eslint-disable-line\n\n\t_handleUp(e: TouchEvent | MouseEvent) {}\t// eslint-disable-line\n\n\t_onmousedown(e: TouchEvent | MouseEvent) {} // eslint-disable-line\n\n\t_handleActionKeyPress(e: Event) {} // eslint-disable-line\n\n\t_updateInputValue() {}\n\n\t// used in base template, but implemented in subclasses\n\tabstract styles: {\n\t\tlabel: object,\n\t\tlabelContainer: object,\n\t};\n\n\tabstract tickmarksObject: any;\n\tabstract _ariaLabelledByText: string;\n\n\tstatic get ACTION_KEYS() {\n\t\treturn [\n\t\t\tisLeft,\n\t\t\tisRight,\n\t\t\tisUp,\n\t\t\tisDown,\n\t\t\tisLeftCtrl,\n\t\t\tisRightCtrl,\n\t\t\tisUpCtrl,\n\t\t\tisDownCtrl,\n\t\t\tisPlus,\n\t\t\tisMinus,\n\t\t\tisHome,\n\t\t\tisEnd,\n\t\t\tisPageUp,\n\t\t\tisPageDown,\n\t\t\tisEscape,\n\t\t];\n\t}\n\n\tstatic get MIN_SPACE_BETWEEN_TICKMARKS() {\n\t\treturn 8;\n\t}\n\n\tstatic get TOOLTIP_VISIBILITY() {\n\t\treturn {\n\t\t\tVISIBLE: \"visible\",\n\t\t\tHIDDEN: \"hidden\",\n\t\t};\n\t}\n\n\tstatic get renderer() {\n\t\treturn litRender;\n\t}\n\n\tstatic get styles() {\n\t\treturn sliderBaseStyles;\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"ui5-slider-root-phone\": isPhone(),\n\t\t\t},\n\t\t\tlabelContainer: {\n\t\t\t\t\"ui5-slider-hidden-labels\": this._labelsOverlapping,\n\t\t\t},\n\t\t};\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._resizeHandler);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._resizeHandler);\n\t}\n\n\tonAfterRendering() {\n\t\t// Only call if the resize is triggered by a state changes other than\n\t\t// the ones that occured on the previous resize and those caused by user interaction.\n\t\tif (this.notResized) {\n\t\t\tthis._resizeHandler();\n\t\t}\n\t}\n\n\t/** Shows the tooltip(s) if the `showTooltip` property is set to true\n\t * @private\n\t */\n\t_onmouseover() {\n\t\tif (this.showTooltip) {\n\t\t\tthis._tooltipVisibility = SliderBase.TOOLTIP_VISIBILITY.VISIBLE;\n\t\t}\n\t}\n\n\t/**\n\t * Hides the tooltip(s) if the `showTooltip` property is set to true\n\t * @private\n\t */\n\t_onmouseout() {\n\t\tif (this.showTooltip && !this.shadowRoot!.activeElement) {\n\t\t\tthis._tooltipVisibility = SliderBase.TOOLTIP_VISIBILITY.HIDDEN;\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (isF2(e) && target.classList.contains(\"ui5-slider-handle\")) {\n\t\t\t(target.parentNode!.querySelector(\".ui5-slider-handle-container ui5-input\") as HTMLElement).focus();\n\t\t}\n\n\t\tif (this.disabled || this._effectiveStep === 0 || target.hasAttribute(\"ui5-slider-handle\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (SliderBase._isActionKey(e) && target && !target.hasAttribute(\"ui5-input\")) {\n\t\t\te.preventDefault();\n\n\t\t\tthis._isUserInteraction = true;\n\t\t\tthis._handleActionKeyPress(e);\n\t\t}\n\t}\n\n\t_onInputKeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (isF2(e) && target.hasAttribute(\"ui5-input\")) {\n\t\t\t(target.parentNode!.parentNode!.querySelector(\".ui5-slider-handle\") as HTMLElement).focus();\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._updateInputValue();\n\t\t\tthis._updateValueFromInput(e);\n\t\t}\n\t}\n\n\t_onInputChange() {\n\t\tif (this._valueOnInteractionStart !== this.value) {\n\t\t\tthis.fireEvent(\"change\");\n\t\t}\n\t}\n\n\t_onInputInput() {\n\t\tthis.fireEvent(\"input\");\n\t}\n\n\t_updateValueFromInput(e: Event) {\n\t\tconst input = e.target as HTMLInputElement;\n\t\tconst value = parseFloat(input.value);\n\t\tthis._isInputValueValid = value >= this._effectiveMin && value <= this._effectiveMax;\n\n\t\tif (!this._isInputValueValid) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.value = value;\n\t}\n\n\t_onKeyupBase() {\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isUserInteraction = false;\n\t}\n\n\t/**\n\t * Flags if an inner element is currently being focused\n\t * @private\n\t */\n\t_preserveFocus(isFocusing: boolean) {\n\t\tthis._isInnerElementFocusing = isFocusing;\n\t}\n\n\t/**\n\t * Return if an inside element within the component is currently being focused\n\t * @private\n\t */\n\t_isFocusing() {\n\t\treturn this._isInnerElementFocusing;\n\t}\n\n\t/**\n\t * Prevent focus out when inner element within the component is currently being in process of focusing in.\n\t * @private\n\t */\n\t_preventFocusOut() {\n\t\tthis.focusInnerElement();\n\t}\n\n\t/**\n\t * Manages the focus between the component's inner elements\n\t * @protected\n\t */\n\tfocusInnerElement() {\n\t\tthis.focus();\n\t}\n\n\t/**\n\t * Handle the responsiveness of the Slider's UI elements when resizing\n\t * @private\n\t */\n\t_handleResize() {\n\t\tif (!this.showTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Mark resizing to avoid unneccessary calls to that function after rendering\n\t\tthis.notResized = false;\n\n\t\t// Convert the string represented calculation expression to a normal one\n\t\t// Check the distance in pixels exist between every tickmark\n\t\tconst spaceBetweenTickmarks = this._spaceBetweenTickmarks();\n\n\t\t// If the pixels between the tickmarks are less than 8 only the first and the last one should be visible\n\t\t// In such case the labels must correspond to the tickmarks, only the first and the last one should exist.\n\t\tif (spaceBetweenTickmarks < SliderBase.MIN_SPACE_BETWEEN_TICKMARKS) {\n\t\t\tthis._hiddenTickmarks = true;\n\t\t\tthis._labelsOverlapping = true;\n\t\t} else {\n\t\t\tthis._hiddenTickmarks = false;\n\t\t}\n\n\t\tif (this.labelInterval <= 0 || this._hiddenTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if there are any overlapping labels.\n\t\t// If so - only the first and the last one should be visible\n\t\tconst labelItems = this.shadowRoot!.querySelectorAll(\".ui5-slider-labels li\");\n\t\tthis._labelsOverlapping = [...labelItems].some(label => label.scrollWidth > label.clientWidth);\n\t}\n\n\t/**\n\t * Called when the user starts interacting with the slider.\n\t * After a down event on the slider root, listen for move events on window, so the slider value\n\t * is updated even if the user drags the pointer outside the slider root.\n\t * @protected\n\t */\n\thandleDownBase(e: TouchEvent | MouseEvent) {\n\t\tconst min = this._effectiveMin;\n\t\tconst max = this._effectiveMax;\n\t\tconst domRect = this.getBoundingClientRect();\n\t\tconst directionStart = this.directionStart;\n\t\tconst step = this._effectiveStep;\n\t\tconst newValue = SliderBase.getValueFromInteraction(e, step, min, max, domRect, directionStart);\n\n\t\t// Mark start of a user interaction\n\t\tthis._isUserInteraction = true;\n\n\t\twindow.addEventListener(\"mouseup\", this._upHandler);\n\t\twindow.addEventListener(\"touchend\", this._upHandler);\n\t\t// Only allow one type of move event to be listened to (the first one registered after the down event)\n\t\tif (supportsTouch() && e instanceof TouchEvent) {\n\t\t\twindow.addEventListener(\"touchmove\", this._moveHandler);\n\t\t} else {\n\t\t\twindow.addEventListener(\"mousemove\", this._moveHandler);\n\t\t}\n\n\t\tthis._handleFocusOnMouseDown(e);\n\t\treturn newValue;\n\t}\n\n\t/**\n\t * Forward the focus to an inner inner part within the component on press\n\t * @private\n\t */\n\t_handleFocusOnMouseDown(e: TouchEvent | MouseEvent) {\n\t\tconst currentlyFocusedElement = this.shadowRoot!.activeElement;\n\t\tconst elementToBeFocused = e.target as HTMLElement;\n\n\t\tif ((!currentlyFocusedElement || currentlyFocusedElement !== elementToBeFocused) && !elementToBeFocused.hasAttribute(\"ui5-input\")) {\n\t\t\tthis._preserveFocus(true);\n\t\t\tthis.focusInnerElement();\n\t\t}\n\t}\n\n\t/**\n\t * Called when the user finish interacting with the slider\n\t * Fires an `change` event indicating a final value change, after user interaction is finished.\n\t * @protected\n\t */\n\thandleUpBase() {\n\t\twindow.removeEventListener(\"mouseup\", this._upHandler);\n\t\twindow.removeEventListener(\"touchend\", this._upHandler);\n\t\t// Only one of the following was attached, but it's ok to remove both as there is no error\n\t\twindow.removeEventListener(\"mousemove\", this._moveHandler);\n\t\twindow.removeEventListener(\"touchmove\", this._moveHandler);\n\n\t\tthis._isUserInteraction = false;\n\t\tthis._preserveFocus(false);\n\t}\n\n\t/**\n\t * Updates state storage for the value-related property\n\t * Fires an `input` event indicating a value change via interaction that is not yet finished.\n\t * @protected\n\t */\n\tupdateStateStorageAndFireInputEvent(valueType: string) {\n\t\tthis.storePropertyState(valueType);\n\t\tif (this._isUserInteraction) {\n\t\t\tthis.fireDecoratorEvent(\"input\");\n\t\t}\n\t}\n\n\t/**\n\t * Goes through the key shortcuts available for the component and returns 'true' if the event is triggered by one.\n\t * @private\n\t */\n\tstatic _isActionKey(e: KeyboardEvent) {\n\t\treturn this.ACTION_KEYS.some(actionKey => actionKey(e));\n\t}\n\n\t/**\n\t * Locks the given value between min and max boundaries based on slider properties\n\t * @protected\n\t */\n\tstatic clipValue(value: number, min: number, max: number): number {\n\t\tvalue = Math.min(Math.max(value, min), max);\n\t\treturn value;\n\t}\n\n\t/**\n\t * Sets the slider value from an event\n\t * @protected\n\t */\n\tstatic getValueFromInteraction(e: TouchEvent | MouseEvent, stepSize: number, min: number, max: number, boundingClientRect: DOMRect, directionStart: DirectionStart): number {\n\t\tconst pageX = this.getPageXValueFromEvent(e);\n\t\tconst value = this.computedValueFromPageX(pageX, min, max, boundingClientRect, directionStart);\n\t\tconst steppedValue = this.getSteppedValue(value, stepSize, min);\n\n\t\treturn this.clipValue(steppedValue, min, max);\n\t}\n\n\t/**\n\t * \"Stepify\" the raw value - calculate the new value depending on the specified step property\n\t * @protected\n\t */\n\tstatic getSteppedValue(value: number, stepSize: number, min: number): number {\n\t\tconst stepModuloValue = Math.abs((value - min) % stepSize);\n\n\t\tif (stepSize === 0 || stepModuloValue === 0) {\n\t\t\treturn value;\n\t\t}\n\n\t\t// Clip (snap) the new value to the nearest step\n\t\tvalue = (stepModuloValue * 2 >= stepSize) ? (value + stepSize) - stepModuloValue : value - stepModuloValue;\n\n\t\t// If the step value is not a round number get its precision\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(stepSize);\n\t\treturn Number(value.toFixed(stepPrecision));\n\t}\n\n\t/**\n\t * Gets pageX value from event on user interaction with the Slider\n\t * @protected\n\t */\n\tstatic getPageXValueFromEvent(e: TouchEvent | MouseEvent): number {\n\t\tif (supportsTouch() && e instanceof TouchEvent) {\n\t\t\tif (e.targetTouches && e.targetTouches.length > 0) {\n\t\t\t\treturn e.targetTouches[0].pageX;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn (e as MouseEvent).pageX; // MouseEvent\n\t}\n\n\t/**\n\t * Computes the new value (in %) from the pageX position of the cursor.\n\t * Returns the value rounded to a precision of at most 2 digits after decimal point.\n\t * @protected\n\t */\n\tstatic computedValueFromPageX(pageX: number, min: number, max: number, boundingClientRect: DOMRect, directionStart: DirectionStart) {\n\t\t// Determine pageX position relative to the Slider DOM\n\t\tconst xRelativePosition = directionStart === \"left\" ? pageX - boundingClientRect[directionStart] : boundingClientRect[directionStart] - pageX;\n\t\t// Calculate the percentage complete (the \"progress\")\n\t\tconst percentageComplete = xRelativePosition / boundingClientRect.width;\n\t\t// Fit (map) the complete percentage between the min/max value range\n\t\treturn min + percentageComplete * (max - min);\n\t}\n\n\t/**\n\t * Calculates the precision (decimal places) of a number, returns 0 if integer\n\t * Handles scientific notation cases.\n\t * @private\n\t */\n\tstatic _getDecimalPrecisionOfNumber(value: number) {\n\t\tif (Number.isInteger(value)) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst match = (String(value)).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);\n\t\tif (!match || match.length < 2) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? Number(match[2]) : 0));\n\t}\n\n\t/**\n\t * In order to always keep the visual UI representation and the internal\n\t * state in sync, the component has a 'state storage' that is updated when the\n\t * current state is changed due to a user action.\n\t *\n\t * Check if the previously saved state is outdated. That would mean\n\t * a property has been changed programmatically because the previous state\n\t * is always updated in the interaction handlers.\n\t *\n\t * Will return true if any of the properties is not equal to its previously\n\t * stored value.\n\t * @protected\n\t */\n\tisCurrentStateOutdated() {\n\t\treturn Object.entries(this._stateStorage).some(([propName, propValue]) => this[propName as keyof SliderBase] !== propValue);\n\t}\n\n\t/**\n\t * Returns the last stored value of a property\n\t * @protected\n\t */\n\tgetStoredPropertyState(prop: string) {\n\t\treturn this._stateStorage[prop as keyof StateStorage];\n\t}\n\n\t/**\n\t * Check if one or more properties have been updated compared to their last\n\t * saved values in the state storage.\n\t * @protected\n\t */\n\tisPropertyUpdated(...props: Array<string>) {\n\t\treturn props.some(prop => this.getStoredPropertyState(prop) !== this[prop as keyof SliderBase]);\n\t}\n\n\t/**\n\t * Updates the previously saved in the _stateStorage values of one or more properties.\n\t * @protected\n\t */\n\tstorePropertyState(...props: Array<string>) {\n\t\tprops.forEach(prop => {\n\t\t\tthis._stateStorage[prop as keyof StateStorage] = this[prop as keyof SliderBase] as number;\n\t\t});\n\t}\n\n\t/**\n\t * Returns the start side of a direction - left for LTR, right for RTL\n\t */\n\tget directionStart() {\n\t\treturn this.effectiveDir === \"rtl\" ? \"right\" : \"left\";\n\t}\n\n\t/**\n\t * Calculates the labels amount, width and text and creates them\n\t * @private\n\t */\n\t_createLabels() {\n\t\tif (!this.labelInterval || !this.showTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst labelInterval = this.labelInterval;\n\t\tconst step = this._effectiveStep;\n\t\tconst newNumberOfLabels = (this._effectiveMax - this._effectiveMin) / (step * labelInterval);\n\n\t\t// If the required labels are already rendered\n\t\tif (newNumberOfLabels === this._oldNumberOfLabels && this._oldMin === this._effectiveMin && this._oldMax === this._effectiveMax) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._oldMin = this._effectiveMin;\n\t\tthis._oldMax = this._effectiveMax;\n\t\tthis._oldNumberOfLabels = newNumberOfLabels;\n\t\tthis._labelWidth = 100 / newNumberOfLabels;\n\t\tthis._labelValues = [];\n\n\t\t// If the step value is not a round number get its precision\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(step);\n\n\t\t// numberOfLabels below can be float so that the \"distance betweenlabels labels\"\n\t\t// calculation to be precize (exactly the same as the distance between the tickmarks).\n\t\t// That's ok as the loop stop condition is set to an integer, so it will practically\n\t\t// \"floor\" the number of labels anyway.\n\t\tfor (let i = 0; i <= newNumberOfLabels; i++) {\n\t\t\t// Format the label numbers with the same decimal precision as the value of the step property\n\t\t\tconst labelItemNumber = ((i * step * labelInterval) + this._effectiveMin).toFixed(stepPrecision);\n\t\t\tthis._labelValues.push(labelItemNumber);\n\t\t}\n\t}\n\n\t_handleActionKeyPressBase(e: KeyboardEvent, affectedPropName: string) {\n\t\tconst isUpAction = SliderBase._isIncreaseValueAction(e);\n\t\tconst isBigStep = SliderBase._isBigStepAction(e);\n\n\t\tconst currentValue = this[affectedPropName as keyof SliderBase] as number;\n\t\tconst min = this._effectiveMin;\n\t\tconst max = this._effectiveMax;\n\n\t\t// We need to take into consideration the effective direction of the slider - rtl or ltr.\n\t\t// While in ltr, the left arrow key decreases the value, in rtl it should actually increase it.\n\t\tlet step = this.effectiveDir === \"rtl\" ? -this._effectiveStep : this._effectiveStep;\n\n\t\t// If the action key corresponds to a long step and the slider has more than 10 normal steps,\n\t\t// make a jump of 1/10th of the Slider's length, otherwise just use the normal step property.\n\t\tstep = isBigStep && ((max - min) / step > 10) ? (max - min) / 10 : step;\n\n\t\tif (isEnd(e)) {\n\t\t\treturn max - currentValue;\n\t\t}\n\n\t\tif (isHome(e)) {\n\t\t\treturn (currentValue - min) * -1;\n\t\t}\n\n\t\treturn isUpAction ? step : step * -1;\n\t}\n\n\tstatic _isDecreaseValueAction(e: KeyboardEvent) {\n\t\treturn isDown(e) || isDownCtrl(e) || isLeft(e) || isLeftCtrl(e) || isMinus(e) || isPageDown(e);\n\t}\n\n\tstatic _isIncreaseValueAction(e: KeyboardEvent) {\n\t\treturn isUp(e) || isUpCtrl(e) || isRight(e) || isRightCtrl(e) || isPlus(e) || isPageUp(e);\n\t}\n\n\tstatic _isBigStepAction(e: KeyboardEvent) {\n\t\treturn isDownCtrl(e) || isUpCtrl(e) || isLeftCtrl(e) || isRightCtrl(e) || isPageUp(e) || isPageDown(e);\n\t}\n\n\tget _tickmarksCount() {\n\t\treturn (this._effectiveMax - this._effectiveMin) / this._effectiveStep;\n\t}\n\n\t/**\n\t * Calculates space between tickmarks\n\t * @private\n\t */\n\t_spaceBetweenTickmarks() {\n\t\treturn this.getBoundingClientRect().width / this._tickmarksCount;\n\t}\n\n\t/**\n\t * Notify in case of a invalid step value type\n\t * @private\n\t */\n\t_validateStep(step: number) {\n\t\tif (step === 0) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number\"); // eslint-disable-line\n\t\t}\n\n\t\tif (step < 0) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number. The provided negative number has been converted to its positve equivalent\"); // eslint-disable-line\n\t\t}\n\n\t\tif (Number.isNaN(step)) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number. It has been set to its default value of 1\"); // eslint-disable-line\n\t\t}\n\t}\n\n\tget _labels() {\n\t\treturn this._labelValues || [];\n\t}\n\n\t/**\n\t * Normalizes a new `step` property value.\n\t * If tickmarks are enabled recreates them according to it.\n\t * @private\n\t */\n\tget _effectiveStep() {\n\t\tlet step = this.step;\n\n\t\tif (step < 0) {\n\t\t\tstep = Math.abs(step);\n\t\t}\n\n\t\tif (Number.isNaN(step)) {\n\t\t\tstep = 1;\n\t\t}\n\n\t\treturn step;\n\t}\n\n\tget _effectiveMin() {\n\t\treturn Math.min(this.min, this.max);\n\t}\n\n\tget _effectiveMax() {\n\t\treturn Math.max(this.min, this.max);\n\t}\n\n\tget _tabIndex() {\n\t\treturn this.disabled ? \"-1\" : \"0\";\n\t}\n\n\tget _ariaDescribedByHandleText() {\n\t\treturn this.editableTooltip ? \"ui5-slider-InputDesc\" : undefined;\n\t}\n\n\tget _ariaLabelledByHandleText() {\n\t\treturn this.accessibleName ? \"ui5-slider-accName ui5-slider-sliderDesc\" : \"ui5-slider-sliderDesc\";\n\t}\n\n\tget _ariaDescribedByInputText() {\n\t\treturn \"\";\n\t}\n\n\tget _ariaLabelledByInputText() {\n\t\treturn \"\";\n\t}\n}\n\nexport default SliderBase;\n"]}
|
|
1
|
+
{"version":3,"file":"SliderBase.js","sourceRoot":"","sources":["../src/SliderBase.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,QAAQ,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AAC;IAEF;;;;;;;OAOG;GACY,UAAU,CA4vBxB;AAED,eAAe,UAAU,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { isPhone, supportsTouch } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { PassiveEventListenerObject } from \"@ui5/webcomponents-base/dist/types.js\";\nimport \"@ui5/webcomponents-icons/dist/direction-arrows.js\";\nimport {\n\tisEscape, isHome, isEnd, isUp, isDown, isRight, isLeft, isUpCtrl, isDownCtrl, isRightCtrl, isLeftCtrl, isPlus, isMinus, isPageUp, isPageDown, isF2,\n\tisEnter,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\n\n// Styles\nimport sliderBaseStyles from \"./generated/themes/SliderBase.css.js\";\n\ntype StateStorage = {\n\t[key: string]: number | undefined,\n}\n\ntype DirectionStart = \"left\" | \"right\";\n\n/**\n * Fired when the value changes and the user has finished interacting with the slider.\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when the value changes due to user interaction that is not yet finished - during mouse/touch dragging.\n * @public\n */\n@event(\"input\", {\n\tbubbles: true,\n})\n\n/**\n * @class\n *\n * ### Overview\n * @constructor\n * @extends UI5Element\n * @public\n */\nabstract class SliderBase extends UI5Element {\n\t/**\n\t * Defines the minimum value of the slider.\n\t * @default 0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmin = 0;\n\n\t/**\n\t * Defines the maximum value of the slider.\n\t * @default 100\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmax = 100;\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines the size of the slider's selection intervals (e.g. min = 0, max = 10, step = 5 would result in possible selection of the values 0, 5, 10).\n\t *\n\t * **Note:** If set to 0 the slider handle movement is disabled. When negative number or value other than a number, the component fallbacks to its default value.\n\t * @default 1\n\t * @public\n\t */\n\t@property({ type: Number })\n\tstep = 1;\n\n\t/**\n\t * Displays a label with a value on every N-th step.\n\t *\n\t * **Note:** The step and tickmarks properties must be enabled.\n\t * Example - if the step value is set to 2 and the label interval is also specified to 2 - then every second\n\t * tickmark will be labelled, which means every 4th value number.\n\t * @default 0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tlabelInterval = 0;\n\n\t/**\n\t * Enables tickmarks visualization for each step.\n\t *\n\t * **Note:** The step must be a positive number.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTickmarks = false;\n\n\t/**\n\t * Enables handle tooltip displaying the current value.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTooltip = false;\n\n\t/**\n\t *\n\t * Indicates whether input fields should be used as tooltips for the handles.\n\t *\n\t * **Note:** Setting this option to true will only work if showTooltip is set to true.\n\t * **Note:** In order for the component to comply with the accessibility standard, it is recommended to set the editableTooltip property to true.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\teditableTooltip = false;\n\n\t/**\n\t * Defines whether the slider is in disabled state.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.4.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\tvalue = 0;\n\n\t/**\n\t * @private\n\t */\n\t@property()\n\t_tooltipVisibility = \"hidden\";\n\n\t@property({ type: Boolean })\n\t_labelsOverlapping = false;\n\n\t@property({ type: Boolean })\n\t_hiddenTickmarks = false;\n\n\t@property({ type: Boolean })\n\t_isInputValueValid = false;\n\n\t_resizeHandler: ResizeObserverCallback;\n\t_moveHandler: (e: TouchEvent | MouseEvent) => void;\n\t_upHandler: (e: TouchEvent | MouseEvent) => void;\n\t_stateStorage: StateStorage;\n\t_ontouchstart: PassiveEventListenerObject;\n\tnotResized = false;\n\t_isUserInteraction = false;\n\t_isInnerElementFocusing = false;\n\t_oldNumberOfLabels?: number;\n\t_oldMin?: number;\n\t_oldMax?: number;\n\t_labelWidth = 0;\n\t_labelValues?: Array<string>;\n\t_valueOnInteractionStart?: number;\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._resizeHandler = this._handleResize.bind(this);\n\t\tthis._moveHandler = this._handleMove.bind(this);\n\t\tthis._upHandler = this._handleUp.bind(this);\n\n\t\tthis._stateStorage = {\n\t\t\tstep: undefined,\n\t\t\tmin: undefined,\n\t\t\tmax: undefined,\n\t\t\tlabelInterval: undefined,\n\t\t};\n\n\t\tconst handleTouchStartEvent = (e: TouchEvent) => {\n\t\t\tthis._onmousedown(e);\n\t\t};\n\n\t\tthis._ontouchstart = {\n\t\t\thandleEvent: handleTouchStartEvent,\n\t\t\tpassive: true,\n\t\t};\n\t}\n\n\t_handleMove(e: TouchEvent | MouseEvent) {} // eslint-disable-line\n\n\t_handleUp(e: TouchEvent | MouseEvent) {}\t// eslint-disable-line\n\n\t_onmousedown(e: TouchEvent | MouseEvent) {} // eslint-disable-line\n\n\t_handleActionKeyPress(e: Event) {} // eslint-disable-line\n\n\t_updateInputValue() {}\n\n\t// used in base template, but implemented in subclasses\n\tabstract styles: {\n\t\tlabel: object,\n\t\tlabelContainer: object,\n\t};\n\n\tabstract tickmarksObject: any;\n\tabstract _ariaLabelledByText: string;\n\n\tstatic get ACTION_KEYS() {\n\t\treturn [\n\t\t\tisLeft,\n\t\t\tisRight,\n\t\t\tisUp,\n\t\t\tisDown,\n\t\t\tisLeftCtrl,\n\t\t\tisRightCtrl,\n\t\t\tisUpCtrl,\n\t\t\tisDownCtrl,\n\t\t\tisPlus,\n\t\t\tisMinus,\n\t\t\tisHome,\n\t\t\tisEnd,\n\t\t\tisPageUp,\n\t\t\tisPageDown,\n\t\t\tisEscape,\n\t\t];\n\t}\n\n\tstatic get MIN_SPACE_BETWEEN_TICKMARKS() {\n\t\treturn 8;\n\t}\n\n\tstatic get TOOLTIP_VISIBILITY() {\n\t\treturn {\n\t\t\tVISIBLE: \"visible\",\n\t\t\tHIDDEN: \"hidden\",\n\t\t};\n\t}\n\n\tstatic get renderer() {\n\t\treturn litRender;\n\t}\n\n\tstatic get styles() {\n\t\treturn sliderBaseStyles;\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"ui5-slider-root-phone\": isPhone(),\n\t\t\t},\n\t\t\tlabelContainer: {\n\t\t\t\t\"ui5-slider-hidden-labels\": this._labelsOverlapping,\n\t\t\t},\n\t\t};\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._resizeHandler);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._resizeHandler);\n\t}\n\n\tonAfterRendering() {\n\t\t// Only call if the resize is triggered by a state changes other than\n\t\t// the ones that occured on the previous resize and those caused by user interaction.\n\t\tif (this.notResized) {\n\t\t\tthis._resizeHandler();\n\t\t}\n\t}\n\n\t/** Shows the tooltip(s) if the `showTooltip` property is set to true\n\t * @private\n\t */\n\t_onmouseover() {\n\t\tif (this.showTooltip) {\n\t\t\tthis._tooltipVisibility = SliderBase.TOOLTIP_VISIBILITY.VISIBLE;\n\t\t}\n\t}\n\n\t/**\n\t * Hides the tooltip(s) if the `showTooltip` property is set to true\n\t * @private\n\t */\n\t_onmouseout() {\n\t\tif (this.showTooltip && !this.shadowRoot!.activeElement) {\n\t\t\tthis._tooltipVisibility = SliderBase.TOOLTIP_VISIBILITY.HIDDEN;\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (isF2(e) && target.classList.contains(\"ui5-slider-handle\")) {\n\t\t\t(target.parentNode!.querySelector(\".ui5-slider-handle-container ui5-input\") as HTMLElement).focus();\n\t\t}\n\n\t\tif (this.disabled || this._effectiveStep === 0 || target.hasAttribute(\"ui5-slider-handle\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (SliderBase._isActionKey(e) && target && !target.hasAttribute(\"ui5-input\")) {\n\t\t\te.preventDefault();\n\n\t\t\tthis._isUserInteraction = true;\n\t\t\tthis._handleActionKeyPress(e);\n\t\t}\n\t}\n\n\t_onInputKeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (isF2(e) && target.hasAttribute(\"ui5-input\")) {\n\t\t\t(target.parentNode!.parentNode!.querySelector(\".ui5-slider-handle\") as HTMLElement).focus();\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._updateInputValue();\n\t\t\tthis._updateValueFromInput(e);\n\t\t}\n\t}\n\n\t_onInputChange() {\n\t\tif (this._valueOnInteractionStart !== this.value) {\n\t\t\tthis.fireEvent(\"change\");\n\t\t}\n\t}\n\n\t_onInputInput() {\n\t\tthis.fireEvent(\"input\");\n\t}\n\n\t_updateValueFromInput(e: Event) {\n\t\tconst input = e.target as HTMLInputElement;\n\t\tconst value = parseFloat(input.value);\n\t\tthis._isInputValueValid = value >= this._effectiveMin && value <= this._effectiveMax;\n\n\t\tif (!this._isInputValueValid) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.value = value;\n\t}\n\n\t_onKeyupBase() {\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isUserInteraction = false;\n\t}\n\n\t/**\n\t * Flags if an inner element is currently being focused\n\t * @private\n\t */\n\t_preserveFocus(isFocusing: boolean) {\n\t\tthis._isInnerElementFocusing = isFocusing;\n\t}\n\n\t/**\n\t * Return if an inside element within the component is currently being focused\n\t * @private\n\t */\n\t_isFocusing() {\n\t\treturn this._isInnerElementFocusing;\n\t}\n\n\t/**\n\t * Prevent focus out when inner element within the component is currently being in process of focusing in.\n\t * @private\n\t */\n\t_preventFocusOut() {\n\t\tthis.focusInnerElement();\n\t}\n\n\t/**\n\t * Manages the focus between the component's inner elements\n\t * @protected\n\t */\n\tfocusInnerElement() {\n\t\tthis.focus();\n\t}\n\n\t/**\n\t * Handle the responsiveness of the Slider's UI elements when resizing\n\t * @private\n\t */\n\t_handleResize() {\n\t\tif (!this.showTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Mark resizing to avoid unneccessary calls to that function after rendering\n\t\tthis.notResized = false;\n\n\t\t// Convert the string represented calculation expression to a normal one\n\t\t// Check the distance in pixels exist between every tickmark\n\t\tconst spaceBetweenTickmarks = this._spaceBetweenTickmarks();\n\n\t\t// If the pixels between the tickmarks are less than 8 only the first and the last one should be visible\n\t\t// In such case the labels must correspond to the tickmarks, only the first and the last one should exist.\n\t\tif (spaceBetweenTickmarks < SliderBase.MIN_SPACE_BETWEEN_TICKMARKS) {\n\t\t\tthis._hiddenTickmarks = true;\n\t\t\tthis._labelsOverlapping = true;\n\t\t} else {\n\t\t\tthis._hiddenTickmarks = false;\n\t\t}\n\n\t\tif (this.labelInterval <= 0 || this._hiddenTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if there are any overlapping labels.\n\t\t// If so - only the first and the last one should be visible\n\t\tconst labelItems = this.shadowRoot!.querySelectorAll(\".ui5-slider-labels li\");\n\t\tthis._labelsOverlapping = [...labelItems].some(label => label.scrollWidth > label.clientWidth);\n\t}\n\n\t/**\n\t * Called when the user starts interacting with the slider.\n\t * After a down event on the slider root, listen for move events on window, so the slider value\n\t * is updated even if the user drags the pointer outside the slider root.\n\t * @protected\n\t */\n\thandleDownBase(e: TouchEvent | MouseEvent) {\n\t\tconst min = this._effectiveMin;\n\t\tconst max = this._effectiveMax;\n\t\tconst domRect = this.getBoundingClientRect();\n\t\tconst directionStart = this.directionStart;\n\t\tconst step = this._effectiveStep;\n\t\tconst newValue = SliderBase.getValueFromInteraction(e, step, min, max, domRect, directionStart);\n\n\t\t// Mark start of a user interaction\n\t\tthis._isUserInteraction = true;\n\n\t\twindow.addEventListener(\"mouseup\", this._upHandler);\n\t\twindow.addEventListener(\"touchend\", this._upHandler);\n\t\t// Only allow one type of move event to be listened to (the first one registered after the down event)\n\t\tif (supportsTouch() && e instanceof TouchEvent) {\n\t\t\twindow.addEventListener(\"touchmove\", this._moveHandler);\n\t\t} else {\n\t\t\twindow.addEventListener(\"mousemove\", this._moveHandler);\n\t\t}\n\n\t\tthis._handleFocusOnMouseDown(e);\n\t\treturn newValue;\n\t}\n\n\t/**\n\t * Forward the focus to an inner inner part within the component on press\n\t * @private\n\t */\n\t_handleFocusOnMouseDown(e: TouchEvent | MouseEvent) {\n\t\tconst currentlyFocusedElement = this.shadowRoot!.activeElement;\n\t\tconst elementToBeFocused = e.target as HTMLElement;\n\n\t\tif ((!currentlyFocusedElement || currentlyFocusedElement !== elementToBeFocused) && !elementToBeFocused.hasAttribute(\"ui5-input\")) {\n\t\t\tthis._preserveFocus(true);\n\t\t\tthis.focusInnerElement();\n\t\t}\n\t}\n\n\t/**\n\t * Called when the user finish interacting with the slider\n\t * Fires an `change` event indicating a final value change, after user interaction is finished.\n\t * @protected\n\t */\n\thandleUpBase() {\n\t\twindow.removeEventListener(\"mouseup\", this._upHandler);\n\t\twindow.removeEventListener(\"touchend\", this._upHandler);\n\t\t// Only one of the following was attached, but it's ok to remove both as there is no error\n\t\twindow.removeEventListener(\"mousemove\", this._moveHandler);\n\t\twindow.removeEventListener(\"touchmove\", this._moveHandler);\n\n\t\tthis._isUserInteraction = false;\n\t\tthis._preserveFocus(false);\n\t}\n\n\t/**\n\t * Updates state storage for the value-related property\n\t * Fires an `input` event indicating a value change via interaction that is not yet finished.\n\t * @protected\n\t */\n\tupdateStateStorageAndFireInputEvent(valueType: string) {\n\t\tthis.storePropertyState(valueType);\n\t\tif (this._isUserInteraction) {\n\t\t\tthis.fireDecoratorEvent(\"input\");\n\t\t}\n\t}\n\n\t/**\n\t * Goes through the key shortcuts available for the component and returns 'true' if the event is triggered by one.\n\t * @private\n\t */\n\tstatic _isActionKey(e: KeyboardEvent) {\n\t\treturn this.ACTION_KEYS.some(actionKey => actionKey(e));\n\t}\n\n\t/**\n\t * Locks the given value between min and max boundaries based on slider properties\n\t * @protected\n\t */\n\tstatic clipValue(value: number, min: number, max: number): number {\n\t\tvalue = Math.min(Math.max(value, min), max);\n\t\treturn value;\n\t}\n\n\t/**\n\t * Sets the slider value from an event\n\t * @protected\n\t */\n\tstatic getValueFromInteraction(e: TouchEvent | MouseEvent, stepSize: number, min: number, max: number, boundingClientRect: DOMRect, directionStart: DirectionStart): number {\n\t\tconst pageX = this.getPageXValueFromEvent(e);\n\t\tconst value = this.computedValueFromPageX(pageX, min, max, boundingClientRect, directionStart);\n\t\tconst steppedValue = this.getSteppedValue(value, stepSize, min);\n\n\t\treturn this.clipValue(steppedValue, min, max);\n\t}\n\n\t/**\n\t * \"Stepify\" the raw value - calculate the new value depending on the specified step property\n\t * @protected\n\t */\n\tstatic getSteppedValue(value: number, stepSize: number, min: number): number {\n\t\tconst stepModuloValue = Math.abs((value - min) % stepSize);\n\n\t\tif (stepSize === 0 || stepModuloValue === 0) {\n\t\t\treturn value;\n\t\t}\n\n\t\t// Clip (snap) the new value to the nearest step\n\t\tvalue = (stepModuloValue * 2 >= stepSize) ? (value + stepSize) - stepModuloValue : value - stepModuloValue;\n\n\t\t// If the step value is not a round number get its precision\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(stepSize);\n\t\treturn Number(value.toFixed(stepPrecision));\n\t}\n\n\t/**\n\t * Gets pageX value from event on user interaction with the Slider\n\t * @protected\n\t */\n\tstatic getPageXValueFromEvent(e: TouchEvent | MouseEvent): number {\n\t\tif (supportsTouch() && e instanceof TouchEvent) {\n\t\t\tif (e.targetTouches && e.targetTouches.length > 0) {\n\t\t\t\treturn e.targetTouches[0].pageX;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn (e as MouseEvent).pageX; // MouseEvent\n\t}\n\n\t/**\n\t * Computes the new value (in %) from the pageX position of the cursor.\n\t * Returns the value rounded to a precision of at most 2 digits after decimal point.\n\t * @protected\n\t */\n\tstatic computedValueFromPageX(pageX: number, min: number, max: number, boundingClientRect: DOMRect, directionStart: DirectionStart) {\n\t\t// Determine pageX position relative to the Slider DOM\n\t\tconst xRelativePosition = directionStart === \"left\" ? pageX - boundingClientRect[directionStart] : boundingClientRect[directionStart] - pageX;\n\t\t// Calculate the percentage complete (the \"progress\")\n\t\tconst percentageComplete = xRelativePosition / boundingClientRect.width;\n\t\t// Fit (map) the complete percentage between the min/max value range\n\t\treturn min + percentageComplete * (max - min);\n\t}\n\n\t/**\n\t * Calculates the precision (decimal places) of a number, returns 0 if integer\n\t * Handles scientific notation cases.\n\t * @private\n\t */\n\tstatic _getDecimalPrecisionOfNumber(value: number) {\n\t\tif (Number.isInteger(value)) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst match = (String(value)).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);\n\t\tif (!match || match.length < 2) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? Number(match[2]) : 0));\n\t}\n\n\t/**\n\t * In order to always keep the visual UI representation and the internal\n\t * state in sync, the component has a 'state storage' that is updated when the\n\t * current state is changed due to a user action.\n\t *\n\t * Check if the previously saved state is outdated. That would mean\n\t * a property has been changed programmatically because the previous state\n\t * is always updated in the interaction handlers.\n\t *\n\t * Will return true if any of the properties is not equal to its previously\n\t * stored value.\n\t * @protected\n\t */\n\tisCurrentStateOutdated() {\n\t\treturn Object.entries(this._stateStorage).some(([propName, propValue]) => this[propName as keyof SliderBase] !== propValue);\n\t}\n\n\t/**\n\t * Returns the last stored value of a property\n\t * @protected\n\t */\n\tgetStoredPropertyState(prop: string) {\n\t\treturn this._stateStorage[prop as keyof StateStorage];\n\t}\n\n\t/**\n\t * Check if one or more properties have been updated compared to their last\n\t * saved values in the state storage.\n\t * @protected\n\t */\n\tisPropertyUpdated(...props: Array<string>) {\n\t\treturn props.some(prop => this.getStoredPropertyState(prop) !== this[prop as keyof SliderBase]);\n\t}\n\n\t/**\n\t * Updates the previously saved in the _stateStorage values of one or more properties.\n\t * @protected\n\t */\n\tstorePropertyState(...props: Array<string>) {\n\t\tprops.forEach(prop => {\n\t\t\tthis._stateStorage[prop as keyof StateStorage] = this[prop as keyof SliderBase] as number;\n\t\t});\n\t}\n\n\t/**\n\t * Returns the start side of a direction - left for LTR, right for RTL\n\t */\n\tget directionStart() {\n\t\treturn this.effectiveDir === \"rtl\" ? \"right\" : \"left\";\n\t}\n\n\t/**\n\t * Calculates the labels amount, width and text and creates them\n\t * @private\n\t */\n\t_createLabels() {\n\t\tif (!this.labelInterval || !this.showTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst labelInterval = this.labelInterval;\n\t\tconst step = this._effectiveStep;\n\t\tconst newNumberOfLabels = (this._effectiveMax - this._effectiveMin) / (step * labelInterval);\n\n\t\t// If the required labels are already rendered\n\t\tif (newNumberOfLabels === this._oldNumberOfLabels && this._oldMin === this._effectiveMin && this._oldMax === this._effectiveMax) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._oldMin = this._effectiveMin;\n\t\tthis._oldMax = this._effectiveMax;\n\t\tthis._oldNumberOfLabels = newNumberOfLabels;\n\t\tthis._labelWidth = 100 / newNumberOfLabels;\n\t\tthis._labelValues = [];\n\n\t\t// If the step value is not a round number get its precision\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(step);\n\n\t\t// numberOfLabels below can be float so that the \"distance betweenlabels labels\"\n\t\t// calculation to be precize (exactly the same as the distance between the tickmarks).\n\t\t// That's ok as the loop stop condition is set to an integer, so it will practically\n\t\t// \"floor\" the number of labels anyway.\n\t\tfor (let i = 0; i <= newNumberOfLabels; i++) {\n\t\t\t// Format the label numbers with the same decimal precision as the value of the step property\n\t\t\tconst labelItemNumber = ((i * step * labelInterval) + this._effectiveMin).toFixed(stepPrecision);\n\t\t\tthis._labelValues.push(labelItemNumber);\n\t\t}\n\t}\n\n\t_handleActionKeyPressBase(e: KeyboardEvent, affectedPropName: string) {\n\t\tconst isUpAction = SliderBase._isIncreaseValueAction(e, this.directionStart);\n\t\tconst isBigStep = SliderBase._isBigStepAction(e);\n\n\t\tconst currentValue = this[affectedPropName as keyof SliderBase] as number;\n\t\tconst min = this._effectiveMin;\n\t\tconst max = this._effectiveMax;\n\n\t\tlet step = this._effectiveStep;\n\n\t\t// If the action key corresponds to a long step and the slider has more than 10 normal steps,\n\t\t// make a jump of 1/10th of the Slider's length, otherwise just use the normal step property.\n\t\tstep = isBigStep && ((max - min) / step > 10) ? (max - min) / 10 : step;\n\n\t\tif (isEnd(e)) {\n\t\t\treturn max - currentValue;\n\t\t}\n\n\t\tif (isHome(e)) {\n\t\t\treturn (currentValue - min) * -1;\n\t\t}\n\n\t\treturn isUpAction ? step : step * -1;\n\t}\n\n\tstatic _isIncreaseValueAction(e: KeyboardEvent, directionStart: DirectionStart) {\n\t\tif (directionStart === \"right\") {\n\t\t\treturn isUp(e) || isUpCtrl(e) || isLeft(e) || isLeftCtrl(e) || isPlus(e) || isPageUp(e);\n\t\t}\n\n\t\treturn isUp(e) || isUpCtrl(e) || isRight(e) || isRightCtrl(e) || isPlus(e) || isPageUp(e);\n\t}\n\n\tstatic _isBigStepAction(e: KeyboardEvent) {\n\t\treturn isDownCtrl(e) || isUpCtrl(e) || isLeftCtrl(e) || isRightCtrl(e) || isPageUp(e) || isPageDown(e);\n\t}\n\n\tget _tickmarksCount() {\n\t\treturn (this._effectiveMax - this._effectiveMin) / this._effectiveStep;\n\t}\n\n\t/**\n\t * Calculates space between tickmarks\n\t * @private\n\t */\n\t_spaceBetweenTickmarks() {\n\t\treturn this.getBoundingClientRect().width / this._tickmarksCount;\n\t}\n\n\t/**\n\t * Notify in case of a invalid step value type\n\t * @private\n\t */\n\t_validateStep(step: number) {\n\t\tif (step === 0) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number\"); // eslint-disable-line\n\t\t}\n\n\t\tif (step < 0) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number. The provided negative number has been converted to its positve equivalent\"); // eslint-disable-line\n\t\t}\n\n\t\tif (Number.isNaN(step)) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number. It has been set to its default value of 1\"); // eslint-disable-line\n\t\t}\n\t}\n\n\tget _labels() {\n\t\treturn this._labelValues || [];\n\t}\n\n\t/**\n\t * Normalizes a new `step` property value.\n\t * If tickmarks are enabled recreates them according to it.\n\t * @private\n\t */\n\tget _effectiveStep() {\n\t\tlet step = this.step;\n\n\t\tif (step < 0) {\n\t\t\tstep = Math.abs(step);\n\t\t}\n\n\t\tif (Number.isNaN(step)) {\n\t\t\tstep = 1;\n\t\t}\n\n\t\treturn step;\n\t}\n\n\tget _effectiveMin() {\n\t\treturn Math.min(this.min, this.max);\n\t}\n\n\tget _effectiveMax() {\n\t\treturn Math.max(this.min, this.max);\n\t}\n\n\tget _tabIndex() {\n\t\treturn this.disabled ? \"-1\" : \"0\";\n\t}\n\n\tget _ariaDescribedByHandleText() {\n\t\treturn this.editableTooltip ? \"ui5-slider-InputDesc\" : undefined;\n\t}\n\n\tget _ariaLabelledByHandleText() {\n\t\treturn this.accessibleName ? \"ui5-slider-accName ui5-slider-sliderDesc\" : \"ui5-slider-sliderDesc\";\n\t}\n\n\tget _ariaDescribedByInputText() {\n\t\treturn \"\";\n\t}\n\n\tget _ariaLabelledByInputText() {\n\t\treturn \"\";\n\t}\n}\n\nexport default SliderBase;\n"]}
|
package/dist/SplitButton.d.ts
CHANGED
|
@@ -133,8 +133,8 @@ declare class SplitButton extends UI5Element {
|
|
|
133
133
|
constructor();
|
|
134
134
|
onBeforeRendering(): void;
|
|
135
135
|
_handleMouseClick(e: MouseEvent): void;
|
|
136
|
-
_onFocusOut(
|
|
137
|
-
_onFocusIn(
|
|
136
|
+
_onFocusOut(): void;
|
|
137
|
+
_onFocusIn(): void;
|
|
138
138
|
_onInnerButtonFocusIn(e: FocusEvent): void;
|
|
139
139
|
_onKeyDown(e: KeyboardEvent): void;
|
|
140
140
|
_onKeyUp(e: KeyboardEvent): void;
|
package/dist/SplitButton.js
CHANGED
|
@@ -13,7 +13,6 @@ import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
|
13
13
|
import { isEscape, isSpace, isEnter, isDown, isUp, isDownAlt, isUpAlt, isF4, isShift, isTabNext, isTabPrevious, } from "@ui5/webcomponents-base/dist/Keys.js";
|
|
14
14
|
import AriaHasPopup from "@ui5/webcomponents-base/dist/types/AriaHasPopup.js";
|
|
15
15
|
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
|
16
|
-
import { getEventMark } from "@ui5/webcomponents-base/dist/MarkedEvents.js";
|
|
17
16
|
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
18
17
|
import "@ui5/webcomponents-icons/dist/slim-arrow-down.js";
|
|
19
18
|
import Button from "./Button.js";
|
|
@@ -140,15 +139,15 @@ let SplitButton = SplitButton_1 = class SplitButton extends UI5Element {
|
|
|
140
139
|
_handleMouseClick(e) {
|
|
141
140
|
this._fireClick(e);
|
|
142
141
|
}
|
|
143
|
-
_onFocusOut(
|
|
144
|
-
if (this.disabled ||
|
|
142
|
+
_onFocusOut() {
|
|
143
|
+
if (this.disabled || this.getFocusDomRef().matches(":has(:focus-within)")) {
|
|
145
144
|
return;
|
|
146
145
|
}
|
|
147
146
|
this._shiftOrEscapePressed = false;
|
|
148
147
|
this._setTabIndexValue();
|
|
149
148
|
}
|
|
150
|
-
_onFocusIn(
|
|
151
|
-
if (this.disabled ||
|
|
149
|
+
_onFocusIn() {
|
|
150
|
+
if (this.disabled || this.getFocusDomRef().matches(":has(:focus-within)")) {
|
|
152
151
|
return;
|
|
153
152
|
}
|
|
154
153
|
this._shiftOrEscapePressed = false;
|
package/dist/SplitButton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitButton.js","sourceRoot":"","sources":["../src/SplitButton.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,EACN,QAAQ,EACR,OAAO,EACP,OAAO,EACP,MAAM,EACN,IAAI,EACJ,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAO,EACP,SAAS,EACT,aAAa,GACb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,kDAAkD,CAAC;AAE1D,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EACN,wBAAwB,EACxB,0BAA0B,EAC1B,iCAAiC,GACjC,MAAM,mCAAmC,CAAC;AAE3C,WAAW;AACX,OAAO,mBAAmB,MAAM,kDAAkD,CAAC;AAEnF,SAAS;AACT,OAAO,cAAc,MAAM,uCAAuC,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAuBH,IAAM,WAAW,mBAAjB,MAAM,WAAY,SAAQ,UAAU;IAyGnC;QACC,KAAK,EAAE,CAAC;QA5FT;;;;;WAKG;QAEH,sB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AAQtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;0DACjB;AAQ9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;sDACrB;AAQ1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;uDACpB;AAS3B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;yCACnB;AAOZ;IADN,IAAI,CAAC,oBAAoB,CAAC;qCACG;AAvGzB,WAAW;IAtBhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;QAC7B,YAAY,EAAE,CAAC,MAAM,CAAC;KACtB,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,aAAa,EAAE;QACrB,OAAO,EAAE,IAAI;KACb,CAAC;GACI,WAAW,CA0WhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport {\n\tisEscape,\n\tisSpace,\n\tisEnter,\n\tisDown,\n\tisUp,\n\tisDownAlt,\n\tisUpAlt,\n\tisF4,\n\tisShift,\n\tisTabNext,\n\tisTabPrevious,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport AriaHasPopup from \"@ui5/webcomponents-base/dist/types/AriaHasPopup.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getEventMark } from \"@ui5/webcomponents-base/dist/MarkedEvents.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-down.js\";\nimport type ButtonDesign from \"./types/ButtonDesign.js\";\nimport Button from \"./Button.js\";\n\nimport {\n\tSPLIT_BUTTON_DESCRIPTION,\n\tSPLIT_BUTTON_KEYBOARD_HINT,\n\tSPLIT_BUTTON_ARROW_BUTTON_TOOLTIP,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Template\nimport SplitButtonTemplate from \"./generated/templates/SplitButtonTemplate.lit.js\";\n\n// Styles\nimport SplitButtonCss from \"./generated/themes/SplitButton.css.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * `ui5-split-button` enables users to trigger actions. It is constructed of two separate actions -\n * default action and arrow action that can be activated by clicking or tapping, or by\n * pressing certain keyboard keys - `Space` or `Enter` for default action,\n * and `Arrow Down` or `Arrow Up` for arrow action.\n *\n * ### Usage\n *\n * `ui5-split-button` consists two separate buttons:\n *\n * - for the first one (default action) you can define some `text` or an `icon`, or both.\n * - the second one (arrow action) contains only `slim-arrow-down` icon.\n *\n * You can choose a `design` from a set of predefined types (the same as for ui5-button) that offer\n * different styling to correspond to the triggered action. Both text and arrow actions have the same design.\n *\n * You can set the `ui5-split-button` as enabled or disabled. Both parts of an enabled\n * `ui5-split-button` can be pressed by clicking or tapping it, or by certain keys, which changes\n * the style to provide visual feedback to the user that it is pressed or hovered over with\n * the mouse cursor. A disabled `ui5-split-button` appears inactive and any of the two buttons\n * cannot be pressed.\n *\n * ### Keyboard Handling\n *\n * - `Space` or `Enter` - triggers the default action\n * - `Shift` or `Escape` - if `Space` is pressed, releases the default action button without triggering the click event.\n * - `Arrow Down`, `Arrow Up`, `Alt`+`Arrow Down`, `Alt`+`Arrow Up`, or `F4` - triggers the arrow action\n * There are separate events that are fired on activating of `ui5-split-button` parts:\n *\n * - `click` for the first button (default action)\n * - `arrow-click` for the second button (arrow action)\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/SplitButton.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.1.0\n */\n@customElement({\n\ttag: \"ui5-split-button\",\n\trenderer: litRender,\n\tstyles: SplitButtonCss,\n\ttemplate: SplitButtonTemplate,\n\tdependencies: [Button],\n})\n/**\n * Fired when the user clicks on the default action.\n * @public\n */\n@event(\"click\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when the user clicks on the arrow action.\n * @public\n */\n@event(\"arrow-click\", {\n\tbubbles: true,\n})\nclass SplitButton extends UI5Element {\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 the arrow button should have the active state styles or not.\n\t * @default false\n\t * @public\n\t * @since 1.21.0\n\t */\n\t@property({ type: Boolean })\n\tactiveArrowButton = false;\n\n\t/**\n\t * Defines the component design.\n\t * @default \"Default\"\n\t * @public\n\t */\n\t@property()\n\tdesign: `${ButtonDesign}` = \"Default\";\n\n\t/**\n\t * Defines whether the component is disabled.\n\t * A disabled component can't be pressed or\n\t * focused, and it is not in the tab chain.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the tabIndex of the component.\n\t * @default \"0\"\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\t_tabIndex = \"0\"\n\n\t/**\n\t * Indicates if there is Space key pressed\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_spacePressed = false;\n\n\t/**\n\t * Indicates if there is SHIFT or ESCAPE key pressed\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_shiftOrEscapePressed = false;\n\n\t/**\n\t * Defines the active state of the text button\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_textButtonActive = false;\n\n\t/**\n\t * Defines the state of the internal Button used for the Arrow button of the SplitButton.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_activeArrowButton = false;\n\n\t/**\n\t * Defines the text of the component.\n\t *\n\t * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n\t * @public\n\t */\n\t@slot({ type: Node, \"default\": true })\n\ttext!: Array<Node>;\n\n\t_textButtonPress: { handleEvent: (e: MouseEvent) => void, passive: boolean };\n\t_isDefaultActionPressed = false;\n\t_isKeyDownOperation = false;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst handleTouchStartEvent = (e: MouseEvent) => {\n\t\t\te.stopPropagation();\n\t\t\tthis._textButtonActive = true;\n\t\t\tthis._tabIndex = \"-1\";\n\t\t};\n\n\t\tthis._textButtonPress = {\n\t\t\thandleEvent: handleTouchStartEvent,\n\t\t\tpassive: true,\n\t\t};\n\t}\n\n\tonBeforeRendering() {\n\t\tif (this.disabled) {\n\t\t\tthis._tabIndex = \"-1\";\n\t\t}\n\t}\n\n\t_handleMouseClick(e: MouseEvent) {\n\t\tthis._fireClick(e);\n\t}\n\n\t_onFocusOut(e: FocusEvent) {\n\t\tif (this.disabled || getEventMark(e)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._shiftOrEscapePressed = false;\n\t\tthis._setTabIndexValue();\n\t}\n\n\t_onFocusIn(e: FocusEvent) {\n\t\tif (this.disabled || getEventMark(e)) {\n\t\t\treturn;\n\t\t}\n\t\tthis._shiftOrEscapePressed = false;\n\t}\n\n\t_onInnerButtonFocusIn(e: FocusEvent) {\n\t\te.stopPropagation();\n\t\tthis._setTabIndexValue(true);\n\t\tconst target = e.target as Button;\n\t\ttarget.focus();\n\t}\n\n\t_onKeyDown(e: KeyboardEvent) {\n\t\tthis._isKeyDownOperation = true;\n\t\tif (this._isArrowKeyAction(e)) {\n\t\t\tthis._handleArrowButtonAction(e);\n\t\t\tthis._activeArrowButton = true;\n\t\t} else if (this._isDefaultAction(e)) {\n\t\t\tthis._handleDefaultAction(e);\n\t\t\tthis._isDefaultActionPressed = true;\n\t\t}\n\n\t\tif (this._spacePressed && this._isShiftOrEscape(e)) {\n\t\t\tthis._handleShiftOrEscapePressed();\n\t\t}\n\n\t\t// Handles button freeze issue when pressing Enter/Space and navigating with Tab/Shift+Tab simultaneously.\n\t\tif (this._isDefaultActionPressed && (isTabNext(e) || isTabPrevious(e))) {\n\t\t\tthis._activeArrowButton = false;\n\t\t\tthis._textButtonActive = false;\n\t\t}\n\n\t\tthis._tabIndex = \"-1\";\n\t}\n\n\t_onKeyUp(e: KeyboardEvent) {\n\t\tthis._isKeyDownOperation = false;\n\t\tif (this._isArrowKeyAction(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._activeArrowButton = false;\n\t\t\tthis._textButtonActive = false;\n\t\t} else if (this._isDefaultAction(e)) {\n\t\t\tthis._isDefaultActionPressed = false;\n\t\t\tthis._textButtonActive = false;\n\t\t\tif (isSpace(e)) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\tthis._fireClick();\n\t\t\t\tthis._spacePressed = false;\n\t\t\t\tthis._textButtonActive = false;\n\t\t\t}\n\t\t}\n\n\t\tif (this._isShiftOrEscape(e)) {\n\t\t\tthis._handleShiftOrEscapePressed();\n\t\t}\n\n\t\tthis._tabIndex = \"-1\";\n\t}\n\n\t_fireClick(e?: Event) {\n\t\te?.stopPropagation();\n\t\tif (!this._shiftOrEscapePressed) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\t\tthis._shiftOrEscapePressed = false;\n\t}\n\n\t_fireArrowClick(e?: Event) {\n\t\te?.stopPropagation();\n\n\t\tthis.fireDecoratorEvent(\"arrow-click\");\n\t}\n\n\t_textButtonRelease() {\n\t\tthis._textButtonActive = false;\n\t\tthis._tabIndex = \"-1\";\n\t}\n\n\t_arrowButtonPress(e: MouseEvent) {\n\t\te.stopPropagation();\n\n\t\tthis._tabIndex = \"-1\";\n\t}\n\n\t_arrowButtonRelease(e: MouseEvent) {\n\t\te.preventDefault();\n\n\t\tthis._tabIndex = \"-1\";\n\t}\n\n\t_setTabIndexValue(innerButtonPressed?: boolean) {\n\t\tthis._tabIndex = this.disabled ? \"-1\" : \"0\";\n\n\t\tif (this._tabIndex === \"-1\" && innerButtonPressed) {\n\t\t\tthis._tabIndex = \"0\";\n\t\t}\n\t}\n\n\t_onArrowButtonActiveStateChange(e: CustomEvent) {\n\t\tif (this.activeArrowButton) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the pressed key is an arrow key.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_isArrowKeyAction(e: KeyboardEvent): boolean {\n\t\treturn isDown(e) || isUp(e) || isDownAlt(e) || isUpAlt(e) || isF4(e);\n\t}\n\n\t/**\n\t * Checks if the pressed key is a default action key (Space or Enter).\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_isDefaultAction(e: KeyboardEvent): boolean {\n\t\treturn isSpace(e) || isEnter(e);\n\t}\n\n\t/**\n\t * Checks if the pressed key is an escape key or shift key.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_isShiftOrEscape(e: KeyboardEvent): boolean {\n\t\treturn isEscape(e) || isShift(e);\n\t}\n\n\t/**\n\t * Handles the click event and the focus on the arrow button.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_handleArrowButtonAction(e: KeyboardEvent | MouseEvent) {\n\t\te.preventDefault();\n\n\t\tthis._fireArrowClick(e);\n\n\t\tif (isSpace((e as KeyboardEvent))) {\n\t\t\tthis._spacePressed = true;\n\t\t}\n\t}\n\n\t/**\n\t * Handles the default action and the active state of the respective button.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_handleDefaultAction(e: KeyboardEvent) {\n\t\te.preventDefault();\n\t\tconst wasSpacePressed = isSpace(e);\n\t\tconst target = e.target as Button;\n\n\t\tif (this.arrowButton && target === this.arrowButton) {\n\t\t\tthis._activeArrowButton = true;\n\t\t\tthis._fireArrowClick();\n\t\t\tif (wasSpacePressed) {\n\t\t\t\tthis._spacePressed = true;\n\t\t\t\tthis._textButtonActive = false;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._textButtonActive = true;\n\t\t\tthis._fireClick();\n\t\t\tif (wasSpacePressed) {\n\t\t\t\tthis._spacePressed = true;\n\t\t\t}\n\t\t}\n\t}\n\n\t_handleShiftOrEscapePressed() {\n\t\tthis._shiftOrEscapePressed = true;\n\t\tthis._textButtonActive = false;\n\t\tthis._isKeyDownOperation = false;\n\t}\n\n\tget effectiveActiveArrowButton() {\n\t\treturn this.activeArrowButton || this._activeArrowButton;\n\t}\n\n\tget textButtonAccText() {\n\t\treturn this.textContent;\n\t}\n\n\tget isTextButton() {\n\t\treturn !!this.textContent;\n\t}\n\n\tget textButton() {\n\t\treturn this.getDomRef()?.querySelector<Button>(\".ui5-split-text-button\");\n\t}\n\n\tget arrowButton() {\n\t\treturn this.getDomRef()?.querySelector<Button>(\".ui5-split-arrow-button\");\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"description\": SplitButton.i18nBundle.getText(SPLIT_BUTTON_DESCRIPTION),\n\t\t\t\t\"keyboardHint\": SplitButton.i18nBundle.getText(SPLIT_BUTTON_KEYBOARD_HINT),\n\t\t\t},\n\t\t\tarrowButton: {\n\t\t\t\t\"title\": this.arrowButtonTooltip,\n\t\t\t\t\"accessibilityAttributes\": {\n\t\t\t\t\t\"hasPopup\": AriaHasPopup.Menu.toLocaleLowerCase(),\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\tget arrowButtonTooltip() {\n\t\treturn SplitButton.i18nBundle.getText(SPLIT_BUTTON_ARROW_BUTTON_TOOLTIP);\n\t}\n\n\tget ariaLabelText() {\n\t\treturn [SplitButton.i18nBundle.getText(SPLIT_BUTTON_DESCRIPTION), SplitButton.i18nBundle.getText(SPLIT_BUTTON_KEYBOARD_HINT)].join(\" \");\n\t}\n}\n\nSplitButton.define();\n\nexport default SplitButton;\n"]}
|
|
1
|
+
{"version":3,"file":"SplitButton.js","sourceRoot":"","sources":["../src/SplitButton.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,EACN,QAAQ,EACR,OAAO,EACP,OAAO,EACP,MAAM,EACN,IAAI,EACJ,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAO,EACP,SAAS,EACT,aAAa,GACb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,kDAAkD,CAAC;AAE1D,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EACN,wBAAwB,EACxB,0BAA0B,EAC1B,iCAAiC,GACjC,MAAM,mCAAmC,CAAC;AAE3C,WAAW;AACX,OAAO,mBAAmB,MAAM,kDAAkD,CAAC;AAEnF,SAAS;AACT,OAAO,cAAc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AAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CACX;AAQjB;IADC,QAAQ,EAAE;mDACa;AAQxB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;8CACjB;AAQf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;kDACzB;AAQtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;0DACjB;AAQ9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;sDACrB;AAQ1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;uDACpB;AAS3B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;yCACnB;AAOZ;IADN,IAAI,CAAC,oBAAoB,CAAC;qCACG;AAvGzB,WAAW;IAtBhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;QAC7B,YAAY,EAAE,CAAC,MAAM,CAAC;KACtB,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,aAAa,EAAE;QACrB,OAAO,EAAE,IAAI;KACb,CAAC;GACI,WAAW,CA0WhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport {\n\tisEscape,\n\tisSpace,\n\tisEnter,\n\tisDown,\n\tisUp,\n\tisDownAlt,\n\tisUpAlt,\n\tisF4,\n\tisShift,\n\tisTabNext,\n\tisTabPrevious,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport AriaHasPopup from \"@ui5/webcomponents-base/dist/types/AriaHasPopup.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-down.js\";\nimport type ButtonDesign from \"./types/ButtonDesign.js\";\nimport Button from \"./Button.js\";\n\nimport {\n\tSPLIT_BUTTON_DESCRIPTION,\n\tSPLIT_BUTTON_KEYBOARD_HINT,\n\tSPLIT_BUTTON_ARROW_BUTTON_TOOLTIP,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Template\nimport SplitButtonTemplate from \"./generated/templates/SplitButtonTemplate.lit.js\";\n\n// Styles\nimport SplitButtonCss from \"./generated/themes/SplitButton.css.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * `ui5-split-button` enables users to trigger actions. It is constructed of two separate actions -\n * default action and arrow action that can be activated by clicking or tapping, or by\n * pressing certain keyboard keys - `Space` or `Enter` for default action,\n * and `Arrow Down` or `Arrow Up` for arrow action.\n *\n * ### Usage\n *\n * `ui5-split-button` consists two separate buttons:\n *\n * - for the first one (default action) you can define some `text` or an `icon`, or both.\n * - the second one (arrow action) contains only `slim-arrow-down` icon.\n *\n * You can choose a `design` from a set of predefined types (the same as for ui5-button) that offer\n * different styling to correspond to the triggered action. Both text and arrow actions have the same design.\n *\n * You can set the `ui5-split-button` as enabled or disabled. Both parts of an enabled\n * `ui5-split-button` can be pressed by clicking or tapping it, or by certain keys, which changes\n * the style to provide visual feedback to the user that it is pressed or hovered over with\n * the mouse cursor. A disabled `ui5-split-button` appears inactive and any of the two buttons\n * cannot be pressed.\n *\n * ### Keyboard Handling\n *\n * - `Space` or `Enter` - triggers the default action\n * - `Shift` or `Escape` - if `Space` is pressed, releases the default action button without triggering the click event.\n * - `Arrow Down`, `Arrow Up`, `Alt`+`Arrow Down`, `Alt`+`Arrow Up`, or `F4` - triggers the arrow action\n * There are separate events that are fired on activating of `ui5-split-button` parts:\n *\n * - `click` for the first button (default action)\n * - `arrow-click` for the second button (arrow action)\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/SplitButton.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.1.0\n */\n@customElement({\n\ttag: \"ui5-split-button\",\n\trenderer: litRender,\n\tstyles: SplitButtonCss,\n\ttemplate: SplitButtonTemplate,\n\tdependencies: [Button],\n})\n/**\n * Fired when the user clicks on the default action.\n * @public\n */\n@event(\"click\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when the user clicks on the arrow action.\n * @public\n */\n@event(\"arrow-click\", {\n\tbubbles: true,\n})\nclass SplitButton extends UI5Element {\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 the arrow button should have the active state styles or not.\n\t * @default false\n\t * @public\n\t * @since 1.21.0\n\t */\n\t@property({ type: Boolean })\n\tactiveArrowButton = false;\n\n\t/**\n\t * Defines the component design.\n\t * @default \"Default\"\n\t * @public\n\t */\n\t@property()\n\tdesign: `${ButtonDesign}` = \"Default\";\n\n\t/**\n\t * Defines whether the component is disabled.\n\t * A disabled component can't be pressed or\n\t * focused, and it is not in the tab chain.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the tabIndex of the component.\n\t * @default \"0\"\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\t_tabIndex = \"0\"\n\n\t/**\n\t * Indicates if there is Space key pressed\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_spacePressed = false;\n\n\t/**\n\t * Indicates if there is SHIFT or ESCAPE key pressed\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_shiftOrEscapePressed = false;\n\n\t/**\n\t * Defines the active state of the text button\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_textButtonActive = false;\n\n\t/**\n\t * Defines the state of the internal Button used for the Arrow button of the SplitButton.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_activeArrowButton = false;\n\n\t/**\n\t * Defines the text of the component.\n\t *\n\t * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n\t * @public\n\t */\n\t@slot({ type: Node, \"default\": true })\n\ttext!: Array<Node>;\n\n\t_textButtonPress: { handleEvent: (e: MouseEvent) => void, passive: boolean };\n\t_isDefaultActionPressed = false;\n\t_isKeyDownOperation = false;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst handleTouchStartEvent = (e: MouseEvent) => {\n\t\t\te.stopPropagation();\n\t\t\tthis._textButtonActive = true;\n\t\t\tthis._tabIndex = \"-1\";\n\t\t};\n\n\t\tthis._textButtonPress = {\n\t\t\thandleEvent: handleTouchStartEvent,\n\t\t\tpassive: true,\n\t\t};\n\t}\n\n\tonBeforeRendering() {\n\t\tif (this.disabled) {\n\t\t\tthis._tabIndex = \"-1\";\n\t\t}\n\t}\n\n\t_handleMouseClick(e: MouseEvent) {\n\t\tthis._fireClick(e);\n\t}\n\n\t_onFocusOut() {\n\t\tif (this.disabled || this.getFocusDomRef()!.matches(\":has(:focus-within)\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._shiftOrEscapePressed = false;\n\t\tthis._setTabIndexValue();\n\t}\n\n\t_onFocusIn() {\n\t\tif (this.disabled || this.getFocusDomRef()!.matches(\":has(:focus-within)\")) {\n\t\t\treturn;\n\t\t}\n\t\tthis._shiftOrEscapePressed = false;\n\t}\n\n\t_onInnerButtonFocusIn(e: FocusEvent) {\n\t\te.stopPropagation();\n\t\tthis._setTabIndexValue(true);\n\t\tconst target = e.target as Button;\n\t\ttarget.focus();\n\t}\n\n\t_onKeyDown(e: KeyboardEvent) {\n\t\tthis._isKeyDownOperation = true;\n\t\tif (this._isArrowKeyAction(e)) {\n\t\t\tthis._handleArrowButtonAction(e);\n\t\t\tthis._activeArrowButton = true;\n\t\t} else if (this._isDefaultAction(e)) {\n\t\t\tthis._handleDefaultAction(e);\n\t\t\tthis._isDefaultActionPressed = true;\n\t\t}\n\n\t\tif (this._spacePressed && this._isShiftOrEscape(e)) {\n\t\t\tthis._handleShiftOrEscapePressed();\n\t\t}\n\n\t\t// Handles button freeze issue when pressing Enter/Space and navigating with Tab/Shift+Tab simultaneously.\n\t\tif (this._isDefaultActionPressed && (isTabNext(e) || isTabPrevious(e))) {\n\t\t\tthis._activeArrowButton = false;\n\t\t\tthis._textButtonActive = false;\n\t\t}\n\n\t\tthis._tabIndex = \"-1\";\n\t}\n\n\t_onKeyUp(e: KeyboardEvent) {\n\t\tthis._isKeyDownOperation = false;\n\t\tif (this._isArrowKeyAction(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._activeArrowButton = false;\n\t\t\tthis._textButtonActive = false;\n\t\t} else if (this._isDefaultAction(e)) {\n\t\t\tthis._isDefaultActionPressed = false;\n\t\t\tthis._textButtonActive = false;\n\t\t\tif (isSpace(e)) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\tthis._fireClick();\n\t\t\t\tthis._spacePressed = false;\n\t\t\t\tthis._textButtonActive = false;\n\t\t\t}\n\t\t}\n\n\t\tif (this._isShiftOrEscape(e)) {\n\t\t\tthis._handleShiftOrEscapePressed();\n\t\t}\n\n\t\tthis._tabIndex = \"-1\";\n\t}\n\n\t_fireClick(e?: Event) {\n\t\te?.stopPropagation();\n\t\tif (!this._shiftOrEscapePressed) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\t\tthis._shiftOrEscapePressed = false;\n\t}\n\n\t_fireArrowClick(e?: Event) {\n\t\te?.stopPropagation();\n\n\t\tthis.fireDecoratorEvent(\"arrow-click\");\n\t}\n\n\t_textButtonRelease() {\n\t\tthis._textButtonActive = false;\n\t\tthis._tabIndex = \"-1\";\n\t}\n\n\t_arrowButtonPress(e: MouseEvent) {\n\t\te.stopPropagation();\n\n\t\tthis._tabIndex = \"-1\";\n\t}\n\n\t_arrowButtonRelease(e: MouseEvent) {\n\t\te.preventDefault();\n\n\t\tthis._tabIndex = \"-1\";\n\t}\n\n\t_setTabIndexValue(innerButtonPressed?: boolean) {\n\t\tthis._tabIndex = this.disabled ? \"-1\" : \"0\";\n\n\t\tif (this._tabIndex === \"-1\" && innerButtonPressed) {\n\t\t\tthis._tabIndex = \"0\";\n\t\t}\n\t}\n\n\t_onArrowButtonActiveStateChange(e: CustomEvent) {\n\t\tif (this.activeArrowButton) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the pressed key is an arrow key.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_isArrowKeyAction(e: KeyboardEvent): boolean {\n\t\treturn isDown(e) || isUp(e) || isDownAlt(e) || isUpAlt(e) || isF4(e);\n\t}\n\n\t/**\n\t * Checks if the pressed key is a default action key (Space or Enter).\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_isDefaultAction(e: KeyboardEvent): boolean {\n\t\treturn isSpace(e) || isEnter(e);\n\t}\n\n\t/**\n\t * Checks if the pressed key is an escape key or shift key.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_isShiftOrEscape(e: KeyboardEvent): boolean {\n\t\treturn isEscape(e) || isShift(e);\n\t}\n\n\t/**\n\t * Handles the click event and the focus on the arrow button.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_handleArrowButtonAction(e: KeyboardEvent | MouseEvent) {\n\t\te.preventDefault();\n\n\t\tthis._fireArrowClick(e);\n\n\t\tif (isSpace((e as KeyboardEvent))) {\n\t\t\tthis._spacePressed = true;\n\t\t}\n\t}\n\n\t/**\n\t * Handles the default action and the active state of the respective button.\n\t * @param e - keyboard event\n\t * @private\n\t */\n\t_handleDefaultAction(e: KeyboardEvent) {\n\t\te.preventDefault();\n\t\tconst wasSpacePressed = isSpace(e);\n\t\tconst target = e.target as Button;\n\n\t\tif (this.arrowButton && target === this.arrowButton) {\n\t\t\tthis._activeArrowButton = true;\n\t\t\tthis._fireArrowClick();\n\t\t\tif (wasSpacePressed) {\n\t\t\t\tthis._spacePressed = true;\n\t\t\t\tthis._textButtonActive = false;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._textButtonActive = true;\n\t\t\tthis._fireClick();\n\t\t\tif (wasSpacePressed) {\n\t\t\t\tthis._spacePressed = true;\n\t\t\t}\n\t\t}\n\t}\n\n\t_handleShiftOrEscapePressed() {\n\t\tthis._shiftOrEscapePressed = true;\n\t\tthis._textButtonActive = false;\n\t\tthis._isKeyDownOperation = false;\n\t}\n\n\tget effectiveActiveArrowButton() {\n\t\treturn this.activeArrowButton || this._activeArrowButton;\n\t}\n\n\tget textButtonAccText() {\n\t\treturn this.textContent;\n\t}\n\n\tget isTextButton() {\n\t\treturn !!this.textContent;\n\t}\n\n\tget textButton() {\n\t\treturn this.getDomRef()?.querySelector<Button>(\".ui5-split-text-button\");\n\t}\n\n\tget arrowButton() {\n\t\treturn this.getDomRef()?.querySelector<Button>(\".ui5-split-arrow-button\");\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"description\": SplitButton.i18nBundle.getText(SPLIT_BUTTON_DESCRIPTION),\n\t\t\t\t\"keyboardHint\": SplitButton.i18nBundle.getText(SPLIT_BUTTON_KEYBOARD_HINT),\n\t\t\t},\n\t\t\tarrowButton: {\n\t\t\t\t\"title\": this.arrowButtonTooltip,\n\t\t\t\t\"accessibilityAttributes\": {\n\t\t\t\t\t\"hasPopup\": AriaHasPopup.Menu.toLocaleLowerCase(),\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\tget arrowButtonTooltip() {\n\t\treturn SplitButton.i18nBundle.getText(SPLIT_BUTTON_ARROW_BUTTON_TOOLTIP);\n\t}\n\n\tget ariaLabelText() {\n\t\treturn [SplitButton.i18nBundle.getText(SPLIT_BUTTON_DESCRIPTION), SplitButton.i18nBundle.getText(SPLIT_BUTTON_KEYBOARD_HINT)].join(\" \");\n\t}\n}\n\nSplitButton.define();\n\nexport default SplitButton;\n"]}
|