@ui5/webcomponents 1.9.3 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1155) hide show
  1. package/CHANGELOG.md +0 -8
  2. package/dist/Avatar.d.ts +251 -0
  3. package/dist/Avatar.js +203 -406
  4. package/dist/Avatar.js.map +1 -0
  5. package/dist/AvatarGroup.js +8 -8
  6. package/dist/Badge.d.ts +82 -0
  7. package/dist/Badge.js +65 -117
  8. package/dist/Badge.js.map +1 -0
  9. package/dist/Breadcrumbs.d.ts +200 -0
  10. package/dist/Breadcrumbs.js +438 -584
  11. package/dist/Breadcrumbs.js.map +1 -0
  12. package/dist/BreadcrumbsItem.d.ts +73 -0
  13. package/dist/BreadcrumbsItem.js +33 -87
  14. package/dist/BreadcrumbsItem.js.map +1 -0
  15. package/dist/BusyIndicator.js +6 -7
  16. package/dist/Button.d.ts +257 -0
  17. package/dist/Button.js +236 -456
  18. package/dist/Button.js.map +1 -0
  19. package/dist/Calendar.d.ts +251 -0
  20. package/dist/Calendar.js +266 -350
  21. package/dist/Calendar.js.map +1 -0
  22. package/dist/CalendarDate.d.ts +28 -0
  23. package/dist/CalendarDate.js +20 -30
  24. package/dist/CalendarDate.js.map +1 -0
  25. package/dist/CalendarHeader.d.ts +87 -0
  26. package/dist/CalendarHeader.js +144 -198
  27. package/dist/CalendarHeader.js.map +1 -0
  28. package/dist/CalendarPart.d.ts +53 -0
  29. package/dist/CalendarPart.js +71 -92
  30. package/dist/CalendarPart.js.map +1 -0
  31. package/dist/Card.d.ts +91 -0
  32. package/dist/Card.js +68 -123
  33. package/dist/Card.js.map +1 -0
  34. package/dist/CardHeader.d.ts +123 -0
  35. package/dist/CardHeader.js +152 -240
  36. package/dist/CardHeader.js.map +1 -0
  37. package/dist/Carousel.js +33 -11
  38. package/dist/CheckBox.d.ts +256 -0
  39. package/dist/CheckBox.js +219 -410
  40. package/dist/CheckBox.js.map +1 -0
  41. package/dist/ColorPalette.d.ts +140 -0
  42. package/dist/ColorPalette.js +362 -455
  43. package/dist/ColorPalette.js.map +1 -0
  44. package/dist/ColorPaletteItem.d.ts +68 -0
  45. package/dist/ColorPaletteItem.js +66 -114
  46. package/dist/ColorPaletteItem.js.map +1 -0
  47. package/dist/ColorPalettePopover.d.ts +127 -0
  48. package/dist/ColorPalettePopover.js +144 -203
  49. package/dist/ColorPalettePopover.js.map +1 -0
  50. package/dist/ColorPicker.d.ts +147 -0
  51. package/dist/ColorPicker.js +371 -556
  52. package/dist/ColorPicker.js.map +1 -0
  53. package/dist/ComboBox.js +9 -9
  54. package/dist/ComboBoxGroupItem.js +6 -6
  55. package/dist/ComboBoxItem.js +4 -4
  56. package/dist/CustomListItem.d.ts +44 -0
  57. package/dist/CustomListItem.js +52 -79
  58. package/dist/CustomListItem.js.map +1 -0
  59. package/dist/DateComponentBase.d.ts +83 -0
  60. package/dist/DateComponentBase.js +101 -143
  61. package/dist/DateComponentBase.js.map +1 -0
  62. package/dist/DatePicker.d.ts +452 -0
  63. package/dist/DatePicker.js +540 -737
  64. package/dist/DatePicker.js.map +1 -0
  65. package/dist/DateRangePicker.d.ts +169 -0
  66. package/dist/DateRangePicker.js +269 -315
  67. package/dist/DateRangePicker.js.map +1 -0
  68. package/dist/DateTimePicker.d.ts +207 -0
  69. package/dist/DateTimePicker.js +254 -339
  70. package/dist/DateTimePicker.js.map +1 -0
  71. package/dist/DayPicker.d.ts +243 -0
  72. package/dist/DayPicker.js +605 -730
  73. package/dist/DayPicker.js.map +1 -0
  74. package/dist/Dialog.d.ts +238 -0
  75. package/dist/Dialog.js +380 -606
  76. package/dist/Dialog.js.map +1 -0
  77. package/dist/DurationPicker.js +5 -5
  78. package/dist/FileUploader.d.ts +238 -0
  79. package/dist/FileUploader.js +305 -489
  80. package/dist/FileUploader.js.map +1 -0
  81. package/dist/Filters.d.ts +5 -0
  82. package/dist/Filters.js +10 -21
  83. package/dist/Filters.js.map +1 -0
  84. package/dist/GroupHeaderListItem.d.ts +45 -0
  85. package/dist/GroupHeaderListItem.js +42 -76
  86. package/dist/GroupHeaderListItem.js.map +1 -0
  87. package/dist/Icon.d.ts +252 -0
  88. package/dist/Icon.js +179 -306
  89. package/dist/Icon.js.map +1 -0
  90. package/dist/Input.d.ts +607 -0
  91. package/dist/Input.js +1095 -1627
  92. package/dist/Input.js.map +1 -0
  93. package/dist/Interfaces.d.ts +161 -0
  94. package/dist/Interfaces.js +45 -85
  95. package/dist/Interfaces.js.map +1 -0
  96. package/dist/Label.d.ts +98 -0
  97. package/dist/Label.js +63 -124
  98. package/dist/Label.js.map +1 -0
  99. package/dist/Link.d.ts +222 -0
  100. package/dist/Link.js +177 -358
  101. package/dist/Link.js.map +1 -0
  102. package/dist/List.d.ts +383 -0
  103. package/dist/List.js +706 -1029
  104. package/dist/List.js.map +1 -0
  105. package/dist/ListItem.d.ts +201 -0
  106. package/dist/ListItem.js +298 -407
  107. package/dist/ListItem.js.map +1 -0
  108. package/dist/ListItemBase.d.ts +61 -0
  109. package/dist/ListItemBase.js +114 -167
  110. package/dist/ListItemBase.js.map +1 -0
  111. package/dist/Menu.d.ts +187 -0
  112. package/dist/Menu.js +428 -453
  113. package/dist/Menu.js.map +1 -0
  114. package/dist/MenuItem.d.ts +124 -0
  115. package/dist/MenuItem.js +66 -166
  116. package/dist/MenuItem.js.map +1 -0
  117. package/dist/MessageStrip.d.ts +135 -0
  118. package/dist/MessageStrip.js +119 -207
  119. package/dist/MessageStrip.js.map +1 -0
  120. package/dist/MonthPicker.d.ts +109 -0
  121. package/dist/MonthPicker.js +260 -285
  122. package/dist/MonthPicker.js.map +1 -0
  123. package/dist/MultiComboBox.js +13 -11
  124. package/dist/MultiComboBoxGroupItem.js +6 -6
  125. package/dist/MultiComboBoxItem.js +4 -4
  126. package/dist/MultiInput.js +13 -10
  127. package/dist/Option.js +6 -6
  128. package/dist/Panel.d.ts +238 -0
  129. package/dist/Panel.js +230 -405
  130. package/dist/Panel.js.map +1 -0
  131. package/dist/Popover.d.ts +332 -0
  132. package/dist/Popover.js +520 -766
  133. package/dist/Popover.js.map +1 -0
  134. package/dist/Popup.d.ts +293 -0
  135. package/dist/Popup.js +404 -576
  136. package/dist/Popup.js.map +1 -0
  137. package/dist/ProgressIndicator.d.ts +121 -0
  138. package/dist/ProgressIndicator.js +121 -207
  139. package/dist/ProgressIndicator.js.map +1 -0
  140. package/dist/RadioButton.js +7 -8
  141. package/dist/RadioButtonGroup.js +1 -1
  142. package/dist/RangeSlider.d.ts +363 -0
  143. package/dist/RangeSlider.js +682 -757
  144. package/dist/RangeSlider.js.map +1 -0
  145. package/dist/RatingIndicator.js +7 -7
  146. package/dist/ResponsivePopover.d.ts +108 -0
  147. package/dist/ResponsivePopover.js +148 -174
  148. package/dist/ResponsivePopover.js.map +1 -0
  149. package/dist/SegmentedButton.js +24 -11
  150. package/dist/SegmentedButtonItem.js +5 -5
  151. package/dist/Select.js +8 -8
  152. package/dist/Slider.d.ts +163 -0
  153. package/dist/Slider.js +241 -261
  154. package/dist/Slider.js.map +1 -0
  155. package/dist/SliderBase.d.ts +357 -0
  156. package/dist/SliderBase.js +588 -794
  157. package/dist/SliderBase.js.map +1 -0
  158. package/dist/SplitButton.d.ts +220 -0
  159. package/dist/SplitButton.js +211 -382
  160. package/dist/SplitButton.js.map +1 -0
  161. package/dist/StandardListItem.d.ts +158 -0
  162. package/dist/StandardListItem.js +79 -174
  163. package/dist/StandardListItem.js.map +1 -0
  164. package/dist/StepInput.d.ts +301 -0
  165. package/dist/StepInput.js +378 -615
  166. package/dist/StepInput.js.map +1 -0
  167. package/dist/SuggestionGroupItem.d.ts +35 -0
  168. package/dist/SuggestionGroupItem.js +35 -51
  169. package/dist/SuggestionGroupItem.js.map +1 -0
  170. package/dist/SuggestionItem.d.ts +104 -0
  171. package/dist/SuggestionItem.js +49 -131
  172. package/dist/SuggestionItem.js.map +1 -0
  173. package/dist/SuggestionListItem.d.ts +47 -0
  174. package/dist/SuggestionListItem.js +38 -52
  175. package/dist/SuggestionListItem.js.map +1 -0
  176. package/dist/Switch.d.ts +167 -0
  177. package/dist/Switch.js +136 -251
  178. package/dist/Switch.js.map +1 -0
  179. package/dist/Tab.js +13 -8
  180. package/dist/TabContainer.js +21 -20
  181. package/dist/TabSeparator.js +3 -3
  182. package/dist/Table.d.ts +426 -0
  183. package/dist/Table.js +792 -1107
  184. package/dist/Table.js.map +1 -0
  185. package/dist/TableCell.d.ts +51 -0
  186. package/dist/TableCell.js +43 -60
  187. package/dist/TableCell.js.map +1 -0
  188. package/dist/TableColumn.d.ts +101 -0
  189. package/dist/TableColumn.js +53 -99
  190. package/dist/TableColumn.js.map +1 -0
  191. package/dist/TableGroupRow.d.ts +79 -0
  192. package/dist/TableGroupRow.js +97 -134
  193. package/dist/TableGroupRow.js.map +1 -0
  194. package/dist/TableRow.d.ts +160 -0
  195. package/dist/TableRow.js +315 -429
  196. package/dist/TableRow.js.map +1 -0
  197. package/dist/TextArea.js +11 -11
  198. package/dist/TimePicker.d.ts +116 -0
  199. package/dist/TimePicker.js +61 -96
  200. package/dist/TimePicker.js.map +1 -0
  201. package/dist/TimePickerBase.d.ts +188 -0
  202. package/dist/TimePickerBase.js +350 -453
  203. package/dist/TimePickerBase.js.map +1 -0
  204. package/dist/TimeSelection.d.ts +162 -0
  205. package/dist/TimeSelection.js +358 -468
  206. package/dist/TimeSelection.js.map +1 -0
  207. package/dist/Title.d.ts +69 -0
  208. package/dist/Title.js +62 -105
  209. package/dist/Title.js.map +1 -0
  210. package/dist/Toast.js +6 -6
  211. package/dist/ToggleButton.js +3 -4
  212. package/dist/Token.js +24 -7
  213. package/dist/Tokenizer.js +12 -8
  214. package/dist/Tree.js +28 -14
  215. package/dist/TreeItem.js +5 -5
  216. package/dist/TreeItemBase.js +12 -13
  217. package/dist/TreeItemCustom.js +5 -5
  218. package/dist/TreeList.js +9 -4
  219. package/dist/WheelSlider.d.ts +122 -0
  220. package/dist/WheelSlider.js +302 -410
  221. package/dist/WheelSlider.js.map +1 -0
  222. package/dist/YearPicker.d.ts +105 -0
  223. package/dist/YearPicker.js +298 -328
  224. package/dist/YearPicker.js.map +1 -0
  225. package/dist/api.json +1 -1
  226. package/dist/assets/HT-1000.59a0ea5a.jpg +0 -0
  227. package/dist/assets/HT-1010.7b05e4f5.jpg +0 -0
  228. package/dist/assets/HT-1022.6fa171f0.jpg +0 -0
  229. package/dist/assets/ar.76457d6b.js +1 -0
  230. package/dist/assets/ar_EG.facab575.js +1 -0
  231. package/dist/assets/ar_SA.037c760a.js +1 -0
  232. package/dist/assets/bg.eb54e36a.js +1 -0
  233. package/dist/assets/ca.1047c043.js +1 -0
  234. package/dist/assets/cs.47109072.js +1 -0
  235. package/dist/assets/da.1562c279.js +1 -0
  236. package/dist/assets/de.3397b9d2.js +1 -0
  237. package/dist/assets/de_AT.fb777626.js +1 -0
  238. package/dist/assets/de_CH.c4011bf2.js +1 -0
  239. package/dist/assets/el.52a181c7.js +1 -0
  240. package/dist/assets/el_CY.065e8a48.js +1 -0
  241. package/dist/assets/en.8b571af2.js +1 -0
  242. package/dist/assets/en_AU.29f5e0e2.js +1 -0
  243. package/dist/assets/en_GB.b0afb274.js +1 -0
  244. package/dist/assets/en_HK.188c8a39.js +1 -0
  245. package/dist/assets/en_IE.b52bdf4f.js +1 -0
  246. package/dist/assets/en_IN.5925f501.js +1 -0
  247. package/dist/assets/en_NZ.adc1b6af.js +1 -0
  248. package/dist/assets/en_PG.2e475ab9.js +1 -0
  249. package/dist/assets/en_SG.400dc7e5.js +1 -0
  250. package/dist/assets/en_ZA.06de0b73.js +1 -0
  251. package/dist/assets/es.d137c08c.js +1 -0
  252. package/dist/assets/es_AR.a719c078.js +1 -0
  253. package/dist/assets/es_BO.ba051d49.js +1 -0
  254. package/dist/assets/es_CL.876855d2.js +1 -0
  255. package/dist/assets/es_CO.51c37c4d.js +1 -0
  256. package/dist/assets/es_MX.c11d012e.js +1 -0
  257. package/dist/assets/es_PE.1a5de4db.js +1 -0
  258. package/dist/assets/es_UY.29036823.js +1 -0
  259. package/dist/assets/es_VE.22e2164a.js +1 -0
  260. package/dist/assets/et.d802827f.js +1 -0
  261. package/dist/assets/fa.59b6aa5f.js +1 -0
  262. package/dist/assets/fi.2cc79303.js +1 -0
  263. package/dist/assets/fr.055c2d0d.js +1 -0
  264. package/dist/assets/fr_BE.79a4448b.js +1 -0
  265. package/dist/assets/fr_CA.0c4a98e4.js +1 -0
  266. package/dist/assets/fr_CH.ba0db8bd.js +1 -0
  267. package/dist/assets/fr_LU.21a6bcea.js +1 -0
  268. package/dist/assets/he.e187c6df.js +1 -0
  269. package/dist/assets/hi.cb35adb1.js +1 -0
  270. package/dist/assets/hr.24bc905c.js +1 -0
  271. package/dist/assets/hu.aadbd74c.js +1 -0
  272. package/dist/assets/id.b9bd26e5.js +1 -0
  273. package/dist/assets/it.36ffae4a.js +1 -0
  274. package/dist/assets/{it.bcf089f4.js → it_CH.7ef1e2bf.js} +1 -1
  275. package/dist/assets/ja.a08af783.js +1 -0
  276. package/dist/assets/kk.5d3dddbe.js +1 -0
  277. package/dist/assets/ko.264fdf35.js +1 -0
  278. package/dist/assets/lt.b967d42b.js +1 -0
  279. package/dist/assets/lv.9c0f8206.js +1 -0
  280. package/dist/assets/{messagebundle_ar.dec7510d.js → messagebundle_ar.7f1e385c.js} +1 -1
  281. package/dist/assets/{messagebundle_bg.39183011.js → messagebundle_bg.67505cb7.js} +1 -1
  282. package/dist/assets/messagebundle_ca.64fb370c.js +1 -0
  283. package/dist/assets/messagebundle_cs.ce8b8a69.js +1 -0
  284. package/dist/assets/messagebundle_cy.3dad0e1d.js +1 -0
  285. package/dist/assets/messagebundle_da.ff79429b.js +1 -0
  286. package/dist/assets/messagebundle_de.e9f4d979.js +1 -0
  287. package/dist/assets/{messagebundle_el.d41a6312.js → messagebundle_el.50666070.js} +1 -1
  288. package/dist/assets/messagebundle_en.edda053c.js +1 -0
  289. package/dist/assets/messagebundle_en_GB.9eb5f8cf.js +1 -0
  290. package/dist/assets/{messagebundle_en_US_sappsd.86cc73b7.js → messagebundle_en_US_sappsd.c97ca89f.js} +1 -1
  291. package/dist/assets/{messagebundle_en_US_saprigi.a7b06ef5.js → messagebundle_en_US_saprigi.d0b577b7.js} +1 -1
  292. package/dist/assets/messagebundle_en_US_saptrc.7da9b71b.js +1 -0
  293. package/dist/assets/messagebundle_es.3b0d6da4.js +1 -0
  294. package/dist/assets/messagebundle_es_MX.da0228db.js +1 -0
  295. package/dist/assets/messagebundle_et.2cfc3295.js +1 -0
  296. package/dist/assets/messagebundle_fi.f62f59fc.js +1 -0
  297. package/dist/assets/messagebundle_fr.7d7c418f.js +1 -0
  298. package/dist/assets/messagebundle_fr_CA.a4592fb9.js +1 -0
  299. package/dist/assets/{messagebundle_hi.b968aad6.js → messagebundle_hi.2f3db639.js} +1 -1
  300. package/dist/assets/messagebundle_hr.f8282341.js +1 -0
  301. package/dist/assets/messagebundle_hu.2589bdb3.js +1 -0
  302. package/dist/assets/messagebundle_it.146c4b3c.js +1 -0
  303. package/dist/assets/messagebundle_iw.2766f5a1.js +1 -0
  304. package/dist/assets/messagebundle_ja.b0b6d3d0.js +1 -0
  305. package/dist/assets/{messagebundle_kk.24effffd.js → messagebundle_kk.f9132ede.js} +1 -1
  306. package/dist/assets/messagebundle_ko.d23a9de8.js +1 -0
  307. package/dist/assets/messagebundle_lt.e2f6f5b0.js +1 -0
  308. package/dist/assets/messagebundle_lv.6b0ad93c.js +1 -0
  309. package/dist/assets/messagebundle_ms.8d8ac7f1.js +1 -0
  310. package/dist/assets/messagebundle_nl.1bb5da42.js +1 -0
  311. package/dist/assets/messagebundle_no.c7ee6784.js +1 -0
  312. package/dist/assets/messagebundle_pl.0d1b3dd1.js +1 -0
  313. package/dist/assets/messagebundle_pt.33ff9d42.js +1 -0
  314. package/dist/assets/messagebundle_pt_PT.a91f6468.js +1 -0
  315. package/dist/assets/messagebundle_ro.bd2e01e0.js +1 -0
  316. package/dist/assets/{messagebundle_ru.e7ffdb7d.js → messagebundle_ru.388e4272.js} +1 -1
  317. package/dist/assets/messagebundle_sh.122ca47b.js +1 -0
  318. package/dist/assets/messagebundle_sk.66d70983.js +1 -0
  319. package/dist/assets/messagebundle_sl.3f1a077f.js +1 -0
  320. package/dist/assets/messagebundle_sv.71f16a40.js +1 -0
  321. package/dist/assets/{messagebundle_th.4f145df6.js → messagebundle_th.700d6a4a.js} +1 -1
  322. package/dist/assets/messagebundle_tr.6f267da9.js +1 -0
  323. package/dist/assets/{messagebundle_uk.fc20aaae.js → messagebundle_uk.52e9f0c8.js} +1 -1
  324. package/dist/assets/messagebundle_vi.e9fe4caa.js +1 -0
  325. package/dist/assets/messagebundle_zh_CN.8ff0766b.js +1 -0
  326. package/dist/assets/messagebundle_zh_TW.25b49650.js +1 -0
  327. package/dist/assets/ms.5a523fbe.js +1 -0
  328. package/dist/assets/nb.6e98bbca.js +1 -0
  329. package/dist/assets/nl.84e9e6df.js +1 -0
  330. package/dist/assets/nl_BE.0f374ea5.js +1 -0
  331. package/dist/assets/parameters-bundle.css.09fdcedf.js +1 -0
  332. package/dist/assets/parameters-bundle.css.0c16556f.js +1 -0
  333. package/dist/assets/parameters-bundle.css.1d5159c7.js +1 -0
  334. package/dist/assets/parameters-bundle.css.3d586108.js +1 -0
  335. package/dist/assets/parameters-bundle.css.3fe96be2.js +1 -0
  336. package/dist/assets/parameters-bundle.css.44ff7825.js +1 -0
  337. package/dist/assets/parameters-bundle.css.58325286.js +1 -0
  338. package/dist/assets/parameters-bundle.css.5c29069a.js +1 -0
  339. package/dist/assets/parameters-bundle.css.759ff23e.js +1 -0
  340. package/dist/assets/parameters-bundle.css.7ad77620.js +1 -0
  341. package/dist/assets/parameters-bundle.css.ab7cc9c4.js +1 -0
  342. package/dist/assets/parameters-bundle.css.e7002fc1.js +1 -0
  343. package/dist/assets/pl.c8acba9e.js +1 -0
  344. package/dist/assets/pt.676d5650.js +1 -0
  345. package/dist/assets/pt_PT.0bbc2da6.js +1 -0
  346. package/dist/assets/ro.10993af2.js +1 -0
  347. package/dist/assets/ru.4aba168e.js +1 -0
  348. package/dist/assets/ru_UA.334d6613.js +1 -0
  349. package/dist/assets/sk.3183c85e.js +1 -0
  350. package/dist/assets/sl.edad6042.js +1 -0
  351. package/dist/assets/sr.3e293379.js +1 -0
  352. package/dist/assets/sr_Latn.0f4a03c3.js +1 -0
  353. package/dist/assets/sv.e76e14e4.js +1 -0
  354. package/dist/assets/th.f5491ec1.js +1 -0
  355. package/dist/assets/tr.3b838818.js +1 -0
  356. package/dist/assets/uk.ebbd81a0.js +1 -0
  357. package/dist/assets/vi.87616fa0.js +1 -0
  358. package/dist/assets/zh_CN.de478ef9.js +1 -0
  359. package/dist/assets/zh_HK.834c3161.js +1 -0
  360. package/dist/assets/zh_SG.13241ee3.js +1 -0
  361. package/dist/assets/zh_TW.8f4a16b5.js +1 -0
  362. package/dist/css/themes/Avatar.css +1 -1
  363. package/dist/css/themes/BusyIndicator.css +1 -1
  364. package/dist/css/themes/Button.css +1 -1
  365. package/dist/css/themes/CardHeader.css +1 -1
  366. package/dist/css/themes/Carousel.css +1 -1
  367. package/dist/css/themes/ComboBox.css +1 -1
  368. package/dist/css/themes/DatePicker.css +1 -1
  369. package/dist/css/themes/Dialog.css +1 -1
  370. package/dist/css/themes/Icon.css +1 -1
  371. package/dist/css/themes/Input.css +1 -1
  372. package/dist/css/themes/ListItem.css +1 -1
  373. package/dist/css/themes/MultiComboBox.css +1 -1
  374. package/dist/css/themes/MultiInput.css +1 -1
  375. package/dist/css/themes/RadioButton.css +1 -1
  376. package/dist/css/themes/Select.css +1 -1
  377. package/dist/css/themes/TabInStrip.css +1 -1
  378. package/dist/css/themes/Table.css +1 -1
  379. package/dist/css/themes/TableCell.css +1 -1
  380. package/dist/css/themes/TableRow.css +1 -1
  381. package/dist/css/themes/TextArea.css +1 -1
  382. package/dist/css/themes/Tokenizer.css +1 -1
  383. package/dist/css/themes/ValueStateMessage.css +1 -1
  384. package/dist/css/themes/sap_belize/parameters-bundle.css +1 -1
  385. package/dist/css/themes/sap_belize_hcb/parameters-bundle.css +1 -1
  386. package/dist/css/themes/sap_belize_hcw/parameters-bundle.css +1 -1
  387. package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
  388. package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
  389. package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
  390. package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
  391. package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
  392. package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
  393. package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +1 -1
  394. package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
  395. package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
  396. package/dist/features/ColorPaletteMoreColors.d.ts +13 -0
  397. package/dist/features/ColorPaletteMoreColors.js +23 -33
  398. package/dist/features/ColorPaletteMoreColors.js.map +1 -0
  399. package/dist/features/InputElementsFormSupport.d.ts +31 -0
  400. package/dist/features/InputElementsFormSupport.js +95 -101
  401. package/dist/features/InputElementsFormSupport.js.map +1 -0
  402. package/dist/features/InputSuggestions.d.ts +130 -0
  403. package/dist/features/InputSuggestions.js +457 -590
  404. package/dist/features/InputSuggestions.js.map +1 -0
  405. package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
  406. package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
  407. package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
  408. package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
  409. package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
  410. package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
  411. package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
  412. package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
  413. package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
  414. package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
  415. package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
  416. package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
  417. package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
  418. package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
  419. package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
  420. package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
  421. package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
  422. package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
  423. package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
  424. package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
  425. package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
  426. package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
  427. package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
  428. package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
  429. package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
  430. package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
  431. package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
  432. package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
  433. package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
  434. package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
  435. package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
  436. package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
  437. package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
  438. package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
  439. package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
  440. package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
  441. package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
  442. package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
  443. package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
  444. package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
  445. package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
  446. package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
  447. package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
  448. package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
  449. package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
  450. package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
  451. package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
  452. package/dist/generated/assets/themes/sap_belize/parameters-bundle.css.json +1 -1
  453. package/dist/generated/assets/themes/sap_belize_hcb/parameters-bundle.css.json +1 -1
  454. package/dist/generated/assets/themes/sap_belize_hcw/parameters-bundle.css.json +1 -1
  455. package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
  456. package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
  457. package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
  458. package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
  459. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  460. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  461. package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
  462. package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
  463. package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
  464. package/dist/generated/i18n/i18n-defaults.js +2 -2
  465. package/dist/generated/templates/CardHeaderTemplate.lit.js +1 -1
  466. package/dist/generated/templates/CardTemplate.lit.js +1 -1
  467. package/dist/generated/templates/CheckBoxTemplate.lit.js +1 -1
  468. package/dist/generated/templates/ComboBoxPopoverTemplate.lit.js +19 -17
  469. package/dist/generated/templates/CustomListItemTemplate.lit.js +9 -7
  470. package/dist/generated/templates/DialogTemplate.lit.js +1 -1
  471. package/dist/generated/templates/IconTemplate.lit.js +1 -1
  472. package/dist/generated/templates/InputTemplate.lit.js +1 -1
  473. package/dist/generated/templates/LinkTemplate.lit.js +1 -1
  474. package/dist/generated/templates/ListItemTemplate.lit.js +9 -7
  475. package/dist/generated/templates/ListTemplate.lit.js +3 -3
  476. package/dist/generated/templates/MenuTemplate.lit.js +1 -1
  477. package/dist/generated/templates/MonthPickerTemplate.lit.js +1 -1
  478. package/dist/generated/templates/MultiInputTemplate.lit.js +1 -1
  479. package/dist/generated/templates/PopoverTemplate.lit.js +1 -1
  480. package/dist/generated/templates/RangeSliderTemplate.lit.js +1 -1
  481. package/dist/generated/templates/ResponsivePopoverTemplate.lit.js +1 -1
  482. package/dist/generated/templates/SegmentedButtonTemplate.lit.js +1 -1
  483. package/dist/generated/templates/SliderTemplate.lit.js +1 -1
  484. package/dist/generated/templates/StandardListItemTemplate.lit.js +20 -16
  485. package/dist/generated/templates/SuggestionListItemTemplate.lit.js +23 -19
  486. package/dist/generated/templates/SwitchTemplate.lit.js +1 -1
  487. package/dist/generated/templates/TabInStripTemplate.lit.js +1 -1
  488. package/dist/generated/templates/TableRowTemplate.lit.js +5 -2
  489. package/dist/generated/templates/TableTemplate.lit.js +1 -1
  490. package/dist/generated/templates/TokenTemplate.lit.js +1 -1
  491. package/dist/generated/templates/TreeItemBaseTemplate.lit.js +10 -8
  492. package/dist/generated/templates/TreeItemCustomTemplate.lit.js +10 -8
  493. package/dist/generated/templates/TreeItemTemplate.lit.js +10 -8
  494. package/dist/generated/templates/TreeTemplate.lit.js +1 -1
  495. package/dist/generated/templates/YearPickerTemplate.lit.js +1 -1
  496. package/dist/generated/themes/Avatar.css.js +1 -1
  497. package/dist/generated/themes/BusyIndicator.css.js +1 -1
  498. package/dist/generated/themes/Button.css.js +1 -1
  499. package/dist/generated/themes/CardHeader.css.js +1 -1
  500. package/dist/generated/themes/Carousel.css.js +1 -1
  501. package/dist/generated/themes/ComboBox.css.js +1 -1
  502. package/dist/generated/themes/DatePicker.css.js +1 -1
  503. package/dist/generated/themes/Dialog.css.js +1 -1
  504. package/dist/generated/themes/Icon.css.js +1 -1
  505. package/dist/generated/themes/Input.css.js +1 -1
  506. package/dist/generated/themes/ListItem.css.js +1 -1
  507. package/dist/generated/themes/MultiComboBox.css.js +1 -1
  508. package/dist/generated/themes/MultiInput.css.js +1 -1
  509. package/dist/generated/themes/RadioButton.css.js +1 -1
  510. package/dist/generated/themes/Select.css.js +1 -1
  511. package/dist/generated/themes/TabInStrip.css.js +1 -1
  512. package/dist/generated/themes/Table.css.js +1 -1
  513. package/dist/generated/themes/TableCell.css.js +1 -1
  514. package/dist/generated/themes/TableRow.css.js +1 -1
  515. package/dist/generated/themes/TextArea.css.js +1 -1
  516. package/dist/generated/themes/Tokenizer.css.js +1 -1
  517. package/dist/generated/themes/ValueStateMessage.css.js +1 -1
  518. package/dist/generated/themes/sap_belize/parameters-bundle.css.js +1 -1
  519. package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js +1 -1
  520. package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js +1 -1
  521. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
  522. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
  523. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
  524. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
  525. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
  526. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
  527. package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
  528. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
  529. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
  530. package/dist/i18n/messagebundle.properties +6 -0
  531. package/dist/i18n/messagebundle_ar.properties +4 -0
  532. package/dist/i18n/messagebundle_bg.properties +4 -0
  533. package/dist/i18n/messagebundle_ca.properties +4 -0
  534. package/dist/i18n/messagebundle_cs.properties +4 -0
  535. package/dist/i18n/messagebundle_cy.properties +4 -0
  536. package/dist/i18n/messagebundle_da.properties +4 -0
  537. package/dist/i18n/messagebundle_de.properties +4 -0
  538. package/dist/i18n/messagebundle_el.properties +4 -0
  539. package/dist/i18n/messagebundle_en.properties +4 -0
  540. package/dist/i18n/messagebundle_en_GB.properties +4 -0
  541. package/dist/i18n/messagebundle_en_US_sappsd.properties +4 -0
  542. package/dist/i18n/messagebundle_en_US_saprigi.properties +4 -0
  543. package/dist/i18n/messagebundle_en_US_saptrc.properties +4 -0
  544. package/dist/i18n/messagebundle_es.properties +4 -0
  545. package/dist/i18n/messagebundle_es_MX.properties +4 -0
  546. package/dist/i18n/messagebundle_et.properties +4 -0
  547. package/dist/i18n/messagebundle_fi.properties +4 -0
  548. package/dist/i18n/messagebundle_fr.properties +4 -0
  549. package/dist/i18n/messagebundle_fr_CA.properties +4 -0
  550. package/dist/i18n/messagebundle_hi.properties +4 -0
  551. package/dist/i18n/messagebundle_hr.properties +4 -0
  552. package/dist/i18n/messagebundle_hu.properties +4 -0
  553. package/dist/i18n/messagebundle_id.properties +4 -0
  554. package/dist/i18n/messagebundle_it.properties +4 -0
  555. package/dist/i18n/messagebundle_iw.properties +4 -0
  556. package/dist/i18n/messagebundle_ja.properties +4 -0
  557. package/dist/i18n/messagebundle_kk.properties +4 -0
  558. package/dist/i18n/messagebundle_ko.properties +4 -0
  559. package/dist/i18n/messagebundle_lt.properties +4 -0
  560. package/dist/i18n/messagebundle_lv.properties +4 -0
  561. package/dist/i18n/messagebundle_ms.properties +4 -0
  562. package/dist/i18n/messagebundle_nl.properties +4 -0
  563. package/dist/i18n/messagebundle_no.properties +5 -1
  564. package/dist/i18n/messagebundle_pl.properties +4 -0
  565. package/dist/i18n/messagebundle_pt.properties +4 -0
  566. package/dist/i18n/messagebundle_pt_PT.properties +4 -0
  567. package/dist/i18n/messagebundle_ro.properties +4 -0
  568. package/dist/i18n/messagebundle_ru.properties +4 -0
  569. package/dist/i18n/messagebundle_sh.properties +4 -0
  570. package/dist/i18n/messagebundle_sk.properties +4 -0
  571. package/dist/i18n/messagebundle_sl.properties +4 -0
  572. package/dist/i18n/messagebundle_sv.properties +4 -0
  573. package/dist/i18n/messagebundle_th.properties +4 -0
  574. package/dist/i18n/messagebundle_tr.properties +4 -0
  575. package/dist/i18n/messagebundle_uk.properties +4 -0
  576. package/dist/i18n/messagebundle_vi.properties +4 -0
  577. package/dist/i18n/messagebundle_zh_CN.properties +4 -0
  578. package/dist/i18n/messagebundle_zh_TW.properties +4 -0
  579. package/dist/popup-utils/OpenedPopupsRegistry.d.ts +9 -0
  580. package/dist/popup-utils/OpenedPopupsRegistry.js +43 -37
  581. package/dist/popup-utils/OpenedPopupsRegistry.js.map +1 -0
  582. package/dist/popup-utils/PopoverRegistry.d.ts +9 -0
  583. package/dist/popup-utils/PopoverRegistry.js +103 -123
  584. package/dist/popup-utils/PopoverRegistry.js.map +1 -0
  585. package/dist/timepicker-utils/TimeSlider.d.ts +15 -0
  586. package/dist/timepicker-utils/TimeSlider.js +80 -92
  587. package/dist/timepicker-utils/TimeSlider.js.map +1 -0
  588. package/dist/types/AvatarColorScheme.d.ts +78 -0
  589. package/dist/types/AvatarColorScheme.js +75 -99
  590. package/dist/types/AvatarColorScheme.js.map +1 -0
  591. package/dist/types/AvatarGroupType.d.ts +26 -0
  592. package/dist/types/AvatarGroupType.js +22 -37
  593. package/dist/types/AvatarGroupType.js.map +1 -0
  594. package/dist/types/AvatarShape.d.ts +24 -0
  595. package/dist/types/AvatarShape.js +20 -35
  596. package/dist/types/AvatarShape.js.map +1 -0
  597. package/dist/types/AvatarSize.d.ts +47 -0
  598. package/dist/types/AvatarSize.js +43 -61
  599. package/dist/types/AvatarSize.js.map +1 -0
  600. package/dist/types/BreadcrumbsDesign.d.ts +26 -0
  601. package/dist/types/BreadcrumbsDesign.js +23 -37
  602. package/dist/types/BreadcrumbsDesign.js.map +1 -0
  603. package/dist/types/BreadcrumbsSeparatorStyle.d.ts +48 -0
  604. package/dist/types/BreadcrumbsSeparatorStyle.js +45 -64
  605. package/dist/types/BreadcrumbsSeparatorStyle.js.map +1 -0
  606. package/dist/types/BusyIndicatorSize.d.ts +30 -0
  607. package/dist/types/BusyIndicatorSize.js +27 -42
  608. package/dist/types/BusyIndicatorSize.js.map +1 -0
  609. package/dist/types/ButtonDesign.d.ts +48 -0
  610. package/dist/types/ButtonDesign.js +45 -63
  611. package/dist/types/ButtonDesign.js.map +1 -0
  612. package/dist/types/CalendarSelectionMode.d.ts +30 -0
  613. package/dist/types/CalendarSelectionMode.js +27 -42
  614. package/dist/types/CalendarSelectionMode.js.map +1 -0
  615. package/dist/types/CarouselArrowsPlacement.d.ts +24 -0
  616. package/dist/types/CarouselArrowsPlacement.js +21 -35
  617. package/dist/types/CarouselArrowsPlacement.js.map +1 -0
  618. package/dist/types/CarouselPageIndicatorStyle.d.ts +25 -0
  619. package/dist/types/CarouselPageIndicatorStyle.js +27 -0
  620. package/dist/types/CarouselPageIndicatorStyle.js.map +1 -0
  621. package/dist/types/HasPopup.d.ts +42 -0
  622. package/dist/types/HasPopup.js +38 -56
  623. package/dist/types/HasPopup.js.map +1 -0
  624. package/dist/types/IconDesign.d.ts +60 -0
  625. package/dist/types/IconDesign.js +62 -0
  626. package/dist/types/IconDesign.js.map +1 -0
  627. package/dist/types/InputType.d.ts +48 -0
  628. package/dist/types/InputType.js +45 -63
  629. package/dist/types/InputType.js.map +1 -0
  630. package/dist/types/LinkDesign.d.ts +30 -0
  631. package/dist/types/LinkDesign.js +27 -42
  632. package/dist/types/LinkDesign.js.map +1 -0
  633. package/dist/types/ListGrowingMode.d.ts +31 -0
  634. package/dist/types/ListGrowingMode.js +28 -43
  635. package/dist/types/ListGrowingMode.js.map +1 -0
  636. package/dist/types/ListItemType.d.ts +36 -0
  637. package/dist/types/ListItemType.js +33 -42
  638. package/dist/types/ListItemType.js.map +1 -0
  639. package/dist/types/ListMode.d.ts +56 -0
  640. package/dist/types/ListMode.js +53 -72
  641. package/dist/types/ListMode.js.map +1 -0
  642. package/dist/types/ListSeparators.d.ts +31 -0
  643. package/dist/types/ListSeparators.js +28 -41
  644. package/dist/types/ListSeparators.js.map +1 -0
  645. package/dist/types/MessageStripDesign.d.ts +36 -0
  646. package/dist/types/MessageStripDesign.js +33 -49
  647. package/dist/types/MessageStripDesign.js.map +1 -0
  648. package/dist/types/PanelAccessibleRole.d.ts +33 -0
  649. package/dist/types/PanelAccessibleRole.js +30 -43
  650. package/dist/types/PanelAccessibleRole.js.map +1 -0
  651. package/dist/types/PopoverHorizontalAlign.d.ts +36 -0
  652. package/dist/types/PopoverHorizontalAlign.js +33 -49
  653. package/dist/types/PopoverHorizontalAlign.js.map +1 -0
  654. package/dist/types/PopoverPlacementType.d.ts +36 -0
  655. package/dist/types/PopoverPlacementType.js +33 -49
  656. package/dist/types/PopoverPlacementType.js.map +1 -0
  657. package/dist/types/PopoverVerticalAlign.d.ts +36 -0
  658. package/dist/types/PopoverVerticalAlign.js +33 -49
  659. package/dist/types/PopoverVerticalAlign.js.map +1 -0
  660. package/dist/types/Priority.d.ts +36 -0
  661. package/dist/types/Priority.js +32 -49
  662. package/dist/types/Priority.js.map +1 -0
  663. package/dist/types/SemanticColor.d.ts +42 -0
  664. package/dist/types/SemanticColor.js +39 -56
  665. package/dist/types/SemanticColor.js.map +1 -0
  666. package/dist/types/SwitchDesign.d.ts +24 -0
  667. package/dist/types/SwitchDesign.js +21 -35
  668. package/dist/types/SwitchDesign.js.map +1 -0
  669. package/dist/types/TabContainerBackgroundDesign.d.ts +30 -0
  670. package/dist/types/TabContainerBackgroundDesign.js +27 -43
  671. package/dist/types/TabContainerBackgroundDesign.js.map +1 -0
  672. package/dist/types/TabContainerTabsPlacement.d.ts +24 -0
  673. package/dist/types/TabContainerTabsPlacement.js +21 -35
  674. package/dist/types/TabContainerTabsPlacement.js.map +1 -0
  675. package/dist/types/TabLayout.d.ts +24 -0
  676. package/dist/types/TabLayout.js +21 -35
  677. package/dist/types/TabLayout.js.map +1 -0
  678. package/dist/types/TableColumnPopinDisplay.d.ts +24 -0
  679. package/dist/types/TableColumnPopinDisplay.js +26 -0
  680. package/dist/types/TableColumnPopinDisplay.js.map +1 -0
  681. package/dist/types/TableGrowingMode.d.ts +31 -0
  682. package/dist/types/TableGrowingMode.js +28 -43
  683. package/dist/types/TableGrowingMode.js.map +1 -0
  684. package/dist/types/TableMode.d.ts +30 -0
  685. package/dist/types/TableMode.js +27 -42
  686. package/dist/types/TableMode.js.map +1 -0
  687. package/dist/types/TableRowType.d.ts +24 -0
  688. package/dist/types/TableRowType.js +21 -35
  689. package/dist/types/TableRowType.js.map +1 -0
  690. package/dist/types/TabsOverflowMode.d.ts +24 -0
  691. package/dist/types/TabsOverflowMode.js +21 -35
  692. package/dist/types/TabsOverflowMode.js.map +1 -0
  693. package/dist/types/TitleLevel.d.ts +48 -0
  694. package/dist/types/TitleLevel.js +45 -63
  695. package/dist/types/TitleLevel.js.map +1 -0
  696. package/dist/types/ToastPlacement.d.ts +67 -0
  697. package/dist/types/ToastPlacement.js +64 -86
  698. package/dist/types/ToastPlacement.js.map +1 -0
  699. package/dist/types/WrappingType.d.ts +24 -0
  700. package/dist/types/WrappingType.js +20 -35
  701. package/dist/types/WrappingType.js.map +1 -0
  702. package/global.d.ts +12 -0
  703. package/package-scripts.js +1 -0
  704. package/package.json +7 -7
  705. package/src/Avatar.ts +435 -0
  706. package/src/AvatarGroup.js +8 -8
  707. package/src/Badge.ts +143 -0
  708. package/src/Breadcrumbs.hbs +41 -38
  709. package/src/{Breadcrumbs.js → Breadcrumbs.ts} +228 -187
  710. package/src/BreadcrumbsItem.ts +92 -0
  711. package/src/BusyIndicator.js +6 -7
  712. package/src/Button.ts +503 -0
  713. package/src/{Calendar.js → Calendar.ts} +152 -142
  714. package/src/CalendarDate.ts +36 -0
  715. package/src/CalendarHeader.ts +218 -0
  716. package/src/{CalendarPart.js → CalendarPart.ts} +15 -26
  717. package/src/Card.hbs +1 -1
  718. package/src/{Card.js → Card.ts} +67 -75
  719. package/src/CardHeader.hbs +1 -1
  720. package/src/CardHeader.ts +275 -0
  721. package/src/Carousel.hbs +72 -72
  722. package/src/Carousel.js +33 -11
  723. package/src/CheckBox.hbs +3 -3
  724. package/src/CheckBox.ts +466 -0
  725. package/src/{ColorPalette.js → ColorPalette.ts} +184 -165
  726. package/src/ColorPaletteItem.ts +124 -0
  727. package/src/{ColorPalettePopover.js → ColorPalettePopover.ts} +99 -97
  728. package/src/ColorPicker.ts +536 -0
  729. package/src/ComboBox.js +9 -9
  730. package/src/ComboBoxGroupItem.js +6 -6
  731. package/src/ComboBoxItem.js +4 -4
  732. package/src/ComboBoxPopover.hbs +45 -42
  733. package/src/CustomListItem.ts +89 -0
  734. package/src/DateComponentBase.ts +174 -0
  735. package/src/{DatePicker.js → DatePicker.ts} +355 -330
  736. package/src/{DateRangePicker.js → DateRangePicker.ts} +65 -61
  737. package/src/{DateTimePicker.js → DateTimePicker.ts} +82 -80
  738. package/src/{DayPicker.js → DayPicker.ts} +274 -218
  739. package/src/Dialog.hbs +1 -1
  740. package/src/{Dialog.js → Dialog.ts} +208 -195
  741. package/src/DurationPicker.js +5 -5
  742. package/src/FileUploader.ts +526 -0
  743. package/src/Filters.ts +28 -0
  744. package/src/GroupHeaderListItem.ts +86 -0
  745. package/src/Icon.hbs +1 -1
  746. package/src/{Icon.js → Icon.ts} +204 -182
  747. package/src/Input.hbs +3 -1
  748. package/src/{Input.js → Input.ts} +738 -706
  749. package/src/{Interfaces.js → Interfaces.ts} +40 -40
  750. package/src/Label.ts +143 -0
  751. package/src/Link.hbs +1 -1
  752. package/src/Link.ts +406 -0
  753. package/src/List.hbs +11 -2
  754. package/src/List.ts +1143 -0
  755. package/src/ListItem.hbs +12 -2
  756. package/src/ListItem.ts +497 -0
  757. package/src/ListItemBase.ts +168 -0
  758. package/src/Menu.hbs +4 -1
  759. package/src/Menu.ts +609 -0
  760. package/src/MenuItem.ts +168 -0
  761. package/src/MessageStrip.ts +245 -0
  762. package/src/MonthPicker.hbs +1 -0
  763. package/src/{MonthPicker.js → MonthPicker.ts} +147 -104
  764. package/src/MultiComboBox.js +13 -11
  765. package/src/MultiComboBoxGroupItem.js +6 -6
  766. package/src/MultiComboBoxItem.js +4 -4
  767. package/src/MultiInput.js +13 -10
  768. package/src/Option.js +6 -6
  769. package/src/{Panel.js → Panel.ts} +179 -219
  770. package/src/Popover.hbs +1 -1
  771. package/src/{Popover.js → Popover.ts} +293 -268
  772. package/src/{Popup.js → Popup.ts} +227 -210
  773. package/src/{ProgressIndicator.js → ProgressIndicator.ts} +91 -95
  774. package/src/RadioButton.js +7 -8
  775. package/src/RadioButtonGroup.js +1 -1
  776. package/src/RangeSlider.hbs +11 -5
  777. package/src/{RangeSlider.js → RangeSlider.ts} +248 -173
  778. package/src/RatingIndicator.js +7 -7
  779. package/src/{ResponsivePopover.js → ResponsivePopover.ts} +84 -62
  780. package/src/SegmentedButton.hbs +1 -0
  781. package/src/SegmentedButton.js +24 -11
  782. package/src/SegmentedButtonItem.js +5 -5
  783. package/src/Select.js +8 -8
  784. package/src/Slider.hbs +2 -2
  785. package/src/{Slider.js → Slider.ts} +94 -62
  786. package/src/{SliderBase.js → SliderBase.ts} +238 -270
  787. package/src/{SplitButton.js → SplitButton.ts} +217 -235
  788. package/src/StandardListItem.hbs +10 -4
  789. package/src/StandardListItem.ts +217 -0
  790. package/src/StepInput.hbs +1 -1
  791. package/src/{StepInput.js → StepInput.ts} +275 -314
  792. package/src/SuggestionGroupItem.ts +51 -0
  793. package/src/SuggestionItem.ts +134 -0
  794. package/src/{SuggestionListItem.js → SuggestionListItem.ts} +30 -32
  795. package/src/Switch.hbs +2 -2
  796. package/src/Switch.ts +299 -0
  797. package/src/Tab.js +13 -8
  798. package/src/TabContainer.js +21 -20
  799. package/src/TabInStrip.hbs +2 -1
  800. package/src/TabSeparator.js +3 -3
  801. package/src/Table.hbs +7 -1
  802. package/src/Table.ts +1303 -0
  803. package/src/{TableCell.js → TableCell.ts} +32 -42
  804. package/src/TableColumn.ts +135 -0
  805. package/src/TableGroupRow.ts +159 -0
  806. package/src/TableRow.hbs +17 -5
  807. package/src/TableRow.ts +505 -0
  808. package/src/TextArea.js +11 -11
  809. package/src/{TimePicker.js → TimePicker.ts} +43 -50
  810. package/src/{TimePickerBase.js → TimePickerBase.ts} +154 -145
  811. package/src/{TimeSelection.js → TimeSelection.ts} +198 -170
  812. package/src/Title.ts +117 -0
  813. package/src/Toast.js +6 -6
  814. package/src/ToggleButton.js +3 -4
  815. package/src/Token.hbs +1 -0
  816. package/src/Token.js +24 -7
  817. package/src/Tokenizer.js +12 -8
  818. package/src/Tree.hbs +2 -1
  819. package/src/Tree.js +28 -14
  820. package/src/TreeItem.js +5 -5
  821. package/src/TreeItemBase.js +12 -13
  822. package/src/TreeItemCustom.js +5 -5
  823. package/src/TreeList.js +9 -4
  824. package/src/{WheelSlider.js → WheelSlider.ts} +120 -126
  825. package/src/YearPicker.hbs +1 -0
  826. package/src/{YearPicker.js → YearPicker.ts} +146 -101
  827. package/src/features/{ColorPaletteMoreColors.js → ColorPaletteMoreColors.ts} +8 -3
  828. package/src/features/{InputElementsFormSupport.js → InputElementsFormSupport.ts} +49 -17
  829. package/src/features/{InputSuggestions.js → InputSuggestions.ts} +154 -99
  830. package/src/i18n/messagebundle.properties +6 -0
  831. package/src/i18n/messagebundle_ar.properties +4 -0
  832. package/src/i18n/messagebundle_bg.properties +4 -0
  833. package/src/i18n/messagebundle_ca.properties +4 -0
  834. package/src/i18n/messagebundle_cs.properties +4 -0
  835. package/src/i18n/messagebundle_cy.properties +4 -0
  836. package/src/i18n/messagebundle_da.properties +4 -0
  837. package/src/i18n/messagebundle_de.properties +4 -0
  838. package/src/i18n/messagebundle_el.properties +4 -0
  839. package/src/i18n/messagebundle_en.properties +4 -0
  840. package/src/i18n/messagebundle_en_GB.properties +4 -0
  841. package/src/i18n/messagebundle_en_US_sappsd.properties +4 -0
  842. package/src/i18n/messagebundle_en_US_saprigi.properties +4 -0
  843. package/src/i18n/messagebundle_en_US_saptrc.properties +4 -0
  844. package/src/i18n/messagebundle_es.properties +4 -0
  845. package/src/i18n/messagebundle_es_MX.properties +4 -0
  846. package/src/i18n/messagebundle_et.properties +4 -0
  847. package/src/i18n/messagebundle_fi.properties +4 -0
  848. package/src/i18n/messagebundle_fr.properties +4 -0
  849. package/src/i18n/messagebundle_fr_CA.properties +4 -0
  850. package/src/i18n/messagebundle_hi.properties +4 -0
  851. package/src/i18n/messagebundle_hr.properties +4 -0
  852. package/src/i18n/messagebundle_hu.properties +4 -0
  853. package/src/i18n/messagebundle_id.properties +4 -0
  854. package/src/i18n/messagebundle_it.properties +4 -0
  855. package/src/i18n/messagebundle_iw.properties +4 -0
  856. package/src/i18n/messagebundle_ja.properties +4 -0
  857. package/src/i18n/messagebundle_kk.properties +4 -0
  858. package/src/i18n/messagebundle_ko.properties +4 -0
  859. package/src/i18n/messagebundle_lt.properties +4 -0
  860. package/src/i18n/messagebundle_lv.properties +4 -0
  861. package/src/i18n/messagebundle_ms.properties +4 -0
  862. package/src/i18n/messagebundle_nl.properties +4 -0
  863. package/src/i18n/messagebundle_no.properties +5 -1
  864. package/src/i18n/messagebundle_pl.properties +4 -0
  865. package/src/i18n/messagebundle_pt.properties +4 -0
  866. package/src/i18n/messagebundle_pt_PT.properties +4 -0
  867. package/src/i18n/messagebundle_ro.properties +4 -0
  868. package/src/i18n/messagebundle_ru.properties +4 -0
  869. package/src/i18n/messagebundle_sh.properties +4 -0
  870. package/src/i18n/messagebundle_sk.properties +4 -0
  871. package/src/i18n/messagebundle_sl.properties +4 -0
  872. package/src/i18n/messagebundle_sv.properties +4 -0
  873. package/src/i18n/messagebundle_th.properties +4 -0
  874. package/src/i18n/messagebundle_tr.properties +4 -0
  875. package/src/i18n/messagebundle_uk.properties +4 -0
  876. package/src/i18n/messagebundle_vi.properties +4 -0
  877. package/src/i18n/messagebundle_zh_CN.properties +4 -0
  878. package/src/i18n/messagebundle_zh_TW.properties +4 -0
  879. package/src/popup-utils/{OpenedPopupsRegistry.js → OpenedPopupsRegistry.ts} +31 -5
  880. package/src/popup-utils/{PopoverRegistry.js → PopoverRegistry.ts} +50 -29
  881. package/src/themes/Avatar.css +5 -2
  882. package/src/themes/BusyIndicator.css +1 -1
  883. package/src/themes/Button.css +14 -13
  884. package/src/themes/CardHeader.css +19 -2
  885. package/src/themes/Carousel.css +4 -4
  886. package/src/themes/DatePicker.css +7 -1
  887. package/src/themes/Dialog.css +2 -2
  888. package/src/themes/Icon.css +37 -0
  889. package/src/themes/Input.css +26 -2
  890. package/src/themes/ListItem.css +20 -2
  891. package/src/themes/MultiComboBox.css +0 -4
  892. package/src/themes/MultiInput.css +1 -5
  893. package/src/themes/RadioButton.css +6 -6
  894. package/src/themes/Select.css +1 -1
  895. package/src/themes/TabInStrip.css +10 -10
  896. package/src/themes/Table.css +1 -1
  897. package/src/themes/TableCell.css +4 -0
  898. package/src/themes/TableRow.css +9 -0
  899. package/src/themes/TextArea.css +16 -23
  900. package/src/themes/Tokenizer.css +1 -1
  901. package/src/themes/ValueStateMessage.css +9 -1
  902. package/src/themes/base/Avatar-parameters.css +1 -0
  903. package/src/themes/base/Input-parameters.css +11 -1
  904. package/src/themes/base/Select-parameters.css +1 -1
  905. package/src/themes/base/TextArea-parameters.css +18 -0
  906. package/src/themes/base/Tokenizer-parameters.css +1 -0
  907. package/src/themes/base/sizes-parameters.css +1 -9
  908. package/src/themes/sap_belize/TextArea-parameters.css +8 -0
  909. package/src/themes/sap_belize_hcb/TextArea-parameters.css +8 -0
  910. package/src/themes/sap_belize_hcw/TextArea-parameters.css +8 -0
  911. package/src/themes/sap_fiori_3_hcb/TextArea-parameters.css +13 -3
  912. package/src/themes/sap_fiori_3_hcw/TextArea-parameters.css +13 -3
  913. package/src/themes/sap_horizon/CheckBox-parameters.css +1 -0
  914. package/src/themes/sap_horizon/Input-parameters.css +3 -0
  915. package/src/themes/sap_horizon/TextArea-parameters.css +14 -0
  916. package/src/themes/sap_horizon/Tokenizer-parameters.css +5 -0
  917. package/src/themes/sap_horizon/parameters-bundle.css +1 -1
  918. package/src/themes/sap_horizon_dark/Input-parameters.css +3 -0
  919. package/src/themes/sap_horizon_dark/ListItemBase-parameters.css +0 -1
  920. package/src/themes/sap_horizon_dark/TextArea-parameters.css +14 -0
  921. package/src/themes/sap_horizon_dark/Tokenizer-parameters.css +5 -0
  922. package/src/themes/sap_horizon_dark/parameters-bundle.css +1 -1
  923. package/src/themes/sap_horizon_exp/Select-parameters.css +1 -1
  924. package/src/themes/sap_horizon_hcb/Input-parameters.css +1 -0
  925. package/src/themes/sap_horizon_hcb/TextArea-parameters.css +15 -6
  926. package/src/themes/sap_horizon_hcw/Input-parameters.css +1 -0
  927. package/src/themes/sap_horizon_hcw/TextArea-parameters.css +15 -6
  928. package/src/timepicker-utils/{TimeSlider.js → TimeSlider.ts} +26 -9
  929. package/src/types/AvatarColorScheme.ts +89 -0
  930. package/src/types/AvatarGroupType.ts +28 -0
  931. package/src/types/AvatarShape.ts +26 -0
  932. package/src/types/AvatarSize.ts +52 -0
  933. package/src/types/BreadcrumbsDesign.ts +28 -0
  934. package/src/types/BreadcrumbsSeparatorStyle.ts +55 -0
  935. package/src/types/BusyIndicatorSize.ts +33 -0
  936. package/src/types/ButtonDesign.ts +54 -0
  937. package/src/types/CalendarSelectionMode.ts +33 -0
  938. package/src/types/CarouselArrowsPlacement.ts +26 -0
  939. package/src/types/CarouselPageIndicatorStyle.ts +27 -0
  940. package/src/types/HasPopup.ts +47 -0
  941. package/src/types/IconDesign.ts +68 -0
  942. package/src/types/{InputType.js → InputType.ts} +13 -27
  943. package/src/types/LinkDesign.ts +33 -0
  944. package/src/types/ListGrowingMode.ts +34 -0
  945. package/src/types/ListItemType.ts +40 -0
  946. package/src/types/{ListMode.js → ListMode.ts} +14 -28
  947. package/src/types/ListSeparators.ts +32 -0
  948. package/src/types/MessageStripDesign.ts +40 -0
  949. package/src/types/PanelAccessibleRole.ts +37 -0
  950. package/src/types/PopoverHorizontalAlign.ts +40 -0
  951. package/src/types/PopoverPlacementType.ts +40 -0
  952. package/src/types/PopoverVerticalAlign.ts +40 -0
  953. package/src/types/Priority.ts +40 -0
  954. package/src/types/SemanticColor.ts +47 -0
  955. package/src/types/SwitchDesign.ts +26 -0
  956. package/src/types/TabContainerBackgroundDesign.ts +33 -0
  957. package/src/types/TabContainerTabsPlacement.ts +26 -0
  958. package/src/types/TabLayout.ts +26 -0
  959. package/src/types/TableColumnPopinDisplay.ts +26 -0
  960. package/src/types/TableGrowingMode.ts +34 -0
  961. package/src/types/TableMode.ts +33 -0
  962. package/src/types/TableRowType.ts +26 -0
  963. package/src/types/TabsOverflowMode.ts +26 -0
  964. package/src/types/{TitleLevel.js → TitleLevel.ts} +13 -27
  965. package/src/types/ToastPlacement.ts +77 -0
  966. package/src/types/WrappingType.ts +26 -0
  967. package/tsconfig.json +14 -0
  968. package/dist/assets/ar.7fd1011b.js +0 -1
  969. package/dist/assets/ar_EG.4dd5f305.js +0 -1
  970. package/dist/assets/ar_SA.8c5a937a.js +0 -1
  971. package/dist/assets/bg.a4d82c03.js +0 -1
  972. package/dist/assets/ca.0021f734.js +0 -1
  973. package/dist/assets/cs.0e585b65.js +0 -1
  974. package/dist/assets/da.521611de.js +0 -1
  975. package/dist/assets/de.63fdffdf.js +0 -1
  976. package/dist/assets/de_AT.ea95f993.js +0 -1
  977. package/dist/assets/de_CH.90d5e701.js +0 -1
  978. package/dist/assets/el.3e1beb01.js +0 -1
  979. package/dist/assets/el_CY.209073e0.js +0 -1
  980. package/dist/assets/en.1af5f31c.js +0 -1
  981. package/dist/assets/en_AU.25e8cf38.js +0 -1
  982. package/dist/assets/en_GB.43297e37.js +0 -1
  983. package/dist/assets/en_HK.0da1e0b5.js +0 -1
  984. package/dist/assets/en_IE.c4988873.js +0 -1
  985. package/dist/assets/en_IN.96d721e2.js +0 -1
  986. package/dist/assets/en_NZ.1091e526.js +0 -1
  987. package/dist/assets/en_PG.f028e345.js +0 -1
  988. package/dist/assets/en_SG.8d370bdb.js +0 -1
  989. package/dist/assets/en_ZA.0cbf9d6e.js +0 -1
  990. package/dist/assets/es.37dda275.js +0 -1
  991. package/dist/assets/es_AR.da796f99.js +0 -1
  992. package/dist/assets/es_BO.2b15333c.js +0 -1
  993. package/dist/assets/es_CL.048ca1f2.js +0 -1
  994. package/dist/assets/es_CO.257ed3d6.js +0 -1
  995. package/dist/assets/es_MX.061e6bbb.js +0 -1
  996. package/dist/assets/es_PE.f7c17b7a.js +0 -1
  997. package/dist/assets/es_UY.73781c0c.js +0 -1
  998. package/dist/assets/es_VE.fe0f3310.js +0 -1
  999. package/dist/assets/et.fbe81c9d.js +0 -1
  1000. package/dist/assets/fa.acfcfa4d.js +0 -1
  1001. package/dist/assets/fi.0379b5fc.js +0 -1
  1002. package/dist/assets/fr.f6c58c06.js +0 -1
  1003. package/dist/assets/fr_BE.c6e52c3f.js +0 -1
  1004. package/dist/assets/fr_CA.e3c92112.js +0 -1
  1005. package/dist/assets/fr_CH.fc89bdfc.js +0 -1
  1006. package/dist/assets/fr_LU.4fffec47.js +0 -1
  1007. package/dist/assets/he.ca2cb3e0.js +0 -1
  1008. package/dist/assets/hi.82a0ad5b.js +0 -1
  1009. package/dist/assets/hr.ab15877f.js +0 -1
  1010. package/dist/assets/hu.c3d72d24.js +0 -1
  1011. package/dist/assets/id.163ccc8d.js +0 -1
  1012. package/dist/assets/it_CH.69227571.js +0 -1
  1013. package/dist/assets/ja.18f39a5b.js +0 -1
  1014. package/dist/assets/kk.a697e741.js +0 -1
  1015. package/dist/assets/ko.ebe1e5db.js +0 -1
  1016. package/dist/assets/lt.775927de.js +0 -1
  1017. package/dist/assets/lv.d7e9d5e6.js +0 -1
  1018. package/dist/assets/messagebundle_ca.0d94d392.js +0 -1
  1019. package/dist/assets/messagebundle_cs.fd5eaccc.js +0 -1
  1020. package/dist/assets/messagebundle_cy.ff1e6c97.js +0 -1
  1021. package/dist/assets/messagebundle_da.5ff8a1f1.js +0 -1
  1022. package/dist/assets/messagebundle_de.bff2fc47.js +0 -1
  1023. package/dist/assets/messagebundle_en.fdb7abce.js +0 -1
  1024. package/dist/assets/messagebundle_en_GB.4a95abfb.js +0 -1
  1025. package/dist/assets/messagebundle_en_US_saptrc.71435964.js +0 -1
  1026. package/dist/assets/messagebundle_es.04498029.js +0 -1
  1027. package/dist/assets/messagebundle_es_MX.a39214a3.js +0 -1
  1028. package/dist/assets/messagebundle_et.d2e7cd16.js +0 -1
  1029. package/dist/assets/messagebundle_fi.1aa86ded.js +0 -1
  1030. package/dist/assets/messagebundle_fr.d651062e.js +0 -1
  1031. package/dist/assets/messagebundle_fr_CA.5a066480.js +0 -1
  1032. package/dist/assets/messagebundle_hr.51d15b46.js +0 -1
  1033. package/dist/assets/messagebundle_hu.f66f6bd4.js +0 -1
  1034. package/dist/assets/messagebundle_it.fc18db7c.js +0 -1
  1035. package/dist/assets/messagebundle_iw.61cc9591.js +0 -1
  1036. package/dist/assets/messagebundle_ja.9d222bf0.js +0 -1
  1037. package/dist/assets/messagebundle_ko.c1f9bbe4.js +0 -1
  1038. package/dist/assets/messagebundle_lt.68cc1270.js +0 -1
  1039. package/dist/assets/messagebundle_lv.45ee5e9b.js +0 -1
  1040. package/dist/assets/messagebundle_ms.5c238d83.js +0 -1
  1041. package/dist/assets/messagebundle_nl.42d4c6f9.js +0 -1
  1042. package/dist/assets/messagebundle_no.040efcc2.js +0 -1
  1043. package/dist/assets/messagebundle_pl.180e5190.js +0 -1
  1044. package/dist/assets/messagebundle_pt.8c0b8aa8.js +0 -1
  1045. package/dist/assets/messagebundle_pt_PT.08badb3a.js +0 -1
  1046. package/dist/assets/messagebundle_ro.dc736139.js +0 -1
  1047. package/dist/assets/messagebundle_sh.06513aad.js +0 -1
  1048. package/dist/assets/messagebundle_sk.f8c93117.js +0 -1
  1049. package/dist/assets/messagebundle_sl.e321cf3f.js +0 -1
  1050. package/dist/assets/messagebundle_sv.7c70049d.js +0 -1
  1051. package/dist/assets/messagebundle_tr.b1de509f.js +0 -1
  1052. package/dist/assets/messagebundle_vi.39c09ada.js +0 -1
  1053. package/dist/assets/messagebundle_zh_CN.cb6c2fc4.js +0 -1
  1054. package/dist/assets/messagebundle_zh_TW.38b9d6a7.js +0 -1
  1055. package/dist/assets/ms.d6569411.js +0 -1
  1056. package/dist/assets/nb.e08266d5.js +0 -1
  1057. package/dist/assets/nl.9999541e.js +0 -1
  1058. package/dist/assets/nl_BE.10b9e463.js +0 -1
  1059. package/dist/assets/parameters-bundle.css.1f15a001.js +0 -1
  1060. package/dist/assets/parameters-bundle.css.2c92b83f.js +0 -1
  1061. package/dist/assets/parameters-bundle.css.37d45e6a.js +0 -1
  1062. package/dist/assets/parameters-bundle.css.43cfec9f.js +0 -1
  1063. package/dist/assets/parameters-bundle.css.6ac2a3ec.js +0 -1
  1064. package/dist/assets/parameters-bundle.css.8156fdfe.js +0 -1
  1065. package/dist/assets/parameters-bundle.css.9ff9d4cd.js +0 -1
  1066. package/dist/assets/parameters-bundle.css.abcd1057.js +0 -1
  1067. package/dist/assets/parameters-bundle.css.b58e1801.js +0 -1
  1068. package/dist/assets/parameters-bundle.css.d4817fb4.js +0 -1
  1069. package/dist/assets/parameters-bundle.css.dd8f8072.js +0 -1
  1070. package/dist/assets/parameters-bundle.css.feee54fa.js +0 -1
  1071. package/dist/assets/pl.896f748a.js +0 -1
  1072. package/dist/assets/pt.9282da43.js +0 -1
  1073. package/dist/assets/pt_PT.8de6f4a2.js +0 -1
  1074. package/dist/assets/ro.f27aab0d.js +0 -1
  1075. package/dist/assets/ru.925a56df.js +0 -1
  1076. package/dist/assets/ru_UA.066d9903.js +0 -1
  1077. package/dist/assets/sk.cea36c4c.js +0 -1
  1078. package/dist/assets/sl.00e904c8.js +0 -1
  1079. package/dist/assets/sr.5ffa8a72.js +0 -1
  1080. package/dist/assets/sr_Latn.37760dd7.js +0 -1
  1081. package/dist/assets/sv.e8d71660.js +0 -1
  1082. package/dist/assets/th.9c7b50b0.js +0 -1
  1083. package/dist/assets/tr.0a0fb3ee.js +0 -1
  1084. package/dist/assets/uk.7ee1da23.js +0 -1
  1085. package/dist/assets/vi.b1f74e9c.js +0 -1
  1086. package/dist/assets/zh_CN.a1d71c11.js +0 -1
  1087. package/dist/assets/zh_HK.a47dd921.js +0 -1
  1088. package/dist/assets/zh_SG.1cd17a31.js +0 -1
  1089. package/dist/assets/zh_TW.b03069d7.js +0 -1
  1090. package/dist/types/GrowingMode.js +0 -48
  1091. package/src/Avatar.js +0 -451
  1092. package/src/Badge.js +0 -151
  1093. package/src/BreadcrumbsItem.js +0 -103
  1094. package/src/Button.js +0 -513
  1095. package/src/CalendarDate.js +0 -45
  1096. package/src/CalendarHeader.js +0 -213
  1097. package/src/CardHeader.js +0 -283
  1098. package/src/CheckBox.js +0 -471
  1099. package/src/ColorPaletteItem.js +0 -137
  1100. package/src/ColorPicker.js +0 -600
  1101. package/src/CustomListItem.js +0 -99
  1102. package/src/DateComponentBase.js +0 -168
  1103. package/src/FileUploader.js +0 -533
  1104. package/src/Filters.js +0 -28
  1105. package/src/GroupHeaderListItem.js +0 -94
  1106. package/src/Label.js +0 -158
  1107. package/src/Link.js +0 -410
  1108. package/src/List.js +0 -1120
  1109. package/src/ListItem.js +0 -428
  1110. package/src/ListItemBase.js +0 -181
  1111. package/src/Menu.js +0 -502
  1112. package/src/MenuItem.js +0 -193
  1113. package/src/MessageStrip.js +0 -256
  1114. package/src/StandardListItem.js +0 -207
  1115. package/src/SuggestionGroupItem.js +0 -64
  1116. package/src/SuggestionItem.js +0 -146
  1117. package/src/Switch.js +0 -306
  1118. package/src/Table.js +0 -1200
  1119. package/src/TableColumn.js +0 -129
  1120. package/src/TableGroupRow.js +0 -167
  1121. package/src/TableRow.js +0 -464
  1122. package/src/Title.js +0 -132
  1123. package/src/types/AvatarColorScheme.js +0 -104
  1124. package/src/types/AvatarGroupType.js +0 -43
  1125. package/src/types/AvatarShape.js +0 -41
  1126. package/src/types/AvatarSize.js +0 -67
  1127. package/src/types/BreadcrumbsDesign.js +0 -42
  1128. package/src/types/BreadcrumbsSeparatorStyle.js +0 -69
  1129. package/src/types/BusyIndicatorSize.js +0 -47
  1130. package/src/types/ButtonDesign.js +0 -68
  1131. package/src/types/CalendarSelectionMode.js +0 -47
  1132. package/src/types/CarouselArrowsPlacement.js +0 -40
  1133. package/src/types/GrowingMode.js +0 -48
  1134. package/src/types/HasPopup.js +0 -62
  1135. package/src/types/LinkDesign.js +0 -47
  1136. package/src/types/ListGrowingMode.js +0 -48
  1137. package/src/types/ListItemType.js +0 -47
  1138. package/src/types/ListSeparators.js +0 -46
  1139. package/src/types/MessageStripDesign.js +0 -54
  1140. package/src/types/PanelAccessibleRole.js +0 -48
  1141. package/src/types/PopoverHorizontalAlign.js +0 -54
  1142. package/src/types/PopoverPlacementType.js +0 -54
  1143. package/src/types/PopoverVerticalAlign.js +0 -54
  1144. package/src/types/Priority.js +0 -55
  1145. package/src/types/SemanticColor.js +0 -61
  1146. package/src/types/SwitchDesign.js +0 -40
  1147. package/src/types/TabContainerBackgroundDesign.js +0 -48
  1148. package/src/types/TabContainerTabsPlacement.js +0 -40
  1149. package/src/types/TabLayout.js +0 -40
  1150. package/src/types/TableGrowingMode.js +0 -48
  1151. package/src/types/TableMode.js +0 -47
  1152. package/src/types/TableRowType.js +0 -40
  1153. package/src/types/TabsOverflowMode.js +0 -40
  1154. package/src/types/ToastPlacement.js +0 -91
  1155. package/src/types/WrappingType.js +0 -41
