@openui5/sap.f 1.145.0 → 1.146.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 (395) hide show
  1. package/THIRDPARTY.txt +7 -7
  2. package/package.json +10 -10
  3. package/src/sap/f/.library +8 -8
  4. package/src/sap/f/Avatar.js +1 -1
  5. package/src/sap/f/AvatarGroup.js +8 -2
  6. package/src/sap/f/AvatarGroupItem.js +1 -1
  7. package/src/sap/f/CalendarAppointmentInCard.js +1 -1
  8. package/src/sap/f/CalendarInCard.js +1 -1
  9. package/src/sap/f/Card.js +1 -1
  10. package/src/sap/f/CardBase.js +3 -3
  11. package/src/sap/f/DynamicPage.js +1 -1
  12. package/src/sap/f/DynamicPageAccessibleLandmarkInfo.js +1 -1
  13. package/src/sap/f/DynamicPageHeader.js +1 -1
  14. package/src/sap/f/DynamicPageTitle.js +1 -1
  15. package/src/sap/f/FlexibleColumnLayout.js +8 -2
  16. package/src/sap/f/FlexibleColumnLayoutAccessibleLandmarkInfo.js +1 -1
  17. package/src/sap/f/FlexibleColumnLayoutData.js +1 -1
  18. package/src/sap/f/FlexibleColumnLayoutDataForDesktop.js +1 -1
  19. package/src/sap/f/FlexibleColumnLayoutDataForTablet.js +1 -1
  20. package/src/sap/f/FlexibleColumnLayoutSemanticHelper.js +1 -1
  21. package/src/sap/f/GridContainer.js +1 -1
  22. package/src/sap/f/GridContainerItemLayoutData.js +1 -1
  23. package/src/sap/f/GridContainerSettings.js +2 -2
  24. package/src/sap/f/GridList.js +1 -1
  25. package/src/sap/f/GridListItem.js +1 -1
  26. package/src/sap/f/IllustratedMessage.js +1 -1
  27. package/src/sap/f/Illustration.js +1 -1
  28. package/src/sap/f/PlanningCalendarInCardLegend.js +1 -1
  29. package/src/sap/f/ProductSwitch.js +1 -1
  30. package/src/sap/f/ProductSwitchItem.js +1 -1
  31. package/src/sap/f/SearchManager.js +1 -1
  32. package/src/sap/f/ShellBar.js +1 -1
  33. package/src/sap/f/SidePanel.js +5 -1
  34. package/src/sap/f/SidePanelItem.js +7 -1
  35. package/src/sap/f/cards/BaseHeader.js +39 -26
  36. package/src/sap/f/cards/Header.js +7 -7
  37. package/src/sap/f/cards/NumericHeader.js +22 -23
  38. package/src/sap/f/cards/NumericIndicators.js +1 -2
  39. package/src/sap/f/cards/NumericSideIndicator.js +2 -3
  40. package/src/sap/f/cards/loading/AnalyticalPlaceholder.js +1 -1
  41. package/src/sap/f/cards/loading/CalendarPlaceholder.js +1 -1
  42. package/src/sap/f/cards/loading/GenericPlaceholder.js +1 -1
  43. package/src/sap/f/cards/loading/ListPlaceholder.js +1 -1
  44. package/src/sap/f/cards/loading/ObjectPlaceholder.js +1 -1
  45. package/src/sap/f/cards/loading/PlaceholderBase.js +1 -1
  46. package/src/sap/f/cards/loading/TablePlaceholder.js +1 -1
  47. package/src/sap/f/cards/loading/TimelinePlaceholder.js +1 -1
  48. package/src/sap/f/changeHandler/MoveDynamicPageTitleActions.js +1 -1
  49. package/src/sap/f/delegate/GridContainerItemNavigation.js +1 -1
  50. package/src/sap/f/delegate/GridItemNavigation.js +1 -1
  51. package/src/sap/f/dnd/GridDragOver.js +1 -1
  52. package/src/sap/f/dnd/GridDropInfo.js +1 -1
  53. package/src/sap/f/gen/ui5/webcomponents/dist/Avatar.js +2 -246
  54. package/src/sap/f/gen/ui5/webcomponents/dist/Button.js +2 -349
  55. package/src/sap/f/gen/ui5/webcomponents/dist/Label.js +2 -126
  56. package/src/sap/f/gen/ui5/webcomponents/dist/ListItem.js +2 -141
  57. package/src/sap/f/gen/ui5/webcomponents/dist/ListItemBase.js +2 -60
  58. package/src/sap/f/gen/ui5/webcomponents/dist/ListItemGroup.js +2 -208
  59. package/src/sap/f/gen/ui5/webcomponents/dist/Menu.js +2 -283
  60. package/src/sap/f/gen/ui5/webcomponents/dist/MenuItem.js +2 -357
  61. package/src/sap/f/gen/ui5/webcomponents.js +2 -3155
  62. package/src/sap/f/gen/ui5/webcomponents_base.js +2 -600
  63. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/IllustratedMessage.js +2 -214
  64. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/NotificationList.js +2 -203
  65. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/NotificationListGroupItem.js +2 -167
  66. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/NotificationListItem.js +2 -248
  67. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/NotificationListItemBase.js +2 -86
  68. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/Search.js +2 -254
  69. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/SearchItem.js +2 -128
  70. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/SearchItemGroup.js +2 -56
  71. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/SearchItemShowMore.js +2 -87
  72. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/SearchMessageArea.js +2 -75
  73. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/SearchScope.js +2 -80
  74. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/ShellBar.js +2 -669
  75. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/ShellBarBranding.js +2 -123
  76. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/ShellBarItem.js +2 -140
  77. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/ShellBarSearch.js +2 -236
  78. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/ShellBarSpacer.js +2 -72
  79. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/UserMenu.js +2 -282
  80. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/UserMenuAccount.js +2 -134
  81. package/src/sap/f/gen/ui5/webcomponents_fiori/dist/UserMenuItem.js +2 -79
  82. package/src/sap/f/gen/ui5/webcomponents_fiori.js +2 -1859
  83. package/src/sap/f/library.js +3 -4
  84. package/src/sap/f/routing/Target.js +2 -2
  85. package/src/sap/f/semantic/AddAction.js +1 -1
  86. package/src/sap/f/semantic/CloseAction.js +1 -1
  87. package/src/sap/f/semantic/CopyAction.js +1 -1
  88. package/src/sap/f/semantic/DeleteAction.js +1 -1
  89. package/src/sap/f/semantic/DiscussInJamAction.js +1 -1
  90. package/src/sap/f/semantic/EditAction.js +1 -1
  91. package/src/sap/f/semantic/ExitFullScreenAction.js +1 -1
  92. package/src/sap/f/semantic/FavoriteAction.js +1 -1
  93. package/src/sap/f/semantic/FlagAction.js +1 -1
  94. package/src/sap/f/semantic/FooterMainAction.js +1 -1
  95. package/src/sap/f/semantic/FullScreenAction.js +1 -1
  96. package/src/sap/f/semantic/MainAction.js +1 -1
  97. package/src/sap/f/semantic/MessagesIndicator.js +1 -1
  98. package/src/sap/f/semantic/NegativeAction.js +1 -1
  99. package/src/sap/f/semantic/PositiveAction.js +1 -1
  100. package/src/sap/f/semantic/PrintAction.js +1 -1
  101. package/src/sap/f/semantic/SemanticButton.js +1 -1
  102. package/src/sap/f/semantic/SemanticConfiguration.js +1 -1
  103. package/src/sap/f/semantic/SemanticControl.js +1 -1
  104. package/src/sap/f/semantic/SemanticPage.js +1 -1
  105. package/src/sap/f/semantic/SemanticToggleButton.js +1 -1
  106. package/src/sap/f/semantic/SendEmailAction.js +1 -1
  107. package/src/sap/f/semantic/SendMessageAction.js +1 -1
  108. package/src/sap/f/semantic/ShareInJamAction.js +1 -1
  109. package/src/sap/f/semantic/TitleMainAction.js +1 -1
  110. package/src/sap/f/shellBar/AdditionalContentSupport.js +1 -1
  111. package/src/sap/f/shellBar/CoPilot.js +1 -1
  112. package/src/sap/f/shellBar/ControlSpacer.js +1 -1
  113. package/src/sap/f/shellBar/Search.js +1 -1
  114. package/src/sap/f/themes/base/AvatarGroup.less +2 -2
  115. package/src/sap/f/thirdparty/AccessibilityTextsHelper.js +2 -13
  116. package/src/sap/f/thirdparty/Avatar.js +2 -453
  117. package/src/sap/f/thirdparty/BusyIndicator.js +2 -233
  118. package/src/sap/f/thirdparty/Button.js +2 -7
  119. package/src/sap/f/thirdparty/Button2.js +2 -656
  120. package/src/sap/f/thirdparty/FocusableElements.js +2 -10
  121. package/src/sap/f/thirdparty/Icon.js +2 -313
  122. package/src/sap/f/thirdparty/Icons.js +2 -56
  123. package/src/sap/f/thirdparty/IllustratedMessage.js +2 -1295
  124. package/src/sap/f/thirdparty/Illustrations.js +2 -9
  125. package/src/sap/f/thirdparty/Label.js +2 -115
  126. package/src/sap/f/thirdparty/Link.js +2 -316
  127. package/src/sap/f/thirdparty/List.js +2 -1253
  128. package/src/sap/f/thirdparty/ListBoxItemGroupTemplate.js +2 -14
  129. package/src/sap/f/thirdparty/ListItemAdditionalText.css.js +2 -10
  130. package/src/sap/f/thirdparty/ListItemBase.js +2 -251
  131. package/src/sap/f/thirdparty/ListItemGroup.js +2 -637
  132. package/src/sap/f/thirdparty/Menu.js +2 -389
  133. package/src/sap/f/thirdparty/MenuItem.js +2 -10
  134. package/src/sap/f/thirdparty/MenuItem2.js +2 -762
  135. package/src/sap/f/thirdparty/NotificationList.js +2 -291
  136. package/src/sap/f/thirdparty/NotificationListGroupItem.js +2 -310
  137. package/src/sap/f/thirdparty/NotificationListItem.js +2 -534
  138. package/src/sap/f/thirdparty/NotificationListItemBase.js +2 -98
  139. package/src/sap/f/thirdparty/ResponsivePopover.js +2 -2312
  140. package/src/sap/f/thirdparty/SearchItem.css.js +2 -10
  141. package/src/sap/f/thirdparty/SearchItem.js +2 -152
  142. package/src/sap/f/thirdparty/SearchItemGroup.js +2 -44
  143. package/src/sap/f/thirdparty/SearchItemShowMore.js +2 -86
  144. package/src/sap/f/thirdparty/SearchMessageArea.js +2 -49
  145. package/src/sap/f/thirdparty/SearchScope.js +2 -39
  146. package/src/sap/f/thirdparty/ShellBar.js +2 -1809
  147. package/src/sap/f/thirdparty/ShellBarBranding.js +2 -119
  148. package/src/sap/f/thirdparty/ShellBarItem.js +2 -89
  149. package/src/sap/f/thirdparty/ShellBarSearch.js +2 -7
  150. package/src/sap/f/thirdparty/ShellBarSearch2.js +2 -3453
  151. package/src/sap/f/thirdparty/ShellBarSpacer.js +2 -40
  152. package/src/sap/f/thirdparty/Tag.js +2 -302
  153. package/src/sap/f/thirdparty/Text.js +2 -127
  154. package/src/sap/f/thirdparty/Theme.js +2 -187
  155. package/src/sap/f/thirdparty/Title.js +2 -167
  156. package/src/sap/f/thirdparty/UserMenu.js +2 -950
  157. package/src/sap/f/thirdparty/UserMenuAccount.js +2 -114
  158. package/src/sap/f/thirdparty/UserMenuItem.js +2 -61
  159. package/src/sap/f/thirdparty/ValueState.js +2 -7
  160. package/src/sap/f/thirdparty/WrappingType.js +2 -24
  161. package/src/sap/f/thirdparty/_dynamics/InputComposition.js +2 -35
  162. package/src/sap/f/thirdparty/_dynamics/InputSuggestions.js +2 -397
  163. package/src/sap/f/thirdparty/_dynamics/ListItemStandardExpandableTextTemplate.js +2 -193
  164. package/src/sap/f/thirdparty/_dynamics/SAP-icons-TNT.js +2 -585
  165. package/src/sap/f/thirdparty/_dynamics/SAP-icons-TNT2.js +2 -585
  166. package/src/sap/f/thirdparty/_dynamics/SAP-icons-business-suite.js +2 -1194
  167. package/src/sap/f/thirdparty/_dynamics/SAP-icons-business-suite2.js +2 -1194
  168. package/src/sap/f/thirdparty/_dynamics/SAP-icons.js +2 -2509
  169. package/src/sap/f/thirdparty/_dynamics/SAP-icons2.js +2 -2509
  170. package/src/sap/f/thirdparty/_dynamics/ar.js +2 -0
  171. package/src/sap/f/thirdparty/_dynamics/ar_EG.js +2 -0
  172. package/src/sap/f/thirdparty/_dynamics/ar_SA.js +2 -0
  173. package/src/sap/f/thirdparty/_dynamics/bg.js +2 -0
  174. package/src/sap/f/thirdparty/_dynamics/ca.js +2 -0
  175. package/src/sap/f/thirdparty/_dynamics/cnr.js +2 -0
  176. package/src/sap/f/thirdparty/_dynamics/cs.js +2 -0
  177. package/src/sap/f/thirdparty/_dynamics/da.js +2 -0
  178. package/src/sap/f/thirdparty/_dynamics/de.js +2 -0
  179. package/src/sap/f/thirdparty/_dynamics/de_AT.js +2 -0
  180. package/src/sap/f/thirdparty/_dynamics/de_CH.js +2 -0
  181. package/src/sap/f/thirdparty/_dynamics/el.js +2 -0
  182. package/src/sap/f/thirdparty/_dynamics/el_CY.js +2 -0
  183. package/src/sap/f/thirdparty/_dynamics/en.js +2 -0
  184. package/src/sap/f/thirdparty/_dynamics/en_AU.js +2 -0
  185. package/src/sap/f/thirdparty/_dynamics/en_GB.js +2 -0
  186. package/src/sap/f/thirdparty/_dynamics/en_HK.js +2 -0
  187. package/src/sap/f/thirdparty/_dynamics/en_IE.js +2 -0
  188. package/src/sap/f/thirdparty/_dynamics/en_IN.js +2 -0
  189. package/src/sap/f/thirdparty/_dynamics/en_NZ.js +2 -0
  190. package/src/sap/f/thirdparty/_dynamics/en_PG.js +2 -0
  191. package/src/sap/f/thirdparty/_dynamics/en_SG.js +2 -0
  192. package/src/sap/f/thirdparty/_dynamics/en_ZA.js +2 -0
  193. package/src/sap/f/thirdparty/_dynamics/es.js +2 -0
  194. package/src/sap/f/thirdparty/_dynamics/es_AR.js +2 -0
  195. package/src/sap/f/thirdparty/_dynamics/es_BO.js +2 -0
  196. package/src/sap/f/thirdparty/_dynamics/es_CL.js +2 -0
  197. package/src/sap/f/thirdparty/_dynamics/es_CO.js +2 -0
  198. package/src/sap/f/thirdparty/_dynamics/es_MX.js +2 -0
  199. package/src/sap/f/thirdparty/_dynamics/es_PE.js +2 -0
  200. package/src/sap/f/thirdparty/_dynamics/es_UY.js +2 -0
  201. package/src/sap/f/thirdparty/_dynamics/es_VE.js +2 -0
  202. package/src/sap/f/thirdparty/_dynamics/et.js +2 -0
  203. package/src/sap/f/thirdparty/_dynamics/fa.js +2 -0
  204. package/src/sap/f/thirdparty/_dynamics/fi.js +2 -0
  205. package/src/sap/f/thirdparty/_dynamics/fr.js +2 -0
  206. package/src/sap/f/thirdparty/_dynamics/fr_BE.js +2 -0
  207. package/src/sap/f/thirdparty/_dynamics/fr_CA.js +2 -0
  208. package/src/sap/f/thirdparty/_dynamics/fr_CH.js +2 -0
  209. package/src/sap/f/thirdparty/_dynamics/fr_LU.js +2 -0
  210. package/src/sap/f/thirdparty/_dynamics/he.js +2 -0
  211. package/src/sap/f/thirdparty/_dynamics/hi.js +2 -0
  212. package/src/sap/f/thirdparty/_dynamics/hr.js +2 -0
  213. package/src/sap/f/thirdparty/_dynamics/hu.js +2 -0
  214. package/src/sap/f/thirdparty/_dynamics/id.js +2 -0
  215. package/src/sap/f/thirdparty/_dynamics/it.js +2 -0
  216. package/src/sap/f/thirdparty/_dynamics/it_CH.js +2 -0
  217. package/src/sap/f/thirdparty/_dynamics/ja.js +2 -0
  218. package/src/sap/f/thirdparty/_dynamics/kk.js +2 -0
  219. package/src/sap/f/thirdparty/_dynamics/ko.js +2 -0
  220. package/src/sap/f/thirdparty/_dynamics/lt.js +2 -0
  221. package/src/sap/f/thirdparty/_dynamics/lv.js +2 -0
  222. package/src/sap/f/thirdparty/_dynamics/messagebundle_ar.js +2 -866
  223. package/src/sap/f/thirdparty/_dynamics/messagebundle_ar2.js +2 -611
  224. package/src/sap/f/thirdparty/_dynamics/messagebundle_bg.js +2 -866
  225. package/src/sap/f/thirdparty/_dynamics/messagebundle_bg2.js +2 -611
  226. package/src/sap/f/thirdparty/_dynamics/messagebundle_ca.js +2 -866
  227. package/src/sap/f/thirdparty/_dynamics/messagebundle_ca2.js +2 -611
  228. package/src/sap/f/thirdparty/_dynamics/messagebundle_cnr.js +2 -866
  229. package/src/sap/f/thirdparty/_dynamics/messagebundle_cnr2.js +2 -611
  230. package/src/sap/f/thirdparty/_dynamics/messagebundle_cs.js +2 -866
  231. package/src/sap/f/thirdparty/_dynamics/messagebundle_cs2.js +2 -611
  232. package/src/sap/f/thirdparty/_dynamics/messagebundle_cy.js +2 -866
  233. package/src/sap/f/thirdparty/_dynamics/messagebundle_cy2.js +2 -611
  234. package/src/sap/f/thirdparty/_dynamics/messagebundle_da.js +2 -866
  235. package/src/sap/f/thirdparty/_dynamics/messagebundle_da2.js +2 -611
  236. package/src/sap/f/thirdparty/_dynamics/messagebundle_de.js +2 -866
  237. package/src/sap/f/thirdparty/_dynamics/messagebundle_de2.js +2 -611
  238. package/src/sap/f/thirdparty/_dynamics/messagebundle_el.js +2 -866
  239. package/src/sap/f/thirdparty/_dynamics/messagebundle_el2.js +2 -611
  240. package/src/sap/f/thirdparty/_dynamics/messagebundle_en.js +2 -866
  241. package/src/sap/f/thirdparty/_dynamics/messagebundle_en2.js +2 -611
  242. package/src/sap/f/thirdparty/_dynamics/messagebundle_en_GB.js +2 -866
  243. package/src/sap/f/thirdparty/_dynamics/messagebundle_en_GB2.js +2 -611
  244. package/src/sap/f/thirdparty/_dynamics/messagebundle_en_US_sappsd.js +2 -866
  245. package/src/sap/f/thirdparty/_dynamics/messagebundle_en_US_sappsd2.js +2 -611
  246. package/src/sap/f/thirdparty/_dynamics/messagebundle_en_US_saprigi.js +2 -866
  247. package/src/sap/f/thirdparty/_dynamics/messagebundle_en_US_saprigi2.js +2 -611
  248. package/src/sap/f/thirdparty/_dynamics/messagebundle_en_US_saptrc.js +2 -866
  249. package/src/sap/f/thirdparty/_dynamics/messagebundle_en_US_saptrc2.js +2 -611
  250. package/src/sap/f/thirdparty/_dynamics/messagebundle_es.js +2 -866
  251. package/src/sap/f/thirdparty/_dynamics/messagebundle_es2.js +2 -611
  252. package/src/sap/f/thirdparty/_dynamics/messagebundle_es_MX.js +2 -866
  253. package/src/sap/f/thirdparty/_dynamics/messagebundle_es_MX2.js +2 -611
  254. package/src/sap/f/thirdparty/_dynamics/messagebundle_et.js +2 -866
  255. package/src/sap/f/thirdparty/_dynamics/messagebundle_et2.js +2 -611
  256. package/src/sap/f/thirdparty/_dynamics/messagebundle_fi.js +2 -866
  257. package/src/sap/f/thirdparty/_dynamics/messagebundle_fi2.js +2 -611
  258. package/src/sap/f/thirdparty/_dynamics/messagebundle_fr.js +2 -866
  259. package/src/sap/f/thirdparty/_dynamics/messagebundle_fr2.js +2 -611
  260. package/src/sap/f/thirdparty/_dynamics/messagebundle_fr_CA.js +2 -866
  261. package/src/sap/f/thirdparty/_dynamics/messagebundle_fr_CA2.js +2 -611
  262. package/src/sap/f/thirdparty/_dynamics/messagebundle_hi.js +2 -866
  263. package/src/sap/f/thirdparty/_dynamics/messagebundle_hi2.js +2 -611
  264. package/src/sap/f/thirdparty/_dynamics/messagebundle_hr.js +2 -866
  265. package/src/sap/f/thirdparty/_dynamics/messagebundle_hr2.js +2 -611
  266. package/src/sap/f/thirdparty/_dynamics/messagebundle_hu.js +2 -866
  267. package/src/sap/f/thirdparty/_dynamics/messagebundle_hu2.js +2 -611
  268. package/src/sap/f/thirdparty/_dynamics/messagebundle_id.js +2 -866
  269. package/src/sap/f/thirdparty/_dynamics/messagebundle_id2.js +2 -611
  270. package/src/sap/f/thirdparty/_dynamics/messagebundle_it.js +2 -866
  271. package/src/sap/f/thirdparty/_dynamics/messagebundle_it2.js +2 -611
  272. package/src/sap/f/thirdparty/_dynamics/messagebundle_iw.js +2 -866
  273. package/src/sap/f/thirdparty/_dynamics/messagebundle_iw2.js +2 -611
  274. package/src/sap/f/thirdparty/_dynamics/messagebundle_ja.js +2 -866
  275. package/src/sap/f/thirdparty/_dynamics/messagebundle_ja2.js +2 -611
  276. package/src/sap/f/thirdparty/_dynamics/messagebundle_kk.js +2 -866
  277. package/src/sap/f/thirdparty/_dynamics/messagebundle_kk2.js +2 -611
  278. package/src/sap/f/thirdparty/_dynamics/messagebundle_ko.js +2 -866
  279. package/src/sap/f/thirdparty/_dynamics/messagebundle_ko2.js +2 -611
  280. package/src/sap/f/thirdparty/_dynamics/messagebundle_lt.js +2 -866
  281. package/src/sap/f/thirdparty/_dynamics/messagebundle_lt2.js +2 -611
  282. package/src/sap/f/thirdparty/_dynamics/messagebundle_lv.js +2 -866
  283. package/src/sap/f/thirdparty/_dynamics/messagebundle_lv2.js +2 -611
  284. package/src/sap/f/thirdparty/_dynamics/messagebundle_mk.js +2 -866
  285. package/src/sap/f/thirdparty/_dynamics/messagebundle_mk2.js +2 -611
  286. package/src/sap/f/thirdparty/_dynamics/messagebundle_ms.js +2 -866
  287. package/src/sap/f/thirdparty/_dynamics/messagebundle_ms2.js +2 -611
  288. package/src/sap/f/thirdparty/_dynamics/messagebundle_nl.js +2 -866
  289. package/src/sap/f/thirdparty/_dynamics/messagebundle_nl2.js +2 -611
  290. package/src/sap/f/thirdparty/_dynamics/messagebundle_no.js +2 -866
  291. package/src/sap/f/thirdparty/_dynamics/messagebundle_no2.js +2 -611
  292. package/src/sap/f/thirdparty/_dynamics/messagebundle_pl.js +2 -866
  293. package/src/sap/f/thirdparty/_dynamics/messagebundle_pl2.js +2 -611
  294. package/src/sap/f/thirdparty/_dynamics/messagebundle_pt.js +2 -866
  295. package/src/sap/f/thirdparty/_dynamics/messagebundle_pt2.js +2 -611
  296. package/src/sap/f/thirdparty/_dynamics/messagebundle_pt_PT.js +2 -866
  297. package/src/sap/f/thirdparty/_dynamics/messagebundle_pt_PT2.js +2 -611
  298. package/src/sap/f/thirdparty/_dynamics/messagebundle_ro.js +2 -866
  299. package/src/sap/f/thirdparty/_dynamics/messagebundle_ro2.js +2 -611
  300. package/src/sap/f/thirdparty/_dynamics/messagebundle_ru.js +2 -866
  301. package/src/sap/f/thirdparty/_dynamics/messagebundle_ru2.js +2 -611
  302. package/src/sap/f/thirdparty/_dynamics/messagebundle_sh.js +2 -866
  303. package/src/sap/f/thirdparty/_dynamics/messagebundle_sh2.js +2 -611
  304. package/src/sap/f/thirdparty/_dynamics/messagebundle_sk.js +2 -866
  305. package/src/sap/f/thirdparty/_dynamics/messagebundle_sk2.js +2 -611
  306. package/src/sap/f/thirdparty/_dynamics/messagebundle_sl.js +2 -866
  307. package/src/sap/f/thirdparty/_dynamics/messagebundle_sl2.js +2 -611
  308. package/src/sap/f/thirdparty/_dynamics/messagebundle_sr.js +2 -866
  309. package/src/sap/f/thirdparty/_dynamics/messagebundle_sr2.js +2 -611
  310. package/src/sap/f/thirdparty/_dynamics/messagebundle_sv.js +2 -866
  311. package/src/sap/f/thirdparty/_dynamics/messagebundle_sv2.js +2 -611
  312. package/src/sap/f/thirdparty/_dynamics/messagebundle_th.js +2 -866
  313. package/src/sap/f/thirdparty/_dynamics/messagebundle_th2.js +2 -611
  314. package/src/sap/f/thirdparty/_dynamics/messagebundle_tr.js +2 -866
  315. package/src/sap/f/thirdparty/_dynamics/messagebundle_tr2.js +2 -611
  316. package/src/sap/f/thirdparty/_dynamics/messagebundle_uk.js +2 -866
  317. package/src/sap/f/thirdparty/_dynamics/messagebundle_uk2.js +2 -611
  318. package/src/sap/f/thirdparty/_dynamics/messagebundle_vi.js +2 -866
  319. package/src/sap/f/thirdparty/_dynamics/messagebundle_vi2.js +2 -611
  320. package/src/sap/f/thirdparty/_dynamics/messagebundle_zh_CN.js +2 -866
  321. package/src/sap/f/thirdparty/_dynamics/messagebundle_zh_CN2.js +2 -611
  322. package/src/sap/f/thirdparty/_dynamics/messagebundle_zh_TW.js +2 -866
  323. package/src/sap/f/thirdparty/_dynamics/messagebundle_zh_TW2.js +2 -611
  324. package/src/sap/f/thirdparty/_dynamics/mk.js +2 -0
  325. package/src/sap/f/thirdparty/_dynamics/ms.js +2 -0
  326. package/src/sap/f/thirdparty/_dynamics/nb.js +2 -0
  327. package/src/sap/f/thirdparty/_dynamics/nl.js +2 -0
  328. package/src/sap/f/thirdparty/_dynamics/nl_BE.js +2 -0
  329. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css10.js +2 -7
  330. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css11.js +2 -7
  331. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css12.js +2 -7
  332. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css13.js +2 -7
  333. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css14.js +2 -7
  334. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css15.js +2 -7
  335. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css16.js +2 -7
  336. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css17.js +2 -7
  337. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css18.js +2 -7
  338. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css19.js +2 -7
  339. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css20.js +2 -7
  340. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css21.js +2 -7
  341. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css22.js +2 -7
  342. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css23.js +2 -7
  343. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css24.js +2 -7
  344. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css25.js +2 -7
  345. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css26.js +2 -7
  346. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css27.js +2 -7
  347. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css4.js +2 -7
  348. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css5.js +2 -7
  349. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css6.js +2 -7
  350. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css7.js +2 -7
  351. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css8.js +2 -7
  352. package/src/sap/f/thirdparty/_dynamics/parameters-bundle.css9.js +2 -7
  353. package/src/sap/f/thirdparty/_dynamics/pl.js +2 -0
  354. package/src/sap/f/thirdparty/_dynamics/pt.js +2 -0
  355. package/src/sap/f/thirdparty/_dynamics/pt_PT.js +2 -0
  356. package/src/sap/f/thirdparty/_dynamics/ro.js +2 -0
  357. package/src/sap/f/thirdparty/_dynamics/ru.js +2 -0
  358. package/src/sap/f/thirdparty/_dynamics/ru_UA.js +2 -0
  359. package/src/sap/f/thirdparty/_dynamics/sk.js +2 -0
  360. package/src/sap/f/thirdparty/_dynamics/sl.js +2 -0
  361. package/src/sap/f/thirdparty/_dynamics/sr.js +2 -0
  362. package/src/sap/f/thirdparty/_dynamics/sr_Latn.js +2 -0
  363. package/src/sap/f/thirdparty/_dynamics/sv.js +2 -0
  364. package/src/sap/f/thirdparty/_dynamics/th.js +2 -0
  365. package/src/sap/f/thirdparty/_dynamics/tr.js +2 -0
  366. package/src/sap/f/thirdparty/_dynamics/uk.js +2 -0
  367. package/src/sap/f/thirdparty/_dynamics/vi.js +2 -0
  368. package/src/sap/f/thirdparty/_dynamics/zh_CN.js +2 -0
  369. package/src/sap/f/thirdparty/_dynamics/zh_HK.js +2 -0
  370. package/src/sap/f/thirdparty/_dynamics/zh_SG.js +2 -0
  371. package/src/sap/f/thirdparty/_dynamics/zh_TW.js +2 -0
  372. package/src/sap/f/thirdparty/encodeXML.js +6 -81
  373. package/src/sap/f/thirdparty/event-strict.js +2 -7
  374. package/src/sap/f/thirdparty/generateHighlightedMarkup.js +2 -9
  375. package/src/sap/f/thirdparty/i18n-defaults.js +2 -123
  376. package/src/sap/f/thirdparty/i18n-defaults2.js +2 -159
  377. package/src/sap/f/thirdparty/information.js +2 -100
  378. package/src/sap/f/thirdparty/information2.js +2 -13
  379. package/src/sap/f/thirdparty/overflow.js +2 -25
  380. package/src/sap/f/thirdparty/parameters-bundle.css.js +2 -11
  381. package/src/sap/f/thirdparty/parameters-bundle.css2.js +2 -44
  382. package/src/sap/f/thirdparty/parameters-bundle.css3.js +2 -8
  383. package/src/sap/f/thirdparty/query.js +2 -7
  384. package/src/sap/f/thirdparty/slim-arrow-down.js +2 -44
  385. package/src/sap/f/thirdparty/sys-enter-2.js +2 -7
  386. package/src/sap/f/thirdparty/toLowercaseEnumValue.js +2 -7
  387. package/src/sap/f/thirdparty/ui5/webcomponents_fiori/dist/illustrations/UnableToUpload.js +2 -132
  388. package/src/sap/f/thirdparty/ui5/webcomponents_icons/AllIcons.js +2 -26
  389. package/src/sap/f/thirdparty/ui5/webcomponents_icons_business_suite/AllIcons.js +2 -26
  390. package/src/sap/f/thirdparty/ui5/webcomponents_icons_tnt/AllIcons.js +2 -26
  391. package/src/sap/f/thirdparty/webcomponents-base.js +2 -7
  392. package/src/sap/f/thirdparty/webcomponents-fiori.js +2 -5
  393. package/src/sap/f/thirdparty/webcomponents.js +51 -4589
  394. package/src/sap/f/thirdparty/willShowContent.js +2 -7
  395. package/src/sap/f/thirdparty/ListItemCustom.js +0 -1689
