@ui5/webcomponents 1.13.0 → 1.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/CHANGELOG.md +23 -2
  2. package/dist/Calendar.js +1 -3
  3. package/dist/Calendar.js.map +1 -1
  4. package/dist/DateComponentBase.d.ts +15 -0
  5. package/dist/DateComponentBase.js +30 -15
  6. package/dist/DateComponentBase.js.map +1 -1
  7. package/dist/DatePicker.js +4 -10
  8. package/dist/DatePicker.js.map +1 -1
  9. package/dist/DateRangePicker.js +4 -4
  10. package/dist/DateRangePicker.js.map +1 -1
  11. package/dist/DateTimePicker.js +2 -2
  12. package/dist/DateTimePicker.js.map +1 -1
  13. package/dist/MonthPicker.d.ts +2 -2
  14. package/dist/MonthPicker.js.map +1 -1
  15. package/dist/MultiComboBox.js +3 -1
  16. package/dist/MultiComboBox.js.map +1 -1
  17. package/dist/TimePicker.js +1 -1
  18. package/dist/TimePicker.js.map +1 -1
  19. package/dist/TimePickerBase.js +3 -3
  20. package/dist/TimePickerBase.js.map +1 -1
  21. package/dist/TimeSelection.js +3 -3
  22. package/dist/TimeSelection.js.map +1 -1
  23. package/dist/TreeItemBase.d.ts +1 -1
  24. package/dist/TreeItemBase.js +1 -1
  25. package/dist/TreeItemBase.js.map +1 -1
  26. package/dist/api.json +1 -1
  27. package/dist/assets/{Carousel.f4a2672a.css → Carousel.a417e400.css} +1 -1
  28. package/dist/assets/ar.c5a97d0e.js +1 -0
  29. package/dist/assets/ar_EG.22757369.js +1 -0
  30. package/dist/assets/ar_SA.a5bad2ef.js +1 -0
  31. package/dist/assets/bg.6674f7a6.js +1 -0
  32. package/dist/assets/ca.fa49d13f.js +1 -0
  33. package/dist/assets/cs.dae0cd3e.js +1 -0
  34. package/dist/assets/da.93db3bc1.js +1 -0
  35. package/dist/assets/de.bfbf7863.js +1 -0
  36. package/dist/assets/de_AT.68a4341b.js +1 -0
  37. package/dist/assets/de_CH.1c13a1fb.js +1 -0
  38. package/dist/assets/el.71adc6a2.js +1 -0
  39. package/dist/assets/el_CY.f22e504b.js +1 -0
  40. package/dist/assets/en.ae8d35dc.js +1 -0
  41. package/dist/assets/en_AU.7d45451d.js +1 -0
  42. package/dist/assets/en_GB.80c7d6ef.js +1 -0
  43. package/dist/assets/en_HK.a2b0b861.js +1 -0
  44. package/dist/assets/en_IE.8703f70f.js +1 -0
  45. package/dist/assets/en_IN.bf506371.js +1 -0
  46. package/dist/assets/en_NZ.5dc61e5b.js +1 -0
  47. package/dist/assets/en_PG.1c3b0df6.js +1 -0
  48. package/dist/assets/en_SG.fddd87fc.js +1 -0
  49. package/dist/assets/en_ZA.867da820.js +1 -0
  50. package/dist/assets/es.d7387d86.js +1 -0
  51. package/dist/assets/es_AR.fe05631f.js +1 -0
  52. package/dist/assets/es_BO.89f1b5a6.js +1 -0
  53. package/dist/assets/es_CL.c81c60d6.js +1 -0
  54. package/dist/assets/es_CO.aa2b0b98.js +1 -0
  55. package/dist/assets/es_MX.8686d64e.js +1 -0
  56. package/dist/assets/es_PE.1e0803a8.js +1 -0
  57. package/dist/assets/es_UY.185ab638.js +1 -0
  58. package/dist/assets/es_VE.1f2f1b17.js +1 -0
  59. package/dist/assets/et.d0afa780.js +1 -0
  60. package/dist/assets/fa.47441e31.js +1 -0
  61. package/dist/assets/fi.54632154.js +1 -0
  62. package/dist/assets/fr.6a5154ec.js +1 -0
  63. package/dist/assets/fr_BE.48f96803.js +1 -0
  64. package/dist/assets/fr_CA.508f04f9.js +1 -0
  65. package/dist/assets/fr_CH.69090fd9.js +1 -0
  66. package/dist/assets/fr_LU.51b82c64.js +1 -0
  67. package/dist/assets/he.869f8a6e.js +1 -0
  68. package/dist/assets/hi.bf17975b.js +1 -0
  69. package/dist/assets/hr.1a1fb4b8.js +1 -0
  70. package/dist/assets/hu.f772de7d.js +1 -0
  71. package/dist/assets/id.11cfa605.js +1 -0
  72. package/dist/assets/it.168286c6.js +1 -0
  73. package/dist/assets/it_CH.5a6d6c80.js +1 -0
  74. package/dist/assets/ja.0f0830ce.js +1 -0
  75. package/dist/assets/kk.d7fb968d.js +1 -0
  76. package/dist/assets/ko.7d771b7b.js +1 -0
  77. package/dist/assets/lt.d15d5108.js +1 -0
  78. package/dist/assets/lv.c268b3f1.js +1 -0
  79. package/dist/assets/messagebundle_de.33dc33ea.js +1 -0
  80. package/dist/assets/ms.d05d1ec5.js +1 -0
  81. package/dist/assets/nb.c7bc3999.js +1 -0
  82. package/dist/assets/nl.751f2a34.js +1 -0
  83. package/dist/assets/nl_BE.9d0b23f0.js +1 -0
  84. package/dist/assets/pl.fa84ec2d.js +1 -0
  85. package/dist/assets/pt.fce1c065.js +1 -0
  86. package/dist/assets/pt_PT.734de519.js +1 -0
  87. package/dist/assets/ro.de6645af.js +1 -0
  88. package/dist/assets/ru.adfeebb7.js +1 -0
  89. package/dist/assets/ru_UA.63942d87.js +1 -0
  90. package/dist/assets/sk.ec8e6d6d.js +1 -0
  91. package/dist/assets/sl.8dc5c821.js +1 -0
  92. package/dist/assets/sr.15324e24.js +1 -0
  93. package/dist/assets/sr_Latn.5e843394.js +1 -0
  94. package/dist/assets/sv.2e166b94.js +1 -0
  95. package/dist/assets/test/pages/{ComboBox.html.cf015503.js → ComboBox.html.2025a0ee.js} +1 -1
  96. package/dist/assets/test/pages/{Icon.html.89db7569.js → Icon.html.9bcff6a6.js} +1 -1
  97. package/dist/assets/test/pages/{Label.html.fecdf0ce.js → Label.html.6f194c4a.js} +1 -1
  98. package/dist/assets/test/pages/{Popups.html.ab9c99cd.js → Popups.html.8dea1e31.js} +1 -1
  99. package/dist/assets/th.c070be25.js +1 -0
  100. package/dist/assets/tr.ff1ccc4a.js +1 -0
  101. package/dist/assets/uk.17363643.js +1 -0
  102. package/dist/assets/vi.2b5b186b.js +1 -0
  103. package/dist/assets/zh_CN.1c2009c0.js +1 -0
  104. package/dist/assets/zh_HK.c4687dc5.js +1 -0
  105. package/dist/assets/zh_SG.7fe88248.js +1 -0
  106. package/dist/assets/zh_TW.5e1d38dc.js +1 -0
  107. package/dist/css/themes/Carousel.css +1 -1
  108. package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
  109. package/dist/generated/templates/CarouselTemplate.lit.js +1 -1
  110. package/dist/generated/templates/CarouselTemplate.lit.js.map +1 -1
  111. package/dist/generated/themes/Carousel.css.js +1 -1
  112. package/dist/generated/themes/Carousel.css.js.map +1 -1
  113. package/dist/i18n/messagebundle_de.properties +1 -1
  114. package/dist/test/pages/72override.html +1 -1
  115. package/dist/test/pages/AnimanitionOff.html +1 -1
  116. package/dist/test/pages/Avatar.html +1 -1
  117. package/dist/test/pages/AvatarGroup.html +1 -1
  118. package/dist/test/pages/Badge.html +1 -1
  119. package/dist/test/pages/Breadcrumbs.html +1 -1
  120. package/dist/test/pages/BusyIndicator.html +1 -1
  121. package/dist/test/pages/Button.html +1 -1
  122. package/dist/test/pages/Calendar.html +6 -1
  123. package/dist/test/pages/Card.html +1 -1
  124. package/dist/test/pages/Carousel.html +33 -9
  125. package/dist/test/pages/CheckBox.html +1 -1
  126. package/dist/test/pages/ColorPalette.html +1 -1
  127. package/dist/test/pages/ColorPalettePopover.html +1 -1
  128. package/dist/test/pages/ColorPicker.html +1 -1
  129. package/dist/test/pages/ComboBox.html +2 -2
  130. package/dist/test/pages/Components.html +1 -1
  131. package/dist/test/pages/CoreControls.html +1 -1
  132. package/dist/test/pages/CoreControls_exp.html +1 -1
  133. package/dist/test/pages/CustomCSS.html +1 -1
  134. package/dist/test/pages/DatePicker.html +8 -2
  135. package/dist/test/pages/DatePicker_test_page.html +4 -1
  136. package/dist/test/pages/DateRangePicker.html +4 -1
  137. package/dist/test/pages/DateTimePicker.html +10 -1
  138. package/dist/test/pages/DateTimePicker_Timezone.html +1 -1
  139. package/dist/test/pages/DayPicker.html +1 -1
  140. package/dist/test/pages/Dialog.html +1 -1
  141. package/dist/test/pages/DialogLifecycle.html +1 -1
  142. package/dist/test/pages/DialogSemantic.html +1 -1
  143. package/dist/test/pages/Eventing.html +1 -1
  144. package/dist/test/pages/F6Test1.html +1 -1
  145. package/dist/test/pages/F6Test2.html +1 -1
  146. package/dist/test/pages/F6Test3.html +1 -1
  147. package/dist/test/pages/F6Test4.html +1 -1
  148. package/dist/test/pages/F6Test5.html +1 -1
  149. package/dist/test/pages/F6Test6.html +1 -1
  150. package/dist/test/pages/F6Test7.html +1 -1
  151. package/dist/test/pages/FileUploader.html +1 -1
  152. package/dist/test/pages/FormComponents.html +1 -1
  153. package/dist/test/pages/FormSupport.html +1 -1
  154. package/dist/test/pages/HCB.html +1 -1
  155. package/dist/test/pages/Icon.html +2 -2
  156. package/dist/test/pages/Icon_and_theming.html +1 -1
  157. package/dist/test/pages/Icon_custom.html +1 -1
  158. package/dist/test/pages/Input.html +1 -1
  159. package/dist/test/pages/InputFieldLabels.html +1 -1
  160. package/dist/test/pages/InputFieldMinWidth.html +1 -1
  161. package/dist/test/pages/InputIcons.html +1 -1
  162. package/dist/test/pages/Input_quickview.html +1 -1
  163. package/dist/test/pages/InputsAlignment.html +1 -1
  164. package/dist/test/pages/InputsLazyLoading.html +1 -1
  165. package/dist/test/pages/ItemNavigation.html +1 -1
  166. package/dist/test/pages/Kitchen.html +1 -1
  167. package/dist/test/pages/Kitchen.openui5.html +1 -1
  168. package/dist/test/pages/Label.html +2 -2
  169. package/dist/test/pages/Link.html +1 -1
  170. package/dist/test/pages/List.html +1 -1
  171. package/dist/test/pages/ListGrowing_Button.html +1 -1
  172. package/dist/test/pages/ListGrowing_Scroll.html +1 -1
  173. package/dist/test/pages/List_keyboard_support.html +1 -1
  174. package/dist/test/pages/List_test_page.html +1 -1
  175. package/dist/test/pages/LitKeyFunction.html +1 -1
  176. package/dist/test/pages/MemoryLeak.html +1 -1
  177. package/dist/test/pages/Menu.html +1 -1
  178. package/dist/test/pages/MessagePage.html +1 -1
  179. package/dist/test/pages/MessageStrip.html +1 -1
  180. package/dist/test/pages/MultiComboBox.html +1 -1
  181. package/dist/test/pages/MultiInput.html +1 -1
  182. package/dist/test/pages/MultiInput_Suggestions.html +1 -1
  183. package/dist/test/pages/OpenUI5-second.html +1 -1
  184. package/dist/test/pages/OpenUI5.html +1 -1
  185. package/dist/test/pages/Panel.html +1 -1
  186. package/dist/test/pages/Popover.html +1 -1
  187. package/dist/test/pages/PopoverArrowBounds.html +1 -1
  188. package/dist/test/pages/Popups.html +2 -2
  189. package/dist/test/pages/ProgressIndicator.html +1 -1
  190. package/dist/test/pages/RTL.html +1 -1
  191. package/dist/test/pages/RadioButton.html +1 -1
  192. package/dist/test/pages/RangeSlider.html +1 -1
  193. package/dist/test/pages/RatingIndicator.html +1 -1
  194. package/dist/test/pages/ResizeHandler.html +1 -1
  195. package/dist/test/pages/ResponsivePopover.html +1 -1
  196. package/dist/test/pages/SegmentedButton.html +1 -1
  197. package/dist/test/pages/Select.html +1 -1
  198. package/dist/test/pages/Simple.html +1 -1
  199. package/dist/test/pages/Slider.html +1 -1
  200. package/dist/test/pages/SplitButton.html +1 -1
  201. package/dist/test/pages/StepInput.html +1 -1
  202. package/dist/test/pages/Switch.html +1 -1
  203. package/dist/test/pages/TabContainer.html +1 -1
  204. package/dist/test/pages/Table-perf-pure.html +1 -1
  205. package/dist/test/pages/Table-perf.html +1 -1
  206. package/dist/test/pages/Table.html +1 -1
  207. package/dist/test/pages/Table2.html +1 -1
  208. package/dist/test/pages/TableAllPopin.html +1 -1
  209. package/dist/test/pages/TableCustomStyling.html +1 -1
  210. package/dist/test/pages/TableGrouping.html +1 -1
  211. package/dist/test/pages/TableGrowingWithButton.html +1 -1
  212. package/dist/test/pages/TableGrowingWithScroll.html +1 -1
  213. package/dist/test/pages/TableSelection.html +1 -1
  214. package/dist/test/pages/TextArea.html +1 -1
  215. package/dist/test/pages/TimePicker.html +1 -1
  216. package/dist/test/pages/TimeSelection.html +1 -1
  217. package/dist/test/pages/Title.html +1 -1
  218. package/dist/test/pages/Toast.html +1 -1
  219. package/dist/test/pages/ToggleButton.html +1 -1
  220. package/dist/test/pages/Tree.html +1 -1
  221. package/dist/test/pages/WheelSlider_Test_Page.html +1 -1
  222. package/dist/test/pages/base/AriaLabelHelper.html +1 -1
  223. package/dist/test/pages/base/DOMObserver.html +1 -1
  224. package/dist/test/pages/base/IconCollection.html +1 -1
  225. package/dist/test/pages/base/IconCollectionInCustomTheme.html +1 -1
  226. package/dist/test/pages/base/InvisibleMessage.html +1 -1
  227. package/dist/test/pages/form.html +1 -1
  228. package/dist/test/pages/i18n-defaultLang.html +1 -1
  229. package/dist/test/pages/i18n-demo.html +1 -1
  230. package/package.json +7 -7
  231. package/src/Carousel.hbs +28 -29
  232. package/src/i18n/messagebundle_de.properties +1 -1
  233. package/src/themes/Carousel.css +2 -2
  234. package/dist/assets/ar.0aceaa46.js +0 -1
  235. package/dist/assets/ar_EG.62a0def6.js +0 -1
  236. package/dist/assets/ar_SA.885e9d81.js +0 -1
  237. package/dist/assets/bg.af7ae3d3.js +0 -1
  238. package/dist/assets/ca.d9f9c394.js +0 -1
  239. package/dist/assets/cs.097079f5.js +0 -1
  240. package/dist/assets/da.6fa564f4.js +0 -1
  241. package/dist/assets/de.daec088c.js +0 -1
  242. package/dist/assets/de_AT.c7a2904e.js +0 -1
  243. package/dist/assets/de_CH.c06952aa.js +0 -1
  244. package/dist/assets/el.813313df.js +0 -1
  245. package/dist/assets/el_CY.014d91a7.js +0 -1
  246. package/dist/assets/en.a5c4d80e.js +0 -1
  247. package/dist/assets/en_AU.27d88f19.js +0 -1
  248. package/dist/assets/en_GB.69bad9e3.js +0 -1
  249. package/dist/assets/en_HK.4d0bf565.js +0 -1
  250. package/dist/assets/en_IE.d233cae1.js +0 -1
  251. package/dist/assets/en_IN.610eb0e2.js +0 -1
  252. package/dist/assets/en_NZ.b7cb54fa.js +0 -1
  253. package/dist/assets/en_PG.bc93b24a.js +0 -1
  254. package/dist/assets/en_SG.3ad82097.js +0 -1
  255. package/dist/assets/en_ZA.b5155ee0.js +0 -1
  256. package/dist/assets/es.a859a6c7.js +0 -1
  257. package/dist/assets/es_AR.53418237.js +0 -1
  258. package/dist/assets/es_BO.b28df27d.js +0 -1
  259. package/dist/assets/es_CL.c80fa0e1.js +0 -1
  260. package/dist/assets/es_CO.0dae4df5.js +0 -1
  261. package/dist/assets/es_MX.d1baccdc.js +0 -1
  262. package/dist/assets/es_PE.c08782b5.js +0 -1
  263. package/dist/assets/es_UY.87a72a96.js +0 -1
  264. package/dist/assets/es_VE.1bbf4414.js +0 -1
  265. package/dist/assets/et.8a55b077.js +0 -1
  266. package/dist/assets/fa.495488c9.js +0 -1
  267. package/dist/assets/fi.28bc1e37.js +0 -1
  268. package/dist/assets/fr.1cac868e.js +0 -1
  269. package/dist/assets/fr_BE.4e7e94ff.js +0 -1
  270. package/dist/assets/fr_CA.6fe2d4bb.js +0 -1
  271. package/dist/assets/fr_CH.68ccaa7e.js +0 -1
  272. package/dist/assets/fr_LU.14ceff78.js +0 -1
  273. package/dist/assets/he.a8417f75.js +0 -1
  274. package/dist/assets/hi.da74285c.js +0 -1
  275. package/dist/assets/hr.a8046a3c.js +0 -1
  276. package/dist/assets/hu.be21b738.js +0 -1
  277. package/dist/assets/id.ff756dd5.js +0 -1
  278. package/dist/assets/it.514531d3.js +0 -1
  279. package/dist/assets/it_CH.ace0ec44.js +0 -1
  280. package/dist/assets/ja.2ac0d7fc.js +0 -1
  281. package/dist/assets/kk.43ca749b.js +0 -1
  282. package/dist/assets/ko.57703acf.js +0 -1
  283. package/dist/assets/lt.c93c6948.js +0 -1
  284. package/dist/assets/lv.c3b9c645.js +0 -1
  285. package/dist/assets/messagebundle_de.07dbdade.js +0 -1
  286. package/dist/assets/ms.08e953a7.js +0 -1
  287. package/dist/assets/nb.698f666f.js +0 -1
  288. package/dist/assets/nl.86aba7ce.js +0 -1
  289. package/dist/assets/nl_BE.aeb4d527.js +0 -1
  290. package/dist/assets/pl.4a63f4da.js +0 -1
  291. package/dist/assets/pt.70d82dc5.js +0 -1
  292. package/dist/assets/pt_PT.d4b085f1.js +0 -1
  293. package/dist/assets/ro.9d6cc2d1.js +0 -1
  294. package/dist/assets/ru.f66b88b7.js +0 -1
  295. package/dist/assets/ru_UA.17aba7d7.js +0 -1
  296. package/dist/assets/sk.04703e35.js +0 -1
  297. package/dist/assets/sl.86740f8b.js +0 -1
  298. package/dist/assets/sr.63a13073.js +0 -1
  299. package/dist/assets/sr_Latn.5759744e.js +0 -1
  300. package/dist/assets/sv.22dda50f.js +0 -1
  301. package/dist/assets/th.05fcc17c.js +0 -1
  302. package/dist/assets/tr.98dc6dfd.js +0 -1
  303. package/dist/assets/uk.9824204c.js +0 -1
  304. package/dist/assets/vi.b72792c6.js +0 -1
  305. package/dist/assets/zh_CN.ef0ec92a.js +0 -1
  306. package/dist/assets/zh_HK.1fe7830a.js +0 -1
  307. package/dist/assets/zh_SG.6c8275a7.js +0 -1
  308. package/dist/assets/zh_TW.7b1013aa.js +0 -1
