@ui5/webcomponents 2.20.1 → 2.21.0-rc.1

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 (225) hide show
  1. package/CHANGELOG.md +51 -2
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/Button.d.ts +7 -0
  4. package/dist/Button.js +12 -2
  5. package/dist/Button.js.map +1 -1
  6. package/dist/Carousel.d.ts +14 -13
  7. package/dist/Carousel.js +93 -177
  8. package/dist/Carousel.js.map +1 -1
  9. package/dist/CarouselTemplate.js +2 -2
  10. package/dist/CarouselTemplate.js.map +1 -1
  11. package/dist/ColorPaletteTemplate.js +1 -1
  12. package/dist/ColorPaletteTemplate.js.map +1 -1
  13. package/dist/ComboBox.d.ts +1 -0
  14. package/dist/ComboBox.js +4 -1
  15. package/dist/ComboBox.js.map +1 -1
  16. package/dist/ComboBoxTemplate.js +1 -1
  17. package/dist/ComboBoxTemplate.js.map +1 -1
  18. package/dist/DatePicker.js +2 -2
  19. package/dist/DatePicker.js.map +1 -1
  20. package/dist/DayPickerTemplate.js +1 -1
  21. package/dist/DayPickerTemplate.js.map +1 -1
  22. package/dist/Dialog.d.ts +0 -3
  23. package/dist/Dialog.js +3 -1
  24. package/dist/Dialog.js.map +1 -1
  25. package/dist/Icon.d.ts +1 -1
  26. package/dist/Icon.js +12 -4
  27. package/dist/Icon.js.map +1 -1
  28. package/dist/IconTemplate.js +1 -1
  29. package/dist/IconTemplate.js.map +1 -1
  30. package/dist/Input.d.ts +2 -1
  31. package/dist/Input.js +38 -16
  32. package/dist/Input.js.map +1 -1
  33. package/dist/Menu.js +6 -1
  34. package/dist/Menu.js.map +1 -1
  35. package/dist/MenuItem.d.ts +8 -0
  36. package/dist/MenuItem.js +29 -1
  37. package/dist/MenuItem.js.map +1 -1
  38. package/dist/MenuItemTemplate.js +2 -2
  39. package/dist/MenuItemTemplate.js.map +1 -1
  40. package/dist/MultiComboBox.js +5 -0
  41. package/dist/MultiComboBox.js.map +1 -1
  42. package/dist/MultiInput.js +6 -7
  43. package/dist/MultiInput.js.map +1 -1
  44. package/dist/Popover.d.ts +17 -0
  45. package/dist/Popover.js +38 -0
  46. package/dist/Popover.js.map +1 -1
  47. package/dist/StepInput.d.ts +5 -0
  48. package/dist/StepInput.js +26 -5
  49. package/dist/StepInput.js.map +1 -1
  50. package/dist/Switch.d.ts +21 -5
  51. package/dist/Switch.js +49 -13
  52. package/dist/Switch.js.map +1 -1
  53. package/dist/SwitchTemplate.js +2 -2
  54. package/dist/SwitchTemplate.js.map +1 -1
  55. package/dist/TimePicker.d.ts +55 -3
  56. package/dist/TimePicker.js +160 -26
  57. package/dist/TimePicker.js.map +1 -1
  58. package/dist/TimePickerTemplate.js +1 -1
  59. package/dist/TimePickerTemplate.js.map +1 -1
  60. package/dist/TimeSelectionClocks.js +8 -0
  61. package/dist/TimeSelectionClocks.js.map +1 -1
  62. package/dist/Token.js +2 -2
  63. package/dist/Token.js.map +1 -1
  64. package/dist/Tokenizer.js +2 -1
  65. package/dist/Tokenizer.js.map +1 -1
  66. package/dist/ToolbarItemBase.d.ts +8 -0
  67. package/dist/ToolbarItemBase.js +12 -0
  68. package/dist/ToolbarItemBase.js.map +1 -1
  69. package/dist/ToolbarSpacer.d.ts +1 -0
  70. package/dist/ToolbarSpacer.js +3 -0
  71. package/dist/ToolbarSpacer.js.map +1 -1
  72. package/dist/ToolbarTemplate.js +1 -2
  73. package/dist/ToolbarTemplate.js.map +1 -1
  74. package/dist/css/themes/Breadcrumbs.css +1 -1
  75. package/dist/css/themes/CalendarHeader.css +1 -1
  76. package/dist/css/themes/ColorPaletteItem.css +1 -1
  77. package/dist/css/themes/DatePickerPopover.css +1 -1
  78. package/dist/css/themes/DayPicker.css +1 -1
  79. package/dist/css/themes/MenuItem.css +1 -1
  80. package/dist/css/themes/MonthPicker.css +1 -1
  81. package/dist/css/themes/MultiComboBox.css +1 -1
  82. package/dist/css/themes/MultiInput.css +1 -1
  83. package/dist/css/themes/PopupsCommon.css +1 -1
  84. package/dist/css/themes/Switch.css +1 -1
  85. package/dist/css/themes/Toolbar.css +1 -1
  86. package/dist/css/themes/YearPicker.css +1 -1
  87. package/dist/css/themes/YearRangePicker.css +1 -1
  88. package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
  89. package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
  90. package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
  91. package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
  92. package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
  93. package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
  94. package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
  95. package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
  96. package/dist/custom-elements-internal.json +91 -8
  97. package/dist/custom-elements.json +87 -8
  98. package/dist/features/InputSuggestions.js +2 -1
  99. package/dist/features/InputSuggestions.js.map +1 -1
  100. package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
  101. package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
  102. package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
  103. package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
  104. package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
  105. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  106. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  107. package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
  108. package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
  109. package/dist/generated/i18n/i18n-defaults.d.ts +7 -2
  110. package/dist/generated/i18n/i18n-defaults.js +7 -2
  111. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  112. package/dist/generated/themes/Breadcrumbs.css.d.ts +1 -1
  113. package/dist/generated/themes/Breadcrumbs.css.js +1 -1
  114. package/dist/generated/themes/Breadcrumbs.css.js.map +1 -1
  115. package/dist/generated/themes/CalendarHeader.css.d.ts +1 -1
  116. package/dist/generated/themes/CalendarHeader.css.js +1 -1
  117. package/dist/generated/themes/CalendarHeader.css.js.map +1 -1
  118. package/dist/generated/themes/ColorPaletteItem.css.d.ts +1 -1
  119. package/dist/generated/themes/ColorPaletteItem.css.js +1 -1
  120. package/dist/generated/themes/ColorPaletteItem.css.js.map +1 -1
  121. package/dist/generated/themes/DatePickerPopover.css.d.ts +1 -1
  122. package/dist/generated/themes/DatePickerPopover.css.js +1 -1
  123. package/dist/generated/themes/DatePickerPopover.css.js.map +1 -1
  124. package/dist/generated/themes/DayPicker.css.d.ts +1 -1
  125. package/dist/generated/themes/DayPicker.css.js +1 -1
  126. package/dist/generated/themes/DayPicker.css.js.map +1 -1
  127. package/dist/generated/themes/MenuItem.css.d.ts +1 -1
  128. package/dist/generated/themes/MenuItem.css.js +1 -1
  129. package/dist/generated/themes/MenuItem.css.js.map +1 -1
  130. package/dist/generated/themes/MonthPicker.css.d.ts +1 -1
  131. package/dist/generated/themes/MonthPicker.css.js +1 -1
  132. package/dist/generated/themes/MonthPicker.css.js.map +1 -1
  133. package/dist/generated/themes/MultiComboBox.css.d.ts +1 -1
  134. package/dist/generated/themes/MultiComboBox.css.js +1 -1
  135. package/dist/generated/themes/MultiComboBox.css.js.map +1 -1
  136. package/dist/generated/themes/MultiInput.css.d.ts +1 -1
  137. package/dist/generated/themes/MultiInput.css.js +1 -1
  138. package/dist/generated/themes/MultiInput.css.js.map +1 -1
  139. package/dist/generated/themes/PopupsCommon.css.d.ts +1 -1
  140. package/dist/generated/themes/PopupsCommon.css.js +1 -1
  141. package/dist/generated/themes/PopupsCommon.css.js.map +1 -1
  142. package/dist/generated/themes/Switch.css.d.ts +1 -1
  143. package/dist/generated/themes/Switch.css.js +1 -1
  144. package/dist/generated/themes/Switch.css.js.map +1 -1
  145. package/dist/generated/themes/Toolbar.css.d.ts +1 -1
  146. package/dist/generated/themes/Toolbar.css.js +1 -1
  147. package/dist/generated/themes/Toolbar.css.js.map +1 -1
  148. package/dist/generated/themes/YearPicker.css.d.ts +1 -1
  149. package/dist/generated/themes/YearPicker.css.js +1 -1
  150. package/dist/generated/themes/YearPicker.css.js.map +1 -1
  151. package/dist/generated/themes/YearRangePicker.css.d.ts +1 -1
  152. package/dist/generated/themes/YearRangePicker.css.js +1 -1
  153. package/dist/generated/themes/YearRangePicker.css.js.map +1 -1
  154. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.d.ts +1 -1
  155. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
  156. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
  157. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.d.ts +1 -1
  158. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
  159. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
  160. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +1 -1
  161. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
  162. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
  163. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +1 -1
  164. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
  165. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
  166. package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
  167. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
  168. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  169. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
  170. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
  171. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
  172. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +1 -1
  173. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
  174. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
  175. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +1 -1
  176. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
  177. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
  178. package/dist/vscode.html-custom-data.json +19 -4
  179. package/dist/web-types.json +40 -10
  180. package/package.json +9 -9
  181. package/src/CarouselTemplate.tsx +3 -3
  182. package/src/ColorPaletteTemplate.tsx +2 -2
  183. package/src/ComboBoxTemplate.tsx +1 -0
  184. package/src/DayPickerTemplate.tsx +1 -1
  185. package/src/IconTemplate.tsx +1 -0
  186. package/src/MenuItemTemplate.tsx +11 -1
  187. package/src/SwitchTemplate.tsx +4 -2
  188. package/src/TimePickerTemplate.tsx +1 -1
  189. package/src/ToolbarTemplate.tsx +1 -2
  190. package/src/i18n/messagebundle.properties +17 -2
  191. package/src/i18n/messagebundle_en_US_saprigi.properties +2 -0
  192. package/src/themes/Breadcrumbs.css +6 -2
  193. package/src/themes/CalendarHeader.css +1 -1
  194. package/src/themes/ColorPaletteItem.css +14 -0
  195. package/src/themes/DatePickerPopover.css +5 -0
  196. package/src/themes/DayPicker.css +1 -1
  197. package/src/themes/MenuItem.css +5 -0
  198. package/src/themes/MonthPicker.css +2 -2
  199. package/src/themes/MultiComboBox.css +1 -1
  200. package/src/themes/MultiInput.css +1 -1
  201. package/src/themes/PopupsCommon.css +7 -0
  202. package/src/themes/Switch.css +48 -2
  203. package/src/themes/Toolbar.css +0 -6
  204. package/src/themes/YearPicker.css +2 -2
  205. package/src/themes/YearRangePicker.css +2 -2
  206. package/src/themes/base/Bar-parameters.css +1 -0
  207. package/src/themes/base/Breadcrumbs-parameters.css +4 -0
  208. package/src/themes/base/Input-parameters.css +3 -1
  209. package/src/themes/base/Switch-parameters.css +4 -0
  210. package/src/themes/base/sizes-parameters.css +3 -0
  211. package/src/themes/sap_fiori_3/parameters-bundle.css +2 -1
  212. package/src/themes/sap_fiori_3_dark/parameters-bundle.css +2 -1
  213. package/src/themes/sap_fiori_3_hcb/parameters-bundle.css +3 -1
  214. package/src/themes/sap_fiori_3_hcw/parameters-bundle.css +3 -1
  215. package/src/themes/sap_horizon/Breadcrumbs-parameters.css +5 -1
  216. package/src/themes/sap_horizon/CalendarHeader-parameters.css +3 -3
  217. package/src/themes/sap_horizon/DayPicker-parameters.css +3 -3
  218. package/src/themes/sap_horizon_dark/Breadcrumbs-parameters.css +5 -1
  219. package/src/themes/sap_horizon_dark/CalendarHeader-parameters.css +2 -2
  220. package/src/themes/sap_horizon_hcb/Breadcrumbs-parameters.css +6 -0
  221. package/src/themes/sap_horizon_hcb/Switch-parameters.css +4 -0
  222. package/src/themes/sap_horizon_hcb/parameters-bundle.css +2 -1
  223. package/src/themes/sap_horizon_hcw/Breadcrumbs-parameters.css +6 -0
  224. package/src/themes/sap_horizon_hcw/Switch-parameters.css +4 -0
  225. package/src/themes/sap_horizon_hcw/parameters-bundle.css +2 -1