@@ -1,2312 +1,2 @@
1
- sap.ui.define(['exports', 'sap/f/thirdparty/webcomponents', 'sap/f/thirdparty/Theme', 'sap/f/thirdparty/parameters-bundle.css', 'sap/f/thirdparty/i18n-defaults2', 'sap/f/thirdparty/parameters-bundle.css2', 'sap/f/thirdparty/information', 'sap/f/thirdparty/Title', 'sap/f/thirdparty/ValueState', 'sap/f/thirdparty/toLowercaseEnumValue', 'sap/f/thirdparty/event-strict', 'sap/f/thirdparty/FocusableElements', 'sap/f/thirdparty/AccessibilityTextsHelper', 'sap/f/thirdparty/Icons', 'sap/f/thirdparty/Icon', 'sap/f/thirdparty/Button2'], (function (exports, webcomponentsBase, Theme, parametersBundle_css$1, i18nDefaults, parametersBundle_css, information, Title, ValueState, toLowercaseEnumValue, eventStrict, FocusableElements, AccessibilityTextsHelper, Icons, Icon, Button) { 'use strict';
2
-
3
- const e$1={toAttribute(t){return t instanceof HTMLElement?null:t},fromAttribute(t){return t}};
4
-
5
- function PopubBlockLayerTemplate() {
6
- return (parametersBundle_css.jsx("div", { class: "ui5-block-layer", onKeyDown: this._preventBlockLayerFocus, onMouseDown: this._preventBlockLayerFocus }));
7
- }
8
-
9
- function PopupTemplate(hooks) {
10
- return (parametersBundle_css.jsxs(parametersBundle_css.Fragment, { children: [PopubBlockLayerTemplate.call(this), parametersBundle_css.jsxs("section", { "root-element": true, style: this.styles.root, class: this.classes.root, role: this._role, "aria-describedby": this.ariaDescribedByIds, "aria-modal": this._ariaModal, "aria-label": this._ariaLabel, "aria-labelledby": this._ariaLabelledBy, onKeyDown: this._onkeydown, onFocusOut: this._onfocusout, onMouseUp: this._onmouseup, onMouseDown: this._onmousedown, children: [parametersBundle_css.jsx("span", { class: "first-fe", "data-ui5-focus-trap": true, role: "none", tabIndex: 0, onFocusIn: this.forwardToLast }), (hooks?.beforeContent || beforeContent$2).call(this), parametersBundle_css.jsx("div", { style: this.styles.content, class: this.classes.content, onScroll: this._scroll, part: "content", children: parametersBundle_css.jsx("slot", {}) }), this.ariaDescriptionText &&
11
- parametersBundle_css.jsx("span", { id: "accessibleDescription", class: "ui5-hidden-text", children: this.ariaDescriptionText }), (hooks?.afterContent || afterContent$2).call(this), parametersBundle_css.jsx("span", { class: "last-fe", "data-ui5-focus-trap": true, role: "none", tabIndex: 0, onFocusIn: this.forwardToFirst })] })] }));
12
- }
13
- function beforeContent$2() { }
14
- function afterContent$2() { }
15
-
16
- function PopoverTemplate() {
17
- return PopupTemplate.call(this, {
18
- beforeContent: beforeContent$1,
19
- afterContent: afterContent$1,
20
- });
21
- }
22
- function beforeContent$1() {
23
- return (parametersBundle_css.jsxs(parametersBundle_css.Fragment, { children: [parametersBundle_css.jsx("span", { class: "ui5-popover-arrow", style: this.styles.arrow }), this._displayHeader &&
24
- parametersBundle_css.jsx("header", { class: "ui5-popup-header-root", id: "ui5-popup-header", part: "header", children: this.header.length ?
25
- parametersBundle_css.jsx("slot", { name: "header" })
26
- :
27
- parametersBundle_css.jsx(Title.Title, { level: "H1", class: "ui5-popup-header-text", children: this.headerText }) })] }));
28
- }
29
- function afterContent$1() {
30
- return (parametersBundle_css.jsx(parametersBundle_css.Fragment, { children: this._displayFooter && !!this.footer.length &&
31
- parametersBundle_css.jsx("footer", { class: "ui5-popup-footer-root", part: "footer", children: parametersBundle_css.jsx("slot", { name: "footer" }) }) }));
32
- }
33
-
34
- const m$1=(t,a,e)=>Math.min(Math.max(t,a),Math.max(a,e));
35
-
36
- const r=()=>{const e=webcomponentsBase.t();return e&&typeof e.focus=="function"?e:null},a=e=>{const n=r();return n?l(e,n):false},l=(e,n)=>{let t=e;if(t.shadowRoot&&(t=Array.from(t.shadowRoot.children).find(c=>c.localName!=="style"),!t))return false;if(t===n)return true;const o=t.localName==="slot"?t.assignedNodes():t.children;return o?Array.from(o).some(s=>l(s,n)):false},m=(e,n,t)=>e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom,f=(e,n)=>{let t,o;if(e instanceof MouseEvent)t=e.clientX,o=e.clientY;else {const s=e.touches[0];t=s.clientX,o=s.clientY;}return m(t,o,n)};function d(e){return "isUI5Element"in e&&"_show"in e}const i=e=>{const n=e.parentElement||e.getRootNode&&e.getRootNode().host;return n&&(d(n)||n===document.documentElement)?n:i(n)};
37
-
38
- /**
39
- * Popup accessible roles.
40
- * @public
41
- */
42
- var PopupAccessibleRole;
43
- (function (PopupAccessibleRole) {
44
- /**
45
- * Represents no ARIA role.
46
- * @public
47
- */
48
- PopupAccessibleRole["None"] = "None";
49
- /**
50
- * Represents the ARIA role "dialog".
51
- * @public
52
- */
53
- PopupAccessibleRole["Dialog"] = "Dialog";
54
- /**
55
- * Represents the ARIA role "alertdialog".
56
- * @public
57
- */
58
- PopupAccessibleRole["AlertDialog"] = "AlertDialog";
59
- })(PopupAccessibleRole || (PopupAccessibleRole = {}));
60
- var PopupAccessibleRole$1 = PopupAccessibleRole;
61
-
62
- const OpenedPopupsRegistry = Theme.m("OpenedPopupsRegistry", { openedRegistry: [] });
63
- const openUI5Support = Theme.n$1("OpenUI5Support");
64
- function registerPopupWithOpenUI5Support(popupInfo) {
65
- openUI5Support?.addOpenedPopup(popupInfo);
66
- }
67
- function unregisterPopupWithOpenUI5Support(popup) {
68
- openUI5Support?.removeOpenedPopup(popup);
69
- }
70
- const addOpenedPopup = (instance, parentPopovers = []) => {
71
- if (!OpenedPopupsRegistry.openedRegistry.some(popup => popup.instance === instance)) {
72
- OpenedPopupsRegistry.openedRegistry.push({
73
- instance,
74
- parentPopovers,
75
- });
76
- registerPopupWithOpenUI5Support({
77
- type: "WebComponent",
78
- instance,
79
- });
80
- }
81
- _updateTopModalPopup();
82
- if (OpenedPopupsRegistry.openedRegistry.length === 1) {
83
- attachGlobalListener();
84
- }
85
- };
86
- const removeOpenedPopup = (instance) => {
87
- OpenedPopupsRegistry.openedRegistry = OpenedPopupsRegistry.openedRegistry.filter(el => {
88
- return el.instance !== instance;
89
- });
90
- unregisterPopupWithOpenUI5Support(instance);
91
- _updateTopModalPopup();
92
- if (!OpenedPopupsRegistry.openedRegistry.length) {
93
- detachGlobalListener();
94
- }
95
- };
96
- const getOpenedPopups = () => {
97
- return [...OpenedPopupsRegistry.openedRegistry];
98
- };
99
- const _keydownListener = (event) => {
100
- if (!OpenedPopupsRegistry.openedRegistry.length) {
101
- return;
102
- }
103
- if (webcomponentsBase.m$2(event)) {
104
- const topmostPopup = OpenedPopupsRegistry.openedRegistry[OpenedPopupsRegistry.openedRegistry.length - 1].instance;
105
- if (openUI5Support && topmostPopup !== openUI5Support.getTopmostPopup()) {
106
- return;
107
- }
108
- event.stopPropagation();
109
- topmostPopup.closePopup(true);
110
- }
111
- };
112
- const attachGlobalListener = () => {
113
- document.addEventListener("keydown", _keydownListener);
114
- };
115
- const detachGlobalListener = () => {
116
- document.removeEventListener("keydown", _keydownListener);
117
- };
118
- const _updateTopModalPopup = () => {
119
- let popup;
120
- let hasModal = false;
121
- for (let i = OpenedPopupsRegistry.openedRegistry.length - 1; i >= 0; i--) {
122
- popup = OpenedPopupsRegistry.openedRegistry[i].instance;
123
- if (!hasModal && popup.isModal) {
124
- popup.isTopModalPopup = true;
125
- hasModal = true;
126
- }
127
- else {
128
- popup.isTopModalPopup = false;
129
- }
130
- }
131
- };
132
-
133
- Theme.p("@" + "ui5" + "/" + "webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
134
- Theme.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => parametersBundle_css$1.defaultTheme);
135
- var popupStlyes = `:host{min-width:1px;overflow:visible;border:none;inset:unset;margin:0;padding:0}:host(:focus-visible){outline:none}
136
- `;
137
-
138
- Theme.p("@" + "ui5" + "/" + "webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
139
- Theme.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => parametersBundle_css$1.defaultTheme);
140
- var popupBlockLayerStyles = `.ui5-block-layer{position:fixed;z-index:-1;display:none;inset:-500px;outline:none;pointer-events:all}
141
- `;
142
-
143
- Theme.p("@" + "ui5" + "/" + "webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
144
- Theme.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => parametersBundle_css$1.defaultTheme);
145
- var globalStyles = `.ui5-popup-scroll-blocker{overflow:hidden}
146
- `;
147
-
148
- var __decorate$3 = (this && this.__decorate) || function (decorators, target, key, desc) {
149
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
150
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
151
- 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;
152
- return c > 3 && r && Object.defineProperty(target, key, r), r;
153
- };
154
- var Popup_1;
155
- const createBlockingStyle = () => {
156
- if (!Theme.S("data-ui5-popup-scroll-blocker")) {
157
- Theme.c$1(globalStyles, "data-ui5-popup-scroll-blocker");
158
- }
159
- };
160
- createBlockingStyle();
161
- const pageScrollingBlockers = new Set();
162
- /**
163
- * @class
164
- * ### Overview
165
- * Base class for all popup Web Components.
166
- *
167
- * If you need to create your own popup-like custom UI5 Web Components.
168
- *
169
- * 1. The Popup class handles modality:
170
- * - The "isModal" getter can be overridden by derivatives to provide their own conditions when they are modal or not
171
- * - Derivatives may call the "blockPageScrolling" and "unblockPageScrolling" static methods to temporarily remove scrollbars on the html element
172
- * - Derivatives may call the "openPopup" and "closePopup" methods which handle focus, manage the popup registry and for modal popups, manage the blocking layer
173
- *
174
- * 2. Provides blocking layer (relevant for modal popups only):
175
- * - Controlled by the "open" and "close" methods
176
- *
177
- * 3. The Popup class "traps" focus:
178
- * - Derivatives may call the "applyInitialFocus" method (usually when opening, to transfer focus inside the popup)
179
- *
180
- * 4. The template of this component exposes two inline partials you can override in derivatives:
181
- * - beforeContent (upper part of the box, useful for header/title/close button)
182
- * - afterContent (lower part, useful for footer/action buttons)
183
- * @constructor
184
- * @extends UI5Element
185
- * @public
186
- */
187
- let Popup = Popup_1 = class Popup extends webcomponentsBase.b {
188
- constructor() {
189
- super();
190
- /**
191
- * Defines if the focus should be returned to the previously focused element,
192
- * when the popup closes.
193
- * @default false
194
- * @public
195
- * @since 1.0.0-rc.8
196
- */
197
- this.preventFocusRestore = false;
198
- /**
199
- * Allows setting a custom role.
200
- * @default "Dialog"
201
- * @public
202
- * @since 1.10.0
203
- */
204
- this.accessibleRole = "Dialog";
205
- /**
206
- * Indicates whether initial focus should be prevented.
207
- * @public
208
- * @default false
209
- * @since 2.0.0
210
- */
211
- this.preventInitialFocus = false;
212
- /**
213
- * Indicates if the element is the top modal popup
214
- *
215
- * This property is calculated automatically
216
- * @private
217
- * @default false
218
- */
219
- this.isTopModalPopup = false;
220
- /**
221
- * @private
222
- */
223
- this.onPhone = false;
224
- /**
225
- * @private
226
- */
227
- this.onDesktop = false;
228
- this._opened = false;
229
- this._open = false;
230
- this._resizeHandlerRegistered = false;
231
- this._resizeHandler = this._resize.bind(this);
232
- this._getRealDomRef = () => {
233
- return this.shadowRoot.querySelector("[root-element]");
234
- };
235
- }
236
- onBeforeRendering() {
237
- this.onPhone = Theme.d();
238
- this.onDesktop = Theme.f();
239
- }
240
- onAfterRendering() {
241
- Theme.f$1().then(() => {
242
- this._updateMediaRange();
243
- });
244
- if (this.open) {
245
- this._registerResizeHandler();
246
- }
247
- else {
248
- this._deregisterResizeHandler();
249
- }
250
- }
251
- onEnterDOM() {
252
- this.setAttribute("popover", "manual");
253
- if (Theme.f()) {
254
- this.setAttribute("desktop", "");
255
- }
256
- this.tabIndex = -1;
257
- this.handleOpenOnEnterDOM();
258
- this.setAttribute("data-sap-ui-fastnavgroup-container", "true");
259
- AccessibilityTextsHelper.y(this, this._updateAssociatedLabelsTexts.bind(this));
260
- }
261
- handleOpenOnEnterDOM() {
262
- if (this.open) {
263
- this.showPopover();
264
- this.openPopup();
265
- }
266
- }
267
- onExitDOM() {
268
- if (this._opened) {
269
- Popup_1.unblockPageScrolling(this);
270
- this._removeOpenedPopup();
271
- }
272
- webcomponentsBase.f.deregister(this, this._resizeHandler);
273
- AccessibilityTextsHelper.T(this);
274
- }
275
- /**
276
- * Indicates if the element is open
277
- * @public
278
- * @default false
279
- * @since 1.2.0
280
- */
281
- set open(value) {
282
- if (this._open === value) {
283
- return;
284
- }
285
- this._open = value;
286
- if (value) {
287
- this.openPopup();
288
- }
289
- else {
290
- this.closePopup();
291
- }
292
- }
293
- get open() {
294
- return this._open;
295
- }
296
- async openPopup() {
297
- if (this._opened) {
298
- return;
299
- }
300
- const prevented = !this.fireDecoratorEvent("before-open");
301
- if (prevented) {
302
- this.open = false;
303
- return;
304
- }
305
- if (this.isModal) {
306
- Popup_1.blockPageScrolling(this);
307
- }
308
- this._focusedElementBeforeOpen = r();
309
- this._show();
310
- this._opened = true;
311
- if (this.getDomRef()) {
312
- this._updateMediaRange();
313
- }
314
- this._addOpenedPopup();
315
- this.open = true;
316
- // initial focus, if focused element is statically created
317
- await this.applyInitialFocus();
318
- await Theme.f$1();
319
- if (this.isConnected) {
320
- this.fireDecoratorEvent("open");
321
- }
322
- }
323
- _resize() {
324
- this._updateMediaRange();
325
- }
326
- /**
327
- * Prevents the user from interacting with the content under the block layer
328
- */
329
- _preventBlockLayerFocus(e) {
330
- e.preventDefault();
331
- }
332
- /**
333
- * Temporarily removes scrollbars from the html element
334
- * @protected
335
- */
336
- static blockPageScrolling(popup) {
337
- pageScrollingBlockers.add(popup);
338
- if (pageScrollingBlockers.size !== 1) {
339
- return;
340
- }
341
- document.documentElement.classList.add("ui5-popup-scroll-blocker");
342
- }
343
- /**
344
- * Restores scrollbars on the html element, if needed
345
- * @protected
346
- */
347
- static unblockPageScrolling(popup) {
348
- pageScrollingBlockers.delete(popup);
349
- if (pageScrollingBlockers.size !== 0) {
350
- return;
351
- }
352
- document.documentElement.classList.remove("ui5-popup-scroll-blocker");
353
- }
354
- _scroll(e) {
355
- this.fireDecoratorEvent("scroll", {
356
- scrollTop: e.target.scrollTop,
357
- targetRef: e.target,
358
- });
359
- }
360
- _onkeydown(e) {
361
- const isTabOutAttempt = e.target === this._root && webcomponentsBase.V(e);
362
- // if the popup is closed, focus is already moved, so Enter keydown may result in click on the newly focused element
363
- const isEnterOnClosedPopupChild = webcomponentsBase.b$1(e) && !this.open;
364
- if (isTabOutAttempt || isEnterOnClosedPopupChild) {
365
- e.preventDefault();
366
- }
367
- }
368
- _onfocusout(e) {
369
- // relatedTarget is the element, which will get focus. If no such element exists, focus the root.
370
- // This happens after the mouse is released in order to not interrupt text selection.
371
- if (!e.relatedTarget) {
372
- this._shouldFocusRoot = true;
373
- }
374
- }
375
- _onmousedown(e) {
376
- if (this.shadowRoot.contains(e.target)) {
377
- this._shouldFocusRoot = true;
378
- }
379
- else {
380
- this._shouldFocusRoot = false;
381
- }
382
- }
383
- _onmouseup() {
384
- if (this._shouldFocusRoot) {
385
- if (Theme.g()) {
386
- this._root.focus();
387
- }
388
- this._shouldFocusRoot = false;
389
- }
390
- }
391
- /**
392
- * Focus trapping
393
- * @private
394
- */
395
- async forwardToFirst() {
396
- const firstFocusable = await FocusableElements.b(this);
397
- if (firstFocusable) {
398
- firstFocusable.focus();
399
- }
400
- else {
401
- this._root.focus();
402
- }
403
- }
404
- /**
405
- * Focus trapping
406
- * @private
407
- */
408
- async forwardToLast() {
409
- const lastFocusable = await FocusableElements.H(this);
410
- if (lastFocusable) {
411
- lastFocusable.focus();
412
- }
413
- else {
414
- this._root.focus();
415
- }
416
- }
417
- /**
418
- * Use this method to focus the element denoted by "initialFocus", if provided,
419
- * or the first focusable element otherwise.
420
- * @protected
421
- */
422
- async applyInitialFocus() {
423
- if (!this.preventInitialFocus) {
424
- await this.applyFocus();
425
- }
426
- }
427
- /**
428
- * Focuses the element denoted by `initialFocus`, if provided,
429
- * or the first focusable element otherwise.
430
- * @public
431
- * @returns Promise that resolves when the focus is applied
432
- */
433
- async applyFocus() {
434
- // do nothing if the standard HTML autofocus is used
435
- if (this.querySelector("[autofocus]")) {
436
- return;
437
- }
438
- await this._waitForDomRef();
439
- if (this.getRootNode() === this) {
440
- return;
441
- }
442
- let element;
443
- if (this.initialFocus) {
444
- element = this.getRootNode().getElementById(this.initialFocus)
445
- || document.getElementById(this.initialFocus);
446
- }
447
- element = element || await FocusableElements.b(this) || this._root; // in case of no focusable content focus the root
448
- if (element) {
449
- if (element === this._root) {
450
- element.tabIndex = -1;
451
- }
452
- element.focus();
453
- }
454
- }
455
- isFocusWithin() {
456
- return a(this._root);
457
- }
458
- _updateMediaRange() {
459
- this.mediaRange = webcomponentsBase.i$2.getCurrentRange(webcomponentsBase.i$2.RANGESETS.RANGE_4STEPS, this.getDomRef().offsetWidth);
460
- }
461
- _updateAssociatedLabelsTexts() {
462
- this._associatedDescriptionRefTexts = AccessibilityTextsHelper.p(this);
463
- }
464
- /**
465
- * Adds the popup to the "opened popups registry"
466
- * @protected
467
- */
468
- _addOpenedPopup() {
469
- addOpenedPopup(this);
470
- }
471
- /**
472
- * Closes the popup.
473
- */
474
- closePopup(escPressed = false, preventRegistryUpdate = false, preventFocusRestore = false) {
475
- if (!this._opened) {
476
- return;
477
- }
478
- const prevented = !this.fireDecoratorEvent("before-close", { escPressed });
479
- if (prevented) {
480
- this.open = true;
481
- return;
482
- }
483
- this._opened = false;
484
- if (this.isModal) {
485
- Popup_1.unblockPageScrolling(this);
486
- }
487
- this.hide();
488
- this.open = false;
489
- if (!preventRegistryUpdate) {
490
- this._removeOpenedPopup();
491
- }
492
- if (!this.preventFocusRestore && !preventFocusRestore) {
493
- this.resetFocus();
494
- }
495
- this.fireDecoratorEvent("close");
496
- }
497
- /**
498
- * Removes the popup from the "opened popups registry"
499
- * @protected
500
- */
501
- _removeOpenedPopup() {
502
- removeOpenedPopup(this);
503
- }
504
- /**
505
- * Returns the focus to the previously focused element
506
- * @protected
507
- */
508
- resetFocus() {
509
- this._focusedElementBeforeOpen?.focus();
510
- this._focusedElementBeforeOpen = null;
511
- }
512
- /**
513
- * Sets "block" display to the popup. The property can be overriden by derivatives of Popup.
514
- * @protected
515
- */
516
- _show() {
517
- if (this.isConnected) {
518
- this.setAttribute("popover", "manual");
519
- this.showPopover();
520
- }
521
- }
522
- _registerResizeHandler() {
523
- if (!this._resizeHandlerRegistered) {
524
- webcomponentsBase.f.register(this, this._resizeHandler);
525
- this._resizeHandlerRegistered = true;
526
- }
527
- }
528
- _deregisterResizeHandler() {
529
- if (this._resizeHandlerRegistered) {
530
- webcomponentsBase.f.deregister(this, this._resizeHandler);
531
- this._resizeHandlerRegistered = false;
532
- }
533
- }
534
- /**
535
- * Sets "none" display to the popup
536
- * @protected
537
- */
538
- hide() {
539
- this.isConnected && this.hidePopover();
540
- }
541
- /**
542
- * Ensures ariaLabel is never null or empty string
543
- * @protected
544
- */
545
- get _ariaLabel() {
546
- return AccessibilityTextsHelper.A(this);
547
- }
548
- get _accInfoAriaDescription() {
549
- return this.ariaDescriptionText || "";
550
- }
551
- get ariaDescriptionText() {
552
- return this._associatedDescriptionRefTexts || AccessibilityTextsHelper.L(this);
553
- }
554
- get ariaDescriptionTextId() {
555
- return this.ariaDescriptionText ? "accessibleDescription" : "";
556
- }
557
- get ariaDescribedByIds() {
558
- return [
559
- this.ariaDescriptionTextId,
560
- ].filter(Boolean).join(" ");
561
- }
562
- get _root() {
563
- return this.shadowRoot.querySelector(".ui5-popup-root");
564
- }
565
- get _role() {
566
- return (this.accessibleRole === PopupAccessibleRole$1.None) ? undefined : toLowercaseEnumValue.n(this.accessibleRole);
567
- }
568
- get _ariaModal() {
569
- return this.accessibleRole === PopupAccessibleRole$1.None ? undefined : "true";
570
- }
571
- get contentDOM() {
572
- return this.shadowRoot.querySelector(".ui5-popup-content");
573
- }
574
- get styles() {
575
- return {
576
- root: {},
577
- content: {},
578
- };
579
- }
580
- get classes() {
581
- return {
582
- root: {
583
- "ui5-popup-root": true,
584
- },
585
- content: {
586
- "ui5-popup-content": true,
587
- },
588
- };
589
- }
590
- };
591
- __decorate$3([
592
- webcomponentsBase.s()
593
- ], Popup.prototype, "initialFocus", void 0);
594
- __decorate$3([
595
- webcomponentsBase.s({ type: Boolean })
596
- ], Popup.prototype, "preventFocusRestore", void 0);
597
- __decorate$3([
598
- webcomponentsBase.s()
599
- ], Popup.prototype, "accessibleName", void 0);
600
- __decorate$3([
601
- webcomponentsBase.s()
602
- ], Popup.prototype, "accessibleNameRef", void 0);
603
- __decorate$3([
604
- webcomponentsBase.s()
605
- ], Popup.prototype, "accessibleRole", void 0);
606
- __decorate$3([
607
- webcomponentsBase.s()
608
- ], Popup.prototype, "accessibleDescription", void 0);
609
- __decorate$3([
610
- webcomponentsBase.s()
611
- ], Popup.prototype, "accessibleDescriptionRef", void 0);
612
- __decorate$3([
613
- webcomponentsBase.s({ noAttribute: true })
614
- ], Popup.prototype, "_associatedDescriptionRefTexts", void 0);
615
- __decorate$3([
616
- webcomponentsBase.s()
617
- ], Popup.prototype, "mediaRange", void 0);
618
- __decorate$3([
619
- webcomponentsBase.s({ type: Boolean })
620
- ], Popup.prototype, "preventInitialFocus", void 0);
621
- __decorate$3([
622
- webcomponentsBase.s({ type: Boolean, noAttribute: true })
623
- ], Popup.prototype, "isTopModalPopup", void 0);
624
- __decorate$3([
625
- webcomponentsBase.d({ type: HTMLElement, "default": true })
626
- ], Popup.prototype, "content", void 0);
627
- __decorate$3([
628
- webcomponentsBase.s({ type: Boolean })
629
- ], Popup.prototype, "onPhone", void 0);
630
- __decorate$3([
631
- webcomponentsBase.s({ type: Boolean })
632
- ], Popup.prototype, "onDesktop", void 0);
633
- __decorate$3([
634
- webcomponentsBase.s({ type: Boolean })
635
- ], Popup.prototype, "open", null);
636
- Popup = Popup_1 = __decorate$3([
637
- webcomponentsBase.m({
638
- renderer: parametersBundle_css.y,
639
- styles: [popupStlyes, popupBlockLayerStyles],
640
- template: PopupTemplate,
641
- })
642
- /**
643
- * Fired before the component is opened. This event can be cancelled, which will prevent the popup from opening.
644
- * @public
645
- */
646
- ,
647
- eventStrict.l("before-open", {
648
- cancelable: true,
649
- })
650
- /**
651
- * Fired after the component is opened.
652
- * @public
653
- */
654
- ,
655
- eventStrict.l("open")
656
- /**
657
- * Fired before the component is closed. This event can be cancelled, which will prevent the popup from closing.
658
- * @public
659
- * @param {boolean} escPressed Indicates that `ESC` key has triggered the event.
660
- */
661
- ,
662
- eventStrict.l("before-close", {
663
- cancelable: true,
664
- })
665
- /**
666
- * Fired after the component is closed.
667
- * @public
668
- */
669
- ,
670
- eventStrict.l("close")
671
- /**
672
- * Fired whenever the popup content area is scrolled
673
- * @private
674
- */
675
- ,
676
- eventStrict.l("scroll", {
677
- bubbles: true,
678
- })
679
- ], Popup);
680
- var Popup$1 = Popup;
681
-
682
- const name$1 = "resize-corner";
683
- const pathData$1 = "M384 160v32q0 12-10 22L182 406q-10 10-22 10h-32zM224 416l160-160v32q0 12-10 22l-96 96q-10 10-22 10h-32zm160-64v32q0 12-10 22t-22 10h-32z";
684
- const ltr$1 = false;
685
- const collection$1 = "SAP-icons-v4";
686
- const packageName$1 = "@ui5/webcomponents-icons";
687
-
688
- Icons.y(name$1, { pathData: pathData$1, ltr: ltr$1, collection: collection$1, packageName: packageName$1 });
689
-
690
- const name = "resize-corner";
691
- const pathData = "M282 416q-11 0-18.5-7.5T256 390t7-18l109-109q7-7 18-7t18.5 7.5T416 282t-7 18L300 409q-7 7-18 7zm-160 0q-11 0-18.5-7.5T96 390t7-18l269-269q7-7 18-7t18.5 7.5T416 122t-7 18L140 409q-7 7-18 7z";
692
- const ltr = false;
693
- const collection = "SAP-icons-v5";
694
- const packageName = "@ui5/webcomponents-icons";
695
-
696
- Icons.y(name, { pathData, ltr, collection, packageName });
697
-
698
- var resizeCorner = "resize-corner";
699
-
700
- function DialogTemplate() {
701
- return PopupTemplate.call(this, {
702
- beforeContent,
703
- afterContent,
704
- });
705
- }
706
- function beforeContent() {
707
- return (parametersBundle_css.jsx(parametersBundle_css.Fragment, { children: !!this._displayHeader &&
708
- parametersBundle_css.jsx("header", { children: parametersBundle_css.jsxs("div", { class: "ui5-popup-header-root", id: "ui5-popup-header", role: "group", "aria-describedby": this.effectiveAriaDescribedBy, "aria-roledescription": this.ariaRoleDescriptionHeaderText, tabIndex: this._headerTabIndex, onKeyDown: this._onDragOrResizeKeyDown, onMouseDown: this._onDragMouseDown, part: "header", children: [this.hasValueState &&
709
- parametersBundle_css.jsx(Icon.Icon, { class: "ui5-dialog-value-state-icon", name: this._dialogStateIcon }), this.header.length ?
710
- parametersBundle_css.jsx("slot", { name: "header" })
711
- :
712
- parametersBundle_css.jsx(Title.Title, { level: "H1", id: "ui5-popup-header-text", class: "ui5-popup-header-text", children: this.headerText }), this.resizable ?
713
- this.draggable ?
714
- parametersBundle_css.jsx("span", { id: `${this._id}-descr`, "aria-hidden": "true", class: "ui5-hidden-text", children: this.ariaDescribedByHeaderTextDraggableAndResizable })
715
- :
716
- parametersBundle_css.jsx("span", { id: `${this._id}-descr`, "aria-hidden": "true", class: "ui5-hidden-text", children: this.ariaDescribedByHeaderTextResizable })
717
- :
718
- this.draggable &&
719
- parametersBundle_css.jsx("span", { id: `${this._id}-descr`, "aria-hidden": "true", class: "ui5-hidden-text", children: this.ariaDescribedByHeaderTextDraggable })] }) }) }));
720
- }
721
- function afterContent() {
722
- return (parametersBundle_css.jsxs(parametersBundle_css.Fragment, { children: [!!this.footer.length &&
723
- parametersBundle_css.jsx("footer", { class: "ui5-popup-footer-root", part: "footer", children: parametersBundle_css.jsx("slot", { name: "footer" }) }), this._showResizeHandle &&
724
- parametersBundle_css.jsx("div", { class: "ui5-popup-resize-handle", onMouseDown: this._onResizeMouseDown, children: parametersBundle_css.jsx(Icon.Icon, { name: resizeCorner }) })] }));
725
- }
726
-
727
- Theme.p("@" + "ui5" + "/" + "webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
728
- Theme.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => parametersBundle_css$1.defaultTheme);
729
- var PopupsCommonCss = `.ui5-hidden-text{position:absolute;clip:rect(1px,1px,1px,1px);user-select:none;left:-1000px;top:-1000px;pointer-events:none;font-size:0}:host{position:fixed;background:var(--sapGroup_ContentBackground);border-radius:var(--_ui5-v2-15-0_popup_border_radius);min-height:2rem;box-sizing:border-box}:host([open]){display:flex}.ui5-popup-root{background:inherit;border-radius:inherit;width:100%;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;flex:1 1 auto;outline:none}.ui5-popup-root .ui5-popup-header-root{box-shadow:var(--_ui5-v2-15-0_popup_header_shadow);border-bottom:var(--_ui5-v2-15-0_popup_header_border)}.ui5-popup-content{color:var(--sapTextColor);flex:auto}.ui5-popup-content:focus{outline:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);outline-offset:calc(-1 * var(--sapContent_FocusWidth));border-radius:var(--_ui5-v2-15-0_popup_border_radius)}.ui5-popup-footer-root{background:var(--sapPageFooter_Background);border-top:1px solid var(--sapPageFooter_BorderColor);color:var(--sapPageFooter_TextColor)}.ui5-popup-header-root,.ui5-popup-footer-root,:host([header-text]) .ui5-popup-header-text{margin:0;display:flex;justify-content:center;align-items:center}.ui5-popup-header-root .ui5-popup-header-text{font-weight:var(--sapFontHeaderFamily);font-size:var(--sapFontHeader5Size);color:var(--sapPageHeader_TextColor)}.ui5-popup-content{overflow:auto;box-sizing:border-box}:host([header-text]) .ui5-popup-header-text{min-height:var(--_ui5-v2-15-0_popup_default_header_height);max-height:var(--_ui5-v2-15-0_popup_default_header_height);line-height:var(--_ui5-v2-15-0_popup_default_header_height);text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:100%;display:inline-flex;justify-content:var(--_ui5-v2-15-0_popup_header_prop_header_text_alignment)}:host([header-text]) .ui5-popup-header-root{justify-content:var(--_ui5-v2-15-0_popup_header_prop_header_text_alignment)}:host(:not([header-text])) .ui5-popup-header-text{display:none}:host([media-range="S"]) .ui5-popup-content{padding:1rem var(--_ui5-v2-15-0_popup_content_padding_s)}:host([media-range="M"]) .ui5-popup-content,:host([media-range="L"]) .ui5-popup-content{padding:1rem var(--_ui5-v2-15-0_popup_content_padding_m_l)}:host([media-range="XL"]) .ui5-popup-content{padding:1rem var(--_ui5-v2-15-0_popup_content_padding_xl)}.ui5-popup-header-root{background:var(--sapPageHeader_Background)}:host([media-range="S"]) .ui5-popup-header-root,:host([media-range="S"]) .ui5-popup-footer-root{padding-left:var(--_ui5-v2-15-0_popup_header_footer_padding_s);padding-right:var(--_ui5-v2-15-0_popup_header_footer_padding_s)}:host([media-range="M"]) .ui5-popup-header-root,:host([media-range="L"]) .ui5-popup-header-root,:host([media-range="M"]) .ui5-popup-footer-root,:host([media-range="L"]) .ui5-popup-footer-root{padding-left:var(--_ui5-v2-15-0_popup_header_footer_padding_m_l);padding-right:var(--_ui5-v2-15-0_popup_header_footer_padding_m_l)}:host([media-range="XL"]) .ui5-popup-header-root,:host([media-range="XL"]) .ui5-popup-footer-root{padding-left:var(--_ui5-v2-15-0_popup_header_footer_padding_xl);padding-right:var(--_ui5-v2-15-0_popup_header_footer_padding_xl)}
730
- `;
731
-
732
- Theme.p("@" + "ui5" + "/" + "webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
733
- Theme.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => parametersBundle_css$1.defaultTheme);
734
- var dialogCSS = `.ui5-hidden-text{position:absolute;clip:rect(1px,1px,1px,1px);user-select:none;left:-1000px;top:-1000px;pointer-events:none;font-size:0}:host{min-width:20rem;min-height:6rem;max-height:94%;max-width:90%;flex-direction:column;box-shadow:var(--sapContent_Shadow3);border-radius:var(--sapElement_BorderCornerRadius)}:host([stretch]){width:90%;height:94%}:host([stretch][on-phone]){width:100%;height:100%;max-height:100%;max-width:100%;border-radius:0;min-width:0}:host([draggable]) .ui5-popup-header-root,:host([draggable]) ::slotted([slot="header"]){cursor:move}:host([draggable]) .ui5-popup-header-root *{cursor:auto}:host([draggable]) .ui5-popup-root{user-select:text}::slotted([slot="header"]){max-width:100%}.ui5-popup-root{display:flex;flex-direction:column;max-width:100vw}.ui5-popup-header-root{position:relative}.ui5-popup-header-root:before{content:"";position:absolute;inset-block-start:auto;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;height:var(--_ui5-v2-15-0_dialog_header_state_line_height);background:var(--sapObjectHeader_BorderColor)}:host([state="Negative"]) .ui5-popup-header-root:before{background:var(--sapErrorBorderColor)}:host([state="Information"]) .ui5-popup-header-root:before{background:var(--sapInformationBorderColor)}:host([state="Positive"]) .ui5-popup-header-root:before{background:var(--sapSuccessBorderColor)}:host([state="Critical"]) .ui5-popup-header-root:before{background:var(--sapWarningBorderColor)}.ui5-dialog-value-state-icon{margin-inline-end:.5rem;flex-shrink:0}:host([state="Negative"]) .ui5-dialog-value-state-icon{color:var(--sapNegativeElementColor)}:host([state="Information"]) .ui5-dialog-value-state-icon{color:var(--sapInformativeElementColor)}:host([state="Positive"]) .ui5-dialog-value-state-icon{color:var(--sapPositiveElementColor)}:host([state="Critical"]) .ui5-dialog-value-state-icon{color:var(--sapCriticalElementColor)}.ui5-popup-header-root{outline:none}:host([desktop]) .ui5-popup-header-root:focus:after,.ui5-popup-header-root:focus-visible:after{content:"";position:absolute;left:var(--_ui5-v2-15-0_dialog_header_focus_left_offset);bottom:var(--_ui5-v2-15-0_dialog_header_focus_bottom_offset);right:var(--_ui5-v2-15-0_dialog_header_focus_right_offset);top:var(--_ui5-v2-15-0_dialog_header_focus_top_offset);border:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);border-radius:var(--_ui5-v2-15-0_dialog_header_border_radius) var(--_ui5-v2-15-0_dialog_header_border_radius) 0 0;pointer-events:none}:host([stretch]) .ui5-popup-content{width:100%;height:100%}.ui5-popup-content{min-height:var(--_ui5-v2-15-0_dialog_content_min_height);flex:1 1 auto}.ui5-popup-resize-handle{position:absolute;bottom:-.5rem;inset-inline-end:-.5rem;cursor:var(--_ui5-v2-15-0_dialog_resize_cursor);width:1.5rem;height:1.5rem;border-radius:50%}.ui5-popup-resize-handle [ui5-icon]{color:var(--sapButton_Lite_TextColor)}::slotted([slot="footer"]){height:var(--_ui5-v2-15-0_dialog_footer_height)}::slotted([slot="footer"][ui5-bar][design="Footer"]){border-top:none}::slotted([slot="header"][ui5-bar]){box-shadow:none}::slotted([slot="footer"][ui5-toolbar]){border:0}:host::backdrop{background-color:var(--_ui5-v2-15-0_popup_block_layer_background);opacity:var(--_ui5-v2-15-0_popup_block_layer_opacity)}.ui5-block-layer{display:block}
735
- `;
736
-
737
- var __decorate$2 = (this && this.__decorate) || function (decorators, target, key, desc) {
738
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
739
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
740
- 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;
741
- return c > 3 && r && Object.defineProperty(target, key, r), r;
742
- };
743
- var Dialog_1;
744
- /**
745
- * Defines the step size at which this component would change by when being dragged or resized with the keyboard.
746
- */
747
- const STEP_SIZE = 16;
748
- /**
749
- * Defines the icons corresponding to the dialog's state.
750
- */
751
- const ICON_PER_STATE = {
752
- [ValueState.o.Negative]: "error",
753
- [ValueState.o.Critical]: "alert",
754
- [ValueState.o.Positive]: "sys-enter-2",
755
- [ValueState.o.Information]: "information",
756
- };
757
- /**
758
- * @class
759
- * ### Overview
760
- * The `ui5-dialog` component is used to temporarily display some information in a
761
- * size-limited window in front of the regular app screen.
762
- * It is used to prompt the user for an action or a confirmation.
763
- * The `ui5-dialog` interrupts the current app processing as it is the only focused UI element and
764
- * the main screen is dimmed/blocked.
765
- * The dialog combines concepts known from other technologies where the windows have
766
- * names such as dialog box, dialog window, pop-up, pop-up window, alert box, or message box.
767
- *
768
- * The `ui5-dialog` is modal, which means that a user action is required before it is possible to return to the parent window.
769
- * To open multiple dialogs, each dialog element should be separate in the markup. This will ensure the correct modal behavior. Avoid nesting dialogs within each other.
770
- * The content of the `ui5-dialog` is fully customizable.
771
- *
772
- * ### Structure
773
- * A `ui5-dialog` consists of a header, content, and a footer for action buttons.
774
- * The `ui5-dialog` is usually displayed at the center of the screen.
775
- * Its position can be changed by the user. To enable this, you need to set the property `draggable` accordingly.
776
-
777
- *
778
- * ### Responsive Behavior
779
- * The `stretch` property can be used to stretch the `ui5-dialog` to full screen. For better usability, it's recommended to stretch the dialog to full screen on phone devices.
780
- *
781
- * **Note:** When a `ui5-bar` is used in the header or in the footer, you should remove the default dialog's paddings.
782
- *
783
- * For more information see the sample "Bar in Header/Footer".
784
-
785
- * ### Keyboard Handling
786
- *
787
- * #### Basic Navigation
788
- * When the `ui5-dialog` has the `draggable` property set to `true` and the header is focused, the user can move the dialog
789
- * with the following keyboard shortcuts:
790
- *
791
- * - [Up] or [Down] arrow keys - Move the dialog up/down.
792
- * - [Left] or [Right] arrow keys - Move the dialog left/right.
793
- *
794
- * #### Resizing
795
- * When the `ui5-dialog` has the `resizable` property set to `true` and the header is focused, the user can change the size of the dialog
796
- * with the following keyboard shortcuts:
797
- *
798
- * - [Shift] + [Up] or [Down] - Decrease/Increase the height of the dialog.
799
- * - [Shift] + [Left] or [Right] - Decrease/Increase the width of the dialog.
800
- *
801
- * ### ES6 Module Import
802
- *
803
- * `import "@ui5/webcomponents/dist/Dialog";`
804
- *
805
- * @constructor
806
- * @extends Popup
807
- * @public
808
- * @csspart header - Used to style the header of the component
809
- * @csspart content - Used to style the content of the component
810
- * @csspart footer - Used to style the footer of the component
811
- */
812
- let Dialog = Dialog_1 = class Dialog extends Popup$1 {
813
- constructor() {
814
- super();
815
- /**
816
- * Determines if the dialog will be stretched to full screen on mobile. On desktop,
817
- * the dialog will be stretched to approximately 90% of the viewport.
818
- *
819
- * **Note:** For better usability of the component it is recommended to set this property to "true" when the dialog is opened on phone.
820
- * @default false
821
- * @public
822
- */
823
- this.stretch = false;
824
- /**
825
- * Determines whether the component is draggable.
826
- * If this property is set to true, the Dialog will be draggable by its header.
827
- *
828
- * **Note:** The component can be draggable only in desktop mode.
829
- *
830
- * **Note:** This property overrides the default HTML "draggable" attribute native behavior.
831
- * When "draggable" is set to true, the native browser "draggable"
832
- * behavior is prevented and only the Dialog custom logic ("draggable by its header") works.
833
- * @default false
834
- * @since 1.0.0-rc.9
835
- * @public
836
- */
837
- this.draggable = false;
838
- /**
839
- * Configures the component to be resizable.
840
- * If this property is set to true, the Dialog will have a resize handle in its bottom right corner in LTR languages.
841
- * In RTL languages, the resize handle will be placed in the bottom left corner.
842
- *
843
- * **Note:** The component can be resizable only in desktop mode.
844
- *
845
- * **Note:** Upon resizing, externally defined height and width styling will be ignored.
846
- * @default false
847
- * @since 1.0.0-rc.10
848
- * @public
849
- */
850
- this.resizable = false;
851
- /**
852
- * Defines the state of the `Dialog`.
853
- *
854
- * **Note:** If `"Negative"` and `"Critical"` states is set, it will change the
855
- * accessibility role to "alertdialog", if the accessibleRole property is set to `"Dialog"`.
856
- * @default "None"
857
- * @public
858
- * @since 1.0.0-rc.15
859
- */
860
- this.state = "None";
861
- this._draggedOrResized = false;
862
- this._revertSize = () => {
863
- Object.assign(this.style, {
864
- top: "",
865
- left: "",
866
- width: "",
867
- height: "",
868
- });
869
- };
870
- this._screenResizeHandler = this._screenResize.bind(this);
871
- this._dragMouseMoveHandler = this._onDragMouseMove.bind(this);
872
- this._dragMouseUpHandler = this._onDragMouseUp.bind(this);
873
- this._resizeMouseMoveHandler = this._onResizeMouseMove.bind(this);
874
- this._resizeMouseUpHandler = this._onResizeMouseUp.bind(this);
875
- this._dragStartHandler = this._handleDragStart.bind(this);
876
- }
877
- static _isHeader(element) {
878
- return element.classList.contains("ui5-popup-header-root") || element.getAttribute("slot") === "header";
879
- }
880
- get isModal() {
881
- return true;
882
- }
883
- get _ariaLabelledBy() {
884
- let ariaLabelledById;
885
- if (this.headerText && !this._ariaLabel) {
886
- ariaLabelledById = "ui5-popup-header-text";
887
- }
888
- return ariaLabelledById;
889
- }
890
- get ariaRoleDescriptionHeaderText() {
891
- return (this.resizable || this.draggable) ? Dialog_1.i18nBundle.getText(i18nDefaults.DIALOG_HEADER_ARIA_ROLE_DESCRIPTION) : undefined;
892
- }
893
- get effectiveAriaDescribedBy() {
894
- return (this.resizable || this.draggable) ? `${this._id}-descr` : undefined;
895
- }
896
- get ariaDescribedByHeaderTextResizable() {
897
- return Dialog_1.i18nBundle.getText(i18nDefaults.DIALOG_HEADER_ARIA_DESCRIBEDBY_RESIZABLE);
898
- }
899
- get ariaDescribedByHeaderTextDraggable() {
900
- return Dialog_1.i18nBundle.getText(i18nDefaults.DIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE);
901
- }
902
- get ariaDescribedByHeaderTextDraggableAndResizable() {
903
- return Dialog_1.i18nBundle.getText(i18nDefaults.DIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE);
904
- }
905
- /**
906
- * Determines if the header should be shown.
907
- */
908
- get _displayHeader() {
909
- return this.header.length || this.headerText || this.draggable || this.resizable;
910
- }
911
- get _movable() {
912
- return !this.stretch && this.onDesktop && (this.draggable || this.resizable);
913
- }
914
- get _headerTabIndex() {
915
- return this._movable ? 0 : undefined;
916
- }
917
- get _showResizeHandle() {
918
- return this.resizable && this.onDesktop;
919
- }
920
- get _minHeight() {
921
- let minHeight = Number.parseInt(window.getComputedStyle(this.contentDOM).minHeight);
922
- const header = this._root.querySelector(".ui5-popup-header-root");
923
- if (header) {
924
- minHeight += header.offsetHeight;
925
- }
926
- const footer = this._root.querySelector(".ui5-popup-footer-root");
927
- if (footer) {
928
- minHeight += footer.offsetHeight;
929
- }
930
- return minHeight;
931
- }
932
- get hasValueState() {
933
- return this.state !== ValueState.o.None;
934
- }
935
- get _dialogStateIcon() {
936
- return ICON_PER_STATE[this.state];
937
- }
938
- get _role() {
939
- if (this.accessibleRole === PopupAccessibleRole$1.None) {
940
- return undefined;
941
- }
942
- if (this.state === ValueState.o.Negative || this.state === ValueState.o.Critical) {
943
- return toLowercaseEnumValue.n(PopupAccessibleRole$1.AlertDialog);
944
- }
945
- return toLowercaseEnumValue.n(this.accessibleRole);
946
- }
947
- _show() {
948
- super._show();
949
- this._center();
950
- }
951
- onBeforeRendering() {
952
- super.onBeforeRendering();
953
- this._isRTL = this.effectiveDir === "rtl";
954
- }
955
- onEnterDOM() {
956
- super.onEnterDOM();
957
- this._attachScreenResizeHandler();
958
- this.addEventListener("dragstart", this._dragStartHandler);
959
- }
960
- onExitDOM() {
961
- super.onExitDOM();
962
- this._detachScreenResizeHandler();
963
- this.removeEventListener("dragstart", this._dragStartHandler);
964
- }
965
- /**
966
- * @override
967
- */
968
- _resize() {
969
- super._resize();
970
- if (!this._draggedOrResized) {
971
- this._center();
972
- }
973
- }
974
- _screenResize() {
975
- this._center();
976
- }
977
- _attachScreenResizeHandler() {
978
- if (!this._screenResizeHandlerAttached) {
979
- window.addEventListener("resize", this._screenResizeHandler);
980
- this._screenResizeHandlerAttached = true;
981
- }
982
- }
983
- _detachScreenResizeHandler() {
984
- if (this._screenResizeHandlerAttached) {
985
- window.removeEventListener("resize", this._screenResizeHandler);
986
- this._screenResizeHandlerAttached = false; // prevent dialog from repositioning during resizing
987
- }
988
- }
989
- _center() {
990
- const height = window.innerHeight - this.offsetHeight, width = window.innerWidth - this.offsetWidth;
991
- Object.assign(this.style, {
992
- top: `${Math.round(height / 2)}px`,
993
- left: `${Math.round(width / 2)}px`,
994
- });
995
- }
996
- /**
997
- * Event handlers
998
- */
999
- _onDragMouseDown(e) {
1000
- // allow dragging only on the header
1001
- if (!this._movable || !this.draggable || !Dialog_1._isHeader(e.target)) {
1002
- return;
1003
- }
1004
- const { top, left, } = this.getBoundingClientRect();
1005
- const { width, height, } = window.getComputedStyle(this);
1006
- Object.assign(this.style, {
1007
- top: `${top}px`,
1008
- left: `${left}px`,
1009
- width: `${Math.round(Number.parseFloat(width) * 100) / 100}px`,
1010
- height: `${Math.round(Number.parseFloat(height) * 100) / 100}px`,
1011
- });
1012
- this._x = e.clientX;
1013
- this._y = e.clientY;
1014
- this._draggedOrResized = true;
1015
- this._attachMouseDragHandlers();
1016
- }
1017
- _onDragMouseMove(e) {
1018
- e.preventDefault();
1019
- const { clientX, clientY } = e;
1020
- const calcX = this._x - clientX;
1021
- const calcY = this._y - clientY;
1022
- const { left, top, } = this.getBoundingClientRect();
1023
- Object.assign(this.style, {
1024
- left: `${Math.floor(left - calcX)}px`,
1025
- top: `${Math.floor(top - calcY)}px`,
1026
- });
1027
- this._x = clientX;
1028
- this._y = clientY;
1029
- }
1030
- _onDragMouseUp() {
1031
- delete this._x;
1032
- delete this._y;
1033
- this._detachMouseDragHandlers();
1034
- }
1035
- _onDragOrResizeKeyDown(e) {
1036
- if (!this._movable || !Dialog_1._isHeader(e.target)) {
1037
- return;
1038
- }
1039
- if (this.draggable && [webcomponentsBase.P, webcomponentsBase._, webcomponentsBase.D, webcomponentsBase.R].some(key => key(e))) {
1040
- this._dragWithEvent(e);
1041
- return;
1042
- }
1043
- if (this.resizable && [webcomponentsBase.O, webcomponentsBase.N, webcomponentsBase.h, webcomponentsBase.I].some(key => key(e))) {
1044
- this._resizeWithEvent(e);
1045
- }
1046
- }
1047
- _dragWithEvent(e) {
1048
- const { top, left, width, height, } = this.getBoundingClientRect();
1049
- let newPos = 0;
1050
- let posDirection = "top";
1051
- switch (true) {
1052
- case webcomponentsBase.P(e):
1053
- newPos = top - STEP_SIZE;
1054
- posDirection = "top";
1055
- break;
1056
- case webcomponentsBase._(e):
1057
- newPos = top + STEP_SIZE;
1058
- posDirection = "top";
1059
- break;
1060
- case webcomponentsBase.D(e):
1061
- newPos = left - STEP_SIZE;
1062
- posDirection = "left";
1063
- break;
1064
- case webcomponentsBase.R(e):
1065
- newPos = left + STEP_SIZE;
1066
- posDirection = "left";
1067
- break;
1068
- }
1069
- newPos = m$1(newPos, 0, posDirection === "left" ? window.innerWidth - width : window.innerHeight - height);
1070
- this.style[posDirection] = `${newPos}px`;
1071
- }
1072
- _resizeWithEvent(e) {
1073
- this._draggedOrResized = true;
1074
- this.addEventListener("ui5-before-close", this._revertSize, { once: true });
1075
- const { top, left } = this.getBoundingClientRect(), style = window.getComputedStyle(this), minWidth = Number.parseFloat(style.minWidth), maxWidth = window.innerWidth - left, maxHeight = window.innerHeight - top;
1076
- let width = Number.parseFloat(style.width), height = Number.parseFloat(style.height);
1077
- switch (true) {
1078
- case webcomponentsBase.O(e):
1079
- height -= STEP_SIZE;
1080
- break;
1081
- case webcomponentsBase.N(e):
1082
- height += STEP_SIZE;
1083
- break;
1084
- case webcomponentsBase.h(e):
1085
- width -= STEP_SIZE;
1086
- break;
1087
- case webcomponentsBase.I(e):
1088
- width += STEP_SIZE;
1089
- break;
1090
- }
1091
- width = m$1(width, minWidth, maxWidth);
1092
- height = m$1(height, this._minHeight, maxHeight);
1093
- Object.assign(this.style, {
1094
- width: `${width}px`,
1095
- height: `${height}px`,
1096
- });
1097
- }
1098
- _attachMouseDragHandlers() {
1099
- window.addEventListener("mousemove", this._dragMouseMoveHandler);
1100
- window.addEventListener("mouseup", this._dragMouseUpHandler);
1101
- }
1102
- _detachMouseDragHandlers() {
1103
- window.removeEventListener("mousemove", this._dragMouseMoveHandler);
1104
- window.removeEventListener("mouseup", this._dragMouseUpHandler);
1105
- }
1106
- _onResizeMouseDown(e) {
1107
- if (!this._movable || !this.resizable) {
1108
- return;
1109
- }
1110
- e.preventDefault();
1111
- const { top, left, } = this.getBoundingClientRect();
1112
- const { width, height, minWidth, } = window.getComputedStyle(this);
1113
- this._initialX = e.clientX;
1114
- this._initialY = e.clientY;
1115
- this._initialWidth = Number.parseFloat(width);
1116
- this._initialHeight = Number.parseFloat(height);
1117
- this._initialTop = top;
1118
- this._initialLeft = left;
1119
- this._minWidth = Number.parseFloat(minWidth);
1120
- this._cachedMinHeight = this._minHeight;
1121
- Object.assign(this.style, {
1122
- top: `${top}px`,
1123
- left: `${left}px`,
1124
- });
1125
- this._draggedOrResized = true;
1126
- this._attachMouseResizeHandlers();
1127
- }
1128
- _onResizeMouseMove(e) {
1129
- const { clientX, clientY } = e;
1130
- let newWidth, newLeft;
1131
- if (this._isRTL) {
1132
- newWidth = m$1(this._initialWidth - (clientX - this._initialX), this._minWidth, this._initialLeft + this._initialWidth);
1133
- // check if width is changed to avoid "left" jumping when max width is reached
1134
- Object.assign(this.style, {
1135
- width: `${newWidth}px`,
1136
- });
1137
- const deltaWidth = newWidth - this.getBoundingClientRect().width;
1138
- const rightEdge = this._initialLeft + this._initialWidth + deltaWidth;
1139
- newLeft = m$1(rightEdge - newWidth, 0, rightEdge - this._minWidth);
1140
- }
1141
- else {
1142
- newWidth = m$1(this._initialWidth + (clientX - this._initialX), this._minWidth, window.innerWidth - this._initialLeft);
1143
- }
1144
- const newHeight = m$1(this._initialHeight + (clientY - this._initialY), this._cachedMinHeight, window.innerHeight - this._initialTop);
1145
- Object.assign(this.style, {
1146
- height: `${newHeight}px`,
1147
- width: `${newWidth}px`,
1148
- left: this._isRTL ? `${newLeft}px` : undefined,
1149
- });
1150
- }
1151
- _onResizeMouseUp() {
1152
- delete this._initialX;
1153
- delete this._initialY;
1154
- delete this._initialWidth;
1155
- delete this._initialHeight;
1156
- delete this._initialTop;
1157
- delete this._initialLeft;
1158
- delete this._minWidth;
1159
- delete this._cachedMinHeight;
1160
- this._detachMouseResizeHandlers();
1161
- }
1162
- _handleDragStart(e) {
1163
- if (this.draggable) {
1164
- e.preventDefault();
1165
- }
1166
- }
1167
- _attachMouseResizeHandlers() {
1168
- window.addEventListener("mousemove", this._resizeMouseMoveHandler);
1169
- window.addEventListener("mouseup", this._resizeMouseUpHandler);
1170
- this.addEventListener("ui5-before-close", this._revertSize, { once: true });
1171
- }
1172
- _detachMouseResizeHandlers() {
1173
- window.removeEventListener("mousemove", this._resizeMouseMoveHandler);
1174
- window.removeEventListener("mouseup", this._resizeMouseUpHandler);
1175
- }
1176
- };
1177
- __decorate$2([
1178
- webcomponentsBase.s()
1179
- ], Dialog.prototype, "headerText", void 0);
1180
- __decorate$2([
1181
- webcomponentsBase.s({ type: Boolean })
1182
- ], Dialog.prototype, "stretch", void 0);
1183
- __decorate$2([
1184
- webcomponentsBase.s({ type: Boolean })
1185
- ], Dialog.prototype, "draggable", void 0);
1186
- __decorate$2([
1187
- webcomponentsBase.s({ type: Boolean })
1188
- ], Dialog.prototype, "resizable", void 0);
1189
- __decorate$2([
1190
- webcomponentsBase.s()
1191
- ], Dialog.prototype, "state", void 0);
1192
- __decorate$2([
1193
- webcomponentsBase.d()
1194
- ], Dialog.prototype, "header", void 0);
1195
- __decorate$2([
1196
- webcomponentsBase.d()
1197
- ], Dialog.prototype, "footer", void 0);
1198
- __decorate$2([
1199
- parametersBundle_css$1.i("@ui5/webcomponents")
1200
- ], Dialog, "i18nBundle", void 0);
1201
- Dialog = Dialog_1 = __decorate$2([
1202
- webcomponentsBase.m({
1203
- tag: "ui5-dialog",
1204
- template: DialogTemplate,
1205
- styles: [
1206
- Popup$1.styles,
1207
- PopupsCommonCss,
1208
- dialogCSS,
1209
- ],
1210
- })
1211
- ], Dialog);
1212
- Dialog.define();
1213
- var Dialog$1 = Dialog;
1214
-
1215
- function ResponsivePopoverTemplate() {
1216
- if (!this._isPhone) {
1217
- return PopoverTemplate.call(this);
1218
- }
1219
- return (parametersBundle_css.jsxs(Dialog$1, { "root-element": true, accessibleName: this.accessibleName, accessibleNameRef: this.accessibleNameRef, accessibleDescription: this.accessibleDescription, accessibleDescriptionRef: this.accessibleDescriptionRef, accessibleRole: this.accessibleRole, stretch: true, preventInitialFocus: this.preventInitialFocus, preventFocusRestore: this.preventFocusRestore, initialFocus: this.initialFocus, onBeforeOpen: this._beforeDialogOpen, onOpen: this._afterDialogOpen, onBeforeClose: this._beforeDialogClose, onClose: this._afterDialogClose, exportparts: "content, header, footer", open: this.open, children: [!this._hideHeader && parametersBundle_css.jsx(parametersBundle_css.Fragment, { children: this.header.length ?
1220
- parametersBundle_css.jsx("slot", { slot: "header", name: "header" })
1221
- :
1222
- parametersBundle_css.jsxs("div", { class: this.classes.header, slot: "header", children: [this.headerText &&
1223
- parametersBundle_css.jsx(Title.Title, { level: "H1", wrappingType: "None", class: "ui5-popup-header-text ui5-responsive-popover-header-text", children: this.headerText }), !this._hideCloseButton &&
1224
- parametersBundle_css.jsx(Button.Button, { icon: information.decline, design: "Transparent", accessibleName: this._closeDialogAriaLabel, onClick: this._dialogCloseButtonClick })] }) }), parametersBundle_css.jsx("slot", {}), parametersBundle_css.jsx("slot", { slot: "footer", name: "footer" })] }));
1225
- }
1226
-
1227
- /**
1228
- * Popover placements.
1229
- * @public
1230
- */
1231
- var PopoverPlacement;
1232
- (function (PopoverPlacement) {
1233
- /**
1234
- * Popover will be placed at the start of the reference element.
1235
- * @public
1236
- */
1237
- PopoverPlacement["Start"] = "Start";
1238
- /**
1239
- * Popover will be placed at the end of the reference element.
1240
- * @public
1241
- */
1242
- PopoverPlacement["End"] = "End";
1243
- /**
1244
- * Popover will be placed at the top of the reference element.
1245
- * @public
1246
- */
1247
- PopoverPlacement["Top"] = "Top";
1248
- /**
1249
- * Popover will be placed at the bottom of the reference element.
1250
- * @public
1251
- */
1252
- PopoverPlacement["Bottom"] = "Bottom";
1253
- })(PopoverPlacement || (PopoverPlacement = {}));
1254
- var PopoverPlacement$1 = PopoverPlacement;
1255
-
1256
- /**
1257
- * Popover vertical align types.
1258
- * @public
1259
- */
1260
- var PopoverVerticalAlign;
1261
- (function (PopoverVerticalAlign) {
1262
- /**
1263
- * @public
1264
- */
1265
- PopoverVerticalAlign["Center"] = "Center";
1266
- /**
1267
- * Popover will be placed at the top of the reference control.
1268
- * @public
1269
- */
1270
- PopoverVerticalAlign["Top"] = "Top";
1271
- /**
1272
- * Popover will be placed at the bottom of the reference control.
1273
- * @public
1274
- */
1275
- PopoverVerticalAlign["Bottom"] = "Bottom";
1276
- /**
1277
- * Popover will be streched
1278
- * @public
1279
- */
1280
- PopoverVerticalAlign["Stretch"] = "Stretch";
1281
- })(PopoverVerticalAlign || (PopoverVerticalAlign = {}));
1282
- var PopoverVerticalAlign$1 = PopoverVerticalAlign;
1283
-
1284
- /**
1285
- * Popover horizontal align types.
1286
- * @public
1287
- */
1288
- var PopoverHorizontalAlign;
1289
- (function (PopoverHorizontalAlign) {
1290
- /**
1291
- * Popover is centered.
1292
- * @public
1293
- */
1294
- PopoverHorizontalAlign["Center"] = "Center";
1295
- /**
1296
- * Popover is aligned with the start of the target.
1297
- * @public
1298
- */
1299
- PopoverHorizontalAlign["Start"] = "Start";
1300
- /**
1301
- * Popover is aligned with the end of the target.
1302
- * @public
1303
- */
1304
- PopoverHorizontalAlign["End"] = "End";
1305
- /**
1306
- * Popover is stretched.
1307
- * @public
1308
- */
1309
- PopoverHorizontalAlign["Stretch"] = "Stretch";
1310
- })(PopoverHorizontalAlign || (PopoverHorizontalAlign = {}));
1311
- var PopoverHorizontalAlign$1 = PopoverHorizontalAlign;
1312
-
1313
- const e=t=>t.parentElement?t.parentElement:t.parentNode.host;
1314
-
1315
- let updateInterval;
1316
- const intervalTimeout = 300;
1317
- const openedRegistry = [];
1318
- const repositionPopovers = () => {
1319
- openedRegistry.forEach(popover => {
1320
- popover.instance.reposition();
1321
- });
1322
- };
1323
- const closePopoversIfLostFocus = () => {
1324
- let activeElement = webcomponentsBase.t();
1325
- if (activeElement.tagName === "IFRAME") {
1326
- getRegistry().reverse().forEach(popup => {
1327
- const popover = popup.instance;
1328
- const opener = popover.getOpenerHTMLElement(popover.opener);
1329
- while (activeElement) {
1330
- if (activeElement === opener) {
1331
- return;
1332
- }
1333
- activeElement = e(activeElement);
1334
- }
1335
- popover.closePopup(false, false, true);
1336
- });
1337
- }
1338
- };
1339
- const runUpdateInterval = () => {
1340
- updateInterval = setInterval(() => {
1341
- repositionPopovers();
1342
- closePopoversIfLostFocus();
1343
- }, intervalTimeout);
1344
- };
1345
- const stopUpdateInterval = () => {
1346
- clearInterval(updateInterval);
1347
- };
1348
- const attachGlobalScrollHandler = () => {
1349
- document.addEventListener("scroll", repositionPopovers, { capture: true });
1350
- };
1351
- const detachGlobalScrollHandler = () => {
1352
- document.removeEventListener("scroll", repositionPopovers, { capture: true });
1353
- };
1354
- const attachScrollHandler = (popover) => {
1355
- popover && popover.shadowRoot.addEventListener("scroll", repositionPopovers, { capture: true });
1356
- };
1357
- const detachScrollHandler = (popover) => {
1358
- popover && popover.shadowRoot.removeEventListener("scroll", repositionPopovers, { capture: true });
1359
- };
1360
- const attachGlobalClickHandler = () => {
1361
- document.addEventListener("mousedown", clickHandler, { capture: true });
1362
- };
1363
- const detachGlobalClickHandler = () => {
1364
- document.removeEventListener("mousedown", clickHandler, { capture: true });
1365
- };
1366
- const clickHandler = (event) => {
1367
- const openedPopups = getOpenedPopups();
1368
- if (openedPopups.length === 0) {
1369
- return;
1370
- }
1371
- const isTopPopupPopover = instanceOfPopover(openedPopups[openedPopups.length - 1].instance);
1372
- if (!isTopPopupPopover) {
1373
- return;
1374
- }
1375
- // loop all open popovers
1376
- for (let i = (openedPopups.length - 1); i !== -1; i--) {
1377
- const popup = openedPopups[i].instance;
1378
- // if popup is modal, opener is clicked, popup is dialog skip closing
1379
- if (popup.isModal || popup.isOpenerClicked(event)) {
1380
- return;
1381
- }
1382
- if (f(event, popup.getBoundingClientRect())) {
1383
- break;
1384
- }
1385
- popup.closePopup();
1386
- }
1387
- };
1388
- const addOpenedPopover = (instance) => {
1389
- const parentPopovers = getParentPopoversIfNested(instance);
1390
- addOpenedPopup(instance, parentPopovers);
1391
- openedRegistry.push({
1392
- instance,
1393
- parentPopovers,
1394
- });
1395
- attachScrollHandler(instance);
1396
- if (openedRegistry.length === 1) {
1397
- attachGlobalScrollHandler();
1398
- attachGlobalClickHandler();
1399
- runUpdateInterval();
1400
- }
1401
- };
1402
- const removeOpenedPopover = (instance) => {
1403
- const popoversToClose = [instance];
1404
- for (let i = 0; i < openedRegistry.length; i++) {
1405
- const indexOfCurrentInstance = openedRegistry[i].parentPopovers.indexOf(instance);
1406
- if (openedRegistry[i].parentPopovers.length > 0 && indexOfCurrentInstance > -1) {
1407
- popoversToClose.push(openedRegistry[i].instance);
1408
- }
1409
- }
1410
- for (let i = popoversToClose.length - 1; i >= 0; i--) {
1411
- for (let j = 0; j < openedRegistry.length; j++) {
1412
- let indexOfItemToRemove = -1;
1413
- if (popoversToClose[i] === openedRegistry[j].instance) {
1414
- indexOfItemToRemove = j;
1415
- }
1416
- if (indexOfItemToRemove >= 0) {
1417
- removeOpenedPopup(openedRegistry[indexOfItemToRemove].instance);
1418
- detachScrollHandler(openedRegistry[indexOfItemToRemove].instance);
1419
- const itemToClose = openedRegistry.splice(indexOfItemToRemove, 1);
1420
- itemToClose[0].instance.closePopup(false, true);
1421
- }
1422
- }
1423
- }
1424
- if (!openedRegistry.length) {
1425
- detachGlobalScrollHandler();
1426
- detachGlobalClickHandler();
1427
- stopUpdateInterval();
1428
- }
1429
- };
1430
- const getRegistry = () => {
1431
- return openedRegistry;
1432
- };
1433
- const getParentPopoversIfNested = (instance) => {
1434
- let currentElement = instance.parentNode;
1435
- const parentPopovers = [];
1436
- while (currentElement && currentElement.parentNode) {
1437
- for (let i = 0; i < openedRegistry.length; i++) {
1438
- if (currentElement === openedRegistry[i].instance) {
1439
- parentPopovers.push(currentElement);
1440
- }
1441
- }
1442
- currentElement = currentElement.parentNode;
1443
- }
1444
- return parentPopovers;
1445
- };
1446
-
1447
- Theme.p("@" + "ui5" + "/" + "webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
1448
- Theme.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => parametersBundle_css$1.defaultTheme);
1449
- var PopoverCss = `:host{box-shadow:var(--_ui5-v2-15-0_popover_box_shadow);background-color:var(--_ui5-v2-15-0_popover_background);max-width:calc(100vw - (100vw - 100%) - 2 * var(--_ui5-v2-15-0_popup_viewport_margin))}:host([hide-arrow]){box-shadow:var(--_ui5-v2-15-0_popover_no_arrow_box_shadow)}:host([actual-placement="Bottom"]) .ui5-popover-arrow{left:calc(50% - .5625rem);top:-.5rem;height:.5rem}:host([actual-placement="Bottom"]) .ui5-popover-arrow:after{margin:var(--_ui5-v2-15-0_popover_upward_arrow_margin)}:host([actual-placement="Start"]) .ui5-popover-arrow{top:calc(50% - .5625rem);right:-.5625rem;width:.5625rem}:host([actual-placement="Start"]) .ui5-popover-arrow:after{margin:var(--_ui5-v2-15-0_popover_right_arrow_margin)}:host([actual-placement="Top"]) .ui5-popover-arrow{left:calc(50% - .5625rem);height:.5625rem;top:100%}:host([actual-placement="Top"]) .ui5-popover-arrow:after{margin:var(--_ui5-v2-15-0_popover_downward_arrow_margin)}:host(:not([actual-placement])) .ui5-popover-arrow,:host([actual-placement="End"]) .ui5-popover-arrow{left:-.5625rem;top:calc(50% - .5625rem);width:.5625rem;height:1rem}:host(:not([actual-placement])) .ui5-popover-arrow:after,:host([actual-placement="End"]) .ui5-popover-arrow:after{margin:var(--_ui5-v2-15-0_popover_left_arrow_margin)}:host([hide-arrow]) .ui5-popover-arrow{display:none}.ui5-popover-root{min-width:6.25rem}.ui5-popover-arrow{pointer-events:none;display:block;width:1rem;height:1rem;position:absolute;overflow:hidden}.ui5-popover-arrow:after{content:"";display:block;width:.7rem;height:.7rem;background-color:var(--_ui5-v2-15-0_popover_background);box-shadow:var(--_ui5-v2-15-0_popover_box_shadow);transform:rotate(-45deg)}:host([modal])::backdrop{background-color:var(--_ui5-v2-15-0_popup_block_layer_background);opacity:var(--_ui5-v2-15-0_popup_block_layer_opacity)}:host([modal]) .ui5-block-layer{display:block}
1450
- `;
1451
-
1452
- var __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) {
1453
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1454
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1455
- 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;
1456
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1457
- };
1458
- var Popover_1;
1459
- const ARROW_SIZE = 8;
1460
- /**
1461
- * @class
1462
- *
1463
- * ### Overview
1464
- *
1465
- * The `ui5-popover` component displays additional information for an object
1466
- * in a compact way and without leaving the page.
1467
- * The Popover can contain various UI elements, such as fields, tables, images, and charts.
1468
- * It can also include actions in the footer.
1469
- *
1470
- * ### Structure
1471
- *
1472
- * The popover has three main areas:
1473
- *
1474
- * - Header (optional)
1475
- * - Content
1476
- * - Footer (optional)
1477
- *
1478
- * **Note:** The `ui5-popover` is closed when the user clicks
1479
- * or taps outside the popover
1480
- * or selects an action within the popover. You can prevent this with the
1481
- * `modal` property.
1482
- *
1483
- * ### ES6 Module Import
1484
- *
1485
- * `import "@ui5/webcomponents/dist/Popover.js";`
1486
- *
1487
- * @constructor
1488
- * @extends Popup
1489
- * @since 1.0.0-rc.6
1490
- * @public
1491
- * @csspart header - Used to style the header of the component
1492
- * @csspart content - Used to style the content of the component
1493
- * @csspart footer - Used to style the footer of the component
1494
- */
1495
- let Popover = Popover_1 = class Popover extends Popup$1 {
1496
- static get VIEWPORT_MARGIN() {
1497
- return 10; // px
1498
- }
1499
- constructor() {
1500
- super();
1501
- /**
1502
- * Determines on which side the component is placed at.
1503
- * @default "End"
1504
- * @public
1505
- */
1506
- this.placement = "End";
1507
- /**
1508
- * Determines the horizontal alignment of the component.
1509
- * @default "Center"
1510
- * @public
1511
- */
1512
- this.horizontalAlign = "Center";
1513
- /**
1514
- * Determines the vertical alignment of the component.
1515
- * @default "Center"
1516
- * @public
1517
- */
1518
- this.verticalAlign = "Center";
1519
- /**
1520
- * Defines whether the component should close when
1521
- * clicking/tapping outside of the popover.
1522
- * If enabled, it blocks any interaction with the background.
1523
- * @default false
1524
- * @public
1525
- */
1526
- this.modal = false;
1527
- /**
1528
- * Determines whether the component arrow is hidden.
1529
- * @default false
1530
- * @public
1531
- * @since 1.0.0-rc.15
1532
- */
1533
- this.hideArrow = false;
1534
- /**
1535
- * Determines if there is no enough space, the component can be placed
1536
- * over the target.
1537
- * @default false
1538
- * @public
1539
- */
1540
- this.allowTargetOverlap = false;
1541
- /**
1542
- * Sets the X translation of the arrow
1543
- * @private
1544
- */
1545
- this.arrowTranslateX = 0;
1546
- /**
1547
- * Sets the Y translation of the arrow
1548
- * @private
1549
- */
1550
- this.arrowTranslateY = 0;
1551
- /**
1552
- * Returns the calculated placement depending on the free space
1553
- * @private
1554
- */
1555
- this.actualPlacement = "End";
1556
- }
1557
- /**
1558
- * Defines the ID or DOM Reference of the element at which the popover is shown.
1559
- * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the popover.
1560
- * You can only set the `opener` attribute to a DOM Reference when using JavaScript.
1561
- * @public
1562
- * @default undefined
1563
- * @since 1.2.0
1564
- */
1565
- set opener(value) {
1566
- if (this._opener === value) {
1567
- return;
1568
- }
1569
- this._opener = value;
1570
- if (value && this.open) {
1571
- this.openPopup();
1572
- }
1573
- }
1574
- get opener() {
1575
- return this._opener;
1576
- }
1577
- async openPopup() {
1578
- if (this._opened) {
1579
- return;
1580
- }
1581
- const opener = this.getOpenerHTMLElement(this.opener);
1582
- if (!opener) {
1583
- return;
1584
- }
1585
- if (!opener || this.isOpenerOutsideViewport(opener.getBoundingClientRect())) {
1586
- await Theme.f$1();
1587
- this.open = false;
1588
- this.fireDecoratorEvent("close");
1589
- return;
1590
- }
1591
- this._openerRect = opener.getBoundingClientRect();
1592
- await super.openPopup();
1593
- }
1594
- isOpenerClicked(e) {
1595
- const target = e.target;
1596
- const opener = this.getOpenerHTMLElement(this.opener);
1597
- if (!opener) {
1598
- return false;
1599
- }
1600
- if (target === opener) {
1601
- return true;
1602
- }
1603
- if (this._isUI5AbstractElement(target) && target.getFocusDomRef() === opener) {
1604
- return true;
1605
- }
1606
- return e.composedPath().indexOf(opener) > -1;
1607
- }
1608
- /**
1609
- * Override for the _addOpenedPopup hook, which would otherwise just call addOpenedPopup(this)
1610
- * @private
1611
- */
1612
- _addOpenedPopup() {
1613
- addOpenedPopover(this);
1614
- }
1615
- /**
1616
- * Override for the _removeOpenedPopup hook, which would otherwise just call removeOpenedPopup(this)
1617
- * @private
1618
- */
1619
- _removeOpenedPopup() {
1620
- removeOpenedPopover(this);
1621
- }
1622
- getOpenerHTMLElement(opener) {
1623
- if (opener === undefined || opener === null) {
1624
- return opener;
1625
- }
1626
- if (opener instanceof HTMLElement) {
1627
- return this._isUI5AbstractElement(opener) ? opener.getFocusDomRef() : opener;
1628
- }
1629
- let rootNode = this.getRootNode();
1630
- if (rootNode === this) {
1631
- rootNode = document;
1632
- }
1633
- let openerHTMLElement = rootNode.getElementById(opener);
1634
- if (rootNode instanceof ShadowRoot && !openerHTMLElement) {
1635
- openerHTMLElement = document.getElementById(opener);
1636
- }
1637
- if (openerHTMLElement) {
1638
- return this._isUI5AbstractElement(openerHTMLElement) ? openerHTMLElement.getFocusDomRef() : openerHTMLElement;
1639
- }
1640
- return openerHTMLElement;
1641
- }
1642
- shouldCloseDueToOverflow(placement, openerRect) {
1643
- const threshold = 32;
1644
- const limits = {
1645
- "Start": openerRect.right,
1646
- "End": openerRect.left,
1647
- "Top": openerRect.top,
1648
- "Bottom": openerRect.bottom,
1649
- };
1650
- const opener = this.getOpenerHTMLElement(this.opener);
1651
- const closedPopupParent = i(opener);
1652
- let overflowsBottom = false;
1653
- let overflowsTop = false;
1654
- if (closedPopupParent instanceof Popover_1) {
1655
- const contentRect = closedPopupParent.getBoundingClientRect();
1656
- overflowsBottom = openerRect.top > (contentRect.top + contentRect.height);
1657
- overflowsTop = (openerRect.top + openerRect.height) < contentRect.top;
1658
- }
1659
- return (limits[placement] < 0 || (limits[placement] + threshold > closedPopupParent.innerHeight)) || overflowsBottom || overflowsTop;
1660
- }
1661
- shouldCloseDueToNoOpener(openerRect) {
1662
- return openerRect.top === 0
1663
- && openerRect.bottom === 0
1664
- && openerRect.left === 0
1665
- && openerRect.right === 0;
1666
- }
1667
- isOpenerOutsideViewport(openerRect) {
1668
- return openerRect.bottom < 0
1669
- || openerRect.top > window.innerHeight
1670
- || openerRect.right < 0
1671
- || openerRect.left > window.innerWidth;
1672
- }
1673
- /**
1674
- * @override
1675
- */
1676
- _resize() {
1677
- super._resize();
1678
- if (this.open) {
1679
- this.reposition();
1680
- }
1681
- }
1682
- reposition() {
1683
- this._show();
1684
- }
1685
- async _show() {
1686
- super._show();
1687
- const opener = this.getOpenerHTMLElement(this.opener);
1688
- if (!opener) {
1689
- Object.assign(this.style, {
1690
- top: `0px`,
1691
- left: `0px`,
1692
- });
1693
- return;
1694
- }
1695
- if (opener && webcomponentsBase.v(opener) && !opener.getDomRef()) {
1696
- return;
1697
- }
1698
- if (!this._opened) {
1699
- this._showOutsideViewport();
1700
- }
1701
- const popoverSize = this.getPopoverSize();
1702
- let placement;
1703
- if (popoverSize.width === 0 || popoverSize.height === 0) {
1704
- // size can not be determined properly at this point, popover will be shown with the next reposition
1705
- return;
1706
- }
1707
- if (this.open) {
1708
- // update opener rect if it was changed during the popover being opened
1709
- this._openerRect = opener.getBoundingClientRect();
1710
- }
1711
- if (this._oldPlacement && this.shouldCloseDueToNoOpener(this._openerRect) && this.isFocusWithin()) {
1712
- // reuse the old placement as the opener is not available,
1713
- // but keep the popover open as the focus is within
1714
- placement = this._oldPlacement;
1715
- }
1716
- else {
1717
- placement = this.calcPlacement(this._openerRect, popoverSize);
1718
- }
1719
- if (this._preventRepositionAndClose || this.isOpenerOutsideViewport(this._openerRect)) {
1720
- await this._waitForDomRef();
1721
- return this.closePopup();
1722
- }
1723
- this._oldPlacement = placement;
1724
- this.actualPlacement = placement.placement;
1725
- let left = m$1(this._left, Popover_1.VIEWPORT_MARGIN, document.documentElement.clientWidth - popoverSize.width - Popover_1.VIEWPORT_MARGIN);
1726
- if (this.actualPlacement === PopoverPlacement$1.End) {
1727
- left = Math.max(left, this._left);
1728
- }
1729
- let top = m$1(this._top, Popover_1.VIEWPORT_MARGIN, document.documentElement.clientHeight - popoverSize.height - Popover_1.VIEWPORT_MARGIN);
1730
- if (this.actualPlacement === PopoverPlacement$1.Bottom) {
1731
- top = Math.max(top, this._top);
1732
- }
1733
- this.arrowTranslateX = placement.arrow.x;
1734
- this.arrowTranslateY = placement.arrow.y;
1735
- top = this._adjustForIOSKeyboard(top);
1736
- Object.assign(this.style, {
1737
- top: `${top}px`,
1738
- left: `${left}px`,
1739
- });
1740
- if (this.horizontalAlign === PopoverHorizontalAlign$1.Stretch && this._width) {
1741
- this.style.width = this._width;
1742
- }
1743
- if (this.verticalAlign === PopoverVerticalAlign$1.Stretch && this._height) {
1744
- this.style.height = this._height;
1745
- }
1746
- }
1747
- /**
1748
- * Adjust the desired top position to compensate for shift of the screen
1749
- * caused by opened keyboard on iOS which affects all elements with position:fixed.
1750
- * @private
1751
- * @param top The target top in px.
1752
- * @returns The adjusted top in px.
1753
- */
1754
- _adjustForIOSKeyboard(top) {
1755
- if (!Theme.w()) {
1756
- return top;
1757
- }
1758
- const actualTop = Math.ceil(this.getBoundingClientRect().top);
1759
- return top + (Number.parseInt(this.style.top || "0") - actualTop);
1760
- }
1761
- getPopoverSize(calcScrollHeight = false) {
1762
- const rect = this.getBoundingClientRect();
1763
- const width = rect.width;
1764
- let height;
1765
- const domRef = this.getDomRef();
1766
- if (calcScrollHeight && domRef) {
1767
- const header = domRef.querySelector(".ui5-popup-header-root");
1768
- const content = domRef.querySelector(".ui5-popup-content");
1769
- const footer = domRef.querySelector(".ui5-popup-footer-root");
1770
- height = content?.scrollHeight || 0;
1771
- height += header?.scrollHeight || 0;
1772
- height += footer?.scrollHeight || 0;
1773
- }
1774
- else {
1775
- height = rect.height;
1776
- }
1777
- return { width, height };
1778
- }
1779
- _showOutsideViewport() {
1780
- Object.assign(this.style, {
1781
- top: "-10000px",
1782
- left: "-10000px",
1783
- });
1784
- }
1785
- _isUI5AbstractElement(el) {
1786
- return webcomponentsBase.v(el) && el.isUI5AbstractElement;
1787
- }
1788
- get arrowDOM() {
1789
- return this.shadowRoot.querySelector(".ui5-popover-arrow");
1790
- }
1791
- /**
1792
- * @protected
1793
- */
1794
- focusOpener() {
1795
- this.getOpenerHTMLElement(this.opener)?.focus();
1796
- }
1797
- /**
1798
- * @private
1799
- */
1800
- calcPlacement(targetRect, popoverSize) {
1801
- let left = Popover_1.VIEWPORT_MARGIN;
1802
- let top = 0;
1803
- const allowTargetOverlap = this.allowTargetOverlap;
1804
- const clientWidth = document.documentElement.clientWidth;
1805
- const clientHeight = document.documentElement.clientHeight;
1806
- let maxHeight = clientHeight;
1807
- let maxWidth = clientWidth;
1808
- const placement = this.getActualPlacement(targetRect);
1809
- this._preventRepositionAndClose = this.shouldCloseDueToNoOpener(targetRect) || this.shouldCloseDueToOverflow(placement, targetRect);
1810
- const isVertical = placement === PopoverPlacement$1.Top
1811
- || placement === PopoverPlacement$1.Bottom;
1812
- if (this.horizontalAlign === PopoverHorizontalAlign$1.Stretch && isVertical) {
1813
- popoverSize.width = targetRect.width;
1814
- this._width = `${targetRect.width}px`;
1815
- }
1816
- else if (this.verticalAlign === PopoverVerticalAlign$1.Stretch && !isVertical) {
1817
- popoverSize.height = targetRect.height;
1818
- this._height = `${targetRect.height}px`;
1819
- }
1820
- const arrowOffset = this.hideArrow ? 0 : ARROW_SIZE;
1821
- // calc popover positions
1822
- switch (placement) {
1823
- case PopoverPlacement$1.Top:
1824
- left = this.getVerticalLeft(targetRect, popoverSize);
1825
- top = Math.max(targetRect.top - popoverSize.height - arrowOffset, 0);
1826
- if (!allowTargetOverlap) {
1827
- maxHeight = targetRect.top - arrowOffset;
1828
- }
1829
- break;
1830
- case PopoverPlacement$1.Bottom:
1831
- left = this.getVerticalLeft(targetRect, popoverSize);
1832
- top = targetRect.bottom + arrowOffset;
1833
- if (allowTargetOverlap) {
1834
- top = Math.max(Math.min(top, clientHeight - popoverSize.height), 0);
1835
- }
1836
- else {
1837
- maxHeight = clientHeight - targetRect.bottom - arrowOffset;
1838
- }
1839
- break;
1840
- case PopoverPlacement$1.Start:
1841
- left = Math.max(targetRect.left - popoverSize.width - arrowOffset, 0);
1842
- top = this.getHorizontalTop(targetRect, popoverSize);
1843
- if (!allowTargetOverlap) {
1844
- maxWidth = targetRect.left - arrowOffset;
1845
- }
1846
- break;
1847
- case PopoverPlacement$1.End:
1848
- left = targetRect.left + targetRect.width + arrowOffset;
1849
- top = this.getHorizontalTop(targetRect, popoverSize);
1850
- if (allowTargetOverlap) {
1851
- left = Math.max(Math.min(left, clientWidth - popoverSize.width), 0);
1852
- }
1853
- else {
1854
- maxWidth = clientWidth - targetRect.right - arrowOffset;
1855
- }
1856
- break;
1857
- }
1858
- // correct popover positions
1859
- if (isVertical) {
1860
- if (popoverSize.width > clientWidth || left < Popover_1.VIEWPORT_MARGIN) {
1861
- left = Popover_1.VIEWPORT_MARGIN;
1862
- }
1863
- else if (left + popoverSize.width > clientWidth - Popover_1.VIEWPORT_MARGIN) {
1864
- left = clientWidth - Popover_1.VIEWPORT_MARGIN - popoverSize.width;
1865
- }
1866
- }
1867
- else {
1868
- if (popoverSize.height > clientHeight || top < Popover_1.VIEWPORT_MARGIN) { // eslint-disable-line
1869
- top = Popover_1.VIEWPORT_MARGIN;
1870
- }
1871
- else if (top + popoverSize.height > clientHeight - Popover_1.VIEWPORT_MARGIN) {
1872
- top = clientHeight - Popover_1.VIEWPORT_MARGIN - popoverSize.height;
1873
- }
1874
- }
1875
- this._maxHeight = Math.round(maxHeight - Popover_1.VIEWPORT_MARGIN);
1876
- this._maxWidth = Math.round(maxWidth - Popover_1.VIEWPORT_MARGIN);
1877
- if (this._left === undefined || Math.abs(this._left - left) > 1.5) {
1878
- this._left = Math.round(left);
1879
- }
1880
- if (this._top === undefined || Math.abs(this._top - top) > 1.5) {
1881
- this._top = Math.round(top);
1882
- }
1883
- const borderRadius = Number.parseInt(window.getComputedStyle(this).getPropertyValue("border-radius"));
1884
- const arrowPos = this.getArrowPosition(targetRect, popoverSize, left, top, isVertical, borderRadius);
1885
- this._left += this.getRTLCorrectionLeft();
1886
- return {
1887
- arrow: arrowPos,
1888
- top: this._top,
1889
- left: this._left,
1890
- placement,
1891
- };
1892
- }
1893
- getRTLCorrectionLeft() {
1894
- return parseFloat(window.getComputedStyle(this).left) - this.getBoundingClientRect().left;
1895
- }
1896
- /**
1897
- * Calculates the position for the arrow.
1898
- * @private
1899
- * @param targetRect BoundingClientRect of the target element
1900
- * @param popoverSize Width and height of the popover
1901
- * @param left Left offset of the popover
1902
- * @param top Top offset of the popover
1903
- * @param isVertical If the popover is positioned vertically to the target element
1904
- * @param borderRadius Value of the border-radius property
1905
- * @returns Arrow's coordinates
1906
- */
1907
- getArrowPosition(targetRect, popoverSize, left, top, isVertical, borderRadius) {
1908
- const horizontalAlign = this._actualHorizontalAlign;
1909
- let arrowXCentered = horizontalAlign === PopoverHorizontalAlign$1.Center || horizontalAlign === PopoverHorizontalAlign$1.Stretch;
1910
- if (horizontalAlign === PopoverHorizontalAlign$1.End && left <= targetRect.left) {
1911
- arrowXCentered = true;
1912
- }
1913
- if (horizontalAlign === PopoverHorizontalAlign$1.Start && left + popoverSize.width >= targetRect.left + targetRect.width) {
1914
- arrowXCentered = true;
1915
- }
1916
- let arrowTranslateX = 0;
1917
- if (isVertical && arrowXCentered) {
1918
- arrowTranslateX = targetRect.left + targetRect.width / 2 - left - popoverSize.width / 2;
1919
- }
1920
- let arrowTranslateY = 0;
1921
- if (!isVertical) {
1922
- arrowTranslateY = targetRect.top + targetRect.height / 2 - top - popoverSize.height / 2;
1923
- }
1924
- // Restricts the arrow's translate value along each dimension,
1925
- // so that the arrow does not clip over the popover's rounded borders.
1926
- const safeRangeForArrowY = popoverSize.height / 2 - borderRadius - ARROW_SIZE / 2 - 2;
1927
- arrowTranslateY = m$1(arrowTranslateY, -safeRangeForArrowY, safeRangeForArrowY);
1928
- const safeRangeForArrowX = popoverSize.width / 2 - borderRadius - ARROW_SIZE / 2 - 2;
1929
- arrowTranslateX = m$1(arrowTranslateX, -safeRangeForArrowX, safeRangeForArrowX);
1930
- return {
1931
- x: Math.round(arrowTranslateX),
1932
- y: Math.round(arrowTranslateY),
1933
- };
1934
- }
1935
- /**
1936
- * Fallbacks to new placement, prioritizing `Left` and `Right` placements.
1937
- * @private
1938
- */
1939
- fallbackPlacement(clientWidth, clientHeight, targetRect, popoverSize) {
1940
- if (targetRect.left > popoverSize.width) {
1941
- return PopoverPlacement$1.Start;
1942
- }
1943
- if (clientWidth - targetRect.right > targetRect.left) {
1944
- return PopoverPlacement$1.End;
1945
- }
1946
- if (clientHeight - targetRect.bottom > popoverSize.height) {
1947
- return PopoverPlacement$1.Bottom;
1948
- }
1949
- if (clientHeight - targetRect.bottom < targetRect.top) {
1950
- return PopoverPlacement$1.Top;
1951
- }
1952
- }
1953
- getActualPlacement(targetRect) {
1954
- const placement = this.placement;
1955
- let actualPlacement = placement;
1956
- const isVertical = placement === PopoverPlacement$1.Top
1957
- || placement === PopoverPlacement$1.Bottom;
1958
- const popoverSize = this.getPopoverSize(!this.allowTargetOverlap);
1959
- const clientWidth = document.documentElement.clientWidth;
1960
- let clientHeight = document.documentElement.clientHeight;
1961
- let popoverHeight = popoverSize.height;
1962
- if (isVertical) {
1963
- popoverHeight += this.hideArrow ? 0 : ARROW_SIZE;
1964
- clientHeight -= Popover_1.VIEWPORT_MARGIN;
1965
- }
1966
- switch (placement) {
1967
- case PopoverPlacement$1.Top:
1968
- if (targetRect.top < popoverHeight
1969
- && targetRect.top < clientHeight - targetRect.bottom) {
1970
- actualPlacement = PopoverPlacement$1.Bottom;
1971
- }
1972
- break;
1973
- case PopoverPlacement$1.Bottom:
1974
- if (clientHeight - targetRect.bottom < popoverHeight
1975
- && clientHeight - targetRect.bottom < targetRect.top) {
1976
- actualPlacement = PopoverPlacement$1.Top;
1977
- }
1978
- break;
1979
- case PopoverPlacement$1.Start:
1980
- if (targetRect.left < popoverSize.width) {
1981
- actualPlacement = this.fallbackPlacement(clientWidth, clientHeight, targetRect, popoverSize) || placement;
1982
- }
1983
- break;
1984
- case PopoverPlacement$1.End:
1985
- if (clientWidth - targetRect.right < popoverSize.width) {
1986
- actualPlacement = this.fallbackPlacement(clientWidth, clientHeight, targetRect, popoverSize) || placement;
1987
- }
1988
- break;
1989
- }
1990
- return actualPlacement;
1991
- }
1992
- getVerticalLeft(targetRect, popoverSize) {
1993
- const horizontalAlign = this._actualHorizontalAlign;
1994
- let left = Popover_1.VIEWPORT_MARGIN;
1995
- switch (horizontalAlign) {
1996
- case PopoverHorizontalAlign$1.Center:
1997
- case PopoverHorizontalAlign$1.Stretch:
1998
- left = targetRect.left - (popoverSize.width - targetRect.width) / 2;
1999
- break;
2000
- case PopoverHorizontalAlign$1.Start:
2001
- left = targetRect.left;
2002
- break;
2003
- case PopoverHorizontalAlign$1.End:
2004
- left = targetRect.right - popoverSize.width;
2005
- break;
2006
- }
2007
- return left;
2008
- }
2009
- getHorizontalTop(targetRect, popoverSize) {
2010
- let top = 0;
2011
- switch (this.verticalAlign) {
2012
- case PopoverVerticalAlign$1.Center:
2013
- case PopoverVerticalAlign$1.Stretch:
2014
- top = targetRect.top - (popoverSize.height - targetRect.height) / 2;
2015
- break;
2016
- case PopoverVerticalAlign$1.Top:
2017
- top = targetRect.top;
2018
- break;
2019
- case PopoverVerticalAlign$1.Bottom:
2020
- top = targetRect.bottom - popoverSize.height;
2021
- break;
2022
- }
2023
- return top;
2024
- }
2025
- get isModal() {
2026
- return this.modal;
2027
- }
2028
- get _ariaLabelledBy() {
2029
- if (!this._ariaLabel && this._displayHeader) {
2030
- return "ui5-popup-header";
2031
- }
2032
- return undefined;
2033
- }
2034
- get styles() {
2035
- return {
2036
- ...super.styles,
2037
- root: {
2038
- "max-height": this._maxHeight ? `${this._maxHeight}px` : "",
2039
- "max-width": this._maxWidth ? `${this._maxWidth}px` : "",
2040
- },
2041
- arrow: {
2042
- transform: `translate(${this.arrowTranslateX}px, ${this.arrowTranslateY}px)`,
2043
- },
2044
- };
2045
- }
2046
- get classes() {
2047
- const allClasses = super.classes;
2048
- allClasses.root["ui5-popover-root"] = true;
2049
- return allClasses;
2050
- }
2051
- /**
2052
- * Hook for descendants to hide header.
2053
- */
2054
- get _displayHeader() {
2055
- return !!(this.header.length || this.headerText);
2056
- }
2057
- /**
2058
- * Hook for descendants to hide footer.
2059
- */
2060
- get _displayFooter() {
2061
- return true;
2062
- }
2063
- get _actualHorizontalAlign() {
2064
- if (this.effectiveDir === "rtl") {
2065
- if (this.horizontalAlign === PopoverHorizontalAlign$1.Start) {
2066
- return PopoverHorizontalAlign$1.End;
2067
- }
2068
- if (this.horizontalAlign === PopoverHorizontalAlign$1.End) {
2069
- return PopoverHorizontalAlign$1.Start;
2070
- }
2071
- }
2072
- return this.horizontalAlign;
2073
- }
2074
- };
2075
- __decorate$1([
2076
- webcomponentsBase.s()
2077
- ], Popover.prototype, "headerText", void 0);
2078
- __decorate$1([
2079
- webcomponentsBase.s()
2080
- ], Popover.prototype, "placement", void 0);
2081
- __decorate$1([
2082
- webcomponentsBase.s()
2083
- ], Popover.prototype, "horizontalAlign", void 0);
2084
- __decorate$1([
2085
- webcomponentsBase.s()
2086
- ], Popover.prototype, "verticalAlign", void 0);
2087
- __decorate$1([
2088
- webcomponentsBase.s({ type: Boolean })
2089
- ], Popover.prototype, "modal", void 0);
2090
- __decorate$1([
2091
- webcomponentsBase.s({ type: Boolean })
2092
- ], Popover.prototype, "hideArrow", void 0);
2093
- __decorate$1([
2094
- webcomponentsBase.s({ type: Boolean })
2095
- ], Popover.prototype, "allowTargetOverlap", void 0);
2096
- __decorate$1([
2097
- webcomponentsBase.s({ type: Number, noAttribute: true })
2098
- ], Popover.prototype, "arrowTranslateX", void 0);
2099
- __decorate$1([
2100
- webcomponentsBase.s({ type: Number, noAttribute: true })
2101
- ], Popover.prototype, "arrowTranslateY", void 0);
2102
- __decorate$1([
2103
- webcomponentsBase.s()
2104
- ], Popover.prototype, "actualPlacement", void 0);
2105
- __decorate$1([
2106
- webcomponentsBase.s({ type: Number, noAttribute: true })
2107
- ], Popover.prototype, "_maxHeight", void 0);
2108
- __decorate$1([
2109
- webcomponentsBase.s({ type: Number, noAttribute: true })
2110
- ], Popover.prototype, "_maxWidth", void 0);
2111
- __decorate$1([
2112
- webcomponentsBase.d({ type: HTMLElement })
2113
- ], Popover.prototype, "header", void 0);
2114
- __decorate$1([
2115
- webcomponentsBase.d({ type: HTMLElement })
2116
- ], Popover.prototype, "footer", void 0);
2117
- __decorate$1([
2118
- webcomponentsBase.s({ converter: e$1 })
2119
- ], Popover.prototype, "opener", null);
2120
- Popover = Popover_1 = __decorate$1([
2121
- webcomponentsBase.m({
2122
- tag: "ui5-popover",
2123
- styles: [
2124
- Popup$1.styles,
2125
- PopupsCommonCss,
2126
- PopoverCss,
2127
- ],
2128
- template: PopoverTemplate,
2129
- })
2130
- ], Popover);
2131
- const instanceOfPopover = (object) => {
2132
- return "opener" in object;
2133
- };
2134
- Popover.define();
2135
- var Popover$1 = Popover;
2136
-
2137
- Theme.p("@" + "ui5" + "/" + "webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
2138
- Theme.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => parametersBundle_css$1.defaultTheme);
2139
- var ResponsivePopoverCss = `:host{--_ui5-v2-15-0_input_width: 100%;min-width:6.25rem;min-height:2rem}:host([on-phone]){display:contents}.ui5-responsive-popover-header{height:var(--_ui5-v2-15-0-responsive_popover_header_height);display:flex;justify-content:var(--_ui5-v2-15-0_popup_header_prop_header_text_alignment);align-items:center;width:100%}.ui5-responsive-popover-header-text{width:calc(100% - var(--_ui5-v2-15-0_button_base_min_width))}.ui5-responsive-popover-header-no-title{justify-content:flex-end}
2140
- `;
2141
-
2142
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2143
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2144
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2145
- 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;
2146
- return c > 3 && r && Object.defineProperty(target, key, r), r;
2147
- };
2148
- var ResponsivePopover_1;
2149
- /**
2150
- * @class
2151
- *
2152
- * ### Overview
2153
- * The `ui5-responsive-popover` acts as a Popover on desktop and tablet, while on phone it acts as a Dialog.
2154
- * The component improves tremendously the user experience on mobile.
2155
- *
2156
- * ### Usage
2157
- * Use it when you want to make sure that all the content is visible on any device.
2158
- *
2159
- * ### ES6 Module Import
2160
- *
2161
- * `import "@ui5/webcomponents/dist/ResponsivePopover.js";`
2162
- * @constructor
2163
- * @extends Popover
2164
- * @since 1.0.0-rc.6
2165
- * @public
2166
- * @csspart header - Used to style the header of the component
2167
- * @csspart content - Used to style the content of the component
2168
- * @csspart footer - Used to style the footer of the component
2169
- */
2170
- let ResponsivePopover = ResponsivePopover_1 = class ResponsivePopover extends Popover$1 {
2171
- constructor() {
2172
- super();
2173
- /**
2174
- * Defines if only the content would be displayed (without header and footer) in the popover on Desktop.
2175
- * By default both the header and footer would be displayed.
2176
- * @private
2177
- */
2178
- this.contentOnlyOnDesktop = false;
2179
- /**
2180
- * Used internaly for controls which must not have header.
2181
- * @private
2182
- */
2183
- this._hideHeader = false;
2184
- /**
2185
- * Defines whether a close button will be rendered in the header of the component
2186
- * **Note:** If you are using the `header` slot, this property will have no effect
2187
- * @private
2188
- * @default false
2189
- * @since 1.0.0-rc.16
2190
- */
2191
- this._hideCloseButton = false;
2192
- }
2193
- async openPopup() {
2194
- if (!Theme.d()) {
2195
- await super.openPopup();
2196
- }
2197
- else if (this._dialog) {
2198
- this._dialog.open = true;
2199
- }
2200
- }
2201
- async _show() {
2202
- if (!Theme.d()) {
2203
- return super._show();
2204
- }
2205
- }
2206
- handleOpenOnEnterDOM() {
2207
- if (this.open && !Theme.d()) {
2208
- this.showPopover();
2209
- this.openPopup();
2210
- }
2211
- }
2212
- _dialogCloseButtonClick() {
2213
- this.closePopup();
2214
- }
2215
- /**
2216
- * Closes the popover/dialog.
2217
- * @override
2218
- */
2219
- closePopup(escPressed = false, preventRegistryUpdate = false, preventFocusRestore = false) {
2220
- if (!Theme.d()) {
2221
- super.closePopup(escPressed, preventRegistryUpdate, preventFocusRestore);
2222
- }
2223
- else {
2224
- this._dialog?.closePopup(escPressed, preventRegistryUpdate, preventFocusRestore);
2225
- }
2226
- }
2227
- toggle(opener) {
2228
- if (this.open) {
2229
- this.closePopup();
2230
- return;
2231
- }
2232
- this.opener = opener;
2233
- this.open = true;
2234
- }
2235
- get classes() {
2236
- const allClasses = super.classes;
2237
- allClasses.header = {
2238
- "ui5-responsive-popover-header": true,
2239
- "ui5-responsive-popover-header-no-title": !this.headerText,
2240
- };
2241
- return allClasses;
2242
- }
2243
- get _dialog() {
2244
- return this.shadowRoot.querySelector("[ui5-dialog]");
2245
- }
2246
- get contentDOM() {
2247
- return Theme.d() ? this._dialog.contentDOM : super.contentDOM;
2248
- }
2249
- get _isPhone() {
2250
- return Theme.d();
2251
- }
2252
- get _displayHeader() {
2253
- return (Theme.d() || !this.contentOnlyOnDesktop) && super._displayHeader;
2254
- }
2255
- get _displayFooter() {
2256
- return Theme.d() || !this.contentOnlyOnDesktop;
2257
- }
2258
- get _closeDialogAriaLabel() {
2259
- return ResponsivePopover_1.i18nBundle.getText(i18nDefaults.RESPONSIVE_POPOVER_CLOSE_DIALOG_BUTTON);
2260
- }
2261
- _beforeDialogOpen() {
2262
- this._opened = true;
2263
- this.open = true;
2264
- this.fireDecoratorEvent("before-open");
2265
- }
2266
- _afterDialogOpen() {
2267
- this.fireDecoratorEvent("open");
2268
- }
2269
- _beforeDialogClose(e) {
2270
- this.fireDecoratorEvent("before-close", e.detail);
2271
- }
2272
- _afterDialogClose() {
2273
- this._opened = false;
2274
- this.open = false;
2275
- this.fireDecoratorEvent("close");
2276
- }
2277
- get isModal() {
2278
- if (!Theme.d()) {
2279
- return super.isModal;
2280
- }
2281
- return this._dialog.isModal;
2282
- }
2283
- };
2284
- __decorate([
2285
- webcomponentsBase.s({ type: Boolean })
2286
- ], ResponsivePopover.prototype, "contentOnlyOnDesktop", void 0);
2287
- __decorate([
2288
- webcomponentsBase.s({ type: Boolean })
2289
- ], ResponsivePopover.prototype, "_hideHeader", void 0);
2290
- __decorate([
2291
- webcomponentsBase.s({ type: Boolean })
2292
- ], ResponsivePopover.prototype, "_hideCloseButton", void 0);
2293
- __decorate([
2294
- parametersBundle_css$1.i("@ui5/webcomponents")
2295
- ], ResponsivePopover, "i18nBundle", void 0);
2296
- ResponsivePopover = ResponsivePopover_1 = __decorate([
2297
- webcomponentsBase.m({
2298
- tag: "ui5-responsive-popover",
2299
- styles: [Popover$1.styles, ResponsivePopoverCss],
2300
- template: ResponsivePopoverTemplate,
2301
- })
2302
- ], ResponsivePopover);
2303
- ResponsivePopover.define();
2304
- var ResponsivePopover$1 = ResponsivePopover;
2305
-
2306
- exports.Popover = Popover$1;
2307
- exports.PopoverHorizontalAlign = PopoverHorizontalAlign$1;
2308
- exports.PopoverPlacement = PopoverPlacement$1;
2309
- exports.ResponsivePopover = ResponsivePopover$1;
2310
- exports.e = e$1;
2311
-
2312
- }));
1
+ sap.ui.define(["exports","sap/f/thirdparty/webcomponents","sap/f/thirdparty/Theme","sap/f/thirdparty/parameters-bundle.css","sap/f/thirdparty/i18n-defaults2","sap/f/thirdparty/parameters-bundle.css2","sap/f/thirdparty/information","sap/f/thirdparty/Icon","sap/f/thirdparty/Icons","sap/f/thirdparty/Title","sap/f/thirdparty/ValueState","sap/f/thirdparty/toLowercaseEnumValue","sap/f/thirdparty/event-strict","sap/f/thirdparty/FocusableElements","sap/f/thirdparty/AccessibilityTextsHelper","sap/f/thirdparty/Button2"],function(e,t,o,i,r,s,n,a,h,l,p,d,c,u,_,f){"use strict";const g={toAttribute(e){return e instanceof HTMLElement?null:e},fromAttribute(e){return e}};var m;(function(e){e["Start"]="Start";e["End"]="End";e["Top"]="Top";e["Bottom"]="Bottom"})(m||(m={}));var v=m;const b="resize-corner";const w="M384 160v32q0 12-10 22L182 406q-10 10-22 10h-32zM224 416l160-160v32q0 12-10 22l-96 96q-10 10-22 10h-32zm160-64v32q0 12-10 22t-22 10h-32z";const R=false;const y="SAP-icons-v4";const x="@ui5/webcomponents-icons";h.y(b,{pathData:w,ltr:R,collection:y,packageName:x});const z="resize-corner";const T="M282 416q-11 0-18.5-7.5T256 390t7-18l109-109q7-7 18-7t18.5 7.5T416 282t-7 18L300 409q-7 7-18 7zm-160 0q-11 0-18.5-7.5T96 390t7-18l269-269q7-7 18-7t18.5 7.5T416 122t-7 18L140 409q-7 7-18 7z";const D=false;const H="SAP-icons-v5";const M="@ui5/webcomponents-icons";h.y(z,{pathData:T,ltr:D,collection:H,packageName:M});var B="resize-corner";function E(){return s.jsx("div",{class:"ui5-block-layer",onKeyDown:this._preventBlockLayerFocus,onMouseDown:this._preventBlockLayerFocus})}function P(e){return s.jsxs(s.Fragment,{children:[E.call(this),s.jsxs("section",{"root-element":true,style:this.styles.root,class:this.classes.root,role:this._role,"aria-describedby":this.ariaDescribedByIds,"aria-modal":this._ariaModal,"aria-label":this._ariaLabel,"aria-labelledby":this._ariaLabelledBy,onKeyDown:this._onkeydown,onFocusOut:this._onfocusout,onMouseUp:this._onmouseup,onMouseDown:this._onmousedown,children:[s.jsx("span",{class:"first-fe","data-ui5-focus-trap":true,role:"none",tabIndex:0,onFocusIn:this.forwardToLast}),(e?.beforeContent||O).call(this),s.jsx("div",{style:this.styles.content,class:this.classes.content,onScroll:this._scroll,part:"content",children:s.jsx("slot",{})}),this.ariaDescriptionText&&s.jsx("span",{id:"accessibleDescription",class:"ui5-hidden-text",children:this.ariaDescriptionText}),(e?.afterContent||L).call(this),s.jsx("span",{class:"last-fe","data-ui5-focus-trap":true,role:"none",tabIndex:0,onFocusIn:this.forwardToFirst})]})]})}function O(){}function L(){}function C(){return P.call(this,{beforeContent:A,afterContent:I})}function A(){return s.jsxs(s.Fragment,{children:[s.jsx("span",{class:"ui5-popover-arrow",style:this.styles.arrow}),this._displayHeader&&s.jsx("header",{class:"ui5-popup-header-root",id:"ui5-popup-header",part:"header",children:this.header.length?s.jsx("slot",{name:"header"}):s.jsx(l.Title,{level:"H1",class:"ui5-popup-header-text",children:this.headerText})})]})}function I(){return s.jsxs(s.Fragment,{children:[this._displayFooter&&!!this.footer.length&&s.jsx("footer",{class:"ui5-popup-footer-root",part:"footer",children:s.jsx("slot",{name:"footer"})}),this._showResizeHandle&&s.jsx("div",{class:"ui5-popover-resize-handle",onMouseDown:this._onResizeMouseDown,children:s.jsx(a.Icon,{name:B})})]})}const k=(e,t,o)=>Math.min(Math.max(e,t),Math.max(t,o));const S=()=>{const e=t.t();return e&&typeof e.focus=="function"?e:null},N=e=>{const t=S();return t?F(e,t):false},F=(e,t)=>{let o=e;if(o.shadowRoot&&(o=Array.from(o.shadowRoot.children).find(e=>e.localName!=="style"),!o))return false;if(o===t)return true;const i=o.localName==="slot"?o.assignedNodes():o.children;return i?Array.from(i).some(e=>F(e,t)):false},j=(e,t,o)=>e>=o.left&&e<=o.right&&t>=o.top&&t<=o.bottom,W=(e,t)=>{let o,i;if(e instanceof MouseEvent)o=e.clientX,i=e.clientY;else{const t=e.touches[0];o=t.clientX,i=t.clientY}return j(o,i,t)};function $(e){return"isUI5Element"in e&&"_show"in e}const V=e=>{const t=e.parentElement||e.getRootNode&&e.getRootNode().host;return t&&($(t)||t===document.documentElement)?t:V(t)};var X;(function(e){e["None"]="None";e["Dialog"]="Dialog";e["AlertDialog"]="AlertDialog"})(X||(X={}));var G=X;const Y="handledByControl",U=(e,t=Y)=>!!e[`_sapui_${t}`];const q=o.m("OpenedPopupsRegistry",{openedRegistry:[]});const K=o.n("OpenUI5Support");function Z(e){K?.addOpenedPopup(e)}function J(e){K?.removeOpenedPopup(e)}const Q=(e,t=[])=>{if(!q.openedRegistry.some(t=>t.instance===e)){q.openedRegistry.push({instance:e,parentPopovers:t});Z({type:"WebComponent",instance:e})}se();if(q.openedRegistry.length===1){ie()}};const ee=e=>{q.openedRegistry=q.openedRegistry.filter(t=>t.instance!==e);J(e);se();if(!q.openedRegistry.length){re()}};const te=()=>[...q.openedRegistry];const oe=e=>{if(!q.openedRegistry.length){return}if(t.m$2(e)&&!U(e)){const t=q.openedRegistry[q.openedRegistry.length-1].instance;if(K&&t!==K.getTopmostPopup()){return}e.stopImmediatePropagation();t.closePopup(true)}};const ie=()=>{document.addEventListener("keydown",oe)};const re=()=>{document.removeEventListener("keydown",oe)};const se=()=>{let e;let t=false;for(let o=q.openedRegistry.length-1;o>=0;o--){e=q.openedRegistry[o].instance;if(!t&&e.isModal){e.isTopModalPopup=true;t=true}else{e.isTopModalPopup=false}}};o.f("@"+"ui5"+"/"+"webcomponents-theming","sap_horizon",async()=>s.defaultThemeBase);o.f("@"+"u"+"i"+"5"+"/"+"w"+"e"+"b"+"c"+"o"+"m"+"p"+"o"+"n"+"e"+"n"+"t"+"s","sap_horizon",async()=>i.defaultTheme,"host");var ne=`:host{min-width:1px;overflow:visible;border:none;inset:unset;margin:0;padding:0}:host(:focus-visible){outline:none}\n`;o.f("@"+"ui5"+"/"+"webcomponents-theming","sap_horizon",async()=>s.defaultThemeBase);o.f("@"+"u"+"i"+"5"+"/"+"w"+"e"+"b"+"c"+"o"+"m"+"p"+"o"+"n"+"e"+"n"+"t"+"s","sap_horizon",async()=>i.defaultTheme,"host");var ae=`.ui5-block-layer{position:fixed;z-index:-1;display:none;inset:-500px;outline:none;pointer-events:all}\n`;o.f("@"+"ui5"+"/"+"webcomponents-theming","sap_horizon",async()=>s.defaultThemeBase);o.f("@"+"u"+"i"+"5"+"/"+"w"+"e"+"b"+"c"+"o"+"m"+"p"+"o"+"n"+"e"+"n"+"t"+"s","sap_horizon",async()=>i.defaultTheme,"host");var he=`.ui5-popup-scroll-blocker{overflow:hidden}\n`;var le=this&&this.__decorate||function(e,t,o,i){var r=arguments.length,s=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,n;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)if(n=e[a])s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s;return r>3&&s&&Object.defineProperty(t,o,s),s};var pe;const de=()=>{if(!o.S("data-ui5-popup-scroll-blocker")){o.c$1(he,"data-ui5-popup-scroll-blocker")}};de();const ce=new Set;let ue=pe=class e extends t.S{constructor(){super();this.preventFocusRestore=false;this.accessibleRole="Dialog";this.preventInitialFocus=false;this.isTopModalPopup=false;this.onPhone=false;this.onDesktop=false;this._opened=false;this._open=false;this._resizeHandlerRegistered=false;this._resizeHandler=this._resize.bind(this);this._getRealDomRef=()=>this.shadowRoot.querySelector("[root-element]")}onBeforeRendering(){this.onPhone=o.d();this.onDesktop=o.f$1()}onAfterRendering(){o.f$2().then(()=>{this._updateMediaRange()});if(this.open){this._registerResizeHandler()}else{this._deregisterResizeHandler()}}onEnterDOM(){this.setAttribute("popover","manual");if(o.f$1()){this.setAttribute("desktop","")}this.tabIndex=-1;this.handleOpenOnEnterDOM();this.setAttribute("data-sap-ui-fastnavgroup-container","true");_.y(this,this._updateAssociatedLabelsTexts.bind(this))}handleOpenOnEnterDOM(){if(this.open){this.showPopover();this.openPopup()}}onExitDOM(){if(this._opened){pe.unblockPageScrolling(this);this._removeOpenedPopup()}this._deregisterResizeHandler();this._detachBrowserEvents();_.T(this)}set open(e){if(this._open===e){return}this._open=e;if(e){this.openPopup()}else{this.closePopup()}}get open(){return this._open}async openPopup(){if(this._opened){return}const e=!this.fireDecoratorEvent("before-open");if(e){this.open=false;return}this._attachBrowserEvents();if(this.isModal){pe.blockPageScrolling(this)}this._focusedElementBeforeOpen=S();this._show();this._opened=true;if(this.getDomRef()){this._updateMediaRange()}this._addOpenedPopup();this.open=true;await this.applyInitialFocus();await o.f$2();if(this.isConnected){this.fireDecoratorEvent("open")}}_resize(){this._updateMediaRange()}_preventBlockLayerFocus(e){e.preventDefault()}_attachBrowserEvents(){}_detachBrowserEvents(){}static blockPageScrolling(e){ce.add(e);if(ce.size!==1){return}document.documentElement.classList.add("ui5-popup-scroll-blocker")}static unblockPageScrolling(e){ce.delete(e);if(ce.size!==0){return}document.documentElement.classList.remove("ui5-popup-scroll-blocker")}_scroll(e){this.fireDecoratorEvent("scroll",{scrollTop:e.target.scrollTop,targetRef:e.target})}_onkeydown(e){const o=e.target===this._root&&t.V(e);const i=t.b(e)&&!this.open;if(o||i){e.preventDefault()}}_onfocusout(e){if(!e.relatedTarget){this._shouldFocusRoot=true}}_onmousedown(e){if(this.shadowRoot.contains(e.target)){this._shouldFocusRoot=true}else{this._shouldFocusRoot=false}}_onmouseup(){if(this._shouldFocusRoot){if(o.g()){this._root.focus()}this._shouldFocusRoot=false}}async forwardToFirst(){const e=await u.b(this);if(e){e.focus()}else{this._root.focus()}}async forwardToLast(){const e=await u.H(this);if(e){e.focus()}else{this._root.focus()}}async applyInitialFocus(){if(!this.preventInitialFocus){await this.applyFocus()}}async applyFocus(){if(this.querySelector("[autofocus]")){return}await this._waitForDomRef();if(this.getRootNode()===this){return}let e;if(this.initialFocus){e=this.getRootNode().getElementById(this.initialFocus)||document.getElementById(this.initialFocus)}e=e||await u.b(this)||this._root;if(e){if(e===this._root){e.tabIndex=-1}e.focus()}}isFocusWithin(){return N(this._root)}_updateMediaRange(){this.mediaRange=t.i$1.getCurrentRange(t.i$1.RANGESETS.RANGE_4STEPS,this.getDomRef().offsetWidth)}_updateAssociatedLabelsTexts(){this._associatedDescriptionRefTexts=_.p(this)}_addOpenedPopup(){Q(this)}closePopup(e=false,t=false,o=false){if(!this._opened){return}const i=!this.fireDecoratorEvent("before-close",{escPressed:e});if(i){this.open=true;return}this._opened=false;if(this.isModal){pe.unblockPageScrolling(this)}this.hide();this.open=false;this._detachBrowserEvents();if(!t){this._removeOpenedPopup()}if(!this.preventFocusRestore&&!o){this.resetFocus()}this.fireDecoratorEvent("close")}_removeOpenedPopup(){ee(this)}resetFocus(){this._focusedElementBeforeOpen?.focus();this._focusedElementBeforeOpen=null}_show(){if(this.isConnected){this.setAttribute("popover","manual");this.showPopover()}}_registerResizeHandler(){if(!this._resizeHandlerRegistered){t.f.register(this,this._resizeHandler);this._resizeHandlerRegistered=true}}_deregisterResizeHandler(){if(this._resizeHandlerRegistered){t.f.deregister(this,this._resizeHandler);this._resizeHandlerRegistered=false}}hide(){this.isConnected&&this.hidePopover()}get _ariaLabel(){return _.A(this)}get _accInfoAriaDescription(){return this.ariaDescriptionText||""}get ariaDescriptionText(){return this._associatedDescriptionRefTexts||_.L(this)}get ariaDescriptionTextId(){return this.ariaDescriptionText?"accessibleDescription":""}get ariaDescribedByIds(){return[this.ariaDescriptionTextId].filter(Boolean).join(" ")}get _root(){return this.shadowRoot.querySelector(".ui5-popup-root")}get _role(){return this.accessibleRole===G.None?undefined:d.n(this.accessibleRole)}get _ariaModal(){return this.accessibleRole===G.None?undefined:"true"}get contentDOM(){return this.shadowRoot.querySelector(".ui5-popup-content")}get styles(){return{root:{},content:{}}}get classes(){return{root:{"ui5-popup-root":true},content:{"ui5-popup-content":true}}}};le([t.s()],ue.prototype,"initialFocus",void 0);le([t.s({type:Boolean})],ue.prototype,"preventFocusRestore",void 0);le([t.s()],ue.prototype,"accessibleName",void 0);le([t.s()],ue.prototype,"accessibleNameRef",void 0);le([t.s()],ue.prototype,"accessibleRole",void 0);le([t.s()],ue.prototype,"accessibleDescription",void 0);le([t.s()],ue.prototype,"accessibleDescriptionRef",void 0);le([t.s({noAttribute:true})],ue.prototype,"_associatedDescriptionRefTexts",void 0);le([t.s()],ue.prototype,"mediaRange",void 0);le([t.s({type:Boolean})],ue.prototype,"preventInitialFocus",void 0);le([t.s({type:Boolean,noAttribute:true})],ue.prototype,"isTopModalPopup",void 0);le([t.d({type:HTMLElement,default:true})],ue.prototype,"content",void 0);le([t.s({type:Boolean})],ue.prototype,"onPhone",void 0);le([t.s({type:Boolean})],ue.prototype,"onDesktop",void 0);le([t.s({type:Boolean})],ue.prototype,"open",null);ue=pe=le([t.m({renderer:s.y,styles:[ne,ae],template:P}),c.l("before-open",{cancelable:true}),c.l("open"),c.l("before-close",{cancelable:true}),c.l("close"),c.l("scroll",{bubbles:true})],ue);var _e=ue;function fe(){return P.call(this,{beforeContent:ge,afterContent:me})}function ge(){return s.jsx(s.Fragment,{children:!!this._displayHeader&&s.jsx("header",{children:s.jsxs("div",{class:"ui5-popup-header-root",id:"ui5-popup-header",role:"group","aria-describedby":this.effectiveAriaDescribedBy,"aria-roledescription":this.ariaRoleDescriptionHeaderText,tabIndex:this._headerTabIndex,onKeyDown:this._onDragOrResizeKeyDown,onMouseDown:this._onDragMouseDown,part:"header",children:[this.hasValueState&&s.jsx(a.Icon,{class:"ui5-dialog-value-state-icon",name:this._dialogStateIcon}),this.header.length?s.jsx("slot",{name:"header"}):s.jsx(l.Title,{level:"H1",id:"ui5-popup-header-text",class:"ui5-popup-header-text",children:this.headerText}),this.resizable?this.draggable?s.jsx("span",{id:`${this._id}-descr`,"aria-hidden":"true",class:"ui5-hidden-text",children:this.ariaDescribedByHeaderTextDraggableAndResizable}):s.jsx("span",{id:`${this._id}-descr`,"aria-hidden":"true",class:"ui5-hidden-text",children:this.ariaDescribedByHeaderTextResizable}):this.draggable&&s.jsx("span",{id:`${this._id}-descr`,"aria-hidden":"true",class:"ui5-hidden-text",children:this.ariaDescribedByHeaderTextDraggable})]})})})}function me(){return s.jsxs(s.Fragment,{children:[!!this.footer.length&&s.jsx("footer",{class:"ui5-popup-footer-root",part:"footer",children:s.jsx("slot",{name:"footer"})}),this._showResizeHandle&&s.jsx("div",{class:"ui5-popup-resize-handle",onMouseDown:this._onResizeMouseDown,children:s.jsx(a.Icon,{name:B})})]})}o.f("@"+"ui5"+"/"+"webcomponents-theming","sap_horizon",async()=>s.defaultThemeBase);o.f("@"+"u"+"i"+"5"+"/"+"w"+"e"+"b"+"c"+"o"+"m"+"p"+"o"+"n"+"e"+"n"+"t"+"s","sap_horizon",async()=>i.defaultTheme,"host");var ve=`.ui5-hidden-text{position:absolute;clip:rect(1px,1px,1px,1px);user-select:none;left:-1000px;top:-1000px;pointer-events:none;font-size:0}:host{position:fixed;background:var(--sapGroup_ContentBackground);border-radius:var(--_ui5_popup_border_radius);min-height:2rem;box-sizing:border-box}:host([open]){display:flex}.ui5-popup-root{background:inherit;border-radius:inherit;width:100%;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;flex:1 1 auto;outline:none}.ui5-popup-root .ui5-popup-header-root{box-shadow:var(--_ui5_popup_header_shadow);border-bottom:var(--_ui5_popup_header_border)}.ui5-popup-content{color:var(--sapTextColor);flex:auto}.ui5-popup-content:focus{outline:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);outline-offset:calc(-1 * var(--sapContent_FocusWidth));border-radius:var(--_ui5_popup_border_radius)}.ui5-popup-footer-root{background:var(--sapPageFooter_Background);border-top:1px solid var(--sapPageFooter_BorderColor);color:var(--sapPageFooter_TextColor)}.ui5-popup-header-root,.ui5-popup-footer-root,:host([header-text]) .ui5-popup-header-text{margin:0;display:flex;justify-content:center;align-items:center}.ui5-popup-header-root .ui5-popup-header-text{font-weight:var(--sapFontHeaderFamily);font-size:var(--sapFontHeader5Size);color:var(--sapPageHeader_TextColor)}.ui5-popup-content{overflow:auto;box-sizing:border-box}:host([header-text]) .ui5-popup-header-text{min-height:var(--_ui5_popup_default_header_height);max-height:var(--_ui5_popup_default_header_height);line-height:var(--_ui5_popup_default_header_height);text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:100%;display:inline-flex;justify-content:var(--_ui5_popup_header_prop_header_text_alignment)}:host([header-text]) .ui5-popup-header-root{justify-content:var(--_ui5_popup_header_prop_header_text_alignment)}:host(:not([header-text])) .ui5-popup-header-text{display:none}:host([media-range="S"]) .ui5-popup-content{padding:1rem var(--_ui5_popup_content_padding_s)}:host([media-range="M"]) .ui5-popup-content,:host([media-range="L"]) .ui5-popup-content{padding:1rem var(--_ui5_popup_content_padding_m_l)}:host([media-range="XL"]) .ui5-popup-content{padding:1rem var(--_ui5_popup_content_padding_xl)}.ui5-popup-header-root{background:var(--sapPageHeader_Background)}:host([media-range="S"]) .ui5-popup-header-root,:host([media-range="S"]) .ui5-popup-footer-root{padding-left:var(--_ui5_popup_header_footer_padding_s);padding-right:var(--_ui5_popup_header_footer_padding_s)}:host([media-range="M"]) .ui5-popup-header-root,:host([media-range="L"]) .ui5-popup-header-root,:host([media-range="M"]) .ui5-popup-footer-root,:host([media-range="L"]) .ui5-popup-footer-root{padding-left:var(--_ui5_popup_header_footer_padding_m_l);padding-right:var(--_ui5_popup_header_footer_padding_m_l)}:host([media-range="XL"]) .ui5-popup-header-root,:host([media-range="XL"]) .ui5-popup-footer-root{padding-left:var(--_ui5_popup_header_footer_padding_xl);padding-right:var(--_ui5_popup_header_footer_padding_xl)}::slotted([slot="footer"]){height:var(--_ui5_popup_footer_height)}::slotted([slot="footer"][ui5-bar][design="Footer"]){border-top:none}::slotted([slot="header"][ui5-bar]){box-shadow:none}::slotted([slot="footer"][ui5-toolbar]){border:0}\n`;o.f("@"+"ui5"+"/"+"webcomponents-theming","sap_horizon",async()=>s.defaultThemeBase);o.f("@"+"u"+"i"+"5"+"/"+"w"+"e"+"b"+"c"+"o"+"m"+"p"+"o"+"n"+"e"+"n"+"t"+"s","sap_horizon",async()=>i.defaultTheme,"host");var be=`.ui5-hidden-text{position:absolute;clip:rect(1px,1px,1px,1px);user-select:none;left:-1000px;top:-1000px;pointer-events:none;font-size:0}:host{min-width:20rem;min-height:6rem;max-height:94%;max-width:90%;flex-direction:column;box-shadow:var(--sapContent_Shadow3);border-radius:var(--sapElement_BorderCornerRadius)}:host([stretch]){width:90%;height:94%}:host([stretch][on-phone]){width:100%;height:100%;max-height:100%;max-width:100%;border-radius:0;min-width:0}:host([draggable]) .ui5-popup-header-root,:host([draggable]) ::slotted([slot="header"]){cursor:move}:host([draggable]) .ui5-popup-header-root *{cursor:auto}:host([draggable]) .ui5-popup-root{user-select:text}::slotted([slot="header"]){max-width:100%}.ui5-popup-root{display:flex;flex-direction:column;max-width:100vw}.ui5-popup-header-root{position:relative}.ui5-popup-header-root:before{content:"";position:absolute;inset-block-start:auto;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;height:var(--_ui5_dialog_header_state_line_height);background:var(--sapObjectHeader_BorderColor)}:host([state="Negative"]) .ui5-popup-header-root:before{background:var(--sapErrorBorderColor)}:host([state="Information"]) .ui5-popup-header-root:before{background:var(--sapInformationBorderColor)}:host([state="Positive"]) .ui5-popup-header-root:before{background:var(--sapSuccessBorderColor)}:host([state="Critical"]) .ui5-popup-header-root:before{background:var(--sapWarningBorderColor)}.ui5-dialog-value-state-icon{margin-inline-end:.5rem;flex-shrink:0}:host([state="Negative"]) .ui5-dialog-value-state-icon{color:var(--sapNegativeElementColor)}:host([state="Information"]) .ui5-dialog-value-state-icon{color:var(--sapInformativeElementColor)}:host([state="Positive"]) .ui5-dialog-value-state-icon{color:var(--sapPositiveElementColor)}:host([state="Critical"]) .ui5-dialog-value-state-icon{color:var(--sapCriticalElementColor)}.ui5-popup-header-root{outline:none}:host([desktop]) .ui5-popup-header-root:focus:after,.ui5-popup-header-root:focus-visible:after{content:"";position:absolute;left:var(--_ui5_dialog_header_focus_left_offset);bottom:var(--_ui5_dialog_header_focus_bottom_offset);right:var(--_ui5_dialog_header_focus_right_offset);top:var(--_ui5_dialog_header_focus_top_offset);border:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);border-radius:var(--_ui5_dialog_header_border_radius) var(--_ui5_dialog_header_border_radius) 0 0;pointer-events:none}:host([stretch]) .ui5-popup-content{width:100%;height:100%}.ui5-popup-content{min-height:var(--_ui5_dialog_content_min_height);flex:1 1 auto}.ui5-popup-resize-handle{position:absolute;bottom:-.5rem;inset-inline-end:-.5rem;cursor:var(--_ui5_dialog_resize_cursor);width:1.5rem;height:1.5rem;border-radius:50%}.ui5-popup-resize-handle [ui5-icon]{color:var(--sapButton_Lite_TextColor)}:host::backdrop{background-color:var(--_ui5_popup_block_layer_background);opacity:var(--_ui5_popup_block_layer_opacity)}.ui5-block-layer{display:block}\n`;var we=this&&this.__decorate||function(e,t,o,i){var r=arguments.length,s=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,n;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)if(n=e[a])s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s;return r>3&&s&&Object.defineProperty(t,o,s),s};var Re;const ye=16;const xe={[p.o.Negative]:"error",[p.o.Critical]:"alert",[p.o.Positive]:"sys-enter-2",[p.o.Information]:"information"};let ze=Re=class e extends _e{constructor(){super();this.stretch=false;this.draggable=false;this.resizable=false;this.state="None";this._draggedOrResized=false;this._dragHandlerRegistered=false;this._revertSize=()=>{Object.assign(this.style,{top:"",left:"",width:"",height:""})};this._screenResizeHandler=this._screenResize.bind(this);this._dragMouseMoveHandler=this._onDragMouseMove.bind(this);this._dragMouseUpHandler=this._onDragMouseUp.bind(this);this._resizeMouseMoveHandler=this._onResizeMouseMove.bind(this);this._resizeMouseUpHandler=this._onResizeMouseUp.bind(this);this._dragStartHandler=this._handleDragStart.bind(this)}static _isHeader(e){return e.classList.contains("ui5-popup-header-root")||e.getAttribute("slot")==="header"}get isModal(){return true}get _ariaLabelledBy(){let e;if(this.headerText&&!this._ariaLabel){e="ui5-popup-header-text"}return e}get ariaRoleDescriptionHeaderText(){return this.resizable||this.draggable?Re.i18nBundle.getText(r.DIALOG_HEADER_ARIA_ROLE_DESCRIPTION):undefined}get effectiveAriaDescribedBy(){return this.resizable||this.draggable?`${this._id}-descr`:undefined}get ariaDescribedByHeaderTextResizable(){return Re.i18nBundle.getText(r.DIALOG_HEADER_ARIA_DESCRIBEDBY_RESIZABLE)}get ariaDescribedByHeaderTextDraggable(){return Re.i18nBundle.getText(r.DIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE)}get ariaDescribedByHeaderTextDraggableAndResizable(){return Re.i18nBundle.getText(r.DIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE)}get _displayHeader(){return this.header.length||this.headerText||this.draggable||this.resizable}get _movable(){return!this.stretch&&this.onDesktop&&(this.draggable||this.resizable)}get _headerTabIndex(){return this._movable?0:undefined}get _showResizeHandle(){return this.resizable&&this.onDesktop}get _minHeight(){let e=Number.parseInt(window.getComputedStyle(this.contentDOM).minHeight);const t=this._root.querySelector(".ui5-popup-header-root");if(t){e+=t.offsetHeight}const o=this._root.querySelector(".ui5-popup-footer-root");if(o){e+=o.offsetHeight}return e}get hasValueState(){return this.state!==p.o.None}get _dialogStateIcon(){return xe[this.state]}get _role(){if(this.accessibleRole===G.None){return undefined}if(this.state===p.o.Negative||this.state===p.o.Critical){return d.n(G.AlertDialog)}return d.n(this.accessibleRole)}_show(){super._show();this._center()}onBeforeRendering(){super.onBeforeRendering();this._isRTL=this.effectiveDir==="rtl"}_resize(){super._resize();if(!this._draggedOrResized){this._center()}}_screenResize(){this._center()}_attachBrowserEvents(){this._attachScreenResizeHandler();this._registerDragHandler()}_detachBrowserEvents(){this._detachScreenResizeHandler();this._deregisterDragHandler()}_attachScreenResizeHandler(){if(!this._screenResizeHandlerAttached){window.addEventListener("resize",this._screenResizeHandler);this._screenResizeHandlerAttached=true}}_detachScreenResizeHandler(){if(this._screenResizeHandlerAttached){window.removeEventListener("resize",this._screenResizeHandler);this._screenResizeHandlerAttached=false}}_registerDragHandler(){if(!this._dragHandlerRegistered){this.addEventListener("dragstart",this._dragStartHandler);this._dragHandlerRegistered=true}}_deregisterDragHandler(){if(this._dragHandlerRegistered){this.removeEventListener("dragstart",this._dragStartHandler);this._dragHandlerRegistered=false}}_center(){const e=window.innerHeight-this.offsetHeight,t=window.innerWidth-this.offsetWidth;Object.assign(this.style,{top:`${Math.round(e/2)}px`,left:`${Math.round(t/2)}px`})}_onDragMouseDown(e){if(!this._movable||!this.draggable||!Re._isHeader(e.target)){return}const{top:t,left:o}=this.getBoundingClientRect();const{width:i,height:r}=window.getComputedStyle(this);Object.assign(this.style,{top:`${t}px`,left:`${o}px`,width:`${Math.round(Number.parseFloat(i)*100)/100}px`,height:`${Math.round(Number.parseFloat(r)*100)/100}px`});this._x=e.clientX;this._y=e.clientY;this._draggedOrResized=true;this._attachMouseDragHandlers()}_onDragMouseMove(e){e.preventDefault();const{clientX:t,clientY:o}=e;const i=this._x-t;const r=this._y-o;const{left:s,top:n}=this.getBoundingClientRect();Object.assign(this.style,{left:`${Math.floor(s-i)}px`,top:`${Math.floor(n-r)}px`});this._x=t;this._y=o}_onDragMouseUp(){delete this._x;delete this._y;this._detachMouseDragHandlers()}_onDragOrResizeKeyDown(e){if(!this._movable||!Re._isHeader(e.target)){return}if(this.draggable&&[t.P,t._,t.D,t.R].some(t=>t(e))){this._dragWithEvent(e);return}if(this.resizable&&[t.O,t.N,t.h,t.I].some(t=>t(e))){this._resizeWithEvent(e)}}_dragWithEvent(e){const{top:o,left:i,width:r,height:s}=this.getBoundingClientRect();let n=0;let a="top";switch(true){case t.P(e):n=o-ye;a="top";break;case t._(e):n=o+ye;a="top";break;case t.D(e):n=i-ye;a="left";break;case t.R(e):n=i+ye;a="left";break}n=k(n,0,a==="left"?window.innerWidth-r:window.innerHeight-s);this.style[a]=`${n}px`}_resizeWithEvent(e){this._draggedOrResized=true;this.addEventListener("ui5-before-close",this._revertSize,{once:true});const{top:o,left:i}=this.getBoundingClientRect(),r=window.getComputedStyle(this),s=Number.parseFloat(r.minWidth),n=window.innerWidth-i,a=window.innerHeight-o;let h=Number.parseFloat(r.width),l=Number.parseFloat(r.height);switch(true){case t.O(e):l-=ye;break;case t.N(e):l+=ye;break;case t.h(e):h-=ye;break;case t.I(e):h+=ye;break}h=k(h,s,n);l=k(l,this._minHeight,a);Object.assign(this.style,{width:`${h}px`,height:`${l}px`})}_attachMouseDragHandlers(){window.addEventListener("mousemove",this._dragMouseMoveHandler);window.addEventListener("mouseup",this._dragMouseUpHandler)}_detachMouseDragHandlers(){window.removeEventListener("mousemove",this._dragMouseMoveHandler);window.removeEventListener("mouseup",this._dragMouseUpHandler)}_onResizeMouseDown(e){if(!this._movable||!this.resizable){return}e.preventDefault();const{top:t,left:o}=this.getBoundingClientRect();const{width:i,height:r,minWidth:s}=window.getComputedStyle(this);this._initialX=e.clientX;this._initialY=e.clientY;this._initialWidth=Number.parseFloat(i);this._initialHeight=Number.parseFloat(r);this._initialTop=t;this._initialLeft=o;this._minWidth=Number.parseFloat(s);this._cachedMinHeight=this._minHeight;Object.assign(this.style,{top:`${t}px`,left:`${o}px`});this._draggedOrResized=true;this._attachMouseResizeHandlers()}_onResizeMouseMove(e){const{clientX:t,clientY:o}=e;let i,r;if(this._isRTL){i=k(this._initialWidth-(t-this._initialX),this._minWidth,this._initialLeft+this._initialWidth);Object.assign(this.style,{width:`${i}px`});const e=i-this.getBoundingClientRect().width;const o=this._initialLeft+this._initialWidth+e;r=k(o-i,0,o-this._minWidth)}else{i=k(this._initialWidth+(t-this._initialX),this._minWidth,window.innerWidth-this._initialLeft)}const s=k(this._initialHeight+(o-this._initialY),this._cachedMinHeight,window.innerHeight-this._initialTop);Object.assign(this.style,{height:`${s}px`,width:`${i}px`,left:this._isRTL?`${r}px`:undefined})}_onResizeMouseUp(){delete this._initialX;delete this._initialY;delete this._initialWidth;delete this._initialHeight;delete this._initialTop;delete this._initialLeft;delete this._minWidth;delete this._cachedMinHeight;this._detachMouseResizeHandlers()}_handleDragStart(e){if(this.draggable){e.preventDefault()}}_attachMouseResizeHandlers(){window.addEventListener("mousemove",this._resizeMouseMoveHandler);window.addEventListener("mouseup",this._resizeMouseUpHandler);this.addEventListener("ui5-before-close",this._revertSize,{once:true})}_detachMouseResizeHandlers(){window.removeEventListener("mousemove",this._resizeMouseMoveHandler);window.removeEventListener("mouseup",this._resizeMouseUpHandler)}};we([t.s()],ze.prototype,"headerText",void 0);we([t.s({type:Boolean})],ze.prototype,"stretch",void 0);we([t.s({type:Boolean})],ze.prototype,"draggable",void 0);we([t.s({type:Boolean})],ze.prototype,"resizable",void 0);we([t.s()],ze.prototype,"state",void 0);we([t.d()],ze.prototype,"header",void 0);we([t.d()],ze.prototype,"footer",void 0);we([i.i("@ui5/webcomponents")],ze,"i18nBundle",void 0);ze=Re=we([t.m({tag:"ui5-dialog",template:fe,styles:[_e.styles,ve,be]})],ze);ze.define();var Te=ze;function De(){if(!this._isPhone){return C.call(this)}return s.jsxs(Te,{"root-element":true,accessibleName:this.accessibleName,accessibleNameRef:this.accessibleNameRef,accessibleDescription:this.accessibleDescription,accessibleDescriptionRef:this.accessibleDescriptionRef,accessibleRole:this.accessibleRole,stretch:true,preventInitialFocus:this.preventInitialFocus,preventFocusRestore:this.preventFocusRestore,initialFocus:this.initialFocus,onBeforeOpen:this._beforeDialogOpen,onOpen:this._afterDialogOpen,onBeforeClose:this._beforeDialogClose,onClose:this._afterDialogClose,exportparts:"content, header, footer",open:this.open,children:[!this._hideHeader&&s.jsx(s.Fragment,{children:this.header.length?s.jsx("slot",{slot:"header",name:"header"}):s.jsxs("div",{class:this.classes.header,slot:"header",children:[this.headerText&&s.jsx(l.Title,{level:"H1",wrappingType:"None",class:"ui5-popup-header-text ui5-responsive-popover-header-text",children:this.headerText}),!this._hideCloseButton&&s.jsx(f.Button,{icon:n.decline,design:"Transparent",accessibleName:this._closeDialogAriaLabel,onClick:this._dialogCloseButtonClick})]})}),s.jsx("slot",{}),s.jsx("slot",{slot:"footer",name:"footer"})]})}var He;(function(e){e["Center"]="Center";e["Top"]="Top";e["Bottom"]="Bottom";e["Stretch"]="Stretch"})(He||(He={}));var Me=He;var Be;(function(e){e["Center"]="Center";e["Start"]="Start";e["End"]="End";e["Stretch"]="Stretch"})(Be||(Be={}));var Ee=Be;const Pe=e=>e.parentElement?e.parentElement:e.parentNode.host;let Oe;const Le=300;const Ce=[];const Ae=()=>{Ce.forEach(e=>{e.instance.reposition()})};const Ie=()=>{let e=t.t();if(e.tagName==="IFRAME"){Ue().reverse().forEach(t=>{const o=t.instance;const i=o.getOpenerHTMLElement(o.opener);while(e){if(e===i){return}e=Pe(e)}o.closePopup(false,false,true)})}};const ke=()=>{Oe=setInterval(()=>{Ae();Ie()},Le)};const Se=()=>{clearInterval(Oe)};const Ne=()=>{document.addEventListener("scroll",Ae,{capture:true})};const Fe=()=>{document.removeEventListener("scroll",Ae,{capture:true})};const je=e=>{e&&e.shadowRoot.addEventListener("scroll",Ae,{capture:true})};const We=e=>{e&&e.shadowRoot.removeEventListener("scroll",Ae,{capture:true})};const $e=()=>{document.addEventListener("mousedown",Xe,{capture:true})};const Ve=()=>{document.removeEventListener("mousedown",Xe,{capture:true})};const Xe=e=>{const t=te();if(t.length===0){return}const o=nt(t[t.length-1].instance);if(!o){return}for(let o=t.length-1;o!==-1;o--){const i=t[o].instance;if(!nt(i)){return}if(i.isModal||i.isOpenerClicked(e)){return}if(i.isClicked(e)){return}i.closePopup()}};const Ge=e=>{const t=qe(e);Q(e,t);Ce.push({instance:e,parentPopovers:t});je(e);if(Ce.length===1){Ne();$e();ke()}};const Ye=e=>{const t=[e];for(let o=0;o<Ce.length;o++){const i=Ce[o].parentPopovers.indexOf(e);if(Ce[o].parentPopovers.length>0&&i>-1){t.push(Ce[o].instance)}}for(let e=t.length-1;e>=0;e--){for(let o=0;o<Ce.length;o++){let i=-1;if(t[e]===Ce[o].instance){i=o}if(i>=0){ee(Ce[i].instance);We(Ce[i].instance);const e=Ce.splice(i,1);e[0].instance.closePopup(false,true)}}}if(!Ce.length){Fe();Ve();Se()}};const Ue=()=>Ce;const qe=e=>{let t=e.parentNode;const o=[];while(t&&t.parentNode){for(let e=0;e<Ce.length;e++){if(t===Ce[e].instance){o.push(t)}}t=t.parentNode}return o};var Ke;(function(e){e["TopLeft"]="TopLeft";e["TopRight"]="TopRight";e["BottomLeft"]="BottomLeft";e["BottomRight"]="BottomRight"})(Ke||(Ke={}));class Ze{constructor(e){this._resized=false;this._popover=e;this._resizeMouseMoveHandler=this._onResizeMouseMove.bind(this);this._resizeMouseUpHandler=this._onResizeMouseUp.bind(this)}reset(){if(!this._resized){return}this._resized=false;delete this._currentDeltaX;delete this._currentDeltaY;delete this._totalDeltaX;delete this._totalDeltaY}get isResized(){return this._resized}getCorrectedLeft(e){if(this.isResized){e-=this._currentDeltaX||0}return e}getCorrectedTop(e){if(this.isResized){e-=this._currentDeltaY||0}return e}setCorrectResizeHandleClass(e){switch(this.getResizeHandlePlacement()){case Ke.BottomLeft:e.root["ui5-popover-resize-handle-bottom-left"]=true;break;case Ke.BottomRight:e.root["ui5-popover-resize-handle-bottom-right"]=true;break;case Ke.TopLeft:e.root["ui5-popover-resize-handle-top-left"]=true;break;case Ke.TopRight:e.root["ui5-popover-resize-handle-top-right"]=true;break}}getResizeHandlePlacement(){const e=this._popover;if(this._resized&&e.resizeHandlePlacement){return e.resizeHandlePlacement}const t=e.getOpenerHTMLElement(e.opener);if(!t){return undefined}const o=2;const i=e.isRtl;const r=t.getBoundingClientRect();const s=e.getBoundingClientRect();let n=Math.floor(r.x+r.width/2);const a=Math.floor(r.y+r.height/2);let h=Math.floor(s.x+s.width/2);const l=Math.floor(s.y+s.height/2);const p=e.verticalAlign;const d=e._actualHorizontalAlign;const c=s.width>r.width;const u=s.height>r.height;if(i){n=-n;h=-h}switch(e.getActualPlacement(r)){case it.Left:if(u){if(l>a+o){return Ke.BottomLeft}return Ke.TopLeft}if(p===Me.Top){return Ke.BottomLeft}return Ke.TopLeft;case it.Right:if(u){if(l+o<a){return Ke.TopRight}return Ke.BottomRight}if(p===Me.Bottom){return Ke.TopRight}return Ke.BottomRight;case it.Bottom:if(c){if(h+o<n){return i?Ke.BottomRight:Ke.BottomLeft}return i?Ke.BottomLeft:Ke.BottomRight}if(i){if(d===ot.Left){return Ke.BottomRight}return Ke.BottomLeft}if(d===ot.Right){return Ke.BottomLeft}return Ke.BottomRight;case it.Top:default:if(c){if(h+o<n){return i?Ke.TopRight:Ke.TopLeft}return i?Ke.TopLeft:Ke.TopRight}if(i){if(d===ot.Left){return Ke.TopRight}return Ke.TopLeft}if(d===ot.Right){return Ke.TopLeft}return Ke.TopRight}}onResizeMouseDown(e){if(!this._popover.resizable){return}e.preventDefault();this._resized=true;this._initialBoundingRect=this._popover.getBoundingClientRect();this._totalDeltaX=this._currentDeltaX;this._totalDeltaY=this._currentDeltaY;const{minWidth:t,minHeight:o}=window.getComputedStyle(this._popover);const i=window.getComputedStyle(this._popover._getRealDomRef());this._initialClientX=e.clientX;this._initialClientY=e.clientY;this._minWidth=Math.max(Number.parseFloat(t),Number.parseFloat(i.minWidth));this._minHeight=Number.parseFloat(o);this._attachMouseResizeHandlers()}_onResizeMouseMove(e){const t=this._popover;const o=t._viewportMargin;const{clientX:i,clientY:r}=e;const s=this.getResizeHandlePlacement();const n=this._initialBoundingRect;const a=i-this._initialClientX;const h=r-this._initialClientY;let l,p;const d=s===Ke.TopLeft||s===Ke.BottomLeft;const c=s===Ke.TopLeft||s===Ke.TopRight;if(d){const e=n.x+n.width-o;l=k(n.width-a,this._minWidth,e);const t=k(n.x+a,o,n.x+n.width-this._minWidth);l=Math.min(l,n.x+n.width-t);this._currentDeltaX=(n.x-t)/2}else{const e=window.innerWidth-n.x-o;l=k(n.width+a,this._minWidth,e);this._currentDeltaX=(n.width-l)/2}if(c){const e=n.y+n.height-o;p=k(n.height-h,this._minHeight,e);const t=k(n.y+h,o,n.y+n.height-this._minHeight);p=Math.min(p,n.y+n.height-t);this._currentDeltaY=(n.y-t)/2}else{const e=window.innerHeight-n.y-o;p=k(n.height+h,this._minHeight,e);this._currentDeltaY=(n.height-p)/2}this._currentDeltaX+=this._totalDeltaX||0;this._currentDeltaY+=this._totalDeltaY||0;const u=this._popover.calcPlacement(this._popover._openerRect,{width:l,height:p});this._popover.arrowTranslateX=u.arrow.x;this._popover.arrowTranslateY=u.arrow.y;Object.assign(this._popover.style,{left:`${u.left}px`,top:`${u.top}px`,height:`${p}px`,width:`${l}px`})}_onResizeMouseUp(){delete this._initialClientX;delete this._initialClientY;delete this._initialBoundingRect;delete this._minWidth;delete this._minHeight;this._detachMouseResizeHandlers()}_attachMouseResizeHandlers(){window.addEventListener("mousemove",this._resizeMouseMoveHandler);window.addEventListener("mouseup",this._resizeMouseUpHandler)}_detachMouseResizeHandlers(){window.removeEventListener("mousemove",this._resizeMouseMoveHandler);window.removeEventListener("mouseup",this._resizeMouseUpHandler)}}o.f("@"+"ui5"+"/"+"webcomponents-theming","sap_horizon",async()=>s.defaultThemeBase);o.f("@"+"u"+"i"+"5"+"/"+"w"+"e"+"b"+"c"+"o"+"m"+"p"+"o"+"n"+"e"+"n"+"t"+"s","sap_horizon",async()=>i.defaultTheme,"host");var Je=`:host{box-shadow:var(--_ui5_popover_box_shadow);background-color:var(--_ui5_popover_background);max-width:calc(100vw - (100vw - 100%) - 2 * var(--_ui5_popup_viewport_margin))}:host([hide-arrow]){box-shadow:var(--_ui5_popover_no_arrow_box_shadow)}:host([actual-placement="Bottom"]) .ui5-popover-arrow{left:calc(50% - .5625rem);top:-.5rem;height:.5rem}:host([actual-placement="Bottom"]) .ui5-popover-arrow:after{margin:var(--_ui5_popover_upward_arrow_margin)}:host([actual-placement="Left"]) .ui5-popover-arrow{top:calc(50% - .5625rem);right:-.5625rem;width:.5625rem}:host([actual-placement="Left"]) .ui5-popover-arrow:after{margin:var(--_ui5_popover_right_arrow_margin)}:host([actual-placement="Top"]) .ui5-popover-arrow{left:calc(50% - .5625rem);height:.5625rem;top:100%}:host([actual-placement="Top"]) .ui5-popover-arrow:after{margin:var(--_ui5_popover_downward_arrow_margin)}:host(:not([actual-placement])) .ui5-popover-arrow,:host([actual-placement="Right"]) .ui5-popover-arrow{left:-.5625rem;top:calc(50% - .5625rem);width:.5625rem;height:1rem}:host(:not([actual-placement])) .ui5-popover-arrow:after,:host([actual-placement="Right"]) .ui5-popover-arrow:after{margin:var(--_ui5_popover_left_arrow_margin)}:host([hide-arrow]) .ui5-popover-arrow{display:none}.ui5-popover-root{min-width:6.25rem}.ui5-popover-arrow{pointer-events:none;display:block;width:1rem;height:1rem;position:absolute;overflow:hidden}.ui5-popover-arrow:after{content:"";display:block;width:.7rem;height:.7rem;background-color:var(--_ui5_popover_background);box-shadow:var(--_ui5_popover_box_shadow);transform:rotate(-45deg)}:host([modal])::backdrop{background-color:var(--_ui5_popup_block_layer_background);opacity:var(--_ui5_popup_block_layer_opacity)}:host([modal]) .ui5-block-layer{display:block}.ui5-popover-resize-handle{position:absolute;width:1.5rem;height:1.5rem;border-radius:50%;z-index:1}.ui5-popover-resize-handle [ui5-icon]{position:absolute;width:1rem;height:1rem;cursor:inherit;color:var(--sapButton_Lite_TextColor);--rotAngle: 0;--scaleX: 1;transform:rotate(var(--rotAngle)) scaleX(var(--scaleX))}.ui5-popover-rtl .ui5-popover-resize-handle [ui5-icon]{--scaleX: -1}.ui5-popover-resize-handle-top-right .ui5-popover-resize-handle{top:-.5rem;right:-.5rem;cursor:ne-resize}.ui5-popover-resize-handle-top-right .ui5-popover-resize-handle [ui5-icon]{bottom:0;left:0;--rotAngle: 270deg}.ui5-popover-resize-handle-top-left .ui5-popover-resize-handle{top:-.5rem;left:-.5rem;cursor:nw-resize}.ui5-popover-resize-handle-top-left .ui5-popover-resize-handle [ui5-icon]{bottom:0;right:0;--rotAngle: 180deg}.ui5-popover-resize-handle-bottom-left .ui5-popover-resize-handle{bottom:-.5rem;left:-.5rem;cursor:ne-resize}.ui5-popover-resize-handle-bottom-left .ui5-popover-resize-handle [ui5-icon]{top:0;right:0;--rotAngle: 90deg}.ui5-popover-resize-handle-bottom-right .ui5-popover-resize-handle{bottom:-.5rem;right:-.5rem;cursor:nw-resize}.ui5-popover-resize-handle-bottom-right .ui5-popover-resize-handle [ui5-icon]{top:0;left:0}.ui5-popover-resizing,.ui5-popover-resizing *{user-select:none!important}\n`;var Qe=this&&this.__decorate||function(e,t,o,i){var r=arguments.length,s=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,n;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)if(n=e[a])s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s;return r>3&&s&&Object.defineProperty(t,o,s),s};var et;const tt=8;var ot;(function(e){e["Center"]="Center";e["Left"]="Left";e["Right"]="Right";e["Stretch"]="Stretch"})(ot||(ot={}));var it;(function(e){e["Left"]="Left";e["Right"]="Right";e["Top"]="Top";e["Bottom"]="Bottom"})(it||(it={}));let rt=et=class e extends _e{static get VIEWPORT_MARGIN(){return 10}constructor(){super();this.placement="End";this.horizontalAlign="Center";this.verticalAlign="Center";this.modal=false;this.hideArrow=false;this.allowTargetOverlap=false;this.resizable=false;this.arrowTranslateX=0;this.arrowTranslateY=0;this.actualPlacement="Right";this.isPopover=true;this._popoverResize=new Ze(this)}set opener(e){if(this._opener===e){return}this._opener=e;if(e&&this.open){this.openPopup()}}get opener(){return this._opener}async openPopup(){if(this._opened){return}const e=this.getOpenerHTMLElement(this.opener);if(!e){return}if(!e||this.isOpenerOutsideViewport(e.getBoundingClientRect())){await o.f$2();this.open=false;this.fireDecoratorEvent("close");return}this._initialWidth=this.style.width;this._initialHeight=this.style.height;this._openerRect=e.getBoundingClientRect();await super.openPopup()}closePopup(e=false,t=false,o=false){Object.assign(this.style,{width:this._initialWidth,height:this._initialHeight});this._popoverResize.reset();delete this._resizeHandlePlacement;super.closePopup(e,t,o)}isOpenerClicked(e){const t=e.target;const o=this.getOpenerHTMLElement(this.opener);if(!o){return false}if(t===o){return true}if(this._isUI5AbstractElement(t)&&t.getFocusDomRef()===o){return true}return e.composedPath().indexOf(o)>-1}isClicked(e){if(this._showResizeHandle){const t=this.shadowRoot.querySelector(".ui5-popover-resize-handle");if(t===e.composedPath()[0]){return true}}return W(e,this.getBoundingClientRect())}_addOpenedPopup(){Ge(this)}_removeOpenedPopup(){Ye(this)}getOpenerHTMLElement(e){if(e===undefined||e===null){return e}if(e instanceof HTMLElement){return this._isUI5AbstractElement(e)?e.getFocusDomRef():e}let t=this.getRootNode();if(t===this){t=document}let o=t.getElementById(e);if(t instanceof ShadowRoot&&!o){o=document.getElementById(e)}if(o){return this._isUI5AbstractElement(o)?o.getFocusDomRef():o}return o}shouldCloseDueToOverflow(e,t){const o=32;const i={Left:t.right,Right:t.left,Top:t.top,Bottom:t.bottom};const r=this.getOpenerHTMLElement(this.opener);const s=V(r);let n=false;let a=false;if(s instanceof et){const e=s.getBoundingClientRect();n=t.top>e.top+e.height;a=t.top+t.height<e.top}return i[e]<0||i[e]+o>s.innerHeight||n||a}shouldCloseDueToNoOpener(e){return e.top===0&&e.bottom===0&&e.left===0&&e.right===0}isOpenerOutsideViewport(e){return e.bottom<0||e.top>window.innerHeight||e.right<0||e.left>window.innerWidth}_resize(){super._resize();if(this.open){this.reposition()}}get _viewportMargin(){return et.VIEWPORT_MARGIN}reposition(){this._show();if(this.resizable){this._resizeHandlePlacement=this._popoverResize.getResizeHandlePlacement()}}async _show(){super._show();const e=this.getOpenerHTMLElement(this.opener);if(!e){Object.assign(this.style,{top:`0px`,left:`0px`});return}if(e&&t.y(e)&&!e.getDomRef()){return}if(!this._opened){this._showOutsideViewport()}const o=this.getPopoverSize();let i;if(o.width===0||o.height===0){return}if(this.open){this._openerRect=e.getBoundingClientRect()}if(this._oldPlacement&&this.shouldCloseDueToNoOpener(this._openerRect)&&this.isFocusWithin()){i=this._oldPlacement}else{i=this.calcPlacement(this._openerRect,o)}if(this._preventRepositionAndClose||this.isOpenerOutsideViewport(this._openerRect)){await this._waitForDomRef();return this.closePopup()}this._oldPlacement=i;this.actualPlacement=i.actualPlacement;let r=k(this._left,et.VIEWPORT_MARGIN,document.documentElement.clientWidth-o.width-et.VIEWPORT_MARGIN);if(this.actualPlacement===it.Right){r=Math.max(r,this._left)}let s=k(this._top,et.VIEWPORT_MARGIN,document.documentElement.clientHeight-o.height-et.VIEWPORT_MARGIN);if(this.actualPlacement===it.Bottom){s=Math.max(s,this._top)}this.arrowTranslateX=i.arrow.x;this.arrowTranslateY=i.arrow.y;s=this._adjustForIOSKeyboard(s);Object.assign(this.style,{top:`${s}px`,left:`${r}px`});if(this._popoverResize.isResized){return}if(this.horizontalAlign===Ee.Stretch&&this._width){this.style.width=this._width}if(this.verticalAlign===Me.Stretch&&this._height){this.style.height=this._height}}_adjustForIOSKeyboard(e){if(!o.w()){return e}const t=Math.ceil(this.getBoundingClientRect().top);return e+(Number.parseInt(this.style.top||"0")-t)}getPopoverSize(e=false){const t=this.getBoundingClientRect();const o=t.width;let i;const r=this.getDomRef();if(e&&r){const e=r.querySelector(".ui5-popup-header-root");const t=r.querySelector(".ui5-popup-content");const o=r.querySelector(".ui5-popup-footer-root");i=t?.scrollHeight||0;i+=e?.scrollHeight||0;i+=o?.scrollHeight||0}else{i=t.height}return{width:o,height:i}}_showOutsideViewport(){Object.assign(this.style,{top:"-10000px",left:"-10000px"})}_isUI5AbstractElement(e){return t.y(e)&&e.isUI5AbstractElement}get arrowDOM(){return this.shadowRoot.querySelector(".ui5-popover-arrow")}focusOpener(){this.getOpenerHTMLElement(this.opener)?.focus()}calcPlacement(e,t){let o=et.VIEWPORT_MARGIN;let i=0;const r=this.allowTargetOverlap;const s=document.documentElement.clientWidth;const n=document.documentElement.clientHeight;let a=n;let h=s;const l=this.getActualPlacement(e);this._preventRepositionAndClose=this.shouldCloseDueToNoOpener(e)||this.shouldCloseDueToOverflow(l,e);const p=l===it.Top||l===it.Bottom;if(!this._popoverResize.isResized){if(this.horizontalAlign===Ee.Stretch&&p){t.width=e.width;this._width=`${e.width}px`}else if(this.verticalAlign===Me.Stretch&&!p){t.height=e.height;this._height=`${e.height}px`}}const d=this.hideArrow?0:tt;switch(l){case it.Top:o=this.getVerticalLeft(e,t);i=Math.max(e.top-t.height-d,0);if(!r){a=e.top-d}break;case it.Bottom:o=this.getVerticalLeft(e,t);i=e.bottom+d;if(r){i=Math.max(Math.min(i,n-t.height),0)}else{a=n-e.bottom-d}break;case it.Left:o=Math.max(e.left-t.width-d,0);i=this.getHorizontalTop(e,t);if(!r){h=e.left-d}break;case it.Right:o=e.left+e.width+d;i=this.getHorizontalTop(e,t);if(r){o=Math.max(Math.min(o,s-t.width),0)}else{h=s-e.right-d}break}if(p){if(t.width>s||o<et.VIEWPORT_MARGIN){o=et.VIEWPORT_MARGIN}else if(o+t.width>s-et.VIEWPORT_MARGIN){o=s-et.VIEWPORT_MARGIN-t.width}}else{if(t.height>n||i<et.VIEWPORT_MARGIN){i=et.VIEWPORT_MARGIN}else if(i+t.height>n-et.VIEWPORT_MARGIN){i=n-et.VIEWPORT_MARGIN-t.height}}this._maxHeight=Math.round(a-et.VIEWPORT_MARGIN);this._maxWidth=Math.round(h-et.VIEWPORT_MARGIN);if(this._left===undefined||Math.abs(this._left-o)>1.5){this._left=Math.round(o)}if(this._top===undefined||Math.abs(this._top-i)>1.5){this._top=Math.round(i)}const c=Number.parseInt(window.getComputedStyle(this).getPropertyValue("border-radius"));const u=this.getArrowPosition(e,t,o,i,p,c);this._left+=this.getRTLCorrectionLeft();return{arrow:u,top:this._top,left:this._left,actualPlacement:l}}get isVertical(){return this.placement===v.Top||this.placement===v.Bottom}getRTLCorrectionLeft(){return parseFloat(window.getComputedStyle(this).left)-this.getBoundingClientRect().left}getArrowPosition(e,t,o,i,r,s){const n=this._actualHorizontalAlign;let a=n===ot.Center||n===ot.Stretch;if(n===ot.Right&&o<=e.left){a=true}if(n===ot.Left&&o+t.width>=e.left+e.width){a=true}let h=0;if(r&&a){h=e.left+e.width/2-o-t.width/2}let l=0;if(!r){l=e.top+e.height/2-i-t.height/2}const p=t.height/2-s-tt/2-2;l=k(l,-p,p);const d=t.width/2-s-tt/2-2;h=k(h,-d,d);return{x:Math.round(h),y:Math.round(l)}}fallbackPlacement(e,t,o,i){if(o.left>i.width){return it.Left}if(e-o.right>o.left){return it.Right}if(t-o.bottom>i.height){return it.Bottom}if(t-o.bottom<o.top){return it.Top}}getActualPlacement(e){const t=this.placement;const o=this.getPopoverSize(!this.allowTargetOverlap);let i=it.Right;switch(t){case v.Start:i=this.isRtl?it.Right:it.Left;break;case v.End:i=this.isRtl?it.Left:it.Right;break;case v.Top:i=it.Top;break;case v.Bottom:i=it.Bottom;break}const r=document.documentElement.clientWidth;let s=document.documentElement.clientHeight;let n=o.height;if(this.isVertical){n+=this.hideArrow?0:tt;s-=et.VIEWPORT_MARGIN}switch(i){case it.Top:if(e.top<n&&e.top<s-e.bottom){i=it.Bottom}break;case it.Bottom:if(s-e.bottom<n&&s-e.bottom<e.top){i=it.Top}break;case it.Left:if(e.left<o.width){i=this.fallbackPlacement(r,s,e,o)||i}break;case it.Right:if(r-e.right<o.width){i=this.fallbackPlacement(r,s,e,o)||i}break}return i}getVerticalLeft(e,t){const o=this._actualHorizontalAlign;let i=et.VIEWPORT_MARGIN;switch(o){case ot.Center:case ot.Stretch:i=e.left-(t.width-e.width)/2;i=this._popoverResize.getCorrectedLeft(i);break;case ot.Left:i=e.left;break;case ot.Right:i=e.right-t.width;break}return i}getHorizontalTop(e,t){let o=0;switch(this.verticalAlign){case Me.Center:case Me.Stretch:o=e.top-(t.height-e.height)/2;o=this._popoverResize.getCorrectedTop(o);break;case Me.Top:o=e.top;break;case Me.Bottom:o=e.bottom-t.height;break}return o}get isModal(){return this.modal}get _ariaLabelledBy(){if(!this._ariaLabel&&this._displayHeader){return"ui5-popup-header"}return undefined}get styles(){return{...super.styles,root:{"max-height":this._maxHeight?`${this._maxHeight}px`:"","max-width":this._maxWidth?`${this._maxWidth}px`:""},arrow:{transform:`translate(${this.arrowTranslateX}px, ${this.arrowTranslateY}px)`}}}get classes(){const e=super.classes;e.root["ui5-popover-root"]=true;e.root["ui5-popover-rtl"]=this.isRtl;if(this.resizable){this._popoverResize.setCorrectResizeHandleClass(e)}return e}get _displayHeader(){return!!(this.header.length||this.headerText)}get _displayFooter(){return true}get isRtl(){return this.effectiveDir==="rtl"}get _actualHorizontalAlign(){switch(this.horizontalAlign){case Ee.Start:return this.isRtl?ot.Right:ot.Left;case Ee.End:return this.isRtl?ot.Left:ot.Right;case Ee.Stretch:return ot.Stretch;case Ee.Center:default:return ot.Center}}get _showResizeHandle(){return this.resizable&&this.onDesktop}get resizeHandlePlacement(){return this._resizeHandlePlacement}_onResizeMouseDown(e){this._popoverResize.onResizeMouseDown(e);this._resizeHandlePlacement=this._popoverResize.getResizeHandlePlacement()}};Qe([t.s()],rt.prototype,"headerText",void 0);Qe([t.s()],rt.prototype,"placement",void 0);Qe([t.s()],rt.prototype,"horizontalAlign",void 0);Qe([t.s()],rt.prototype,"verticalAlign",void 0);Qe([t.s({type:Boolean})],rt.prototype,"modal",void 0);Qe([t.s({type:Boolean})],rt.prototype,"hideArrow",void 0);Qe([t.s({type:Boolean})],rt.prototype,"allowTargetOverlap",void 0);Qe([t.s({type:Boolean})],rt.prototype,"resizable",void 0);Qe([t.s({type:Number,noAttribute:true})],rt.prototype,"arrowTranslateX",void 0);Qe([t.s({type:Number,noAttribute:true})],rt.prototype,"arrowTranslateY",void 0);Qe([t.s()],rt.prototype,"actualPlacement",void 0);Qe([t.s({type:Number,noAttribute:true})],rt.prototype,"_maxHeight",void 0);Qe([t.s({type:Number,noAttribute:true})],rt.prototype,"_maxWidth",void 0);Qe([t.s({noAttribute:true})],rt.prototype,"_resizeHandlePlacement",void 0);Qe([t.d()],rt.prototype,"header",void 0);Qe([t.d()],rt.prototype,"footer",void 0);Qe([t.s({converter:g})],rt.prototype,"opener",null);rt=et=Qe([t.m({tag:"ui5-popover",styles:[_e.styles,ve,Je],template:C})],rt);rt.define();var st=rt;const nt=t.r$1("isPopover");o.f("@"+"ui5"+"/"+"webcomponents-theming","sap_horizon",async()=>s.defaultThemeBase);o.f("@"+"u"+"i"+"5"+"/"+"w"+"e"+"b"+"c"+"o"+"m"+"p"+"o"+"n"+"e"+"n"+"t"+"s","sap_horizon",async()=>i.defaultTheme,"host");var at=`:host{min-width:6.25rem;min-height:2rem}:host([on-phone]){display:contents}.ui5-responsive-popover-header{height:var(--_ui5-responsive_popover_header_height);display:flex;justify-content:var(--_ui5_popup_header_prop_header_text_alignment);align-items:center;width:100%}.ui5-responsive-popover-header-text{width:calc(100% - var(--_ui5_button_base_min_width))}.ui5-responsive-popover-header-no-title{justify-content:flex-end}\n`;var ht=this&&this.__decorate||function(e,t,o,i){var r=arguments.length,s=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,o):i,n;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)if(n=e[a])s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s;return r>3&&s&&Object.defineProperty(t,o,s),s};var lt;let pt=lt=class e extends st{constructor(){super();this.contentOnlyOnDesktop=false;this._hideHeader=false;this._hideCloseButton=false}async openPopup(){if(!o.d()){await super.openPopup()}else if(this._dialog){this._dialog.open=true}}async _show(){if(!o.d()){return super._show()}}handleOpenOnEnterDOM(){if(this.open&&!o.d()){this.showPopover();this.openPopup()}}_dialogCloseButtonClick(){this.closePopup()}closePopup(e=false,t=false,i=false){if(!o.d()){super.closePopup(e,t,i)}else{this._dialog?.closePopup(e,t,i)}}toggle(e){if(this.open){this.closePopup();return}this.opener=e;this.open=true}get classes(){const e=super.classes;e.header={"ui5-responsive-popover-header":true,"ui5-responsive-popover-header-no-title":!this.headerText};return e}get _dialog(){return this.shadowRoot.querySelector("[ui5-dialog]")}get contentDOM(){return o.d()?this._dialog.contentDOM:super.contentDOM}get _isPhone(){return o.d()}get _displayHeader(){return(o.d()||!this.contentOnlyOnDesktop)&&super._displayHeader}get _displayFooter(){return o.d()||!this.contentOnlyOnDesktop}get _closeDialogAriaLabel(){return lt.i18nBundle.getText(r.RESPONSIVE_POPOVER_CLOSE_DIALOG_BUTTON)}_beforeDialogOpen(){this._opened=true;this.open=true;this.fireDecoratorEvent("before-open")}_afterDialogOpen(){this.fireDecoratorEvent("open")}_beforeDialogClose(e){this.fireDecoratorEvent("before-close",e.detail)}_afterDialogClose(){this._opened=false;this.open=false;this.fireDecoratorEvent("close")}get isModal(){if(!o.d()){return super.isModal}return this._dialog.isModal}};ht([t.s({type:Boolean})],pt.prototype,"contentOnlyOnDesktop",void 0);ht([t.s({type:Boolean})],pt.prototype,"_hideHeader",void 0);ht([t.s({type:Boolean})],pt.prototype,"_hideCloseButton",void 0);ht([i.i("@ui5/webcomponents")],pt,"i18nBundle",void 0);pt=lt=ht([t.m({tag:"ui5-responsive-popover",styles:[st.styles,at],template:De})],pt);pt.define();var dt=pt;e.Popover=st;e.PopoverHorizontalAlign=Ee;e.PopoverPlacement=v;e.ResponsivePopover=dt;e.e=g});
2
+ //# sourceMappingURL=ResponsivePopover.js.map