@ui5/webcomponents 2.23.0-rc.1 → 2.23.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 +118 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/ColorPicker.d.ts +2 -0
- package/dist/ColorPicker.js +26 -10
- package/dist/ColorPicker.js.map +1 -1
- package/dist/ColorPickerTemplate.js +2 -2
- package/dist/ColorPickerTemplate.js.map +1 -1
- package/dist/DayPicker.d.ts +3 -1
- package/dist/DayPicker.js +17 -3
- package/dist/DayPicker.js.map +1 -1
- package/dist/DayPickerTemplate.js +1 -1
- package/dist/DayPickerTemplate.js.map +1 -1
- package/dist/ExpandableText.d.ts +2 -0
- package/dist/ExpandableText.js +11 -0
- package/dist/ExpandableText.js.map +1 -1
- package/dist/ExpandableTextTemplate.js +1 -1
- package/dist/ExpandableTextTemplate.js.map +1 -1
- package/dist/Form.d.ts +1 -1
- package/dist/Form.js +1 -1
- package/dist/Form.js.map +1 -1
- package/dist/FormGroup.d.ts +1 -0
- package/dist/FormGroup.js.map +1 -1
- package/dist/FormTemplate.js +1 -1
- package/dist/FormTemplate.js.map +1 -1
- package/dist/ListBoxItemGroupTemplate.js +1 -2
- package/dist/ListBoxItemGroupTemplate.js.map +1 -1
- package/dist/ListItem.d.ts +2 -2
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemBase.d.ts +1 -1
- package/dist/ListItemBase.js +1 -2
- package/dist/ListItemBase.js.map +1 -1
- package/dist/ListItemGroupHeader.d.ts +1 -1
- package/dist/ListItemGroupHeader.js.map +1 -1
- package/dist/PopoverResize.js +1 -1
- package/dist/PopoverResize.js.map +1 -1
- package/dist/Popup.js +8 -3
- package/dist/Popup.js.map +1 -1
- package/dist/RadioButton.d.ts +1 -0
- package/dist/RadioButton.js +1 -0
- package/dist/RadioButton.js.map +1 -1
- package/dist/RadioButtonTemplate.js +1 -1
- package/dist/RadioButtonTemplate.js.map +1 -1
- package/dist/RangeSlider.d.ts +4 -0
- package/dist/RangeSlider.js +32 -8
- package/dist/RangeSlider.js.map +1 -1
- package/dist/RangeSliderTemplate.js +5 -5
- package/dist/RangeSliderTemplate.js.map +1 -1
- package/dist/RatingIndicatorTemplate.js +1 -4
- package/dist/RatingIndicatorTemplate.js.map +1 -1
- package/dist/Select.d.ts +1 -0
- package/dist/Select.js +4 -1
- package/dist/Select.js.map +1 -1
- package/dist/SelectPopoverTemplate.js +3 -3
- package/dist/SelectPopoverTemplate.js.map +1 -1
- package/dist/Slider.d.ts +2 -0
- package/dist/Slider.js +20 -11
- package/dist/Slider.js.map +1 -1
- package/dist/SliderBase.d.ts +28 -0
- package/dist/SliderBase.js +36 -0
- package/dist/SliderBase.js.map +1 -1
- package/dist/SliderScale.js +3 -0
- package/dist/SliderScale.js.map +1 -1
- package/dist/SliderTemplate.js +3 -3
- package/dist/SliderTemplate.js.map +1 -1
- package/dist/Tab.d.ts +0 -1
- package/dist/Tab.js +1 -2
- package/dist/Tab.js.map +1 -1
- package/dist/TabContainer.js +1 -1
- package/dist/TabContainer.js.map +1 -1
- package/dist/TableGroupRow.d.ts +1 -1
- package/dist/TableGroupRow.js +1 -1
- package/dist/TableGroupRow.js.map +1 -1
- package/dist/Tokenizer.js +10 -6
- package/dist/Tokenizer.js.map +1 -1
- package/dist/bundle.esm.js +3 -3
- package/dist/bundle.esm.js.map +1 -1
- package/dist/css/themes/ColorPicker.css +1 -1
- package/dist/css/themes/ExpandableText.css +1 -1
- package/dist/css/themes/Popover.css +1 -1
- package/dist/css/themes/RadioButton.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/ResponsivePopoverCommon.css +1 -1
- package/dist/css/themes/Text.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_auto/parameters-bundle.css +9 -10
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hc_auto/parameters-bundle.css +9 -10
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +184 -312
- package/dist/custom-elements.json +152 -14
- 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_GB.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_auto/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_hc_auto/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/i18n/i18n-defaults.d.ts +2 -1
- package/dist/generated/i18n/i18n-defaults.js +2 -1
- package/dist/generated/i18n/i18n-defaults.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/ExpandableText.css.d.ts +1 -1
- package/dist/generated/themes/ExpandableText.css.js +1 -1
- package/dist/generated/themes/ExpandableText.css.js.map +1 -1
- package/dist/generated/themes/Popover.css.d.ts +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/RadioButton.css.d.ts +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/RatingIndicator.css.d.ts +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/ResponsivePopoverCommon.css.d.ts +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/Text.css.d.ts +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/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_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +9 -10
- package/dist/generated/themes/sap_horizon_auto/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_hc_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js +9 -10
- package/dist/generated/themes/sap_horizon_hc_auto/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 -1
- 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 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/types/ListItemAccessibleRole.d.ts +0 -5
- package/dist/types/ListItemAccessibleRole.js +0 -5
- package/dist/types/ListItemAccessibleRole.js.map +1 -1
- package/dist/vscode.html-custom-data.json +19 -4
- package/dist/web-types.json +30 -6
- package/package.json +9 -9
- package/src/ColorPickerTemplate.tsx +2 -2
- package/src/DayPickerTemplate.tsx +1 -0
- package/src/ExpandableTextTemplate.tsx +1 -1
- package/src/FormTemplate.tsx +1 -1
- package/src/ListBoxItemGroupTemplate.tsx +1 -2
- package/src/RadioButtonTemplate.tsx +1 -0
- package/src/RangeSliderTemplate.tsx +7 -4
- package/src/RatingIndicatorTemplate.tsx +1 -5
- package/src/SelectPopoverTemplate.tsx +12 -6
- package/src/SliderTemplate.tsx +5 -3
- package/src/i18n/messagebundle.properties +3 -0
- package/src/i18n/messagebundle_ar.properties +1 -0
- package/src/i18n/messagebundle_bg.properties +1 -0
- package/src/i18n/messagebundle_ca.properties +1 -0
- package/src/i18n/messagebundle_cnr.properties +1 -0
- package/src/i18n/messagebundle_cs.properties +1 -0
- package/src/i18n/messagebundle_cy.properties +1 -0
- package/src/i18n/messagebundle_da.properties +1 -0
- package/src/i18n/messagebundle_de.properties +1 -0
- package/src/i18n/messagebundle_el.properties +1 -0
- package/src/i18n/messagebundle_en.properties +0 -340
- package/src/i18n/messagebundle_en_GB.properties +1 -0
- package/src/i18n/messagebundle_es.properties +1 -0
- package/src/i18n/messagebundle_es_MX.properties +1 -0
- package/src/i18n/messagebundle_et.properties +1 -0
- package/src/i18n/messagebundle_fi.properties +1 -0
- package/src/i18n/messagebundle_fr.properties +1 -0
- package/src/i18n/messagebundle_fr_CA.properties +1 -0
- package/src/i18n/messagebundle_hi.properties +1 -0
- package/src/i18n/messagebundle_hr.properties +2 -1
- package/src/i18n/messagebundle_hu.properties +1 -0
- package/src/i18n/messagebundle_id.properties +1 -0
- package/src/i18n/messagebundle_it.properties +1 -0
- package/src/i18n/messagebundle_iw.properties +1 -0
- package/src/i18n/messagebundle_ja.properties +1 -0
- package/src/i18n/messagebundle_kk.properties +1 -0
- package/src/i18n/messagebundle_ko.properties +1 -0
- package/src/i18n/messagebundle_lt.properties +1 -0
- package/src/i18n/messagebundle_lv.properties +1 -0
- package/src/i18n/messagebundle_mk.properties +1 -0
- package/src/i18n/messagebundle_ms.properties +1 -0
- package/src/i18n/messagebundle_nl.properties +1 -0
- package/src/i18n/messagebundle_no.properties +1 -0
- package/src/i18n/messagebundle_pl.properties +1 -0
- package/src/i18n/messagebundle_pt.properties +1 -0
- package/src/i18n/messagebundle_pt_PT.properties +1 -0
- package/src/i18n/messagebundle_ro.properties +1 -0
- package/src/i18n/messagebundle_ru.properties +1 -0
- package/src/i18n/messagebundle_sh.properties +1 -0
- package/src/i18n/messagebundle_sk.properties +1 -0
- package/src/i18n/messagebundle_sl.properties +1 -0
- package/src/i18n/messagebundle_sr.properties +1 -0
- package/src/i18n/messagebundle_sv.properties +1 -0
- package/src/i18n/messagebundle_th.properties +1 -0
- package/src/i18n/messagebundle_tr.properties +1 -0
- package/src/i18n/messagebundle_uk.properties +1 -0
- package/src/i18n/messagebundle_vi.properties +1 -0
- package/src/i18n/messagebundle_zh_CN.properties +1 -0
- package/src/i18n/messagebundle_zh_TW.properties +1 -0
- package/src/themes/ColorPicker.css +2 -0
- package/src/themes/ExpandableText.css +8 -0
- package/src/themes/Popover.css +1 -4
- package/src/themes/RadioButton.css +17 -14
- package/src/themes/RatingIndicator.css +0 -1
- package/src/themes/ResponsivePopoverCommon.css +3 -3
- package/src/themes/Text.css +4 -9
- package/src/themes/base/RadioButton-parameters.css +3 -3
- package/src/themes/base/sizes-parameters.css +4 -7
- package/src/themes/sap_horizon/CheckBox-parameters.css +5 -5
- package/src/themes/sap_horizon/RadioButton-parameters.css +2 -2
- package/src/themes/sap_horizon_dark/CheckBox-parameters.css +5 -5
- package/src/themes/sap_horizon_dark/RadioButton-parameters.css +2 -2
- package/src/themes/sap_horizon_hcb/CheckBox-parameters.css +5 -5
- package/src/themes/sap_horizon_hcb/RadioButton-parameters.css +2 -2
- package/src/themes/sap_horizon_hcw/CheckBox-parameters.css +5 -5
- package/src/themes/sap_horizon_hcw/RadioButton-parameters.css +2 -2
package/dist/SliderBase.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
2
|
import type { ResizeObserverCallback } from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js";
|
|
3
|
+
import type { Tickmark } from "./SliderScale.js";
|
|
3
4
|
type StateStorage = {
|
|
4
5
|
[key: string]: number | undefined;
|
|
5
6
|
};
|
|
@@ -48,6 +49,9 @@ declare abstract class SliderBase extends UI5Element {
|
|
|
48
49
|
* **Note:** The step and tickmarks properties must be enabled.
|
|
49
50
|
* Example - if the step value is set to 2 and the label interval is also specified to 2 - then every second
|
|
50
51
|
* tickmark will be labelled, which means every 4th value number.
|
|
52
|
+
*
|
|
53
|
+
* **Note:** This property is ignored when the `tickmarks` property is used.
|
|
54
|
+
* In that case every custom tickmark is labelled with its own `label`.
|
|
51
55
|
* @default 0
|
|
52
56
|
* @public
|
|
53
57
|
*/
|
|
@@ -60,6 +64,24 @@ declare abstract class SliderBase extends UI5Element {
|
|
|
60
64
|
* @public
|
|
61
65
|
*/
|
|
62
66
|
showTickmarks: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Defines custom tickmarks with labels on the slider scale.
|
|
69
|
+
* Each tickmark object has a numeric `value` and an optional `label` string.
|
|
70
|
+
* Tickmarks are purely visual — they display labeled markers at specific positions
|
|
71
|
+
* but do not affect the slider's movement behavior. The slider still moves
|
|
72
|
+
* according to `min`, `max`, and `step`.
|
|
73
|
+
*
|
|
74
|
+
* When the current value matches a tickmark value, the tickmark's label
|
|
75
|
+
* is shown in the tooltip and announced via `aria-valuetext`.
|
|
76
|
+
*
|
|
77
|
+
* **Note:** When `tickmarks` is provided, the scale is automatically shown
|
|
78
|
+
* (equivalent to `showTickmarks`), and `labelInterval` is ignored - every
|
|
79
|
+
* custom tickmark is rendered with its own `label`.
|
|
80
|
+
* @default []
|
|
81
|
+
* @public
|
|
82
|
+
* @since 2.23.0
|
|
83
|
+
*/
|
|
84
|
+
tickmarks: Array<Tickmark>;
|
|
63
85
|
/**
|
|
64
86
|
* Enables handle tooltip displaying the current value.
|
|
65
87
|
* @default false
|
|
@@ -237,6 +259,12 @@ declare abstract class SliderBase extends UI5Element {
|
|
|
237
259
|
* @private
|
|
238
260
|
*/
|
|
239
261
|
static _getDecimalPrecisionOfNumber(value: number): number;
|
|
262
|
+
get _hasCustomTickmarks(): boolean;
|
|
263
|
+
/**
|
|
264
|
+
* Returns the label of the custom tickmark matching the given value, or `undefined` if none matches.
|
|
265
|
+
* @private
|
|
266
|
+
*/
|
|
267
|
+
_getCustomLabel(value: number): string | undefined;
|
|
240
268
|
/**
|
|
241
269
|
* In order to always keep the visual UI representation and the internal
|
|
242
270
|
* state in sync, the component has a 'state storage' that is updated when the
|
package/dist/SliderBase.js
CHANGED
|
@@ -61,6 +61,9 @@ class SliderBase extends UI5Element {
|
|
|
61
61
|
* **Note:** The step and tickmarks properties must be enabled.
|
|
62
62
|
* Example - if the step value is set to 2 and the label interval is also specified to 2 - then every second
|
|
63
63
|
* tickmark will be labelled, which means every 4th value number.
|
|
64
|
+
*
|
|
65
|
+
* **Note:** This property is ignored when the `tickmarks` property is used.
|
|
66
|
+
* In that case every custom tickmark is labelled with its own `label`.
|
|
64
67
|
* @default 0
|
|
65
68
|
* @public
|
|
66
69
|
*/
|
|
@@ -73,6 +76,24 @@ class SliderBase extends UI5Element {
|
|
|
73
76
|
* @public
|
|
74
77
|
*/
|
|
75
78
|
this.showTickmarks = false;
|
|
79
|
+
/**
|
|
80
|
+
* Defines custom tickmarks with labels on the slider scale.
|
|
81
|
+
* Each tickmark object has a numeric `value` and an optional `label` string.
|
|
82
|
+
* Tickmarks are purely visual — they display labeled markers at specific positions
|
|
83
|
+
* but do not affect the slider's movement behavior. The slider still moves
|
|
84
|
+
* according to `min`, `max`, and `step`.
|
|
85
|
+
*
|
|
86
|
+
* When the current value matches a tickmark value, the tickmark's label
|
|
87
|
+
* is shown in the tooltip and announced via `aria-valuetext`.
|
|
88
|
+
*
|
|
89
|
+
* **Note:** When `tickmarks` is provided, the scale is automatically shown
|
|
90
|
+
* (equivalent to `showTickmarks`), and `labelInterval` is ignored - every
|
|
91
|
+
* custom tickmark is rendered with its own `label`.
|
|
92
|
+
* @default []
|
|
93
|
+
* @public
|
|
94
|
+
* @since 2.23.0
|
|
95
|
+
*/
|
|
96
|
+
this.tickmarks = [];
|
|
76
97
|
/**
|
|
77
98
|
* Enables handle tooltip displaying the current value.
|
|
78
99
|
* @default false
|
|
@@ -434,6 +455,18 @@ class SliderBase extends UI5Element {
|
|
|
434
455
|
}
|
|
435
456
|
return Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? Number(match[2]) : 0));
|
|
436
457
|
}
|
|
458
|
+
get _hasCustomTickmarks() {
|
|
459
|
+
return this.tickmarks.length > 0;
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Returns the label of the custom tickmark matching the given value, or `undefined` if none matches.
|
|
463
|
+
* @private
|
|
464
|
+
*/
|
|
465
|
+
_getCustomLabel(value) {
|
|
466
|
+
const precision = SliderBase_1._getDecimalPrecisionOfNumber(this.step);
|
|
467
|
+
const target = value.toFixed(precision);
|
|
468
|
+
return this.tickmarks.find(t => t.value.toFixed(precision) === target)?.label;
|
|
469
|
+
}
|
|
437
470
|
/**
|
|
438
471
|
* In order to always keep the visual UI representation and the internal
|
|
439
472
|
* state in sync, the component has a 'state storage' that is updated when the
|
|
@@ -630,6 +663,9 @@ __decorate([
|
|
|
630
663
|
__decorate([
|
|
631
664
|
property({ type: Boolean })
|
|
632
665
|
], SliderBase.prototype, "showTickmarks", void 0);
|
|
666
|
+
__decorate([
|
|
667
|
+
property({ type: Array })
|
|
668
|
+
], SliderBase.prototype, "tickmarks", void 0);
|
|
633
669
|
__decorate([
|
|
634
670
|
property({ type: Boolean })
|
|
635
671
|
], SliderBase.prototype, "showTooltip", void 0);
|
package/dist/SliderBase.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderBase.js","sourceRoot":"","sources":["../src/SliderBase.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,aAAa,MAAM,wDAAwD,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEhF,OAAO,EACN,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,GAClJ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,SAAS;AACT,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,+DAA+D,CAAC;AAQ3G;;;GAGG;AAqBH,IAAe,UAAU;AARzB;;;;;;;GAOG;AACH,MAAe,UAAW,SAAQ,UAAU;IAsI3C,KAAK,CAAC,iBAAiB;QACtB,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC;IACnC,CAAC;IAED;QACC,KAAK,EAAE,CAAC;QAtIT;;;;WAIG;QAEH,QAAG,GAAG,CAAC,CAAC;QAER;;;;WAIG;QAE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AntBA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACnB;AAQR;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACjB;AAWV;IADC,QAAQ,EAAE;wCACG;AAUd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCAClB;AAYT;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDACT;AAUlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDACN;AAQtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CACR;AAYpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;mDACJ;AAQxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CACX;AASjB;IADC,QAAQ,EAAE;kDACa;AAMxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACjB;AAMV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDACN;AAGtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDACD;AAG3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oDACH;AArHX,UAAU;IApBxB,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;IAEF;;;;;;;OAOG;GACY,UAAU,CA8tBxB;AAED,eAAe,UAAU,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport jsxRender from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { isPhone, supportsTouch } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport {\n\tisEscape, isHome, isEnd, isUp, isDown, isRight, isLeft, isUpCtrl, isDownCtrl, isRightCtrl, isLeftCtrl, isPlus, isMinus, isPageUp, isPageDown, isF2,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { SliderHandleType } from \"./SliderHandle.js\";\n\n// Styles\nimport sliderBaseStyles from \"./generated/themes/SliderBase.css.js\";\nimport { getAssociatedLabelForTexts } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\n\ntype StateStorage = {\n\t[key: string]: number | undefined,\n}\n\ntype DirectionStart = \"left\" | \"right\";\n\n/**\n * Fired when the value changes and the user has finished interacting with the slider.\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when the value changes due to user interaction that is not yet finished - during mouse/touch dragging.\n * @public\n */\n@event(\"input\", {\n\tbubbles: true,\n})\n\n/**\n * @class\n *\n * ### Overview\n * @constructor\n * @extends UI5Element\n * @public\n */\nabstract class SliderBase extends UI5Element {\n\teventDetails!: {\n\t\t\"change\": void,\n\t\t\"input\": void,\n\t}\n\t/**\n\t * Defines the minimum value of the slider.\n\t * @default 0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmin = 0;\n\n\t/**\n\t * Defines the maximum value of the slider.\n\t * @default 100\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmax = 100;\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines the size of the slider's selection intervals (e.g. min = 0, max = 10, step = 5 would result in possible selection of the values 0, 5, 10).\n\t *\n\t * **Note:** If set to 0 the slider handle movement is disabled. When negative number or value other than a number, the component fallbacks to its default value.\n\t * @default 1\n\t * @public\n\t */\n\t@property({ type: Number })\n\tstep = 1;\n\n\t/**\n\t * Displays a label with a value on every N-th step.\n\t *\n\t * **Note:** The step and tickmarks properties must be enabled.\n\t * Example - if the step value is set to 2 and the label interval is also specified to 2 - then every second\n\t * tickmark will be labelled, which means every 4th value number.\n\t * @default 0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tlabelInterval = 0;\n\n\t/**\n\t * Enables tickmarks visualization for each step.\n\t *\n\t * **Note:** The step must be a positive number.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTickmarks = false;\n\n\t/**\n\t * Enables handle tooltip displaying the current value.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTooltip = false;\n\n\t/**\n\t *\n\t * Indicates whether input fields should be used as tooltips for the handles.\n\t *\n\t * **Note:** Setting this option to true will only work if showTooltip is set to true.\n\t * **Note:** In order for the component to comply with the accessibility standard, it is recommended to set the editableTooltip property to true.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\teditableTooltip = false;\n\n\t/**\n\t * Defines whether the slider is in disabled state.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.4.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\tvalue = 0;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_tooltipsOpen = false;\n\n\t@property({ type: Boolean })\n\t_labelsOverlapping = false;\n\n\t@property({ type: Boolean })\n\t_hiddenTickmarks = false;\n\n\t_resizeHandler: ResizeObserverCallback;\n\t_moveHandler: (e: TouchEvent | MouseEvent) => void;\n\t_upHandler: (e: TouchEvent | MouseEvent) => void;\n\t_windowMouseoutHandler: (e: MouseEvent) => void;\n\t_stateStorage: StateStorage;\n\tnotResized = false;\n\t_isUserInteraction = false;\n\t_isInnerElementFocusing = false;\n\t_oldNumberOfLabels?: number;\n\t_oldMin?: number;\n\t_oldMax?: number;\n\t_labelWidth = 0;\n\t_labelValues?: Array<string>;\n\t_valueOnInteractionStart?: number;\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._resizeHandler = this._handleResize.bind(this);\n\t\tthis._moveHandler = this._handleMove.bind(this);\n\t\tthis._upHandler = this._handleUp.bind(this);\n\t\tthis._windowMouseoutHandler = (e: MouseEvent) => {\n\t\t\tif (e.relatedTarget === document.documentElement) {\n\t\t\t\tthis.handleUpBase();\n\t\t\t}\n\t\t};\n\n\t\tthis._stateStorage = {\n\t\t\tstep: undefined,\n\t\t\tmin: undefined,\n\t\t\tmax: undefined,\n\t\t\tlabelInterval: undefined,\n\t\t};\n\t}\n\n\t_handleMove(e: TouchEvent | MouseEvent) {} // eslint-disable-line\n\n\t_handleUp(e: TouchEvent | MouseEvent) {}\t// eslint-disable-line\n\n\t_onmousedown(e: TouchEvent | MouseEvent) {} // eslint-disable-line\n\n\t_handleActionKeyPress(e: Event) {} // eslint-disable-line\n\n\tabstract tickmarksObject: Array<boolean>;\n\tabstract _ariaLabelledByText: string;\n\n\tstatic get ACTION_KEYS() {\n\t\treturn [\n\t\t\tisLeft,\n\t\t\tisRight,\n\t\t\tisUp,\n\t\t\tisDown,\n\t\t\tisLeftCtrl,\n\t\t\tisRightCtrl,\n\t\t\tisUpCtrl,\n\t\t\tisDownCtrl,\n\t\t\tisPlus,\n\t\t\tisMinus,\n\t\t\tisHome,\n\t\t\tisEnd,\n\t\t\tisPageUp,\n\t\t\tisPageDown,\n\t\t\tisEscape,\n\t\t];\n\t}\n\n\tstatic get MIN_SPACE_BETWEEN_TICKMARKS() {\n\t\treturn 8;\n\t}\n\n\tstatic get TOOLTIP_VISIBILITY() {\n\t\treturn {\n\t\t\tVISIBLE: \"visible\",\n\t\t\tHIDDEN: \"hidden\",\n\t\t};\n\t}\n\n\tstatic get renderer() {\n\t\treturn jsxRender;\n\t}\n\n\tstatic get styles() {\n\t\treturn sliderBaseStyles;\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"ui5-slider-root-phone\": isPhone(),\n\t\t\t},\n\t\t\tlabelContainer: {\n\t\t\t\t\"ui5-slider-hidden-labels\": this._labelsOverlapping,\n\t\t\t},\n\t\t};\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._resizeHandler);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._resizeHandler);\n\t}\n\n\tonAfterRendering() {\n\t\t// Only call if the resize is triggered by a state changes other than\n\t\t// the ones that occured on the previous resize and those caused by user interaction.\n\t\tif (this.notResized) {\n\t\t\tthis._resizeHandler();\n\t\t}\n\t}\n\n\t/** Shows the tooltip(s) if the `showTooltip` property is set to true\n\t * @private\n\t */\n\t_onmouseover() {\n\t\tthis._tooltipsOpen = this.showTooltip;\n\t}\n\n\t/**\n\t * Hides the tooltip(s) if the `showTooltip` property is set to true\n\t * @private\n\t */\n\t_onmouseout() {\n\t\tif (this.showTooltip && !this.shadowRoot!.activeElement) {\n\t\t\tthis._tooltipsOpen = false;\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as HTMLElement;\n\t\tconst isHandleFocused = target.hasAttribute(\"ui5-slider-handle\");\n\n\t\tif (isF2(e) && isHandleFocused) {\n\t\t\tconst handleType = target.getAttribute(\"handle-type\");\n\t\t\tlet tooltipSelector: string;\n\t\t\tif (handleType === SliderHandleType.Start) {\n\t\t\t\ttooltipSelector = \"[data-sap-ui-start-value]\";\n\t\t\t} else if (handleType === SliderHandleType.End) {\n\t\t\t\ttooltipSelector = \"[data-sap-ui-end-value]\";\n\t\t\t} else {\n\t\t\t\ttooltipSelector = \"[ui5-slider-tooltip]\";\n\t\t\t}\n\t\t\tconst tooltip = this.shadowRoot!.querySelector<HTMLElement>(tooltipSelector);\n\t\t\ttooltip?.focus();\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.disabled || this._effectiveStep === 0) {\n\t\t\treturn;\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\t_onKeyupBase() {\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isUserInteraction = false;\n\t}\n\n\t/**\n\t * Flags if an inner element is currently being focused\n\t * @private\n\t */\n\t_preserveFocus(isFocusing: boolean) {\n\t\tthis._isInnerElementFocusing = isFocusing;\n\t}\n\n\t/**\n\t * Return if an inside element within the component is currently being focused\n\t * @private\n\t */\n\t_isFocusing() {\n\t\treturn this._isInnerElementFocusing;\n\t}\n\n\t/**\n\t * Prevent focus out when inner element within the component is currently being in process of focusing in.\n\t * @private\n\t */\n\t_preventFocusOut() {\n\t\tthis.focusInnerElement();\n\t}\n\n\t/**\n\t * Manages the focus between the component's inner elements\n\t * @protected\n\t */\n\tfocusInnerElement() {\n\t\tthis.focus();\n\t}\n\n\t/**\n\t * Handle the responsiveness of the Slider's UI elements when resizing\n\t * @private\n\t */\n\t_handleResize() {\n\t\tif (!this.showTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Mark resizing to avoid unneccessary calls to that function after rendering\n\t\tthis.notResized = false;\n\n\t\t// Convert the string represented calculation expression to a normal one\n\t\t// Check the distance in pixels exist between every tickmark\n\t\tconst spaceBetweenTickmarks = this._spaceBetweenTickmarks();\n\n\t\t// If the pixels between the tickmarks are less than 8 only the first and the last one should be visible\n\t\t// In such case the labels must correspond to the tickmarks, only the first and the last one should exist.\n\t\tif (spaceBetweenTickmarks < SliderBase.MIN_SPACE_BETWEEN_TICKMARKS) {\n\t\t\tthis._hiddenTickmarks = true;\n\t\t} else {\n\t\t\tthis._hiddenTickmarks = false;\n\t\t}\n\n\t\tif (this.labelInterval <= 0 || this._hiddenTickmarks) {\n\t\t\tthis._labelsOverlapping = true;\n\t\t}\n\t}\n\t/**\n\t * Called when the user starts interacting with the slider.\n\t * After a down event on the slider root, listen for move events on window, so the slider value\n\t * is updated even if the user drags the pointer outside the slider root.\n\t * @protected\n\t */\n\thandleDownBase(e: TouchEvent | MouseEvent) {\n\t\tconst min = this._effectiveMin;\n\t\tconst max = this._effectiveMax;\n\t\tconst domRect = this.getBoundingClientRect();\n\t\tconst directionStart = this.directionStart;\n\t\tconst step = this._effectiveStep;\n\t\tconst newValue = SliderBase.getValueFromInteraction(e, step, min, max, domRect, directionStart);\n\n\t\t// Mark start of a user interaction\n\t\tthis._isUserInteraction = true;\n\n\t\twindow.addEventListener(\"mouseup\", this._upHandler);\n\t\twindow.addEventListener(\"touchend\", this._upHandler);\n\t\twindow.addEventListener(\"mouseout\", this._windowMouseoutHandler);\n\t\t// Only allow one type of move event to be listened to (the first one registered after the down event)\n\t\tif (supportsTouch() && e instanceof TouchEvent) {\n\t\t\twindow.addEventListener(\"touchmove\", this._moveHandler);\n\t\t} else {\n\t\t\twindow.addEventListener(\"mousemove\", this._moveHandler);\n\t\t}\n\n\t\tthis._handleFocusOnMouseDown(e);\n\t\treturn newValue;\n\t}\n\n\t/**\n\t * Forward the focus to an inner inner part within the component on press\n\t * @private\n\t */\n\t_handleFocusOnMouseDown(e: TouchEvent | MouseEvent) {\n\t\tconst currentlyFocusedElement = this.shadowRoot!.activeElement;\n\t\tconst elementToBeFocused = e.target as HTMLElement;\n\n\t\tif ((!currentlyFocusedElement || currentlyFocusedElement !== elementToBeFocused) && !elementToBeFocused.hasAttribute(\"ui5-input\")) {\n\t\t\tthis._preserveFocus(true);\n\t\t\tthis.focusInnerElement();\n\t\t}\n\t}\n\n\t/**\n\t * Called when the user finish interacting with the slider\n\t * Fires an `change` event indicating a final value change, after user interaction is finished.\n\t * @protected\n\t */\n\thandleUpBase() {\n\t\twindow.removeEventListener(\"mouseup\", this._upHandler);\n\t\twindow.removeEventListener(\"touchend\", this._upHandler);\n\t\twindow.removeEventListener(\"mouseout\", this._windowMouseoutHandler);\n\t\t// Only one of the following was attached, but it's ok to remove both as there is no error\n\t\twindow.removeEventListener(\"mousemove\", this._moveHandler);\n\t\twindow.removeEventListener(\"touchmove\", this._moveHandler);\n\n\t\tthis._isUserInteraction = false;\n\t\tthis._preserveFocus(false);\n\t}\n\n\t/**\n\t * Updates state storage for the value-related property\n\t * Fires an `input` event indicating a value change via interaction that is not yet finished.\n\t * @protected\n\t */\n\tupdateStateStorageAndFireInputEvent(valueType: string) {\n\t\tthis.storePropertyState(valueType);\n\t\tif (this._isUserInteraction) {\n\t\t\tthis.fireDecoratorEvent(\"input\");\n\t\t}\n\t}\n\n\t/**\n\t * Goes through the key shortcuts available for the component and returns 'true' if the event is triggered by one.\n\t * @private\n\t */\n\tstatic _isActionKey(e: KeyboardEvent) {\n\t\treturn this.ACTION_KEYS.some(actionKey => actionKey(e));\n\t}\n\n\t/**\n\t * Locks the given value between min and max boundaries based on slider properties\n\t * @protected\n\t */\n\tstatic clipValue(value: number, min: number, max: number): number {\n\t\tvalue = Math.min(Math.max(value, min), max);\n\t\treturn value;\n\t}\n\n\t/**\n\t * Sets the slider value from an event\n\t * @protected\n\t */\n\tstatic getValueFromInteraction(e: TouchEvent | MouseEvent, stepSize: number, min: number, max: number, boundingClientRect: DOMRect, directionStart: DirectionStart): number {\n\t\tconst pageX = this.getPageXValueFromEvent(e);\n\t\tconst value = this.computedValueFromPageX(pageX, min, max, boundingClientRect, directionStart);\n\t\tconst steppedValue = this.getSteppedValue(value, stepSize, min);\n\n\t\treturn this.clipValue(steppedValue, min, max);\n\t}\n\n\t/**\n\t * \"Stepify\" the raw value - calculate the new value depending on the specified step property\n\t * @protected\n\t */\n\tstatic getSteppedValue(value: number, stepSize: number, min: number): number {\n\t\tconst stepModuloValue = Math.abs((value - min) % stepSize);\n\n\t\tif (stepSize === 0 || stepModuloValue === 0) {\n\t\t\treturn value;\n\t\t}\n\n\t\t// Clip (snap) the new value to the nearest step\n\t\tvalue = (stepModuloValue * 2 >= stepSize) ? (value + stepSize) - stepModuloValue : value - stepModuloValue;\n\n\t\t// If the step value is not a round number get its precision\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(stepSize);\n\t\treturn Number(value.toFixed(stepPrecision));\n\t}\n\n\t/**\n\t * Gets pageX value from event on user interaction with the Slider\n\t * @protected\n\t */\n\tstatic getPageXValueFromEvent(e: TouchEvent | MouseEvent): number {\n\t\tif (supportsTouch() && e instanceof TouchEvent) {\n\t\t\tif (e.targetTouches && e.targetTouches.length > 0) {\n\t\t\t\treturn e.targetTouches[0].pageX;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn (e as MouseEvent).pageX; // MouseEvent\n\t}\n\n\t/**\n\t * Computes the new value (in %) from the pageX position of the cursor.\n\t * Returns the value rounded to a precision of at most 2 digits after decimal point.\n\t * @protected\n\t */\n\tstatic computedValueFromPageX(pageX: number, min: number, max: number, boundingClientRect: DOMRect, directionStart: DirectionStart) {\n\t\t// Determine pageX position relative to the Slider DOM\n\t\tconst xRelativePosition = directionStart === \"left\" ? pageX - boundingClientRect[directionStart] : boundingClientRect[directionStart] - pageX;\n\t\t// Calculate the percentage complete (the \"progress\")\n\t\tconst percentageComplete = xRelativePosition / boundingClientRect.width;\n\t\t// Fit (map) the complete percentage between the min/max value range\n\t\treturn min + percentageComplete * (max - min);\n\t}\n\n\t/**\n\t * Calculates the precision (decimal places) of a number, returns 0 if integer\n\t * Handles scientific notation cases.\n\t * @private\n\t */\n\tstatic _getDecimalPrecisionOfNumber(value: number) {\n\t\tif (Number.isInteger(value)) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst match = (String(value)).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);\n\t\tif (!match || match.length < 2) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? Number(match[2]) : 0));\n\t}\n\n\t/**\n\t * In order to always keep the visual UI representation and the internal\n\t * state in sync, the component has a 'state storage' that is updated when the\n\t * current state is changed due to a user action.\n\t *\n\t * Check if the previously saved state is outdated. That would mean\n\t * a property has been changed programmatically because the previous state\n\t * is always updated in the interaction handlers.\n\t *\n\t * Will return true if any of the properties is not equal to its previously\n\t * stored value.\n\t * @protected\n\t */\n\tisCurrentStateOutdated() {\n\t\treturn Object.entries(this._stateStorage).some(([propName, propValue]) => this[propName as keyof SliderBase] !== propValue);\n\t}\n\n\t/**\n\t * Returns the last stored value of a property\n\t * @protected\n\t */\n\tgetStoredPropertyState(prop: string) {\n\t\treturn this._stateStorage[prop as keyof StateStorage];\n\t}\n\n\t/**\n\t * Check if one or more properties have been updated compared to their last\n\t * saved values in the state storage.\n\t * @protected\n\t */\n\tisPropertyUpdated(...props: Array<string>) {\n\t\treturn props.some(prop => this.getStoredPropertyState(prop) !== this[prop as keyof SliderBase]);\n\t}\n\n\t/**\n\t * Updates the previously saved in the _stateStorage values of one or more properties.\n\t * @protected\n\t */\n\tstorePropertyState(...props: Array<string>) {\n\t\tprops.forEach(prop => {\n\t\t\tthis._stateStorage[prop as keyof StateStorage] = this[prop as keyof SliderBase] as number;\n\t\t});\n\t}\n\n\t/**\n\t * Returns the start side of a direction - left for LTR, right for RTL\n\t */\n\tget directionStart() {\n\t\treturn this.effectiveDir === \"rtl\" ? \"right\" : \"left\";\n\t}\n\n\t/**\n\t * Calculates the labels amount, width and text and creates them\n\t * @private\n\t */\n\t_createLabels() {\n\t\tif (!this.labelInterval || !this.showTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst labelInterval = this.labelInterval;\n\t\tconst step = this._effectiveStep;\n\t\tconst newNumberOfLabels = (this._effectiveMax - this._effectiveMin) / (step * labelInterval);\n\n\t\t// If the required labels are already rendered\n\t\tif (newNumberOfLabels === this._oldNumberOfLabels && this._oldMin === this._effectiveMin && this._oldMax === this._effectiveMax) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._oldMin = this._effectiveMin;\n\t\tthis._oldMax = this._effectiveMax;\n\t\tthis._oldNumberOfLabels = newNumberOfLabels;\n\t\tthis._labelWidth = 100 / newNumberOfLabels;\n\t\tthis._labelValues = [];\n\n\t\t// If the step value is not a round number get its precision\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(step);\n\n\t\t// numberOfLabels below can be float so that the \"distance betweenlabels labels\"\n\t\t// calculation to be precize (exactly the same as the distance between the tickmarks).\n\t\t// That's ok as the loop stop condition is set to an integer, so it will practically\n\t\t// \"floor\" the number of labels anyway.\n\t\tfor (let i = 0; i <= newNumberOfLabels; i++) {\n\t\t\t// Format the label numbers with the same decimal precision as the value of the step property\n\t\t\tconst labelItemNumber = ((i * step * labelInterval) + this._effectiveMin).toFixed(stepPrecision);\n\t\t\tthis._labelValues.push(labelItemNumber);\n\t\t}\n\t}\n\n\t_handleActionKeyPressBase(e: KeyboardEvent, affectedPropName: string) {\n\t\tconst isUpAction = SliderBase._isIncreaseValueAction(e, this.directionStart);\n\t\tconst isBigStep = SliderBase._isBigStepAction(e);\n\n\t\tconst currentValue = this[affectedPropName as keyof SliderBase] as number;\n\t\tconst min = this._effectiveMin;\n\t\tconst max = this._effectiveMax;\n\n\t\tlet step = this._effectiveStep;\n\n\t\t// If the action key corresponds to a long step and the slider has more than 10 normal steps,\n\t\t// make a jump of 1/10th of the Slider's length, otherwise just use the normal step property.\n\t\tstep = isBigStep && ((max - min) / step > 10) ? (max - min) / 10 : step;\n\n\t\tif (isEnd(e)) {\n\t\t\treturn max - currentValue;\n\t\t}\n\n\t\tif (isHome(e)) {\n\t\t\treturn (currentValue - min) * -1;\n\t\t}\n\n\t\treturn isUpAction ? step : step * -1;\n\t}\n\n\tstatic _isIncreaseValueAction(e: KeyboardEvent, directionStart: DirectionStart) {\n\t\tif (directionStart === \"right\") {\n\t\t\treturn isUp(e) || isUpCtrl(e) || isLeft(e) || isLeftCtrl(e) || isPlus(e) || isPageUp(e);\n\t\t}\n\n\t\treturn isUp(e) || isUpCtrl(e) || isRight(e) || isRightCtrl(e) || isPlus(e) || isPageUp(e);\n\t}\n\n\tstatic _isBigStepAction(e: KeyboardEvent) {\n\t\treturn isDownCtrl(e) || isUpCtrl(e) || isLeftCtrl(e) || isRightCtrl(e) || isPageUp(e) || isPageDown(e);\n\t}\n\n\tget _tickmarksCount() {\n\t\treturn (this._effectiveMax - this._effectiveMin) / this._effectiveStep;\n\t}\n\n\t/**\n\t * Calculates space between tickmarks\n\t * @private\n\t */\n\t_spaceBetweenTickmarks() {\n\t\treturn this.getBoundingClientRect().width / this._tickmarksCount;\n\t}\n\n\t/**\n\t * Notify in case of a invalid step value type\n\t * @private\n\t */\n\t_validateStep(step: number) {\n\t\tif (step === 0) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number\"); // eslint-disable-line\n\t\t}\n\n\t\tif (step < 0) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number. The provided negative number has been converted to its positve equivalent\"); // eslint-disable-line\n\t\t}\n\n\t\tif (Number.isNaN(step)) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number. It has been set to its default value of 1\"); // eslint-disable-line\n\t\t}\n\t}\n\n\tget _labels() {\n\t\treturn this._labelValues || [];\n\t}\n\n\t/**\n\t * Normalizes a new `step` property value.\n\t * If tickmarks are enabled recreates them according to it.\n\t * @private\n\t */\n\tget _effectiveStep() {\n\t\tlet step = this.step;\n\n\t\tif (step < 0) {\n\t\t\tstep = Math.abs(step);\n\t\t}\n\n\t\tif (Number.isNaN(step)) {\n\t\t\tstep = 1;\n\t\t}\n\n\t\treturn step;\n\t}\n\n\tget _effectiveMin() {\n\t\treturn Math.min(this.min, this.max);\n\t}\n\n\tget _effectiveMax() {\n\t\treturn Math.max(this.min, this.max);\n\t}\n\n\tget _tabIndex() {\n\t\treturn this.disabled ? -1 : 0;\n\t}\n\n\tget _ariaDescribedByHandleText() {\n\t\treturn this.editableTooltip ? \"ui5-slider-InputDesc\" : undefined;\n\t}\n\n\tget _ariaLabel() {\n\t\tconst associatedLabelText = getAssociatedLabelForTexts(this);\n\t\tconst hasAccessibleName = !!this.accessibleName;\n\n\t\tlet labelText = hasAccessibleName\n\t\t\t? `${this.accessibleName} ${this._ariaLabelledByText}`\n\t\t\t: this._ariaLabelledByText;\n\n\t\tif (!hasAccessibleName && associatedLabelText) {\n\t\t\tlabelText = `${associatedLabelText} ${labelText}`;\n\t\t}\n\n\t\treturn labelText;\n\t}\n\n\tget _ariaDescribedByInputText() {\n\t\treturn \"\";\n\t}\n\n\tget _ariaLabelledByInputText() {\n\t\treturn \"\";\n\t}\n}\n\nexport default SliderBase;\n"]}
|
|
1
|
+
{"version":3,"file":"SliderBase.js","sourceRoot":"","sources":["../src/SliderBase.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,aAAa,MAAM,wDAAwD,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEhF,OAAO,EACN,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,GAClJ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGrD,S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C;iDACN;AAoBtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;6CACM;AAQhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CACR;AAYpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;mDACJ;AAQxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CACX;AASjB;IADC,QAAQ,EAAE;kDACa;AAMxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACjB;AAMV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDACN;AAGtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDACD;AAG3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oDACH;AA5IX,UAAU;IApBxB,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;IAEF;;;;;;;OAOG;GACY,UAAU,CAowBxB;AAED,eAAe,UAAU,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport jsxRender from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { isPhone, supportsTouch } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport {\n\tisEscape, isHome, isEnd, isUp, isDown, isRight, isLeft, isUpCtrl, isDownCtrl, isRightCtrl, isLeftCtrl, isPlus, isMinus, isPageUp, isPageDown, isF2,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { SliderHandleType } from \"./SliderHandle.js\";\nimport type { Tickmark } from \"./SliderScale.js\";\n\n// Styles\nimport sliderBaseStyles from \"./generated/themes/SliderBase.css.js\";\nimport { getAssociatedLabelForTexts } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\n\ntype StateStorage = {\n\t[key: string]: number | undefined,\n}\n\ntype DirectionStart = \"left\" | \"right\";\n\n/**\n * Fired when the value changes and the user has finished interacting with the slider.\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when the value changes due to user interaction that is not yet finished - during mouse/touch dragging.\n * @public\n */\n@event(\"input\", {\n\tbubbles: true,\n})\n\n/**\n * @class\n *\n * ### Overview\n * @constructor\n * @extends UI5Element\n * @public\n */\nabstract class SliderBase extends UI5Element {\n\teventDetails!: {\n\t\t\"change\": void,\n\t\t\"input\": void,\n\t}\n\t/**\n\t * Defines the minimum value of the slider.\n\t * @default 0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmin = 0;\n\n\t/**\n\t * Defines the maximum value of the slider.\n\t * @default 100\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmax = 100;\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines the size of the slider's selection intervals (e.g. min = 0, max = 10, step = 5 would result in possible selection of the values 0, 5, 10).\n\t *\n\t * **Note:** If set to 0 the slider handle movement is disabled. When negative number or value other than a number, the component fallbacks to its default value.\n\t * @default 1\n\t * @public\n\t */\n\t@property({ type: Number })\n\tstep = 1;\n\n\t/**\n\t * Displays a label with a value on every N-th step.\n\t *\n\t * **Note:** The step and tickmarks properties must be enabled.\n\t * Example - if the step value is set to 2 and the label interval is also specified to 2 - then every second\n\t * tickmark will be labelled, which means every 4th value number.\n\t *\n\t * **Note:** This property is ignored when the `tickmarks` property is used.\n\t * In that case every custom tickmark is labelled with its own `label`.\n\t * @default 0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tlabelInterval = 0;\n\n\t/**\n\t * Enables tickmarks visualization for each step.\n\t *\n\t * **Note:** The step must be a positive number.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTickmarks = false;\n\n\t/**\n\t * Defines custom tickmarks with labels on the slider scale.\n\t * Each tickmark object has a numeric `value` and an optional `label` string.\n\t * Tickmarks are purely visual — they display labeled markers at specific positions\n\t * but do not affect the slider's movement behavior. The slider still moves\n\t * according to `min`, `max`, and `step`.\n\t *\n\t * When the current value matches a tickmark value, the tickmark's label\n\t * is shown in the tooltip and announced via `aria-valuetext`.\n\t *\n\t * **Note:** When `tickmarks` is provided, the scale is automatically shown\n\t * (equivalent to `showTickmarks`), and `labelInterval` is ignored - every\n\t * custom tickmark is rendered with its own `label`.\n\t * @default []\n\t * @public\n\t * @since 2.23.0\n\t */\n\t@property({ type: Array })\n\ttickmarks: Array<Tickmark> = [];\n\n\t/**\n\t * Enables handle tooltip displaying the current value.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTooltip = false;\n\n\t/**\n\t *\n\t * Indicates whether input fields should be used as tooltips for the handles.\n\t *\n\t * **Note:** Setting this option to true will only work if showTooltip is set to true.\n\t * **Note:** In order for the component to comply with the accessibility standard, it is recommended to set the editableTooltip property to true.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\teditableTooltip = false;\n\n\t/**\n\t * Defines whether the slider is in disabled state.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.4.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\tvalue = 0;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_tooltipsOpen = false;\n\n\t@property({ type: Boolean })\n\t_labelsOverlapping = false;\n\n\t@property({ type: Boolean })\n\t_hiddenTickmarks = false;\n\n\t_resizeHandler: ResizeObserverCallback;\n\t_moveHandler: (e: TouchEvent | MouseEvent) => void;\n\t_upHandler: (e: TouchEvent | MouseEvent) => void;\n\t_windowMouseoutHandler: (e: MouseEvent) => void;\n\t_stateStorage: StateStorage;\n\tnotResized = false;\n\t_isUserInteraction = false;\n\t_isInnerElementFocusing = false;\n\t_oldNumberOfLabels?: number;\n\t_oldMin?: number;\n\t_oldMax?: number;\n\t_labelWidth = 0;\n\t_labelValues?: Array<string>;\n\t_valueOnInteractionStart?: number;\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._resizeHandler = this._handleResize.bind(this);\n\t\tthis._moveHandler = this._handleMove.bind(this);\n\t\tthis._upHandler = this._handleUp.bind(this);\n\t\tthis._windowMouseoutHandler = (e: MouseEvent) => {\n\t\t\tif (e.relatedTarget === document.documentElement) {\n\t\t\t\tthis.handleUpBase();\n\t\t\t}\n\t\t};\n\n\t\tthis._stateStorage = {\n\t\t\tstep: undefined,\n\t\t\tmin: undefined,\n\t\t\tmax: undefined,\n\t\t\tlabelInterval: undefined,\n\t\t};\n\t}\n\n\t_handleMove(e: TouchEvent | MouseEvent) {} // eslint-disable-line\n\n\t_handleUp(e: TouchEvent | MouseEvent) {}\t// eslint-disable-line\n\n\t_onmousedown(e: TouchEvent | MouseEvent) {} // eslint-disable-line\n\n\t_handleActionKeyPress(e: Event) {} // eslint-disable-line\n\n\tabstract tickmarksObject: Array<boolean>;\n\tabstract _ariaLabelledByText: string;\n\n\tstatic get ACTION_KEYS() {\n\t\treturn [\n\t\t\tisLeft,\n\t\t\tisRight,\n\t\t\tisUp,\n\t\t\tisDown,\n\t\t\tisLeftCtrl,\n\t\t\tisRightCtrl,\n\t\t\tisUpCtrl,\n\t\t\tisDownCtrl,\n\t\t\tisPlus,\n\t\t\tisMinus,\n\t\t\tisHome,\n\t\t\tisEnd,\n\t\t\tisPageUp,\n\t\t\tisPageDown,\n\t\t\tisEscape,\n\t\t];\n\t}\n\n\tstatic get MIN_SPACE_BETWEEN_TICKMARKS() {\n\t\treturn 8;\n\t}\n\n\tstatic get TOOLTIP_VISIBILITY() {\n\t\treturn {\n\t\t\tVISIBLE: \"visible\",\n\t\t\tHIDDEN: \"hidden\",\n\t\t};\n\t}\n\n\tstatic get renderer() {\n\t\treturn jsxRender;\n\t}\n\n\tstatic get styles() {\n\t\treturn sliderBaseStyles;\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"ui5-slider-root-phone\": isPhone(),\n\t\t\t},\n\t\t\tlabelContainer: {\n\t\t\t\t\"ui5-slider-hidden-labels\": this._labelsOverlapping,\n\t\t\t},\n\t\t};\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._resizeHandler);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._resizeHandler);\n\t}\n\n\tonAfterRendering() {\n\t\t// Only call if the resize is triggered by a state changes other than\n\t\t// the ones that occured on the previous resize and those caused by user interaction.\n\t\tif (this.notResized) {\n\t\t\tthis._resizeHandler();\n\t\t}\n\t}\n\n\t/** Shows the tooltip(s) if the `showTooltip` property is set to true\n\t * @private\n\t */\n\t_onmouseover() {\n\t\tthis._tooltipsOpen = this.showTooltip;\n\t}\n\n\t/**\n\t * Hides the tooltip(s) if the `showTooltip` property is set to true\n\t * @private\n\t */\n\t_onmouseout() {\n\t\tif (this.showTooltip && !this.shadowRoot!.activeElement) {\n\t\t\tthis._tooltipsOpen = false;\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as HTMLElement;\n\t\tconst isHandleFocused = target.hasAttribute(\"ui5-slider-handle\");\n\n\t\tif (isF2(e) && isHandleFocused) {\n\t\t\tconst handleType = target.getAttribute(\"handle-type\");\n\t\t\tlet tooltipSelector: string;\n\t\t\tif (handleType === SliderHandleType.Start) {\n\t\t\t\ttooltipSelector = \"[data-sap-ui-start-value]\";\n\t\t\t} else if (handleType === SliderHandleType.End) {\n\t\t\t\ttooltipSelector = \"[data-sap-ui-end-value]\";\n\t\t\t} else {\n\t\t\t\ttooltipSelector = \"[ui5-slider-tooltip]\";\n\t\t\t}\n\t\t\tconst tooltip = this.shadowRoot!.querySelector<HTMLElement>(tooltipSelector);\n\t\t\ttooltip?.focus();\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.disabled || this._effectiveStep === 0) {\n\t\t\treturn;\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\t_onKeyupBase() {\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isUserInteraction = false;\n\t}\n\n\t/**\n\t * Flags if an inner element is currently being focused\n\t * @private\n\t */\n\t_preserveFocus(isFocusing: boolean) {\n\t\tthis._isInnerElementFocusing = isFocusing;\n\t}\n\n\t/**\n\t * Return if an inside element within the component is currently being focused\n\t * @private\n\t */\n\t_isFocusing() {\n\t\treturn this._isInnerElementFocusing;\n\t}\n\n\t/**\n\t * Prevent focus out when inner element within the component is currently being in process of focusing in.\n\t * @private\n\t */\n\t_preventFocusOut() {\n\t\tthis.focusInnerElement();\n\t}\n\n\t/**\n\t * Manages the focus between the component's inner elements\n\t * @protected\n\t */\n\tfocusInnerElement() {\n\t\tthis.focus();\n\t}\n\n\t/**\n\t * Handle the responsiveness of the Slider's UI elements when resizing\n\t * @private\n\t */\n\t_handleResize() {\n\t\tif (!this.showTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Mark resizing to avoid unneccessary calls to that function after rendering\n\t\tthis.notResized = false;\n\n\t\t// Convert the string represented calculation expression to a normal one\n\t\t// Check the distance in pixels exist between every tickmark\n\t\tconst spaceBetweenTickmarks = this._spaceBetweenTickmarks();\n\n\t\t// If the pixels between the tickmarks are less than 8 only the first and the last one should be visible\n\t\t// In such case the labels must correspond to the tickmarks, only the first and the last one should exist.\n\t\tif (spaceBetweenTickmarks < SliderBase.MIN_SPACE_BETWEEN_TICKMARKS) {\n\t\t\tthis._hiddenTickmarks = true;\n\t\t} else {\n\t\t\tthis._hiddenTickmarks = false;\n\t\t}\n\n\t\tif (this.labelInterval <= 0 || this._hiddenTickmarks) {\n\t\t\tthis._labelsOverlapping = true;\n\t\t}\n\t}\n\t/**\n\t * Called when the user starts interacting with the slider.\n\t * After a down event on the slider root, listen for move events on window, so the slider value\n\t * is updated even if the user drags the pointer outside the slider root.\n\t * @protected\n\t */\n\thandleDownBase(e: TouchEvent | MouseEvent) {\n\t\tconst min = this._effectiveMin;\n\t\tconst max = this._effectiveMax;\n\t\tconst domRect = this.getBoundingClientRect();\n\t\tconst directionStart = this.directionStart;\n\t\tconst step = this._effectiveStep;\n\t\tconst newValue = SliderBase.getValueFromInteraction(e, step, min, max, domRect, directionStart);\n\n\t\t// Mark start of a user interaction\n\t\tthis._isUserInteraction = true;\n\n\t\twindow.addEventListener(\"mouseup\", this._upHandler);\n\t\twindow.addEventListener(\"touchend\", this._upHandler);\n\t\twindow.addEventListener(\"mouseout\", this._windowMouseoutHandler);\n\t\t// Only allow one type of move event to be listened to (the first one registered after the down event)\n\t\tif (supportsTouch() && e instanceof TouchEvent) {\n\t\t\twindow.addEventListener(\"touchmove\", this._moveHandler);\n\t\t} else {\n\t\t\twindow.addEventListener(\"mousemove\", this._moveHandler);\n\t\t}\n\n\t\tthis._handleFocusOnMouseDown(e);\n\t\treturn newValue;\n\t}\n\n\t/**\n\t * Forward the focus to an inner inner part within the component on press\n\t * @private\n\t */\n\t_handleFocusOnMouseDown(e: TouchEvent | MouseEvent) {\n\t\tconst currentlyFocusedElement = this.shadowRoot!.activeElement;\n\t\tconst elementToBeFocused = e.target as HTMLElement;\n\n\t\tif ((!currentlyFocusedElement || currentlyFocusedElement !== elementToBeFocused) && !elementToBeFocused.hasAttribute(\"ui5-input\")) {\n\t\t\tthis._preserveFocus(true);\n\t\t\tthis.focusInnerElement();\n\t\t}\n\t}\n\n\t/**\n\t * Called when the user finish interacting with the slider\n\t * Fires an `change` event indicating a final value change, after user interaction is finished.\n\t * @protected\n\t */\n\thandleUpBase() {\n\t\twindow.removeEventListener(\"mouseup\", this._upHandler);\n\t\twindow.removeEventListener(\"touchend\", this._upHandler);\n\t\twindow.removeEventListener(\"mouseout\", this._windowMouseoutHandler);\n\t\t// Only one of the following was attached, but it's ok to remove both as there is no error\n\t\twindow.removeEventListener(\"mousemove\", this._moveHandler);\n\t\twindow.removeEventListener(\"touchmove\", this._moveHandler);\n\n\t\tthis._isUserInteraction = false;\n\t\tthis._preserveFocus(false);\n\t}\n\n\t/**\n\t * Updates state storage for the value-related property\n\t * Fires an `input` event indicating a value change via interaction that is not yet finished.\n\t * @protected\n\t */\n\tupdateStateStorageAndFireInputEvent(valueType: string) {\n\t\tthis.storePropertyState(valueType);\n\t\tif (this._isUserInteraction) {\n\t\t\tthis.fireDecoratorEvent(\"input\");\n\t\t}\n\t}\n\n\t/**\n\t * Goes through the key shortcuts available for the component and returns 'true' if the event is triggered by one.\n\t * @private\n\t */\n\tstatic _isActionKey(e: KeyboardEvent) {\n\t\treturn this.ACTION_KEYS.some(actionKey => actionKey(e));\n\t}\n\n\t/**\n\t * Locks the given value between min and max boundaries based on slider properties\n\t * @protected\n\t */\n\tstatic clipValue(value: number, min: number, max: number): number {\n\t\tvalue = Math.min(Math.max(value, min), max);\n\t\treturn value;\n\t}\n\n\t/**\n\t * Sets the slider value from an event\n\t * @protected\n\t */\n\tstatic getValueFromInteraction(e: TouchEvent | MouseEvent, stepSize: number, min: number, max: number, boundingClientRect: DOMRect, directionStart: DirectionStart): number {\n\t\tconst pageX = this.getPageXValueFromEvent(e);\n\t\tconst value = this.computedValueFromPageX(pageX, min, max, boundingClientRect, directionStart);\n\t\tconst steppedValue = this.getSteppedValue(value, stepSize, min);\n\n\t\treturn this.clipValue(steppedValue, min, max);\n\t}\n\n\t/**\n\t * \"Stepify\" the raw value - calculate the new value depending on the specified step property\n\t * @protected\n\t */\n\tstatic getSteppedValue(value: number, stepSize: number, min: number): number {\n\t\tconst stepModuloValue = Math.abs((value - min) % stepSize);\n\n\t\tif (stepSize === 0 || stepModuloValue === 0) {\n\t\t\treturn value;\n\t\t}\n\n\t\t// Clip (snap) the new value to the nearest step\n\t\tvalue = (stepModuloValue * 2 >= stepSize) ? (value + stepSize) - stepModuloValue : value - stepModuloValue;\n\n\t\t// If the step value is not a round number get its precision\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(stepSize);\n\t\treturn Number(value.toFixed(stepPrecision));\n\t}\n\n\t/**\n\t * Gets pageX value from event on user interaction with the Slider\n\t * @protected\n\t */\n\tstatic getPageXValueFromEvent(e: TouchEvent | MouseEvent): number {\n\t\tif (supportsTouch() && e instanceof TouchEvent) {\n\t\t\tif (e.targetTouches && e.targetTouches.length > 0) {\n\t\t\t\treturn e.targetTouches[0].pageX;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn (e as MouseEvent).pageX; // MouseEvent\n\t}\n\n\t/**\n\t * Computes the new value (in %) from the pageX position of the cursor.\n\t * Returns the value rounded to a precision of at most 2 digits after decimal point.\n\t * @protected\n\t */\n\tstatic computedValueFromPageX(pageX: number, min: number, max: number, boundingClientRect: DOMRect, directionStart: DirectionStart) {\n\t\t// Determine pageX position relative to the Slider DOM\n\t\tconst xRelativePosition = directionStart === \"left\" ? pageX - boundingClientRect[directionStart] : boundingClientRect[directionStart] - pageX;\n\t\t// Calculate the percentage complete (the \"progress\")\n\t\tconst percentageComplete = xRelativePosition / boundingClientRect.width;\n\t\t// Fit (map) the complete percentage between the min/max value range\n\t\treturn min + percentageComplete * (max - min);\n\t}\n\n\t/**\n\t * Calculates the precision (decimal places) of a number, returns 0 if integer\n\t * Handles scientific notation cases.\n\t * @private\n\t */\n\tstatic _getDecimalPrecisionOfNumber(value: number) {\n\t\tif (Number.isInteger(value)) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst match = (String(value)).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);\n\t\tif (!match || match.length < 2) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? Number(match[2]) : 0));\n\t}\n\n\tget _hasCustomTickmarks(): boolean {\n\t\treturn this.tickmarks.length > 0;\n\t}\n\n\t/**\n\t * Returns the label of the custom tickmark matching the given value, or `undefined` if none matches.\n\t * @private\n\t */\n\t_getCustomLabel(value: number): string | undefined {\n\t\tconst precision = SliderBase._getDecimalPrecisionOfNumber(this.step);\n\t\tconst target = value.toFixed(precision);\n\n\t\treturn this.tickmarks.find(t => t.value.toFixed(precision) === target)?.label;\n\t}\n\n\t/**\n\t * In order to always keep the visual UI representation and the internal\n\t * state in sync, the component has a 'state storage' that is updated when the\n\t * current state is changed due to a user action.\n\t *\n\t * Check if the previously saved state is outdated. That would mean\n\t * a property has been changed programmatically because the previous state\n\t * is always updated in the interaction handlers.\n\t *\n\t * Will return true if any of the properties is not equal to its previously\n\t * stored value.\n\t * @protected\n\t */\n\tisCurrentStateOutdated() {\n\t\treturn Object.entries(this._stateStorage).some(([propName, propValue]) => this[propName as keyof SliderBase] !== propValue);\n\t}\n\n\t/**\n\t * Returns the last stored value of a property\n\t * @protected\n\t */\n\tgetStoredPropertyState(prop: string) {\n\t\treturn this._stateStorage[prop as keyof StateStorage];\n\t}\n\n\t/**\n\t * Check if one or more properties have been updated compared to their last\n\t * saved values in the state storage.\n\t * @protected\n\t */\n\tisPropertyUpdated(...props: Array<string>) {\n\t\treturn props.some(prop => this.getStoredPropertyState(prop) !== this[prop as keyof SliderBase]);\n\t}\n\n\t/**\n\t * Updates the previously saved in the _stateStorage values of one or more properties.\n\t * @protected\n\t */\n\tstorePropertyState(...props: Array<string>) {\n\t\tprops.forEach(prop => {\n\t\t\tthis._stateStorage[prop as keyof StateStorage] = this[prop as keyof SliderBase] as number;\n\t\t});\n\t}\n\n\t/**\n\t * Returns the start side of a direction - left for LTR, right for RTL\n\t */\n\tget directionStart() {\n\t\treturn this.effectiveDir === \"rtl\" ? \"right\" : \"left\";\n\t}\n\n\t/**\n\t * Calculates the labels amount, width and text and creates them\n\t * @private\n\t */\n\t_createLabels() {\n\t\tif (!this.labelInterval || !this.showTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst labelInterval = this.labelInterval;\n\t\tconst step = this._effectiveStep;\n\t\tconst newNumberOfLabels = (this._effectiveMax - this._effectiveMin) / (step * labelInterval);\n\n\t\t// If the required labels are already rendered\n\t\tif (newNumberOfLabels === this._oldNumberOfLabels && this._oldMin === this._effectiveMin && this._oldMax === this._effectiveMax) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._oldMin = this._effectiveMin;\n\t\tthis._oldMax = this._effectiveMax;\n\t\tthis._oldNumberOfLabels = newNumberOfLabels;\n\t\tthis._labelWidth = 100 / newNumberOfLabels;\n\t\tthis._labelValues = [];\n\n\t\t// If the step value is not a round number get its precision\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(step);\n\n\t\t// numberOfLabels below can be float so that the \"distance betweenlabels labels\"\n\t\t// calculation to be precize (exactly the same as the distance between the tickmarks).\n\t\t// That's ok as the loop stop condition is set to an integer, so it will practically\n\t\t// \"floor\" the number of labels anyway.\n\t\tfor (let i = 0; i <= newNumberOfLabels; i++) {\n\t\t\t// Format the label numbers with the same decimal precision as the value of the step property\n\t\t\tconst labelItemNumber = ((i * step * labelInterval) + this._effectiveMin).toFixed(stepPrecision);\n\t\t\tthis._labelValues.push(labelItemNumber);\n\t\t}\n\t}\n\n\t_handleActionKeyPressBase(e: KeyboardEvent, affectedPropName: string) {\n\t\tconst isUpAction = SliderBase._isIncreaseValueAction(e, this.directionStart);\n\t\tconst isBigStep = SliderBase._isBigStepAction(e);\n\n\t\tconst currentValue = this[affectedPropName as keyof SliderBase] as number;\n\t\tconst min = this._effectiveMin;\n\t\tconst max = this._effectiveMax;\n\n\t\tlet step = this._effectiveStep;\n\n\t\t// If the action key corresponds to a long step and the slider has more than 10 normal steps,\n\t\t// make a jump of 1/10th of the Slider's length, otherwise just use the normal step property.\n\t\tstep = isBigStep && ((max - min) / step > 10) ? (max - min) / 10 : step;\n\n\t\tif (isEnd(e)) {\n\t\t\treturn max - currentValue;\n\t\t}\n\n\t\tif (isHome(e)) {\n\t\t\treturn (currentValue - min) * -1;\n\t\t}\n\n\t\treturn isUpAction ? step : step * -1;\n\t}\n\n\tstatic _isIncreaseValueAction(e: KeyboardEvent, directionStart: DirectionStart) {\n\t\tif (directionStart === \"right\") {\n\t\t\treturn isUp(e) || isUpCtrl(e) || isLeft(e) || isLeftCtrl(e) || isPlus(e) || isPageUp(e);\n\t\t}\n\n\t\treturn isUp(e) || isUpCtrl(e) || isRight(e) || isRightCtrl(e) || isPlus(e) || isPageUp(e);\n\t}\n\n\tstatic _isBigStepAction(e: KeyboardEvent) {\n\t\treturn isDownCtrl(e) || isUpCtrl(e) || isLeftCtrl(e) || isRightCtrl(e) || isPageUp(e) || isPageDown(e);\n\t}\n\n\tget _tickmarksCount() {\n\t\treturn (this._effectiveMax - this._effectiveMin) / this._effectiveStep;\n\t}\n\n\t/**\n\t * Calculates space between tickmarks\n\t * @private\n\t */\n\t_spaceBetweenTickmarks() {\n\t\treturn this.getBoundingClientRect().width / this._tickmarksCount;\n\t}\n\n\t/**\n\t * Notify in case of a invalid step value type\n\t * @private\n\t */\n\t_validateStep(step: number) {\n\t\tif (step === 0) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number\"); // eslint-disable-line\n\t\t}\n\n\t\tif (step < 0) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number. The provided negative number has been converted to its positve equivalent\"); // eslint-disable-line\n\t\t}\n\n\t\tif (Number.isNaN(step)) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number. It has been set to its default value of 1\"); // eslint-disable-line\n\t\t}\n\t}\n\n\tget _labels() {\n\t\treturn this._labelValues || [];\n\t}\n\n\t/**\n\t * Normalizes a new `step` property value.\n\t * If tickmarks are enabled recreates them according to it.\n\t * @private\n\t */\n\tget _effectiveStep() {\n\t\tlet step = this.step;\n\n\t\tif (step < 0) {\n\t\t\tstep = Math.abs(step);\n\t\t}\n\n\t\tif (Number.isNaN(step)) {\n\t\t\tstep = 1;\n\t\t}\n\n\t\treturn step;\n\t}\n\n\tget _effectiveMin() {\n\t\treturn Math.min(this.min, this.max);\n\t}\n\n\tget _effectiveMax() {\n\t\treturn Math.max(this.min, this.max);\n\t}\n\n\tget _tabIndex() {\n\t\treturn this.disabled ? -1 : 0;\n\t}\n\n\tget _ariaDescribedByHandleText() {\n\t\treturn this.editableTooltip ? \"ui5-slider-InputDesc\" : undefined;\n\t}\n\n\tget _ariaLabel() {\n\t\tconst associatedLabelText = getAssociatedLabelForTexts(this);\n\t\tconst hasAccessibleName = !!this.accessibleName;\n\n\t\tlet labelText = hasAccessibleName\n\t\t\t? `${this.accessibleName} ${this._ariaLabelledByText}`\n\t\t\t: this._ariaLabelledByText;\n\n\t\tif (!hasAccessibleName && associatedLabelText) {\n\t\t\tlabelText = `${associatedLabelText} ${labelText}`;\n\t\t}\n\n\t\treturn labelText;\n\t}\n\n\tget _ariaDescribedByInputText() {\n\t\treturn \"\";\n\t}\n\n\tget _ariaLabelledByInputText() {\n\t\treturn \"\";\n\t}\n}\n\nexport default SliderBase;\n"]}
|
package/dist/SliderScale.js
CHANGED
package/dist/SliderScale.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderScale.js","sourceRoot":"","sources":["../src/Sli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CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oDACJ;AAKxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDACR;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDACD;AAG3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qDACH;AAazB;IAJC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,IAAI;KACf,CAAC;4CAC4B;AApKzB,WAAW;IANhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;KAC7B,CAAC;GACI,WAAW,CA2WhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,sBAAsB,EAAE,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.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 ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport SliderBase from \"./SliderBase.js\";\nimport SliderScaleTemplate from \"./SliderScaleTemplate.js\";\n\nimport SliderScaleCss from \"./generated/themes/SliderScale.css.js\";\nimport type SliderHandle from \"./SliderHandle.js\";\n\ntype Tickmark = {\n\tvalue: number;\n\tlabel?: string;\n};\n\nenum SliderScaleOrientation {\n\t/**\n\t * Horizontal orientation\n\t * @public\n\t */\n\tHorizontal = \"Horizontal\",\n\n\t/**\n\t * Vertical orientation\n\t * @private\n\t */\n\tVertical = \"Vertical\",\n}\n\n@customElement({\n\ttag: \"ui5-slider-scale\",\n\trenderer: jsxRenderer,\n\tstyles: SliderScaleCss,\n\ttemplate: SliderScaleTemplate,\n})\nclass SliderScale extends UI5Element {\n\t/**\n\t * Defines the start value of the progress bar.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number })\n\tstartValue = 0;\n\n\t/**\n\t * Defines the end value of the progress bar.\n\t * @default 100\n\t * @private\n\t */\n\t@property({ type: Number })\n\tendValue = 100;\n\n\t/**\n\t * Defines the minimum value of the scale.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number })\n\tmin = 0;\n\n\t/**\n\t * Defines the maximum value of the scale.\n\t * @default 100\n\t * @private\n\t */\n\t@property({ type: Number })\n\tmax = 100;\n\n\t/**\n\t * Defines the step value for tickmarks.\n\t * @default 1\n\t * @private\n\t */\n\t@property({ type: Number })\n\tstep = 1;\n\n\t/**\n\t * Determines whether tickmarks should be displayed.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tshowTickmarks = false;\n\n\t/**\n\t * Defines the orientation of the scale.\n\t * @default \"Horizontal\"\n\t * @private\n\t */\n\t@property()\n\torientation: `${SliderScaleOrientation}` = \"Horizontal\";\n\n\t/**\n\t * Defines custom tickmarks to be displayed on the scale.\n\t * @default []\n\t * @private\n\t */\n\t@property({ type: Array })\n\ttickmarks: Array<Tickmark> = [];\n\n\t/**\n\t * Defines the interval for displaying labels on tickmarks.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number })\n\tlabelInterval = 0;\n\n\t/**\n\t * Tab index for the progress bar.\n\t * @default -1\n\t * @private\n\t */\n\t@property({ type: Number })\n\tprogressTabIndex = -1;\n\n\t/**\n\t * ARIA role for the progress bar.\n\t * @private\n\t */\n\t@property()\n\tprogressRole?: string;\n\n\t/**\n\t * ARIA aria-valuenow for the progress bar.\n\t * @private\n\t */\n\t@property({ type: Number })\n\tprogressAriaValueNow?: number;\n\n\t/**\n\t * ARIA aria-valuetext for the progress bar.\n\t * @private\n\t */\n\t@property()\n\tprogressAriaValueText?: string;\n\n\t/**\n\t * ARIA aria-label for the progress bar.\n\t * @private\n\t */\n\t@property()\n\tprogressAriaLabel?: string;\n\n\t/**\n\t * ARIA aria-disabled for the progress bar.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tprogressAriaDisabled?: boolean;\n\n\t/**\n\t * Indicates that the progress bar is being pressed/dragged.\n\t * Used to show the focus outline during mouse interaction.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tprogressPressed = false;\n\n\t/**\n\t * Indicates that the progress bar should show as focused.\n\t * Set by parent component (RangeSlider) when the progress bar has focus.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tprogressFocused = false;\n\n\t/**\n\t * Indicates that the progress bar is being hovered.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tprogressHovered = false;\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_labelInterval = 1;\n\n\t@property({ type: Boolean })\n\t_labelsOverlapping = false;\n\n\t@property({ type: Boolean })\n\t_hiddenTickmarks = false;\n\n\t_resizeHandler: ResizeObserverCallback;\n\t_notResized = true;\n\n\t/**\n\t * Defines the component items.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t})\n\thandles!: Array<SliderHandle>;\n\n\tstatic get MIN_LABEL_DISTANCE() {\n\t\treturn 16;\n\t}\n\n\tstatic get MIN_SPACE_BETWEEN_TICKMARKS() {\n\t\treturn 8;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._resizeHandler = this._handleResize.bind(this);\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._resizeHandler);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._resizeHandler);\n\t}\n\n\tonAfterRendering() {\n\t\tif (this._notResized) {\n\t\t\tthis._handleResize();\n\t\t}\n\t}\n\n\t/**\n\t * Handle the responsiveness of the SliderScale's UI elements when resizing\n\t * @private\n\t */\n\t_handleResize() {\n\t\tif (!this.showTickmarks) {\n\t\t\tthis._hiddenTickmarks = false;\n\t\t\tthis._labelsOverlapping = false;\n\t\t\treturn;\n\t\t}\n\n\t\t// Mark resizing to avoid unnecessary calls to that function after rendering\n\t\tthis._notResized = false;\n\n\t\tconst containerSize = this.orientation === SliderScaleOrientation.Horizontal\n\t\t\t? this.getBoundingClientRect().width\n\t\t\t: this.getBoundingClientRect().height;\n\n\t\tconst tickmarksCount = this._tickmarksCount;\n\n\t\t// Check if tickmarks should be hidden due to insufficient space\n\t\tif (tickmarksCount > 1) {\n\t\t\tconst spaceBetweenTickmarks = containerSize / tickmarksCount;\n\t\t\tthis._hiddenTickmarks = spaceBetweenTickmarks < SliderScale.MIN_SPACE_BETWEEN_TICKMARKS;\n\t\t} else {\n\t\t\tthis._hiddenTickmarks = false;\n\t\t}\n\n\t\t// Check if labels should be hidden due to insufficient space or overlapping\n\t\tif (this.labelInterval <= 0 || this._hiddenTickmarks) {\n\t\t\tthis._labelsOverlapping = true;\n\t\t} else {\n\t\t\t// Calculate if labels would overlap based on their estimated width\n\t\t\tconst visibleLabelCount = Math.ceil((tickmarksCount - 1) / this.labelInterval) + 1;\n\t\t\tconst estimatedLabelWidth = 32; // Estimated width in pixels for a label (2rem = ~32px)\n\t\t\tconst requiredWidth = visibleLabelCount * estimatedLabelWidth;\n\t\t\tthis._labelsOverlapping = containerSize < requiredWidth;\n\t\t}\n\t}\n\n\t/**\n\t * Calculates space between tickmarks\n\t * @private\n\t */\n\t_spaceBetweenTickmarks() {\n\t\tconst tickmarksCount = this._tickmarksCount;\n\t\tif (tickmarksCount <= 1) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst containerSize = this.orientation === SliderScaleOrientation.Horizontal\n\t\t\t? this.getBoundingClientRect().width\n\t\t\t: this.getBoundingClientRect().height;\n\n\t\treturn containerSize / tickmarksCount;\n\t}\n\n\t_onProgressMouseEnter() {\n\t\tthis.progressHovered = true;\n\t\tthis.handles.forEach(handle => {\n\t\t\tif (!handle.active) {\n\t\t\t\thandle.hovered = true;\n\t\t\t}\n\t\t});\n\t}\n\n\t_onProgressMouseLeave() {\n\t\tthis.progressHovered = false;\n\t\tthis.handles.forEach(handle => {\n\t\t\thandle.hovered = false;\n\t\t});\n\t}\n\n\tget _tickmarksCount() {\n\t\tif (this.step === 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn (this.max - this.min) / this.step;\n\t}\n\n\tget _visibleLabels() {\n\t\treturn this._tickmarks.filter(tick => tick.showLabel);\n\t}\n\n\tget _progressStyle() {\n\t\tconst range = this.max - this.min;\n\t\t// Clamp startValue and endValue to be within min/max bounds\n\t\tconst clampedStartValue = Math.max(this.min, Math.min(this.startValue, this.max));\n\t\tconst clampedEndValue = Math.max(this.min, Math.min(this.endValue, this.max));\n\n\t\tconst start = ((clampedStartValue - this.min) / range) * 100;\n\t\tconst end = ((clampedEndValue - this.min) / range) * 100;\n\n\t\tif (this.orientation === SliderScaleOrientation.Vertical) {\n\t\t\treturn {\n\t\t\t\ttop: \"auto\",\n\t\t\t\tbottom: `${start}%`,\n\t\t\t\theight: `${end - start}%`,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tinsetInlineStart: `${start}%`,\n\t\t\twidth: `${end - start}%`,\n\t\t};\n\t}\n\n\tget _allTickmarks() {\n\t\t// If custom tickmarks are provided, use them\n\t\tif (this.tickmarks.length > 0) {\n\t\t\treturn this.tickmarks;\n\t\t}\n\n\t\t// Otherwise, generate tickmarks based on step\n\t\tif (!this.showTickmarks) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (this.step === 0) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst values = [];\n\t\tfor (let value = this.min; value <= this.max; value += this.step) {\n\t\t\tvalues.push({ value });\n\t\t}\n\t\treturn values;\n\t}\n\n\tget _tickmarks() {\n\t\tconst allTickmarks = this._allTickmarks;\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(this.step);\n\t\tconst formatLabelPrecision = stepPrecision > 0 ? stepPrecision : 0;\n\n\t\tif (allTickmarks.length === 0) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn allTickmarks.map((tm, index) => {\n\t\t\tconst value = tm.value;\n\t\t\tconst isFirstOrLast = index === 0 || index === allTickmarks.length - 1;\n\t\t\tconst position = ((value - this.min) / (this.max - this.min)) * 100;\n\n\t\t\t// Determine if this tickmark should be visible\n\t\t\tconst shouldShowTickmark = this._hiddenTickmarks ? isFirstOrLast : true;\n\n\t\t\t// Determine if the label should be visible\n\t\t\tlet showLabel = false;\n\t\t\tif (shouldShowTickmark && !this._labelsOverlapping) {\n\t\t\t\tif (this.labelInterval > 0) {\n\t\t\t\t\tshowLabel = index % this.labelInterval === 0;\n\t\t\t\t} else {\n\t\t\t\t\tshowLabel = true;\n\t\t\t\t}\n\t\t\t} else if (shouldShowTickmark && this._labelsOverlapping && this.labelInterval > 0) {\n\t\t\t\t// When labels overlap, only show first and last\n\t\t\t\tshowLabel = isFirstOrLast;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tvalue,\n\t\t\t\tlabel: tm.label || value.toFixed(formatLabelPrecision),\n\t\t\t\tisInRange: value >= this.startValue && value <= this.endValue,\n\t\t\t\tposition,\n\t\t\t\tshowLabel,\n\t\t\t\tvisible: shouldShowTickmark,\n\t\t\t};\n\t\t}).filter(tick => tick.visible);\n\t}\n}\n\nSliderScale.define();\n\nexport default SliderScale;\nexport { SliderScaleOrientation };\nexport type { Tickmark };\n"]}
|
|
1
|
+
{"version":3,"file":"SliderScale.js","sourceRoot":"","sources":["../src/SliderScale.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,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EAAE,OAAO,EAAE,CAAC;oDACJ;AAKxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDACR;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDACD;AAG3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qDACH;AAazB;IAJC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,IAAI;KACf,CAAC;4CAC4B;AApKzB,WAAW;IANhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;KAC7B,CAAC;GACI,WAAW,CA+WhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,sBAAsB,EAAE,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.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 ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport SliderBase from \"./SliderBase.js\";\nimport SliderScaleTemplate from \"./SliderScaleTemplate.js\";\n\nimport SliderScaleCss from \"./generated/themes/SliderScale.css.js\";\nimport type SliderHandle from \"./SliderHandle.js\";\n\ntype Tickmark = {\n\tvalue: number;\n\tlabel?: string;\n};\n\nenum SliderScaleOrientation {\n\t/**\n\t * Horizontal orientation\n\t * @public\n\t */\n\tHorizontal = \"Horizontal\",\n\n\t/**\n\t * Vertical orientation\n\t * @private\n\t */\n\tVertical = \"Vertical\",\n}\n\n@customElement({\n\ttag: \"ui5-slider-scale\",\n\trenderer: jsxRenderer,\n\tstyles: SliderScaleCss,\n\ttemplate: SliderScaleTemplate,\n})\nclass SliderScale extends UI5Element {\n\t/**\n\t * Defines the start value of the progress bar.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number })\n\tstartValue = 0;\n\n\t/**\n\t * Defines the end value of the progress bar.\n\t * @default 100\n\t * @private\n\t */\n\t@property({ type: Number })\n\tendValue = 100;\n\n\t/**\n\t * Defines the minimum value of the scale.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number })\n\tmin = 0;\n\n\t/**\n\t * Defines the maximum value of the scale.\n\t * @default 100\n\t * @private\n\t */\n\t@property({ type: Number })\n\tmax = 100;\n\n\t/**\n\t * Defines the step value for tickmarks.\n\t * @default 1\n\t * @private\n\t */\n\t@property({ type: Number })\n\tstep = 1;\n\n\t/**\n\t * Determines whether tickmarks should be displayed.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tshowTickmarks = false;\n\n\t/**\n\t * Defines the orientation of the scale.\n\t * @default \"Horizontal\"\n\t * @private\n\t */\n\t@property()\n\torientation: `${SliderScaleOrientation}` = \"Horizontal\";\n\n\t/**\n\t * Defines custom tickmarks to be displayed on the scale.\n\t * @default []\n\t * @private\n\t */\n\t@property({ type: Array })\n\ttickmarks: Array<Tickmark> = [];\n\n\t/**\n\t * Defines the interval for displaying labels on tickmarks.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number })\n\tlabelInterval = 0;\n\n\t/**\n\t * Tab index for the progress bar.\n\t * @default -1\n\t * @private\n\t */\n\t@property({ type: Number })\n\tprogressTabIndex = -1;\n\n\t/**\n\t * ARIA role for the progress bar.\n\t * @private\n\t */\n\t@property()\n\tprogressRole?: string;\n\n\t/**\n\t * ARIA aria-valuenow for the progress bar.\n\t * @private\n\t */\n\t@property({ type: Number })\n\tprogressAriaValueNow?: number;\n\n\t/**\n\t * ARIA aria-valuetext for the progress bar.\n\t * @private\n\t */\n\t@property()\n\tprogressAriaValueText?: string;\n\n\t/**\n\t * ARIA aria-label for the progress bar.\n\t * @private\n\t */\n\t@property()\n\tprogressAriaLabel?: string;\n\n\t/**\n\t * ARIA aria-disabled for the progress bar.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tprogressAriaDisabled?: boolean;\n\n\t/**\n\t * Indicates that the progress bar is being pressed/dragged.\n\t * Used to show the focus outline during mouse interaction.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tprogressPressed = false;\n\n\t/**\n\t * Indicates that the progress bar should show as focused.\n\t * Set by parent component (RangeSlider) when the progress bar has focus.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tprogressFocused = false;\n\n\t/**\n\t * Indicates that the progress bar is being hovered.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tprogressHovered = false;\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_labelInterval = 1;\n\n\t@property({ type: Boolean })\n\t_labelsOverlapping = false;\n\n\t@property({ type: Boolean })\n\t_hiddenTickmarks = false;\n\n\t_resizeHandler: ResizeObserverCallback;\n\t_notResized = true;\n\n\t/**\n\t * Defines the component items.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t})\n\thandles!: Array<SliderHandle>;\n\n\tstatic get MIN_LABEL_DISTANCE() {\n\t\treturn 16;\n\t}\n\n\tstatic get MIN_SPACE_BETWEEN_TICKMARKS() {\n\t\treturn 8;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._resizeHandler = this._handleResize.bind(this);\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._resizeHandler);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._resizeHandler);\n\t}\n\n\tonAfterRendering() {\n\t\tif (this._notResized) {\n\t\t\tthis._handleResize();\n\t\t}\n\t}\n\n\t/**\n\t * Handle the responsiveness of the SliderScale's UI elements when resizing\n\t * @private\n\t */\n\t_handleResize() {\n\t\tif (!this.showTickmarks) {\n\t\t\tthis._hiddenTickmarks = false;\n\t\t\tthis._labelsOverlapping = false;\n\t\t\treturn;\n\t\t}\n\n\t\t// Mark resizing to avoid unnecessary calls to that function after rendering\n\t\tthis._notResized = false;\n\n\t\tconst containerSize = this.orientation === SliderScaleOrientation.Horizontal\n\t\t\t? this.getBoundingClientRect().width\n\t\t\t: this.getBoundingClientRect().height;\n\n\t\tconst tickmarksCount = this._tickmarksCount;\n\n\t\t// Check if tickmarks should be hidden due to insufficient space\n\t\tif (tickmarksCount > 1) {\n\t\t\tconst spaceBetweenTickmarks = containerSize / tickmarksCount;\n\t\t\tthis._hiddenTickmarks = spaceBetweenTickmarks < SliderScale.MIN_SPACE_BETWEEN_TICKMARKS;\n\t\t} else {\n\t\t\tthis._hiddenTickmarks = false;\n\t\t}\n\n\t\t// Check if labels should be hidden due to insufficient space or overlapping\n\t\tif (this.labelInterval <= 0 || this._hiddenTickmarks) {\n\t\t\tthis._labelsOverlapping = true;\n\t\t} else {\n\t\t\t// Calculate if labels would overlap based on their estimated width\n\t\t\tconst visibleLabelCount = Math.ceil((tickmarksCount - 1) / this.labelInterval) + 1;\n\t\t\tconst estimatedLabelWidth = 32; // Estimated width in pixels for a label (2rem = ~32px)\n\t\t\tconst requiredWidth = visibleLabelCount * estimatedLabelWidth;\n\t\t\tthis._labelsOverlapping = containerSize < requiredWidth;\n\t\t}\n\t}\n\n\t/**\n\t * Calculates space between tickmarks\n\t * @private\n\t */\n\t_spaceBetweenTickmarks() {\n\t\tconst tickmarksCount = this._tickmarksCount;\n\t\tif (tickmarksCount <= 1) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst containerSize = this.orientation === SliderScaleOrientation.Horizontal\n\t\t\t? this.getBoundingClientRect().width\n\t\t\t: this.getBoundingClientRect().height;\n\n\t\treturn containerSize / tickmarksCount;\n\t}\n\n\t_onProgressMouseEnter() {\n\t\tthis.progressHovered = true;\n\t\tthis.handles.forEach(handle => {\n\t\t\tif (!handle.active) {\n\t\t\t\thandle.hovered = true;\n\t\t\t}\n\t\t});\n\t}\n\n\t_onProgressMouseLeave() {\n\t\tthis.progressHovered = false;\n\t\tthis.handles.forEach(handle => {\n\t\t\thandle.hovered = false;\n\t\t});\n\t}\n\n\tget _tickmarksCount() {\n\t\tif (this.tickmarks.length > 0) {\n\t\t\treturn this.tickmarks.length - 1;\n\t\t}\n\n\t\tif (this.step === 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn (this.max - this.min) / this.step;\n\t}\n\n\tget _visibleLabels() {\n\t\treturn this._tickmarks.filter(tick => tick.showLabel);\n\t}\n\n\tget _progressStyle() {\n\t\tconst range = this.max - this.min;\n\t\t// Clamp startValue and endValue to be within min/max bounds\n\t\tconst clampedStartValue = Math.max(this.min, Math.min(this.startValue, this.max));\n\t\tconst clampedEndValue = Math.max(this.min, Math.min(this.endValue, this.max));\n\n\t\tconst start = ((clampedStartValue - this.min) / range) * 100;\n\t\tconst end = ((clampedEndValue - this.min) / range) * 100;\n\n\t\tif (this.orientation === SliderScaleOrientation.Vertical) {\n\t\t\treturn {\n\t\t\t\ttop: \"auto\",\n\t\t\t\tbottom: `${start}%`,\n\t\t\t\theight: `${end - start}%`,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tinsetInlineStart: `${start}%`,\n\t\t\twidth: `${end - start}%`,\n\t\t};\n\t}\n\n\tget _allTickmarks() {\n\t\t// If custom tickmarks are provided, use them\n\t\tif (this.tickmarks.length > 0) {\n\t\t\treturn this.tickmarks;\n\t\t}\n\n\t\t// Otherwise, generate tickmarks based on step\n\t\tif (!this.showTickmarks) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (this.step === 0) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst values = [];\n\t\tfor (let value = this.min; value <= this.max; value += this.step) {\n\t\t\tvalues.push({ value });\n\t\t}\n\t\treturn values;\n\t}\n\n\tget _tickmarks() {\n\t\tconst allTickmarks = this._allTickmarks;\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(this.step);\n\t\tconst formatLabelPrecision = stepPrecision > 0 ? stepPrecision : 0;\n\n\t\tif (allTickmarks.length === 0) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn allTickmarks.map((tm, index) => {\n\t\t\tconst value = tm.value;\n\t\t\tconst isFirstOrLast = index === 0 || index === allTickmarks.length - 1;\n\t\t\tconst position = ((value - this.min) / (this.max - this.min)) * 100;\n\n\t\t\t// Determine if this tickmark should be visible\n\t\t\tconst shouldShowTickmark = this._hiddenTickmarks ? isFirstOrLast : true;\n\n\t\t\t// Determine if the label should be visible\n\t\t\tlet showLabel = false;\n\t\t\tif (shouldShowTickmark && !this._labelsOverlapping) {\n\t\t\t\tif (this.labelInterval > 0) {\n\t\t\t\t\tshowLabel = index % this.labelInterval === 0;\n\t\t\t\t} else {\n\t\t\t\t\tshowLabel = true;\n\t\t\t\t}\n\t\t\t} else if (shouldShowTickmark && this._labelsOverlapping && this.labelInterval > 0) {\n\t\t\t\t// When labels overlap, only show first and last\n\t\t\t\tshowLabel = isFirstOrLast;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tvalue,\n\t\t\t\tlabel: tm.label || value.toFixed(formatLabelPrecision),\n\t\t\t\tisInRange: value >= this.startValue && value <= this.endValue,\n\t\t\t\tposition,\n\t\t\t\tshowLabel,\n\t\t\t\tvisible: shouldShowTickmark,\n\t\t\t};\n\t\t}).filter(tick => tick.visible);\n\t}\n}\n\nSliderScale.define();\n\nexport default SliderScale;\nexport { SliderScaleOrientation };\nexport type { Tickmark };\n"]}
|
package/dist/SliderTemplate.js
CHANGED
|
@@ -9,12 +9,12 @@ const _handlePosition = (min, max, value) => {
|
|
|
9
9
|
};
|
|
10
10
|
const handle = (slider) => {
|
|
11
11
|
const position = _handlePosition(slider.min, slider.max, slider.value);
|
|
12
|
-
return (_jsxs(_Fragment, { children: [_jsx(SliderHandle, { "data-sap-focus-ref": true, value: slider.value, min: slider.min, max: slider.max, tabIndex: slider.disabled ? -1 : 0, "aria-orientation": "horizontal", part: "handle", exportparts: "icon: handle-icon", role: "slider", "aria-valuemin": slider.min, "aria-valuemax": slider.max, "aria-valuenow": slider.value, "aria-label": slider._ariaLabel, "aria-disabled": slider._ariaDisabled, "aria-describedby": slider._ariaDescribedByHandleText, style: {
|
|
12
|
+
return (_jsxs(_Fragment, { children: [_jsx(SliderHandle, { "data-sap-focus-ref": true, value: slider.value, min: slider.min, max: slider.max, tabIndex: slider.disabled ? -1 : 0, "aria-orientation": "horizontal", part: "handle", exportparts: "icon: handle-icon", role: "slider", "aria-valuemin": slider.min, "aria-valuemax": slider.max, "aria-valuenow": slider.value, "aria-valuetext": slider._ariaValueText, "aria-label": slider._ariaLabel, "aria-disabled": slider._ariaDisabled, "aria-describedby": slider._ariaDescribedByHandleText, style: {
|
|
13
13
|
"inset-inline-start": `clamp(0%, ${position}%, 100%)`,
|
|
14
14
|
} }), tooltip(slider)] }));
|
|
15
15
|
};
|
|
16
|
-
const tooltip = (slider) => (_jsx(SliderTooltip, { open: slider.
|
|
16
|
+
const tooltip = (slider) => (_jsx(SliderTooltip, { open: slider._isTooltipVisible, value: slider.tooltipValue, min: slider.min, max: slider.max, editable: slider.editableTooltip, followRef: slider.shadowRoot?.querySelector("[ui5-slider-handle]"), valueState: slider.tooltipValueState, onChange: slider._onTooltipChange, onKeyDown: slider._onTooltipKeydown, onFocusChange: slider._onTooltipFocusChange, onOpen: slider._onTooltipOpen, onInput: slider._onTooltipInput }));
|
|
17
17
|
export default function SliderTemplate() {
|
|
18
|
-
return (_jsx(_Fragment, { children: _jsx("div", { class: "ui5-slider-evo-root", part: "root-container", onMouseDown: this._onmousedown, onTouchStart: this._onmousedown, onMouseOver: this._onmouseover, onMouseOut: this._onmouseout, onKeyDown: this._onkeydown, onKeyUp: this._onkeyup, children: _jsxs(SliderScale, { endValue: this.value, min: this.min, max: this.max, step: this.step, startValue: this.min, showTickmarks: this.showTickmarks, labelInterval: this.labelInterval, onFocusOut: this._onfocusout, onFocusIn: this._onfocusin, part: "scale", exportparts: "inner: scale-inner, progress: progress", children: [handle(this), this.editableTooltip && _jsx(_Fragment, { children: _jsx("span", { id: "ui5-slider-InputDesc", class: "ui5-hidden-text", children: this._ariaDescribedByInputText }) })] }) }) }));
|
|
18
|
+
return (_jsx(_Fragment, { children: _jsx("div", { class: "ui5-slider-evo-root", part: "root-container", onMouseDown: this._onmousedown, onTouchStart: this._onmousedown, onMouseOver: this._onmouseover, onMouseOut: this._onmouseout, onKeyDown: this._onkeydown, onKeyUp: this._onkeyup, children: _jsxs(SliderScale, { endValue: this.value, min: this.min, max: this.max, step: this.step, startValue: this.min, showTickmarks: this.showTickmarks || this._hasCustomTickmarks, labelInterval: this._hasCustomTickmarks ? 1 : this.labelInterval, tickmarks: this.tickmarks, onFocusOut: this._onfocusout, onFocusIn: this._onfocusin, part: "scale", exportparts: "inner: scale-inner, progress: progress", children: [handle(this), this.editableTooltip && _jsx(_Fragment, { children: _jsx("span", { id: "ui5-slider-InputDesc", class: "ui5-hidden-text", children: this._ariaDescribedByInputText }) })] }) }) }));
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=SliderTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderTemplate.js","sourceRoot":"","sources":["../src/SliderTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAE3C,MAAM,eAAe,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,KAAa,EAAE,EAAE;IACnE,MAAM,KAAK,GAAG,GAAG,GAAG,GAAG,CAAC;IACxB,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,GAA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B,CAChB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,cAAc;IACrC,OAAO,CACN,4BACC,cACC,KAAK,EAAC,qBAAqB,EAC3B,IAAI,EAAC,gBAAgB,EACrB,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,UAAU,EAAE,IAAI,CAAC,WAAW,EAC5B,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,OAAO,EAAE,IAAI,CAAC,QAAQ,YAEtB,MAAC,WAAW,IACX,QAAQ,EAAE,IAAI,CAAC,KAAK,EACpB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,UAAU,EAAE,IAAI,CAAC,GAAG,EACpB,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,mBAAmB,EAC7D,aAAa,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,EAChE,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,UAAU,EAAE,IAAI,CAAC,WAAW,EAC5B,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,IAAI,EAAC,OAAO,EACZ,WAAW,EAAC,wCAAwC,aAEnD,MAAM,CAAC,IAAI,CAAC,EAEZ,IAAI,CAAC,eAAe,IAAI,4BACxB,eAAM,EAAE,EAAC,sBAAsB,EAAC,KAAK,EAAC,iBAAiB,YAAE,IAAI,CAAC,yBAAyB,GAAQ,GAC7F,IACU,GACT,GACJ,CACH,CAAC;AACH,CAAC","sourcesContent":["import type Slider from \"./Slider.js\";\nimport SliderTooltip from \"./SliderTooltip.js\";\nimport SliderHandle from \"./SliderHandle.js\";\nimport SliderScale from \"./SliderScale.js\";\n\nconst _handlePosition = (min: number, max: number, value: number) => {\n\tconst range = max - min;\n\tconst position = ((value - min) / range) * 100;\n\treturn position;\n};\n\nconst handle = (slider: Slider) => {\n\tconst position = _handlePosition(slider.min, slider.max, slider.value);\n\n\treturn (\n\t\t<>\n\t\t\t<SliderHandle\n\t\t\t\tdata-sap-focus-ref\n\t\t\t\tvalue={slider.value}\n\t\t\t\tmin={slider.min}\n\t\t\t\tmax={slider.max}\n\t\t\t\ttabIndex={slider.disabled ? -1 : 0}\n\t\t\t\taria-orientation=\"horizontal\"\n\t\t\t\tpart=\"handle\"\n\t\t\t\texportparts=\"icon: handle-icon\"\n\t\t\t\trole=\"slider\"\n\t\t\t\taria-valuemin={slider.min}\n\t\t\t\taria-valuemax={slider.max}\n\t\t\t\taria-valuenow={slider.value}\n\t\t\t\taria-valuetext={slider._ariaValueText}\n\t\t\t\taria-label={slider._ariaLabel}\n\t\t\t\taria-disabled={slider._ariaDisabled}\n\t\t\t\taria-describedby={slider._ariaDescribedByHandleText}\n\t\t\t\tstyle={{\n\t\t\t\t\t\"inset-inline-start\": `clamp(0%, ${position}%, 100%)`,\n\t\t\t\t}}\n\t\t\t></SliderHandle>\n\n\t\t\t{tooltip(slider)}\n\t\t</>\n\t);\n};\n\nconst tooltip = (slider: Slider) => (\n\t<SliderTooltip\n\t\topen={slider._isTooltipVisible}\n\t\tvalue={slider.tooltipValue}\n\t\tmin={slider.min}\n\t\tmax={slider.max}\n\t\teditable={slider.editableTooltip}\n\t\tfollowRef={slider.shadowRoot?.querySelector(\"[ui5-slider-handle]\") as HTMLElement}\n\t\tvalueState={slider.tooltipValueState}\n\t\tonChange={slider._onTooltipChange}\n\t\tonKeyDown={slider._onTooltipKeydown}\n\t\tonFocusChange={slider._onTooltipFocusChange}\n\t\tonOpen={slider._onTooltipOpen}\n\t\tonInput={slider._onTooltipInput}\n\t>\n\t</SliderTooltip>\n);\n\nexport default function SliderTemplate(this: Slider) {\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclass=\"ui5-slider-evo-root\"\n\t\t\t\tpart=\"root-container\"\n\t\t\t\tonMouseDown={this._onmousedown}\n\t\t\t\tonTouchStart={this._onmousedown}\n\t\t\t\tonMouseOver={this._onmouseover}\n\t\t\t\tonMouseOut={this._onmouseout}\n\t\t\t\tonKeyDown={this._onkeydown}\n\t\t\t\tonKeyUp={this._onkeyup}\n\t\t\t>\n\t\t\t\t<SliderScale\n\t\t\t\t\tendValue={this.value}\n\t\t\t\t\tmin={this.min}\n\t\t\t\t\tmax={this.max}\n\t\t\t\t\tstep={this.step}\n\t\t\t\t\tstartValue={this.min}\n\t\t\t\t\tshowTickmarks={this.showTickmarks || this._hasCustomTickmarks}\n\t\t\t\t\tlabelInterval={this._hasCustomTickmarks ? 1 : this.labelInterval}\n\t\t\t\t\ttickmarks={this.tickmarks}\n\t\t\t\t\tonFocusOut={this._onfocusout}\n\t\t\t\t\tonFocusIn={this._onfocusin}\n\t\t\t\t\tpart=\"scale\"\n\t\t\t\t\texportparts=\"inner: scale-inner, progress: progress\"\n\t\t\t\t>\n\t\t\t\t\t{handle(this)}\n\n\t\t\t\t\t{this.editableTooltip && <>\n\t\t\t\t\t\t<span id=\"ui5-slider-InputDesc\" class=\"ui5-hidden-text\">{this._ariaDescribedByInputText}</span>\n\t\t\t\t\t</>}\n\t\t\t\t</SliderScale>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"]}
|
package/dist/Tab.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ import type ListItemCustom from "./ListItemCustom.js";
|
|
|
13
13
|
import TabInStripTemplate from "./TabInStripTemplate.js";
|
|
14
14
|
import TabInOverflowTemplate from "./TabInOverflowTemplate.js";
|
|
15
15
|
type TabClickEventDetail = {
|
|
16
|
-
tab: Tab;
|
|
17
16
|
originalEvent: Event;
|
|
18
17
|
};
|
|
19
18
|
interface TabInStrip extends HTMLElement {
|
package/dist/Tab.js
CHANGED
|
@@ -401,9 +401,8 @@ Tab = Tab_1 = __decorate([
|
|
|
401
401
|
/**
|
|
402
402
|
* Fired when the tab is selected either with a mouse/tap or by using the Enter or Space key.
|
|
403
403
|
*
|
|
404
|
-
* @since 2.
|
|
404
|
+
* @since 2.23.0
|
|
405
405
|
* @public
|
|
406
|
-
* @param {Tab} tab The selected tab.
|
|
407
406
|
* @param {Event} originalEvent The original event from the user interaction.
|
|
408
407
|
*/
|
|
409
408
|
,
|