@@ -9011,7 +9011,7 @@
9011
9011
  },
9012
9012
  {
9013
9013
  "name": "footer",
9014
- "description": "Defines the footer HTML Element.\n\n**Note:** When a `ui5-bar` is used in the footer, you should remove the default dialog's paddings.",
9014
+ "description": "Defines the footer HTML Element.",
9015
9015
  "_ui5type": {
9016
9016
  "text": "Array<HTMLElement>"
9017
9017
  },
@@ -9019,7 +9019,7 @@
9019
9019
  },
9020
9020
  {
9021
9021
  "name": "header",
9022
- "description": "Defines the header HTML Element.\n\n**Note:** When a `ui5-bar` is used in the header, you should remove the default dialog's paddings.\n\n**Note:** If `header` slot is provided, the labelling of the dialog is a responsibility of the application developer.\n`accessibleName` should be used.",
9022
+ "description": "Defines the header HTML Element.\n\n**Note:** If `header` slot is provided, the labelling of the dialog is a responsibility of the application developer.\n`accessibleName` should be used.",
9023
9023
  "_ui5type": {
9024
9024
  "text": "Array<HTMLElement>"
9025
9025
  },
@@ -10840,7 +10840,7 @@
10840
10840
  "declarations": [
10841
10841
  {
10842
10842
  "kind": "class",
10843
- "description": "### Overview\n\nThe `ui5-icon` component represents an SVG icon.\nThere are two main scenarios how the `ui5-icon` component is used:\nas a purely decorative element,\nor as an interactive element that can be focused and clicked.\n\n### Usage\n\n1. **Get familiar with the icons collections.**\n\nBefore displaying an icon, you need to explore the icons collections to find and import the desired icon.\n\nCurrently there are 3 icons collection, available as 3 npm packages:\n\n- [@ui5/webcomponents-icons](https://www.npmjs.com/package/@ui5/webcomponents-icons) represents the \"SAP-icons\" collection and includes the following\n[icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons).\n- [@ui5/webcomponents-icons-tnt](https://www.npmjs.com/package/@ui5/webcomponents-icons-tnt) represents the \"tnt\" collection and includes the following\n[icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT).\n- [@ui5/webcomponents-icons-business-suite](https://www.npmjs.com/package/@ui5/webcomponents-icons-business-suite) represents the \"business-suite\" collection and includes the following\n[icons](https://ui5.sap.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/BusinessSuiteInAppSymbols).\n\n2. **After exploring the icons collections, add one or more of the packages as dependencies to your project.**\n\n`npm i @ui5/webcomponents-icons`\n`npm i @ui5/webcomponents-icons-tnt`\n`npm i @ui5/webcomponents-icons-business-suite`\n\n3. **Then, import the desired icon**.\n\n`import \"@ui5/\\{package_name\\}/dist/\\{icon_name\\}.js\";`\n\n**For Example**:\n\nFor the standard \"SAP-icons\" icon collection, import an icon from the `@ui5/webcomponents-icons` package:\n\n`import \"@ui5/webcomponents-icons/dist/employee.js\";`\n\nFor the \"tnt\" (SAP Fiori Tools) icon collection, import an icon from the `@ui5/webcomponents-icons-tnt` package:\n\n`import \"@ui5/webcomponents-icons-tnt/dist/antenna.js\";`\n\nFor the \"business-suite\" (SAP Business Suite) icon collection, import an icon from the `@ui5/webcomponents-icons-business-suite` package:\n\n`import \"@ui5/webcomponents-icons-business-suite/dist/ab-testing.js\";`\n\n4. **Display the icon using the `ui5-icon` web component.**\nSet the icon collection (\"SAP-icons\", \"tnt\" or \"business-suite\" - \"SAP-icons\" is the default icon collection and can be skipped)\nand the icon name to the `name` property.\n\n`<ui5-icon name=\"employee\"></ui5-icon>`\n`<ui5-icon name=\"tnt/antenna\"></ui5-icon>`\n`<ui5-icon name=\"business-suite/ab-testing\"></ui5-icon>`\n\n### Keyboard Handling\n\n- [Space] / [Enter] or [Return] - Fires the `click` event if the `mode` property is set to `Interactive`.\n- [Shift] - If [Space] / [Enter] or [Return] is pressed, pressing [Shift] releases the ui5-icon without triggering the click event.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents/dist/Icon.js\";`",
10843
+ "description": "### Overview\n\nThe `ui5-icon` component represents an SVG icon.\nThere are two main scenarios how the `ui5-icon` component is used:\nas a purely decorative element,\nor as an interactive element that can be focused and clicked.\n\n### Usage\n\n1. **Get familiar with the icons collections.**\n\nBefore displaying an icon, you need to explore the icons collections to find and import the desired icon.\n\nCurrently there are 3 icons collection, available as 3 npm packages:\n\n- [@ui5/webcomponents-icons](https://www.npmjs.com/package/@ui5/webcomponents-icons) represents the \"SAP-icons\" collection and includes the following\n[icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons).\n- [@ui5/webcomponents-icons-tnt](https://www.npmjs.com/package/@ui5/webcomponents-icons-tnt) represents the \"tnt\" collection and includes the following\n[icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT).\n- [@ui5/webcomponents-icons-business-suite](https://www.npmjs.com/package/@ui5/webcomponents-icons-business-suite) represents the \"business-suite\" collection and includes the following\n[icons](https://ui5.sap.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/BusinessSuiteInAppSymbols).\n\n2. **After exploring the icons collections, add one or more of the packages as dependencies to your project.**\n\n`npm i @ui5/webcomponents-icons`\n`npm i @ui5/webcomponents-icons-tnt`\n`npm i @ui5/webcomponents-icons-business-suite`\n\n3. **Then, import the desired icon**.\n\n`import \"@ui5/\\{package_name\\}/dist/\\{icon_name\\}.js\";`\n\n**For Example**:\n\nFor the standard \"SAP-icons\" icon collection, import an icon from the `@ui5/webcomponents-icons` package:\n\n`import \"@ui5/webcomponents-icons/dist/employee.js\";`\n\nFor the \"tnt\" (SAP Fiori Tools) icon collection, import an icon from the `@ui5/webcomponents-icons-tnt` package:\n\n`import \"@ui5/webcomponents-icons-tnt/dist/antenna.js\";`\n\nFor the \"business-suite\" (SAP Business Suite) icon collection, import an icon from the `@ui5/webcomponents-icons-business-suite` package:\n\n`import \"@ui5/webcomponents-icons-business-suite/dist/ab-testing.js\";`\n\n4. **Display the icon using the `ui5-icon` web component.**\nSet the icon collection (\"SAP-icons\", \"tnt\" or \"business-suite\" - \"SAP-icons\" is the default icon collection and can be skipped)\nand the icon name to the `name` property.\n\n`<ui5-icon name=\"employee\"></ui5-icon>`\n`<ui5-icon name=\"tnt/antenna\"></ui5-icon>`\n`<ui5-icon name=\"business-suite/ab-testing\"></ui5-icon>`\n\n### Keyboard Handling\n\n- [Space] / [Enter] or [Return] - Fires the `click` event if the `mode` property is set to `Interactive`.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents/dist/Icon.js\";`",
10844
10844
  "name": "Icon",
10845
10845
  "cssParts": [
10846
10846
  {
@@ -10923,7 +10923,7 @@
10923
10923
  "type": {
10924
10924
  "text": "CustomEvent"
10925
10925
  },
10926
- "description": "Fired on mouseup, `SPACE` and `ENTER`.\n- on mouse click, the icon fires native `click` event\n- on `SPACE` and `ENTER`, the icon fires custom `click` event",
10926
+ "description": "Fired when the component is activated by mouse/touch, keyboard (Enter or Space),\nor screen reader virtual cursor activation.\n\n**Note:** The event will not be fired if the `mode` property is set to `Decorative` or `Image`.",
10927
10927
  "_ui5Cancelable": false,
10928
10928
  "_ui5allowPreventDefault": false,
10929
10929
  "_ui5Bubbles": true,
@@ -23356,7 +23356,7 @@
23356
23356
  "text": "boolean"
23357
23357
  },
23358
23358
  "default": "false",
23359
- "description": "Defines if the component is checked.\n\n**Note:** The property can be changed with user interaction,\neither by cliking the component, or by pressing the `Enter` or `Space` key.",
23359
+ "description": "Defines if the component is checked.\n\n**Note:** The property can be changed with user interaction,\neither by clicking the component, or by pressing the `Enter` or `Space` key.",
23360
23360
  "privacy": "public",
23361
23361
  "_ui5formProperty": true,
23362
23362
  "_ui5formEvents": "change"
@@ -23399,6 +23399,17 @@
23399
23399
  "privacy": "public",
23400
23400
  "_ui5since": "1.16.0"
23401
23401
  },
23402
+ {
23403
+ "kind": "field",
23404
+ "name": "readonly",
23405
+ "type": {
23406
+ "text": "boolean"
23407
+ },
23408
+ "default": "false",
23409
+ "description": "Defines whether the component is in readonly state.\n\n**Note:** A readonly switch cannot be toggled by user interaction,\nbut can still be focused and its value read programmatically.",
23410
+ "privacy": "public",
23411
+ "_ui5since": "2.21.0"
23412
+ },
23402
23413
  {
23403
23414
  "kind": "field",
23404
23415
  "name": "required",
@@ -23486,7 +23497,7 @@
23486
23497
  }
23487
23498
  },
23488
23499
  {
23489
- "description": "Defines if the component is checked.\n\n**Note:** The property can be changed with user interaction,\neither by cliking the component, or by pressing the `Enter` or `Space` key.",
23500
+ "description": "Defines if the component is checked.\n\n**Note:** The property can be changed with user interaction,\neither by clicking the component, or by pressing the `Enter` or `Space` key.",
23490
23501
  "name": "checked",
23491
23502
  "default": "false",
23492
23503
  "fieldName": "checked",
@@ -23521,6 +23532,15 @@
23521
23532
  "text": "string | undefined"
23522
23533
  }
23523
23534
  },
23535
+ {
23536
+ "description": "Defines whether the component is in readonly state.\n\n**Note:** A readonly switch cannot be toggled by user interaction,\nbut can still be focused and its value read programmatically.",
23537
+ "name": "readonly",
23538
+ "default": "false",
23539
+ "fieldName": "readonly",
23540
+ "type": {
23541
+ "text": "boolean"
23542
+ }
23543
+ },
23524
23544
  {
23525
23545
  "description": "Defines whether the component is required.",
23526
23546
  "name": "required",
@@ -27489,7 +27509,7 @@
27489
27509
  "declarations": [
27490
27510
  {
27491
27511
  "kind": "class",
27492
- "description": "### Overview\nThe `ui5-time-picker` component provides an input field with assigned clocks which are opened on user action.\nThe `ui5-time-picker` allows users to select a localized time using touch, mouse, or keyboard input.\nIt consists of two parts: the time input field and the clocks.\n\n### Usage\nThe user can enter a time by:\n\n- Using the clocks that are displayed in a popup\n- Typing it in directly in the input field\n\nWhen the user makes an entry and chooses the enter key, the clocks show the corresponding time (hours, minutes and seconds separately).\nWhen the user directly triggers the clocks display, the actual time is displayed.\nFor the `ui5-time-picker`\n\n### Formatting\n\nIf a time is entered by typing it into\nthe input field, it must fit to the used time format.\n\nSupported format options are pattern-based on Unicode LDML Date Format notation.\nFor more information, see [UTS #35: Unicode Locale Data Markup Language](https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).\n\nFor example, if the `format-pattern` is \"HH:mm:ss\",\na valid value string is \"11:42:35\" and the same is displayed in the input.\n\n### Keyboard handling\n[F4], [Alt]+[Up], [Alt]+[Down] Open/Close picker dialog and move focus to it.\n\nWhen closed:\n\n- [Page Up] - Increments hours by 1. If 12 am is reached, increment hours to 1 pm and vice versa.\n- [Page Down] - Decrements the corresponding field by 1. If 1 pm is reached, decrement hours to 12 am and vice versa.\n- [Shift]+[Page Up] - Increments minutes by 1.\n- [Shift]+[Page Down] - Decrements minutes by 1.\n- [Shift]+[Ctrl]+[Page Up] - Increments seconds by 1.\n- [Shift]+[Ctrl]+[Page Down] - Decrements seconds by 1.\n-\n\nWhen opened:\n\n- [Page Up] - Increments hours by 1. If 12 am is reached, increment hours to 1 pm and vice versa.\n- [Page Down] - Decrements the corresponding field by 1. If 1 pm is reached, decrement hours to 12 am and vice versa.\n- [Shift]+[Page Up] - Increments minutes by 1.\n- [Shift]+[Page Down] - Decrements minutes by 1.\n- [Shift]+[Ctrl]+[Page Up] - Increments seconds by 1.\n- [Shift]+[Ctrl]+[Page Down] - Decrements seconds by 1.\n- [A] or [P] - Selects AM or PM respectively.\n- [0]-[9] - Allows direct time selecting (hours/minutes/seconds).\n- [:] - Allows switching between hours/minutes/seconds clocks. If the last clock is displayed and [:] is pressed, the first clock is beind displayed.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents/dist/TimePicker.js\";`",
27512
+ "description": "### Overview\nThe `ui5-time-picker` component provides an input field with assigned clocks which are opened on user action.\nThe `ui5-time-picker` allows users to select a localized time using touch, mouse, or keyboard input.\nIt consists of two parts: the time input field and the clocks.\n\n### Usage\nThe user can enter a time by:\n\n- Using the clocks that are displayed in a popup\n- Typing it in directly in the input field\n\nWhen the user makes an entry and chooses the enter key, the clocks show the corresponding time (hours, minutes and seconds separately).\nWhen the user directly triggers the clocks display, the actual time is displayed.\nFor the `ui5-time-picker`\n\n### Formatting\n\nIf a time is entered by typing it into\nthe input field, it must fit to the used time format.\n\nSupported format options are pattern-based on Unicode LDML Date Format notation.\nFor more information, see [UTS #35: Unicode Locale Data Markup Language](https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).\n\nFor example, if the valueFormat is \"HH:mm:ss\", the displayFormat is \"hh:mm: ss a\", and the used locale is English, a valid value string is \"11:42:35\", which leads to an output of \"11:42:35 AM\".\nIf no placeholder is set to the TimePicker, the used displayFormat is displayed as a placeholder. If another placeholder is needed, it must be set.\n\n### Keyboard handling\n[F4], [Alt]+[Up], [Alt]+[Down] Open/Close picker dialog and move focus to it.\n\nWhen closed:\n\n- [Page Up] - Increments hours by 1. If 12 am is reached, increment hours to 1 pm and vice versa.\n- [Page Down] - Decrements the corresponding field by 1. If 1 pm is reached, decrement hours to 12 am and vice versa.\n- [Shift]+[Page Up] - Increments minutes by 1.\n- [Shift]+[Page Down] - Decrements minutes by 1.\n- [Shift]+[Ctrl]+[Page Up] - Increments seconds by 1.\n- [Shift]+[Ctrl]+[Page Down] - Decrements seconds by 1.\n-\n\nWhen opened:\n\n- [Page Up] - Increments hours by 1. If 12 am is reached, increment hours to 1 pm and vice versa.\n- [Page Down] - Decrements the corresponding field by 1. If 1 pm is reached, decrement hours to 12 am and vice versa.\n- [Shift]+[Page Up] - Increments minutes by 1.\n- [Shift]+[Page Down] - Decrements minutes by 1.\n- [Shift]+[Ctrl]+[Page Up] - Increments seconds by 1.\n- [Shift]+[Ctrl]+[Page Down] - Decrements seconds by 1.\n- [A] or [P] - Selects AM or PM respectively.\n- [0]-[9] - Allows direct time selecting (hours/minutes/seconds).\n- [:] - Allows switching between hours/minutes/seconds clocks. If the last clock is displayed and [:] is pressed, the first clock is beind displayed.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents/dist/TimePicker.js\";`",
27493
27513
  "name": "TimePicker",
27494
27514
  "cssParts": [
27495
27515
  {
@@ -27574,6 +27594,17 @@
27574
27594
  "description": "Defines the disabled state of the comonent.",
27575
27595
  "privacy": "public"
27576
27596
  },
27597
+ {
27598
+ "kind": "field",
27599
+ "name": "displayFormat",
27600
+ "type": {
27601
+ "text": "string | undefined"
27602
+ },
27603
+ "description": "Determines the format, displayed in the input field.",
27604
+ "default": "undefined",
27605
+ "privacy": "public",
27606
+ "_ui5since": "2.20.0"
27607
+ },
27577
27608
  {
27578
27609
  "kind": "field",
27579
27610
  "name": "formatPattern",
@@ -27582,6 +27613,7 @@
27582
27613
  },
27583
27614
  "description": "Determines the format, displayed in the input field.\n\nExample:\nHH:mm:ss -> 11:42:35\nhh:mm:ss a -> 2:23:15 PM\nmm:ss -> 12:04 (only minutes and seconds)",
27584
27615
  "default": "undefined",
27616
+ "deprecated": "Use displayFormat and valueFormat instead",
27585
27617
  "privacy": "public"
27586
27618
  },
27587
27619
  {
@@ -27627,6 +27659,27 @@
27627
27659
  "description": "Checks if a value is valid against the current `formatPattern` value.\n\n**Note:** an empty string is considered as valid value.",
27628
27660
  "privacy": "public"
27629
27661
  },
27662
+ {
27663
+ "kind": "method",
27664
+ "name": "isValidValue",
27665
+ "return": {
27666
+ "type": {
27667
+ "text": "boolean"
27668
+ }
27669
+ },
27670
+ "parameters": [
27671
+ {
27672
+ "name": "value",
27673
+ "type": {
27674
+ "text": "string | undefined"
27675
+ },
27676
+ "description": "The value to be tested against the value format",
27677
+ "_ui5privacy": "public"
27678
+ }
27679
+ ],
27680
+ "description": "Checks if a value is valid against the current `valueFormat` value.\n\n**Note:** an empty string is considered as valid value.",
27681
+ "privacy": "public"
27682
+ },
27630
27683
  {
27631
27684
  "kind": "field",
27632
27685
  "name": "name",
@@ -27692,6 +27745,17 @@
27692
27745
  "_ui5formProperty": true,
27693
27746
  "_ui5formEvents": "change,input"
27694
27747
  },
27748
+ {
27749
+ "kind": "field",
27750
+ "name": "valueFormat",
27751
+ "type": {
27752
+ "text": "string | undefined"
27753
+ },
27754
+ "description": "Determines the format, used for the value attribute.",
27755
+ "default": "undefined",
27756
+ "privacy": "public",
27757
+ "_ui5since": "2.20.0"
27758
+ },
27695
27759
  {
27696
27760
  "kind": "field",
27697
27761
  "name": "valueState",
@@ -27863,6 +27927,15 @@
27863
27927
  "text": "boolean"
27864
27928
  }
27865
27929
  },
27930
+ {
27931
+ "description": "Determines the format, displayed in the input field.",
27932
+ "name": "display-format",
27933
+ "default": "undefined",
27934
+ "fieldName": "displayFormat",
27935
+ "type": {
27936
+ "text": "string | undefined"
27937
+ }
27938
+ },
27866
27939
  {
27867
27940
  "description": "Determines the format, displayed in the input field.\n\nExample:\nHH:mm:ss -> 11:42:35\nhh:mm:ss a -> 2:23:15 PM\nmm:ss -> 12:04 (only minutes and seconds)",
27868
27941
  "name": "format-pattern",
@@ -27870,7 +27943,8 @@
27870
27943
  "fieldName": "formatPattern",
27871
27944
  "type": {
27872
27945
  "text": "string | undefined"
27873
- }
27946
+ },
27947
+ "deprecated": "Use displayFormat and valueFormat instead"
27874
27948
  },
27875
27949
  {
27876
27950
  "description": "Determines the name by which the component will be identified upon submission in an HTML form.\n\n**Note:** This property is only applicable within the context of an HTML Form element.",
@@ -27926,6 +28000,15 @@
27926
28000
  "text": "string"
27927
28001
  }
27928
28002
  },
28003
+ {
28004
+ "description": "Determines the format, used for the value attribute.",
28005
+ "name": "value-format",
28006
+ "default": "undefined",
28007
+ "fieldName": "valueFormat",
28008
+ "type": {
28009
+ "text": "string | undefined"
28010
+ }
28011
+ },
27929
28012
  {
27930
28013
  "description": "Defines the value state of the component.",
27931
28014
  "name": "value-state",
@@ -7840,11 +7840,11 @@
7840
7840
  },
7841
7841
  {
7842
7842
  "name": "footer",
7843
- "description": "Defines the footer HTML Element.\n\n**Note:** When a `ui5-bar` is used in the footer, you should remove the default dialog's paddings."
7843
+ "description": "Defines the footer HTML Element."
7844
7844
  },
7845
7845
  {
7846
7846
  "name": "header",
7847
- "description": "Defines the header HTML Element.\n\n**Note:** When a `ui5-bar` is used in the header, you should remove the default dialog's paddings.\n\n**Note:** If `header` slot is provided, the labelling of the dialog is a responsibility of the application developer.\n`accessibleName` should be used."
7847
+ "description": "Defines the header HTML Element.\n\n**Note:** If `header` slot is provided, the labelling of the dialog is a responsibility of the application developer.\n`accessibleName` should be used."
7848
7848
  }
7849
7849
  ],