package/dist/Input.js CHANGED
@@ -1,26 +1,22 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var Input_1;
1
8
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
9
+ import property from "@ui5/webcomponents-base/dist/decorators/property.js";
10
+ import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
11
+ import event from "@ui5/webcomponents-base/dist/decorators/event.js";
12
+ import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
13
+ import languageAware from "@ui5/webcomponents-base/dist/decorators/languageAware.js";
2
14
  import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
3
15
  import ResizeHandler from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js";
4
- import {
5
- isPhone,
6
- isAndroid,
7
- } from "@ui5/webcomponents-base/dist/Device.js";
16
+ import { isPhone, isAndroid, } from "@ui5/webcomponents-base/dist/Device.js";
8
17
  import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js";
9
18
  import { getFeature } from "@ui5/webcomponents-base/dist/FeaturesRegistry.js";
10
- import {
11
- isUp,
12
- isDown,
13
- isSpace,
14
- isEnter,
15
- isBackSpace,
16
- isDelete,
17
- isEscape,
18
- isTabNext,
19
- isPageUp,
20
- isPageDown,
21
- isHome,
22
- isEnd,
23
- } from "@ui5/webcomponents-base/dist/Keys.js";
19
+ import { isUp, isDown, isSpace, isEnter, isBackSpace, isDelete, isEscape, isTabNext, isPageUp, isPageDown, isHome, isEnd, } from "@ui5/webcomponents-base/dist/Keys.js";
24
20
  import Integer from "@ui5/webcomponents-base/dist/types/Integer.js";
