@ui5/webcomponents 2.3.1-rc.0 → 2.4.0-rc.1
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 +42 -0
- package/cypress/specs/Button.cy.ts +13 -26
- package/cypress/specs/Form.cy.ts +100 -96
- package/cypress/specs/Menu.cy.ts +5 -10
- package/cypress/specs/RTL.cy.ts +2 -4
- package/cypress/specs/base/AriaLabelHelper.cy.ts +2 -4
- package/cypress/specs/base/Events.cy.ts +207 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Avatar.js +4 -2
- package/dist/Avatar.js.map +1 -1
- package/dist/AvatarGroup.js +2 -2
- package/dist/AvatarGroup.js.map +1 -1
- package/dist/Breadcrumbs.js +6 -5
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Button.js +8 -3
- package/dist/Button.js.map +1 -1
- package/dist/Calendar.js +17 -12
- package/dist/Calendar.js.map +1 -1
- package/dist/CalendarLegend.js +6 -3
- package/dist/CalendarLegend.js.map +1 -1
- package/dist/CardHeader.js +6 -4
- package/dist/CardHeader.js.map +1 -1
- package/dist/Carousel.js +4 -3
- package/dist/Carousel.js.map +1 -1
- package/dist/CheckBox.js +16 -5
- package/dist/CheckBox.js.map +1 -1
- package/dist/ColorPalette.js +1 -1
- package/dist/ColorPalette.js.map +1 -1
- package/dist/ColorPaletteItem.js +5 -0
- package/dist/ColorPaletteItem.js.map +1 -1
- package/dist/ColorPalettePopover.js +12 -3
- package/dist/ColorPalettePopover.js.map +1 -1
- package/dist/ColorPicker.js +5 -2
- package/dist/ColorPicker.js.map +1 -1
- package/dist/ComboBox.js +16 -11
- package/dist/ComboBox.js.map +1 -1
- package/dist/DatePicker.js +8 -5
- package/dist/DatePicker.js.map +1 -1
- package/dist/DayPicker.js +15 -7
- package/dist/DayPicker.js.map +1 -1
- package/dist/FileUploader.js +5 -3
- package/dist/FileUploader.js.map +1 -1
- package/dist/Form.d.ts +3 -3
- package/dist/Form.js +5 -5
- package/dist/Form.js.map +1 -1
- package/dist/FormGroup.js +3 -0
- package/dist/FormGroup.js.map +1 -1
- package/dist/Icon.js +5 -3
- package/dist/Icon.js.map +1 -1
- package/dist/Input.js +41 -19
- package/dist/Input.js.map +1 -1
- package/dist/Link.d.ts +1 -6
- package/dist/Link.js +10 -15
- package/dist/Link.js.map +1 -1
- package/dist/List.d.ts +1 -0
- package/dist/List.js +31 -19
- package/dist/List.js.map +1 -1
- package/dist/ListItem.d.ts +1 -0
- package/dist/ListItem.js +20 -7
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemBase.js +21 -10
- package/dist/ListItemBase.js.map +1 -1
- package/dist/ListItemGroup.js +6 -5
- package/dist/ListItemGroup.js.map +1 -1
- package/dist/MessageStrip.js +4 -2
- package/dist/MessageStrip.js.map +1 -1
- package/dist/MonthPicker.js +9 -5
- package/dist/MonthPicker.js.map +1 -1
- package/dist/MultiComboBox.js +24 -15
- package/dist/MultiComboBox.js.map +1 -1
- package/dist/MultiInput.js +6 -3
- package/dist/MultiInput.js.map +1 -1
- package/dist/Panel.js +5 -3
- package/dist/Panel.js.map +1 -1
- package/dist/Popover.js +1 -1
- package/dist/Popover.js.map +1 -1
- package/dist/Popup.js +16 -13
- package/dist/Popup.js.map +1 -1
- package/dist/RadioButton.js +4 -2
- package/dist/RadioButton.js.map +1 -1
- package/dist/RadioButtonGroup.js +1 -1
- package/dist/RadioButtonGroup.js.map +1 -1
- package/dist/RangeSlider.d.ts +16 -6
- package/dist/RangeSlider.js +172 -21
- package/dist/RangeSlider.js.map +1 -1
- package/dist/RatingIndicator.js +5 -3
- package/dist/RatingIndicator.js.map +1 -1
- package/dist/ResponsivePopover.js +1 -1
- package/dist/ResponsivePopover.js.map +1 -1
- package/dist/SegmentedButton.js +2 -1
- package/dist/SegmentedButton.js.map +1 -1
- package/dist/Select.d.ts +3 -3
- package/dist/Select.js +20 -8
- package/dist/Select.js.map +1 -1
- package/dist/Slider.d.ts +10 -2
- package/dist/Slider.js +55 -7
- package/dist/Slider.js.map +1 -1
- package/dist/SliderBase.d.ts +28 -4
- package/dist/SliderBase.js +82 -12
- package/dist/SliderBase.js.map +1 -1
- package/dist/SplitButton.js +8 -4
- package/dist/SplitButton.js.map +1 -1
- package/dist/StepInput.js +8 -5
- package/dist/StepInput.js.map +1 -1
- package/dist/Switch.js +16 -4
- package/dist/Switch.js.map +1 -1
- package/dist/TabContainer.js +16 -14
- package/dist/TabContainer.js.map +1 -1
- package/dist/Table.js +2 -1
- package/dist/Table.js.map +1 -1
- package/dist/TableGrowing.js +4 -2
- package/dist/TableGrowing.js.map +1 -1
- package/dist/TableSelection.js +6 -4
- package/dist/TableSelection.js.map +1 -1
- package/dist/Tag.js +4 -2
- package/dist/Tag.js.map +1 -1
- package/dist/TextArea.js +26 -10
- package/dist/TextArea.js.map +1 -1
- package/dist/TimePicker.js +11 -5
- package/dist/TimePicker.js.map +1 -1
- package/dist/TimePickerClock.js +3 -2
- package/dist/TimePickerClock.js.map +1 -1
- package/dist/TimePickerInternals.js +2 -1
- package/dist/TimePickerInternals.js.map +1 -1
- package/dist/TimeSelectionClocks.d.ts +1 -2
- package/dist/TimeSelectionClocks.js +5 -10
- package/dist/TimeSelectionClocks.js.map +1 -1
- package/dist/TimeSelectionInputs.js +5 -1
- package/dist/TimeSelectionInputs.js.map +1 -1
- package/dist/Toast.js +4 -2
- package/dist/Toast.js.map +1 -1
- package/dist/Token.js +7 -4
- package/dist/Token.js.map +1 -1
- package/dist/Tokenizer.js +23 -17
- package/dist/Tokenizer.js.map +1 -1
- package/dist/Toolbar.js +14 -1
- package/dist/Toolbar.js.map +1 -1
- package/dist/ToolbarSelect.js +5 -2
- package/dist/ToolbarSelect.js.map +1 -1
- package/dist/Tree.js +34 -12
- package/dist/Tree.js.map +1 -1
- package/dist/TreeItemBase.js +8 -5
- package/dist/TreeItemBase.js.map +1 -1
- package/dist/YearPicker.js +9 -5
- package/dist/YearPicker.js.map +1 -1
- package/dist/bundle.scoped.config.d.ts +1 -0
- package/dist/bundle.scoped.config.js +5 -0
- package/dist/bundle.scoped.config.js.map +1 -0
- package/dist/bundle.scoped.esm.d.ts +1 -0
- package/dist/bundle.scoped.esm.js +1 -4
- package/dist/bundle.scoped.esm.js.map +1 -1
- package/dist/css/themes/Avatar.css +1 -1
- package/dist/css/themes/AvatarGroup.css +1 -1
- package/dist/css/themes/Bar.css +1 -1
- package/dist/css/themes/Breadcrumbs.css +1 -1
- package/dist/css/themes/BusyIndicator.css +1 -1
- package/dist/css/themes/Button.css +1 -1
- package/dist/css/themes/Calendar.css +1 -1
- package/dist/css/themes/CalendarHeader.css +1 -1
- package/dist/css/themes/CalendarLegend.css +1 -1
- package/dist/css/themes/CalendarLegendItem.css +1 -1
- package/dist/css/themes/Card.css +1 -1
- package/dist/css/themes/CardHeader.css +1 -1
- package/dist/css/themes/Carousel.css +1 -1
- package/dist/css/themes/CheckBox.css +1 -1
- package/dist/css/themes/ColorPalette.css +1 -1
- package/dist/css/themes/ColorPaletteItem.css +1 -1
- package/dist/css/themes/ColorPalettePopover.css +1 -1
- package/dist/css/themes/ColorPicker.css +1 -1
- package/dist/css/themes/ComboBox.css +1 -1
- package/dist/css/themes/DatePicker.css +1 -1
- package/dist/css/themes/DateTimePickerPopover.css +1 -1
- package/dist/css/themes/DayPicker.css +1 -1
- package/dist/css/themes/Dialog.css +1 -1
- package/dist/css/themes/FileUploader.css +1 -1
- package/dist/css/themes/Form.css +1 -1
- package/dist/css/themes/FormItem.css +1 -1
- package/dist/css/themes/FormLabelSpan.css +1 -1
- package/dist/css/themes/FormLayout.css +1 -1
- package/dist/css/themes/GrowingButton.css +1 -1
- package/dist/css/themes/Icon.css +1 -1
- package/dist/css/themes/Input.css +1 -1
- package/dist/css/themes/InputIcon.css +1 -1
- package/dist/css/themes/InputSharedStyles.css +1 -1
- package/dist/css/themes/Link.css +1 -1
- package/dist/css/themes/List.css +1 -1
- package/dist/css/themes/ListItem.css +1 -1
- package/dist/css/themes/ListItemBase.css +1 -1
- package/dist/css/themes/ListItemCustom.css +1 -1
- package/dist/css/themes/ListItemGroup.css +1 -1
- package/dist/css/themes/ListItemGroupHeader.css +1 -1
- package/dist/css/themes/ListItemIcon.css +1 -1
- package/dist/css/themes/Menu.css +1 -1
- package/dist/css/themes/MenuItem.css +1 -1
- package/dist/css/themes/MessageStrip.css +1 -1
- package/dist/css/themes/MonthPicker.css +1 -1
- package/dist/css/themes/MultiComboBox.css +1 -1
- package/dist/css/themes/MultiComboBoxPopover.css +1 -1
- package/dist/css/themes/MultiInput.css +1 -1
- package/dist/css/themes/NavigationMenu.css +1 -1
- package/dist/css/themes/NavigationMenuItem.css +1 -1
- package/dist/css/themes/OptionBase.css +1 -1
- package/dist/css/themes/Panel.css +1 -1
- package/dist/css/themes/Popover.css +1 -1
- package/dist/css/themes/PopupsCommon.css +1 -1
- package/dist/css/themes/ProgressIndicator.css +1 -1
- package/dist/css/themes/RadioButton.css +1 -1
- package/dist/css/themes/RangeSlider.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/ResponsivePopover.css +1 -1
- package/dist/css/themes/ResponsivePopoverCommon.css +1 -1
- package/dist/css/themes/SegmentedButton.css +1 -1
- package/dist/css/themes/SegmentedButtonItem.css +1 -1
- package/dist/css/themes/Select.css +1 -1
- package/dist/css/themes/SliderBase.css +1 -1
- package/dist/css/themes/SplitButton.css +1 -1
- package/dist/css/themes/StepInput.css +1 -1
- package/dist/css/themes/SuggestionItem.css +1 -1
- package/dist/css/themes/SuggestionItemCustom.css +1 -1
- package/dist/css/themes/Switch.css +1 -1
- package/dist/css/themes/TabContainer.css +1 -1
- package/dist/css/themes/TabInOverflow.css +1 -1
- package/dist/css/themes/TabInStrip.css +1 -1
- package/dist/css/themes/TabSemanticIcon.css +1 -1
- package/dist/css/themes/TabSeparatorInOverflow.css +1 -1
- package/dist/css/themes/Table.css +1 -1
- package/dist/css/themes/TableCellBase.css +1 -1
- package/dist/css/themes/TableHeaderRow.css +1 -1
- package/dist/css/themes/TableRow.css +1 -1
- package/dist/css/themes/TableRowBase.css +1 -1
- package/dist/css/themes/Tag.css +1 -1
- package/dist/css/themes/Text.css +1 -1
- package/dist/css/themes/TextArea.css +1 -1
- package/dist/css/themes/TimePicker.css +1 -1
- package/dist/css/themes/Toast.css +1 -1
- package/dist/css/themes/ToggleButton.css +1 -1
- package/dist/css/themes/Token.css +1 -1
- package/dist/css/themes/Tokenizer.css +1 -1
- package/dist/css/themes/TokenizerPopover.css +1 -1
- package/dist/css/themes/Toolbar.css +1 -1
- package/dist/css/themes/ToolbarPopover.css +1 -1
- package/dist/css/themes/TreeItem.css +1 -1
- package/dist/css/themes/ValueStateMessage.css +1 -1
- package/dist/css/themes/YearPicker.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw_exp/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +499 -59
- package/dist/custom-elements.json +94 -21
- 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/i18n/i18n-defaults.d.ts +3 -1
- package/dist/generated/i18n/i18n-defaults.js +3 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/templates/DialogTemplate.lit.js +1 -1
- package/dist/generated/templates/DialogTemplate.lit.js.map +1 -1
- package/dist/generated/templates/LinkTemplate.lit.js +1 -1
- package/dist/generated/templates/LinkTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ListTemplate.lit.js +5 -4
- package/dist/generated/templates/ListTemplate.lit.js.map +1 -1
- package/dist/generated/templates/PopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/PopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/PopupTemplate.lit.js +1 -1
- package/dist/generated/templates/PopupTemplate.lit.js.map +1 -1
- package/dist/generated/templates/RangeSliderTemplate.lit.js +9 -3
- package/dist/generated/templates/RangeSliderTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ResponsivePopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/ResponsivePopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SliderBaseTemplate.lit.js +3 -1
- package/dist/generated/templates/SliderBaseTemplate.lit.js.map +1 -1
- package/dist/generated/templates/SliderTemplate.lit.js +6 -2
- package/dist/generated/templates/SliderTemplate.lit.js.map +1 -1
- package/dist/generated/templates/TimeSelectionClocksTemplate.lit.js +2 -2
- package/dist/generated/templates/TimeSelectionClocksTemplate.lit.js.map +1 -1
- package/dist/generated/themes/Avatar.css.js +1 -1
- package/dist/generated/themes/Avatar.css.js.map +1 -1
- package/dist/generated/themes/AvatarGroup.css.js +1 -1
- package/dist/generated/themes/AvatarGroup.css.js.map +1 -1
- package/dist/generated/themes/Bar.css.js +1 -1
- package/dist/generated/themes/Bar.css.js.map +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js.map +1 -1
- package/dist/generated/themes/BusyIndicator.css.js +1 -1
- package/dist/generated/themes/BusyIndicator.css.js.map +1 -1
- package/dist/generated/themes/Button.css.js +1 -1
- package/dist/generated/themes/Button.css.js.map +1 -1
- package/dist/generated/themes/Calendar.css.js +1 -1
- package/dist/generated/themes/Calendar.css.js.map +1 -1
- package/dist/generated/themes/CalendarHeader.css.js +1 -1
- package/dist/generated/themes/CalendarHeader.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegend.css.js +1 -1
- package/dist/generated/themes/CalendarLegend.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js.map +1 -1
- package/dist/generated/themes/Card.css.js +1 -1
- package/dist/generated/themes/Card.css.js.map +1 -1
- package/dist/generated/themes/CardHeader.css.js +1 -1
- package/dist/generated/themes/CardHeader.css.js.map +1 -1
- package/dist/generated/themes/Carousel.css.js +1 -1
- package/dist/generated/themes/Carousel.css.js.map +1 -1
- package/dist/generated/themes/CheckBox.css.js +1 -1
- package/dist/generated/themes/CheckBox.css.js.map +1 -1
- package/dist/generated/themes/ColorPalette.css.js +1 -1
- package/dist/generated/themes/ColorPalette.css.js.map +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js.map +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js.map +1 -1
- package/dist/generated/themes/ColorPicker.css.js +1 -1
- package/dist/generated/themes/ColorPicker.css.js.map +1 -1
- package/dist/generated/themes/ComboBox.css.js +1 -1
- package/dist/generated/themes/ComboBox.css.js.map +1 -1
- package/dist/generated/themes/DatePicker.css.js +1 -1
- package/dist/generated/themes/DatePicker.css.js.map +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js.map +1 -1
- package/dist/generated/themes/DayPicker.css.js +1 -1
- package/dist/generated/themes/DayPicker.css.js.map +1 -1
- package/dist/generated/themes/Dialog.css.js +1 -1
- package/dist/generated/themes/Dialog.css.js.map +1 -1
- package/dist/generated/themes/FileUploader.css.js +1 -1
- package/dist/generated/themes/FileUploader.css.js.map +1 -1
- package/dist/generated/themes/Form.css.js +1 -1
- package/dist/generated/themes/Form.css.js.map +1 -1
- package/dist/generated/themes/FormItem.css.js +1 -1
- package/dist/generated/themes/FormItem.css.js.map +1 -1
- package/dist/generated/themes/FormLabelSpan.css.js +1 -1
- package/dist/generated/themes/FormLabelSpan.css.js.map +1 -1
- package/dist/generated/themes/FormLayout.css.js +1 -1
- package/dist/generated/themes/FormLayout.css.js.map +1 -1
- package/dist/generated/themes/GrowingButton.css.js +1 -1
- package/dist/generated/themes/GrowingButton.css.js.map +1 -1
- package/dist/generated/themes/Icon.css.js +1 -1
- package/dist/generated/themes/Icon.css.js.map +1 -1
- package/dist/generated/themes/Input.css.js +1 -1
- package/dist/generated/themes/Input.css.js.map +1 -1
- package/dist/generated/themes/InputIcon.css.js +1 -1
- package/dist/generated/themes/InputIcon.css.js.map +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js.map +1 -1
- package/dist/generated/themes/Link.css.js +1 -1
- package/dist/generated/themes/Link.css.js.map +1 -1
- package/dist/generated/themes/List.css.js +1 -1
- package/dist/generated/themes/List.css.js.map +1 -1
- package/dist/generated/themes/ListItem.css.js +1 -1
- package/dist/generated/themes/ListItem.css.js.map +1 -1
- package/dist/generated/themes/ListItemBase.css.js +1 -1
- package/dist/generated/themes/ListItemBase.css.js.map +1 -1
- package/dist/generated/themes/ListItemCustom.css.js +1 -1
- package/dist/generated/themes/ListItemCustom.css.js.map +1 -1
- package/dist/generated/themes/ListItemGroup.css.js +1 -1
- package/dist/generated/themes/ListItemGroup.css.js.map +1 -1
- package/dist/generated/themes/ListItemGroupHeader.css.js +1 -1
- package/dist/generated/themes/ListItemGroupHeader.css.js.map +1 -1
- package/dist/generated/themes/ListItemIcon.css.js +1 -1
- package/dist/generated/themes/ListItemIcon.css.js.map +1 -1
- package/dist/generated/themes/Menu.css.js +1 -1
- package/dist/generated/themes/Menu.css.js.map +1 -1
- package/dist/generated/themes/MenuItem.css.js +1 -1
- package/dist/generated/themes/MenuItem.css.js.map +1 -1
- package/dist/generated/themes/MessageStrip.css.js +1 -1
- package/dist/generated/themes/MessageStrip.css.js.map +1 -1
- package/dist/generated/themes/MonthPicker.css.js +1 -1
- package/dist/generated/themes/MonthPicker.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBox.css.js +1 -1
- package/dist/generated/themes/MultiComboBox.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js.map +1 -1
- package/dist/generated/themes/MultiInput.css.js +1 -1
- package/dist/generated/themes/MultiInput.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenu.css.js +1 -1
- package/dist/generated/themes/NavigationMenu.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenuItem.css.js +1 -1
- package/dist/generated/themes/NavigationMenuItem.css.js.map +1 -1
- package/dist/generated/themes/OptionBase.css.js +1 -1
- package/dist/generated/themes/OptionBase.css.js.map +1 -1
- package/dist/generated/themes/Panel.css.js +1 -1
- package/dist/generated/themes/Panel.css.js.map +1 -1
- package/dist/generated/themes/Popover.css.js +1 -1
- package/dist/generated/themes/Popover.css.js.map +1 -1
- package/dist/generated/themes/PopupsCommon.css.js +1 -1
- package/dist/generated/themes/PopupsCommon.css.js.map +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js.map +1 -1
- package/dist/generated/themes/RadioButton.css.js +1 -1
- package/dist/generated/themes/RadioButton.css.js.map +1 -1
- package/dist/generated/themes/RangeSlider.css.js +1 -1
- package/dist/generated/themes/RangeSlider.css.js.map +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js.map +1 -1
- package/dist/generated/themes/SegmentedButton.css.js +1 -1
- package/dist/generated/themes/SegmentedButton.css.js.map +1 -1
- package/dist/generated/themes/SegmentedButtonItem.css.js +1 -1
- package/dist/generated/themes/SegmentedButtonItem.css.js.map +1 -1
- package/dist/generated/themes/Select.css.js +1 -1
- package/dist/generated/themes/Select.css.js.map +1 -1
- package/dist/generated/themes/SliderBase.css.js +1 -1
- package/dist/generated/themes/SliderBase.css.js.map +1 -1
- package/dist/generated/themes/SplitButton.css.js +1 -1
- package/dist/generated/themes/SplitButton.css.js.map +1 -1
- package/dist/generated/themes/StepInput.css.js +1 -1
- package/dist/generated/themes/StepInput.css.js.map +1 -1
- package/dist/generated/themes/SuggestionItem.css.js +1 -1
- package/dist/generated/themes/SuggestionItem.css.js.map +1 -1
- package/dist/generated/themes/SuggestionItemCustom.css.js +1 -1
- package/dist/generated/themes/SuggestionItemCustom.css.js.map +1 -1
- package/dist/generated/themes/Switch.css.js +1 -1
- package/dist/generated/themes/Switch.css.js.map +1 -1
- package/dist/generated/themes/TabContainer.css.js +1 -1
- package/dist/generated/themes/TabContainer.css.js.map +1 -1
- package/dist/generated/themes/TabInOverflow.css.js +1 -1
- package/dist/generated/themes/TabInOverflow.css.js.map +1 -1
- package/dist/generated/themes/TabInStrip.css.js +1 -1
- package/dist/generated/themes/TabInStrip.css.js.map +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js.map +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js.map +1 -1
- package/dist/generated/themes/Table.css.js +1 -1
- package/dist/generated/themes/Table.css.js.map +1 -1
- package/dist/generated/themes/TableCellBase.css.js +1 -1
- package/dist/generated/themes/TableCellBase.css.js.map +1 -1
- package/dist/generated/themes/TableHeaderRow.css.js +1 -1
- package/dist/generated/themes/TableHeaderRow.css.js.map +1 -1
- package/dist/generated/themes/TableRow.css.js +1 -1
- package/dist/generated/themes/TableRow.css.js.map +1 -1
- package/dist/generated/themes/TableRowBase.css.js +1 -1
- package/dist/generated/themes/TableRowBase.css.js.map +1 -1
- package/dist/generated/themes/Tag.css.js +1 -1
- package/dist/generated/themes/Tag.css.js.map +1 -1
- package/dist/generated/themes/Text.css.js +1 -1
- package/dist/generated/themes/Text.css.js.map +1 -1
- package/dist/generated/themes/TextArea.css.js +1 -1
- package/dist/generated/themes/TextArea.css.js.map +1 -1
- package/dist/generated/themes/TimePicker.css.js +1 -1
- package/dist/generated/themes/TimePicker.css.js.map +1 -1
- package/dist/generated/themes/Toast.css.js +1 -1
- package/dist/generated/themes/Toast.css.js.map +1 -1
- package/dist/generated/themes/ToggleButton.css.js +1 -1
- package/dist/generated/themes/ToggleButton.css.js.map +1 -1
- package/dist/generated/themes/Token.css.js +1 -1
- package/dist/generated/themes/Token.css.js.map +1 -1
- package/dist/generated/themes/Tokenizer.css.js +1 -1
- package/dist/generated/themes/Tokenizer.css.js.map +1 -1
- package/dist/generated/themes/TokenizerPopover.css.js +1 -1
- package/dist/generated/themes/TokenizerPopover.css.js.map +1 -1
- package/dist/generated/themes/Toolbar.css.js +1 -1
- package/dist/generated/themes/Toolbar.css.js.map +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js.map +1 -1
- package/dist/generated/themes/TreeItem.css.js +1 -1
- package/dist/generated/themes/TreeItem.css.js.map +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js.map +1 -1
- package/dist/generated/themes/YearPicker.css.js +1 -1
- package/dist/generated/themes/YearPicker.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +21 -6
- package/dist/web-types.json +52 -32
- package/package.json +9 -9
- package/src/Link.hbs +0 -1
- package/src/List.hbs +7 -1
- package/src/Popup.hbs +2 -2
- package/src/RangeSlider.hbs +70 -38
- package/src/Slider.hbs +37 -18
- package/src/SliderBase.hbs +13 -4
- package/src/TimeSelectionClocks.hbs +0 -2
- package/src/i18n/messagebundle.properties +6 -0
- package/src/themes/ColorPaletteItem.css +23 -1
- package/src/themes/ColorPicker.css +9 -1
- package/src/themes/Form.css +3 -2
- package/src/themes/FormLayout.css +3 -3
- package/src/themes/GrowingButton.css +5 -2
- package/src/themes/Input.css +0 -1
- package/src/themes/Link.css +10 -6
- package/src/themes/ListItemBase.css +3 -3
- package/src/themes/ListItemGroupHeader.css +4 -0
- package/src/themes/SliderBase.css +27 -7
- package/src/themes/Switch.css +2 -1
- package/src/themes/base/ColorPalette-parameters.css +3 -0
- package/src/themes/base/sizes-parameters.css +1 -1
- package/src/themes/sap_fiori_3/SliderBase-parameters.css +7 -0
- package/src/themes/sap_fiori_3/sizes-parameters.css +4 -0
- package/src/themes/sap_fiori_3_dark/SliderBase-parameters.css +7 -0
- package/src/themes/sap_fiori_3_dark/sizes-parameters.css +4 -0
- package/src/themes/sap_fiori_3_hcb/sizes-parameters.css +6 -0
- package/src/themes/sap_fiori_3_hcw/sizes-parameters.css +6 -0
- package/src/themes/sap_horizon/ColorPalette-parameters.css +3 -0
- package/src/themes/sap_horizon_dark/ColorPalette-parameters.css +3 -0
- package/src/themes/sap_horizon_dark_exp/ColorPalette-parameters.css +3 -0
- package/src/themes/sap_horizon_exp/ColorPalette-parameters.css +3 -0
- package/src/themes/sap_horizon_hcb/SliderBase-parameters.css +1 -1
- package/src/themes/sap_horizon_hcw/SliderBase-parameters.css +1 -1
- package/tsconfig.json +2 -0
package/dist/Table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../src/Table.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AAEjG,OAAO,aAAa,MAAM,wDAAwD,CAAC;AAEnF,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,aAAa,MAAM,4CAA4C,CAAC;AACvE,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAC1D,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,OAAO,iBAAiB,MAAM,8BAA8B,CAAC;AAC7D,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,EACN,aAAa,GACb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,2B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AAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;0CAC9B;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;+CACtB;AAGlB;IADN,IAAI,CAAC,oBAAoB,CAAC;+BACG;AApHzB,KAAK;IA7BV,aAAa,CAAC;QACd,GAAG,EAAE,WAAW;QAChB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,aAAa;QACvB,cAAc,EAAE,IAAI;QACpB,YAAY,EAAE;YACb,aAAa;YACb,cAAc;YACd,SAAS;YACT,QAAQ;SACR;KACD,CAAC;IAEF;;;;;OAKG;;IACF,KAAK,CAA2B,WAAW,EAAE;QAC7C,MAAM,EAAE;YACP;;eAEG;YACH,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SACvB;KACD,CAAC;GAEI,KAAK,CA6XV;AAED,KAAK,CAAC,MAAM,EAAE,CAAC;AAEf,eAAe,KAAK,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport { getScopedVarName } from \"@ui5/webcomponents-base/dist/CustomElementsScope.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport TableTemplate from \"./generated/templates/TableTemplate.lit.js\";\nimport TableStyles from \"./generated/themes/Table.css.js\";\nimport TableRow from \"./TableRow.js\";\nimport TableHeaderRow from \"./TableHeaderRow.js\";\nimport type TableHeaderCell from \"./TableHeaderCell.js\";\nimport TableExtension from \"./TableExtension.js\";\nimport type TableSelection from \"./TableSelection.js\";\nimport TableOverflowMode from \"./types/TableOverflowMode.js\";\nimport TableNavigation from \"./TableNavigation.js\";\nimport {\n\tTABLE_NO_DATA,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport BusyIndicator from \"./BusyIndicator.js\";\nimport TableCell from \"./TableCell.js\";\nimport { findVerticalScrollContainer, scrollElementIntoView, isFeature } from \"./TableUtils.js\";\n\n/**\n * Interface for components that can be slotted inside the <code>features</code> slot of the <code>ui5-table</code>.\n *\n * @public\n * @experimental\n */\ninterface ITableFeature extends UI5Element {\n\treadonly identifier: string;\n\t/**\n\t * Called when the table is activated.\n\t * @param table table instance\n\t */\n\tonTableActivate(table: Table): void;\n\t/**\n\t * Called when the table finished rendering.\n\t */\n\tonTableRendered?(): void;\n}\n\n/**\n * Interface for components that can be slotted inside the <code>features</code> slot of the <code>ui5-table</code>\n * and provide growing/data loading functionality.\n * @public\n * @experimental\n */\ninterface ITableGrowing extends ITableFeature {\n\t/**\n\t * Called when the table needs to load more data.\n\t */\n\tloadMore(): void;\n\t/**\n\t * Determines whether the table has a growing control, that should be rendered in the table.\n\t */\n\thasGrowingComponent(): boolean;\n\t_individualSlot?: string;\n}\n\n/**\n * Fired when an interactive row is clicked.\n * @param {TableRow} row The clicked row instance\n * @public\n */\ntype TableRowClickEventDetail = {\n\trow: TableRow,\n};\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table` component provides a set of sophisticated features for displaying and dealing with vast amounts of data in a responsive manner.\n * To render the `ui5-table`, you need to define the columns and rows. You can use the provided `ui5-table-header-row` and `ui5-table-row` components for this purpose.\n *\n * ### Features\n *\n * The `ui5-table` can be enhanced in its functionalities by applying different features.\n * Features can be slotted into the `features` slot, to enable them in the component.\n * Features need to be imported separately, as they are not enabled by default.\n *\n * The following features are currently available:\n *\n * * [TableSelection](../TableSelection) - adds selection capabilities to the table\n * * [TableGrowing](../TableGrowing) - provides growing capabilities to load more data\n *\n * ### Keyboard Handling\n *\n * This component provides a build in fast navigation group which can be used via [F6] / [Shift] + [F6] / [Ctrl] + [Alt/Option] / [Down] or [Ctrl] + [Alt/Option] + [Up].\n * In order to use this functionality, you need to import the following module:\n * `import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"`\n *\n * Furthermore, you can interact with `ui5-table` via the following keys:\n *\n * If the focus is on a row, the following keyboard shortcuts are available:\n * * <kbd>Down</kbd> - Navigates down\n * * <kbd>Up</kbd> - Navigates up\n * * <kbd>Right</kbd> - Selects the first cell of the row\n * * <kbd>Space</kbd> - Toggles the selection of the row\n * * <kbd>Ctrl/Cmd + A</kbd> - In multi selection mode, toggles the selection of all rows\n * * <kbd>Home</kbd> - Navigates to the first row, if the focus is on the first row, navigates to the header row\n * * <kbd>End</kbd> - Navigates to the last row, if the focus is on the last row, navigates to the growing button\n * * <kbd>Page Up</kbd> - Navigates one page up, if the focus is on the first row, navigates to the header row\n * * <kbd>Page Down</kbd> - Navigates one page down, if the focus is on the last row, navigates to the growing button\n * * <kbd>F2</kbd> - Focuses the first tabbable element in the row\n * * <kbd>F7</kbd> - If focus position is remembered, moves focus to the corresponding focus position row, otherwise to the first tabbable element within the row\n * * <kbd>[Shift]Tab</kbd> - Move focus to the element in the tab chain outside the table\n\n *\n * If the focus is on a cell, the following keyboard shortcuts are available:\n * * <kbd>Down</kbd> - Navigates down\n * * <kbd>Up</kbd> - Navigates up\n * * <kbd>Right</kbd> - Navigates right\n * * <kbd>Left</kbd> - Navigates left, if the focus is on the first cell of the row, the focus is moved to the row.\n * * <kbd>Home</kbd> - Navigates to the first cell of the current row, if the focus is on the first cell, navigates to the corresponding row\n * * <kbd>End</kbd> - Navigates to the last cell of the current row, if the focus is on the last cell, navigates to the corresponding row\n * * <kbd>Page Up</kbd> - Navigates one page up while keeping the focus in same column\n * * <kbd>Page Down</kbd> - Navigates one page down while keeping the focus in same column\n * * <kbd>F2</kbd> - Toggles the focus between the first tabbable cell content and the cell\n * * <kbd>Enter</kbd> - Focuses the first tabbable cell content\n * * <kbd>F7</kbd> - If the focus is on an interactive element inside a row, moves focus to the corresponding row and remembers the focus position of the element within the row\n * * <kbd>[Shift]Tab</kbd> - Move focus to the element in the tab chain outside the table\n\n *\n * If the focus is on an interactive cell content, the following keyboard shortcuts are available:\n * * <kbd>Down</kbd> - Move the focus to the interactive element in the same column of the previous row, unless the focused element prevents the default\n * * <kbd>Up</kbd> - Move the focus to the interactive element in the same column of the next row, unless the focused element prevents the default\n * * <kbd>[Shift]Tab</kbd> - Move the focus to the element in the tab chain\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Table.js\";`\\\n * `import \"@ui5/webcomponents/dist/TableRow.js\";` (`ui5-table-row`)\\\n * `import \"@ui5/webcomponents/dist/TableCell.js\";` (`ui5-table-cell`)\\\n * `import \"@ui5/webcomponents/dist/TableHeaderRow.js\";` (`ui5-table-header-row`)\\\n * `import \"@ui5/webcomponents/dist/TableHeaderCell.js\";` (`ui5-table-header-cell`)\n *\n * @constructor\n * @extends UI5Element\n * @since 2.0.0\n * @public\n * @experimental This Table web component is available since 2.0 and has been newly implemented to provide better screen reader and keyboard handling support.\n * Currently, it's considered experimental as its API is subject to change.\n * This Table replaces the previous Table web component, that has been part of **@ui5/webcomponents** version 1.x.\n * For compatibility reasons, we moved the previous Table implementation to the **@ui5/webcomponents-compat** package\n * and will be maintained until the new Table is experimental.\n * Keep in mind that you can use either the compat/Table, or the main/Table - you can't use them both as they both define the `ui5-table` tag name.\n */\n@customElement({\n\ttag: \"ui5-table\",\n\trenderer: litRender,\n\tstyles: TableStyles,\n\ttemplate: TableTemplate,\n\tfastNavigation: true,\n\tdependencies: [\n\t\tBusyIndicator,\n\t\tTableHeaderRow,\n\t\tTableCell,\n\t\tTableRow,\n\t],\n})\n\n/**\n * Fired when an interactive row is clicked.\n *\n * @param {TableRow} row The row instance\n * @public\n */\n@event<TableRowClickEventDetail>(\"row-click\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\trow: { type: TableRow },\n\t},\n})\n\nclass Table extends UI5Element {\n\t/**\n\t * Defines the rows of the component.\n\t *\n\t * Note: Use <code>ui5-table-row</code> for the intended design.\n\t *\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t\tinvalidateOnChildChange: {\n\t\t\tproperties: [\"navigated\"],\n\t\t\tslots: false,\n\t\t},\n\t})\n\trows!: Array<TableRow>;\n\n\t/**\n\t * Defines the header row of the component.\n\t *\n\t * Note: Use <code>ui5-table-header-row</code> for the intended design.\n\t *\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, invalidateOnChildChange: { properties: false, slots: true } })\n\theaderRow!: Array<TableHeaderRow>;\n\n\t/**\n\t * Defines the custom visualization if there is no data available.\n\t *\n\t * @public\n\t */\n\t@slot()\n\tnodata!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the features of the component.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, individualSlots: true })\n\tfeatures!: Array<ITableFeature>;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Identifies the element (or elements) that labels the component.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the text to be displayed when there are no rows in the component.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tnoDataText?: string;\n\n\t/**\n\t * Defines the mode of the <code>ui5-table</code> overflow behavior.\n\t *\n\t * Available options are:\n\t *\n\t * <code>Scroll</code> - Columns are shown as regular columns and horizontal scrolling is enabled.\n\t *\n\t * <code>Popin</code> - Columns are shown as pop-ins instead of regular columns.\n\t *\n\t * @default \"Scroll\"\n\t * @public\n\t */\n\t@property()\n\toverflowMode: `${TableOverflowMode}` = \"Scroll\";\n\n\t/**\n\t * Defines if the loading indicator should be shown.\n\t *\n\t * <b>Note:</b> When the component is loading, it is non-interactive.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tloading = false;\n\n\t/**\n * Defines the delay in milliseconds, after which the loading indicator will show up for this component.\n * @default 1000\n * @public\n */\n\t@property({ type: Number })\n\tloadingDelay = 1000;\n\n\t/**\n\t * Defines the sticky top offset of the table, if other sticky elements outside of the table exist.\n\t */\n\t@property()\n\tstickyTop = \"0\";\n\n\t@property({ type: Number, noAttribute: true })\n\t_invalidate = 0;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_renderNavigated = false;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_events = [\"keydown\", \"keyup\", \"click\", \"focusin\", \"focusout\"];\n\t_onEventBound: (e: Event) => void;\n\t_onResizeBound: ResizeObserverCallback;\n\t_tableNavigation?: TableNavigation;\n\t_poppedIn: Array<{col: TableHeaderCell, width: float}>;\n\t_containerWidth: number;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._poppedIn = [];\n\t\tthis._containerWidth = 0;\n\t\tthis._onResizeBound = this._onResize.bind(this);\n\t\tthis._onEventBound = this._onEvent.bind(this);\n\t}\n\n\tonEnterDOM() {\n\t\tif (this.overflowMode === TableOverflowMode.Popin) {\n\t\t\tResizeHandler.register(this, this._onResizeBound);\n\t\t}\n\t\tthis._events.forEach(eventType => this.addEventListener(eventType, this._onEventBound));\n\t\tthis.features.forEach(feature => feature.onTableActivate(this));\n\t\tthis._tableNavigation = new TableNavigation(this);\n\t}\n\n\tonExitDOM() {\n\t\tthis._tableNavigation = undefined;\n\t\tthis._events.forEach(eventType => this.addEventListener(eventType, this._onEventBound));\n\t\tif (this.overflowMode === TableOverflowMode.Popin) {\n\t\t\tResizeHandler.deregister(this, this._onResizeBound);\n\t\t}\n\t}\n\n\tonBeforeRendering(): void {\n\t\tconst renderNavigated = this._renderNavigated;\n\t\tthis._renderNavigated = this.rows.some(row => row.navigated);\n\t\tif (renderNavigated !== this._renderNavigated) {\n\t\t\tthis.rows.forEach(row => {\n\t\t\t\trow._renderNavigated = this._renderNavigated;\n\t\t\t});\n\t\t}\n\n\t\tthis.style.setProperty(getScopedVarName(\"--ui5_grid_sticky_top\"), this.stickyTop);\n\t\tthis._refreshPopinState();\n\t}\n\n\tonAfterRendering(): void {\n\t\tthis.features.forEach(feature => feature.onTableRendered?.());\n\t}\n\n\t_getSelection(): TableSelection | undefined {\n\t\treturn this.features.find(feature => isFeature<TableSelection>(feature, \"TableSelection\")) as TableSelection;\n\t}\n\n\t_onEvent(e: Event) {\n\t\tconst composedPath = e.composedPath();\n\t\tconst eventOrigin = composedPath[0] as HTMLElement;\n\t\tconst elements = [this._tableNavigation, ...composedPath, ...this.features];\n\t\telements.forEach(element => {\n\t\t\tif (element instanceof TableExtension || (element instanceof HTMLElement && element.localName.includes(\"ui5-table\"))) {\n\t\t\t\tconst eventHandlerName = `_on${e.type}` as keyof typeof element;\n\t\t\t\tconst eventHandler = element[eventHandlerName] as (e?: Event, eventOrigin?: HTMLElement) => void;\n\t\t\t\tif (typeof eventHandler === \"function\") {\n\t\t\t\t\teventHandler.call(element, e, eventOrigin);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t_onResize() {\n\t\tconst { clientWidth, scrollWidth } = this._tableElement;\n\n\t\tif (scrollWidth > clientWidth) {\n\t\t\t// Overflow Handling: Move columns into the popin until overflow is resolved\n\t\t\tconst overflow = scrollWidth - clientWidth;\n\t\t\tconst headers = this._getPopinOrderedColumns(false);\n\t\t\tconst poppedInWidth = headers.reduce((totalPoppedInWidth, headerCell) => {\n\t\t\t\tif (totalPoppedInWidth < overflow && !headerCell._popin) {\n\t\t\t\t\tconst headerWidth = Math.ceil(headerCell.getBoundingClientRect().width);\n\t\t\t\t\ttotalPoppedInWidth += headerWidth;\n\t\t\t\t\tthis._setHeaderPopinState(headerCell, true, headerWidth);\n\t\t\t\t}\n\t\t\t\treturn totalPoppedInWidth;\n\t\t\t}, 0);\n\t\t\t// Calculate container width considering popped-in columns\n\t\t\tconst columnOverflow = poppedInWidth - overflow;\n\t\t\tthis._containerWidth = clientWidth - columnOverflow;\n\t\t} else {\n\t\t\t// Underflow Handling: Restore columns from popin until container width is met\n\t\t\tconst headers = this._getPopinOrderedColumns(true).filter(it => it._popin);\n\n\t\t\theaders.every(headerCell => {\n\t\t\t\tconst underflow = clientWidth - this._containerWidth;\n\t\t\t\tif (underflow >= headerCell._popinWidth) {\n\t\t\t\t\tthis._containerWidth += headerCell._popinWidth;\n\t\t\t\t\tthis._setHeaderPopinState(headerCell, false, 0);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\t// Handles focus in the table, when the focus is below a sticky element\n\t\tscrollElementIntoView(this._scrollContainer, e.target as HTMLElement, this._stickyElements, this.effectiveDir === \"rtl\");\n\t}\n\n\t/**\n\t * Refreshes the popin state of the columns.\n\t * Syncs the popin state of the columns with the popin state of the header cells.\n\t * This is needed when additional rows are manually added and no resize happens.\n\t * @private\n\t */\n\t_refreshPopinState() {\n\t\tthis.headerRow[0]?.cells.forEach((header, index) => {\n\t\t\tthis.rows.forEach(row => {\n\t\t\t\tconst cell = row.cells[index];\n\t\t\t\tif (cell && cell._popin !== header._popin) {\n\t\t\t\t\tcell._popin = header._popin;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t_onGrow() {\n\t\tthis._growing?.loadMore();\n\t}\n\n\t_getPopinOrderedColumns(reverse: boolean) {\n\t\tlet headers = [...this.headerRow[0].cells];\n\t\theaders = headers.reverse(); // reverse the \"visual\" order\n\t\theaders = headers.sort((a, b) => a.importance - b.importance); // sort by importance (asc)\n\t\theaders.pop(); // remove the most important column, as it will not be popped in\n\n\t\tif (reverse) {\n\t\t\theaders = headers.reverse();\n\t\t}\n\n\t\treturn headers;\n\t}\n\n\t_setHeaderPopinState(headerCell: TableHeaderCell, inPopin: boolean, popinWidth: number) {\n\t\tconst headerIndex = this.headerRow[0].cells.indexOf(headerCell);\n\t\theaderCell._popin = inPopin;\n\t\theaderCell._popinWidth = popinWidth;\n\t\tthis.rows.forEach(row => {\n\t\t\trow.cells[headerIndex]._popin = inPopin;\n\t\t});\n\t}\n\n\t_isFeature(feature: any) {\n\t\treturn Boolean(feature.onTableActivate && feature.onTableRendered);\n\t}\n\n\t_isGrowingFeature(feature: any) {\n\t\treturn Boolean(feature.loadMore && feature.hasGrowingComponent && this._isFeature(feature));\n\t}\n\n\t_onRowPress(row: TableRow) {\n\t\tthis.fireEvent<TableRowClickEventDetail>(\"row-click\", { row });\n\t}\n\n\tget styles() {\n\t\tconst headerStyleMap = this.headerRow?.[0]?.cells?.reduce((headerStyles, headerCell) => {\n\t\t\tif (headerCell.horizontalAlign !== undefined) {\n\t\t\t\theaderStyles[`--horizontal-align-${headerCell._individualSlot}`] = headerCell.horizontalAlign;\n\t\t\t}\n\t\t\treturn headerStyles;\n\t\t}, {} as { [key: string]: string });\n\t\treturn {\n\t\t\ttable: {\n\t\t\t\t\"grid-template-columns\": this._gridTemplateColumns,\n\t\t\t\t...headerStyleMap,\n\t\t\t},\n\t\t};\n\t}\n\n\tget _gridTemplateColumns() {\n\t\tif (!this.headerRow[0]) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst widths = [];\n\t\tconst visibleHeaderCells = this.headerRow[0]._visibleCells as TableHeaderCell[];\n\t\tif (this._getSelection()?.hasRowSelector()) {\n\t\t\twidths.push(`var(${getScopedVarName(\"--_ui5_checkbox_width_height\")})`);\n\t\t}\n\t\twidths.push(...visibleHeaderCells.map(cell => {\n\t\t\tconst minWidth = cell.minWidth === \"auto\" ? \"3rem\" : cell.minWidth;\n\t\t\tif (cell.width === \"auto\" || cell.width.includes(\"%\") || cell.width.includes(\"fr\") || cell.width.includes(\"vw\")) {\n\t\t\t\treturn `minmax(${minWidth}, ${cell.maxWidth})`;\n\t\t\t}\n\t\t\treturn `minmax(${cell.width}, ${cell.width})`;\n\t\t}));\n\t\tif (this._renderNavigated) {\n\t\t\twidths.push(`var(${getScopedVarName(\"--_ui5_table_navigated_cell_width\")})`);\n\t\t}\n\t\treturn widths.join(\" \");\n\t}\n\n\tget _tableOverflowX() {\n\t\treturn (this.overflowMode === TableOverflowMode.Popin) ? \"clip\" : \"auto\";\n\t}\n\n\tget _tableOverflowY() {\n\t\treturn \"auto\";\n\t}\n\n\tget _nodataRow() {\n\t\treturn this.shadowRoot!.getElementById(\"nodata-row\") as TableRow;\n\t}\n\n\tget _beforeElement() {\n\t\treturn this.shadowRoot!.getElementById(\"before\") as HTMLElement;\n\t}\n\n\tget _afterElement() {\n\t\treturn this.shadowRoot!.getElementById(\"after\") as HTMLElement;\n\t}\n\n\tget _tableElement() {\n\t\treturn this.shadowRoot!.getElementById(\"table\") as HTMLElement;\n\t}\n\n\tget _loadingElement() {\n\t\treturn this.shadowRoot!.getElementById(\"loading\") as HTMLElement;\n\t}\n\n\tget _effectiveNoDataText() {\n\t\treturn this.noDataText || Table.i18nBundle.getText(TABLE_NO_DATA);\n\t}\n\n\tget _ariaLabel() {\n\t\treturn getEffectiveAriaLabelText(this) || undefined;\n\t}\n\n\tget _ariaMultiSelectable() {\n\t\tconst selection = this._getSelection();\n\t\treturn (selection?.isSelectable() && this.rows.length) ? selection.isMultiSelect() : undefined;\n\t}\n\n\tget _shouldRenderGrowing() {\n\t\treturn this.rows.length && this._growing?.hasGrowingComponent();\n\t}\n\n\tget _growing() {\n\t\treturn this.features.find(feature => this._isGrowingFeature(feature)) as ITableGrowing;\n\t}\n\n\tget _stickyElements() {\n\t\tconst stickyRows = this.headerRow.filter(row => row.sticky);\n\t\tconst stickyColumns = this.headerRow[0]._stickyCells as TableHeaderCell[];\n\n\t\treturn [...stickyRows, ...stickyColumns];\n\t}\n\n\tget _scrollContainer() {\n\t\treturn findVerticalScrollContainer(this._tableElement);\n\t}\n\n\tget isTable() {\n\t\treturn true;\n\t}\n}\n\nTable.define();\n\nexport default Table;\n\nexport type {\n\tITableFeature,\n\tITableGrowing,\n\tTableRowClickEventDetail,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../src/Table.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AAEjG,OAAO,aAAa,MAAM,wDAAwD,CAAC;AAEnF,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,aAAa,MAAM,4CAA4C,CAAC;AACvE,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAC1D,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,OAAO,iBAAiB,MAAM,8BAA8B,CAAC;AAC7D,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,EACN,aAAa,GACb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAgDh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AAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;+CACtB;AAGlB;IADN,IAAI,CAAC,oBAAoB,CAAC;+BACG;AApHzB,KAAK;IA9BV,aAAa,CAAC;QACd,GAAG,EAAE,WAAW;QAChB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,aAAa;QACvB,cAAc,EAAE,IAAI;QACpB,YAAY,EAAE;YACb,aAAa;YACb,cAAc;YACd,SAAS;YACT,QAAQ;SACR;KACD,CAAC;IAEF;;;;;OAKG;;IACF,KAAK,CAA2B,WAAW,EAAE;QAC7C,MAAM,EAAE;YACP;;eAEG;YACH,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SACvB;QACD,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,KAAK,CA6XV;AAED,KAAK,CAAC,MAAM,EAAE,CAAC;AAEf,eAAe,KAAK,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport { getScopedVarName } from \"@ui5/webcomponents-base/dist/CustomElementsScope.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport TableTemplate from \"./generated/templates/TableTemplate.lit.js\";\nimport TableStyles from \"./generated/themes/Table.css.js\";\nimport TableRow from \"./TableRow.js\";\nimport TableHeaderRow from \"./TableHeaderRow.js\";\nimport type TableHeaderCell from \"./TableHeaderCell.js\";\nimport TableExtension from \"./TableExtension.js\";\nimport type TableSelection from \"./TableSelection.js\";\nimport TableOverflowMode from \"./types/TableOverflowMode.js\";\nimport TableNavigation from \"./TableNavigation.js\";\nimport {\n\tTABLE_NO_DATA,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport BusyIndicator from \"./BusyIndicator.js\";\nimport TableCell from \"./TableCell.js\";\nimport { findVerticalScrollContainer, scrollElementIntoView, isFeature } from \"./TableUtils.js\";\n\n/**\n * Interface for components that can be slotted inside the <code>features</code> slot of the <code>ui5-table</code>.\n *\n * @public\n * @experimental\n */\ninterface ITableFeature extends UI5Element {\n\treadonly identifier: string;\n\t/**\n\t * Called when the table is activated.\n\t * @param table table instance\n\t */\n\tonTableActivate(table: Table): void;\n\t/**\n\t * Called when the table finished rendering.\n\t */\n\tonTableRendered?(): void;\n}\n\n/**\n * Interface for components that can be slotted inside the <code>features</code> slot of the <code>ui5-table</code>\n * and provide growing/data loading functionality.\n * @public\n * @experimental\n */\ninterface ITableGrowing extends ITableFeature {\n\t/**\n\t * Called when the table needs to load more data.\n\t */\n\tloadMore(): void;\n\t/**\n\t * Determines whether the table has a growing control, that should be rendered in the table.\n\t */\n\thasGrowingComponent(): boolean;\n\t_individualSlot?: string;\n}\n\n/**\n * Fired when an interactive row is clicked.\n * @param {TableRow} row The clicked row instance\n * @public\n */\ntype TableRowClickEventDetail = {\n\trow: TableRow,\n};\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table` component provides a set of sophisticated features for displaying and dealing with vast amounts of data in a responsive manner.\n * To render the `ui5-table`, you need to define the columns and rows. You can use the provided `ui5-table-header-row` and `ui5-table-row` components for this purpose.\n *\n * ### Features\n *\n * The `ui5-table` can be enhanced in its functionalities by applying different features.\n * Features can be slotted into the `features` slot, to enable them in the component.\n * Features need to be imported separately, as they are not enabled by default.\n *\n * The following features are currently available:\n *\n * * [TableSelection](../TableSelection) - adds selection capabilities to the table\n * * [TableGrowing](../TableGrowing) - provides growing capabilities to load more data\n *\n * ### Keyboard Handling\n *\n * This component provides a build in fast navigation group which can be used via [F6] / [Shift] + [F6] / [Ctrl] + [Alt/Option] / [Down] or [Ctrl] + [Alt/Option] + [Up].\n * In order to use this functionality, you need to import the following module:\n * `import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"`\n *\n * Furthermore, you can interact with `ui5-table` via the following keys:\n *\n * If the focus is on a row, the following keyboard shortcuts are available:\n * * <kbd>Down</kbd> - Navigates down\n * * <kbd>Up</kbd> - Navigates up\n * * <kbd>Right</kbd> - Selects the first cell of the row\n * * <kbd>Space</kbd> - Toggles the selection of the row\n * * <kbd>Ctrl/Cmd + A</kbd> - In multi selection mode, toggles the selection of all rows\n * * <kbd>Home</kbd> - Navigates to the first row, if the focus is on the first row, navigates to the header row\n * * <kbd>End</kbd> - Navigates to the last row, if the focus is on the last row, navigates to the growing button\n * * <kbd>Page Up</kbd> - Navigates one page up, if the focus is on the first row, navigates to the header row\n * * <kbd>Page Down</kbd> - Navigates one page down, if the focus is on the last row, navigates to the growing button\n * * <kbd>F2</kbd> - Focuses the first tabbable element in the row\n * * <kbd>F7</kbd> - If focus position is remembered, moves focus to the corresponding focus position row, otherwise to the first tabbable element within the row\n * * <kbd>[Shift]Tab</kbd> - Move focus to the element in the tab chain outside the table\n\n *\n * If the focus is on a cell, the following keyboard shortcuts are available:\n * * <kbd>Down</kbd> - Navigates down\n * * <kbd>Up</kbd> - Navigates up\n * * <kbd>Right</kbd> - Navigates right\n * * <kbd>Left</kbd> - Navigates left, if the focus is on the first cell of the row, the focus is moved to the row.\n * * <kbd>Home</kbd> - Navigates to the first cell of the current row, if the focus is on the first cell, navigates to the corresponding row\n * * <kbd>End</kbd> - Navigates to the last cell of the current row, if the focus is on the last cell, navigates to the corresponding row\n * * <kbd>Page Up</kbd> - Navigates one page up while keeping the focus in same column\n * * <kbd>Page Down</kbd> - Navigates one page down while keeping the focus in same column\n * * <kbd>F2</kbd> - Toggles the focus between the first tabbable cell content and the cell\n * * <kbd>Enter</kbd> - Focuses the first tabbable cell content\n * * <kbd>F7</kbd> - If the focus is on an interactive element inside a row, moves focus to the corresponding row and remembers the focus position of the element within the row\n * * <kbd>[Shift]Tab</kbd> - Move focus to the element in the tab chain outside the table\n\n *\n * If the focus is on an interactive cell content, the following keyboard shortcuts are available:\n * * <kbd>Down</kbd> - Move the focus to the interactive element in the same column of the previous row, unless the focused element prevents the default\n * * <kbd>Up</kbd> - Move the focus to the interactive element in the same column of the next row, unless the focused element prevents the default\n * * <kbd>[Shift]Tab</kbd> - Move the focus to the element in the tab chain\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Table.js\";`\\\n * `import \"@ui5/webcomponents/dist/TableRow.js\";` (`ui5-table-row`)\\\n * `import \"@ui5/webcomponents/dist/TableCell.js\";` (`ui5-table-cell`)\\\n * `import \"@ui5/webcomponents/dist/TableHeaderRow.js\";` (`ui5-table-header-row`)\\\n * `import \"@ui5/webcomponents/dist/TableHeaderCell.js\";` (`ui5-table-header-cell`)\n *\n * @constructor\n * @extends UI5Element\n * @since 2.0.0\n * @public\n * @experimental This Table web component is available since 2.0 and has been newly implemented to provide better screen reader and keyboard handling support.\n * Currently, it's considered experimental as its API is subject to change.\n * This Table replaces the previous Table web component, that has been part of **@ui5/webcomponents** version 1.x.\n * For compatibility reasons, we moved the previous Table implementation to the **@ui5/webcomponents-compat** package\n * and will be maintained until the new Table is experimental.\n * Keep in mind that you can use either the compat/Table, or the main/Table - you can't use them both as they both define the `ui5-table` tag name.\n */\n@customElement({\n\ttag: \"ui5-table\",\n\trenderer: litRender,\n\tstyles: TableStyles,\n\ttemplate: TableTemplate,\n\tfastNavigation: true,\n\tdependencies: [\n\t\tBusyIndicator,\n\t\tTableHeaderRow,\n\t\tTableCell,\n\t\tTableRow,\n\t],\n})\n\n/**\n * Fired when an interactive row is clicked.\n *\n * @param {TableRow} row The row instance\n * @public\n */\n@event<TableRowClickEventDetail>(\"row-click\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\trow: { type: TableRow },\n\t},\n\tbubbles: true,\n})\n\nclass Table extends UI5Element {\n\t/**\n\t * Defines the rows of the component.\n\t *\n\t * Note: Use <code>ui5-table-row</code> for the intended design.\n\t *\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t\tinvalidateOnChildChange: {\n\t\t\tproperties: [\"navigated\"],\n\t\t\tslots: false,\n\t\t},\n\t})\n\trows!: Array<TableRow>;\n\n\t/**\n\t * Defines the header row of the component.\n\t *\n\t * Note: Use <code>ui5-table-header-row</code> for the intended design.\n\t *\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, invalidateOnChildChange: { properties: false, slots: true } })\n\theaderRow!: Array<TableHeaderRow>;\n\n\t/**\n\t * Defines the custom visualization if there is no data available.\n\t *\n\t * @public\n\t */\n\t@slot()\n\tnodata!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the features of the component.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, individualSlots: true })\n\tfeatures!: Array<ITableFeature>;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Identifies the element (or elements) that labels the component.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the text to be displayed when there are no rows in the component.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tnoDataText?: string;\n\n\t/**\n\t * Defines the mode of the <code>ui5-table</code> overflow behavior.\n\t *\n\t * Available options are:\n\t *\n\t * <code>Scroll</code> - Columns are shown as regular columns and horizontal scrolling is enabled.\n\t *\n\t * <code>Popin</code> - Columns are shown as pop-ins instead of regular columns.\n\t *\n\t * @default \"Scroll\"\n\t * @public\n\t */\n\t@property()\n\toverflowMode: `${TableOverflowMode}` = \"Scroll\";\n\n\t/**\n\t * Defines if the loading indicator should be shown.\n\t *\n\t * <b>Note:</b> When the component is loading, it is non-interactive.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tloading = false;\n\n\t/**\n * Defines the delay in milliseconds, after which the loading indicator will show up for this component.\n * @default 1000\n * @public\n */\n\t@property({ type: Number })\n\tloadingDelay = 1000;\n\n\t/**\n\t * Defines the sticky top offset of the table, if other sticky elements outside of the table exist.\n\t */\n\t@property()\n\tstickyTop = \"0\";\n\n\t@property({ type: Number, noAttribute: true })\n\t_invalidate = 0;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_renderNavigated = false;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_events = [\"keydown\", \"keyup\", \"click\", \"focusin\", \"focusout\"];\n\t_onEventBound: (e: Event) => void;\n\t_onResizeBound: ResizeObserverCallback;\n\t_tableNavigation?: TableNavigation;\n\t_poppedIn: Array<{col: TableHeaderCell, width: float}>;\n\t_containerWidth: number;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._poppedIn = [];\n\t\tthis._containerWidth = 0;\n\t\tthis._onResizeBound = this._onResize.bind(this);\n\t\tthis._onEventBound = this._onEvent.bind(this);\n\t}\n\n\tonEnterDOM() {\n\t\tif (this.overflowMode === TableOverflowMode.Popin) {\n\t\t\tResizeHandler.register(this, this._onResizeBound);\n\t\t}\n\t\tthis._events.forEach(eventType => this.addEventListener(eventType, this._onEventBound));\n\t\tthis.features.forEach(feature => feature.onTableActivate(this));\n\t\tthis._tableNavigation = new TableNavigation(this);\n\t}\n\n\tonExitDOM() {\n\t\tthis._tableNavigation = undefined;\n\t\tthis._events.forEach(eventType => this.addEventListener(eventType, this._onEventBound));\n\t\tif (this.overflowMode === TableOverflowMode.Popin) {\n\t\t\tResizeHandler.deregister(this, this._onResizeBound);\n\t\t}\n\t}\n\n\tonBeforeRendering(): void {\n\t\tconst renderNavigated = this._renderNavigated;\n\t\tthis._renderNavigated = this.rows.some(row => row.navigated);\n\t\tif (renderNavigated !== this._renderNavigated) {\n\t\t\tthis.rows.forEach(row => {\n\t\t\t\trow._renderNavigated = this._renderNavigated;\n\t\t\t});\n\t\t}\n\n\t\tthis.style.setProperty(getScopedVarName(\"--ui5_grid_sticky_top\"), this.stickyTop);\n\t\tthis._refreshPopinState();\n\t}\n\n\tonAfterRendering(): void {\n\t\tthis.features.forEach(feature => feature.onTableRendered?.());\n\t}\n\n\t_getSelection(): TableSelection | undefined {\n\t\treturn this.features.find(feature => isFeature<TableSelection>(feature, \"TableSelection\")) as TableSelection;\n\t}\n\n\t_onEvent(e: Event) {\n\t\tconst composedPath = e.composedPath();\n\t\tconst eventOrigin = composedPath[0] as HTMLElement;\n\t\tconst elements = [this._tableNavigation, ...composedPath, ...this.features];\n\t\telements.forEach(element => {\n\t\t\tif (element instanceof TableExtension || (element instanceof HTMLElement && element.localName.includes(\"ui5-table\"))) {\n\t\t\t\tconst eventHandlerName = `_on${e.type}` as keyof typeof element;\n\t\t\t\tconst eventHandler = element[eventHandlerName] as (e?: Event, eventOrigin?: HTMLElement) => void;\n\t\t\t\tif (typeof eventHandler === \"function\") {\n\t\t\t\t\teventHandler.call(element, e, eventOrigin);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t_onResize() {\n\t\tconst { clientWidth, scrollWidth } = this._tableElement;\n\n\t\tif (scrollWidth > clientWidth) {\n\t\t\t// Overflow Handling: Move columns into the popin until overflow is resolved\n\t\t\tconst overflow = scrollWidth - clientWidth;\n\t\t\tconst headers = this._getPopinOrderedColumns(false);\n\t\t\tconst poppedInWidth = headers.reduce((totalPoppedInWidth, headerCell) => {\n\t\t\t\tif (totalPoppedInWidth < overflow && !headerCell._popin) {\n\t\t\t\t\tconst headerWidth = Math.ceil(headerCell.getBoundingClientRect().width);\n\t\t\t\t\ttotalPoppedInWidth += headerWidth;\n\t\t\t\t\tthis._setHeaderPopinState(headerCell, true, headerWidth);\n\t\t\t\t}\n\t\t\t\treturn totalPoppedInWidth;\n\t\t\t}, 0);\n\t\t\t// Calculate container width considering popped-in columns\n\t\t\tconst columnOverflow = poppedInWidth - overflow;\n\t\t\tthis._containerWidth = clientWidth - columnOverflow;\n\t\t} else {\n\t\t\t// Underflow Handling: Restore columns from popin until container width is met\n\t\t\tconst headers = this._getPopinOrderedColumns(true).filter(it => it._popin);\n\n\t\t\theaders.every(headerCell => {\n\t\t\t\tconst underflow = clientWidth - this._containerWidth;\n\t\t\t\tif (underflow >= headerCell._popinWidth) {\n\t\t\t\t\tthis._containerWidth += headerCell._popinWidth;\n\t\t\t\t\tthis._setHeaderPopinState(headerCell, false, 0);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\t// Handles focus in the table, when the focus is below a sticky element\n\t\tscrollElementIntoView(this._scrollContainer, e.target as HTMLElement, this._stickyElements, this.effectiveDir === \"rtl\");\n\t}\n\n\t/**\n\t * Refreshes the popin state of the columns.\n\t * Syncs the popin state of the columns with the popin state of the header cells.\n\t * This is needed when additional rows are manually added and no resize happens.\n\t * @private\n\t */\n\t_refreshPopinState() {\n\t\tthis.headerRow[0]?.cells.forEach((header, index) => {\n\t\t\tthis.rows.forEach(row => {\n\t\t\t\tconst cell = row.cells[index];\n\t\t\t\tif (cell && cell._popin !== header._popin) {\n\t\t\t\t\tcell._popin = header._popin;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t_onGrow() {\n\t\tthis._growing?.loadMore();\n\t}\n\n\t_getPopinOrderedColumns(reverse: boolean) {\n\t\tlet headers = [...this.headerRow[0].cells];\n\t\theaders = headers.reverse(); // reverse the \"visual\" order\n\t\theaders = headers.sort((a, b) => a.importance - b.importance); // sort by importance (asc)\n\t\theaders.pop(); // remove the most important column, as it will not be popped in\n\n\t\tif (reverse) {\n\t\t\theaders = headers.reverse();\n\t\t}\n\n\t\treturn headers;\n\t}\n\n\t_setHeaderPopinState(headerCell: TableHeaderCell, inPopin: boolean, popinWidth: number) {\n\t\tconst headerIndex = this.headerRow[0].cells.indexOf(headerCell);\n\t\theaderCell._popin = inPopin;\n\t\theaderCell._popinWidth = popinWidth;\n\t\tthis.rows.forEach(row => {\n\t\t\trow.cells[headerIndex]._popin = inPopin;\n\t\t});\n\t}\n\n\t_isFeature(feature: any) {\n\t\treturn Boolean(feature.onTableActivate && feature.onTableRendered);\n\t}\n\n\t_isGrowingFeature(feature: any) {\n\t\treturn Boolean(feature.loadMore && feature.hasGrowingComponent && this._isFeature(feature));\n\t}\n\n\t_onRowPress(row: TableRow) {\n\t\tthis.fireDecoratorEvent<TableRowClickEventDetail>(\"row-click\", { row });\n\t}\n\n\tget styles() {\n\t\tconst headerStyleMap = this.headerRow?.[0]?.cells?.reduce((headerStyles, headerCell) => {\n\t\t\tif (headerCell.horizontalAlign !== undefined) {\n\t\t\t\theaderStyles[`--horizontal-align-${headerCell._individualSlot}`] = headerCell.horizontalAlign;\n\t\t\t}\n\t\t\treturn headerStyles;\n\t\t}, {} as { [key: string]: string });\n\t\treturn {\n\t\t\ttable: {\n\t\t\t\t\"grid-template-columns\": this._gridTemplateColumns,\n\t\t\t\t...headerStyleMap,\n\t\t\t},\n\t\t};\n\t}\n\n\tget _gridTemplateColumns() {\n\t\tif (!this.headerRow[0]) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst widths = [];\n\t\tconst visibleHeaderCells = this.headerRow[0]._visibleCells as TableHeaderCell[];\n\t\tif (this._getSelection()?.hasRowSelector()) {\n\t\t\twidths.push(`var(${getScopedVarName(\"--_ui5_checkbox_width_height\")})`);\n\t\t}\n\t\twidths.push(...visibleHeaderCells.map(cell => {\n\t\t\tconst minWidth = cell.minWidth === \"auto\" ? \"3rem\" : cell.minWidth;\n\t\t\tif (cell.width === \"auto\" || cell.width.includes(\"%\") || cell.width.includes(\"fr\") || cell.width.includes(\"vw\")) {\n\t\t\t\treturn `minmax(${minWidth}, ${cell.maxWidth})`;\n\t\t\t}\n\t\t\treturn `minmax(${cell.width}, ${cell.width})`;\n\t\t}));\n\t\tif (this._renderNavigated) {\n\t\t\twidths.push(`var(${getScopedVarName(\"--_ui5_table_navigated_cell_width\")})`);\n\t\t}\n\t\treturn widths.join(\" \");\n\t}\n\n\tget _tableOverflowX() {\n\t\treturn (this.overflowMode === TableOverflowMode.Popin) ? \"clip\" : \"auto\";\n\t}\n\n\tget _tableOverflowY() {\n\t\treturn \"auto\";\n\t}\n\n\tget _nodataRow() {\n\t\treturn this.shadowRoot!.getElementById(\"nodata-row\") as TableRow;\n\t}\n\n\tget _beforeElement() {\n\t\treturn this.shadowRoot!.getElementById(\"before\") as HTMLElement;\n\t}\n\n\tget _afterElement() {\n\t\treturn this.shadowRoot!.getElementById(\"after\") as HTMLElement;\n\t}\n\n\tget _tableElement() {\n\t\treturn this.shadowRoot!.getElementById(\"table\") as HTMLElement;\n\t}\n\n\tget _loadingElement() {\n\t\treturn this.shadowRoot!.getElementById(\"loading\") as HTMLElement;\n\t}\n\n\tget _effectiveNoDataText() {\n\t\treturn this.noDataText || Table.i18nBundle.getText(TABLE_NO_DATA);\n\t}\n\n\tget _ariaLabel() {\n\t\treturn getEffectiveAriaLabelText(this) || undefined;\n\t}\n\n\tget _ariaMultiSelectable() {\n\t\tconst selection = this._getSelection();\n\t\treturn (selection?.isSelectable() && this.rows.length) ? selection.isMultiSelect() : undefined;\n\t}\n\n\tget _shouldRenderGrowing() {\n\t\treturn this.rows.length && this._growing?.hasGrowingComponent();\n\t}\n\n\tget _growing() {\n\t\treturn this.features.find(feature => this._isGrowingFeature(feature)) as ITableGrowing;\n\t}\n\n\tget _stickyElements() {\n\t\tconst stickyRows = this.headerRow.filter(row => row.sticky);\n\t\tconst stickyColumns = this.headerRow[0]._stickyCells as TableHeaderCell[];\n\n\t\treturn [...stickyRows, ...stickyColumns];\n\t}\n\n\tget _scrollContainer() {\n\t\treturn findVerticalScrollContainer(this._tableElement);\n\t}\n\n\tget isTable() {\n\t\treturn true;\n\t}\n}\n\nTable.define();\n\nexport default Table;\n\nexport type {\n\tITableFeature,\n\tITableGrowing,\n\tTableRowClickEventDetail,\n};\n"]}
|
package/dist/TableGrowing.js
CHANGED
|
@@ -132,7 +132,7 @@ let TableGrowing = TableGrowing_1 = class TableGrowing extends UI5Element {
|
|
|
132
132
|
this._currentLastRow = this._table.rows[this._table.rows.length - 1];
|
|
133
133
|
}
|
|
134
134
|
this._shouldFocusRow = true;
|
|
135
|
-
this.
|
|
135
|
+
this.fireDecoratorEvent("load-more");
|
|
136
136
|
}
|
|
137
137
|
_hasScrollToLoad() {
|
|
138
138
|
return this.type === TableGrowingMode.Scroll;
|
|
@@ -242,7 +242,9 @@ TableGrowing = TableGrowing_1 = __decorate([
|
|
|
242
242
|
* @public
|
|
243
243
|
*/
|
|
244
244
|
,
|
|
245
|
-
event("load-more"
|
|
245
|
+
event("load-more", {
|
|
246
|
+
bubbles: true,
|
|
247
|
+
})
|
|
246
248
|
], TableGrowing);
|
|
247
249
|
TableGrowing.define();
|
|
248
250
|
export default TableGrowing;
|
package/dist/TableGrowing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableGrowing.js","sourceRoot":"","sources":["../src/TableGrowing.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AAGrE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,EACN,OAAO,EACP,OAAO,GACP,MAAM,sCAAsC,CAAC;AAI9C,OAAO,gBA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5/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 property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\n\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport {\n\tisSpace,\n\tisEnter,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\n\nimport type Table from \"./Table.js\";\nimport type { ITableGrowing } from \"./Table.js\";\nimport TableGrowingMode from \"./types/TableGrowingMode.js\";\nimport TableGrowingTemplate from \"./generated/templates/TableGrowingTemplate.lit.js\";\nimport TableGrowingCss from \"./generated/themes/TableGrowing.css.js\";\nimport {\n\tTABLE_MORE,\n\tTABLE_MORE_DESCRIPTION,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// The documentation should be similar to the Table.ts class documentation!\n// Please only use that style where it uses markdown and the documentation is more readable.\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table-growing` component is used inside the `ui5-table` to add a growing/data loading functionalities\n * to the table.\n *\n * The component offers two options:\n * * Button - a More button is displayed, clicking it will load more data.\n * * Scroll - additional data is loaded automatically when the user scrolls to the end of the table.\n *\n * ### Usage\n *\n * The `ui5-table-growing` component is only used inside the `ui5-table` component as a feature.\n * It has to be slotted inside the `ui5-table` in the `features` slot.\n * The component is not intended to be used as a standalone component.\n *\n * ```html\n * <ui5-table>\n * \t<ui5-table-growing type=\"Button\" growing-text=\"More\" slot=\"features\"></ui5-table-growing>\n * </ui5-table>\n * ```\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/TableGrowing.js\";`\n *\n * @constructor\n * @extends UI5Element\n * @since 2.0.0\n * @public\n * @experimental This web component is available since 2.0 with an experimental flag and its API and behavior are subject to change.\n */\n@customElement({\n\ttag: \"ui5-table-growing\",\n\trenderer: litRender,\n\ttemplate: TableGrowingTemplate,\n\tstyles: TableGrowingCss,\n})\n\n/**\n * Fired when the growing button is pressed or the user scrolls to the end of the table.\n *\n * @public\n */\n@event(\"load-more\")\n\nclass TableGrowing extends UI5Element implements ITableGrowing {\n\t/**\n\t * Defines the mode of the <code>ui5-table</code> growing.\n\t *\n\t * Available options are:\n\t *\n\t * Button - Shows a More button at the bottom of the table, pressing it will load more rows.\n\t *\n\t * Scroll - The rows are loaded automatically by scrolling to the bottom of the table. If the table is not scrollable, this option is the same as the Button.\n\t * @default \"Button\"\n\t * @public\n\t */\n\t@property()\n\ttype: `${TableGrowingMode}` = \"Button\";\n\n\t/**\n\t * Defines the text that will be displayed inside the growing button.\n\t * Has no effect when type is set to `Scroll`.\n\t *\n\t * **Note:** When not provided and the type is set to Button, a default text is displayed, corresponding to the\n\t * current language.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tgrowingText?: string;\n\n\t/**\n\t * Defines the text that will be displayed below the `growingText` inside the growing button.\n\t * Has no effect when type is set to Scroll.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tgrowingSubText?: string;\n\n\t/**\n\t * Disables the growing feature.\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines the active state of the growing button.\n\t * Used for keyboard interaction.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_activeState = false;\n\n\treadonly identifier = \"TableGrowing\";\n\t_table?: Table;\n\t_observer?: IntersectionObserver;\n\t_individualSlot?: string;\n\t_currentLastRow?: HTMLElement;\n\t_shouldFocusRow?: boolean;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tonTableActivate(table: Table): void {\n\t\tthis._table = table;\n\t\tthis._shouldFocusRow = false;\n\t\tif (this._hasScrollToLoad()) {\n\t\t\tthis._observeTableEnd();\n\t\t}\n\t}\n\n\tonTableRendered(): void {\n\t\t// Focus the first row after growing, when the growing button is used\n\t\tif (this._shouldFocusRow) {\n\t\t\tthis._shouldFocusRow = false;\n\t\t\tlet focusRow = this._currentLastRow?.nextElementSibling as HTMLElement;\n\n\t\t\tif (this.hasGrowingComponent()) {\n\t\t\t\tfocusRow ||= this.getFocusDomRef() as HTMLElement;\n\t\t\t}\n\n\t\t\tfocusRow ||= this._table?.rows[0] as HTMLElement;\n\n\t\t\tfocusRow?.focus();\n\t\t}\n\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._hasScrollToLoad()) {\n\t\t\tthis._observeTableEnd();\n\t\t}\n\t}\n\n\tonExitDOM(): void {\n\t\tthis._table = undefined;\n\t\tthis._observer?.disconnect();\n\t\tthis._observer = undefined;\n\t\tthis._currentLastRow = undefined;\n\t}\n\n\tonBeforeRendering(): void {\n\t\tthis._observer?.disconnect();\n\t\tthis._observer = undefined;\n\t\tthis._currentLastRow = undefined;\n\t\tthis._invalidateTable();\n\t}\n\n\thasGrowingComponent(): boolean {\n\t\tif (this._hasScrollToLoad()) {\n\t\t\treturn !(this._table && this._table._scrollContainer.scrollHeight > this._table._scrollContainer.clientHeight);\n\t\t}\n\n\t\treturn this.type === TableGrowingMode.Button && !this.disabled;\n\t}\n\n\t/**\n\t * An event handler that can be used by the Table to notify the TableGrowing that\n\t * the Table is growing either by pressing the load more button or by scrolling to the end of the table.\n\t */\n\tloadMore(): void {\n\t\t// remembers the last row. only do this when the table has a growing component rendered.\n\t\tif (this._table && this.hasGrowingComponent()) {\n\t\t\tthis._currentLastRow = this._table.rows[this._table.rows.length - 1];\n\t\t}\n\t\tthis._shouldFocusRow = true;\n\n\t\tthis.fireEvent(\"load-more\");\n\t}\n\n\t_hasScrollToLoad() {\n\t\treturn this.type === TableGrowingMode.Scroll;\n\t}\n\n\t/**\n\t * Observes the end of the table.\n\t * @private\n\t */\n\t_observeTableEnd(): void {\n\t\tif (!this._table) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst lastElement = this._table.shadowRoot?.querySelector(\"#table-end-row\");\n\t\tif (lastElement) {\n\t\t\tthis._getIntersectionObserver().observe(lastElement);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the IntersectionObserver instance. If it does not exist, it will be created.\n\t * The observer will call the loadMore function when the end of the table is reached.\n\t * @private\n\t */\n\t_getIntersectionObserver(): IntersectionObserver {\n\t\tif (!this._observer) {\n\t\t\tthis._observer = new IntersectionObserver(this._onIntersection.bind(this), {\n\t\t\t\troot: document,\n\t\t\t\trootMargin: \"10px\",\n\t\t\t\tthreshold: 1.0,\n\t\t\t});\n\t\t}\n\t\treturn this._observer;\n\t}\n\n\t_onIntersection(entries: Array<IntersectionObserverEntry>) {\n\t\tif (entries.some(entry => entry.isIntersecting)) {\n\t\t\tthis.loadMore();\n\t\t}\n\t}\n\n\t_invalidateTable() {\n\t\tif (!this._table) {\n\t\t\treturn;\n\t\t}\n\t\tthis._table._invalidate++;\n\t}\n\n\t/**\n\t * Handles the keydown event on the growing button.\n\t *\n\t * Calls the loadMore function when the Enter and Space keys are pressed.\n\t * @private\n\t */\n\t_onKeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._activeState = true;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.loadMore();\n\t\t\tthis._activeState = true;\n\t\t}\n\t}\n\n\t_onKeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis.loadMore();\n\t\t}\n\t\tthis._activeState = false;\n\t}\n\n\t_onFocusout() {\n\t\tthis._activeState = false;\n\t}\n\n\tget _growingButtonText() {\n\t\treturn this.growingText || TableGrowing.i18nBundle.getText(TABLE_MORE);\n\t}\n\n\tget _growingButtonDescription() {\n\t\treturn TableGrowing.i18nBundle.getText(TABLE_MORE_DESCRIPTION);\n\t}\n\n\tget _hasGrowingButton() {\n\t\treturn this.hasGrowingComponent();\n\t}\n}\n\nTableGrowing.define();\n\nexport default TableGrowing;\n"]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;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;kDACP;AAUd;IADN,IAAI,CAAC,oBAAoB,CAAC;sCACG;AA5DzB,YAAY;IAhBjB,aAAa,CAAC;QACd,GAAG,EAAE,mBAAmB;QACxB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,oBAAoB;QAC9B,MAAM,EAAE,eAAe;KACvB,CAAC;IAEF;;;;OAIG;;IACF,KAAK,CAAC,WAAW,EAAE;QACnB,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,YAAY,CA0NjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,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 property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\n\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport {\n\tisSpace,\n\tisEnter,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\n\nimport type Table from \"./Table.js\";\nimport type { ITableGrowing } from \"./Table.js\";\nimport TableGrowingMode from \"./types/TableGrowingMode.js\";\nimport TableGrowingTemplate from \"./generated/templates/TableGrowingTemplate.lit.js\";\nimport TableGrowingCss from \"./generated/themes/TableGrowing.css.js\";\nimport {\n\tTABLE_MORE,\n\tTABLE_MORE_DESCRIPTION,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// The documentation should be similar to the Table.ts class documentation!\n// Please only use that style where it uses markdown and the documentation is more readable.\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table-growing` component is used inside the `ui5-table` to add a growing/data loading functionalities\n * to the table.\n *\n * The component offers two options:\n * * Button - a More button is displayed, clicking it will load more data.\n * * Scroll - additional data is loaded automatically when the user scrolls to the end of the table.\n *\n * ### Usage\n *\n * The `ui5-table-growing` component is only used inside the `ui5-table` component as a feature.\n * It has to be slotted inside the `ui5-table` in the `features` slot.\n * The component is not intended to be used as a standalone component.\n *\n * ```html\n * <ui5-table>\n * \t<ui5-table-growing type=\"Button\" growing-text=\"More\" slot=\"features\"></ui5-table-growing>\n * </ui5-table>\n * ```\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/TableGrowing.js\";`\n *\n * @constructor\n * @extends UI5Element\n * @since 2.0.0\n * @public\n * @experimental This web component is available since 2.0 with an experimental flag and its API and behavior are subject to change.\n */\n@customElement({\n\ttag: \"ui5-table-growing\",\n\trenderer: litRender,\n\ttemplate: TableGrowingTemplate,\n\tstyles: TableGrowingCss,\n})\n\n/**\n * Fired when the growing button is pressed or the user scrolls to the end of the table.\n *\n * @public\n */\n@event(\"load-more\", {\n\tbubbles: true,\n})\n\nclass TableGrowing extends UI5Element implements ITableGrowing {\n\t/**\n\t * Defines the mode of the <code>ui5-table</code> growing.\n\t *\n\t * Available options are:\n\t *\n\t * Button - Shows a More button at the bottom of the table, pressing it will load more rows.\n\t *\n\t * Scroll - The rows are loaded automatically by scrolling to the bottom of the table. If the table is not scrollable, this option is the same as the Button.\n\t * @default \"Button\"\n\t * @public\n\t */\n\t@property()\n\ttype: `${TableGrowingMode}` = \"Button\";\n\n\t/**\n\t * Defines the text that will be displayed inside the growing button.\n\t * Has no effect when type is set to `Scroll`.\n\t *\n\t * **Note:** When not provided and the type is set to Button, a default text is displayed, corresponding to the\n\t * current language.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tgrowingText?: string;\n\n\t/**\n\t * Defines the text that will be displayed below the `growingText` inside the growing button.\n\t * Has no effect when type is set to Scroll.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tgrowingSubText?: string;\n\n\t/**\n\t * Disables the growing feature.\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines the active state of the growing button.\n\t * Used for keyboard interaction.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_activeState = false;\n\n\treadonly identifier = \"TableGrowing\";\n\t_table?: Table;\n\t_observer?: IntersectionObserver;\n\t_individualSlot?: string;\n\t_currentLastRow?: HTMLElement;\n\t_shouldFocusRow?: boolean;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tonTableActivate(table: Table): void {\n\t\tthis._table = table;\n\t\tthis._shouldFocusRow = false;\n\t\tif (this._hasScrollToLoad()) {\n\t\t\tthis._observeTableEnd();\n\t\t}\n\t}\n\n\tonTableRendered(): void {\n\t\t// Focus the first row after growing, when the growing button is used\n\t\tif (this._shouldFocusRow) {\n\t\t\tthis._shouldFocusRow = false;\n\t\t\tlet focusRow = this._currentLastRow?.nextElementSibling as HTMLElement;\n\n\t\t\tif (this.hasGrowingComponent()) {\n\t\t\t\tfocusRow ||= this.getFocusDomRef() as HTMLElement;\n\t\t\t}\n\n\t\t\tfocusRow ||= this._table?.rows[0] as HTMLElement;\n\n\t\t\tfocusRow?.focus();\n\t\t}\n\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._hasScrollToLoad()) {\n\t\t\tthis._observeTableEnd();\n\t\t}\n\t}\n\n\tonExitDOM(): void {\n\t\tthis._table = undefined;\n\t\tthis._observer?.disconnect();\n\t\tthis._observer = undefined;\n\t\tthis._currentLastRow = undefined;\n\t}\n\n\tonBeforeRendering(): void {\n\t\tthis._observer?.disconnect();\n\t\tthis._observer = undefined;\n\t\tthis._currentLastRow = undefined;\n\t\tthis._invalidateTable();\n\t}\n\n\thasGrowingComponent(): boolean {\n\t\tif (this._hasScrollToLoad()) {\n\t\t\treturn !(this._table && this._table._scrollContainer.scrollHeight > this._table._scrollContainer.clientHeight);\n\t\t}\n\n\t\treturn this.type === TableGrowingMode.Button && !this.disabled;\n\t}\n\n\t/**\n\t * An event handler that can be used by the Table to notify the TableGrowing that\n\t * the Table is growing either by pressing the load more button or by scrolling to the end of the table.\n\t */\n\tloadMore(): void {\n\t\t// remembers the last row. only do this when the table has a growing component rendered.\n\t\tif (this._table && this.hasGrowingComponent()) {\n\t\t\tthis._currentLastRow = this._table.rows[this._table.rows.length - 1];\n\t\t}\n\t\tthis._shouldFocusRow = true;\n\n\t\tthis.fireDecoratorEvent(\"load-more\");\n\t}\n\n\t_hasScrollToLoad() {\n\t\treturn this.type === TableGrowingMode.Scroll;\n\t}\n\n\t/**\n\t * Observes the end of the table.\n\t * @private\n\t */\n\t_observeTableEnd(): void {\n\t\tif (!this._table) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst lastElement = this._table.shadowRoot?.querySelector(\"#table-end-row\");\n\t\tif (lastElement) {\n\t\t\tthis._getIntersectionObserver().observe(lastElement);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the IntersectionObserver instance. If it does not exist, it will be created.\n\t * The observer will call the loadMore function when the end of the table is reached.\n\t * @private\n\t */\n\t_getIntersectionObserver(): IntersectionObserver {\n\t\tif (!this._observer) {\n\t\t\tthis._observer = new IntersectionObserver(this._onIntersection.bind(this), {\n\t\t\t\troot: document,\n\t\t\t\trootMargin: \"10px\",\n\t\t\t\tthreshold: 1.0,\n\t\t\t});\n\t\t}\n\t\treturn this._observer;\n\t}\n\n\t_onIntersection(entries: Array<IntersectionObserverEntry>) {\n\t\tif (entries.some(entry => entry.isIntersecting)) {\n\t\t\tthis.loadMore();\n\t\t}\n\t}\n\n\t_invalidateTable() {\n\t\tif (!this._table) {\n\t\t\treturn;\n\t\t}\n\t\tthis._table._invalidate++;\n\t}\n\n\t/**\n\t * Handles the keydown event on the growing button.\n\t *\n\t * Calls the loadMore function when the Enter and Space keys are pressed.\n\t * @private\n\t */\n\t_onKeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._activeState = true;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis.loadMore();\n\t\t\tthis._activeState = true;\n\t\t}\n\t}\n\n\t_onKeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis.loadMore();\n\t\t}\n\t\tthis._activeState = false;\n\t}\n\n\t_onFocusout() {\n\t\tthis._activeState = false;\n\t}\n\n\tget _growingButtonText() {\n\t\treturn this.growingText || TableGrowing.i18nBundle.getText(TABLE_MORE);\n\t}\n\n\tget _growingButtonDescription() {\n\t\treturn TableGrowing.i18nBundle.getText(TABLE_MORE_DESCRIPTION);\n\t}\n\n\tget _hasGrowingButton() {\n\t\treturn this.hasGrowingComponent();\n\t}\n}\n\nTableGrowing.define();\n\nexport default TableGrowing;\n"]}
|
package/dist/TableSelection.js
CHANGED
|
@@ -158,7 +158,7 @@ let TableSelection = class TableSelection extends UI5Element {
|
|
|
158
158
|
_informRowSelectionChange(row) {
|
|
159
159
|
const isRowSelected = this.isMultiSelect() ? !this.isSelected(row) : true;
|
|
160
160
|
this._selectRow(row, isRowSelected);
|
|
161
|
-
this.
|
|
161
|
+
this.fireDecoratorEvent("change");
|
|
162
162
|
}
|
|
163
163
|
_informHeaderRowSelectionChange() {
|
|
164
164
|
const isRowSelected = this.areAllRowsSelected();
|
|
@@ -168,7 +168,7 @@ let TableSelection = class TableSelection extends UI5Element {
|
|
|
168
168
|
selectedSet[isRowSelected ? "delete" : "add"](rowIdentifier);
|
|
169
169
|
});
|
|
170
170
|
this.selectedAsSet = selectedSet;
|
|
171
|
-
this.
|
|
171
|
+
this.fireDecoratorEvent("change");
|
|
172
172
|
}
|
|
173
173
|
_invalidateTableAndRows() {
|
|
174
174
|
if (!this._table) {
|
|
@@ -297,7 +297,7 @@ let TableSelection = class TableSelection extends UI5Element {
|
|
|
297
297
|
return changed || isRowSelectionDifferent;
|
|
298
298
|
}, selectionChanged) || false;
|
|
299
299
|
}
|
|
300
|
-
selectionChanged && this.
|
|
300
|
+
selectionChanged && this.fireDecoratorEvent("change");
|
|
301
301
|
}
|
|
302
302
|
_stopRangeSelection() {
|
|
303
303
|
this._rangeSelection = null;
|
|
@@ -326,7 +326,9 @@ TableSelection = __decorate([
|
|
|
326
326
|
* @public
|
|
327
327
|
*/
|
|
328
328
|
,
|
|
329
|
-
event("change"
|
|
329
|
+
event("change", {
|
|
330
|
+
bubbles: true,
|
|
331
|
+
})
|
|
330
332
|
], TableSelection);
|
|
331
333
|
TableSelection.define();
|
|
332
334
|
export default TableSelection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableSelection.js","sourceRoot":"","sources":["../src/TableSelection.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACN,SAAS,GACT,MAAM,sCAAsC,CAAC;AAC9C,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AACrF,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAK/D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEvF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAUH,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,UAAU;IAAvC;;QACC;;;;;WAKG;QAEH,SAAI,GAA4B,UAAU,CAAC;QAE3C;;;;;WAKG;QAEH,aAAQ,GAAG,EAAE,CAAC;QAEL,eAAU,GAAG,gBAAgB,CAAC;IAySxC,CAAC;IArSA,eAAe,CAAC,KAAY;QAC3B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IAChC,CAAC;IAED,SAAS;QACR,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC,IAAI,CAAC;QACpC,IAAI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A4TnB;AAED,cAAc,CAAC,MAAM,EAAE,CAAC;AAExB,eAAe,cAAc,CAAC","sourcesContent":["import {\n\tisUpShift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\nimport 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.js\";\nimport TableSelectionMode from \"./types/TableSelectionMode.js\";\nimport type Table from \"./Table.js\";\nimport type { ITableFeature } from \"./Table.js\";\nimport type TableRow from \"./TableRow.js\";\nimport type TableRowBase from \"./TableRowBase.js\";\nimport { isSelectionCheckbox, isHeaderSelector, findRowInPath } from \"./TableUtils.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table-selection` component is used inside the `ui5-table` ti add key-based selection capabilities to the `ui5-table`.\n *\n * The component offers three selection modes:\n * * Single - select a single row.\n * * Multiple - select multiple rows.\n * * None - no selection active.\n *\n * As the selection is key-based, `ui5-table-row` components need to define a unique `row-key` property.\n *\n * ### Usage\n *\n * The `ui5-table-selection` component is only used inside the `ui5-table` component as a feature.\n * It has to be slotted inside the `ui5-table` in the `features` slot.\n * The component is not intended to be used as a standalone component.\n *\n * ```html\n * <ui5-table>\n * \t<ui5-table-selection mode=\"Multiple\" slot=\"features\"></ui5-table-selection>\n * </ui5-table>\n * ```\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/TableSelection.js\";`\n *\n * @constructor\n * @extends UI5Element\n * @since 2.0.0\n * @public\n * @experimental This web component is available since 2.0 with an experimental flag and its API and behavior are subject to change.\n */\n@customElement({ tag: \"ui5-table-selection\" })\n\n/**\n * Fired when selection is changed by user interaction.\n *\n * @public\n */\n@event(\"change\")\n\nclass TableSelection extends UI5Element implements ITableFeature {\n\t/**\n\t * Defines the selection mode.\n\t *\n\t * @default \"Multiple\"\n\t * @public\n\t */\n\t@property()\n\tmode: `${TableSelectionMode}` = \"Multiple\";\n\n\t/**\n\t * Defines the selected rows separated by a space.\n\t *\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\tselected = \"\";\n\n\treadonly identifier = \"TableSelection\";\n\t_table?: Table;\n\t_rangeSelection?: {selected: boolean, isUp: boolean | null, rows: TableRow[], isMouse: boolean, shiftPressed: boolean} | null;\n\n\tonTableActivate(table: Table) {\n\t\tthis._table = table;\n\t\tthis._invalidateTableAndRows();\n\t}\n\n\tonExitDOM() {\n\t\tthis.mode = TableSelectionMode.None;\n\t\tthis._invalidateTableAndRows();\n\t\tthis._table = undefined;\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._invalidateTableAndRows();\n\t}\n\n\tisSelectable(): boolean {\n\t\treturn this.mode !== TableSelectionMode.None;\n\t}\n\n\tisMultiSelect(): boolean {\n\t\treturn this.mode === TableSelectionMode.Multiple;\n\t}\n\n\thasRowSelector(): boolean {\n\t\treturn this.mode !== TableSelectionMode.None;\n\t}\n\n\tgetRowIdentifier(row: TableRow): string {\n\t\treturn row.rowKey;\n\t}\n\n\tisSelected(row: TableRowBase): boolean {\n\t\tif (!this._table || !this.isSelectable()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (row.isHeaderRow()) {\n\t\t\treturn this.areAllRowsSelected();\n\t\t}\n\n\t\tconst rowIdentifier = this.getRowIdentifier(row as TableRow);\n\t\treturn this.selectedAsArray.includes(rowIdentifier);\n\t}\n\n\thasSelectedRow(): boolean {\n\t\tif (!this._table || !this.isSelectable()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst selectedArray = this.selectedAsArray;\n\t\treturn this._table.rows.some(row => {\n\t\t\tconst rowIdentifier = this.getRowIdentifier(row);\n\t\t\treturn selectedArray.includes(rowIdentifier);\n\t\t});\n\t}\n\n\tareAllRowsSelected(): boolean {\n\t\tif (!this._table || !this._table.rows.length || this.mode !== TableSelectionMode.Multiple) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst selectedArray = this.selectedAsArray;\n\t\treturn this._table.rows.every(row => {\n\t\t\tconst rowIdentifier = this.getRowIdentifier(row);\n\t\t\treturn selectedArray.includes(rowIdentifier);\n\t\t});\n\t}\n\n\tinformSelectionChange(row: TableRowBase) {\n\t\tif (this._rangeSelection?.isMouse && this._rangeSelection.shiftPressed) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (row.isHeaderRow()) {\n\t\t\tthis._informHeaderRowSelectionChange();\n\t\t} else {\n\t\t\tthis._informRowSelectionChange(row as TableRow);\n\t\t}\n\t}\n\n\tget selectedAsArray(): string[] {\n\t\treturn this.selected.split(\" \").filter(String);\n\t}\n\n\tset selectedAsArray(selectedArray: string[]) {\n\t\tthis.selected = selectedArray.filter(String).join(\" \");\n\t}\n\n\tget selectedAsSet(): Set<string> {\n\t\treturn new Set(this.selectedAsArray);\n\t}\n\n\tset selectedAsSet(selectedSet: Set<string>) {\n\t\tthis.selectedAsArray = [...selectedSet];\n\t}\n\n\t_selectRow(row: TableRow, selected: boolean) {\n\t\tconst rowIdentifier = this.getRowIdentifier(row);\n\t\tif (this.mode === TableSelectionMode.Multiple) {\n\t\t\tconst selectedSet = this.selectedAsSet;\n\t\t\tselectedSet[selected ? \"add\" : \"delete\"](rowIdentifier);\n\t\t\tthis.selectedAsSet = selectedSet;\n\t\t} else {\n\t\t\tthis.selected = selected ? rowIdentifier : \"\";\n\t\t}\n\t}\n\n\t_informRowSelectionChange(row: TableRow) {\n\t\tconst isRowSelected = this.isMultiSelect() ? !this.isSelected(row) : true;\n\t\tthis._selectRow(row, isRowSelected);\n\t\tthis.fireEvent(\"change\");\n\t}\n\n\t_informHeaderRowSelectionChange() {\n\t\tconst isRowSelected = this.areAllRowsSelected();\n\t\tconst selectedSet = this.selectedAsSet;\n\t\tthis._table!.rows.forEach(row => {\n\t\t\tconst rowIdentifier = this.getRowIdentifier(row);\n\t\t\tselectedSet[isRowSelected ? \"delete\" : \"add\"](rowIdentifier);\n\t\t});\n\t\tthis.selectedAsSet = selectedSet;\n\t\tthis.fireEvent(\"change\");\n\t}\n\n\t_invalidateTableAndRows() {\n\t\tif (!this._table) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.isSelectable()) {\n\t\t\tthis.selected = \"\";\n\t\t} else if (!this.isMultiSelect()) {\n\t\t\tthis.selected = this.selectedAsArray.shift() || \"\";\n\t\t}\n\n\t\tthis._table._invalidate++;\n\t\tthis._table.headerRow[0]._invalidate++;\n\t\tthis._table.rows.forEach(row => row._invalidate++);\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (!this.isMultiSelect() || !this._table || !e.shiftKey) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst focusedElement = getActiveElement(); // Assumption: The focused element is always the \"next\" row after navigation.\n\n\t\tif (!(focusedElement?.hasAttribute(\"ui5-table-row\") || this._rangeSelection?.isMouse || focusedElement?.hasAttribute(\"ui5-growing-row\"))) {\n\t\t\tthis._stopRangeSelection();\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._rangeSelection) {\n\t\t\t// If no range selection is active, start one\n\t\t\tthis._startRangeSelection(focusedElement as TableRow);\n\t\t} else if (e.key === \"ArrowUp\" || e.key === \"ArrowDown\") {\n\t\t\tconst change = isUpShift(e) ? -1 : 1;\n\t\t\tthis._handleRangeSelection(focusedElement as TableRow, change);\n\t\t}\n\n\t\tif (this._rangeSelection) {\n\t\t\tthis._rangeSelection.shiftPressed = e.shiftKey;\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent, eventOrigin: HTMLElement) {\n\t\tif (!this._table) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!eventOrigin.hasAttribute(\"ui5-table-row\") || !this._rangeSelection || !e.shiftKey) {\n\t\t\t// Stop range selection if a) Shift is relased or b) the event target is not a row\n\t\t\tthis._stopRangeSelection();\n\t\t}\n\n\t\tif (this._rangeSelection) {\n\t\t\tthis._rangeSelection.shiftPressed = e.shiftKey;\n\t\t}\n\t}\n\n\t_onclick(e: MouseEvent) {\n\t\tif (!this._table) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isHeaderSelector(e)) {\n\t\t\tthis._stopRangeSelection();\n\t\t\treturn;\n\t\t}\n\n\t\tif (!isSelectionCheckbox(e)) {\n\t\t\tthis._stopRangeSelection();\n\t\t\treturn;\n\t\t}\n\n\t\tconst row = findRowInPath(e.composedPath());\n\n\t\tif (e.shiftKey && this._rangeSelection?.isMouse) {\n\t\t\tconst startRow = this._rangeSelection.rows[0];\n\t\t\tconst startIndex = this._table.rows.indexOf(startRow);\n\t\t\tconst endIndex = this._table.rows.indexOf(row);\n\n\t\t\t// When doing a range selection and clicking on an already selected row, the checked status should not change\n\t\t\t// Therefore, we need to manually set the checked attribute again, as clicking it would deselect it and leads to\n\t\t\t// a visual inconsistency.\n\t\t\trow.shadowRoot?.querySelector(\"#selection-component\")?.toggleAttribute(\"checked\", true);\n\n\t\t\tif (startIndex === -1 || endIndex === -1 || row.rowKey === startRow.rowKey || row.rowKey === this._rangeSelection.rows[this._rangeSelection.rows.length - 1].rowKey) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst change = endIndex - startIndex;\n\t\t\tthis._handleRangeSelection(row, change);\n\t\t} else if (row) {\n\t\t\tthis._startRangeSelection(row, true);\n\t\t}\n\t}\n\n\t/**\n\t * Start the range selection and initialises the range selection state\n\t * @param row starting row\n\t * @private\n\t */\n\t_startRangeSelection(row: TableRow, isMouse = false) {\n\t\tconst selected = this.isSelected(row);\n\t\tif (isMouse && !selected) {\n\t\t\t// Do not initiate range selection if the row is not selected\n\t\t\treturn;\n\t\t}\n\n\t\tthis._rangeSelection = {\n\t\t\tselected,\n\t\t\tisUp: null,\n\t\t\trows: [row],\n\t\t\tisMouse,\n\t\t\tshiftPressed: false,\n\t\t};\n\t}\n\n\t/**\n\t * Handles the range selection\n\t * @param targetRow row that is currently focused\n\t * @param change indicates direction\n\t * @private\n\t */\n\t_handleRangeSelection(targetRow: TableRow, change: number) {\n\t\tif (!this._rangeSelection) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isUp = change > 0;\n\t\tthis._rangeSelection.isUp ??= isUp;\n\n\t\tconst shouldReverseSelection = isUp !== this._rangeSelection.isUp && !this._rangeSelection.isMouse;\n\t\tlet selectionChanged = shouldReverseSelection && this.isSelected(targetRow);\n\n\t\tif (shouldReverseSelection) {\n\t\t\tthis._reverseRangeSelection();\n\t\t} else {\n\t\t\tconst rowIndex = this._table!.rows.indexOf(targetRow);\n\t\t\tconst [startIndex, endIndex] = [rowIndex, rowIndex - change].sort((a, b) => a - b);\n\n\t\t\tselectionChanged = this._table?.rows.slice(startIndex, endIndex + 1).reduce((changed, row) => {\n\t\t\t\tconst isRowNotInSelection = !this._rangeSelection?.rows.includes(row);\n\t\t\t\tconst isRowSelectionDifferent = this.isSelected(row) !== this._rangeSelection!.selected;\n\n\t\t\t\tif (isRowNotInSelection) {\n\t\t\t\t\tthis._rangeSelection?.rows.push(row);\n\t\t\t\t}\n\n\t\t\t\tthis._selectRow(row, this._rangeSelection!.selected);\n\n\t\t\t\treturn changed || isRowSelectionDifferent;\n\t\t\t}, selectionChanged) || false;\n\t\t}\n\n\t\tselectionChanged && this._fireEvent(\"change\");\n\t}\n\n\t_stopRangeSelection() {\n\t\tthis._rangeSelection = null;\n\t}\n\n\t_reverseRangeSelection() {\n\t\tconst row = this._rangeSelection?.rows.pop();\n\t\tif (row) {\n\t\t\tthis._selectRow(row, false);\n\t\t}\n\n\t\tif (this._rangeSelection?.rows.length === 1) {\n\t\t\tthis._rangeSelection.isUp = null;\n\t\t}\n\t}\n}\n\nTableSelection.define();\n\nexport default TableSelection;\n"]}
|
|
1
|
+
{"version":3,"file":"TableSelection.js","sourceRoot":"","sources":["../src/TableSelection.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACN,SAAS,GACT,MAAM,sCAAsC,CAAC;AAC9C,OAAO,gBAAgB,MA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AE,gBAAgB,CAAC,IAAI,KAAK,CAAC;QAC/B,CAAC;QAED,gBAAgB,IAAI,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACvD,CAAC;IAED,mBAAmB;QAClB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;IAC7B,CAAC;IAED,sBAAsB;QACrB,MAAM,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;QAC7C,IAAI,GAAG,EAAE,CAAC;YACT,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC7B,CAAC;QAED,IAAI,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7C,IAAI,CAAC,eAAe,CAAC,IAAI,GAAG,IAAI,CAAC;QAClC,CAAC;IACF,CAAC;CACD,CAAA;AApTA;IADC,QAAQ,EAAE;4CACgC;AAS3C;IADC,QAAQ,EAAE;gDACG;AAjBT,cAAc;IAXnB,aAAa,CAAC,EAAE,GAAG,EAAE,qBAAqB,EAAE,CAAC;IAE9C;;;;OAIG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,cAAc,CA4TnB;AAED,cAAc,CAAC,MAAM,EAAE,CAAC;AAExB,eAAe,cAAc,CAAC","sourcesContent":["import {\n\tisUpShift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\nimport 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.js\";\nimport TableSelectionMode from \"./types/TableSelectionMode.js\";\nimport type Table from \"./Table.js\";\nimport type { ITableFeature } from \"./Table.js\";\nimport type TableRow from \"./TableRow.js\";\nimport type TableRowBase from \"./TableRowBase.js\";\nimport { isSelectionCheckbox, isHeaderSelector, findRowInPath } from \"./TableUtils.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table-selection` component is used inside the `ui5-table` ti add key-based selection capabilities to the `ui5-table`.\n *\n * The component offers three selection modes:\n * * Single - select a single row.\n * * Multiple - select multiple rows.\n * * None - no selection active.\n *\n * As the selection is key-based, `ui5-table-row` components need to define a unique `row-key` property.\n *\n * ### Usage\n *\n * The `ui5-table-selection` component is only used inside the `ui5-table` component as a feature.\n * It has to be slotted inside the `ui5-table` in the `features` slot.\n * The component is not intended to be used as a standalone component.\n *\n * ```html\n * <ui5-table>\n * \t<ui5-table-selection mode=\"Multiple\" slot=\"features\"></ui5-table-selection>\n * </ui5-table>\n * ```\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/TableSelection.js\";`\n *\n * @constructor\n * @extends UI5Element\n * @since 2.0.0\n * @public\n * @experimental This web component is available since 2.0 with an experimental flag and its API and behavior are subject to change.\n */\n@customElement({ tag: \"ui5-table-selection\" })\n\n/**\n * Fired when selection is changed by user interaction.\n *\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\n\nclass TableSelection extends UI5Element implements ITableFeature {\n\t/**\n\t * Defines the selection mode.\n\t *\n\t * @default \"Multiple\"\n\t * @public\n\t */\n\t@property()\n\tmode: `${TableSelectionMode}` = \"Multiple\";\n\n\t/**\n\t * Defines the selected rows separated by a space.\n\t *\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\tselected = \"\";\n\n\treadonly identifier = \"TableSelection\";\n\t_table?: Table;\n\t_rangeSelection?: {selected: boolean, isUp: boolean | null, rows: TableRow[], isMouse: boolean, shiftPressed: boolean} | null;\n\n\tonTableActivate(table: Table) {\n\t\tthis._table = table;\n\t\tthis._invalidateTableAndRows();\n\t}\n\n\tonExitDOM() {\n\t\tthis.mode = TableSelectionMode.None;\n\t\tthis._invalidateTableAndRows();\n\t\tthis._table = undefined;\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._invalidateTableAndRows();\n\t}\n\n\tisSelectable(): boolean {\n\t\treturn this.mode !== TableSelectionMode.None;\n\t}\n\n\tisMultiSelect(): boolean {\n\t\treturn this.mode === TableSelectionMode.Multiple;\n\t}\n\n\thasRowSelector(): boolean {\n\t\treturn this.mode !== TableSelectionMode.None;\n\t}\n\n\tgetRowIdentifier(row: TableRow): string {\n\t\treturn row.rowKey;\n\t}\n\n\tisSelected(row: TableRowBase): boolean {\n\t\tif (!this._table || !this.isSelectable()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (row.isHeaderRow()) {\n\t\t\treturn this.areAllRowsSelected();\n\t\t}\n\n\t\tconst rowIdentifier = this.getRowIdentifier(row as TableRow);\n\t\treturn this.selectedAsArray.includes(rowIdentifier);\n\t}\n\n\thasSelectedRow(): boolean {\n\t\tif (!this._table || !this.isSelectable()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst selectedArray = this.selectedAsArray;\n\t\treturn this._table.rows.some(row => {\n\t\t\tconst rowIdentifier = this.getRowIdentifier(row);\n\t\t\treturn selectedArray.includes(rowIdentifier);\n\t\t});\n\t}\n\n\tareAllRowsSelected(): boolean {\n\t\tif (!this._table || !this._table.rows.length || this.mode !== TableSelectionMode.Multiple) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst selectedArray = this.selectedAsArray;\n\t\treturn this._table.rows.every(row => {\n\t\t\tconst rowIdentifier = this.getRowIdentifier(row);\n\t\t\treturn selectedArray.includes(rowIdentifier);\n\t\t});\n\t}\n\n\tinformSelectionChange(row: TableRowBase) {\n\t\tif (this._rangeSelection?.isMouse && this._rangeSelection.shiftPressed) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (row.isHeaderRow()) {\n\t\t\tthis._informHeaderRowSelectionChange();\n\t\t} else {\n\t\t\tthis._informRowSelectionChange(row as TableRow);\n\t\t}\n\t}\n\n\tget selectedAsArray(): string[] {\n\t\treturn this.selected.split(\" \").filter(String);\n\t}\n\n\tset selectedAsArray(selectedArray: string[]) {\n\t\tthis.selected = selectedArray.filter(String).join(\" \");\n\t}\n\n\tget selectedAsSet(): Set<string> {\n\t\treturn new Set(this.selectedAsArray);\n\t}\n\n\tset selectedAsSet(selectedSet: Set<string>) {\n\t\tthis.selectedAsArray = [...selectedSet];\n\t}\n\n\t_selectRow(row: TableRow, selected: boolean) {\n\t\tconst rowIdentifier = this.getRowIdentifier(row);\n\t\tif (this.mode === TableSelectionMode.Multiple) {\n\t\t\tconst selectedSet = this.selectedAsSet;\n\t\t\tselectedSet[selected ? \"add\" : \"delete\"](rowIdentifier);\n\t\t\tthis.selectedAsSet = selectedSet;\n\t\t} else {\n\t\t\tthis.selected = selected ? rowIdentifier : \"\";\n\t\t}\n\t}\n\n\t_informRowSelectionChange(row: TableRow) {\n\t\tconst isRowSelected = this.isMultiSelect() ? !this.isSelected(row) : true;\n\t\tthis._selectRow(row, isRowSelected);\n\t\tthis.fireDecoratorEvent(\"change\");\n\t}\n\n\t_informHeaderRowSelectionChange() {\n\t\tconst isRowSelected = this.areAllRowsSelected();\n\t\tconst selectedSet = this.selectedAsSet;\n\t\tthis._table!.rows.forEach(row => {\n\t\t\tconst rowIdentifier = this.getRowIdentifier(row);\n\t\t\tselectedSet[isRowSelected ? \"delete\" : \"add\"](rowIdentifier);\n\t\t});\n\t\tthis.selectedAsSet = selectedSet;\n\t\tthis.fireDecoratorEvent(\"change\");\n\t}\n\n\t_invalidateTableAndRows() {\n\t\tif (!this._table) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.isSelectable()) {\n\t\t\tthis.selected = \"\";\n\t\t} else if (!this.isMultiSelect()) {\n\t\t\tthis.selected = this.selectedAsArray.shift() || \"\";\n\t\t}\n\n\t\tthis._table._invalidate++;\n\t\tthis._table.headerRow[0]._invalidate++;\n\t\tthis._table.rows.forEach(row => row._invalidate++);\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (!this.isMultiSelect() || !this._table || !e.shiftKey) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst focusedElement = getActiveElement(); // Assumption: The focused element is always the \"next\" row after navigation.\n\n\t\tif (!(focusedElement?.hasAttribute(\"ui5-table-row\") || this._rangeSelection?.isMouse || focusedElement?.hasAttribute(\"ui5-growing-row\"))) {\n\t\t\tthis._stopRangeSelection();\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._rangeSelection) {\n\t\t\t// If no range selection is active, start one\n\t\t\tthis._startRangeSelection(focusedElement as TableRow);\n\t\t} else if (e.key === \"ArrowUp\" || e.key === \"ArrowDown\") {\n\t\t\tconst change = isUpShift(e) ? -1 : 1;\n\t\t\tthis._handleRangeSelection(focusedElement as TableRow, change);\n\t\t}\n\n\t\tif (this._rangeSelection) {\n\t\t\tthis._rangeSelection.shiftPressed = e.shiftKey;\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent, eventOrigin: HTMLElement) {\n\t\tif (!this._table) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!eventOrigin.hasAttribute(\"ui5-table-row\") || !this._rangeSelection || !e.shiftKey) {\n\t\t\t// Stop range selection if a) Shift is relased or b) the event target is not a row\n\t\t\tthis._stopRangeSelection();\n\t\t}\n\n\t\tif (this._rangeSelection) {\n\t\t\tthis._rangeSelection.shiftPressed = e.shiftKey;\n\t\t}\n\t}\n\n\t_onclick(e: MouseEvent) {\n\t\tif (!this._table) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isHeaderSelector(e)) {\n\t\t\tthis._stopRangeSelection();\n\t\t\treturn;\n\t\t}\n\n\t\tif (!isSelectionCheckbox(e)) {\n\t\t\tthis._stopRangeSelection();\n\t\t\treturn;\n\t\t}\n\n\t\tconst row = findRowInPath(e.composedPath());\n\n\t\tif (e.shiftKey && this._rangeSelection?.isMouse) {\n\t\t\tconst startRow = this._rangeSelection.rows[0];\n\t\t\tconst startIndex = this._table.rows.indexOf(startRow);\n\t\t\tconst endIndex = this._table.rows.indexOf(row);\n\n\t\t\t// When doing a range selection and clicking on an already selected row, the checked status should not change\n\t\t\t// Therefore, we need to manually set the checked attribute again, as clicking it would deselect it and leads to\n\t\t\t// a visual inconsistency.\n\t\t\trow.shadowRoot?.querySelector(\"#selection-component\")?.toggleAttribute(\"checked\", true);\n\n\t\t\tif (startIndex === -1 || endIndex === -1 || row.rowKey === startRow.rowKey || row.rowKey === this._rangeSelection.rows[this._rangeSelection.rows.length - 1].rowKey) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst change = endIndex - startIndex;\n\t\t\tthis._handleRangeSelection(row, change);\n\t\t} else if (row) {\n\t\t\tthis._startRangeSelection(row, true);\n\t\t}\n\t}\n\n\t/**\n\t * Start the range selection and initialises the range selection state\n\t * @param row starting row\n\t * @private\n\t */\n\t_startRangeSelection(row: TableRow, isMouse = false) {\n\t\tconst selected = this.isSelected(row);\n\t\tif (isMouse && !selected) {\n\t\t\t// Do not initiate range selection if the row is not selected\n\t\t\treturn;\n\t\t}\n\n\t\tthis._rangeSelection = {\n\t\t\tselected,\n\t\t\tisUp: null,\n\t\t\trows: [row],\n\t\t\tisMouse,\n\t\t\tshiftPressed: false,\n\t\t};\n\t}\n\n\t/**\n\t * Handles the range selection\n\t * @param targetRow row that is currently focused\n\t * @param change indicates direction\n\t * @private\n\t */\n\t_handleRangeSelection(targetRow: TableRow, change: number) {\n\t\tif (!this._rangeSelection) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isUp = change > 0;\n\t\tthis._rangeSelection.isUp ??= isUp;\n\n\t\tconst shouldReverseSelection = isUp !== this._rangeSelection.isUp && !this._rangeSelection.isMouse;\n\t\tlet selectionChanged = shouldReverseSelection && this.isSelected(targetRow);\n\n\t\tif (shouldReverseSelection) {\n\t\t\tthis._reverseRangeSelection();\n\t\t} else {\n\t\t\tconst rowIndex = this._table!.rows.indexOf(targetRow);\n\t\t\tconst [startIndex, endIndex] = [rowIndex, rowIndex - change].sort((a, b) => a - b);\n\n\t\t\tselectionChanged = this._table?.rows.slice(startIndex, endIndex + 1).reduce((changed, row) => {\n\t\t\t\tconst isRowNotInSelection = !this._rangeSelection?.rows.includes(row);\n\t\t\t\tconst isRowSelectionDifferent = this.isSelected(row) !== this._rangeSelection!.selected;\n\n\t\t\t\tif (isRowNotInSelection) {\n\t\t\t\t\tthis._rangeSelection?.rows.push(row);\n\t\t\t\t}\n\n\t\t\t\tthis._selectRow(row, this._rangeSelection!.selected);\n\n\t\t\t\treturn changed || isRowSelectionDifferent;\n\t\t\t}, selectionChanged) || false;\n\t\t}\n\n\t\tselectionChanged && this.fireDecoratorEvent(\"change\");\n\t}\n\n\t_stopRangeSelection() {\n\t\tthis._rangeSelection = null;\n\t}\n\n\t_reverseRangeSelection() {\n\t\tconst row = this._rangeSelection?.rows.pop();\n\t\tif (row) {\n\t\t\tthis._selectRow(row, false);\n\t\t}\n\n\t\tif (this._rangeSelection?.rows.length === 1) {\n\t\t\tthis._rangeSelection.isUp = null;\n\t\t}\n\t}\n}\n\nTableSelection.define();\n\nexport default TableSelection;\n"]}
|
package/dist/Tag.js
CHANGED
|
@@ -177,7 +177,7 @@ let Tag = Tag_1 = class Tag extends UI5Element {
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
_onclick() {
|
|
180
|
-
this.
|
|
180
|
+
this.fireDecoratorEvent("click");
|
|
181
181
|
}
|
|
182
182
|
};
|
|
183
183
|
__decorate([
|
|
@@ -232,7 +232,9 @@ Tag = Tag_1 = __decorate([
|
|
|
232
232
|
* @since 1.22.0
|
|
233
233
|
*/
|
|
234
234
|
,
|
|
235
|
-
event("click"
|
|
235
|
+
event("click", {
|
|
236
|
+
bubbles: true,
|
|
237
|
+
})
|
|
236
238
|
], Tag);
|
|
237
239
|
Tag.define();
|
|
238
240
|
export default Tag;
|
package/dist/Tag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../src/Tag.ts"],"names":[],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Q,EAAE;yCACgC;AAS3C;IADC,QAAQ,EAAE;iCACc;AAOzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qCACX;AAOjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sCACV;AASlB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;iCACnB;AAOnB;IADC,IAAI,EAAE;iCACa;AAGb;IADN,IAAI,CAAC,oBAAoB,CAAC;6BACG;AA3FzB,GAAG;IAnBR,aAAa,CAAC;QACd,GAAG,EAAE,SAAS;QACd,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,MAAM;QACd,YAAY,EAAE;YACb,IAAI;SACJ;KACD,CAAC;IAEF;;;;;;OAMG;;IACF,KAAK,CAAC,OAAO,CAAC;GACT,GAAG,CAkLR;AAED,GAAG,CAAC,MAAM,EAAE,CAAC;AAEb,eAAe,GAAG,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport 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 willShowContent from \"@ui5/webcomponents-base/dist/util/willShowContent.js\";\nimport {\n\tisDesktop,\n} from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { IIcon } from \"./Icon.js\";\nimport Icon from \"./Icon.js\";\nimport \"@ui5/webcomponents-icons/dist/sys-help-2.js\";\nimport \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\nimport \"@ui5/webcomponents-icons/dist/error.js\";\nimport \"@ui5/webcomponents-icons/dist/alert.js\";\nimport \"@ui5/webcomponents-icons/dist/information.js\";\nimport type WrappingType from \"./types/WrappingType.js\";\nimport TagDesign from \"./types/TagDesign.js\";\nimport type TagSize from \"./types/TagSize.js\";\n// Template\nimport TagTemplate from \"./generated/templates/TagTemplate.lit.js\";\n\nimport {\n\tTAG_DESCRIPTION_TAG,\n\tTAG_ROLE_DESCRIPTION,\n\tTAG_ERROR,\n\tTAG_WARNING,\n\tTAG_SUCCESS,\n\tTAG_INFORMATION,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport tagCss from \"./generated/themes/Tag.css.js\";\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-tag` is a component which serves\n * the purpose to attract the user attention to some piece\n * of information (state, quantity, condition, etc.).\n * It can contain icon and text information, and its design can be chosen from specific design types.\n *\n * ### Usage Guidelines\n *\n * - If the text is longer than the width of the component, it can wrap, or it can show ellipsis, depending on the `wrappingType` property.\n * - Colors can be semantic or not semantic.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Tag.js\";`\n * @constructor\n * @extends UI5Element\n * @since 2.0.0\n * @public\n */\n@customElement({\n\ttag: \"ui5-tag\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: TagTemplate,\n\tstyles: tagCss,\n\tdependencies: [\n\t\tIcon,\n\t],\n})\n\n/**\n * Fired when the user clicks on an interactive tag.\n *\n * **Note:** The event will be fired if the `interactive` property is `true`\n * @public\n * @since 1.22.0\n */\n@event(\"click\")\nclass Tag extends UI5Element {\n\t/**\n\t * Defines the design type of the component.\n\t * @default \"Neutral\"\n\t * @public\n\t * @since 1.22.0\n\t */\n\t@property()\n\tdesign: `${TagDesign}` = \"Neutral\"\n\n\t/**\n\t * Defines the color scheme of the component.\n\t * There are 10 predefined schemes.\n\t * To use one you can set a number from `\"1\"` to `\"10\"`. The `colorScheme` `\"1\"` will be set by default.\n\t * @default \"1\"\n\t * @public\n\t */\n\t@property()\n\tcolorScheme = \"1\";\n\n\t/**\n\t * Defines if the default state icon is shown.\n\t * @default false\n\t * @public\n\t * @since 1.22.0\n\t */\n\t@property({ type: Boolean })\n\thideStateIcon = false;\n\n\t/**\n\t * Defines if the component is interactive (focusable and pressable).\n\t *\n\t * @default false\n\t * @public\n\t * @since 1.22.0\n\t */\n\t@property({ type: Boolean })\n\tinteractive = false;\n\n\t/**\n\t * Defines how the text of a component will be displayed when there is not enough space.\n\t *\n\t * **Note:** For option \"Normal\" the text will wrap and the\n\t * words will not be broken based on hyphenation.\n\t * @default \"Normal\"\n\t * @public\n\t * @since 1.22.0\n\t */\n\t@property()\n\twrappingType: `${WrappingType}` = \"Normal\";\n\n\t/**\n\t * Defines predefined size of the component.\n\t * @default \"S\"\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tsize: `${TagSize}` = \"S\";\n\n\t/**\n\t * Defines if the tag has an icon.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_hasIcon = false;\n\n\t/**\n\t * Defines if the tag has only an icon (and no text).\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_iconOnly = false;\n\n\t/**\n\t * Defines the text of the component.\n\t *\n\t * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n\t * @public\n\t */\n\t@slot({ type: Node, \"default\": true })\n\ttext!: Array<Node>;\n\n\t/**\n\t * Defines the icon to be displayed in the component.\n\t * @public\n\t */\n\t@slot()\n\ticon!: Array<IIcon>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._hasIcon = this.hasIcon || !!this._semanticIconName;\n\t\tthis._iconOnly = this.iconOnly;\n\t}\n\n\tget _roleDescription() {\n\t\treturn Tag.i18nBundle.getText(TAG_ROLE_DESCRIPTION);\n\t}\n\n\tget _valueState() {\n\t\tswitch (this.design) {\n\t\tcase TagDesign.Positive:\n\t\t\treturn Tag.i18nBundle.getText(TAG_SUCCESS);\n\t\tcase TagDesign.Negative:\n\t\t\treturn Tag.i18nBundle.getText(TAG_ERROR);\n\t\tcase TagDesign.Critical:\n\t\t\treturn Tag.i18nBundle.getText(TAG_WARNING);\n\t\tcase TagDesign.Information:\n\t\t\treturn Tag.i18nBundle.getText(TAG_INFORMATION);\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tget hasText() {\n\t\treturn willShowContent(this.text);\n\t}\n\n\tget hasIcon() {\n\t\treturn !!this.icon.length;\n\t}\n\n\tget iconOnly() {\n\t\treturn this.hasIcon && !this.hasText;\n\t}\n\n\tget _title() {\n\t\treturn this.title || undefined;\n\t}\n\n\tget tagDescription() {\n\t\tif (this.interactive) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst valueState = this._valueState;\n\t\tlet description = Tag.i18nBundle.getText(TAG_DESCRIPTION_TAG);\n\n\t\tif (valueState) {\n\t\t\tdescription = `${description} ${valueState}`;\n\t\t}\n\n\t\treturn description;\n\t}\n\n\tget _semanticIconName() {\n\t\tif (this.hideStateIcon || this.hasIcon) {\n\t\t\treturn null;\n\t\t}\n\n\t\tswitch (this.design) {\n\t\tcase TagDesign.Neutral:\n\t\t\treturn \"sys-help-2\";\n\t\tcase TagDesign.Positive:\n\t\t\treturn \"sys-enter-2\";\n\t\tcase TagDesign.Negative:\n\t\t\treturn \"error\";\n\t\tcase TagDesign.Critical:\n\t\t\treturn \"alert\";\n\t\tcase TagDesign.Information:\n\t\t\treturn \"information\";\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t_onclick() {\n\t\tthis.fireEvent(\"click\");\n\t}\n}\n\nTag.define();\n\nexport default Tag;\n"]}
|
|
1
|
+
{"version":3,"file":"Tag.js","sourceRoot":"","s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AC;wCACR;AAYpB;IADC,QAAQ,EAAE;yCACgC;AAS3C;IADC,QAAQ,EAAE;iCACc;AAOzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qCACX;AAOjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sCACV;AASlB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;iCACnB;AAOnB;IADC,IAAI,EAAE;iCACa;AAGb;IADN,IAAI,CAAC,oBAAoB,CAAC;6BACG;AA3FzB,GAAG;IArBR,aAAa,CAAC;QACd,GAAG,EAAE,SAAS;QACd,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,MAAM;QACd,YAAY,EAAE;YACb,IAAI;SACJ;KACD,CAAC;IAEF;;;;;;OAMG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;GACI,GAAG,CAkLR;AAED,GAAG,CAAC,MAAM,EAAE,CAAC;AAEb,eAAe,GAAG,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport 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 willShowContent from \"@ui5/webcomponents-base/dist/util/willShowContent.js\";\nimport {\n\tisDesktop,\n} from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { IIcon } from \"./Icon.js\";\nimport Icon from \"./Icon.js\";\nimport \"@ui5/webcomponents-icons/dist/sys-help-2.js\";\nimport \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\nimport \"@ui5/webcomponents-icons/dist/error.js\";\nimport \"@ui5/webcomponents-icons/dist/alert.js\";\nimport \"@ui5/webcomponents-icons/dist/information.js\";\nimport type WrappingType from \"./types/WrappingType.js\";\nimport TagDesign from \"./types/TagDesign.js\";\nimport type TagSize from \"./types/TagSize.js\";\n// Template\nimport TagTemplate from \"./generated/templates/TagTemplate.lit.js\";\n\nimport {\n\tTAG_DESCRIPTION_TAG,\n\tTAG_ROLE_DESCRIPTION,\n\tTAG_ERROR,\n\tTAG_WARNING,\n\tTAG_SUCCESS,\n\tTAG_INFORMATION,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport tagCss from \"./generated/themes/Tag.css.js\";\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-tag` is a component which serves\n * the purpose to attract the user attention to some piece\n * of information (state, quantity, condition, etc.).\n * It can contain icon and text information, and its design can be chosen from specific design types.\n *\n * ### Usage Guidelines\n *\n * - If the text is longer than the width of the component, it can wrap, or it can show ellipsis, depending on the `wrappingType` property.\n * - Colors can be semantic or not semantic.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Tag.js\";`\n * @constructor\n * @extends UI5Element\n * @since 2.0.0\n * @public\n */\n@customElement({\n\ttag: \"ui5-tag\",\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: TagTemplate,\n\tstyles: tagCss,\n\tdependencies: [\n\t\tIcon,\n\t],\n})\n\n/**\n * Fired when the user clicks on an interactive tag.\n *\n * **Note:** The event will be fired if the `interactive` property is `true`\n * @public\n * @since 1.22.0\n */\n@event(\"click\", {\n\tbubbles: true,\n})\nclass Tag extends UI5Element {\n\t/**\n\t * Defines the design type of the component.\n\t * @default \"Neutral\"\n\t * @public\n\t * @since 1.22.0\n\t */\n\t@property()\n\tdesign: `${TagDesign}` = \"Neutral\"\n\n\t/**\n\t * Defines the color scheme of the component.\n\t * There are 10 predefined schemes.\n\t * To use one you can set a number from `\"1\"` to `\"10\"`. The `colorScheme` `\"1\"` will be set by default.\n\t * @default \"1\"\n\t * @public\n\t */\n\t@property()\n\tcolorScheme = \"1\";\n\n\t/**\n\t * Defines if the default state icon is shown.\n\t * @default false\n\t * @public\n\t * @since 1.22.0\n\t */\n\t@property({ type: Boolean })\n\thideStateIcon = false;\n\n\t/**\n\t * Defines if the component is interactive (focusable and pressable).\n\t *\n\t * @default false\n\t * @public\n\t * @since 1.22.0\n\t */\n\t@property({ type: Boolean })\n\tinteractive = false;\n\n\t/**\n\t * Defines how the text of a component will be displayed when there is not enough space.\n\t *\n\t * **Note:** For option \"Normal\" the text will wrap and the\n\t * words will not be broken based on hyphenation.\n\t * @default \"Normal\"\n\t * @public\n\t * @since 1.22.0\n\t */\n\t@property()\n\twrappingType: `${WrappingType}` = \"Normal\";\n\n\t/**\n\t * Defines predefined size of the component.\n\t * @default \"S\"\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tsize: `${TagSize}` = \"S\";\n\n\t/**\n\t * Defines if the tag has an icon.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_hasIcon = false;\n\n\t/**\n\t * Defines if the tag has only an icon (and no text).\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_iconOnly = false;\n\n\t/**\n\t * Defines the text of the component.\n\t *\n\t * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n\t * @public\n\t */\n\t@slot({ type: Node, \"default\": true })\n\ttext!: Array<Node>;\n\n\t/**\n\t * Defines the icon to be displayed in the component.\n\t * @public\n\t */\n\t@slot()\n\ticon!: Array<IIcon>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tonEnterDOM() {\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._hasIcon = this.hasIcon || !!this._semanticIconName;\n\t\tthis._iconOnly = this.iconOnly;\n\t}\n\n\tget _roleDescription() {\n\t\treturn Tag.i18nBundle.getText(TAG_ROLE_DESCRIPTION);\n\t}\n\n\tget _valueState() {\n\t\tswitch (this.design) {\n\t\tcase TagDesign.Positive:\n\t\t\treturn Tag.i18nBundle.getText(TAG_SUCCESS);\n\t\tcase TagDesign.Negative:\n\t\t\treturn Tag.i18nBundle.getText(TAG_ERROR);\n\t\tcase TagDesign.Critical:\n\t\t\treturn Tag.i18nBundle.getText(TAG_WARNING);\n\t\tcase TagDesign.Information:\n\t\t\treturn Tag.i18nBundle.getText(TAG_INFORMATION);\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tget hasText() {\n\t\treturn willShowContent(this.text);\n\t}\n\n\tget hasIcon() {\n\t\treturn !!this.icon.length;\n\t}\n\n\tget iconOnly() {\n\t\treturn this.hasIcon && !this.hasText;\n\t}\n\n\tget _title() {\n\t\treturn this.title || undefined;\n\t}\n\n\tget tagDescription() {\n\t\tif (this.interactive) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst valueState = this._valueState;\n\t\tlet description = Tag.i18nBundle.getText(TAG_DESCRIPTION_TAG);\n\n\t\tif (valueState) {\n\t\t\tdescription = `${description} ${valueState}`;\n\t\t}\n\n\t\treturn description;\n\t}\n\n\tget _semanticIconName() {\n\t\tif (this.hideStateIcon || this.hasIcon) {\n\t\t\treturn null;\n\t\t}\n\n\t\tswitch (this.design) {\n\t\tcase TagDesign.Neutral:\n\t\t\treturn \"sys-help-2\";\n\t\tcase TagDesign.Positive:\n\t\t\treturn \"sys-enter-2\";\n\t\tcase TagDesign.Negative:\n\t\t\treturn \"error\";\n\t\tcase TagDesign.Critical:\n\t\t\treturn \"alert\";\n\t\tcase TagDesign.Information:\n\t\t\treturn \"information\";\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t_onclick() {\n\t\tthis.fireDecoratorEvent(\"click\");\n\t}\n}\n\nTag.define();\n\nexport default Tag;\n"]}
|
package/dist/TextArea.js
CHANGED
|
@@ -193,7 +193,7 @@ let TextArea = TextArea_1 = class TextArea extends UI5Element {
|
|
|
193
193
|
const nativeTextArea = this.getInputDomRef();
|
|
194
194
|
this.value = this.previousValue;
|
|
195
195
|
nativeTextArea.value = this.value;
|
|
196
|
-
this.
|
|
196
|
+
this.fireDecoratorEvent("input");
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
_onkeyup() {
|
|
@@ -213,13 +213,13 @@ let TextArea = TextArea_1 = class TextArea extends UI5Element {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
_onchange() {
|
|
216
|
-
this.
|
|
216
|
+
this.fireDecoratorEvent("change", {});
|
|
217
217
|
}
|
|
218
218
|
_onselect() {
|
|
219
|
-
this.
|
|
219
|
+
this.fireDecoratorEvent("select", {});
|
|
220
220
|
}
|
|
221
221
|
_onscroll() {
|
|
222
|
-
this.
|
|
222
|
+
this.fireDecoratorEvent("scroll", {});
|
|
223
223
|
}
|
|
224
224
|
_oninput(e) {
|
|
225
225
|
const nativeTextArea = this.getInputDomRef();
|
|
@@ -232,9 +232,9 @@ let TextArea = TextArea_1 = class TextArea extends UI5Element {
|
|
|
232
232
|
if (e.inputType === "insertFromPaste" && this.maxlength && valueLength > this.maxlength) {
|
|
233
233
|
nativeTextArea.setSelectionRange(this.maxlength, valueLength);
|
|
234
234
|
}
|
|
235
|
-
this.
|
|
235
|
+
this.fireDecoratorEvent("input", {});
|
|
236
236
|
// Angular two way data binding
|
|
237
|
-
this.
|
|
237
|
+
this.fireDecoratorEvent("value-changed");
|
|
238
238
|
}
|
|
239
239
|
_onResize() {
|
|
240
240
|
if (this.displayValueStateMessagePopover) {
|
|
@@ -491,7 +491,17 @@ TextArea = TextArea_1 = __decorate([
|
|
|
491
491
|
* @public
|
|
492
492
|
*/
|
|
493
493
|
,
|
|
494
|
-
event("change"
|
|
494
|
+
event("change", {
|
|
495
|
+
bubbles: true,
|
|
496
|
+
})
|
|
497
|
+
/**
|
|
498
|
+
* Fired to make Angular two way data binding work properly.
|
|
499
|
+
* @private
|
|
500
|
+
*/
|
|
501
|
+
,
|
|
502
|
+
event("value-changed", {
|
|
503
|
+
bubbles: true,
|
|
504
|
+
})
|
|
495
505
|
/**
|
|
496
506
|
* Fired when the value of the component changes at each keystroke or when
|
|
497
507
|
* something is pasted.
|
|
@@ -499,7 +509,9 @@ TextArea = TextArea_1 = __decorate([
|
|
|
499
509
|
* @public
|
|
500
510
|
*/
|
|
501
511
|
,
|
|
502
|
-
event("input"
|
|
512
|
+
event("input", {
|
|
513
|
+
bubbles: true,
|
|
514
|
+
})
|
|
503
515
|
/**
|
|
504
516
|
* Fired when some text has been selected.
|
|
505
517
|
*
|
|
@@ -507,7 +519,9 @@ TextArea = TextArea_1 = __decorate([
|
|
|
507
519
|
* @public
|
|
508
520
|
*/
|
|
509
521
|
,
|
|
510
|
-
event("select"
|
|
522
|
+
event("select", {
|
|
523
|
+
bubbles: true,
|
|
524
|
+
})
|
|
511
525
|
/**
|
|
512
526
|
* Fired when textarea is scrolled.
|
|
513
527
|
*
|
|
@@ -515,7 +529,9 @@ TextArea = TextArea_1 = __decorate([
|
|
|
515
529
|
* @public
|
|
516
530
|
*/
|
|
517
531
|
,
|
|
518
|
-
event("scroll"
|
|
532
|
+
event("scroll", {
|
|
533
|
+
bubbles: true,
|
|
534
|
+
})
|
|
519
535
|
], TextArea);
|
|
520
536
|
TextArea.define();
|
|
521
537
|
export default TextArea;
|