7850
7850
  "members": [
@@ -9477,7 +9477,7 @@
9477
9477
  "declarations": [
9478
9478
  {
9479
9479
  "kind": "class",
9480
- "description": "### Overview\n\nThe `ui5-icon` component represents an SVG icon.\nThere are two main scenarios how the `ui5-icon` component is used:\nas a purely decorative element,\nor as an interactive element that can be focused and clicked.\n\n### Usage\n\n1. **Get familiar with the icons collections.**\n\nBefore displaying an icon, you need to explore the icons collections to find and import the desired icon.\n\nCurrently there are 3 icons collection, available as 3 npm packages:\n\n- [@ui5/webcomponents-icons](https://www.npmjs.com/package/@ui5/webcomponents-icons) represents the \"SAP-icons\" collection and includes the following\n[icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons).\n- [@ui5/webcomponents-icons-tnt](https://www.npmjs.com/package/@ui5/webcomponents-icons-tnt) represents the \"tnt\" collection and includes the following\n[icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT).\n- [@ui5/webcomponents-icons-business-suite](https://www.npmjs.com/package/@ui5/webcomponents-icons-business-suite) represents the \"business-suite\" collection and includes the following\n[icons](https://ui5.sap.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/BusinessSuiteInAppSymbols).\n\n2. **After exploring the icons collections, add one or more of the packages as dependencies to your project.**\n\n`npm i @ui5/webcomponents-icons`\n`npm i @ui5/webcomponents-icons-tnt`\n`npm i @ui5/webcomponents-icons-business-suite`\n\n3. **Then, import the desired icon**.\n\n`import \"@ui5/\\{package_name\\}/dist/\\{icon_name\\}.js\";`\n\n**For Example**:\n\nFor the standard \"SAP-icons\" icon collection, import an icon from the `@ui5/webcomponents-icons` package:\n\n`import \"@ui5/webcomponents-icons/dist/employee.js\";`\n\nFor the \"tnt\" (SAP Fiori Tools) icon collection, import an icon from the `@ui5/webcomponents-icons-tnt` package:\n\n`import \"@ui5/webcomponents-icons-tnt/dist/antenna.js\";`\n\nFor the \"business-suite\" (SAP Business Suite) icon collection, import an icon from the `@ui5/webcomponents-icons-business-suite` package:\n\n`import \"@ui5/webcomponents-icons-business-suite/dist/ab-testing.js\";`\n\n4. **Display the icon using the `ui5-icon` web component.**\nSet the icon collection (\"SAP-icons\", \"tnt\" or \"business-suite\" - \"SAP-icons\" is the default icon collection and can be skipped)\nand the icon name to the `name` property.\n\n`<ui5-icon name=\"employee\"></ui5-icon>`\n`<ui5-icon name=\"tnt/antenna\"></ui5-icon>`\n`<ui5-icon name=\"business-suite/ab-testing\"></ui5-icon>`\n\n### Keyboard Handling\n\n- [Space] / [Enter] or [Return] - Fires the `click` event if the `mode` property is set to `Interactive`.\n- [Shift] - If [Space] / [Enter] or [Return] is pressed, pressing [Shift] releases the ui5-icon without triggering the click event.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents/dist/Icon.js\";`",
9480
+ "description": "### Overview\n\nThe `ui5-icon` component represents an SVG icon.\nThere are two main scenarios how the `ui5-icon` component is used:\nas a purely decorative element,\nor as an interactive element that can be focused and clicked.\n\n### Usage\n\n1. **Get familiar with the icons collections.**\n\nBefore displaying an icon, you need to explore the icons collections to find and import the desired icon.\n\nCurrently there are 3 icons collection, available as 3 npm packages:\n\n- [@ui5/webcomponents-icons](https://www.npmjs.com/package/@ui5/webcomponents-icons) represents the \"SAP-icons\" collection and includes the following\n[icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons).\n- [@ui5/webcomponents-icons-tnt](https://www.npmjs.com/package/@ui5/webcomponents-icons-tnt) represents the \"tnt\" collection and includes the following\n[icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT).\n- [@ui5/webcomponents-icons-business-suite](https://www.npmjs.com/package/@ui5/webcomponents-icons-business-suite) represents the \"business-suite\" collection and includes the following\n[icons](https://ui5.sap.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/BusinessSuiteInAppSymbols).\n\n2. **After exploring the icons collections, add one or more of the packages as dependencies to your project.**\n\n`npm i @ui5/webcomponents-icons`\n`npm i @ui5/webcomponents-icons-tnt`\n`npm i @ui5/webcomponents-icons-business-suite`\n\n3. **Then, import the desired icon**.\n\n`import \"@ui5/\\{package_name\\}/dist/\\{icon_name\\}.js\";`\n\n**For Example**:\n\nFor the standard \"SAP-icons\" icon collection, import an icon from the `@ui5/webcomponents-icons` package:\n\n`import \"@ui5/webcomponents-icons/dist/employee.js\";`\n\nFor the \"tnt\" (SAP Fiori Tools) icon collection, import an icon from the `@ui5/webcomponents-icons-tnt` package:\n\n`import \"@ui5/webcomponents-icons-tnt/dist/antenna.js\";`\n\nFor the \"business-suite\" (SAP Business Suite) icon collection, import an icon from the `@ui5/webcomponents-icons-business-suite` package:\n\n`import \"@ui5/webcomponents-icons-business-suite/dist/ab-testing.js\";`\n\n4. **Display the icon using the `ui5-icon` web component.**\nSet the icon collection (\"SAP-icons\", \"tnt\" or \"business-suite\" - \"SAP-icons\" is the default icon collection and can be skipped)\nand the icon name to the `name` property.\n\n`<ui5-icon name=\"employee\"></ui5-icon>`\n`<ui5-icon name=\"tnt/antenna\"></ui5-icon>`\n`<ui5-icon name=\"business-suite/ab-testing\"></ui5-icon>`\n\n### Keyboard Handling\n\n- [Space] / [Enter] or [Return] - Fires the `click` event if the `mode` property is set to `Interactive`.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents/dist/Icon.js\";`",
9481
9481
  "name": "Icon",
9482
9482
  "cssParts": [
9483
9483
  {
@@ -9557,7 +9557,7 @@
9557
9557
  "type": {
9558
9558
  "text": "CustomEvent"
9559
9559
  },
9560
- "description": "Fired on mouseup, `SPACE` and `ENTER`.\n- on mouse click, the icon fires native `click` event\n- on `SPACE` and `ENTER`, the icon fires custom `click` event"
9560
+ "description": "Fired when the component is activated by mouse/touch, keyboard (Enter or Space),\nor screen reader virtual cursor activation.\n\n**Note:** The event will not be fired if the `mode` property is set to `Decorative` or `Image`."
9561
9561
  }
9562
9562
  ],
9563
9563
  "attributes": [
@@ -20326,7 +20326,7 @@
20326
20326
  "text": "boolean"
20327
20327
  },
20328
20328
  "default": "false",
20329
- "description": "Defines if the component is checked.\n\n**Note:** The property can be changed with user interaction,\neither by cliking the component, or by pressing the `Enter` or `Space` key.",
20329
+ "description": "Defines if the component is checked.\n\n**Note:** The property can be changed with user interaction,\neither by clicking the component, or by pressing the `Enter` or `Space` key.",
20330
20330
  "privacy": "public"
20331
20331
  },
20332
20332
  {
@@ -20366,6 +20366,16 @@
20366
20366
  "default": "undefined",
20367
20367
  "privacy": "public"
20368
20368
  },
20369
+ {
20370
+ "kind": "field",
20371
+ "name": "readonly",
20372
+ "type": {
20373
+ "text": "boolean"
20374
+ },
20375
+ "default": "false",
20376
+ "description": "Defines whether the component is in readonly state.\n\n**Note:** A readonly switch cannot be toggled by user interaction,\nbut can still be focused and its value read programmatically.",
20377
+ "privacy": "public"
20378
+ },
20369
20379
  {
20370
20380
  "kind": "field",
20371
20381
  "name": "required",
@@ -20446,7 +20456,7 @@
20446
20456
  }
20447
20457
  },
20448
20458
  {
20449
- "description": "Defines if the component is checked.\n\n**Note:** The property can be changed with user interaction,\neither by cliking the component, or by pressing the `Enter` or `Space` key.",
20459
+ "description": "Defines if the component is checked.\n\n**Note:** The property can be changed with user interaction,\neither by clicking the component, or by pressing the `Enter` or `Space` key.",
20450
20460
  "name": "checked",
20451
20461
  "default": "false",
20452
20462
  "fieldName": "checked",
@@ -20481,6 +20491,15 @@
20481
20491
  "text": "string | undefined"
20482
20492
  }
20483
20493
  },