package/CHANGELOG.md CHANGED
@@ -3,9 +3,30 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # [1.13.0](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.4...v1.13.0) (2023-05-05)
6
+ ## [1.13.1](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.5...v1.13.1) (2023-05-11)
7
7
 
8
- **Note:** Version bump only for package @ui5/webcomponents
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ui5-tree:** rtl styling fixes ([#7019](https://github.com/SAP/ui5-webcomponents/issues/7019)) ([88a63ee](https://github.com/SAP/ui5-webcomponents/commit/88a63eefa161b0576dc635cf2b16ecb1e27afacb)), closes [#6892](https://github.com/SAP/ui5-webcomponents/issues/6892)
12
+
13
+
14
+
15
+
16
+
17
+ # [1.13.0-rc.5](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.4...v1.13.0-rc.5) (2023-05-11)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **ui5-carousel:** align arrows relative to the content ([#6975](https://github.com/SAP/ui5-webcomponents/issues/6975)) ([623d1ec](https://github.com/SAP/ui5-webcomponents/commit/623d1ecb249b4c09db4ffb530ede87f50d83970b)), closes [#6954](https://github.com/SAP/ui5-webcomponents/issues/6954)
23
+ * **ui5-date-time-picker:** fix test ([#7005](https://github.com/SAP/ui5-webcomponents/issues/7005)) ([9e07724](https://github.com/SAP/ui5-webcomponents/commit/9e0772476d20c65c6981e2ca930d9a09bbb62af7))
24
+ * **ui5-multi-combobox:** prevent exception on mobile device ([#6983](https://github.com/SAP/ui5-webcomponents/issues/6983)) ([ccaf3c9](https://github.com/SAP/ui5-webcomponents/commit/ccaf3c969dee8bfe3dd9850ee196c9f07ffc6e9f))
25
+
26
+
27
+ ### Features
28
+
29
+ * **ui5-calendar,ui5-date*picker:** add static format (ISO) support for min/max dates ([#6955](https://github.com/SAP/ui5-webcomponents/issues/6955)) ([a89afbf](https://github.com/SAP/ui5-webcomponents/commit/a89afbf9088ea9cbf892468a9de4d98ac236cfec)), closes [#6885](https://github.com/SAP/ui5-webcomponents/issues/6885)
9
30
 
10
31
 
11
32
 
package/dist/Calendar.js CHANGED
@@ -151,9 +151,7 @@ let Calendar = class Calendar extends CalendarPart {
151
151
  get _selectedDatesTimestamps() {
152
152
  return this.dates.map(date => {
153
153
  const value = date.value;
154
- // <b>Note:</b> Format#parse accepts only boolean type for 2nd and 3rd params,
155
- // but has logic related to "undefined" value, so we're calling it with "undefined" and casting to "boolean".
156
- const validValue = value && !!this.getFormat().parse(value, undefined, undefined);
154
+ const validValue = value && !!this.getFormat().parse(value);
157
155
  return validValue ? this._getTimeStampFromString(value) / 1000 : undefined;
158
156
  }).filter((date) => !!date);
159
157
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../src/Calendar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM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,CA0Tb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport transformDateToSecondaryType from \"@ui5/webcomponents-localization/dist/dates/transformDateToSecondaryType.js\";\nimport convertMonthNumbersToMonthNames from \"@ui5/webcomponents-localization/dist/dates/convertMonthNumbersToMonthNames.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport {\n\tisF4,\n\tisF4Shift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport getCachedLocaleDataInstance from \"@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js\";\nimport getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport * as CalendarDateComponent from \"./CalendarDate.js\";\nimport type CalendarDateComponentT from \"./CalendarDate.js\";\nimport CalendarPart from \"./CalendarPart.js\";\nimport CalendarHeader from \"./CalendarHeader.js\";\nimport DayPicker from \"./DayPicker.js\";\nimport type { DayPickerChangeEventDetail } from \"./DayPicker.js\";\nimport MonthPicker from \"./MonthPicker.js\";\nimport type { MonthPickerChangeEventDetail } from \"./MonthPicker.js\";\nimport YearPicker from \"./YearPicker.js\";\nimport type { YearPickerChangeEventDetail } from \"./YearPicker.js\";\nimport CalendarSelectionMode from \"./types/CalendarSelectionMode.js\";\nimport CalendarPickersMode from \"./types/CalendarPickersMode.js\";\n\n// Default calendar for bundling\nimport \"@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js\";\n\n// Template\nimport CalendarTemplate from \"./generated/templates/CalendarTemplate.lit.js\";\n\n// Styles\nimport calendarCSS from \"./generated/themes/Calendar.css.js\";\n\ninterface ICalendarPicker {\n\t_showPreviousPage: () => void,\n\t_showNextPage: () => void,\n\t_hasPreviousPage: () => boolean,\n\t_hasNextPage: () => boolean,\n\t_autoFocus?: boolean,\n\t_firstYear?: number,\n\t_lastYear?: number,\n}\n\ntype CalendarChangeEventDetail = {\n\tvalues: Array<string>,\n\tdates: Array<number>,\n\ttimestamp: number | undefined,\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-calendar</code> component allows users to select one or more dates.\n * <br><br>\n * Currently selected dates are represented with instances of <code>ui5-date</code> as\n * children of the <code>ui5-calendar</code>. The value property of each <code>ui5-date</code> must be a\n * date string, correctly formatted according to the <code>ui5-calendar</code>'s <code>formatPattern</code> property.\n * Whenever the user changes the date selection, <code>ui5-calendar</code> will automatically create/remove instances\n * of <code>ui5-date</code> in itself, unless you prevent this behavior by calling <code>preventDefault()</code> for the\n * <code>selected-dates-change</code> event. This is useful if you want to control the selected dates externally.\n * <br><br>\n *\n * <h3>Usage</h3>\n *\n * The user can navigate to a particular date by:\n * <br>\n * <ul>\n * <li>Pressing over a month inside the months view</li>\n * <li>Pressing over an year inside the years view</li>\n * </ul>\n * <br>\n * The user can confirm a date selection by pressing over a date inside the days view.\n * <br><br>\n *\n * <h3>Keyboard Handling</h3>\n * The <code>ui5-calendar</code> provides advanced keyboard handling.\n * When a picker is showed and focused the user can use the following keyboard\n * shortcuts in order to perform a navigation:\n * <br>\n * - Day picker: <br>\n * <ul>\n * <li>[F4] - Shows month picker</li>\n * <li>[SHIFT] + [F4] - Shows year picker</li>\n * <li>[PAGEUP] - Navigate to the previous month</li>\n * <li>[PAGEDOWN] - Navigate to the next month</li>\n * <li>[SHIFT] + [PAGEUP] - Navigate to the previous year</li>\n * <li>[SHIFT] + [PAGEDOWN] - Navigate to the next year</li>\n * <li>[CTRL] + [SHIFT] + [PAGEUP] - Navigate ten years backwards</li>\n * <li>[CTRL] + [SHIFT] + [PAGEDOWN] - Navigate ten years forwards</li>\n * <li>[HOME] - Navigate to the first day of the week</li>\n * <li>[END] - Navigate to the last day of the week</li>\n * <li>[CTRL] + [HOME] - Navigate to the first day of the month</li>\n * <li>[CTRL] + [END] - Navigate to the last day of the month</li>\n * </ul>\n * <br>\n * - Month picker: <br>\n * <ul>\n * <li>[PAGEUP] - Navigate to the previous year</li>\n * <li>[PAGEDOWN] - Navigate to the next year</li>\n * <li>[HOME] - Navigate to the first month of the current row</li>\n * <li>[END] - Navigate to the last month of the current row</li>\n * <li>[CTRL] + [HOME] - Navigate to the first month of the current year</li>\n * <li>[CTRL] + [END] - Navigate to the last month of the year</li>\n * </ul>\n * <br>\n * - Year picker: <br>\n * <ul>\n * <li>[PAGEUP] - Navigate to the previous year range</li>\n * <li>[PAGEDOWN] - Navigate the next year range</li>\n * <li>[HOME] - Navigate to the first year of the current row</li>\n * <li>[END] - Navigate to the last year of the current row</li>\n * <li>[CTRL] + [HOME] - Navigate to the first year of the current year range</li>\n * <li>[CTRL] + [END] - Navigate to the last year of the current year range</li>\n * </ul>\n * <br>\n *\n * <h4>Fast Navigation</h4>\n * This component provides a build in fast navigation group which can be used via <code>F6 / Shift + F6</code> or <code> Ctrl + Alt(Option) + Down / Ctrl + Alt(Option) + Up</code>.\n * In order to use this functionality, you need to import the following module:\n * <code>import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"</code>\n * <br><br>\n *\n* <h3>Calendar types</h3>\n * The component supports several calendar types - Gregorian, Buddhist, Islamic, Japanese and Persian.\n * By default the Gregorian Calendar is used. In order to use the Buddhist, Islamic, Japanese or Persian calendar,\n * you need to set the <code>primaryCalendarType</code> property and import one or more of the following modules:\n * <br><br>\n *\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Islamic.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Japanese.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Persian.js\";</code>\n * <br><br>\n *\n * Or, you can use the global configuration and set the <code>calendarType</code> key:\n * <br>\n * <code>\n * &lt;script data-id=\"sap-ui-config\" type=\"application/json\"&gt;\n * {\n *\t\"calendarType\": \"Japanese\"\n * }\n * &lt;/script&gt;\n * </code>\n *\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Calendar\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Calendar\n * @extends sap.ui.webc.main.CalendarPart\n * @tagname ui5-calendar\n * @appenddocs sap.ui.webc.main.CalendarDate\n * @public\n * @since 1.0.0-rc.11\n */\n@customElement({\n\ttag: \"ui5-calendar\",\n\tfastNavigation: true,\n\ttemplate: CalendarTemplate,\n\tstyles: calendarCSS,\n\tdependencies: [\n\t\tCalendarDateComponent.default,\n\t\tCalendarHeader,\n\t\tDayPicker,\n\t\tMonthPicker,\n\t\tYearPicker,\n\t],\n})\n/**\n * Fired when the selected dates change.\n * <b>Note:</b> If you call <code>preventDefault()</code> for this event, the component will not\n * create instances of <code>ui5-date</code> for the newly selected dates. In that case you should do this manually.\n *\n * @event sap.ui.webc.main.Calendar#selected-dates-change\n * @allowPreventDefault\n * @param {Array} values The selected dates\n * @param {Array} dates The selected dates as UTC timestamps\n * @public\n */\n@event(\"selected-dates-change\", {\n\tdetail: {\n\t\tdates: { type: Array },\n\t\tvalues: { type: Array },\n\t},\n})\n\n@event(\"show-month-press\")\n@event(\"show-year-press\")\nclass Calendar extends CalendarPart {\n\t/**\n\t * Defines the type of selection used in the calendar component.\n\t * Accepted property values are:<br>\n\t * <ul>\n\t * <li><code>CalendarSelectionMode.Single</code> - enables a single date selection.(default value)</li>\n\t * <li><code>CalendarSelectionMode.Range</code> - enables selection of a date range.</li>\n\t * <li><code>CalendarSelectionMode.Multiple</code> - enables selection of multiple dates.</li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.CalendarSelectionMode}\n\t * @name sap.ui.webc.main.Calendar.prototype.selectionMode\n\t * @defaultvalue \"Single\"\n\t * @public\n\t */\n\t@property({\n\t\ttype: CalendarSelectionMode,\n\t\tdefaultValue: CalendarSelectionMode.Single,\n\t})\n\tselectionMode!: CalendarSelectionMode;\n\n\t/**\n\t * Defines the visibility of the week numbers column.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> For calendars other than Gregorian,\n\t * the week numbers are not displayed regardless of what is set.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Calendar.prototype.hideWeekNumbers\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideWeekNumbers!: boolean;\n\n\t/**\n\t * Which picker is currently visible to the user: day/month/year\n\t */\n\t@property({ defaultValue: \"day\" })\n\t_currentPicker!: string;\n\n\t@property({ type: Boolean })\n\t_previousButtonDisabled!: boolean;\n\n\t@property({ type: Boolean })\n\t_nextButtonDisabled!: boolean;\n\n\t@property()\n\t_headerMonthButtonText!: string;\n\n\t@property()\n\t_headerYearButtonText!: string;\n\n\t@property()\n\t_headerYearButtonTextSecType!: string;\n\n\t@property({ type: CalendarPickersMode, defaultValue: CalendarPickersMode.DAY_MONTH_YEAR, noAttribute: true })\n\t_pickersMode!: CalendarPickersMode;\n\n\t/**\n\t * Defines the selected date or dates (depending on the <code>selectionMode</code> property)\n\t * for this calendar as instances of <code>ui5-date</code>.\n\t *\n\t * @type {sap.ui.webc.main.ICalendarDate[]}\n\t * @name sap.ui.webc.main.Calendar.prototype.default\n\t * @slot dates\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, invalidateOnChildChange: true, \"default\": true })\n\tdates!: Array<CalendarDateComponentT>;\n\n\t/**\n\t * @private\n\t */\n\tget _selectedDatesTimestamps(): Array<number> {\n\t\treturn this.dates.map(date => {\n\t\t\tconst value = date.value;\n\t\t\t// <b>Note:</b> Format#parse accepts only boolean type for 2nd and 3rd params,\n\t\t\t// but has logic related to \"undefined\" value, so we're calling it with \"undefined\" and casting to \"boolean\".\n\t\t\tconst validValue = value && !!this.getFormat().parse(value, undefined as unknown as boolean, undefined as unknown as boolean);\n\t\t\treturn validValue ? this._getTimeStampFromString(value)! / 1000 : undefined;\n\t\t}).filter((date): date is number => !!date);\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_setSelectedDates(selectedDates: Array<number>) {\n\t\tconst selectedValues = selectedDates.map(timestamp => this.getFormat().format(new Date(timestamp * 1000), true)); // Format as UTC\n\t\tconst valuesInDOM = [...this.dates].map(dateElement => dateElement.value);\n\n\t\t// Remove all elements for dates that are no longer selected\n\t\tthis.dates.filter(dateElement => !selectedValues.includes(dateElement.value)).forEach(dateElement => {\n\t\t\tthis.removeChild(dateElement);\n\t\t});\n\n\t\t// Create tags for the selected dates that don't already exist in DOM\n\t\tselectedValues.filter(value => !valuesInDOM.includes(value)).forEach(value => {\n\t\t\tconst dateElement = document.createElement(CalendarDateComponent.default.getMetadata().getTag()) as CalendarDateComponentT;\n\t\t\tdateElement.value = value;\n\t\t\tthis.appendChild(dateElement);\n\t\t});\n\t}\n\n\t/**\n\t * Makes sure that _currentPicker is always set to a value, allowed by _pickersMode\n\t */\n\t_normalizeCurrentPicker() {\n\t\tif (this._currentPicker === \"day\" && this._pickersMode !== CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"month\";\n\t\t}\n\n\t\tif (this._currentPicker === \"month\" && this._pickersMode === CalendarPickersMode.YEAR) {\n\t\t\tthis._currentPicker = \"year\";\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._normalizeCurrentPicker();\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished(); // Await for the current picker to render and then ask if it has previous/next pages\n\t\tthis._previousButtonDisabled = !this._currentPickerDOM._hasPreviousPage();\n\t\tthis._nextButtonDisabled = !this._currentPickerDOM._hasNextPage();\n\n\t\tconst yearFormat = DateFormat.getDateInstance({ format: \"y\", calendarType: this.primaryCalendarType });\n\t\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\t\tthis._headerMonthButtonText = localeData.getMonthsStandAlone(\"wide\", this.primaryCalendarType)[this._calendarDate.getMonth()];\n\n\t\tif (this._currentPicker === \"year\") {\n\t\t\tconst rangeStart = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\tconst rangeEnd = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\trangeStart.setYear(this._currentPickerDOM._firstYear!);\n\t\t\trangeEnd.setYear(this._currentPickerDOM._lastYear!);\n\n\t\t\tthis._headerYearButtonText = `${yearFormat.format(rangeStart.toLocalJSDate(), true)} - ${yearFormat.format(rangeEnd.toLocalJSDate(), true)}`;\n\t\t} else {\n\t\t\tthis._headerYearButtonText = String(yearFormat.format(this._localDate, true));\n\t\t}\n\n\t\tthis.secondaryCalendarType && this._setSecondaryCalendarTypeButtonText();\n\t}\n\n\t/**\n\t * The user clicked the \"month\" button in the header\n\t */\n\tonHeaderShowMonthPress(e: CustomEvent) {\n\t\tthis._currentPickerDOM._autoFocus = false;\n\t\tthis._currentPicker = \"month\";\n\t\tthis.fireEvent(\"show-month-press\", e);\n\t}\n\n\t/**\n\t * The user clicked the \"year\" button in the header\n\t */\n\tonHeaderShowYearPress(e: CustomEvent) {\n\t\tthis._currentPickerDOM._autoFocus = false;\n\t\tthis._currentPicker = \"year\";\n\t\tthis.fireEvent(\"show-year-press\", e);\n\t}\n\n\tget _currentPickerDOM() {\n\t\t// Calendar's shadowRoot and all the pickers are always present - the \"!\" is safe to be used.\n\t\treturn this.shadowRoot!.querySelector(`[ui5-${this._currentPicker}picker]`)! as unknown as ICalendarPicker;\n\t}\n\n\t/**\n\t * The year clicked the \"Previous\" button in the header\n\t */\n\tonHeaderPreviousPress() {\n\t\tthis._currentPickerDOM._showPreviousPage();\n\t}\n\n\t/**\n\t * The year clicked the \"Next\" button in the header\n\t */\n\tonHeaderNextPress() {\n\t\tthis._currentPickerDOM._showNextPage();\n\t}\n\n\t_setSecondaryCalendarTypeButtonText() {\n\t\tconst yearFormatSecType = DateFormat.getDateInstance({ format: \"y\", calendarType: this.secondaryCalendarType });\n\n\t\tif (this._currentPicker === \"year\") {\n\t\t\tconst rangeStart = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\tconst rangeEnd = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\trangeStart.setYear(this._currentPickerDOM._firstYear!);\n\t\t\trangeEnd.setYear(this._currentPickerDOM._lastYear!);\n\n\t\t\tconst rangeStartSecType = transformDateToSecondaryType(this.primaryCalendarType, this.secondaryCalendarType, rangeStart.valueOf() / 1000, true)\n\t\t\t\t.firstDate;\n\t\t\tconst rangeEndSecType = transformDateToSecondaryType(this.primaryCalendarType, this.secondaryCalendarType, rangeEnd.valueOf() / 1000, true)\n\t\t\t\t.lastDate;\n\t\t\tthis._headerYearButtonTextSecType = `${yearFormatSecType.format(rangeStartSecType.toLocalJSDate(), true)} - ${yearFormatSecType.format(rangeEndSecType.toLocalJSDate(), true)}`;\n\t\t} else {\n\t\t\tthis._headerYearButtonTextSecType = String(yearFormatSecType.format(this._localDate, true));\n\t\t}\n\t}\n\n\tget secondaryCalendarTypeButtonText() {\n\t\tif (!this.secondaryCalendarType) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst localDate = new Date(this._timestamp * 1000);\n\t\tconst secondYearFormat = DateFormat.getDateInstance({ format: \"y\", calendarType: this.secondaryCalendarType });\n\t\tconst dateInSecType = transformDateToSecondaryType(this._primaryCalendarType, this.secondaryCalendarType, this._timestamp);\n\t\tconst secondMonthInfo = convertMonthNumbersToMonthNames(dateInSecType.firstDate.getMonth(), dateInSecType.lastDate.getMonth(), this.secondaryCalendarType);\n\t\tconst secondYearText = secondYearFormat.format(localDate, true);\n\n\t\treturn {\n\t\t\tyearButtonText: secondYearText,\n\t\t\tmonthButtonText: secondMonthInfo.text,\n\t\t\tmonthButtonInfo: secondMonthInfo.textInfo,\n\t\t};\n\t}\n\n\t/**\n\t * The month button is hidden when the month picker or year picker is shown\n\t * @returns {boolean}\n\t * @private\n\t */\n\tget _isHeaderMonthButtonHidden() {\n\t\treturn this._currentPicker === \"month\" || this._currentPicker === \"year\";\n\t}\n\n\tget _isDayPickerHidden() {\n\t\treturn this._currentPicker !== \"day\";\n\t}\n\n\tget _isMonthPickerHidden() {\n\t\treturn this._currentPicker !== \"month\";\n\t}\n\n\tget _isYearPickerHidden() {\n\t\treturn this._currentPicker !== \"year\";\n\t}\n\n\t_fireEventAndUpdateSelectedDates(selectedDates: Array<number>) {\n\t\tconst datesValues = selectedDates.map(timestamp => {\n\t\t\tconst calendarDate = CalendarDate.fromTimestamp(timestamp * 1000, this._primaryCalendarType);\n\t\t\treturn this.getFormat().format(calendarDate.toUTCJSDate(), true);\n\t\t});\n\n\t\tconst defaultPrevented = !this.fireEvent<CalendarChangeEventDetail>(\"selected-dates-change\", { timestamp: this.timestamp, dates: [...selectedDates], values: datesValues }, true);\n\t\tif (!defaultPrevented) {\n\t\t\tthis._setSelectedDates(selectedDates);\n\t\t}\n\t}\n\n\tonSelectedDatesChange(e: CustomEvent<DayPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\t\tthis._fireEventAndUpdateSelectedDates(e.detail.dates);\n\t}\n\n\tonSelectedMonthChange(e: CustomEvent<MonthPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\n\t\tif (this._pickersMode === CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"day\";\n\t\t} else {\n\t\t\tthis._fireEventAndUpdateSelectedDates([this.timestamp]);\n\t\t}\n\n\t\tthis._currentPickerDOM._autoFocus = true;\n\t}\n\n\tonSelectedYearChange(e: CustomEvent<YearPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\n\t\tif (this._pickersMode === CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"day\";\n\t\t} else if (this._pickersMode === CalendarPickersMode.MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"month\";\n\t\t} else {\n\t\t\tthis._fireEventAndUpdateSelectedDates([this.timestamp]);\n\t\t}\n\n\t\tthis._currentPickerDOM._autoFocus = true;\n\t}\n\n\tonNavigate(e: CustomEvent) {\n\t\tthis.timestamp = e.detail.timestamp;\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isF4(e) && this._currentPicker !== \"month\") {\n\t\t\tthis._currentPicker = \"month\";\n\t\t}\n\n\t\tif (isF4Shift(e) && this._currentPicker !== \"year\") {\n\t\t\tthis._currentPicker = \"year\";\n\t\t}\n\t}\n\n\t/**\n\t * Returns an array of UTC timestamps, representing the selected dates.\n\t * @protected\n\t * @deprecated\n\t */\n\tget selectedDates(): Array<number> {\n\t\treturn this._selectedDatesTimestamps;\n\t}\n\n\t/**\n\t * Creates instances of <code>ui5-date</code> inside this <code>ui5-calendar</code> with values, equal to the provided UTC timestamps\n\t * @protected\n\t * @deprecated\n\t * @param { Array<number> } selectedDates Array of UTC timestamps\n\t */\n\tset selectedDates(selectedDates: Array<number>) {\n\t\tthis._setSelectedDates(selectedDates);\n\t}\n}\n\nCalendar.define();\n\nexport default Calendar;\nexport type {\n\tICalendarPicker,\n\tCalendarChangeEventDetail,\n};\n"]}
1
+ {"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../src/Calendar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,4BAA4B,MAAM,4EAA4E,CAAC;AACtH,OAAO,+BAA+B,MAAM,+EAA+E,CAAC;AAC5H,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO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AC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qDACE;AAG9B;IADC,QAAQ,EAAE;wDACqB;AAGhC;IADC,QAAQ,EAAE;uDACoB;AAG/B;IADC,QAAQ,EAAE;8DAC2B;AAGtC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,YAAY,EAAE,mBAAmB,CAAC,cAAc,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;8CAC1E;AAYnC;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;uCACtC;AArEjC,QAAQ;IAjCb,aAAa,CAAC;QACd,GAAG,EAAE,cAAc;QACnB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,gBAAgB;QAC1B,MAAM,EAAE,WAAW;QACnB,YAAY,EAAE;YACb,qBAAqB,CAAC,OAAO;YAC7B,cAAc;YACd,SAAS;YACT,WAAW;YACX,UAAU;SACV;KACD,CAAC;IACF;;;;;;;;;;OAUG;;IACF,KAAK,CAAC,uBAAuB,EAAE;QAC/B,MAAM,EAAE;YACP,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;YACtB,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;SACvB;KACD,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC;IACzB,KAAK,CAAC,iBAAiB,CAAC;GACnB,QAAQ,CAwTb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport transformDateToSecondaryType from \"@ui5/webcomponents-localization/dist/dates/transformDateToSecondaryType.js\";\nimport convertMonthNumbersToMonthNames from \"@ui5/webcomponents-localization/dist/dates/convertMonthNumbersToMonthNames.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport {\n\tisF4,\n\tisF4Shift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport getCachedLocaleDataInstance from \"@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js\";\nimport getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport * as CalendarDateComponent from \"./CalendarDate.js\";\nimport type CalendarDateComponentT from \"./CalendarDate.js\";\nimport CalendarPart from \"./CalendarPart.js\";\nimport CalendarHeader from \"./CalendarHeader.js\";\nimport DayPicker from \"./DayPicker.js\";\nimport type { DayPickerChangeEventDetail } from \"./DayPicker.js\";\nimport MonthPicker from \"./MonthPicker.js\";\nimport type { MonthPickerChangeEventDetail } from \"./MonthPicker.js\";\nimport YearPicker from \"./YearPicker.js\";\nimport type { YearPickerChangeEventDetail } from \"./YearPicker.js\";\nimport CalendarSelectionMode from \"./types/CalendarSelectionMode.js\";\nimport CalendarPickersMode from \"./types/CalendarPickersMode.js\";\n\n// Default calendar for bundling\nimport \"@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js\";\n\n// Template\nimport CalendarTemplate from \"./generated/templates/CalendarTemplate.lit.js\";\n\n// Styles\nimport calendarCSS from \"./generated/themes/Calendar.css.js\";\n\ninterface ICalendarPicker {\n\t_showPreviousPage: () => void,\n\t_showNextPage: () => void,\n\t_hasPreviousPage: () => boolean,\n\t_hasNextPage: () => boolean,\n\t_autoFocus?: boolean,\n\t_firstYear?: number,\n\t_lastYear?: number,\n}\n\ntype CalendarChangeEventDetail = {\n\tvalues: Array<string>,\n\tdates: Array<number>,\n\ttimestamp: number | undefined,\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-calendar</code> component allows users to select one or more dates.\n * <br><br>\n * Currently selected dates are represented with instances of <code>ui5-date</code> as\n * children of the <code>ui5-calendar</code>. The value property of each <code>ui5-date</code> must be a\n * date string, correctly formatted according to the <code>ui5-calendar</code>'s <code>formatPattern</code> property.\n * Whenever the user changes the date selection, <code>ui5-calendar</code> will automatically create/remove instances\n * of <code>ui5-date</code> in itself, unless you prevent this behavior by calling <code>preventDefault()</code> for the\n * <code>selected-dates-change</code> event. This is useful if you want to control the selected dates externally.\n * <br><br>\n *\n * <h3>Usage</h3>\n *\n * The user can navigate to a particular date by:\n * <br>\n * <ul>\n * <li>Pressing over a month inside the months view</li>\n * <li>Pressing over an year inside the years view</li>\n * </ul>\n * <br>\n * The user can confirm a date selection by pressing over a date inside the days view.\n * <br><br>\n *\n * <h3>Keyboard Handling</h3>\n * The <code>ui5-calendar</code> provides advanced keyboard handling.\n * When a picker is showed and focused the user can use the following keyboard\n * shortcuts in order to perform a navigation:\n * <br>\n * - Day picker: <br>\n * <ul>\n * <li>[F4] - Shows month picker</li>\n * <li>[SHIFT] + [F4] - Shows year picker</li>\n * <li>[PAGEUP] - Navigate to the previous month</li>\n * <li>[PAGEDOWN] - Navigate to the next month</li>\n * <li>[SHIFT] + [PAGEUP] - Navigate to the previous year</li>\n * <li>[SHIFT] + [PAGEDOWN] - Navigate to the next year</li>\n * <li>[CTRL] + [SHIFT] + [PAGEUP] - Navigate ten years backwards</li>\n * <li>[CTRL] + [SHIFT] + [PAGEDOWN] - Navigate ten years forwards</li>\n * <li>[HOME] - Navigate to the first day of the week</li>\n * <li>[END] - Navigate to the last day of the week</li>\n * <li>[CTRL] + [HOME] - Navigate to the first day of the month</li>\n * <li>[CTRL] + [END] - Navigate to the last day of the month</li>\n * </ul>\n * <br>\n * - Month picker: <br>\n * <ul>\n * <li>[PAGEUP] - Navigate to the previous year</li>\n * <li>[PAGEDOWN] - Navigate to the next year</li>\n * <li>[HOME] - Navigate to the first month of the current row</li>\n * <li>[END] - Navigate to the last month of the current row</li>\n * <li>[CTRL] + [HOME] - Navigate to the first month of the current year</li>\n * <li>[CTRL] + [END] - Navigate to the last month of the year</li>\n * </ul>\n * <br>\n * - Year picker: <br>\n * <ul>\n * <li>[PAGEUP] - Navigate to the previous year range</li>\n * <li>[PAGEDOWN] - Navigate the next year range</li>\n * <li>[HOME] - Navigate to the first year of the current row</li>\n * <li>[END] - Navigate to the last year of the current row</li>\n * <li>[CTRL] + [HOME] - Navigate to the first year of the current year range</li>\n * <li>[CTRL] + [END] - Navigate to the last year of the current year range</li>\n * </ul>\n * <br>\n *\n * <h4>Fast Navigation</h4>\n * This component provides a build in fast navigation group which can be used via <code>F6 / Shift + F6</code> or <code> Ctrl + Alt(Option) + Down / Ctrl + Alt(Option) + Up</code>.\n * In order to use this functionality, you need to import the following module:\n * <code>import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"</code>\n * <br><br>\n *\n* <h3>Calendar types</h3>\n * The component supports several calendar types - Gregorian, Buddhist, Islamic, Japanese and Persian.\n * By default the Gregorian Calendar is used. In order to use the Buddhist, Islamic, Japanese or Persian calendar,\n * you need to set the <code>primaryCalendarType</code> property and import one or more of the following modules:\n * <br><br>\n *\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Islamic.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Japanese.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Persian.js\";</code>\n * <br><br>\n *\n * Or, you can use the global configuration and set the <code>calendarType</code> key:\n * <br>\n * <code>\n * &lt;script data-id=\"sap-ui-config\" type=\"application/json\"&gt;\n * {\n *\t\"calendarType\": \"Japanese\"\n * }\n * &lt;/script&gt;\n * </code>\n *\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Calendar\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Calendar\n * @extends sap.ui.webc.main.CalendarPart\n * @tagname ui5-calendar\n * @appenddocs sap.ui.webc.main.CalendarDate\n * @public\n * @since 1.0.0-rc.11\n */\n@customElement({\n\ttag: \"ui5-calendar\",\n\tfastNavigation: true,\n\ttemplate: CalendarTemplate,\n\tstyles: calendarCSS,\n\tdependencies: [\n\t\tCalendarDateComponent.default,\n\t\tCalendarHeader,\n\t\tDayPicker,\n\t\tMonthPicker,\n\t\tYearPicker,\n\t],\n})\n/**\n * Fired when the selected dates change.\n * <b>Note:</b> If you call <code>preventDefault()</code> for this event, the component will not\n * create instances of <code>ui5-date</code> for the newly selected dates. In that case you should do this manually.\n *\n * @event sap.ui.webc.main.Calendar#selected-dates-change\n * @allowPreventDefault\n * @param {Array} values The selected dates\n * @param {Array} dates The selected dates as UTC timestamps\n * @public\n */\n@event(\"selected-dates-change\", {\n\tdetail: {\n\t\tdates: { type: Array },\n\t\tvalues: { type: Array },\n\t},\n})\n\n@event(\"show-month-press\")\n@event(\"show-year-press\")\nclass Calendar extends CalendarPart {\n\t/**\n\t * Defines the type of selection used in the calendar component.\n\t * Accepted property values are:<br>\n\t * <ul>\n\t * <li><code>CalendarSelectionMode.Single</code> - enables a single date selection.(default value)</li>\n\t * <li><code>CalendarSelectionMode.Range</code> - enables selection of a date range.</li>\n\t * <li><code>CalendarSelectionMode.Multiple</code> - enables selection of multiple dates.</li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.CalendarSelectionMode}\n\t * @name sap.ui.webc.main.Calendar.prototype.selectionMode\n\t * @defaultvalue \"Single\"\n\t * @public\n\t */\n\t@property({\n\t\ttype: CalendarSelectionMode,\n\t\tdefaultValue: CalendarSelectionMode.Single,\n\t})\n\tselectionMode!: CalendarSelectionMode;\n\n\t/**\n\t * Defines the visibility of the week numbers column.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> For calendars other than Gregorian,\n\t * the week numbers are not displayed regardless of what is set.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Calendar.prototype.hideWeekNumbers\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideWeekNumbers!: boolean;\n\n\t/**\n\t * Which picker is currently visible to the user: day/month/year\n\t */\n\t@property({ defaultValue: \"day\" })\n\t_currentPicker!: string;\n\n\t@property({ type: Boolean })\n\t_previousButtonDisabled!: boolean;\n\n\t@property({ type: Boolean })\n\t_nextButtonDisabled!: boolean;\n\n\t@property()\n\t_headerMonthButtonText!: string;\n\n\t@property()\n\t_headerYearButtonText!: string;\n\n\t@property()\n\t_headerYearButtonTextSecType!: string;\n\n\t@property({ type: CalendarPickersMode, defaultValue: CalendarPickersMode.DAY_MONTH_YEAR, noAttribute: true })\n\t_pickersMode!: CalendarPickersMode;\n\n\t/**\n\t * Defines the selected date or dates (depending on the <code>selectionMode</code> property)\n\t * for this calendar as instances of <code>ui5-date</code>.\n\t *\n\t * @type {sap.ui.webc.main.ICalendarDate[]}\n\t * @name sap.ui.webc.main.Calendar.prototype.default\n\t * @slot dates\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, invalidateOnChildChange: true, \"default\": true })\n\tdates!: Array<CalendarDateComponentT>;\n\n\t/**\n\t * @private\n\t */\n\tget _selectedDatesTimestamps(): Array<number> {\n\t\treturn this.dates.map(date => {\n\t\t\tconst value = date.value;\n\t\t\tconst validValue = value && !!this.getFormat().parse(value);\n\t\t\treturn validValue ? this._getTimeStampFromString(value)! / 1000 : undefined;\n\t\t}).filter((date): date is number => !!date);\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_setSelectedDates(selectedDates: Array<number>) {\n\t\tconst selectedValues = selectedDates.map(timestamp => this.getFormat().format(new Date(timestamp * 1000), true)); // Format as UTC\n\t\tconst valuesInDOM = [...this.dates].map(dateElement => dateElement.value);\n\n\t\t// Remove all elements for dates that are no longer selected\n\t\tthis.dates.filter(dateElement => !selectedValues.includes(dateElement.value)).forEach(dateElement => {\n\t\t\tthis.removeChild(dateElement);\n\t\t});\n\n\t\t// Create tags for the selected dates that don't already exist in DOM\n\t\tselectedValues.filter(value => !valuesInDOM.includes(value)).forEach(value => {\n\t\t\tconst dateElement = document.createElement(CalendarDateComponent.default.getMetadata().getTag()) as CalendarDateComponentT;\n\t\t\tdateElement.value = value;\n\t\t\tthis.appendChild(dateElement);\n\t\t});\n\t}\n\n\t/**\n\t * Makes sure that _currentPicker is always set to a value, allowed by _pickersMode\n\t */\n\t_normalizeCurrentPicker() {\n\t\tif (this._currentPicker === \"day\" && this._pickersMode !== CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"month\";\n\t\t}\n\n\t\tif (this._currentPicker === \"month\" && this._pickersMode === CalendarPickersMode.YEAR) {\n\t\t\tthis._currentPicker = \"year\";\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._normalizeCurrentPicker();\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished(); // Await for the current picker to render and then ask if it has previous/next pages\n\t\tthis._previousButtonDisabled = !this._currentPickerDOM._hasPreviousPage();\n\t\tthis._nextButtonDisabled = !this._currentPickerDOM._hasNextPage();\n\n\t\tconst yearFormat = DateFormat.getDateInstance({ format: \"y\", calendarType: this.primaryCalendarType });\n\t\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\t\tthis._headerMonthButtonText = localeData.getMonthsStandAlone(\"wide\", this.primaryCalendarType)[this._calendarDate.getMonth()];\n\n\t\tif (this._currentPicker === \"year\") {\n\t\t\tconst rangeStart = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\tconst rangeEnd = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\trangeStart.setYear(this._currentPickerDOM._firstYear!);\n\t\t\trangeEnd.setYear(this._currentPickerDOM._lastYear!);\n\n\t\t\tthis._headerYearButtonText = `${yearFormat.format(rangeStart.toLocalJSDate(), true)} - ${yearFormat.format(rangeEnd.toLocalJSDate(), true)}`;\n\t\t} else {\n\t\t\tthis._headerYearButtonText = String(yearFormat.format(this._localDate, true));\n\t\t}\n\n\t\tthis.secondaryCalendarType && this._setSecondaryCalendarTypeButtonText();\n\t}\n\n\t/**\n\t * The user clicked the \"month\" button in the header\n\t */\n\tonHeaderShowMonthPress(e: CustomEvent) {\n\t\tthis._currentPickerDOM._autoFocus = false;\n\t\tthis._currentPicker = \"month\";\n\t\tthis.fireEvent(\"show-month-press\", e);\n\t}\n\n\t/**\n\t * The user clicked the \"year\" button in the header\n\t */\n\tonHeaderShowYearPress(e: CustomEvent) {\n\t\tthis._currentPickerDOM._autoFocus = false;\n\t\tthis._currentPicker = \"year\";\n\t\tthis.fireEvent(\"show-year-press\", e);\n\t}\n\n\tget _currentPickerDOM() {\n\t\t// Calendar's shadowRoot and all the pickers are always present - the \"!\" is safe to be used.\n\t\treturn this.shadowRoot!.querySelector(`[ui5-${this._currentPicker}picker]`)! as unknown as ICalendarPicker;\n\t}\n\n\t/**\n\t * The year clicked the \"Previous\" button in the header\n\t */\n\tonHeaderPreviousPress() {\n\t\tthis._currentPickerDOM._showPreviousPage();\n\t}\n\n\t/**\n\t * The year clicked the \"Next\" button in the header\n\t */\n\tonHeaderNextPress() {\n\t\tthis._currentPickerDOM._showNextPage();\n\t}\n\n\t_setSecondaryCalendarTypeButtonText() {\n\t\tconst yearFormatSecType = DateFormat.getDateInstance({ format: \"y\", calendarType: this.secondaryCalendarType });\n\n\t\tif (this._currentPicker === \"year\") {\n\t\t\tconst rangeStart = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\tconst rangeEnd = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\trangeStart.setYear(this._currentPickerDOM._firstYear!);\n\t\t\trangeEnd.setYear(this._currentPickerDOM._lastYear!);\n\n\t\t\tconst rangeStartSecType = transformDateToSecondaryType(this.primaryCalendarType, this.secondaryCalendarType, rangeStart.valueOf() / 1000, true)\n\t\t\t\t.firstDate;\n\t\t\tconst rangeEndSecType = transformDateToSecondaryType(this.primaryCalendarType, this.secondaryCalendarType, rangeEnd.valueOf() / 1000, true)\n\t\t\t\t.lastDate;\n\t\t\tthis._headerYearButtonTextSecType = `${yearFormatSecType.format(rangeStartSecType.toLocalJSDate(), true)} - ${yearFormatSecType.format(rangeEndSecType.toLocalJSDate(), true)}`;\n\t\t} else {\n\t\t\tthis._headerYearButtonTextSecType = String(yearFormatSecType.format(this._localDate, true));\n\t\t}\n\t}\n\n\tget secondaryCalendarTypeButtonText() {\n\t\tif (!this.secondaryCalendarType) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst localDate = new Date(this._timestamp * 1000);\n\t\tconst secondYearFormat = DateFormat.getDateInstance({ format: \"y\", calendarType: this.secondaryCalendarType });\n\t\tconst dateInSecType = transformDateToSecondaryType(this._primaryCalendarType, this.secondaryCalendarType, this._timestamp);\n\t\tconst secondMonthInfo = convertMonthNumbersToMonthNames(dateInSecType.firstDate.getMonth(), dateInSecType.lastDate.getMonth(), this.secondaryCalendarType);\n\t\tconst secondYearText = secondYearFormat.format(localDate, true);\n\n\t\treturn {\n\t\t\tyearButtonText: secondYearText,\n\t\t\tmonthButtonText: secondMonthInfo.text,\n\t\t\tmonthButtonInfo: secondMonthInfo.textInfo,\n\t\t};\n\t}\n\n\t/**\n\t * The month button is hidden when the month picker or year picker is shown\n\t * @returns {boolean}\n\t * @private\n\t */\n\tget _isHeaderMonthButtonHidden() {\n\t\treturn this._currentPicker === \"month\" || this._currentPicker === \"year\";\n\t}\n\n\tget _isDayPickerHidden() {\n\t\treturn this._currentPicker !== \"day\";\n\t}\n\n\tget _isMonthPickerHidden() {\n\t\treturn this._currentPicker !== \"month\";\n\t}\n\n\tget _isYearPickerHidden() {\n\t\treturn this._currentPicker !== \"year\";\n\t}\n\n\t_fireEventAndUpdateSelectedDates(selectedDates: Array<number>) {\n\t\tconst datesValues = selectedDates.map(timestamp => {\n\t\t\tconst calendarDate = CalendarDate.fromTimestamp(timestamp * 1000, this._primaryCalendarType);\n\t\t\treturn this.getFormat().format(calendarDate.toUTCJSDate(), true);\n\t\t});\n\n\t\tconst defaultPrevented = !this.fireEvent<CalendarChangeEventDetail>(\"selected-dates-change\", { timestamp: this.timestamp, dates: [...selectedDates], values: datesValues }, true);\n\t\tif (!defaultPrevented) {\n\t\t\tthis._setSelectedDates(selectedDates);\n\t\t}\n\t}\n\n\tonSelectedDatesChange(e: CustomEvent<DayPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\t\tthis._fireEventAndUpdateSelectedDates(e.detail.dates);\n\t}\n\n\tonSelectedMonthChange(e: CustomEvent<MonthPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\n\t\tif (this._pickersMode === CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"day\";\n\t\t} else {\n\t\t\tthis._fireEventAndUpdateSelectedDates([this.timestamp]);\n\t\t}\n\n\t\tthis._currentPickerDOM._autoFocus = true;\n\t}\n\n\tonSelectedYearChange(e: CustomEvent<YearPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\n\t\tif (this._pickersMode === CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"day\";\n\t\t} else if (this._pickersMode === CalendarPickersMode.MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"month\";\n\t\t} else {\n\t\t\tthis._fireEventAndUpdateSelectedDates([this.timestamp]);\n\t\t}\n\n\t\tthis._currentPickerDOM._autoFocus = true;\n\t}\n\n\tonNavigate(e: CustomEvent) {\n\t\tthis.timestamp = e.detail.timestamp;\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isF4(e) && this._currentPicker !== \"month\") {\n\t\t\tthis._currentPicker = \"month\";\n\t\t}\n\n\t\tif (isF4Shift(e) && this._currentPicker !== \"year\") {\n\t\t\tthis._currentPicker = \"year\";\n\t\t}\n\t}\n\n\t/**\n\t * Returns an array of UTC timestamps, representing the selected dates.\n\t * @protected\n\t * @deprecated\n\t */\n\tget selectedDates(): Array<number> {\n\t\treturn this._selectedDatesTimestamps;\n\t}\n\n\t/**\n\t * Creates instances of <code>ui5-date</code> inside this <code>ui5-calendar</code> with values, equal to the provided UTC timestamps\n\t * @protected\n\t * @deprecated\n\t * @param { Array<number> } selectedDates Array of UTC timestamps\n\t */\n\tset selectedDates(selectedDates: Array<number>) {\n\t\tthis._setSelectedDates(selectedDates);\n\t}\n}\n\nCalendar.define();\n\nexport default Calendar;\nexport type {\n\tICalendarPicker,\n\tCalendarChangeEventDetail,\n};\n"]}
@@ -1,6 +1,7 @@
1
1
  /// <reference types="openui5" resolution-mode="require"/>
2
2
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
3
3
  import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
4
+ import DateFormat from "@ui5/webcomponents-localization/dist/DateFormat.js";
4
5
  import CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js";
5
6
  import CalendarDate from "@ui5/webcomponents-localization/dist/dates/CalendarDate.js";
6
7
  /**
@@ -49,6 +50,8 @@ declare class DateComponentBase extends UI5Element {
49
50
  /**
50
51
  * Determines the minimum date available for selection.
51
52
  *
53
+ * <b>Note:</b> If the formatPattern property is not set, the minDate value must be provided in the ISO date format (YYYY-MM-dd).
54
+ *
52
55
  * @type {string}
53
56
  * @name sap.ui.webc.main.DateComponentBase.prototype.minDate
54
57
  * @defaultvalue ""
@@ -59,6 +62,8 @@ declare class DateComponentBase extends UI5Element {
59
62
  /**
60
63
  * Determines the maximum date available for selection.
61
64
  *
65
+ * <b>Note:</b> If the formatPattern property is not set, the maxDate value must be provided in the ISO date format (YYYY-MM-dd).
66
+ *
62
67
  * @type {string}
63
68
  * @name sap.ui.webc.main.DateComponentBase.prototype.maxDate
64
69
  * @defaultvalue ""
@@ -67,16 +72,26 @@ declare class DateComponentBase extends UI5Element {
67
72
  */
68
73
  maxDate: string;
69
74
  static i18nBundle?: I18nBundle;
75
+ /**
76
+ * Cached instance of DateFormat with a format pattern of "YYYY-MM-dd".
77
+ * Used by the getISOFormat method to avoid creating a new DateFormat instance on each call.
78
+ *
79
+ * @type {DateFormat}
80
+ * @private
81
+ */
82
+ _isoFormatInstance?: DateFormat;
70
83
  constructor();
71
84
  get _primaryCalendarType(): CalendarType;
72
85
  get _minDate(): CalendarDate;
73
86
  get _maxDate(): CalendarDate;
74
87
  get _formatPattern(): string;
75
88
  get _isPattern(): boolean;
89
+ _getMinMaxCalendarDateFromString(date: string): CalendarDate | undefined;
76
90
  _getCalendarDateFromString(value: string): CalendarDate | undefined;
77
91
  _getTimeStampFromString(value: string): number | undefined;
78
92
  _getStringFromTimestamp(timestamp: number): string;
79
93
  getFormat(): import("sap/ui/core/format/DateFormat").default;
94
+ getISOFormat(): DateFormat;
80
95
  static onDefine(): Promise<void>;
81
96
  }
82
97
  export default DateComponentBase;
@@ -42,18 +42,18 @@ let DateComponentBase = DateComponentBase_1 = class DateComponentBase extends UI
42
42
  return this.primaryCalendarType || getCalendarType() || localeData.getPreferredCalendarType();
43
43
  }
44
44
  get _minDate() {
45
- // <b>Note:</b> Format#parse accepts only boolean type for 2nd and 3rd params,
46
- // but has logic related to "undefined" value, so we're calling it with "undefined" and casting to "boolean".
47
- const utc = undefined;
48
- const strict = undefined;
49
- return this.minDate && this.getFormat().parse(this.minDate, utc, strict) ? this._getCalendarDateFromString(this.minDate) : getMinCalendarDate(this._primaryCalendarType);
45
+ let minDate;
46
+ if (this.minDate) {
47
+ minDate = this._getMinMaxCalendarDateFromString(this.minDate);
48
+ }
49
+ return minDate || getMinCalendarDate(this._primaryCalendarType);
50
50
  }
51
51
  get _maxDate() {
52
- // <b>Note:</b> Format#parse accepts only boolean type for 2nd and 3rd params,
53
- // but has logic related to "undefined" value, so we're calling it with "undefined" and casting to "boolean".
54
- const utc = undefined;
55
- const strict = undefined;
56
- return this.maxDate && this.getFormat().parse(this.maxDate, utc, strict) ? this._getCalendarDateFromString(this.maxDate) : getMaxCalendarDate(this._primaryCalendarType);
52
+ let maxDate;
53
+ if (this.maxDate) {
54
+ maxDate = this._getMinMaxCalendarDateFromString(this.maxDate);
55
+ }
56
+ return maxDate || getMaxCalendarDate(this._primaryCalendarType);
57
57
  }
58
58
  get _formatPattern() {
59
59
  return this.formatPattern || "medium"; // get from config
@@ -61,12 +61,17 @@ let DateComponentBase = DateComponentBase_1 = class DateComponentBase extends UI
61
61
  get _isPattern() {
62
62
  return this._formatPattern !== "medium" && this._formatPattern !== "short" && this._formatPattern !== "long";
63
63
  }
64
+ _getMinMaxCalendarDateFromString(date) {
65
+ if (this.getFormat().parse(date)) {
66
+ return this._getCalendarDateFromString(date);
67
+ }
68
+ const jsDate = this.getISOFormat().parse(date);
69
+ if (jsDate) {
70
+ return CalendarDate.fromLocalJSDate(jsDate, this._primaryCalendarType);
71
+ }
72
+ }
64
73
  _getCalendarDateFromString(value) {
65
- // <b>Note:</b> Format#parse accepts only boolean type for 2nd and 3rd params,
66
- // but has logic related to "undefined" value, so we're calling it with "undefined" and casting to "boolean".
67
- const utc = undefined;
68
- const strict = undefined;
69
- const jsDate = this.getFormat().parse(value, utc, strict);
74
+ const jsDate = this.getFormat().parse(value);
70
75
  if (jsDate) {
71
76
  return CalendarDate.fromLocalJSDate(jsDate, this._primaryCalendarType);
72
77
  }
@@ -94,6 +99,16 @@ let DateComponentBase = DateComponentBase_1 = class DateComponentBase extends UI
94
99
  calendarType: this._primaryCalendarType,
95
100
  });
96
101
  }
102
+ getISOFormat() {
103
+ if (!this._isoFormatInstance) {
104
+ this._isoFormatInstance = DateFormat.getDateInstance({
105
+ strictParsing: true,
106
+ pattern: "YYYY-MM-dd",
107
+ calendarType: this._primaryCalendarType,
108
+ });
109
+ }
110
+ return this._isoFormatInstance;
111
+ }
97
112
  static async onDefine() {
98
113
  [DateComponentBase_1.i18nBundle] = await Promise.all([
99
114
  getI18nBundle("@ui5/webcomponents"),
@@ -1 +1 @@
1
- {"version":3,"file":"DateComponentBase.js","sourceRoot":"","sources":["../src/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AAS;KACnB,CAAC;GACI,iBAAiB,CAwItB;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport { fetchCldr } from \"@ui5/webcomponents-base/dist/asset-registries/LocaleData.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getCalendarType } from \"@ui5/webcomponents-base/dist/config/CalendarType.js\";\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport getCachedLocaleDataInstance from \"@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js\";\nimport CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\nimport getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport { getMaxCalendarDate, getMinCalendarDate } from \"@ui5/webcomponents-localization/dist/dates/ExtremeDates.js\";\n\n/**\n * @class\n *\n * Abstract class that provides common functionality for date-related components (day picker, month picker, year picker, calendar, date picker, date range picker, date time picker)\n * This includes:\n * - \"languageAware: true\" metadata setting, CLDR fetch and i18n initialization\n * - common properties (primaryCalendar, minDate, maxDate and formatPattern) declaration and methods that operate on them\n * - additional common methods\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.DateComponentBase\n * @extends sap.ui.webc.base.UI5Element\n * @public\n */\n@customElement({\n\tlanguageAware: true,\n\trenderer: litRender,\n})\nclass DateComponentBase extends UI5Element {\n\t/**\n\t * Sets a calendar type used for display.\n\t * If not set, the calendar type of the global configuration is used.\n\t * @type {sap.ui.webc.base.types.CalendarType}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.primaryCalendarType\n\t * @public\n\t */\n\t@property({ type: CalendarType })\n\tprimaryCalendarType?: CalendarType;\n\n\t/**\n\t * Defines the secondary calendar type.\n\t * If not set, the calendar will only show the primary calendar type.\n\t * @type {sap.ui.webc.base.types.CalendarType}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.secondaryCalendarType\n\t * @since 1.0.0-rc.16\n\t * @defaultvalue undefined\n\t * @public\n\t */\n\t@property({ type: CalendarType })\n\tsecondaryCalendarType?: CalendarType;\n\n\t/**\n\t * Determines the format, displayed in the input field.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.formatPattern\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tformatPattern!: string;\n\n\t/**\n\t * Determines the minimum date available for selection.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.minDate\n\t * @defaultvalue \"\"\n\t * @since 1.0.0-rc.6\n\t * @public\n\t */\n\t@property()\n\tminDate!: string;\n\n\t/**\n\t * Determines the maximum date available for selection.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.maxDate\n\t * @defaultvalue \"\"\n\t * @since 1.0.0-rc.6\n\t * @public\n\t */\n\t@property()\n\tmaxDate!: string;\n\n\tstatic i18nBundle?: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tget _primaryCalendarType() {\n\t\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\t\treturn this.primaryCalendarType || getCalendarType() || localeData.getPreferredCalendarType();\n\t}\n\n\tget _minDate() {\n\t\t// <b>Note:</b> Format#parse accepts only boolean type for 2nd and 3rd params,\n\t\t// but has logic related to \"undefined\" value, so we're calling it with \"undefined\" and casting to \"boolean\".\n\t\tconst utc = undefined as unknown as boolean;\n\t\tconst strict = undefined as unknown as boolean;\n\t\treturn this.minDate && this.getFormat().parse(this.minDate, utc, strict) ? this._getCalendarDateFromString(this.minDate)! : getMinCalendarDate(this._primaryCalendarType);\n\t}\n\n\tget _maxDate() {\n\t\t// <b>Note:</b> Format#parse accepts only boolean type for 2nd and 3rd params,\n\t\t// but has logic related to \"undefined\" value, so we're calling it with \"undefined\" and casting to \"boolean\".\n\t\tconst utc = undefined as unknown as boolean;\n\t\tconst strict = undefined as unknown as boolean;\n\t\treturn this.maxDate && this.getFormat().parse(this.maxDate, utc, strict) ? this._getCalendarDateFromString(this.maxDate)! : getMaxCalendarDate(this._primaryCalendarType);\n\t}\n\n\tget _formatPattern() {\n\t\treturn this.formatPattern || \"medium\"; // get from config\n\t}\n\n\tget _isPattern() {\n\t\treturn this._formatPattern !== \"medium\" && this._formatPattern !== \"short\" && this._formatPattern !== \"long\";\n\t}\n\n\t_getCalendarDateFromString(value: string) {\n\t\t// <b>Note:</b> Format#parse accepts only boolean type for 2nd and 3rd params,\n\t\t// but has logic related to \"undefined\" value, so we're calling it with \"undefined\" and casting to \"boolean\".\n\t\tconst utc = undefined as unknown as boolean;\n\t\tconst strict = undefined as unknown as boolean;\n\t\tconst jsDate = this.getFormat().parse(value, utc, strict) as Date;\n\t\tif (jsDate) {\n\t\t\treturn CalendarDate.fromLocalJSDate(jsDate, this._primaryCalendarType);\n\t\t}\n\t}\n\n\t_getTimeStampFromString(value: string) {\n\t\tconst calDate = this._getCalendarDateFromString(value);\n\t\tif (calDate) {\n\t\t\treturn calDate.toUTCJSDate().valueOf();\n\t\t}\n\t}\n\n\t_getStringFromTimestamp(timestamp: number) {\n\t\tconst localDate = new Date(timestamp);\n\t\treturn this.getFormat().format(localDate, true);\n\t}\n\n\tgetFormat() {\n\t\treturn this._isPattern\n\t\t\t? DateFormat.getDateInstance({\n\t\t\t\tstrictParsing: true,\n\t\t\t\tpattern: this._formatPattern,\n\t\t\t\tcalendarType: this._primaryCalendarType,\n\t\t\t})\n\t\t\t: DateFormat.getDateInstance({\n\t\t\t\tstrictParsing: true,\n\t\t\t\tstyle: this._formatPattern,\n\t\t\t\tcalendarType: this._primaryCalendarType,\n\t\t\t});\n\t}\n\n\tstatic async onDefine() {\n\t\t[DateComponentBase.i18nBundle] = await Promise.all([\n\t\t\tgetI18nBundle(\"@ui5/webcomponents\"),\n\t\t\tfetchCldr(getLocale().getLanguage(), getLocale().getRegion(), getLocale().getScript()),\n\t\t]);\n\t}\n}\n\nexport default DateComponentBase;\n"]}
1
+ {"version":3,"file":"DateComponentBase.js","sourceRoot":"","sources":["../src/DateComponentBase.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,6DAA6D,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,UAAU,MAAM,oDAAoD,CAAC;AAC5E,OAAO,2BAA2B,MAAM,qEAAqE,CAAC;AAC9G,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,SAAS,MAAM,kDAAkD,CAAC;AACzE,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAEpH;;;;;;;;;;;;;;GAcG;AAKH,IAAM,iBAAiB,yBAAvB,MAAM,iBAAkB,SAAQ,UAAU;IAyEzC;QACC,KAAK,EAAE,CAAC;IACT,CAAC;IAED,IAAI,oBAAoB;QACvB,MAAM,UAAU,GAAG,2BAA2B,CAAC,SAAS,EAAE,CAAC,CAAC;QAC5D,OAAO,IAAI,CAAC,mBAAmB,IAAI,eAAe,EAAE,IAAI,UAAU,CAAC,wBAAwB,EAAE,CAAC;IAC/F,CAAC;IAED,IAAI,QAAQ;QACX,IAAI,OAAO,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AAS,CAAC,SAAS,EAAE,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,CAAC,SAAS,EAAE,CAAC;SACtF,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AAlKA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8DACE;AAYnC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;gEACI;AAWrC;IADC,QAAQ,EAAE;wDACY;AAcvB;IADC,QAAQ,EAAE;kDACM;AAcjB;IADC,QAAQ,EAAE;kDACM;AA5DZ,iBAAiB;IAJtB,aAAa,CAAC;QACd,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;KACnB,CAAC;GACI,iBAAiB,CA2KtB;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport { fetchCldr } from \"@ui5/webcomponents-base/dist/asset-registries/LocaleData.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getCalendarType } from \"@ui5/webcomponents-base/dist/config/CalendarType.js\";\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport getCachedLocaleDataInstance from \"@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js\";\nimport CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\nimport getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport { getMaxCalendarDate, getMinCalendarDate } from \"@ui5/webcomponents-localization/dist/dates/ExtremeDates.js\";\n\n/**\n * @class\n *\n * Abstract class that provides common functionality for date-related components (day picker, month picker, year picker, calendar, date picker, date range picker, date time picker)\n * This includes:\n * - \"languageAware: true\" metadata setting, CLDR fetch and i18n initialization\n * - common properties (primaryCalendar, minDate, maxDate and formatPattern) declaration and methods that operate on them\n * - additional common methods\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.DateComponentBase\n * @extends sap.ui.webc.base.UI5Element\n * @public\n */\n@customElement({\n\tlanguageAware: true,\n\trenderer: litRender,\n})\nclass DateComponentBase extends UI5Element {\n\t/**\n\t * Sets a calendar type used for display.\n\t * If not set, the calendar type of the global configuration is used.\n\t * @type {sap.ui.webc.base.types.CalendarType}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.primaryCalendarType\n\t * @public\n\t */\n\t@property({ type: CalendarType })\n\tprimaryCalendarType?: CalendarType;\n\n\t/**\n\t * Defines the secondary calendar type.\n\t * If not set, the calendar will only show the primary calendar type.\n\t * @type {sap.ui.webc.base.types.CalendarType}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.secondaryCalendarType\n\t * @since 1.0.0-rc.16\n\t * @defaultvalue undefined\n\t * @public\n\t */\n\t@property({ type: CalendarType })\n\tsecondaryCalendarType?: CalendarType;\n\n\t/**\n\t * Determines the format, displayed in the input field.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.formatPattern\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tformatPattern!: string;\n\n\t/**\n\t * Determines the minimum date available for selection.\n\t *\n\t * <b>Note:</b> If the formatPattern property is not set, the minDate value must be provided in the ISO date format (YYYY-MM-dd).\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.minDate\n\t * @defaultvalue \"\"\n\t * @since 1.0.0-rc.6\n\t * @public\n\t */\n\t@property()\n\tminDate!: string;\n\n\t/**\n\t * Determines the maximum date available for selection.\n\t *\n\t * <b>Note:</b> If the formatPattern property is not set, the maxDate value must be provided in the ISO date format (YYYY-MM-dd).\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.maxDate\n\t * @defaultvalue \"\"\n\t * @since 1.0.0-rc.6\n\t * @public\n\t */\n\t@property()\n\tmaxDate!: string;\n\n\tstatic i18nBundle?: I18nBundle;\n\n\t/**\n\t * Cached instance of DateFormat with a format pattern of \"YYYY-MM-dd\".\n\t * Used by the getISOFormat method to avoid creating a new DateFormat instance on each call.\n\t *\n\t * @type {DateFormat}\n\t * @private\n\t */\n\t_isoFormatInstance?: DateFormat;\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tget _primaryCalendarType() {\n\t\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\t\treturn this.primaryCalendarType || getCalendarType() || localeData.getPreferredCalendarType();\n\t}\n\n\tget _minDate() {\n\t\tlet minDate;\n\n\t\tif (this.minDate) {\n\t\t\tminDate = this._getMinMaxCalendarDateFromString(this.minDate);\n\t\t}\n\n\t\treturn minDate || getMinCalendarDate(this._primaryCalendarType);\n\t}\n\n\tget _maxDate() {\n\t\tlet maxDate;\n\n\t\tif (this.maxDate) {\n\t\t\tmaxDate = this._getMinMaxCalendarDateFromString(this.maxDate)!;\n\t\t}\n\n\t\treturn maxDate || getMaxCalendarDate(this._primaryCalendarType);\n\t}\n\n\tget _formatPattern() {\n\t\treturn this.formatPattern || \"medium\"; // get from config\n\t}\n\n\tget _isPattern() {\n\t\treturn this._formatPattern !== \"medium\" && this._formatPattern !== \"short\" && this._formatPattern !== \"long\";\n\t}\n\n\t_getMinMaxCalendarDateFromString(date: string) {\n\t\tif (this.getFormat().parse(date)) {\n\t\t\treturn this._getCalendarDateFromString(date);\n\t\t}\n\n\t\tconst jsDate = this.getISOFormat().parse(date) as Date;\n\t\tif (jsDate) {\n\t\t\treturn CalendarDate.fromLocalJSDate(jsDate, this._primaryCalendarType);\n\t\t}\n\t}\n\n\t_getCalendarDateFromString(value: string) {\n\t\tconst jsDate = this.getFormat().parse(value) as Date;\n\t\tif (jsDate) {\n\t\t\treturn CalendarDate.fromLocalJSDate(jsDate, this._primaryCalendarType);\n\t\t}\n\t}\n\n\t_getTimeStampFromString(value: string) {\n\t\tconst calDate = this._getCalendarDateFromString(value);\n\t\tif (calDate) {\n\t\t\treturn calDate.toUTCJSDate().valueOf();\n\t\t}\n\t}\n\n\t_getStringFromTimestamp(timestamp: number) {\n\t\tconst localDate = new Date(timestamp);\n\t\treturn this.getFormat().format(localDate, true);\n\t}\n\n\tgetFormat() {\n\t\treturn this._isPattern\n\t\t\t? DateFormat.getDateInstance({\n\t\t\t\tstrictParsing: true,\n\t\t\t\tpattern: this._formatPattern,\n\t\t\t\tcalendarType: this._primaryCalendarType,\n\t\t\t})\n\t\t\t: DateFormat.getDateInstance({\n\t\t\t\tstrictParsing: true,\n\t\t\t\tstyle: this._formatPattern,\n\t\t\t\tcalendarType: this._primaryCalendarType,\n\t\t\t});\n\t}\n\n\tgetISOFormat() {\n\t\tif (!this._isoFormatInstance) {\n\t\t\tthis._isoFormatInstance = DateFormat.getDateInstance({\n\t\t\t\tstrictParsing: true,\n\t\t\t\tpattern: \"YYYY-MM-dd\",\n\t\t\t\tcalendarType: this._primaryCalendarType,\n\t\t\t});\n\t\t}\n\t\treturn this._isoFormatInstance;\n\t}\n\n\tstatic async onDefine() {\n\t\t[DateComponentBase.i18nBundle] = await Promise.all([\n\t\t\tgetI18nBundle(\"@ui5/webcomponents\"),\n\t\t\tfetchCldr(getLocale().getLanguage(), getLocale().getRegion(), getLocale().getScript()),\n\t\t]);\n\t}\n}\n\nexport default DateComponentBase;\n"]}
@@ -342,9 +342,7 @@ let DatePicker = DatePicker_1 = class DatePicker extends DateComponentBase {
342
342
  if (value === "") {
343
343
  return true;
344
344
  }
345
- // <b>Note:</b> Format#parse accepts only boolean type for 2nd and 3rd params,
346
- // but has logic related to "undefined" value, so we're calling it with "undefined" and casting to "boolean".
347
- return !!this.getFormat().parse(value, undefined, undefined);
345
+ return !!this.getFormat().parse(value);
348
346
  }
349
347
  /**
350
348
  * Checks if a date is between the minimum and maximum date.
@@ -372,7 +370,7 @@ let DatePicker = DatePicker_1 = class DatePicker extends DateComponentBase {
372
370
  if (value === "") {
373
371
  return value;
374
372
  }
375
- return this.getFormat().format(this.getFormat().parse(value, true, undefined), true); // it is important to both parse and format the date as UTC
373
+ return this.getFormat().format(this.getFormat().parse(value, true), true); // it is important to both parse and format the date as UTC
376
374
  }
377
375
  get _displayFormat() {
378
376
  // @ts-ignore oFormatOptions is a private API of DateFormat
@@ -533,14 +531,10 @@ let DatePicker = DatePicker_1 = class DatePicker extends DateComponentBase {
533
531
  * @type { Date }
534
532
  */
535
533
  get dateValue() {
536
- const utc = undefined;
537
- const strict = undefined;
538
- return this.liveValue ? this.getFormat().parse(this.liveValue, utc, strict) : this.getFormat().parse(this.value, utc, strict);
534
+ return this.liveValue ? this.getFormat().parse(this.liveValue) : this.getFormat().parse(this.value);
539
535
  }
540
536
  get dateValueUTC() {
541
- const utc = undefined;
542
- const strict = undefined;
543
- return this.liveValue ? this.getFormat().parse(this.liveValue, true, strict) : this.getFormat().parse(this.value, utc, strict);
537
+ return this.liveValue ? this.getFormat().parse(this.liveValue, true) : this.getFormat().parse(this.value);
544
538
  }
545
539
  get styles() {
546
540
  return {