@ui5/webcomponents 1.16.0-rc.2 → 1.16.0-rc.3

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.
Files changed (265) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/Avatar.d.ts +14 -0
  3. package/dist/Avatar.js +15 -8
  4. package/dist/Avatar.js.map +1 -1
  5. package/dist/CheckBox.js +2 -1
  6. package/dist/CheckBox.js.map +1 -1
  7. package/dist/Dialog.d.ts +8 -0
  8. package/dist/Dialog.js +4 -0
  9. package/dist/Dialog.js.map +1 -1
  10. package/dist/Option.d.ts +1 -0
  11. package/dist/Option.js +1 -0
  12. package/dist/Option.js.map +1 -1
  13. package/dist/Panel.d.ts +15 -0
  14. package/dist/Panel.js +6 -0
  15. package/dist/Panel.js.map +1 -1
  16. package/dist/SliderBase.d.ts +0 -1
  17. package/dist/SliderBase.js +0 -1
  18. package/dist/SliderBase.js.map +1 -1
  19. package/dist/Switch.d.ts +42 -1
  20. package/dist/Switch.js +30 -2
  21. package/dist/Switch.js.map +1 -1
  22. package/dist/TimePicker.d.ts +1 -0
  23. package/dist/TimePicker.js +3 -0
  24. package/dist/TimePicker.js.map +1 -1
  25. package/dist/Tokenizer.js +5 -2
  26. package/dist/Tokenizer.js.map +1 -1
  27. package/dist/api.json +1 -1
  28. package/dist/assets/Panel.610c9d97.css +1 -0
  29. package/dist/assets/{Switch.ab07b3d6.css → Switch.201b66b4.css} +1 -1
  30. package/dist/assets/messagebundle_en_US_sappsd.6f3c36f1.js +1 -0
  31. package/dist/assets/{messagebundle_en_US_saprigi.5ff4c5b6.js → messagebundle_en_US_saprigi.ab2f7752.js} +1 -1
  32. package/dist/assets/messagebundle_en_US_saptrc.3c5c9f29.js +1 -0
  33. package/dist/assets/{parameters-bundle.css.169ca31c.js → parameters-bundle.css.0a2d241f.js} +2 -1
  34. package/dist/assets/{parameters-bundle.css.7d4be06d.js → parameters-bundle.css.1be26543.js} +2 -1
  35. package/dist/assets/{parameters-bundle.css.32fe7583.js → parameters-bundle.css.4676486d.js} +2 -1
  36. package/dist/assets/{parameters-bundle.css.f9f9a3af.js → parameters-bundle.css.4b095b6d.js} +2 -1
  37. package/dist/assets/{parameters-bundle.css.b2aa72d6.js → parameters-bundle.css.5a95995e.js} +2 -1
  38. package/dist/assets/{parameters-bundle.css.13511e8e.js → parameters-bundle.css.73445e49.js} +2 -1
  39. package/dist/assets/{parameters-bundle.css.e43900d4.js → parameters-bundle.css.7e4f2aed.js} +3 -1
  40. package/dist/assets/{parameters-bundle.css.bf7d5006.js → parameters-bundle.css.abb6d70a.js} +3 -1
  41. package/dist/assets/{parameters-bundle.css.c33b3381.js → parameters-bundle.css.b85c34f0.js} +3 -1
  42. package/dist/assets/{parameters-bundle.css.38cb80ec.js → parameters-bundle.css.e49a247e.js} +2 -1
  43. package/dist/assets/{parameters-bundle.css.b8ce3a86.js → parameters-bundle.css.f03ff189.js} +3 -1
  44. package/dist/assets/{parameters-bundle.css.3bf8316f.js → parameters-bundle.css.f214e4a8.js} +2 -1
  45. package/dist/assets/test/pages/{ComboBox.html.33fbdae5.js → ComboBox.html.db203d6d.js} +1 -1
  46. package/dist/assets/test/pages/{Icon.html.1f4abfd7.js → Icon.html.74521bfb.js} +1 -1
  47. package/dist/assets/test/pages/{Label.html.5e12adbd.js → Label.html.90e8a7d2.js} +1 -1
  48. package/dist/assets/test/pages/{Popups.html.875a587f.js → Popups.html.ce42cc37.js} +1 -1
  49. package/dist/css/themes/Avatar.css +1 -1
  50. package/dist/css/themes/CheckBox.css +1 -1
  51. package/dist/css/themes/Panel.css +1 -1
  52. package/dist/css/themes/Switch.css +1 -1
  53. package/dist/css/themes/sap_belize/parameters-bundle.css +1 -1
  54. package/dist/css/themes/sap_belize_hcb/parameters-bundle.css +1 -1
  55. package/dist/css/themes/sap_belize_hcw/parameters-bundle.css +1 -1
  56. package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
  57. package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
  58. package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
  59. package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
  60. package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
  61. package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
  62. package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +1 -1
  63. package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
  64. package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
  65. package/dist/custom-elements.json +1 -1
  66. package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
  67. package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
  68. package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
  69. package/dist/generated/assets/themes/sap_belize/parameters-bundle.css.json +1 -1
  70. package/dist/generated/assets/themes/sap_belize_hcb/parameters-bundle.css.json +1 -1
  71. package/dist/generated/assets/themes/sap_belize_hcw/parameters-bundle.css.json +1 -1
  72. package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
  73. package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
  74. package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
  75. package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
  76. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  77. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  78. package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
  79. package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
  80. package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
  81. package/dist/generated/i18n/i18n-defaults.d.ts +2 -1
  82. package/dist/generated/i18n/i18n-defaults.js +2 -1
  83. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  84. package/dist/generated/templates/PanelTemplate.lit.js +1 -1
  85. package/dist/generated/templates/PanelTemplate.lit.js.map +1 -1
  86. package/dist/generated/templates/SwitchTemplate.lit.js +1 -1
  87. package/dist/generated/templates/SwitchTemplate.lit.js.map +1 -1
  88. package/dist/generated/themes/Avatar.css.js +1 -1
  89. package/dist/generated/themes/Avatar.css.js.map +1 -1
  90. package/dist/generated/themes/CheckBox.css.js +1 -1
  91. package/dist/generated/themes/CheckBox.css.js.map +1 -1
  92. package/dist/generated/themes/Panel.css.js +1 -1
  93. package/dist/generated/themes/Panel.css.js.map +1 -1
  94. package/dist/generated/themes/Switch.css.js +1 -1
  95. package/dist/generated/themes/Switch.css.js.map +1 -1
  96. package/dist/generated/themes/sap_belize/parameters-bundle.css.js +1 -1
  97. package/dist/generated/themes/sap_belize/parameters-bundle.css.js.map +1 -1
  98. package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js +1 -1
  99. package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js.map +1 -1
  100. package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js +1 -1
  101. package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js.map +1 -1
  102. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
  103. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
  104. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
  105. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
  106. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
  107. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
  108. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
  109. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
  110. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
  111. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  112. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
  113. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
  114. package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
  115. package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js.map +1 -1
  116. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
  117. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
  118. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
  119. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
  120. package/dist/i18n/messagebundle.properties +3 -0
  121. package/dist/i18n/messagebundle_en_US_sappsd.properties +2 -0
  122. package/dist/i18n/messagebundle_en_US_saprigi.properties +2 -0
  123. package/dist/i18n/messagebundle_en_US_saptrc.properties +2 -0
  124. package/dist/test/pages/72override.html +1 -1
  125. package/dist/test/pages/AnimanitionOff.html +1 -1
  126. package/dist/test/pages/Avatar.html +17 -1
  127. package/dist/test/pages/AvatarGroup.html +1 -1
  128. package/dist/test/pages/Badge.html +1 -1
  129. package/dist/test/pages/Breadcrumbs.html +1 -1
  130. package/dist/test/pages/BusyIndicator.html +1 -1
  131. package/dist/test/pages/Button.html +1 -1
  132. package/dist/test/pages/Calendar.html +1 -1
  133. package/dist/test/pages/Card.html +1 -1
  134. package/dist/test/pages/Carousel.html +1 -1
  135. package/dist/test/pages/CheckBox.html +23 -3
  136. package/dist/test/pages/ColorPalette.html +1 -1
  137. package/dist/test/pages/ColorPalettePopover.html +1 -1
  138. package/dist/test/pages/ColorPicker.html +1 -1
  139. package/dist/test/pages/ComboBox.html +2 -2
  140. package/dist/test/pages/Components.html +1 -1
  141. package/dist/test/pages/CoreControls.html +1 -1
  142. package/dist/test/pages/CoreControls_exp.html +1 -1
  143. package/dist/test/pages/CustomCSS.html +1 -1
  144. package/dist/test/pages/DatePicker.html +1 -1
  145. package/dist/test/pages/DatePicker_test_page.html +1 -1
  146. package/dist/test/pages/DateRangePicker.html +1 -1
  147. package/dist/test/pages/DateTimePicker.html +1 -1
  148. package/dist/test/pages/DateTimePicker_Timezone.html +1 -1
  149. package/dist/test/pages/DayPicker.html +1 -1
  150. package/dist/test/pages/Dialog.html +1 -1
  151. package/dist/test/pages/DialogLifecycle.html +1 -1
  152. package/dist/test/pages/DialogSemantic.html +1 -1
  153. package/dist/test/pages/Eventing.html +1 -1
  154. package/dist/test/pages/F6Test1.html +1 -1
  155. package/dist/test/pages/F6Test2.html +1 -1
  156. package/dist/test/pages/F6Test3.html +1 -1
  157. package/dist/test/pages/F6Test4.html +1 -1
  158. package/dist/test/pages/F6Test5.html +1 -1
  159. package/dist/test/pages/F6Test6.html +1 -1
  160. package/dist/test/pages/F6Test7.html +1 -1
  161. package/dist/test/pages/FileUploader.html +1 -1
  162. package/dist/test/pages/FontFace.html +1 -1
  163. package/dist/test/pages/FormComponents.html +1 -1
  164. package/dist/test/pages/FormSupport.html +1 -1
  165. package/dist/test/pages/HCB.html +1 -1
  166. package/dist/test/pages/Icon.html +2 -2
  167. package/dist/test/pages/Icon_and_theming.html +1 -1
  168. package/dist/test/pages/Icon_custom.html +1 -1
  169. package/dist/test/pages/Input.html +1 -1
  170. package/dist/test/pages/InputFieldLabels.html +1 -1
  171. package/dist/test/pages/InputFieldMinWidth.html +1 -1
  172. package/dist/test/pages/InputIcons.html +1 -1
  173. package/dist/test/pages/Input_quickview.html +1 -1
  174. package/dist/test/pages/InputsAlignment.html +1 -1
  175. package/dist/test/pages/InputsLazyLoading.html +1 -1
  176. package/dist/test/pages/ItemNavigation.html +1 -1
  177. package/dist/test/pages/Kitchen.html +1 -1
  178. package/dist/test/pages/Kitchen.openui5.html +1 -1
  179. package/dist/test/pages/Label.html +2 -2
  180. package/dist/test/pages/Link.html +1 -1
  181. package/dist/test/pages/List.html +1 -1
  182. package/dist/test/pages/ListGrowing_Button.html +1 -1
  183. package/dist/test/pages/ListGrowing_Scroll.html +1 -1
  184. package/dist/test/pages/List_keyboard_support.html +1 -1
  185. package/dist/test/pages/List_test_page.html +1 -1
  186. package/dist/test/pages/LitKeyFunction.html +1 -1
  187. package/dist/test/pages/MemoryLeak.html +1 -1
  188. package/dist/test/pages/Menu.html +1 -1
  189. package/dist/test/pages/MessagePage.html +1 -1
  190. package/dist/test/pages/MessageStrip.html +1 -1
  191. package/dist/test/pages/MultiComboBox.html +18 -1
  192. package/dist/test/pages/MultiInput.html +20 -2
  193. package/dist/test/pages/MultiInput_Suggestions.html +1 -1
  194. package/dist/test/pages/OpenUI5-second.html +1 -1
  195. package/dist/test/pages/OpenUI5.html +1 -1
  196. package/dist/test/pages/OpenUI5Nightly.html +1 -1
  197. package/dist/test/pages/Panel.html +24 -2
  198. package/dist/test/pages/Popover.html +1 -1
  199. package/dist/test/pages/PopoverArrowBounds.html +1 -1
  200. package/dist/test/pages/Popups.html +2 -2
  201. package/dist/test/pages/ProgressIndicator.html +1 -1
  202. package/dist/test/pages/RTL.html +1 -1
  203. package/dist/test/pages/RadioButton.html +1 -1
  204. package/dist/test/pages/RangeSlider.html +1 -1
  205. package/dist/test/pages/RatingIndicator.html +1 -1
  206. package/dist/test/pages/ResizeHandler.html +1 -1
  207. package/dist/test/pages/ResponsivePopover.html +1 -1
  208. package/dist/test/pages/SegmentedButton.html +1 -1
  209. package/dist/test/pages/Select.html +1 -1
  210. package/dist/test/pages/Simple.html +1 -1
  211. package/dist/test/pages/Slider.html +1 -1
  212. package/dist/test/pages/SplitButton.html +1 -1
  213. package/dist/test/pages/StepInput.html +1 -1
  214. package/dist/test/pages/Switch.html +31 -2
  215. package/dist/test/pages/TabContainer.html +1 -1
  216. package/dist/test/pages/Table-perf-pure.html +1 -1
  217. package/dist/test/pages/Table-perf.html +1 -1
  218. package/dist/test/pages/Table.html +1 -1
  219. package/dist/test/pages/Table2.html +1 -1
  220. package/dist/test/pages/TableAllPopin.html +1 -1
  221. package/dist/test/pages/TableCustomStyling.html +1 -1
  222. package/dist/test/pages/TableGrouping.html +1 -1
  223. package/dist/test/pages/TableGrowingWithButton.html +1 -1
  224. package/dist/test/pages/TableGrowingWithScroll.html +1 -1
  225. package/dist/test/pages/TableSelection.html +1 -1
  226. package/dist/test/pages/TextArea.html +1 -1
  227. package/dist/test/pages/TimePicker.html +4 -1
  228. package/dist/test/pages/TimePickerClock.html +1 -1
  229. package/dist/test/pages/TimeSelection.html +1 -1
  230. package/dist/test/pages/TimeSelectionClocks.html +1 -1
  231. package/dist/test/pages/Title.html +1 -1
  232. package/dist/test/pages/Toast.html +1 -1
  233. package/dist/test/pages/ToggleButton.html +1 -1
  234. package/dist/test/pages/Tokenizer.html +1 -1
  235. package/dist/test/pages/Tree.html +1 -1
  236. package/dist/test/pages/TreeDynamic.html +1 -1
  237. package/dist/test/pages/WheelSlider_Test_Page.html +1 -1
  238. package/dist/test/pages/base/AriaLabelHelper.html +1 -1
  239. package/dist/test/pages/base/DOMObserver.html +1 -1
  240. package/dist/test/pages/base/IconCollection.html +1 -1
  241. package/dist/test/pages/base/IconCollectionInCustomTheme.html +1 -1
  242. package/dist/test/pages/base/IgnoreCustomElements.html +1 -1
  243. package/dist/test/pages/base/InvisibleMessage.html +1 -1
  244. package/dist/test/pages/form.html +1 -1
  245. package/dist/test/pages/i18n-defaultLang.html +1 -1
  246. package/dist/test/pages/i18n-demo.html +1 -1
  247. package/package.json +8 -8
  248. package/src/Panel.hbs +1 -1
  249. package/src/Switch.hbs +2 -0
  250. package/src/i18n/messagebundle.properties +3 -0
  251. package/src/i18n/messagebundle_en_US_sappsd.properties +2 -0
  252. package/src/i18n/messagebundle_en_US_saprigi.properties +2 -0
  253. package/src/i18n/messagebundle_en_US_saptrc.properties +2 -0
  254. package/src/themes/Avatar.css +5 -1
  255. package/src/themes/CheckBox.css +4 -2
  256. package/src/themes/Panel.css +15 -0
  257. package/src/themes/Switch.css +5 -3
  258. package/src/themes/base/Panel-parameters.css +3 -2
  259. package/src/themes/sap_horizon/Panel-parameters.css +1 -0
  260. package/src/themes/sap_horizon_dark/Panel-parameters.css +1 -0
  261. package/src/themes/sap_horizon_hcb/Panel-parameters.css +1 -0
  262. package/src/themes/sap_horizon_hcw/Panel-parameters.css +1 -0
  263. package/dist/assets/Panel.cf4a4802.css +0 -1
  264. package/dist/assets/messagebundle_en_US_sappsd.93247166.js +0 -1
  265. package/dist/assets/messagebundle_en_US_saptrc.5c02ea75.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Option.js","sourceRoot":"","sources":["../src/Option.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAG3E;;;;;;;;;;;;;;GAcG;AAEH,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,UAAU;IA+E9B;;;;;;;;;OASG;IAEH,IAAI,YAAY;QACf,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,iBAAiB,CAAC;IAC5E,CAAC;CACD,CAAA;AApFA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACT;AAanB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACT;AAUnB;IADC,QAAQ,EAAE;qCACI;AAcf;IADC,QAAQ,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;oCACnB;AAWd;IADC,QAAQ,EAAE;qCACI;AAUf;IADC,QAAQ,EAAE;8CACa;AAUxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACT;AA7Ed,MAAM;IADX,aAAa,CAAC,YAAY,CAAC;GACtB,MAAM,CA6FX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,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 type { IOption } from \"./Select.js\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-option</code> component defines the content of an option in the <code>ui5-select</code>.\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Option\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-option\n * @implements sap.ui.webc.main.ISelectOption\n * @public\n */\n@customElement(\"ui5-option\")\nclass Option extends UI5Element implements IOption {\n\t/**\n\t * Defines the selected state of the component.\n\t * @type {boolean}\n\t * @defaultvalue false\n\t * @name sap.ui.webc.main.Option.prototype.selected\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tselected!: boolean;\n\n\t/**\n\t * Defines whether the component is in disabled state.\n\t * <br><br>\n\t * <b>Note:</b> A disabled component is hidden.\n\t * @type {boolean}\n\t * @defaultvalue false\n\t * @name sap.ui.webc.main.Option.prototype.disabled\n\t * @public\n\t * @since 1.0.0-rc.12\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Defines the tooltip of the component.\n\t * @type {string}\n\t * @defaultvalue \"\"\n\t * @private\n\t * @since 1.1.0\n\t */\n\t@property()\n\ttitle!: string;\n\n\t/**\n\t * Defines the <code>icon</code> source URI.\n\t * <br><br>\n\t * <b>Note:</b>\n\t * SAP-icons font provides numerous built-in icons. To find all the available icons, see the\n\t * <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html\">Icon Explorer</ui5-link>.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Option.prototype.icon\n\t * @public\n\t */\n\t@property({ defaultValue: null })\n\ticon?: string;\n\n\t/**\n\t * Defines the value of the <code>ui5-select</code> inside an HTML Form element when this component is selected.\n\t * For more information on HTML Form support, see the <code>name</code> property of <code>ui5-select</code>.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Option.prototype.value\n\t * @public\n\t */\n\t@property()\n\tvalue!: string;\n\n\t/**\n\t * Defines the additional text displayed at the end of the option element.\n\t * @type {string}\n\t * @name sap.ui.webc.main.Option.prototype.additionalText\n\t * @public\n\t * @since 1.3.0\n\t */\n\t@property()\n\tadditionalText!: string;\n\n\t/**\n\t * Defines the focused state of the component.\n\t * @type {boolean}\n\t * @defaultvalue false\n\t * @since 1.0.0-rc.13\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_focused!: boolean;\n\n\t/**\n\t * Defines the text of the component.\n\t * <br><br>\n\t * <b>Note:</b> Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n\t *\n\t * @type {Node[]}\n\t * @name sap.ui.webc.main.Option.prototype.default\n\t * @slot\n\t * @public\n\t */\n\n\tget stableDomRef() {\n\t\treturn this.getAttribute(\"stable-dom-ref\") || `${this._id}-stable-dom-ref`;\n\t}\n}\n\nOption.define();\n\nexport default Option;\n"]}