20494
+ {
20495
+ "description": "Defines whether the component is in readonly state.\n\n**Note:** A readonly switch cannot be toggled by user interaction,\nbut can still be focused and its value read programmatically.",
20496
+ "name": "readonly",
20497
+ "default": "false",
20498
+ "fieldName": "readonly",
20499
+ "type": {
20500
+ "text": "boolean"
20501
+ }
20502
+ },
20484
20503
  {
20485
20504
  "description": "Defines whether the component is required.",
20486
20505
  "name": "required",
@@ -23833,7 +23852,7 @@
23833
23852
  "declarations": [
23834
23853
  {
23835
23854
  "kind": "class",
23836
- "description": "### Overview\nThe `ui5-time-picker` component provides an input field with assigned clocks which are opened on user action.\nThe `ui5-time-picker` allows users to select a localized time using touch, mouse, or keyboard input.\nIt consists of two parts: the time input field and the clocks.\n\n### Usage\nThe user can enter a time by:\n\n- Using the clocks that are displayed in a popup\n- Typing it in directly in the input field\n\nWhen the user makes an entry and chooses the enter key, the clocks show the corresponding time (hours, minutes and seconds separately).\nWhen the user directly triggers the clocks display, the actual time is displayed.\nFor the `ui5-time-picker`\n\n### Formatting\n\nIf a time is entered by typing it into\nthe input field, it must fit to the used time format.\n\nSupported format options are pattern-based on Unicode LDML Date Format notation.\nFor more information, see [UTS #35: Unicode Locale Data Markup Language](https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).\n\nFor example, if the `format-pattern` is \"HH:mm:ss\",\na valid value string is \"11:42:35\" and the same is displayed in the input.\n\n### Keyboard handling\n[F4], [Alt]+[Up], [Alt]+[Down] Open/Close picker dialog and move focus to it.\n\nWhen closed:\n\n- [Page Up] - Increments hours by 1. If 12 am is reached, increment hours to 1 pm and vice versa.\n- [Page Down] - Decrements the corresponding field by 1. If 1 pm is reached, decrement hours to 12 am and vice versa.\n- [Shift]+[Page Up] - Increments minutes by 1.\n- [Shift]+[Page Down] - Decrements minutes by 1.\n- [Shift]+[Ctrl]+[Page Up] - Increments seconds by 1.\n- [Shift]+[Ctrl]+[Page Down] - Decrements seconds by 1.\n-\n\nWhen opened:\n\n- [Page Up] - Increments hours by 1. If 12 am is reached, increment hours to 1 pm and vice versa.\n- [Page Down] - Decrements the corresponding field by 1. If 1 pm is reached, decrement hours to 12 am and vice versa.\n- [Shift]+[Page Up] - Increments minutes by 1.\n- [Shift]+[Page Down] - Decrements minutes by 1.\n- [Shift]+[Ctrl]+[Page Up] - Increments seconds by 1.\n- [Shift]+[Ctrl]+[Page Down] - Decrements seconds by 1.\n- [A] or [P] - Selects AM or PM respectively.\n- [0]-[9] - Allows direct time selecting (hours/minutes/seconds).\n- [:] - Allows switching between hours/minutes/seconds clocks. If the last clock is displayed and [:] is pressed, the first clock is beind displayed.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents/dist/TimePicker.js\";`",
23855
+ "description": "### Overview\nThe `ui5-time-picker` component provides an input field with assigned clocks which are opened on user action.\nThe `ui5-time-picker` allows users to select a localized time using touch, mouse, or keyboard input.\nIt consists of two parts: the time input field and the clocks.\n\n### Usage\nThe user can enter a time by:\n\n- Using the clocks that are displayed in a popup\n- Typing it in directly in the input field\n\nWhen the user makes an entry and chooses the enter key, the clocks show the corresponding time (hours, minutes and seconds separately).\nWhen the user directly triggers the clocks display, the actual time is displayed.\nFor the `ui5-time-picker`\n\n### Formatting\n\nIf a time is entered by typing it into\nthe input field, it must fit to the used time format.\n\nSupported format options are pattern-based on Unicode LDML Date Format notation.\nFor more information, see [UTS #35: Unicode Locale Data Markup Language](https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).\n\nFor example, if the valueFormat is \"HH:mm:ss\", the displayFormat is \"hh:mm: ss a\", and the used locale is English, a valid value string is \"11:42:35\", which leads to an output of \"11:42:35 AM\".\nIf no placeholder is set to the TimePicker, the used displayFormat is displayed as a placeholder. If another placeholder is needed, it must be set.\n\n### Keyboard handling\n[F4], [Alt]+[Up], [Alt]+[Down] Open/Close picker dialog and move focus to it.\n\nWhen closed:\n\n- [Page Up] - Increments hours by 1. If 12 am is reached, increment hours to 1 pm and vice versa.\n- [Page Down] - Decrements the corresponding field by 1. If 1 pm is reached, decrement hours to 12 am and vice versa.\n- [Shift]+[Page Up] - Increments minutes by 1.\n- [Shift]+[Page Down] - Decrements minutes by 1.\n- [Shift]+[Ctrl]+[Page Up] - Increments seconds by 1.\n- [Shift]+[Ctrl]+[Page Down] - Decrements seconds by 1.\n-\n\nWhen opened:\n\n- [Page Up] - Increments hours by 1. If 12 am is reached, increment hours to 1 pm and vice versa.\n- [Page Down] - Decrements the corresponding field by 1. If 1 pm is reached, decrement hours to 12 am and vice versa.\n- [Shift]+[Page Up] - Increments minutes by 1.\n- [Shift]+[Page Down] - Decrements minutes by 1.\n- [Shift]+[Ctrl]+[Page Up] - Increments seconds by 1.\n- [Shift]+[Ctrl]+[Page Down] - Decrements seconds by 1.\n- [A] or [P] - Selects AM or PM respectively.\n- [0]-[9] - Allows direct time selecting (hours/minutes/seconds).\n- [:] - Allows switching between hours/minutes/seconds clocks. If the last clock is displayed and [:] is pressed, the first clock is beind displayed.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents/dist/TimePicker.js\";`",
23837
23856
  "name": "TimePicker",
23838
23857
  "cssParts": [
23839
23858
  {
@@ -23909,6 +23928,16 @@
23909
23928
  "description": "Defines the disabled state of the comonent.",
23910
23929
  "privacy": "public"
23911
23930
  },
23931
+ {
23932
+ "kind": "field",
23933
+ "name": "displayFormat",
23934
+ "type": {
23935
+ "text": "string | undefined"
23936
+ },
23937
+ "description": "Determines the format, displayed in the input field.",
23938
+ "default": "undefined",
23939
+ "privacy": "public"
23940
+ },
23912
23941
  {
23913
23942
  "kind": "field",
23914
23943
  "name": "formatPattern",
@@ -23917,6 +23946,7 @@
23917
23946
  },
23918
23947
  "description": "Determines the format, displayed in the input field.\n\nExample:\nHH:mm:ss -> 11:42:35\nhh:mm:ss a -> 2:23:15 PM\nmm:ss -> 12:04 (only minutes and seconds)",
23919
23948
  "default": "undefined",
23949
+ "deprecated": "Use displayFormat and valueFormat instead",
23920
23950
  "privacy": "public"
23921
23951
  },
23922
23952
  {
@@ -23960,6 +23990,26 @@
23960
23990
  "description": "Checks if a value is valid against the current `formatPattern` value.\n\n**Note:** an empty string is considered as valid value.",
23961
23991
  "privacy": "public"
23962
23992
  },
23993
+ {
23994
+ "kind": "method",
23995
+ "name": "isValidValue",
23996
+ "return": {
23997
+ "type": {
23998
+ "text": "boolean"
23999
+ }
24000
+ },
24001
+ "parameters": [
24002
+ {
24003
+ "name": "value",
24004
+ "type": {
24005
+ "text": "string | undefined"
24006
+ },
24007
+ "description": "The value to be tested against the value format"
24008
+ }
24009
+ ],
24010
+ "description": "Checks if a value is valid against the current `valueFormat` value.\n\n**Note:** an empty string is considered as valid value.",
24011
+ "privacy": "public"
24012
+ },
23963
24013
  {
23964
24014
  "kind": "field",
23965
24015
  "name": "name",
@@ -24020,6 +24070,16 @@
24020
24070
  "description": "Defines a formatted time value.",
24021
24071
  "privacy": "public"
24022
24072
  },
24073
+ {
24074
+ "kind": "field",
24075
+ "name": "valueFormat",
24076
+ "type": {
24077
+ "text": "string | undefined"
24078
+ },
24079
+ "description": "Determines the format, used for the value attribute.",
24080
+ "default": "undefined",
24081
+ "privacy": "public"
24082
+ },
24023
24083
  {
24024
24084
  "kind": "field",
24025
24085
  "name": "valueState",
@@ -24137,6 +24197,15 @@
24137
24197
  "text": "boolean"
24138
24198
  }
24139
24199
  },
24200
+ {
24201
+ "description": "Determines the format, displayed in the input field.",
24202
+ "name": "display-format",
24203
+ "default": "undefined",
24204
+ "fieldName": "displayFormat",
24205
+ "type": {
24206
+ "text": "string | undefined"
24207
+ }
24208
+ },
24140
24209
  {
24141
24210
  "description": "Determines the format, displayed in the input field.\n\nExample:\nHH:mm:ss -> 11:42:35\nhh:mm:ss a -> 2:23:15 PM\nmm:ss -> 12:04 (only minutes and seconds)",
24142
24211
  "name": "format-pattern",
@@ -24144,7 +24213,8 @@
24144
24213
  "fieldName": "formatPattern",
24145
24214
  "type": {
24146
24215
  "text": "string | undefined"
24147
- }
24216
+ },
24217
+ "deprecated": "Use displayFormat and valueFormat instead"
24148
24218
  },
24149
24219
  {
24150
24220
  "description": "Determines the name by which the component will be identified upon submission in an HTML form.\n\n**Note:** This property is only applicable within the context of an HTML Form element.",
@@ -24200,6 +24270,15 @@
24200
24270
  "text": "string"
24201
24271
  }
24202
24272
  },