25
21
  import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
26
22
  import { getEffectiveAriaLabelText, getAssociatedLabelForTexts } from "@ui5/webcomponents-base/dist/util/AriaLabelHelper.js";
@@ -38,490 +34,28 @@ import Icon from "./Icon.js";
38
34
  // Templates
39
35
  import InputTemplate from "./generated/templates/InputTemplate.lit.js";
40
36
  import InputPopoverTemplate from "./generated/templates/InputPopoverTemplate.lit.js";
41
- import * as Filters from "./Filters.js";
42
-
43
- import {
44
- VALUE_STATE_SUCCESS,
45
- VALUE_STATE_INFORMATION,
46
- VALUE_STATE_ERROR,
47
- VALUE_STATE_WARNING,
48
- VALUE_STATE_TYPE_SUCCESS,
49
- VALUE_STATE_TYPE_INFORMATION,
50
- VALUE_STATE_TYPE_ERROR,
51
- VALUE_STATE_TYPE_WARNING,
52
- INPUT_SUGGESTIONS,
53
- INPUT_SUGGESTIONS_TITLE,
54
- INPUT_SUGGESTIONS_ONE_HIT,
55
- INPUT_SUGGESTIONS_MORE_HITS,
56
- INPUT_SUGGESTIONS_NO_HIT,
57
- } from "./generated/i18n/i18n-defaults.js";
58
-
37
+ import { StartsWith } from "./Filters.js";
38
+ import { VALUE_STATE_SUCCESS, VALUE_STATE_INFORMATION, VALUE_STATE_ERROR, VALUE_STATE_WARNING, VALUE_STATE_TYPE_SUCCESS, VALUE_STATE_TYPE_INFORMATION, VALUE_STATE_TYPE_ERROR, VALUE_STATE_TYPE_WARNING, INPUT_SUGGESTIONS, INPUT_SUGGESTIONS_TITLE, INPUT_SUGGESTIONS_ONE_HIT, INPUT_SUGGESTIONS_MORE_HITS, INPUT_SUGGESTIONS_NO_HIT,
39
+ // @ts-ignore
40
+ } from "./generated/i18n/i18n-defaults.js";
59
41
  // Styles
