@ui5/webcomponents 2.5.0-rc.3 → 2.5.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 +8 -0
- package/cypress/specs/ColorPicker.cy.ts +1 -1
- package/cypress/specs/TableGrowing.cy.ts +0 -78
- package/dist/.tsbuildinfo +1 -1
- package/dist/ColorPicker.d.ts +3 -4
- package/dist/ColorPicker.js +6 -7
- package/dist/ColorPicker.js.map +1 -1
- package/dist/Icon.d.ts +1 -1
- package/dist/Icon.js +1 -1
- package/dist/Icon.js.map +1 -1
- package/dist/Popover.d.ts +1 -0
- package/dist/Popover.js +4 -0
- package/dist/Popover.js.map +1 -1
- package/dist/TableGrowing.d.ts +0 -7
- package/dist/TableGrowing.js +0 -16
- package/dist/TableGrowing.js.map +1 -1
- package/dist/css/themes/Avatar.css +1 -1
- package/dist/css/themes/AvatarGroup.css +1 -1
- package/dist/css/themes/Bar.css +1 -1
- package/dist/css/themes/Breadcrumbs.css +1 -1
- package/dist/css/themes/BusyIndicator.css +1 -1
- package/dist/css/themes/Button.css +1 -1
- package/dist/css/themes/Calendar.css +1 -1
- package/dist/css/themes/CalendarHeader.css +1 -1
- package/dist/css/themes/CalendarLegend.css +1 -1
- package/dist/css/themes/CalendarLegendItem.css +1 -1
- package/dist/css/themes/Card.css +1 -1
- package/dist/css/themes/CardHeader.css +1 -1
- package/dist/css/themes/Carousel.css +1 -1
- package/dist/css/themes/CheckBox.css +1 -1
- package/dist/css/themes/ColorPalette.css +1 -1
- package/dist/css/themes/ColorPaletteItem.css +1 -1
- package/dist/css/themes/ColorPalettePopover.css +1 -1
- package/dist/css/themes/ColorPicker.css +1 -1
- package/dist/css/themes/ComboBox.css +1 -1
- package/dist/css/themes/ComboBoxItem.css +1 -1
- package/dist/css/themes/DatePicker.css +1 -1
- package/dist/css/themes/DateTimePickerPopover.css +1 -1
- package/dist/css/themes/DayPicker.css +1 -1
- package/dist/css/themes/Dialog.css +1 -1
- package/dist/css/themes/FileUploader.css +1 -1
- package/dist/css/themes/Form.css +1 -1
- package/dist/css/themes/FormItem.css +1 -1
- package/dist/css/themes/FormItemSpan.css +1 -1
- package/dist/css/themes/GrowingButton.css +1 -1
- package/dist/css/themes/Icon.css +1 -1
- package/dist/css/themes/Input.css +1 -1
- package/dist/css/themes/InputIcon.css +1 -1
- package/dist/css/themes/InputSharedStyles.css +1 -1
- package/dist/css/themes/Link.css +1 -1
- package/dist/css/themes/List.css +1 -1
- package/dist/css/themes/ListItem.css +1 -1
- package/dist/css/themes/ListItemBase.css +1 -1
- package/dist/css/themes/ListItemCustom.css +1 -1
- package/dist/css/themes/ListItemGroup.css +1 -1
- package/dist/css/themes/ListItemGroupHeader.css +1 -1
- package/dist/css/themes/ListItemIcon.css +1 -1
- package/dist/css/themes/Menu.css +1 -1
- package/dist/css/themes/MenuItem.css +1 -1
- package/dist/css/themes/MessageStrip.css +1 -1
- package/dist/css/themes/MonthPicker.css +1 -1
- package/dist/css/themes/MultiComboBox.css +1 -1
- package/dist/css/themes/MultiComboBoxItem.css +1 -1
- package/dist/css/themes/MultiComboBoxPopover.css +1 -1
- package/dist/css/themes/MultiInput.css +1 -1
- package/dist/css/themes/NavigationMenu.css +1 -1
- package/dist/css/themes/NavigationMenuItem.css +1 -1
- package/dist/css/themes/OptionBase.css +1 -1
- package/dist/css/themes/Panel.css +1 -1
- package/dist/css/themes/Popover.css +1 -1
- package/dist/css/themes/PopupsCommon.css +1 -1
- package/dist/css/themes/ProgressIndicator.css +1 -1
- package/dist/css/themes/RadioButton.css +1 -1
- package/dist/css/themes/RangeSlider.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/ResponsivePopover.css +1 -1
- package/dist/css/themes/ResponsivePopoverCommon.css +1 -1
- package/dist/css/themes/SegmentedButton.css +1 -1
- package/dist/css/themes/SegmentedButtonItem.css +1 -1
- package/dist/css/themes/Select.css +1 -1
- package/dist/css/themes/SliderBase.css +1 -1
- package/dist/css/themes/SplitButton.css +1 -1
- package/dist/css/themes/StepInput.css +1 -1
- package/dist/css/themes/SuggestionItem.css +1 -1
- package/dist/css/themes/SuggestionItemCustom.css +1 -1
- package/dist/css/themes/Switch.css +1 -1
- package/dist/css/themes/TabContainer.css +1 -1
- package/dist/css/themes/TabInOverflow.css +1 -1
- package/dist/css/themes/TabInStrip.css +1 -1
- package/dist/css/themes/TabSemanticIcon.css +1 -1
- package/dist/css/themes/TabSeparatorInOverflow.css +1 -1
- package/dist/css/themes/Table.css +1 -1
- package/dist/css/themes/TableCellBase.css +1 -1
- package/dist/css/themes/TableHeaderRow.css +1 -1
- package/dist/css/themes/TableRow.css +1 -1
- package/dist/css/themes/TableRowBase.css +1 -1
- package/dist/css/themes/Tag.css +1 -1
- package/dist/css/themes/Text.css +1 -1
- package/dist/css/themes/TextArea.css +1 -1
- package/dist/css/themes/TimePicker.css +1 -1
- package/dist/css/themes/Toast.css +1 -1
- package/dist/css/themes/ToggleButton.css +1 -1
- package/dist/css/themes/Token.css +1 -1
- package/dist/css/themes/Tokenizer.css +1 -1
- package/dist/css/themes/TokenizerPopover.css +1 -1
- package/dist/css/themes/Toolbar.css +1 -1
- package/dist/css/themes/ToolbarPopover.css +1 -1
- package/dist/css/themes/TreeItem.css +1 -1
- package/dist/css/themes/ValueStateMessage.css +1 -1
- package/dist/css/themes/YearPicker.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw_exp/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +10 -78
- package/dist/custom-elements.json +10 -51
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/themes/Avatar.css.js +1 -1
- package/dist/generated/themes/Avatar.css.js.map +1 -1
- package/dist/generated/themes/AvatarGroup.css.js +1 -1
- package/dist/generated/themes/AvatarGroup.css.js.map +1 -1
- package/dist/generated/themes/Bar.css.js +1 -1
- package/dist/generated/themes/Bar.css.js.map +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js.map +1 -1
- package/dist/generated/themes/BusyIndicator.css.js +1 -1
- package/dist/generated/themes/BusyIndicator.css.js.map +1 -1
- package/dist/generated/themes/Button.css.js +1 -1
- package/dist/generated/themes/Button.css.js.map +1 -1
- package/dist/generated/themes/Calendar.css.js +1 -1
- package/dist/generated/themes/Calendar.css.js.map +1 -1
- package/dist/generated/themes/CalendarHeader.css.js +1 -1
- package/dist/generated/themes/CalendarHeader.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegend.css.js +1 -1
- package/dist/generated/themes/CalendarLegend.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js.map +1 -1
- package/dist/generated/themes/Card.css.js +1 -1
- package/dist/generated/themes/Card.css.js.map +1 -1
- package/dist/generated/themes/CardHeader.css.js +1 -1
- package/dist/generated/themes/CardHeader.css.js.map +1 -1
- package/dist/generated/themes/Carousel.css.js +1 -1
- package/dist/generated/themes/Carousel.css.js.map +1 -1
- package/dist/generated/themes/CheckBox.css.js +1 -1
- package/dist/generated/themes/CheckBox.css.js.map +1 -1
- package/dist/generated/themes/ColorPalette.css.js +1 -1
- package/dist/generated/themes/ColorPalette.css.js.map +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js.map +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js.map +1 -1
- package/dist/generated/themes/ColorPicker.css.js +1 -1
- package/dist/generated/themes/ColorPicker.css.js.map +1 -1
- package/dist/generated/themes/ComboBox.css.js +1 -1
- package/dist/generated/themes/ComboBox.css.js.map +1 -1
- package/dist/generated/themes/ComboBoxItem.css.js +1 -1
- package/dist/generated/themes/ComboBoxItem.css.js.map +1 -1
- package/dist/generated/themes/DatePicker.css.js +1 -1
- package/dist/generated/themes/DatePicker.css.js.map +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js.map +1 -1
- package/dist/generated/themes/DayPicker.css.js +1 -1
- package/dist/generated/themes/DayPicker.css.js.map +1 -1
- package/dist/generated/themes/Dialog.css.js +1 -1
- package/dist/generated/themes/Dialog.css.js.map +1 -1
- package/dist/generated/themes/FileUploader.css.js +1 -1
- package/dist/generated/themes/FileUploader.css.js.map +1 -1
- package/dist/generated/themes/Form.css.js +1 -1
- package/dist/generated/themes/Form.css.js.map +1 -1
- package/dist/generated/themes/FormItem.css.js +1 -1
- package/dist/generated/themes/FormItem.css.js.map +1 -1
- package/dist/generated/themes/FormItemSpan.css.js +1 -1
- package/dist/generated/themes/FormItemSpan.css.js.map +1 -1
- package/dist/generated/themes/GrowingButton.css.js +1 -1
- package/dist/generated/themes/GrowingButton.css.js.map +1 -1
- package/dist/generated/themes/Icon.css.js +1 -1
- package/dist/generated/themes/Icon.css.js.map +1 -1
- package/dist/generated/themes/Input.css.js +1 -1
- package/dist/generated/themes/Input.css.js.map +1 -1
- package/dist/generated/themes/InputIcon.css.js +1 -1
- package/dist/generated/themes/InputIcon.css.js.map +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js.map +1 -1
- package/dist/generated/themes/Link.css.js +1 -1
- package/dist/generated/themes/Link.css.js.map +1 -1
- package/dist/generated/themes/List.css.js +1 -1
- package/dist/generated/themes/List.css.js.map +1 -1
- package/dist/generated/themes/ListItem.css.js +1 -1
- package/dist/generated/themes/ListItem.css.js.map +1 -1
- package/dist/generated/themes/ListItemBase.css.js +1 -1
- package/dist/generated/themes/ListItemBase.css.js.map +1 -1
- package/dist/generated/themes/ListItemCustom.css.js +1 -1
- package/dist/generated/themes/ListItemCustom.css.js.map +1 -1
- package/dist/generated/themes/ListItemGroup.css.js +1 -1
- package/dist/generated/themes/ListItemGroup.css.js.map +1 -1
- package/dist/generated/themes/ListItemGroupHeader.css.js +1 -1
- package/dist/generated/themes/ListItemGroupHeader.css.js.map +1 -1
- package/dist/generated/themes/ListItemIcon.css.js +1 -1
- package/dist/generated/themes/ListItemIcon.css.js.map +1 -1
- package/dist/generated/themes/Menu.css.js +1 -1
- package/dist/generated/themes/Menu.css.js.map +1 -1
- package/dist/generated/themes/MenuItem.css.js +1 -1
- package/dist/generated/themes/MenuItem.css.js.map +1 -1
- package/dist/generated/themes/MessageStrip.css.js +1 -1
- package/dist/generated/themes/MessageStrip.css.js.map +1 -1
- package/dist/generated/themes/MonthPicker.css.js +1 -1
- package/dist/generated/themes/MonthPicker.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBox.css.js +1 -1
- package/dist/generated/themes/MultiComboBox.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBoxItem.css.js +1 -1
- package/dist/generated/themes/MultiComboBoxItem.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js.map +1 -1
- package/dist/generated/themes/MultiInput.css.js +1 -1
- package/dist/generated/themes/MultiInput.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenu.css.js +1 -1
- package/dist/generated/themes/NavigationMenu.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenuItem.css.js +1 -1
- package/dist/generated/themes/NavigationMenuItem.css.js.map +1 -1
- package/dist/generated/themes/OptionBase.css.js +1 -1
- package/dist/generated/themes/OptionBase.css.js.map +1 -1
- package/dist/generated/themes/Panel.css.js +1 -1
- package/dist/generated/themes/Panel.css.js.map +1 -1
- package/dist/generated/themes/Popover.css.js +1 -1
- package/dist/generated/themes/Popover.css.js.map +1 -1
- package/dist/generated/themes/PopupsCommon.css.js +1 -1
- package/dist/generated/themes/PopupsCommon.css.js.map +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js.map +1 -1
- package/dist/generated/themes/RadioButton.css.js +1 -1
- package/dist/generated/themes/RadioButton.css.js.map +1 -1
- package/dist/generated/themes/RangeSlider.css.js +1 -1
- package/dist/generated/themes/RangeSlider.css.js.map +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js.map +1 -1
- package/dist/generated/themes/SegmentedButton.css.js +1 -1
- package/dist/generated/themes/SegmentedButton.css.js.map +1 -1
- package/dist/generated/themes/SegmentedButtonItem.css.js +1 -1
- package/dist/generated/themes/SegmentedButtonItem.css.js.map +1 -1
- package/dist/generated/themes/Select.css.js +1 -1
- package/dist/generated/themes/Select.css.js.map +1 -1
- package/dist/generated/themes/SliderBase.css.js +1 -1
- package/dist/generated/themes/SliderBase.css.js.map +1 -1
- package/dist/generated/themes/SplitButton.css.js +1 -1
- package/dist/generated/themes/SplitButton.css.js.map +1 -1
- package/dist/generated/themes/StepInput.css.js +1 -1
- package/dist/generated/themes/StepInput.css.js.map +1 -1
- package/dist/generated/themes/SuggestionItem.css.js +1 -1
- package/dist/generated/themes/SuggestionItem.css.js.map +1 -1
- package/dist/generated/themes/SuggestionItemCustom.css.js +1 -1
- package/dist/generated/themes/SuggestionItemCustom.css.js.map +1 -1
- package/dist/generated/themes/Switch.css.js +1 -1
- package/dist/generated/themes/Switch.css.js.map +1 -1
- package/dist/generated/themes/TabContainer.css.js +1 -1
- package/dist/generated/themes/TabContainer.css.js.map +1 -1
- package/dist/generated/themes/TabInOverflow.css.js +1 -1
- package/dist/generated/themes/TabInOverflow.css.js.map +1 -1
- package/dist/generated/themes/TabInStrip.css.js +1 -1
- package/dist/generated/themes/TabInStrip.css.js.map +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js.map +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js.map +1 -1
- package/dist/generated/themes/Table.css.js +1 -1
- package/dist/generated/themes/Table.css.js.map +1 -1
- package/dist/generated/themes/TableCellBase.css.js +1 -1
- package/dist/generated/themes/TableCellBase.css.js.map +1 -1
- package/dist/generated/themes/TableHeaderRow.css.js +1 -1
- package/dist/generated/themes/TableHeaderRow.css.js.map +1 -1
- package/dist/generated/themes/TableRow.css.js +1 -1
- package/dist/generated/themes/TableRow.css.js.map +1 -1
- package/dist/generated/themes/TableRowBase.css.js +1 -1
- package/dist/generated/themes/TableRowBase.css.js.map +1 -1
- package/dist/generated/themes/Tag.css.js +1 -1
- package/dist/generated/themes/Tag.css.js.map +1 -1
- package/dist/generated/themes/Text.css.js +1 -1
- package/dist/generated/themes/Text.css.js.map +1 -1
- package/dist/generated/themes/TextArea.css.js +1 -1
- package/dist/generated/themes/TextArea.css.js.map +1 -1
- package/dist/generated/themes/TimePicker.css.js +1 -1
- package/dist/generated/themes/TimePicker.css.js.map +1 -1
- package/dist/generated/themes/Toast.css.js +1 -1
- package/dist/generated/themes/Toast.css.js.map +1 -1
- package/dist/generated/themes/ToggleButton.css.js +1 -1
- package/dist/generated/themes/ToggleButton.css.js.map +1 -1
- package/dist/generated/themes/Token.css.js +1 -1
- package/dist/generated/themes/Token.css.js.map +1 -1
- package/dist/generated/themes/Tokenizer.css.js +1 -1
- package/dist/generated/themes/Tokenizer.css.js.map +1 -1
- package/dist/generated/themes/TokenizerPopover.css.js +1 -1
- package/dist/generated/themes/TokenizerPopover.css.js.map +1 -1
- package/dist/generated/themes/Toolbar.css.js +1 -1
- package/dist/generated/themes/Toolbar.css.js.map +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js.map +1 -1
- package/dist/generated/themes/TreeItem.css.js +1 -1
- package/dist/generated/themes/TreeItem.css.js.map +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js.map +1 -1
- package/dist/generated/themes/YearPicker.css.js +1 -1
- package/dist/generated/themes/YearPicker.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +4 -9
- package/dist/web-types.json +8 -21
- package/package.json +9 -9
- package/src/themes/Popover.css +0 -8
- package/src/themes/base/rtl-parameters.css +2 -1
- package/dist/types/ColorPickerDisplayMode.d.ts +0 -17
- package/dist/types/ColorPickerDisplayMode.js +0 -19
- package/dist/types/ColorPickerDisplayMode.js.map +0 -1
package/dist/ColorPicker.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
|
2
2
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
3
3
|
import type { IFormInputElement } from "@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js";
|
|
4
4
|
import type { ColorRGB } from "@ui5/webcomponents-base/dist/util/ColorConversion.js";
|
|
5
|
-
import ColorPickerDisplayMode from "./types/ColorPickerDisplayMode.js";
|
|
6
5
|
type ColorCoordinates = {
|
|
7
6
|
x: number;
|
|
8
7
|
y: number;
|
|
@@ -54,12 +53,12 @@ declare class ColorPicker extends UI5Element implements IFormInputElement {
|
|
|
54
53
|
*/
|
|
55
54
|
name?: string;
|
|
56
55
|
/**
|
|
57
|
-
*
|
|
58
|
-
* @default
|
|
56
|
+
* When set to `true`, the alpha slider and inputs for RGB values will not be displayed.
|
|
57
|
+
* @default false
|
|
59
58
|
* @public
|
|
60
59
|
* @since 2.5.0
|
|
61
60
|
*/
|
|
62
|
-
|
|
61
|
+
simplified: boolean;
|
|
63
62
|
/**
|
|
64
63
|
* Defines the HEX code of the currently selected color
|
|
65
64
|
*
|
package/dist/ColorPicker.js
CHANGED
|
@@ -18,7 +18,6 @@ import ColorPickerTemplate from "./generated/templates/ColorPickerTemplate.lit.j
|
|
|
18
18
|
import Input from "./Input.js";
|
|
19
19
|
import Slider from "./Slider.js";
|
|
20
20
|
import Label from "./Label.js";
|
|
21
|
-
import ColorPickerDisplayMode from "./types/ColorPickerDisplayMode.js";
|
|
22
21
|
import { COLORPICKER_ALPHA_SLIDER, COLORPICKER_HUE_SLIDER, COLORPICKER_HEX, COLORPICKER_RED, COLORPICKER_GREEN, COLORPICKER_BLUE, COLORPICKER_ALPHA, } from "./generated/i18n/i18n-defaults.js";
|
|
23
22
|
// Styles
|
|
24
23
|
import ColorPickerCss from "./generated/themes/ColorPicker.css.js";
|
|
@@ -66,12 +65,12 @@ let ColorPicker = ColorPicker_1 = class ColorPicker extends UI5Element {
|
|
|
66
65
|
*/
|
|
67
66
|
this.value = "rgba(255,255,255,1)";
|
|
68
67
|
/**
|
|
69
|
-
*
|
|
70
|
-
* @default
|
|
68
|
+
* When set to `true`, the alpha slider and inputs for RGB values will not be displayed.
|
|
69
|
+
* @default false
|
|
71
70
|
* @public
|
|
72
71
|
* @since 2.5.0
|
|
73
72
|
*/
|
|
74
|
-
this.
|
|
73
|
+
this.simplified = false;
|
|
75
74
|
/**
|
|
76
75
|
* Defines the HEX code of the currently selected color
|
|
77
76
|
*
|
|
@@ -395,7 +394,7 @@ let ColorPicker = ColorPicker_1 = class ColorPicker extends UI5Element {
|
|
|
395
394
|
return this._wrongHEX ? "Error" : undefined;
|
|
396
395
|
}
|
|
397
396
|
get _isDefaultPickerMode() {
|
|
398
|
-
return this.
|
|
397
|
+
return !this.simplified;
|
|
399
398
|
}
|
|
400
399
|
get styles() {
|
|
401
400
|
return {
|
|
@@ -419,8 +418,8 @@ __decorate([
|
|
|
419
418
|
property()
|
|
420
419
|
], ColorPicker.prototype, "name", void 0);
|
|
421
420
|
__decorate([
|
|
422
|
-
property()
|
|
423
|
-
], ColorPicker.prototype, "
|
|
421
|
+
property({ type: Boolean })
|
|
422
|
+
], ColorPicker.prototype, "simplified", void 0);
|
|
424
423
|
__decorate([
|
|
425
424
|
property({ noAttribute: true })
|
|
426
425
|
], ColorPicker.prototype, "hex", void 0);
|
package/dist/ColorPicker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.js","sourceRoot":"","sources":["../src/ColorPicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4C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,QAAQ,EAAE;yCACG;AASd;IADC,QAAQ,EAAE;gDAC0C;AASrD;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;wCACjB;AAOf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CACN;AAOrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACgB;AAM3C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yDACY;AAMvC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAChB;AAMX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAClB;AAMT;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4DACI;AAMhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDACD;AAM3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CACV;AASX;IADN,IAAI,CAAC,oBAAoB,CAAC;qCACG;AApGzB,WAAW;IApBhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,SAAS;QACnB,cAAc,EAAE,IAAI;QACpB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;QAC7B,YAAY,EAAE;YACb,KAAK;YACL,MAAM;YACN,KAAK;SACL;QACD,iBAAiB,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE;KAC3C,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;GACI,WAAW,CAsdhB;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 property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport { isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getScopedVarName } from \"@ui5/webcomponents-base/dist/CustomElementsScope.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport {\n\tgetRGBColor,\n\tHSLToRGB,\n\tHEXToRGB,\n\tRGBToHSL,\n} from \"@ui5/webcomponents-base/dist/util/ColorConversion.js\";\nimport type {\n\tColorHSL,\n\tColorRGB,\n} from \"@ui5/webcomponents-base/dist/util/ColorConversion.js\";\nimport ColorPickerTemplate from \"./generated/templates/ColorPickerTemplate.lit.js\";\nimport Input from \"./Input.js\";\nimport Slider from \"./Slider.js\";\nimport Label from \"./Label.js\";\nimport ColorPickerDisplayMode from \"./types/ColorPickerDisplayMode.js\";\n\nimport {\n\tCOLORPICKER_ALPHA_SLIDER,\n\tCOLORPICKER_HUE_SLIDER,\n\tCOLORPICKER_HEX,\n\tCOLORPICKER_RED,\n\tCOLORPICKER_GREEN,\n\tCOLORPICKER_BLUE,\n\tCOLORPICKER_ALPHA,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport ColorPickerCss from \"./generated/themes/ColorPicker.css.js\";\n\nconst PICKER_POINTER_WIDTH = 6.5;\n\ntype ColorCoordinates = {\n\tx: number,\n\ty: number,\n}\n\n/**\n * @class\n *\n * ### Overview\n * The `ui5-color-picker` allows users to choose any color and provides different input options for selecting colors.\n *\n * ### Usage\n *\n * #### When to use\n * Use the color picker if:\n *\n * - users need to select any color freely.\n *\n * #### When not to use\n *\n * - Users need to select one color from a predefined set of colors. Use the ColorPalette component instead.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/ColorPicker.js\";`\n * @constructor\n * @since 1.0.0-rc.12\n * @extends UI5Element\n * @public\n */\n\n@customElement({\n\ttag: \"ui5-color-picker\",\n\trenderer: litRender,\n\tformAssociated: true,\n\tstyles: ColorPickerCss,\n\ttemplate: ColorPickerTemplate,\n\tdependencies: [\n\t\tInput,\n\t\tSlider,\n\t\tLabel,\n\t],\n\tshadowRootOptions: { delegatesFocus: true },\n})\n/**\n * Fired when the the selected color is changed\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\nclass ColorPicker extends UI5Element implements IFormInputElement {\n\teventDetails!: {\n\t\tchange: void;\n\t}\n\t/**\n\t * Defines the currently selected color of the component.\n\t *\n\t * **Note**: use HEX, RGB, RGBA, HSV formats or a CSS color name when modifying this property.\n\t * @default \"rgba(255,255,255,1)\"\n\t * @public\n\t */\n\t@property()\n\tvalue = \"rgba(255,255,255,1)\";\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 display mode of the component.\n\t * @default \"Default\"\n\t * @public\n\t * @since 2.5.0\n\t */\n\t@property()\n\tdisplayMode: `${ColorPickerDisplayMode}` = \"Default\";\n\n\t/**\n\t * Defines the HEX code of the currently selected color\n\t *\n\t * **Note**: If Alpha(transperancy) is set it is not included in this property. Use `color` property.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\thex = \"ffffff\";\n\n\t/**\n\t * Defines the current main color which is selected via the hue slider and is shown in the main color square.\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_mainValue: ColorRGB;\n\n\t/**\n\t * Defines the currenty selected color from the main color section.\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_value: ColorRGB = getRGBColor(this.value);\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_selectedCoordinates: ColorCoordinates;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_alpha = 1;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_hue = 0;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isSelectedColorChanged = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isHueValueChanged = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_wrongHEX = false;\n\n\tselectedHue: number;\n\n\tmouseDown: boolean;\n\n\tmouseIn: boolean;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\tget formFormattedValue() {\n\t\treturn this.value;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\n\t\t// Bottom Right corner\n\t\tthis._selectedCoordinates = {\n\t\t\tx: 256 - PICKER_POINTER_WIDTH,\n\t\t\ty: 256 - PICKER_POINTER_WIDTH,\n\t\t};\n\n\t\t// Default main color is red\n\t\tthis._mainValue = {\n\t\t\tr: 255,\n\t\t\tg: 0,\n\t\t\tb: 0,\n\t\t};\n\n\t\tthis.selectedHue = 0;\n\n\t\tthis.mouseDown = false;\n\t\tthis.mouseIn = false;\n\t}\n\n\tonBeforeRendering() {\n\t\t// we have the color & ._mainValue properties here\n\t\tthis._value = getRGBColor(this.value);\n\t\tconst tempColor = `rgba(${this._value.r},${this._value.g},${this._value.b},1)`;\n\t\tthis._setHex();\n\t\tthis._setValues();\n\t\tthis.style.setProperty(getScopedVarName(\"--ui5_Color_Picker_Progress_Container_Color\"), tempColor);\n\t}\n\n\t_handleMouseDown(e: MouseEvent) {\n\t\tthis.mouseDown = true;\n\t\tthis.mouseIn = true;\n\t\tthis._changeSelectedColor(e.offsetX, e.offsetY);\n\t}\n\n\t_handleMouseUp() {\n\t\tthis.mouseDown = false;\n\t}\n\n\t_handleMouseOut(e: MouseEvent) {\n\t\tif (!this.mouseIn || !this.mouseDown) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst target = e.target as HTMLElement;\n\t\tconst offsetHeight: number = target.offsetHeight;\n\t\tconst offsetWidth: number = target.offsetWidth;\n\t\tconst isLeft: boolean = e.offsetX <= 0;\n\t\tconst isUp: boolean = e.offsetY <= 0;\n\t\tconst isDown: boolean = e.offsetY >= target.offsetHeight;\n\t\tconst isRight: boolean = e.offsetX >= target.offsetWidth;\n\n\t\tlet x: number,\n\t\t\ty: number;\n\n\t\tif (isLeft) {\n\t\t\tx = 0;\n\t\t} else if (isRight) {\n\t\t\t// Note: - e.offsetWidth has been changed to e.target.offsetWidth as offsetWidth does not exist on the event object\n\t\t\tx = offsetWidth;\n\t\t} else {\n\t\t\tx = e.offsetX;\n\t\t}\n\n\t\tif (isUp) {\n\t\t\ty = 0;\n\t\t} else if (isDown) {\n\t\t\t// Note: - e.offsetWidth has been changed to e.target.offsetWidth as offsetWidth does not exist on the event object\n\t\t\ty = offsetHeight;\n\t\t} else {\n\t\t\ty = e.offsetY;\n\t\t}\n\n\t\tthis._changeSelectedColor(x, y);\n\t\tthis.mouseIn = false;\n\t\tthis.mouseDown = false;\n\t}\n\n\t_handleMouseMove(e: MouseEvent) {\n\t\tif (!this.mouseDown || !this.mouseIn) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changeSelectedColor(e.offsetX, e.offsetY);\n\t}\n\n\t_handleAlphaInput(e: CustomEvent) {\n\t\tconst aphaInputValue: string = (e.target as Input).value;\n\t\tthis._alpha = parseFloat(aphaInputValue);\n\t\tif (Number.isNaN(this._alpha)) {\n\t\t\tthis._alpha = 1;\n\t\t}\n\t\tthis._isHueValueChanged = true;\n\t\tthis._setColor(this._value);\n\t}\n\n\t_handleHueInput(e: CustomEvent) {\n\t\tthis.selectedHue = (e.target as Slider).value;\n\t\tthis._hue = this.selectedHue;\n\t\tthis._setMainColor(this._hue);\n\t\t// Idication that changes to the hue value triggered as a result of user pressing over the hue slider.\n\t\tthis._isHueValueChanged = true;\n\n\t\tconst x: number = this._selectedCoordinates.x + PICKER_POINTER_WIDTH;\n\t\tconst y: number = this._selectedCoordinates.y + PICKER_POINTER_WIDTH;\n\t\tconst tempColor = this._calculateColorFromCoordinates(x, y);\n\n\t\tif (tempColor) {\n\t\t\tthis._setColor(HSLToRGB(tempColor));\n\t\t}\n\t}\n\n\t_handleHEXChange(e: CustomEvent | KeyboardEvent) {\n\t\tconst hexRegex = new RegExp(\"^[<0-9 abcdef]+$\");\n\t\tconst input: Input = (e.target as Input);\n\t\tlet inputValueLowerCase = input.value.toLowerCase();\n\n\t\t// Shorthand Syntax\n\t\tif (inputValueLowerCase.length === 3) {\n\t\t\tinputValueLowerCase = `${inputValueLowerCase[0]}${inputValueLowerCase[0]}${inputValueLowerCase[1]}${inputValueLowerCase[1]}${inputValueLowerCase[2]}${inputValueLowerCase[2]}`;\n\t\t}\n\n\t\tconst isNewValueValid = inputValueLowerCase.length === 6 && hexRegex.test(inputValueLowerCase);\n\n\t\tif (isNewValueValid && input.value !== inputValueLowerCase) {\n\t\t\tthis._wrongHEX = false;\n\t\t\tinput.value = inputValueLowerCase;\n\t\t}\n\n\t\tif (inputValueLowerCase === this.hex) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.hex = inputValueLowerCase;\n\n\t\tif (!isNewValueValid) {\n\t\t\tthis._wrongHEX = true;\n\t\t} else {\n\t\t\tthis._wrongHEX = false;\n\t\t\tthis._setColor(HEXToRGB(this.hex));\n\t\t}\n\t}\n\n\t_handleRGBInputsChange(e: CustomEvent) {\n\t\tconst target = e.target as Input;\n\t\tconst targetValue = parseInt(target.value) || 0;\n\t\tlet tempColor;\n\t\tswitch (target.id) {\n\t\tcase \"red\":\n\t\t\ttempColor = { ...this._value, r: targetValue };\n\t\t\tbreak;\n\n\t\tcase \"green\":\n\t\t\ttempColor = { ...this._value, g: targetValue };\n\t\t\tbreak;\n\n\t\tcase \"blue\":\n\t\t\ttempColor = { ...this._value, b: targetValue };\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ttempColor = { ...this._value };\n\t\t}\n\n\t\tthis._setColor(tempColor);\n\t}\n\n\t_setMainColor(hueValue: number) {\n\t\tif (hueValue <= 255) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255,\n\t\t\t\tg: hueValue,\n\t\t\t\tb: 0,\n\t\t\t};\n\t\t} else if (hueValue <= 510) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255 - (hueValue - 255),\n\t\t\t\tg: 255,\n\t\t\t\tb: 0,\n\t\t\t};\n\t\t} else if (hueValue <= 765) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 0,\n\t\t\t\tg: 255,\n\t\t\t\tb: hueValue - 510,\n\t\t\t};\n\t\t} else if (hueValue <= 1020) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 0,\n\t\t\t\tg: 765 - (hueValue - 255),\n\t\t\t\tb: 255,\n\t\t\t};\n\t\t} else if (hueValue <= 1275) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: hueValue - 1020,\n\t\t\t\tg: 0,\n\t\t\t\tb: 255,\n\t\t\t};\n\t\t} else {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255,\n\t\t\t\tg: 0,\n\t\t\t\tb: 1275 - (hueValue - 255),\n\t\t\t};\n\t\t}\n\t}\n\n\t_handleAlphaChange() {\n\t\tthis._alpha = this._alpha < 0 ? 0 : this._alpha;\n\t\tthis._alpha = this._alpha > 1 ? 1 : this._alpha;\n\t}\n\n\t_changeSelectedColor(x: number, y: number) {\n\t\tthis._selectedCoordinates = {\n\t\t\tx: x - PICKER_POINTER_WIDTH, // Center the coordinates, because of the width of the circle\n\t\t\ty: y - PICKER_POINTER_WIDTH, // Center the coordinates, because of the height of the circle\n\t\t};\n\n\t\t// Idication that changes to the color settings are triggered as a result of user pressing over the main color section.\n\t\tthis._isSelectedColorChanged = true;\n\n\t\tconst tempColor = this._calculateColorFromCoordinates(x, y);\n\t\tif (tempColor) {\n\t\t\tthis._setColor(HSLToRGB(tempColor));\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isEnter(e)) {\n\t\t\tthis._handleHEXChange(e);\n\t\t}\n\t}\n\n\t_calculateColorFromCoordinates(x: number, y: number) {\n\t\t// By using the selected coordinates(x = Lightness, y = Saturation) and hue(selected from the hue slider)\n\t\t// and HSL format, the color will be parsed to RGB\n\t\t// 0 ≤ H < 360\n\t\t// 4.251 because with 4.25 we get out of the colors range.\n\t\tconst h = this._hue / 4.251;\n\n\t\t// 0 ≤ S ≤ 1\n\t\tconst s = 1 - +(Math.round(parseFloat((y / 256) + \"e+2\")) + \"e-2\"); // eslint-disable-line\n\n\t\t// 0 ≤ V ≤ 1\n\t\tconst l = +(Math.round(parseFloat((x / 256) + \"e+2\")) + \"e-2\"); // eslint-disable-line\n\n\t\tif (!s || !l) {\n\t\t\t// The event is finished out of the main color section\n\t\t\treturn;\n\t\t}\n\n\t\treturn {\n\t\t\th,\n\t\t\ts,\n\t\t\tl,\n\t\t};\n\t}\n\n\t_setColor(color: ColorRGB = { r: 0, g: 0, b: 0 }) {\n\t\tthis.value = `rgba(${color.r}, ${color.g}, ${color.b}, ${this._alpha})`;\n\t\tthis._wrongHEX = !this.isValidRGBColor(color);\n\t\tthis.fireDecoratorEvent(\"change\");\n\t}\n\n\tisValidRGBColor(color: ColorRGB) {\n\t\treturn color.r >= 0 && color.r <= 255 && color.g >= 0 && color.g <= 255 && color.b >= 0 && color.b <= 255;\n\t}\n\n\t_setHex() {\n\t\tlet red = this._value.r.toString(16),\n\t\t\tgreen = this._value.g.toString(16),\n\t\t\tblue = this._value.b.toString(16);\n\n\t\tif (red.length === 1) {\n\t\t\tred = `0${red}`;\n\t\t}\n\t\tif (green.length === 1) {\n\t\t\tgreen = `0${green}`;\n\t\t}\n\t\tif (blue.length === 1) {\n\t\t\tblue = `0${blue}`;\n\t\t}\n\n\t\tthis.hex = red + green + blue;\n\t}\n\n\t_setValues() {\n\t\tconst hslColours: ColorHSL = RGBToHSL(this._value);\n\t\tthis._selectedCoordinates = {\n\t\t\tx: ((Math.round(hslColours.l * 100) * 2.56)) - PICKER_POINTER_WIDTH, // Center the coordinates, because of the width of the circle\n\t\t\ty: (256 - (Math.round(hslColours.s * 100) * 2.56)) - PICKER_POINTER_WIDTH, // Center the coordinates, because of the height of the circle\n\t\t};\n\n\t\tif (this._isSelectedColorChanged) { // We shouldn't update the hue value when user presses over the main color section.\n\t\t\tthis._isSelectedColorChanged = false;\n\t\t} else if (this._isHueValueChanged) { // We shouldn't recalculate the hue value when user changes the hue slider.\n\t\t\tthis._isHueValueChanged = false;\n\t\t\tthis._hue = this.selectedHue ? this.selectedHue : this._hue;\n\t\t} else {\n\t\t\tthis._hue = Math.round(hslColours.h * 4.25);\n\t\t}\n\n\t\tthis._setMainColor(this._hue);\n\t}\n\n\tget hueSliderLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HUE_SLIDER);\n\t}\n\n\tget alphaSliderLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_ALPHA_SLIDER);\n\t}\n\n\tget hexInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HEX);\n\t}\n\n\tget redInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_RED);\n\t}\n\n\tget greenInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_GREEN);\n\t}\n\n\tget blueInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_BLUE);\n\t}\n\n\tget alphaInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_ALPHA);\n\t}\n\n\tget inputsDisabled() {\n\t\treturn this._wrongHEX ? true : undefined;\n\t}\n\n\tget hexInputErrorState() {\n\t\treturn this._wrongHEX ? \"Error\" : undefined;\n\t}\n\n\tget _isDefaultPickerMode() {\n\t\treturn this.displayMode === ColorPickerDisplayMode.Default;\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\tmainColor: {\n\t\t\t\t\"background-color\": `rgb(${this._mainValue.r}, ${this._mainValue.g}, ${this._mainValue.b})`,\n\t\t\t},\n\t\t\tcircle: {\n\t\t\t\tleft: `${this._selectedCoordinates.x}px`,\n\t\t\t\ttop: `${this._selectedCoordinates.y}px`,\n\t\t\t},\n\t\t\tcolorSpan: {\n\t\t\t\t\"background-color\": `rgba(${this._value.r}, ${this._value.g}, ${this._value.b}, ${this._alpha})`,\n\t\t\t},\n\t\t};\n\t}\n}\n\nColorPicker.define();\n\nexport default ColorPicker;\n"]}
|
|
1
|
+
{"version":3,"file":"ColorPicker.js","sourceRoot":"","sources":["../src/ColorPicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC/D,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AAEvF,OAAO,EACN,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,GACR,MAAM,sDAAsD,CAAC;AAK9D,OAAO,mBAAmB,MAAM,kDAAkD,CAAC;AACnF,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,OAAO,EACN,wBAAwB,EACxB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,GACjB,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,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AG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,SAAS;QACnB,cAAc,EAAE,IAAI;QACpB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;QAC7B,YAAY,EAAE;YACb,KAAK;YACL,MAAM;YACN,KAAK;SACL;QACD,iBAAiB,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE;KAC3C,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;GACI,WAAW,CAsdhB;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 property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport { isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getScopedVarName } from \"@ui5/webcomponents-base/dist/CustomElementsScope.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport {\n\tgetRGBColor,\n\tHSLToRGB,\n\tHEXToRGB,\n\tRGBToHSL,\n} from \"@ui5/webcomponents-base/dist/util/ColorConversion.js\";\nimport type {\n\tColorHSL,\n\tColorRGB,\n} from \"@ui5/webcomponents-base/dist/util/ColorConversion.js\";\nimport ColorPickerTemplate from \"./generated/templates/ColorPickerTemplate.lit.js\";\nimport Input from \"./Input.js\";\nimport Slider from \"./Slider.js\";\nimport Label from \"./Label.js\";\n\nimport {\n\tCOLORPICKER_ALPHA_SLIDER,\n\tCOLORPICKER_HUE_SLIDER,\n\tCOLORPICKER_HEX,\n\tCOLORPICKER_RED,\n\tCOLORPICKER_GREEN,\n\tCOLORPICKER_BLUE,\n\tCOLORPICKER_ALPHA,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport ColorPickerCss from \"./generated/themes/ColorPicker.css.js\";\n\nconst PICKER_POINTER_WIDTH = 6.5;\n\ntype ColorCoordinates = {\n\tx: number,\n\ty: number,\n}\n\n/**\n * @class\n *\n * ### Overview\n * The `ui5-color-picker` allows users to choose any color and provides different input options for selecting colors.\n *\n * ### Usage\n *\n * #### When to use\n * Use the color picker if:\n *\n * - users need to select any color freely.\n *\n * #### When not to use\n *\n * - Users need to select one color from a predefined set of colors. Use the ColorPalette component instead.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/ColorPicker.js\";`\n * @constructor\n * @since 1.0.0-rc.12\n * @extends UI5Element\n * @public\n */\n\n@customElement({\n\ttag: \"ui5-color-picker\",\n\trenderer: litRender,\n\tformAssociated: true,\n\tstyles: ColorPickerCss,\n\ttemplate: ColorPickerTemplate,\n\tdependencies: [\n\t\tInput,\n\t\tSlider,\n\t\tLabel,\n\t],\n\tshadowRootOptions: { delegatesFocus: true },\n})\n/**\n * Fired when the the selected color is changed\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\nclass ColorPicker extends UI5Element implements IFormInputElement {\n\teventDetails!: {\n\t\tchange: void;\n\t}\n\t/**\n\t * Defines the currently selected color of the component.\n\t *\n\t * **Note**: use HEX, RGB, RGBA, HSV formats or a CSS color name when modifying this property.\n\t * @default \"rgba(255,255,255,1)\"\n\t * @public\n\t */\n\t@property()\n\tvalue = \"rgba(255,255,255,1)\";\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 * When set to `true`, the alpha slider and inputs for RGB values will not be displayed.\n\t * @default false\n\t * @public\n\t * @since 2.5.0\n\t */\n\t@property({ type: Boolean })\n\tsimplified = false;\n\n\t/**\n\t * Defines the HEX code of the currently selected color\n\t *\n\t * **Note**: If Alpha(transperancy) is set it is not included in this property. Use `color` property.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\thex = \"ffffff\";\n\n\t/**\n\t * Defines the current main color which is selected via the hue slider and is shown in the main color square.\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_mainValue: ColorRGB;\n\n\t/**\n\t * Defines the currenty selected color from the main color section.\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_value: ColorRGB = getRGBColor(this.value);\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_selectedCoordinates: ColorCoordinates;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_alpha = 1;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_hue = 0;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isSelectedColorChanged = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isHueValueChanged = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_wrongHEX = false;\n\n\tselectedHue: number;\n\n\tmouseDown: boolean;\n\n\tmouseIn: boolean;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\tget formFormattedValue() {\n\t\treturn this.value;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\n\t\t// Bottom Right corner\n\t\tthis._selectedCoordinates = {\n\t\t\tx: 256 - PICKER_POINTER_WIDTH,\n\t\t\ty: 256 - PICKER_POINTER_WIDTH,\n\t\t};\n\n\t\t// Default main color is red\n\t\tthis._mainValue = {\n\t\t\tr: 255,\n\t\t\tg: 0,\n\t\t\tb: 0,\n\t\t};\n\n\t\tthis.selectedHue = 0;\n\n\t\tthis.mouseDown = false;\n\t\tthis.mouseIn = false;\n\t}\n\n\tonBeforeRendering() {\n\t\t// we have the color & ._mainValue properties here\n\t\tthis._value = getRGBColor(this.value);\n\t\tconst tempColor = `rgba(${this._value.r},${this._value.g},${this._value.b},1)`;\n\t\tthis._setHex();\n\t\tthis._setValues();\n\t\tthis.style.setProperty(getScopedVarName(\"--ui5_Color_Picker_Progress_Container_Color\"), tempColor);\n\t}\n\n\t_handleMouseDown(e: MouseEvent) {\n\t\tthis.mouseDown = true;\n\t\tthis.mouseIn = true;\n\t\tthis._changeSelectedColor(e.offsetX, e.offsetY);\n\t}\n\n\t_handleMouseUp() {\n\t\tthis.mouseDown = false;\n\t}\n\n\t_handleMouseOut(e: MouseEvent) {\n\t\tif (!this.mouseIn || !this.mouseDown) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst target = e.target as HTMLElement;\n\t\tconst offsetHeight: number = target.offsetHeight;\n\t\tconst offsetWidth: number = target.offsetWidth;\n\t\tconst isLeft: boolean = e.offsetX <= 0;\n\t\tconst isUp: boolean = e.offsetY <= 0;\n\t\tconst isDown: boolean = e.offsetY >= target.offsetHeight;\n\t\tconst isRight: boolean = e.offsetX >= target.offsetWidth;\n\n\t\tlet x: number,\n\t\t\ty: number;\n\n\t\tif (isLeft) {\n\t\t\tx = 0;\n\t\t} else if (isRight) {\n\t\t\t// Note: - e.offsetWidth has been changed to e.target.offsetWidth as offsetWidth does not exist on the event object\n\t\t\tx = offsetWidth;\n\t\t} else {\n\t\t\tx = e.offsetX;\n\t\t}\n\n\t\tif (isUp) {\n\t\t\ty = 0;\n\t\t} else if (isDown) {\n\t\t\t// Note: - e.offsetWidth has been changed to e.target.offsetWidth as offsetWidth does not exist on the event object\n\t\t\ty = offsetHeight;\n\t\t} else {\n\t\t\ty = e.offsetY;\n\t\t}\n\n\t\tthis._changeSelectedColor(x, y);\n\t\tthis.mouseIn = false;\n\t\tthis.mouseDown = false;\n\t}\n\n\t_handleMouseMove(e: MouseEvent) {\n\t\tif (!this.mouseDown || !this.mouseIn) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changeSelectedColor(e.offsetX, e.offsetY);\n\t}\n\n\t_handleAlphaInput(e: CustomEvent) {\n\t\tconst aphaInputValue: string = (e.target as Input).value;\n\t\tthis._alpha = parseFloat(aphaInputValue);\n\t\tif (Number.isNaN(this._alpha)) {\n\t\t\tthis._alpha = 1;\n\t\t}\n\t\tthis._isHueValueChanged = true;\n\t\tthis._setColor(this._value);\n\t}\n\n\t_handleHueInput(e: CustomEvent) {\n\t\tthis.selectedHue = (e.target as Slider).value;\n\t\tthis._hue = this.selectedHue;\n\t\tthis._setMainColor(this._hue);\n\t\t// Idication that changes to the hue value triggered as a result of user pressing over the hue slider.\n\t\tthis._isHueValueChanged = true;\n\n\t\tconst x: number = this._selectedCoordinates.x + PICKER_POINTER_WIDTH;\n\t\tconst y: number = this._selectedCoordinates.y + PICKER_POINTER_WIDTH;\n\t\tconst tempColor = this._calculateColorFromCoordinates(x, y);\n\n\t\tif (tempColor) {\n\t\t\tthis._setColor(HSLToRGB(tempColor));\n\t\t}\n\t}\n\n\t_handleHEXChange(e: CustomEvent | KeyboardEvent) {\n\t\tconst hexRegex = new RegExp(\"^[<0-9 abcdef]+$\");\n\t\tconst input: Input = (e.target as Input);\n\t\tlet inputValueLowerCase = input.value.toLowerCase();\n\n\t\t// Shorthand Syntax\n\t\tif (inputValueLowerCase.length === 3) {\n\t\t\tinputValueLowerCase = `${inputValueLowerCase[0]}${inputValueLowerCase[0]}${inputValueLowerCase[1]}${inputValueLowerCase[1]}${inputValueLowerCase[2]}${inputValueLowerCase[2]}`;\n\t\t}\n\n\t\tconst isNewValueValid = inputValueLowerCase.length === 6 && hexRegex.test(inputValueLowerCase);\n\n\t\tif (isNewValueValid && input.value !== inputValueLowerCase) {\n\t\t\tthis._wrongHEX = false;\n\t\t\tinput.value = inputValueLowerCase;\n\t\t}\n\n\t\tif (inputValueLowerCase === this.hex) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.hex = inputValueLowerCase;\n\n\t\tif (!isNewValueValid) {\n\t\t\tthis._wrongHEX = true;\n\t\t} else {\n\t\t\tthis._wrongHEX = false;\n\t\t\tthis._setColor(HEXToRGB(this.hex));\n\t\t}\n\t}\n\n\t_handleRGBInputsChange(e: CustomEvent) {\n\t\tconst target = e.target as Input;\n\t\tconst targetValue = parseInt(target.value) || 0;\n\t\tlet tempColor;\n\t\tswitch (target.id) {\n\t\tcase \"red\":\n\t\t\ttempColor = { ...this._value, r: targetValue };\n\t\t\tbreak;\n\n\t\tcase \"green\":\n\t\t\ttempColor = { ...this._value, g: targetValue };\n\t\t\tbreak;\n\n\t\tcase \"blue\":\n\t\t\ttempColor = { ...this._value, b: targetValue };\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ttempColor = { ...this._value };\n\t\t}\n\n\t\tthis._setColor(tempColor);\n\t}\n\n\t_setMainColor(hueValue: number) {\n\t\tif (hueValue <= 255) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255,\n\t\t\t\tg: hueValue,\n\t\t\t\tb: 0,\n\t\t\t};\n\t\t} else if (hueValue <= 510) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255 - (hueValue - 255),\n\t\t\t\tg: 255,\n\t\t\t\tb: 0,\n\t\t\t};\n\t\t} else if (hueValue <= 765) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 0,\n\t\t\t\tg: 255,\n\t\t\t\tb: hueValue - 510,\n\t\t\t};\n\t\t} else if (hueValue <= 1020) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 0,\n\t\t\t\tg: 765 - (hueValue - 255),\n\t\t\t\tb: 255,\n\t\t\t};\n\t\t} else if (hueValue <= 1275) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: hueValue - 1020,\n\t\t\t\tg: 0,\n\t\t\t\tb: 255,\n\t\t\t};\n\t\t} else {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255,\n\t\t\t\tg: 0,\n\t\t\t\tb: 1275 - (hueValue - 255),\n\t\t\t};\n\t\t}\n\t}\n\n\t_handleAlphaChange() {\n\t\tthis._alpha = this._alpha < 0 ? 0 : this._alpha;\n\t\tthis._alpha = this._alpha > 1 ? 1 : this._alpha;\n\t}\n\n\t_changeSelectedColor(x: number, y: number) {\n\t\tthis._selectedCoordinates = {\n\t\t\tx: x - PICKER_POINTER_WIDTH, // Center the coordinates, because of the width of the circle\n\t\t\ty: y - PICKER_POINTER_WIDTH, // Center the coordinates, because of the height of the circle\n\t\t};\n\n\t\t// Idication that changes to the color settings are triggered as a result of user pressing over the main color section.\n\t\tthis._isSelectedColorChanged = true;\n\n\t\tconst tempColor = this._calculateColorFromCoordinates(x, y);\n\t\tif (tempColor) {\n\t\t\tthis._setColor(HSLToRGB(tempColor));\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isEnter(e)) {\n\t\t\tthis._handleHEXChange(e);\n\t\t}\n\t}\n\n\t_calculateColorFromCoordinates(x: number, y: number) {\n\t\t// By using the selected coordinates(x = Lightness, y = Saturation) and hue(selected from the hue slider)\n\t\t// and HSL format, the color will be parsed to RGB\n\t\t// 0 ≤ H < 360\n\t\t// 4.251 because with 4.25 we get out of the colors range.\n\t\tconst h = this._hue / 4.251;\n\n\t\t// 0 ≤ S ≤ 1\n\t\tconst s = 1 - +(Math.round(parseFloat((y / 256) + \"e+2\")) + \"e-2\"); // eslint-disable-line\n\n\t\t// 0 ≤ V ≤ 1\n\t\tconst l = +(Math.round(parseFloat((x / 256) + \"e+2\")) + \"e-2\"); // eslint-disable-line\n\n\t\tif (!s || !l) {\n\t\t\t// The event is finished out of the main color section\n\t\t\treturn;\n\t\t}\n\n\t\treturn {\n\t\t\th,\n\t\t\ts,\n\t\t\tl,\n\t\t};\n\t}\n\n\t_setColor(color: ColorRGB = { r: 0, g: 0, b: 0 }) {\n\t\tthis.value = `rgba(${color.r}, ${color.g}, ${color.b}, ${this._alpha})`;\n\t\tthis._wrongHEX = !this.isValidRGBColor(color);\n\t\tthis.fireDecoratorEvent(\"change\");\n\t}\n\n\tisValidRGBColor(color: ColorRGB) {\n\t\treturn color.r >= 0 && color.r <= 255 && color.g >= 0 && color.g <= 255 && color.b >= 0 && color.b <= 255;\n\t}\n\n\t_setHex() {\n\t\tlet red = this._value.r.toString(16),\n\t\t\tgreen = this._value.g.toString(16),\n\t\t\tblue = this._value.b.toString(16);\n\n\t\tif (red.length === 1) {\n\t\t\tred = `0${red}`;\n\t\t}\n\t\tif (green.length === 1) {\n\t\t\tgreen = `0${green}`;\n\t\t}\n\t\tif (blue.length === 1) {\n\t\t\tblue = `0${blue}`;\n\t\t}\n\n\t\tthis.hex = red + green + blue;\n\t}\n\n\t_setValues() {\n\t\tconst hslColours: ColorHSL = RGBToHSL(this._value);\n\t\tthis._selectedCoordinates = {\n\t\t\tx: ((Math.round(hslColours.l * 100) * 2.56)) - PICKER_POINTER_WIDTH, // Center the coordinates, because of the width of the circle\n\t\t\ty: (256 - (Math.round(hslColours.s * 100) * 2.56)) - PICKER_POINTER_WIDTH, // Center the coordinates, because of the height of the circle\n\t\t};\n\n\t\tif (this._isSelectedColorChanged) { // We shouldn't update the hue value when user presses over the main color section.\n\t\t\tthis._isSelectedColorChanged = false;\n\t\t} else if (this._isHueValueChanged) { // We shouldn't recalculate the hue value when user changes the hue slider.\n\t\t\tthis._isHueValueChanged = false;\n\t\t\tthis._hue = this.selectedHue ? this.selectedHue : this._hue;\n\t\t} else {\n\t\t\tthis._hue = Math.round(hslColours.h * 4.25);\n\t\t}\n\n\t\tthis._setMainColor(this._hue);\n\t}\n\n\tget hueSliderLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HUE_SLIDER);\n\t}\n\n\tget alphaSliderLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_ALPHA_SLIDER);\n\t}\n\n\tget hexInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HEX);\n\t}\n\n\tget redInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_RED);\n\t}\n\n\tget greenInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_GREEN);\n\t}\n\n\tget blueInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_BLUE);\n\t}\n\n\tget alphaInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_ALPHA);\n\t}\n\n\tget inputsDisabled() {\n\t\treturn this._wrongHEX ? true : undefined;\n\t}\n\n\tget hexInputErrorState() {\n\t\treturn this._wrongHEX ? \"Error\" : undefined;\n\t}\n\n\tget _isDefaultPickerMode() {\n\t\treturn !this.simplified;\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\tmainColor: {\n\t\t\t\t\"background-color\": `rgb(${this._mainValue.r}, ${this._mainValue.g}, ${this._mainValue.b})`,\n\t\t\t},\n\t\t\tcircle: {\n\t\t\t\tleft: `${this._selectedCoordinates.x}px`,\n\t\t\t\ttop: `${this._selectedCoordinates.y}px`,\n\t\t\t},\n\t\t\tcolorSpan: {\n\t\t\t\t\"background-color\": `rgba(${this._value.r}, ${this._value.g}, ${this._value.b}, ${this._alpha})`,\n\t\t\t},\n\t\t};\n\t}\n}\n\nColorPicker.define();\n\nexport default ColorPicker;\n"]}
|
package/dist/Icon.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ interface IIcon extends HTMLElement {
|
|
|
29
29
|
* [icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons).
|
|
30
30
|
* - [@ui5/webcomponents-icons-tnt](https://www.npmjs.com/package/@ui5/webcomponents-icons-tnt) represents the "tnt" collection and includes the following
|
|
31
31
|
* [icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT).
|
|
32
|
-
* - [@ui5/webcomponents-icons-
|
|
32
|
+
* - [@ui5/webcomponents-icons-business-suite](https://www.npmjs.com/package/@ui5/webcomponents-icons-business-suite) represents the "business-suite" collection and includes the following
|
|
33
33
|
* [icons](https://ui5.sap.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/BusinessSuiteInAppSymbols).
|
|
34
34
|
*
|
|
35
35
|
* 2. **After exploring the icons collections, add one or more of the packages as dependencies to your project.**
|
package/dist/Icon.js
CHANGED
|
@@ -40,7 +40,7 @@ const ICON_NOT_FOUND = "ICON_NOT_FOUND";
|
|
|
40
40
|
* [icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons).
|
|
41
41
|
* - [@ui5/webcomponents-icons-tnt](https://www.npmjs.com/package/@ui5/webcomponents-icons-tnt) represents the "tnt" collection and includes the following
|
|
42
42
|
* [icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT).
|
|
43
|
-
* - [@ui5/webcomponents-icons-
|
|
43
|
+
* - [@ui5/webcomponents-icons-business-suite](https://www.npmjs.com/package/@ui5/webcomponents-icons-business-suite) represents the "business-suite" collection and includes the following
|
|
44
44
|
* [icons](https://ui5.sap.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/BusinessSuiteInAppSymbols).
|
|
45
45
|
*
|
|
46
46
|
* 2. **After exploring the icons collections, add one or more of the packages as dependencies to your project.**
|
package/dist/Icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sourceRoot":"","sources":["../src/Icon.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,wDAA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element.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport type { IconData } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\nimport { getIconData, getIconDataSync } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport executeTemplate from \"@ui5/webcomponents-base/dist/renderer/executeTemplate.js\";\nimport IconTemplate from \"./generated/templates/IconTemplate.lit.js\";\nimport type IconDesign from \"./types/IconDesign.js\";\nimport IconMode from \"./types/IconMode.js\";\n\n// Styles\nimport iconCss from \"./generated/themes/Icon.css.js\";\n\n/**\n * Interface for components that represent an icon, usable in numerous higher-order components\n * @public\n */\ninterface IIcon extends HTMLElement { }\n\nconst ICON_NOT_FOUND = \"ICON_NOT_FOUND\";\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-icon` component represents an SVG icon.\n * There are two main scenarios how the `ui5-icon` component is used:\n * as a purely decorative element,\n * or as an interactive element that can be focused and clicked.\n *\n * ### Usage\n *\n * 1. **Get familiar with the icons collections.**\n *\n * Before displaying an icon, you need to explore the icons collections to find and import the desired icon.\n *\n * Currently there are 3 icons collection, available as 3 npm packages:\n *\n * - [@ui5/webcomponents-icons](https://www.npmjs.com/package/@ui5/webcomponents-icons) represents the \"SAP-icons\" collection and includes the following\n * [icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons).\n * - [@ui5/webcomponents-icons-tnt](https://www.npmjs.com/package/@ui5/webcomponents-icons-tnt) represents the \"tnt\" collection and includes the following\n * [icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT).\n * - [@ui5/webcomponents-icons-icons-business-suite](https://www.npmjs.com/package/@ui5/webcomponents-icons-business-suite) represents the \"business-suite\" collection and includes the following\n * [icons](https://ui5.sap.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/BusinessSuiteInAppSymbols).\n *\n * 2. **After exploring the icons collections, add one or more of the packages as dependencies to your project.**\n *\n * `npm i @ui5/webcomponents-icons`\n * `npm i @ui5/webcomponents-icons-tnt`\n * `npm i @ui5/webcomponents-icons-business-suite`\n *\n * 3. **Then, import the desired icon**.\n *\n * `import \"@ui5/\\{package_name\\}/dist/\\{icon_name\\}.js\";`\n *\n * **For Example**:\n *\n * For the standard \"SAP-icons\" icon collection, import an icon from the `@ui5/webcomponents-icons` package:\n *\n * `import \"@ui5/webcomponents-icons/dist/employee.js\";`\n *\n * For the \"tnt\" (SAP Fiori Tools) icon collection, import an icon from the `@ui5/webcomponents-icons-tnt` package:\n *\n * `import \"@ui5/webcomponents-icons-tnt/dist/antenna.js\";`\n *\n * For the \"business-suite\" (SAP Business Suite) icon collection, import an icon from the `@ui5/webcomponents-icons-business-suite` package:\n *\n * `import \"@ui5/webcomponents-icons-business-suite/dist/ab-testing.js\";`\n *\n * 4. **Display the icon using the `ui5-icon` web component.**\n * Set the icon collection (\"SAP-icons\", \"tnt\" or \"business-suite\" - \"SAP-icons\" is the default icon collection and can be skipped)\n * and the icon name to the `name` property.\n *\n * `<ui5-icon name=\"employee\"></ui5-icon>`\n * `<ui5-icon name=\"tnt/antenna\"></ui5-icon>`\n * `<ui5-icon name=\"business-suite/ab-testing\"></ui5-icon>`\n *\n * ### Keyboard Handling\n *\n * - [Space] / [Enter] or [Return] - Fires the `click` event if the `mode` property is set to `Interactive`.\n * - [Shift] - If [Space] / [Enter] or [Return] is pressed, pressing [Shift] releases the ui5-icon without triggering the click event.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Icon.js\";`\n * @csspart root - Used to style the outermost wrapper of the `ui5-icon`.\n * @constructor\n * @extends UI5Element\n * @implements {IIcon}\n * @public\n */\n@customElement({\n\ttag: \"ui5-icon\",\n\tlanguageAware: true,\n\tthemeAware: true,\n\trenderer: litRender,\n\ttemplate: IconTemplate,\n\tstyles: iconCss,\n})\n/**\n * Fired on mouseup, `SPACE` and `ENTER`.\n * - on mouse click, the icon fires native `click` event\n * - on `SPACE` and `ENTER`, the icon fires custom `click` event\n * @private\n * @since 1.0.0-rc.8\n */\n@event(\"click\", {\n\tbubbles: true,\n})\nclass Icon extends UI5Element implements IIcon {\n\teventDetails!: {\n\t\tclick: void\n\t}\n\t/**\n\t * Defines the component semantic design.\n\t * @default \"Default\"\n\t * @public\n\t * @since 1.9.2\n\t */\n\t@property()\n\tdesign: `${IconDesign}` = \"Default\";\n\n\t/**\n\t * Defines the unique identifier (icon name) of the component.\n\t *\n\t * To browse all available icons, see the\n\t * [SAP Icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html),\n\t * [SAP Fiori Tools](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT) and\n\t * [SAP Business Suite](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html)\n\t *\n\t * Example:\n\t * `name='add'`, `name='delete'`, `name='employee'`.\n\t *\n\t * **Note:** To use the SAP Fiori Tools icons,\n\t * you need to set the `tnt` prefix in front of the icon's name.\n\t *\n\t * Example:\n\t * `name='tnt/antenna'`, `name='tnt/actor'`, `name='tnt/api'`.\n\t *\n\t * **Note:** To use the SAP Business Suite icons,\n\t * you need to set the `business-suite` prefix in front of the icon's name.\n\t *\n\t * Example:\n\t * `name='business-suite/3d'`, `name='business-suite/1x2-grid-layout'`, `name='business-suite/4x4-grid-layout'`.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines the text alternative of the component.\n\t * If not provided a default text alternative will be set, if present.\n\t *\n\t * **Note:** Every icon should have a text alternative in order to\n\t * calculate its accessible name.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines whether the component should have a tooltip.\n\t *\n\t * **Note:** The tooltip text should be provided via the `accessible-name` property.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTooltip = false;\n\n\t/**\n\t * Defines the mode of the component.\n\t * @default \"Image\"\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tmode: `${IconMode}` = \"Image\";\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Array })\n\tpathData: Array<string> = [];\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object, noAttribute: true })\n\taccData?: I18nText;\n\n\t/**\n\t* @private\n\t*/\n\t@property({ type: Boolean })\n\tinvalid = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\teffectiveAccessibleName?: string;\n\n\tltr?: boolean;\n\tpackageName?: string;\n\tviewBox?: string;\n\tcustomSvg?: object;\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (this.mode !== IconMode.Interactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault(); // prevent scrolling\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this.mode === IconMode.Interactive && isSpace(e)) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\t}\n\n\t/**\n\t* Enforce \"ltr\" direction, based on the icons collection metadata.\n\t*/\n\tget _dir() {\n\t\treturn this.ltr ? \"ltr\" : undefined;\n\t}\n\n\tget effectiveAriaHidden() {\n\t\treturn this.mode === IconMode.Decorative ? \"true\" : undefined;\n\t}\n\n\tget _tabIndex() {\n\t\treturn this.mode === IconMode.Interactive ? \"0\" : undefined;\n\t}\n\n\tget effectiveAccessibleRole() {\n\t\tswitch (this.mode) {\n\t\tcase IconMode.Interactive:\n\t\t\treturn \"button\";\n\t\tcase IconMode.Decorative:\n\t\t\treturn \"presentation\";\n\t\tdefault:\n\t\t\treturn \"img\";\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\t}\n\n\tasync onBeforeRendering() {\n\t\tconst name = this.name;\n\t\tif (!name) {\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(\"Icon name property is required\", this);\n\t\t}\n\n\t\tlet iconData: typeof ICON_NOT_FOUND | IconData | undefined = getIconDataSync(name);\n\t\tif (!iconData) {\n\t\t\ticonData = await getIconData(name);\n\t\t}\n\n\t\tif (!iconData) {\n\t\t\tthis.invalid = true;\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(`Required icon is not registered. Invalid icon name: ${this.name}`);\n\t\t}\n\n\t\tif (iconData === ICON_NOT_FOUND) {\n\t\t\tthis.invalid = true;\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(`Required icon is not registered. You can either import the icon as a module in order to use it e.g. \"@ui5/webcomponents-icons/dist/${name.replace(\"sap-icon://\", \"\")}.js\", or setup a JSON build step and import \"@ui5/webcomponents-icons/dist/AllIcons.js\".`);\n\t\t}\n\n\t\tthis.viewBox = iconData.viewBox || \"0 0 512 512\";\n\n\t\tif (iconData.customTemplate) {\n\t\t\ticonData.pathData = [];\n\t\t\tthis.customSvg = executeTemplate(iconData.customTemplate, this);\n\t\t}\n\n\t\t// in case a new valid name is set, show the icon\n\t\tthis.invalid = false;\n\t\tthis.pathData = Array.isArray(iconData.pathData) ? iconData.pathData : [iconData.pathData];\n\t\tthis.accData = iconData.accData;\n\t\tthis.ltr = iconData.ltr;\n\t\tthis.packageName = iconData.packageName;\n\n\t\tif (this.accessibleName) {\n\t\t\tthis.effectiveAccessibleName = this.accessibleName;\n\t\t} else if (this.accData) {\n\t\t\tconst i18nBundle = await getI18nBundle(this.packageName);\n\t\t\tthis.effectiveAccessibleName = i18nBundle.getText(this.accData) || undefined;\n\t\t} else {\n\t\t\tthis.effectiveAccessibleName = undefined;\n\t\t}\n\t}\n\n\tget hasIconTooltip() {\n\t\treturn this.showTooltip && this.effectiveAccessibleName;\n\t}\n}\n\nIcon.define();\n\nexport default Icon;\nexport type {\n\tIIcon,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Icon.js","sourceRoot":"","sources":["../src/Icon.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,eAAe,MAAM,0DAA0D,CAAC;AACvF,OAAO,YAAY,MAAM,2CAA2C,CAAC;AAErE,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAE3C,SAAS;AACT,OAAO,OAAO,MAAM,gCAAgC,CAAC;AAQrD,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AAmBH,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,UAAU;IAA7B;;QAIC;;;;;WAKG;QAEH,WAAM,GA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C,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;sCACG;AAM7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;qCAC3B;AAMnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qCACZ;AAMhB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;qDACC;AA9F5B,IAAI;IAlBT,aAAa,CAAC;QACd,GAAG,EAAE,UAAU;QACf,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,YAAY;QACtB,MAAM,EAAE,OAAO;KACf,CAAC;IACF;;;;;;OAMG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;GACI,IAAI,CA4MT;AAED,IAAI,CAAC,MAAM,EAAE,CAAC;AAEd,eAAe,IAAI,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport type { IconData } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\nimport { getIconData, getIconDataSync } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport executeTemplate from \"@ui5/webcomponents-base/dist/renderer/executeTemplate.js\";\nimport IconTemplate from \"./generated/templates/IconTemplate.lit.js\";\nimport type IconDesign from \"./types/IconDesign.js\";\nimport IconMode from \"./types/IconMode.js\";\n\n// Styles\nimport iconCss from \"./generated/themes/Icon.css.js\";\n\n/**\n * Interface for components that represent an icon, usable in numerous higher-order components\n * @public\n */\ninterface IIcon extends HTMLElement { }\n\nconst ICON_NOT_FOUND = \"ICON_NOT_FOUND\";\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-icon` component represents an SVG icon.\n * There are two main scenarios how the `ui5-icon` component is used:\n * as a purely decorative element,\n * or as an interactive element that can be focused and clicked.\n *\n * ### Usage\n *\n * 1. **Get familiar with the icons collections.**\n *\n * Before displaying an icon, you need to explore the icons collections to find and import the desired icon.\n *\n * Currently there are 3 icons collection, available as 3 npm packages:\n *\n * - [@ui5/webcomponents-icons](https://www.npmjs.com/package/@ui5/webcomponents-icons) represents the \"SAP-icons\" collection and includes the following\n * [icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons).\n * - [@ui5/webcomponents-icons-tnt](https://www.npmjs.com/package/@ui5/webcomponents-icons-tnt) represents the \"tnt\" collection and includes the following\n * [icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT).\n * - [@ui5/webcomponents-icons-business-suite](https://www.npmjs.com/package/@ui5/webcomponents-icons-business-suite) represents the \"business-suite\" collection and includes the following\n * [icons](https://ui5.sap.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/BusinessSuiteInAppSymbols).\n *\n * 2. **After exploring the icons collections, add one or more of the packages as dependencies to your project.**\n *\n * `npm i @ui5/webcomponents-icons`\n * `npm i @ui5/webcomponents-icons-tnt`\n * `npm i @ui5/webcomponents-icons-business-suite`\n *\n * 3. **Then, import the desired icon**.\n *\n * `import \"@ui5/\\{package_name\\}/dist/\\{icon_name\\}.js\";`\n *\n * **For Example**:\n *\n * For the standard \"SAP-icons\" icon collection, import an icon from the `@ui5/webcomponents-icons` package:\n *\n * `import \"@ui5/webcomponents-icons/dist/employee.js\";`\n *\n * For the \"tnt\" (SAP Fiori Tools) icon collection, import an icon from the `@ui5/webcomponents-icons-tnt` package:\n *\n * `import \"@ui5/webcomponents-icons-tnt/dist/antenna.js\";`\n *\n * For the \"business-suite\" (SAP Business Suite) icon collection, import an icon from the `@ui5/webcomponents-icons-business-suite` package:\n *\n * `import \"@ui5/webcomponents-icons-business-suite/dist/ab-testing.js\";`\n *\n * 4. **Display the icon using the `ui5-icon` web component.**\n * Set the icon collection (\"SAP-icons\", \"tnt\" or \"business-suite\" - \"SAP-icons\" is the default icon collection and can be skipped)\n * and the icon name to the `name` property.\n *\n * `<ui5-icon name=\"employee\"></ui5-icon>`\n * `<ui5-icon name=\"tnt/antenna\"></ui5-icon>`\n * `<ui5-icon name=\"business-suite/ab-testing\"></ui5-icon>`\n *\n * ### Keyboard Handling\n *\n * - [Space] / [Enter] or [Return] - Fires the `click` event if the `mode` property is set to `Interactive`.\n * - [Shift] - If [Space] / [Enter] or [Return] is pressed, pressing [Shift] releases the ui5-icon without triggering the click event.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Icon.js\";`\n * @csspart root - Used to style the outermost wrapper of the `ui5-icon`.\n * @constructor\n * @extends UI5Element\n * @implements {IIcon}\n * @public\n */\n@customElement({\n\ttag: \"ui5-icon\",\n\tlanguageAware: true,\n\tthemeAware: true,\n\trenderer: litRender,\n\ttemplate: IconTemplate,\n\tstyles: iconCss,\n})\n/**\n * Fired on mouseup, `SPACE` and `ENTER`.\n * - on mouse click, the icon fires native `click` event\n * - on `SPACE` and `ENTER`, the icon fires custom `click` event\n * @private\n * @since 1.0.0-rc.8\n */\n@event(\"click\", {\n\tbubbles: true,\n})\nclass Icon extends UI5Element implements IIcon {\n\teventDetails!: {\n\t\tclick: void\n\t}\n\t/**\n\t * Defines the component semantic design.\n\t * @default \"Default\"\n\t * @public\n\t * @since 1.9.2\n\t */\n\t@property()\n\tdesign: `${IconDesign}` = \"Default\";\n\n\t/**\n\t * Defines the unique identifier (icon name) of the component.\n\t *\n\t * To browse all available icons, see the\n\t * [SAP Icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html),\n\t * [SAP Fiori Tools](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT) and\n\t * [SAP Business Suite](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html)\n\t *\n\t * Example:\n\t * `name='add'`, `name='delete'`, `name='employee'`.\n\t *\n\t * **Note:** To use the SAP Fiori Tools icons,\n\t * you need to set the `tnt` prefix in front of the icon's name.\n\t *\n\t * Example:\n\t * `name='tnt/antenna'`, `name='tnt/actor'`, `name='tnt/api'`.\n\t *\n\t * **Note:** To use the SAP Business Suite icons,\n\t * you need to set the `business-suite` prefix in front of the icon's name.\n\t *\n\t * Example:\n\t * `name='business-suite/3d'`, `name='business-suite/1x2-grid-layout'`, `name='business-suite/4x4-grid-layout'`.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines the text alternative of the component.\n\t * If not provided a default text alternative will be set, if present.\n\t *\n\t * **Note:** Every icon should have a text alternative in order to\n\t * calculate its accessible name.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines whether the component should have a tooltip.\n\t *\n\t * **Note:** The tooltip text should be provided via the `accessible-name` property.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTooltip = false;\n\n\t/**\n\t * Defines the mode of the component.\n\t * @default \"Image\"\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tmode: `${IconMode}` = \"Image\";\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Array })\n\tpathData: Array<string> = [];\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object, noAttribute: true })\n\taccData?: I18nText;\n\n\t/**\n\t* @private\n\t*/\n\t@property({ type: Boolean })\n\tinvalid = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\teffectiveAccessibleName?: string;\n\n\tltr?: boolean;\n\tpackageName?: string;\n\tviewBox?: string;\n\tcustomSvg?: object;\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (this.mode !== IconMode.Interactive) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault(); // prevent scrolling\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this.mode === IconMode.Interactive && isSpace(e)) {\n\t\t\tthis.fireDecoratorEvent(\"click\");\n\t\t}\n\t}\n\n\t/**\n\t* Enforce \"ltr\" direction, based on the icons collection metadata.\n\t*/\n\tget _dir() {\n\t\treturn this.ltr ? \"ltr\" : undefined;\n\t}\n\n\tget effectiveAriaHidden() {\n\t\treturn this.mode === IconMode.Decorative ? \"true\" : undefined;\n\t}\n\n\tget _tabIndex() {\n\t\treturn this.mode === IconMode.Interactive ? \"0\" : undefined;\n\t}\n\n\tget effectiveAccessibleRole() {\n\t\tswitch (this.mode) {\n\t\tcase IconMode.Interactive:\n\t\t\treturn \"button\";\n\t\tcase IconMode.Decorative:\n\t\t\treturn \"presentation\";\n\t\tdefault:\n\t\t\treturn \"img\";\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\t}\n\n\tasync onBeforeRendering() {\n\t\tconst name = this.name;\n\t\tif (!name) {\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(\"Icon name property is required\", this);\n\t\t}\n\n\t\tlet iconData: typeof ICON_NOT_FOUND | IconData | undefined = getIconDataSync(name);\n\t\tif (!iconData) {\n\t\t\ticonData = await getIconData(name);\n\t\t}\n\n\t\tif (!iconData) {\n\t\t\tthis.invalid = true;\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(`Required icon is not registered. Invalid icon name: ${this.name}`);\n\t\t}\n\n\t\tif (iconData === ICON_NOT_FOUND) {\n\t\t\tthis.invalid = true;\n\t\t\t/* eslint-disable-next-line */\n\t\t\treturn console.warn(`Required icon is not registered. You can either import the icon as a module in order to use it e.g. \"@ui5/webcomponents-icons/dist/${name.replace(\"sap-icon://\", \"\")}.js\", or setup a JSON build step and import \"@ui5/webcomponents-icons/dist/AllIcons.js\".`);\n\t\t}\n\n\t\tthis.viewBox = iconData.viewBox || \"0 0 512 512\";\n\n\t\tif (iconData.customTemplate) {\n\t\t\ticonData.pathData = [];\n\t\t\tthis.customSvg = executeTemplate(iconData.customTemplate, this);\n\t\t}\n\n\t\t// in case a new valid name is set, show the icon\n\t\tthis.invalid = false;\n\t\tthis.pathData = Array.isArray(iconData.pathData) ? iconData.pathData : [iconData.pathData];\n\t\tthis.accData = iconData.accData;\n\t\tthis.ltr = iconData.ltr;\n\t\tthis.packageName = iconData.packageName;\n\n\t\tif (this.accessibleName) {\n\t\t\tthis.effectiveAccessibleName = this.accessibleName;\n\t\t} else if (this.accData) {\n\t\t\tconst i18nBundle = await getI18nBundle(this.packageName);\n\t\t\tthis.effectiveAccessibleName = i18nBundle.getText(this.accData) || undefined;\n\t\t} else {\n\t\t\tthis.effectiveAccessibleName = undefined;\n\t\t}\n\t}\n\n\tget hasIconTooltip() {\n\t\treturn this.showTooltip && this.effectiveAccessibleName;\n\t}\n}\n\nIcon.define();\n\nexport default Icon;\nexport type {\n\tIIcon,\n};\n"]}
|
package/dist/Popover.d.ts
CHANGED
package/dist/Popover.js
CHANGED
|
@@ -435,6 +435,7 @@ let Popover = Popover_1 = class Popover extends Popup {
|
|
|
435
435
|
}
|
|
436
436
|
const borderRadius = Number.parseInt(window.getComputedStyle(this).getPropertyValue("border-radius"));
|
|
437
437
|
const arrowPos = this.getArrowPosition(targetRect, popoverSize, left, top, isVertical, borderRadius);
|
|
438
|
+
this._left += this.getRTLCorrectionLeft();
|
|
438
439
|
return {
|
|
439
440
|
arrow: arrowPos,
|
|
440
441
|
top: this._top,
|
|
@@ -442,6 +443,9 @@ let Popover = Popover_1 = class Popover extends Popup {
|
|
|
442
443
|
placement,
|
|
443
444
|
};
|
|
444
445
|
}
|
|
446
|
+
getRTLCorrectionLeft() {
|
|
447
|
+
return parseFloat(window.getComputedStyle(this).left) - this.getBoundingClientRect().left;
|
|
448
|
+
}
|
|
445
449
|
/**
|
|
446
450
|
* Calculates the position for the arrow.
|
|
447
451
|
* @private
|
package/dist/Popover.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../src/Popover.ts"],"names":[],"mappings":";;;;;;;AACA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,wCAAwC,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AACvF,OAAO,KAAK,MAAM,4CAA4C,CAAC;AAC/D,OAAO,wBAAwB,MAAM,+DAA+D,CAAC;AACrG,OAAO,0BAA0B,MAAM,iEAAiE,CAAC;AACzG,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AACrF,OAAO,qBAAqB,MAAM,yDAAyD,CAAC;AAE5F,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AACnE,OAAO,sBAAsB,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEzF,WAAW;AACX,OAAO,eAAe,MAAM,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;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;gDAC1B;AAOpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;gDAC1B;AAOpB;IADC,QAAQ,EAAE;gDACoC;AAG/C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;2CAC1B;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;0CAC3B;AAOnB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;uCACA;AAO5B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;uCACA;AA4B5B;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;qCAW9C;AApJI,OAAO;IAVZ,aAAa,CAAC;QACd,GAAG,EAAE,aAAa;QAClB,MAAM,EAAE;YACP,KAAK,CAAC,MAAM;YACZ,eAAe;YACf,UAAU;YACV,0BAA0B,EAAE;SAC5B;QACD,QAAQ,EAAE,eAAe;KACzB,CAAC;GACI,OAAO,CAiuBZ;AAED,MAAM,iBAAiB,GAAG,CAAC,MAAW,EAAqB,EAAE;IAC5D,OAAO,QAAQ,IAAI,MAAM,CAAC;AAC3B,CAAC,CAAC;AAEF,OAAO,CAAC,MAAM,EAAE,CAAC;AAEjB,eAAe,OAAO,CAAC;AAEvB,OAAO,EAAE,iBAAiB,EAAE,CAAC","sourcesContent":["import type UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport { isIOS } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { getClosedPopupParent } from \"@ui5/webcomponents-base/dist/util/PopupUtils.js\";\nimport clamp from \"@ui5/webcomponents-base/dist/util/clamp.js\";\nimport isElementContainingBlock from \"@ui5/webcomponents-base/dist/util/isElementContainingBlock.js\";\nimport getEffectiveScrollbarStyle from \"@ui5/webcomponents-base/dist/util/getEffectiveScrollbarStyle.js\";\nimport getParentElement from \"@ui5/webcomponents-base/dist/util/getParentElement.js\";\nimport DOMReferenceConverter from \"@ui5/webcomponents-base/dist/converters/DOMReference.js\";\n\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport Popup from \"./Popup.js\";\nimport type { PopupBeforeCloseEventDetail as PopoverBeforeCloseEventDetail } from \"./Popup.js\";\nimport PopoverPlacement from \"./types/PopoverPlacement.js\";\nimport PopoverVerticalAlign from \"./types/PopoverVerticalAlign.js\";\nimport PopoverHorizontalAlign from \"./types/PopoverHorizontalAlign.js\";\nimport { addOpenedPopover, removeOpenedPopover } from \"./popup-utils/PopoverRegistry.js\";\n\n// Template\nimport PopoverTemplate from \"./generated/templates/PopoverTemplate.lit.js\";\n// Styles\nimport PopupsCommonCss from \"./generated/themes/PopupsCommon.css.js\";\nimport PopoverCss from \"./generated/themes/Popover.css.js\";\n\nconst ARROW_SIZE = 8;\n\ntype PopoverSize = {\n\twidth: number;\n\theight: number;\n}\n\ntype ArrowPosition = {\n\tx: number;\n\ty: number;\n}\n\ntype CalculatedPlacement = {\n\tarrow: ArrowPosition,\n\ttop: number,\n\tleft: number,\n\tplacement: `${PopoverPlacement}`,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-popover` component displays additional information for an object\n * in a compact way and without leaving the page.\n * The Popover can contain various UI elements, such as fields, tables, images, and charts.\n * It can also include actions in the footer.\n *\n * ### Structure\n *\n * The popover has three main areas:\n *\n * - Header (optional)\n * - Content\n * - Footer (optional)\n *\n * **Note:** The `ui5-popover` is closed when the user clicks\n * or taps outside the popover\n * or selects an action within the popover. You can prevent this with the\n * `modal` property.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Popover.js\";`\n *\n * @constructor\n * @extends Popup\n * @since 1.0.0-rc.6\n * @public\n * @csspart header - Used to style the header of the component\n * @csspart content - Used to style the content of the component\n * @csspart footer - Used to style the footer of the component\n */\n@customElement({\n\ttag: \"ui5-popover\",\n\tstyles: [\n\t\tPopup.styles,\n\t\tPopupsCommonCss,\n\t\tPopoverCss,\n\t\tgetEffectiveScrollbarStyle(),\n\t],\n\ttemplate: PopoverTemplate,\n})\nclass Popover extends Popup {\n\t/**\n\t * Defines the header text.\n\t *\n\t * **Note:** If `header` slot is provided, the `headerText` is ignored.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Determines on which side the component is placed at.\n\t * @default \"End\"\n\t * @public\n\t */\n\t@property()\n\tplacement: `${PopoverPlacement}` = \"End\";\n\n\t/**\n\t * Determines the horizontal alignment of the component.\n\t * @default \"Center\"\n\t * @public\n\t */\n\t@property()\n\thorizontalAlign: `${PopoverHorizontalAlign}` = \"Center\";\n\n\t/**\n\t * Determines the vertical alignment of the component.\n\t * @default \"Center\"\n\t * @public\n\t */\n\t@property()\n\tverticalAlign: `${PopoverVerticalAlign}` = \"Center\";\n\n\t/**\n\t * Defines whether the component should close when\n\t * clicking/tapping outside of the popover.\n\t * If enabled, it blocks any interaction with the background.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tmodal = false;\n\n\t/**\n\t * Determines whether the component arrow is hidden.\n\t * @default false\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\thideArrow = false;\n\n\t/**\n\t * Determines if there is no enough space, the component can be placed\n\t * over the target.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tallowTargetOverlap = false;\n\n\t/**\n\t * Defines whether the content is scrollable.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tdisableScrolling = false;\n\n\t/**\n\t * Sets the X translation of the arrow\n\t * @private\n\t */\n\t@property({ type: Number, noAttribute: true })\n\tarrowTranslateX = 0;\n\n\t/**\n\t * Sets the Y translation of the arrow\n\t * @private\n\t */\n\t@property({ type: Number, noAttribute: true })\n\tarrowTranslateY = 0;\n\n\t/**\n\t * Returns the calculated placement depending on the free space\n\t * @private\n\t */\n\t@property()\n\tactualPlacement: `${PopoverPlacement}` = \"End\";\n\n\t@property({ type: Number, noAttribute: true })\n\t_maxHeight?: number;\n\n\t@property({ type: Number, noAttribute: true })\n\t_maxWidth?: number;\n\n\t/**\n\t * Defines the header HTML Element.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement })\n\theader!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the footer HTML Element.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement })\n\tfooter!: Array<HTMLElement>;\n\n\t_opener?: HTMLElement | string;\n\t_openerRect?: DOMRect;\n\t_preventRepositionAndClose?: boolean;\n\t_top?: number;\n\t_left?: number;\n\t_oldPlacement?: CalculatedPlacement;\n\t_width?: string;\n\t_height?: string;\n\n\tstatic get VIEWPORT_MARGIN() {\n\t\treturn 10; // px\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\t/**\n\t * Defines the ID or DOM Reference of the element at which the popover is shown.\n\t * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the popover.\n\t * You can only set the `opener` attribute to a DOM Reference when using JavaScript.\n\t * @public\n\t * @default undefined\n\t * @since 1.2.0\n\t */\n\t@property({ converter: DOMReferenceConverter })\n\tset opener(value: HTMLElement | string) {\n\t\tif (this._opener === value) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._opener = value;\n\n\t\tif (value && this.open) {\n\t\t\tthis.openPopup();\n\t\t}\n\t}\n\n\tget opener(): HTMLElement | string | undefined {\n\t\treturn this._opener;\n\t}\n\n\tasync openPopup() {\n\t\tif (this._opened) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst opener = this.getOpenerHTMLElement(this.opener);\n\n\t\tif (!opener) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.isOpenerOutsideViewport(opener.getBoundingClientRect())) {\n\t\t\tawait renderFinished();\n\t\t\tthis.open = false;\n\t\t\tthis.fireDecoratorEvent(\"close\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis._openerRect = opener.getBoundingClientRect();\n\n\t\tawait super.openPopup();\n\t}\n\n\tisOpenerClicked(e: MouseEvent) {\n\t\tconst target = e.target as HTMLElement;\n\t\tif (target === this._opener) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst ui5ElementTarget = target as UI5Element;\n\n\t\tif (ui5ElementTarget.getFocusDomRef && ui5ElementTarget.getFocusDomRef() === this._opener) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn e.composedPath().indexOf(this._opener as EventTarget) > -1;\n\t}\n\n\t/**\n\t * Override for the _addOpenedPopup hook, which would otherwise just call addOpenedPopup(this)\n\t * @private\n\t */\n\t_addOpenedPopup() {\n\t\taddOpenedPopover(this);\n\t}\n\n\t/**\n\t * Override for the _removeOpenedPopup hook, which would otherwise just call removeOpenedPopup(this)\n\t * @private\n\t */\n\t_removeOpenedPopup() {\n\t\tremoveOpenedPopover(this);\n\t}\n\n\tgetOpenerHTMLElement(opener: HTMLElement | string | undefined): HTMLElement | null | undefined {\n\t\tif (opener === undefined || opener instanceof HTMLElement) {\n\t\t\treturn opener;\n\t\t}\n\n\t\tconst rootNode = this.getRootNode();\n\n\t\tif (!(rootNode instanceof ShadowRoot || rootNode instanceof Document)) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet openerHTMLElement = rootNode.getElementById(opener);\n\n\t\tif (rootNode instanceof ShadowRoot && !openerHTMLElement) {\n\t\t\topenerHTMLElement = document.getElementById(opener);\n\t\t}\n\n\t\tif (openerHTMLElement && this._isUI5Element(openerHTMLElement)) {\n\t\t\treturn openerHTMLElement.getFocusDomRef();\n\t\t}\n\n\t\treturn openerHTMLElement;\n\t}\n\n\tshouldCloseDueToOverflow(placement: `${PopoverPlacement}`, openerRect: DOMRect): boolean {\n\t\tconst threshold = 32;\n\t\tconst limits = {\n\t\t\t\"Start\": openerRect.right,\n\t\t\t\"End\": openerRect.left,\n\t\t\t\"Top\": openerRect.top,\n\t\t\t\"Bottom\": openerRect.bottom,\n\t\t};\n\n\t\tconst opener = this.getOpenerHTMLElement(this.opener);\n\t\tconst closedPopupParent = getClosedPopupParent(opener!);\n\t\tlet overflowsBottom = false;\n\t\tlet overflowsTop = false;\n\n\t\tif (closedPopupParent instanceof Popover) {\n\t\t\tconst contentRect = closedPopupParent.contentDOM.getBoundingClientRect();\n\t\t\toverflowsBottom = openerRect.top > (contentRect.top + contentRect.height);\n\t\t\toverflowsTop = (openerRect.top + openerRect.height) < contentRect.top;\n\t\t}\n\n\t\treturn (limits[placement] < 0 || (limits[placement] + threshold > (closedPopupParent as unknown as Window).innerHeight)) || overflowsBottom || overflowsTop;\n\t}\n\n\tshouldCloseDueToNoOpener(openerRect: DOMRect): boolean {\n\t\treturn openerRect.top === 0\n\t\t\t&& openerRect.bottom === 0\n\t\t\t&& openerRect.left === 0\n\t\t\t&& openerRect.right === 0;\n\t}\n\n\tisOpenerOutsideViewport(openerRect: DOMRect): boolean {\n\t\treturn openerRect.bottom < 0\n\t\t\t|| openerRect.top > window.innerHeight\n\t\t\t|| openerRect.right < 0\n\t\t\t|| openerRect.left > window.innerWidth;\n\t}\n\n\t/**\n\t * @override\n\t */\n\t_resize() {\n\t\tsuper._resize();\n\n\t\tif (this.open) {\n\t\t\tthis.reposition();\n\t\t}\n\t}\n\n\treposition() {\n\t\tthis._show();\n\t}\n\n\tasync _show() {\n\t\tsuper._show();\n\n\t\tconst opener = this.getOpenerHTMLElement(this.opener);\n\n\t\tif (opener && this._isUI5Element(opener) && !opener.getDomRef()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._opened) {\n\t\t\tthis._showOutsideViewport();\n\t\t}\n\n\t\tconst popoverSize = this.getPopoverSize();\n\t\tlet placement;\n\n\t\tif (popoverSize.width === 0 || popoverSize.height === 0) {\n\t\t\t// size can not be determined properly at this point, popover will be shown with the next reposition\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.open) {\n\t\t\t// update opener rect if it was changed during the popover being opened\n\t\t\tthis._openerRect = opener!.getBoundingClientRect();\n\t\t}\n\n\t\tif (this._oldPlacement && this.shouldCloseDueToNoOpener(this._openerRect!) && this.isFocusWithin()) {\n\t\t\t// reuse the old placement as the opener is not available,\n\t\t\t// but keep the popover open as the focus is within\n\t\t\tplacement = this._oldPlacement;\n\t\t} else {\n\t\t\tplacement = this.calcPlacement(this._openerRect!, popoverSize);\n\t\t}\n\n\t\tif (this._preventRepositionAndClose || this.isOpenerOutsideViewport(this._openerRect!)) {\n\t\t\tawait this._waitForDomRef();\n\t\t\treturn this.closePopup();\n\t\t}\n\n\t\tthis._oldPlacement = placement;\n\t\tthis.actualPlacement = placement.placement;\n\n\t\tlet left = clamp(\n\t\t\tthis._left!,\n\t\t\tPopover.VIEWPORT_MARGIN,\n\t\t\tdocument.documentElement.clientWidth - popoverSize.width - Popover.VIEWPORT_MARGIN,\n\t\t);\n\n\t\tif (this.actualPlacement === PopoverPlacement.End) {\n\t\t\tleft = Math.max(left, this._left!);\n\t\t}\n\n\t\tlet top = clamp(\n\t\t\tthis._top!,\n\t\t\tPopover.VIEWPORT_MARGIN,\n\t\t\tdocument.documentElement.clientHeight - popoverSize.height - Popover.VIEWPORT_MARGIN,\n\t\t);\n\n\t\tif (this.actualPlacement === PopoverPlacement.Bottom) {\n\t\t\ttop = Math.max(top, this._top!);\n\t\t}\n\n\t\tthis.arrowTranslateX = placement.arrow.x;\n\t\tthis.arrowTranslateY = placement.arrow.y;\n\n\t\ttop = this._adjustForIOSKeyboard(top);\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${top}px`,\n\t\t\tleft: `${left}px`,\n\t\t});\n\n\t\tif (this.horizontalAlign === PopoverHorizontalAlign.Stretch && this._width) {\n\t\t\tthis.style.width = this._width;\n\t\t}\n\n\t\tif (this.verticalAlign === PopoverVerticalAlign.Stretch && this._height) {\n\t\t\tthis.style.height = this._height;\n\t\t}\n\t}\n\n\t/**\n\t * Adjust the desired top position to compensate for shift of the screen\n\t * caused by opened keyboard on iOS which affects all elements with position:fixed.\n\t * @private\n\t * @param top The target top in px.\n\t * @returns The adjusted top in px.\n\t */\n\t_adjustForIOSKeyboard(top: number): number {\n\t\tif (!isIOS()) {\n\t\t\treturn top;\n\t\t}\n\n\t\tconst actualTop = Math.ceil(this.getBoundingClientRect().top);\n\n\t\treturn top + (Number.parseInt(this.style.top || \"0\") - actualTop);\n\t}\n\n\t_getContainingBlockClientLocation() {\n\t\tlet parentElement = getParentElement(this);\n\n\t\twhile (parentElement) {\n\t\t\tif (isElementContainingBlock(parentElement)) {\n\t\t\t\treturn parentElement.getBoundingClientRect();\n\t\t\t}\n\n\t\t\tparentElement = getParentElement(parentElement);\n\t\t}\n\n\t\treturn { left: 0, top: 0 };\n\t}\n\n\tgetPopoverSize(): PopoverSize {\n\t\tconst rect = this.getBoundingClientRect(),\n\t\t\twidth = rect.width,\n\t\t\theight = rect.height;\n\n\t\treturn { width, height };\n\t}\n\n\t_showOutsideViewport() {\n\t\tObject.assign(this.style, {\n\t\t\ttop: \"-10000px\",\n\t\t\tleft: \"-10000px\",\n\t\t});\n\t}\n\n\t_isUI5Element(el: HTMLElement): el is UI5Element {\n\t\treturn \"isUI5Element\" in el;\n\t}\n\n\tget arrowDOM() {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-popover-arrow\")!;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tcalcPlacement(targetRect: DOMRect, popoverSize: PopoverSize): CalculatedPlacement {\n\t\tlet left = Popover.VIEWPORT_MARGIN;\n\t\tlet top = 0;\n\t\tconst allowTargetOverlap = this.allowTargetOverlap;\n\n\t\tconst clientWidth = document.documentElement.clientWidth;\n\t\tconst clientHeight = document.documentElement.clientHeight;\n\n\t\tlet maxHeight = clientHeight;\n\t\tlet maxWidth = clientWidth;\n\n\t\tconst placement = this.getActualPlacement(targetRect, popoverSize);\n\n\t\tthis._preventRepositionAndClose = this.shouldCloseDueToNoOpener(targetRect) || this.shouldCloseDueToOverflow(placement, targetRect);\n\n\t\tconst isVertical = placement === PopoverPlacement.Top\n\t\t\t|| placement === PopoverPlacement.Bottom;\n\n\t\tif (this.horizontalAlign === PopoverHorizontalAlign.Stretch && isVertical) {\n\t\t\tpopoverSize.width = targetRect.width;\n\t\t\tthis._width = `${targetRect.width}px`;\n\t\t} else if (this.verticalAlign === PopoverVerticalAlign.Stretch && !isVertical) {\n\t\t\tpopoverSize.height = targetRect.height;\n\t\t\tthis._height = `${targetRect.height}px`;\n\t\t}\n\n\t\tconst arrowOffset = this.hideArrow ? 0 : ARROW_SIZE;\n\n\t\t// calc popover positions\n\t\tswitch (placement) {\n\t\tcase PopoverPlacement.Top:\n\t\t\tleft = this.getVerticalLeft(targetRect, popoverSize);\n\t\t\ttop = Math.max(targetRect.top - popoverSize.height - arrowOffset, 0);\n\n\t\t\tif (!allowTargetOverlap) {\n\t\t\t\tmaxHeight = targetRect.top - arrowOffset;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase PopoverPlacement.Bottom:\n\t\t\tleft = this.getVerticalLeft(targetRect, popoverSize);\n\t\t\ttop = targetRect.bottom + arrowOffset;\n\n\t\t\tif (allowTargetOverlap) {\n\t\t\t\ttop = Math.max(Math.min(top, clientHeight - popoverSize.height), 0);\n\t\t\t} else {\n\t\t\t\tmaxHeight = clientHeight - targetRect.bottom - arrowOffset;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase PopoverPlacement.Start:\n\t\t\tleft = Math.max(targetRect.left - popoverSize.width - arrowOffset, 0);\n\t\t\ttop = this.getHorizontalTop(targetRect, popoverSize);\n\n\t\t\tif (!allowTargetOverlap) {\n\t\t\t\tmaxWidth = targetRect.left - arrowOffset;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase PopoverPlacement.End:\n\t\t\tleft = targetRect.left + targetRect.width + arrowOffset;\n\t\t\ttop = this.getHorizontalTop(targetRect, popoverSize);\n\n\t\t\tif (allowTargetOverlap) {\n\t\t\t\tleft = Math.max(Math.min(left, clientWidth - popoverSize.width), 0);\n\t\t\t} else {\n\t\t\t\tmaxWidth = clientWidth - targetRect.right - arrowOffset;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\t// correct popover positions\n\t\tif (isVertical) {\n\t\t\tif (popoverSize.width > clientWidth || left < Popover.VIEWPORT_MARGIN) {\n\t\t\t\tleft = Popover.VIEWPORT_MARGIN;\n\t\t\t} else if (left + popoverSize.width > clientWidth - Popover.VIEWPORT_MARGIN) {\n\t\t\t\tleft = clientWidth - Popover.VIEWPORT_MARGIN - popoverSize.width;\n\t\t\t}\n\t\t} else {\n\t\t\tif (popoverSize.height > clientHeight || top < Popover.VIEWPORT_MARGIN) { // eslint-disable-line\n\t\t\t\ttop = Popover.VIEWPORT_MARGIN;\n\t\t\t} else if (top + popoverSize.height > clientHeight - Popover.VIEWPORT_MARGIN) {\n\t\t\t\ttop = clientHeight - Popover.VIEWPORT_MARGIN - popoverSize.height;\n\t\t\t}\n\t\t}\n\n\t\tthis._maxHeight = Math.round(maxHeight - Popover.VIEWPORT_MARGIN);\n\t\tthis._maxWidth = Math.round(maxWidth - Popover.VIEWPORT_MARGIN);\n\n\t\tif (this._left === undefined || Math.abs(this._left - left) > 1.5) {\n\t\t\tthis._left = Math.round(left);\n\t\t}\n\n\t\tif (this._top === undefined || Math.abs(this._top - top) > 1.5) {\n\t\t\tthis._top = Math.round(top);\n\t\t}\n\n\t\tconst borderRadius = Number.parseInt(window.getComputedStyle(this).getPropertyValue(\"border-radius\"));\n\t\tconst arrowPos = this.getArrowPosition(targetRect, popoverSize, left, top, isVertical, borderRadius);\n\n\t\treturn {\n\t\t\tarrow: arrowPos,\n\t\t\ttop: this._top,\n\t\t\tleft: this._left,\n\t\t\tplacement,\n\t\t};\n\t}\n\n\t/**\n\t * Calculates the position for the arrow.\n\t * @private\n\t * @param targetRect BoundingClientRect of the target element\n\t * @param popoverSize Width and height of the popover\n\t * @param left Left offset of the popover\n\t * @param top Top offset of the popover\n\t * @param isVertical If the popover is positioned vertically to the target element\n\t * @param borderRadius Value of the border-radius property\n\t * @returns Arrow's coordinates\n\t */\n\tgetArrowPosition(targetRect: DOMRect, popoverSize: PopoverSize, left: number, top: number, isVertical: boolean, borderRadius: number): ArrowPosition {\n\t\tconst horizontalAlign = this._actualHorizontalAlign;\n\t\tlet arrowXCentered = horizontalAlign === PopoverHorizontalAlign.Center || horizontalAlign === PopoverHorizontalAlign.Stretch;\n\n\t\tif (horizontalAlign === PopoverHorizontalAlign.End && left <= targetRect.left) {\n\t\t\tarrowXCentered = true;\n\t\t}\n\n\t\tif (horizontalAlign === PopoverHorizontalAlign.Start && left + popoverSize.width >= targetRect.left + targetRect.width) {\n\t\t\tarrowXCentered = true;\n\t\t}\n\n\t\tlet arrowTranslateX = 0;\n\t\tif (isVertical && arrowXCentered) {\n\t\t\tarrowTranslateX = targetRect.left + targetRect.width / 2 - left - popoverSize.width / 2;\n\t\t}\n\n\t\tlet arrowTranslateY = 0;\n\t\tif (!isVertical) {\n\t\t\tarrowTranslateY = targetRect.top + targetRect.height / 2 - top - popoverSize.height / 2;\n\t\t}\n\n\t\t// Restricts the arrow's translate value along each dimension,\n\t\t// so that the arrow does not clip over the popover's rounded borders.\n\t\tconst safeRangeForArrowY = popoverSize.height / 2 - borderRadius - ARROW_SIZE / 2;\n\t\tarrowTranslateY = clamp(\n\t\t\tarrowTranslateY,\n\t\t\t-safeRangeForArrowY,\n\t\t\tsafeRangeForArrowY,\n\t\t);\n\n\t\tconst safeRangeForArrowX = popoverSize.width / 2 - borderRadius - ARROW_SIZE / 2;\n\t\tarrowTranslateX = clamp(\n\t\t\tarrowTranslateX,\n\t\t\t-safeRangeForArrowX,\n\t\t\tsafeRangeForArrowX,\n\t\t);\n\n\t\treturn {\n\t\t\tx: Math.round(arrowTranslateX),\n\t\t\ty: Math.round(arrowTranslateY),\n\t\t};\n\t}\n\n\t/**\n\t * Fallbacks to new placement, prioritizing `Left` and `Right` placements.\n\t * @private\n\t */\n\tfallbackPlacement(clientWidth: number, clientHeight: number, targetRect: DOMRect, popoverSize: PopoverSize): PopoverPlacement | undefined {\n\t\tif (targetRect.left > popoverSize.width) {\n\t\t\treturn PopoverPlacement.Start;\n\t\t}\n\n\t\tif (clientWidth - targetRect.right > targetRect.left) {\n\t\t\treturn PopoverPlacement.End;\n\t\t}\n\n\t\tif (clientHeight - targetRect.bottom > popoverSize.height) {\n\t\t\treturn PopoverPlacement.Bottom;\n\t\t}\n\n\t\tif (clientHeight - targetRect.bottom < targetRect.top) {\n\t\t\treturn PopoverPlacement.Top;\n\t\t}\n\t}\n\n\tgetActualPlacement(targetRect: DOMRect, popoverSize: PopoverSize): `${PopoverPlacement}` {\n\t\tconst placement = this.placement;\n\t\tlet actualPlacement = placement;\n\n\t\tconst clientWidth = document.documentElement.clientWidth;\n\t\tconst clientHeight = document.documentElement.clientHeight;\n\n\t\tswitch (placement) {\n\t\tcase PopoverPlacement.Top:\n\t\t\tif (targetRect.top < popoverSize.height\n\t\t\t\t&& targetRect.top < clientHeight - targetRect.bottom) {\n\t\t\t\tactualPlacement = PopoverPlacement.Bottom;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase PopoverPlacement.Bottom:\n\t\t\tif (clientHeight - targetRect.bottom < popoverSize.height\n\t\t\t\t&& clientHeight - targetRect.bottom < targetRect.top) {\n\t\t\t\tactualPlacement = PopoverPlacement.Top;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase PopoverPlacement.Start:\n\t\t\tif (targetRect.left < popoverSize.width) {\n\t\t\t\tactualPlacement = this.fallbackPlacement(clientWidth, clientHeight, targetRect, popoverSize) || placement;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase PopoverPlacement.End:\n\t\t\tif (clientWidth - targetRect.right < popoverSize.width) {\n\t\t\t\tactualPlacement = this.fallbackPlacement(clientWidth, clientHeight, targetRect, popoverSize) || placement;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\treturn actualPlacement;\n\t}\n\n\tgetVerticalLeft(targetRect: DOMRect, popoverSize: PopoverSize): number {\n\t\tconst horizontalAlign = this._actualHorizontalAlign;\n\t\tlet left = Popover.VIEWPORT_MARGIN;\n\n\t\tswitch (horizontalAlign) {\n\t\tcase PopoverHorizontalAlign.Center:\n\t\tcase PopoverHorizontalAlign.Stretch:\n\t\t\tleft = targetRect.left - (popoverSize.width - targetRect.width) / 2;\n\t\t\tbreak;\n\t\tcase PopoverHorizontalAlign.Start:\n\t\t\tleft = targetRect.left;\n\t\t\tbreak;\n\t\tcase PopoverHorizontalAlign.End:\n\t\t\tleft = targetRect.right - popoverSize.width;\n\t\t\tbreak;\n\t\t}\n\n\t\treturn left;\n\t}\n\n\tgetHorizontalTop(targetRect: DOMRect, popoverSize: PopoverSize): number {\n\t\tlet top = 0;\n\n\t\tswitch (this.verticalAlign) {\n\t\tcase PopoverVerticalAlign.Center:\n\t\tcase PopoverVerticalAlign.Stretch:\n\t\t\ttop = targetRect.top - (popoverSize.height - targetRect.height) / 2;\n\t\t\tbreak;\n\t\tcase PopoverVerticalAlign.Top:\n\t\t\ttop = targetRect.top;\n\t\t\tbreak;\n\t\tcase PopoverVerticalAlign.Bottom:\n\t\t\ttop = targetRect.bottom - popoverSize.height;\n\t\t\tbreak;\n\t\t}\n\n\t\treturn top;\n\t}\n\n\tget isModal() { // Required by Popup.js\n\t\treturn this.modal;\n\t}\n\n\tget _ariaLabelledBy() { // Required by Popup.js\n\t\tif (!this._ariaLabel && this._displayHeader) {\n\t\t\treturn \"ui5-popup-header\";\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\t...super.styles,\n\t\t\troot: {\n\t\t\t\t\"max-height\": this._maxHeight ? `${this._maxHeight}px` : \"\",\n\t\t\t\t\"max-width\": this._maxWidth ? `${this._maxWidth}px` : \"\",\n\t\t\t},\n\t\t\tarrow: {\n\t\t\t\ttransform: `translate(${this.arrowTranslateX}px, ${this.arrowTranslateY}px)`,\n\t\t\t},\n\t\t};\n\t}\n\n\tget classes() {\n\t\tconst allClasses = super.classes;\n\t\tallClasses.root[\"ui5-popover-root\"] = true;\n\n\t\treturn allClasses;\n\t}\n\n\t/**\n\t * Hook for descendants to hide header.\n\t */\n\tget _displayHeader() {\n\t\treturn !!(this.header.length || this.headerText);\n\t}\n\n\t/**\n\t * Hook for descendants to hide footer.\n\t */\n\tget _displayFooter() {\n\t\treturn true;\n\t}\n\n\tget _actualHorizontalAlign() {\n\t\tif (this.effectiveDir === \"rtl\") {\n\t\t\tif (this.horizontalAlign === PopoverHorizontalAlign.Start) {\n\t\t\t\treturn PopoverHorizontalAlign.End;\n\t\t\t}\n\n\t\t\tif (this.horizontalAlign === PopoverHorizontalAlign.End) {\n\t\t\t\treturn PopoverHorizontalAlign.Start;\n\t\t\t}\n\t\t}\n\n\t\treturn this.horizontalAlign;\n\t}\n}\n\nconst instanceOfPopover = (object: any): object is Popover => {\n\treturn \"opener\" in object;\n};\n\nPopover.define();\n\nexport default Popover;\n\nexport { instanceOfPopover };\n\nexport type {\n\tPopoverBeforeCloseEventDetail,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../src/Popover.ts"],"names":[],"mappings":";;;;;;;AACA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,wCAAwC,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AACvF,OAAO,KAAK,MAAM,4CAA4C,CAAC;AAC/D,OAAO,wBAAwB,MAAM,+DAA+D,CAAC;AACrG,OAAO,0BAA0B,MAAM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C;qCAW9C;AApJI,OAAO;IAVZ,aAAa,CAAC;QACd,GAAG,EAAE,aAAa;QAClB,MAAM,EAAE;YACP,KAAK,CAAC,MAAM;YACZ,eAAe;YACf,UAAU;YACV,0BAA0B,EAAE;SAC5B;QACD,QAAQ,EAAE,eAAe;KACzB,CAAC;GACI,OAAO,CAuuBZ;AAED,MAAM,iBAAiB,GAAG,CAAC,MAAW,EAAqB,EAAE;IAC5D,OAAO,QAAQ,IAAI,MAAM,CAAC;AAC3B,CAAC,CAAC;AAEF,OAAO,CAAC,MAAM,EAAE,CAAC;AAEjB,eAAe,OAAO,CAAC;AAEvB,OAAO,EAAE,iBAAiB,EAAE,CAAC","sourcesContent":["import type UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport { isIOS } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { getClosedPopupParent } from \"@ui5/webcomponents-base/dist/util/PopupUtils.js\";\nimport clamp from \"@ui5/webcomponents-base/dist/util/clamp.js\";\nimport isElementContainingBlock from \"@ui5/webcomponents-base/dist/util/isElementContainingBlock.js\";\nimport getEffectiveScrollbarStyle from \"@ui5/webcomponents-base/dist/util/getEffectiveScrollbarStyle.js\";\nimport getParentElement from \"@ui5/webcomponents-base/dist/util/getParentElement.js\";\nimport DOMReferenceConverter from \"@ui5/webcomponents-base/dist/converters/DOMReference.js\";\n\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport Popup from \"./Popup.js\";\nimport type { PopupBeforeCloseEventDetail as PopoverBeforeCloseEventDetail } from \"./Popup.js\";\nimport PopoverPlacement from \"./types/PopoverPlacement.js\";\nimport PopoverVerticalAlign from \"./types/PopoverVerticalAlign.js\";\nimport PopoverHorizontalAlign from \"./types/PopoverHorizontalAlign.js\";\nimport { addOpenedPopover, removeOpenedPopover } from \"./popup-utils/PopoverRegistry.js\";\n\n// Template\nimport PopoverTemplate from \"./generated/templates/PopoverTemplate.lit.js\";\n// Styles\nimport PopupsCommonCss from \"./generated/themes/PopupsCommon.css.js\";\nimport PopoverCss from \"./generated/themes/Popover.css.js\";\n\nconst ARROW_SIZE = 8;\n\ntype PopoverSize = {\n\twidth: number;\n\theight: number;\n}\n\ntype ArrowPosition = {\n\tx: number;\n\ty: number;\n}\n\ntype CalculatedPlacement = {\n\tarrow: ArrowPosition,\n\ttop: number,\n\tleft: number,\n\tplacement: `${PopoverPlacement}`,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-popover` component displays additional information for an object\n * in a compact way and without leaving the page.\n * The Popover can contain various UI elements, such as fields, tables, images, and charts.\n * It can also include actions in the footer.\n *\n * ### Structure\n *\n * The popover has three main areas:\n *\n * - Header (optional)\n * - Content\n * - Footer (optional)\n *\n * **Note:** The `ui5-popover` is closed when the user clicks\n * or taps outside the popover\n * or selects an action within the popover. You can prevent this with the\n * `modal` property.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Popover.js\";`\n *\n * @constructor\n * @extends Popup\n * @since 1.0.0-rc.6\n * @public\n * @csspart header - Used to style the header of the component\n * @csspart content - Used to style the content of the component\n * @csspart footer - Used to style the footer of the component\n */\n@customElement({\n\ttag: \"ui5-popover\",\n\tstyles: [\n\t\tPopup.styles,\n\t\tPopupsCommonCss,\n\t\tPopoverCss,\n\t\tgetEffectiveScrollbarStyle(),\n\t],\n\ttemplate: PopoverTemplate,\n})\nclass Popover extends Popup {\n\t/**\n\t * Defines the header text.\n\t *\n\t * **Note:** If `header` slot is provided, the `headerText` is ignored.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\theaderText?: string;\n\n\t/**\n\t * Determines on which side the component is placed at.\n\t * @default \"End\"\n\t * @public\n\t */\n\t@property()\n\tplacement: `${PopoverPlacement}` = \"End\";\n\n\t/**\n\t * Determines the horizontal alignment of the component.\n\t * @default \"Center\"\n\t * @public\n\t */\n\t@property()\n\thorizontalAlign: `${PopoverHorizontalAlign}` = \"Center\";\n\n\t/**\n\t * Determines the vertical alignment of the component.\n\t * @default \"Center\"\n\t * @public\n\t */\n\t@property()\n\tverticalAlign: `${PopoverVerticalAlign}` = \"Center\";\n\n\t/**\n\t * Defines whether the component should close when\n\t * clicking/tapping outside of the popover.\n\t * If enabled, it blocks any interaction with the background.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tmodal = false;\n\n\t/**\n\t * Determines whether the component arrow is hidden.\n\t * @default false\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\thideArrow = false;\n\n\t/**\n\t * Determines if there is no enough space, the component can be placed\n\t * over the target.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tallowTargetOverlap = false;\n\n\t/**\n\t * Defines whether the content is scrollable.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tdisableScrolling = false;\n\n\t/**\n\t * Sets the X translation of the arrow\n\t * @private\n\t */\n\t@property({ type: Number, noAttribute: true })\n\tarrowTranslateX = 0;\n\n\t/**\n\t * Sets the Y translation of the arrow\n\t * @private\n\t */\n\t@property({ type: Number, noAttribute: true })\n\tarrowTranslateY = 0;\n\n\t/**\n\t * Returns the calculated placement depending on the free space\n\t * @private\n\t */\n\t@property()\n\tactualPlacement: `${PopoverPlacement}` = \"End\";\n\n\t@property({ type: Number, noAttribute: true })\n\t_maxHeight?: number;\n\n\t@property({ type: Number, noAttribute: true })\n\t_maxWidth?: number;\n\n\t/**\n\t * Defines the header HTML Element.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement })\n\theader!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the footer HTML Element.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement })\n\tfooter!: Array<HTMLElement>;\n\n\t_opener?: HTMLElement | string;\n\t_openerRect?: DOMRect;\n\t_preventRepositionAndClose?: boolean;\n\t_top?: number;\n\t_left?: number;\n\t_oldPlacement?: CalculatedPlacement;\n\t_width?: string;\n\t_height?: string;\n\n\tstatic get VIEWPORT_MARGIN() {\n\t\treturn 10; // px\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\t/**\n\t * Defines the ID or DOM Reference of the element at which the popover is shown.\n\t * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the popover.\n\t * You can only set the `opener` attribute to a DOM Reference when using JavaScript.\n\t * @public\n\t * @default undefined\n\t * @since 1.2.0\n\t */\n\t@property({ converter: DOMReferenceConverter })\n\tset opener(value: HTMLElement | string) {\n\t\tif (this._opener === value) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._opener = value;\n\n\t\tif (value && this.open) {\n\t\t\tthis.openPopup();\n\t\t}\n\t}\n\n\tget opener(): HTMLElement | string | undefined {\n\t\treturn this._opener;\n\t}\n\n\tasync openPopup() {\n\t\tif (this._opened) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst opener = this.getOpenerHTMLElement(this.opener);\n\n\t\tif (!opener) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.isOpenerOutsideViewport(opener.getBoundingClientRect())) {\n\t\t\tawait renderFinished();\n\t\t\tthis.open = false;\n\t\t\tthis.fireDecoratorEvent(\"close\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis._openerRect = opener.getBoundingClientRect();\n\n\t\tawait super.openPopup();\n\t}\n\n\tisOpenerClicked(e: MouseEvent) {\n\t\tconst target = e.target as HTMLElement;\n\t\tif (target === this._opener) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst ui5ElementTarget = target as UI5Element;\n\n\t\tif (ui5ElementTarget.getFocusDomRef && ui5ElementTarget.getFocusDomRef() === this._opener) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn e.composedPath().indexOf(this._opener as EventTarget) > -1;\n\t}\n\n\t/**\n\t * Override for the _addOpenedPopup hook, which would otherwise just call addOpenedPopup(this)\n\t * @private\n\t */\n\t_addOpenedPopup() {\n\t\taddOpenedPopover(this);\n\t}\n\n\t/**\n\t * Override for the _removeOpenedPopup hook, which would otherwise just call removeOpenedPopup(this)\n\t * @private\n\t */\n\t_removeOpenedPopup() {\n\t\tremoveOpenedPopover(this);\n\t}\n\n\tgetOpenerHTMLElement(opener: HTMLElement | string | undefined): HTMLElement | null | undefined {\n\t\tif (opener === undefined || opener instanceof HTMLElement) {\n\t\t\treturn opener;\n\t\t}\n\n\t\tconst rootNode = this.getRootNode();\n\n\t\tif (!(rootNode instanceof ShadowRoot || rootNode instanceof Document)) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet openerHTMLElement = rootNode.getElementById(opener);\n\n\t\tif (rootNode instanceof ShadowRoot && !openerHTMLElement) {\n\t\t\topenerHTMLElement = document.getElementById(opener);\n\t\t}\n\n\t\tif (openerHTMLElement && this._isUI5Element(openerHTMLElement)) {\n\t\t\treturn openerHTMLElement.getFocusDomRef();\n\t\t}\n\n\t\treturn openerHTMLElement;\n\t}\n\n\tshouldCloseDueToOverflow(placement: `${PopoverPlacement}`, openerRect: DOMRect): boolean {\n\t\tconst threshold = 32;\n\t\tconst limits = {\n\t\t\t\"Start\": openerRect.right,\n\t\t\t\"End\": openerRect.left,\n\t\t\t\"Top\": openerRect.top,\n\t\t\t\"Bottom\": openerRect.bottom,\n\t\t};\n\n\t\tconst opener = this.getOpenerHTMLElement(this.opener);\n\t\tconst closedPopupParent = getClosedPopupParent(opener!);\n\t\tlet overflowsBottom = false;\n\t\tlet overflowsTop = false;\n\n\t\tif (closedPopupParent instanceof Popover) {\n\t\t\tconst contentRect = closedPopupParent.contentDOM.getBoundingClientRect();\n\t\t\toverflowsBottom = openerRect.top > (contentRect.top + contentRect.height);\n\t\t\toverflowsTop = (openerRect.top + openerRect.height) < contentRect.top;\n\t\t}\n\n\t\treturn (limits[placement] < 0 || (limits[placement] + threshold > (closedPopupParent as unknown as Window).innerHeight)) || overflowsBottom || overflowsTop;\n\t}\n\n\tshouldCloseDueToNoOpener(openerRect: DOMRect): boolean {\n\t\treturn openerRect.top === 0\n\t\t\t&& openerRect.bottom === 0\n\t\t\t&& openerRect.left === 0\n\t\t\t&& openerRect.right === 0;\n\t}\n\n\tisOpenerOutsideViewport(openerRect: DOMRect): boolean {\n\t\treturn openerRect.bottom < 0\n\t\t\t|| openerRect.top > window.innerHeight\n\t\t\t|| openerRect.right < 0\n\t\t\t|| openerRect.left > window.innerWidth;\n\t}\n\n\t/**\n\t * @override\n\t */\n\t_resize() {\n\t\tsuper._resize();\n\n\t\tif (this.open) {\n\t\t\tthis.reposition();\n\t\t}\n\t}\n\n\treposition() {\n\t\tthis._show();\n\t}\n\n\tasync _show() {\n\t\tsuper._show();\n\n\t\tconst opener = this.getOpenerHTMLElement(this.opener);\n\n\t\tif (opener && this._isUI5Element(opener) && !opener.getDomRef()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._opened) {\n\t\t\tthis._showOutsideViewport();\n\t\t}\n\n\t\tconst popoverSize = this.getPopoverSize();\n\t\tlet placement;\n\n\t\tif (popoverSize.width === 0 || popoverSize.height === 0) {\n\t\t\t// size can not be determined properly at this point, popover will be shown with the next reposition\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.open) {\n\t\t\t// update opener rect if it was changed during the popover being opened\n\t\t\tthis._openerRect = opener!.getBoundingClientRect();\n\t\t}\n\n\t\tif (this._oldPlacement && this.shouldCloseDueToNoOpener(this._openerRect!) && this.isFocusWithin()) {\n\t\t\t// reuse the old placement as the opener is not available,\n\t\t\t// but keep the popover open as the focus is within\n\t\t\tplacement = this._oldPlacement;\n\t\t} else {\n\t\t\tplacement = this.calcPlacement(this._openerRect!, popoverSize);\n\t\t}\n\n\t\tif (this._preventRepositionAndClose || this.isOpenerOutsideViewport(this._openerRect!)) {\n\t\t\tawait this._waitForDomRef();\n\t\t\treturn this.closePopup();\n\t\t}\n\n\t\tthis._oldPlacement = placement;\n\t\tthis.actualPlacement = placement.placement;\n\n\t\tlet left = clamp(\n\t\t\tthis._left!,\n\t\t\tPopover.VIEWPORT_MARGIN,\n\t\t\tdocument.documentElement.clientWidth - popoverSize.width - Popover.VIEWPORT_MARGIN,\n\t\t);\n\n\t\tif (this.actualPlacement === PopoverPlacement.End) {\n\t\t\tleft = Math.max(left, this._left!);\n\t\t}\n\n\t\tlet top = clamp(\n\t\t\tthis._top!,\n\t\t\tPopover.VIEWPORT_MARGIN,\n\t\t\tdocument.documentElement.clientHeight - popoverSize.height - Popover.VIEWPORT_MARGIN,\n\t\t);\n\n\t\tif (this.actualPlacement === PopoverPlacement.Bottom) {\n\t\t\ttop = Math.max(top, this._top!);\n\t\t}\n\n\t\tthis.arrowTranslateX = placement.arrow.x;\n\t\tthis.arrowTranslateY = placement.arrow.y;\n\n\t\ttop = this._adjustForIOSKeyboard(top);\n\n\t\tObject.assign(this.style, {\n\t\t\ttop: `${top}px`,\n\t\t\tleft: `${left}px`,\n\t\t});\n\n\t\tif (this.horizontalAlign === PopoverHorizontalAlign.Stretch && this._width) {\n\t\t\tthis.style.width = this._width;\n\t\t}\n\n\t\tif (this.verticalAlign === PopoverVerticalAlign.Stretch && this._height) {\n\t\t\tthis.style.height = this._height;\n\t\t}\n\t}\n\n\t/**\n\t * Adjust the desired top position to compensate for shift of the screen\n\t * caused by opened keyboard on iOS which affects all elements with position:fixed.\n\t * @private\n\t * @param top The target top in px.\n\t * @returns The adjusted top in px.\n\t */\n\t_adjustForIOSKeyboard(top: number): number {\n\t\tif (!isIOS()) {\n\t\t\treturn top;\n\t\t}\n\n\t\tconst actualTop = Math.ceil(this.getBoundingClientRect().top);\n\n\t\treturn top + (Number.parseInt(this.style.top || \"0\") - actualTop);\n\t}\n\n\t_getContainingBlockClientLocation() {\n\t\tlet parentElement = getParentElement(this);\n\n\t\twhile (parentElement) {\n\t\t\tif (isElementContainingBlock(parentElement)) {\n\t\t\t\treturn parentElement.getBoundingClientRect();\n\t\t\t}\n\n\t\t\tparentElement = getParentElement(parentElement);\n\t\t}\n\n\t\treturn { left: 0, top: 0 };\n\t}\n\n\tgetPopoverSize(): PopoverSize {\n\t\tconst rect = this.getBoundingClientRect(),\n\t\t\twidth = rect.width,\n\t\t\theight = rect.height;\n\n\t\treturn { width, height };\n\t}\n\n\t_showOutsideViewport() {\n\t\tObject.assign(this.style, {\n\t\t\ttop: \"-10000px\",\n\t\t\tleft: \"-10000px\",\n\t\t});\n\t}\n\n\t_isUI5Element(el: HTMLElement): el is UI5Element {\n\t\treturn \"isUI5Element\" in el;\n\t}\n\n\tget arrowDOM() {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-popover-arrow\")!;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tcalcPlacement(targetRect: DOMRect, popoverSize: PopoverSize): CalculatedPlacement {\n\t\tlet left = Popover.VIEWPORT_MARGIN;\n\t\tlet top = 0;\n\t\tconst allowTargetOverlap = this.allowTargetOverlap;\n\n\t\tconst clientWidth = document.documentElement.clientWidth;\n\t\tconst clientHeight = document.documentElement.clientHeight;\n\n\t\tlet maxHeight = clientHeight;\n\t\tlet maxWidth = clientWidth;\n\n\t\tconst placement = this.getActualPlacement(targetRect, popoverSize);\n\n\t\tthis._preventRepositionAndClose = this.shouldCloseDueToNoOpener(targetRect) || this.shouldCloseDueToOverflow(placement, targetRect);\n\n\t\tconst isVertical = placement === PopoverPlacement.Top\n\t\t\t|| placement === PopoverPlacement.Bottom;\n\n\t\tif (this.horizontalAlign === PopoverHorizontalAlign.Stretch && isVertical) {\n\t\t\tpopoverSize.width = targetRect.width;\n\t\t\tthis._width = `${targetRect.width}px`;\n\t\t} else if (this.verticalAlign === PopoverVerticalAlign.Stretch && !isVertical) {\n\t\t\tpopoverSize.height = targetRect.height;\n\t\t\tthis._height = `${targetRect.height}px`;\n\t\t}\n\n\t\tconst arrowOffset = this.hideArrow ? 0 : ARROW_SIZE;\n\n\t\t// calc popover positions\n\t\tswitch (placement) {\n\t\tcase PopoverPlacement.Top:\n\t\t\tleft = this.getVerticalLeft(targetRect, popoverSize);\n\t\t\ttop = Math.max(targetRect.top - popoverSize.height - arrowOffset, 0);\n\n\t\t\tif (!allowTargetOverlap) {\n\t\t\t\tmaxHeight = targetRect.top - arrowOffset;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase PopoverPlacement.Bottom:\n\t\t\tleft = this.getVerticalLeft(targetRect, popoverSize);\n\t\t\ttop = targetRect.bottom + arrowOffset;\n\n\t\t\tif (allowTargetOverlap) {\n\t\t\t\ttop = Math.max(Math.min(top, clientHeight - popoverSize.height), 0);\n\t\t\t} else {\n\t\t\t\tmaxHeight = clientHeight - targetRect.bottom - arrowOffset;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase PopoverPlacement.Start:\n\t\t\tleft = Math.max(targetRect.left - popoverSize.width - arrowOffset, 0);\n\t\t\ttop = this.getHorizontalTop(targetRect, popoverSize);\n\n\t\t\tif (!allowTargetOverlap) {\n\t\t\t\tmaxWidth = targetRect.left - arrowOffset;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase PopoverPlacement.End:\n\t\t\tleft = targetRect.left + targetRect.width + arrowOffset;\n\t\t\ttop = this.getHorizontalTop(targetRect, popoverSize);\n\n\t\t\tif (allowTargetOverlap) {\n\t\t\t\tleft = Math.max(Math.min(left, clientWidth - popoverSize.width), 0);\n\t\t\t} else {\n\t\t\t\tmaxWidth = clientWidth - targetRect.right - arrowOffset;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\t// correct popover positions\n\t\tif (isVertical) {\n\t\t\tif (popoverSize.width > clientWidth || left < Popover.VIEWPORT_MARGIN) {\n\t\t\t\tleft = Popover.VIEWPORT_MARGIN;\n\t\t\t} else if (left + popoverSize.width > clientWidth - Popover.VIEWPORT_MARGIN) {\n\t\t\t\tleft = clientWidth - Popover.VIEWPORT_MARGIN - popoverSize.width;\n\t\t\t}\n\t\t} else {\n\t\t\tif (popoverSize.height > clientHeight || top < Popover.VIEWPORT_MARGIN) { // eslint-disable-line\n\t\t\t\ttop = Popover.VIEWPORT_MARGIN;\n\t\t\t} else if (top + popoverSize.height > clientHeight - Popover.VIEWPORT_MARGIN) {\n\t\t\t\ttop = clientHeight - Popover.VIEWPORT_MARGIN - popoverSize.height;\n\t\t\t}\n\t\t}\n\n\t\tthis._maxHeight = Math.round(maxHeight - Popover.VIEWPORT_MARGIN);\n\t\tthis._maxWidth = Math.round(maxWidth - Popover.VIEWPORT_MARGIN);\n\n\t\tif (this._left === undefined || Math.abs(this._left - left) > 1.5) {\n\t\t\tthis._left = Math.round(left);\n\t\t}\n\n\t\tif (this._top === undefined || Math.abs(this._top - top) > 1.5) {\n\t\t\tthis._top = Math.round(top);\n\t\t}\n\n\t\tconst borderRadius = Number.parseInt(window.getComputedStyle(this).getPropertyValue(\"border-radius\"));\n\t\tconst arrowPos = this.getArrowPosition(targetRect, popoverSize, left, top, isVertical, borderRadius);\n\n\t\tthis._left += this.getRTLCorrectionLeft();\n\n\t\treturn {\n\t\t\tarrow: arrowPos,\n\t\t\ttop: this._top,\n\t\t\tleft: this._left,\n\t\t\tplacement,\n\t\t};\n\t}\n\n\tgetRTLCorrectionLeft() {\n\t\treturn parseFloat(window.getComputedStyle(this).left) - this.getBoundingClientRect().left;\n\t}\n\n\t/**\n\t * Calculates the position for the arrow.\n\t * @private\n\t * @param targetRect BoundingClientRect of the target element\n\t * @param popoverSize Width and height of the popover\n\t * @param left Left offset of the popover\n\t * @param top Top offset of the popover\n\t * @param isVertical If the popover is positioned vertically to the target element\n\t * @param borderRadius Value of the border-radius property\n\t * @returns Arrow's coordinates\n\t */\n\tgetArrowPosition(targetRect: DOMRect, popoverSize: PopoverSize, left: number, top: number, isVertical: boolean, borderRadius: number): ArrowPosition {\n\t\tconst horizontalAlign = this._actualHorizontalAlign;\n\t\tlet arrowXCentered = horizontalAlign === PopoverHorizontalAlign.Center || horizontalAlign === PopoverHorizontalAlign.Stretch;\n\n\t\tif (horizontalAlign === PopoverHorizontalAlign.End && left <= targetRect.left) {\n\t\t\tarrowXCentered = true;\n\t\t}\n\n\t\tif (horizontalAlign === PopoverHorizontalAlign.Start && left + popoverSize.width >= targetRect.left + targetRect.width) {\n\t\t\tarrowXCentered = true;\n\t\t}\n\n\t\tlet arrowTranslateX = 0;\n\t\tif (isVertical && arrowXCentered) {\n\t\t\tarrowTranslateX = targetRect.left + targetRect.width / 2 - left - popoverSize.width / 2;\n\t\t}\n\n\t\tlet arrowTranslateY = 0;\n\t\tif (!isVertical) {\n\t\t\tarrowTranslateY = targetRect.top + targetRect.height / 2 - top - popoverSize.height / 2;\n\t\t}\n\n\t\t// Restricts the arrow's translate value along each dimension,\n\t\t// so that the arrow does not clip over the popover's rounded borders.\n\t\tconst safeRangeForArrowY = popoverSize.height / 2 - borderRadius - ARROW_SIZE / 2;\n\t\tarrowTranslateY = clamp(\n\t\t\tarrowTranslateY,\n\t\t\t-safeRangeForArrowY,\n\t\t\tsafeRangeForArrowY,\n\t\t);\n\n\t\tconst safeRangeForArrowX = popoverSize.width / 2 - borderRadius - ARROW_SIZE / 2;\n\t\tarrowTranslateX = clamp(\n\t\t\tarrowTranslateX,\n\t\t\t-safeRangeForArrowX,\n\t\t\tsafeRangeForArrowX,\n\t\t);\n\n\t\treturn {\n\t\t\tx: Math.round(arrowTranslateX),\n\t\t\ty: Math.round(arrowTranslateY),\n\t\t};\n\t}\n\n\t/**\n\t * Fallbacks to new placement, prioritizing `Left` and `Right` placements.\n\t * @private\n\t */\n\tfallbackPlacement(clientWidth: number, clientHeight: number, targetRect: DOMRect, popoverSize: PopoverSize): PopoverPlacement | undefined {\n\t\tif (targetRect.left > popoverSize.width) {\n\t\t\treturn PopoverPlacement.Start;\n\t\t}\n\n\t\tif (clientWidth - targetRect.right > targetRect.left) {\n\t\t\treturn PopoverPlacement.End;\n\t\t}\n\n\t\tif (clientHeight - targetRect.bottom > popoverSize.height) {\n\t\t\treturn PopoverPlacement.Bottom;\n\t\t}\n\n\t\tif (clientHeight - targetRect.bottom < targetRect.top) {\n\t\t\treturn PopoverPlacement.Top;\n\t\t}\n\t}\n\n\tgetActualPlacement(targetRect: DOMRect, popoverSize: PopoverSize): `${PopoverPlacement}` {\n\t\tconst placement = this.placement;\n\t\tlet actualPlacement = placement;\n\n\t\tconst clientWidth = document.documentElement.clientWidth;\n\t\tconst clientHeight = document.documentElement.clientHeight;\n\n\t\tswitch (placement) {\n\t\tcase PopoverPlacement.Top:\n\t\t\tif (targetRect.top < popoverSize.height\n\t\t\t\t&& targetRect.top < clientHeight - targetRect.bottom) {\n\t\t\t\tactualPlacement = PopoverPlacement.Bottom;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase PopoverPlacement.Bottom:\n\t\t\tif (clientHeight - targetRect.bottom < popoverSize.height\n\t\t\t\t&& clientHeight - targetRect.bottom < targetRect.top) {\n\t\t\t\tactualPlacement = PopoverPlacement.Top;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase PopoverPlacement.Start:\n\t\t\tif (targetRect.left < popoverSize.width) {\n\t\t\t\tactualPlacement = this.fallbackPlacement(clientWidth, clientHeight, targetRect, popoverSize) || placement;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase PopoverPlacement.End:\n\t\t\tif (clientWidth - targetRect.right < popoverSize.width) {\n\t\t\t\tactualPlacement = this.fallbackPlacement(clientWidth, clientHeight, targetRect, popoverSize) || placement;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\treturn actualPlacement;\n\t}\n\n\tgetVerticalLeft(targetRect: DOMRect, popoverSize: PopoverSize): number {\n\t\tconst horizontalAlign = this._actualHorizontalAlign;\n\t\tlet left = Popover.VIEWPORT_MARGIN;\n\n\t\tswitch (horizontalAlign) {\n\t\tcase PopoverHorizontalAlign.Center:\n\t\tcase PopoverHorizontalAlign.Stretch:\n\t\t\tleft = targetRect.left - (popoverSize.width - targetRect.width) / 2;\n\t\t\tbreak;\n\t\tcase PopoverHorizontalAlign.Start:\n\t\t\tleft = targetRect.left;\n\t\t\tbreak;\n\t\tcase PopoverHorizontalAlign.End:\n\t\t\tleft = targetRect.right - popoverSize.width;\n\t\t\tbreak;\n\t\t}\n\n\t\treturn left;\n\t}\n\n\tgetHorizontalTop(targetRect: DOMRect, popoverSize: PopoverSize): number {\n\t\tlet top = 0;\n\n\t\tswitch (this.verticalAlign) {\n\t\tcase PopoverVerticalAlign.Center:\n\t\tcase PopoverVerticalAlign.Stretch:\n\t\t\ttop = targetRect.top - (popoverSize.height - targetRect.height) / 2;\n\t\t\tbreak;\n\t\tcase PopoverVerticalAlign.Top:\n\t\t\ttop = targetRect.top;\n\t\t\tbreak;\n\t\tcase PopoverVerticalAlign.Bottom:\n\t\t\ttop = targetRect.bottom - popoverSize.height;\n\t\t\tbreak;\n\t\t}\n\n\t\treturn top;\n\t}\n\n\tget isModal() { // Required by Popup.js\n\t\treturn this.modal;\n\t}\n\n\tget _ariaLabelledBy() { // Required by Popup.js\n\t\tif (!this._ariaLabel && this._displayHeader) {\n\t\t\treturn \"ui5-popup-header\";\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\t...super.styles,\n\t\t\troot: {\n\t\t\t\t\"max-height\": this._maxHeight ? `${this._maxHeight}px` : \"\",\n\t\t\t\t\"max-width\": this._maxWidth ? `${this._maxWidth}px` : \"\",\n\t\t\t},\n\t\t\tarrow: {\n\t\t\t\ttransform: `translate(${this.arrowTranslateX}px, ${this.arrowTranslateY}px)`,\n\t\t\t},\n\t\t};\n\t}\n\n\tget classes() {\n\t\tconst allClasses = super.classes;\n\t\tallClasses.root[\"ui5-popover-root\"] = true;\n\n\t\treturn allClasses;\n\t}\n\n\t/**\n\t * Hook for descendants to hide header.\n\t */\n\tget _displayHeader() {\n\t\treturn !!(this.header.length || this.headerText);\n\t}\n\n\t/**\n\t * Hook for descendants to hide footer.\n\t */\n\tget _displayFooter() {\n\t\treturn true;\n\t}\n\n\tget _actualHorizontalAlign() {\n\t\tif (this.effectiveDir === \"rtl\") {\n\t\t\tif (this.horizontalAlign === PopoverHorizontalAlign.Start) {\n\t\t\t\treturn PopoverHorizontalAlign.End;\n\t\t\t}\n\n\t\t\tif (this.horizontalAlign === PopoverHorizontalAlign.End) {\n\t\t\t\treturn PopoverHorizontalAlign.Start;\n\t\t\t}\n\t\t}\n\n\t\treturn this.horizontalAlign;\n\t}\n}\n\nconst instanceOfPopover = (object: any): object is Popover => {\n\treturn \"opener\" in object;\n};\n\nPopover.define();\n\nexport default Popover;\n\nexport { instanceOfPopover };\n\nexport type {\n\tPopoverBeforeCloseEventDetail,\n};\n"]}
|
package/dist/TableGrowing.d.ts
CHANGED
|
@@ -72,13 +72,6 @@ declare class TableGrowing extends UI5Element implements ITableGrowing {
|
|
|
72
72
|
* @public
|
|
73
73
|
*/
|
|
74
74
|
growingSubText?: string;
|
|
75
|
-
/**
|
|
76
|
-
* Disables the growing feature.
|
|
77
|
-
*
|
|
78
|
-
* @default false
|
|
79
|
-
* @public
|
|
80
|
-
*/
|
|
81
|
-
disabled: boolean;
|
|
82
75
|
/**
|
|
83
76
|
* Defines the active state of the growing button.
|
|
84
77
|
* Used for keyboard interaction.
|
package/dist/TableGrowing.js
CHANGED
|
@@ -67,13 +67,6 @@ let TableGrowing = TableGrowing_1 = class TableGrowing extends UI5Element {
|
|
|
67
67
|
* @public
|
|
68
68
|
*/
|
|
69
69
|
this.type = "Button";
|
|
70
|
-
/**
|
|
71
|
-
* Disables the growing feature.
|
|
72
|
-
*
|
|
73
|
-
* @default false
|
|
74
|
-
* @public
|
|
75
|
-
*/
|
|
76
|
-
this.disabled = false;
|
|
77
70
|
/**
|
|
78
71
|
* Defines the active state of the growing button.
|
|
79
72
|
* Used for keyboard interaction.
|
|
@@ -99,9 +92,6 @@ let TableGrowing = TableGrowing_1 = class TableGrowing extends UI5Element {
|
|
|
99
92
|
focusRow ||= this._table?.rows[0];
|
|
100
93
|
focusRow?.focus();
|
|
101
94
|
}
|
|
102
|
-
if (this.disabled) {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
95
|
if (this._renderContent !== this.hasGrowingComponent()) {
|
|
106
96
|
this._invalidate++;
|
|
107
97
|
return;
|
|
@@ -124,9 +114,6 @@ let TableGrowing = TableGrowing_1 = class TableGrowing extends UI5Element {
|
|
|
124
114
|
this._invalidateTable();
|
|
125
115
|
}
|
|
126
116
|
hasGrowingComponent() {
|
|
127
|
-
if (this.disabled) {
|
|
128
|
-
return false;
|
|
129
|
-
}
|
|
130
117
|
if (this.type === TableGrowingMode.Scroll) {
|
|
131
118
|
return !!this._table && this._table._scrollContainer.clientHeight >= this._table._tableElement.scrollHeight;
|
|
132
119
|
}
|
|
@@ -226,9 +213,6 @@ __decorate([
|
|
|
226
213
|
__decorate([
|
|
227
214
|
property()
|
|
228
215
|
], TableGrowing.prototype, "growingSubText", void 0);
|
|
229
|
-
__decorate([
|
|
230
|
-
property({ type: Boolean })
|
|
231
|
-
], TableGrowing.prototype, "disabled", void 0);
|
|
232
216
|
__decorate([
|
|
233
217
|
property({ type: Boolean })
|
|
234
218
|
], TableGrowing.prototype, "_activeState", void 0);
|