@ui5/webcomponents 2.1.0-rc.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/AvatarGroup.js +1 -1
- package/dist/AvatarGroup.js.map +1 -1
- package/dist/CalendarDateRange.d.ts +1 -1
- package/dist/CalendarDateRange.js +1 -1
- package/dist/CalendarDateRange.js.map +1 -1
- package/dist/Card.d.ts +14 -0
- package/dist/Card.js +25 -1
- package/dist/Card.js.map +1 -1
- package/dist/ColorPalette.d.ts +6 -2
- package/dist/ColorPalette.js +17 -12
- package/dist/ColorPalette.js.map +1 -1
- package/dist/DatePicker.d.ts +2 -0
- package/dist/DatePicker.js +5 -0
- package/dist/DatePicker.js.map +1 -1
- package/dist/DayPicker.js +1 -1
- package/dist/DayPicker.js.map +1 -1
- package/dist/Dialog.js +1 -0
- package/dist/Dialog.js.map +1 -1
- package/dist/Input.d.ts +1 -0
- package/dist/Input.js +22 -25
- package/dist/Input.js.map +1 -1
- package/dist/List.d.ts +0 -6
- package/dist/List.js +0 -13
- package/dist/List.js.map +1 -1
- package/dist/MenuSeparator.d.ts +1 -1
- package/dist/MenuSeparator.js +1 -1
- package/dist/MenuSeparator.js.map +1 -1
- package/dist/MultiComboBox.js +1 -1
- package/dist/MultiComboBox.js.map +1 -1
- package/dist/MultiComboBoxItemGroup.d.ts +1 -1
- package/dist/MultiComboBoxItemGroup.js +1 -1
- package/dist/MultiComboBoxItemGroup.js.map +1 -1
- package/dist/RadioButton.js +1 -1
- package/dist/RadioButton.js.map +1 -1
- package/dist/Select.js +1 -1
- package/dist/Select.js.map +1 -1
- package/dist/Table.d.ts +1 -1
- package/dist/Table.js +1 -1
- package/dist/Table.js.map +1 -1
- package/dist/TableCell.d.ts +1 -1
- package/dist/TableCell.js +1 -1
- package/dist/TableCell.js.map +1 -1
- package/dist/TableCellBase.d.ts +1 -1
- package/dist/TableCellBase.js +1 -1
- package/dist/TableCellBase.js.map +1 -1
- package/dist/TableGrowing.d.ts +1 -1
- package/dist/TableGrowing.js +1 -1
- package/dist/TableGrowing.js.map +1 -1
- package/dist/TableHeaderCell.d.ts +1 -1
- package/dist/TableHeaderCell.js +1 -1
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableHeaderRow.d.ts +1 -1
- package/dist/TableHeaderRow.js +1 -1
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableRow.d.ts +1 -1
- package/dist/TableRow.js +1 -1
- package/dist/TableRow.js.map +1 -1
- package/dist/TableRowBase.d.ts +1 -1
- package/dist/TableRowBase.js +1 -1
- package/dist/TableRowBase.js.map +1 -1
- package/dist/TableSelection.d.ts +1 -1
- package/dist/TableSelection.js +1 -1
- package/dist/TableSelection.js.map +1 -1
- package/dist/TimePicker.d.ts +1 -1
- package/dist/TimePicker.js +1 -1
- package/dist/TimePicker.js.map +1 -1
- package/dist/TimePickerClock.js +16 -0
- package/dist/TimePickerClock.js.map +1 -1
- package/dist/Toolbar.js +2 -1
- package/dist/Toolbar.js.map +1 -1
- package/dist/ToolbarRegistry.js +1 -1
- package/dist/ToolbarRegistry.js.map +1 -1
- package/dist/css/themes/Avatar.css +1 -1
- package/dist/css/themes/AvatarGroup.css +1 -1
- package/dist/css/themes/Bar.css +1 -1
- package/dist/css/themes/Breadcrumbs.css +1 -1
- package/dist/css/themes/BusyIndicator.css +1 -1
- package/dist/css/themes/Button.css +1 -1
- package/dist/css/themes/Calendar.css +1 -1
- package/dist/css/themes/CalendarHeader.css +1 -1
- package/dist/css/themes/CalendarLegend.css +1 -1
- package/dist/css/themes/CalendarLegendItem.css +1 -1
- package/dist/css/themes/Card.css +1 -1
- package/dist/css/themes/CardHeader.css +1 -1
- package/dist/css/themes/Carousel.css +1 -1
- package/dist/css/themes/CheckBox.css +1 -1
- package/dist/css/themes/ColorPalette.css +1 -1
- package/dist/css/themes/ColorPaletteItem.css +1 -1
- package/dist/css/themes/ColorPalettePopover.css +1 -1
- package/dist/css/themes/ColorPicker.css +1 -1
- package/dist/css/themes/ComboBox.css +1 -1
- package/dist/css/themes/DatePicker.css +1 -1
- package/dist/css/themes/DateTimePickerPopover.css +1 -1
- package/dist/css/themes/DayPicker.css +1 -1
- package/dist/css/themes/Dialog.css +1 -1
- package/dist/css/themes/FileUploader.css +1 -1
- package/dist/css/themes/Form.css +1 -1
- package/dist/css/themes/FormItem.css +1 -1
- package/dist/css/themes/FormLabelSpan.css +1 -1
- package/dist/css/themes/GrowingButton.css +1 -1
- package/dist/css/themes/Icon.css +1 -1
- package/dist/css/themes/Input.css +1 -1
- package/dist/css/themes/InputIcon.css +1 -1
- package/dist/css/themes/InputSharedStyles.css +1 -1
- package/dist/css/themes/Link.css +1 -1
- package/dist/css/themes/List.css +1 -1
- package/dist/css/themes/ListItem.css +1 -1
- package/dist/css/themes/ListItemBase.css +1 -1
- package/dist/css/themes/ListItemCustom.css +1 -1
- package/dist/css/themes/ListItemGroup.css +1 -1
- package/dist/css/themes/ListItemGroupHeader.css +1 -1
- package/dist/css/themes/ListItemIcon.css +1 -1
- package/dist/css/themes/Menu.css +1 -1
- package/dist/css/themes/MenuItem.css +1 -1
- package/dist/css/themes/MessageStrip.css +1 -1
- package/dist/css/themes/MonthPicker.css +1 -1
- package/dist/css/themes/MultiComboBox.css +1 -1
- package/dist/css/themes/MultiComboBoxPopover.css +1 -1
- package/dist/css/themes/MultiInput.css +1 -1
- package/dist/css/themes/NavigationMenu.css +1 -1
- package/dist/css/themes/NavigationMenuItem.css +1 -1
- package/dist/css/themes/OptionBase.css +1 -1
- package/dist/css/themes/Panel.css +1 -1
- package/dist/css/themes/Popover.css +1 -1
- package/dist/css/themes/PopupsCommon.css +1 -1
- package/dist/css/themes/ProgressIndicator.css +1 -1
- package/dist/css/themes/RadioButton.css +1 -1
- package/dist/css/themes/RangeSlider.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/ResponsivePopover.css +1 -1
- package/dist/css/themes/ResponsivePopoverCommon.css +1 -1
- package/dist/css/themes/SegmentedButton.css +1 -1
- package/dist/css/themes/SegmentedButtonItem.css +1 -1
- package/dist/css/themes/Select.css +1 -1
- package/dist/css/themes/SliderBase.css +1 -1
- package/dist/css/themes/SplitButton.css +1 -1
- package/dist/css/themes/StepInput.css +1 -1
- package/dist/css/themes/SuggestionItem.css +1 -1
- package/dist/css/themes/SuggestionItemCustom.css +1 -1
- package/dist/css/themes/Switch.css +1 -1
- package/dist/css/themes/TabContainer.css +1 -1
- package/dist/css/themes/TabInOverflow.css +1 -1
- package/dist/css/themes/TabInStrip.css +1 -1
- package/dist/css/themes/TabSemanticIcon.css +1 -1
- package/dist/css/themes/TabSeparatorInOverflow.css +1 -1
- package/dist/css/themes/Table.css +1 -1
- package/dist/css/themes/TableCellBase.css +1 -1
- package/dist/css/themes/TableHeaderRow.css +1 -1
- package/dist/css/themes/TableRow.css +1 -1
- package/dist/css/themes/TableRowBase.css +1 -1
- package/dist/css/themes/Tag.css +1 -1
- package/dist/css/themes/Text.css +1 -1
- package/dist/css/themes/TextArea.css +1 -1
- package/dist/css/themes/TimePicker.css +1 -1
- package/dist/css/themes/Toast.css +1 -1
- package/dist/css/themes/ToggleButton.css +1 -1
- package/dist/css/themes/Token.css +1 -1
- package/dist/css/themes/Tokenizer.css +1 -1
- package/dist/css/themes/TokenizerPopover.css +1 -1
- package/dist/css/themes/Toolbar.css +1 -1
- package/dist/css/themes/ToolbarPopover.css +1 -1
- package/dist/css/themes/TreeItem.css +1 -1
- package/dist/css/themes/ValueStateMessage.css +1 -1
- package/dist/css/themes/YearPicker.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb_exp/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw_exp/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +54 -13
- package/dist/custom-elements.json +38 -0
- package/dist/features/ColorPaletteMoreColors.d.ts +3 -2
- package/dist/features/ColorPaletteMoreColors.js +4 -4
- package/dist/features/ColorPaletteMoreColors.js.map +1 -1
- package/dist/features/InputSuggestions.d.ts +3 -2
- package/dist/features/InputSuggestions.js +5 -4
- package/dist/features/InputSuggestions.js.map +1 -1
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/templates/CardTemplate.lit.js +2 -2
- package/dist/generated/templates/CardTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ColorPaletteDialogTemplate.lit.js +2 -2
- package/dist/generated/templates/ColorPaletteDialogTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ColorPaletteTemplate.lit.js +2 -2
- package/dist/generated/templates/ColorPaletteTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DatePickerPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/DatePickerPopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DatePickerTemplate.lit.js +1 -1
- package/dist/generated/templates/DatePickerTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DateRangePickerTemplate.lit.js +1 -1
- package/dist/generated/templates/DateRangePickerTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DateTimePickerPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/DateTimePickerPopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/DateTimePickerTemplate.lit.js +1 -1
- package/dist/generated/templates/DateTimePickerTemplate.lit.js.map +1 -1
- package/dist/generated/templates/InputPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/InputPopoverTemplate.lit.js.map +1 -1
- package/dist/generated/templates/InputTemplate.lit.js +1 -1
- package/dist/generated/templates/InputTemplate.lit.js.map +1 -1
- package/dist/generated/templates/ListTemplate.lit.js +2 -3
- package/dist/generated/templates/ListTemplate.lit.js.map +1 -1
- package/dist/generated/templates/MultiInputTemplate.lit.js +1 -1
- package/dist/generated/templates/MultiInputTemplate.lit.js.map +1 -1
- package/dist/generated/templates/OptionCustomTemplate.lit.js +1 -1
- package/dist/generated/templates/OptionCustomTemplate.lit.js.map +1 -1
- package/dist/generated/templates/OptionTemplate.lit.js +1 -1
- package/dist/generated/templates/OptionTemplate.lit.js.map +1 -1
- package/dist/generated/themes/Avatar.css.js +1 -1
- package/dist/generated/themes/Avatar.css.js.map +1 -1
- package/dist/generated/themes/AvatarGroup.css.js +1 -1
- package/dist/generated/themes/AvatarGroup.css.js.map +1 -1
- package/dist/generated/themes/Bar.css.js +1 -1
- package/dist/generated/themes/Bar.css.js.map +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js.map +1 -1
- package/dist/generated/themes/BusyIndicator.css.js +1 -1
- package/dist/generated/themes/BusyIndicator.css.js.map +1 -1
- package/dist/generated/themes/Button.css.js +1 -1
- package/dist/generated/themes/Button.css.js.map +1 -1
- package/dist/generated/themes/Calendar.css.js +1 -1
- package/dist/generated/themes/Calendar.css.js.map +1 -1
- package/dist/generated/themes/CalendarHeader.css.js +1 -1
- package/dist/generated/themes/CalendarHeader.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegend.css.js +1 -1
- package/dist/generated/themes/CalendarLegend.css.js.map +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js +1 -1
- package/dist/generated/themes/CalendarLegendItem.css.js.map +1 -1
- package/dist/generated/themes/Card.css.js +1 -1
- package/dist/generated/themes/Card.css.js.map +1 -1
- package/dist/generated/themes/CardHeader.css.js +1 -1
- package/dist/generated/themes/CardHeader.css.js.map +1 -1
- package/dist/generated/themes/Carousel.css.js +1 -1
- package/dist/generated/themes/Carousel.css.js.map +1 -1
- package/dist/generated/themes/CheckBox.css.js +1 -1
- package/dist/generated/themes/CheckBox.css.js.map +1 -1
- package/dist/generated/themes/ColorPalette.css.js +1 -1
- package/dist/generated/themes/ColorPalette.css.js.map +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js.map +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js.map +1 -1
- package/dist/generated/themes/ColorPicker.css.js +1 -1
- package/dist/generated/themes/ColorPicker.css.js.map +1 -1
- package/dist/generated/themes/ComboBox.css.js +1 -1
- package/dist/generated/themes/ComboBox.css.js.map +1 -1
- package/dist/generated/themes/DatePicker.css.js +1 -1
- package/dist/generated/themes/DatePicker.css.js.map +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js.map +1 -1
- package/dist/generated/themes/DayPicker.css.js +1 -1
- package/dist/generated/themes/DayPicker.css.js.map +1 -1
- package/dist/generated/themes/Dialog.css.js +1 -1
- package/dist/generated/themes/Dialog.css.js.map +1 -1
- package/dist/generated/themes/FileUploader.css.js +1 -1
- package/dist/generated/themes/FileUploader.css.js.map +1 -1
- package/dist/generated/themes/Form.css.js +1 -1
- package/dist/generated/themes/Form.css.js.map +1 -1
- package/dist/generated/themes/FormItem.css.js +1 -1
- package/dist/generated/themes/FormItem.css.js.map +1 -1
- package/dist/generated/themes/FormLabelSpan.css.js +1 -1
- package/dist/generated/themes/FormLabelSpan.css.js.map +1 -1
- package/dist/generated/themes/GrowingButton.css.js +1 -1
- package/dist/generated/themes/GrowingButton.css.js.map +1 -1
- package/dist/generated/themes/Icon.css.js +1 -1
- package/dist/generated/themes/Icon.css.js.map +1 -1
- package/dist/generated/themes/Input.css.js +1 -1
- package/dist/generated/themes/Input.css.js.map +1 -1
- package/dist/generated/themes/InputIcon.css.js +1 -1
- package/dist/generated/themes/InputIcon.css.js.map +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js +1 -1
- package/dist/generated/themes/InputSharedStyles.css.js.map +1 -1
- package/dist/generated/themes/Link.css.js +1 -1
- package/dist/generated/themes/Link.css.js.map +1 -1
- package/dist/generated/themes/List.css.js +1 -1
- package/dist/generated/themes/List.css.js.map +1 -1
- package/dist/generated/themes/ListItem.css.js +1 -1
- package/dist/generated/themes/ListItem.css.js.map +1 -1
- package/dist/generated/themes/ListItemBase.css.js +1 -1
- package/dist/generated/themes/ListItemBase.css.js.map +1 -1
- package/dist/generated/themes/ListItemCustom.css.js +1 -1
- package/dist/generated/themes/ListItemCustom.css.js.map +1 -1
- package/dist/generated/themes/ListItemGroup.css.js +1 -1
- package/dist/generated/themes/ListItemGroup.css.js.map +1 -1
- package/dist/generated/themes/ListItemGroupHeader.css.js +1 -1
- package/dist/generated/themes/ListItemGroupHeader.css.js.map +1 -1
- package/dist/generated/themes/ListItemIcon.css.js +1 -1
- package/dist/generated/themes/ListItemIcon.css.js.map +1 -1
- package/dist/generated/themes/Menu.css.js +1 -1
- package/dist/generated/themes/Menu.css.js.map +1 -1
- package/dist/generated/themes/MenuItem.css.js +1 -1
- package/dist/generated/themes/MenuItem.css.js.map +1 -1
- package/dist/generated/themes/MessageStrip.css.js +1 -1
- package/dist/generated/themes/MessageStrip.css.js.map +1 -1
- package/dist/generated/themes/MonthPicker.css.js +1 -1
- package/dist/generated/themes/MonthPicker.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBox.css.js +1 -1
- package/dist/generated/themes/MultiComboBox.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js +1 -1
- package/dist/generated/themes/MultiComboBoxPopover.css.js.map +1 -1
- package/dist/generated/themes/MultiInput.css.js +1 -1
- package/dist/generated/themes/MultiInput.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenu.css.js +1 -1
- package/dist/generated/themes/NavigationMenu.css.js.map +1 -1
- package/dist/generated/themes/NavigationMenuItem.css.js +1 -1
- package/dist/generated/themes/NavigationMenuItem.css.js.map +1 -1
- package/dist/generated/themes/OptionBase.css.js +1 -1
- package/dist/generated/themes/OptionBase.css.js.map +1 -1
- package/dist/generated/themes/Panel.css.js +1 -1
- package/dist/generated/themes/Panel.css.js.map +1 -1
- package/dist/generated/themes/Popover.css.js +1 -1
- package/dist/generated/themes/Popover.css.js.map +1 -1
- package/dist/generated/themes/PopupsCommon.css.js +1 -1
- package/dist/generated/themes/PopupsCommon.css.js.map +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js.map +1 -1
- package/dist/generated/themes/RadioButton.css.js +1 -1
- package/dist/generated/themes/RadioButton.css.js.map +1 -1
- package/dist/generated/themes/RangeSlider.css.js +1 -1
- package/dist/generated/themes/RangeSlider.css.js.map +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js.map +1 -1
- package/dist/generated/themes/SegmentedButton.css.js +1 -1
- package/dist/generated/themes/SegmentedButton.css.js.map +1 -1
- package/dist/generated/themes/SegmentedButtonItem.css.js +1 -1
- package/dist/generated/themes/SegmentedButtonItem.css.js.map +1 -1
- package/dist/generated/themes/Select.css.js +1 -1
- package/dist/generated/themes/Select.css.js.map +1 -1
- package/dist/generated/themes/SliderBase.css.js +1 -1
- package/dist/generated/themes/SliderBase.css.js.map +1 -1
- package/dist/generated/themes/SplitButton.css.js +1 -1
- package/dist/generated/themes/SplitButton.css.js.map +1 -1
- package/dist/generated/themes/StepInput.css.js +1 -1
- package/dist/generated/themes/StepInput.css.js.map +1 -1
- package/dist/generated/themes/SuggestionItem.css.js +1 -1
- package/dist/generated/themes/SuggestionItem.css.js.map +1 -1
- package/dist/generated/themes/SuggestionItemCustom.css.js +1 -1
- package/dist/generated/themes/SuggestionItemCustom.css.js.map +1 -1
- package/dist/generated/themes/Switch.css.js +1 -1
- package/dist/generated/themes/Switch.css.js.map +1 -1
- package/dist/generated/themes/TabContainer.css.js +1 -1
- package/dist/generated/themes/TabContainer.css.js.map +1 -1
- package/dist/generated/themes/TabInOverflow.css.js +1 -1
- package/dist/generated/themes/TabInOverflow.css.js.map +1 -1
- package/dist/generated/themes/TabInStrip.css.js +1 -1
- package/dist/generated/themes/TabInStrip.css.js.map +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js +1 -1
- package/dist/generated/themes/TabSemanticIcon.css.js.map +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js +1 -1
- package/dist/generated/themes/TabSeparatorInOverflow.css.js.map +1 -1
- package/dist/generated/themes/Table.css.js +1 -1
- package/dist/generated/themes/Table.css.js.map +1 -1
- package/dist/generated/themes/TableCellBase.css.js +1 -1
- package/dist/generated/themes/TableCellBase.css.js.map +1 -1
- package/dist/generated/themes/TableHeaderRow.css.js +1 -1
- package/dist/generated/themes/TableHeaderRow.css.js.map +1 -1
- package/dist/generated/themes/TableRow.css.js +1 -1
- package/dist/generated/themes/TableRow.css.js.map +1 -1
- package/dist/generated/themes/TableRowBase.css.js +1 -1
- package/dist/generated/themes/TableRowBase.css.js.map +1 -1
- package/dist/generated/themes/Tag.css.js +1 -1
- package/dist/generated/themes/Tag.css.js.map +1 -1
- package/dist/generated/themes/Text.css.js +1 -1
- package/dist/generated/themes/Text.css.js.map +1 -1
- package/dist/generated/themes/TextArea.css.js +1 -1
- package/dist/generated/themes/TextArea.css.js.map +1 -1
- package/dist/generated/themes/TimePicker.css.js +1 -1
- package/dist/generated/themes/TimePicker.css.js.map +1 -1
- package/dist/generated/themes/Toast.css.js +1 -1
- package/dist/generated/themes/Toast.css.js.map +1 -1
- package/dist/generated/themes/ToggleButton.css.js +1 -1
- package/dist/generated/themes/ToggleButton.css.js.map +1 -1
- package/dist/generated/themes/Token.css.js +1 -1
- package/dist/generated/themes/Token.css.js.map +1 -1
- package/dist/generated/themes/Tokenizer.css.js +1 -1
- package/dist/generated/themes/Tokenizer.css.js.map +1 -1
- package/dist/generated/themes/TokenizerPopover.css.js +1 -1
- package/dist/generated/themes/TokenizerPopover.css.js.map +1 -1
- package/dist/generated/themes/Toolbar.css.js +1 -1
- package/dist/generated/themes/Toolbar.css.js.map +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js.map +1 -1
- package/dist/generated/themes/TreeItem.css.js +1 -1
- package/dist/generated/themes/TreeItem.css.js.map +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js.map +1 -1
- package/dist/generated/themes/YearPicker.css.js +1 -1
- package/dist/generated/themes/YearPicker.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +10 -0
- package/dist/web-types.json +21 -1
- package/package.json +10 -10
- package/src/Card.hbs +16 -7
- package/src/ColorPaletteDialog.hbs +18 -18
- package/src/DatePickerPopover.hbs +0 -1
- package/src/DateRangePicker.hbs +0 -1
- package/src/DateTimePickerPopover.hbs +0 -1
- package/src/Input.hbs +1 -1
- package/src/InputPopover.hbs +1 -1
- package/src/List.hbs +7 -13
- package/src/Option.hbs +1 -0
- package/src/OptionCustom.hbs +1 -0
- package/src/i18n/messagebundle_ar.properties +4 -0
- package/src/i18n/messagebundle_bg.properties +4 -0
- package/src/i18n/messagebundle_ca.properties +4 -0
- package/src/i18n/messagebundle_cnr.properties +4 -0
- package/src/i18n/messagebundle_cs.properties +4 -0
- package/src/i18n/messagebundle_cy.properties +4 -0
- package/src/i18n/messagebundle_da.properties +4 -0
- package/src/i18n/messagebundle_de.properties +4 -0
- package/src/i18n/messagebundle_el.properties +4 -0
- package/src/i18n/messagebundle_en.properties +4 -0
- package/src/i18n/messagebundle_en_GB.properties +4 -0
- package/src/i18n/messagebundle_en_US_sappsd.properties +71 -12
- package/src/i18n/messagebundle_en_US_saprigi.properties +4 -0
- package/src/i18n/messagebundle_en_US_saptrc.properties +215 -156
- package/src/i18n/messagebundle_es.properties +4 -0
- package/src/i18n/messagebundle_es_MX.properties +4 -0
- package/src/i18n/messagebundle_et.properties +4 -0
- package/src/i18n/messagebundle_fi.properties +4 -0
- package/src/i18n/messagebundle_fr.properties +4 -0
- package/src/i18n/messagebundle_fr_CA.properties +4 -0
- package/src/i18n/messagebundle_hi.properties +4 -0
- package/src/i18n/messagebundle_hr.properties +4 -0
- package/src/i18n/messagebundle_hu.properties +4 -0
- package/src/i18n/messagebundle_id.properties +8 -4
- package/src/i18n/messagebundle_it.properties +4 -0
- package/src/i18n/messagebundle_iw.properties +4 -0
- package/src/i18n/messagebundle_ja.properties +4 -0
- package/src/i18n/messagebundle_kk.properties +4 -0
- package/src/i18n/messagebundle_ko.properties +4 -0
- package/src/i18n/messagebundle_lt.properties +4 -0
- package/src/i18n/messagebundle_lv.properties +4 -0
- package/src/i18n/messagebundle_mk.properties +4 -0
- package/src/i18n/messagebundle_ms.properties +4 -0
- package/src/i18n/messagebundle_nl.properties +4 -0
- package/src/i18n/messagebundle_no.properties +4 -0
- package/src/i18n/messagebundle_pl.properties +4 -0
- package/src/i18n/messagebundle_pt.properties +4 -0
- package/src/i18n/messagebundle_pt_PT.properties +4 -0
- package/src/i18n/messagebundle_ro.properties +4 -0
- package/src/i18n/messagebundle_ru.properties +4 -0
- package/src/i18n/messagebundle_sh.properties +4 -0
- package/src/i18n/messagebundle_sk.properties +4 -0
- package/src/i18n/messagebundle_sl.properties +4 -0
- package/src/i18n/messagebundle_sr.properties +4 -0
- package/src/i18n/messagebundle_sv.properties +4 -0
- package/src/i18n/messagebundle_th.properties +4 -0
- package/src/i18n/messagebundle_tr.properties +4 -0
- package/src/i18n/messagebundle_uk.properties +4 -0
- package/src/i18n/messagebundle_vi.properties +4 -0
- package/src/i18n/messagebundle_zh_CN.properties +4 -0
- package/src/i18n/messagebundle_zh_TW.properties +4 -0
- package/src/themes/Card.css +11 -0
- package/src/themes/List.css +3 -22
- package/src/themes/MultiComboBoxPopover.css +1 -1
- package/src/themes/PopupsCommon.css +2 -2
- package/src/themes/ResponsivePopover.css +1 -1
- package/src/themes/StepInput.css +2 -0
- package/src/themes/TextArea.css +11 -26
- package/src/themes/TimePicker.css +3 -0
- package/src/themes/base/sizes-parameters.css +38 -4
- package/src/themes/sap_fiori_3/Token-parameters.css +1 -0
- package/src/themes/sap_fiori_3/sizes-parameters.css +13 -1
- package/src/themes/sap_fiori_3_dark/Token-parameters.css +1 -0
- package/src/themes/sap_fiori_3_dark/sizes-parameters.css +9 -0
- package/src/themes/sap_fiori_3_hcb/sizes-parameters.css +5 -0
- package/src/themes/sap_fiori_3_hcw/sizes-parameters.css +5 -0
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,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EACN,OAAO,EACP,OAAO,GACP,MAAM,sCAAsC,CAAC;AAI9C,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,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,CAAC;SACzB;IACF,CAAC;IAED,QAAQ,CAAC,CAAgB;QACxB,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE;YACf,IAAI,CAAC,QAAQ,EAAE,CAAC;SAChB;QACD,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,WAAW;QACV,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,kBAAkB;QACrB,OAAO,IAAI,CAAC,WAAW,IAAI,cAAY,CAAC,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACxE,CAAC;IAED,IAAI,yBAAyB;QAC5B,OAAO,cAAY,CAAC,UAAU,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,iBAAiB;QACpB,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC;IACnC,CAAC;CACD,CAAA;AAhNA;IADC,QAAQ,EAAE;0CAC4B;AAavC;IADC,QAAQ,EAAE;iDACU;AAUrB;IADC,QAAQ,EAAE;oDACa;AAMxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CACX;AAQjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;kDACP;AAlDhB,YAAY;IAdjB,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,CAAC;GAEb,YAAY,CA6NjB;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 { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.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\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\tstatic i18nBundle: I18nBundle;\n\n\tstatic async onDefine() {\n\t\tTableGrowing.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\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) ?? true;\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"]}
|
|
1
|
+
{"version":3,"file":"TableGrowing.js","sourceRoot":"","sources":["../src/TableGrowing.ts"],"names":[],"mappings":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Q,EAAE,SAAS;QACnB,QAAQ,EAAE,oBAAoB;QAC9B,MAAM,EAAE,eAAe;KACvB,CAAC;IAEF;;;;OAIG;;IACF,KAAK,CAAC,WAAW,CAAC;GAEb,YAAY,CA6NjB;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 { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.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\tstatic i18nBundle: I18nBundle;\n\n\tstatic async onDefine() {\n\t\tTableGrowing.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\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) ?? true;\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"]}
|
|
@@ -15,7 +15,7 @@ import TableCellBase from "./TableCellBase.js";
|
|
|
15
15
|
*
|
|
16
16
|
* @constructor
|
|
17
17
|
* @extends TableCellBase
|
|
18
|
-
* @since 2.0
|
|
18
|
+
* @since 2.0.0
|
|
19
19
|
* @public
|
|
20
20
|
* @experimental This web component is available since 2.0 with an experimental flag and its API and behavior are subject to change.
|
|
21
21
|
*/
|
package/dist/TableHeaderCell.js
CHANGED
|
@@ -25,7 +25,7 @@ import TableHeaderCellStyles from "./generated/themes/TableHeaderCell.css.js";
|
|
|
25
25
|
*
|
|
26
26
|
* @constructor
|
|
27
27
|
* @extends TableCellBase
|
|
28
|
-
* @since 2.0
|
|
28
|
+
* @since 2.0.0
|
|
29
29
|
* @public
|
|
30
30
|
* @experimental This web component is available since 2.0 with an experimental flag and its API and behavior are subject to change.
|
|
31
31
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeaderCell.js","sourceRoot":"","sources":["../src/TableHeaderCell.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,uBAAuB,MAAM,sDAAsD,CAAC;AAC3F,OAAO,qBAAqB,MAAM,2CAA2C,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;GAmBG;AAMH,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,aAAa;IAA3C;;QACC;;;;;WAKG;QAEH,UAAK,GAAG,MAAM,CAAC;QAEf;;;;;;;;WAQG;QAEH,aAAQ,GAAG,MAAM,CAAC;QAElB;;;;;WAKG;QAEH,aAAQ,GAAG,MAAM,CAAC;QAElB;;;;;;;;;WASG;QAEH,eAAU,GAAG,CAAC,CAAC;QAGf,WAAM,GAAG,KAAK,CAAC;QAEL,aAAQ,GAAW,cAAc,CAAC;QAC5C,gBAAW,GAAW,CAAC,CAAC;IAQzB,CAAC;IANA,UAAU;QACT,KAAK,CAAC,UAAU,EAAE,CAAC;QACnB,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QACpC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QACpC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IAC/B,CAAC;CACD,CAAA;AAhDA;IADC,QAAQ,EAAE;8CACI;AAYf;IADC,QAAQ,EAAE;iDACO;AASlB;IADC,QAAQ,EAAE;iDACO;AAalB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDACZ;AAGf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;+CAChC;AA7CV,eAAe;IALpB,aAAa,CAAC;QACd,GAAG,EAAE,uBAAuB;QAC5B,MAAM,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,qBAAqB,CAAC;QACrD,QAAQ,EAAE,uBAAuB;KACjC,CAAC;GACI,eAAe,CAwDpB;AAED,eAAe,CAAC,MAAM,EAAE,CAAC;AAEzB,eAAe,eAAe,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport TableCellBase from \"./TableCellBase.js\";\nimport TableHeaderCellTemplate from \"./generated/templates/TableHeaderCellTemplate.lit.js\";\nimport TableHeaderCellStyles from \"./generated/themes/TableHeaderCell.css.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table-header-cell` component represents a column in the `ui5-table`.\n *\n * As it is tightly coupled to the `ui5-table`, it should only be used in the `ui5-table-header-row`\n * to ensure correct layout and design.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/TableHeaderCell.js\";`\n *\n * @constructor\n * @extends TableCellBase\n * @since 2.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-header-cell\",\n\tstyles: [TableCellBase.styles, TableHeaderCellStyles],\n\ttemplate: TableHeaderCellTemplate,\n})\nclass TableHeaderCell extends TableCellBase {\n\t/**\n\t * Defines the width of column.\n\t *\n\t * @default \"auto\"\n\t * @public\n\t */\n\t@property()\n\twidth = \"auto\";\n\n\t/**\n \t * Defines the minimum width of the column.\n\t *\n\t * If the table is in `Popin` mode, the column will move into the popin when\n\t * when the minimum width does not fit anymore.\n\t *\n\t * @default \"auto\"\n\t * @public\n\t */\n\t@property()\n\tminWidth = \"auto\";\n\n\t/**\n\t * Defines the maximum width of the column.\n\t *\n\t * @default \"auto\"\n\t * @public\n\t */\n\t@property()\n\tmaxWidth = \"auto\";\n\n\t/**\n\t * Defines the importance of the column.\n\t *\n\t * This property affects the popin behaviour.\n\t * Columns with higher importance will move into the popin area later then less important\n\t * columns.\n\t *\n\t * @default 0\n\t * @public\n\t */\n\t@property({ type: Number })\n\timportance = 0;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_popin = false;\n\n\tprotected ariaRole: string = \"columnheader\";\n\t_popinWidth: number = 0;\n\n\tonEnterDOM() {\n\t\tsuper.onEnterDOM();\n\t\tthis.style.minWidth = this.minWidth;\n\t\tthis.style.maxWidth = this.maxWidth;\n\t\tthis.style.width = this.width;\n\t}\n}\n\nTableHeaderCell.define();\n\nexport default TableHeaderCell;\n"]}
|
|
1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a,CAAC;QACd,GAAG,EAAE,uBAAuB;QAC5B,MAAM,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,qBAAqB,CAAC;QACrD,QAAQ,EAAE,uBAAuB;KACjC,CAAC;GACI,eAAe,CAwDpB;AAED,eAAe,CAAC,MAAM,EAAE,CAAC;AAEzB,eAAe,eAAe,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport TableCellBase from \"./TableCellBase.js\";\nimport TableHeaderCellTemplate from \"./generated/templates/TableHeaderCellTemplate.lit.js\";\nimport TableHeaderCellStyles from \"./generated/themes/TableHeaderCell.css.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table-header-cell` component represents a column in the `ui5-table`.\n *\n * As it is tightly coupled to the `ui5-table`, it should only be used in the `ui5-table-header-row`\n * to ensure correct layout and design.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/TableHeaderCell.js\";`\n *\n * @constructor\n * @extends TableCellBase\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-header-cell\",\n\tstyles: [TableCellBase.styles, TableHeaderCellStyles],\n\ttemplate: TableHeaderCellTemplate,\n})\nclass TableHeaderCell extends TableCellBase {\n\t/**\n\t * Defines the width of column.\n\t *\n\t * @default \"auto\"\n\t * @public\n\t */\n\t@property()\n\twidth = \"auto\";\n\n\t/**\n \t * Defines the minimum width of the column.\n\t *\n\t * If the table is in `Popin` mode, the column will move into the popin when\n\t * when the minimum width does not fit anymore.\n\t *\n\t * @default \"auto\"\n\t * @public\n\t */\n\t@property()\n\tminWidth = \"auto\";\n\n\t/**\n\t * Defines the maximum width of the column.\n\t *\n\t * @default \"auto\"\n\t * @public\n\t */\n\t@property()\n\tmaxWidth = \"auto\";\n\n\t/**\n\t * Defines the importance of the column.\n\t *\n\t * This property affects the popin behaviour.\n\t * Columns with higher importance will move into the popin area later then less important\n\t * columns.\n\t *\n\t * @default 0\n\t * @public\n\t */\n\t@property({ type: Number })\n\timportance = 0;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_popin = false;\n\n\tprotected ariaRole: string = \"columnheader\";\n\t_popinWidth: number = 0;\n\n\tonEnterDOM() {\n\t\tsuper.onEnterDOM();\n\t\tthis.style.minWidth = this.minWidth;\n\t\tthis.style.maxWidth = this.maxWidth;\n\t\tthis.style.width = this.width;\n\t}\n}\n\nTableHeaderCell.define();\n\nexport default TableHeaderCell;\n"]}
|
package/dist/TableHeaderRow.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import TableHeaderCell from "./TableHeaderCell.js";
|
|
|
16
16
|
*
|
|
17
17
|
* @constructor
|
|
18
18
|
* @extends TableRowBase
|
|
19
|
-
* @since 2.0
|
|
19
|
+
* @since 2.0.0
|
|
20
20
|
* @public
|
|
21
21
|
* @experimental This web component is available since 2.0 with an experimental flag and its API and behavior are subject to change.
|
|
22
22
|
*/
|
package/dist/TableHeaderRow.js
CHANGED
|
@@ -28,7 +28,7 @@ import { TABLE_SELECTION, TABLE_ROW_POPIN, } from "./generated/i18n/i18n-default
|
|
|
28
28
|
*
|
|
29
29
|
* @constructor
|
|
30
30
|
* @extends TableRowBase
|
|
31
|
-
* @since 2.0
|
|
31
|
+
* @since 2.0.0
|
|
32
32
|
* @public
|
|
33
33
|
* @experimental This web component is available since 2.0 with an experimental flag and its API and behavior are subject to change.
|
|
34
34
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeaderRow.js","sourceRoot":"","sources":["../src/TableHeaderRow.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAA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AAa,CAAC;QACd,GAAG,EAAE,sBAAsB;QAC3B,aAAa,EAAE,IAAI;QACnB,MAAM,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,oBAAoB,CAAC;QACnD,QAAQ,EAAE,sBAAsB;QAChC,YAAY,EAAE,CAAC,GAAG,YAAY,CAAC,YAAY,EAAE,eAAe,CAAC;KAC7D,CAAC;IAEF;;;;;OAKG;GACG,cAAc,CAyDnB;AAED,cAAc,CAAC,MAAM,EAAE,CAAC;AAExB,eAAe,cAAc,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport TableRowBase from \"./TableRowBase.js\";\nimport TableHeaderRowTemplate from \"./generated/templates/TableHeaderRowTemplate.lit.js\";\nimport TableHeaderRowStyles from \"./generated/themes/TableHeaderRow.css.js\";\nimport TableHeaderCell from \"./TableHeaderCell.js\";\nimport {\n\tTABLE_SELECTION,\n\tTABLE_ROW_POPIN,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table-header-row` component represents the table headers of a `ui5-table`.\n *\n * It is tightly coupled to the `ui5-table` and should therefore be used in the `ui5-table` only.\n * The header row is placed in the `headerRow` slot of the table.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/TableHeaderRow.js\";`\n *\n * @constructor\n * @extends TableRowBase\n * @since 2.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-header-row\",\n\tlanguageAware: true,\n\tstyles: [TableRowBase.styles, TableHeaderRowStyles],\n\ttemplate: TableHeaderRowTemplate,\n\tdependencies: [...TableRowBase.dependencies, TableHeaderCell],\n})\n\n/**\n * Example custom event.\n * Please keep in mind that all public events should be documented in the API Reference as shown below.\n *\n * @public\n */\nclass TableHeaderRow extends TableRowBase {\n\t/**\n\t * Defines the cells of the component.\n\t *\n\t * **Note:** Use `ui5-table-header-cell` 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: [\"width\", \"_popin\"],\n\t\t\tslots: false,\n\t\t},\n\t\tindividualSlots: true,\n\t})\n\tcells!: Array<TableHeaderCell>;\n\n\t/**\n\t * Sticks the `ui5-table-header-row` to the top of a table.\n\t *\n\t * Note: If used in combination with overflowMode \"Scroll\", the table needs a defined height\n\t * or needs to be inside of a container with a defined height for the sticky header to work as expected.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tsticky = false;\n\n\tonBeforeRendering() {\n\t\tsuper.onBeforeRendering();\n\t\tif (this._table) {\n\t\t\tthis.style.top = this._table.stickyTop;\n\t\t}\n\t}\n\n\tisHeaderRow(): boolean {\n\t\treturn true;\n\t}\n\n\tget _isSelectable() {\n\t\treturn this._isMultiSelect;\n\t}\n\n\tget _isSelected() {\n\t\treturn this._tableSelection?.areAllRowsSelected();\n\t}\n\n\tget _i18nSelection() {\n\t\treturn TableRowBase.i18nBundle.getText(TABLE_SELECTION);\n\t}\n\n\tget _i18nRowPopin() {\n\t\treturn TableRowBase.i18nBundle.getText(TABLE_ROW_POPIN);\n\t}\n}\n\nTableHeaderRow.define();\n\nexport default TableHeaderRow;\n"]}
|
|
1
|
+
{"version":3,"file":"TableHeaderRow.js","sourceRoot":"","sources":["../src/TableHeaderRow.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,sBAAsB,MAAM,qDAAqD,CAAC;AACzF,OAAO,oBAAoB,MAAM,0CAA0C,CAAC;AA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AAE,CAAC,YAAY,CAAC,MAAM,EAAE,oBAAoB,CAAC;QACnD,QAAQ,EAAE,sBAAsB;QAChC,YAAY,EAAE,CAAC,GAAG,YAAY,CAAC,YAAY,EAAE,eAAe,CAAC;KAC7D,CAAC;IAEF;;;;;OAKG;GACG,cAAc,CAyDnB;AAED,cAAc,CAAC,MAAM,EAAE,CAAC;AAExB,eAAe,cAAc,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport TableRowBase from \"./TableRowBase.js\";\nimport TableHeaderRowTemplate from \"./generated/templates/TableHeaderRowTemplate.lit.js\";\nimport TableHeaderRowStyles from \"./generated/themes/TableHeaderRow.css.js\";\nimport TableHeaderCell from \"./TableHeaderCell.js\";\nimport {\n\tTABLE_SELECTION,\n\tTABLE_ROW_POPIN,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table-header-row` component represents the table headers of a `ui5-table`.\n *\n * It is tightly coupled to the `ui5-table` and should therefore be used in the `ui5-table` only.\n * The header row is placed in the `headerRow` slot of the table.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/TableHeaderRow.js\";`\n *\n * @constructor\n * @extends TableRowBase\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-header-row\",\n\tlanguageAware: true,\n\tstyles: [TableRowBase.styles, TableHeaderRowStyles],\n\ttemplate: TableHeaderRowTemplate,\n\tdependencies: [...TableRowBase.dependencies, TableHeaderCell],\n})\n\n/**\n * Example custom event.\n * Please keep in mind that all public events should be documented in the API Reference as shown below.\n *\n * @public\n */\nclass TableHeaderRow extends TableRowBase {\n\t/**\n\t * Defines the cells of the component.\n\t *\n\t * **Note:** Use `ui5-table-header-cell` 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: [\"width\", \"_popin\"],\n\t\t\tslots: false,\n\t\t},\n\t\tindividualSlots: true,\n\t})\n\tcells!: Array<TableHeaderCell>;\n\n\t/**\n\t * Sticks the `ui5-table-header-row` to the top of a table.\n\t *\n\t * Note: If used in combination with overflowMode \"Scroll\", the table needs a defined height\n\t * or needs to be inside of a container with a defined height for the sticky header to work as expected.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tsticky = false;\n\n\tonBeforeRendering() {\n\t\tsuper.onBeforeRendering();\n\t\tif (this._table) {\n\t\t\tthis.style.top = this._table.stickyTop;\n\t\t}\n\t}\n\n\tisHeaderRow(): boolean {\n\t\treturn true;\n\t}\n\n\tget _isSelectable() {\n\t\treturn this._isMultiSelect;\n\t}\n\n\tget _isSelected() {\n\t\treturn this._tableSelection?.areAllRowsSelected();\n\t}\n\n\tget _i18nSelection() {\n\t\treturn TableRowBase.i18nBundle.getText(TABLE_SELECTION);\n\t}\n\n\tget _i18nRowPopin() {\n\t\treturn TableRowBase.i18nBundle.getText(TABLE_ROW_POPIN);\n\t}\n}\n\nTableHeaderRow.define();\n\nexport default TableHeaderRow;\n"]}
|
package/dist/TableRow.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import TableCell from "./TableCell.js";
|
|
|
13
13
|
*
|
|
14
14
|
* @constructor
|
|
15
15
|
* @extends TableRowBase
|
|
16
|
-
* @since 2.0
|
|
16
|
+
* @since 2.0.0
|
|
17
17
|
* @public
|
|
18
18
|
* @experimental This web component is available since 2.0 with an experimental flag and its API and behavior are subject to change.
|
|
19
19
|
*/
|
package/dist/TableRow.js
CHANGED
|
@@ -28,7 +28,7 @@ import RadioButton from "./RadioButton.js";
|
|
|
28
28
|
*
|
|
29
29
|
* @constructor
|
|
30
30
|
* @extends TableRowBase
|
|
31
|
-
* @since 2.0
|
|
31
|
+
* @since 2.0.0
|
|
32
32
|
* @public
|
|
33
33
|
* @experimental This web component is available since 2.0 with an experimental flag and its API and behavior are subject to change.
|
|
34
34
|
*/
|
package/dist/TableRow.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.js","sourceRoot":"","sources":["../src/TableRow.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AACrF,OAAO,gBAAgB,MAAM,+CAA+C,CAAC;AAC7E,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAC7D,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAE3C;;;;;;;;;;;;;;;;GAgBG;AAOH,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,YAAY;IAAnC;;QAmBC;;;;;WAKG;QAEH,WAAM,GAAG,EAAE,CAAC;QAEZ;;;;;WAKG;QAEH,gBAAW,GAAG,KAAK,CAAC;QAEpB;;;;;WAKG;QAEH,cAAS,GAAG,KAAK,CAAC;QAGlB,qBAAgB,GAAG,KAAK,CAAC;IAuD1B,CAAC;IArDA,MAAM,CAAC,KAAK,CAAC,QAAQ;QACpB,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC;QACvB,IAAI,QAAQ,EAAE,IAAI,KAAK,EAAE,EAAE;YAC1B,gHAAgH;YAChH,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,GAAG,EAAE,GAAE,CA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,eAAe,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAED,IAAI,cAAc;QACjB,OAAO,IAAI,CAAC,WAAW,CAAC;IACzB,CAAC;CACD,CAAA;AArFA;IATC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,IAAI;QACf,eAAe,EAAE,IAAI;QACrB,uBAAuB,EAAE;YACxB,UAAU,EAAE,CAAC,QAAQ,CAAC;YACtB,KAAK,EAAE,KAAK;SACZ;KACD,CAAC;uCACuB;AASzB;IADC,QAAQ,EAAE;wCACC;AASZ;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CACR;AASpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2CACV;AAGlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;kDACtB;AA/CpB,QAAQ;IANb,aAAa,CAAC;QACd,GAAG,EAAE,eAAe;QACpB,MAAM,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC;QAC1C,QAAQ,EAAE,gBAAgB;QAC1B,YAAY,EAAE,CAAC,GAAG,YAAY,CAAC,YAAY,EAAE,WAAW,EAAE,SAAS,CAAC;KACpE,CAAC;GACI,QAAQ,CAsGb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport { isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isIOS, isSafari } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\nimport TableRowTemplate from \"./generated/templates/TableRowTemplate.lit.js\";\nimport TableRowBase from \"./TableRowBase.js\";\nimport TableRowCss from \"./generated/themes/TableRow.css.js\";\nimport TableCell from \"./TableCell.js\";\nimport RadioButton from \"./RadioButton.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table-row` component represents a row in the `ui5-table`.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/TableRow.js\";`\n *\n * @constructor\n * @extends TableRowBase\n * @since 2.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-row\",\n\tstyles: [TableRowBase.styles, TableRowCss],\n\ttemplate: TableRowTemplate,\n\tdependencies: [...TableRowBase.dependencies, RadioButton, TableCell],\n})\nclass TableRow extends TableRowBase {\n\t/**\n\t * Defines the cells of the component.\n\t *\n\t * **Note:** Use `ui5-table-cell` 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\tindividualSlots: true,\n\t\tinvalidateOnChildChange: {\n\t\t\tproperties: [\"_popin\"],\n\t\t\tslots: false,\n\t\t},\n\t})\n\tcells!: Array<TableCell>;\n\n\t/**\n\t * Unique identifier of the row.\n\t *\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\trowKey = \"\";\n\n\t/**\n\t * Defines the interactive state of the row.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tinteractive = false;\n\n\t/**\n\t * Defines the navigated state of the row.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tnavigated = false;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_renderNavigated = false;\n\n\tstatic async onDefine() {\n\t\tawait super.onDefine();\n\t\tif (isSafari() && isIOS()) {\n\t\t\t// Safari on iOS does not use the :active state unless there is a touchstart event handler on the <body> element\n\t\t\tdocument.body.addEventListener(\"touchstart\", () => {});\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tsuper.onBeforeRendering();\n\t\tthis.toggleAttribute(\"_interactive\", this._isInteractive);\n\t\tif (this._renderNavigated && this.navigated) {\n\t\t\tthis.setAttribute(\"aria-current\", \"true\");\n\t\t} else {\n\t\t\tthis.removeAttribute(\"aria-current\");\n\t\t}\n\t}\n\n\tasync focus(focusOptions?: FocusOptions | undefined): Promise<void> {\n\t\tthis.setAttribute(\"tabindex\", \"-1\");\n\t\tHTMLElement.prototype.focus.call(this, focusOptions);\n\t\treturn Promise.resolve();\n\t}\n\n\t_onkeydown(e: KeyboardEvent, eventOrigin: HTMLElement) {\n\t\tsuper._onkeydown(e, eventOrigin);\n\t\tif (e.defaultPrevented) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (eventOrigin === this && this._isInteractive && isEnter(e)) {\n\t\t\tthis.toggleAttribute(\"_active\", true);\n\t\t\tthis._table?._onRowPress(this);\n\t\t}\n\t}\n\n\t_onclick() {\n\t\tif (this._isInteractive && this === getActiveElement()) {\n\t\t\tthis._table?._onRowPress(this);\n\t\t}\n\t}\n\n\t_onkeyup() {\n\t\tthis.removeAttribute(\"_active\");\n\t}\n\n\t_onfocusout() {\n\t\tthis.removeAttribute(\"_active\");\n\t}\n\n\tget _isInteractive() {\n\t\treturn this.interactive;\n\t}\n}\n\nTableRow.define();\n\nexport default TableRow;\n"]}
|
|
1
|
+
{"version":3,"file":"TableRow.js","sourceRoot":"","sources":["../src/TableRow.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AACrF,OAAO,gBAAgB,MAAM,+CAA+C,CAAC;AAC7E,OAAO,YAAY,MAAM,mBAAmB,CAAC;A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ACd,GAAG,EAAE,eAAe;QACpB,MAAM,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC;QAC1C,QAAQ,EAAE,gBAAgB;QAC1B,YAAY,EAAE,CAAC,GAAG,YAAY,CAAC,YAAY,EAAE,WAAW,EAAE,SAAS,CAAC;KACpE,CAAC;GACI,QAAQ,CAsGb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport { isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isIOS, isSafari } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\nimport TableRowTemplate from \"./generated/templates/TableRowTemplate.lit.js\";\nimport TableRowBase from \"./TableRowBase.js\";\nimport TableRowCss from \"./generated/themes/TableRow.css.js\";\nimport TableCell from \"./TableCell.js\";\nimport RadioButton from \"./RadioButton.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table-row` component represents a row in the `ui5-table`.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/TableRow.js\";`\n *\n * @constructor\n * @extends TableRowBase\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-row\",\n\tstyles: [TableRowBase.styles, TableRowCss],\n\ttemplate: TableRowTemplate,\n\tdependencies: [...TableRowBase.dependencies, RadioButton, TableCell],\n})\nclass TableRow extends TableRowBase {\n\t/**\n\t * Defines the cells of the component.\n\t *\n\t * **Note:** Use `ui5-table-cell` 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\tindividualSlots: true,\n\t\tinvalidateOnChildChange: {\n\t\t\tproperties: [\"_popin\"],\n\t\t\tslots: false,\n\t\t},\n\t})\n\tcells!: Array<TableCell>;\n\n\t/**\n\t * Unique identifier of the row.\n\t *\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\trowKey = \"\";\n\n\t/**\n\t * Defines the interactive state of the row.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tinteractive = false;\n\n\t/**\n\t * Defines the navigated state of the row.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tnavigated = false;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_renderNavigated = false;\n\n\tstatic async onDefine() {\n\t\tawait super.onDefine();\n\t\tif (isSafari() && isIOS()) {\n\t\t\t// Safari on iOS does not use the :active state unless there is a touchstart event handler on the <body> element\n\t\t\tdocument.body.addEventListener(\"touchstart\", () => {});\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tsuper.onBeforeRendering();\n\t\tthis.toggleAttribute(\"_interactive\", this._isInteractive);\n\t\tif (this._renderNavigated && this.navigated) {\n\t\t\tthis.setAttribute(\"aria-current\", \"true\");\n\t\t} else {\n\t\t\tthis.removeAttribute(\"aria-current\");\n\t\t}\n\t}\n\n\tasync focus(focusOptions?: FocusOptions | undefined): Promise<void> {\n\t\tthis.setAttribute(\"tabindex\", \"-1\");\n\t\tHTMLElement.prototype.focus.call(this, focusOptions);\n\t\treturn Promise.resolve();\n\t}\n\n\t_onkeydown(e: KeyboardEvent, eventOrigin: HTMLElement) {\n\t\tsuper._onkeydown(e, eventOrigin);\n\t\tif (e.defaultPrevented) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (eventOrigin === this && this._isInteractive && isEnter(e)) {\n\t\t\tthis.toggleAttribute(\"_active\", true);\n\t\t\tthis._table?._onRowPress(this);\n\t\t}\n\t}\n\n\t_onclick() {\n\t\tif (this._isInteractive && this === getActiveElement()) {\n\t\t\tthis._table?._onRowPress(this);\n\t\t}\n\t}\n\n\t_onkeyup() {\n\t\tthis.removeAttribute(\"_active\");\n\t}\n\n\t_onfocusout() {\n\t\tthis.removeAttribute(\"_active\");\n\t}\n\n\tget _isInteractive() {\n\t\treturn this.interactive;\n\t}\n}\n\nTableRow.define();\n\nexport default TableRow;\n"]}
|
package/dist/TableRowBase.d.ts
CHANGED
package/dist/TableRowBase.js
CHANGED
|
@@ -21,7 +21,7 @@ import { TABLE_ROW_SELECTOR, } from "./generated/i18n/i18n-defaults.js";
|
|
|
21
21
|
* @constructor
|
|
22
22
|
* @abstract
|
|
23
23
|
* @extends UI5Element
|
|
24
|
-
* @since 2.0
|
|
24
|
+
* @since 2.0.0
|
|
25
25
|
* @public
|
|
26
26
|
*/
|
|
27
27
|
let TableRowBase = TableRowBase_1 = class TableRowBase extends UI5Element {
|
package/dist/TableRowBase.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRowBase.js","sourceRoot":"","sources":["../src/TableRowBase.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAE7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAErE,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EACN,kBAAkB,GAClB,MAAM,mCAAmC,CAAC;AAE3C;;;;;;;;GAQG;AAMH,IAAe,YAAY,oBAA3B,MAAe,YAAa,SAAQ,UAAU;IAA9C;;QAIC,gBAAW,GAAG,CAAC,CAAC;IA2FjB,CAAC;IAxFA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kBAAkB,CAAC,CAAC;IAC5D,CAAC;CACD,CAAA;AA3FA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;iDAC9B;AAJF,YAAY;IAL1B,aAAa,CAAC;QACd,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,eAAe;QACvB,YAAY,EAAE,CAAC,QAAQ,CAAC;KACxB,CAAC;GACa,YAAY,CA+F1B;AAED,eAAe,YAAY,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport { isEnter, isSpace } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type TableCellBase from \"./TableCellBase.js\";\nimport TableRowBaseCss from \"./generated/themes/TableRowBase.css.js\";\nimport type Table from \"./Table.js\";\nimport CheckBox from \"./CheckBox.js\";\nimport { isInstanceOfTable } from \"./TableUtils.js\";\nimport {\n\tTABLE_ROW_SELECTOR,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * @class\n * A class to serve as a foundation for the `TableRow` and `TableHeaderRow` classes.\n * @constructor\n * @abstract\n * @extends UI5Element\n * @since 2.0\n * @public\n */\n@customElement({\n\trenderer: litRender,\n\tstyles: TableRowBaseCss,\n\tdependencies: [CheckBox],\n})\nabstract class TableRowBase extends UI5Element {\n\tcells!: Array<TableCellBase>;\n\n\t@property({ type: Number, noAttribute: true })\n\t_invalidate = 0;\n\n\tstatic i18nBundle: I18nBundle;\n\tstatic async onDefine() {\n\t\tTableRowBase.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n\n\tonEnterDOM() {\n\t\tthis.setAttribute(\"role\", \"row\");\n\t\tthis.toggleAttribute(\"ui5-table-row-base\", true);\n\t}\n\n\tonBeforeRendering() {\n\t\tif (this._isSelectable) {\n\t\t\tthis.setAttribute(\"aria-selected\", `${this._isSelected}`);\n\t\t} else {\n\t\t\tthis.removeAttribute(\"aria-selected\");\n\t\t}\n\t}\n\n\tgetFocusDomRef() {\n\t\treturn this;\n\t}\n\n\t_informSelectionChange() {\n\t\tthis._tableSelection?.informSelectionChange(this);\n\t}\n\n\tisHeaderRow(): boolean {\n\t\treturn false;\n\t}\n\n\t_onkeydown(e: KeyboardEvent, eventOrigin: HTMLElement) {\n\t\tif ((eventOrigin === this && this._isSelectable && isSpace(e)) || (eventOrigin === this._selectionCell && (isSpace(e) || isEnter(e)))) {\n\t\t\tthis._informSelectionChange();\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\tget _table(): Table | undefined {\n\t\tconst element = this.parentElement;\n\t\treturn isInstanceOfTable(element) ? element : undefined;\n\t}\n\n\tget _tableId() {\n\t\treturn this._table?._id;\n\t}\n\n\tget _tableSelection() {\n\t\treturn this._table?._getSelection();\n\t}\n\n\tget _isSelected() {\n\t\treturn this._tableSelection?.isSelected(this);\n\t}\n\n\tget _isSelectable() {\n\t\treturn this._tableSelection?.isSelectable();\n\t}\n\n\tget _isMultiSelect() {\n\t\treturn this._tableSelection?.isMultiSelect();\n\t}\n\n\tget _hasRowSelector() {\n\t\treturn this._tableSelection?.hasRowSelector();\n\t}\n\n\tget _selectionCell() {\n\t\treturn this.shadowRoot!.getElementById(\"selection-cell\");\n\t}\n\n\tget _visibleCells() {\n\t\treturn this.cells.filter(c => !c._popin);\n\t}\n\n\tget _popinCells() {\n\t\treturn this.cells.filter(c => c._popin);\n\t}\n\n\tget _stickyCells() {\n\t\tconst selectionCell = this.shadowRoot?.querySelector(\"#selection-cell\"),\n\t\t\tnavigatedCell = this.shadowRoot?.querySelector(\"#navigated-cell\");\n\n\t\t// filter out null/undefined\n\t\treturn [selectionCell, ...this.cells, navigatedCell].filter(cell => cell?.hasAttribute(\"fixed\"));\n\t}\n\n\tget _i18nRowSelector(): string {\n\t\treturn TableRowBase.i18nBundle.getText(TABLE_ROW_SELECTOR);\n\t}\n}\n\nexport default TableRowBase;\n"]}
|
|
1
|
+
{"version":3,"file":"TableRowBase.js","sourceRoot":"","sources":["../src/TableRowBase.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAE7E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAErE,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EACN,kBAAkB,GAClB,MAAM,mCAAmC,CAAC;AAE3C;;;;;;;;GAQG;AAMH,IAAe,YAAY,oBAA3B,MAAe,YAAa,SAAQ,UAAU;IAA9C;;QAIC,gBAAW,GAAG,CAAC,CAAC;IA2FjB,CAAC;IAxFA,MAAM,CAAC,KAAK,CAAC,QAAQ;QACpB,cAAY,CAAC,UAAU,GAAG,MAAM,aAAa,CAAC,oBAAoB,CAAC,CAAC;IACrE,CAAC;IAED,UAAU;QACT,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACjC,IAAI,CAAC,eAAe,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC;IAED,iBAAiB;QAChB,IAAI,IAAI,CAAC,aAAa,EAAE;YACvB,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,CA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@ui5/webcomponents-base/dist/Keys.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type TableCellBase from \"./TableCellBase.js\";\nimport TableRowBaseCss from \"./generated/themes/TableRowBase.css.js\";\nimport type Table from \"./Table.js\";\nimport CheckBox from \"./CheckBox.js\";\nimport { isInstanceOfTable } from \"./TableUtils.js\";\nimport {\n\tTABLE_ROW_SELECTOR,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * @class\n * A class to serve as a foundation for the `TableRow` and `TableHeaderRow` classes.\n * @constructor\n * @abstract\n * @extends UI5Element\n * @since 2.0.0\n * @public\n */\n@customElement({\n\trenderer: litRender,\n\tstyles: TableRowBaseCss,\n\tdependencies: [CheckBox],\n})\nabstract class TableRowBase extends UI5Element {\n\tcells!: Array<TableCellBase>;\n\n\t@property({ type: Number, noAttribute: true })\n\t_invalidate = 0;\n\n\tstatic i18nBundle: I18nBundle;\n\tstatic async onDefine() {\n\t\tTableRowBase.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n\n\tonEnterDOM() {\n\t\tthis.setAttribute(\"role\", \"row\");\n\t\tthis.toggleAttribute(\"ui5-table-row-base\", true);\n\t}\n\n\tonBeforeRendering() {\n\t\tif (this._isSelectable) {\n\t\t\tthis.setAttribute(\"aria-selected\", `${this._isSelected}`);\n\t\t} else {\n\t\t\tthis.removeAttribute(\"aria-selected\");\n\t\t}\n\t}\n\n\tgetFocusDomRef() {\n\t\treturn this;\n\t}\n\n\t_informSelectionChange() {\n\t\tthis._tableSelection?.informSelectionChange(this);\n\t}\n\n\tisHeaderRow(): boolean {\n\t\treturn false;\n\t}\n\n\t_onkeydown(e: KeyboardEvent, eventOrigin: HTMLElement) {\n\t\tif ((eventOrigin === this && this._isSelectable && isSpace(e)) || (eventOrigin === this._selectionCell && (isSpace(e) || isEnter(e)))) {\n\t\t\tthis._informSelectionChange();\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\tget _table(): Table | undefined {\n\t\tconst element = this.parentElement;\n\t\treturn isInstanceOfTable(element) ? element : undefined;\n\t}\n\n\tget _tableId() {\n\t\treturn this._table?._id;\n\t}\n\n\tget _tableSelection() {\n\t\treturn this._table?._getSelection();\n\t}\n\n\tget _isSelected() {\n\t\treturn this._tableSelection?.isSelected(this);\n\t}\n\n\tget _isSelectable() {\n\t\treturn this._tableSelection?.isSelectable();\n\t}\n\n\tget _isMultiSelect() {\n\t\treturn this._tableSelection?.isMultiSelect();\n\t}\n\n\tget _hasRowSelector() {\n\t\treturn this._tableSelection?.hasRowSelector();\n\t}\n\n\tget _selectionCell() {\n\t\treturn this.shadowRoot!.getElementById(\"selection-cell\");\n\t}\n\n\tget _visibleCells() {\n\t\treturn this.cells.filter(c => !c._popin);\n\t}\n\n\tget _popinCells() {\n\t\treturn this.cells.filter(c => c._popin);\n\t}\n\n\tget _stickyCells() {\n\t\tconst selectionCell = this.shadowRoot?.querySelector(\"#selection-cell\"),\n\t\t\tnavigatedCell = this.shadowRoot?.querySelector(\"#navigated-cell\");\n\n\t\t// filter out null/undefined\n\t\treturn [selectionCell, ...this.cells, navigatedCell].filter(cell => cell?.hasAttribute(\"fixed\"));\n\t}\n\n\tget _i18nRowSelector(): string {\n\t\treturn TableRowBase.i18nBundle.getText(TABLE_ROW_SELECTOR);\n\t}\n}\n\nexport default TableRowBase;\n"]}
|
package/dist/TableSelection.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ import type TableRowBase from "./TableRowBase.js";
|
|
|
36
36
|
*
|
|
37
37
|
* @constructor
|
|
38
38
|
* @extends UI5Element
|
|
39
|
-
* @since 2.0
|
|
39
|
+
* @since 2.0.0
|
|
40
40
|
* @public
|
|
41
41
|
* @experimental This web component is available since 2.0 with an experimental flag and its API and behavior are subject to change.
|
|
42
42
|
*/
|
package/dist/TableSelection.js
CHANGED
|
@@ -44,7 +44,7 @@ import { isSelectionCheckbox, isHeaderSelector, findRowInPath } from "./TableUti
|
|
|
44
44
|
*
|
|
45
45
|
* @constructor
|
|
46
46
|
* @extends UI5Element
|
|
47
|
-
* @since 2.0
|
|
47
|
+
* @since 2.0.0
|
|
48
48
|
* @public
|
|
49
49
|
* @experimental This web component is available since 2.0 with an experimental flag and its API and behavior are subject to change.
|
|
50
50
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableSelection.js","sourceRoot":"","sources":["../src/TableSelection.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACN,SAAS,EACT,OAAO,GACP,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;IA2SxC,CAAC;IAvSA,eAAe,CAAC,KAAY;QAC3B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IAChC,CAAC;IAED,SAAS;QACR,I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AE;oBACxB,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACrC;gBAED,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,eAAgB,CAAC,QAAQ,CAAC,CAAC;gBAErD,OAAO,OAAO,IAAI,uBAAuB,CAAC;YAC3C,CAAC,EAAE,gBAAgB,CAAC,IAAI,KAAK,CAAC;SAC9B;QAED,gBAAgB,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC/C,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;YACR,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SAC5B;QAED,IAAI,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5C,IAAI,CAAC,eAAe,CAAC,IAAI,GAAG,IAAI,CAAC;SACjC;IACF,CAAC;CACD,CAAA;AAtTA;IADC,QAAQ,EAAE;4CACgC;AAS3C;IADC,QAAQ,EAAE;gDACG;AAjBT,cAAc;IATnB,aAAa,CAAC,EAAE,GAAG,EAAE,qBAAqB,EAAE,CAAC;IAE9C;;;;OAIG;;IACF,KAAK,CAAC,QAAQ,CAAC;GAEV,cAAc,CA8TnB;AAED,cAAc,CAAC,MAAM,EAAE,CAAC;AAExB,eAAe,cAAc,CAAC","sourcesContent":["import {\n\tisUpShift,\n\tisShift,\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\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 || !isShift(e)) {\n\t\t\t// Stop range selection if a) Shift is relased or b) the event target is not a row or c) the event is not from the selection checkbox\n\t\t\tif (isSelectionCheckbox(e)) {\n\t\t\t\tthis._stopRangeSelection();\n\t\t\t}\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,EACT,OAAO,GACP,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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AtTA;IADC,QAAQ,EAAE;4CACgC;AAS3C;IADC,QAAQ,EAAE;gDACG;AAjBT,cAAc;IATnB,aAAa,CAAC,EAAE,GAAG,EAAE,qBAAqB,EAAE,CAAC;IAE9C;;;;OAIG;;IACF,KAAK,CAAC,QAAQ,CAAC;GAEV,cAAc,CA8TnB;AAED,cAAc,CAAC,MAAM,EAAE,CAAC;AAExB,eAAe,cAAc,CAAC","sourcesContent":["import {\n\tisUpShift,\n\tisShift,\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 || !isShift(e)) {\n\t\t\t// Stop range selection if a) Shift is relased or b) the event target is not a row or c) the event is not from the selection checkbox\n\t\t\tif (isSelectionCheckbox(e)) {\n\t\t\t\tthis._stopRangeSelection();\n\t\t\t}\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"]}
|
package/dist/TimePicker.d.ts
CHANGED
package/dist/TimePicker.js
CHANGED
package/dist/TimePicker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimePicker.js","sourceRoot":"","sources":["../src/TimePicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,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,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAE7E,OAAO,EAAE,UAAU,EAAE,MAAM,mEAAmE,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,SAAS,MAAM,kDAAkD,CAAC;AACzE,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AACjG,OAAO,qEAAqE,CAAC,CAAC,gCAAgC;AAC9G,OAAO,UAAU,MAAM,oDAAoD,CAAC;AAC5E,OAAO,2BAA2B,MAAM,qEAAqE,CAAC;AAC9G,OAAO,EAAE,SAAS,EAAE,MAAM,6DAA6D,CAAC;AACxF,OAAO,EACN,MAAM,EACN,OAAO,EACP,QAAQ,EACR,UAAU,EACV,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,aAAa,EACb,QAAQ,EACR,YAAY,GACZ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,qDAAqD,CAAC;AAC7D,OAAO,OAAO,MAAM,uDAAuD,CAAC;AAC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6B,OAAO,EAAE;QAC3C,MAAM,EAAE;YACP;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,MAAM;aACZ;YACD;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,OAAO;aACb;SACD;KACD,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,MAAM,CAAC;IACd;;;;OAIG;;IACF,KAAK,CAAC,OAAO,CAAC;GACT,UAAU,CAwhBf;AAED,UAAU,CAAC,MAAM,EAAE,CAAC;AAEpB,eAAe,UAAU,CAAC","sourcesContent":["import { isPhone } from \"@ui5/webcomponents-base/dist/Device.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 slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport { submitForm } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport \"@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js\"; // default calendar for bundling\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport getCachedLocaleDataInstance from \"@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js\";\nimport { fetchCldr } from \"@ui5/webcomponents-base/dist/asset-registries/LocaleData.js\";\nimport {\n\tisShow,\n\tisEnter,\n\tisPageUp,\n\tisPageDown,\n\tisPageUpShift,\n\tisPageDownShift,\n\tisPageUpShiftCtrl,\n\tisPageDownShiftCtrl,\n\tisTabNext,\n\tisTabPrevious,\n\tisF6Next,\n\tisF6Previous,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport \"@ui5/webcomponents-icons/dist/time-entry-request.js\";\nimport UI5Date from \"@ui5/webcomponents-localization/dist/dates/UI5Date.js\";\nimport Icon from \"./Icon.js\";\nimport Popover from \"./Popover.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport TimePickerTemplate from \"./generated/templates/TimePickerTemplate.lit.js\";\nimport Input from \"./Input.js\";\nimport Button from \"./Button.js\";\nimport TimeSelectionClocks from \"./TimeSelectionClocks.js\";\nimport TimeSelectionInputs from \"./TimeSelectionInputs.js\";\nimport type { TimeSelectionChangeEventDetail } from \"./TimePickerInternals.js\";\n\nimport {\n\tTIMEPICKER_SUBMIT_BUTTON,\n\tTIMEPICKER_CANCEL_BUTTON,\n\tTIMEPICKER_INPUT_DESCRIPTION,\n\tTIMEPICKER_POPOVER_ACCESSIBLE_NAME,\n\tFORM_TEXTFIELD_REQUIRED,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport TimePickerCss from \"./generated/themes/TimePicker.css.js\";\nimport TimePickerPopoverCss from \"./generated/themes/TimePickerPopover.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\n\ntype TimePickerChangeInputEventDetail = {\n\tvalue: string,\n\tvalid: boolean,\n}\n\ntype TimePickerChangeEventDetail = TimePickerChangeInputEventDetail;\ntype TimePickerInputEventDetail = TimePickerChangeInputEventDetail;\n\n/**\n * @class\n *\n * ### Overview\n * The `ui5-time-picker` component provides an input field with assigned clocks which are opened on user action.\n * The `ui5-time-picker` allows users to select a localized time using touch, mouse, or keyboard input.\n * It consists of two parts: the time input field and the clocks.\n *\n * ### Usage\n * The user can enter a time by:\n *\n * - Using the clocks that are displayed in a popup\n * - Typing it in directly in the input field\n *\n * When the user makes an entry and chooses the enter key, the clocks show the corresponding time (hours, minutes and seconds separately).\n * When the user directly triggers the clocks display, the actual time is displayed.\n * For the `ui5-time-picker`\n *\n * ### Formatting\n *\n * If a time is entered by typing it into\n * the input field, it must fit to the used time format.\n *\n * Supported format options are pattern-based on Unicode LDML Date Format notation.\n * For more information, see [UTS #35: Unicode Locale Data Markup Language](http://unicode.org/reports/tr35/#Date_Field_Symbol_Table).\n *\n * For example, if the `format-pattern` is \"HH:mm:ss\",\n * a valid value string is \"11:42:35\" and the same is displayed in the input.\n *\n * ### Keyboard handling\n * [F4], [Alt]+[Up], [Alt]+[Down] Open/Close picker dialog and move focus to it.\n *\n * When closed:\n *\n * - [Page Up] - Increments hours by 1. If 12 am is reached, increment hours to 1 pm and vice versa.\n * - [Page Down] - Decrements the corresponding field by 1. If 1 pm is reached, decrement hours to 12 am and vice versa.\n * - [Shift]+[Page Up] - Increments minutes by 1.\n * - [Shift]+[Page Down] - Decrements minutes by 1.\n * - [Shift]+[Ctrl]+[Page Up] - Increments seconds by 1.\n * - [Shift]+[Ctrl]+[Page Down] - Decrements seconds by 1.\n * -\n *\n * When opened:\n *\n * - [Page Up] - Increments hours by 1. If 12 am is reached, increment hours to 1 pm and vice versa.\n * - [Page Down] - Decrements the corresponding field by 1. If 1 pm is reached, decrement hours to 12 am and vice versa.\n * - [Shift]+[Page Up] - Increments minutes by 1.\n * - [Shift]+[Page Down] - Decrements minutes by 1.\n * - [Shift]+[Ctrl]+[Page Up] - Increments seconds by 1.\n * - [Shift]+[Ctrl]+[Page Down] - Decrements seconds by 1.\n * - [A] or [P] - Selects AM or PM respectively.\n * - [0]-[9] - Allows direct time selecting (hours/minutes/seconds).\n * - [:] - Allows switching between hours/minutes/seconds clocks. If the last clock is displayed and [:] is pressed, the first clock is beind displayed.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/TimePicker.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.0.0-rc.6\n */\n@customElement({\n\ttag: \"ui5-time-picker\",\n\tlanguageAware: true,\n\tformAssociated: true,\n\trenderer: litRender,\n\ttemplate: TimePickerTemplate,\n\tstyles: [\n\t\tTimePickerCss,\n\t\tResponsivePopoverCommonCss,\n\t\tTimePickerPopoverCss,\n\t],\n\tdependencies: [\n\t\tIcon,\n\t\tPopover,\n\t\tResponsivePopover,\n\t\tTimeSelectionClocks,\n\t\tTimeSelectionInputs,\n\t\tInput,\n\t\tButton,\n\t],\n})\n/**\n * Fired when the input operation has finished by clicking the \"OK\" button or\n * when the text in the input field has changed and the focus leaves the input field.\n * @public\n * @param {string} value The submitted value.\n * @param {boolean} valid Indicator if the value is in correct format pattern and in valid range.\n */\n@event<TimePickerChangeEventDetail>(\"change\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t},\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalid: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n})\n\n/**\n * Fired when the value of the `ui5-time-picker` is changed at each key stroke.\n * @public\n * @param {string} value The current value.\n * @param {boolean} valid Indicator if the value is in correct format pattern and in valid range.\n */\n@event<TimePickerInputEventDetail>(\"input\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t},\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalid: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n})\n/**\n * Fired after the value-help dialog of the component is opened.\n * @since 2.0.0\n * @public\n */\n@event(\"open\")\n/**\n * Fired after the value-help dialog of the component is closed.\n * @since 2.0.0\n * @public\n */\n@event(\"close\")\nclass TimePicker extends UI5Element implements IFormInputElement {\n\t/**\n\t * Defines a formatted time value.\n\t * @default \"\"\n\t * @formEvents change input\n\t * @formProperty\n\t * @public\n\t */\n\t@property()\n\tvalue = \"\";\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines the value state of the component.\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property()\n\tvalueState: `${ValueState}` = \"None\";\n\n\t/**\n\t * Defines the disabled state of the comonent.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines the readonly state of the comonent.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly = false;\n\n\t/**\n\t * Defines a short hint, intended to aid the user with data entry when the\n\t * component has no value.\n\t *\n\t * **Note:** When no placeholder is set, the format pattern is displayed as a placeholder.\n\t * Passing an empty string as the value of this property will make the component appear empty - without placeholder or format pattern.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tplaceholder?: string;\n\n\t/**\n\t * Determines the format, displayed in the input field.\n\t *\n\t * Example:\n\t * HH:mm:ss -> 11:42:35\n\t * hh:mm:ss a -> 2:23:15 PM\n\t * mm:ss -> 12:04 (only minutes and seconds)\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tformatPattern?: string;\n\n\t/**\n\t * Defines the open or closed state of the popover.\n\t * @public\n\t * @default false\n\t * @since 2.0\n\t */\n\t@property({ type: Boolean })\n\topen = false;\n\n\t/**\n\t * Defines whether the component is required.\n\t * @since 2.1.0\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\trequired = false;\n\n\t/**\n\t * Defines the aria-label attribute for the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.1.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id (or many ids) of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.1.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_isInputsPopoverOpen = false;\n\n\t/**\n\t * Defines the value state message that will be displayed as pop up under the `ui5-time-picker`.\n\t *\n\t * **Note:** If not specified, a default text (in the respective language) will be displayed.\n\t *\n\t * **Note:** The `valueStateMessage` would be displayed,\n\t * when the `ui5-time-picker` is in `Information`, `Critical` or `Negative` value state.\n\t * @since 1.0.0-rc.8\n\t * @public\n\t */\n\t@slot()\n\tvalueStateMessage!: Array<HTMLElement>;\n\n\ttempValue?: string;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tstatic async onDefine() {\n\t\t[TimePicker.i18nBundle] = await Promise.all([\n\t\t\tgetI18nBundle(\"@ui5/webcomponents\"),\n\t\t\tfetchCldr(getLocale().getLanguage(), getLocale().getRegion(), getLocale().getScript()),\n\t\t]);\n\t}\n\tget formValidityMessage() {\n\t\treturn TimePicker.i18nBundle.getText(FORM_TEXTFIELD_REQUIRED);\n\t}\n\n\tget formValidity(): ValidityStateFlags {\n\t\treturn { valueMissing: this.required && !this.value };\n\t}\n\n\tasync formElementAnchor() {\n\t\treturn (await this.getFocusDomRefAsync() as UI5Element)?.getFocusDomRefAsync();\n\t}\n\n\tget formFormattedValue(): FormData | string | null {\n\t\treturn this.value || \"\";\n\t}\n\n\tonBeforeRendering() {\n\t\tif (this.value) {\n\t\t\tthis.value = this.normalizeValue(this.value) || this.value;\n\t\t}\n\n\t\tthis.tempValue = this.value && this.isValid(this.value) ? this.value : this.getFormat().format(UI5Date.getInstance());\n\t}\n\n\tget dateAriaDescription() {\n\t\treturn TimePicker.i18nBundle.getText(TIMEPICKER_INPUT_DESCRIPTION);\n\t}\n\n\tget pickerAccessibleName() {\n\t\treturn TimePicker.i18nBundle.getText(TIMEPICKER_POPOVER_ACCESSIBLE_NAME);\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\t\"ariaRoledescription\": this.dateAriaDescription,\n\t\t\t\"ariaHasPopup\": \"dialog\",\n\t\t\t\"ariaRequired\": this.required,\n\t\t\t\"ariaLabel\": getEffectiveAriaLabelText(this),\n\t\t};\n\t}\n\n\t/**\n\t * Currently selected time represented as JavaScript Date instance\n\t * @public\n\t * @default null\n\t */\n\tget dateValue(): Date | null {\n\t\treturn this.getFormat().parse(this._effectiveValue) as Date;\n\t}\n\n\t/**\n\t * @protected\n\t */\n\tget _placeholder() {\n\t\treturn this.placeholder !== undefined ? this.placeholder : this._displayFormat;\n\t}\n\n\t/**\n\t * @protected\n\t */\n\tget _formatPattern() {\n\t\tconst hasHours = !!this.formatPattern?.match(/H/i);\n\t\tconst fallback = !this.formatPattern || !hasHours;\n\n\t\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\t\treturn fallback ? localeData.getTimePattern(\"medium\") : this.formatPattern;\n\t}\n\n\tget _displayFormat() {\n\t\t// @ts-ignore oFormatOptions is a private API of DateFormat\n\t\treturn this.getFormat().oFormatOptions.pattern as string;\n\t}\n\n\tget _effectiveValue() {\n\t\treturn this.value;\n\t}\n\n\tget _timeSelectionValue() {\n\t\treturn this.tempValue;\n\t}\n\n\tget _isPhone() {\n\t\treturn isPhone();\n\t}\n\n\tonTimeSelectionChange(e: CustomEvent<TimeSelectionChangeEventDetail>) {\n\t\tthis.tempValue = e.detail.value; // every time the user changes the time selection -> update tempValue\n\t}\n\n\t_togglePicker() {\n\t\tthis.open = !this.open;\n\t}\n\n\tsubmitPickers() {\n\t\tthis._updateValueAndFireEvents(this.tempValue!, true, [\"change\", \"value-changed\"]);\n\t\tthis._togglePicker();\n\t}\n\n\tonResponsivePopoverAfterClose() {\n\t\tthis.open = false;\n\t\tthis.fireEvent(\"close\");\n\t}\n\n\tonResponsivePopoverAfterOpen() {\n\t\tthis.fireEvent(\"open\");\n\t}\n\n\t/**\n\t * Opens the Inputs popover.\n\t * @private\n\t * @returns Resolves when the Inputs popover is open\n\t */\n\topenInputsPopover() {\n\t\tthis.tempValue = this.value && this.isValid(this.value) ? this.value : this.getFormat().format(UI5Date.getInstance());\n\t\tconst popover = this._getInputsPopover();\n\t\tpopover.opener = this;\n\t\tpopover.open = true;\n\t\tthis._isInputsPopoverOpen = true;\n\t}\n\n\t/**\n\t * Closes the Inputs popover\n\t * @private\n\t * @returns Resolves when the Inputs popover is closed\n\t */\n\tcloseInputsPopover() {\n\t\tconst popover = this._getInputsPopover();\n\t\tpopover.open = false;\n\t}\n\n\ttoggleInputsPopover() {\n\t\tif (this.isInputsPopoverOpen()) {\n\t\t\tthis.closeInputsPopover();\n\t\t} else if (this._canOpenInputsPopover()) {\n\t\t\tthis.openInputsPopover();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the inputs popover is open\n\t * @private\n\t */\n\tisInputsPopoverOpen(): boolean {\n\t\treturn !!this._isInputsPopoverOpen;\n\t}\n\n\tsubmitInputsPopover() {\n\t\tthis._updateValueAndFireEvents(this.tempValue!, true, [\"change\", \"value-changed\"]);\n\t\tthis.closeInputsPopover();\n\t}\n\n\tonInputsPopoverAfterOpen() {\n\t\tconst popover = this._getInputsPopover();\n\t\tpopover.querySelector<TimeSelectionInputs>(\"[ui5-time-selection-inputs]\")!._addNumericAttributes();\n\t}\n\n\tonInputsPopoverAfterClose() {\n\t\tthis._isInputsPopoverOpen = false;\n\t}\n\n\t_handleInputClick(e: MouseEvent) {\n\t\tconst target = e.target as HTMLElement;\n\t\tif (this.open) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._isPhone && target && !target.hasAttribute(\"ui5-icon\")) {\n\t\t\tthis.toggleInputsPopover();\n\t\t}\n\n\t\tconst inputField = this._getInputField();\n\n\t\tif (inputField) {\n\t\t\t(inputField as HTMLInputElement).select();\n\t\t}\n\t}\n\n\t_updateValueAndFireEvents(value: string, normalizeValue: boolean, eventsNames: Array<string>) {\n\t\tif (value === this.value) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst valid = this.isValid(value);\n\n\t\tif (value !== undefined && valid && normalizeValue) { // if value === undefined, valid is guaranteed to be falsy\n\t\t\tvalue = this.normalizeValue(value); // transform valid values (in any format) to the correct format\n\t\t}\n\t\tif (!eventsNames.includes(\"input\")) {\n\t\t\tthis.value = \"\"; // Do not remove! DurationPicker (an external component extending TimePicker) use case -> value is 05:10, user tries 05:12, after normalization value is changed back to 05:10 so no invalidation happens, but the input still shows 05:12. Thus we enforce invalidation with the \"\"\n\t\t\tthis.value = value;\n\t\t}\n\t\tthis.tempValue = value; // if the picker is open, sync it\n\t\tthis._updateValueState(); // Change the value state to Error/None, but only if needed\n\t\teventsNames.forEach(eventName => {\n\t\t\tthis.fireEvent<TimePickerChangeInputEventDetail>(eventName, { value, valid });\n\t\t});\n\t}\n\n\t_updateValueState() {\n\t\tconst isValid = this.isValid(this.value);\n\t\tif (!isValid) { // If not valid - always set Error regardless of the current value state\n\t\t\tthis.valueState = ValueState.Negative;\n\t\t} else if (isValid && this.valueState === ValueState.Negative) { // However if valid, change only Error (but not the others) to None\n\t\t\tthis.valueState = ValueState.None;\n\t\t}\n\t}\n\n\t_handleInputChange(e: CustomEvent) {\n\t\tconst target = e.target as Input;\n\t\tthis._updateValueAndFireEvents(target.value, true, [\"change\", \"value-changed\"]);\n\t}\n\n\t_handleInputLiveChange(e: CustomEvent) {\n\t\tconst target = e.target as Input;\n\t\tthis._updateValueAndFireEvents(target.value, false, [\"input\"]);\n\t}\n\n\t_canOpenPicker() {\n\t\treturn !this.disabled && !this.readonly;\n\t}\n\n\t_canOpenInputsPopover() {\n\t\treturn !this.disabled && this._isPhone;\n\t}\n\n\t_getPopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\t_getInputsPopover() {\n\t\treturn this.shadowRoot!.querySelector<Popover>(\"[ui5-popover]\")!;\n\t}\n\n\t_getInput(): Input {\n\t\treturn this.shadowRoot!.querySelector<Input>(\"[ui5-input]\")!;\n\t}\n\n\t_getInputField() {\n\t\tconst input = this._getInput();\n\t\treturn input && input.getInputDOMRef();\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (this._isPhone && !this.isInputsPopoverOpen()) {\n\t\t\te.preventDefault();\n\t\t}\n\t\tif (isShow(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._togglePicker();\n\t\t}\n\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (target && this.open && this._getInput().id === target.id && (isTabNext(e) || isTabPrevious(e) || isF6Next(e) || isF6Previous(e))) {\n\t\t\tthis._togglePicker();\n\t\t}\n\t\tif (this.open) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tif (this._internals?.form) {\n\t\t\t\tsubmitForm(this);\n\t\t\t}\n\t\t} else if (isPageUpShiftCtrl(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyValueBy(1, \"second\");\n\t\t} else if (isPageUpShift(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyValueBy(1, \"minute\");\n\t\t} else if (isPageUp(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyValueBy(1, \"hour\");\n\t\t} else if (isPageDownShiftCtrl(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyValueBy(-1, \"second\");\n\t\t} else if (isPageDownShift(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyValueBy(-1, \"minute\");\n\t\t} else if (isPageDown(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyValueBy(-1, \"hour\");\n\t\t}\n\t}\n\n\tget _isPattern() {\n\t\treturn this._formatPattern !== \"medium\" && this._formatPattern !== \"short\" && this._formatPattern !== \"long\";\n\t}\n\n\tgetFormat() {\n\t\tlet dateFormat;\n\n\t\tif (this._isPattern) {\n\t\t\tdateFormat = DateFormat.getDateInstance({\n\t\t\t\tpattern: this._formatPattern,\n\t\t\t});\n\t\t} else {\n\t\t\tdateFormat = DateFormat.getDateInstance({\n\t\t\t\tstyle: this._formatPattern,\n\t\t\t});\n\t\t}\n\n\t\treturn dateFormat;\n\t}\n\n\t/**\n\t * Formats a Java Script date object into a string representing a locale date and time\n\t * according to the `formatPattern` property of the TimePicker instance\n\t * @param date A Java Script date object to be formatted as string\n\t * @public\n\t * @returns formatted value\n\t */\n\tformatValue(date: Date): string {\n\t\treturn this.getFormat().format(date);\n\t}\n\n\t/**\n\t * Checks if a value is valid against the current `formatPattern` value.\n\t *\n\t * **Note:** an empty string is considered as valid value.\n\t * @param value The value to be tested against the current date format\n\t * @public\n\t */\n\tisValid(value: string | undefined): boolean {\n\t\tif (value === \"\") {\n\t\t\treturn true;\n\t\t}\n\t\treturn !!this.getFormat().parse(value as string);\n\t}\n\n\tnormalizeValue(value: string) {\n\t\tif (value === \"\") {\n\t\t\treturn value;\n\t\t}\n\t\treturn this.getFormat().format(this.getFormat().parse(value));\n\t}\n\n\t_modifyValueBy(amount: number, unit: string) {\n\t\tconst date = this.getFormat().parse(this._effectiveValue) as Date;\n\t\tif (!date) {\n\t\t\treturn;\n\t\t}\n\t\tif (unit === \"hour\") {\n\t\t\tdate.setHours(date.getHours() + amount);\n\t\t} else if (unit === \"minute\") {\n\t\t\tdate.setMinutes(date.getMinutes() + amount);\n\t\t} else if (unit === \"second\") {\n\t\t\tdate.setSeconds(date.getSeconds() + amount);\n\t\t}\n\n\t\tconst newValue = this.formatValue(date);\n\n\t\tthis._updateValueAndFireEvents(newValue, true, [\"change\", \"value-changed\"]);\n\t}\n\n\t/**\n\t * The listener for this event can't be passive as it calls preventDefault()\n\t * @param e Wheel Event\n\t * @private\n\t */\n\t_handleWheel(e: WheelEvent) {\n\t\te.preventDefault();\n\t}\n\n\t/**\n\t * Hides mobile device keyboard by temporary setting the input to readonly state.\n\t */\n\t_hideMobileKeyboard() {\n\t\tthis._getInput().readonly = true;\n\t\tsetTimeout(() => { this._getInput().readonly = false; }, 0);\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tif (this._isPhone) {\n\t\t\tthis._hideMobileKeyboard();\n\t\t\tif (this._isInputsPopoverOpen) {\n\t\t\t\tconst popover = this._getInputsPopover();\n\t\t\t\tpopover.applyFocus();\n\t\t\t}\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_oninput(e: CustomEvent) {\n\t\tif (this._isPhone) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\tget submitButtonLabel() {\n\t\treturn TimePicker.i18nBundle.getText(TIMEPICKER_SUBMIT_BUTTON);\n\t}\n\n\tget cancelButtonLabel() {\n\t\treturn TimePicker.i18nBundle.getText(TIMEPICKER_CANCEL_BUTTON);\n\t}\n\n\t/**\n\t * @protected\n\t */\n\tget openIconName() {\n\t\treturn \"time-entry-request\";\n\t}\n}\n\nTimePicker.define();\n\nexport default TimePicker;\nexport type {\n\tTimeSelectionChangeEventDetail,\n\tTimePickerChangeEventDetail,\n\tTimePickerInputEventDetail,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"TimePicker.js","sourceRoot":"","sources":["../src/TimePicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,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,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAE7E,OAAO,EAAE,UAAU,EAAE,MAAM,mEAAmE,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,SAAS,MAAM,kDAAkD,CAAC;AACzE,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AACjG,OAAO,qEAAqE,CAAC,CAAC,gCAAgC;AAC9G,OAAO,UAAU,MAAM,oDAAoD,CAAC;AAC5E,OAAO,2BAA2B,MAAM,qEAAqE,CAAC;AAC9G,OAAO,EAAE,SAAS,EAAE,MAAM,6DAA6D,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MAAM;SACN;KACD,CAAC;IACF;;;;;;OAMG;;IACF,KAAK,CAA8B,QAAQ,EAAE;QAC7C,MAAM,EAAE;YACP;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,MAAM;aACZ;YACD;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,OAAO;aACb;SACD;KACD,CAAC;IAEF;;;;;OAKG;;IACF,KAAK,CAA6B,OAAO,EAAE;QAC3C,MAAM,EAAE;YACP;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,MAAM;aACZ;YACD;;eAEG;YACH,KAAK,EAAE;gBACN,IAAI,EAAE,OAAO;aACb;SACD;KACD,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,MAAM,CAAC;IACd;;;;OAIG;;IACF,KAAK,CAAC,OAAO,CAAC;GACT,UAAU,CAwhBf;AAED,UAAU,CAAC,MAAM,EAAE,CAAC;AAEpB,eAAe,UAAU,CAAC","sourcesContent":["import { isPhone } from \"@ui5/webcomponents-base/dist/Device.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 slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport { submitForm } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport \"@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js\"; // default calendar for bundling\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport getCachedLocaleDataInstance from \"@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js\";\nimport { fetchCldr } from \"@ui5/webcomponents-base/dist/asset-registries/LocaleData.js\";\nimport {\n\tisShow,\n\tisEnter,\n\tisPageUp,\n\tisPageDown,\n\tisPageUpShift,\n\tisPageDownShift,\n\tisPageUpShiftCtrl,\n\tisPageDownShiftCtrl,\n\tisTabNext,\n\tisTabPrevious,\n\tisF6Next,\n\tisF6Previous,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport \"@ui5/webcomponents-icons/dist/time-entry-request.js\";\nimport UI5Date from \"@ui5/webcomponents-localization/dist/dates/UI5Date.js\";\nimport Icon from \"./Icon.js\";\nimport Popover from \"./Popover.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport TimePickerTemplate from \"./generated/templates/TimePickerTemplate.lit.js\";\nimport Input from \"./Input.js\";\nimport Button from \"./Button.js\";\nimport TimeSelectionClocks from \"./TimeSelectionClocks.js\";\nimport TimeSelectionInputs from \"./TimeSelectionInputs.js\";\nimport type { TimeSelectionChangeEventDetail } from \"./TimePickerInternals.js\";\n\nimport {\n\tTIMEPICKER_SUBMIT_BUTTON,\n\tTIMEPICKER_CANCEL_BUTTON,\n\tTIMEPICKER_INPUT_DESCRIPTION,\n\tTIMEPICKER_POPOVER_ACCESSIBLE_NAME,\n\tFORM_TEXTFIELD_REQUIRED,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport TimePickerCss from \"./generated/themes/TimePicker.css.js\";\nimport TimePickerPopoverCss from \"./generated/themes/TimePickerPopover.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\n\ntype TimePickerChangeInputEventDetail = {\n\tvalue: string,\n\tvalid: boolean,\n}\n\ntype TimePickerChangeEventDetail = TimePickerChangeInputEventDetail;\ntype TimePickerInputEventDetail = TimePickerChangeInputEventDetail;\n\n/**\n * @class\n *\n * ### Overview\n * The `ui5-time-picker` component provides an input field with assigned clocks which are opened on user action.\n * The `ui5-time-picker` allows users to select a localized time using touch, mouse, or keyboard input.\n * It consists of two parts: the time input field and the clocks.\n *\n * ### Usage\n * The user can enter a time by:\n *\n * - Using the clocks that are displayed in a popup\n * - Typing it in directly in the input field\n *\n * When the user makes an entry and chooses the enter key, the clocks show the corresponding time (hours, minutes and seconds separately).\n * When the user directly triggers the clocks display, the actual time is displayed.\n * For the `ui5-time-picker`\n *\n * ### Formatting\n *\n * If a time is entered by typing it into\n * the input field, it must fit to the used time format.\n *\n * Supported format options are pattern-based on Unicode LDML Date Format notation.\n * For more information, see [UTS #35: Unicode Locale Data Markup Language](http://unicode.org/reports/tr35/#Date_Field_Symbol_Table).\n *\n * For example, if the `format-pattern` is \"HH:mm:ss\",\n * a valid value string is \"11:42:35\" and the same is displayed in the input.\n *\n * ### Keyboard handling\n * [F4], [Alt]+[Up], [Alt]+[Down] Open/Close picker dialog and move focus to it.\n *\n * When closed:\n *\n * - [Page Up] - Increments hours by 1. If 12 am is reached, increment hours to 1 pm and vice versa.\n * - [Page Down] - Decrements the corresponding field by 1. If 1 pm is reached, decrement hours to 12 am and vice versa.\n * - [Shift]+[Page Up] - Increments minutes by 1.\n * - [Shift]+[Page Down] - Decrements minutes by 1.\n * - [Shift]+[Ctrl]+[Page Up] - Increments seconds by 1.\n * - [Shift]+[Ctrl]+[Page Down] - Decrements seconds by 1.\n * -\n *\n * When opened:\n *\n * - [Page Up] - Increments hours by 1. If 12 am is reached, increment hours to 1 pm and vice versa.\n * - [Page Down] - Decrements the corresponding field by 1. If 1 pm is reached, decrement hours to 12 am and vice versa.\n * - [Shift]+[Page Up] - Increments minutes by 1.\n * - [Shift]+[Page Down] - Decrements minutes by 1.\n * - [Shift]+[Ctrl]+[Page Up] - Increments seconds by 1.\n * - [Shift]+[Ctrl]+[Page Down] - Decrements seconds by 1.\n * - [A] or [P] - Selects AM or PM respectively.\n * - [0]-[9] - Allows direct time selecting (hours/minutes/seconds).\n * - [:] - Allows switching between hours/minutes/seconds clocks. If the last clock is displayed and [:] is pressed, the first clock is beind displayed.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/TimePicker.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.0.0-rc.6\n */\n@customElement({\n\ttag: \"ui5-time-picker\",\n\tlanguageAware: true,\n\tformAssociated: true,\n\trenderer: litRender,\n\ttemplate: TimePickerTemplate,\n\tstyles: [\n\t\tTimePickerCss,\n\t\tResponsivePopoverCommonCss,\n\t\tTimePickerPopoverCss,\n\t],\n\tdependencies: [\n\t\tIcon,\n\t\tPopover,\n\t\tResponsivePopover,\n\t\tTimeSelectionClocks,\n\t\tTimeSelectionInputs,\n\t\tInput,\n\t\tButton,\n\t],\n})\n/**\n * Fired when the input operation has finished by clicking the \"OK\" button or\n * when the text in the input field has changed and the focus leaves the input field.\n * @public\n * @param {string} value The submitted value.\n * @param {boolean} valid Indicator if the value is in correct format pattern and in valid range.\n */\n@event<TimePickerChangeEventDetail>(\"change\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t},\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalid: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n})\n\n/**\n * Fired when the value of the `ui5-time-picker` is changed at each key stroke.\n * @public\n * @param {string} value The current value.\n * @param {boolean} valid Indicator if the value is in correct format pattern and in valid range.\n */\n@event<TimePickerInputEventDetail>(\"input\", {\n\tdetail: {\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t},\n\t\t/**\n\t\t * @public\n\t\t */\n\t\tvalid: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n})\n/**\n * Fired after the value-help dialog of the component is opened.\n * @since 2.0.0\n * @public\n */\n@event(\"open\")\n/**\n * Fired after the value-help dialog of the component is closed.\n * @since 2.0.0\n * @public\n */\n@event(\"close\")\nclass TimePicker extends UI5Element implements IFormInputElement {\n\t/**\n\t * Defines a formatted time value.\n\t * @default \"\"\n\t * @formEvents change input\n\t * @formProperty\n\t * @public\n\t */\n\t@property()\n\tvalue = \"\";\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines the value state of the component.\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property()\n\tvalueState: `${ValueState}` = \"None\";\n\n\t/**\n\t * Defines the disabled state of the comonent.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines the readonly state of the comonent.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly = false;\n\n\t/**\n\t * Defines a short hint, intended to aid the user with data entry when the\n\t * component has no value.\n\t *\n\t * **Note:** When no placeholder is set, the format pattern is displayed as a placeholder.\n\t * Passing an empty string as the value of this property will make the component appear empty - without placeholder or format pattern.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tplaceholder?: string;\n\n\t/**\n\t * Determines the format, displayed in the input field.\n\t *\n\t * Example:\n\t * HH:mm:ss -> 11:42:35\n\t * hh:mm:ss a -> 2:23:15 PM\n\t * mm:ss -> 12:04 (only minutes and seconds)\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tformatPattern?: string;\n\n\t/**\n\t * Defines the open or closed state of the popover.\n\t * @public\n\t * @default false\n\t * @since 2.0.0\n\t */\n\t@property({ type: Boolean })\n\topen = false;\n\n\t/**\n\t * Defines whether the component is required.\n\t * @since 2.1.0\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\trequired = false;\n\n\t/**\n\t * Defines the aria-label attribute for the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.1.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id (or many ids) of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.1.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_isInputsPopoverOpen = false;\n\n\t/**\n\t * Defines the value state message that will be displayed as pop up under the `ui5-time-picker`.\n\t *\n\t * **Note:** If not specified, a default text (in the respective language) will be displayed.\n\t *\n\t * **Note:** The `valueStateMessage` would be displayed,\n\t * when the `ui5-time-picker` is in `Information`, `Critical` or `Negative` value state.\n\t * @since 1.0.0-rc.8\n\t * @public\n\t */\n\t@slot()\n\tvalueStateMessage!: Array<HTMLElement>;\n\n\ttempValue?: string;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tstatic async onDefine() {\n\t\t[TimePicker.i18nBundle] = await Promise.all([\n\t\t\tgetI18nBundle(\"@ui5/webcomponents\"),\n\t\t\tfetchCldr(getLocale().getLanguage(), getLocale().getRegion(), getLocale().getScript()),\n\t\t]);\n\t}\n\tget formValidityMessage() {\n\t\treturn TimePicker.i18nBundle.getText(FORM_TEXTFIELD_REQUIRED);\n\t}\n\n\tget formValidity(): ValidityStateFlags {\n\t\treturn { valueMissing: this.required && !this.value };\n\t}\n\n\tasync formElementAnchor() {\n\t\treturn (await this.getFocusDomRefAsync() as UI5Element)?.getFocusDomRefAsync();\n\t}\n\n\tget formFormattedValue(): FormData | string | null {\n\t\treturn this.value || \"\";\n\t}\n\n\tonBeforeRendering() {\n\t\tif (this.value) {\n\t\t\tthis.value = this.normalizeValue(this.value) || this.value;\n\t\t}\n\n\t\tthis.tempValue = this.value && this.isValid(this.value) ? this.value : this.getFormat().format(UI5Date.getInstance());\n\t}\n\n\tget dateAriaDescription() {\n\t\treturn TimePicker.i18nBundle.getText(TIMEPICKER_INPUT_DESCRIPTION);\n\t}\n\n\tget pickerAccessibleName() {\n\t\treturn TimePicker.i18nBundle.getText(TIMEPICKER_POPOVER_ACCESSIBLE_NAME);\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\t\"ariaRoledescription\": this.dateAriaDescription,\n\t\t\t\"ariaHasPopup\": \"dialog\",\n\t\t\t\"ariaRequired\": this.required,\n\t\t\t\"ariaLabel\": getEffectiveAriaLabelText(this),\n\t\t};\n\t}\n\n\t/**\n\t * Currently selected time represented as JavaScript Date instance\n\t * @public\n\t * @default null\n\t */\n\tget dateValue(): Date | null {\n\t\treturn this.getFormat().parse(this._effectiveValue) as Date;\n\t}\n\n\t/**\n\t * @protected\n\t */\n\tget _placeholder() {\n\t\treturn this.placeholder !== undefined ? this.placeholder : this._displayFormat;\n\t}\n\n\t/**\n\t * @protected\n\t */\n\tget _formatPattern() {\n\t\tconst hasHours = !!this.formatPattern?.match(/H/i);\n\t\tconst fallback = !this.formatPattern || !hasHours;\n\n\t\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\t\treturn fallback ? localeData.getTimePattern(\"medium\") : this.formatPattern;\n\t}\n\n\tget _displayFormat() {\n\t\t// @ts-ignore oFormatOptions is a private API of DateFormat\n\t\treturn this.getFormat().oFormatOptions.pattern as string;\n\t}\n\n\tget _effectiveValue() {\n\t\treturn this.value;\n\t}\n\n\tget _timeSelectionValue() {\n\t\treturn this.tempValue;\n\t}\n\n\tget _isPhone() {\n\t\treturn isPhone();\n\t}\n\n\tonTimeSelectionChange(e: CustomEvent<TimeSelectionChangeEventDetail>) {\n\t\tthis.tempValue = e.detail.value; // every time the user changes the time selection -> update tempValue\n\t}\n\n\t_togglePicker() {\n\t\tthis.open = !this.open;\n\t}\n\n\tsubmitPickers() {\n\t\tthis._updateValueAndFireEvents(this.tempValue!, true, [\"change\", \"value-changed\"]);\n\t\tthis._togglePicker();\n\t}\n\n\tonResponsivePopoverAfterClose() {\n\t\tthis.open = false;\n\t\tthis.fireEvent(\"close\");\n\t}\n\n\tonResponsivePopoverAfterOpen() {\n\t\tthis.fireEvent(\"open\");\n\t}\n\n\t/**\n\t * Opens the Inputs popover.\n\t * @private\n\t * @returns Resolves when the Inputs popover is open\n\t */\n\topenInputsPopover() {\n\t\tthis.tempValue = this.value && this.isValid(this.value) ? this.value : this.getFormat().format(UI5Date.getInstance());\n\t\tconst popover = this._getInputsPopover();\n\t\tpopover.opener = this;\n\t\tpopover.open = true;\n\t\tthis._isInputsPopoverOpen = true;\n\t}\n\n\t/**\n\t * Closes the Inputs popover\n\t * @private\n\t * @returns Resolves when the Inputs popover is closed\n\t */\n\tcloseInputsPopover() {\n\t\tconst popover = this._getInputsPopover();\n\t\tpopover.open = false;\n\t}\n\n\ttoggleInputsPopover() {\n\t\tif (this.isInputsPopoverOpen()) {\n\t\t\tthis.closeInputsPopover();\n\t\t} else if (this._canOpenInputsPopover()) {\n\t\t\tthis.openInputsPopover();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the inputs popover is open\n\t * @private\n\t */\n\tisInputsPopoverOpen(): boolean {\n\t\treturn !!this._isInputsPopoverOpen;\n\t}\n\n\tsubmitInputsPopover() {\n\t\tthis._updateValueAndFireEvents(this.tempValue!, true, [\"change\", \"value-changed\"]);\n\t\tthis.closeInputsPopover();\n\t}\n\n\tonInputsPopoverAfterOpen() {\n\t\tconst popover = this._getInputsPopover();\n\t\tpopover.querySelector<TimeSelectionInputs>(\"[ui5-time-selection-inputs]\")!._addNumericAttributes();\n\t}\n\n\tonInputsPopoverAfterClose() {\n\t\tthis._isInputsPopoverOpen = false;\n\t}\n\n\t_handleInputClick(e: MouseEvent) {\n\t\tconst target = e.target as HTMLElement;\n\t\tif (this.open) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._isPhone && target && !target.hasAttribute(\"ui5-icon\")) {\n\t\t\tthis.toggleInputsPopover();\n\t\t}\n\n\t\tconst inputField = this._getInputField();\n\n\t\tif (inputField) {\n\t\t\t(inputField as HTMLInputElement).select();\n\t\t}\n\t}\n\n\t_updateValueAndFireEvents(value: string, normalizeValue: boolean, eventsNames: Array<string>) {\n\t\tif (value === this.value) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst valid = this.isValid(value);\n\n\t\tif (value !== undefined && valid && normalizeValue) { // if value === undefined, valid is guaranteed to be falsy\n\t\t\tvalue = this.normalizeValue(value); // transform valid values (in any format) to the correct format\n\t\t}\n\t\tif (!eventsNames.includes(\"input\")) {\n\t\t\tthis.value = \"\"; // Do not remove! DurationPicker (an external component extending TimePicker) use case -> value is 05:10, user tries 05:12, after normalization value is changed back to 05:10 so no invalidation happens, but the input still shows 05:12. Thus we enforce invalidation with the \"\"\n\t\t\tthis.value = value;\n\t\t}\n\t\tthis.tempValue = value; // if the picker is open, sync it\n\t\tthis._updateValueState(); // Change the value state to Error/None, but only if needed\n\t\teventsNames.forEach(eventName => {\n\t\t\tthis.fireEvent<TimePickerChangeInputEventDetail>(eventName, { value, valid });\n\t\t});\n\t}\n\n\t_updateValueState() {\n\t\tconst isValid = this.isValid(this.value);\n\t\tif (!isValid) { // If not valid - always set Error regardless of the current value state\n\t\t\tthis.valueState = ValueState.Negative;\n\t\t} else if (isValid && this.valueState === ValueState.Negative) { // However if valid, change only Error (but not the others) to None\n\t\t\tthis.valueState = ValueState.None;\n\t\t}\n\t}\n\n\t_handleInputChange(e: CustomEvent) {\n\t\tconst target = e.target as Input;\n\t\tthis._updateValueAndFireEvents(target.value, true, [\"change\", \"value-changed\"]);\n\t}\n\n\t_handleInputLiveChange(e: CustomEvent) {\n\t\tconst target = e.target as Input;\n\t\tthis._updateValueAndFireEvents(target.value, false, [\"input\"]);\n\t}\n\n\t_canOpenPicker() {\n\t\treturn !this.disabled && !this.readonly;\n\t}\n\n\t_canOpenInputsPopover() {\n\t\treturn !this.disabled && this._isPhone;\n\t}\n\n\t_getPopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\t_getInputsPopover() {\n\t\treturn this.shadowRoot!.querySelector<Popover>(\"[ui5-popover]\")!;\n\t}\n\n\t_getInput(): Input {\n\t\treturn this.shadowRoot!.querySelector<Input>(\"[ui5-input]\")!;\n\t}\n\n\t_getInputField() {\n\t\tconst input = this._getInput();\n\t\treturn input && input.getInputDOMRef();\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (this._isPhone && !this.isInputsPopoverOpen()) {\n\t\t\te.preventDefault();\n\t\t}\n\t\tif (isShow(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._togglePicker();\n\t\t}\n\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (target && this.open && this._getInput().id === target.id && (isTabNext(e) || isTabPrevious(e) || isF6Next(e) || isF6Previous(e))) {\n\t\t\tthis._togglePicker();\n\t\t}\n\t\tif (this.open) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tif (this._internals?.form) {\n\t\t\t\tsubmitForm(this);\n\t\t\t}\n\t\t} else if (isPageUpShiftCtrl(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyValueBy(1, \"second\");\n\t\t} else if (isPageUpShift(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyValueBy(1, \"minute\");\n\t\t} else if (isPageUp(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyValueBy(1, \"hour\");\n\t\t} else if (isPageDownShiftCtrl(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyValueBy(-1, \"second\");\n\t\t} else if (isPageDownShift(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyValueBy(-1, \"minute\");\n\t\t} else if (isPageDown(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyValueBy(-1, \"hour\");\n\t\t}\n\t}\n\n\tget _isPattern() {\n\t\treturn this._formatPattern !== \"medium\" && this._formatPattern !== \"short\" && this._formatPattern !== \"long\";\n\t}\n\n\tgetFormat() {\n\t\tlet dateFormat;\n\n\t\tif (this._isPattern) {\n\t\t\tdateFormat = DateFormat.getDateInstance({\n\t\t\t\tpattern: this._formatPattern,\n\t\t\t});\n\t\t} else {\n\t\t\tdateFormat = DateFormat.getDateInstance({\n\t\t\t\tstyle: this._formatPattern,\n\t\t\t});\n\t\t}\n\n\t\treturn dateFormat;\n\t}\n\n\t/**\n\t * Formats a Java Script date object into a string representing a locale date and time\n\t * according to the `formatPattern` property of the TimePicker instance\n\t * @param date A Java Script date object to be formatted as string\n\t * @public\n\t * @returns formatted value\n\t */\n\tformatValue(date: Date): string {\n\t\treturn this.getFormat().format(date);\n\t}\n\n\t/**\n\t * Checks if a value is valid against the current `formatPattern` value.\n\t *\n\t * **Note:** an empty string is considered as valid value.\n\t * @param value The value to be tested against the current date format\n\t * @public\n\t */\n\tisValid(value: string | undefined): boolean {\n\t\tif (value === \"\") {\n\t\t\treturn true;\n\t\t}\n\t\treturn !!this.getFormat().parse(value as string);\n\t}\n\n\tnormalizeValue(value: string) {\n\t\tif (value === \"\") {\n\t\t\treturn value;\n\t\t}\n\t\treturn this.getFormat().format(this.getFormat().parse(value));\n\t}\n\n\t_modifyValueBy(amount: number, unit: string) {\n\t\tconst date = this.getFormat().parse(this._effectiveValue) as Date;\n\t\tif (!date) {\n\t\t\treturn;\n\t\t}\n\t\tif (unit === \"hour\") {\n\t\t\tdate.setHours(date.getHours() + amount);\n\t\t} else if (unit === \"minute\") {\n\t\t\tdate.setMinutes(date.getMinutes() + amount);\n\t\t} else if (unit === \"second\") {\n\t\t\tdate.setSeconds(date.getSeconds() + amount);\n\t\t}\n\n\t\tconst newValue = this.formatValue(date);\n\n\t\tthis._updateValueAndFireEvents(newValue, true, [\"change\", \"value-changed\"]);\n\t}\n\n\t/**\n\t * The listener for this event can't be passive as it calls preventDefault()\n\t * @param e Wheel Event\n\t * @private\n\t */\n\t_handleWheel(e: WheelEvent) {\n\t\te.preventDefault();\n\t}\n\n\t/**\n\t * Hides mobile device keyboard by temporary setting the input to readonly state.\n\t */\n\t_hideMobileKeyboard() {\n\t\tthis._getInput().readonly = true;\n\t\tsetTimeout(() => { this._getInput().readonly = false; }, 0);\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tif (this._isPhone) {\n\t\t\tthis._hideMobileKeyboard();\n\t\t\tif (this._isInputsPopoverOpen) {\n\t\t\t\tconst popover = this._getInputsPopover();\n\t\t\t\tpopover.applyFocus();\n\t\t\t}\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_oninput(e: CustomEvent) {\n\t\tif (this._isPhone) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\tget submitButtonLabel() {\n\t\treturn TimePicker.i18nBundle.getText(TIMEPICKER_SUBMIT_BUTTON);\n\t}\n\n\tget cancelButtonLabel() {\n\t\treturn TimePicker.i18nBundle.getText(TIMEPICKER_CANCEL_BUTTON);\n\t}\n\n\t/**\n\t * @protected\n\t */\n\tget openIconName() {\n\t\treturn \"time-entry-request\";\n\t}\n}\n\nTimePicker.define();\n\nexport default TimePicker;\nexport type {\n\tTimeSelectionChangeEventDetail,\n\tTimePickerChangeEventDetail,\n\tTimePickerInputEventDetail,\n};\n"]}
|