60
42
  import styles from "./generated/themes/Input.css.js";
61
43
  import ResponsivePopoverCommonCss from "./generated/themes/ResponsivePopoverCommon.css.js";
62
44
  import ValueStateMessageCss from "./generated/themes/ValueStateMessage.css.js";
63
45
  import SuggestionsCss from "./generated/themes/Suggestions.css.js";
64
-
65
- /**
66
- * @public
67
- */
68
- const metadata = {
69
- tag: "ui5-input",
70
- languageAware: true,
71
- managedSlots: true,
72
- slots: /** @lends sap.ui.webcomponents.main.Input.prototype */ {
73
-
74
- /**
75
- * Defines the icon to be displayed in the component.
76
- *
77
- * @type {sap.ui.webcomponents.main.IIcon[]}
78
- * @slot
79
- * @public
80
- */
81
- icon: {
82
- type: HTMLElement,
83
- },
84
-
85
- /**
86
- * Defines the suggestion items.
87
- * <br><br>
88
- * Example:
89
- * <br><br>
90
- * &lt;ui5-input show-suggestions><br>
91
- * &nbsp;&nbsp;&nbsp;&nbsp;&lt;ui5-suggestion-item text="Item #1">&lt;/ui5-suggestion-item><br>
92
- * &nbsp;&nbsp;&nbsp;&nbsp;&lt;ui5-suggestion-item text="Item #2">&lt;/ui5-suggestion-item><br>
93
- * &lt;/ui5-input>
94
- * <br>
95
- * <ui5-input show-suggestions>
96
- * <ui5-suggestion-group-item text="Group #1"></ui5-suggestion-group-item>
97
- * <ui5-suggestion-item text="Item #1"></ui5-suggestion-item>
98
- * <ui5-suggestion-item text="Item #2"></ui5-suggestion-item>
99
- * <ui5-suggestion-group-item text="Group #2"></ui5-suggestion-group-item>
100
- * <ui5-suggestion-item text="Item #3"></ui5-suggestion-item>
101
- * <ui5-suggestion-item text="Item #4"></ui5-suggestion-item>
102
- * </ui5-input>
103
- * <br><br>
104
- * <b>Note:</b> The suggestions would be displayed only if the <code>showSuggestions</code>
105
- * property is set to <code>true</code>.
106
- * <br><br>
107
- * <b>Note:</b> The <code>&lt;ui5-suggestion-item&gt;</code> and <code>&lt;ui5-suggestion-group-item&gt;</code> are recommended to be used as suggestion items.
108
- * <br><br>
109
- * <b>Note:</b> Importing the Input Suggestions Support feature:
110
- * <br>
111
- * <code>import "@ui5/webcomponents/dist/features/InputSuggestions.js";</code>
112
- * <br>
113
- * automatically imports the <code>&lt;ui5-suggestion-item></code> and <code>&lt;ui5-suggestion-group-item></code> for your convenience.
114
- *
115
- * @type {sap.ui.webcomponents.main.IInputSuggestionItem[]}
116
- * @slot suggestionItems
117
- * @public
118
- */
119
- "default": {
120
- propertyName: "suggestionItems",
121
- type: HTMLElement,
122
- },
123
-
124
- /**
125
- * The slot is used for native <code>input</code> HTML element to enable form submit,
126
- * when <code>name</code> property is set.
127
- * @type {HTMLElement[]}
128
- * @private
129
- */
130
- formSupport: {
131
- type: HTMLElement,
132
- },
133
-
134
- /**
135
- * Defines the value state message that will be displayed as pop up under the component.
136
- * <br><br>
137
- *
138
- * <b>Note:</b> If not specified, a default text (in the respective language) will be displayed.
139
- * <br><br>
140
- * <b>Note:</b> The <code>valueStateMessage</code> would be displayed,
141
- * when the component is in <code>Information</code>, <code>Warning</code> or <code>Error</code> value state.
142
- * <br><br>
143
- * <b>Note:</b> If the component has <code>suggestionItems</code>,
144
- * the <code>valueStateMessage</code> would be displayed as part of the same popover, if used on desktop, or dialog - on phone.
145
- * @type {HTMLElement[]}
146
- * @since 1.0.0-rc.6
147
- * @slot
148
- * @public
149
- */
150
- valueStateMessage: {
151
- type: HTMLElement,
152
- },
153
- },
154
- properties: /** @lends sap.ui.webcomponents.main.Input.prototype */ {
155
-
156
- /**
157
- * Defines whether the component is in disabled state.
158
- * <br><br>
159
- * <b>Note:</b> A disabled component is completely noninteractive.
160
- *
161
- * @type {boolean}
162
- * @defaultvalue false
163
- * @public
164
- */
165
- disabled: {
166
- type: Boolean,
167
- },
168
-
169
- /**
170
- * Defines if characters within the suggestions are to be highlighted
171
- * in case the input value matches parts of the suggestions text.
172
- * <br><br>
173
- * <b>Note:</b> takes effect when <code>showSuggestions</code> is set to <code>true</code>
174
- *
175
- * @type {boolean}
176
- * @defaultvalue false
177
- * @private
178
- * @sicne 1.0.0-rc.8
179
- */
180
- highlight: {
181
- type: Boolean,
182
- },
183
-
184
- /**
185
- * Defines a short hint intended to aid the user with data entry when the
186
- * component has no value.
187
- * @type {string}
188
- * @defaultvalue ""
189
- * @public
190
- */
191
- placeholder: {
192
- type: String,
193
- },
194
-
195
- /**
196
- * Defines whether the component is read-only.
197
- * <br><br>
198
- * <b>Note:</b> A read-only component is not editable,
199
- * but still provides visual feedback upon user interaction.
200
- *
201
- * @type {boolean}
202
- * @defaultvalue false
203
- * @public
204
- */
205
- readonly: {
206
- type: Boolean,
207
- },
208
-
209
- /**
210
- * Defines whether the component is required.
211
- *
212
- * @type {boolean}
213
- * @defaultvalue false
214
- * @public
215
- * @since 1.0.0-rc.3
216
- */
217
- required: {
218
- type: Boolean,
219
- },
220
-
221
- /**
222
- * Defines whether the value will be autcompleted to match an item
223
- *
224
- * @type {boolean}
225
- * @defaultvalue false
226
- * @public
227
- * @since 1.4.0
228
- */
229
- noTypeahead: {
230
- type: Boolean,
231
- },
232
-
233
- /**
234
- * Defines the HTML type of the component.
235
- * Available options are: <code>Text</code>, <code>Email</code>,
236
- * <code>Number</code>, <code>Password</code>, <code>Tel</code>, and <code>URL</code>.
237
- * <br><br>
238
- * <b>Notes:</b>
239
- * <ul>
240
- * <li>The particular effect of this property differs depending on the browser
241
- * and the current language settings, especially for type <code>Number</code>.</li>
242
- * <li>The property is mostly intended to be used with touch devices
243
- * that use different soft keyboard layouts depending on the given input type.</li>
244
- * </ul>
245
- *
246
- * @type {sap.ui.webcomponents.main.types.InputType}
247
- * @defaultvalue "Text"
248
- * @public
249
- */
250
- type: {
251
- type: InputType,
252
- defaultValue: InputType.Text,
253
- },
254
-
255
- /**
256
- * Defines the value of the component.
257
- * <br><br>
258
- * <b>Note:</b> The property is updated upon typing.
259
- *
260
- * @type {string}
261
- * @defaultvalue ""
262
- * @formEvents change input
263
- * @formProperty
264
- * @public
265
- */
266
- value: {
267
- type: String,
268
- },
269
-
270
- /**
271
- * Defines the inner stored value of the component.
272
- * <br><br>
273
- * <b>Note:</b> The property is updated upon typing. In some special cases the old value is kept (e.g. deleting the value after the dot in a float)
274
- *
275
- * @type {string}
276
- * @defaultvalue ""
277
- * @private
278
- */
279
- _innerValue: {
280
- type: String,
281
- noAttribute: true,
282
- },
283
-
284
- /**
285
- * Defines the value state of the component.
286
- * <br><br>
287
- * Available options are:
288
- * <ul>
289
- * <li><code>None</code></li>
290
- * <li><code>Error</code></li>
291
- * <li><code>Warning</code></li>
292
- * <li><code>Success</code></li>
293
- * <li><code>Information</code></li>
294
- * </ul>
295
- *
296
- * @type {sap.ui.webcomponents.base.types.ValueState}
297
- * @defaultvalue "None"
298
- * @public
299
- */
300
- valueState: {
301
- type: ValueState,
302
- defaultValue: ValueState.None,
303
- },
304
-
305
- /**
306
- * Determines the name with which the component will be submitted in an HTML form.
307
- *
308
- * <br><br>
309
- * <b>Important:</b> For the <code>name</code> property to have effect, you must add the following import to your project:
310
- * <code>import "@ui5/webcomponents/dist/features/InputElementsFormSupport.js";</code>
311
- *
312
- * <br><br>
313
- * <b>Note:</b> When set, a native <code>input</code> HTML element
314
- * will be created inside the component so that it can be submitted as
315
- * part of an HTML form. Do not use this property unless you need to submit a form.
316
- *
317
- * @type {string}
318
- * @defaultvalue ""
319
- * @public
320
- */
321
- name: {
322
- type: String,
323
- },
324
-
325
- /**
326
- * Defines whether the component should show suggestions, if such are present.
327
- * <br><br>
328
- * <b>Note:</b> You need to import the <code>InputSuggestions</code> module
329
- * from <code>"@ui5/webcomponents/dist/features/InputSuggestions.js"</code> to enable this functionality.
330
- * @type {boolean}
331
- * @defaultvalue false
332
- * @public
333
- */
334
- showSuggestions: {
335
- type: Boolean,
336
- },
337
-
338
- /**
339
- * Sets the maximum number of characters available in the input field.
340
- * <br><br>
341
- * <b>Note:</b> This property is not compatible with the ui5-input type InputType.Number. If the ui5-input type is set to Number, the maxlength value is ignored.
342
- * @type {sap.ui.webcomponents.base.types.Integer}
343
- * @since 1.0.0-rc.5
344
- * @public
345
- */
346
- maxlength: {
347
- type: Integer,
348
- },
349
-
350
- /**
351
- * Defines the accessible ARIA name of the component.
352
- *
353
- * @type {string}
354
- * @public
355
- * @since 1.0.0-rc.15
356
- */
357
- accessibleName: {
358
- type: String,
359
- },
360
-
361
- /**
362
- * Receives id(or many ids) of the elements that label the input.
363
- *
364
- * @type {string}
365
- * @defaultvalue ""
366
- * @public
367
- * @since 1.0.0-rc.15
368
- */
369
- accessibleNameRef: {
370
- type: String,
371
- defaultValue: "",
372
- },
373
-
374
- /**
375
- * Defines whether the clear icon of the input will be shown.
376
- *
377
- * @type {boolean}
378
- * @defaultvalue false
379
- * @public
380
- * @since 1.2.0
381
- */
382
- showClearIcon: {
383
- type: Boolean,
384
- },
385
-
386
- /**
387
- * Defines whether the clear icon is visible.
388
- *
389
- * @type {boolean}
390
- * @defaultvalue false
391
- * @private
392
- * @since 1.2.0
393
- */
394
- effectiveShowClearIcon: {
395
- type: Boolean,
396
- },
397
-
398
- /**
399
- * @private
400
- */
401
- focused: {
402
- type: Boolean,
403
- },
404
-
405
- openOnMobile: {
406
- type: Boolean,
407
- },
408
-
409
- open: {
410
- type: Boolean,
411
- },
412
-
413
- /**
414
- * Determines whether to manually show the suggestions popover
415
- * @private
416
- */
417
- _forceOpen: {
418
- type: Boolean,
419
- },
420
-
421
- /**
422
- * Indicates whether the visual focus is on the value state header
423
- * @private
424
- */
425
- _isValueStateFocused: {
426
- type: Boolean,
427
- },
428
-
429
- _input: {
430
- type: Object,
431
- },
432
-
433
- _inputAccInfo: {
434
- type: Object,
435
- },
436
-
437
- _nativeInputAttributes: {
438
- type: Object,
439
- },
440
-
441
- _inputWidth: {
442
- type: Integer,
443
- },
444
-
445
- _listWidth: {
446
- type: Integer,
447
- },
448
-
449
- _isPopoverOpen: {
450
- type: Boolean,
451
- noAttribute: true,
452
- },
453
-
454
- _inputIconFocused: {
455
- type: Boolean,
456
- noAttribute: true,
457
- },
458
- },
459
- events: /** @lends sap.ui.webcomponents.main.Input.prototype */ {
460
- /**
461
- * Fired when the input operation has finished by pressing Enter or on focusout.
462
- *
463
- * @event
464
- * @public
465
- */
466
- change: {},
467
-
468
- /**
469
- * Fired when the value of the component changes at each keystroke,
470
- * and when a suggestion item has been selected.
471
- *
472
- * @event
473
- * @public
474
- */
475
- input: {},
476
-
477
- /**
478
- * Fired when a suggestion item, that is displayed in the suggestion popup, is selected.
479
- *
480
- * @event sap.ui.webcomponents.main.Input#suggestion-item-select
481
- * @param {HTMLElement} item The selected item.
482
- * @public
483
- */
484
- "suggestion-item-select": {
485
- detail: {
486
- item: { type: HTMLElement },
487
- },
488
- },
489
-
490
- /**
491
- * Fired when the user navigates to a suggestion item via the ARROW keys,
492
- * as a preview, before the final selection.
493
- *
494
- * @event sap.ui.webcomponents.main.Input#suggestion-item-preview
495
- * @param {HTMLElement} item The previewed suggestion item.
496
- * @param {HTMLElement} targetRef The DOM ref of the suggestion item.
497
- * @public
498
- * @since 1.0.0-rc.8
499
- */
500
- "suggestion-item-preview": {
501
- detail: {
502
- item: { type: HTMLElement },
503
- targetRef: { type: HTMLElement },
504
- },
505
- },
506
-
507
- /**
508
- * Fired when the user scrolls the suggestion popover.
509
- *
510
- * @event sap.ui.webcomponents.main.Input#suggestion-scroll
511
- * @param {Integer} scrollTop The current scroll position.
512
- * @param {HTMLElement} scrollContainer The scroll container.
513
- * @protected
514
- * @since 1.0.0-rc.8
515
- */
516
- "suggestion-scroll": {
517
- detail: {
518
- scrollTop: { type: Integer },
519
- scrollContainer: { type: HTMLElement },
520
- },
521
- },
522
- },
523
- };
524
-
46
+ // all sementic events
47
+ var INPUT_EVENTS;
48
+ (function (INPUT_EVENTS) {
49
+ INPUT_EVENTS["CHANGE"] = "change";
50
+ INPUT_EVENTS["INPUT"] = "input";
51
+ INPUT_EVENTS["SUGGESTION_ITEM_SELECT"] = "suggestion-item-select";
52
+ })(INPUT_EVENTS || (INPUT_EVENTS = {}));
53
+ // all user interactions
54
+ var INPUT_ACTIONS;
55
+ (function (INPUT_ACTIONS) {
56
+ INPUT_ACTIONS["ACTION_ENTER"] = "enter";
57
+ INPUT_ACTIONS["ACTION_USER_INPUT"] = "input";
58
+ })(INPUT_ACTIONS || (INPUT_ACTIONS = {}));
525
59
  /**
526
60
  * @class
527
61
  * <h3 class="comment-api-title">Overview</h3>
@@ -565,1139 +99,1073 @@ const metadata = {
565
99
  *
566
100
  * @constructor
567
101
  * @author SAP SE
568
- * @alias sap.ui.webcomponents.main.Input
569
- * @extends sap.ui.webcomponents.base.UI5Element
102
+ * @alias sap.ui.webc.main.Input
103
+ * @extends sap.ui.webc.base.UI5Element
570
104
  * @tagname ui5-input
571
105
  * @appenddocs SuggestionItem SuggestionGroupItem
572
- * @implements sap.ui.webcomponents.main.IInput
106
+ * @implements sap.ui.webc.main.IInput
573
107
  * @public
574
108
  */