1
+ {"version":3,"file":"Option.js","sourceRoot":"","sources":["../src/Option.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAG3E;;;;;;;;;;;;;;;GAeG;AAEH,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,UAAU;IA+E9B;;;;;;;;;OASG;IAEH,IAAI,YAAY;QACf,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,iBAAiB,CAAC;IAC5E,CAAC;CACD,CAAA;AApFA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACT;AAanB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACT;AAUnB;IADC,QAAQ,EAAE;qCACI;AAcf;IADC,QAAQ,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;oCACnB;AAWd;IADC,QAAQ,EAAE;qCACI;AAUf;IADC,QAAQ,EAAE;8CACa;AAUxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACT;AA7Ed,MAAM;IADX,aAAa,CAAC,YAAY,CAAC;GACtB,MAAM,CA6FX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,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 type { IOption } from \"./Select.js\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-option</code> component defines the content of an option in the <code>ui5-select</code>.\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Option\n * @extends sap.ui.webc.base.UI5Element\n * @abstract\n * @tagname ui5-option\n * @implements sap.ui.webc.main.ISelectOption\n * @public\n */\n@customElement(\"ui5-option\")\nclass Option extends UI5Element implements IOption {\n\t/**\n\t * Defines the selected state of the component.\n\t * @type {boolean}\n\t * @defaultvalue false\n\t * @name sap.ui.webc.main.Option.prototype.selected\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tselected!: boolean;\n\n\t/**\n\t * Defines whether the component is in disabled state.\n\t * <br><br>\n\t * <b>Note:</b> A disabled component is hidden.\n\t * @type {boolean}\n\t * @defaultvalue false\n\t * @name sap.ui.webc.main.Option.prototype.disabled\n\t * @public\n\t * @since 1.0.0-rc.12\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Defines the tooltip of the component.\n\t * @type {string}\n\t * @defaultvalue \"\"\n\t * @private\n\t * @since 1.1.0\n\t */\n\t@property()\n\ttitle!: string;\n\n\t/**\n\t * Defines the <code>icon</code> source URI.\n\t * <br><br>\n\t * <b>Note:</b>\n\t * SAP-icons font provides numerous built-in icons. To find all the available icons, see the\n\t * <ui5-link target=\"_blank\" href=\"https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html\">Icon Explorer</ui5-link>.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Option.prototype.icon\n\t * @public\n\t */\n\t@property({ defaultValue: null })\n\ticon?: string;\n\n\t/**\n\t * Defines the value of the <code>ui5-select</code> inside an HTML Form element when this component is selected.\n\t * For more information on HTML Form support, see the <code>name</code> property of <code>ui5-select</code>.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Option.prototype.value\n\t * @public\n\t */\n\t@property()\n\tvalue!: string;\n\n\t/**\n\t * Defines the additional text displayed at the end of the option element.\n\t * @type {string}\n\t * @name sap.ui.webc.main.Option.prototype.additionalText\n\t * @public\n\t * @since 1.3.0\n\t */\n\t@property()\n\tadditionalText!: string;\n\n\t/**\n\t * Defines the focused state of the component.\n\t * @type {boolean}\n\t * @defaultvalue false\n\t * @since 1.0.0-rc.13\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_focused!: boolean;\n\n\t/**\n\t * Defines the text of the component.\n\t * <br><br>\n\t * <b>Note:</b> Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n\t *\n\t * @type {Node[]}\n\t * @name sap.ui.webc.main.Option.prototype.default\n\t * @slot\n\t * @public\n\t */\n\n\tget stableDomRef() {\n\t\treturn this.getAttribute(\"stable-dom-ref\") || `${this._id}-stable-dom-ref`;\n\t}\n}\n\nOption.define();\n\nexport default Option;\n"]}
package/dist/Panel.d.ts CHANGED
@@ -146,6 +146,18 @@ declare class Panel extends UI5Element {
146
146
  * @since 1.0.0-rc.15
147
147
  */
148
148
  accessibleName: string;
149
+ /**
150
+ * Indicates whether the Panel header is sticky or not.
151
+ * If stickyHeader is set to true, then whenever you scroll the content or
152
+ * the application, the header of the panel will be always visible and
153
+ * a solid color will be used for its design.
154
+ * @type {boolean}
155
+ * @name sap.ui.webc.main.Panel.prototype.stickyHeader
156
+ * @defaultvalue false
157
+ * @public
158
+ * @since 1.16.0-rc.1
159
+ */
160
+ stickyHeader: boolean;
149
161
  /**
150
162
  * When set to <code>true</code>, the <code>accessibleName</code> property will be
151
163
  * applied not only on the panel root itself, but on its toggle button too.
@@ -195,6 +207,9 @@ declare class Panel extends UI5Element {
195
207
  headerBtn: {
196
208
  "ui5-panel-header-button-animated": boolean;
197
209
  };
210
+ stickyHeaderClass: {
211
+ "ui5-panel-heading-wrapper-sticky": boolean;
212
+ };
198
213
  };
199
214
  get toggleButtonTitle(): string;
200
215
  get expanded(): boolean;
package/dist/Panel.js CHANGED
@@ -180,6 +180,9 @@ let Panel = Panel_1 = class Panel extends UI5Element {
180
180
  headerBtn: {
181
181
  "ui5-panel-header-button-animated": !this.shouldNotAnimate(),
182
182
  },
183
+ stickyHeaderClass: {
184
+ "ui5-panel-heading-wrapper-sticky": this.stickyHeader,
185
+ },
183
186
  };
184
187
  }
185
188
  get toggleButtonTitle() {
@@ -268,6 +271,9 @@ __decorate([
268
271
  __decorate([
269
272
  property()
270
273
  ], Panel.prototype, "accessibleName", void 0);
274
+ __decorate([
275
+ property({ type: Boolean })
276
+ ], Panel.prototype, "stickyHeader", void 0);
271
277
  __decorate([
272
278
  property({ type: Boolean })
273
279
  ], Panel.prototype, "useAccessibleNameForToggleButton", void 0);
package/dist/Panel.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.js","sourceRoot":"","sources":["../src/Panel.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,QAAQ,MAAM,qDAAqD,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components-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport slideDown from \"@ui5/webcomponents-base/dist/animations/slideDown.js\";\nimport slideUp from \"@ui5/webcomponents-base/dist/animations/slideUp.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport AnimationMode from \"@ui5/webcomponents-base/dist/types/AnimationMode.js\";\nimport { getAnimationMode } from \"@ui5/webcomponents-base/dist/config/AnimationMode.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\nimport Button from \"./Button.js\";\nimport Icon from \"./Icon.js\";\nimport TitleLevel from \"./types/TitleLevel.js\";\nimport PanelAccessibleRole from \"./types/PanelAccessibleRole.js\";\nimport PanelTemplate from \"./generated/templates/PanelTemplate.lit.js\";\n\nimport { PANEL_ICON } from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport panelCss from \"./generated/themes/Panel.css.js\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-panel</code> component is a container which has a header and a\n * content area and is used\n * for grouping and displaying information. It can be collapsed to save space on the screen.\n *\n * <h3>Guidelines:</h3>\n * <ul>\n * <li>Nesting two or more panels is not recommended.</li>\n * <li>Do not stack too many panels on one page.</li>\n * </ul>\n *\n * <h3>Structure</h3>\n * The panel's header area consists of a title bar with a header text or custom header.\n * <br>\n * The header is clickable and can be used to toggle between the expanded and collapsed state. It includes an icon which rotates depending on the state.\n * <br>\n * The custom header can be set through the <code>header</code> slot and it may contain arbitraray content, such as: title, buttons or any other HTML elements.\n * <br>\n * The content area can contain an arbitrary set of controls.\n * <br><b>Note:</b> The custom header is not clickable out of the box, but in this case the icon is interactive and allows to show/hide the content area.\n *\n * <h3>Responsive Behavior</h3>\n * <ul>\n * <li>If the width of the panel is set to 100% (default), the panel and its children are\n * resized responsively,\n * depending on its parent container.</li>\n * <li>If the panel has a fixed height, it will take up the space even if the panel is\n * collapsed.</li>\n * <li>When the panel is expandable (the <code>fixed</code> property is set to <code>false</code>),\n * an arrow icon (pointing to the right) appears in front of the header.</li>\n * <li>When the animation is activated, expand/collapse uses a smooth animation to open or\n * close the content area.</li>\n * <li>When the panel expands/collapses, the arrow icon rotates 90 degrees\n * clockwise/counter-clockwise.</li>\n * </ul>\n *\n * <h3>CSS Shadow Parts</h3>\n *\n * <ui5-link target=\"_blank\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/::part\">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.\n * <br>\n * The <code>ui5-panel</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>header - Used to style the wrapper of the header</li>\n * <li>content - Used to style the wrapper of the content</li>\n * </ul>\n *\n * <h3>Keyboard Handling</h3>\n *\n * <h4>Fast Navigation</h4>\n * This component provides a build in fast navigation group which can be used via <code>F6 / Shift + F6</code> or <code> Ctrl + Alt(Option) + Down / Ctrl + Alt(Option) + Up</code>.\n * In order to use this functionality, you need to import the following module:\n * <code>import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"</code>\n * <br><br>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Panel\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Panel\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-panel\n * @public\n */\n@customElement({\n\ttag: \"ui5-panel\",\n\tfastNavigation: true,\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: PanelTemplate,\n\tstyles: panelCss,\n\tdependencies: [Button, Icon],\n})\n/**\n * Fired when the component is expanded/collapsed by user interaction.\n *\n * @event sap.ui.webc.main.Panel#toggle\n * @public\n */\n@event(\"toggle\")\nclass Panel extends UI5Element {\n\t/**\n\t * This property is used to set the header text of the component.\n\t * The text is visible in both expanded and collapsed states.\n\t * <br><br>\n\t * <b>Note:</b> This property is overridden by the <code>header</code> slot.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Panel.prototype.headerText\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\theaderText!: string;\n\n\t/**\n\t * Determines whether the component is in a fixed state that is not\n\t * expandable/collapsible by user interaction.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Panel.prototype.fixed\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tfixed!: boolean;\n\n\t/**\n\t * Indicates whether the component is collapsed and only the header is displayed.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Panel.prototype.collapsed\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tcollapsed!: boolean;\n\n\t/**\n\t * Indicates whether the transition between the expanded and the collapsed state of the component is animated. By default the animation is enabled.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Panel.prototype.noAnimation\n\t * @defaultvalue false\n\t * @public\n\t * @since 1.0.0-rc.16\n\t */\n\t@property({ type: Boolean })\n\tnoAnimation!: boolean;\n\n\t/**\n\t * Sets the accessible ARIA role of the component.\n\t * Depending on the usage, you can change the role from the default <code>Form</code>\n\t * to <code>Region</code> or <code>Complementary</code>.\n\t *\n\t * @type {sap.ui.webc.main.types.PanelAccessibleRole}\n\t * @name sap.ui.webc.main.Panel.prototype.accessibleRole\n\t * @defaultvalue \"Form\"\n\t * @public\n\t */\n\t@property({ type: PanelAccessibleRole, defaultValue: PanelAccessibleRole.Form })\n\taccessibleRole!: `${PanelAccessibleRole}`;\n\n\t/**\n\t * Defines the \"aria-level\" of component heading,\n\t * set by the <code>headerText</code>.\n\t * <br><br>\n\t * Available options are: <code>\"H6\"</code> to <code>\"H1\"</code>.\n\t * @type {sap.ui.webc.main.types.TitleLevel}\n\t * @name sap.ui.webc.main.Panel.prototype.headerLevel\n\t * @defaultvalue \"H2\"\n\t * @public\n\t*/\n\t@property({ type: TitleLevel, defaultValue: TitleLevel.H2 })\n\theaderLevel!: `${TitleLevel}`;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Panel.prototype.accessibleName\n\t * @defaultvalue \"\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * When set to <code>true</code>, the <code>accessibleName</code> property will be\n\t * applied not only on the panel root itself, but on its toggle button too.\n\t * <b>Note:</b> This property only has effect if <code>accessibleName</code> is set and a header slot is provided.\n\t * @type {boolean}\n\t * @defaultvalue false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tuseAccessibleNameForToggleButton!: boolean;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_hasHeader!: boolean;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_contentExpanded!: boolean;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_animationRunning!: boolean;\n\n\t/**\n\t * Defines the component header area.\n\t * <br><br>\n\t * <b>Note:</b> When a header is provided, the <code>headerText</code> property is ignored.\n\t *\n\t * @type {HTMLElement[]}\n\t * @name sap.ui.webc.main.Panel.prototype.header\n\t * @slot\n\t * @public\n\t */\n\t@slot()\n\theader!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the content of the component.\n\t * The content is visible only when the component is expanded.\n\t *\n\t * @type {Node[]}\n\t * @name sap.ui.webc.main.Panel.prototype.default\n\t * @slot\n\t * @public\n\t */\n\n\tstatic i18nBundle: I18nBundle;\n\n\tonBeforeRendering() {\n\t\t// If the animation is running, it will set the content expanded state at the end\n\t\tif (!this._animationRunning) {\n\t\t\tthis._contentExpanded = !this.collapsed;\n\t\t}\n\n\t\tthis._hasHeader = !!this.header.length;\n\t}\n\n\tshouldToggle(element: HTMLElement): boolean {\n\t\tconst customContent = this.header.length;\n\t\tif (customContent) {\n\t\t\treturn element.classList.contains(\"ui5-panel-header-button\");\n\t\t}\n\t\treturn true;\n\t}\n\n\tshouldNotAnimate() {\n\t\treturn this.noAnimation || getAnimationMode() === AnimationMode.None;\n\t}\n\n\t_headerClick(e: MouseEvent) {\n\t\tif (!this.shouldToggle(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._toggleOpen();\n\t}\n\n\t_toggleButtonClick(e: MouseEvent) {\n\t\tif (e.x === 0 && e.y === 0) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\t}\n\n\t_headerKeyDown(e: KeyboardEvent) {\n\t\tif (!this.shouldToggle(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_headerKeyUp(e: KeyboardEvent) {\n\t\tif (!this.shouldToggle(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._toggleOpen();\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\tthis._toggleOpen();\n\t\t}\n\t}\n\n\t_toggleOpen() {\n\t\tif (this.fixed) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.collapsed = !this.collapsed;\n\n\t\tif (this.shouldNotAnimate()) {\n\t\t\tthis.fireEvent(\"toggle\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis._animationRunning = true;\n\n\t\tconst elements = this.getDomRef()!.querySelectorAll(\".ui5-panel-content\");\n\t\tconst animations: Array<Promise<void | Error>> = [];\n\n\t\t[].forEach.call(elements, oElement => {\n\t\t\tif (this.collapsed) {\n\t\t\t\tanimations.push(slideUp(oElement).promise());\n\t\t\t} else {\n\t\t\t\tanimations.push(slideDown(oElement).promise());\n\t\t\t}\n\t\t});\n\n\t\tPromise.all(animations).then(() => {\n\t\t\tthis._animationRunning = false;\n\t\t\tthis._contentExpanded = !this.collapsed;\n\t\t\tthis.fireEvent(\"toggle\");\n\t\t});\n\t}\n\n\t_headerOnTarget(target: HTMLElement) {\n\t\treturn target.classList.contains(\"sapMPanelWrappingDiv\");\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\theaderBtn: {\n\t\t\t\t\"ui5-panel-header-button-animated\": !this.shouldNotAnimate(),\n\t\t\t},\n\t\t};\n\t}\n\n\tget toggleButtonTitle() {\n\t\treturn Panel.i18nBundle.getText(PANEL_ICON);\n\t}\n\n\tget expanded() {\n\t\treturn !this.collapsed;\n\t}\n\n\tget accRole() {\n\t\treturn this.accessibleRole.toLowerCase();\n\t}\n\n\tget effectiveAccessibleName() {\n\t\treturn typeof this.accessibleName === \"string\" && this.accessibleName.length ? this.accessibleName : undefined;\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\t\"button\": {\n\t\t\t\t\"accessibilityAttributes\": {\n\t\t\t\t\t\"expanded\": this.expanded,\n\t\t\t\t},\n\t\t\t\t\"title\": this.toggleButtonTitle,\n\t\t\t\t\"ariaLabelButton\": !this.nonFocusableButton && this.useAccessibleNameForToggleButton ? this.effectiveAccessibleName : undefined,\n\t\t\t},\n\t\t\t\"ariaExpanded\": this.nonFixedInternalHeader ? this.expanded : undefined,\n\t\t\t\"ariaControls\": this.nonFixedInternalHeader ? `${this._id}-content` : undefined,\n\t\t\t\"ariaLabelledby\": this.nonFocusableButton ? this.ariaLabelledbyReference : undefined,\n\t\t\t\"role\": this.nonFixedInternalHeader ? \"button\" : undefined,\n\t\t};\n\t}\n\n\tget ariaLabelledbyReference() {\n\t\treturn (this.nonFocusableButton && this.headerText && !this.fixed) ? `${this._id}-header-title` : undefined;\n\t}\n\n\tget fixedPanelAriaLabelledbyReference() {\n\t\treturn this.fixed && !this.effectiveAccessibleName ? `${this._id}-header-title` : undefined;\n\t}\n\n\tget headerAriaLevel() {\n\t\treturn this.headerLevel.slice(1);\n\t}\n\n\tget headerTabIndex() {\n\t\treturn (this.header.length || this.fixed) ? \"-1\" : \"0\";\n\t}\n\n\tget headingWrapperAriaLevel() {\n\t\treturn !this._hasHeader ? this.headerAriaLevel : undefined;\n\t}\n\n\tget headingWrapperRole() {\n\t\treturn !this._hasHeader ? \"heading\" : undefined;\n\t}\n\n\tget nonFixedInternalHeader() {\n\t\treturn !this._hasHeader && !this.fixed;\n\t}\n\n\tget hasHeaderOrHeaderText() {\n\t\treturn this._hasHeader || this.headerText;\n\t}\n\n\tget nonFocusableButton() {\n\t\treturn !this.header.length;\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\tcontent: {\n\t\t\t\tdisplay: this._contentExpanded ? \"block\" : \"none\",\n\t\t\t},\n\t\t};\n\t}\n\n\tstatic async onDefine() {\n\t\tPanel.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nPanel.define();\n\nexport default Panel;\n"]}
1
+ {"version":3,"file":"Panel.js","sourceRoot":"","sources":["../src/Panel.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,OAAO,MAAM,oDAAoD,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,aAAa,MAAM,qDAAqD,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sDAAsD,CAAC;AAC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QAAQ,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,YAAY,EAAE,mBAAmB,CAAC,IAAI,EAAE,CAAC;6CACtC;AAa1C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC;0CAC9B;AAY9B;IADC,QAAQ,EAAE;6CACa;AAcvB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2CACL;AAWxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+DACe;AAM3C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCACP;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;+CACpB;AAG3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;gDACnB;AAa5B;IADC,IAAI,EAAE;qCACqB;AAxIvB,KAAK;IAhBV,aAAa,CAAC;QACd,GAAG,EAAE,WAAW;QAChB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,aAAa;QACvB,MAAM,EAAE,QAAQ;QAChB,YAAY,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC;KAC5B,CAAC;IACF;;;;;OAKG;;IACF,KAAK,CAAC,QAAQ,CAAC;GACV,KAAK,CAmVV;AAED,KAAK,CAAC,MAAM,EAAE,CAAC;AAEf,eAAe,KAAK,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport slideDown from \"@ui5/webcomponents-base/dist/animations/slideDown.js\";\nimport slideUp from \"@ui5/webcomponents-base/dist/animations/slideUp.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport AnimationMode from \"@ui5/webcomponents-base/dist/types/AnimationMode.js\";\nimport { getAnimationMode } from \"@ui5/webcomponents-base/dist/config/AnimationMode.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\nimport Button from \"./Button.js\";\nimport Icon from \"./Icon.js\";\nimport TitleLevel from \"./types/TitleLevel.js\";\nimport PanelAccessibleRole from \"./types/PanelAccessibleRole.js\";\nimport PanelTemplate from \"./generated/templates/PanelTemplate.lit.js\";\n\nimport { PANEL_ICON } from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport panelCss from \"./generated/themes/Panel.css.js\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-panel</code> component is a container which has a header and a\n * content area and is used\n * for grouping and displaying information. It can be collapsed to save space on the screen.\n *\n * <h3>Guidelines:</h3>\n * <ul>\n * <li>Nesting two or more panels is not recommended.</li>\n * <li>Do not stack too many panels on one page.</li>\n * </ul>\n *\n * <h3>Structure</h3>\n * The panel's header area consists of a title bar with a header text or custom header.\n * <br>\n * The header is clickable and can be used to toggle between the expanded and collapsed state. It includes an icon which rotates depending on the state.\n * <br>\n * The custom header can be set through the <code>header</code> slot and it may contain arbitraray content, such as: title, buttons or any other HTML elements.\n * <br>\n * The content area can contain an arbitrary set of controls.\n * <br><b>Note:</b> The custom header is not clickable out of the box, but in this case the icon is interactive and allows to show/hide the content area.\n *\n * <h3>Responsive Behavior</h3>\n * <ul>\n * <li>If the width of the panel is set to 100% (default), the panel and its children are\n * resized responsively,\n * depending on its parent container.</li>\n * <li>If the panel has a fixed height, it will take up the space even if the panel is\n * collapsed.</li>\n * <li>When the panel is expandable (the <code>fixed</code> property is set to <code>false</code>),\n * an arrow icon (pointing to the right) appears in front of the header.</li>\n * <li>When the animation is activated, expand/collapse uses a smooth animation to open or\n * close the content area.</li>\n * <li>When the panel expands/collapses, the arrow icon rotates 90 degrees\n * clockwise/counter-clockwise.</li>\n * </ul>\n *\n * <h3>CSS Shadow Parts</h3>\n *\n * <ui5-link target=\"_blank\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/::part\">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.\n * <br>\n * The <code>ui5-panel</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>header - Used to style the wrapper of the header</li>\n * <li>content - Used to style the wrapper of the content</li>\n * </ul>\n *\n * <h3>Keyboard Handling</h3>\n *\n * <h4>Fast Navigation</h4>\n * This component provides a build in fast navigation group which can be used via <code>F6 / Shift + F6</code> or <code> Ctrl + Alt(Option) + Down / Ctrl + Alt(Option) + Up</code>.\n * In order to use this functionality, you need to import the following module:\n * <code>import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"</code>\n * <br><br>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Panel\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Panel\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-panel\n * @public\n */\n@customElement({\n\ttag: \"ui5-panel\",\n\tfastNavigation: true,\n\tlanguageAware: true,\n\trenderer: litRender,\n\ttemplate: PanelTemplate,\n\tstyles: panelCss,\n\tdependencies: [Button, Icon],\n})\n/**\n * Fired when the component is expanded/collapsed by user interaction.\n *\n * @event sap.ui.webc.main.Panel#toggle\n * @public\n */\n@event(\"toggle\")\nclass Panel extends UI5Element {\n\t/**\n\t * This property is used to set the header text of the component.\n\t * The text is visible in both expanded and collapsed states.\n\t * <br><br>\n\t * <b>Note:</b> This property is overridden by the <code>header</code> slot.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Panel.prototype.headerText\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\theaderText!: string;\n\n\t/**\n\t * Determines whether the component is in a fixed state that is not\n\t * expandable/collapsible by user interaction.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Panel.prototype.fixed\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tfixed!: boolean;\n\n\t/**\n\t * Indicates whether the component is collapsed and only the header is displayed.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Panel.prototype.collapsed\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tcollapsed!: boolean;\n\n\t/**\n\t * Indicates whether the transition between the expanded and the collapsed state of the component is animated. By default the animation is enabled.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Panel.prototype.noAnimation\n\t * @defaultvalue false\n\t * @public\n\t * @since 1.0.0-rc.16\n\t */\n\t@property({ type: Boolean })\n\tnoAnimation!: boolean;\n\n\t/**\n\t * Sets the accessible ARIA role of the component.\n\t * Depending on the usage, you can change the role from the default <code>Form</code>\n\t * to <code>Region</code> or <code>Complementary</code>.\n\t *\n\t * @type {sap.ui.webc.main.types.PanelAccessibleRole}\n\t * @name sap.ui.webc.main.Panel.prototype.accessibleRole\n\t * @defaultvalue \"Form\"\n\t * @public\n\t */\n\t@property({ type: PanelAccessibleRole, defaultValue: PanelAccessibleRole.Form })\n\taccessibleRole!: `${PanelAccessibleRole}`;\n\n\t/**\n\t * Defines the \"aria-level\" of component heading,\n\t * set by the <code>headerText</code>.\n\t * <br><br>\n\t * Available options are: <code>\"H6\"</code> to <code>\"H1\"</code>.\n\t * @type {sap.ui.webc.main.types.TitleLevel}\n\t * @name sap.ui.webc.main.Panel.prototype.headerLevel\n\t * @defaultvalue \"H2\"\n\t * @public\n\t*/\n\t@property({ type: TitleLevel, defaultValue: TitleLevel.H2 })\n\theaderLevel!: `${TitleLevel}`;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Panel.prototype.accessibleName\n\t * @defaultvalue \"\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Indicates whether the Panel header is sticky or not.\n\t * If stickyHeader is set to true, then whenever you scroll the content or\n\t * the application, the header of the panel will be always visible and\n\t * a solid color will be used for its design.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Panel.prototype.stickyHeader\n\t * @defaultvalue false\n\t * @public\n\t * @since 1.16.0-rc.1\n\t */\n\t @property({ type: Boolean })\n\t stickyHeader!: boolean;\n\n\t/**\n\t * When set to <code>true</code>, the <code>accessibleName</code> property will be\n\t * applied not only on the panel root itself, but on its toggle button too.\n\t * <b>Note:</b> This property only has effect if <code>accessibleName</code> is set and a header slot is provided.\n\t * @type {boolean}\n\t * @defaultvalue false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tuseAccessibleNameForToggleButton!: boolean;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_hasHeader!: boolean;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_contentExpanded!: boolean;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_animationRunning!: boolean;\n\n\t/**\n\t * Defines the component header area.\n\t * <br><br>\n\t * <b>Note:</b> When a header is provided, the <code>headerText</code> property is ignored.\n\t *\n\t * @type {HTMLElement[]}\n\t * @name sap.ui.webc.main.Panel.prototype.header\n\t * @slot\n\t * @public\n\t */\n\t@slot()\n\theader!: Array<HTMLElement>;\n\n\t/**\n\t * Defines the content of the component.\n\t * The content is visible only when the component is expanded.\n\t *\n\t * @type {Node[]}\n\t * @name sap.ui.webc.main.Panel.prototype.default\n\t * @slot\n\t * @public\n\t */\n\n\tstatic i18nBundle: I18nBundle;\n\n\tonBeforeRendering() {\n\t\t// If the animation is running, it will set the content expanded state at the end\n\t\tif (!this._animationRunning) {\n\t\t\tthis._contentExpanded = !this.collapsed;\n\t\t}\n\n\t\tthis._hasHeader = !!this.header.length;\n\t}\n\n\tshouldToggle(element: HTMLElement): boolean {\n\t\tconst customContent = this.header.length;\n\t\tif (customContent) {\n\t\t\treturn element.classList.contains(\"ui5-panel-header-button\");\n\t\t}\n\t\treturn true;\n\t}\n\n\tshouldNotAnimate() {\n\t\treturn this.noAnimation || getAnimationMode() === AnimationMode.None;\n\t}\n\n\t_headerClick(e: MouseEvent) {\n\t\tif (!this.shouldToggle(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._toggleOpen();\n\t}\n\n\t_toggleButtonClick(e: MouseEvent) {\n\t\tif (e.x === 0 && e.y === 0) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\t}\n\n\t_headerKeyDown(e: KeyboardEvent) {\n\t\tif (!this.shouldToggle(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_headerKeyUp(e: KeyboardEvent) {\n\t\tif (!this.shouldToggle(e.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._toggleOpen();\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\tthis._toggleOpen();\n\t\t}\n\t}\n\n\t_toggleOpen() {\n\t\tif (this.fixed) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.collapsed = !this.collapsed;\n\n\t\tif (this.shouldNotAnimate()) {\n\t\t\tthis.fireEvent(\"toggle\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis._animationRunning = true;\n\n\t\tconst elements = this.getDomRef()!.querySelectorAll(\".ui5-panel-content\");\n\t\tconst animations: Array<Promise<void | Error>> = [];\n\n\t\t[].forEach.call(elements, oElement => {\n\t\t\tif (this.collapsed) {\n\t\t\t\tanimations.push(slideUp(oElement).promise());\n\t\t\t} else {\n\t\t\t\tanimations.push(slideDown(oElement).promise());\n\t\t\t}\n\t\t});\n\n\t\tPromise.all(animations).then(() => {\n\t\t\tthis._animationRunning = false;\n\t\t\tthis._contentExpanded = !this.collapsed;\n\t\t\tthis.fireEvent(\"toggle\");\n\t\t});\n\t}\n\n\t_headerOnTarget(target: HTMLElement) {\n\t\treturn target.classList.contains(\"sapMPanelWrappingDiv\");\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\theaderBtn: {\n\t\t\t\t\"ui5-panel-header-button-animated\": !this.shouldNotAnimate(),\n\t\t\t},\n\t\t\tstickyHeaderClass: {\n\t\t\t\t\"ui5-panel-heading-wrapper-sticky\": this.stickyHeader,\n\t\t\t},\n\t\t};\n\t}\n\n\tget toggleButtonTitle() {\n\t\treturn Panel.i18nBundle.getText(PANEL_ICON);\n\t}\n\n\tget expanded() {\n\t\treturn !this.collapsed;\n\t}\n\n\tget accRole() {\n\t\treturn this.accessibleRole.toLowerCase();\n\t}\n\n\tget effectiveAccessibleName() {\n\t\treturn typeof this.accessibleName === \"string\" && this.accessibleName.length ? this.accessibleName : undefined;\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\t\"button\": {\n\t\t\t\t\"accessibilityAttributes\": {\n\t\t\t\t\t\"expanded\": this.expanded,\n\t\t\t\t},\n\t\t\t\t\"title\": this.toggleButtonTitle,\n\t\t\t\t\"ariaLabelButton\": !this.nonFocusableButton && this.useAccessibleNameForToggleButton ? this.effectiveAccessibleName : undefined,\n\t\t\t},\n\t\t\t\"ariaExpanded\": this.nonFixedInternalHeader ? this.expanded : undefined,\n\t\t\t\"ariaControls\": this.nonFixedInternalHeader ? `${this._id}-content` : undefined,\n\t\t\t\"ariaLabelledby\": this.nonFocusableButton ? this.ariaLabelledbyReference : undefined,\n\t\t\t\"role\": this.nonFixedInternalHeader ? \"button\" : undefined,\n\t\t};\n\t}\n\n\tget ariaLabelledbyReference() {\n\t\treturn (this.nonFocusableButton && this.headerText && !this.fixed) ? `${this._id}-header-title` : undefined;\n\t}\n\n\tget fixedPanelAriaLabelledbyReference() {\n\t\treturn this.fixed && !this.effectiveAccessibleName ? `${this._id}-header-title` : undefined;\n\t}\n\n\tget headerAriaLevel() {\n\t\treturn this.headerLevel.slice(1);\n\t}\n\n\tget headerTabIndex() {\n\t\treturn (this.header.length || this.fixed) ? \"-1\" : \"0\";\n\t}\n\n\tget headingWrapperAriaLevel() {\n\t\treturn !this._hasHeader ? this.headerAriaLevel : undefined;\n\t}\n\n\tget headingWrapperRole() {\n\t\treturn !this._hasHeader ? \"heading\" : undefined;\n\t}\n\n\tget nonFixedInternalHeader() {\n\t\treturn !this._hasHeader && !this.fixed;\n\t}\n\n\tget hasHeaderOrHeaderText() {\n\t\treturn this._hasHeader || this.headerText;\n\t}\n\n\tget nonFocusableButton() {\n\t\treturn !this.header.length;\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\tcontent: {\n\t\t\t\tdisplay: this._contentExpanded ? \"block\" : \"none\",\n\t\t\t},\n\t\t};\n\t}\n\n\tstatic async onDefine() {\n\t\tPanel.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nPanel.define();\n\nexport default Panel;\n"]}
@@ -16,7 +16,6 @@ type DirectionStart = "left" | "right";
16
16
  * @author SAP SE
17
17
  * @alias sap.ui.webc.main.SliderBase
18
18
  * @extends sap.ui.webc.base.UI5Element
19
- * @tagname ui5-slider
20
19
  * @public
21
20
  */
22
21
  declare abstract class SliderBase extends UI5Element {
@@ -28,7 +28,6 @@ import sliderBaseStyles from "./generated/themes/SliderBase.css.js";
28
28
  * @author SAP SE
29
29
  * @alias sap.ui.webc.main.SliderBase
30
30
  * @extends sap.ui.webc.base.UI5Element
31
- * @tagname ui5-slider
32
31
  * @public
33
32
  */
34
33
  let SliderBase = SliderBase_1 = class SliderB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AAC,EAAE,CAAC;uCACnC;AAWb;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC;uCACrC;AAab;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;wCAClC;AAed;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;iDAC3B;AAavB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDACJ;AAWxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CACN;AAWtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CACT;AAYnB;IADC,QAAQ,EAAE;kDACa;AAMxB;IADC,QAAQ,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC;sDACT;AAG5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDACC;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oDACD;AA5Gb,UAAU;IAnBxB,aAAa,CAAC;QACd,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,gBAAgB;KACxB,CAAC;IACF;;;;;OAKG;;IACF,KAAK,CAAC,QAAQ,CAAC;IAEhB;;;;;OAKG;;IACF,KAAK,CAAC,OAAO,CAAC;GACA,UAAU,CAqsBxB;AAED,eAAe,UAAU,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 event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport Float from \"@ui5/webcomponents-base/dist/types/Float.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { isPhone, supportsTouch } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { PassiveEventListenerObject } from \"@ui5/webcomponents-base/dist/types.js\";\nimport \"@ui5/webcomponents-icons/dist/direction-arrows.js\";\nimport {\n\tisEscape, isHome, isEnd, isUp, isDown, isRight, isLeft, isUpCtrl, isDownCtrl, isRightCtrl, isLeftCtrl, isPlus, isMinus, isPageUp, isPageDown,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\n\n// Styles\nimport sliderBaseStyles from \"./generated/themes/SliderBase.css.js\";\n\ntype StateStorage = {\n\t[key: string]: number | undefined,\n}\n\ntype DirectionStart = \"left\" | \"right\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.SliderBase\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-slider\n * @public\n */\n@customElement({\n\trenderer: litRender,\n\tstyles: sliderBaseStyles,\n})\n/**\n * Fired when the value changes and the user has finished interacting with the slider.\n *\n * @event sap.ui.webc.main.SliderBase#change\n * @public\n */\n@event(\"change\")\n\n/**\n * Fired when the value changes due to user interaction that is not yet finished - during mouse/touch dragging.\n *\n * @event sap.ui.webc.main.SliderBase#input\n * @public\n */\n@event(\"input\")\nabstract class SliderBase extends UI5Element {\n\t/**\n\t * Defines the minimum value of the slider.\n\t *\n\t * @type {sap.ui.webc.base.types.Float}\n\t * @name sap.ui.webc.main.SliderBase.prototype.min\n\t * @defaultvalue 0\n\t * @public\n\t */\n\t@property({ validator: Float, defaultValue: 0 })\n\tmin!: number;\n\n\t/**\n\t * Defines the maximum value of the slider.\n\t *\n\t * @type {sap.ui.webc.base.types.Float}\n\t * @name sap.ui.webc.main.SliderBase.prototype.max\n\t * @defaultvalue 100\n\t * @public\n\t */\n\t@property({ validator: Float, defaultValue: 100 })\n\tmax!: number;\n\n\t/**\n\t * Defines the size of the slider's selection intervals (e.g. min = 0, max = 10, step = 5 would result in possible selection of the values 0, 5, 10).\n\t * <br><br>\n\t * <b>Note:</b> If set to 0 the slider handle movement is disabled. When negative number or value other than a number, the component fallbacks to its default value.\n\t *\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.SliderBase.prototype.step\n\t * @defaultvalue 1\n\t * @public\n\t */\n\t@property({ validator: Float, defaultValue: 1 })\n\tstep!: number;\n\n\t/**\n\t * Displays a label with a value on every N-th step.\n\t * <br><br>\n\t * <b>Note:</b> The step and tickmarks properties must be enabled.\n\t * Example - if the step value is set to 2 and the label interval is also specified to 2 - then every second\n\t * tickmark will be labelled, which means every 4th value number.\n\t *\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.SliderBase.prototype.labelInterval\n\t * @defaultvalue 0\n\t * @public\n\t */\n\t@property({ validator: Integer, defaultValue: 0 })\n\tlabelInterval!: number;\n\n\t/**\n\t * Enables tickmarks visualization for each step.\n\t * <br><br>\n\t * <b>Note:</b> The step must be a positive number.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.SliderBase.prototype.showTickmarks\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTickmarks!: boolean;\n\n\t/**\n\t * Enables handle tooltip displaying the current value.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.SliderBase.prototype.showTooltip\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTooltip!: boolean;\n\n\t/**\n\t * Defines whether the slider is in disabled state.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.SliderBase.prototype.disabled\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.SliderBase.prototype.accessibleName\n\t * @defaultvalue: \"\"\n\t * @public\n\t * @since 1.4.0\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ defaultValue: \"hidden\" })\n\t_tooltipVisibility!: string;\n\n\t@property({ type: Boolean })\n\t_labelsOverlapping!: boolean;\n\n\t@property({ type: Boolean })\n\t_hiddenTickmarks!: boolean;\n\n\t_resizeHandler: ResizeObserverCallback;\n\t_moveHandler: (e: TouchEvent | MouseEvent) => void;\n\t_upHandler: () => void;\n\t_stateStorage: StateStorage;\n\t_ontouchstart: PassiveEventListenerObject;\n\tnotResized = false;\n\t_isUserInteraction = false;\n\t_isInnerElementFocusing = false;\n\t_oldNumberOfLabels?: number;\n\t_labelWidth = 0;\n\t_labelValues?: Array<string>;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._resizeHandler = this._handleResize.bind(this);\n\t\tthis._moveHandler = this._handleMove.bind(this);\n\t\tthis._upHandler = this._handleUp.bind(this);\n\n\t\tthis._stateStorage = {\n\t\t\tstep: undefined,\n\t\t\tmin: undefined,\n\t\t\tmax: undefined,\n\t\t\tlabelInterval: undefined,\n\t\t};\n\n\t\tconst handleTouchStartEvent = (e: TouchEvent) => {\n\t\t\tthis._onmousedown(e);\n\t\t};\n\n\t\tthis._ontouchstart = {\n\t\t\thandleEvent: handleTouchStartEvent,\n\t\t\tpassive: true,\n\t\t};\n\t}\n\n\t_handleMove(e: TouchEvent | MouseEvent) {} // eslint-disable-line\n\n\t_handleUp() {}\n\n\t_onmousedown(e: TouchEvent | MouseEvent) {} // eslint-disable-line\n\n\t_handleActionKeyPress(e: Event) {} // eslint-disable-line\n\n\t// used in base template, but implemented in subclasses\n\tabstract styles: {\n\t\tlabel: object,\n\t\tlabelContainer: object,\n\t};\n\n\tabstract tickmarksObject: any;\n\tabstract _ariaLabelledByText: string;\n\n\tstatic get ACTION_KEYS() {\n\t\treturn [\n\t\t\tisLeft,\n\t\t\tisRight,\n\t\t\tisUp,\n\t\t\tisDown,\n\t\t\tisLeftCtrl,\n\t\t\tisRightCtrl,\n\t\t\tisUpCtrl,\n\t\t\tisDownCtrl,\n\t\t\tisPlus,\n\t\t\tisMinus,\n\t\t\tisHome,\n\t\t\tisEnd,\n\t\t\tisPageUp,\n\t\t\tisPageDown,\n\t\t\tisEscape,\n\t\t];\n\t}\n\n\tstatic get MIN_SPACE_BETWEEN_TICKMARKS() {\n\t\treturn 8;\n\t}\n\n\tstatic get TOOLTIP_VISIBILITY() {\n\t\treturn {\n\t\t\tVISIBLE: \"visible\",\n\t\t\tHIDDEN: \"hidden\",\n\t\t};\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"ui5-slider-root-phone\": isPhone(),\n\t\t\t},\n\t\t\tlabelContainer: {\n\t\t\t\t\"ui5-slider-hidden-labels\": this._labelsOverlapping,\n\t\t\t},\n\t\t};\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._resizeHandler);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._resizeHandler);\n\t}\n\n\tonAfterRendering() {\n\t\t// Only call if the resize is triggered by a state changes other than\n\t\t// the ones that occured on the previous resize and those caused by user interaction.\n\t\tif (this.notResized) {\n\t\t\tthis._resizeHandler();\n\t\t}\n\t}\n\n\t/** Shows the tooltip(s) if the <code>showTooltip</code> property is set to true\n\t *\n\t * @private\n\t */\n\t_onmouseover() {\n\t\tif (this.showTooltip) {\n\t\t\tthis._tooltipVisibility = SliderBase.TOOLTIP_VISIBILITY.VISIBLE;\n\t\t}\n\t}\n\n\t/**\n\t * Hides the tooltip(s) if the <code>showTooltip</code> property is set to true\n\t *\n\t * @private\n\t */\n\t_onmouseout() {\n\t\tif (this.showTooltip && !this.shadowRoot!.activeElement) {\n\t\t\tthis._tooltipVisibility = SliderBase.TOOLTIP_VISIBILITY.HIDDEN;\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (this.disabled || this._effectiveStep === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (SliderBase._isActionKey(e)) {\n\t\t\te.preventDefault();\n\n\t\t\tthis._isUserInteraction = true;\n\t\t\tthis._handleActionKeyPress(e);\n\t\t}\n\t}\n\n\t_onkeyup() {\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isUserInteraction = false;\n\t}\n\n\t/**\n\t * Flags if an inner element is currently being focused\n\t *\n\t * @private\n\t */\n\t_preserveFocus(isFocusing: boolean) {\n\t\tthis._isInnerElementFocusing = isFocusing;\n\t}\n\n\t/**\n\t * Return if an inside element within the component is currently being focused\n\t *\n\t * @private\n\t */\n\t_isFocusing() {\n\t\treturn this._isInnerElementFocusing;\n\t}\n\n\t/**\n\t * Prevent focus out when inner element within the component is currently being in process of focusing in.\n\t *\n\t * @private\n\t */\n\t_preventFocusOut() {\n\t\tthis.focusInnerElement();\n\t}\n\n\t/**\n\t * Manages the focus between the component's inner elements\n\t * @protected\n\t */\n\tfocusInnerElement() {\n\t\tthis.focus();\n\t}\n\n\t/**\n\t * Handle the responsiveness of the Slider's UI elements when resizing\n\t *\n\t * @private\n\t */\n\t_handleResize() {\n\t\tif (!this.showTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Mark resizing to avoid unneccessary calls to that function after rendering\n\t\tthis.notResized = false;\n\n\t\t// Convert the string represented calculation expression to a normal one\n\t\t// Check the distance in pixels exist between every tickmark\n\t\tconst spaceBetweenTickmarks = this._spaceBetweenTickmarks();\n\n\t\t// If the pixels between the tickmarks are less than 8 only the first and the last one should be visible\n\t\t// In such case the labels must correspond to the tickmarks, only the first and the last one should exist.\n\t\tif (spaceBetweenTickmarks < SliderBase.MIN_SPACE_BETWEEN_TICKMARKS) {\n\t\t\tthis._hiddenTickmarks = true;\n\t\t\tthis._labelsOverlapping = true;\n\t\t} else {\n\t\t\tthis._hiddenTickmarks = false;\n\t\t}\n\n\t\tif (this.labelInterval <= 0 || this._hiddenTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if there are any overlapping labels.\n\t\t// If so - only the first and the last one should be visible\n\t\tconst labelItems = this.shadowRoot!.querySelectorAll(\".ui5-slider-labels li\");\n\t\tthis._labelsOverlapping = [...labelItems].some(label => label.scrollWidth > label.clientWidth);\n\t}\n\n\t/**\n\t * Called when the user starts interacting with the slider.\n\t * After a down event on the slider root, listen for move events on window, so the slider value\n\t * is updated even if the user drags the pointer outside the slider root.\n\t *\n\t * @protected\n\t */\n\thandleDownBase(e: TouchEvent | MouseEvent) {\n\t\tconst min = this._effectiveMin;\n\t\tconst max = this._effectiveMax;\n\t\tconst domRect = this.getBoundingClientRect();\n\t\tconst directionStart = this.directionStart;\n\t\tconst step = this._effectiveStep;\n\t\tconst newValue = SliderBase.getValueFromInteraction(e, step, min, max, domRect, directionStart);\n\n\t\t// Mark start of a user interaction\n\t\tthis._isUserInteraction = true;\n\n\t\twindow.addEventListener(\"mouseup\", this._upHandler);\n\t\twindow.addEventListener(\"touchend\", this._upHandler);\n\t\t// Only allow one type of move event to be listened to (the first one registered after the down event)\n\t\tif (supportsTouch() && e instanceof TouchEvent) {\n\t\t\twindow.addEventListener(\"touchmove\", this._moveHandler);\n\t\t} else {\n\t\t\twindow.addEventListener(\"mousemove\", this._moveHandler);\n\t\t}\n\n\t\tthis._handleFocusOnMouseDown(e);\n\t\treturn newValue;\n\t}\n\n\t/**\n\t * Forward the focus to an inner inner part within the component on press\n\t *\n\t * @private\n\t */\n\t_handleFocusOnMouseDown(e: TouchEvent | MouseEvent) {\n\t\tconst focusedElement = this.shadowRoot!.activeElement;\n\n\t\tif (!focusedElement || focusedElement !== e.target) {\n\t\t\tthis._preserveFocus(true);\n\t\t\tthis.focusInnerElement();\n\t\t}\n\t}\n\n\t/**\n\t * Called when the user finish interacting with the slider\n\t * Fires an <code>change</code> event indicating a final value change, after user interaction is finished.\n\t *\n\t * @protected\n\t */\n\thandleUpBase() {\n\t\twindow.removeEventListener(\"mouseup\", this._upHandler);\n\t\twindow.removeEventListener(\"touchend\", this._upHandler);\n\t\t// Only one of the following was attached, but it's ok to remove both as there is no error\n\t\twindow.removeEventListener(\"mousemove\", this._moveHandler);\n\t\twindow.removeEventListener(\"touchmove\", this._moveHandler);\n\n\t\tthis._isUserInteraction = false;\n\t\tthis._preserveFocus(false);\n\t}\n\n\t/**\n\t * Updates state storage for the value-related property\n\t * Fires an <code>input</code> event indicating a value change via interaction that is not yet finished.\n\t *\n\t * @protected\n\t */\n\tupdateStateStorageAndFireInputEvent(valueType: string) {\n\t\tthis.storePropertyState(valueType);\n\t\tif (this._isUserInteraction) {\n\t\t\tthis.fireEvent(\"input\");\n\t\t}\n\t}\n\n\t/**\n\t * Goes through the key shortcuts available for the component and returns 'true' if the event is triggered by one.\n\t *\n\t * @private\n\t */\n\tstatic _isActionKey(e: KeyboardEvent) {\n\t\treturn this.ACTION_KEYS.some(actionKey => actionKey(e));\n\t}\n\n\t/**\n\t * Locks the given value between min and max boundaries based on slider properties\n\t *\n\t * @protected\n\t */\n\tstatic clipValue(value: number, min: number, max: number): number {\n\t\tvalue = Math.min(Math.max(value, min), max);\n\t\treturn value;\n\t}\n\n\t/**\n\t * Sets the slider value from an event\n\t *\n\t * @protected\n\t */\n\tstatic getValueFromInteraction(e: TouchEvent | MouseEvent, stepSize: number, min: number, max: number, boundingClientRect: DOMRect, directionStart: DirectionStart): number {\n\t\tconst pageX = this.getPageXValueFromEvent(e);\n\t\tconst value = this.computedValueFromPageX(pageX, min, max, boundingClientRect, directionStart);\n\t\tconst steppedValue = this.getSteppedValue(value, stepSize, min);\n\n\t\treturn this.clipValue(steppedValue, min, max);\n\t}\n\n\t/**\n\t * \"Stepify\" the raw value - calculate the new value depending on the specified step property\n\t *\n\t * @protected\n\t */\n\tstatic getSteppedValue(value: number, stepSize: number, min: number): number {\n\t\tconst stepModuloValue = Math.abs((value - min) % stepSize);\n\n\t\tif (stepSize === 0 || stepModuloValue === 0) {\n\t\t\treturn value;\n\t\t}\n\n\t\t// Clip (snap) the new value to the nearest step\n\t\tvalue = (stepModuloValue * 2 >= stepSize) ? (value + stepSize) - stepModuloValue : value - stepModuloValue;\n\n\t\t// If the step value is not a round number get its precision\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(stepSize);\n\t\treturn Number(value.toFixed(stepPrecision));\n\t}\n\n\t/**\n\t * Gets pageX value from event on user interaction with the Slider\n\t *\n\t * @protected\n\t */\n\tstatic getPageXValueFromEvent(e: TouchEvent | MouseEvent): number {\n\t\tif (supportsTouch() && e instanceof TouchEvent) {\n\t\t\tif (e.targetTouches && e.targetTouches.length > 0) {\n\t\t\t\treturn e.targetTouches[0].pageX;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn (e as MouseEvent).pageX; // MouseEvent\n\t}\n\n\t/**\n\t * Computes the new value (in %) from the pageX position of the cursor.\n\t * Returns the value rounded to a precision of at most 2 digits after decimal point.\n\t *\n\t * @protected\n\t */\n\tstatic computedValueFromPageX(pageX: number, min: number, max: number, boundingClientRect: DOMRect, directionStart: DirectionStart) {\n\t\t// Determine pageX position relative to the Slider DOM\n\t\tconst xRelativePosition = directionStart === \"left\" ? pageX - boundingClientRect[directionStart] : boundingClientRect[directionStart] - pageX;\n\t\t// Calculate the percentage complete (the \"progress\")\n\t\tconst percentageComplete = xRelativePosition / boundingClientRect.width;\n\t\t// Fit (map) the complete percentage between the min/max value range\n\t\treturn min + percentageComplete * (max - min);\n\t}\n\n\t/**\n\t * Calculates the precision (decimal places) of a number, returns 0 if integer\n\t * Handles scientific notation cases.\n\t * @private\n\t */\n\tstatic _getDecimalPrecisionOfNumber(value: number) {\n\t\tif (Number.isInteger(value)) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst match = (String(value)).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);\n\t\tif (!match || match.length < 2) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? Number(match[2]) : 0));\n\t}\n\n\t/**\n\t * In order to always keep the visual UI representation and the internal\n\t * state in sync, the component has a 'state storage' that is updated when the\n\t * current state is changed due to a user action.\n\t *\n\t * Check if the previously saved state is outdated. That would mean\n\t * a property has been changed programmatically because the previous state\n\t * is always updated in the interaction handlers.\n\t *\n\t * Will return true if any of the properties is not equal to its previously\n\t * stored value.\n\t *\n\t * @protected\n\t */\n\tisCurrentStateOutdated() {\n\t\treturn Object.entries(this._stateStorage).some(([propName, propValue]) => this[propName as keyof SliderBase] !== propValue);\n\t}\n\n\t/**\n\t * Returns the last stored value of a property\n\t *\n\t * @protected\n\t */\n\tgetStoredPropertyState(prop: string) {\n\t\treturn this._stateStorage[prop as keyof StateStorage];\n\t}\n\n\t/**\n\t * Check if one or more properties have been updated compared to their last\n\t * saved values in the state storage.\n\t *\n\t * @protected\n\t */\n\tisPropertyUpdated(...props: Array<string>) {\n\t\treturn props.some(prop => this.getStoredPropertyState(prop) !== this[prop as keyof SliderBase]);\n\t}\n\n\t/**\n\t * Updates the previously saved in the _stateStorage values of one or more properties.\n\t *\n\t * @protected\n\t */\n\tstorePropertyState(...props: Array<string>) {\n\t\tprops.forEach(prop => {\n\t\t\tthis._stateStorage[prop as keyof StateStorage] = this[prop as keyof SliderBase] as number;\n\t\t});\n\t}\n\n\t/**\n\t * Returns the start side of a direction - left for LTR, right for RTL\n\t */\n\tget directionStart() {\n\t\treturn this.effectiveDir === \"rtl\" ? \"right\" : \"left\";\n\t}\n\n\t/**\n\t * Calculates the labels amount, width and text and creates them\n\t *\n\t * @private\n\t */\n\t_createLabels() {\n\t\tif (!this.labelInterval || !this.showTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst labelInterval = this.labelInterval;\n\t\tconst step = this._effectiveStep;\n\t\tconst newNumberOfLabels = (this._effectiveMax - this._effectiveMin) / (step * labelInterval);\n\n\t\t// If the required labels are already rendered\n\t\tif (newNumberOfLabels === this._oldNumberOfLabels) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._oldNumberOfLabels = newNumberOfLabels;\n\t\tthis._labelWidth = 100 / newNumberOfLabels;\n\t\tthis._labelValues = [];\n\n\t\t// If the step value is not a round number get its precision\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(step);\n\n\t\t// numberOfLabels below can be float so that the \"distance betweenlabels labels\"\n\t\t// calculation to be precize (exactly the same as the distance between the tickmarks).\n\t\t// That's ok as the loop stop condition is set to an integer, so it will practically\n\t\t// \"floor\" the number of labels anyway.\n\t\tfor (let i = 0; i <= newNumberOfLabels; i++) {\n\t\t\t// Format the label numbers with the same decimal precision as the value of the step property\n\t\t\tconst labelItemNumber = ((i * step * labelInterval) + this._effectiveMin).toFixed(stepPrecision);\n\t\t\tthis._labelValues.push(labelItemNumber);\n\t\t}\n\t}\n\n\t_handleActionKeyPressBase(e: KeyboardEvent, affectedPropName: string) {\n\t\tconst isUpAction = SliderBase._isIncreaseValueAction(e);\n\t\tconst isBigStep = SliderBase._isBigStepAction(e);\n\n\t\tconst currentValue = this[affectedPropName as keyof SliderBase] as number;\n\t\tconst min = this._effectiveMin;\n\t\tconst max = this._effectiveMax;\n\n\t\t// We need to take into consideration the effective direction of the slider - rtl or ltr.\n\t\t// While in ltr, the left arrow key decreases the value, in rtl it should actually increase it.\n\t\tlet step = this.effectiveDir === \"rtl\" ? -this._effectiveStep : this._effectiveStep;\n\n\t\t// If the action key corresponds to a long step and the slider has more than 10 normal steps,\n\t\t// make a jump of 1/10th of the Slider's length, otherwise just use the normal step property.\n\t\tstep = isBigStep && ((max - min) / step > 10) ? (max - min) / 10 : step;\n\n\t\tif (isEnd(e)) {\n\t\t\treturn max - currentValue;\n\t\t}\n\n\t\tif (isHome(e)) {\n\t\t\treturn (currentValue - min) * -1;\n\t\t}\n\n\t\treturn isUpAction ? step : step * -1;\n\t}\n\n\tstatic _isDecreaseValueAction(e: KeyboardEvent) {\n\t\treturn isDown(e) || isDownCtrl(e) || isLeft(e) || isLeftCtrl(e) || isMinus(e) || isPageDown(e);\n\t}\n\n\tstatic _isIncreaseValueAction(e: KeyboardEvent) {\n\t\treturn isUp(e) || isUpCtrl(e) || isRight(e) || isRightCtrl(e) || isPlus(e) || isPageUp(e);\n\t}\n\n\tstatic _isBigStepAction(e: KeyboardEvent) {\n\t\treturn isDownCtrl(e) || isUpCtrl(e) || isLeftCtrl(e) || isRightCtrl(e) || isPageUp(e) || isPageDown(e);\n\t}\n\n\tget _tickmarksCount() {\n\t\treturn (this._effectiveMax - this._effectiveMin) / this._effectiveStep;\n\t}\n\n\t/**\n\t * Calculates space between tickmarks\n\t *\n\t * @private\n\t */\n\t_spaceBetweenTickmarks() {\n\t\treturn this.getBoundingClientRect().width / this._tickmarksCount;\n\t}\n\n\t/**\n\t * Notify in case of a invalid step value type\n\t *\n\t * @private\n\t */\n\t_validateStep(step: number) {\n\t\tif (step === 0) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number\"); // eslint-disable-line\n\t\t}\n\n\t\tif (step < 0) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number. The provided negative number has been converted to its positve equivalent\"); // eslint-disable-line\n\t\t}\n\n\t\tif (Number.isNaN(step)) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number. It has been set to its default value of 1\"); // eslint-disable-line\n\t\t}\n\t}\n\n\tget _labels() {\n\t\treturn this._labelValues || [];\n\t}\n\n\t/**\n\t * Normalizes a new <code>step</code> property value.\n\t * If tickmarks are enabled recreates them according to it.\n\t *\n\t * @private\n\t */\n\tget _effectiveStep() {\n\t\tlet step = this.step;\n\n\t\tif (step < 0) {\n\t\t\tstep = Math.abs(step);\n\t\t}\n\n\t\tif (Number.isNaN(step)) {\n\t\t\tstep = 1;\n\t\t}\n\n\t\treturn step;\n\t}\n\n\tget _effectiveMin() {\n\t\treturn Math.min(this.min, this.max);\n\t}\n\n\tget _effectiveMax() {\n\t\treturn Math.max(this.min, this.max);\n\t}\n\n\tget _tabIndex() {\n\t\treturn this.disabled ? \"-1\" : \"0\";\n\t}\n\n\tget _ariaLabelledByHandleRefs() {\n\t\treturn [`${this._id}-accName`, `${this._id}-sliderDesc`].join(\" \").trim();\n\t}\n}\n\nexport default SliderBase;\n"]}
1
+ {"version":3,"file":"SliderBase.js","sourceRoot":"","sources":["../src/SliderBase.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,KAAK,MAAM,6CAA6C,CAAC;AAChE,OAAO,OAAO,MAAM,+CAA+C,CAAC;AACpE,OAAO,aAAa,MAAM,wDAAwD,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAGhF,OAAO,mDAAmD,CAAC;AAC3D,OAAO,EACN,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,GAC5I,MAAM,sCAAsC,CAAC;AAE9C,SAAS;AACT,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AAQpE;;;;;;;;;;;GAWG;AAoBH,IAAe,UAAU,kBAAzB,MAAe,UAAW,SAAQ,UAAU;IA0H3C;QACC,KAAK,EAAE,CAAC;QART,eAAU,GAAG,KAAK,CAAC;QACnB,uBAAkB,GAAG,KAAK,CAAC;QAC3B,4BAAuB,GAAG,KAAK,CAAC;QAEhC,gBAAW,GAAG,CAAC,CAAC;QAKf,IAAI,CAAC,cAAc,G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-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport Float from \"@ui5/webcomponents-base/dist/types/Float.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { isPhone, supportsTouch } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { PassiveEventListenerObject } from \"@ui5/webcomponents-base/dist/types.js\";\nimport \"@ui5/webcomponents-icons/dist/direction-arrows.js\";\nimport {\n\tisEscape, isHome, isEnd, isUp, isDown, isRight, isLeft, isUpCtrl, isDownCtrl, isRightCtrl, isLeftCtrl, isPlus, isMinus, isPageUp, isPageDown,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\n\n// Styles\nimport sliderBaseStyles from \"./generated/themes/SliderBase.css.js\";\n\ntype StateStorage = {\n\t[key: string]: number | undefined,\n}\n\ntype DirectionStart = \"left\" | \"right\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.SliderBase\n * @extends sap.ui.webc.base.UI5Element\n * @public\n */\n@customElement({\n\trenderer: litRender,\n\tstyles: sliderBaseStyles,\n})\n/**\n * Fired when the value changes and the user has finished interacting with the slider.\n *\n * @event sap.ui.webc.main.SliderBase#change\n * @public\n */\n@event(\"change\")\n\n/**\n * Fired when the value changes due to user interaction that is not yet finished - during mouse/touch dragging.\n *\n * @event sap.ui.webc.main.SliderBase#input\n * @public\n */\n@event(\"input\")\nabstract class SliderBase extends UI5Element {\n\t/**\n\t * Defines the minimum value of the slider.\n\t *\n\t * @type {sap.ui.webc.base.types.Float}\n\t * @name sap.ui.webc.main.SliderBase.prototype.min\n\t * @defaultvalue 0\n\t * @public\n\t */\n\t@property({ validator: Float, defaultValue: 0 })\n\tmin!: number;\n\n\t/**\n\t * Defines the maximum value of the slider.\n\t *\n\t * @type {sap.ui.webc.base.types.Float}\n\t * @name sap.ui.webc.main.SliderBase.prototype.max\n\t * @defaultvalue 100\n\t * @public\n\t */\n\t@property({ validator: Float, defaultValue: 100 })\n\tmax!: number;\n\n\t/**\n\t * Defines the size of the slider's selection intervals (e.g. min = 0, max = 10, step = 5 would result in possible selection of the values 0, 5, 10).\n\t * <br><br>\n\t * <b>Note:</b> If set to 0 the slider handle movement is disabled. When negative number or value other than a number, the component fallbacks to its default value.\n\t *\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.SliderBase.prototype.step\n\t * @defaultvalue 1\n\t * @public\n\t */\n\t@property({ validator: Float, defaultValue: 1 })\n\tstep!: number;\n\n\t/**\n\t * Displays a label with a value on every N-th step.\n\t * <br><br>\n\t * <b>Note:</b> The step and tickmarks properties must be enabled.\n\t * Example - if the step value is set to 2 and the label interval is also specified to 2 - then every second\n\t * tickmark will be labelled, which means every 4th value number.\n\t *\n\t * @type {sap.ui.webc.base.types.Integer}\n\t * @name sap.ui.webc.main.SliderBase.prototype.labelInterval\n\t * @defaultvalue 0\n\t * @public\n\t */\n\t@property({ validator: Integer, defaultValue: 0 })\n\tlabelInterval!: number;\n\n\t/**\n\t * Enables tickmarks visualization for each step.\n\t * <br><br>\n\t * <b>Note:</b> The step must be a positive number.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.SliderBase.prototype.showTickmarks\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTickmarks!: boolean;\n\n\t/**\n\t * Enables handle tooltip displaying the current value.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.SliderBase.prototype.showTooltip\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowTooltip!: boolean;\n\n\t/**\n\t * Defines whether the slider is in disabled state.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.SliderBase.prototype.disabled\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.SliderBase.prototype.accessibleName\n\t * @defaultvalue: \"\"\n\t * @public\n\t * @since 1.4.0\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ defaultValue: \"hidden\" })\n\t_tooltipVisibility!: string;\n\n\t@property({ type: Boolean })\n\t_labelsOverlapping!: boolean;\n\n\t@property({ type: Boolean })\n\t_hiddenTickmarks!: boolean;\n\n\t_resizeHandler: ResizeObserverCallback;\n\t_moveHandler: (e: TouchEvent | MouseEvent) => void;\n\t_upHandler: () => void;\n\t_stateStorage: StateStorage;\n\t_ontouchstart: PassiveEventListenerObject;\n\tnotResized = false;\n\t_isUserInteraction = false;\n\t_isInnerElementFocusing = false;\n\t_oldNumberOfLabels?: number;\n\t_labelWidth = 0;\n\t_labelValues?: Array<string>;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._resizeHandler = this._handleResize.bind(this);\n\t\tthis._moveHandler = this._handleMove.bind(this);\n\t\tthis._upHandler = this._handleUp.bind(this);\n\n\t\tthis._stateStorage = {\n\t\t\tstep: undefined,\n\t\t\tmin: undefined,\n\t\t\tmax: undefined,\n\t\t\tlabelInterval: undefined,\n\t\t};\n\n\t\tconst handleTouchStartEvent = (e: TouchEvent) => {\n\t\t\tthis._onmousedown(e);\n\t\t};\n\n\t\tthis._ontouchstart = {\n\t\t\thandleEvent: handleTouchStartEvent,\n\t\t\tpassive: true,\n\t\t};\n\t}\n\n\t_handleMove(e: TouchEvent | MouseEvent) {} // eslint-disable-line\n\n\t_handleUp() {}\n\n\t_onmousedown(e: TouchEvent | MouseEvent) {} // eslint-disable-line\n\n\t_handleActionKeyPress(e: Event) {} // eslint-disable-line\n\n\t// used in base template, but implemented in subclasses\n\tabstract styles: {\n\t\tlabel: object,\n\t\tlabelContainer: object,\n\t};\n\n\tabstract tickmarksObject: any;\n\tabstract _ariaLabelledByText: string;\n\n\tstatic get ACTION_KEYS() {\n\t\treturn [\n\t\t\tisLeft,\n\t\t\tisRight,\n\t\t\tisUp,\n\t\t\tisDown,\n\t\t\tisLeftCtrl,\n\t\t\tisRightCtrl,\n\t\t\tisUpCtrl,\n\t\t\tisDownCtrl,\n\t\t\tisPlus,\n\t\t\tisMinus,\n\t\t\tisHome,\n\t\t\tisEnd,\n\t\t\tisPageUp,\n\t\t\tisPageDown,\n\t\t\tisEscape,\n\t\t];\n\t}\n\n\tstatic get MIN_SPACE_BETWEEN_TICKMARKS() {\n\t\treturn 8;\n\t}\n\n\tstatic get TOOLTIP_VISIBILITY() {\n\t\treturn {\n\t\t\tVISIBLE: \"visible\",\n\t\t\tHIDDEN: \"hidden\",\n\t\t};\n\t}\n\n\tget classes() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"ui5-slider-root-phone\": isPhone(),\n\t\t\t},\n\t\t\tlabelContainer: {\n\t\t\t\t\"ui5-slider-hidden-labels\": this._labelsOverlapping,\n\t\t\t},\n\t\t};\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._resizeHandler);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._resizeHandler);\n\t}\n\n\tonAfterRendering() {\n\t\t// Only call if the resize is triggered by a state changes other than\n\t\t// the ones that occured on the previous resize and those caused by user interaction.\n\t\tif (this.notResized) {\n\t\t\tthis._resizeHandler();\n\t\t}\n\t}\n\n\t/** Shows the tooltip(s) if the <code>showTooltip</code> property is set to true\n\t *\n\t * @private\n\t */\n\t_onmouseover() {\n\t\tif (this.showTooltip) {\n\t\t\tthis._tooltipVisibility = SliderBase.TOOLTIP_VISIBILITY.VISIBLE;\n\t\t}\n\t}\n\n\t/**\n\t * Hides the tooltip(s) if the <code>showTooltip</code> property is set to true\n\t *\n\t * @private\n\t */\n\t_onmouseout() {\n\t\tif (this.showTooltip && !this.shadowRoot!.activeElement) {\n\t\t\tthis._tooltipVisibility = SliderBase.TOOLTIP_VISIBILITY.HIDDEN;\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (this.disabled || this._effectiveStep === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (SliderBase._isActionKey(e)) {\n\t\t\te.preventDefault();\n\n\t\t\tthis._isUserInteraction = true;\n\t\t\tthis._handleActionKeyPress(e);\n\t\t}\n\t}\n\n\t_onkeyup() {\n\t\tif (this.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isUserInteraction = false;\n\t}\n\n\t/**\n\t * Flags if an inner element is currently being focused\n\t *\n\t * @private\n\t */\n\t_preserveFocus(isFocusing: boolean) {\n\t\tthis._isInnerElementFocusing = isFocusing;\n\t}\n\n\t/**\n\t * Return if an inside element within the component is currently being focused\n\t *\n\t * @private\n\t */\n\t_isFocusing() {\n\t\treturn this._isInnerElementFocusing;\n\t}\n\n\t/**\n\t * Prevent focus out when inner element within the component is currently being in process of focusing in.\n\t *\n\t * @private\n\t */\n\t_preventFocusOut() {\n\t\tthis.focusInnerElement();\n\t}\n\n\t/**\n\t * Manages the focus between the component's inner elements\n\t * @protected\n\t */\n\tfocusInnerElement() {\n\t\tthis.focus();\n\t}\n\n\t/**\n\t * Handle the responsiveness of the Slider's UI elements when resizing\n\t *\n\t * @private\n\t */\n\t_handleResize() {\n\t\tif (!this.showTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Mark resizing to avoid unneccessary calls to that function after rendering\n\t\tthis.notResized = false;\n\n\t\t// Convert the string represented calculation expression to a normal one\n\t\t// Check the distance in pixels exist between every tickmark\n\t\tconst spaceBetweenTickmarks = this._spaceBetweenTickmarks();\n\n\t\t// If the pixels between the tickmarks are less than 8 only the first and the last one should be visible\n\t\t// In such case the labels must correspond to the tickmarks, only the first and the last one should exist.\n\t\tif (spaceBetweenTickmarks < SliderBase.MIN_SPACE_BETWEEN_TICKMARKS) {\n\t\t\tthis._hiddenTickmarks = true;\n\t\t\tthis._labelsOverlapping = true;\n\t\t} else {\n\t\t\tthis._hiddenTickmarks = false;\n\t\t}\n\n\t\tif (this.labelInterval <= 0 || this._hiddenTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if there are any overlapping labels.\n\t\t// If so - only the first and the last one should be visible\n\t\tconst labelItems = this.shadowRoot!.querySelectorAll(\".ui5-slider-labels li\");\n\t\tthis._labelsOverlapping = [...labelItems].some(label => label.scrollWidth > label.clientWidth);\n\t}\n\n\t/**\n\t * Called when the user starts interacting with the slider.\n\t * After a down event on the slider root, listen for move events on window, so the slider value\n\t * is updated even if the user drags the pointer outside the slider root.\n\t *\n\t * @protected\n\t */\n\thandleDownBase(e: TouchEvent | MouseEvent) {\n\t\tconst min = this._effectiveMin;\n\t\tconst max = this._effectiveMax;\n\t\tconst domRect = this.getBoundingClientRect();\n\t\tconst directionStart = this.directionStart;\n\t\tconst step = this._effectiveStep;\n\t\tconst newValue = SliderBase.getValueFromInteraction(e, step, min, max, domRect, directionStart);\n\n\t\t// Mark start of a user interaction\n\t\tthis._isUserInteraction = true;\n\n\t\twindow.addEventListener(\"mouseup\", this._upHandler);\n\t\twindow.addEventListener(\"touchend\", this._upHandler);\n\t\t// Only allow one type of move event to be listened to (the first one registered after the down event)\n\t\tif (supportsTouch() && e instanceof TouchEvent) {\n\t\t\twindow.addEventListener(\"touchmove\", this._moveHandler);\n\t\t} else {\n\t\t\twindow.addEventListener(\"mousemove\", this._moveHandler);\n\t\t}\n\n\t\tthis._handleFocusOnMouseDown(e);\n\t\treturn newValue;\n\t}\n\n\t/**\n\t * Forward the focus to an inner inner part within the component on press\n\t *\n\t * @private\n\t */\n\t_handleFocusOnMouseDown(e: TouchEvent | MouseEvent) {\n\t\tconst focusedElement = this.shadowRoot!.activeElement;\n\n\t\tif (!focusedElement || focusedElement !== e.target) {\n\t\t\tthis._preserveFocus(true);\n\t\t\tthis.focusInnerElement();\n\t\t}\n\t}\n\n\t/**\n\t * Called when the user finish interacting with the slider\n\t * Fires an <code>change</code> event indicating a final value change, after user interaction is finished.\n\t *\n\t * @protected\n\t */\n\thandleUpBase() {\n\t\twindow.removeEventListener(\"mouseup\", this._upHandler);\n\t\twindow.removeEventListener(\"touchend\", this._upHandler);\n\t\t// Only one of the following was attached, but it's ok to remove both as there is no error\n\t\twindow.removeEventListener(\"mousemove\", this._moveHandler);\n\t\twindow.removeEventListener(\"touchmove\", this._moveHandler);\n\n\t\tthis._isUserInteraction = false;\n\t\tthis._preserveFocus(false);\n\t}\n\n\t/**\n\t * Updates state storage for the value-related property\n\t * Fires an <code>input</code> event indicating a value change via interaction that is not yet finished.\n\t *\n\t * @protected\n\t */\n\tupdateStateStorageAndFireInputEvent(valueType: string) {\n\t\tthis.storePropertyState(valueType);\n\t\tif (this._isUserInteraction) {\n\t\t\tthis.fireEvent(\"input\");\n\t\t}\n\t}\n\n\t/**\n\t * Goes through the key shortcuts available for the component and returns 'true' if the event is triggered by one.\n\t *\n\t * @private\n\t */\n\tstatic _isActionKey(e: KeyboardEvent) {\n\t\treturn this.ACTION_KEYS.some(actionKey => actionKey(e));\n\t}\n\n\t/**\n\t * Locks the given value between min and max boundaries based on slider properties\n\t *\n\t * @protected\n\t */\n\tstatic clipValue(value: number, min: number, max: number): number {\n\t\tvalue = Math.min(Math.max(value, min), max);\n\t\treturn value;\n\t}\n\n\t/**\n\t * Sets the slider value from an event\n\t *\n\t * @protected\n\t */\n\tstatic getValueFromInteraction(e: TouchEvent | MouseEvent, stepSize: number, min: number, max: number, boundingClientRect: DOMRect, directionStart: DirectionStart): number {\n\t\tconst pageX = this.getPageXValueFromEvent(e);\n\t\tconst value = this.computedValueFromPageX(pageX, min, max, boundingClientRect, directionStart);\n\t\tconst steppedValue = this.getSteppedValue(value, stepSize, min);\n\n\t\treturn this.clipValue(steppedValue, min, max);\n\t}\n\n\t/**\n\t * \"Stepify\" the raw value - calculate the new value depending on the specified step property\n\t *\n\t * @protected\n\t */\n\tstatic getSteppedValue(value: number, stepSize: number, min: number): number {\n\t\tconst stepModuloValue = Math.abs((value - min) % stepSize);\n\n\t\tif (stepSize === 0 || stepModuloValue === 0) {\n\t\t\treturn value;\n\t\t}\n\n\t\t// Clip (snap) the new value to the nearest step\n\t\tvalue = (stepModuloValue * 2 >= stepSize) ? (value + stepSize) - stepModuloValue : value - stepModuloValue;\n\n\t\t// If the step value is not a round number get its precision\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(stepSize);\n\t\treturn Number(value.toFixed(stepPrecision));\n\t}\n\n\t/**\n\t * Gets pageX value from event on user interaction with the Slider\n\t *\n\t * @protected\n\t */\n\tstatic getPageXValueFromEvent(e: TouchEvent | MouseEvent): number {\n\t\tif (supportsTouch() && e instanceof TouchEvent) {\n\t\t\tif (e.targetTouches && e.targetTouches.length > 0) {\n\t\t\t\treturn e.targetTouches[0].pageX;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn (e as MouseEvent).pageX; // MouseEvent\n\t}\n\n\t/**\n\t * Computes the new value (in %) from the pageX position of the cursor.\n\t * Returns the value rounded to a precision of at most 2 digits after decimal point.\n\t *\n\t * @protected\n\t */\n\tstatic computedValueFromPageX(pageX: number, min: number, max: number, boundingClientRect: DOMRect, directionStart: DirectionStart) {\n\t\t// Determine pageX position relative to the Slider DOM\n\t\tconst xRelativePosition = directionStart === \"left\" ? pageX - boundingClientRect[directionStart] : boundingClientRect[directionStart] - pageX;\n\t\t// Calculate the percentage complete (the \"progress\")\n\t\tconst percentageComplete = xRelativePosition / boundingClientRect.width;\n\t\t// Fit (map) the complete percentage between the min/max value range\n\t\treturn min + percentageComplete * (max - min);\n\t}\n\n\t/**\n\t * Calculates the precision (decimal places) of a number, returns 0 if integer\n\t * Handles scientific notation cases.\n\t * @private\n\t */\n\tstatic _getDecimalPrecisionOfNumber(value: number) {\n\t\tif (Number.isInteger(value)) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst match = (String(value)).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);\n\t\tif (!match || match.length < 2) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? Number(match[2]) : 0));\n\t}\n\n\t/**\n\t * In order to always keep the visual UI representation and the internal\n\t * state in sync, the component has a 'state storage' that is updated when the\n\t * current state is changed due to a user action.\n\t *\n\t * Check if the previously saved state is outdated. That would mean\n\t * a property has been changed programmatically because the previous state\n\t * is always updated in the interaction handlers.\n\t *\n\t * Will return true if any of the properties is not equal to its previously\n\t * stored value.\n\t *\n\t * @protected\n\t */\n\tisCurrentStateOutdated() {\n\t\treturn Object.entries(this._stateStorage).some(([propName, propValue]) => this[propName as keyof SliderBase] !== propValue);\n\t}\n\n\t/**\n\t * Returns the last stored value of a property\n\t *\n\t * @protected\n\t */\n\tgetStoredPropertyState(prop: string) {\n\t\treturn this._stateStorage[prop as keyof StateStorage];\n\t}\n\n\t/**\n\t * Check if one or more properties have been updated compared to their last\n\t * saved values in the state storage.\n\t *\n\t * @protected\n\t */\n\tisPropertyUpdated(...props: Array<string>) {\n\t\treturn props.some(prop => this.getStoredPropertyState(prop) !== this[prop as keyof SliderBase]);\n\t}\n\n\t/**\n\t * Updates the previously saved in the _stateStorage values of one or more properties.\n\t *\n\t * @protected\n\t */\n\tstorePropertyState(...props: Array<string>) {\n\t\tprops.forEach(prop => {\n\t\t\tthis._stateStorage[prop as keyof StateStorage] = this[prop as keyof SliderBase] as number;\n\t\t});\n\t}\n\n\t/**\n\t * Returns the start side of a direction - left for LTR, right for RTL\n\t */\n\tget directionStart() {\n\t\treturn this.effectiveDir === \"rtl\" ? \"right\" : \"left\";\n\t}\n\n\t/**\n\t * Calculates the labels amount, width and text and creates them\n\t *\n\t * @private\n\t */\n\t_createLabels() {\n\t\tif (!this.labelInterval || !this.showTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst labelInterval = this.labelInterval;\n\t\tconst step = this._effectiveStep;\n\t\tconst newNumberOfLabels = (this._effectiveMax - this._effectiveMin) / (step * labelInterval);\n\n\t\t// If the required labels are already rendered\n\t\tif (newNumberOfLabels === this._oldNumberOfLabels) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._oldNumberOfLabels = newNumberOfLabels;\n\t\tthis._labelWidth = 100 / newNumberOfLabels;\n\t\tthis._labelValues = [];\n\n\t\t// If the step value is not a round number get its precision\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(step);\n\n\t\t// numberOfLabels below can be float so that the \"distance betweenlabels labels\"\n\t\t// calculation to be precize (exactly the same as the distance between the tickmarks).\n\t\t// That's ok as the loop stop condition is set to an integer, so it will practically\n\t\t// \"floor\" the number of labels anyway.\n\t\tfor (let i = 0; i <= newNumberOfLabels; i++) {\n\t\t\t// Format the label numbers with the same decimal precision as the value of the step property\n\t\t\tconst labelItemNumber = ((i * step * labelInterval) + this._effectiveMin).toFixed(stepPrecision);\n\t\t\tthis._labelValues.push(labelItemNumber);\n\t\t}\n\t}\n\n\t_handleActionKeyPressBase(e: KeyboardEvent, affectedPropName: string) {\n\t\tconst isUpAction = SliderBase._isIncreaseValueAction(e);\n\t\tconst isBigStep = SliderBase._isBigStepAction(e);\n\n\t\tconst currentValue = this[affectedPropName as keyof SliderBase] as number;\n\t\tconst min = this._effectiveMin;\n\t\tconst max = this._effectiveMax;\n\n\t\t// We need to take into consideration the effective direction of the slider - rtl or ltr.\n\t\t// While in ltr, the left arrow key decreases the value, in rtl it should actually increase it.\n\t\tlet step = this.effectiveDir === \"rtl\" ? -this._effectiveStep : this._effectiveStep;\n\n\t\t// If the action key corresponds to a long step and the slider has more than 10 normal steps,\n\t\t// make a jump of 1/10th of the Slider's length, otherwise just use the normal step property.\n\t\tstep = isBigStep && ((max - min) / step > 10) ? (max - min) / 10 : step;\n\n\t\tif (isEnd(e)) {\n\t\t\treturn max - currentValue;\n\t\t}\n\n\t\tif (isHome(e)) {\n\t\t\treturn (currentValue - min) * -1;\n\t\t}\n\n\t\treturn isUpAction ? step : step * -1;\n\t}\n\n\tstatic _isDecreaseValueAction(e: KeyboardEvent) {\n\t\treturn isDown(e) || isDownCtrl(e) || isLeft(e) || isLeftCtrl(e) || isMinus(e) || isPageDown(e);\n\t}\n\n\tstatic _isIncreaseValueAction(e: KeyboardEvent) {\n\t\treturn isUp(e) || isUpCtrl(e) || isRight(e) || isRightCtrl(e) || isPlus(e) || isPageUp(e);\n\t}\n\n\tstatic _isBigStepAction(e: KeyboardEvent) {\n\t\treturn isDownCtrl(e) || isUpCtrl(e) || isLeftCtrl(e) || isRightCtrl(e) || isPageUp(e) || isPageDown(e);\n\t}\n\n\tget _tickmarksCount() {\n\t\treturn (this._effectiveMax - this._effectiveMin) / this._effectiveStep;\n\t}\n\n\t/**\n\t * Calculates space between tickmarks\n\t *\n\t * @private\n\t */\n\t_spaceBetweenTickmarks() {\n\t\treturn this.getBoundingClientRect().width / this._tickmarksCount;\n\t}\n\n\t/**\n\t * Notify in case of a invalid step value type\n\t *\n\t * @private\n\t */\n\t_validateStep(step: number) {\n\t\tif (step === 0) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number\"); // eslint-disable-line\n\t\t}\n\n\t\tif (step < 0) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number. The provided negative number has been converted to its positve equivalent\"); // eslint-disable-line\n\t\t}\n\n\t\tif (Number.isNaN(step)) {\n\t\t\tconsole.warn(\"The 'step' property must be a positive float number. It has been set to its default value of 1\"); // eslint-disable-line\n\t\t}\n\t}\n\n\tget _labels() {\n\t\treturn this._labelValues || [];\n\t}\n\n\t/**\n\t * Normalizes a new <code>step</code> property value.\n\t * If tickmarks are enabled recreates them according to it.\n\t *\n\t * @private\n\t */\n\tget _effectiveStep() {\n\t\tlet step = this.step;\n\n\t\tif (step < 0) {\n\t\t\tstep = Math.abs(step);\n\t\t}\n\n\t\tif (Number.isNaN(step)) {\n\t\t\tstep = 1;\n\t\t}\n\n\t\treturn step;\n\t}\n\n\tget _effectiveMin() {\n\t\treturn Math.min(this.min, this.max);\n\t}\n\n\tget _effectiveMax() {\n\t\treturn Math.max(this.min, this.max);\n\t}\n\n\tget _tabIndex() {\n\t\treturn this.disabled ? \"-1\" : \"0\";\n\t}\n\n\tget _ariaLabelledByHandleRefs() {\n\t\treturn [`${this._id}-accName`, `${this._id}-sliderDesc`].join(\" \").trim();\n\t}\n}\n\nexport default SliderBase;\n"]}
package/dist/Switch.d.ts CHANGED
@@ -4,6 +4,7 @@ import type { ClassMap } from "@ui5/webcomponents-base/dist/types.js";
4
4
  import "@ui5/webcomponents-icons/dist/accept.js";
5
5
  import "@ui5/webcomponents-icons/dist/decline.js";
6
6
  import "@ui5/webcomponents-icons/dist/less.js";
7
+ import type { IFormElement } from "./features/InputElementsFormSupport.js";
7
8
  import SwitchDesign from "./types/SwitchDesign.js";
8
9
  /**
9
10
  * @class
@@ -45,7 +46,7 @@ import SwitchDesign from "./types/SwitchDesign.js";
45
46
  * @public
46
47
  * @since 0.8.0
47
48
  */
48
- declare class Switch extends UI5Element {
49
+ declare class Switch extends UI5Element implements IFormElement {
49
50
  /**
50
51
  * Defines the component design.
51
52
  * <br><br>
@@ -140,7 +141,47 @@ declare class Switch extends UI5Element {
140
141
  * @since 1.9.0
141
142
  */
142
143
  tooltip: string;
144
+ /**
145
+ * Defines whether the component is required.
146
+ *
147
+ * @type {boolean}
148
+ * @name sap.ui.webc.main.Switch.prototype.required
149
+ * @defaultvalue false
150
+ * @public
151
+ * @since 1.16.0
152
+ */
153
+ required: boolean;
154
+ /**
155
+ * Determines the name with which the component will be submitted in an HTML form.
156
+ *
157
+ * <br><br>
158
+ * <b>Important:</b> For the <code>name</code> property to have effect, you must add the following import to your project:
159
+ * <code>import "@ui5/webcomponents/dist/features/InputElementsFormSupport.js";</code>
160
+ *
161
+ * <br><br>
162
+ * <b>Note:</b> When set, a native <code>input</code> HTML element
163
+ * will be created inside the component so that it can be submitted as
164
+ * part of an HTML form. Do not use this property unless you need to submit a form.
165
+ *
166
+ * @type {string}
167
+ * @name sap.ui.webc.main.Switch.prototype.name
168
+ * @defaultvalue ""
169
+ * @public
170
+ * @since 1.16.0
171
+ */
172
+ name: string;
173
+ /**
174
+ * The slot is used to render native <code>input</code> HTML element within Light DOM to enable form submit, when <code>Switch</code> is a part of HTML form.
175
+ *
176
+ * @type {HTMLElement[]}
177
+ * @slot
178
+ * @private
179
+ * @since 1.16.0
180
+ */
181
+ formSupport: Array<HTMLElement>;
143
182
  static i18nBundle: I18nBundle;
183
+ onBeforeRendering(): void;
184
+ _enableFormSupport(): void;
144
185
  get sapNextIcon(): "less" | "accept";
145
186
  _onclick(): void;
146
187
  _onkeydown(e: KeyboardEvent): void;
package/dist/Switch.js CHANGED
@@ -9,6 +9,7 @@ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
9
9
  import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
10
10
  import property from "@ui5/webcomponents-base/dist/decorators/property.js";
11
11
  import event from "@ui5/webcomponents-base/dist/decorators/event.js";
12
+ import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
12
13
  import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
13
14
  import { isSpace, isEnter } from "@ui5/webcomponents-base/dist/Keys.js";
14
15
  import { isDesktop } from "@ui5/webcomponents-base/dist/Device.js";
@@ -17,6 +18,7 @@ import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/Ari
17
18
  import "@ui5/webcomponents-icons/dist/accept.js";
18
19
  import "@ui5/webcomponents-icons/dist/decline.js";
19
20
  import "@ui5/webcomponents-icons/dist/less.js";
21
+ import { getFeature } from "@ui5/webcomponents-base/dist/FeaturesRegistry.js";
20
22
  import Icon from "./Icon.js";
21
23
  import SwitchDesign from "./types/SwitchDesign.js";
22
24
  // Template
@@ -64,6 +66,23 @@ import switchCss from "./generated/themes/Switch.css.js";
64
66
  * @since 0.8.0
65
67
  */
66
68
  let Switch = Switch_1 = class Switch extends UI5Element {
69
+ onBeforeRendering() {
70
+ this._enableFormSupport();
71
+ }
72
+ _enableFormSupport() {
73
+ const formSupport = getFeature("FormSupport");
74
+ if (formSupport) {
75
+ formSupport.syncNativeHiddenInput(this, (element, nativeInput) => {
76
+ const switchComponent = element;
77
+ nativeInput.checked = !!switchComponent.checked;
78
+ nativeInput.disabled = !!switchComponent.disabled;
79
+ nativeInput.value = switchComponent.checked ? "on" : "";
80
+ });
81
+ }
82
+ else if (this.name) {
83
+ console.warn(`In order for the "name" property to have effect, you should also: import "@ui5/webcomponents/dist/features/InputElementsFormSupport.js";`); // eslint-disable-line
84
+ }
85
+ }
67
86
  get sapNextIcon() {
68
87
  return this.checked ? "accept" : "less";
69
88
  }
@@ -88,8 +107,8 @@ let Switch = Switch_1 = class Switch extends UI5Element {
88
107
  this.checked = !this.checked;
89
108
  const changePrevented = !this.fireEvent("change", null, true);
90
109
  // Angular two way data binding;
91
- const valueChagnePrevented = !this.fireEvent("value-changed", null, true);
92
- if (changePrevented || valueChagnePrevented) {
110
+ const valueChangePrevented = !this.fireEvent("value-changed", null, true);
111
+ if (changePrevented || valueChangePrevented) {
93
112
  this.checked = !this.checked;
94
113
  }
95
114
  }
@@ -164,6 +183,15 @@ __decorate([
164
183
  __decorate([
165
184
  property()
166
185
  ], Switch.prototype, "tooltip", void 0);
186
+ __decorate([
187
+ property({ type: Boolean })
188
+ ], Switch.prototype, "required", void 0);
189
+ __decorate([
190
+ property()
191
+ ], Switch.prototype, "name", void 0);
192
+ __decorate([
193
+ slot()
194
+ ], Switch.prototype, "formSupport", void 0);
167
195
  Switch = Switch_1 = __decorate([
168
196
  customElement({
169
197
  tag: "ui5-switch",
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.js","sourceRoot":"","sources":["../src/Switch.ts"],"names":[],"mappings":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ACa;AAcxB;IADC,QAAQ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC;iDACJ;AAa3B;IADC,QAAQ,EAAE;uCACM;AA7GZ,MAAM;IAfX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,cAAc;QACxB,YAAY,EAAE,CAAC,IAAI,CAAC;KACpB,CAAC;IACF;;;;;OAKG;;IACF,KAAK,CAAC,QAAQ,CAAC;GACV,MAAM,CA+MX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,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 event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\n\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { ClassMap } from \"@ui5/webcomponents-base/dist/types.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport \"@ui5/webcomponents-icons/dist/accept.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport \"@ui5/webcomponents-icons/dist/less.js\";\nimport Icon from \"./Icon.js\";\nimport SwitchDesign from \"./types/SwitchDesign.js\";\n\n// Template\nimport SwitchTemplate from \"./generated/templates/SwitchTemplate.lit.js\";\n\n// Styles\nimport switchCss from \"./generated/themes/Switch.css.js\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n * The <code>ui5-switch</code> component is used for changing between binary states.\n * <br>\n * The component can display texts, that will be switched, based on the component state, via the <code>textOn</code> and <code>textOff</code> properties,\n * but texts longer than 3 letters will be cutted off.\n * <br>\n * However, users are able to customize the width of <code>ui5-switch</code> with pure CSS (<code>&lt;ui5-switch style=\"width: 200px\"></code>), and set widths, depending on the texts they would use.\n * <br>\n * Note: the component would not automatically stretch to fit the whole text width.\n *\n * <h3>Keyboard Handling</h3>\n * The state can be changed by pressing the Space and Enter keys.\n *\n * <h3>CSS Shadow Parts</h3>\n *\n * <ui5-link target=\"_blank\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/::part\">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.\n * <br>\n * The <code>ui5-switch</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>slider - Used to style the track, where the handle is being slid</li>\n * <li>text-on - Used to style the <code>textOn</code> property text</li>\n * <li>text-off - Used to style the <code>textOff</code> property text</li>\n * <li>handle - Used to style the handle of the switch</li>\n * </ul>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Switch\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Switch\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-switch\n * @public\n * @since 0.8.0\n */\n@customElement({\n\ttag: \"ui5-switch\",\n\tlanguageAware: true,\n\tstyles: switchCss,\n\trenderer: litRender,\n\ttemplate: SwitchTemplate,\n\tdependencies: [Icon],\n})\n/**\n * Fired when the component checked state changes.\n *\n * @public\n * @event sap.ui.webc.main.Switch#change\n */\n@event(\"change\")\nclass Switch extends UI5Element {\n\t/**\n\t * Defines the component design.\n\t * <br><br>\n\t * <b>Note:</b> If <code>Graphical</code> type is set,\n\t * positive and negative icons will replace the <code>textOn</code> and <code>textOff</code>.\n\t *\n\t * @public\n\t * @type {sap.ui.webc.main.types.SwitchDesign}\n\t * @name sap.ui.webc.main.Switch.prototype.design\n\t * @defaultValue \"Textual\"\n\t */\n\t@property({ type: SwitchDesign, defaultValue: SwitchDesign.Textual })\n\tdesign!: `${SwitchDesign}`;\n\n\t/**\n\t * Defines if the component is checked.\n\t * <br><br>\n\t * <b>Note:</b> The property can be changed with user interaction,\n\t * either by cliking the component, or by pressing the <code>Enter</code> or <code>Space</code> key.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Switch.prototype.checked\n\t * @defaultvalue false\n\t * @formEvents change\n\t * @formProperty\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tchecked!: boolean;\n\n\t/**\n\t * Defines whether the component is disabled.\n\t * <br><br>\n\t * <b>Note:</b> A disabled component is noninteractive.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Switch.prototype.disabled\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean\n\n\t/**\n\t * Defines the text, displayed when the component is checked.\n\t *\n\t * <br><br>\n\t * <b>Note:</b> We recommend using short texts, up to 3 letters (larger texts would be cut off).\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Switch.prototype.textOn\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\ttextOn!: string\n\n\t/**\n\t * Defines the text, displayed when the component is not checked.\n\t * <br><br>\n\t * <b>Note:</b> We recommend using short texts, up to 3 letters (larger texts would be cut off).\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Switch.prototype.textOff\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\ttextOff!: string\n\n\t/**\n\t * Sets the accessible ARIA name of the component.\n\t *\n\t * <b>Note</b>: We recommend that you set an accessibleNameRef pointing to an external label or at least an <code>accessibleName</code>.\n\t * Providing an <code>accessibleNameRef</code> or an <code>accessibleName</code> is mandatory in the cases when <code>textOn</code> and <code>textOff</code> properties aren't set.\n\t * @type {string}\n\t * @name sap.ui.webc.main.Switch.prototype.accessibleName\n\t * @defaultvalue: \"\"\n\t * @public\n\t * @since 1.2.0\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t *\n\t * <b>Note</b>: We recommend that you set an accessibleNameRef pointing to an external label or at least an <code>accessibleName</code>.\n\t * Providing an <code>accessibleNameRef</code> or an <code>accessibleName</code> is mandatory in the cases when <code>textOn</code> and <code>textOff</code> properties aren't set.\n\t * @type {string}\n\t * @name sap.ui.webc.main.Switch.prototype.accessibleNameRef\n\t * @defaultvalue \"\"\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property({ defaultValue: \"\" })\n\taccessibleNameRef!: string;\n\n\t/**\n\t * Defines the tooltip of the component.\n\t * <br>\n\t * <b>Note:</b> If applicable an external label reference should always be the preferred option to provide context to the <code>ui5-switch</code> component over a tooltip.\n\t * @type {string}\n\t * @name sap.ui.webc.main.Switch.prototype.tooltip\n\t * @defaultvalue: \"\"\n\t * @public\n\t * @since 1.9.0\n\t */\n\t@property()\n\ttooltip!: string;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tget sapNextIcon() {\n\t\treturn this.checked ? \"accept\" : \"less\";\n\t}\n\n\t_onclick() {\n\t\tthis.toggle();\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._onclick();\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis._onclick();\n\t\t}\n\t}\n\n\ttoggle() {\n\t\tif (!this.disabled) {\n\t\t\tthis.checked = !this.checked;\n\t\t\tconst changePrevented = !this.fireEvent(\"change\", null, true);\n\t\t\t// Angular two way data binding;\n\t\t\tconst valueChagnePrevented = !this.fireEvent(\"value-changed\", null, true);\n\n\t\t\tif (changePrevented || valueChagnePrevented) {\n\t\t\t\tthis.checked = !this.checked;\n\t\t\t}\n\t\t}\n\t}\n\n\tget graphical() {\n\t\treturn this.design === SwitchDesign.Graphical;\n\t}\n\n\tget hasNoLabel() {\n\t\treturn !(this.graphical || this.textOn || this.textOff);\n\t}\n\n\tget _textOn() {\n\t\treturn this.graphical ? \"\" : this.textOn;\n\t}\n\n\tget _textOff() {\n\t\treturn this.graphical ? \"\" : this.textOff;\n\t}\n\n\tget effectiveTabIndex() {\n\t\treturn this.disabled ? undefined : \"0\";\n\t}\n\n\tget classes(): ClassMap {\n\t\tconst hasLabel = this.graphical || this.textOn || this.textOff;\n\n\t\treturn {\n\t\t\tmain: {\n\t\t\t\t\"ui5-switch-desktop\": isDesktop(),\n\t\t\t\t\"ui5-switch--disabled\": this.disabled,\n\t\t\t\t\"ui5-switch--checked\": this.checked,\n\t\t\t\t\"ui5-switch--semantic\": this.graphical,\n\t\t\t\t\"ui5-switch--no-label\": !hasLabel,\n\t\t\t},\n\t\t};\n\t}\n\n\tget effectiveAriaDisabled() {\n\t\treturn this.disabled ? \"true\" : undefined;\n\t}\n\n\tget accessibilityOnText() {\n\t\treturn this._textOn;\n\t}\n\n\tget accessibilityOffText() {\n\t\treturn this._textOff;\n\t}\n\n\tget hiddenText() {\n\t\treturn this.checked ? this.accessibilityOnText : this.accessibilityOffText;\n\t}\n\n\tget ariaLabelText() {\n\t\treturn [getEffectiveAriaLabelText(this), this.hiddenText].join(\" \").trim();\n\t}\n\n\tstatic async onDefine() {\n\t\tSwitch.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nSwitch.define();\n\nexport default Switch;\n"]}
1
+ {"version":3,"file":"Switch.js","sourceRoot":"","sources":["../src/Switch.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO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AI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IAC5E,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,QAAQ;QACpB,QAAM,CAAC,UAAU,GAAG,MAAM,aAAa,CAAC,oBAAoB,CAAC,CAAC;IAC/D,CAAC;CACD,CAAA;AAhQA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,OAAO,EAAE,CAAC;sCAC1C;AAe3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uCACV;AAalB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACV;AAclB;IADC,QAAQ,EAAE;sCACI;AAaf;IADC,QAAQ,EAAE;uCACK;AAchB;IADC,QAAQ,EAAE;8CACa;AAcxB;IADC,QAAQ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC;iDACJ;AAa3B;IADC,QAAQ,EAAE;uCACM;AAYjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACT;AAqBnB;IADC,QAAQ,EAAE;oCACG;AAWd;IADC,IAAI,EAAE;2CAC0B;AAzJ5B,MAAM;IAfX,aAAa,CAAC;QACd,GAAG,EAAE,YAAY;QACjB,aAAa,EAAE,IAAI;QACnB,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,cAAc;QACxB,YAAY,EAAE,CAAC,IAAI,CAAC;KACpB,CAAC;IACF;;;;;OAKG;;IACF,KAAK,CAAC,QAAQ,CAAC;GACV,MAAM,CA6QX;AAED,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,eAAe,MAAM,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 event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\n\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { ClassMap } from \"@ui5/webcomponents-base/dist/types.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport \"@ui5/webcomponents-icons/dist/accept.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport \"@ui5/webcomponents-icons/dist/less.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport type FormSupport from \"./features/InputElementsFormSupport.js\";\nimport type { IFormElement } from \"./features/InputElementsFormSupport.js\";\nimport Icon from \"./Icon.js\";\nimport SwitchDesign from \"./types/SwitchDesign.js\";\n\n// Template\nimport SwitchTemplate from \"./generated/templates/SwitchTemplate.lit.js\";\n\n// Styles\nimport switchCss from \"./generated/themes/Switch.css.js\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n * The <code>ui5-switch</code> component is used for changing between binary states.\n * <br>\n * The component can display texts, that will be switched, based on the component state, via the <code>textOn</code> and <code>textOff</code> properties,\n * but texts longer than 3 letters will be cutted off.\n * <br>\n * However, users are able to customize the width of <code>ui5-switch</code> with pure CSS (<code>&lt;ui5-switch style=\"width: 200px\"></code>), and set widths, depending on the texts they would use.\n * <br>\n * Note: the component would not automatically stretch to fit the whole text width.\n *\n * <h3>Keyboard Handling</h3>\n * The state can be changed by pressing the Space and Enter keys.\n *\n * <h3>CSS Shadow Parts</h3>\n *\n * <ui5-link target=\"_blank\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/::part\">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.\n * <br>\n * The <code>ui5-switch</code> exposes the following CSS Shadow Parts:\n * <ul>\n * <li>slider - Used to style the track, where the handle is being slid</li>\n * <li>text-on - Used to style the <code>textOn</code> property text</li>\n * <li>text-off - Used to style the <code>textOff</code> property text</li>\n * <li>handle - Used to style the handle of the switch</li>\n * </ul>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Switch\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Switch\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-switch\n * @public\n * @since 0.8.0\n */\n@customElement({\n\ttag: \"ui5-switch\",\n\tlanguageAware: true,\n\tstyles: switchCss,\n\trenderer: litRender,\n\ttemplate: SwitchTemplate,\n\tdependencies: [Icon],\n})\n/**\n * Fired when the component checked state changes.\n *\n * @public\n * @event sap.ui.webc.main.Switch#change\n */\n@event(\"change\")\nclass Switch extends UI5Element implements IFormElement {\n\t/**\n\t * Defines the component design.\n\t * <br><br>\n\t * <b>Note:</b> If <code>Graphical</code> type is set,\n\t * positive and negative icons will replace the <code>textOn</code> and <code>textOff</code>.\n\t *\n\t * @public\n\t * @type {sap.ui.webc.main.types.SwitchDesign}\n\t * @name sap.ui.webc.main.Switch.prototype.design\n\t * @defaultValue \"Textual\"\n\t */\n\t@property({ type: SwitchDesign, defaultValue: SwitchDesign.Textual })\n\tdesign!: `${SwitchDesign}`;\n\n\t/**\n\t * Defines if the component is checked.\n\t * <br><br>\n\t * <b>Note:</b> The property can be changed with user interaction,\n\t * either by cliking the component, or by pressing the <code>Enter</code> or <code>Space</code> key.\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Switch.prototype.checked\n\t * @defaultvalue false\n\t * @formEvents change\n\t * @formProperty\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tchecked!: boolean;\n\n\t/**\n\t * Defines whether the component is disabled.\n\t * <br><br>\n\t * <b>Note:</b> A disabled component is noninteractive.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Switch.prototype.disabled\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean\n\n\t/**\n\t * Defines the text, displayed when the component is checked.\n\t *\n\t * <br><br>\n\t * <b>Note:</b> We recommend using short texts, up to 3 letters (larger texts would be cut off).\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Switch.prototype.textOn\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\ttextOn!: string\n\n\t/**\n\t * Defines the text, displayed when the component is not checked.\n\t * <br><br>\n\t * <b>Note:</b> We recommend using short texts, up to 3 letters (larger texts would be cut off).\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Switch.prototype.textOff\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\ttextOff!: string\n\n\t/**\n\t * Sets the accessible ARIA name of the component.\n\t *\n\t * <b>Note</b>: We recommend that you set an accessibleNameRef pointing to an external label or at least an <code>accessibleName</code>.\n\t * Providing an <code>accessibleNameRef</code> or an <code>accessibleName</code> is mandatory in the cases when <code>textOn</code> and <code>textOff</code> properties aren't set.\n\t * @type {string}\n\t * @name sap.ui.webc.main.Switch.prototype.accessibleName\n\t * @defaultvalue: \"\"\n\t * @public\n\t * @since 1.2.0\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t *\n\t * <b>Note</b>: We recommend that you set an accessibleNameRef pointing to an external label or at least an <code>accessibleName</code>.\n\t * Providing an <code>accessibleNameRef</code> or an <code>accessibleName</code> is mandatory in the cases when <code>textOn</code> and <code>textOff</code> properties aren't set.\n\t * @type {string}\n\t * @name sap.ui.webc.main.Switch.prototype.accessibleNameRef\n\t * @defaultvalue \"\"\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property({ defaultValue: \"\" })\n\taccessibleNameRef!: string;\n\n\t/**\n\t * Defines the tooltip of the component.\n\t * <br>\n\t * <b>Note:</b> If applicable an external label reference should always be the preferred option to provide context to the <code>ui5-switch</code> component over a tooltip.\n\t * @type {string}\n\t * @name sap.ui.webc.main.Switch.prototype.tooltip\n\t * @defaultvalue: \"\"\n\t * @public\n\t * @since 1.9.0\n\t */\n\t@property()\n\ttooltip!: string;\n\n\t/**\n\t * Defines whether the component is required.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Switch.prototype.required\n\t * @defaultvalue false\n\t * @public\n\t * @since 1.16.0\n\t */\n\t@property({ type: Boolean })\n\trequired!: boolean;\n\n\t/**\n\t * Determines the name with which the component will be submitted in an HTML form.\n\t *\n\t * <br><br>\n\t * <b>Important:</b> For the <code>name</code> property to have effect, you must add the following import to your project:\n\t * <code>import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";</code>\n\t *\n\t * <br><br>\n\t * <b>Note:</b> When set, a native <code>input</code> HTML element\n\t * will be created inside the component so that it can be submitted as\n\t * part of an HTML form. Do not use this property unless you need to submit a form.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.Switch.prototype.name\n\t * @defaultvalue \"\"\n\t * @public\n\t * @since 1.16.0\n\t */\n\t@property()\n\tname!: string;\n\n\t/**\n\t * The slot is used to render native <code>input</code> HTML element within Light DOM to enable form submit, when <code>Switch</code> is a part of HTML form.\n\t *\n\t * @type {HTMLElement[]}\n\t * @slot\n\t * @private\n\t * @since 1.16.0\n\t */\n\t@slot()\n\tformSupport!: Array<HTMLElement>;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tonBeforeRendering() {\n\t\tthis._enableFormSupport();\n\t}\n\n\t_enableFormSupport() {\n\t\tconst formSupport = getFeature<typeof FormSupport>(\"FormSupport\");\n\t\tif (formSupport) {\n\t\t\tformSupport.syncNativeHiddenInput(this, (element: IFormElement, nativeInput: HTMLInputElement) => {\n\t\t\t\tconst switchComponent = (element as Switch);\n\t\t\t\tnativeInput.checked = !!switchComponent.checked;\n\t\t\t\tnativeInput.disabled = !!switchComponent.disabled;\n\t\t\t\tnativeInput.value = switchComponent.checked ? \"on\" : \"\";\n\t\t\t});\n\t\t} else if (this.name) {\n\t\t\tconsole.warn(`In order for the \"name\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n\t\t}\n\t}\n\n\tget sapNextIcon() {\n\t\treturn this.checked ? \"accept\" : \"less\";\n\t}\n\n\t_onclick() {\n\t\tthis.toggle();\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._onclick();\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis._onclick();\n\t\t}\n\t}\n\n\ttoggle() {\n\t\tif (!this.disabled) {\n\t\t\tthis.checked = !this.checked;\n\t\t\tconst changePrevented = !this.fireEvent(\"change\", null, true);\n\t\t\t// Angular two way data binding;\n\t\t\tconst valueChangePrevented = !this.fireEvent(\"value-changed\", null, true);\n\n\t\t\tif (changePrevented || valueChangePrevented) {\n\t\t\t\tthis.checked = !this.checked;\n\t\t\t}\n\t\t}\n\t}\n\n\tget graphical() {\n\t\treturn this.design === SwitchDesign.Graphical;\n\t}\n\n\tget hasNoLabel() {\n\t\treturn !(this.graphical || this.textOn || this.textOff);\n\t}\n\n\tget _textOn() {\n\t\treturn this.graphical ? \"\" : this.textOn;\n\t}\n\n\tget _textOff() {\n\t\treturn this.graphical ? \"\" : this.textOff;\n\t}\n\n\tget effectiveTabIndex() {\n\t\treturn this.disabled ? undefined : \"0\";\n\t}\n\n\tget classes(): ClassMap {\n\t\tconst hasLabel = this.graphical || this.textOn || this.textOff;\n\n\t\treturn {\n\t\t\tmain: {\n\t\t\t\t\"ui5-switch-desktop\": isDesktop(),\n\t\t\t\t\"ui5-switch--disabled\": this.disabled,\n\t\t\t\t\"ui5-switch--checked\": this.checked,\n\t\t\t\t\"ui5-switch--semantic\": this.graphical,\n\t\t\t\t\"ui5-switch--no-label\": !hasLabel,\n\t\t\t},\n\t\t};\n\t}\n\n\tget effectiveAriaDisabled() {\n\t\treturn this.disabled ? \"true\" : undefined;\n\t}\n\n\tget accessibilityOnText() {\n\t\treturn this._textOn;\n\t}\n\n\tget accessibilityOffText() {\n\t\treturn this._textOff;\n\t}\n\n\tget hiddenText() {\n\t\treturn this.checked ? this.accessibilityOnText : this.accessibilityOffText;\n\t}\n\n\tget ariaLabelText() {\n\t\treturn [getEffectiveAriaLabelText(this), this.hiddenText].join(\" \").trim();\n\t}\n\n\tstatic async onDefine() {\n\t\tSwitch.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nSwitch.define();\n\nexport default Switch;\n"]}
@@ -98,6 +98,7 @@ declare class TimePicker extends TimePickerBase {
98
98
  * @public
99
99
  */
100
100
  formatPattern: string;
101
+ onBeforeRendering(): void;
101
102
  get _formatPattern(): string;
102
103
  get _displayFormat(): string;
103
104
  get _placeholder(): string;
@@ -80,6 +80,9 @@ import { TIMEPICKER_INPUT_DESCRIPTION, } from "./generated/i18n/i18n-defaults.js
80
80
  * @since 1.0.0-rc.6
81
81
  */
82
82
  let TimePicker = TimePicker_1 = class TimePicker extends TimePickerBase {
83
+ onBeforeRendering() {
84
+ this.value = this.normalizeValue(this.value) || this.value;
85
+ }
83
86
  get _formatPattern() {
84
87
  const hasHours = !!this.formatPattern.match(/H/i);
85
88
  const fallback = !this.formatPattern || !hasHours;