24273
+ {
24274
+ "description": "Determines the format, used for the value attribute.",
24275
+ "name": "value-format",
24276
+ "default": "undefined",
24277
+ "fieldName": "valueFormat",
24278
+ "type": {
24279
+ "text": "string | undefined"
24280
+ }
24281
+ },
24203
24282
  {
24204
24283
  "description": "Defines the value state of the component.",
24205
24284
  "name": "value-state",
@@ -211,6 +211,7 @@ class Suggestions {
211
211
  items[previousSelectedIdx].focused = false;
212
212
  this.component.focused = true;
213
213
  this.component.hasSuggestionItemSelected = false;
214
+ this.component.value = this.component.typedInValue;
214
215
  this.selectedItemIndex -= 1;
215
216
  return;
216
217
  }
@@ -265,7 +266,7 @@ class Suggestions {
265
266
  _deselectItems() {
266
267
  const items = this._getItems();
267
268
  items.forEach(item => {
268
- if (item.hasAttribute("ui5-suggestion-item")) {
269
+ if (item.hasAttribute("ui5-suggestion-item") || item.hasAttribute("ui5-suggestion-item-custom")) {
269
270
  item.selected = false;
270
271
  }
271
272
  item.focused = false;
@@ -1 +1 @@
1
- {"version":3,"file":"InputSuggestions.js","sourceRoot":"","sources":["../../src/features/InputSuggestions.ts"],"names":[],"mappings":"AAEA,OAAO,yBAAyB,MAAM,gEAAgE,CAAC;AAIvG,OAAO,sBAAsB,CAAC;AAC9B,OAAO,2BAA2B,CAAC;AAGnC,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,MAAM,aAAa,CAAC;AAEhC,OAAO,EACN,kBAAkB,EAClB,sBAAsB,GACtB,MAAM,oCAAoC,CAAC;AAyB5C;;;;GAIG;AACH,MAAM,WAAW;IAchB,IAAI,QAAQ;QACX,OAAO,wBAAwB,CAAC;IACjC,CAAC;IAED,YAAY,SAA8B,EAAE,QAAgB,EAAE,SAAkB,EAAE,WAAoB;QACrG,sDAAsD;QACtD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAE3B,gCAAgC;QAChC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0DAA0D;QAC1D,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAE/B,gDAAgD;QAChD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAE3B,kEAAkE;QAClE,wCAAwC;QACxC,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC,CAAC;IAC7B,CAAC;IAED,IAAI,CAAC,CAAgB,EAAE,WAAmB;QACzC,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,IAAI,WAAW,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;QAC5F,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CA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YAC1B,OAAO,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,sBAAsB,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC7F,CAAC;QAED,MAAM,gBAAgB,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,kBAAkB,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;QAEtI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,IAAI,gBAAgB,EAAE,CAAC,IAAI,EAAE,CAAC;IACpE,CAAC;IAED,eAAe,CAAC,IAAY,EAAE,KAAa;QAC1C,OAAO,yBAAyB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,cAAc;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC;IAC5C,CAAC;IAED,kCAAkC;QACjC,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QACzB,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;IAC5B,CAAC;;AAlbM,uBAAW,GAAG,EAAE,CAAC;AAqbzB,KAAK,CAAC,gBAAgB,GAAG,WAAW,CAAC;AAErC,eAAe,WAAW,CAAC","sourcesContent":["import type UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport generateHighlightedMarkup from \"@ui5/webcomponents-base/dist/util/generateHighlightedMarkup.js\";\nimport type List from \"../List.js\";\nimport type { ListItemClickEventDetail, ListSelectionChangeEventDetail } from \"../List.js\";\nimport type ResponsivePopover from \"../ResponsivePopover.js\";\nimport \"../SuggestionItem.js\";\nimport \"../SuggestionItemGroup.js\";\nimport type SuggestionItem from \"../SuggestionItem.js\";\nimport type ListItemGroupHeader from \"../ListItemGroupHeader.js\";\nimport InputSuggestionsTemplate from \"./InputSuggestionsTemplate.js\";\nimport Input from \"../Input.js\";\n\nimport {\n\tLIST_ITEM_POSITION,\n\tLIST_ITEM_GROUP_HEADER,\n} from \"../generated/i18n/i18n-defaults.js\";\nimport type ListItemBase from \"../ListItemBase.js\";\nimport type SuggestionItemGroup from \"../SuggestionItemGroup.js\";\nimport type { IInputSuggestionItem, IInputSuggestionItemSelectable } from \"../Input.js\";\n\ninterface SuggestionComponent extends UI5Element {\n\tfocused: boolean;\n\thasSuggestionItemSelected: boolean;\n\tvalue: string;\n\ttypedInValue: string;\n\thasValueStateMessage: boolean;\n\tsuggestionItems: Array<IInputSuggestionItem>;\n\topen: boolean;\n\tonItemSelected: (pressedItem: IInputSuggestionItemSelectable, keyboardUsed: boolean) => void;\n\tonItemSelect: (item: IInputSuggestionItem) => void;\n}\n\ntype SuggestionsAccInfo = {\n\tisGroup: boolean;\n\tcurrentPos?: number;\n\tlistSize?: number;\n\titemText: string;\n\tadditionalText?: string;\n}\n\n/**\n * A class to manage the `Input` suggestion items.\n * @class\n * @private\n */\nclass Suggestions {\n\tcomponent: SuggestionComponent;\n\tslotName: string;\n\thandleFocus: boolean;\n\thighlight: boolean;\n\tselectedItemIndex: number;\n\taccInfo?: SuggestionsAccInfo;\n\t_scrollContainer?: HTMLElement;\n\t_handledPress?: boolean;\n\tattachedAfterOpened?: boolean;\n\tattachedAfterClose?: boolean;\n\tstatic i18nBundle: I18nBundle;\n\tstatic SCROLL_STEP = 60;\n\n\tget template() {\n\t\treturn InputSuggestionsTemplate;\n\t}\n\n\tconstructor(component: SuggestionComponent, slotName: string, highlight: boolean, handleFocus: boolean) {\n\t\t// The component, that the suggestion would plug into.\n\t\tthis.component = component;\n\n\t\t// Defines the items` slot name.\n\t\tthis.slotName = slotName;\n\n\t\t// Defines, if the focus will be moved via the arrow keys.\n\t\tthis.handleFocus = handleFocus;\n\n\t\t// Defines, if the suggestions should highlight.\n\t\tthis.highlight = highlight;\n\n\t\t// An integer value to store the currently selected item position,\n\t\t// that changes due to user interaction.\n\t\tthis.selectedItemIndex = -1;\n\t}\n\n\tonUp(e: KeyboardEvent, indexOfItem: number) {\n\t\te.preventDefault();\n\t\tconst index = !this.isOpened && this._hasValueState && indexOfItem === -1 ? 0 : indexOfItem;\n\t\tthis._handleItemNavigation(false /* forward */, index);\n\t\treturn true;\n\t}\n\n\tonDown(e: KeyboardEvent, indexOfItem: number) {\n\t\te.preventDefault();\n\t\tconst index = !this.isOpened && this._hasValueState && indexOfItem === -1 ? 0 : indexOfItem;\n\t\tthis._handleItemNavigation(true /* forward */, index);\n\t\treturn true;\n\t}\n\n\tonSpace(e: KeyboardEvent) {\n\t\tif (this._isItemOnTarget()) {\n\t\t\te.preventDefault();\n\t\t\tthis.onItemSelected(this._selectedItem, true /* keyboardUsed */);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tonEnter(e: KeyboardEvent) {\n\t\tif (this._isGroupItem) {\n\t\t\te.preventDefault();\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this._isItemOnTarget()) {\n\t\t\tthis.onItemSelected(this._selectedItem, true /* keyboardUsed */);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tonPageUp(e: KeyboardEvent) {\n\t\te.preventDefault();\n\n\t\tconst isItemIndexValid = this.selectedItemIndex - 10 > -1;\n\n\t\tthis._moveItemSelection(this.selectedItemIndex,\n\t\t\tisItemIndexValid ? this.selectedItemIndex -= 10 : this.selectedItemIndex = 0);\n\t\treturn true;\n\t}\n\n\tonPageDown(e: KeyboardEvent) {\n\t\te.preventDefault();\n\n\t\tconst items = this.visibleItems;\n\n\t\tif (!items) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst lastItemIndex = items.length - 1;\n\t\tconst isItemIndexValid = this.selectedItemIndex + 10 <= lastItemIndex;\n\n\t\tthis._moveItemSelection(this.selectedItemIndex,\n\t\t\tisItemIndexValid ? this.selectedItemIndex += 10 : this.selectedItemIndex = lastItemIndex);\n\t\treturn true;\n\t}\n\n\tonHome(e: KeyboardEvent) {\n\t\te.preventDefault();\n\n\t\tthis._moveItemSelection(this.selectedItemIndex, this.selectedItemIndex = 0);\n\t\treturn true;\n\t}\n\n\tonEnd(e: KeyboardEvent) {\n\t\te.preventDefault();\n\n\t\tconst lastItemIndex = this._getItems().length - 1;\n\n\t\tif (!lastItemIndex) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis._moveItemSelection(this.selectedItemIndex, this.selectedItemIndex = lastItemIndex);\n\t\treturn true;\n\t}\n\n\tonTab() {\n\t\tif (this._isItemOnTarget()) {\n\t\t\tthis.onItemSelected(this._selectedItem, true);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\ttoggle(bToggle: boolean, options: { preventFocusRestore: boolean }) {\n\t\tconst toggle = bToggle !== undefined ? bToggle : !this.isOpened();\n\n\t\tif (toggle) {\n\t\t\tthis._getComponent().open = true;\n\t\t} else {\n\t\t\tthis.close(options.preventFocusRestore);\n\t\t}\n\t}\n\n\tget _selectedItem() {\n\t\treturn this._getNonGroupItems().find(item => item.selected) as SuggestionItem | null;\n\t}\n\n\t_isScrollable() {\n\t\tconst sc = this._getScrollContainer();\n\t\treturn sc.offsetHeight < sc.scrollHeight;\n\t}\n\n\tclose(preventFocusRestore = false) {\n\t\tconst selectedItem = this._getItems() && this._getItems()[this.selectedItemIndex];\n\n\t\tthis._getComponent().open = false;\n\t\tconst picker = this._getPicker();\n\t\tpicker.preventFocusRestore = preventFocusRestore;\n\t\tpicker.open = false;\n\n\t\tif (selectedItem && selectedItem.focused) {\n\t\t\tselectedItem.focused = false;\n\t\t}\n\t}\n\n\tupdateSelectedItemPosition(pos: number) {\n\t\tthis.selectedItemIndex = pos;\n\t}\n\n\tonItemSelected(selectedItem: IInputSuggestionItemSelectable | null, keyboardUsed: boolean) {\n\t\tconst item = selectedItem;\n\t\tconst nonGroupItems = this._getNonGroupItems();\n\n\t\tif (!item) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.accInfo = {\n\t\t\tisGroup: item.hasAttribute(\"ui5-suggestion-item-group\"),\n\t\t\tcurrentPos: nonGroupItems.indexOf(item) + 1,\n\t\t\tlistSize: nonGroupItems.length,\n\t\t\titemText: item.text || \"\",\n\t\t\tadditionalText: item.additionalText,\n\t\t};\n\n\t\tthis._getComponent().onItemSelected(item, keyboardUsed);\n\t\tthis._getComponent().open = false;\n\t}\n\n\tonItemSelect(item: IInputSuggestionItem) {\n\t\tthis._getComponent().onItemSelect(item);\n\t}\n\n\t/* Private methods */\n\t// Note: Split into two separate handlers\n\tonItemPress(e: CustomEvent<ListItemClickEventDetail | ListSelectionChangeEventDetail>) {\n\t\tlet pressedItem: ListItemBase; // SuggestionListItem\n\t\tconst isPressEvent = e.type === \"ui5-item-click\";\n\n\t\t// Only use the press e if the item is already selected, in all other cases we are listening for 'ui5-selection-change' from the list\n\t\t// Also we have to check if the selection-change is fired by the list's 'item-click' event handling, to avoid double handling on our side\n\t\tif ((isPressEvent && !(e.detail as ListItemClickEventDetail).item.selected) || (this._handledPress && !isPressEvent)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isPressEvent && (e.detail as ListItemClickEventDetail).item.selected) {\n\t\t\tpressedItem = (e.detail as ListItemClickEventDetail).item;\n\t\t\tthis._handledPress = true;\n\t\t} else {\n\t\t\tpressedItem = (e.detail as ListSelectionChangeEventDetail).selectedItems[0];\n\t\t}\n\n\t\tthis.onItemSelected(pressedItem as SuggestionItem, false /* keyboardUsed */);\n\t}\n\n\t_onClose() {\n\t\tthis._handledPress = false;\n\t}\n\n\t_isItemOnTarget() {\n\t\treturn this.isOpened() && this.selectedItemIndex !== null && this.selectedItemIndex !== -1 && !this._isGroupItem;\n\t}\n\n\tget _isGroupItem() {\n\t\tconst items = this._getItems();\n\n\t\tif (!items || !items[this.selectedItemIndex]) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn items[this.selectedItemIndex].hasAttribute(\"ui5-suggestion-item-group\");\n\t}\n\n\tisOpened() {\n\t\treturn !!(this._getPicker()?.open);\n\t}\n\n\t_handleItemNavigation(forward: boolean, index: number) {\n\t\tthis.selectedItemIndex = index;\n\n\t\tif (!this._getItems().length) {\n\t\t\treturn;\n\t\t}\n\t\tif (forward) {\n\t\t\tthis._selectNextItem();\n\t\t} else {\n\t\t\tthis._selectPreviousItem();\n\t\t}\n\t}\n\n\t_selectNextItem() {\n\t\tconst itemsCount = this._getItems().length;\n\n\t\tconst previousSelectedIdx = this.selectedItemIndex;\n\n\t\tif (previousSelectedIdx !== -1 && previousSelectedIdx + 1 > itemsCount - 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._moveItemSelection(previousSelectedIdx, ++this.selectedItemIndex);\n\t}\n\n\t_selectPreviousItem() {\n\t\tconst items = this.visibleItems;\n\t\tconst previousSelectedIdx = this.selectedItemIndex;\n\n\t\tif (previousSelectedIdx === -1 || previousSelectedIdx === null) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (previousSelectedIdx - 1 < 0) {\n\t\t\tif (items[previousSelectedIdx].hasAttribute(\"ui5-suggestion-item\") || items[previousSelectedIdx].hasAttribute(\"ui5-suggestion-item-custom\")) {\n\t\t\t\t(items[previousSelectedIdx] as SuggestionItem).selected = false;\n\t\t\t}\n\n\t\t\titems[previousSelectedIdx].focused = false;\n\n\t\t\tthis.component.focused = true;\n\t\t\tthis.component.hasSuggestionItemSelected = false;\n\t\t\tthis.selectedItemIndex -= 1;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._moveItemSelection(previousSelectedIdx, --this.selectedItemIndex);\n\t}\n\n\tget visibleItems() {\n\t\treturn this._getItems().filter(item => !item.hidden);\n\t}\n\n\t_moveItemSelection(previousIdx: number, nextIdx: number) {\n\t\tconst items = this.visibleItems;\n\t\tconst currentItem = items[nextIdx];\n\t\tconst previousItem = items[previousIdx];\n\t\tconst nonGroupItems = this._getNonGroupItems();\n\t\tconst isGroupItem = currentItem?.hasAttribute(\"ui5-suggestion-item-group\");\n\n\t\tif (!currentItem) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.component.focused = false;\n\n\t\tconst selectedItem = this.visibleItems[this.selectedItemIndex];\n\n\t\tthis.accInfo = {\n\t\t\tisGroup: isGroupItem,\n\t\t\tcurrentPos: items.indexOf(currentItem) + 1,\n\t\t\titemText: (isGroupItem ? (selectedItem as SuggestionItemGroup).headerText : (selectedItem as IInputSuggestionItemSelectable).text) || \"\",\n\t\t};\n\n\t\tif (currentItem.hasAttribute(\"ui5-suggestion-item\") || currentItem.hasAttribute(\"ui5-suggestion-item-custom\")) {\n\t\t\tthis.accInfo.additionalText = (currentItem as IInputSuggestionItemSelectable).additionalText || \"\";\n\t\t\tthis.accInfo.currentPos = nonGroupItems.indexOf(currentItem as IInputSuggestionItemSelectable) + 1;\n\t\t\tthis.accInfo.listSize = nonGroupItems.length;\n\t\t}\n\n\t\tif (previousItem) {\n\t\t\tpreviousItem.focused = false;\n\t\t}\n\t\tif (previousItem?.hasAttribute(\"ui5-suggestion-item\") || previousItem?.hasAttribute(\"ui5-suggestion-item-custom\")) {\n\t\t\t(previousItem as IInputSuggestionItemSelectable).selected = false;\n\t\t}\n\n\t\tif (currentItem) {\n\t\t\tcurrentItem.focused = true;\n\n\t\t\tif (!isGroupItem) {\n\t\t\t\t(currentItem as IInputSuggestionItemSelectable).selected = true;\n\t\t\t}\n\n\t\t\tif (this.handleFocus) {\n\t\t\t\tcurrentItem.focus();\n\t\t\t}\n\t\t}\n\n\t\tthis.component.hasSuggestionItemSelected = true;\n\t\tthis.onItemSelect(currentItem);\n\n\t\tif (!this._isItemIntoView(currentItem)) {\n\t\t\tconst itemRef = this._isGroupItem ? (currentItem.shadowRoot!.querySelector(\"[ui5-li-group-header]\") as ListItemGroupHeader) : currentItem;\n\t\t\tthis._scrollItemIntoView(itemRef);\n\t\t}\n\t}\n\n\t_deselectItems() {\n\t\tconst items = this._getItems();\n\t\titems.forEach(item => {\n\t\t\tif (item.hasAttribute(\"ui5-suggestion-item\")) {\n\t\t\t\t(item as SuggestionItem).selected = false;\n\t\t\t}\n\n\t\t\titem.focused = false;\n\t\t});\n\t}\n\n\t_clearItemFocus() {\n\t\tconst focusedItem = this._getItems().find(item => item.focused);\n\n\t\tif (focusedItem) {\n\t\t\tfocusedItem.focused = false;\n\t\t}\n\t}\n\n\t_isItemIntoView(item: IInputSuggestionItem) {\n\t\tconst rectItem = item.getDomRef()!.getBoundingClientRect();\n\t\tconst rectInput = this._getComponent().getDomRef()!.getBoundingClientRect();\n\t\tconst windowHeight = (window.innerHeight || document.documentElement.clientHeight);\n\t\tlet headerHeight = 0;\n\n\t\tif (this._hasValueState) {\n\t\t\tconst valueStateHeader = this._getPicker().querySelector(\"[slot=header]\")!;\n\t\t\theaderHeight = valueStateHeader.getBoundingClientRect().height;\n\t\t}\n\n\t\treturn (rectItem.top + Suggestions.SCROLL_STEP <= windowHeight) && (rectItem.top >= rectInput.top + headerHeight);\n\t}\n\n\t_scrollItemIntoView(item: IInputSuggestionItem) {\n\t\titem.scrollIntoView({\n\t\t\tbehavior: \"auto\",\n\t\t\tblock: \"nearest\",\n\t\t\tinline: \"nearest\",\n\t\t});\n\t}\n\n\t_getScrollContainer() {\n\t\tif (!this._scrollContainer) {\n\t\t\tthis._scrollContainer = this._getPicker().shadowRoot!.querySelector(\".ui5-popup-content\")!;\n\t\t}\n\n\t\treturn this._scrollContainer;\n\t}\n\n\t/**\n\t * Returns the items in 1D array.\n\t *\n\t */\n\t_getItems(): Array<IInputSuggestionItem> {\n\t\tconst suggestionComponent = this._getComponent();\n\n\t\treturn suggestionComponent.getSlottedNodes<IInputSuggestionItem>(\"suggestionItems\").flatMap(item => {\n\t\t\treturn item.hasAttribute(\"ui5-suggestion-item-group\") ? [item, ...item.items!] : [item];\n\t\t});\n\t}\n\n\t_getNonGroupItems(): Array<IInputSuggestionItemSelectable> {\n\t\treturn this._getItems().filter(item => !item.hasAttribute(\"ui5-suggestion-item-group\")) as Array<IInputSuggestionItemSelectable>;\n\t}\n\n\t_getComponent(): SuggestionComponent {\n\t\treturn this.component;\n\t}\n\n\t_getList() {\n\t\treturn this._getPicker().querySelector<List>(\"[ui5-list]\")!;\n\t}\n\n\t_getListWidth() {\n\t\treturn this._getList()?.offsetWidth;\n\t}\n\n\t_getPicker() {\n\t\treturn this._getComponent().shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tget itemSelectionAnnounce() {\n\t\tif (!this.accInfo) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tif (this.accInfo.isGroup) {\n\t\t\treturn `${Suggestions.i18nBundle.getText(LIST_ITEM_GROUP_HEADER)} ${this.accInfo.itemText}`;\n\t\t}\n\n\t\tconst itemPositionText = Suggestions.i18nBundle.getText(LIST_ITEM_POSITION, this.accInfo.currentPos || 0, this.accInfo.listSize || 0);\n\n\t\treturn `${this.accInfo.additionalText} ${itemPositionText}`.trim();\n\t}\n\n\thightlightInput(text: string, input: string) {\n\t\treturn generateHighlightedMarkup(text, input);\n\t}\n\n\tget _hasValueState() {\n\t\treturn this.component.hasValueStateMessage;\n\t}\n\n\t_clearSelectedSuggestionAndaccInfo() {\n\t\tthis.accInfo = undefined;\n\t\tthis.selectedItemIndex = 0;\n\t}\n}\n\nInput.SuggestionsClass = Suggestions;\n\nexport default Suggestions;\n\nexport type {\n\tSuggestionComponent,\n};\n"]}
1
+ {"version":3,"file":"InputSuggestions.js","sourceRoot":"","sources":["../../src/features/InputSuggestions.ts"],"names":[],"mappings":"AAEA,OAAO,yBAAyB,MAAM,gEAAgE,CAAC;AAIvG,OAAO,sBAAsB,CAAC;AAC9B,OAAO,2BAA2B,CAAC;AAGnC,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,MAAM,aAAa,CAAC;AAEhC,OAAO,EACN,kBAAkB,EAClB,sBAAsB,GACtB,MAAM,oCAAoC,CAAC;AAyB5C;;;;GAIG;AACH,MAAM,WAAW;IAchB,IAAI,QAAQ;QACX,OAAO,wBA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IACpE,CAAC;IAED,eAAe,CAAC,IAAY,EAAE,KAAa;QAC1C,OAAO,yBAAyB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,cAAc;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC;IAC5C,CAAC;IAED,kCAAkC;QACjC,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QACzB,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;IAC5B,CAAC;;AAnbM,uBAAW,GAAG,EAAE,CAAC;AAsbzB,KAAK,CAAC,gBAAgB,GAAG,WAAW,CAAC;AAErC,eAAe,WAAW,CAAC","sourcesContent":["import type UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport generateHighlightedMarkup from \"@ui5/webcomponents-base/dist/util/generateHighlightedMarkup.js\";\nimport type List from \"../List.js\";\nimport type { ListItemClickEventDetail, ListSelectionChangeEventDetail } from \"../List.js\";\nimport type ResponsivePopover from \"../ResponsivePopover.js\";\nimport \"../SuggestionItem.js\";\nimport \"../SuggestionItemGroup.js\";\nimport type SuggestionItem from \"../SuggestionItem.js\";\nimport type ListItemGroupHeader from \"../ListItemGroupHeader.js\";\nimport InputSuggestionsTemplate from \"./InputSuggestionsTemplate.js\";\nimport Input from \"../Input.js\";\n\nimport {\n\tLIST_ITEM_POSITION,\n\tLIST_ITEM_GROUP_HEADER,\n} from \"../generated/i18n/i18n-defaults.js\";\nimport type ListItemBase from \"../ListItemBase.js\";\nimport type SuggestionItemGroup from \"../SuggestionItemGroup.js\";\nimport type { IInputSuggestionItem, IInputSuggestionItemSelectable } from \"../Input.js\";\n\ninterface SuggestionComponent extends UI5Element {\n\tfocused: boolean;\n\thasSuggestionItemSelected: boolean;\n\tvalue: string;\n\ttypedInValue: string;\n\thasValueStateMessage: boolean;\n\tsuggestionItems: Array<IInputSuggestionItem>;\n\topen: boolean;\n\tonItemSelected: (pressedItem: IInputSuggestionItemSelectable, keyboardUsed: boolean) => void;\n\tonItemSelect: (item: IInputSuggestionItem) => void;\n}\n\ntype SuggestionsAccInfo = {\n\tisGroup: boolean;\n\tcurrentPos?: number;\n\tlistSize?: number;\n\titemText: string;\n\tadditionalText?: string;\n}\n\n/**\n * A class to manage the `Input` suggestion items.\n * @class\n * @private\n */\nclass Suggestions {\n\tcomponent: SuggestionComponent;\n\tslotName: string;\n\thandleFocus: boolean;\n\thighlight: boolean;\n\tselectedItemIndex: number;\n\taccInfo?: SuggestionsAccInfo;\n\t_scrollContainer?: HTMLElement;\n\t_handledPress?: boolean;\n\tattachedAfterOpened?: boolean;\n\tattachedAfterClose?: boolean;\n\tstatic i18nBundle: I18nBundle;\n\tstatic SCROLL_STEP = 60;\n\n\tget template() {\n\t\treturn InputSuggestionsTemplate;\n\t}\n\n\tconstructor(component: SuggestionComponent, slotName: string, highlight: boolean, handleFocus: boolean) {\n\t\t// The component, that the suggestion would plug into.\n\t\tthis.component = component;\n\n\t\t// Defines the items` slot name.\n\t\tthis.slotName = slotName;\n\n\t\t// Defines, if the focus will be moved via the arrow keys.\n\t\tthis.handleFocus = handleFocus;\n\n\t\t// Defines, if the suggestions should highlight.\n\t\tthis.highlight = highlight;\n\n\t\t// An integer value to store the currently selected item position,\n\t\t// that changes due to user interaction.\n\t\tthis.selectedItemIndex = -1;\n\t}\n\n\tonUp(e: KeyboardEvent, indexOfItem: number) {\n\t\te.preventDefault();\n\t\tconst index = !this.isOpened && this._hasValueState && indexOfItem === -1 ? 0 : indexOfItem;\n\t\tthis._handleItemNavigation(false /* forward */, index);\n\t\treturn true;\n\t}\n\n\tonDown(e: KeyboardEvent, indexOfItem: number) {\n\t\te.preventDefault();\n\t\tconst index = !this.isOpened && this._hasValueState && indexOfItem === -1 ? 0 : indexOfItem;\n\t\tthis._handleItemNavigation(true /* forward */, index);\n\t\treturn true;\n\t}\n\n\tonSpace(e: KeyboardEvent) {\n\t\tif (this._isItemOnTarget()) {\n\t\t\te.preventDefault();\n\t\t\tthis.onItemSelected(this._selectedItem, true /* keyboardUsed */);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tonEnter(e: KeyboardEvent) {\n\t\tif (this._isGroupItem) {\n\t\t\te.preventDefault();\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this._isItemOnTarget()) {\n\t\t\tthis.onItemSelected(this._selectedItem, true /* keyboardUsed */);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tonPageUp(e: KeyboardEvent) {\n\t\te.preventDefault();\n\n\t\tconst isItemIndexValid = this.selectedItemIndex - 10 > -1;\n\n\t\tthis._moveItemSelection(this.selectedItemIndex,\n\t\t\tisItemIndexValid ? this.selectedItemIndex -= 10 : this.selectedItemIndex = 0);\n\t\treturn true;\n\t}\n\n\tonPageDown(e: KeyboardEvent) {\n\t\te.preventDefault();\n\n\t\tconst items = this.visibleItems;\n\n\t\tif (!items) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst lastItemIndex = items.length - 1;\n\t\tconst isItemIndexValid = this.selectedItemIndex + 10 <= lastItemIndex;\n\n\t\tthis._moveItemSelection(this.selectedItemIndex,\n\t\t\tisItemIndexValid ? this.selectedItemIndex += 10 : this.selectedItemIndex = lastItemIndex);\n\t\treturn true;\n\t}\n\n\tonHome(e: KeyboardEvent) {\n\t\te.preventDefault();\n\n\t\tthis._moveItemSelection(this.selectedItemIndex, this.selectedItemIndex = 0);\n\t\treturn true;\n\t}\n\n\tonEnd(e: KeyboardEvent) {\n\t\te.preventDefault();\n\n\t\tconst lastItemIndex = this._getItems().length - 1;\n\n\t\tif (!lastItemIndex) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis._moveItemSelection(this.selectedItemIndex, this.selectedItemIndex = lastItemIndex);\n\t\treturn true;\n\t}\n\n\tonTab() {\n\t\tif (this._isItemOnTarget()) {\n\t\t\tthis.onItemSelected(this._selectedItem, true);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\ttoggle(bToggle: boolean, options: { preventFocusRestore: boolean }) {\n\t\tconst toggle = bToggle !== undefined ? bToggle : !this.isOpened();\n\n\t\tif (toggle) {\n\t\t\tthis._getComponent().open = true;\n\t\t} else {\n\t\t\tthis.close(options.preventFocusRestore);\n\t\t}\n\t}\n\n\tget _selectedItem() {\n\t\treturn this._getNonGroupItems().find(item => item.selected) as SuggestionItem | null;\n\t}\n\n\t_isScrollable() {\n\t\tconst sc = this._getScrollContainer();\n\t\treturn sc.offsetHeight < sc.scrollHeight;\n\t}\n\n\tclose(preventFocusRestore = false) {\n\t\tconst selectedItem = this._getItems() && this._getItems()[this.selectedItemIndex];\n\n\t\tthis._getComponent().open = false;\n\t\tconst picker = this._getPicker();\n\t\tpicker.preventFocusRestore = preventFocusRestore;\n\t\tpicker.open = false;\n\n\t\tif (selectedItem && selectedItem.focused) {\n\t\t\tselectedItem.focused = false;\n\t\t}\n\t}\n\n\tupdateSelectedItemPosition(pos: number) {\n\t\tthis.selectedItemIndex = pos;\n\t}\n\n\tonItemSelected(selectedItem: IInputSuggestionItemSelectable | null, keyboardUsed: boolean) {\n\t\tconst item = selectedItem;\n\t\tconst nonGroupItems = this._getNonGroupItems();\n\n\t\tif (!item) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.accInfo = {\n\t\t\tisGroup: item.hasAttribute(\"ui5-suggestion-item-group\"),\n\t\t\tcurrentPos: nonGroupItems.indexOf(item) + 1,\n\t\t\tlistSize: nonGroupItems.length,\n\t\t\titemText: item.text || \"\",\n\t\t\tadditionalText: item.additionalText,\n\t\t};\n\n\t\tthis._getComponent().onItemSelected(item, keyboardUsed);\n\t\tthis._getComponent().open = false;\n\t}\n\n\tonItemSelect(item: IInputSuggestionItem) {\n\t\tthis._getComponent().onItemSelect(item);\n\t}\n\n\t/* Private methods */\n\t// Note: Split into two separate handlers\n\tonItemPress(e: CustomEvent<ListItemClickEventDetail | ListSelectionChangeEventDetail>) {\n\t\tlet pressedItem: ListItemBase; // SuggestionListItem\n\t\tconst isPressEvent = e.type === \"ui5-item-click\";\n\n\t\t// Only use the press e if the item is already selected, in all other cases we are listening for 'ui5-selection-change' from the list\n\t\t// Also we have to check if the selection-change is fired by the list's 'item-click' event handling, to avoid double handling on our side\n\t\tif ((isPressEvent && !(e.detail as ListItemClickEventDetail).item.selected) || (this._handledPress && !isPressEvent)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isPressEvent && (e.detail as ListItemClickEventDetail).item.selected) {\n\t\t\tpressedItem = (e.detail as ListItemClickEventDetail).item;\n\t\t\tthis._handledPress = true;\n\t\t} else {\n\t\t\tpressedItem = (e.detail as ListSelectionChangeEventDetail).selectedItems[0];\n\t\t}\n\n\t\tthis.onItemSelected(pressedItem as SuggestionItem, false /* keyboardUsed */);\n\t}\n\n\t_onClose() {\n\t\tthis._handledPress = false;\n\t}\n\n\t_isItemOnTarget() {\n\t\treturn this.isOpened() && this.selectedItemIndex !== null && this.selectedItemIndex !== -1 && !this._isGroupItem;\n\t}\n\n\tget _isGroupItem() {\n\t\tconst items = this._getItems();\n\n\t\tif (!items || !items[this.selectedItemIndex]) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn items[this.selectedItemIndex].hasAttribute(\"ui5-suggestion-item-group\");\n\t}\n\n\tisOpened() {\n\t\treturn !!(this._getPicker()?.open);\n\t}\n\n\t_handleItemNavigation(forward: boolean, index: number) {\n\t\tthis.selectedItemIndex = index;\n\n\t\tif (!this._getItems().length) {\n\t\t\treturn;\n\t\t}\n\t\tif (forward) {\n\t\t\tthis._selectNextItem();\n\t\t} else {\n\t\t\tthis._selectPreviousItem();\n\t\t}\n\t}\n\n\t_selectNextItem() {\n\t\tconst itemsCount = this._getItems().length;\n\n\t\tconst previousSelectedIdx = this.selectedItemIndex;\n\n\t\tif (previousSelectedIdx !== -1 && previousSelectedIdx + 1 > itemsCount - 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._moveItemSelection(previousSelectedIdx, ++this.selectedItemIndex);\n\t}\n\n\t_selectPreviousItem() {\n\t\tconst items = this.visibleItems;\n\t\tconst previousSelectedIdx = this.selectedItemIndex;\n\n\t\tif (previousSelectedIdx === -1 || previousSelectedIdx === null) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (previousSelectedIdx - 1 < 0) {\n\t\t\tif (items[previousSelectedIdx].hasAttribute(\"ui5-suggestion-item\") || items[previousSelectedIdx].hasAttribute(\"ui5-suggestion-item-custom\")) {\n\t\t\t\t(items[previousSelectedIdx] as SuggestionItem).selected = false;\n\t\t\t}\n\n\t\t\titems[previousSelectedIdx].focused = false;\n\n\t\t\tthis.component.focused = true;\n\t\t\tthis.component.hasSuggestionItemSelected = false;\n\t\t\tthis.component.value = this.component.typedInValue;\n\t\t\tthis.selectedItemIndex -= 1;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._moveItemSelection(previousSelectedIdx, --this.selectedItemIndex);\n\t}\n\n\tget visibleItems() {\n\t\treturn this._getItems().filter(item => !item.hidden);\n\t}\n\n\t_moveItemSelection(previousIdx: number, nextIdx: number) {\n\t\tconst items = this.visibleItems;\n\t\tconst currentItem = items[nextIdx];\n\t\tconst previousItem = items[previousIdx];\n\t\tconst nonGroupItems = this._getNonGroupItems();\n\t\tconst isGroupItem = currentItem?.hasAttribute(\"ui5-suggestion-item-group\");\n\n\t\tif (!currentItem) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.component.focused = false;\n\n\t\tconst selectedItem = this.visibleItems[this.selectedItemIndex];\n\n\t\tthis.accInfo = {\n\t\t\tisGroup: isGroupItem,\n\t\t\tcurrentPos: items.indexOf(currentItem) + 1,\n\t\t\titemText: (isGroupItem ? (selectedItem as SuggestionItemGroup).headerText : (selectedItem as IInputSuggestionItemSelectable).text) || \"\",\n\t\t};\n\n\t\tif (currentItem.hasAttribute(\"ui5-suggestion-item\") || currentItem.hasAttribute(\"ui5-suggestion-item-custom\")) {\n\t\t\tthis.accInfo.additionalText = (currentItem as IInputSuggestionItemSelectable).additionalText || \"\";\n\t\t\tthis.accInfo.currentPos = nonGroupItems.indexOf(currentItem as IInputSuggestionItemSelectable) + 1;\n\t\t\tthis.accInfo.listSize = nonGroupItems.length;\n\t\t}\n\n\t\tif (previousItem) {\n\t\t\tpreviousItem.focused = false;\n\t\t}\n\t\tif (previousItem?.hasAttribute(\"ui5-suggestion-item\") || previousItem?.hasAttribute(\"ui5-suggestion-item-custom\")) {\n\t\t\t(previousItem as IInputSuggestionItemSelectable).selected = false;\n\t\t}\n\n\t\tif (currentItem) {\n\t\t\tcurrentItem.focused = true;\n\n\t\t\tif (!isGroupItem) {\n\t\t\t\t(currentItem as IInputSuggestionItemSelectable).selected = true;\n\t\t\t}\n\n\t\t\tif (this.handleFocus) {\n\t\t\t\tcurrentItem.focus();\n\t\t\t}\n\t\t}\n\n\t\tthis.component.hasSuggestionItemSelected = true;\n\t\tthis.onItemSelect(currentItem);\n\n\t\tif (!this._isItemIntoView(currentItem)) {\n\t\t\tconst itemRef = this._isGroupItem ? (currentItem.shadowRoot!.querySelector(\"[ui5-li-group-header]\") as ListItemGroupHeader) : currentItem;\n\t\t\tthis._scrollItemIntoView(itemRef);\n\t\t}\n\t}\n\n\t_deselectItems() {\n\t\tconst items = this._getItems();\n\t\titems.forEach(item => {\n\t\t\tif (item.hasAttribute(\"ui5-suggestion-item\") || item.hasAttribute(\"ui5-suggestion-item-custom\")) {\n\t\t\t\t(item as SuggestionItem).selected = false;\n\t\t\t}\n\n\t\t\titem.focused = false;\n\t\t});\n\t}\n\n\t_clearItemFocus() {\n\t\tconst focusedItem = this._getItems().find(item => item.focused);\n\n\t\tif (focusedItem) {\n\t\t\tfocusedItem.focused = false;\n\t\t}\n\t}\n\n\t_isItemIntoView(item: IInputSuggestionItem) {\n\t\tconst rectItem = item.getDomRef()!.getBoundingClientRect();\n\t\tconst rectInput = this._getComponent().getDomRef()!.getBoundingClientRect();\n\t\tconst windowHeight = (window.innerHeight || document.documentElement.clientHeight);\n\t\tlet headerHeight = 0;\n\n\t\tif (this._hasValueState) {\n\t\t\tconst valueStateHeader = this._getPicker().querySelector(\"[slot=header]\")!;\n\t\t\theaderHeight = valueStateHeader.getBoundingClientRect().height;\n\t\t}\n\n\t\treturn (rectItem.top + Suggestions.SCROLL_STEP <= windowHeight) && (rectItem.top >= rectInput.top + headerHeight);\n\t}\n\n\t_scrollItemIntoView(item: IInputSuggestionItem) {\n\t\titem.scrollIntoView({\n\t\t\tbehavior: \"auto\",\n\t\t\tblock: \"nearest\",\n\t\t\tinline: \"nearest\",\n\t\t});\n\t}\n\n\t_getScrollContainer() {\n\t\tif (!this._scrollContainer) {\n\t\t\tthis._scrollContainer = this._getPicker().shadowRoot!.querySelector(\".ui5-popup-content\")!;\n\t\t}\n\n\t\treturn this._scrollContainer;\n\t}\n\n\t/**\n\t * Returns the items in 1D array.\n\t *\n\t */\n\t_getItems(): Array<IInputSuggestionItem> {\n\t\tconst suggestionComponent = this._getComponent();\n\n\t\treturn suggestionComponent.getSlottedNodes<IInputSuggestionItem>(\"suggestionItems\").flatMap(item => {\n\t\t\treturn item.hasAttribute(\"ui5-suggestion-item-group\") ? [item, ...item.items!] : [item];\n\t\t});\n\t}\n\n\t_getNonGroupItems(): Array<IInputSuggestionItemSelectable> {\n\t\treturn this._getItems().filter(item => !item.hasAttribute(\"ui5-suggestion-item-group\")) as Array<IInputSuggestionItemSelectable>;\n\t}\n\n\t_getComponent(): SuggestionComponent {\n\t\treturn this.component;\n\t}\n\n\t_getList() {\n\t\treturn this._getPicker().querySelector<List>(\"[ui5-list]\")!;\n\t}\n\n\t_getListWidth() {\n\t\treturn this._getList()?.offsetWidth;\n\t}\n\n\t_getPicker() {\n\t\treturn this._getComponent().shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\tget itemSelectionAnnounce() {\n\t\tif (!this.accInfo) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tif (this.accInfo.isGroup) {\n\t\t\treturn `${Suggestions.i18nBundle.getText(LIST_ITEM_GROUP_HEADER)} ${this.accInfo.itemText}`;\n\t\t}\n\n\t\tconst itemPositionText = Suggestions.i18nBundle.getText(LIST_ITEM_POSITION, this.accInfo.currentPos || 0, this.accInfo.listSize || 0);\n\n\t\treturn `${this.accInfo.additionalText} ${itemPositionText}`.trim();\n\t}\n\n\thightlightInput(text: string, input: string) {\n\t\treturn generateHighlightedMarkup(text, input);\n\t}\n\n\tget _hasValueState() {\n\t\treturn this.component.hasValueStateMessage;\n\t}\n\n\t_clearSelectedSuggestionAndaccInfo() {\n\t\tthis.accInfo = undefined;\n\t\tthis.selectedItemIndex = 0;\n\t}\n}\n\nInput.SuggestionsClass = Suggestions;\n\nexport default Suggestions;\n\nexport type {\n\tSuggestionComponent,\n};\n"]}