575
- class Input extends UI5Element {
576
- static get metadata() {
577
- return metadata;
578
- }
579
-
580
- static get render() {
581
- return litRender;
582
- }
583
-
584
- static get template() {
585
- return InputTemplate;
586
- }
587
-
588
- static get staticAreaTemplate() {
589
- return InputPopoverTemplate;
590
- }
591
-
592
- static get styles() {
593
- return styles;
594
- }
595
-
596
- static get staticAreaStyles() {
597
- return [ResponsivePopoverCommonCss, ValueStateMessageCss, SuggestionsCss];
598
- }
599
-
600
- constructor() {
601
- super();
602
- // Indicates if there is selected suggestionItem.
603
- this.hasSuggestionItemSelected = false;
604
-
605
- // Represents the value before user moves selection from suggestion item to another
606
- // and its value is updated after each move.
607
- // Note: Used to register and fire "input" event upon [SPACE] or [ENTER].
608
- // Note: The property "value" is updated upon selection move and can`t be used.
609
- this.valueBeforeItemSelection = "";
610
-
611
- // Represents the value before user moves selection between the suggestion items
612
- // and its value remains the same when the user navigates up or down the list.
613
- // Note: Used to cancel selection upon [ESC].
614
- this.valueBeforeItemPreview = "";
615
-
616
- // Indicates if the user selection has been canceled with [ESC].
617
- this.suggestionSelectionCanceled = false;
618
-
619
- // tracks the value between focus in and focus out to detect that change event should be fired.
620
- this.previousValue = undefined;
621
-
622
- // Indicates, if the component is rendering for first time.
623
- this.firstRendering = true;
624
-
625
- // The value that should be highlited.
626
- this.highlightValue = "";
627
-
628
- // The last value confirmed by the user with "ENTER"
629
- this.lastConfirmedValue = "";
630
-
631
- // The value that the user is typed in the input
632
- this.valueBeforeAutoComplete = "";
633
-
634
- // Indicates, if the user is typing. Gets reset once popup is closed
635
- this.isTyping = false;
636
-
637
- // all sementic events
638
- this.EVENT_CHANGE = "change";
639
- this.EVENT_INPUT = "input";
640
- this.EVENT_SUGGESTION_ITEM_SELECT = "suggestion-item-select";
641
-
642
- // all user interactions
643
- this.ACTION_ENTER = "enter";
644
- this.ACTION_USER_INPUT = "input";
645
-
646
- // Suggestions array initialization
647
- this.suggestionsTexts = [];
648
-
649
- this._handleResizeBound = this._handleResize.bind(this);
650
-
651
- this._keepInnerValue = false;
652
- }
653
-
654
- onEnterDOM() {
655
- ResizeHandler.register(this, this._handleResizeBound);
656
- }
657
-
658
- onExitDOM() {
659
- ResizeHandler.deregister(this, this._handleResizeBound);
660
- }
661
-
662
- onBeforeRendering() {
663
- if (!this._keepInnerValue) {
664
- this._innerValue = this.value;
665
- }
666
-
667
- if (this.showSuggestions) {
668
- this.enableSuggestions();
669
- this.suggestionsTexts = this.Suggestions.defaultSlotProperties(this.highlightValue);
670
- }
671
-
672
- this.effectiveShowClearIcon = (this.showClearIcon && !!this.value && !this.readonly && !this.disabled);
673
-
674
- this.FormSupport = getFeature("FormSupport");
675
- const hasItems = this.suggestionItems.length;
676
- const hasValue = !!this.value;
677
- const isFocused = this.shadowRoot.querySelector("input") === getActiveElement();
678
-
679
- if (this._isPhone) {
680
- this.open = this.openOnMobile;
681
- } else if (this._forceOpen) {
682
- this.open = true;
683
- } else {
684
- this.open = hasValue && hasItems && isFocused && this.isTyping;
685
- }
686
-
687
- if (this.FormSupport) {
688
- this.FormSupport.syncNativeHiddenInput(this);
689
- } else if (this.name) {
690
- console.warn(`In order for the "name" property to have effect, you should also: import "@ui5/webcomponents/dist/features/InputElementsFormSupport.js";`); // eslint-disable-line
691
- }
692
-
693
- const value = this.value;
694
- const innerInput = this.getInputDOMRefSync();
695
-
696
- if (!innerInput || !value) {
697
- return;
698
- }
699
-
700
- const autoCompletedChars = innerInput.selectionEnd - innerInput.selectionStart;
701
-
702
- // Typehead causes issues on Android devices, so we disable it for now
703
- // If there is already a selection the autocomplete has already been performed
704
- if (this._shouldAutocomplete && !isAndroid() && !autoCompletedChars && !this._isKeyNavigation) {
705
- const item = this._getFirstMatchingItem(value);
706
-
707
- // Keep the original typed in text intact
708
- this.valueBeforeAutoComplete += value.slice(this.valueBeforeAutoComplete.length, value.length);
709
- this._handleTypeAhead(item, value);
710
- }
711
- }
712
-
713
- async onAfterRendering() {
714
- if (this.Suggestions && this.showSuggestions) {
715
- this.Suggestions.toggle(this.open, {
716
- preventFocusRestore: true,
717
- });
718
-
719
- this._listWidth = await this.Suggestions._getListWidth();
720
- }
721
-
722
- if (this.shouldDisplayOnlyValueStateMessage) {
723
- this.openPopover();
724
- } else {
725
- this.closePopover();
726
- }
727
- }
728
-
729
- _onkeydown(event) {
730
- this._isKeyNavigation = true;
731
- this._shouldAutocomplete = !this.noTypeahead && !(isBackSpace(event) || isDelete(event) || isEscape(event));
732
-
733
- if (isUp(event)) {
734
- return this._handleUp(event);
735
- }
736
-
737
- if (isDown(event)) {
738
- return this._handleDown(event);
739
- }
740
-
741
- if (isSpace(event)) {
742
- return this._handleSpace(event);
743
- }
744
-
745
- if (isTabNext(event)) {
746
- return this._handleTab(event);
747
- }
748
-
749
- if (isEnter(event)) {
750
- return this._handleEnter(event);
751
- }
752
-
753
- if (isPageUp(event)) {
754
- return this._handlePageUp(event);
755
- }
756
-
757
- if (isPageDown(event)) {
758
- return this._handlePageDown(event);
759
- }
760
-
761
- if (isHome(event)) {
762
- return this._handleHome(event);
763
- }
764
-
765
- if (isEnd(event)) {
766
- return this._handleEnd(event);
767
- }
768
-
769
- if (isEscape(event)) {
770
- return this._handleEscape(event);
771
- }
772
-
773
- if (isBackSpace(event)) {
774
- this._selectedText = window.getSelection().toString();
775
- }
776
-
777
- if (this.showSuggestions) {
778
- this._clearPopoverFocusAndSelection();
779
- }
780
-
781
- this._keyDown = true;
782
- this._isKeyNavigation = false;
783
- }
784
-
785
- _onkeyup(event) {
786
- // The native Delete event does not update the value property "on time".
787
- // So, the (native) change event is always fired with the old value
788
- if (isDelete(event)) {
789
- this.value = event.target.value;
790
- }
791
-
792
- this._keyDown = false;
793
- }
794
-
795
- /* Event handling */
796
- _handleUp(event) {
797
- if (this.Suggestions && this.Suggestions.isOpened()) {
798
- this.Suggestions.onUp(event);
799
- }
800
- }
801
-
802
- _handleDown(event) {
803
- if (this.Suggestions && this.Suggestions.isOpened()) {
804
- this.Suggestions.onDown(event);
805
- }
806
- }
807
-
808
- _handleSpace(event) {
809
- if (this.Suggestions) {
810
- this.Suggestions.onSpace(event);
811
- }
812
- }
813
-
814
- _handleTab(event) {
815
- if (this.Suggestions && (this.previousValue !== this.value)) {
816
- this.Suggestions.onTab(event);
817
- }
818
- }
819
-
820
- _handleEnter(event) {
821
- const itemPressed = !!(this.Suggestions && this.Suggestions.onEnter(event));
822
- const innerInput = this.getInputDOMRefSync();
823
- // Check for autocompleted item
824
- const matchingItem = this.suggestionItems.find(item => {
825
- return (item.text && item.text === this.value) || (item.textContent === this.value);
826
- });
827
-
828
- if (matchingItem) {
829
- const itemText = matchingItem.text ? matchingItem.text : matchingItem.textContent;
830
-
831
- this.getInputDOMRefSync().setSelectionRange(itemText.length, itemText.length);
832
- if (!itemPressed) {
833
- this.selectSuggestion(matchingItem, true);
834
- this.open = false;
835
- }
836
- }
837
-
838
- if (this._isPhone && !this.suggestionItems.length) {
839
- innerInput.setSelectionRange(this.value.length, this.value.length);
840
- }
841
-
842
- if (!itemPressed) {
843
- this.lastConfirmedValue = this.value;
844
-
845
- if (this.FormSupport) {
846
- this.FormSupport.triggerFormSubmit(this);
847
- }
848
-
849
- return;
850
- }
851
-
852
- this.focused = true;
853
- }
854
-
855
- _handlePageUp(event) {
856
- if (this._isSuggestionsFocused) {
857
- this.Suggestions.onPageUp(event);
858
- } else {
859
- event.preventDefault();
860
- }
861
- }
862
-
863
- _handlePageDown(event) {
864
- if (this._isSuggestionsFocused) {
865
- this.Suggestions.onPageDown(event);
866
- } else {
867
- event.preventDefault();
868
- }
869
- }
870
-
871
- _handleHome(event) {
872
- if (this._isSuggestionsFocused) {
873
- this.Suggestions.onHome(event);
874
- }
875
- }
876
-
877
- _handleEnd(event) {
878
- if (this._isSuggestionsFocused) {
879
- this.Suggestions.onEnd(event);
880
- }
881
- }
882
-
883
- _handleEscape() {
884
- const hasSuggestions = this.showSuggestions && !!this.Suggestions;
885
- const isOpen = hasSuggestions && this.open;
886
- const innerInput = this.getInputDOMRefSync();
887
- const isAutoCompleted = innerInput.selectionEnd - innerInput.selectionStart > 0;
888
-
889
- this.isTyping = false;
890
-
891
- if (!isOpen) {
892
- this.value = this.lastConfirmedValue ? this.lastConfirmedValue : this.previousValue;
893
- return;
894
- }
895
-
896
- if (hasSuggestions && isOpen && this.Suggestions._isItemOnTarget()) {
897
- // Restore the value.
898
- this.value = this.valueBeforeAutoComplete || this.valueBeforeItemPreview;
899
-
900
- // Mark that the selection has been canceled, so the popover can close
901
- // and not reopen, due to receiving focus.
902
- this.suggestionSelectionCanceled = true;
903
- this.focused = true;
904
-
905
- return;
906
- }
907
-
908
- if (isAutoCompleted) {
909
- this.value = this.valueBeforeAutoComplete;
910
- }
911
-
912
- if (this._isValueStateFocused) {
913
- this._isValueStateFocused = false;
914
- this.focused = true;
915
- }
916
- }
917
-
918
- async _onfocusin(event) {
919
- await this.getInputDOMRef();
920
-
921
- this.valueBeforeAutoComplete = "";
922
- this.focused = true; // invalidating property
923
- this.previousValue = this.value;
924
- this.valueBeforeItemPreview = this.value;
925
-
926
- this._inputIconFocused = event.target && event.target === this.querySelector("[ui5-icon]");
927
- }
928
-
929
- _onfocusout(event) {
930
- const focusedOutToSuggestions = this.Suggestions && event.relatedTarget && event.relatedTarget.shadowRoot && event.relatedTarget.shadowRoot.contains(this.Suggestions.responsivePopover);
931
- const focusedOutToValueStateMessage = event.relatedTarget && event.relatedTarget.shadowRoot && event.relatedTarget.shadowRoot.querySelector(".ui5-valuestatemessage-root");
932
-
933
- this._keepInnerValue = false;
934
-
935
- if (this.showClearIcon && !this.effectiveShowClearIcon) {
936
- this._clearIconClicked = false;
937
- this._handleChange();
938
- }
939
-
940
- // if focusout is triggered by pressing on suggestion item or value state message popover, skip invalidation, because re-rendering
941
- // will happen before "itemPress" event, which will make item "active" state not visualized
942
- if (focusedOutToSuggestions || focusedOutToValueStateMessage) {
943
- event.stopImmediatePropagation();
944
- return;
945
- }
946
-
947
- const toBeFocused = event.relatedTarget;
948
-
949
- if (toBeFocused && toBeFocused.classList.contains(this._id)) {
950
- return;
951
- }
952
-
953
- this.open = false;
954
- this._clearPopoverFocusAndSelection();
955
-
956
- this.previousValue = "";
957
- this.lastConfirmedValue = "";
958
- this.focused = false; // invalidating property
959
- this.isTyping = false;
960
- this._forceOpen = false;
961
- }
962
-
963
- _clearPopoverFocusAndSelection() {
964
- if (!this.showSuggestions || !this.Suggestions) {
965
- return;
966
- }
967
-
968
- this._isValueStateFocused = false;
969
- this.hasSuggestionItemSelected = false;
970
-
971
- this.Suggestions._deselectItems();
972
- this.Suggestions._clearItemFocus();
973
- }
974
-
975
- _click(event) {
976
- if (isPhone() && !this.readonly && this.Suggestions) {
977
- this.blur();
978
- this.openOnMobile = true;
979
- }
980
- }
981
-
982
- _handleChange() {
983
- if (this._clearIconClicked) {
984
- this._clearIconClicked = false;
985
- return;
986
- }
987
-
988
- if (this.previousValue !== this.getInputDOMRefSync().value) {
989
- this.previousValue = this.getInputDOMRefSync().value;
990
- this.fireEvent(this.EVENT_CHANGE);
991
- }
992
- }
993
-
994
- _clear() {
995
- this.value = "";
996
- this.fireEvent(this.EVENT_INPUT);
997
- if (!this._isPhone) {
998
- this.focus();
999
- }
1000
- }
1001
-
1002
- _iconMouseDown() {
1003
- this._clearIconClicked = true;
1004
- }
1005
-
1006
- _scroll(event) {
1007
- const detail = event.detail;
1008
- this.fireEvent("suggestion-scroll", {
1009
- scrollTop: detail.scrollTop,
1010
- scrollContainer: detail.targetRef,
1011
- });
1012
- }
1013
-
1014
- _handleInput(event) {
1015
- const inputDomRef = this.getInputDOMRefSync();
1016
- const emptyValueFiredOnNumberInput = this.value && this.isTypeNumber && !inputDomRef.value;
1017
- const eventType = event.inputType || (event.detail && event.detail.inputType);
1018
- this._keepInnerValue = false;
1019
-
1020
- const allowedEventTypes = [
1021
- "deleteWordBackward",
1022
- "deleteWordForward",
1023
- "deleteSoftLineBackward",
1024
- "deleteSoftLineForward",
1025
- "deleteEntireSoftLine",
1026
- "deleteHardLineBackward",
1027
- "deleteHardLineForward",
1028
- "deleteByDrag",
1029
- "deleteByCut",
1030
- "deleteContent",
1031
- "deleteContentBackward",
1032
- "deleteContentForward",
1033
- "historyUndo",
1034
- ];
1035
-
1036
- this._shouldAutocomplete = !allowedEventTypes.includes(eventType) && !this.noTypeahead;
1037
- this.suggestionSelectionCanceled = false;
1038
-
1039
- // ---- Special cases of numeric Input ----
1040
- // ---------------- Start -----------------
1041
-
1042
- // When the last character after the delimiter is removed.
1043
- // In such cases, we want to skip the re-rendering of the
1044
- // component as this leads to cursor repositioning and causes user experience issues.
1045
-
1046
- // There are few scenarios:
1047
- // Example: type "123.4" and press BACKSPACE - the native input is firing event with the whole part as value (123).
1048
- // Pressing BACKSPACE again will remove the delimiter and the native input will fire event with the whole part as value again (123).
1049
- // Example: type "123.456", select/mark "456" and press BACKSPACE - the native input is firing event with the whole part as value (123).
1050
- // Example: type "123.456", select/mark "123.456" and press BACKSPACE - the native input is firing event with empty value.
1051
- const delimiterCase = this.isTypeNumber
1052
- && (event.inputType === "deleteContentForward" || event.inputType === "deleteContentBackward")
1053
- && !event.target.value.includes(".")
1054
- && this.value.includes(".");
1055
-
1056
- // Handle special numeric notation with "e", example "12.5e12"
1057
- const eNotationCase = emptyValueFiredOnNumberInput && event.data === "e";
1058
-
1059
- // Handle special numeric notation with "-", example "-3"
1060
- // When pressing BACKSPACE, the native input fires event with empty value
1061
- const minusRemovalCase = emptyValueFiredOnNumberInput
1062
- && this.value.startsWith("-")
1063
- && this.value.length === 2
1064
- && (event.inputType === "deleteContentForward" || event.inputType === "deleteContentBackward");
1065
-
1066
- if (delimiterCase || eNotationCase || minusRemovalCase) {
1067
- this.value = event.target.value;
1068
- this._keepInnerValue = true;
1069
- }
1070
- // ----------------- End ------------------
1071
-
1072
- if (event.target === inputDomRef) {
1073
- this.focused = true;
1074
-
1075
- // stop the native event, as the semantic "input" would be fired.
1076
- event.stopImmediatePropagation();
1077
- }
1078
-
1079
- this.fireEventByAction(this.ACTION_USER_INPUT, event);
1080
-
1081
- this.hasSuggestionItemSelected = false;
1082
- this._isValueStateFocused = false;
1083
-
1084
- if (this.Suggestions) {
1085
- this.Suggestions.updateSelectedItemPosition(null);
1086
- }
1087
-
1088
- this.isTyping = true;
1089
- }
1090
-
1091
- _startsWithMatchingItems(str) {
1092
- const textProp = this.suggestionItems[0].text ? "text" : "textContent";
1093
- return Filters.StartsWith(str, this.suggestionItems, textProp);
1094
- }
1095
-
1096
- _getFirstMatchingItem(current) {
1097
- if (!this.suggestionItems.length) {
1098
- return;
1099
- }
1100
-
1101
- const matchingItems = this._startsWithMatchingItems(current).filter(item => !item.groupItem);
1102
-
1103
- if (matchingItems.length) {
1104
- return matchingItems[0];
1105
- }
1106
- }
1107
-
1108
- _handleTypeAhead(item, filterValue) {
1109
- if (!item) {
1110
- return;
1111
- }
1112
-
1113
- const value = item.text ? item.text : item.textContent || "";
1114
- const innerInput = this.getInputDOMRefSync();
1115
-
1116
- filterValue = filterValue || "";
1117
- this._innerValue = value;
1118
- this.value = value;
1119
-
1120
- innerInput.value = value;
1121
- setTimeout(() => {
1122
- innerInput.setSelectionRange(filterValue.length, value.length);
1123
- }, 0);
1124
-
1125
- this._shouldAutocomplete = false;
1126
- }
1127
-
1128
- _handleResize() {
1129
- this._inputWidth = this.offsetWidth;
1130
- }
1131
-
1132
- _closeRespPopover(preventFocusRestore) {
1133
- this.Suggestions.close(preventFocusRestore);
1134
- }
1135
-
1136
- async _afterOpenPopover() {
1137
- // Set initial focus to the native input
1138
- if (isPhone()) {
1139
- (await this.getInputDOMRef()).focus();
1140
- }
1141
- }
1142
-
1143
- _afterClosePopover() {
1144
- this.announceSelectedItem();
1145
-
1146
- // close device's keyboard and prevent further typing
1147
- if (isPhone()) {
1148
- this.blur();
1149
- this.focused = false;
1150
- }
1151
-
1152
- this.openOnMobile = false;
1153
- this.open = false;
1154
- this._forceOpen = false;
1155
- }
1156
-
1157
- /**
1158
- * Checks if the value state popover is open.
1159
- * @returns {boolean} true if the value state popover is open, false otherwise
1160
- */
1161
- isValueStateOpened() {
1162
- return !!this._isPopoverOpen;
1163
- }
1164
-
1165
- async openPopover() {
1166
- const popover = await this._getPopover();
1167
-
1168
- if (popover) {
1169
- this._isPopoverOpen = true;
1170
- popover.showAt(this);
1171
- }
1172
- }
1173
-
1174
- async closePopover() {
1175
- const popover = await this._getPopover();
1176
-
1177
- popover && popover.close();
1178
- }
1179
-
1180
- async _getPopover() {
1181
- const staticAreaItem = await this.getStaticAreaItemDomRef();
1182
- return staticAreaItem && staticAreaItem.querySelector("[ui5-popover]");
1183
- }
1184
-
1185
- /**
1186
- * Manually opens the suggestions popover, assuming suggestions are enabled. Items must be preloaded for it to open.
1187
- * @since 1.3.0
1188
- * @public
1189
- */
1190
- openPicker() {
1191
- if (!this.suggestionItems.length || this.disabled || this.readonly) {
1192
- return;
1193
- }
1194
-
1195
- this._forceOpen = true;
1196
- }
1197
-
1198
- enableSuggestions() {
1199
- if (this.Suggestions) {
1200
- return;
1201
- }
1202
-
1203
- const Suggestions = getFeature("InputSuggestions");
1204
-
1205
- if (Suggestions) {
1206
- this.Suggestions = new Suggestions(this, "suggestionItems", true);
1207
- } else {
1208
- throw new Error(`You have to import "@ui5/webcomponents/dist/features/InputSuggestions.js" module to use ui5-input suggestions`);
1209
- }
1210
- }
1211
-
1212
- selectSuggestion(item, keyboardUsed) {
1213
- if (item.group) {
1214
- return;
1215
- }
1216
-
1217
- const innerInput = this.getInputDOMRefSync();
1218
- const value = this.valueBeforeAutoComplete || this.value;
1219
- const itemText = item.text || item.textContent; // keep textContent for compatibility
1220
- const fireInput = keyboardUsed
1221
- ? this.valueBeforeItemSelection !== itemText : value !== itemText;
1222
-
1223
- this.hasSuggestionItemSelected = true;
1224
-
1225
- if (fireInput) {
1226
- this.value = itemText;
1227
- this.valueBeforeItemSelection = itemText;
1228
- this.lastConfirmedValue = itemText;
1229
- this.getInputDOMRefSync().value = itemText;
1230
- this.fireEvent(this.EVENT_INPUT);
1231
- this._handleChange();
1232
- innerInput.setSelectionRange(this.value.length, this.value.length);
1233
- }
1234
-
1235
- this.valueBeforeItemPreview = "";
1236
- this.suggestionSelectionCanceled = false;
1237
-
1238
- this.fireEvent(this.EVENT_SUGGESTION_ITEM_SELECT, { item });
1239
-
1240
- this.isTyping = false;
1241
- this.openOnMobile = false;
1242
- this._forceOpen = false;
1243
- }
1244
-
1245
- previewSuggestion(item) {
1246
- this.valueBeforeItemSelection = this.value;
1247
- this.updateValueOnPreview(item);
1248
- this.announceSelectedItem();
1249
- this._previewItem = item;
1250
- }
1251
-
1252
- /**
1253
- * Updates the input value on item preview.
1254
- * @param {Object} item The item that is on preview
1255
- */
1256
- updateValueOnPreview(item) {
1257
- const noPreview = item.type === "Inactive" || item.group;
1258
- const innerInput = this.getInputDOMRefSync();
1259
- const itemValue = noPreview ? this.valueBeforeItemPreview : (item.effectiveTitle || item.textContent);
1260
-
1261
- this.value = itemValue;
1262
- innerInput.value = itemValue;
1263
- innerInput.setSelectionRange(this.valueBeforeAutoComplete.length, this.value.length);
1264
- }
1265
-
1266
- /**
1267
- * The suggestion item on preview.
1268
- * @type {sap.ui.webcomponents.main.IInputSuggestionItem}
1269
- * @readonly
1270
- * @public
1271
- */
1272
- get previewItem() {
1273
- if (!this._previewItem) {
1274
- return null;
1275
- }
1276
-
1277
- return this.getSuggestionByListItem(this._previewItem);
1278
- }
1279
-
1280
- async fireEventByAction(action, event) {
1281
- if (this.disabled || this.readonly) {
1282
- return;
1283
- }
1284
-
1285
- const inputValue = await this.getInputValue();
1286
- const isUserInput = action === this.ACTION_USER_INPUT;
1287
-
1288
- this.value = inputValue;
1289
- this.highlightValue = inputValue;
1290
- this.valueBeforeItemPreview = inputValue;
1291
-
1292
- if (isUserInput) { // input
1293
- this.fireEvent(this.EVENT_INPUT, { inputType: event.inputType });
1294
- // Angular two way data binding
1295
- this.fireEvent("value-changed");
1296
- }
1297
- }
1298
-
1299
- async getInputValue() {
1300
- const domRef = this.getDomRef();
1301
-
1302
- if (domRef) {
1303
- return (await this.getInputDOMRef()).value;
1304
- }
1305
- return "";
1306
- }
1307
-
1308
- async getInputDOMRef() {
1309
- if (isPhone() && this.Suggestions) {
1310
- await this.Suggestions._getSuggestionPopover();
1311
- return this.Suggestions && this.Suggestions.responsivePopover.querySelector(".ui5-input-inner-phone");
1312
- }
1313
-
1314
- return this.nativeInput;
1315
- }
1316
-
1317
- getInputDOMRefSync() {
1318
- if (isPhone() && this.Suggestions && this.Suggestions.responsivePopover) {
1319
- return this.Suggestions.responsivePopover.querySelector(".ui5-input-inner-phone").shadowRoot.querySelector("input");
1320
- }
1321
-
1322
- return this.nativeInput;
1323
- }
1324
-
1325
- /**
1326
- * Returns a reference to the native input element
1327
- * @protected
1328
- */
1329
- get nativeInput() {
1330
- return this.getDomRef() && this.getDomRef().querySelector(`input`);
1331
- }
1332
-
1333
- get nativeInputWidth() {
1334
- return this.nativeInput && this.nativeInput.offsetWidth;
1335
- }
1336
-
1337
- getLabelableElementId() {
1338
- return this.getInputId();
1339
- }
1340
-
1341
- getSuggestionByListItem(item) {
1342
- const key = parseInt(item.getAttribute("data-ui5-key"));
1343
- return this.suggestionItems[key];
1344
- }
1345
-
1346
- /**
1347
- * Returns if the suggestions popover is scrollable.
1348
- * The method returns <code>Promise</code> that resolves to true,
1349
- * if the popup is scrollable and false otherwise.
1350
- * @returns {Promise}
1351
- */
1352
- isSuggestionsScrollable() {
1353
- if (!this.Suggestions) {
1354
- return Promise.resolve(false);
1355
- }
1356
-
1357
- return this.Suggestions._isScrollable();
1358
- }
1359
-
1360
- getInputId() {
1361
- return `${this._id}-inner`;
1362
- }
1363
-
1364
- /* Suggestions interface */
1365
- onItemFocused() {}
1366
-
1367
- onItemMouseOver(event) {
1368
- const item = event.target;
1369
- const suggestion = this.getSuggestionByListItem(item);
1370
- suggestion && suggestion.fireEvent("mouseover", {
1371
- item: suggestion,
1372
- targetRef: item,
1373
- });
1374
- }
1375
-
1376
- onItemMouseOut(event) {
1377
- const item = event.target;
1378
- const suggestion = this.getSuggestionByListItem(item);
1379
- suggestion && suggestion.fireEvent("mouseout", {
1380
- item: suggestion,
1381
- targetRef: item,
1382
- });
1383
- }
1384
-
1385
- onItemMouseDown(event) {
1386
- event.preventDefault();
1387
- }
1388
-
1389
- onItemSelected(item, keyboardUsed) {
1390
- this.selectSuggestion(item, keyboardUsed);
1391
- }
1392
-
1393
- onItemPreviewed(item) {
1394
- this.previewSuggestion(item);
1395
- this.fireEvent("suggestion-item-preview", {
1396
- item: this.getSuggestionByListItem(item),
1397
- targetRef: item,
1398
- });
1399
- }
1400
-
1401
- onOpen() {}
1402
-
1403
- onClose() {}
1404
-
1405
- get valueStateTypeMappings() {
1406
- return {
1407
- "Success": Input.i18nBundle.getText(VALUE_STATE_TYPE_SUCCESS),
1408
- "Information": Input.i18nBundle.getText(VALUE_STATE_TYPE_INFORMATION),
1409
- "Error": Input.i18nBundle.getText(VALUE_STATE_TYPE_ERROR),
1410
- "Warning": Input.i18nBundle.getText(VALUE_STATE_TYPE_WARNING),
1411
- };
1412
- }
1413
-
1414
- valueStateTextMappings() {
1415
- return {
1416
- "Success": Input.i18nBundle.getText(VALUE_STATE_SUCCESS),
1417
- "Information": Input.i18nBundle.getText(VALUE_STATE_INFORMATION),
1418
- "Error": Input.i18nBundle.getText(VALUE_STATE_ERROR),
1419
- "Warning": Input.i18nBundle.getText(VALUE_STATE_WARNING),
1420
- };
1421
- }
1422
-
1423
- announceSelectedItem() {
1424
- const invisibleText = this.shadowRoot.querySelector(`#${this._id}-selectionText`);
1425
-
1426
- if (this.Suggestions && this.Suggestions._isItemOnTarget()) {
1427
- invisibleText.textContent = this.itemSelectionAnnounce;
1428
- } else {
1429
- invisibleText.textContent = "";
1430
- }
1431
- }
1432
-
1433
- get _readonly() {
1434
- return this.readonly && !this.disabled;
1435
- }
1436
-
1437
- get _headerTitleText() {
1438
- return Input.i18nBundle.getText(INPUT_SUGGESTIONS_TITLE);
1439
- }
1440
-
1441
- get inputType() {
1442
- return this.type.toLowerCase();
1443
- }
1444
-
1445
- get isTypeNumber() {
1446
- return this.type === InputType.Number;
1447
- }
1448
-
1449
- get suggestionsTextId() {
1450
- return this.showSuggestions ? `${this._id}-suggestionsText` : "";
1451
- }
1452
-
1453
- get valueStateTextId() {
1454
- return this.hasValueState ? `${this._id}-valueStateDesc` : "";
1455
- }
1456
-
1457
- get accInfo() {
1458
- const ariaHasPopupDefault = this.showSuggestions ? "true" : undefined;
1459
- const ariaAutoCompleteDefault = this.showSuggestions ? "list" : undefined;
1460
- const ariaDescribedBy = this._inputAccInfo.ariaDescribedBy ? `${this.suggestionsTextId} ${this.valueStateTextId} ${this._inputAccInfo.ariaDescribedBy}`.trim() : `${this.suggestionsTextId} ${this.valueStateTextId}`.trim();
1461
-
1462
- return {
1463
- "input": {
1464
- "ariaRoledescription": this._inputAccInfo && (this._inputAccInfo.ariaRoledescription || undefined),
1465
- "ariaDescribedBy": ariaDescribedBy || undefined,
1466
- "ariaInvalid": this.valueState === ValueState.Error ? "true" : undefined,
1467
- "ariaHasPopup": this._inputAccInfo.ariaHasPopup ? this._inputAccInfo.ariaHasPopup : ariaHasPopupDefault,
1468
- "ariaAutoComplete": this._inputAccInfo.ariaAutoComplete ? this._inputAccInfo.ariaAutoComplete : ariaAutoCompleteDefault,
1469
- "role": this._inputAccInfo && this._inputAccInfo.role,
1470
- "ariaControls": this._inputAccInfo && this._inputAccInfo.ariaControls,
1471
- "ariaExpanded": this._inputAccInfo && this._inputAccInfo.ariaExpanded,
1472
- "ariaDescription": this._inputAccInfo && this._inputAccInfo.ariaDescription,
1473
- "ariaLabel": (this._inputAccInfo && this._inputAccInfo.ariaLabel) || getEffectiveAriaLabelText(this) || getAssociatedLabelForTexts(this),
1474
- },
1475
- };
1476
- }
1477
-
1478
- get nativeInputAttributes() {
1479
- return {
1480
- "min": this.isTypeNumber ? this._nativeInputAttributes.min : undefined,
1481
- "max": this.isTypeNumber ? this._nativeInputAttributes.max : undefined,
1482
- "step": this.isTypeNumber ? (this._nativeInputAttributes.step || "any") : undefined,
1483
- };
1484
- }
1485
-
1486
- get ariaValueStateHiddenText() {
1487
- if (!this.hasValueState) {
1488
- return;
1489
- }
1490
-
1491
- if (this.shouldDisplayDefaultValueStateMessage) {
1492
- return `${this.valueStateTypeMappings[this.valueState]} ${this.valueStateText}`;
1493
- }
1494
-
1495
- return `${this.valueStateTypeMappings[this.valueState]}`.concat(" ", this.valueStateMessageText.map(el => el.textContent).join(" "));
1496
- }
1497
-
1498
- get itemSelectionAnnounce() {
1499
- return this.Suggestions ? this.Suggestions.itemSelectionAnnounce : undefined;
1500
- }
1501
-
1502
- get classes() {
1503
- return {
1504
- popover: {
1505
- "ui5-suggestions-popover": !this.isPhone && this.showSuggestions,
1506
- "ui5-suggestions-popover-with-value-state-header": !this.isPhone && this.showSuggestions && this.hasValueStateMessage,
1507
- },
1508
- popoverValueState: {
1509
- "ui5-valuestatemessage-root": true,
1510
- "ui5-valuestatemessage-header": true,
1511
- "ui5-valuestatemessage--success": this.valueState === ValueState.Success,
1512
- "ui5-valuestatemessage--error": this.valueState === ValueState.Error,
1513
- "ui5-valuestatemessage--warning": this.valueState === ValueState.Warning,
1514
- "ui5-valuestatemessage--information": this.valueState === ValueState.Information,
1515
- },
1516
- };
1517
- }
1518
-
1519
- get styles() {
1520
- const remSizeIxPx = parseInt(getComputedStyle(document.documentElement).fontSize);
1521
-
1522
- const stylesObject = {
1523
- popoverHeader: {
1524
- "max-width": `${this._inputWidth}px`,
1525
- },
1526
- suggestionPopoverHeader: {
1527
- "display": this._listWidth === 0 ? "none" : "inline-block",
1528
- "width": `${this._listWidth}px`,
1529
- },
1530
- suggestionsPopover: {
1531
- "min-width": `${this._inputWidth}px`,
1532
- "max-width": (this._inputWidth / remSizeIxPx) > 40 ? `${this._inputWidth}px` : "40rem",
1533
- },
1534
- innerInput: {},
1535
- };
1536
-
1537
- if (this.nativeInputWidth < 48) {
1538
- stylesObject.innerInput.padding = "0";
1539
- }
1540
-
1541
- return stylesObject;
1542
- }
1543
-
1544
- get suggestionSeparators() {
1545
- return "None";
1546
- }
1547
-
1548
- get valueStateMessageText() {
1549
- return this.getSlottedNodes("valueStateMessage").map(el => el.cloneNode(true));
1550
- }
1551
-
1552
- get shouldDisplayOnlyValueStateMessage() {
1553
- return this.hasValueStateMessage && !this.readonly && !this.open && this.focused;
1554
- }
1555
-
1556
- get shouldDisplayDefaultValueStateMessage() {
1557
- return !this.valueStateMessage.length && this.hasValueStateMessage;
1558
- }
1559
-
1560
- get hasValueState() {
1561
- return this.valueState !== ValueState.None;
1562
- }
1563
-
1564
- get hasValueStateMessage() {
1565
- return this.hasValueState && this.valueState !== ValueState.Success
1566
- && (!this._inputIconFocused // Handles the cases when valueStateMessage is forwarded (from datepicker e.g.)
1567
- || (this._isPhone && this.Suggestions)); // Handles Input with suggestions on mobile
1568
- }
1569
-
1570
- get valueStateText() {
1571
- return this.valueStateTextMappings()[this.valueState];
1572
- }
1573
-
1574
- get suggestionsText() {
1575
- return Input.i18nBundle.getText(INPUT_SUGGESTIONS);
1576
- }
1577
-
1578
- get availableSuggestionsCount() {
1579
- if (this.showSuggestions && (this.value || this.Suggestions.isOpened())) {
1580
- switch (this.suggestionsTexts.length) {
1581
- case 0:
1582
- return Input.i18nBundle.getText(INPUT_SUGGESTIONS_NO_HIT);
1583
-
1584
- case 1:
1585
- return Input.i18nBundle.getText(INPUT_SUGGESTIONS_ONE_HIT);
1586
-
1587
- default:
1588
- return Input.i18nBundle.getText(INPUT_SUGGESTIONS_MORE_HITS, this.suggestionsTexts.length);
1589
- }
1590
- }
1591
-
1592
- return undefined;
1593
- }
1594
-
1595
- get step() {
1596
- return this.isTypeNumber ? "any" : undefined;
1597
- }
1598
-
1599
- get _isPhone() {
1600
- return isPhone();
1601
- }
1602
-
1603
- get _isSuggestionsFocused() {
1604
- return !this.focused && this.Suggestions && this.Suggestions.isOpened();
1605
- }
1606
-
1607
- /**
1608
- * Returns the placeholder value.
1609
- * @protected
1610
- */
1611
- get _placeholder() {
1612
- return this.placeholder;
1613
- }
1614
-
1615
- /**
1616
- * This method is relevant for sap_horizon theme only
1617
- */
1618
- get _valueStateInputIcon() {
1619
- const iconPerValueState = {
1620
- Error: `<path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20ZM7.70711 13.7071C7.31658 14.0976 6.68342 14.0976 6.29289 13.7071C5.90237 13.3166 5.90237 12.6834 6.29289 12.2929L8.58579 10L6.29289 7.70711C5.90237 7.31658 5.90237 6.68342 6.29289 6.29289C6.68342 5.90237 7.31658 5.90237 7.70711 6.29289L10 8.58579L12.2929 6.29289C12.6834 5.90237 13.3166 5.90237 13.7071 6.29289C14.0976 6.68342 14.0976 7.31658 13.7071 7.70711L11.4142 10L13.7071 12.2929C14.0976 12.6834 14.0976 13.3166 13.7071 13.7071C13.3166 14.0976 12.6834 14.0976 12.2929 13.7071L10 11.4142L7.70711 13.7071Z" fill="#EE3939"/>`,
1621
- Warning: `<path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M11.8619 0.49298C11.6823 0.187541 11.3544 0 11 0C10.6456 0 10.3177 0.187541 10.1381 0.49298L0.138066 17.493C-0.0438112 17.8022 -0.0461447 18.1851 0.13195 18.4965C0.310046 18.8079 0.641283 19 1 19H21C21.3587 19 21.69 18.8079 21.868 18.4965C22.0461 18.1851 22.0438 17.8022 21.8619 17.493L11.8619 0.49298ZM11 6C11.5523 6 12 6.44772 12 7V10C12 10.5523 11.5523 11 11 11C10.4477 11 10 10.5523 10 10V7C10 6.44772 10.4477 6 11 6ZM11 16C11.8284 16 12.5 15.3284 12.5 14.5C12.5 13.6716 11.8284 13 11 13C10.1716 13 9.5 13.6716 9.5 14.5C9.5 15.3284 10.1716 16 11 16Z" fill="#F58B00"/>`,
1622
- Success: `<path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M0 10C0 15.5228 4.47715 20 10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0C4.47715 0 0 4.47715 0 10ZM14.7071 6.29289C14.3166 5.90237 13.6834 5.90237 13.2929 6.29289L8 11.5858L6.70711 10.2929C6.31658 9.90237 5.68342 9.90237 5.29289 10.2929C4.90237 10.6834 4.90237 11.3166 5.29289 11.7071L7.29289 13.7071C7.68342 14.0976 8.31658 14.0976 8.70711 13.7071L14.7071 7.70711C15.0976 7.31658 15.0976 6.68342 14.7071 6.29289Z" fill="#36A41D"/>`,
1623
- Information: `<path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M3 0C1.34315 0 0 1.34315 0 3V15C0 16.6569 1.34315 18 3 18H15C16.6569 18 18 16.6569 18 15V3C18 1.34315 16.6569 0 15 0H3ZM9 6.5C9.82843 6.5 10.5 5.82843 10.5 5C10.5 4.17157 9.82843 3.5 9 3.5C8.17157 3.5 7.5 4.17157 7.5 5C7.5 5.82843 8.17157 6.5 9 6.5ZM9 8.5C9.55228 8.5 10 8.94772 10 9.5V13.5C10 14.0523 9.55228 14.5 9 14.5C8.44771 14.5 8 14.0523 8 13.5V9.5C8 8.94772 8.44771 8.5 9 8.5Z" fill="#1B90FF"/>`,
1624
- };
1625
-
1626
- const result = `
1627
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="20" viewBox="0 0 20 20" fill="none">
1628
- ${iconPerValueState[this.valueState]};
1629
- </svg>
1630
- `;
1631
-
1632
- return this.valueState !== ValueState.None ? result : "";
1633
- }
1634
-
1635
- get _valueStatePopoverHorizontalAlign() {
1636
- return this.effectiveDir !== "rtl" ? "Left" : "Right";
1637
- }
1638
-
1639
- /**
1640
- * This method is relevant for sap_horizon theme only
1641
- */
1642
- get _valueStateMessageInputIcon() {
1643
- const iconPerValueState = {
1644
- Error: "error",
1645
- Warning: "alert",
1646
- Success: "sys-enter-2",
1647
- Information: "information",
1648
- };
1649
-
1650
- return this.valueState !== ValueState.None ? iconPerValueState[this.valueState] : "";
1651
- }
1652
-
1653
- /**
1654
- * Returns the caret position inside the native input
1655
- * @protected
1656
- */
1657
- getCaretPosition() {
1658
- return getCaretPosition(this.nativeInput);
1659
- }
1660
-
1661
- /**
1662
- * Sets the caret to a certain position inside the native input
1663
- * @protected
1664
- * @param pos
1665
- */
1666
- setCaretPosition(pos) {
1667
- setCaretPosition(this.nativeInput, pos);
1668
- }
1669
-
1670
- /**
1671
- * Removes the fractional part of floating-point number.
1672
- * @param {string} value the numeric value of Input of type "Number"
1673
- */
1674
- removeFractionalPart(value) {
1675
- if (value.includes(".")) {
1676
- return value.slice(0, value.indexOf("."));
1677
- }
1678
- if (value.includes(",")) {
1679
- return value.slice(0, value.indexOf(","));
1680
- }
1681
-
1682
- return value;
1683
- }
1684
-
1685
- static get dependencies() {
1686
- const Suggestions = getFeature("InputSuggestions");
1687
-
1688
- return [Popover, Icon].concat(Suggestions ? Suggestions.dependencies : []);
1689
- }
1690
-
1691
- static async onDefine() {
1692
- const Suggestions = getFeature("InputSuggestions");
1693
-
1694
- [Input.i18nBundle] = await Promise.all([
1695
- getI18nBundle("@ui5/webcomponents"),
1696
- Suggestions ? Suggestions.init() : Promise.resolve(),
1697
- ]);
1698
- }
1699
- }
1700
-
109
+ let Input = Input_1 = class Input extends UI5Element {
110
+ static get render() {
111
+ return litRender;
112
+ }
113
+ static get template() {
114
+ return InputTemplate;
115
+ }
116
+ static get staticAreaTemplate() {
117
+ return InputPopoverTemplate;
118
+ }
119
+ static get styles() {
120
+ return styles;
121
+ }
122
+ static get staticAreaStyles() {
123
+ return [ResponsivePopoverCommonCss, ValueStateMessageCss, SuggestionsCss];
124
+ }
125
+ constructor() {
126
+ super();
127
+ // Indicates if there is selected suggestionItem.
128
+ this.hasSuggestionItemSelected = false;
129
+ // Represents the value before user moves selection from suggestion item to another
130
+ // and its value is updated after each move.
131
+ // Note: Used to register and fire "input" event upon [SPACE] or [ENTER].
132
+ // Note: The property "value" is updated upon selection move and can`t be used.
133
+ this.valueBeforeItemSelection = "";
134
+ // Represents the value before user moves selection between the suggestion items
135
+ // and its value remains the same when the user navigates up or down the list.
136
+ // Note: Used to cancel selection upon [ESC].
137
+ this.valueBeforeItemPreview = "";
138
+ // Indicates if the user selection has been canceled with [ESC].
139
+ this.suggestionSelectionCanceled = false;
140
+ // tracks the value between focus in and focus out to detect that change event should be fired.
141
+ this.previousValue = "";
142
+ // Indicates, if the component is rendering for first time.
143
+ this.firstRendering = true;
144
+ // The typed in value.
145
+ this.typedInValue = "";
146
+ // The last value confirmed by the user with "ENTER"
147
+ this.lastConfirmedValue = "";
148
+ // Indicates, if the user is typing. Gets reset once popup is closed
149
+ this.isTyping = false;
150
+ // Suggestions array initialization
151
+ this.suggestionsTexts = [];
152
+ this._handleResizeBound = this._handleResize.bind(this);
153
+ this._keepInnerValue = false;
154
+ }
155
+ onEnterDOM() {
156
+ ResizeHandler.register(this, this._handleResizeBound);
157
+ }
158
+ onExitDOM() {
159
+ ResizeHandler.deregister(this, this._handleResizeBound);
160
+ }
161
+ onBeforeRendering() {
162
+ if (!this._keepInnerValue) {
163
+ this._innerValue = this.value;
164
+ }
165
+ if (this.showSuggestions) {
166
+ this.enableSuggestions();
167
+ this.suggestionsTexts = this.Suggestions.defaultSlotProperties(this.typedInValue);
168
+ }
169
+ this.effectiveShowClearIcon = (this.showClearIcon && !!this.value && !this.readonly && !this.disabled);
170
+ this.FormSupport = getFeature("FormSupport");
171
+ const hasItems = !!this.suggestionItems.length;
172
+ const hasValue = !!this.value;
173
+ const isFocused = this.shadowRoot.querySelector("input") === getActiveElement();
174
+ if (this._isPhone) {
175
+ this.open = this.openOnMobile;
176
+ }
177
+ else if (this._forceOpen) {
178
+ this.open = true;
179
+ }
180
+ else {
181
+ this.open = hasValue && hasItems && isFocused && this.isTyping;
182
+ }
183
+ if (this.FormSupport) {
184
+ this.FormSupport.syncNativeHiddenInput(this);
185
+ }
186
+ else if (this.name) {
187
+ console.warn(`In order for the "name" property to have effect, you should also: import "@ui5/webcomponents/dist/features/InputElementsFormSupport.js";`); // eslint-disable-line
188
+ }
189
+ const value = this.value;
190
+ const innerInput = this.getInputDOMRefSync();
191
+ if (!innerInput || !value) {
192
+ return;
193
+ }
194
+ const autoCompletedChars = innerInput.selectionEnd - innerInput.selectionStart;
195
+ // Typehead causes issues on Android devices, so we disable it for now
196
+ // If there is already a selection the autocomplete has already been performed
197
+ if (this._shouldAutocomplete && !isAndroid() && !autoCompletedChars && !this._isKeyNavigation) {
198
+ const item = this._getFirstMatchingItem(value);
199
+ if (item) {
200
+ this._handleTypeAhead(item, value);
201
+ }
202
+ }
203
+ }
204
+ async onAfterRendering() {
205
+ if (this.Suggestions && this.showSuggestions) {
206
+ this.Suggestions.toggle(this.open, {
207
+ preventFocusRestore: true,
208
+ });
209
+ this._listWidth = await this.Suggestions._getListWidth();
210
+ }
211
+ if (this.shouldDisplayOnlyValueStateMessage) {
212
+ this.openPopover();
213
+ }
214
+ else {
215
+ this.closePopover();
216
+ }
217
+ }
218
+ _onkeydown(e) {
219
+ this._isKeyNavigation = true;
220
+ this._shouldAutocomplete = !this.noTypeahead && !(isBackSpace(e) || isDelete(e) || isEscape(e));
221
+ if (isUp(e)) {
222
+ return this._handleUp(e);
223
+ }
224
+ if (isDown(e)) {
225
+ return this._handleDown(e);
226
+ }
227
+ if (isSpace(e)) {
228
+ return this._handleSpace(e);
229
+ }
230
+ if (isTabNext(e)) {
231
+ return this._handleTab();
232
+ }
233
+ if (isEnter(e)) {
234
+ return this._handleEnter(e);
235
+ }
236
+ if (isPageUp(e)) {
237
+ return this._handlePageUp(e);
238
+ }
239
+ if (isPageDown(e)) {
240
+ return this._handlePageDown(e);
241
+ }
242
+ if (isHome(e)) {
243
+ return this._handleHome(e);
244
+ }
245
+ if (isEnd(e)) {
246
+ return this._handleEnd(e);
247
+ }
248
+ if (isEscape(e)) {
249
+ return this._handleEscape();
250
+ }
251
+ if (this.showSuggestions) {
252
+ this._clearPopoverFocusAndSelection();
253
+ }
254
+ this._keyDown = true;
255
+ this._isKeyNavigation = false;
256
+ }
257
+ _onkeyup(e) {
258
+ // The native Delete event does not update the value property "on time".
259
+ // So, the (native) change event is always fired with the old value
260
+ if (isDelete(e)) {
261
+ this.value = e.target.value;
262
+ }
263
+ this._keyDown = false;
264
+ }
265
+ _handleUp(e) {
266
+ if (this.Suggestions && this.Suggestions.isOpened()) {
267
+ this.Suggestions.onUp(e);
268
+ }
269
+ }
270
+ _handleDown(e) {
271
+ if (this.Suggestions && this.Suggestions.isOpened()) {
272
+ this.Suggestions.onDown(e);
273
+ }
274
+ }
275
+ _handleSpace(e) {
276
+ if (this.Suggestions) {
277
+ this.Suggestions.onSpace(e);
278
+ }
279
+ }
280
+ _handleTab() {
281
+ if (this.Suggestions && (this.previousValue !== this.value)) {
282
+ this.Suggestions.onTab();
283
+ }
284
+ }
285
+ _handleEnter(e) {
286
+ const itemPressed = !!(this.Suggestions && this.Suggestions.onEnter(e));
287
+ const innerInput = this.getInputDOMRefSync();
288
+ // Check for autocompleted item
289
+ const matchingItem = this.suggestionItems.find(item => {
290
+ return (item.text && item.text === this.value) || (item.textContent === this.value);
291
+ });
292
+ if (matchingItem) {
293
+ const itemText = matchingItem.text ? matchingItem.text : (matchingItem.textContent || "");
294
+ innerInput.setSelectionRange(itemText.length, itemText.length);
295
+ if (!itemPressed) {
296
+ this.selectSuggestion(matchingItem, true);
297
+ this.open = false;
298
+ }
299
+ }
300
+ if (this._isPhone && !this.suggestionItems.length) {
301
+ innerInput.setSelectionRange(this.value.length, this.value.length);
302
+ }
303
+ if (!itemPressed) {
304
+ this.lastConfirmedValue = this.value;
305
+ if (this.FormSupport) {
306
+ this.FormSupport.triggerFormSubmit(this);
307
+ }
308
+ return;
309
+ }
310
+ this.focused = true;
311
+ }
312
+ _handlePageUp(e) {
313
+ if (this._isSuggestionsFocused) {
314
+ this.Suggestions.onPageUp(e);
315
+ }
316
+ else {
317
+ e.preventDefault();
318
+ }
319
+ }
320
+ _handlePageDown(e) {
321
+ if (this._isSuggestionsFocused) {
322
+ this.Suggestions.onPageDown(e);
323
+ }
324
+ else {
325
+ e.preventDefault();
326
+ }
327
+ }
328
+ _handleHome(e) {
329
+ if (this._isSuggestionsFocused) {
330
+ this.Suggestions.onHome(e);
331
+ }
332
+ }
333
+ _handleEnd(e) {
334
+ if (this._isSuggestionsFocused) {
335
+ this.Suggestions.onEnd(e);
336
+ }
337
+ }
338
+ _handleEscape() {
339
+ const hasSuggestions = this.showSuggestions && !!this.Suggestions;
340
+ const isOpen = hasSuggestions && this.open;
341
+ const innerInput = this.getInputDOMRefSync();
342
+ const isAutoCompleted = innerInput.selectionEnd - innerInput.selectionStart > 0;
343
+ this.isTyping = false;
344
+ if (!isOpen) {
345
+ this.value = this.lastConfirmedValue ? this.lastConfirmedValue : this.previousValue;
346
+ return;
347
+ }
348
+ if (isOpen && this.Suggestions._isItemOnTarget()) {
349
+ // Restore the value.
350
+ this.value = this.typedInValue || this.valueBeforeItemPreview;
351
+ // Mark that the selection has been canceled, so the popover can close
352
+ // and not reopen, due to receiving focus.
353
+ this.suggestionSelectionCanceled = true;
354
+ this.focused = true;
355
+ return;
356
+ }
357
+ if (isAutoCompleted) {
358
+ this.value = this.typedInValue;
359
+ }
360
+ if (this._isValueStateFocused) {
361
+ this._isValueStateFocused = false;
362
+ this.focused = true;
363
+ }
364
+ }
365
+ async _onfocusin(e) {
366
+ await this.getInputDOMRef();
367
+ this.focused = true; // invalidating property
368
+ this.previousValue = this.value;
369
+ this.valueBeforeItemPreview = this.value;
370
+ this._inputIconFocused = !!e.target && e.target === this.querySelector("[ui5-icon]");
371
+ }
372
+ _onfocusout(e) {
373
+ const toBeFocused = e.relatedTarget;
374
+ const focusedOutToSuggestions = this.Suggestions && toBeFocused && toBeFocused.shadowRoot && toBeFocused.shadowRoot.contains(this.Suggestions.responsivePopover);
375
+ const focusedOutToValueStateMessage = toBeFocused && toBeFocused.shadowRoot && toBeFocused.shadowRoot.querySelector(".ui5-valuestatemessage-root");
376
+ this._keepInnerValue = false;
377
+ if (this.showClearIcon && !this.effectiveShowClearIcon) {
378
+ this._clearIconClicked = false;
379
+ this._handleChange();
380
+ }
381
+ // if focusout is triggered by pressing on suggestion item or value state message popover, skip invalidation, because re-rendering
382
+ // will happen before "itemPress" event, which will make item "active" state not visualized
383
+ if (focusedOutToSuggestions || focusedOutToValueStateMessage) {
384
+ e.stopImmediatePropagation();
385
+ return;
386
+ }
387
+ if (toBeFocused && (toBeFocused).classList.contains(this._id)) {
388
+ return;
389
+ }
390
+ this.open = false;
391
+ this._clearPopoverFocusAndSelection();
392
+ this.previousValue = "";
393
+ this.lastConfirmedValue = "";
394
+ this.focused = false; // invalidating property
395
+ this.isTyping = false;
396
+ this._forceOpen = false;
397
+ }
398
+ _clearPopoverFocusAndSelection() {
399
+ if (!this.showSuggestions || !this.Suggestions) {
400
+ return;
401
+ }
402
+ this._isValueStateFocused = false;
403
+ this.hasSuggestionItemSelected = false;
404
+ this.Suggestions._deselectItems();
405
+ this.Suggestions._clearItemFocus();
406
+ }
407
+ _click() {
408
+ if (isPhone() && !this.readonly && this.Suggestions) {
409
+ this.blur();
410
+ this.openOnMobile = true;
411
+ }
412
+ }
413
+ _handleChange() {
414
+ if (this._clearIconClicked) {
415
+ this._clearIconClicked = false;
416
+ return;
417
+ }
418
+ if (this.previousValue !== this.getInputDOMRefSync().value) {
419
+ this.previousValue = this.getInputDOMRefSync().value;
420
+ this.fireEvent(INPUT_EVENTS.CHANGE);
421
+ }
422
+ }
423
+ _clear() {
424
+ this.value = "";
425
+ this.fireEvent(INPUT_EVENTS.INPUT);
426
+ if (!this._isPhone) {
427
+ this.focus();
428
+ }
429
+ }
430
+ _iconMouseDown() {
431
+ this._clearIconClicked = true;
432
+ }
433
+ _scroll(e) {
434
+ this.fireEvent("suggestion-scroll", {
435
+ scrollTop: e.detail.scrollTop,
436
+ scrollContainer: e.detail.targetRef,
437
+ });
438
+ }
439
+ _handleInput(e) {
440
+ const inputDomRef = this.getInputDOMRefSync();
441
+ const emptyValueFiredOnNumberInput = this.value && this.isTypeNumber && !inputDomRef.value;
442
+ const eventType = e.inputType
443
+ || (e.detail && e.detail.inputType)
444
+ || "";
445
+ this._keepInnerValue = false;
446
+ const allowedEventTypes = [
447
+ "deleteWordBackward",
448
+ "deleteWordForward",
449
+ "deleteSoftLineBackward",
450
+ "deleteSoftLineForward",
451
+ "deleteEntireSoftLine",
452
+ "deleteHardLineBackward",
453
+ "deleteHardLineForward",
454
+ "deleteByDrag",
455
+ "deleteByCut",
456
+ "deleteContent",
457
+ "deleteContentBackward",
458
+ "deleteContentForward",
459
+ "historyUndo",
460
+ ];
461
+ this._shouldAutocomplete = !allowedEventTypes.includes(eventType) && !this.noTypeahead;
462
+ this.suggestionSelectionCanceled = false;
463
+ if (e instanceof InputEvent) {
464
+ // ---- Special cases of numeric Input ----
465
+ // ---------------- Start -----------------
466
+ // When the last character after the delimiter is removed.
467
+ // In such cases, we want to skip the re-rendering of the
468
+ // component as this leads to cursor repositioning and causes user experience issues.
469
+ // There are few scenarios:
470
+ // Example: type "123.4" and press BACKSPACE - the native input is firing event with the whole part as value (123).
471
+ // Pressing BACKSPACE again will remove the delimiter and the native input will fire event with the whole part as value again (123).
472
+ // Example: type "123.456", select/mark "456" and press BACKSPACE - the native input is firing event with the whole part as value (123).
473
+ // Example: type "123.456", select/mark "123.456" and press BACKSPACE - the native input is firing event with empty value.
474
+ const delimiterCase = this.isTypeNumber
475
+ && (e.inputType === "deleteContentForward" || e.inputType === "deleteContentBackward")
476
+ && !e.target.value.includes(".")
477
+ && this.value.includes(".");
478
+ // Handle special numeric notation with "e", example "12.5e12"
479
+ const eNotationCase = emptyValueFiredOnNumberInput && e.data === "e";
480
+ // Handle special numeric notation with "-", example "-3"
481
+ // When pressing BACKSPACE, the native input fires event with empty value
482
+ const minusRemovalCase = emptyValueFiredOnNumberInput
483
+ && this.value.startsWith("-")
484
+ && this.value.length === 2
485
+ && (e.inputType === "deleteContentForward" || e.inputType === "deleteContentBackward");
486
+ if (delimiterCase || eNotationCase || minusRemovalCase) {
487
+ this.value = e.target.value;
488
+ this._keepInnerValue = true;
489
+ }
490
+ // ----------------- End ------------------
491
+ }
492
+ if (e.target === inputDomRef) {
493
+ this.focused = true;
494
+ // stop the native event, as the semantic "input" would be fired.
495
+ e.stopImmediatePropagation();
496
+ }
497
+ this.fireEventByAction(INPUT_ACTIONS.ACTION_ENTER, e);
498
+ this.hasSuggestionItemSelected = false;
499
+ this._isValueStateFocused = false;
500
+ if (this.Suggestions) {
501
+ this.Suggestions.updateSelectedItemPosition(-1);
502
+ }
503
+ this.isTyping = true;
504
+ }
505
+ _startsWithMatchingItems(str) {
506
+ const textProp = this.suggestionItems[0].text ? "text" : "textContent";
507
+ return StartsWith(str, this.suggestionItems, textProp);
508
+ }
509
+ _getFirstMatchingItem(current) {
510
+ if (!this.suggestionItems.length) {
511
+ return;
512
+ }
513
+ const matchingItems = this._startsWithMatchingItems(current).filter(item => !item.groupItem);
514
+ if (matchingItems.length) {
515
+ return matchingItems[0];
516
+ }
517
+ }
518
+ _handleTypeAhead(item, filterValue) {
519
+ const value = item.text ? item.text : item.textContent || "";
520
+ const innerInput = this.getInputDOMRefSync();
521
+ filterValue = filterValue || "";
522
+ this._innerValue = value;
523
+ this.value = value;
524
+ innerInput.value = value;
525
+ setTimeout(() => {
526
+ innerInput.setSelectionRange(filterValue.length, value.length);
527
+ }, 0);
528
+ this._shouldAutocomplete = false;
529
+ }
530
+ _handleResize() {
531
+ this._inputWidth = this.offsetWidth;
532
+ }
533
+ _closeRespPopover() {
534
+ this.Suggestions.close(true);
535
+ }
536
+ async _afterOpenPopover() {
537
+ // Set initial focus to the native input
538
+ if (isPhone()) {
539
+ (await this.getInputDOMRef()).focus();
540
+ }
541
+ }
542
+ _afterClosePopover() {
543
+ this.announceSelectedItem();
544
+ // close device's keyboard and prevent further typing
545
+ if (isPhone()) {
546
+ this.blur();
547
+ this.focused = false;
548
+ }
549
+ this.openOnMobile = false;
550
+ this.open = false;
551
+ this._forceOpen = false;
552
+ }
553
+ /**
554
+ * Checks if the value state popover is open.
555
+ * @returns {boolean} true if the value state popover is open, false otherwise
556
+ */
557
+ isValueStateOpened() {
558
+ return !!this._isPopoverOpen;
559
+ }
560
+ async openPopover() {
561
+ const popover = await this._getPopover();
562
+ if (popover) {
563
+ this._isPopoverOpen = true;
564
+ popover.showAt(this);
565
+ }
566
+ }
567
+ async closePopover() {
568
+ const popover = await this._getPopover();
569
+ popover && popover.close();
570
+ }
571
+ async _getPopover() {
572
+ const staticAreaItem = await this.getStaticAreaItemDomRef();
573
+ return staticAreaItem.querySelector("[ui5-popover]");
574
+ }
575
+ /**
576
+ * Manually opens the suggestions popover, assuming suggestions are enabled. Items must be preloaded for it to open.
577
+ * @public
578
+ * @method
579
+ * @name sap.ui.webc.main.Input#openPicker
580
+ * @return {void}
581
+ * @since 1.3.0
582
+ */
583
+ openPicker() {
584
+ if (!this.suggestionItems.length || this.disabled || this.readonly) {
585
+ return;
586
+ }
587
+ this._forceOpen = true;
588
+ }
589
+ enableSuggestions() {
590
+ if (this.Suggestions) {
591
+ return;
592
+ }
593
+ const Suggestions = getFeature("InputSuggestions");
594
+ if (Suggestions) {
595
+ this.Suggestions = new Suggestions(this, "suggestionItems", true, false);
596
+ }
597
+ else {
598
+ throw new Error(`You have to import "@ui5/webcomponents/dist/features/InputSuggestions.js" module to use ui5-input suggestions`);
599
+ }
600
+ }
601
+ selectSuggestion(item, keyboardUsed) {
602
+ if (item.groupItem) {
603
+ return;
604
+ }
605
+ const innerInput = this.getInputDOMRefSync();
606
+ const value = this.typedInValue || this.value;
607
+ const itemText = item.text || item.textContent || ""; // keep textContent for compatibility
608
+ const fireInput = keyboardUsed
609
+ ? this.valueBeforeItemSelection !== itemText : value !== itemText;
610
+ this.hasSuggestionItemSelected = true;
611
+ if (fireInput) {
612
+ this.value = itemText;
613
+ this.valueBeforeItemSelection = itemText;
614
+ this.lastConfirmedValue = itemText;
615
+ innerInput.value = itemText;
616
+ this.fireEvent(INPUT_EVENTS.INPUT);
617
+ this._handleChange();
618
+ innerInput.setSelectionRange(this.value.length, this.value.length);
619
+ }
620
+ this.valueBeforeItemPreview = "";
621
+ this.suggestionSelectionCanceled = false;
622
+ this.fireEvent(INPUT_EVENTS.SUGGESTION_ITEM_SELECT, { item });
623
+ this.isTyping = false;
624
+ this.openOnMobile = false;
625
+ this._forceOpen = false;
626
+ }
627
+ previewSuggestion(item) {
628
+ this.valueBeforeItemSelection = this.value;
629
+ this.updateValueOnPreview(item);
630
+ this.announceSelectedItem();
631
+ this._previewItem = item;
632
+ }
633
+ /**
634
+ * Updates the input value on item preview.
635
+ * @param {Object} item The item that is on preview
636
+ */
637
+ updateValueOnPreview(item) {
638
+ const noPreview = item.type === "Inactive" || item.groupItem;
639
+ const innerInput = this.getInputDOMRefSync();
640
+ const itemValue = noPreview ? this.valueBeforeItemPreview : (item.effectiveTitle || item.textContent || "");
641
+ this.value = itemValue;
642
+ innerInput.value = itemValue;
643
+ innerInput.setSelectionRange(this.typedInValue.length, this.value.length);
644
+ }
645
+ /**
646
+ * The suggestion item on preview.
647
+ * @type {sap.ui.webc.main.IInputSuggestionItem | null}
648
+ * @name sap.ui.webc.main.Input.prototype.previewItem
649
+ * @readonly
650
+ * @public
651
+ */
652
+ get previewItem() {
653
+ if (!this._previewItem) {
654
+ return null;
655
+ }
656
+ return this.getSuggestionByListItem(this._previewItem);
657
+ }
658
+ async fireEventByAction(action, e) {
659
+ if (this.disabled || this.readonly) {
660
+ return;
661
+ }
662
+ const inputValue = await this.getInputValue();
663
+ const isUserInput = action === INPUT_ACTIONS.ACTION_ENTER;
664
+ this.value = inputValue;
665
+ this.typedInValue = inputValue;
666
+ this.valueBeforeItemPreview = inputValue;
667
+ if (isUserInput) { // input
668
+ this.fireEvent(INPUT_EVENTS.INPUT, { inputType: e.inputType });
669
+ // Angular two way data binding
670
+ this.fireEvent("value-changed");
671
+ }
672
+ }
673
+ async getInputValue() {
674
+ const domRef = this.getDomRef();
675
+ if (domRef) {
676
+ return (await this.getInputDOMRef()).value;
677
+ }
678
+ return "";
679
+ }
680
+ async getInputDOMRef() {
681
+ if (isPhone() && this.Suggestions) {
682
+ await this.Suggestions._getSuggestionPopover();
683
+ return this.Suggestions.responsivePopover.querySelector(".ui5-input-inner-phone");
684
+ }
685
+ return this.nativeInput;
686
+ }
687
+ getInputDOMRefSync() {
688
+ if (isPhone() && this.Suggestions && this.Suggestions.responsivePopover) {
689
+ return this.Suggestions.responsivePopover.querySelector(".ui5-input-inner-phone").shadowRoot.querySelector("input");
690
+ }
691
+ return this.nativeInput;
692
+ }
693
+ /**
694
+ * Returns a reference to the native input element
695
+ * @protected
696
+ */
697
+ get nativeInput() {
698
+ const domRef = this.getDomRef();
699
+ return domRef ? domRef.querySelector(`input`) : null;
700
+ }
701
+ get nativeInputWidth() {
702
+ return this.nativeInput ? this.nativeInput.offsetWidth : 0;
703
+ }
704
+ getLabelableElementId() {
705
+ return this.getInputId();
706
+ }
707
+ getSuggestionByListItem(item) {
708
+ const key = parseInt(item.getAttribute("data-ui5-key"));
709
+ return this.suggestionItems[key];
710
+ }
711
+ /**
712
+ * Returns if the suggestions popover is scrollable.
713
+ * The method returns <code>Promise</code> that resolves to true,
714
+ * if the popup is scrollable and false otherwise.
715
+ * @returns {Promise}
716
+ */
717
+ isSuggestionsScrollable() {
718
+ if (!this.Suggestions) {
719
+ return Promise.resolve(false);
720
+ }
721
+ return this.Suggestions._isScrollable();
722
+ }
723
+ getInputId() {
724
+ return `${this._id}-inner`;
725
+ }
726
+ /* Suggestions interface */
727
+ onItemMouseOver(e) {
728
+ const item = e.target;
729
+ const suggestion = this.getSuggestionByListItem(item);
730
+ suggestion && suggestion.fireEvent("mouseover", {
731
+ item: suggestion,
732
+ targetRef: item,
733
+ });
734
+ }
735
+ onItemMouseOut(e) {
736
+ const item = e.target;
737
+ const suggestion = this.getSuggestionByListItem(item);
738
+ suggestion && suggestion.fireEvent("mouseout", {
739
+ item: suggestion,
740
+ targetRef: item,
741
+ });
742
+ }
743
+ onItemMouseDown(e) {
744
+ e.preventDefault();
745
+ }
746
+ onItemSelected(item, keyboardUsed) {
747
+ this.selectSuggestion(item, keyboardUsed);
748
+ }
749
+ onItemPreviewed(item) {
750
+ this.previewSuggestion(item);
751
+ this.fireEvent("suggestion-item-preview", {
752
+ item: this.getSuggestionByListItem(item),
753
+ targetRef: item,
754
+ });
755
+ }
756
+ get valueStateTypeMappings() {
757
+ return {
758
+ "Success": Input_1.i18nBundle.getText(VALUE_STATE_TYPE_SUCCESS),
759
+ "Information": Input_1.i18nBundle.getText(VALUE_STATE_TYPE_INFORMATION),
760
+ "Error": Input_1.i18nBundle.getText(VALUE_STATE_TYPE_ERROR),
761
+ "Warning": Input_1.i18nBundle.getText(VALUE_STATE_TYPE_WARNING),
762
+ };
763
+ }
764
+ valueStateTextMappings() {
765
+ return {
766
+ "Success": Input_1.i18nBundle.getText(VALUE_STATE_SUCCESS),
767
+ "Information": Input_1.i18nBundle.getText(VALUE_STATE_INFORMATION),
768
+ "Error": Input_1.i18nBundle.getText(VALUE_STATE_ERROR),
769
+ "Warning": Input_1.i18nBundle.getText(VALUE_STATE_WARNING),
770
+ };
771
+ }
772
+ announceSelectedItem() {
773
+ const invisibleText = this.shadowRoot.querySelector(`#${this._id}-selectionText`);
774
+ if (this.Suggestions && this.Suggestions._isItemOnTarget()) {
775
+ invisibleText.textContent = this.itemSelectionAnnounce;
776
+ }
777
+ else {
778
+ invisibleText.textContent = "";
779
+ }
780
+ }
781
+ get _readonly() {
782
+ return this.readonly && !this.disabled;
783
+ }
784
+ get _headerTitleText() {
785
+ return Input_1.i18nBundle.getText(INPUT_SUGGESTIONS_TITLE);
786
+ }
787
+ get inputType() {
788
+ return this.type.toLowerCase();
789
+ }
790
+ get isTypeNumber() {
791
+ return this.type === InputType.Number;
792
+ }
793
+ get suggestionsTextId() {
794
+ return this.showSuggestions ? `${this._id}-suggestionsText` : "";
795
+ }
796
+ get valueStateTextId() {
797
+ return this.hasValueState ? `${this._id}-valueStateDesc` : "";
798
+ }
799
+ get accInfo() {
800
+ const ariaHasPopupDefault = this.showSuggestions ? "true" : undefined;
801
+ const ariaAutoCompleteDefault = this.showSuggestions ? "list" : undefined;
802
+ const ariaDescribedBy = this._inputAccInfo.ariaDescribedBy ? `${this.suggestionsTextId} ${this.valueStateTextId} ${this._inputAccInfo.ariaDescribedBy}`.trim() : `${this.suggestionsTextId} ${this.valueStateTextId}`.trim();
803
+ return {
804
+ "input": {
805
+ "ariaRoledescription": this._inputAccInfo && (this._inputAccInfo.ariaRoledescription || undefined),
806
+ "ariaDescribedBy": ariaDescribedBy || undefined,
807
+ "ariaInvalid": this.valueState === ValueState.Error ? "true" : undefined,
808
+ "ariaHasPopup": this._inputAccInfo.ariaHasPopup ? this._inputAccInfo.ariaHasPopup : ariaHasPopupDefault,
809
+ "ariaAutoComplete": this._inputAccInfo.ariaAutoComplete ? this._inputAccInfo.ariaAutoComplete : ariaAutoCompleteDefault,
810
+ "role": this._inputAccInfo && this._inputAccInfo.role,
811
+ "ariaControls": this._inputAccInfo && this._inputAccInfo.ariaControls,
812
+ "ariaExpanded": this._inputAccInfo && this._inputAccInfo.ariaExpanded,
813
+ "ariaDescription": this._inputAccInfo && this._inputAccInfo.ariaDescription,
814
+ "ariaLabel": (this._inputAccInfo && this._inputAccInfo.ariaLabel) || getEffectiveAriaLabelText(this) || getAssociatedLabelForTexts(this),
815
+ },
816
+ };
817
+ }
818
+ get nativeInputAttributes() {
819
+ return {
820
+ "min": this.isTypeNumber ? this._nativeInputAttributes.min : undefined,
821
+ "max": this.isTypeNumber ? this._nativeInputAttributes.max : undefined,
822
+ "step": this.isTypeNumber ? (this._nativeInputAttributes.step || "any") : undefined,
823
+ };
824
+ }
825
+ get ariaValueStateHiddenText() {
826
+ if (!this.hasValueState) {
827
+ return;
828
+ }
829
+ const valueState = this.valueState !== ValueState.None ? this.valueStateTypeMappings[this.valueState] : "";
830
+ if (this.shouldDisplayDefaultValueStateMessage) {
831
+ return this.valueStateText ? `${valueState} ${this.valueStateText}` : valueState;
832
+ }
833
+ return `${valueState}`.concat(" ", this.valueStateMessageText.map(el => el.textContent).join(" "));
834
+ }
835
+ get itemSelectionAnnounce() {
836
+ return this.Suggestions ? this.Suggestions.itemSelectionAnnounce : "";
837
+ }
838
+ get classes() {
839
+ return {
840
+ popover: {
841
+ "ui5-suggestions-popover": !this._isPhone && this.showSuggestions,
842
+ "ui5-suggestions-popover-with-value-state-header": !this._isPhone && this.showSuggestions && this.hasValueStateMessage,
843
+ },
844
+ popoverValueState: {
845
+ "ui5-valuestatemessage-root": true,
846
+ "ui5-valuestatemessage-header": true,
847
+ "ui5-valuestatemessage--success": this.valueState === ValueState.Success,
848
+ "ui5-valuestatemessage--error": this.valueState === ValueState.Error,
849
+ "ui5-valuestatemessage--warning": this.valueState === ValueState.Warning,
850
+ "ui5-valuestatemessage--information": this.valueState === ValueState.Information,
851
+ },
852
+ };
853
+ }
854
+ get styles() {
855
+ const remSizeIxPx = parseInt(getComputedStyle(document.documentElement).fontSize);
856
+ const stylesObject = {
857
+ popoverHeader: {
858
+ "max-width": this._inputWidth ? `${this._inputWidth}px` : "",
859
+ },
860
+ suggestionPopoverHeader: {
861
+ "display": this._listWidth === 0 ? "none" : "inline-block",
862
+ "width": this._listWidth ? `${this._listWidth}px` : "",
863
+ },
864
+ suggestionsPopover: {
865
+ "min-width": this._inputWidth ? `${this._inputWidth}px` : "",
866
+ "max-width": this._inputWidth && (this._inputWidth / remSizeIxPx) > 40 ? `${this._inputWidth}px` : "40rem",
867
+ },
868
+ innerInput: {
869
+ "padding": "",
870
+ },
871
+ };
872
+ if (this.nativeInputWidth < 48) {
873
+ stylesObject.innerInput.padding = "0";
874
+ }
875
+ return stylesObject;
876
+ }
877
+ get suggestionSeparators() {
878
+ return "None";
879
+ }
880
+ get valueStateMessageText() {
881
+ return this.getSlottedNodes("valueStateMessage").map(el => el.cloneNode(true));
882
+ }
883
+ get shouldDisplayOnlyValueStateMessage() {
884
+ return this.hasValueStateMessage && !this.readonly && !this.open && this.focused;
885
+ }
886
+ get shouldDisplayDefaultValueStateMessage() {
887
+ return !this.valueStateMessage.length && this.hasValueStateMessage;
888
+ }
889
+ get hasValueState() {
890
+ return this.valueState !== ValueState.None;
891
+ }
892
+ get hasValueStateMessage() {
893
+ return this.hasValueState && this.valueState !== ValueState.Success
894
+ && (!this._inputIconFocused // Handles the cases when valueStateMessage is forwarded (from datepicker e.g.)
895
+ || !!(this._isPhone && this.Suggestions)); // Handles Input with suggestions on mobile
896
+ }
897
+ get valueStateText() {
898
+ return this.valueState !== ValueState.None ? this.valueStateTextMappings()[this.valueState] : undefined;
899
+ }
900
+ get suggestionsText() {
901
+ return Input_1.i18nBundle.getText(INPUT_SUGGESTIONS);
902
+ }
903
+ get availableSuggestionsCount() {
904
+ if (this.showSuggestions && (this.value || this.Suggestions.isOpened())) {
905
+ switch (this.suggestionsTexts.length) {
906
+ case 0:
907
+ return Input_1.i18nBundle.getText(INPUT_SUGGESTIONS_NO_HIT);
908
+ case 1:
909
+ return Input_1.i18nBundle.getText(INPUT_SUGGESTIONS_ONE_HIT);
910
+ default:
911
+ return Input_1.i18nBundle.getText(INPUT_SUGGESTIONS_MORE_HITS, this.suggestionsTexts.length);
912
+ }
913
+ }
914
+ return undefined;
915
+ }
916
+ get step() {
917
+ return this.isTypeNumber ? "any" : undefined;
918
+ }
919
+ get _isPhone() {
920
+ return isPhone();
921
+ }
922
+ get _isSuggestionsFocused() {
923
+ return !this.focused && this.Suggestions && this.Suggestions.isOpened();
924
+ }
925
+ /**
926
+ * Returns the placeholder value.
927
+ * @protected
928
+ */
929
+ get _placeholder() {
930
+ return this.placeholder;
931
+ }
932
+ /**
933
+ * This method is relevant for sap_horizon theme only
934
+ */
935
+ get _valueStateInputIcon() {
936
+ const iconPerValueState = {
937
+ Error: `<path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20ZM7.70711 13.7071C7.31658 14.0976 6.68342 14.0976 6.29289 13.7071C5.90237 13.3166 5.90237 12.6834 6.29289 12.2929L8.58579 10L6.29289 7.70711C5.90237 7.31658 5.90237 6.68342 6.29289 6.29289C6.68342 5.90237 7.31658 5.90237 7.70711 6.29289L10 8.58579L12.2929 6.29289C12.6834 5.90237 13.3166 5.90237 13.7071 6.29289C14.0976 6.68342 14.0976 7.31658 13.7071 7.70711L11.4142 10L13.7071 12.2929C14.0976 12.6834 14.0976 13.3166 13.7071 13.7071C13.3166 14.0976 12.6834 14.0976 12.2929 13.7071L10 11.4142L7.70711 13.7071Z" fill="#EE3939"/>`,
938
+ Warning: `<path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M11.8619 0.49298C11.6823 0.187541 11.3544 0 11 0C10.6456 0 10.3177 0.187541 10.1381 0.49298L0.138066 17.493C-0.0438112 17.8022 -0.0461447 18.1851 0.13195 18.4965C0.310046 18.8079 0.641283 19 1 19H21C21.3587 19 21.69 18.8079 21.868 18.4965C22.0461 18.1851 22.0438 17.8022 21.8619 17.493L11.8619 0.49298ZM11 6C11.5523 6 12 6.44772 12 7V10C12 10.5523 11.5523 11 11 11C10.4477 11 10 10.5523 10 10V7C10 6.44772 10.4477 6 11 6ZM11 16C11.8284 16 12.5 15.3284 12.5 14.5C12.5 13.6716 11.8284 13 11 13C10.1716 13 9.5 13.6716 9.5 14.5C9.5 15.3284 10.1716 16 11 16Z" fill="#F58B00"/>`,
939
+ Success: `<path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M0 10C0 15.5228 4.47715 20 10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0C4.47715 0 0 4.47715 0 10ZM14.7071 6.29289C14.3166 5.90237 13.6834 5.90237 13.2929 6.29289L8 11.5858L6.70711 10.2929C6.31658 9.90237 5.68342 9.90237 5.29289 10.2929C4.90237 10.6834 4.90237 11.3166 5.29289 11.7071L7.29289 13.7071C7.68342 14.0976 8.31658 14.0976 8.70711 13.7071L14.7071 7.70711C15.0976 7.31658 15.0976 6.68342 14.7071 6.29289Z" fill="#36A41D"/>`,
940
+ Information: `<path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M3 0C1.34315 0 0 1.34315 0 3V15C0 16.6569 1.34315 18 3 18H15C16.6569 18 18 16.6569 18 15V3C18 1.34315 16.6569 0 15 0H3ZM9 6.5C9.82843 6.5 10.5 5.82843 10.5 5C10.5 4.17157 9.82843 3.5 9 3.5C8.17157 3.5 7.5 4.17157 7.5 5C7.5 5.82843 8.17157 6.5 9 6.5ZM9 8.5C9.55228 8.5 10 8.94772 10 9.5V13.5C10 14.0523 9.55228 14.5 9 14.5C8.44771 14.5 8 14.0523 8 13.5V9.5C8 8.94772 8.44771 8.5 9 8.5Z" fill="#1B90FF"/>`,
941
+ };
942
+ if (this.valueState !== ValueState.None) {
943
+ return `
944
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="20" viewBox="0 0 20 20" fill="none">
945
+ ${iconPerValueState[this.valueState]};
946
+ </svg>
947
+ `;
948
+ }
949
+ return "";
950
+ }
951
+ get _valueStatePopoverHorizontalAlign() {
952
+ return this.effectiveDir !== "rtl" ? "Left" : "Right";
953
+ }
954
+ /**
955
+ * This method is relevant for sap_horizon theme only
956
+ */
957
+ get _valueStateMessageInputIcon() {
958
+ const iconPerValueState = {
959
+ Error: "error",
960
+ Warning: "alert",
961
+ Success: "sys-enter-2",
962
+ Information: "information",
963
+ };
964
+ return this.valueState !== ValueState.None ? iconPerValueState[this.valueState] : "";
965
+ }
966
+ /**
967
+ * Returns the caret position inside the native input
968
+ * @protected
969
+ */
970
+ getCaretPosition() {
971
+ return getCaretPosition(this.nativeInput);
972
+ }
973
+ /**
974
+ * Sets the caret to a certain position inside the native input
975
+ * @protected
976
+ * @param pos
977
+ */
978
+ setCaretPosition(pos) {
979
+ setCaretPosition(this.nativeInput, pos);
980
+ }
981
+ /**
982
+ * Removes the fractional part of floating-point number.
983
+ * @param {string} value the numeric value of Input of type "Number"
984
+ */
985
+ removeFractionalPart(value) {
986
+ if (value.includes(".")) {
987
+ return value.slice(0, value.indexOf("."));
988
+ }
989
+ if (value.includes(",")) {
990
+ return value.slice(0, value.indexOf(","));
991
+ }
992
+ return value;
993
+ }
994
+ static get dependencies() {
995
+ const Suggestions = getFeature("InputSuggestions");
996
+ return [Popover, Icon].concat(Suggestions ? Suggestions.dependencies : []);
997
+ }
998
+ static async onDefine() {
999
+ const Suggestions = getFeature("InputSuggestions");
1000
+ [Input_1.i18nBundle] = await Promise.all([
1001
+ getI18nBundle("@ui5/webcomponents"),
1002
+ Suggestions ? Suggestions.init() : Promise.resolve(),
1003
+ ]);
1004
+ }
1005
+ };
1006
+ __decorate([
1007
+ property({ type: Boolean })
1008
+ ], Input.prototype, "disabled", void 0);
1009
+ __decorate([
1010
+ property({ type: Boolean })
1011
+ ], Input.prototype, "highlight", void 0);
1012
+ __decorate([
1013
+ property()
1014
+ ], Input.prototype, "placeholder", void 0);
1015
+ __decorate([
1016
+ property({ type: Boolean })
1017
+ ], Input.prototype, "readonly", void 0);
1018
+ __decorate([
1019
+ property({ type: Boolean })
1020
+ ], Input.prototype, "required", void 0);
1021
+ __decorate([
1022
+ property({ type: Boolean })
1023
+ ], Input.prototype, "noTypeahead", void 0);
1024
+ __decorate([
1025
+ property({ type: InputType, defaultValue: InputType.Text })
1026
+ ], Input.prototype, "type", void 0);
1027
+ __decorate([
1028
+ property()
1029
+ ], Input.prototype, "value", void 0);
1030
+ __decorate([
1031
+ property({ noAttribute: true })
1032
+ ], Input.prototype, "_innerValue", void 0);
1033
+ __decorate([
1034
+ property({ type: ValueState, defaultValue: ValueState.None })
1035
+ ], Input.prototype, "valueState", void 0);
1036
+ __decorate([
1037
+ property()
1038
+ ], Input.prototype, "name", void 0);
1039
+ __decorate([
1040
+ property({ type: Boolean })
1041
+ ], Input.prototype, "showSuggestions", void 0);
1042
+ __decorate([
1043
+ property({ validator: Integer })
1044
+ ], Input.prototype, "maxlength", void 0);
1045
+ __decorate([
1046
+ property()
1047
+ ], Input.prototype, "accessibleName", void 0);
1048
+ __decorate([
1049
+ property({ defaultValue: "" })
1050
+ ], Input.prototype, "accessibleNameRef", void 0);
1051
+ __decorate([
1052
+ property({ type: Boolean })
1053
+ ], Input.prototype, "showClearIcon", void 0);
1054
+ __decorate([
1055
+ property({ type: Boolean })
1056
+ ], Input.prototype, "effectiveShowClearIcon", void 0);
1057
+ __decorate([
1058
+ property({ type: Boolean })
1059
+ ], Input.prototype, "focused", void 0);
1060
+ __decorate([
1061
+ property({ type: Boolean })
1062
+ ], Input.prototype, "openOnMobile", void 0);
1063
+ __decorate([
1064
+ property({ type: Boolean })
1065
+ ], Input.prototype, "open", void 0);
1066
+ __decorate([
1067
+ property({ type: Boolean })
1068
+ ], Input.prototype, "_forceOpen", void 0);
1069
+ __decorate([
1070
+ property({ type: Boolean })
1071
+ ], Input.prototype, "_isValueStateFocused", void 0);
1072
+ __decorate([
1073
+ property({ type: Object, noAttribute: true })
1074
+ ], Input.prototype, "_inputAccInfo", void 0);
1075
+ __decorate([
1076
+ property({ type: Object, noAttribute: true })
1077
+ ], Input.prototype, "_nativeInputAttributes", void 0);
1078
+ __decorate([
1079
+ property({ validator: Integer })
1080
+ ], Input.prototype, "_inputWidth", void 0);
1081
+ __decorate([
1082
+ property({ validator: Integer })
1083
+ ], Input.prototype, "_listWidth", void 0);
1084
+ __decorate([
1085
+ property({ type: Boolean, noAttribute: true })
1086
+ ], Input.prototype, "_isPopoverOpen", void 0);
1087
+ __decorate([
1088
+ property({ type: Boolean, noAttribute: true })
1089
+ ], Input.prototype, "_inputIconFocused", void 0);
1090
+ __decorate([
1091
+ slot({ type: HTMLElement, "default": true })
1092
+ ], Input.prototype, "suggestionItems", void 0);
1093
+ __decorate([
1094
+ slot()
1095
+ ], Input.prototype, "icon", void 0);
1096
+ __decorate([
1097
+ slot()
1098
+ ], Input.prototype, "formSupport", void 0);
1099
+ __decorate([
1100
+ slot()
1101
+ ], Input.prototype, "valueStateMessage", void 0);
1102
+ Input = Input_1 = __decorate([
1103
+ customElement("ui5-input"),
1104
+ languageAware
1105
+ /**
1106
+ * Fired when the input operation has finished by pressing Enter or on focusout.
1107
+ *
1108
+ * @event sap.ui.webc.main.Input#change
1109
+ * @public
1110
+ */
1111
+ ,
1112
+ event("change")
1113
+ /**
1114
+ * Fired when the value of the component changes at each keystroke,
1115
+ * and when a suggestion item has been selected.
1116
+ *
1117
+ * @event sap.ui.webc.main.Input#input
1118
+ * @public
1119
+ */
1120
+ ,
1121
+ event("input")
1122
+ /**
1123
+ * Fired when a suggestion item, that is displayed in the suggestion popup, is selected.
1124
+ *
1125
+ * @event sap.ui.webc.main.Input#suggestion-item-select
1126
+ * @param {HTMLElement} item The selected item.
1127
+ * @public
1128
+ */
1129
+ ,
1130
+ event("suggestion-item-select", {
1131
+ detail: {
1132
+ item: { type: HTMLElement },
1133
+ },
1134
+ })
1135
+ /**
1136
+ * Fired when the user navigates to a suggestion item via the ARROW keys,
1137
+ * as a preview, before the final selection.
1138
+ *
1139
+ * @event sap.ui.webc.main.Input#suggestion-item-preview
1140
+ * @param {HTMLElement} item The previewed suggestion item.
1141
+ * @param {HTMLElement} targetRef The DOM ref of the suggestion item.
1142
+ * @public
1143
+ * @since 1.0.0-rc.8
1144
+ */
1145
+ ,
1146
+ event("suggestion-item-preview", {
1147
+ detail: {
1148
+ item: { type: HTMLElement },
1149
+ targetRef: { type: HTMLElement },
1150
+ },
1151
+ })
1152
+ /**
1153
+ * Fired when the user scrolls the suggestion popover.
1154
+ *
1155
+ * @event sap.ui.webc.main.Input#suggestion-scroll
1156
+ * @param {Integer} scrollTop The current scroll position.
1157
+ * @param {HTMLElement} scrollContainer The scroll container.
1158
+ * @protected
1159
+ * @since 1.0.0-rc.8
1160
+ */
1161
+ ,
1162
+ event("suggestion-scroll", {
1163
+ detail: {
1164
+ scrollTop: { type: Integer },
1165
+ scrollContainer: { type: HTMLElement },
1166
+ },
1167
+ })
1168
+ ], Input);
1701
1169
  Input.define();
1702
-
1703
1170
  export default Input;
1171
+ //# sourceMappingURL=Input.js.map