@ui5/webcomponents 2.22.0-rc.3 → 2.22.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 +26 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/AvatarBadge.d.ts +3 -3
- package/dist/AvatarBadge.js +10 -10
- package/dist/AvatarBadge.js.map +1 -1
- package/dist/AvatarBadgeTemplate.js +1 -1
- package/dist/AvatarBadgeTemplate.js.map +1 -1
- package/dist/Calendar.d.ts +7 -1
- package/dist/Calendar.js +40 -3
- package/dist/Calendar.js.map +1 -1
- package/dist/CalendarHeaderTemplate.js +2 -2
- package/dist/CalendarHeaderTemplate.js.map +1 -1
- package/dist/ColorPaletteItem.d.ts +0 -1
- package/dist/ColorPaletteItem.js +0 -2
- package/dist/ColorPaletteItem.js.map +1 -1
- package/dist/MenuItemTemplate.d.ts +5 -1
- package/dist/MenuItemTemplate.js +8 -3
- package/dist/MenuItemTemplate.js.map +1 -1
- package/dist/RangeSlider.d.ts +19 -1
- package/dist/RangeSlider.js +112 -29
- package/dist/RangeSlider.js.map +1 -1
- package/dist/RangeSliderTemplate.d.ts +0 -3
- package/dist/RangeSliderTemplate.js +22 -17
- package/dist/RangeSliderTemplate.js.map +1 -1
- package/dist/SegmentedButtonItem.d.ts +0 -1
- package/dist/SegmentedButtonItem.js +0 -2
- package/dist/SegmentedButtonItem.js.map +1 -1
- package/dist/Slider.d.ts +1 -2
- package/dist/Slider.js +12 -7
- package/dist/Slider.js.map +1 -1
- package/dist/SliderBase.d.ts +0 -1
- package/dist/SliderBase.js +18 -15
- package/dist/SliderBase.js.map +1 -1
- package/dist/SliderHandle.d.ts +42 -9
- package/dist/SliderHandle.js +49 -9
- package/dist/SliderHandle.js.map +1 -1
- package/dist/SliderHandleTemplate.js +7 -1
- package/dist/SliderHandleTemplate.js.map +1 -1
- package/dist/SliderScale.d.ts +53 -0
- package/dist/SliderScale.js +67 -0
- package/dist/SliderScale.js.map +1 -1
- package/dist/SliderScaleTemplate.js +5 -1
- package/dist/SliderScaleTemplate.js.map +1 -1
- package/dist/SliderTemplate.js +1 -1
- package/dist/SliderTemplate.js.map +1 -1
- package/dist/Table.d.ts +1 -0
- package/dist/Table.js +16 -3
- package/dist/Table.js.map +1 -1
- package/dist/TableCell.d.ts +2 -2
- package/dist/TableCell.js +2 -2
- package/dist/TableCell.js.map +1 -1
- package/dist/TableHeaderRowTemplate.js +5 -2
- package/dist/TableHeaderRowTemplate.js.map +1 -1
- package/dist/TableNavigation.js +3 -0
- package/dist/TableNavigation.js.map +1 -1
- package/dist/TableRow.d.ts +0 -2
- package/dist/TableRow.js +0 -9
- package/dist/TableRow.js.map +1 -1
- package/dist/TableRowBase.d.ts +6 -1
- package/dist/TableRowBase.js +37 -2
- package/dist/TableRowBase.js.map +1 -1
- package/dist/TableRowTemplate.js +4 -2
- package/dist/TableRowTemplate.js.map +1 -1
- package/dist/Toolbar.d.ts +9 -0
- package/dist/Toolbar.js +4 -1
- package/dist/Toolbar.js.map +1 -1
- package/dist/css/themes/RangeSlider.css +1 -1
- package/dist/css/themes/Slider.css +1 -1
- package/dist/css/themes/SliderBase.css +1 -1
- package/dist/css/themes/SliderHandle.css +1 -1
- package/dist/css/themes/SliderScale.css +1 -1
- package/dist/css/themes/SliderTooltip.css +1 -1
- package/dist/css/themes/TableRow.css +1 -1
- package/dist/css/themes/TableRowBase.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 +36 -93
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hc_auto/parameters-bundle.css +37 -94
- 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 +43 -137
- package/dist/custom-elements.json +40 -101
- 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/themes/RangeSlider.css.d.ts +1 -1
- package/dist/generated/themes/RangeSlider.css.js +1 -1
- package/dist/generated/themes/RangeSlider.css.js.map +1 -1
- package/dist/generated/themes/Slider.css.d.ts +1 -1
- package/dist/generated/themes/Slider.css.js +1 -1
- package/dist/generated/themes/Slider.css.js.map +1 -1
- package/dist/generated/themes/SliderBase.css.d.ts +1 -1
- package/dist/generated/themes/SliderBase.css.js +1 -1
- package/dist/generated/themes/SliderBase.css.js.map +1 -1
- package/dist/generated/themes/SliderHandle.css.d.ts +1 -1
- package/dist/generated/themes/SliderHandle.css.js +1 -1
- package/dist/generated/themes/SliderHandle.css.js.map +1 -1
- package/dist/generated/themes/SliderScale.css.d.ts +1 -1
- package/dist/generated/themes/SliderScale.css.js +1 -1
- package/dist/generated/themes/SliderScale.css.js.map +1 -1
- package/dist/generated/themes/SliderTooltip.css.d.ts +1 -1
- package/dist/generated/themes/SliderTooltip.css.js +1 -1
- package/dist/generated/themes/SliderTooltip.css.js.map +1 -1
- package/dist/generated/themes/TableRow.css.d.ts +1 -1
- package/dist/generated/themes/TableRow.css.js +1 -1
- package/dist/generated/themes/TableRow.css.js.map +1 -1
- package/dist/generated/themes/TableRowBase.css.d.ts +1 -1
- package/dist/generated/themes/TableRowBase.css.js +1 -1
- package/dist/generated/themes/TableRowBase.css.js.map +1 -1
- package/dist/generated/themes/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 +36 -93
- 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 +37 -94
- 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/vscode.html-custom-data.json +12 -28
- package/dist/web-types.json +25 -60
- package/package.json +9 -9
- package/src/AvatarBadgeTemplate.tsx +1 -2
- package/src/CalendarHeaderTemplate.tsx +4 -0
- package/src/MenuItemTemplate.tsx +21 -10
- package/src/RangeSliderTemplate.tsx +146 -113
- package/src/SliderHandleTemplate.tsx +7 -1
- package/src/SliderScaleTemplate.tsx +26 -1
- package/src/SliderTemplate.tsx +0 -1
- package/src/TableHeaderRowTemplate.tsx +23 -1
- package/src/TableRowTemplate.tsx +13 -1
- package/src/i18n/messagebundle.properties +2 -2
- package/src/themes/RangeSlider.css +20 -68
- package/src/themes/Slider.css +3 -6
- package/src/themes/SliderBase.css +1 -269
- package/src/themes/SliderHandle.css +4 -3
- package/src/themes/SliderScale.css +45 -6
- package/src/themes/SliderTooltip.css +2 -2
- package/src/themes/TableRow.css +28 -39
- package/src/themes/TableRowBase.css +79 -20
- package/src/themes/base/SliderBase-parameters.css +1 -101
- package/src/themes/base/SliderHandle-parameters.css +22 -1
- package/src/themes/base/SliderScale-parameters.css +23 -3
- package/src/themes/base/SliderTooltip-parameters.css +3 -0
- package/src/themes/sap_fiori_3/Slider-parameters.css +4 -4
- package/src/themes/sap_fiori_3/SliderBase-parameters.css +0 -30
- package/src/themes/sap_fiori_3/SliderHandle-parameters.css +18 -1
- package/src/themes/sap_fiori_3/SliderScale-parameters.css +2 -8
- package/src/themes/sap_fiori_3/SliderTooltip-parameters.css +5 -0
- package/src/themes/sap_fiori_3_dark/Slider-parameters.css +4 -4
- package/src/themes/sap_fiori_3_dark/SliderBase-parameters.css +1 -26
- package/src/themes/sap_fiori_3_dark/SliderHandle-parameters.css +1 -5
- package/src/themes/sap_fiori_3_dark/SliderScale-parameters.css +1 -13
- package/src/themes/sap_fiori_3_dark/SliderTooltip-parameters.css +5 -0
- package/src/themes/sap_fiori_3_hcb/Slider-parameters.css +4 -4
- package/src/themes/sap_fiori_3_hcb/SliderBase-parameters.css +1 -39
- package/src/themes/sap_fiori_3_hcb/SliderHandle-parameters.css +1 -5
- package/src/themes/sap_fiori_3_hcb/SliderScale-parameters.css +4 -6
- package/src/themes/sap_fiori_3_hcb/SliderTooltip-parameters.css +5 -0
- package/src/themes/sap_fiori_3_hcw/Slider-parameters.css +4 -4
- package/src/themes/sap_fiori_3_hcw/SliderBase-parameters.css +1 -37
- package/src/themes/sap_fiori_3_hcw/SliderHandle-parameters.css +1 -5
- package/src/themes/sap_fiori_3_hcw/SliderScale-parameters.css +1 -14
- package/src/themes/sap_fiori_3_hcw/SliderTooltip-parameters.css +5 -0
- package/src/themes/sap_horizon/Slider-parameters.css +4 -4
- package/src/themes/sap_horizon/SliderBase-parameters.css +0 -49
- package/src/themes/sap_horizon/SliderHandle-parameters.css +2 -1
- package/src/themes/sap_horizon/SliderScale-parameters.css +4 -5
- package/src/themes/sap_horizon_dark/Slider-parameters.css +4 -4
- package/src/themes/sap_horizon_dark/SliderBase-parameters.css +1 -50
- package/src/themes/sap_horizon_dark/SliderHandle-parameters.css +1 -5
- package/src/themes/sap_horizon_dark/SliderScale-parameters.css +1 -10
- package/src/themes/sap_horizon_dark/SliderTooltip-parameters.css +1 -0
- package/src/themes/sap_horizon_hcb/Slider-parameters.css +4 -4
- package/src/themes/sap_horizon_hcb/SliderBase-parameters.css +1 -71
- package/src/themes/sap_horizon_hcb/SliderHandle-parameters.css +4 -3
- package/src/themes/sap_horizon_hcb/SliderScale-parameters.css +3 -2
- package/src/themes/sap_horizon_hcb/SliderTooltip-parameters.css +1 -0
- package/src/themes/sap_horizon_hcw/Slider-parameters.css +4 -4
- package/src/themes/sap_horizon_hcw/SliderBase-parameters.css +1 -72
- package/src/themes/sap_horizon_hcw/SliderHandle-parameters.css +1 -5
- package/src/themes/sap_horizon_hcw/SliderScale-parameters.css +1 -10
- package/src/themes/sap_horizon_hcw/SliderTooltip-parameters.css +1 -0
- package/dist/SliderBaseTemplate.d.ts +0 -10
- package/dist/SliderBaseTemplate.js +0 -19
- package/dist/SliderBaseTemplate.js.map +0 -1
- package/src/SliderBaseTemplate.tsx +0 -65
package/dist/SliderHandle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderHandle.js","sourceRoot":"","sources":["../src/SliderHandle.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,oBAAoB,MAAM,2BAA2B,CAAC;AAC7D,OAAO,MAAM,MAAM,wCAAwC,CAAC;AAG5D;;;;;;;;GAQG;AAOH,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAArC;;QACC
|
|
1
|
+
{"version":3,"file":"SliderHandle.js","sourceRoot":"","sources":["../src/SliderHandle.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qD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,aAAa,CAAC;QACd,GAAG,EAAE,mBAAmB;QACxB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,oBAAoB;QAC9B,MAAM;KACN,CAAC;GACI,YAAY,CAsEjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport SliderHandleTemplate from \"./SliderHandleTemplate.js\";\nimport styles from \"./generated/themes/SliderHandle.css.js\";\nimport type { SliderScaleOrientation } from \"./SliderScale.js\";\n\n/**\n * Handle types for the slider handle component.\n * @private\n */\nenum SliderHandleType {\n\t/**\n\t * Start handle (left handle in LTR mode).\n\t */\n\tStart = \"Start\",\n\n\t/**\n\t * End handle (right handle in LTR mode).\n\t */\n\tEnd = \"End\",\n\n\t/**\n\t * Single handle (used by regular Slider).\n\t */\n\tSingle = \"Single\",\n}\n\n/**\n * @class\n * The <code>ui5-slider-handle</code> component represents the handle of the <code>ui5-slider</code> component.\n *\n * @constructor\n * @extends UI5Element\n * @since 2.22.0\n * @private\n */\n@customElement({\n\ttag: \"ui5-slider-handle\",\n\trenderer: jsxRenderer,\n\ttemplate: SliderHandleTemplate,\n\tstyles,\n})\nclass SliderHandle extends UI5Element {\n\t/**\n\t * Defines the value of the slider handle.\n\t * <br><br>\n\t * <b>Note:</b> The value should be between the <code>min</code> and <code>max</code> properties of the parent <code>ui5-slider</code>.\n\t * @since 2.22.0\n\t */\n\t@property({ type: Number })\n\tvalue = 0;\n\n\t/**\n\t * Defines the minimum value of the slider handle.\n\t * <br><br>\n\t * <b>Note:</b> The value should be less than the <code>max</code> property of the parent <code>ui5-slider</code>.\n\t * @since 2.22.0\n\t */\n\t@property({ type: Number })\n\tmin = 0;\n\n\t/**\n\t * Defines the maximum value of the slider handle.\n\t * <br><br>\n\t * <b>Note:</b> The value should be greater than the <code>min</code> property of the parent <code>ui5-slider</code>.\n\t * @since 2.22.0\n\t */\n\t@property({ type: Number })\n\tmax = 100;\n\n\t/**\n\t * Defines whether the slider handle is active.\n\t * <br><br>\n\t * <b>Note:</b> An active slider handle is currently being interacted with.\n\t * @since 2.22.0\n\t *\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive = false;\n\n\t/**\n\t * Defines whether the slider handle should appear hovered.\n\t * <br><br>\n\t * <b>Note:</b> Used when the progress bar is hovered to show both handles as hovered.\n\t * @since 2.22.0\n\t *\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\thovered = false;\n\n\t/**\n\t * Defines the orientation of the slider handle.\n\t *\n\t * @private\n\t */\n\t@property()\n\torientation: `${SliderScaleOrientation}` = \"Horizontal\";\n\n\t/**\n\t * Defines the type of handle for styling purposes.\n\t * Used by RangeSlider to differentiate between start and end handles.\n\t *\n\t * @private\n\t */\n\t@property()\n\thandleType: `${SliderHandleType}` = \"Single\";\n\n\tgetFocusDomRef(): HTMLElement | undefined {\n\t\treturn this;\n\t}\n}\n\nSliderHandle.define();\n\nexport default SliderHandle;\nexport { SliderHandleType };\n"]}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@ui5/webcomponents-base/jsx-runtime";
|
|
2
2
|
import directionArrows from "@ui5/webcomponents-icons/dist/direction-arrows.js";
|
|
3
3
|
import Icon from "./Icon.js";
|
|
4
|
+
import { SliderHandleType } from "./SliderHandle.js";
|
|
4
5
|
export default function SliderHandleTemplate() {
|
|
5
|
-
return (_jsx("div", { class:
|
|
6
|
+
return (_jsx("div", { class: {
|
|
7
|
+
"ui5-slider-handle-container": true,
|
|
8
|
+
"ui5-slider-handle": true,
|
|
9
|
+
"ui5-slider-handle--start": this.handleType === SliderHandleType.Start,
|
|
10
|
+
"ui5-slider-handle--end": this.handleType === SliderHandleType.End,
|
|
11
|
+
}, children: _jsx(Icon, { name: directionArrows, mode: "Decorative", part: "icon", "slider-icon": true }) }));
|
|
6
12
|
}
|
|
7
13
|
//# sourceMappingURL=SliderHandleTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderHandleTemplate.js","sourceRoot":"","sources":["../src/SliderHandleTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,eAAe,MAAM,mDAAmD,CAAC;AAChF,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"SliderHandleTemplate.js","sourceRoot":"","sources":["../src/SliderHandleTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,eAAe,MAAM,mDAAmD,CAAC;AAChF,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,CAAC,OAAO,UAAU,oBAAoB;IAC3C,OAAO,CACN,cAAK,KAAK,EAAE;YACX,6BAA6B,EAAE,IAAI;YACnC,mBAAmB,EAAE,IAAI;YACzB,0BAA0B,EAAE,IAAI,CAAC,UAAU,KAAK,gBAAgB,CAAC,KAAK;YACtE,wBAAwB,EAAE,IAAI,CAAC,UAAU,KAAK,gBAAgB,CAAC,GAAG;SAClE,YACA,KAAC,IAAI,IAAC,IAAI,EAAE,eAAe,EAC1B,IAAI,EAAC,YAAY,EACjB,IAAI,EAAC,MAAM,wBAEJ,GACH,CACN,CAAC;AACH,CAAC","sourcesContent":["import directionArrows from \"@ui5/webcomponents-icons/dist/direction-arrows.js\";\nimport Icon from \"./Icon.js\";\nimport type SliderHandle from \"./SliderHandle.js\";\nimport { SliderHandleType } from \"./SliderHandle.js\";\n\nexport default function SliderHandleTemplate(this: SliderHandle) {\n\treturn (\n\t\t<div class={{\n\t\t\t\"ui5-slider-handle-container\": true,\n\t\t\t\"ui5-slider-handle\": true,\n\t\t\t\"ui5-slider-handle--start\": this.handleType === SliderHandleType.Start,\n\t\t\t\"ui5-slider-handle--end\": this.handleType === SliderHandleType.End,\n\t\t}}>\n\t\t\t<Icon name={directionArrows}\n\t\t\t\tmode=\"Decorative\"\n\t\t\t\tpart=\"icon\"\n\t\t\t\tslider-icon\n\t\t\t></Icon>\n\t\t</div>\n\t);\n}\n"]}
|
package/dist/SliderScale.d.ts
CHANGED
|
@@ -72,6 +72,57 @@ declare class SliderScale extends UI5Element {
|
|
|
72
72
|
* @private
|
|
73
73
|
*/
|
|
74
74
|
labelInterval: number;
|
|
75
|
+
/**
|
|
76
|
+
* Tab index for the progress bar.
|
|
77
|
+
* @default -1
|
|
78
|
+
* @private
|
|
79
|
+
*/
|
|
80
|
+
progressTabIndex: number;
|
|
81
|
+
/**
|
|
82
|
+
* ARIA role for the progress bar.
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
progressRole?: string;
|
|
86
|
+
/**
|
|
87
|
+
* ARIA aria-valuenow for the progress bar.
|
|
88
|
+
* @private
|
|
89
|
+
*/
|
|
90
|
+
progressAriaValueNow?: number;
|
|
91
|
+
/**
|
|
92
|
+
* ARIA aria-valuetext for the progress bar.
|
|
93
|
+
* @private
|
|
94
|
+
*/
|
|
95
|
+
progressAriaValueText?: string;
|
|
96
|
+
/**
|
|
97
|
+
* ARIA aria-label for the progress bar.
|
|
98
|
+
* @private
|
|
99
|
+
*/
|
|
100
|
+
progressAriaLabel?: string;
|
|
101
|
+
/**
|
|
102
|
+
* ARIA aria-disabled for the progress bar.
|
|
103
|
+
* @private
|
|
104
|
+
*/
|
|
105
|
+
progressAriaDisabled?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Indicates that the progress bar is being pressed/dragged.
|
|
108
|
+
* Used to show the focus outline during mouse interaction.
|
|
109
|
+
* @default false
|
|
110
|
+
* @private
|
|
111
|
+
*/
|
|
112
|
+
progressPressed: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Indicates that the progress bar should show as focused.
|
|
115
|
+
* Set by parent component (RangeSlider) when the progress bar has focus.
|
|
116
|
+
* @default false
|
|
117
|
+
* @private
|
|
118
|
+
*/
|
|
119
|
+
progressFocused: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Indicates that the progress bar is being hovered.
|
|
122
|
+
* @default false
|
|
123
|
+
* @private
|
|
124
|
+
*/
|
|
125
|
+
progressHovered: boolean;
|
|
75
126
|
/**
|
|
76
127
|
* @private
|
|
77
128
|
*/
|
|
@@ -101,6 +152,8 @@ declare class SliderScale extends UI5Element {
|
|
|
101
152
|
* @private
|
|
102
153
|
*/
|
|
103
154
|
_spaceBetweenTickmarks(): number;
|
|
155
|
+
_onProgressMouseEnter(): void;
|
|
156
|
+
_onProgressMouseLeave(): void;
|
|
104
157
|
get _tickmarksCount(): number;
|
|
105
158
|
get _visibleLabels(): {
|
|
106
159
|
value: number;
|
package/dist/SliderScale.js
CHANGED
|
@@ -90,6 +90,32 @@ let SliderScale = SliderScale_1 = class SliderScale extends UI5Element {
|
|
|
90
90
|
* @private
|
|
91
91
|
*/
|
|
92
92
|
this.labelInterval = 0;
|
|
93
|
+
/**
|
|
94
|
+
* Tab index for the progress bar.
|
|
95
|
+
* @default -1
|
|
96
|
+
* @private
|
|
97
|
+
*/
|
|
98
|
+
this.progressTabIndex = -1;
|
|
99
|
+
/**
|
|
100
|
+
* Indicates that the progress bar is being pressed/dragged.
|
|
101
|
+
* Used to show the focus outline during mouse interaction.
|
|
102
|
+
* @default false
|
|
103
|
+
* @private
|
|
104
|
+
*/
|
|
105
|
+
this.progressPressed = false;
|
|
106
|
+
/**
|
|
107
|
+
* Indicates that the progress bar should show as focused.
|
|
108
|
+
* Set by parent component (RangeSlider) when the progress bar has focus.
|
|
109
|
+
* @default false
|
|
110
|
+
* @private
|
|
111
|
+
*/
|
|
112
|
+
this.progressFocused = false;
|
|
113
|
+
/**
|
|
114
|
+
* Indicates that the progress bar is being hovered.
|
|
115
|
+
* @default false
|
|
116
|
+
* @private
|
|
117
|
+
*/
|
|
118
|
+
this.progressHovered = false;
|
|
93
119
|
/**
|
|
94
120
|
* @private
|
|
95
121
|
*/
|
|
@@ -160,6 +186,20 @@ let SliderScale = SliderScale_1 = class SliderScale extends UI5Element {
|
|
|
160
186
|
: this.getBoundingClientRect().height;
|
|
161
187
|
return containerSize / tickmarksCount;
|
|
162
188
|
}
|
|
189
|
+
_onProgressMouseEnter() {
|
|
190
|
+
this.progressHovered = true;
|
|
191
|
+
this.handles.forEach(handle => {
|
|
192
|
+
if (!handle.active) {
|
|
193
|
+
handle.hovered = true;
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
_onProgressMouseLeave() {
|
|
198
|
+
this.progressHovered = false;
|
|
199
|
+
this.handles.forEach(handle => {
|
|
200
|
+
handle.hovered = false;
|
|
201
|
+
});
|
|
202
|
+
}
|
|
163
203
|
get _tickmarksCount() {
|
|
164
204
|
if (this.step === 0) {
|
|
165
205
|
return 0;
|
|
@@ -271,6 +311,33 @@ __decorate([
|
|
|
271
311
|
__decorate([
|
|
272
312
|
property({ type: Number })
|
|
273
313
|
], SliderScale.prototype, "labelInterval", void 0);
|
|
314
|
+
__decorate([
|
|
315
|
+
property({ type: Number })
|
|
316
|
+
], SliderScale.prototype, "progressTabIndex", void 0);
|
|
317
|
+
__decorate([
|
|
318
|
+
property()
|
|
319
|
+
], SliderScale.prototype, "progressRole", void 0);
|
|
320
|
+
__decorate([
|
|
321
|
+
property({ type: Number })
|
|
322
|
+
], SliderScale.prototype, "progressAriaValueNow", void 0);
|
|
323
|
+
__decorate([
|
|
324
|
+
property()
|
|
325
|
+
], SliderScale.prototype, "progressAriaValueText", void 0);
|
|
326
|
+
__decorate([
|
|
327
|
+
property()
|
|
328
|
+
], SliderScale.prototype, "progressAriaLabel", void 0);
|
|
329
|
+
__decorate([
|
|
330
|
+
property({ type: Boolean })
|
|
331
|
+
], SliderScale.prototype, "progressAriaDisabled", void 0);
|
|
332
|
+
__decorate([
|
|
333
|
+
property({ type: Boolean })
|
|
334
|
+
], SliderScale.prototype, "progressPressed", void 0);
|
|
335
|
+
__decorate([
|
|
336
|
+
property({ type: Boolean })
|
|
337
|
+
], SliderScale.prototype, "progressFocused", void 0);
|
|
338
|
+
__decorate([
|
|
339
|
+
property({ type: Boolean })
|
|
340
|
+
], SliderScale.prototype, "progressHovered", void 0);
|
|
274
341
|
__decorate([
|
|
275
342
|
property({ type: Number })
|
|
276
343
|
], SliderScale.prototype, "_labelInterval", void 0);
|
package/dist/SliderScale.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,wDAAwD,CAAC;AAEnF,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAE3D,OAAO,cAAc,MAAM,uCAAuC,CAAC;AAQnE,IAAK,sBAYJ;AAZD,WAAK,sBAAsB;IAC1B;;;OAGG;IACH,mDAAyB,CAAA;IAEzB;;;OAGG;IACH,+CAAqB,CAAA;AACtB,CAAC,EAZI,sBAAsB,KAAtB,sBAAsB,QAY1B;AAQD,IAAM,WAAW,mBAAjB,MAAM,WAAY,SAAQ,UAAU;IAkGnC,MAAM,KAAK,kBAAkB;QAC5B,OAAO,EAAE,CAAC;IACX,CAAC;IAED,MAAM,KAAK,2BAA2B;QACrC,OAAO,CAAC,CAAC;IACV,CAAC;IAED;QACC,KAAK,EAAE,CAAC;QA1GT;;;;WAIG;QAEH,eAAU,GAAG,CAAC,CAAC;QAEf;;;;W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AC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CACZ;AAQf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACZ;AAQf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACnB;AAQR;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACjB;AAQV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAClB;AAQT;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;kDACN;AAQtB;IADC,QAAQ,EAAE;gDAC6C;AAQxD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;8CACM;AAQhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACT;AAMlB;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;AAhGzB,WAAW;IANhB,aAAa,CAAC;QACd,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;KAC7B,CAAC;GACI,WAAW,CAuRhB;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 * @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\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,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,wDAAwD,CAAC;AAEnF,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAE3D,OAAO,cAAc,MAAM,uCAAuC,CAAC;AAQnE,IAAK,sBAYJ;AAZD,WAAK,sBAAsB;IAC1B;;;OAGG;IACH,mDAAyB,CAAA;IAEzB;;;OAGG;IACH,+CAAqB,CAAA;AACtB,CAAC,EAZI,sBAAsB,KAAtB,sBAAsB,QAY1B;AAQD,IAAM,WAAW,mBAAjB,MAAM,WAAY,SAAQ,UAAU;IAsKnC,MAAM,KAAK,kBAAkB;QAC5B,OAAO,EAAE,CAAC;IACX,CAAC;IAED,MAAM,KAAK,2BAA2B;QACrC,OAAO,CAAC,CAAC;IACV,CAAC;IAED;QACC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AAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACT;AAQlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDACL;AAOtB;IADC,QAAQ,EAAE;iDACW;AAOtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yDACG;AAO9B;IADC,QAAQ,EAAE;0DACoB;AAO/B;IADC,QAAQ,EAAE;sDACgB;AAO3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yDACG;AAS/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oDACJ;AASxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oDACJ;AAQxB;IADC,QAAQ,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"]}
|
|
@@ -6,6 +6,10 @@ export default function SliderScaleTemplate() {
|
|
|
6
6
|
}, style: {
|
|
7
7
|
insetInlineStart: `${this.orientation === "Horizontal" ? tick.position : "50"}%`,
|
|
8
8
|
bottom: `${this.orientation === "Vertical" ? tick.position : "auto"}%`
|
|
9
|
-
}, children: tick.label && tick.showLabel && (_jsx("span", { class: "ui5-slider-scale-tickmark-label", children: tick.label })) }))) })), _jsx("div", { class:
|
|
9
|
+
}, children: tick.label && tick.showLabel && (_jsx("span", { class: "ui5-slider-scale-tickmark-label", children: tick.label })) }))) })), _jsx("div", { class: {
|
|
10
|
+
"ui5-slider-scale-progress": true,
|
|
11
|
+
"ui5-slider-progress": true,
|
|
12
|
+
"ui5-slider-progress--focused": this.progressFocused || this.progressPressed,
|
|
13
|
+
}, part: "progress", style: this._progressStyle, tabIndex: this.progressTabIndex, role: "slider", "aria-orientation": "horizontal", "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": this.progressAriaValueNow, "aria-valuetext": this.progressAriaValueText, "aria-label": this.progressAriaLabel, "aria-disabled": this.progressAriaDisabled, onMouseEnter: this._onProgressMouseEnter, onMouseLeave: this._onProgressMouseLeave }), _jsx("div", { class: "ui5-slider-scale-progress-hover-area", style: this._progressStyle, onMouseEnter: this._onProgressMouseEnter, onMouseLeave: this._onProgressMouseLeave }), _jsx("slot", {})] }));
|
|
10
14
|
}
|
|
11
15
|
//# sourceMappingURL=SliderScaleTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderScaleTemplate.js","sourceRoot":"","sources":["../src/SliderScaleTemplate.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,OAAO,UAAU,mBAAmB;IAC1C,OAAO,CACN,eAAK,KAAK,EAAC,uBAAuB,EAAC,IAAI,EAAC,OAAO,aAC7C,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,CAC9B,cAAK,KAAK,EAAC,sCAAsC,YAC/C,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAC5B,cACC,KAAK,EAAE;wBACN,2BAA2B,EAAE,IAAI;wBACjC,oCAAoC,EAAE,IAAI,CAAC,SAAS;qBACpD,EACD,KAAK,EAAE;wBACN,gBAAgB,EAAE,GAAG,IAAI,CAAC,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,GAAG;wBAChF,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,GAAG;qBACtE,YAEA,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,SAAS,IAAI,CAChC,eAAM,KAAK,EAAC,iCAAiC,YAC3C,IAAI,CAAC,KAAK,GACL,CACP,GACI,CACN,CAAC,GACG,CACN,EACD,
|
|
1
|
+
{"version":3,"file":"SliderScaleTemplate.js","sourceRoot":"","sources":["../src/SliderScaleTemplate.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,OAAO,UAAU,mBAAmB;IAC1C,OAAO,CACN,eAAK,KAAK,EAAC,uBAAuB,EAAC,IAAI,EAAC,OAAO,aAC7C,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,CAC9B,cAAK,KAAK,EAAC,sCAAsC,YAC/C,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAC5B,cACC,KAAK,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ale from \"./SliderScale.js\";\n\nexport default function SliderScaleTemplate(this: SliderScale) {\n\treturn (\n\t\t<div class=\"ui5-slider-scale-root\" part=\"inner\">\n\t\t\t{this._tickmarks.length > 0 && (\n\t\t\t\t<div class=\"ui5-slider-scale-tickmarks-container\">\n\t\t\t\t\t{this._tickmarks.map(tick => (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\"ui5-slider-scale-tickmark\": true,\n\t\t\t\t\t\t\t\t\"ui5-slider-scale-tickmark-in-range\": tick.isInRange,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tinsetInlineStart: `${this.orientation === \"Horizontal\" ? tick.position : \"50\"}%`,\n\t\t\t\t\t\t\t\tbottom: `${this.orientation === \"Vertical\" ? tick.position : \"auto\"}%`\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{tick.label && tick.showLabel && (\n\t\t\t\t\t\t\t\t<span class=\"ui5-slider-scale-tickmark-label\">\n\t\t\t\t\t\t\t\t\t{tick.label}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<div\n\t\t\t\tclass={{\n\t\t\t\t\t\"ui5-slider-scale-progress\": true,\n\t\t\t\t\t\"ui5-slider-progress\": true,\n\t\t\t\t\t\"ui5-slider-progress--focused\": this.progressFocused || this.progressPressed,\n\t\t\t\t}}\n\t\t\t\tpart=\"progress\"\n\t\t\t\tstyle={this._progressStyle}\n\t\t\t\ttabIndex={this.progressTabIndex}\n\t\t\t\trole=\"slider\"\n\t\t\t\taria-orientation=\"horizontal\"\n\t\t\t\taria-valuemin={this.min}\n\t\t\t\taria-valuemax={this.max}\n\t\t\t\taria-valuenow={this.progressAriaValueNow}\n\t\t\t\taria-valuetext={this.progressAriaValueText}\n\t\t\t\taria-label={this.progressAriaLabel}\n\t\t\t\taria-disabled={this.progressAriaDisabled}\n\t\t\t\tonMouseEnter={this._onProgressMouseEnter}\n\t\t\t\tonMouseLeave={this._onProgressMouseLeave}\n\t\t\t></div>\n\t\t\t<div\n\t\t\t\tclass=\"ui5-slider-scale-progress-hover-area\"\n\t\t\t\tstyle={this._progressStyle}\n\t\t\t\tonMouseEnter={this._onProgressMouseEnter}\n\t\t\t\tonMouseLeave={this._onProgressMouseLeave}\n\t\t\t></div>\n\t\t\t<slot></slot>\n\t\t</div>\n\t);\n}\n"]}
|
package/dist/SliderTemplate.js
CHANGED
|
@@ -9,7 +9,7 @@ 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-
|
|
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: {
|
|
13
13
|
"inset-inline-start": `clamp(0%, ${position}%, 100%)`,
|
|
14
14
|
} }), tooltip(slider)] }));
|
|
15
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderTemplate.js","sourceRoot":"","sources":["../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,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-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._tooltipsOpen}\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}\n\t\t\t\t\tlabelInterval={this.labelInterval}\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/Table.d.ts
CHANGED
|
@@ -326,6 +326,7 @@ declare class Table extends UI5Element {
|
|
|
326
326
|
};
|
|
327
327
|
};
|
|
328
328
|
get _gridTemplateColumns(): string | undefined;
|
|
329
|
+
get _hasFlexibleColumns(): boolean;
|
|
329
330
|
get _isRowSelectorRequired(): boolean | undefined;
|
|
330
331
|
get _scrollContainer(): HTMLElement;
|
|
331
332
|
get _stickyElements(): (TableHeaderRow | TableHeaderCell)[];
|
package/dist/Table.js
CHANGED
|
@@ -181,8 +181,9 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
|
181
181
|
onBeforeRendering() {
|
|
182
182
|
this._renderNavigated = this.rows.some(row => row.navigated);
|
|
183
183
|
[...this.headerRow, ...this.rows].forEach((row, index) => {
|
|
184
|
+
row._rowActionCount = this.rows.length > 0 ? this.rowActionCount : 0;
|
|
184
185
|
row._renderNavigated = this._renderNavigated;
|
|
185
|
-
row.
|
|
186
|
+
row._renderDummyCell = !this._hasFlexibleColumns;
|
|
186
187
|
row._alternate = this.alternateRowColors && index % 2 === 0;
|
|
187
188
|
});
|
|
188
189
|
this.style.setProperty("--ui5_grid_sticky_top", this.stickyTop);
|
|
@@ -346,16 +347,28 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
|
346
347
|
}
|
|
347
348
|
return width;
|
|
348
349
|
}));
|
|
350
|
+
// Dummy Cell Width (before actions when popin, after navigated otherwise)
|
|
351
|
+
const dummyColumnWidth = !this._hasFlexibleColumns ? "minmax(0, 1fr)" : "";
|
|
352
|
+
const hasPopinCells = this.headerRow[0]._popinCells.length > 0;
|
|
353
|
+
if (dummyColumnWidth && hasPopinCells) {
|
|
354
|
+
widths.push(dummyColumnWidth);
|
|
355
|
+
}
|
|
349
356
|
// Row Action Cell Width
|
|
350
|
-
if (this.rowActionCount > 0) {
|
|
357
|
+
if (this.rowActionCount > 0 && this.rows.length > 0) {
|
|
351
358
|
widths.push(`calc(var(--_ui5_button_base_min_width) * ${this.rowActionCount} + var(--_ui5_table_row_actions_gap) * ${this.rowActionCount - 1} + var(--_ui5_table_cell_horizontal_padding) * 2)`);
|
|
352
359
|
}
|
|
353
360
|
// Navigated Cell Width
|
|
354
361
|
if (this._renderNavigated) {
|
|
355
362
|
widths.push(`var(--_ui5_table_navigated_cell_width)`);
|
|
356
363
|
}
|
|
364
|
+
if (dummyColumnWidth && !hasPopinCells) {
|
|
365
|
+
widths.push(dummyColumnWidth);
|
|
366
|
+
}
|
|
357
367
|
return widths.join(" ");
|
|
358
368
|
}
|
|
369
|
+
get _hasFlexibleColumns() {
|
|
370
|
+
return this.headerRow?.[0]?._visibleCells.some(cell => !isValidColumnWidth(cell.width));
|
|
371
|
+
}
|
|
359
372
|
get _isRowSelectorRequired() {
|
|
360
373
|
return this.rows.length > 0 && this._getSelection()?.isRowSelectorRequired();
|
|
361
374
|
}
|
|
@@ -387,7 +400,7 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
|
387
400
|
if (this._isRowSelectorRequired) {
|
|
388
401
|
ariaColCount++;
|
|
389
402
|
}
|
|
390
|
-
if (this.rowActionCount > 0) {
|
|
403
|
+
if (this.rowActionCount > 0 && this.rows.length > 0) {
|
|
391
404
|
ariaColCount++;
|
|
392
405
|
}
|
|
393
406
|
if (this.headerRow[0]._popinCells.length > 0) {
|
package/dist/Table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../src/Table.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,EACN,aAAa,EAAE,UAAU,IAAI,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,GAC9D,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAC1D,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,iBAAiB,MAAM,8BAA8B,CAAC;AAC7D,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AACnE,OAAO,aAAa,MAAM,wDAAwD,CAAC;AACnF,OAAO,EACN,2BAA2B,EAAE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EF;;;;;;;;;;;;;;OAcG;;IACF,WAAW,CAAC,MAAM,EAAE;QACpB,OAAO,EAAE,IAAI;KACb,CAAC;IAEF;;;;;;;OAOG;;IACF,WAAW,CAAC,kBAAkB,EAAE;QAChC,OAAO,EAAE,KAAK;KACd,CAAC;GAEI,KAAK,CAgdV;AAED,KAAK,CAAC,MAAM,EAAE,CAAC;AAEf,eAAe,KAAK,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport {\n\tcustomElement, slotStrict as slot, property, eventStrict, i18n,\n} from \"@ui5/webcomponents-base/dist/decorators.js\";\nimport query from \"@ui5/webcomponents-base/dist/decorators/query.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport TableTemplate from \"./TableTemplate.js\";\nimport TableStyles from \"./generated/themes/Table.css.js\";\nimport TableExtension from \"./TableExtension.js\";\nimport TableNavigation from \"./TableNavigation.js\";\nimport TableOverflowMode from \"./types/TableOverflowMode.js\";\nimport TableDragAndDrop from \"./TableDragAndDrop.js\";\nimport TableCustomAnnouncement from \"./TableCustomAnnouncement.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport {\n\tfindVerticalScrollContainer, scrollElementIntoView, isFeature, isValidColumnWidth,\n} from \"./TableUtils.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport type DropIndicator from \"./DropIndicator.js\";\nimport type TableHeaderRow from \"./TableHeaderRow.js\";\nimport type TableRow from \"./TableRow.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { MoveEventDetail } from \"@ui5/webcomponents-base/dist/util/dragAndDrop/DragRegistry.js\";\nimport type TableHeaderCell from \"./TableHeaderCell.js\";\nimport type TableSelection from \"./TableSelection.js\";\nimport type TableSelectionBase from \"./TableSelectionBase.js\";\nimport type TableRowActionBase from \"./TableRowActionBase.js\";\nimport type TableVirtualizer from \"./TableVirtualizer.js\";\nimport type TableGrowing from \"./TableGrowing.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport {\n\tTABLE_NO_DATA,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * Interface for components that can be slotted inside the `features` slot of the `ui5-table`.\n *\n * @public\n * @experimental\n */\ninterface ITableFeature extends UI5Element {\n\treadonly identifier: string;\n\t/**\n\t * Called when the table is activated.\n\t * @param table Table instance\n\t */\n\tonTableActivate?(table: Table): void;\n\t/**\n\t * Called every time before the table renders.\n\t * @param table Table instance\n\t */\n\tonTableBeforeRendering?(table?: Table): void;\n\t/**\n\t * Called every time after the table renders.\n\t * @param table Table instance\n\t */\n\tonTableAfterRendering?(table?: Table): void;\n}\n\n/**\n * Interface for components that can be slotted inside the `features` slot of the `ui5-table`\n * and provide growing/data loading functionality.\n * @public\n * @experimental\n */\ninterface ITableGrowing extends ITableFeature {\n\t/**\n\t * Called when the table needs to load more data.\n\t */\n\tloadMore(): void;\n\t/**\n\t * Determines whether the table has a growing control, that should be rendered in the table.\n\t */\n\thasGrowingComponent(): boolean;\n\t_individualSlot?: string;\n}\n\n/**\n * Fired when an interactive row is clicked.\n *\n * @param {TableRow} row The clicked row instance\n * @public\n */\ntype TableRowClickEventDetail = {\n\trow: TableRow,\n};\n\ntype TableMoveEventDetail = MoveEventDetail;\n\n/**\n * Fired when a row action is clicked.\n *\n * @param {TableRowActionBase} action The row action instance\n * @param {TableRow} row The row instance\n * @public\n */\ntype TableRowActionClickEventDetail = {\n\taction: TableRowActionBase,\n\trow: TableRow,\n};\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table` component provides a set of sophisticated features for displaying and dealing with vast amounts of data in a responsive manner.\n * To render the `ui5-table`, you need to define the columns and rows. You can use the provided `ui5-table-header-row` and `ui5-table-row` components for this purpose.\n *\n * ### Features\n *\n * The `ui5-table` can be enhanced in its functionalities by applying different features.\n * Features can be slotted into the `features` slot, to enable them in the component.\n * Features need to be imported separately, as they are not enabled by default.\n *\n * The following features are currently available:\n *\n * * [TableSelectionMulti](../TableSelectionMulti) - adds multi-selection capabilities to the table\n * * [TableSelectionSingle](../TableSelectionSingle) - adds single-selection capabilities to the table\n * * [TableGrowing](../TableGrowing) - provides growing capabilities to load more data\n * * [TableVirtualizer](../TableVirtualizer) - adds virtualization capabilities to the table\n *\n * ### Keyboard Handling\n *\n * This component provides a build in fast navigation group which can be used via [F6] / [Shift] + [F6] / [Ctrl] + [Alt/Option] / [Down] or [Ctrl] + [Alt/Option] + [Up].\n * In order to use this functionality, you need to import the following module:\n * `import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"`\n *\n * Furthermore, you can interact with `ui5-table` via the following keys:\n *\n * If the focus is on a row, the following keyboard shortcuts are available:\n * * <kbd>Down</kbd> - Navigates down\n * * <kbd>Up</kbd> - Navigates up\n * * <kbd>Right</kbd> - Selects the first cell of the row\n * * <kbd>Space</kbd> - Toggles the selection of the row\n * * <kbd>Ctrl/Cmd + A</kbd> - In multi selection mode, toggles the selection of all rows\n * * <kbd>Home</kbd> - Navigates to the first row, if the focus is on the first row, navigates to the header row\n * * <kbd>End</kbd> - Navigates to the last row, if the focus is on the last row, navigates to the growing button\n * * <kbd>Page Up</kbd> - Navigates one page up, if the focus is on the first row, navigates to the header row\n * * <kbd>Page Down</kbd> - Navigates one page down, if the focus is on the last row, navigates to the growing button\n * * <kbd>F2</kbd> - Focuses the first tabbable element in the row\n * * <kbd>F7</kbd> - If focus position is remembered, moves focus to the corresponding focus position row, otherwise to the first tabbable element within the row\n * * <kbd>[Shift]Tab</kbd> - Move focus to the element in the tab chain outside the table\n *\n * If the focus is on a cell, the following keyboard shortcuts are available:\n * * <kbd>Down</kbd> - Navigates down\n * * <kbd>Up</kbd> - Navigates up\n * * <kbd>Right</kbd> - Navigates right\n * * <kbd>Left</kbd> - Navigates left, if the focus is on the first cell of the row, the focus is moved to the row.\n * * <kbd>Home</kbd> - Navigates to the first cell of the current row, if the focus is on the first cell, navigates to the corresponding row\n * * <kbd>End</kbd> - Navigates to the last cell of the current row, if the focus is on the last cell, navigates to the corresponding row\n * * <kbd>Page Up</kbd> - Navigates one page up while keeping the focus in same column\n * * <kbd>Page Down</kbd> - Navigates one page down while keeping the focus in same column\n * * <kbd>F2</kbd> - Toggles the focus between the first tabbable cell content and the cell\n * * <kbd>Enter</kbd> - Focuses the first tabbable cell content\n * * <kbd>F7</kbd> - If the focus is on an interactive element inside a row, moves focus to the corresponding row and remembers the focus position of the element within the row\n * * <kbd>[Shift]Tab</kbd> - Move focus to the element in the tab chain outside the table\n *\n * If the focus is on an interactive cell content, the following keyboard shortcuts are available:\n * * <kbd>Down</kbd> - Move the focus to the interactive element in the same column of the previous row, unless the focused element prevents the default\n * * <kbd>Up</kbd> - Move the focus to the interactive element in the same column of the next row, unless the focused element prevents the default\n * * <kbd>[Shift]Tab</kbd> - Move the focus to the element in the tab chain\n *\n * ### Accessibility\n *\n * The `ui5-table` follows the [ARIA grid design pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/).\n * This pattern enables cell-based keyboard navigation and, as explained above, we also support row-based keyboard navigation.\n * Since the grid design pattern does not inherently provide row-based keyboard behavior, if the focus is on a row, not only the row information but also the corresponding column headers for each cell must be announced.\n * This can only be achieved through a custom accessibility announcement.\n * To support this, UI5 Web Components expose its own accessibility metadata via the `accessibilityInfo` property.\n * The `ui5-table` uses this information to create the required custom announcements dynamically.\n * If you include custom web components inside table cells that are not part of the standard UI5 Web Components set, their accessibility information can be provided using the `data-ui5-acc-text` attribute.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Table.js\";` (`ui5-table`)\\\n * `import \"@ui5/webcomponents/dist/TableRow.js\";` (`ui5-table-row`)\\\n * `import \"@ui5/webcomponents/dist/TableCell.js\";` (`ui5-table-cell`)\\\n * `import \"@ui5/webcomponents/dist/TableHeaderRow.js\";` (`ui5-table-header-row`)\\\n * `import \"@ui5/webcomponents/dist/TableHeaderCell.js\";` (`ui5-table-header-cell`)\n *\n * @constructor\n * @extends UI5Element\n * @since 2.0.0\n * @public\n */\n@customElement({\n\ttag: \"ui5-table\",\n\trenderer: jsxRenderer,\n\tstyles: TableStyles,\n\ttemplate: TableTemplate,\n\tfastNavigation: true,\n})\n\n/**\n * Fired when an interactive row is clicked.\n *\n * **Note:** This event is not fired if the `behavior` property of the selection component is set to `RowOnly`.\n * In that case, use the `change` event of the selection component instead.\n *\n * @param {TableRow} row The row instance\n * @public\n */\n@eventStrict(\"row-click\", {\n\tbubbles: false,\n})\n\n/**\n * Fired when a movable item is moved over a potential drop target during a dragging operation.\n *\n * If the new position is valid, prevent the default action of the event using `preventDefault()`.\n *\n * **Note:** If the dragging operation is a cross-browser operation or files are moved to a potential drop target,\n * the `source` parameter will be `null`.\n *\n * @param {Event} originalEvent The original `dragover` event\n * @param {object} source The source object\n * @param {object} destination The destination object\n * @public\n */\n@eventStrict(\"move-over\", {\n\tcancelable: true,\n\tbubbles: true,\n})\n\n/**\n * Fired when a movable list item is dropped onto a drop target.\n *\n * **Notes:**\n *\n * The `move` event is fired only if there was a preceding `move-over` with prevented default action.\n *\n * If the dragging operation is a cross-browser operation or files are moved to a potential drop target,\n * the `source` parameter will be `null`.\n *\n * @param {Event} originalEvent The original `drop` event\n * @param {object} source The source object\n * @param {object} destination The destination object\n * @public\n */\n@eventStrict(\"move\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when a row action is clicked.\n *\n * @param {TableRowActionBase} action The row action instance\n * @param {TableRow} row The row instance\n * @since 2.6.0\n * @public\n */\n@eventStrict(\"row-action-click\", {\n\tbubbles: false,\n})\n\nclass Table extends UI5Element {\n\teventDetails!: {\n\t\t\"row-click\": TableRowClickEventDetail;\n\t\t\"move-over\": TableMoveEventDetail;\n\t\t\"move\": TableMoveEventDetail;\n\t\t\"row-action-click\": TableRowActionClickEventDetail;\n\t}\n\n\t/**\n\t * Defines the rows of the component.\n\t *\n\t * **Note:** Use `ui5-table-row` for the intended design.\n\t *\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t\tinvalidateOnChildChange: {\n\t\t\tproperties: [\"navigated\", \"position\"],\n\t\t\tslots: false,\n\t\t},\n\t})\n\trows!: DefaultSlot<TableRow>;\n\n\t/**\n\t * Defines the header row of the component.\n\t *\n\t * **Note:** Use `ui5-table-header-row` for the intended design.\n\t *\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, invalidateOnChildChange: { properties: false, slots: true } })\n\theaderRow!: Slot<TableHeaderRow>;\n\n\t/**\n\t * Defines the custom visualization if there is no data available.\n\t *\n\t * @public\n\t */\n\t@slot()\n\tnoData!: Slot<HTMLElement>;\n\n\t/**\n\t * Defines the features of the component.\n\t *\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, individualSlots: true })\n\tfeatures!: Slot<ITableFeature>;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Identifies the element (or elements) that labels the component.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the text to be displayed when there are no rows in the component.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tnoDataText?: string;\n\n\t/**\n\t * Defines the mode of the <code>ui5-table</code> overflow behavior.\n\t *\n\t * Available options are:\n\t *\n\t * <code>Scroll</code> - Columns are shown as regular columns and horizontal scrolling is enabled.\n\t * <code>Popin</code> - Columns are shown as pop-ins instead of regular columns.\n\t *\n\t * @default \"Scroll\"\n\t * @public\n\t */\n\t@property()\n\toverflowMode: `${TableOverflowMode}` = \"Scroll\";\n\n\t/**\n\t * Defines if the loading indicator should be shown.\n\t *\n\t * **Note:** When the component is loading, it is not interactive.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tloading = false;\n\n\t/**\n\t * Defines the delay in milliseconds, after which the loading indicator will show up for this component.\n\t *\n\t * @default 1000\n\t * @public\n\t */\n\t@property({ type: Number })\n\tloadingDelay = 1000;\n\n\t/**\n\t * Defines the maximum number of row actions that is displayed, which determines the width of the row action column.\n\t *\n\t * **Note:** It is recommended to use a maximum of 3 row actions, as exceeding this limit may take up too much space on smaller screens.\n\t *\n\t * @default 0\n\t * @since 2.7.0\n\t * @public\n\t */\n\t@property({ type: Number })\n\trowActionCount = 0;\n\n\t/**\n\t * Determines whether the table rows are displayed with alternating background colors.\n\t *\n\t * @default false\n\t * @since 2.17\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\talternateRowColors = false;\n\n\t/**\n\t * Defines the sticky top offset of the table, if other sticky elements outside of the table exist.\n\t */\n\t@property()\n\tstickyTop = \"0\";\n\n\t@property({ type: Number, noAttribute: true })\n\t_invalidate = 0;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_renderNavigated = false;\n\n\t@query(\"[ui5-drop-indicator]\")\n\tdropIndicatorDOM!: DropIndicator;\n\n\t@query(\"#no-data-row\")\n\t_noDataRow?: TableRow;\n\n\t@query(\"#table-end-row\")\n\t_endRow!: TableRow;\n\n\t@query(\"#table\")\n\t_tableElement!: HTMLElement;\n\n\t@query(\"#before\")\n\t_beforeElement!: HTMLElement;\n\n\t@query(\"#after\")\n\t_afterElement!: HTMLElement;\n\n\t@query(\"#loading\")\n\t_loadingElement!: HTMLElement;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_events = [\"keydown\", \"keyup\", \"click\", \"focusin\", \"focusout\", \"pointerdown\", \"dragstart\", \"dragenter\", \"dragleave\", \"dragover\", \"drop\", \"dragend\"];\n\t_onEventBound: (e: Event) => void;\n\t_onResizeBound: ResizeObserverCallback;\n\t_tableNavigation?: TableNavigation;\n\t_tableDragAndDrop?: TableDragAndDrop;\n\t_tableCustomAnnouncement?: TableCustomAnnouncement;\n\t_poppedIn: Array<{ col: TableHeaderCell, width: number }> = [];\n\t_containerWidth = 0;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._onResizeBound = this._onResize.bind(this);\n\t\tthis._onEventBound = this._onEvent.bind(this);\n\t}\n\n\tonEnterDOM() {\n\t\tthis._events.forEach(eventType => this.addEventListener(eventType, this._onEventBound));\n\t\tthis.features.forEach(feature => feature.onTableActivate?.(this));\n\t\tthis._tableNavigation = new TableNavigation(this);\n\t\tthis._tableDragAndDrop = new TableDragAndDrop(this);\n\t\tthis._tableCustomAnnouncement = new TableCustomAnnouncement(this);\n\t}\n\n\tonExitDOM() {\n\t\tthis._tableNavigation = undefined;\n\t\tthis._tableDragAndDrop = undefined;\n\t\tthis._events.forEach(eventType => this.removeEventListener(eventType, this._onEventBound));\n\t}\n\n\tonBeforeRendering(): void {\n\t\tthis._renderNavigated = this.rows.some(row => row.navigated);\n\t\t[...this.headerRow, ...this.rows].forEach((row, index) => {\n\t\t\trow._renderNavigated = this._renderNavigated;\n\t\t\trow._rowActionCount = this.rowActionCount;\n\t\t\trow._alternate = this.alternateRowColors && index % 2 === 0;\n\t\t});\n\n\t\tthis.style.setProperty(\"--ui5_grid_sticky_top\", this.stickyTop);\n\t\tthis._refreshPopinState();\n\t\tthis.features.forEach(feature => feature.onTableBeforeRendering?.(this));\n\n\t\tif (this.getDomRef()) {\n\t\t\tResizeHandler.deregister(this, this._onResizeBound);\n\t\t}\n\t}\n\n\tonAfterRendering(): void {\n\t\tthis.features.forEach(feature => feature.onTableAfterRendering?.(this));\n\t\tif (this.overflowMode === TableOverflowMode.Popin) {\n\t\t\tResizeHandler.register(this, this._onResizeBound);\n\t\t}\n\t}\n\n\t_findFeature<T>(featureName: string): T {\n\t\treturn this.features.find(feature => isFeature<T>(feature, featureName)) as T;\n\t}\n\n\t_getSelection(): TableSelectionBase | TableSelection | undefined {\n\t\treturn this._findFeature<TableSelectionBase>(\"TableSelectionBase\") || this._findFeature<TableSelection>(\"TableSelection\");\n\t}\n\n\t_getVirtualizer(): TableVirtualizer | undefined {\n\t\treturn this._findFeature<TableVirtualizer>(\"TableVirtualizer\");\n\t}\n\n\t_getGrowing(): TableGrowing | undefined {\n\t\treturn this._findFeature<TableGrowing>(\"TableGrowing\");\n\t}\n\n\t_onEvent(e: Event) {\n\t\tconst composedPath = e.composedPath();\n\t\tconst eventOrigin = composedPath[0] as HTMLElement;\n\t\tconst elements = [this._tableCustomAnnouncement, this._tableNavigation, this._tableDragAndDrop, ...composedPath, ...this.features].filter(Boolean) as Array<ITableFeature | TableExtension | UI5Element>;\n\t\telements.forEach(element => {\n\t\t\tif (element instanceof TableExtension || (element instanceof HTMLElement && element.localName.includes(\"ui5-table\"))) {\n\t\t\t\tconst eventHandlerName = `_on${e.type}` as keyof typeof element;\n\t\t\t\tconst eventHandler = element[eventHandlerName] as (e?: Event, eventOrigin?: HTMLElement) => void;\n\t\t\t\tif (typeof eventHandler === \"function\") {\n\t\t\t\t\teventHandler.call(element, e, eventOrigin);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t_onResize() {\n\t\tconst { clientWidth, scrollWidth } = this._tableElement;\n\n\t\tif (scrollWidth > clientWidth) {\n\t\t\t// Overflow Handling: Move columns into the popin until overflow is resolved\n\t\t\tconst overflow = scrollWidth - clientWidth;\n\t\t\tconst headers = this._getPopinOrderedColumns(false);\n\t\t\tconst poppedInWidth = headers.reduce((totalPoppedInWidth, headerCell) => {\n\t\t\t\tif (totalPoppedInWidth < overflow && !headerCell._popin) {\n\t\t\t\t\tconst headerWidth = Math.ceil(headerCell.getBoundingClientRect().width);\n\t\t\t\t\ttotalPoppedInWidth += headerWidth;\n\t\t\t\t\tthis._setHeaderPopinState(headerCell, true, headerWidth);\n\t\t\t\t}\n\t\t\t\treturn totalPoppedInWidth;\n\t\t\t}, 0);\n\t\t\t// Calculate container width considering popped-in columns\n\t\t\tconst columnOverflow = poppedInWidth - overflow;\n\t\t\tthis._containerWidth = clientWidth - columnOverflow;\n\t\t} else {\n\t\t\t// Underflow Handling: Restore columns from popin until container width is met\n\t\t\tconst headers = this._getPopinOrderedColumns(true).filter(it => it._popin);\n\n\t\t\theaders.every(headerCell => {\n\t\t\t\tconst underflow = clientWidth - this._containerWidth;\n\t\t\t\tif (underflow >= headerCell._popinWidth) {\n\t\t\t\t\tthis._containerWidth += headerCell._popinWidth;\n\t\t\t\t\tthis._setHeaderPopinState(headerCell, false, 0);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tif (e.target === this) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Handles focus in the table, when the focus is below a sticky element\n\t\tscrollElementIntoView(this._scrollContainer, e.target as HTMLElement, this._stickyElements, this.effectiveDir === \"rtl\");\n\t}\n\n\t_onGrow() {\n\t\tthis._getGrowing()?.loadMore();\n\t}\n\n\t_getPopinOrderedColumns(reverse: boolean) {\n\t\tlet headers = [...this.headerRow[0].cells];\n\t\theaders = headers.reverse(); // reverse the \"visual\" order\n\t\theaders = headers.sort((a, b) => a.importance - b.importance); // sort by importance (asc)\n\t\theaders.pop(); // remove the most important column, as it will not be popped in\n\n\t\tif (reverse) {\n\t\t\theaders = headers.reverse();\n\t\t}\n\n\t\treturn headers;\n\t}\n\n\t/**\n\t * Refreshes the popin state of the columns.\n\t * Syncs the popin state of the columns with the popin state of the header cells.\n\t * This is needed when additional rows are manually added and no resize happens.\n\t * @private\n\t */\n\t_refreshPopinState() {\n\t\tthis.headerRow[0]?.cells.forEach(header => {\n\t\t\tthis._setHeaderPopinState(header, header._popin, header._popinWidth);\n\t\t});\n\t}\n\n\t_setHeaderPopinState(headerCell: TableHeaderCell, inPopin: boolean, popinWidth: number) {\n\t\tconst headerIndex = this.headerRow[0].cells.indexOf(headerCell);\n\t\theaderCell._popin = inPopin && this.overflowMode === TableOverflowMode.Popin;\n\t\theaderCell._popinWidth = popinWidth;\n\t\tthis.rows.forEach(row => {\n\t\t\tconst cell = row.cells[headerIndex];\n\t\t\tif (cell) {\n\t\t\t\trow.cells[headerIndex]._popinHidden = headerCell.popinHidden;\n\t\t\t\trow.cells[headerIndex]._popin = headerCell._popin;\n\t\t\t}\n\t\t});\n\t}\n\n\t_isGrowingFeature(feature: any) {\n\t\treturn Boolean(feature.loadMore && feature.hasGrowingComponent && isFeature<ITableGrowing>(feature, \"TableGrowing\"));\n\t}\n\n\t_onRowClick(row: TableRow) {\n\t\tthis.fireDecoratorEvent(\"row-click\", { row });\n\t}\n\n\t_onRowActionClick(action: TableRowActionBase) {\n\t\tconst row = action.parentElement as TableRow;\n\t\tthis.fireDecoratorEvent(\"row-action-click\", { action, row });\n\t}\n\n\tget styles() {\n\t\tconst virtualizer = this._getVirtualizer();\n\t\tconst headerStyleMap: Record<string, string> = {};\n\t\tthis.headerRow[0]?.cells.forEach(headerCell => {\n\t\t\theaderStyleMap[`--halign-${headerCell._id}`] = headerCell.horizontalAlign || \"initial\";\n\t\t});\n\t\treturn {\n\t\t\ttable: {\n\t\t\t\t\"grid-template-columns\": this._gridTemplateColumns,\n\t\t\t\t\"--row-height\": virtualizer ? `${virtualizer.rowHeight}px` : \"auto\",\n\t\t\t\t...headerStyleMap,\n\t\t\t},\n\t\t\tspacer: {\n\t\t\t\t\"transform\": virtualizer?._getTransform(),\n\t\t\t\t\"will-change\": virtualizer && \"transform\",\n\t\t\t},\n\t\t};\n\t}\n\n\tget _gridTemplateColumns() {\n\t\tif (!this.headerRow[0]) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst widths = [];\n\t\tconst visibleHeaderCells = this.headerRow[0]._visibleCells;\n\n\t\t// Selection Cell Width\n\t\tif (this._isRowSelectorRequired) {\n\t\t\twidths.push(\"min-content\");\n\t\t}\n\n\t\t// Column Widths\n\t\twidths.push(...visibleHeaderCells.map(cell => {\n\t\t\tconst minWidth = cell.minWidth ?? \"3rem\";\n\t\t\tlet width = `minmax(${minWidth}, 1fr)`; // default width\n\t\t\tif (isValidColumnWidth(cell.width)) {\n\t\t\t\twidth = cell.width.includes(\"%\") ? `max(${minWidth}, ${cell.width})` : cell.width;\n\t\t\t}\n\t\t\treturn width;\n\t\t}));\n\n\t\t// Row Action Cell Width\n\t\tif (this.rowActionCount > 0) {\n\t\t\twidths.push(`calc(var(--_ui5_button_base_min_width) * ${this.rowActionCount} + var(--_ui5_table_row_actions_gap) * ${this.rowActionCount - 1} + var(--_ui5_table_cell_horizontal_padding) * 2)`);\n\t\t}\n\n\t\t// Navigated Cell Width\n\t\tif (this._renderNavigated) {\n\t\t\twidths.push(`var(--_ui5_table_navigated_cell_width)`);\n\t\t}\n\n\t\treturn widths.join(\" \");\n\t}\n\n\tget _isRowSelectorRequired() {\n\t\treturn this.rows.length > 0 && this._getSelection()?.isRowSelectorRequired();\n\t}\n\n\tget _scrollContainer() {\n\t\treturn this._getVirtualizer() ? this._tableElement : findVerticalScrollContainer(this);\n\t}\n\n\tget _stickyElements() {\n\t\tconst stickyRows = this.headerRow.filter(row => row.sticky);\n\t\tconst stickyColumns = this.headerRow[0]._stickyCells as TableHeaderCell[];\n\t\treturn [...stickyRows, ...stickyColumns];\n\t}\n\n\tget _effectiveNoDataText() {\n\t\treturn this.noDataText || Table.i18nBundle.getText(TABLE_NO_DATA);\n\t}\n\n\tget _ariaLabel() {\n\t\treturn getEffectiveAriaLabelText(this) || undefined;\n\t}\n\n\tget _ariaDescription() {\n\t\treturn this._getSelection()?.getAriaDescriptionForTable();\n\t}\n\n\tget _ariaRowCount() {\n\t\treturn this._getVirtualizer()?.rowCount || this.rows.length + 1;\n\t}\n\n\tget _ariaColCount() {\n\t\tif (!this.headerRow[0]) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tlet ariaColCount = this.headerRow[0]._visibleCells.length;\n\t\tif (this._isRowSelectorRequired) {\n\t\t\tariaColCount++;\n\t\t}\n\t\tif (this.rowActionCount > 0) {\n\t\t\tariaColCount++;\n\t\t}\n\t\tif (this.headerRow[0]._popinCells.length > 0) {\n\t\t\tariaColCount++;\n\t\t}\n\n\t\treturn ariaColCount;\n\t}\n\n\tget _ariaMultiSelectable() {\n\t\tconst selection = this._getSelection();\n\t\treturn (selection?.isSelectable() && this.rows.length) ? selection.isMultiSelectable() : undefined;\n\t}\n\n\tget isTable() {\n\t\treturn true;\n\t}\n}\n\nTable.define();\n\nexport default Table;\n\nexport type {\n\tITableFeature,\n\tITableGrowing,\n\tTableRowClickEventDetail,\n\tTableMoveEventDetail,\n\tTableRowActionClickEventDetail,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../src/Table.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,EACN,aAAa,EAAE,UAAU,IAAI,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,GAC9D,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAC1D,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,iBAAiB,MAAM,8BAA8B,CAAC;AAC7D,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AACnE,OAAO,aAAa,MAAM,wDAAwD,CAAC;AACnF,OAAO,EACN,2BAA2B,EAAE,qBAAqB,EAAE,SAAS,EAAE,kBAAkB,GACjF,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAa1G,OAAO,EACN,aAAa,GACb,MAAM,mCAAmC,CAAC;AAqE3C;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AGzB;IADC,KAAK,CAAC,sBAAsB,CAAC;+CACG;AAGjC;IADC,KAAK,CAAC,cAAc,CAAC;yCACA;AAGtB;IADC,KAAK,CAAC,gBAAgB,CAAC;sCACL;AAGnB;IADC,KAAK,CAAC,QAAQ,CAAC;4CACY;AAG5B;IADC,KAAK,CAAC,SAAS,CAAC;6CACY;AAG7B;IADC,KAAK,CAAC,QAAQ,CAAC;4CACY;AAG5B;IADC,KAAK,CAAC,UAAU,CAAC;8CACY;AAGvB;IADN,IAAI,CAAC,oBAAoB,CAAC;+BACG;AAxKzB,KAAK;IAtEV,aAAa,CAAC;QACd,GAAG,EAAE,WAAW;QAChB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,aAAa;QACvB,cAAc,EAAE,IAAI;KACpB,CAAC;IAEF;;;;;;;;OAQG;;IACF,WAAW,CAAC,WAAW,EAAE;QACzB,OAAO,EAAE,KAAK;KACd,CAAC;IAEF;;;;;;;;;;;;OAYG;;IACF,WAAW,CAAC,WAAW,EAAE;QACzB,UAAU,EAAE,IAAI;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;IAEF;;;;;;;;;;;;;;OAcG;;IACF,WAAW,CAAC,MAAM,EAAE;QACpB,OAAO,EAAE,IAAI;KACb,CAAC;IAEF;;;;;;;OAOG;;IACF,WAAW,CAAC,kBAAkB,EAAE;QAChC,OAAO,EAAE,KAAK;KACd,CAAC;GAEI,KAAK,CAieV;AAED,KAAK,CAAC,MAAM,EAAE,CAAC;AAEf,eAAe,KAAK,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport {\n\tcustomElement, slotStrict as slot, property, eventStrict, i18n,\n} from \"@ui5/webcomponents-base/dist/decorators.js\";\nimport query from \"@ui5/webcomponents-base/dist/decorators/query.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport TableTemplate from \"./TableTemplate.js\";\nimport TableStyles from \"./generated/themes/Table.css.js\";\nimport TableExtension from \"./TableExtension.js\";\nimport TableNavigation from \"./TableNavigation.js\";\nimport TableOverflowMode from \"./types/TableOverflowMode.js\";\nimport TableDragAndDrop from \"./TableDragAndDrop.js\";\nimport TableCustomAnnouncement from \"./TableCustomAnnouncement.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport {\n\tfindVerticalScrollContainer, scrollElementIntoView, isFeature, isValidColumnWidth,\n} from \"./TableUtils.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport type DropIndicator from \"./DropIndicator.js\";\nimport type TableHeaderRow from \"./TableHeaderRow.js\";\nimport type TableRow from \"./TableRow.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { MoveEventDetail } from \"@ui5/webcomponents-base/dist/util/dragAndDrop/DragRegistry.js\";\nimport type TableHeaderCell from \"./TableHeaderCell.js\";\nimport type TableSelection from \"./TableSelection.js\";\nimport type TableSelectionBase from \"./TableSelectionBase.js\";\nimport type TableRowActionBase from \"./TableRowActionBase.js\";\nimport type TableVirtualizer from \"./TableVirtualizer.js\";\nimport type TableGrowing from \"./TableGrowing.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport {\n\tTABLE_NO_DATA,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * Interface for components that can be slotted inside the `features` slot of the `ui5-table`.\n *\n * @public\n * @experimental\n */\ninterface ITableFeature extends UI5Element {\n\treadonly identifier: string;\n\t/**\n\t * Called when the table is activated.\n\t * @param table Table instance\n\t */\n\tonTableActivate?(table: Table): void;\n\t/**\n\t * Called every time before the table renders.\n\t * @param table Table instance\n\t */\n\tonTableBeforeRendering?(table?: Table): void;\n\t/**\n\t * Called every time after the table renders.\n\t * @param table Table instance\n\t */\n\tonTableAfterRendering?(table?: Table): void;\n}\n\n/**\n * Interface for components that can be slotted inside the `features` slot of the `ui5-table`\n * and provide growing/data loading functionality.\n * @public\n * @experimental\n */\ninterface ITableGrowing extends ITableFeature {\n\t/**\n\t * Called when the table needs to load more data.\n\t */\n\tloadMore(): void;\n\t/**\n\t * Determines whether the table has a growing control, that should be rendered in the table.\n\t */\n\thasGrowingComponent(): boolean;\n\t_individualSlot?: string;\n}\n\n/**\n * Fired when an interactive row is clicked.\n *\n * @param {TableRow} row The clicked row instance\n * @public\n */\ntype TableRowClickEventDetail = {\n\trow: TableRow,\n};\n\ntype TableMoveEventDetail = MoveEventDetail;\n\n/**\n * Fired when a row action is clicked.\n *\n * @param {TableRowActionBase} action The row action instance\n * @param {TableRow} row The row instance\n * @public\n */\ntype TableRowActionClickEventDetail = {\n\taction: TableRowActionBase,\n\trow: TableRow,\n};\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table` component provides a set of sophisticated features for displaying and dealing with vast amounts of data in a responsive manner.\n * To render the `ui5-table`, you need to define the columns and rows. You can use the provided `ui5-table-header-row` and `ui5-table-row` components for this purpose.\n *\n * ### Features\n *\n * The `ui5-table` can be enhanced in its functionalities by applying different features.\n * Features can be slotted into the `features` slot, to enable them in the component.\n * Features need to be imported separately, as they are not enabled by default.\n *\n * The following features are currently available:\n *\n * * [TableSelectionMulti](../TableSelectionMulti) - adds multi-selection capabilities to the table\n * * [TableSelectionSingle](../TableSelectionSingle) - adds single-selection capabilities to the table\n * * [TableGrowing](../TableGrowing) - provides growing capabilities to load more data\n * * [TableVirtualizer](../TableVirtualizer) - adds virtualization capabilities to the table\n *\n * ### Keyboard Handling\n *\n * This component provides a build in fast navigation group which can be used via [F6] / [Shift] + [F6] / [Ctrl] + [Alt/Option] / [Down] or [Ctrl] + [Alt/Option] + [Up].\n * In order to use this functionality, you need to import the following module:\n * `import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"`\n *\n * Furthermore, you can interact with `ui5-table` via the following keys:\n *\n * If the focus is on a row, the following keyboard shortcuts are available:\n * * <kbd>Down</kbd> - Navigates down\n * * <kbd>Up</kbd> - Navigates up\n * * <kbd>Right</kbd> - Selects the first cell of the row\n * * <kbd>Space</kbd> - Toggles the selection of the row\n * * <kbd>Ctrl/Cmd + A</kbd> - In multi selection mode, toggles the selection of all rows\n * * <kbd>Home</kbd> - Navigates to the first row, if the focus is on the first row, navigates to the header row\n * * <kbd>End</kbd> - Navigates to the last row, if the focus is on the last row, navigates to the growing button\n * * <kbd>Page Up</kbd> - Navigates one page up, if the focus is on the first row, navigates to the header row\n * * <kbd>Page Down</kbd> - Navigates one page down, if the focus is on the last row, navigates to the growing button\n * * <kbd>F2</kbd> - Focuses the first tabbable element in the row\n * * <kbd>F7</kbd> - If focus position is remembered, moves focus to the corresponding focus position row, otherwise to the first tabbable element within the row\n * * <kbd>[Shift]Tab</kbd> - Move focus to the element in the tab chain outside the table\n *\n * If the focus is on a cell, the following keyboard shortcuts are available:\n * * <kbd>Down</kbd> - Navigates down\n * * <kbd>Up</kbd> - Navigates up\n * * <kbd>Right</kbd> - Navigates right\n * * <kbd>Left</kbd> - Navigates left, if the focus is on the first cell of the row, the focus is moved to the row.\n * * <kbd>Home</kbd> - Navigates to the first cell of the current row, if the focus is on the first cell, navigates to the corresponding row\n * * <kbd>End</kbd> - Navigates to the last cell of the current row, if the focus is on the last cell, navigates to the corresponding row\n * * <kbd>Page Up</kbd> - Navigates one page up while keeping the focus in same column\n * * <kbd>Page Down</kbd> - Navigates one page down while keeping the focus in same column\n * * <kbd>F2</kbd> - Toggles the focus between the first tabbable cell content and the cell\n * * <kbd>Enter</kbd> - Focuses the first tabbable cell content\n * * <kbd>F7</kbd> - If the focus is on an interactive element inside a row, moves focus to the corresponding row and remembers the focus position of the element within the row\n * * <kbd>[Shift]Tab</kbd> - Move focus to the element in the tab chain outside the table\n *\n * If the focus is on an interactive cell content, the following keyboard shortcuts are available:\n * * <kbd>Down</kbd> - Move the focus to the interactive element in the same column of the previous row, unless the focused element prevents the default\n * * <kbd>Up</kbd> - Move the focus to the interactive element in the same column of the next row, unless the focused element prevents the default\n * * <kbd>[Shift]Tab</kbd> - Move the focus to the element in the tab chain\n *\n * ### Accessibility\n *\n * The `ui5-table` follows the [ARIA grid design pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/).\n * This pattern enables cell-based keyboard navigation and, as explained above, we also support row-based keyboard navigation.\n * Since the grid design pattern does not inherently provide row-based keyboard behavior, if the focus is on a row, not only the row information but also the corresponding column headers for each cell must be announced.\n * This can only be achieved through a custom accessibility announcement.\n * To support this, UI5 Web Components expose its own accessibility metadata via the `accessibilityInfo` property.\n * The `ui5-table` uses this information to create the required custom announcements dynamically.\n * If you include custom web components inside table cells that are not part of the standard UI5 Web Components set, their accessibility information can be provided using the `data-ui5-acc-text` attribute.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/Table.js\";` (`ui5-table`)\\\n * `import \"@ui5/webcomponents/dist/TableRow.js\";` (`ui5-table-row`)\\\n * `import \"@ui5/webcomponents/dist/TableCell.js\";` (`ui5-table-cell`)\\\n * `import \"@ui5/webcomponents/dist/TableHeaderRow.js\";` (`ui5-table-header-row`)\\\n * `import \"@ui5/webcomponents/dist/TableHeaderCell.js\";` (`ui5-table-header-cell`)\n *\n * @constructor\n * @extends UI5Element\n * @since 2.0.0\n * @public\n */\n@customElement({\n\ttag: \"ui5-table\",\n\trenderer: jsxRenderer,\n\tstyles: TableStyles,\n\ttemplate: TableTemplate,\n\tfastNavigation: true,\n})\n\n/**\n * Fired when an interactive row is clicked.\n *\n * **Note:** This event is not fired if the `behavior` property of the selection component is set to `RowOnly`.\n * In that case, use the `change` event of the selection component instead.\n *\n * @param {TableRow} row The row instance\n * @public\n */\n@eventStrict(\"row-click\", {\n\tbubbles: false,\n})\n\n/**\n * Fired when a movable item is moved over a potential drop target during a dragging operation.\n *\n * If the new position is valid, prevent the default action of the event using `preventDefault()`.\n *\n * **Note:** If the dragging operation is a cross-browser operation or files are moved to a potential drop target,\n * the `source` parameter will be `null`.\n *\n * @param {Event} originalEvent The original `dragover` event\n * @param {object} source The source object\n * @param {object} destination The destination object\n * @public\n */\n@eventStrict(\"move-over\", {\n\tcancelable: true,\n\tbubbles: true,\n})\n\n/**\n * Fired when a movable list item is dropped onto a drop target.\n *\n * **Notes:**\n *\n * The `move` event is fired only if there was a preceding `move-over` with prevented default action.\n *\n * If the dragging operation is a cross-browser operation or files are moved to a potential drop target,\n * the `source` parameter will be `null`.\n *\n * @param {Event} originalEvent The original `drop` event\n * @param {object} source The source object\n * @param {object} destination The destination object\n * @public\n */\n@eventStrict(\"move\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when a row action is clicked.\n *\n * @param {TableRowActionBase} action The row action instance\n * @param {TableRow} row The row instance\n * @since 2.6.0\n * @public\n */\n@eventStrict(\"row-action-click\", {\n\tbubbles: false,\n})\n\nclass Table extends UI5Element {\n\teventDetails!: {\n\t\t\"row-click\": TableRowClickEventDetail;\n\t\t\"move-over\": TableMoveEventDetail;\n\t\t\"move\": TableMoveEventDetail;\n\t\t\"row-action-click\": TableRowActionClickEventDetail;\n\t}\n\n\t/**\n\t * Defines the rows of the component.\n\t *\n\t * **Note:** Use `ui5-table-row` for the intended design.\n\t *\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t\tinvalidateOnChildChange: {\n\t\t\tproperties: [\"navigated\", \"position\"],\n\t\t\tslots: false,\n\t\t},\n\t})\n\trows!: DefaultSlot<TableRow>;\n\n\t/**\n\t * Defines the header row of the component.\n\t *\n\t * **Note:** Use `ui5-table-header-row` for the intended design.\n\t *\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, invalidateOnChildChange: { properties: false, slots: true } })\n\theaderRow!: Slot<TableHeaderRow>;\n\n\t/**\n\t * Defines the custom visualization if there is no data available.\n\t *\n\t * @public\n\t */\n\t@slot()\n\tnoData!: Slot<HTMLElement>;\n\n\t/**\n\t * Defines the features of the component.\n\t *\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, individualSlots: true })\n\tfeatures!: Slot<ITableFeature>;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Identifies the element (or elements) that labels the component.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the text to be displayed when there are no rows in the component.\n\t *\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tnoDataText?: string;\n\n\t/**\n\t * Defines the mode of the <code>ui5-table</code> overflow behavior.\n\t *\n\t * Available options are:\n\t *\n\t * <code>Scroll</code> - Columns are shown as regular columns and horizontal scrolling is enabled.\n\t * <code>Popin</code> - Columns are shown as pop-ins instead of regular columns.\n\t *\n\t * @default \"Scroll\"\n\t * @public\n\t */\n\t@property()\n\toverflowMode: `${TableOverflowMode}` = \"Scroll\";\n\n\t/**\n\t * Defines if the loading indicator should be shown.\n\t *\n\t * **Note:** When the component is loading, it is not interactive.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tloading = false;\n\n\t/**\n\t * Defines the delay in milliseconds, after which the loading indicator will show up for this component.\n\t *\n\t * @default 1000\n\t * @public\n\t */\n\t@property({ type: Number })\n\tloadingDelay = 1000;\n\n\t/**\n\t * Defines the maximum number of row actions that is displayed, which determines the width of the row action column.\n\t *\n\t * **Note:** It is recommended to use a maximum of 3 row actions, as exceeding this limit may take up too much space on smaller screens.\n\t *\n\t * @default 0\n\t * @since 2.7.0\n\t * @public\n\t */\n\t@property({ type: Number })\n\trowActionCount = 0;\n\n\t/**\n\t * Determines whether the table rows are displayed with alternating background colors.\n\t *\n\t * @default false\n\t * @since 2.17\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\talternateRowColors = false;\n\n\t/**\n\t * Defines the sticky top offset of the table, if other sticky elements outside of the table exist.\n\t */\n\t@property()\n\tstickyTop = \"0\";\n\n\t@property({ type: Number, noAttribute: true })\n\t_invalidate = 0;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_renderNavigated = false;\n\n\t@query(\"[ui5-drop-indicator]\")\n\tdropIndicatorDOM!: DropIndicator;\n\n\t@query(\"#no-data-row\")\n\t_noDataRow?: TableRow;\n\n\t@query(\"#table-end-row\")\n\t_endRow!: TableRow;\n\n\t@query(\"#table\")\n\t_tableElement!: HTMLElement;\n\n\t@query(\"#before\")\n\t_beforeElement!: HTMLElement;\n\n\t@query(\"#after\")\n\t_afterElement!: HTMLElement;\n\n\t@query(\"#loading\")\n\t_loadingElement!: HTMLElement;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_events = [\"keydown\", \"keyup\", \"click\", \"focusin\", \"focusout\", \"pointerdown\", \"dragstart\", \"dragenter\", \"dragleave\", \"dragover\", \"drop\", \"dragend\"];\n\t_onEventBound: (e: Event) => void;\n\t_onResizeBound: ResizeObserverCallback;\n\t_tableNavigation?: TableNavigation;\n\t_tableDragAndDrop?: TableDragAndDrop;\n\t_tableCustomAnnouncement?: TableCustomAnnouncement;\n\t_poppedIn: Array<{ col: TableHeaderCell, width: number }> = [];\n\t_containerWidth = 0;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._onResizeBound = this._onResize.bind(this);\n\t\tthis._onEventBound = this._onEvent.bind(this);\n\t}\n\n\tonEnterDOM() {\n\t\tthis._events.forEach(eventType => this.addEventListener(eventType, this._onEventBound));\n\t\tthis.features.forEach(feature => feature.onTableActivate?.(this));\n\t\tthis._tableNavigation = new TableNavigation(this);\n\t\tthis._tableDragAndDrop = new TableDragAndDrop(this);\n\t\tthis._tableCustomAnnouncement = new TableCustomAnnouncement(this);\n\t}\n\n\tonExitDOM() {\n\t\tthis._tableNavigation = undefined;\n\t\tthis._tableDragAndDrop = undefined;\n\t\tthis._events.forEach(eventType => this.removeEventListener(eventType, this._onEventBound));\n\t}\n\n\tonBeforeRendering(): void {\n\t\tthis._renderNavigated = this.rows.some(row => row.navigated);\n\t\t[...this.headerRow, ...this.rows].forEach((row, index) => {\n\t\t\trow._rowActionCount = this.rows.length > 0 ? this.rowActionCount : 0;\n\t\t\trow._renderNavigated = this._renderNavigated;\n\t\t\trow._renderDummyCell = !this._hasFlexibleColumns;\n\t\t\trow._alternate = this.alternateRowColors && index % 2 === 0;\n\t\t});\n\n\t\tthis.style.setProperty(\"--ui5_grid_sticky_top\", this.stickyTop);\n\t\tthis._refreshPopinState();\n\t\tthis.features.forEach(feature => feature.onTableBeforeRendering?.(this));\n\n\t\tif (this.getDomRef()) {\n\t\t\tResizeHandler.deregister(this, this._onResizeBound);\n\t\t}\n\t}\n\n\tonAfterRendering(): void {\n\t\tthis.features.forEach(feature => feature.onTableAfterRendering?.(this));\n\t\tif (this.overflowMode === TableOverflowMode.Popin) {\n\t\t\tResizeHandler.register(this, this._onResizeBound);\n\t\t}\n\t}\n\n\t_findFeature<T>(featureName: string): T {\n\t\treturn this.features.find(feature => isFeature<T>(feature, featureName)) as T;\n\t}\n\n\t_getSelection(): TableSelectionBase | TableSelection | undefined {\n\t\treturn this._findFeature<TableSelectionBase>(\"TableSelectionBase\") || this._findFeature<TableSelection>(\"TableSelection\");\n\t}\n\n\t_getVirtualizer(): TableVirtualizer | undefined {\n\t\treturn this._findFeature<TableVirtualizer>(\"TableVirtualizer\");\n\t}\n\n\t_getGrowing(): TableGrowing | undefined {\n\t\treturn this._findFeature<TableGrowing>(\"TableGrowing\");\n\t}\n\n\t_onEvent(e: Event) {\n\t\tconst composedPath = e.composedPath();\n\t\tconst eventOrigin = composedPath[0] as HTMLElement;\n\t\tconst elements = [this._tableCustomAnnouncement, this._tableNavigation, this._tableDragAndDrop, ...composedPath, ...this.features].filter(Boolean) as Array<ITableFeature | TableExtension | UI5Element>;\n\t\telements.forEach(element => {\n\t\t\tif (element instanceof TableExtension || (element instanceof HTMLElement && element.localName.includes(\"ui5-table\"))) {\n\t\t\t\tconst eventHandlerName = `_on${e.type}` as keyof typeof element;\n\t\t\t\tconst eventHandler = element[eventHandlerName] as (e?: Event, eventOrigin?: HTMLElement) => void;\n\t\t\t\tif (typeof eventHandler === \"function\") {\n\t\t\t\t\teventHandler.call(element, e, eventOrigin);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t_onResize() {\n\t\tconst { clientWidth, scrollWidth } = this._tableElement;\n\n\t\tif (scrollWidth > clientWidth) {\n\t\t\t// Overflow Handling: Move columns into the popin until overflow is resolved\n\t\t\tconst overflow = scrollWidth - clientWidth;\n\t\t\tconst headers = this._getPopinOrderedColumns(false);\n\t\t\tconst poppedInWidth = headers.reduce((totalPoppedInWidth, headerCell) => {\n\t\t\t\tif (totalPoppedInWidth < overflow && !headerCell._popin) {\n\t\t\t\t\tconst headerWidth = Math.ceil(headerCell.getBoundingClientRect().width);\n\t\t\t\t\ttotalPoppedInWidth += headerWidth;\n\t\t\t\t\tthis._setHeaderPopinState(headerCell, true, headerWidth);\n\t\t\t\t}\n\t\t\t\treturn totalPoppedInWidth;\n\t\t\t}, 0);\n\t\t\t// Calculate container width considering popped-in columns\n\t\t\tconst columnOverflow = poppedInWidth - overflow;\n\t\t\tthis._containerWidth = clientWidth - columnOverflow;\n\t\t} else {\n\t\t\t// Underflow Handling: Restore columns from popin until container width is met\n\t\t\tconst headers = this._getPopinOrderedColumns(true).filter(it => it._popin);\n\n\t\t\theaders.every(headerCell => {\n\t\t\t\tconst underflow = clientWidth - this._containerWidth;\n\t\t\t\tif (underflow >= headerCell._popinWidth) {\n\t\t\t\t\tthis._containerWidth += headerCell._popinWidth;\n\t\t\t\t\tthis._setHeaderPopinState(headerCell, false, 0);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tif (e.target === this) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Handles focus in the table, when the focus is below a sticky element\n\t\tscrollElementIntoView(this._scrollContainer, e.target as HTMLElement, this._stickyElements, this.effectiveDir === \"rtl\");\n\t}\n\n\t_onGrow() {\n\t\tthis._getGrowing()?.loadMore();\n\t}\n\n\t_getPopinOrderedColumns(reverse: boolean) {\n\t\tlet headers = [...this.headerRow[0].cells];\n\t\theaders = headers.reverse(); // reverse the \"visual\" order\n\t\theaders = headers.sort((a, b) => a.importance - b.importance); // sort by importance (asc)\n\t\theaders.pop(); // remove the most important column, as it will not be popped in\n\n\t\tif (reverse) {\n\t\t\theaders = headers.reverse();\n\t\t}\n\n\t\treturn headers;\n\t}\n\n\t/**\n\t * Refreshes the popin state of the columns.\n\t * Syncs the popin state of the columns with the popin state of the header cells.\n\t * This is needed when additional rows are manually added and no resize happens.\n\t * @private\n\t */\n\t_refreshPopinState() {\n\t\tthis.headerRow[0]?.cells.forEach(header => {\n\t\t\tthis._setHeaderPopinState(header, header._popin, header._popinWidth);\n\t\t});\n\t}\n\n\t_setHeaderPopinState(headerCell: TableHeaderCell, inPopin: boolean, popinWidth: number) {\n\t\tconst headerIndex = this.headerRow[0].cells.indexOf(headerCell);\n\t\theaderCell._popin = inPopin && this.overflowMode === TableOverflowMode.Popin;\n\t\theaderCell._popinWidth = popinWidth;\n\t\tthis.rows.forEach(row => {\n\t\t\tconst cell = row.cells[headerIndex];\n\t\t\tif (cell) {\n\t\t\t\trow.cells[headerIndex]._popinHidden = headerCell.popinHidden;\n\t\t\t\trow.cells[headerIndex]._popin = headerCell._popin;\n\t\t\t}\n\t\t});\n\t}\n\n\t_isGrowingFeature(feature: any) {\n\t\treturn Boolean(feature.loadMore && feature.hasGrowingComponent && isFeature<ITableGrowing>(feature, \"TableGrowing\"));\n\t}\n\n\t_onRowClick(row: TableRow) {\n\t\tthis.fireDecoratorEvent(\"row-click\", { row });\n\t}\n\n\t_onRowActionClick(action: TableRowActionBase) {\n\t\tconst row = action.parentElement as TableRow;\n\t\tthis.fireDecoratorEvent(\"row-action-click\", { action, row });\n\t}\n\n\tget styles() {\n\t\tconst virtualizer = this._getVirtualizer();\n\t\tconst headerStyleMap: Record<string, string> = {};\n\t\tthis.headerRow[0]?.cells.forEach(headerCell => {\n\t\t\theaderStyleMap[`--halign-${headerCell._id}`] = headerCell.horizontalAlign || \"initial\";\n\t\t});\n\t\treturn {\n\t\t\ttable: {\n\t\t\t\t\"grid-template-columns\": this._gridTemplateColumns,\n\t\t\t\t\"--row-height\": virtualizer ? `${virtualizer.rowHeight}px` : \"auto\",\n\t\t\t\t...headerStyleMap,\n\t\t\t},\n\t\t\tspacer: {\n\t\t\t\t\"transform\": virtualizer?._getTransform(),\n\t\t\t\t\"will-change\": virtualizer && \"transform\",\n\t\t\t},\n\t\t};\n\t}\n\n\tget _gridTemplateColumns() {\n\t\tif (!this.headerRow[0]) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst widths = [];\n\t\tconst visibleHeaderCells = this.headerRow[0]._visibleCells;\n\n\t\t// Selection Cell Width\n\t\tif (this._isRowSelectorRequired) {\n\t\t\twidths.push(\"min-content\");\n\t\t}\n\n\t\t// Column Widths\n\t\twidths.push(...visibleHeaderCells.map(cell => {\n\t\t\tconst minWidth = cell.minWidth ?? \"3rem\";\n\t\t\tlet width = `minmax(${minWidth}, 1fr)`; // default width\n\t\t\tif (isValidColumnWidth(cell.width)) {\n\t\t\t\twidth = cell.width.includes(\"%\") ? `max(${minWidth}, ${cell.width})` : cell.width;\n\t\t\t}\n\t\t\treturn width;\n\t\t}));\n\n\t\t// Dummy Cell Width (before actions when popin, after navigated otherwise)\n\t\tconst dummyColumnWidth = !this._hasFlexibleColumns ? \"minmax(0, 1fr)\" : \"\";\n\t\tconst hasPopinCells = this.headerRow[0]._popinCells.length > 0;\n\n\t\tif (dummyColumnWidth && hasPopinCells) {\n\t\t\twidths.push(dummyColumnWidth);\n\t\t}\n\n\t\t// Row Action Cell Width\n\t\tif (this.rowActionCount > 0 && this.rows.length > 0) {\n\t\t\twidths.push(`calc(var(--_ui5_button_base_min_width) * ${this.rowActionCount} + var(--_ui5_table_row_actions_gap) * ${this.rowActionCount - 1} + var(--_ui5_table_cell_horizontal_padding) * 2)`);\n\t\t}\n\n\t\t// Navigated Cell Width\n\t\tif (this._renderNavigated) {\n\t\t\twidths.push(`var(--_ui5_table_navigated_cell_width)`);\n\t\t}\n\n\t\tif (dummyColumnWidth && !hasPopinCells) {\n\t\t\twidths.push(dummyColumnWidth);\n\t\t}\n\n\t\treturn widths.join(\" \");\n\t}\n\n\tget _hasFlexibleColumns(): boolean {\n\t\treturn this.headerRow?.[0]?._visibleCells.some(cell => !isValidColumnWidth(cell.width));\n\t}\n\n\tget _isRowSelectorRequired() {\n\t\treturn this.rows.length > 0 && this._getSelection()?.isRowSelectorRequired();\n\t}\n\n\tget _scrollContainer() {\n\t\treturn this._getVirtualizer() ? this._tableElement : findVerticalScrollContainer(this);\n\t}\n\n\tget _stickyElements() {\n\t\tconst stickyRows = this.headerRow.filter(row => row.sticky);\n\t\tconst stickyColumns = this.headerRow[0]._stickyCells as TableHeaderCell[];\n\t\treturn [...stickyRows, ...stickyColumns];\n\t}\n\n\tget _effectiveNoDataText() {\n\t\treturn this.noDataText || Table.i18nBundle.getText(TABLE_NO_DATA);\n\t}\n\n\tget _ariaLabel() {\n\t\treturn getEffectiveAriaLabelText(this) || undefined;\n\t}\n\n\tget _ariaDescription() {\n\t\treturn this._getSelection()?.getAriaDescriptionForTable();\n\t}\n\n\tget _ariaRowCount() {\n\t\treturn this._getVirtualizer()?.rowCount || this.rows.length + 1;\n\t}\n\n\tget _ariaColCount() {\n\t\tif (!this.headerRow[0]) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tlet ariaColCount = this.headerRow[0]._visibleCells.length;\n\t\tif (this._isRowSelectorRequired) {\n\t\t\tariaColCount++;\n\t\t}\n\t\tif (this.rowActionCount > 0 && this.rows.length > 0) {\n\t\t\tariaColCount++;\n\t\t}\n\t\tif (this.headerRow[0]._popinCells.length > 0) {\n\t\t\tariaColCount++;\n\t\t}\n\n\t\treturn ariaColCount;\n\t}\n\n\tget _ariaMultiSelectable() {\n\t\tconst selection = this._getSelection();\n\t\treturn (selection?.isSelectable() && this.rows.length) ? selection.isMultiSelectable() : undefined;\n\t}\n\n\tget isTable() {\n\t\treturn true;\n\t}\n}\n\nTable.define();\n\nexport default Table;\n\nexport type {\n\tITableFeature,\n\tITableGrowing,\n\tTableRowClickEventDetail,\n\tTableMoveEventDetail,\n\tTableRowActionClickEventDetail,\n};\n"]}
|