@ui5/webcomponents 2.20.0-rc.0 → 2.20.0-rc.2
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 +40 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Avatar.d.ts +23 -2
- package/dist/Avatar.js +41 -4
- package/dist/Avatar.js.map +1 -1
- package/dist/AvatarGroup.js +2 -0
- package/dist/AvatarGroup.js.map +1 -1
- package/dist/AvatarGroupTemplate.js +8 -1
- package/dist/AvatarGroupTemplate.js.map +1 -1
- package/dist/AvatarTemplate.js +1 -1
- package/dist/AvatarTemplate.js.map +1 -1
- package/dist/ComboBox.d.ts +19 -0
- package/dist/ComboBox.js +58 -2
- package/dist/ComboBox.js.map +1 -1
- package/dist/ComboBoxItem.d.ts +23 -0
- package/dist/ComboBoxItem.js +4 -0
- package/dist/ComboBoxItem.js.map +1 -1
- package/dist/List.js +6 -0
- package/dist/List.js.map +1 -1
- package/dist/ListItem.js +1 -1
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemCustom.d.ts +2 -14
- package/dist/ListItemCustom.js +31 -66
- package/dist/ListItemCustom.js.map +1 -1
- package/dist/ListItemGroup.d.ts +1 -0
- package/dist/ListItemGroup.js +1 -0
- package/dist/ListItemGroup.js.map +1 -1
- package/dist/ListItemGroupTemplate.js +1 -1
- package/dist/ListItemGroupTemplate.js.map +1 -1
- package/dist/Menu.d.ts +2 -1
- package/dist/Menu.js +14 -7
- package/dist/Menu.js.map +1 -1
- package/dist/MenuItem.d.ts +1 -0
- package/dist/MenuItem.js +6 -2
- package/dist/MenuItem.js.map +1 -1
- package/dist/Panel.d.ts +3 -0
- package/dist/Panel.js +13 -0
- package/dist/Panel.js.map +1 -1
- package/dist/PanelTemplate.js +1 -1
- package/dist/PanelTemplate.js.map +1 -1
- package/dist/Slider.d.ts +13 -20
- package/dist/Slider.js +48 -74
- package/dist/Slider.js.map +1 -1
- package/dist/SliderHandle.d.ts +61 -0
- package/dist/SliderHandle.js +104 -0
- package/dist/SliderHandle.js.map +1 -0
- package/dist/SliderHandleTemplate.d.ts +2 -0
- package/dist/SliderHandleTemplate.js +7 -0
- package/dist/SliderHandleTemplate.js.map +1 -0
- package/dist/SliderScale.d.ts +138 -0
- package/dist/SliderScale.js +300 -0
- package/dist/SliderScale.js.map +1 -0
- package/dist/SliderScaleTemplate.d.ts +2 -0
- package/dist/SliderScaleTemplate.js +11 -0
- package/dist/SliderScaleTemplate.js.map +1 -0
- package/dist/SliderTemplate.d.ts +0 -2
- package/dist/SliderTemplate.js +16 -14
- package/dist/SliderTemplate.js.map +1 -1
- package/dist/SliderTooltip.js +0 -4
- package/dist/SliderTooltip.js.map +1 -1
- package/dist/SplitButton.d.ts +2 -0
- package/dist/SplitButton.js +5 -0
- package/dist/SplitButton.js.map +1 -1
- package/dist/Tab.js +1 -1
- package/dist/Tab.js.map +1 -1
- package/dist/TabContainer.js +1 -1
- package/dist/TabContainer.js.map +1 -1
- package/dist/TableDragAndDrop.js +1 -1
- package/dist/TableDragAndDrop.js.map +1 -1
- package/dist/Tokenizer.js +16 -4
- package/dist/Tokenizer.js.map +1 -1
- package/dist/Toolbar.d.ts +4 -0
- package/dist/Toolbar.js +11 -0
- package/dist/Toolbar.js.map +1 -1
- package/dist/bundle.esm.js +2 -0
- package/dist/bundle.esm.js.map +1 -1
- package/dist/css/themes/Avatar.css +1 -1
- package/dist/css/themes/AvatarGroup.css +1 -1
- package/dist/css/themes/ColorPicker.css +1 -1
- package/dist/css/themes/Form.css +1 -1
- package/dist/css/themes/FormItemSpan.css +1 -1
- package/dist/css/themes/Panel.css +1 -1
- package/dist/css/themes/ProgressIndicator.css +1 -1
- package/dist/css/themes/Slider.css +1 -0
- package/dist/css/themes/SliderHandle.css +1 -0
- package/dist/css/themes/SliderScale.css +1 -0
- package/dist/css/themes/ToolbarItem.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_hcb/parameters-bundle.css +1 -2
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -2
- package/dist/custom-elements-internal.json +242 -32
- package/dist/custom-elements.json +198 -31
- 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_id.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_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/themes/Avatar.css.d.ts +1 -1
- package/dist/generated/themes/Avatar.css.js +1 -1
- package/dist/generated/themes/Avatar.css.js.map +1 -1
- package/dist/generated/themes/AvatarGroup.css.d.ts +1 -1
- package/dist/generated/themes/AvatarGroup.css.js +1 -1
- package/dist/generated/themes/AvatarGroup.css.js.map +1 -1
- package/dist/generated/themes/ColorPicker.css.d.ts +1 -1
- package/dist/generated/themes/ColorPicker.css.js +1 -1
- package/dist/generated/themes/ColorPicker.css.js.map +1 -1
- package/dist/generated/themes/Form.css.d.ts +1 -1
- package/dist/generated/themes/Form.css.js +1 -1
- package/dist/generated/themes/Form.css.js.map +1 -1
- package/dist/generated/themes/FormItemSpan.css.d.ts +1 -1
- package/dist/generated/themes/FormItemSpan.css.js +1 -1
- package/dist/generated/themes/FormItemSpan.css.js.map +1 -1
- package/dist/generated/themes/Panel.css.d.ts +1 -1
- package/dist/generated/themes/Panel.css.js +1 -1
- package/dist/generated/themes/Panel.css.js.map +1 -1
- package/dist/generated/themes/ProgressIndicator.css.d.ts +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js.map +1 -1
- package/dist/generated/themes/Slider.css.d.ts +2 -0
- package/dist/generated/themes/Slider.css.js +8 -0
- package/dist/generated/themes/Slider.css.js.map +1 -0
- package/dist/generated/themes/SliderHandle.css.d.ts +2 -0
- package/dist/generated/themes/SliderHandle.css.js +8 -0
- package/dist/generated/themes/SliderHandle.css.js.map +1 -0
- package/dist/generated/themes/SliderScale.css.d.ts +2 -0
- package/dist/generated/themes/SliderScale.css.js +8 -0
- package/dist/generated/themes/SliderScale.css.js.map +1 -0
- package/dist/generated/themes/ToolbarItem.css.d.ts +1 -1
- package/dist/generated/themes/ToolbarItem.css.js +1 -1
- package/dist/generated/themes/ToolbarItem.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -2
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -2
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/types/AvatarMode.d.ts +30 -0
- package/dist/types/AvatarMode.js +32 -0
- package/dist/types/AvatarMode.js.map +1 -0
- package/dist/vscode.html-custom-data.json +35 -11
- package/dist/web-types.json +80 -19
- package/package.json +9 -9
- package/src/AvatarGroupTemplate.tsx +8 -1
- package/src/AvatarTemplate.tsx +1 -0
- package/src/ListItemGroupTemplate.tsx +9 -3
- package/src/PanelTemplate.tsx +2 -0
- package/src/SliderHandleTemplate.tsx +15 -0
- package/src/SliderScaleTemplate.tsx +32 -0
- package/src/SliderTemplate.tsx +85 -64
- package/src/i18n/messagebundle_ar.properties +14 -8
- package/src/i18n/messagebundle_bg.properties +14 -8
- package/src/i18n/messagebundle_ca.properties +14 -8
- package/src/i18n/messagebundle_cnr.properties +14 -8
- package/src/i18n/messagebundle_cs.properties +14 -8
- package/src/i18n/messagebundle_cy.properties +14 -8
- package/src/i18n/messagebundle_da.properties +14 -8
- package/src/i18n/messagebundle_de.properties +14 -8
- package/src/i18n/messagebundle_el.properties +14 -8
- package/src/i18n/messagebundle_en.properties +14 -8
- package/src/i18n/messagebundle_en_GB.properties +14 -8
- package/src/i18n/messagebundle_en_US_sappsd.properties +3 -3
- package/src/i18n/messagebundle_en_US_saprigi.properties +3 -3
- package/src/i18n/messagebundle_en_US_saptrc.properties +3 -3
- package/src/i18n/messagebundle_es.properties +16 -10
- package/src/i18n/messagebundle_es_MX.properties +15 -9
- package/src/i18n/messagebundle_et.properties +14 -8
- package/src/i18n/messagebundle_fi.properties +14 -8
- package/src/i18n/messagebundle_fr.properties +14 -8
- package/src/i18n/messagebundle_fr_CA.properties +15 -9
- package/src/i18n/messagebundle_hi.properties +14 -8
- package/src/i18n/messagebundle_hr.properties +14 -8
- package/src/i18n/messagebundle_hu.properties +14 -8
- package/src/i18n/messagebundle_id.properties +14 -8
- package/src/i18n/messagebundle_it.properties +14 -8
- package/src/i18n/messagebundle_iw.properties +14 -8
- package/src/i18n/messagebundle_ja.properties +14 -8
- package/src/i18n/messagebundle_kk.properties +14 -8
- package/src/i18n/messagebundle_ko.properties +14 -8
- package/src/i18n/messagebundle_lt.properties +14 -8
- package/src/i18n/messagebundle_lv.properties +14 -8
- package/src/i18n/messagebundle_mk.properties +14 -8
- package/src/i18n/messagebundle_ms.properties +14 -8
- package/src/i18n/messagebundle_nl.properties +14 -8
- package/src/i18n/messagebundle_no.properties +14 -8
- package/src/i18n/messagebundle_pl.properties +14 -8
- package/src/i18n/messagebundle_pt.properties +14 -8
- package/src/i18n/messagebundle_pt_PT.properties +14 -8
- package/src/i18n/messagebundle_ro.properties +14 -8
- package/src/i18n/messagebundle_ru.properties +14 -8
- package/src/i18n/messagebundle_sh.properties +14 -8
- package/src/i18n/messagebundle_sk.properties +14 -8
- package/src/i18n/messagebundle_sl.properties +14 -8
- package/src/i18n/messagebundle_sr.properties +14 -8
- package/src/i18n/messagebundle_sv.properties +14 -8
- package/src/i18n/messagebundle_th.properties +14 -8
- package/src/i18n/messagebundle_tr.properties +14 -8
- package/src/i18n/messagebundle_uk.properties +14 -8
- package/src/i18n/messagebundle_vi.properties +14 -8
- package/src/i18n/messagebundle_zh_CN.properties +14 -8
- package/src/i18n/messagebundle_zh_TW.properties +15 -9
- package/src/themes/Avatar.css +39 -14
- package/src/themes/AvatarGroup.css +24 -0
- package/src/themes/ColorPicker.css +23 -27
- package/src/themes/FormItemSpan.css +1 -1
- package/src/themes/Panel.css +5 -1
- package/src/themes/ProgressIndicator.css +1 -0
- package/src/themes/Slider.css +32 -0
- package/src/themes/SliderHandle.css +61 -0
- package/src/themes/SliderScale.css +149 -0
- package/src/themes/ToolbarItem.css +1 -1
- package/src/themes/base/SliderHandle-parameters.css +3 -0
- package/src/themes/base/SliderScale-parameters.css +13 -0
- package/src/themes/sap_fiori_3/Slider-parameters.css +11 -0
- package/src/themes/sap_fiori_3/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_fiori_3/SliderScale-parameters.css +13 -0
- package/src/themes/sap_fiori_3/parameters-bundle.css +2 -0
- package/src/themes/sap_fiori_3_dark/Slider-parameters.css +11 -0
- package/src/themes/sap_fiori_3_dark/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_fiori_3_dark/SliderScale-parameters.css +13 -0
- package/src/themes/sap_fiori_3_dark/parameters-bundle.css +2 -0
- package/src/themes/sap_fiori_3_hcb/Slider-parameters.css +11 -0
- package/src/themes/sap_fiori_3_hcb/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_fiori_3_hcb/SliderScale-parameters.css +14 -0
- package/src/themes/sap_fiori_3_hcb/parameters-bundle.css +2 -0
- package/src/themes/sap_fiori_3_hcw/Slider-parameters.css +11 -0
- package/src/themes/sap_fiori_3_hcw/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_fiori_3_hcw/SliderScale-parameters.css +14 -0
- package/src/themes/sap_fiori_3_hcw/parameters-bundle.css +2 -0
- package/src/themes/sap_horizon/AvatarGroup-parameters.css +20 -3
- package/src/themes/sap_horizon/Slider-parameters.css +11 -0
- package/src/themes/sap_horizon/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_horizon/SliderScale-parameters.css +10 -0
- package/src/themes/sap_horizon/parameters-bundle.css +3 -0
- package/src/themes/sap_horizon/rtl-parameters.css +4 -0
- package/src/themes/sap_horizon_dark/Slider-parameters.css +11 -0
- package/src/themes/sap_horizon_dark/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_horizon_dark/SliderScale-parameters.css +10 -0
- package/src/themes/sap_horizon_dark/parameters-bundle.css +3 -0
- package/src/themes/sap_horizon_dark/rtl-parameters.css +6 -0
- package/src/themes/sap_horizon_hcb/Slider-parameters.css +11 -0
- package/src/themes/sap_horizon_hcb/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_horizon_hcb/SliderScale-parameters.css +10 -0
- package/src/themes/sap_horizon_hcb/parameters-bundle.css +3 -1
- package/src/themes/sap_horizon_hcb/rtl-parameters.css +1 -0
- package/src/themes/sap_horizon_hcw/Slider-parameters.css +11 -0
- package/src/themes/sap_horizon_hcw/SliderHandle-parameters.css +5 -0
- package/src/themes/sap_horizon_hcw/SliderScale-parameters.css +10 -0
- package/src/themes/sap_horizon_hcw/parameters-bundle.css +3 -1
- package/src/themes/sap_horizon_hcw/rtl-parameters.css +1 -0
package/dist/Slider.js
CHANGED
|
@@ -12,6 +12,7 @@ import { isEscape, isF2 } from "@ui5/webcomponents-base/dist/Keys.js";
|
|
|
12
12
|
import SliderBase from "./SliderBase.js";
|
|
13
13
|
// Template
|
|
14
14
|
import SliderTemplate from "./SliderTemplate.js";
|
|
15
|
+
import styles from "./generated/themes/Slider.css.js";
|
|
15
16
|
// Texts
|
|
16
17
|
import { SLIDER_ARIA_DESCRIPTION, SLIDER_TOOLTIP_INPUT_DESCRIPTION, SLIDER_TOOLTIP_INPUT_LABEL, } from "./generated/i18n/i18n-defaults.js";
|
|
17
18
|
/**
|
|
@@ -82,60 +83,36 @@ let Slider = Slider_1 = class Slider extends SliderBase {
|
|
|
82
83
|
* @public
|
|
83
84
|
*/
|
|
84
85
|
this.value = 0;
|
|
86
|
+
/**
|
|
87
|
+
* Defines the size of the slider's selection intervals (e.g. min = 0, max = 10, step = 5 would result in possible selection of the values 0, 5, 10).
|
|
88
|
+
*
|
|
89
|
+
* **Note:** If set to 0 the slider handle movement is disabled.
|
|
90
|
+
* @default 1
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
this.step = 1;
|
|
85
94
|
this.tooltipValueState = "None";
|
|
86
95
|
this.tooltipValue = "";
|
|
87
96
|
this._progressPercentage = 0;
|
|
88
97
|
this._handlePositionFromStart = 0;
|
|
89
|
-
this._stateStorage.value = undefined;
|
|
90
98
|
this._lastValidInputValue = this.min.toString();
|
|
91
99
|
}
|
|
92
100
|
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* either it is the initial rendering or that a property has been changed
|
|
96
|
-
* programmatically - because the previous state is always updated in
|
|
97
|
-
* the interaction handlers.
|
|
98
|
-
*
|
|
99
|
-
* Normalize current properties, update the previously stored state.
|
|
100
|
-
* Update the visual UI representation of the Slider.
|
|
101
|
-
*
|
|
101
|
+
* The value is visually clamped to min/max but the property is not modified.
|
|
102
|
+
* @private
|
|
102
103
|
*/
|
|
103
104
|
onBeforeRendering() {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
this.
|
|
108
|
-
this.syncUIAndState();
|
|
109
|
-
this._updateHandleAndProgress(this.value);
|
|
105
|
+
// Clamp value visually without modifying the actual value property
|
|
106
|
+
const ctor = this.constructor;
|
|
107
|
+
const clampedValue = ctor.clipValue(this.value, this.min, this.max);
|
|
108
|
+
this._updateHandleAndProgress(clampedValue);
|
|
110
109
|
}
|
|
111
110
|
onAfterRendering() {
|
|
112
111
|
super.onAfterRendering();
|
|
113
112
|
this.tooltip?.repositionTooltip();
|
|
114
113
|
}
|
|
115
|
-
|
|
116
|
-
//
|
|
117
|
-
if (this.isPropertyUpdated("step")) {
|
|
118
|
-
this._validateStep(this.step);
|
|
119
|
-
this.storePropertyState("step");
|
|
120
|
-
}
|
|
121
|
-
// Recalculate the tickmarks and labels and update the stored state.
|
|
122
|
-
if (this.isPropertyUpdated("min", "max", "value")) {
|
|
123
|
-
this.storePropertyState("min", "max");
|
|
124
|
-
// Here the value props are changed programmatically (not by user interaction)
|
|
125
|
-
// and it won't be "stepified" (rounded to the nearest step). 'Clip' them within
|
|
126
|
-
// min and max bounderies and update the previous state reference.
|
|
127
|
-
this.value = SliderBase.clipValue(this.value, this._effectiveMin, this._effectiveMax);
|
|
128
|
-
this.updateStateStorageAndFireInputEvent("value");
|
|
129
|
-
this.storePropertyState("value");
|
|
130
|
-
}
|
|
131
|
-
// Labels must be updated if any of the min/max/step/labelInterval props are changed
|
|
132
|
-
if (this.labelInterval && this.showTickmarks) {
|
|
133
|
-
this._createLabels();
|
|
134
|
-
}
|
|
135
|
-
// Update the stored state for the labelInterval, if changed
|
|
136
|
-
if (this.isPropertyUpdated("labelInterval")) {
|
|
137
|
-
this.storePropertyState("labelInterval");
|
|
138
|
-
}
|
|
114
|
+
_handleResize() {
|
|
115
|
+
// TODO: Remove after refactoring Base and RangeSlider
|
|
139
116
|
}
|
|
140
117
|
/**
|
|
141
118
|
* Called when the user starts interacting with the slider
|
|
@@ -157,8 +134,10 @@ let Slider = Slider_1 = class Slider extends SliderBase {
|
|
|
157
134
|
// Do not yet update the Slider if press is over a handle. It will be updated if the user drags the mouse.
|
|
158
135
|
const ctor = this.constructor;
|
|
159
136
|
if (!this._isHandlePressed(ctor.getPageXValueFromEvent(e))) {
|
|
137
|
+
const stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);
|
|
160
138
|
this._updateHandleAndProgress(newValue);
|
|
161
139
|
this.value = newValue;
|
|
140
|
+
this.tooltipValue = newValue.toFixed(stepPrecision);
|
|
162
141
|
this.updateStateStorageAndFireInputEvent("value");
|
|
163
142
|
}
|
|
164
143
|
}
|
|
@@ -188,18 +167,19 @@ let Slider = Slider_1 = class Slider extends SliderBase {
|
|
|
188
167
|
}
|
|
189
168
|
_onTooltipChange(e) {
|
|
190
169
|
const value = parseFloat(e.detail.value);
|
|
191
|
-
const isInvalid = value < this.
|
|
170
|
+
const isInvalid = (value < this.min || value > this.max) || Number.isNaN(value);
|
|
192
171
|
if (isInvalid) {
|
|
193
172
|
this.tooltipValueState = "Negative";
|
|
194
173
|
this.tooltipValue = `${value}`;
|
|
195
174
|
return;
|
|
196
175
|
}
|
|
176
|
+
this.tooltipValueState = "None";
|
|
197
177
|
this.value = value;
|
|
198
178
|
this.fireDecoratorEvent("change");
|
|
199
179
|
}
|
|
200
180
|
_onTooltipFocusChange() {
|
|
201
181
|
const value = parseFloat(this.tooltipValue);
|
|
202
|
-
const isInvalid = value < this.
|
|
182
|
+
const isInvalid = (value < this.min || value > this.max) || Number.isNaN(value);
|
|
203
183
|
if (isInvalid) {
|
|
204
184
|
this.tooltipValueState = "None";
|
|
205
185
|
this.tooltipValue = this.value.toString();
|
|
@@ -213,7 +193,7 @@ let Slider = Slider_1 = class Slider extends SliderBase {
|
|
|
213
193
|
}
|
|
214
194
|
_onTooltipOpen() {
|
|
215
195
|
const ctor = this.constructor;
|
|
216
|
-
const stepPrecision = ctor._getDecimalPrecisionOfNumber(this.
|
|
196
|
+
const stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);
|
|
217
197
|
this.tooltipValue = this.value.toFixed(stepPrecision);
|
|
218
198
|
}
|
|
219
199
|
_onTooltipInput(e) {
|
|
@@ -225,16 +205,12 @@ let Slider = Slider_1 = class Slider extends SliderBase {
|
|
|
225
205
|
*/
|
|
226
206
|
_handleMove(e) {
|
|
227
207
|
e.preventDefault();
|
|
228
|
-
// If step is 0 no interaction is available because there is no constant
|
|
229
|
-
// (equal for all user environments) quantitative representation of the value
|
|
230
|
-
if (this.disabled || this._effectiveStep === 0) {
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
208
|
const ctor = this.constructor;
|
|
234
|
-
const newValue = ctor.getValueFromInteraction(e, this.
|
|
209
|
+
const newValue = ctor.getValueFromInteraction(e, this.step, this.min, this.max, this.getBoundingClientRect(), this.directionStart);
|
|
210
|
+
const stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);
|
|
235
211
|
this._updateHandleAndProgress(newValue);
|
|
236
212
|
this.value = newValue;
|
|
237
|
-
this.tooltipValue = newValue.
|
|
213
|
+
this.tooltipValue = newValue.toFixed(stepPrecision);
|
|
238
214
|
this.updateStateStorageAndFireInputEvent("value");
|
|
239
215
|
}
|
|
240
216
|
/** Called when the user finish interacting with the slider
|
|
@@ -266,23 +242,24 @@ let Slider = Slider_1 = class Slider extends SliderBase {
|
|
|
266
242
|
* @private
|
|
267
243
|
*/
|
|
268
244
|
_updateHandleAndProgress(newValue) {
|
|
269
|
-
const max = this.
|
|
270
|
-
const min = this.
|
|
245
|
+
const max = this.max;
|
|
246
|
+
const min = this.min;
|
|
271
247
|
// The progress (completed) percentage of the slider.
|
|
272
248
|
this._progressPercentage = (newValue - min) / (max - min);
|
|
273
249
|
// How many pixels from the left end of the slider will be the placed the affected by the user action handle
|
|
274
250
|
this._handlePositionFromStart = this._progressPercentage * 100;
|
|
275
251
|
}
|
|
276
252
|
_handleActionKeyPress(e) {
|
|
277
|
-
const min = this.
|
|
278
|
-
const max = this.
|
|
253
|
+
const min = this.min;
|
|
254
|
+
const max = this.max;
|
|
279
255
|
const currentValue = this.value;
|
|
280
256
|
const ctor = this.constructor;
|
|
281
257
|
const newValue = isEscape(e) ? this._valueInitial : ctor.clipValue(this._handleActionKeyPressBase(e, "value") + currentValue, min, max);
|
|
282
258
|
if (newValue !== currentValue) {
|
|
259
|
+
const stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);
|
|
283
260
|
this._updateHandleAndProgress(newValue);
|
|
284
261
|
this.value = newValue;
|
|
285
|
-
this.tooltipValue = this.value.
|
|
262
|
+
this.tooltipValue = this.value.toFixed(stepPrecision);
|
|
286
263
|
this.updateStateStorageAndFireInputEvent("value");
|
|
287
264
|
}
|
|
288
265
|
}
|
|
@@ -296,19 +273,8 @@ let Slider = Slider_1 = class Slider extends SliderBase {
|
|
|
296
273
|
get tooltip() {
|
|
297
274
|
return this.getDomRef()?.querySelector("[ui5-slider-tooltip]");
|
|
298
275
|
}
|
|
299
|
-
get styles() {
|
|
300
|
-
return {
|
|
301
|
-
progress: {
|
|
302
|
-
"width": `${this._handlePositionFromStart}%`,
|
|
303
|
-
"border": this._handlePositionFromStart === 0 ? "none" : "",
|
|
304
|
-
},
|
|
305
|
-
handle: {
|
|
306
|
-
[this.directionStart]: `${this._handlePositionFromStart}%`,
|
|
307
|
-
},
|
|
308
|
-
};
|
|
309
|
-
}
|
|
310
276
|
get _sliderHandle() {
|
|
311
|
-
return this.shadowRoot.querySelector("
|
|
277
|
+
return this.shadowRoot.querySelector("[ui5-slider-handle]");
|
|
312
278
|
}
|
|
313
279
|
get _ariaDisabled() {
|
|
314
280
|
return this.disabled || undefined;
|
|
@@ -322,21 +288,28 @@ let Slider = Slider_1 = class Slider extends SliderBase {
|
|
|
322
288
|
get _ariaLabelledByInputText() {
|
|
323
289
|
return Slider_1.i18nBundle.getText(SLIDER_TOOLTIP_INPUT_LABEL);
|
|
324
290
|
}
|
|
291
|
+
// TODO: Refactor these methods after RangeSlider is refactored
|
|
325
292
|
get tickmarksObject() {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
293
|
+
return [];
|
|
294
|
+
}
|
|
295
|
+
_onkeydown(e) {
|
|
296
|
+
const target = e.target;
|
|
297
|
+
if (isF2(e) && target.hasAttribute("ui5-slider-handle")) {
|
|
298
|
+
target.parentNode.querySelector("[ui5-slider-tooltip]").focus();
|
|
330
299
|
}
|
|
331
|
-
|
|
332
|
-
|
|
300
|
+
if (SliderBase._isActionKey(e) && target && !target.hasAttribute("ui5-slider-tooltip")) {
|
|
301
|
+
e.preventDefault();
|
|
302
|
+
this._isUserInteraction = true;
|
|
303
|
+
this._handleActionKeyPress(e);
|
|
333
304
|
}
|
|
334
|
-
return arr;
|
|
335
305
|
}
|
|
336
306
|
};
|
|
337
307
|
__decorate([
|
|
338
308
|
property({ type: Number })
|
|
339
309
|
], Slider.prototype, "value", void 0);
|
|
310
|
+
__decorate([
|
|
311
|
+
property({ type: Number })
|
|
312
|
+
], Slider.prototype, "step", void 0);
|
|
340
313
|
__decorate([
|
|
341
314
|
property()
|
|
342
315
|
], Slider.prototype, "tooltipValueState", void 0);
|
|
@@ -351,6 +324,7 @@ Slider = Slider_1 = __decorate([
|
|
|
351
324
|
tag: "ui5-slider",
|
|
352
325
|
languageAware: true,
|
|
353
326
|
formAssociated: true,
|
|
327
|
+
styles: [styles],
|
|
354
328
|
template: SliderTemplate,
|
|
355
329
|
})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"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isEscape, isF2 } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport type ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport SliderBase from \"./SliderBase.js\";\nimport type SliderTooltip from \"./SliderTooltip.js\";\n\n// Template\nimport SliderTemplate from \"./SliderTemplate.js\";\nimport type { SliderTooltipChangeEventDetails } from \"./SliderTooltip.js\";\n\n// Texts\nimport {\n\tSLIDER_ARIA_DESCRIPTION,\n\tSLIDER_TOOLTIP_INPUT_DESCRIPTION,\n\tSLIDER_TOOLTIP_INPUT_LABEL,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * @class\n *\n * ### Overview\n * The Slider component represents a numerical range and a handle (grip).\n * The purpose of the component is to enable visual selection of a value in\n * a continuous numerical range by moving an adjustable handle.\n *\n * ### Structure\n * The most important properties of the Slider are:\n *\n * - min - The minimum value of the slider range.\n * - max - The maximum value of the slider range.\n * - value - The current value of the slider range.\n * - step - Determines the increments in which the slider will move.\n * - showTooltip - Determines if a tooltip should be displayed above the handle.\n * - showTickmarks - Displays a visual divider between the step values.\n * - labelInterval - Labels some or all of the tickmarks with their values.\n *\n * ### Usage\n * The most common use case is to select values on a continuous numerical scale (e.g. temperature, volume, etc. ).\n *\n * ### Responsive Behavior\n * The `ui5-slider` component adjusts to the size of its parent container by recalculating and\n * resizing the width of the control. You can move the slider handle in several different ways:\n *\n * - Drag and drop the handle to the desired value.\n * - Click/tap on the range bar to move the handle to that location.\n *\n * ### Keyboard Handling\n *\n * - `Left or Down Arrow` - Moves the handle one step to the left, effectively decreasing the component's value by `step` amount;\n * - `Right or Up Arrow` - Moves the handle one step to the right, effectively increasing the component's value by `step` amount;\n * - `Left or Down Arrow + Ctrl/Cmd` - Moves the handle to the left with step equal to 1/10th of the entire range, effectively decreasing the component's value by 1/10th of the range;\n * - `Right or Up Arrow + Ctrl/Cmd` - Moves the handle to the right with step equal to 1/10th of the entire range, effectively increasing the component's value by 1/10th of the range;\n * - `Plus` - Same as `Right or Up Arrow`;\n * - `Minus` - Same as `Left or Down Arrow`;\n * - `Home` - Moves the handle to the beginning of the range;\n * - `End` - Moves the handle to the end of the range;\n * - `Page Up` - Same as `Right or Up + Ctrl/Cmd`;\n * - `Page Down` - Same as `Left or Down + Ctrl/Cmd`;\n * - `Escape` - Resets the value property after interaction, to the position prior the component's focusing;\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Slider.js\";`\n * @constructor\n * @extends SliderBase\n * @since 1.0.0-rc.11\n * @public\n * @csspart progress-container - Used to style the progress container, the horizontal bar that visually represents the range between the minimum and maximum values, of the `ui5-slider`.\n * @csspart progress-bar - Used to style the progress bar, which shows the progress of the `ui5-slider`.\n * @csspart handle - Used to style the handle of the `ui5-slider`.\n */\n@customElement({\n\ttag: \"ui5-slider\",\n\tlanguageAware: true,\n\tformAssociated: true,\n\ttemplate: SliderTemplate,\n})\nclass Slider extends SliderBase implements IFormInputElement {\n\t/**\n\t * Current value of the slider\n\t * @default 0\n\t * @formEvents change input\n\t * @formProperty\n\t * @public\n\t */\n\t@property({ type: Number })\n\tvalue = 0;\n\n\t@property()\n\ttooltipValueState: `${ValueState}` = \"None\";\n\n\t@property()\n\ttooltipValue = \"\";\n\n\t_valueInitial?: number;\n\t_valueOnInteractionStart?: number;\n\t_progressPercentage = 0;\n\t_handlePositionFromStart = 0;\n\t_lastValidInputValue: string;\n\n\tget formFormattedValue() {\n\t\treturn this.value.toString();\n\t}\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._stateStorage.value = undefined;\n\t\tthis._lastValidInputValue = this.min.toString();\n\t}\n\n\t/**\n\t *\n\t * Check if the previously saved state is outdated. That would mean\n\t * either it is the initial rendering or that a property has been changed\n\t * programmatically - because the previous state is always updated in\n\t * the interaction handlers.\n\t *\n\t * Normalize current properties, update the previously stored state.\n\t * Update the visual UI representation of the Slider.\n\t *\n\t */\n\tonBeforeRendering() {\n\t\tif (!this.isCurrentStateOutdated()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.notResized = true;\n\t\tthis.syncUIAndState();\n\t\tthis._updateHandleAndProgress(this.value);\n\t}\n\n\tonAfterRendering(): void {\n\t\tsuper.onAfterRendering();\n\n\t\tthis.tooltip?.repositionTooltip();\n\t}\n\n\tsyncUIAndState() {\n\t\t// Validate step and update the stored state for the step property.\n\t\tif (this.isPropertyUpdated(\"step\")) {\n\t\t\tthis._validateStep(this.step);\n\t\t\tthis.storePropertyState(\"step\");\n\t\t}\n\n\t\t// Recalculate the tickmarks and labels and update the stored state.\n\t\tif (this.isPropertyUpdated(\"min\", \"max\", \"value\")) {\n\t\t\tthis.storePropertyState(\"min\", \"max\");\n\n\t\t\t// Here the value props are changed programmatically (not by user interaction)\n\t\t\t// and it won't be \"stepified\" (rounded to the nearest step). 'Clip' them within\n\t\t\t// min and max bounderies and update the previous state reference.\n\t\t\tthis.value = SliderBase.clipValue(this.value, this._effectiveMin, this._effectiveMax);\n\t\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t\t\tthis.storePropertyState(\"value\");\n\t\t}\n\n\t\t// Labels must be updated if any of the min/max/step/labelInterval props are changed\n\t\tif (this.labelInterval && this.showTickmarks) {\n\t\t\tthis._createLabels();\n\t\t}\n\n\t\t// Update the stored state for the labelInterval, if changed\n\t\tif (this.isPropertyUpdated(\"labelInterval\")) {\n\t\t\tthis.storePropertyState(\"labelInterval\");\n\t\t}\n\t}\n\n\t/**\n\t * Called when the user starts interacting with the slider\n\t * @private\n\t */\n\t_onmousedown(e: TouchEvent | MouseEvent) {\n\t\t// If step is 0 no interaction is available because there is no constant\n\t\t// (equal for all user environments) quantitative representation of the value\n\t\tif (this.disabled || this.step === 0 || (e.target as HTMLElement).hasAttribute(\"ui5-slider-tooltip\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst newValue = this.handleDownBase(e);\n\t\tthis._valueOnInteractionStart = this.value;\n\n\t\t// Set initial value if one is not set previously on focus in.\n\t\t// It will be restored if ESC key is pressed.\n\t\tif (this._valueInitial === undefined) {\n\t\t\tthis._valueInitial = this.value;\n\t\t}\n\n\t\t// Do not yet update the Slider if press is over a handle. It will be updated if the user drags the mouse.\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tif (!this._isHandlePressed(ctor.getPageXValueFromEvent(e))) {\n\t\t\tthis._updateHandleAndProgress(newValue);\n\t\t\tthis.value = newValue;\n\t\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t\t}\n\t}\n\n\t_onfocusin() {\n\t\t// Set initial value if one is not set previously on focus in.\n\t\t// It will be restored if ESC key is pressed.\n\t\tif (this._valueInitial === undefined) {\n\t\t\tthis._valueInitial = this.value;\n\t\t}\n\n\t\tif (this.showTooltip) {\n\t\t\tthis._tooltipsOpen = true;\n\t\t}\n\t}\n\n\t_onfocusout(e: FocusEvent) {\n\t\t// Prevent focusout when the focus is getting set within the slider internal\n\t\t// element (on the handle), before the Slider' customElement itself is finished focusing\n\t\tif (this._isFocusing()) {\n\t\t\tthis._preventFocusOut();\n\t\t\treturn;\n\t\t}\n\n\t\t// Reset focus state and the stored Slider's initial\n\t\t// value that was saved when it was first focused in\n\t\tthis._valueInitial = undefined;\n\n\t\tif (this.showTooltip && !(e.relatedTarget as HTMLElement)?.hasAttribute(\"ui5-slider-tooltip\")) {\n\t\t\tthis._tooltipsOpen = false;\n\t\t}\n\t}\n\n\t_onTooltipChange(e: CustomEvent<SliderTooltipChangeEventDetails>) {\n\t\tconst value = parseFloat(e.detail.value);\n\t\tconst isInvalid = value < this._effectiveMin || value > this._effectiveMax;\n\n\t\tif (isInvalid) {\n\t\t\tthis.tooltipValueState = \"Negative\";\n\t\t\tthis.tooltipValue = `${value}`;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.value = value;\n\t\tthis.fireDecoratorEvent(\"change\");\n\t}\n\n\t_onTooltipFocusChange() {\n\t\tconst value = parseFloat(this.tooltipValue);\n\t\tconst isInvalid = value < this._effectiveMin || value > this._effectiveMax;\n\n\t\tif (isInvalid) {\n\t\t\tthis.tooltipValueState = \"None\";\n\t\t\tthis.tooltipValue = this.value.toString();\n\t\t}\n\t}\n\n\t_onTooltipKeydown(e: KeyboardEvent) {\n\t\tif (isF2(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._sliderHandle.focus();\n\t\t}\n\t}\n\n\t_onTooltipOpen() {\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this._effectiveStep);\n\t\tthis.tooltipValue = this.value.toFixed(stepPrecision);\n\t}\n\n\t_onTooltipInput(e: CustomEvent) {\n\t\tthis.tooltipValue = e.detail.value;\n\t}\n\n\t/**\n\t * Called when the user moves the slider\n\t * @private\n\t */\n\t_handleMove(e: TouchEvent | MouseEvent) {\n\t\te.preventDefault();\n\n\t\t// If step is 0 no interaction is available because there is no constant\n\t\t// (equal for all user environments) quantitative representation of the value\n\t\tif (this.disabled || this._effectiveStep === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst newValue = ctor.getValueFromInteraction(e, this._effectiveStep, this._effectiveMin, this._effectiveMax, this.getBoundingClientRect(), this.directionStart);\n\n\t\tthis._updateHandleAndProgress(newValue);\n\t\tthis.value = newValue;\n\t\tthis.tooltipValue = newValue.toString();\n\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t}\n\n\t/** Called when the user finish interacting with the slider\n\t * @private\n\t */\n\t_handleUp() {\n\t\tif (this._valueOnInteractionStart !== this.value) {\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t}\n\n\t\tthis.handleUpBase();\n\t\tthis._valueOnInteractionStart = undefined;\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tconst isActionKey = SliderBase._isActionKey(e);\n\n\t\tthis._onKeyupBase();\n\n\t\tif (isActionKey && this._valueOnInteractionStart !== this.value) {\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t}\n\n\t\tthis._valueOnInteractionStart = this.value;\n\t}\n\n\t/** Determines if the press is over the handle\n\t * @private\n\t */\n\t_isHandlePressed(clientX: number) {\n\t\tconst sliderHandleDomRect = this._sliderHandle.getBoundingClientRect();\n\t\treturn clientX >= sliderHandleDomRect.left && clientX <= sliderHandleDomRect.right;\n\t}\n\n\t/** Updates the UI representation of the progress bar and handle position\n\t * @private\n\t */\n\t_updateHandleAndProgress(newValue: number) {\n\t\tconst max = this._effectiveMax;\n\t\tconst min = this._effectiveMin;\n\n\t\t// The progress (completed) percentage of the slider.\n\t\tthis._progressPercentage = (newValue - min) / (max - min);\n\t\t// How many pixels from the left end of the slider will be the placed the affected by the user action handle\n\t\tthis._handlePositionFromStart = this._progressPercentage * 100;\n\t}\n\n\t_handleActionKeyPress(e: KeyboardEvent) {\n\t\tconst min = this._effectiveMin;\n\t\tconst max = this._effectiveMax;\n\t\tconst currentValue = this.value;\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst newValue = isEscape(e) ? this._valueInitial : ctor.clipValue(this._handleActionKeyPressBase(e, \"value\") + currentValue, min, max);\n\n\t\tif (newValue !== currentValue) {\n\t\t\tthis._updateHandleAndProgress(newValue!);\n\t\t\tthis.value = newValue!;\n\t\t\tthis.tooltipValue = this.value.toString();\n\t\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t\t}\n\t}\n\n\t_onTooltopForwardFocus(e: CustomEvent) {\n\t\tconst tooltip = e.target as SliderTooltip;\n\n\t\ttooltip.followRef?.focus();\n\t}\n\n\tget inputValue() {\n\t\treturn this.value.toString();\n\t}\n\n\tget tooltip() {\n\t\treturn this.getDomRef()?.querySelector<SliderTooltip>(\"[ui5-slider-tooltip]\");\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\tprogress: {\n\t\t\t\t\"width\": `${this._handlePositionFromStart}%`,\n\t\t\t\t\"border\": this._handlePositionFromStart === 0 ? \"none\" : \"\",\n\t\t\t},\n\t\t\thandle: {\n\t\t\t\t[this.directionStart]: `${this._handlePositionFromStart}%`,\n\t\t\t},\n\t\t};\n\t}\n\n\tget _sliderHandle() : HTMLElement {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-slider-handle\")!;\n\t}\n\n\tget _ariaDisabled() {\n\t\treturn this.disabled || undefined;\n\t}\n\n\tget _ariaLabelledByText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_ARIA_DESCRIPTION);\n\t}\n\n\tget _ariaDescribedByInputText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_TOOLTIP_INPUT_DESCRIPTION);\n\t}\n\n\tget _ariaLabelledByInputText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_TOOLTIP_INPUT_LABEL);\n\t}\n\n\tget tickmarksObject() {\n\t\tconst count = this._tickmarksCount;\n\t\tconst arr = [];\n\n\t\tif (this._hiddenTickmarks) {\n\t\t\treturn [true, false];\n\t\t}\n\n\t\tfor (let i = 0; i <= count; i++) {\n\t\t\tarr.push(this._effectiveMin + (i * this.step) <= this.value);\n\t\t}\n\n\t\treturn arr;\n\t}\n}\n\nSlider.define();\n\nexport default Slider;\n"]}
|
|
1
|
+
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../src/Slider.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAGtE,OAAO,UAAU,MAAM,iB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;gCACG;AAtCzB,MAAM;IAPX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;QACpB,MAAM,EAAE,CAAC,MAAM,CAAC;QAChB,QAAQ,EAAE,cAAc;KACxB,CAAC;GACI,MAAM,CA2SX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isEscape, isF2 } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport type ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport SliderBase from \"./SliderBase.js\";\nimport type SliderTooltip from \"./SliderTooltip.js\";\n\n// Template\nimport SliderTemplate from \"./SliderTemplate.js\";\nimport type { SliderTooltipChangeEventDetails } from \"./SliderTooltip.js\";\nimport styles from \"./generated/themes/Slider.css.js\";\n\n// Texts\nimport {\n\tSLIDER_ARIA_DESCRIPTION,\n\tSLIDER_TOOLTIP_INPUT_DESCRIPTION,\n\tSLIDER_TOOLTIP_INPUT_LABEL,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * @class\n *\n * ### Overview\n * The Slider component represents a numerical range and a handle (grip).\n * The purpose of the component is to enable visual selection of a value in\n * a continuous numerical range by moving an adjustable handle.\n *\n * ### Structure\n * The most important properties of the Slider are:\n *\n * - min - The minimum value of the slider range.\n * - max - The maximum value of the slider range.\n * - value - The current value of the slider range.\n * - step - Determines the increments in which the slider will move.\n * - showTooltip - Determines if a tooltip should be displayed above the handle.\n * - showTickmarks - Displays a visual divider between the step values.\n * - labelInterval - Labels some or all of the tickmarks with their values.\n *\n * ### Usage\n * The most common use case is to select values on a continuous numerical scale (e.g. temperature, volume, etc. ).\n *\n * ### Responsive Behavior\n * The `ui5-slider` component adjusts to the size of its parent container by recalculating and\n * resizing the width of the control. You can move the slider handle in several different ways:\n *\n * - Drag and drop the handle to the desired value.\n * - Click/tap on the range bar to move the handle to that location.\n *\n * ### Keyboard Handling\n *\n * - `Left or Down Arrow` - Moves the handle one step to the left, effectively decreasing the component's value by `step` amount;\n * - `Right or Up Arrow` - Moves the handle one step to the right, effectively increasing the component's value by `step` amount;\n * - `Left or Down Arrow + Ctrl/Cmd` - Moves the handle to the left with step equal to 1/10th of the entire range, effectively decreasing the component's value by 1/10th of the range;\n * - `Right or Up Arrow + Ctrl/Cmd` - Moves the handle to the right with step equal to 1/10th of the entire range, effectively increasing the component's value by 1/10th of the range;\n * - `Plus` - Same as `Right or Up Arrow`;\n * - `Minus` - Same as `Left or Down Arrow`;\n * - `Home` - Moves the handle to the beginning of the range;\n * - `End` - Moves the handle to the end of the range;\n * - `Page Up` - Same as `Right or Up + Ctrl/Cmd`;\n * - `Page Down` - Same as `Left or Down + Ctrl/Cmd`;\n * - `Escape` - Resets the value property after interaction, to the position prior the component's focusing;\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Slider.js\";`\n * @constructor\n * @extends SliderBase\n * @since 1.0.0-rc.11\n * @public\n * @csspart progress-container - Used to style the progress container, the horizontal bar that visually represents the range between the minimum and maximum values, of the `ui5-slider`.\n * @csspart progress-bar - Used to style the progress bar, which shows the progress of the `ui5-slider`.\n * @csspart handle - Used to style the handle of the `ui5-slider`.\n */\n@customElement({\n\ttag: \"ui5-slider\",\n\tlanguageAware: true,\n\tformAssociated: true,\n\tstyles: [styles],\n\ttemplate: SliderTemplate,\n})\nclass Slider extends SliderBase implements IFormInputElement {\n\t/**\n\t * Current value of the slider\n\t * @default 0\n\t * @formEvents change input\n\t * @formProperty\n\t * @public\n\t */\n\t@property({ type: Number })\n\tvalue = 0;\n\n\t/**\n\t * Defines the size of the slider's selection intervals (e.g. min = 0, max = 10, step = 5 would result in possible selection of the values 0, 5, 10).\n\t *\n\t * **Note:** If set to 0 the slider handle movement is disabled.\n\t * @default 1\n\t * @public\n\t */\n\t@property({ type: Number })\n\tstep = 1;\n\n\t@property()\n\ttooltipValueState: `${ValueState}` = \"None\";\n\n\t@property()\n\ttooltipValue = \"\";\n\n\t_valueInitial?: number;\n\t_valueOnInteractionStart?: number;\n\t_progressPercentage = 0;\n\t_handlePositionFromStart = 0;\n\t_lastValidInputValue: string;\n\n\tget formFormattedValue() {\n\t\treturn this.value.toString();\n\t}\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._lastValidInputValue = this.min.toString();\n\t}\n\n\t/**\n\t * The value is visually clamped to min/max but the property is not modified.\n\t * @private\n\t */\n\tonBeforeRendering() {\n\t\t// Clamp value visually without modifying the actual value property\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst clampedValue = ctor.clipValue(this.value, this.min, this.max);\n\t\tthis._updateHandleAndProgress(clampedValue);\n\t}\n\n\tonAfterRendering(): void {\n\t\tsuper.onAfterRendering();\n\n\t\tthis.tooltip?.repositionTooltip();\n\t}\n\n\t_handleResize() {\n\t\t// TODO: Remove after refactoring Base and RangeSlider\n\t}\n\n\t/**\n\t * Called when the user starts interacting with the slider\n\t * @private\n\t */\n\t_onmousedown(e: TouchEvent | MouseEvent) {\n\t\t// If step is 0 no interaction is available because there is no constant\n\t\t// (equal for all user environments) quantitative representation of the value\n\t\tif (this.disabled || this.step === 0 || (e.target as HTMLElement).hasAttribute(\"ui5-slider-tooltip\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst newValue = this.handleDownBase(e);\n\t\tthis._valueOnInteractionStart = this.value;\n\n\t\t// Set initial value if one is not set previously on focus in.\n\t\t// It will be restored if ESC key is pressed.\n\t\tif (this._valueInitial === undefined) {\n\t\t\tthis._valueInitial = this.value;\n\t\t}\n\n\t\t// Do not yet update the Slider if press is over a handle. It will be updated if the user drags the mouse.\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tif (!this._isHandlePressed(ctor.getPageXValueFromEvent(e))) {\n\t\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);\n\t\t\tthis._updateHandleAndProgress(newValue);\n\t\t\tthis.value = newValue;\n\t\t\tthis.tooltipValue = newValue.toFixed(stepPrecision);\n\t\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t\t}\n\t}\n\n\t_onfocusin() {\n\t\t// Set initial value if one is not set previously on focus in.\n\t\t// It will be restored if ESC key is pressed.\n\t\tif (this._valueInitial === undefined) {\n\t\t\tthis._valueInitial = this.value;\n\t\t}\n\n\t\tif (this.showTooltip) {\n\t\t\tthis._tooltipsOpen = true;\n\t\t}\n\t}\n\n\t_onfocusout(e: FocusEvent) {\n\t\t// Prevent focusout when the focus is getting set within the slider internal\n\t\t// element (on the handle), before the Slider' customElement itself is finished focusing\n\t\tif (this._isFocusing()) {\n\t\t\tthis._preventFocusOut();\n\t\t\treturn;\n\t\t}\n\n\t\t// Reset focus state and the stored Slider's initial\n\t\t// value that was saved when it was first focused in\n\t\tthis._valueInitial = undefined;\n\n\t\tif (this.showTooltip && !(e.relatedTarget as HTMLElement)?.hasAttribute(\"ui5-slider-tooltip\")) {\n\t\t\tthis._tooltipsOpen = false;\n\t\t}\n\t}\n\n\t_onTooltipChange(e: CustomEvent<SliderTooltipChangeEventDetails>) {\n\t\tconst value = parseFloat(e.detail.value);\n\t\tconst isInvalid = (value < this.min || value > this.max) || Number.isNaN(value);\n\n\t\tif (isInvalid) {\n\t\t\tthis.tooltipValueState = \"Negative\";\n\t\t\tthis.tooltipValue = `${value}`;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.tooltipValueState = \"None\";\n\t\tthis.value = value;\n\t\tthis.fireDecoratorEvent(\"change\");\n\t}\n\n\t_onTooltipFocusChange() {\n\t\tconst value = parseFloat(this.tooltipValue);\n\t\tconst isInvalid = (value < this.min || value > this.max) || Number.isNaN(value);\n\n\t\tif (isInvalid) {\n\t\t\tthis.tooltipValueState = \"None\";\n\t\t\tthis.tooltipValue = this.value.toString();\n\t\t}\n\t}\n\n\t_onTooltipKeydown(e: KeyboardEvent) {\n\t\tif (isF2(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._sliderHandle.focus();\n\t\t}\n\t}\n\n\t_onTooltipOpen() {\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);\n\t\tthis.tooltipValue = this.value.toFixed(stepPrecision);\n\t}\n\n\t_onTooltipInput(e: CustomEvent) {\n\t\tthis.tooltipValue = e.detail.value;\n\t}\n\n\t/**\n\t * Called when the user moves the slider\n\t * @private\n\t */\n\t_handleMove(e: TouchEvent | MouseEvent) {\n\t\te.preventDefault();\n\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst newValue = ctor.getValueFromInteraction(e, this.step, this.min, this.max, this.getBoundingClientRect(), this.directionStart);\n\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);\n\n\t\tthis._updateHandleAndProgress(newValue);\n\t\tthis.value = newValue;\n\t\tthis.tooltipValue = newValue.toFixed(stepPrecision);\n\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t}\n\n\t/** Called when the user finish interacting with the slider\n\t * @private\n\t */\n\t_handleUp() {\n\t\tif (this._valueOnInteractionStart !== this.value) {\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t}\n\n\t\tthis.handleUpBase();\n\t\tthis._valueOnInteractionStart = undefined;\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tconst isActionKey = SliderBase._isActionKey(e);\n\n\t\tthis._onKeyupBase();\n\n\t\tif (isActionKey && this._valueOnInteractionStart !== this.value) {\n\t\t\tthis.fireDecoratorEvent(\"change\");\n\t\t}\n\n\t\tthis._valueOnInteractionStart = this.value;\n\t}\n\n\t/** Determines if the press is over the handle\n\t * @private\n\t */\n\t_isHandlePressed(clientX: number) {\n\t\tconst sliderHandleDomRect = this._sliderHandle.getBoundingClientRect();\n\t\treturn clientX >= sliderHandleDomRect.left && clientX <= sliderHandleDomRect.right;\n\t}\n\n\t/** Updates the UI representation of the progress bar and handle position\n\t * @private\n\t */\n\t_updateHandleAndProgress(newValue: number) {\n\t\tconst max = this.max;\n\t\tconst min = this.min;\n\n\t\t// The progress (completed) percentage of the slider.\n\t\tthis._progressPercentage = (newValue - min) / (max - min);\n\t\t// How many pixels from the left end of the slider will be the placed the affected by the user action handle\n\t\tthis._handlePositionFromStart = this._progressPercentage * 100;\n\t}\n\n\t_handleActionKeyPress(e: KeyboardEvent) {\n\t\tconst min = this.min;\n\t\tconst max = this.max;\n\t\tconst currentValue = this.value;\n\t\tconst ctor = this.constructor as typeof Slider;\n\t\tconst newValue = isEscape(e) ? this._valueInitial : ctor.clipValue(this._handleActionKeyPressBase(e, \"value\") + currentValue, min, max);\n\n\t\tif (newValue !== currentValue) {\n\t\t\tconst stepPrecision = ctor._getDecimalPrecisionOfNumber(this.step);\n\t\t\tthis._updateHandleAndProgress(newValue!);\n\t\t\tthis.value = newValue!;\n\t\t\tthis.tooltipValue = this.value.toFixed(stepPrecision);\n\t\t\tthis.updateStateStorageAndFireInputEvent(\"value\");\n\t\t}\n\t}\n\n\t_onTooltopForwardFocus(e: CustomEvent) {\n\t\tconst tooltip = e.target as SliderTooltip;\n\n\t\ttooltip.followRef?.focus();\n\t}\n\n\tget inputValue() {\n\t\treturn this.value.toString();\n\t}\n\n\tget tooltip() {\n\t\treturn this.getDomRef()?.querySelector<SliderTooltip>(\"[ui5-slider-tooltip]\");\n\t}\n\n\tget _sliderHandle() : HTMLElement {\n\t\treturn this.shadowRoot!.querySelector(\"[ui5-slider-handle]\")!;\n\t}\n\n\tget _ariaDisabled() {\n\t\treturn this.disabled || undefined;\n\t}\n\n\tget _ariaLabelledByText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_ARIA_DESCRIPTION);\n\t}\n\n\tget _ariaDescribedByInputText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_TOOLTIP_INPUT_DESCRIPTION);\n\t}\n\n\tget _ariaLabelledByInputText() {\n\t\treturn Slider.i18nBundle.getText(SLIDER_TOOLTIP_INPUT_LABEL);\n\t}\n\n\t// TODO: Refactor these methods after RangeSlider is refactored\n\tget tickmarksObject() {\n\t\treturn [];\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (isF2(e) && target.hasAttribute(\"ui5-slider-handle\")) {\n\t\t\t(target.parentNode!.querySelector(\"[ui5-slider-tooltip]\") as HTMLElement).focus();\n\t\t}\n\n\t\tif (SliderBase._isActionKey(e) && target && !target.hasAttribute(\"ui5-slider-tooltip\")) {\n\t\t\te.preventDefault();\n\n\t\t\tthis._isUserInteraction = true;\n\t\t\tthis._handleActionKeyPress(e);\n\t\t}\n\t}\n}\n\nSlider.define();\n\nexport default Slider;\n"]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import type { SliderScaleOrientation } from "./SliderScale.js";
|
|
3
|
+
/**
|
|
4
|
+
* @class
|
|
5
|
+
* The <code>ui5-slider-handle</code> component represents the handle of the <code>ui5-slider</code> component.
|
|
6
|
+
*
|
|
7
|
+
* @constructor
|
|
8
|
+
* @extends UI5Element
|
|
9
|
+
* @since 2.19.0
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
declare class SliderHandle extends UI5Element {
|
|
13
|
+
/**
|
|
14
|
+
* Defines the value of the slider handle.
|
|
15
|
+
* <br><br>
|
|
16
|
+
* <b>Note:</b> The value should be between the <code>min</code> and <code>max</code> properties of the parent <code>ui5-slider</code>.
|
|
17
|
+
* @since 2.19.0
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
value: number;
|
|
21
|
+
/**
|
|
22
|
+
* Defines the minimum value of the slider handle.
|
|
23
|
+
* <br><br>
|
|
24
|
+
* <b>Note:</b> The value should be less than the <code>max</code> property of the parent <code>ui5-slider</code>.
|
|
25
|
+
* @since 2.19.0
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
min: number;
|
|
29
|
+
/**
|
|
30
|
+
* Defines the maximum value of the slider handle.
|
|
31
|
+
* <br><br>
|
|
32
|
+
* <b>Note:</b> The value should be greater than the <code>min</code> property of the parent <code>ui5-slider</code>.
|
|
33
|
+
* @since 2.19.0
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
max: number;
|
|
37
|
+
/**
|
|
38
|
+
* Defines whether the slider handle is disabled.
|
|
39
|
+
* <br><br>
|
|
40
|
+
* <b>Note:</b> A disabled slider handle cannot be interacted with.
|
|
41
|
+
* @since 2.19.0
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
disabled: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Defines whether the slider handle is active.
|
|
47
|
+
* <br><br>
|
|
48
|
+
* <b>Note:</b> An active slider handle is currently being interacted with.
|
|
49
|
+
* @since 2.19.0
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
active: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Defines the orientation of the slider handle.
|
|
55
|
+
*
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
orientation: `${SliderScaleOrientation}`;
|
|
59
|
+
getFocusDomRef(): HTMLElement | undefined;
|
|
60
|
+
}
|
|
61
|
+
export default SliderHandle;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
8
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
9
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
10
|
+
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
11
|
+
import SliderHandleTemplate from "./SliderHandleTemplate.js";
|
|
12
|
+
import styles from "./generated/themes/SliderHandle.css.js";
|
|
13
|
+
/**
|
|
14
|
+
* @class
|
|
15
|
+
* The <code>ui5-slider-handle</code> component represents the handle of the <code>ui5-slider</code> component.
|
|
16
|
+
*
|
|
17
|
+
* @constructor
|
|
18
|
+
* @extends UI5Element
|
|
19
|
+
* @since 2.19.0
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
22
|
+
let SliderHandle = class SliderHandle extends UI5Element {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
/**
|
|
26
|
+
* Defines the value of the slider handle.
|
|
27
|
+
* <br><br>
|
|
28
|
+
* <b>Note:</b> The value should be between the <code>min</code> and <code>max</code> properties of the parent <code>ui5-slider</code>.
|
|
29
|
+
* @since 2.19.0
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
this.value = 0;
|
|
33
|
+
/**
|
|
34
|
+
* Defines the minimum value of the slider handle.
|
|
35
|
+
* <br><br>
|
|
36
|
+
* <b>Note:</b> The value should be less than the <code>max</code> property of the parent <code>ui5-slider</code>.
|
|
37
|
+
* @since 2.19.0
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
this.min = 0;
|
|
41
|
+
/**
|
|
42
|
+
* Defines the maximum value of the slider handle.
|
|
43
|
+
* <br><br>
|
|
44
|
+
* <b>Note:</b> The value should be greater than the <code>min</code> property of the parent <code>ui5-slider</code>.
|
|
45
|
+
* @since 2.19.0
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
this.max = 100;
|
|
49
|
+
/**
|
|
50
|
+
* Defines whether the slider handle is disabled.
|
|
51
|
+
* <br><br>
|
|
52
|
+
* <b>Note:</b> A disabled slider handle cannot be interacted with.
|
|
53
|
+
* @since 2.19.0
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
this.disabled = false;
|
|
57
|
+
/**
|
|
58
|
+
* Defines whether the slider handle is active.
|
|
59
|
+
* <br><br>
|
|
60
|
+
* <b>Note:</b> An active slider handle is currently being interacted with.
|
|
61
|
+
* @since 2.19.0
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
this.active = false;
|
|
65
|
+
/**
|
|
66
|
+
* Defines the orientation of the slider handle.
|
|
67
|
+
*
|
|
68
|
+
* @private
|
|
69
|
+
*/
|
|
70
|
+
this.orientation = "Horizontal";
|
|
71
|
+
}
|
|
72
|
+
getFocusDomRef() {
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
__decorate([
|
|
77
|
+
property({ type: Number })
|
|
78
|
+
], SliderHandle.prototype, "value", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
property({ type: Number })
|
|
81
|
+
], SliderHandle.prototype, "min", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
property({ type: Number })
|
|
84
|
+
], SliderHandle.prototype, "max", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
property({ type: Boolean })
|
|
87
|
+
], SliderHandle.prototype, "disabled", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
property({ type: Boolean })
|
|
90
|
+
], SliderHandle.prototype, "active", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
property()
|
|
93
|
+
], SliderHandle.prototype, "orientation", void 0);
|
|
94
|
+
SliderHandle = __decorate([
|
|
95
|
+
customElement({
|
|
96
|
+
tag: "ui5-slider-handle",
|
|
97
|
+
renderer: jsxRenderer,
|
|
98
|
+
template: SliderHandleTemplate,
|
|
99
|
+
styles,
|
|
100
|
+
})
|
|
101
|
+
], SliderHandle);
|
|
102
|
+
SliderHandle.define();
|
|
103
|
+
export default SliderHandle;
|
|
104
|
+
//# sourceMappingURL=SliderHandle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliderHandle.js","sourceRoot":"","sources":["../src/SliderHandle.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,oBAAoB,MAAM,2BAA2B,CAAC;AAC7D,OAAO,MAAM,MAAM,wCAAwC,CAAC;AAG5D;;;;;;;;GAQG;AAOH,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAArC;;QACC;;;;;;WAMG;QAEH,UAAK,GAAG,CAAC,CAAC;QAEV;;;;;;WAMG;QAEH,QAAG,GAAG,CAAC,CAAC;QAER;;;;;;WAMG;QAEH,QAAG,GAAG,GAAG,CAAC;QAEV;;;;;;WAMG;QAEH,aAAQ,GAAG,KAAK,CAAC;QAEjB;;;;;;WAMG;QAEH,WAAM,GAAG,KAAK,CAAC;QAEf;;;;WAIG;QAEH,gBAAW,GAAgC,YAAY,CAAC;IAKzD,CAAC;IAHA,cAAc;QACb,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAA;AArDA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACjB;AAUV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACnB;AAUR;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACjB;AAUV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CACX;AAUjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CACb;AAQf;IADC,QAAQ,EAAE;iDAC6C;AAzDnD,YAAY;IANjB,aAAa,CAAC;QACd,GAAG,EAAE,mBAAmB;QACxB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,oBAAoB;QAC9B,MAAM;KACN,CAAC;GACI,YAAY,CA8DjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport SliderHandleTemplate from \"./SliderHandleTemplate.js\";\nimport styles from \"./generated/themes/SliderHandle.css.js\";\nimport type { SliderScaleOrientation } from \"./SliderScale.js\";\n\n/**\n * @class\n * The <code>ui5-slider-handle</code> component represents the handle of the <code>ui5-slider</code> component.\n *\n * @constructor\n * @extends UI5Element\n * @since 2.19.0\n * @private\n */\n@customElement({\n\ttag: \"ui5-slider-handle\",\n\trenderer: jsxRenderer,\n\ttemplate: SliderHandleTemplate,\n\tstyles,\n})\nclass SliderHandle extends UI5Element {\n\t/**\n\t * Defines the value of the slider handle.\n\t * <br><br>\n\t * <b>Note:</b> The value should be between the <code>min</code> and <code>max</code> properties of the parent <code>ui5-slider</code>.\n\t * @since 2.19.0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tvalue = 0;\n\n\t/**\n\t * Defines the minimum value of the slider handle.\n\t * <br><br>\n\t * <b>Note:</b> The value should be less than the <code>max</code> property of the parent <code>ui5-slider</code>.\n\t * @since 2.19.0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmin = 0;\n\n\t/**\n\t * Defines the maximum value of the slider handle.\n\t * <br><br>\n\t * <b>Note:</b> The value should be greater than the <code>min</code> property of the parent <code>ui5-slider</code>.\n\t * @since 2.19.0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmax = 100;\n\n\t/**\n\t * Defines whether the slider handle is disabled.\n\t * <br><br>\n\t * <b>Note:</b> A disabled slider handle cannot be interacted with.\n\t * @since 2.19.0\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines whether the slider handle is active.\n\t * <br><br>\n\t * <b>Note:</b> An active slider handle is currently being interacted with.\n\t * @since 2.19.0\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tactive = false;\n\n\t/**\n\t * Defines the orientation of the slider handle.\n\t *\n\t * @private\n\t */\n\t@property()\n\torientation: `${SliderScaleOrientation}` = \"Horizontal\";\n\n\tgetFocusDomRef(): HTMLElement | undefined {\n\t\treturn this;\n\t}\n}\n\nSliderHandle.define();\n\nexport default SliderHandle;\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@ui5/webcomponents-base/jsx-runtime";
|
|
2
|
+
import directionArrows from "@ui5/webcomponents-icons/dist/direction-arrows.js";
|
|
3
|
+
import Icon from "./Icon.js";
|
|
4
|
+
export default function SliderHandleTemplate() {
|
|
5
|
+
return (_jsx("div", { class: "ui5-slider-handle-container", children: _jsx(Icon, { name: directionArrows, mode: "Decorative", part: "icon", "slider-icon": true }) }));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=SliderHandleTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliderHandleTemplate.js","sourceRoot":"","sources":["../src/SliderHandleTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,eAAe,MAAM,mDAAmD,CAAC;AAChF,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,MAAM,CAAC,OAAO,UAAU,oBAAoB;IAC3C,OAAO,CACN,cAAK,KAAK,EAAC,6BAA6B,YACvC,KAAC,IAAI,IAAC,IAAI,EAAE,eAAe,EAC1B,IAAI,EAAC,YAAY,EACjB,IAAI,EAAC,MAAM,wBAEJ,GACH,CACN,CAAC;AACH,CAAC","sourcesContent":["import directionArrows from \"@ui5/webcomponents-icons/dist/direction-arrows.js\";\nimport Icon from \"./Icon.js\";\nimport type SliderHandle from \"./SliderHandle.js\";\n\nexport default function SliderHandleTemplate(this: SliderHandle) {\n\treturn (\n\t\t<div class=\"ui5-slider-handle-container\">\n\t\t\t<Icon name={directionArrows}\n\t\t\t\tmode=\"Decorative\"\n\t\t\t\tpart=\"icon\"\n\t\t\t\tslider-icon\n\t\t\t></Icon>\n\t\t</div>\n\t);\n}\n"]}
|