@genexus/genexus-ide-ui 0.0.108 → 0.0.109

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 (267) hide show
  1. package/dist/cjs/ch-dropdown_2.cjs.entry.js +1 -1
  2. package/dist/cjs/ch-dropdown_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/ch-grid_8.cjs.entry.js +339 -321
  4. package/dist/cjs/ch-grid_8.cjs.entry.js.map +1 -1
  5. package/dist/cjs/ch-icon_5.cjs.entry.js +3 -1
  6. package/dist/cjs/ch-icon_5.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ch-suggest_4.cjs.entry.js +1 -1
  8. package/dist/cjs/ch-suggest_4.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ch-tree-view_5.cjs.entry.js +41 -20
  10. package/dist/cjs/ch-tree-view_5.cjs.entry.js.map +1 -1
  11. package/dist/cjs/{common-103f62f6.js → common-2e355c7d.js} +31 -1
  12. package/dist/cjs/common-2e355c7d.js.map +1 -0
  13. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  14. package/dist/cjs/gx-ide-add-module-servers.cjs.entry.js +98 -0
  15. package/dist/cjs/gx-ide-add-module-servers.cjs.entry.js.map +1 -0
  16. package/dist/cjs/{gx-ide-container_2.cjs.entry.js → gx-ide-container_3.cjs.entry.js} +47 -4
  17. package/dist/cjs/gx-ide-container_3.cjs.entry.js.map +1 -0
  18. package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js +2 -2
  19. package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js.map +1 -1
  20. package/dist/cjs/gx-ide-edit-module-servers.cjs.entry.js +98 -0
  21. package/dist/cjs/gx-ide-edit-module-servers.cjs.entry.js.map +1 -0
  22. package/dist/cjs/gx-ide-empty-state_2.cjs.entry.js.map +1 -1
  23. package/dist/cjs/gx-ide-import-from-design.cjs.entry.js +1 -1
  24. package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js +232 -0
  25. package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js.map +1 -0
  26. package/dist/cjs/gx-ide-new-environment.cjs.entry.js +1 -1
  27. package/dist/cjs/gx-ide-new-kb.cjs.entry.js +1 -1
  28. package/dist/cjs/gx-ide-share-kb.cjs.entry.js +1 -1
  29. package/dist/cjs/gx-ide-status-buttons.cjs.entry.js +81 -0
  30. package/dist/cjs/gx-ide-status-buttons.cjs.entry.js.map +1 -0
  31. package/dist/cjs/gx-ide-ww-images.cjs.entry.js +1 -1
  32. package/dist/cjs/gxg-buttons-container_2.cjs.entry.js +184 -0
  33. package/dist/cjs/gxg-buttons-container_2.cjs.entry.js.map +1 -0
  34. package/dist/cjs/loader.cjs.js +1 -1
  35. package/dist/collection/collection-manifest.json +3 -0
  36. package/dist/collection/common/common.js +21 -0
  37. package/dist/collection/common/common.js.map +1 -1
  38. package/dist/collection/components/_helpers/container/container.css +6 -0
  39. package/dist/collection/components/_helpers/container/container.js +40 -0
  40. package/dist/collection/components/_helpers/container/container.js.map +1 -1
  41. package/dist/collection/components/_helpers/list-selector/list-selector-item/list-selector-item.js +1 -1
  42. package/dist/collection/components/_helpers/list-selector/list-selector.js +1 -1
  43. package/dist/collection/components/create-kb-from-server/create-kb-from-server.js +1 -1
  44. package/dist/collection/components/create-kb-from-server/create-kb-from-server.js.map +1 -1
  45. package/dist/collection/components/modules/add-module-servers/add-module-servers.css +560 -0
  46. package/dist/collection/components/modules/add-module-servers/add-module-servers.js +251 -0
  47. package/dist/collection/components/modules/add-module-servers/add-module-servers.js.map +1 -0
  48. package/dist/collection/components/modules/add-module-servers/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.en.json +11 -0
  49. package/dist/collection/components/modules/add-module-servers/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.ja.json +3 -0
  50. package/dist/collection/components/modules/add-module-servers/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.zh.json +3 -0
  51. package/dist/collection/components/modules/edit-module-servers/edit-module-servers.css +560 -0
  52. package/dist/collection/components/modules/edit-module-servers/edit-module-servers.js +251 -0
  53. package/dist/collection/components/modules/edit-module-servers/edit-module-servers.js.map +1 -0
  54. package/dist/collection/components/modules/edit-module-servers/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.en.json +11 -0
  55. package/dist/collection/components/modules/edit-module-servers/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.ja.json +3 -0
  56. package/dist/collection/components/modules/edit-module-servers/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.zh.json +3 -0
  57. package/dist/collection/components/modules/manage-module-references/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.en.json +29 -0
  58. package/dist/collection/components/modules/manage-module-references/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.ja.json +3 -0
  59. package/dist/collection/components/modules/manage-module-references/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.zh.json +3 -0
  60. package/dist/collection/components/modules/manage-module-references/manage-module-references.css +723 -0
  61. package/dist/collection/components/modules/manage-module-references/manage-module-references.js +397 -0
  62. package/dist/collection/components/modules/manage-module-references/manage-module-references.js.map +1 -0
  63. package/dist/collection/components/modules/types.js +2 -0
  64. package/dist/collection/components/modules/types.js.map +1 -0
  65. package/dist/collection/pages/assets/common.js +7 -0
  66. package/dist/components/buttons-container.js +8 -3
  67. package/dist/components/buttons-container.js.map +1 -1
  68. package/dist/components/card.js.map +1 -1
  69. package/dist/components/ch-grid-column2.js +4 -1
  70. package/dist/components/ch-grid-column2.js.map +1 -1
  71. package/dist/components/ch-grid2.js +342 -322
  72. package/dist/components/ch-grid2.js.map +1 -1
  73. package/dist/components/combo-box.js +1 -1
  74. package/dist/components/common.js +30 -1
  75. package/dist/components/common.js.map +1 -1
  76. package/dist/components/container.js +9 -3
  77. package/dist/components/container.js.map +1 -1
  78. package/dist/components/dropdown.js +1 -1
  79. package/dist/components/dropdown.js.map +1 -1
  80. package/dist/components/form-checkbox.js +1 -1
  81. package/dist/components/form-radio-group.js +1 -1
  82. package/dist/components/form-text.js +1 -1
  83. package/dist/components/form-textarea.js +1 -1
  84. package/dist/components/form.js +1 -1
  85. package/dist/components/gx-ide-add-module-servers.d.ts +11 -0
  86. package/dist/components/gx-ide-add-module-servers.js +186 -0
  87. package/dist/components/gx-ide-add-module-servers.js.map +1 -0
  88. package/dist/components/gx-ide-ai-assistant.js +1 -1
  89. package/dist/components/gx-ide-bpm-app-declaration.js +2 -2
  90. package/dist/components/gx-ide-create-kb-from-server.js +3 -3
  91. package/dist/components/gx-ide-create-kb-from-server.js.map +1 -1
  92. package/dist/components/gx-ide-dashboard-home.js +2 -2
  93. package/dist/components/gx-ide-data-selector.js +2 -2
  94. package/dist/components/gx-ide-edit-module-servers.d.ts +11 -0
  95. package/dist/components/gx-ide-edit-module-servers.js +186 -0
  96. package/dist/components/gx-ide-edit-module-servers.js.map +1 -0
  97. package/dist/components/gx-ide-empty-state2.js +2 -2
  98. package/dist/components/gx-ide-import-from-design.js +2 -2
  99. package/dist/components/gx-ide-kb-manager-export.js +2 -2
  100. package/dist/components/gx-ide-kb-manager-import.js +2 -2
  101. package/dist/components/gx-ide-manage-module-references.d.ts +11 -0
  102. package/dist/components/gx-ide-manage-module-references.js +432 -0
  103. package/dist/components/gx-ide-manage-module-references.js.map +1 -0
  104. package/dist/components/gx-ide-new-environment.js +2 -2
  105. package/dist/components/gx-ide-new-kb.js +2 -2
  106. package/dist/components/gx-ide-new-object.js +2 -2
  107. package/dist/components/gx-ide-object-selector.js +2 -2
  108. package/dist/components/gx-ide-references.js +2 -2
  109. package/dist/components/gx-ide-share-kb.js +2 -2
  110. package/dist/components/gx-ide-start-page.js +2 -2
  111. package/dist/components/gx-ide-status-buttons2.js +1 -1
  112. package/dist/components/gx-ide-team-dev-commit.js +2 -2
  113. package/dist/components/gx-ide-team-dev-select-recent-comment.js +2 -2
  114. package/dist/components/gx-ide-team-dev-update-partial-selection.js +2 -2
  115. package/dist/components/gx-ide-team-dev-update-to-revision.js +2 -2
  116. package/dist/components/gx-ide-team-dev-update.js +2 -2
  117. package/dist/components/gx-ide-template.js +2 -2
  118. package/dist/components/gx-ide-title.js +1 -1
  119. package/dist/components/gx-ide-top-bar.js +1 -1
  120. package/dist/components/gx-ide-ww-images.js +2 -2
  121. package/dist/components/gxg-container.js +1 -1
  122. package/dist/components/gxg-form-checkbox-group2.js +1 -1
  123. package/dist/components/gxg-menu-slim-list.js +1 -1
  124. package/dist/components/gxg-title.js +1 -1
  125. package/dist/components/gxg-top-state-bar2.js +17 -8
  126. package/dist/components/gxg-top-state-bar2.js.map +1 -1
  127. package/dist/components/icon2.js +3 -1
  128. package/dist/components/icon2.js.map +1 -1
  129. package/dist/components/ide-loader.js +1 -1
  130. package/dist/components/list-box.js +1 -1
  131. package/dist/components/list-selector.js +1 -1
  132. package/dist/components/recent-news.js +2 -2
  133. package/dist/components/suggest.js +2 -2
  134. package/dist/components/suggest.js.map +1 -1
  135. package/dist/components/title-editable.js +1 -1
  136. package/dist/components/title.js +32 -31
  137. package/dist/components/title.js.map +1 -1
  138. package/dist/components/title2.js +31 -32
  139. package/dist/components/title2.js.map +1 -1
  140. package/dist/components/tree-view-item.js +8 -2
  141. package/dist/components/tree-view-item.js.map +1 -1
  142. package/dist/components/tree-view2.js +32 -15
  143. package/dist/components/tree-view2.js.map +1 -1
  144. package/dist/esm/ch-dropdown_2.entry.js +1 -1
  145. package/dist/esm/ch-dropdown_2.entry.js.map +1 -1
  146. package/dist/esm/ch-grid_8.entry.js +339 -321
  147. package/dist/esm/ch-grid_8.entry.js.map +1 -1
  148. package/dist/esm/ch-icon_5.entry.js +3 -1
  149. package/dist/esm/ch-icon_5.entry.js.map +1 -1
  150. package/dist/esm/ch-suggest_4.entry.js +1 -1
  151. package/dist/esm/ch-suggest_4.entry.js.map +1 -1
  152. package/dist/esm/ch-tree-view_5.entry.js +41 -20
  153. package/dist/esm/ch-tree-view_5.entry.js.map +1 -1
  154. package/dist/esm/{common-f2983db2.js → common-aaad5759.js} +31 -2
  155. package/dist/esm/common-aaad5759.js.map +1 -0
  156. package/dist/esm/genexus-ide-ui.js +1 -1
  157. package/dist/esm/gx-ide-add-module-servers.entry.js +94 -0
  158. package/dist/esm/gx-ide-add-module-servers.entry.js.map +1 -0
  159. package/dist/esm/{gx-ide-container_2.entry.js → gx-ide-container_3.entry.js} +47 -5
  160. package/dist/esm/gx-ide-container_3.entry.js.map +1 -0
  161. package/dist/esm/gx-ide-create-kb-from-server.entry.js +2 -2
  162. package/dist/esm/gx-ide-create-kb-from-server.entry.js.map +1 -1
  163. package/dist/esm/gx-ide-edit-module-servers.entry.js +94 -0
  164. package/dist/esm/gx-ide-edit-module-servers.entry.js.map +1 -0
  165. package/dist/esm/gx-ide-empty-state_2.entry.js.map +1 -1
  166. package/dist/esm/gx-ide-import-from-design.entry.js +1 -1
  167. package/dist/esm/gx-ide-manage-module-references.entry.js +228 -0
  168. package/dist/esm/gx-ide-manage-module-references.entry.js.map +1 -0
  169. package/dist/esm/gx-ide-new-environment.entry.js +1 -1
  170. package/dist/esm/gx-ide-new-kb.entry.js +1 -1
  171. package/dist/esm/gx-ide-share-kb.entry.js +1 -1
  172. package/dist/esm/gx-ide-status-buttons.entry.js +77 -0
  173. package/dist/esm/gx-ide-status-buttons.entry.js.map +1 -0
  174. package/dist/esm/gx-ide-ww-images.entry.js +1 -1
  175. package/dist/esm/gxg-buttons-container_2.entry.js +179 -0
  176. package/dist/esm/gxg-buttons-container_2.entry.js.map +1 -0
  177. package/dist/esm/loader.js +1 -1
  178. package/dist/genexus-ide-ui/genexus-ide-ui.css +5 -3
  179. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  180. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  181. package/dist/genexus-ide-ui/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.en.json +11 -0
  182. package/dist/genexus-ide-ui/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.ja.json +3 -0
  183. package/dist/genexus-ide-ui/gx-ide-assets/add-module-servers/langs/add-module-servers.lang.zh.json +3 -0
  184. package/dist/genexus-ide-ui/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.en.json +11 -0
  185. package/dist/genexus-ide-ui/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.ja.json +3 -0
  186. package/dist/genexus-ide-ui/gx-ide-assets/edit-module-servers/langs/edit-module-servers.lang.zh.json +3 -0
  187. package/dist/genexus-ide-ui/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.en.json +29 -0
  188. package/dist/genexus-ide-ui/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.ja.json +3 -0
  189. package/dist/genexus-ide-ui/gx-ide-assets/manage-module-references/langs/manage-module-references.lang.zh.json +3 -0
  190. package/dist/genexus-ide-ui/{p-2c1f414f.entry.js → p-0c0c3f1d.entry.js} +53 -53
  191. package/dist/genexus-ide-ui/{p-2c1f414f.entry.js.map → p-0c0c3f1d.entry.js.map} +1 -1
  192. package/dist/genexus-ide-ui/{p-b571e9c0.entry.js → p-0df39b62.entry.js} +5 -2
  193. package/dist/genexus-ide-ui/{p-b571e9c0.entry.js.map → p-0df39b62.entry.js.map} +1 -1
  194. package/dist/genexus-ide-ui/{p-419b2877.entry.js → p-1cb2d0df.entry.js} +80 -47
  195. package/dist/genexus-ide-ui/p-1cb2d0df.entry.js.map +1 -0
  196. package/dist/genexus-ide-ui/p-350f49ac.js +101 -0
  197. package/dist/genexus-ide-ui/p-350f49ac.js.map +1 -0
  198. package/dist/genexus-ide-ui/p-36544e00.entry.js +138 -0
  199. package/dist/genexus-ide-ui/p-36544e00.entry.js.map +1 -0
  200. package/dist/genexus-ide-ui/{p-ca7233a5.entry.js → p-39337325.entry.js} +81 -10
  201. package/dist/genexus-ide-ui/p-39337325.entry.js.map +1 -0
  202. package/dist/genexus-ide-ui/p-40121554.entry.js.map +1 -1
  203. package/dist/genexus-ide-ui/p-41ac8e60.entry.js +211 -0
  204. package/dist/genexus-ide-ui/p-41ac8e60.entry.js.map +1 -0
  205. package/dist/genexus-ide-ui/{p-001e085a.entry.js → p-51e86542.entry.js} +2 -2
  206. package/dist/genexus-ide-ui/{p-d14b5546.entry.js → p-6f5b13a7.entry.js} +4 -2
  207. package/dist/genexus-ide-ui/{p-d14b5546.entry.js.map → p-6f5b13a7.entry.js.map} +1 -1
  208. package/dist/genexus-ide-ui/{p-94015503.entry.js → p-786e5448.entry.js} +374 -380
  209. package/dist/genexus-ide-ui/p-786e5448.entry.js.map +1 -0
  210. package/dist/genexus-ide-ui/p-a46794f4.entry.js +138 -0
  211. package/dist/genexus-ide-ui/p-a46794f4.entry.js.map +1 -0
  212. package/dist/genexus-ide-ui/p-adaf7aff.entry.js +365 -0
  213. package/dist/genexus-ide-ui/p-adaf7aff.entry.js.map +1 -0
  214. package/dist/genexus-ide-ui/{p-afce38d4.entry.js → p-b2099890.entry.js} +2 -2
  215. package/dist/genexus-ide-ui/{p-513ec2ad.entry.js → p-b4e526d6.entry.js} +2 -2
  216. package/dist/genexus-ide-ui/p-b7d0697f.entry.js +138 -0
  217. package/dist/genexus-ide-ui/p-b7d0697f.entry.js.map +1 -0
  218. package/dist/genexus-ide-ui/{p-8e8bb528.entry.js → p-c14b6b77.entry.js} +2 -2
  219. package/dist/genexus-ide-ui/{p-8e8bb528.entry.js.map → p-c14b6b77.entry.js.map} +1 -1
  220. package/dist/genexus-ide-ui/{p-2c733995.entry.js → p-d5903356.entry.js} +2 -2
  221. package/dist/genexus-ide-ui/{p-05102700.entry.js → p-df72101e.entry.js} +2 -2
  222. package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/dropdown/dropdown.css +28 -28
  223. package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/tree-view/tree-view-item/tree-view-item.css +0 -2
  224. package/dist/node_modules/@genexus/gemini/dist/collection/components/buttons-container/buttons-container.css +11 -0
  225. package/dist/node_modules/@genexus/gemini/dist/collection/components/suggest/styles.css +1 -0
  226. package/dist/node_modules/@genexus/gemini/dist/collection/components/top-state-bar/gxg-top-state-bar.css +32 -41
  227. package/dist/node_modules/@genexus/gemini/dist/collection/components/tree-view/tree-view.css +37 -54
  228. package/dist/types/common/common.d.ts +2 -0
  229. package/dist/types/components/_helpers/container/container.d.ts +8 -0
  230. package/dist/types/components/modules/add-module-servers/add-module-servers.d.ts +60 -0
  231. package/dist/types/components/modules/edit-module-servers/edit-module-servers.d.ts +60 -0
  232. package/dist/types/components/modules/manage-module-references/manage-module-references.d.ts +98 -0
  233. package/dist/types/components/modules/types.d.ts +40 -0
  234. package/dist/types/components.d.ts +312 -52
  235. package/package.json +3 -3
  236. package/dist/cjs/common-103f62f6.js.map +0 -1
  237. package/dist/cjs/gx-ide-container_2.cjs.entry.js.map +0 -1
  238. package/dist/cjs/gx-ide-status-buttons_2.cjs.entry.js +0 -187
  239. package/dist/cjs/gx-ide-status-buttons_2.cjs.entry.js.map +0 -1
  240. package/dist/cjs/gxg-buttons-container.cjs.entry.js +0 -65
  241. package/dist/cjs/gxg-buttons-container.cjs.entry.js.map +0 -1
  242. package/dist/cjs/gxg-title.cjs.entry.js +0 -47
  243. package/dist/cjs/gxg-title.cjs.entry.js.map +0 -1
  244. package/dist/esm/common-f2983db2.js.map +0 -1
  245. package/dist/esm/gx-ide-container_2.entry.js.map +0 -1
  246. package/dist/esm/gx-ide-status-buttons_2.entry.js +0 -182
  247. package/dist/esm/gx-ide-status-buttons_2.entry.js.map +0 -1
  248. package/dist/esm/gxg-buttons-container.entry.js +0 -61
  249. package/dist/esm/gxg-buttons-container.entry.js.map +0 -1
  250. package/dist/esm/gxg-title.entry.js +0 -43
  251. package/dist/esm/gxg-title.entry.js.map +0 -1
  252. package/dist/genexus-ide-ui/p-419b2877.entry.js.map +0 -1
  253. package/dist/genexus-ide-ui/p-67406b36.entry.js +0 -71
  254. package/dist/genexus-ide-ui/p-67406b36.entry.js.map +0 -1
  255. package/dist/genexus-ide-ui/p-67ea84e8.js +0 -74
  256. package/dist/genexus-ide-ui/p-67ea84e8.js.map +0 -1
  257. package/dist/genexus-ide-ui/p-94015503.entry.js.map +0 -1
  258. package/dist/genexus-ide-ui/p-ca7233a5.entry.js.map +0 -1
  259. package/dist/genexus-ide-ui/p-cf5c3c10.entry.js +0 -270
  260. package/dist/genexus-ide-ui/p-cf5c3c10.entry.js.map +0 -1
  261. package/dist/genexus-ide-ui/p-d50b5b9a.entry.js +0 -67
  262. package/dist/genexus-ide-ui/p-d50b5b9a.entry.js.map +0 -1
  263. /package/dist/genexus-ide-ui/{p-001e085a.entry.js.map → p-51e86542.entry.js.map} +0 -0
  264. /package/dist/genexus-ide-ui/{p-afce38d4.entry.js.map → p-b2099890.entry.js.map} +0 -0
  265. /package/dist/genexus-ide-ui/{p-513ec2ad.entry.js.map → p-b4e526d6.entry.js.map} +0 -0
  266. /package/dist/genexus-ide-ui/{p-2c733995.entry.js.map → p-d5903356.entry.js.map} +0 -0
  267. /package/dist/genexus-ide-ui/{p-05102700.entry.js.map → p-df72101e.entry.js.map} +0 -0
@@ -3,7 +3,7 @@ import { f as focusComposedPath } from './helpers-ec2b1c99.js';
3
3
  import { b as isPseudoElementImg, f as forceCSSMinMax, a as isRTL } from './utils-4ef9f859.js';
4
4
  import { S as SyncWithRAF } from './sync-with-frames-6d6d3584.js';
5
5
 
6
- const dropdownCss = ":where(button){all:unset}*,::after,::before{box-sizing:border-box}:host{--ch-dropdown-item__image-size:0.875em;--separation:0px;--separation-x:var(--separation);--separation-y:var(--separation);display:flex;position:relative;inline-size:100%;block-size:100%}.expandable-button{display:flex;align-items:center;justify-content:center;align-self:center;position:relative;inline-size:100%;block-size:100%;cursor:pointer;z-index:108}.expandable-button:focus-visible{outline:1px solid currentColor}::slotted([slot=action]){pointer-events:none}.list{display:flex;flex-direction:column}.action{display:flex;align-items:center;inline-size:100%;block-size:100%;cursor:pointer;text-align:start}.action:focus-visible{outline:1px solid currentColor}.pseudo-img--start::before,.pseudo-img--end::after{content:\"\";display:block;inline-size:var(--ch-dropdown-item__image-size);block-size:var(--ch-dropdown-item__image-size);min-inline-size:var(--ch-dropdown-item__image-size)}.start-img-type--background::before{background:no-repeat center/100% var(--ch-dropdown-item-start-img)}.end-img-type--background::after{background:no-repeat center/100% var(--ch-dropdown-item-end-img)}.start-img-type--mask::before{-webkit-mask:var(--ch-dropdown-item-start-img) 50% 50%/100% 100% no-repeat;background-color:currentColor}.end-img-type--mask::after{-webkit-mask:var(--ch-dropdown-item-end-img) 50% 50%/100% 100% no-repeat;background-color:currentColor}.content{inline-size:100%}";
6
+ const dropdownCss = ":where(a,button){all:unset}a,button{display:flex;align-items:center;inline-size:100%;block-size:100%;cursor:pointer}*,::after,::before{box-sizing:border-box}:host{--ch-dropdown-item__image-size:0.875em;--ch-dropdown-item__background-image-size:100%;--ch-dropdown-separation:0px;--ch-dropdown-separation-x:var(--ch-dropdown-separation);--ch-dropdown-separation-y:var(--ch-dropdown-separation);display:flex;position:relative;inline-size:100%;block-size:100%}.expandable-button{justify-content:center;align-self:center;position:relative;z-index:108}::slotted([slot=action]){pointer-events:none}ch-popover{--ch-popover-separation-x:var(--ch-dropdown-separation-x);--ch-popover-separation-y:var(--ch-dropdown-separation-y)}.list{display:flex;flex-direction:column}.action{text-align:start}.pseudo-img--start::before,.pseudo-img--end::after{content:\"\";display:block;inline-size:var(--ch-dropdown-item__image-size);block-size:var(--ch-dropdown-item__image-size);min-inline-size:var(--ch-dropdown-item__image-size)}.pseudo-img--start{--ch-dropdown-item-img:var(--ch-dropdown-item-start-img)}.pseudo-img--end{--ch-dropdown-item-img:var(--ch-dropdown-item-end-img)}.start-img-type--background::before,.end-img-type--background::after{background:no-repeat center/var(--ch-dropdown-item__background-image-size) var(--ch-dropdown-item-img)}.start-img-type--mask::before,.end-img-type--mask::after{-webkit-mask:var(--ch-dropdown-item-img) 50% 50%/var(--ch-dropdown-item__background-image-size) var(--ch-dropdown-item__background-image-size) no-repeat;background-color:currentColor}.content{inline-size:100%}";
7
7
 
8
8
  var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
9
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
@@ -1 +1 @@
1
- {"file":"ch-dropdown.ch-popover.entry.js","mappings":";;;;;AAAA,MAAM,WAAW,GAAG,+6CAA+6C;;;;;;;;;;;;;;ACGn8C,MAAM,+BAA+B,GAAG;IACpC,YAAY,EAAE,eAAe;IAC7B,WAAW,EAAE,cAAc;IAC3B,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,YAAY;IACvB,UAAU,EAAE,aAAa;CAC5B,CAAC;AACF,MAAM,iBAAiB,GAAG,aAAa,CAAC;AACxC,MAAM,SAAS,GAAG,QAAQ,CAAC;AAC3B,MAAM,iBAAiB,GAAG,CAAC,OAAO,eAAK,OAAA,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,0CAAE,WAAW,EAAE,MAAK,iBAAiB,CAAA,EAAA,CAAC;MAChF,UAAU;QACnB;YAmBA,yBAAiB,KAAK,EAAC;;YAEvB,8BAAY;YA8DZ,gCAAwB;gBACpB,MAAM,qBAAqB,GAAG,iBAAiB,EAAE,CAAC;gBAClD,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,qBAAqB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gBACnF,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,EAAE;oBACxC,OAAO;iBACV;gBACD,IAAI,kBAAkB,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;oBACvC,OAAO;iBACV;;gBAED,kBAAkB,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,gBAAgB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;aAC9G,EAAC;YACF,yBAAiB;gBACb,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAChC,IAAI,CAAC,QAAQ,GAAG,K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EAAE,uBAAA,IAAI,yBAAkB,MAAtB,IAAI,EAAmB,wBAAwB,CAAC,EAAE,CAAC;gBACpH,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gCAAgC,EAAE,WAAW,EAAE,uBAAA,IAAI,yBAAkB,MAAtB,IAAI,EAAmB,wBAAwB,CAAC,EAAE,CAAC;gBACpH,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,8BAA8B,EAAE,WAAW,EAAE,uBAAA,IAAI,yBAAkB,MAAtB,IAAI,EAAmB,sBAAsB,CAAC,EAAE,CAAC;gBAChH,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,EAAE,KAAK,uBAAA,IAAI,gBAAgB,EAAE,MAAA,CAAC,EAAE,CAAC;aAC3E,CAAC,EAAE;SACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__classPrivateFieldGet","__classPrivateFieldSet"],"sources":["node_modules/@genexus/chameleon-controls-library/dist/collection/components/dropdown/dropdown.css?tag=ch-dropdown&encapsulation=shadow","node_modules/@genexus/chameleon-controls-library/dist/collection/components/dropdown/dropdown.js","node_modules/@genexus/chameleon-controls-library/dist/collection/components/popover/utils.js","node_modules/@genexus/chameleon-controls-library/dist/collection/components/popover/popover.css?tag=ch-popover&encapsulation=shadow","node_modules/@genexus/chameleon-controls-library/dist/collection/components/popover/popover.js"],"sourcesContent":[":where(button) {\n all: unset;\n}\n\n*,\n::after,\n::before {\n box-sizing: border-box;\n}\n\n:host {\n --ch-dropdown-item__image-size: 0.875em;\n --separation: 0px;\n --separation-x: var(--separation);\n --separation-y: var(--separation);\n display: flex;\n position: relative;\n inline-size: 100%;\n block-size: 100%;\n}\n\n.expandable-button {\n display: flex;\n align-items: center;\n justify-content: center;\n align-self: center;\n position: relative;\n inline-size: 100%;\n block-size: 100%;\n cursor: pointer;\n z-index: 108;\n}\n.expandable-button:focus-visible {\n outline: 1px solid currentColor;\n}\n\n::slotted([slot=action]) {\n pointer-events: none;\n}\n\n.list {\n display: flex;\n flex-direction: column;\n}\n\n.action {\n display: flex;\n align-items: center;\n inline-size: 100%;\n block-size: 100%;\n cursor: pointer;\n text-align: start;\n}\n.action:focus-visible {\n outline: 1px solid currentColor;\n}\n\n.pseudo-img--start::before,\n.pseudo-img--end::after {\n content: \"\";\n display: block;\n inline-size: var(--ch-dropdown-item__image-size);\n block-size: var(--ch-dropdown-item__image-size);\n min-inline-size: var(--ch-dropdown-item__image-size);\n}\n\n.start-img-type--background::before {\n background: no-repeat center/100% var(--ch-dropdown-item-start-img);\n}\n\n.end-img-type--background::after {\n background: no-repeat center/100% var(--ch-dropdown-item-end-img);\n}\n\n.start-img-type--mask::before {\n -webkit-mask: var(--ch-dropdown-item-start-img) 50% 50%/100% 100% no-repeat;\n background-color: currentColor;\n}\n\n.end-img-type--mask::after {\n -webkit-mask: var(--ch-dropdown-item-end-img) 50% 50%/100% 100% no-repeat;\n background-color: currentColor;\n}\n\n.content {\n inline-size: 100%;\n}","import { Host, h } from \"@stencil/core\";\nimport { focusComposedPath } from \"../common/helpers\";\nimport { isPseudoElementImg } from \"../../common/utils\";\nconst mapDropdownAlignToChWindowAlign = {\n OutsideStart: \"outside-start\",\n InsideStart: \"inside-start\",\n Center: \"center\",\n InsideEnd: \"inside-end\",\n OutsideEnd: \"outside-end\"\n};\nconst DROPDOWN_TAG_NAME = \"ch-dropdown\";\nconst WINDOW_ID = \"window\";\nconst elementIsDropdown = (element) => element?.tagName?.toLowerCase() === DROPDOWN_TAG_NAME;\nexport class ChDropDown {\n constructor() {\n this.actionGroupParent = false;\n this.buttonAccessibleName = undefined;\n this.caption = undefined;\n this.endImgSrc = undefined;\n this.endImgType = \"background\";\n this.expanded = false;\n this.href = undefined;\n this.leaf = false;\n this.level = undefined;\n this.nestedDropdown = false;\n this.openOnFocus = false;\n this.position = \"Center_OutsideEnd\";\n this.shortcut = undefined;\n this.showFooter = false;\n this.showHeader = false;\n this.startImgSrc = undefined;\n this.startImgType = \"background\";\n }\n #firstExpanded = false;\n // Refs\n #mainAction;\n el;\n handleExpandedChange(newExpandedValue) {\n if (newExpandedValue) {\n // Click\n document.addEventListener(\"click\", this.#closeOnClickOutside, {\n capture: true,\n passive: true\n });\n }\n else {\n // Click\n document.removeEventListener(\"click\", this.#closeOnClickOutside, {\n capture: true\n });\n // This is a WA to avoid a StencilJS's (or browser) issue when reusing\n // the top layer and interacting with the Tab key in the same top layer.\n // After the second opening, the Tab key stops working\n this.#mainAction.popoverTargetElement = null;\n }\n }\n /**\n * Fired when the visibility of the dropdown section is changed by user\n * interaction.\n */\n expandedChange;\n onActionClick() {\n // this.#closeDropdown();\n // @todo This behavior must be specified by a property\n // this.returnFocusToButton();\n }\n onRecursiveClose(event) {\n const stopperLevel = event.detail;\n if (this.level === stopperLevel) {\n event.stopPropagation();\n }\n this.#closeDropdown();\n }\n /**\n * Focus the dropdown action.\n */\n async focusElement() {\n this.#mainAction.focus();\n }\n /**\n * Collapse the content of the dropdown.\n */\n async collapseDropdown() {\n if (this.expanded) {\n this.expandedChange.emit(false);\n this.expanded = false;\n }\n }\n /**\n * Expand the content of the dropdown.\n */\n async expandDropdown() {\n if (!this.expanded) {\n this.expandedChange.emit(true);\n this.expanded = true;\n }\n }\n #closeDropdownSibling = () => {\n const currentFocusedElement = focusComposedPath();\n const currentFocusedItem = currentFocusedElement[currentFocusedElement.length - 1];\n if (!elementIsDropdown(currentFocusedItem)) {\n return;\n }\n if (currentFocusedItem.level < this.level) {\n return;\n }\n // Fire an event to close all dropdown parents up to a certain level\n currentFocusedItem.dispatchEvent(new CustomEvent(\"recursiveClose\", { bubbles: true, detail: this.level }));\n };\n #closeDropdown = () => {\n this.expandedChange.emit(false);\n this.expanded = false;\n };\n /**\n * Returns focus to the expandable button when closing the dropdown. Only\n * works if `openOnFocus = \"false\"`\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n // #returnFocusToButton = () => {\n // if (!this.openOnFocus) {\n // this.#mainAction.focus();\n // }\n // };\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #closeOnClickOutside = (event) => {\n if (event.composedPath().find(el => el === this.el) === undefined) {\n this.#closeDropdown();\n }\n };\n #handleMouseEnter = (event) => {\n event.stopPropagation();\n // We first must close the current expanded dropdown, since with the\n // keyboard we could have expanded a different dropdown\n this.#closeDropdownSibling();\n if (!this.expanded) {\n this.expandedChange.emit(true);\n this.expanded = true;\n }\n };\n #handleMouseLeave = (event) => {\n event.stopPropagation();\n if (this.expanded) {\n this.expandedChange.emit(false);\n this.expanded = false;\n }\n };\n // /**\n // * Check if the next focused element is a child element of the dropdown\n // * control.\n // */\n // // eslint-disable-next-line @stencil-community/own-props-must-be-private\n // #handleKeyUpEvents = (event: KeyboardEvent) => {\n // if (event.code !== TAB_KEY) {\n // return;\n // }\n // const isChildElement = event.composedPath().includes(this.el);\n // if (isChildElement) {\n // return;\n // }\n // this.#closeDropdown();\n // };\n #handleButtonClick = (event) => {\n event.stopPropagation();\n // If the nested dropdown is expanded and its expandable button is clicked\n // with the MOUSE and not the keyboard, do not change the visibility\n if (this.nestedDropdown && this.expanded && event.pointerType) {\n return;\n }\n // if (!this.expanded) {\n // // We first must close the current expanded dropdown, since with the\n // // mouse we could have expanded a different dropdown\n // this.#closeDropdownSibling();\n // }\n this.expanded = !this.expanded;\n this.expandedChange.emit(!this.expanded);\n };\n #dropDownItemContent = () => [\n h(\"span\", { slot: \"action\", class: \"content\", part: \"content\" }, this.caption),\n !!this.shortcut && (h(\"span\", { \"aria-hidden\": \"true\", slot: \"action\", part: \"shortcut\" }, this.shortcut))\n ];\n #firstLevelRender = () => (h(\"button\", { popoverTarget: WINDOW_ID, \"aria-controls\": WINDOW_ID, \"aria-expanded\": this.expanded.toString(), \"aria-haspopup\": \"true\", \"aria-label\": this.buttonAccessibleName, class: \"expandable-button\", part: \"action button expandable-action expandable-button\", type: \"button\", onClick: this.#handleButtonClick, ref: el => (this.#mainAction = el) }, h(\"slot\", { name: \"action\" })));\n #actionRender = () => {\n const pseudoStartImage = isPseudoElementImg(this.startImgSrc, this.startImgType);\n const pseudoEndImage = isPseudoElementImg(this.endImgSrc, this.endImgType);\n return this.href ? (h(\"a\", { \"aria-controls\": !this.leaf ? WINDOW_ID : null, \"aria-expanded\": !this.leaf ? this.expanded.toString() : null, \"aria-haspopup\": !this.leaf ? \"true\" : null, class: {\n action: true,\n [`start-img-type--${this.startImgType} pseudo-img--start`]: pseudoStartImage,\n [`end-img-type--${this.endImgType} pseudo-img--end`]: pseudoEndImage\n }, part: this.leaf\n ? \"action link\"\n : \"action link expandable-action expandable-link\", href: this.href, onClick: this.#handleButtonClick, onMouseEnter: !this.leaf && !this.actionGroupParent ? this.#handleMouseEnter : null, ref: el => (this.#mainAction = el) }, this.#dropDownItemContent())) : (h(\"button\", { popoverTarget: WINDOW_ID, \"aria-controls\": !this.leaf ? WINDOW_ID : null, \"aria-expanded\": !this.leaf ? this.expanded.toString() : null, \"aria-haspopup\": !this.leaf ? \"true\" : null, class: {\n action: true,\n [`start-img-type--${this.startImgType} pseudo-img--start`]: pseudoStartImage,\n [`end-img-type--${this.endImgType} pseudo-img--end`]: pseudoEndImage\n }, part: this.leaf\n ? \"action button\"\n : \"action button expandable-action expandable-button\", type: \"button\", onMouseEnter: !this.leaf && !this.actionGroupParent ? this.#handleMouseEnter : null, onClick: this.#handleButtonClick, ref: el => (this.#mainAction = el) }, this.#dropDownItemContent()));\n };\n #popoverRender = () => {\n this.#firstExpanded ||= this.expanded;\n if (!this.#firstExpanded) {\n return \"\";\n }\n const aligns = this.position.split(\"_\");\n const alignX = aligns[0];\n const alignY = aligns[1];\n const xAlignMapping = mapDropdownAlignToChWindowAlign[alignX];\n const yAlignMapping = mapDropdownAlignToChWindowAlign[alignY];\n const noNeedToAddDivListWrapper = !this.showHeader && !this.showFooter;\n return (h(\"ch-popover\", { role: noNeedToAddDivListWrapper ? \"list\" : null, id: WINDOW_ID, part: \"window\", actionById: true, actionElement: this.#mainAction, firstLayer: this.level === -1 || this.actionGroupParent, mode: \"manual\", hidden: !this.expanded, inlineAlign: xAlignMapping, blockAlign: yAlignMapping }, noNeedToAddDivListWrapper ? (h(\"slot\", null)) : ([\n this.showHeader && h(\"slot\", { name: \"header\" }),\n h(\"div\", { role: \"list\", class: \"list\", part: \"list\" }, h(\"slot\", null)),\n this.showFooter && h(\"slot\", { name: \"footer\" })\n ])));\n };\n render() {\n return (h(Host, { role: this.level !== -1 ? \"listitem\" : null, style: !!this.startImgSrc || !!this.endImgSrc\n ? {\n \"--ch-dropdown-item-start-img\": `url(\"${this.startImgSrc}\")`,\n \"--ch-dropdown-item-end-img\": `url(\"${this.endImgSrc}\")`\n }\n : undefined, onMouseLeave: !this.actionGroupParent && this.level !== -1\n ? this.#handleMouseLeave\n : null }, this.level === -1 && !this.leaf\n ? this.#firstLevelRender()\n : this.#actionRender(), !this.leaf && this.#popoverRender()));\n }\n static get is() { return \"ch-dropdown\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"dropdown.scss\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"dropdown.css\"]\n };\n }\n static get properties() {\n return {\n \"actionGroupParent\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies if the current parent of the item is the action-group control.\"\n },\n \"attribute\": \"action-group-parent\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"buttonAccessibleName\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"This attribute lets you specify the label for the expandable button.\\nImportant for accessibility.\"\n },\n \"attribute\": \"button-accessible-name\",\n \"reflect\": false\n },\n \"caption\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the caption that the control will display.\"\n },\n \"attribute\": \"caption\",\n \"reflect\": false\n },\n \"endImgSrc\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the src of the end image.\"\n },\n \"attribute\": \"end-img-src\",\n \"reflect\": false\n },\n \"endImgType\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"ImageRender\",\n \"resolved\": \"\\\"background\\\" | \\\"img\\\" | \\\"mask\\\"\",\n \"references\": {\n \"ImageRender\": {\n \"location\": \"import\",\n \"path\": \"../../common/types\",\n \"id\": \"src/common/types.ts::ImageRender\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies how the end image will be rendered.\"\n },\n \"attribute\": \"end-img-type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"background\\\"\"\n },\n \"expanded\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"`true` to display the dropdown section.\"\n },\n \"attribute\": \"expanded\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"href\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the hyperlink of the item. If this property is defined, the\\ncontrol will render an anchor tag with this `href`. Otherwise, it will\\nrender a button tag.\"\n },\n \"attribute\": \"href\",\n \"reflect\": false\n },\n \"leaf\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies whether the item contains a subtree. `true` if the item does not\\nhave a subtree.\"\n },\n \"attribute\": \"leaf\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"level\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Level in the render at which the item is placed.\"\n },\n \"attribute\": \"level\",\n \"reflect\": false\n },\n \"nestedDropdown\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"This attribute lets you specify if the control is nested in another\\ndropdown. Useful to manage keyboard interaction.\"\n },\n \"attribute\": \"nested-dropdown\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"openOnFocus\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Determine if the dropdown section should be opened when the expandable\\nbutton of the control is focused.\\nTODO: Add implementation\"\n },\n \"attribute\": \"open-on-focus\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"position\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"DropdownPosition\",\n \"resolved\": \"\\\"Center_OutsideEnd\\\" | \\\"Center_OutsideStart\\\" | \\\"InsideEnd_OutsideEnd\\\" | \\\"InsideEnd_OutsideStart\\\" | \\\"InsideStart_OutsideEnd\\\" | \\\"InsideStart_OutsideStart\\\" | \\\"OutsideEnd_Center\\\" | \\\"OutsideEnd_InsideEnd\\\" | \\\"OutsideEnd_InsideStart\\\" | \\\"OutsideEnd_OutsideEnd\\\" | \\\"OutsideEnd_OutsideStart\\\" | \\\"OutsideStart_Center\\\" | \\\"OutsideStart_InsideEnd\\\" | \\\"OutsideStart_InsideStart\\\" | \\\"OutsideStart_OutsideEnd\\\" | \\\"OutsideStart_OutsideStart\\\"\",\n \"references\": {\n \"DropdownPosition\": {\n \"location\": \"import\",\n \"path\": \"./types\",\n \"id\": \"src/components/dropdown/types.ts::DropdownPosition\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the position of the dropdown section that is placed relative to\\nthe expandable button.\"\n },\n \"attribute\": \"position\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"Center_OutsideEnd\\\"\"\n },\n \"shortcut\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the shortcut caption that the control will display.\"\n },\n \"attribute\": \"shortcut\",\n \"reflect\": false\n },\n \"showFooter\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"`true` to make available a slot to show a footer element.\"\n },\n \"attribute\": \"show-footer\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"showHeader\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"`true` to make available a slot to show a header element.\"\n },\n \"attribute\": \"show-header\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"startImgSrc\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the src for the left img.\"\n },\n \"attribute\": \"start-img-src\",\n \"reflect\": false\n },\n \"startImgType\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"ImageRender\",\n \"resolved\": \"\\\"background\\\" | \\\"img\\\" | \\\"mask\\\"\",\n \"references\": {\n \"ImageRender\": {\n \"location\": \"import\",\n \"path\": \"../../common/types\",\n \"id\": \"src/common/types.ts::ImageRender\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies how the start image will be rendered.\"\n },\n \"attribute\": \"start-img-type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"background\\\"\"\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"expandedChange\",\n \"name\": \"expandedChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Fired when the visibility of the dropdown section is changed by user\\ninteraction.\"\n },\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"focusElement\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Focus the dropdown action.\",\n \"tags\": []\n }\n },\n \"collapseDropdown\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Collapse the content of the dropdown.\",\n \"tags\": []\n }\n },\n \"expandDropdown\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Expand the content of the dropdown.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"expanded\",\n \"methodName\": \"handleExpandedChange\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"actionClick\",\n \"method\": \"onActionClick\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"recursiveClose\",\n \"method\": \"onRecursiveClose\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=dropdown.js.map\n","const alignToImplementationMap = {\n \"outside-start\": (_, popoverSize, separation) => -popoverSize - separation,\n \"inside-start\": (_, __, separation) => separation,\n center: (actionSize, popoverSize, separation) => actionSize * 0.5 + separation - popoverSize * 0.5,\n \"inside-end\": (actionSize, popoverSize, separation) => actionSize - (separation + popoverSize),\n \"outside-end\": (actionSize, _, separation) => actionSize + separation\n};\nexport const getAlignmentValue = (align, actionSize, popoverSize, separation) => alignToImplementationMap[align](actionSize, popoverSize, separation);\n//# sourceMappingURL=utils.js.map\n","*,\n::after,\n::before {\n box-sizing: border-box;\n}\n\n:host {\n /**\n * @prop --ch-popover-block-size:\n * Specifies the block size of the popover. Useful for scenarios where the\n * popover is resizable.\n * @default max-content\n */\n --ch-popover-block-size: max-content;\n /**\n * @prop --ch-popover-inline-size:\n * Specifies the inline size of the popover. Useful for scenarios where the\n * popover is resizable.\n * @default max-content\n */\n --ch-popover-inline-size: max-content;\n /**\n * @prop --ch-popover-max-block-size:\n * Specifies the maximum block size of the popover. Useful for scenarios where the\n * popover is resizable.\n * @default auto\n */\n --ch-popover-max-block-size: auto;\n /**\n * @prop --ch-popover-max-inline-size:\n * Specifies the maximum inline size of the popover. Useful for scenarios\n * where the popover is resizable.\n * @default auto\n */\n --ch-popover-max-inline-size: auto;\n /**\n * @prop --ch-popover-min-block-size:\n * Specifies the minimum block size of the popover. Useful for scenarios where the\n * popover is resizable.\n * @default auto\n */\n --ch-popover-min-block-size: auto;\n /**\n * @prop --ch-popover-min-inline-size:\n * Specifies the minimum inline size of the popover. Useful for scenarios\n * where the popover is resizable.\n * @default auto\n */\n --ch-popover-min-inline-size: auto;\n /**\n * @prop --ch-popover-resize-threshold:\n * Specifies the size of the threshold to resize the popover.\n * @default 4px\n */\n --ch-popover-resize-threshold: 8px;\n /**\n * @prop --ch-popover-separation-x:\n * Specifies the separation between the action and popover in the x axis.\n * @default 0px\n */\n --ch-popover-separation-x: 0px;\n /**\n * @prop --ch-popover-separation-y:\n * Specifies the separation between the action and popover in the y axis.\n * @default 0px\n */\n --ch-popover-separation-y: 0px;\n --ch-popover-resize-threshold--half-negative: calc(\n var(--ch-popover-resize-threshold) * -0.5\n );\n --ch-popover-border-inline-start-width: 0px;\n --ch-popover-border-inline-end-width: 0px;\n --ch-popover-border-block-start-width: 0px;\n --ch-popover-border-block-end-width: 0px;\n --ch-popover-resize__inline-start: calc(\n var(--ch-popover-resize-threshold--half-negative) -\n var(--ch-popover-border-inline-start-width) * 0.5\n );\n --ch-popover-resize__inline-end: calc(\n var(--ch-popover-resize-threshold--half-negative) -\n var(--ch-popover-border-inline-end-width) * 0.5\n );\n --ch-popover-resize__block-start: calc(\n var(--ch-popover-resize-threshold--half-negative) -\n var(--ch-popover-border-block-start-width) * 0.5\n );\n --ch-popover-resize__block-end: calc(\n var(--ch-popover-resize-threshold--half-negative) -\n var(--ch-popover-border-block-end-width) * 0.5\n );\n --ch-popover-dragged-x: 0px;\n --ch-popover-dragged-y: 0px;\n --ch-popover-rtl: 1;\n position: fixed;\n inline-size: var(--ch-popover-inline-size);\n block-size: var(--ch-popover-block-size);\n min-inline-size: var(--ch-popover-min-inline-size);\n min-block-size: var(--ch-popover-min-block-size);\n max-inline-size: var(--ch-popover-max-inline-size);\n max-block-size: var(--ch-popover-max-block-size);\n margin: 0;\n padding: 0;\n background-color: unset;\n border: unset;\n color: unset;\n overflow: visible;\n top: 0;\n inset-inline-start: 0;\n translate: calc((var(--ch-popover-action-left) + var(--ch-popover-inline) + var(--ch-popover-dragged-x)) * var(--ch-popover-rtl)) calc(var(--ch-popover-action-top) + var(--ch-popover-block) + var(--ch-popover-dragged-y));\n}\n\n:host([hidden]) {\n display: block !important;\n visibility: hidden;\n}\n\n@supports (content-visibility: hidden) {\n :host([hidden]) {\n content-visibility: hidden;\n }\n}\n@supports not (content-visibility: hidden) {\n :host([hidden]) {\n visibility: hidden;\n }\n}\n:host(.gx-popover-prevent-flickering) {\n visibility: hidden !important;\n}\n\n:host(.gx-popover-header-drag) {\n display: grid;\n grid-template-rows: max-content 1fr;\n}\n\n:host(.gx-popover-dragging) {\n cursor: move;\n}\n:host(.gx-popover-dragging) ::slotted(*) {\n pointer-events: none;\n user-select: none;\n}\n\n:host(.ch-popover-resizing) {\n pointer-events: none;\n user-select: none;\n}\n\n.edge__block-start, .edge__block-end {\n position: fixed;\n inset-inline: min(0px, (var(--ch-popover-resize-threshold) - var(--ch-popover-border-inline-start-width)) / 2) min(0px, (var(--ch-popover-resize-threshold) - var(--ch-popover-border-inline-end-width)) / 2);\n block-size: var(--ch-popover-resize-threshold);\n cursor: ns-resize;\n}\n.edge__inline-start, .edge__inline-end {\n position: fixed;\n inset-block: min(0px, (var(--ch-popover-resize-threshold) - var(--ch-popover-border-block-start-width)) / 2) min(0px, (var(--ch-popover-resize-threshold) - var(--ch-popover-border-block-end-width)) / 2);\n inline-size: var(--ch-popover-resize-threshold);\n cursor: ew-resize;\n}\n.edge__block-start {\n inset-block-start: var(--ch-popover-resize__block-start);\n}\n.edge__block-end {\n inset-block-end: var(--ch-popover-resize__block-end);\n}\n.edge__inline-start {\n inset-inline-start: var(--ch-popover-resize__inline-start);\n}\n.edge__inline-end {\n inset-inline-end: var(--ch-popover-resize__inline-end);\n}\n\n.corner__block-start-inline-start, .corner__block-end-inline-end {\n position: fixed;\n block-size: var(--ch-popover-resize-threshold);\n inline-size: var(--ch-popover-resize-threshold);\n cursor: nwse-resize;\n}\n.corner__block-start-inline-end, .corner__block-end-inline-start {\n position: fixed;\n block-size: var(--ch-popover-resize-threshold);\n inline-size: var(--ch-popover-resize-threshold);\n cursor: nesw-resize;\n}\n.corner__block-start-inline-start {\n inset-block-start: var(--ch-popover-resize__block-start);\n inset-inline-start: var(--ch-popover-resize__inline-start);\n}\n.corner__block-end-inline-end {\n inset-block-end: var(--ch-popover-resize__block-end);\n inset-inline-end: var(--ch-popover-resize__inline-end);\n}\n.corner__block-start-inline-end {\n inset-block-start: var(--ch-popover-resize__block-start);\n inset-inline-end: var(--ch-popover-resize__inline-end);\n}\n.corner__block-end-inline-start {\n inset-block-end: var(--ch-popover-resize__block-end);\n inset-inline-start: var(--ch-popover-resize__inline-start);\n}\n\n:host(.ch-popover-rtl) .corner__block-start-inline-start,\n:host(.ch-popover-rtl) .corner__block-end-inline-end {\n cursor: nesw-resize;\n}\n\n:host(.ch-popover-rtl) .corner__block-start-inline-end,\n:host(.ch-popover-rtl) .corner__block-end-inline-start {\n cursor: nwse-resize;\n}\n\n.resize-layer {\n position: fixed;\n inset: 0;\n pointer-events: none;\n}","import { Host, h } from \"@stencil/core\";\nimport { forceCSSMinMax, isRTL } from \"../../common/utils\";\nimport { SyncWithRAF } from \"../../common/sync-with-frames\";\nimport { getAlignmentValue } from \"./utils\";\nconst DRAGGING_CLASS = \"gx-popover-dragging\";\nconst POPOVER_PREVENT_FLICKERING_CLASS = \"gx-popover-prevent-flickering\";\nconst RESIZING_CLASS = \"ch-popover-resizing\";\n// Custom vars\nconst POPOVER_ALIGN_BLOCK = \"--ch-popover-block\";\nconst POPOVER_ALIGN_INLINE = \"--ch-popover-inline\";\nconst POPOVER_SEPARATION_X = \"--ch-popover-separation-x\";\nconst POPOVER_SEPARATION_Y = \"--ch-popover-separation-y\";\nconst POPOVER_ACTION_WIDTH = \"--ch-popover-action-width\";\nconst POPOVER_ACTION_HEIGHT = \"--ch-popover-action-height\";\nconst POPOVER_ACTION_LEFT = \"--ch-popover-action-left\";\nconst POPOVER_ACTION_TOP = \"--ch-popover-action-top\";\nconst POPOVER_DRAGGED_X = \"--ch-popover-dragged-x\";\nconst POPOVER_DRAGGED_Y = \"--ch-popover-dragged-y\";\nconst POPOVER_BLOCK_SIZE = \"--ch-popover-block-size\";\nconst POPOVER_INLINE_SIZE = \"--ch-popover-inline-size\";\nconst POPOVER_BORDER_BLOCK_START_SIZE = \"--ch-popover-border-block-start-width\";\nconst POPOVER_BORDER_BLOCK_END_SIZE = \"--ch-popover-border-block-end-width\";\nconst POPOVER_BORDER_INLINE_START_SIZE = \"--ch-popover-border-inline-start-width\";\nconst POPOVER_BORDER_INLINE_END_SIZE = \"--ch-popover-border-inline-end-width\";\nconst POPOVER_RTL_CLASS = \"ch-popover-rtl\";\nconst POPOVER_RTL = \"--ch-popover-rtl\";\nconst POPOVER_RTL_VALUE = \"-1\";\nconst addCursorInDocument = (cursor) => (document.body.style.cursor = cursor);\nconst resizingCursorDictionary = {\n \"block-start\": () => addCursorInDocument(\"ns-resize\"),\n \"block-end\": () => addCursorInDocument(\"ns-resize\"),\n \"inline-start\": () => addCursorInDocument(\"ew-resize\"),\n \"inline-end\": () => addCursorInDocument(\"ew-resize\"),\n \"block-start-inline-start\": rtl => addCursorInDocument(rtl ? \"nesw-resize\" : \"nwse-resize\"),\n \"block-start-inline-end\": rtl => addCursorInDocument(rtl ? \"nwse-resize\" : \"nesw-resize\"),\n \"block-end-inline-start\": rtl => addCursorInDocument(rtl ? \"nwse-resize\" : \"nesw-resize\"),\n \"block-end-inline-end\": rtl => addCursorInDocument(rtl ? \"nesw-resize\" : \"nwse-resize\")\n};\n// Utils\nconst fromPxToNumber = (pxValue) => Number(pxValue.replace(\"px\", \"\").trim());\nconst setProperty = (element, property, value) => element.style.setProperty(property, `${value}px`);\nconst addPopoverTargetElement = (actionElement, popoverElement, addAction) => {\n if (actionElement && addAction) {\n actionElement.popoverTargetElement = popoverElement;\n }\n};\nconst removePopoverTargetElement = (actionElement) => {\n if (actionElement) {\n actionElement.popoverTargetElement = undefined;\n }\n};\n/**\n * The `ch-popover` component represents a popover container that is positioned\n * relative to an element, but placed on the top layer using `position: fixed`.\n */\nexport class ChPopover {\n constructor() {\n this.actualBlockAlign = undefined;\n this.actualInlineAlign = undefined;\n this.relativePopover = false;\n this.resizing = false;\n this.actionById = false;\n this.actionElement = undefined;\n this.allowDrag = \"no\";\n this.blockAlign = \"center\";\n this.firstLayer = true;\n this.hidden = true;\n this.inlineAlign = \"center\";\n this.mode = \"auto\";\n this.responsiveAlignment = true;\n this.resizable = false;\n }\n // Sync computations with frames\n #borderSizeRAF; // Don't allocate memory until needed when dragging\n #dragRAF; // Don't allocate memory until needed when dragging\n #positionAdjustRAF; // Don't allocate memory until needed\n #resizeRAF; // Don't allocate memory until needed when dragging\n #adjustAlignment = false;\n // Watchers\n #checkPositionWatcher = false;\n #checkBorderSizeWatcher = false;\n #borderSizeObserver;\n #resizeObserver;\n #rtlWatcher;\n // Drag\n #draggedDistanceX = 0;\n #draggedDistanceY = 0;\n #dragging = false;\n #initialDragEvent;\n #lastDragEvent;\n #isRTLDirection;\n // Resize\n #currentEdge;\n #draggedDistanceXForResize = 0;\n #draggedDistanceYForResize = 0;\n #maxBlockSize = 0;\n #maxInlineSize = 0;\n #minBlockSize = 0;\n #minInlineSize = 0;\n #resizeByDirectionDictionary = {\n block: (popoverRect, direction) => {\n let currentDraggedDistanceY = this.#lastDragEvent.clientY - this.#initialDragEvent.clientY;\n // Start direction inverts the increment\n if (direction === \"start\") {\n currentDraggedDistanceY = -currentDraggedDistanceY;\n }\n const newBlockSize = popoverRect.height + currentDraggedDistanceY;\n const newRestrictedBlockSize = forceCSSMinMax(newBlockSize, this.#minBlockSize, this.#maxBlockSize);\n // Do not apply resizes or translations if the control is at the minimum\n // or maximum size\n if (newRestrictedBlockSize === popoverRect.height) {\n return;\n }\n // - - - - - - - - - - - - - DOM write operations - - - - - - - - - - - - -\n // By resizing the start edge the control is translated to improve the UX\n if (direction === \"start\") {\n this.#draggedDistanceYForResize -= currentDraggedDistanceY;\n setProperty(this.el, POPOVER_DRAGGED_Y, this.#draggedDistanceYForResize);\n }\n setProperty(this.el, POPOVER_BLOCK_SIZE, newRestrictedBlockSize);\n },\n inline: (popoverRect, direction) => {\n let currentDraggedDistanceX = this.#lastDragEvent.clientX - this.#initialDragEvent.clientX;\n if (this.#isRTLDirection) {\n currentDraggedDistanceX = -currentDraggedDistanceX;\n }\n // Start direction inverts the increment\n if (direction === \"start\") {\n currentDraggedDistanceX = -currentDraggedDistanceX;\n }\n const newInlineSize = popoverRect.width + currentDraggedDistanceX;\n const newRestrictedInlineSize = forceCSSMinMax(newInlineSize, this.#minInlineSize, this.#maxInlineSize);\n // Do not apply resizes or translations if the control is at the minimum\n // or maximum size\n if (newRestrictedInlineSize === popoverRect.width) {\n return;\n }\n // - - - - - - - - - - - - - DOM write operations - - - - - - - - - - - - -\n // By resizing the start edge the control is translated to improve the UX\n if (direction === \"start\") {\n this.#draggedDistanceXForResize -= currentDraggedDistanceX;\n setProperty(this.el, POPOVER_DRAGGED_X, this.#draggedDistanceXForResize);\n }\n setProperty(this.el, POPOVER_INLINE_SIZE, newRestrictedInlineSize);\n }\n };\n #resizeEdgesAndCornersDictionary = {\n \"block-start\": popoverRect => this.#resizeByDirectionDictionary.block(popoverRect, \"start\"),\n \"block-end\": popoverRect => this.#resizeByDirectionDictionary.block(popoverRect, \"end\"),\n \"inline-start\": popoverRect => this.#resizeByDirectionDictionary.inline(popoverRect, \"start\"),\n \"inline-end\": popoverRect => this.#resizeByDirectionDictionary.inline(popoverRect, \"end\"),\n \"block-start-inline-start\": popoverRect => {\n this.#resizeByDirectionDictionary.block(popoverRect, \"start\");\n this.#resizeByDirectionDictionary.inline(popoverRect, \"start\");\n },\n \"block-start-inline-end\": popoverRect => {\n this.#resizeByDirectionDictionary.block(popoverRect, \"start\");\n this.#resizeByDirectionDictionary.inline(popoverRect, \"end\");\n },\n \"block-end-inline-start\": popoverRect => {\n this.#resizeByDirectionDictionary.block(popoverRect, \"end\");\n this.#resizeByDirectionDictionary.inline(popoverRect, \"start\");\n },\n \"block-end-inline-end\": popoverRect => {\n this.#resizeByDirectionDictionary.block(popoverRect, \"end\");\n this.#resizeByDirectionDictionary.inline(popoverRect, \"end\");\n }\n };\n // Refs\n #resizeLayer;\n #windowRef;\n el;\n handleActionChange(newActionElement, oldActionElement) {\n // Reset dragged distance\n this.#draggedDistanceX = 0;\n this.#draggedDistanceY = 0;\n // Remove previous action element\n removePopoverTargetElement(oldActionElement);\n addPopoverTargetElement(newActionElement, this.el, !this.actionById);\n // Schedule update for watchers\n this.#checkPositionWatcher = true;\n }\n handleBlockChange() {\n this.#adjustAlignment = true;\n }\n handleHiddenChange(newHiddenValue) {\n // Schedule update for watchers\n this.#checkBorderSizeWatcher = true;\n this.#checkPositionWatcher = true;\n // Update the popover visualization\n if (newHiddenValue) {\n if (this.firstLayer) {\n this.#avoidFlickeringInTheNextRender(true);\n }\n this.el.hidePopover();\n }\n else {\n this.el.showPopover();\n }\n }\n handleInlineChange() {\n this.#adjustAlignment = true;\n }\n resizableChanged() {\n // Schedule update for border size watcher\n this.#checkBorderSizeWatcher = true;\n }\n /**\n * Emitted when the popover is opened.\n */\n popoverOpened;\n /**\n * Emitted when the popover is closed.\n */\n popoverClosed;\n #addDraggingClass = () => {\n if (!this.#dragging) {\n this.el.classList.add(DRAGGING_CLASS);\n this.#dragging = true;\n }\n };\n #removeDraggingClass = () => {\n this.el.classList.remove(DRAGGING_CLASS);\n this.#dragging = false;\n };\n #avoidFlickeringInTheNextRender = (addClass) => {\n if (addClass) {\n // Class to prevent flickering in the first position adjustment\n this.el.classList.add(POPOVER_PREVENT_FLICKERING_CLASS);\n }\n else {\n this.el.classList.remove(POPOVER_PREVENT_FLICKERING_CLASS);\n }\n };\n #setPositionWatcher = () => {\n if (!this.actionElement || this.hidden) {\n this.#removePositionWatcher();\n return;\n }\n // If it was observing the previous container, disconnect the observer\n if (this.#resizeObserver) {\n this.#resizeObserver.disconnect();\n }\n this.#positionAdjustRAF ??= new SyncWithRAF();\n this.#resizeObserver ??= new ResizeObserver(this.#updatePositionRAF);\n this.#resizeObserver.observe(this.actionElement);\n this.#resizeObserver.observe(this.el);\n // Faster first render. Don't wait until the next animation frame\n this.#updatePosition();\n // The popover's position is now set, so we no longer have to hide it\n if (this.firstLayer) {\n requestAnimationFrame(() => {\n this.#avoidFlickeringInTheNextRender(false);\n });\n }\n // Listeners\n this.#windowRef.addEventListener(\"resize\", this.#updatePositionRAF, {\n passive: true\n });\n document.addEventListener(\"scroll\", this.#updatePositionRAF, {\n capture: true,\n passive: true\n });\n };\n #updatePositionRAF = () => {\n this.#positionAdjustRAF.perform(this.#updatePosition);\n };\n #updatePosition = () => {\n // - - - - - - - - - - - - - DOM read operations - - - - - - - - - - - - -\n const computedStyle = getComputedStyle(this.el);\n const actionRect = this.actionElement.getBoundingClientRect();\n const popoverRect = this.el.getBoundingClientRect();\n if (!this.relativePopover) {\n const documentRect = document.documentElement.getBoundingClientRect();\n const insetInlineStart = this.#isRTLDirection\n ? documentRect.width - (actionRect.left + actionRect.width)\n : actionRect.left;\n // - - - - - - - - - - - - - DOM write operations - - - - - - - - - - - - -\n setProperty(this.el, POPOVER_ACTION_WIDTH, actionRect.width);\n setProperty(this.el, POPOVER_ACTION_HEIGHT, actionRect.height);\n setProperty(this.el, POPOVER_ACTION_LEFT, insetInlineStart);\n setProperty(this.el, POPOVER_ACTION_TOP, actionRect.top);\n }\n this.#setResponsiveAlignment(actionRect, popoverRect, computedStyle);\n };\n #setResponsiveAlignment = (actionRect, popoverRect, computedStyle) => {\n actionRect ??= this.actionElement.getBoundingClientRect();\n popoverRect ??= this.el.getBoundingClientRect();\n computedStyle ??= getComputedStyle(this.el);\n const separationX = computedStyle.getPropertyValue(POPOVER_SEPARATION_X);\n const separationY = computedStyle.getPropertyValue(POPOVER_SEPARATION_Y);\n // Alignment\n const blockAlignmentValue = getAlignmentValue(this.blockAlign, actionRect.height, popoverRect.height, fromPxToNumber(separationY));\n setProperty(this.el, POPOVER_ALIGN_BLOCK, blockAlignmentValue);\n const inlineAlignmentValue = getAlignmentValue(this.inlineAlign, actionRect.width, popoverRect.width, fromPxToNumber(separationX));\n setProperty(this.el, POPOVER_ALIGN_INLINE, inlineAlignmentValue);\n };\n #removePositionWatcher = () => {\n if (this.#resizeObserver) {\n this.#resizeObserver.disconnect();\n this.#resizeObserver = null; // Free the memory\n }\n // Remove listeners\n this.#windowRef.removeEventListener(\"resize\", this.#updatePositionRAF);\n document.removeEventListener(\"scroll\", this.#updatePositionRAF, {\n capture: true\n });\n };\n #handlePopoverToggle = (event) => {\n const willBeHidden = !(event.newState === \"open\");\n this.hidden = willBeHidden;\n // Emit events only when the action is committed by the user\n if (willBeHidden) {\n this.popoverClosed.emit();\n }\n else {\n this.popoverOpened.emit();\n }\n };\n // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n // Drag implementation\n // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n #handleMouseDown = (event) => {\n // We should not add preventDefault in this instance, because we would\n // prevent some normal actions like clicking a button or focusing an input\n this.#dragRAF ||= new SyncWithRAF();\n this.#initialDragEvent = event;\n // Add listeners\n document.addEventListener(\"mousemove\", this.#trackElementDragRAF, {\n capture: true\n });\n document.addEventListener(\"mouseup\", this.#handleDragEnd, {\n capture: true,\n passive: true\n });\n };\n #trackElementDragRAF = (event) => {\n this.#dragRAF.perform(this.#trackElementDrag, () => {\n // Improve drag UX by not selecting any button or clicking interactive\n // elements\n event.preventDefault();\n // We remove the pointer-events and user-select properties after the first\n // \"mousemove\", otherwise double clicking to select text would not work\n this.#addDraggingClass();\n this.#lastDragEvent = event;\n });\n };\n #trackElementDrag = () => {\n // - - - - - - - - - - - - - DOM read operations - - - - - - - - - - - - -\n const currentDraggedDistanceX = this.#lastDragEvent.clientX - this.#initialDragEvent.clientX;\n const currentDraggedDistanceY = this.#lastDragEvent.clientY - this.#initialDragEvent.clientY;\n // - - - - - - - - - - - - - DOM write operations - - - - - - - - - - - - -\n // Update total dragged distance in X\n if (currentDraggedDistanceX !== 0) {\n this.#draggedDistanceX += this.#isRTLDirection // Set dragged distance depending on RTL value\n ? -currentDraggedDistanceX\n : currentDraggedDistanceX;\n setProperty(this.el, POPOVER_DRAGGED_X, this.#draggedDistanceX);\n }\n // Update total dragged distance in Y\n if (currentDraggedDistanceY !== 0) {\n this.#draggedDistanceY += currentDraggedDistanceY;\n setProperty(this.el, POPOVER_DRAGGED_Y, this.#draggedDistanceY);\n }\n // Update last point\n this.#initialDragEvent = this.#lastDragEvent;\n };\n #handleDragEnd = () => {\n // Cancel RAF to prevent access to undefined references\n if (this.#dragRAF) {\n this.#dragRAF.cancel();\n }\n // Remove listeners\n document.removeEventListener(\"mousemove\", this.#trackElementDragRAF, {\n capture: true\n });\n document.removeEventListener(\"mouseup\", this.#handleDragEnd, {\n capture: true\n });\n this.#removeDraggingClass();\n // Free the memory\n this.#dragRAF = null;\n this.#initialDragEvent = null;\n this.#lastDragEvent = null;\n };\n // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n // Resize implementation\n // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n #handleEdgeResize = (edge) => (event) => {\n this.resizing = true;\n this.#resizeRAF ||= new SyncWithRAF();\n this.#currentEdge = edge;\n this.#initialDragEvent = event;\n // Specify the cursor for the resize operation. Useful to avoid showing\n // incorrect cursors during resizing\n resizingCursorDictionary[this.#currentEdge](this.#isRTLDirection);\n // Initialize drag variables to improve block-start and inline-start\n // resizing. Otherwise, the popover will always remain in the same X and Y\n // position, even when the block-start or inline-start edges are resized\n this.#draggedDistanceXForResize = this.#draggedDistanceX;\n this.#draggedDistanceYForResize = this.#draggedDistanceY;\n // Get minimum and maximum sizes on first resize operation\n const computedStyle = getComputedStyle(this.el);\n this.#maxBlockSize = fromPxToNumber(computedStyle.maxBlockSize);\n this.#maxInlineSize = fromPxToNumber(computedStyle.maxInlineSize);\n this.#minBlockSize = fromPxToNumber(computedStyle.minBlockSize);\n this.#minInlineSize = fromPxToNumber(computedStyle.minInlineSize);\n // Avoid repositioning the popover\n this.#removePositionWatcher();\n // Avoid watching border changes during the resize\n this.#removeBorderSizeWatcher();\n // Add listeners\n document.addEventListener(\"mousemove\", this.#trackElementResizeRAF, {\n capture: true\n });\n document.addEventListener(\"mouseup\", this.#handleResizeEnd, {\n capture: true,\n passive: true\n });\n };\n #trackElementResizeRAF = (event) => {\n this.#resizeRAF.perform(this.#trackElementResize, () => {\n // Improve drag UX by not selecting any button or clicking interactive\n // elements\n event.preventDefault();\n // We remove the pointer-events and user-select properties after the first\n // \"mousemove\", otherwise double clicking to select text would not work\n this.#addDraggingClass();\n this.#lastDragEvent = event;\n });\n };\n #trackElementResize = () => {\n // - - - - - - - - - - - - - DOM read operations - - - - - - - - - - - - -\n const popoverRect = this.el.getBoundingClientRect();\n // - - - - - - - - - - - - - DOM write operations - - - - - - - - - - - - -\n this.#resizeEdgesAndCornersDictionary[this.#currentEdge](popoverRect);\n // Update last point\n this.#initialDragEvent = this.#lastDragEvent;\n };\n #handleResizeEnd = () => {\n this.resizing = false;\n // Cancel RAF to prevent access to undefined references\n if (this.#resizeRAF) {\n this.#resizeRAF.cancel();\n }\n // Reset document cursor back to normal\n document.body.style.cursor = null;\n // Reset dragged distance to its original value\n setProperty(this.el, POPOVER_DRAGGED_X, this.#draggedDistanceX);\n setProperty(this.el, POPOVER_DRAGGED_Y, this.#draggedDistanceY);\n // Update the position of the popover when the resize ends\n this.#setPositionWatcher();\n // Start again watching border size changes\n this.#setBorderSizeWatcher();\n // Remove listeners\n document.removeEventListener(\"mousemove\", this.#trackElementResizeRAF, {\n capture: true\n });\n document.removeEventListener(\"mouseup\", this.#handleResizeEnd, {\n capture: true\n });\n this.#removeDraggingClass();\n // Free the memory\n this.#resizeRAF = null;\n this.#initialDragEvent = null;\n this.#lastDragEvent = null;\n };\n /**\n * This observer watches the size of each border in the control to adjust the\n * position of the invisible resize elements (edges and corners).\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #setBorderSizeWatcher = () => {\n if (!this.resizable || this.hidden) {\n this.#removeBorderSizeWatcher();\n return;\n }\n this.#borderSizeRAF ??= new SyncWithRAF();\n this.#borderSizeObserver = new ResizeObserver(this.#updateBorderSizeRAF);\n // Observe the size of the edges to know if the border\n this.#borderSizeObserver.observe(this.el, { box: \"border-box\" });\n this.#borderSizeObserver.observe(this.#resizeLayer);\n };\n #updateBorderSizeRAF = () => {\n this.#borderSizeRAF.perform(this.#updateBorderSize);\n };\n #updateBorderSize = () => {\n // - - - - - - - - - - - - - DOM read operations - - - - - - - - - - - - -\n const computedStyle = getComputedStyle(this.el);\n // - - - - - - - - - - - - - DOM write operations - - - - - - - - - - - - -\n this.el.style.setProperty(POPOVER_BORDER_BLOCK_START_SIZE, computedStyle.borderBlockStartWidth);\n this.el.style.setProperty(POPOVER_BORDER_BLOCK_END_SIZE, computedStyle.borderBlockEndWidth);\n this.el.style.setProperty(POPOVER_BORDER_INLINE_START_SIZE, computedStyle.borderInlineStartWidth);\n this.el.style.setProperty(POPOVER_BORDER_INLINE_END_SIZE, computedStyle.borderInlineEndWidth);\n };\n #removeBorderSizeWatcher = () => {\n if (this.#borderSizeObserver) {\n this.#borderSizeObserver.disconnect();\n this.#borderSizeObserver = null; // Free the memory\n }\n this.#borderSizeRAF = null; // Free the memory\n };\n connectedCallback() {\n this.#windowRef = window;\n // Responsive alignments\n this.actualBlockAlign = this.blockAlign;\n this.actualInlineAlign = this.inlineAlign;\n // Set RTL watcher\n this.#rtlWatcher = new MutationObserver(() => {\n this.#isRTLDirection = isRTL();\n if (this.#isRTLDirection) {\n this.el.style.setProperty(POPOVER_RTL, POPOVER_RTL_VALUE);\n this.el.classList.add(POPOVER_RTL_CLASS);\n }\n else {\n this.el.style.removeProperty(POPOVER_RTL);\n this.el.classList.remove(POPOVER_RTL_CLASS);\n }\n });\n if (this.firstLayer) {\n this.#avoidFlickeringInTheNextRender(true);\n }\n // Observe the dir attribute in the document\n this.#rtlWatcher.observe(document.documentElement, {\n attributeFilter: [\"dir\"]\n });\n }\n componentWillRender() {\n if (this.#checkPositionWatcher) {\n this.#checkPositionWatcher = false;\n // Update watchers\n this.#setPositionWatcher();\n }\n if (this.#checkBorderSizeWatcher) {\n this.#checkBorderSizeWatcher = false;\n // Wait until the resize edges have been rendered\n requestAnimationFrame(() => {\n this.#setBorderSizeWatcher();\n });\n }\n if (this.#adjustAlignment) {\n this.#setResponsiveAlignment();\n }\n }\n componentDidLoad() {\n // Initialize popoverTargetElement\n addPopoverTargetElement(this.actionElement, this.el, !this.actionById);\n // Initialize watchers\n this.#setPositionWatcher();\n this.#setBorderSizeWatcher();\n if (!this.hidden) {\n this.el.showPopover();\n }\n }\n disconnectedCallback() {\n this.#removePositionWatcher();\n this.#removeBorderSizeWatcher();\n // If the action element still exists, remove the reference\n removePopoverTargetElement(this.actionElement);\n // Defensive programming. Make sure the document does not have any unwanted handler\n this.#handleDragEnd();\n // Disconnect RTL watcher\n if (this.#rtlWatcher) {\n this.#rtlWatcher.disconnect();\n this.#rtlWatcher = null; // Free the memory\n }\n }\n render() {\n return (h(Host, { class: {\n \"gx-popover-header-drag\": !this.hidden && this.allowDrag === \"header\",\n [RESIZING_CLASS]: this.resizing\n }, popover: this.mode, onMouseDown: this.allowDrag === \"box\" ? this.#handleMouseDown : null, onToggle: this.#handlePopoverToggle }, this.allowDrag === \"header\" && (h(\"div\", { class: \"header\", part: \"header\", onMouseDown: this.#handleMouseDown }, h(\"slot\", { name: \"header\" }))), h(\"slot\", null), this.resizable &&\n !this.hidden && [\n h(\"div\", { class: \"edge__block-start\", onMouseDown: this.#handleEdgeResize(\"block-start\") }),\n h(\"div\", { class: \"edge__inline-end\", onMouseDown: this.#handleEdgeResize(\"inline-end\") }),\n h(\"div\", { class: \"edge__block-end\", onMouseDown: this.#handleEdgeResize(\"block-end\") }),\n h(\"div\", { class: \"edge__inline-start\", onMouseDown: this.#handleEdgeResize(\"inline-start\") }),\n h(\"div\", { class: \"corner__block-start-inline-start\", onMouseDown: this.#handleEdgeResize(\"block-start-inline-start\") }),\n h(\"div\", { class: \"corner__block-start-inline-end\", onMouseDown: this.#handleEdgeResize(\"block-start-inline-end\") }),\n h(\"div\", { class: \"corner__block-end-inline-start\", onMouseDown: this.#handleEdgeResize(\"block-end-inline-start\") }),\n h(\"div\", { class: \"corner__block-end-inline-end\", onMouseDown: this.#handleEdgeResize(\"block-end-inline-end\") }),\n h(\"div\", { class: \"resize-layer\", ref: el => (this.#resizeLayer = el) })\n ]));\n }\n static get is() { return \"ch-popover\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"popover.scss\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"popover.css\"]\n };\n }\n static get properties() {\n return {\n \"actionById\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"`true` if the `actionElement` binds the ch-popover using an external ID.\\nIf so, the `popoverTargetElement` property won't be configured in the\\naction element.\"\n },\n \"attribute\": \"action-by-id\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"actionElement\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"PopoverActionElement\",\n \"resolved\": \"HTMLButtonElement | HTMLInputElement\",\n \"references\": {\n \"PopoverActionElement\": {\n \"location\": \"import\",\n \"path\": \"./types\",\n \"id\": \"src/components/popover/types.ts::PopoverActionElement\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies a reference of the action that controls the popover control.\"\n }\n },\n \"allowDrag\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"box\\\" | \\\"header\\\" | \\\"no\\\"\",\n \"resolved\": \"\\\"box\\\" | \\\"header\\\" | \\\"no\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the drag behavior of the popover.\\nIf `allowDrag === \\\"header\\\"`, a slot with the `\\\"header\\\"` name will be\\navailable to place the header content.\"\n },\n \"attribute\": \"allow-drag\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"no\\\"\"\n },\n \"blockAlign\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"ChPopoverAlign\",\n \"resolved\": \"\\\"center\\\" | \\\"inside-end\\\" | \\\"inside-start\\\" | \\\"outside-end\\\" | \\\"outside-start\\\"\",\n \"references\": {\n \"ChPopoverAlign\": {\n \"location\": \"import\",\n \"path\": \"./types\",\n \"id\": \"src/components/popover/types.ts::ChPopoverAlign\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the block alignment of the window.\"\n },\n \"attribute\": \"block-align\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"center\\\"\"\n },\n \"firstLayer\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"`true` if the control is not stacked with another top layer.\"\n },\n \"attribute\": \"first-layer\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"hidden\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies whether the popover is hidden or visible.\"\n },\n \"attribute\": \"hidden\",\n \"reflect\": true,\n \"defaultValue\": \"true\"\n },\n \"inlineAlign\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"ChPopoverAlign\",\n \"resolved\": \"\\\"center\\\" | \\\"inside-end\\\" | \\\"inside-start\\\" | \\\"outside-end\\\" | \\\"outside-start\\\"\",\n \"references\": {\n \"ChPopoverAlign\": {\n \"location\": \"import\",\n \"path\": \"./types\",\n \"id\": \"src/components/popover/types.ts::ChPopoverAlign\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the inline alignment of the window.\"\n },\n \"attribute\": \"inline-align\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"center\\\"\"\n },\n \"mode\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"auto\\\" | \\\"manual\\\"\",\n \"resolved\": \"\\\"auto\\\" | \\\"manual\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Popovers that have the `\\\"auto\\\"` state can be \\\"light dismissed\\\" by\\nselecting outside the popover area, and generally only allow one popover\\nto be displayed on-screen at a time. By contrast, `\\\"manual\\\"` popovers must\\nalways be explicitly hidden, but allow for use cases such as nested\\npopovers in menus.\"\n },\n \"attribute\": \"mode\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"auto\\\"\"\n },\n \"responsiveAlignment\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies if the popover is automatically aligned is the content overflow\\nthe window.\"\n },\n \"attribute\": \"responsive-alignment\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"resizable\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies whether the control can be resized. If `true` the control can be\\nresized at runtime by dragging the edges or corners.\"\n },\n \"attribute\": \"resizable\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n }\n };\n }\n static get states() {\n return {\n \"actualBlockAlign\": {},\n \"actualInlineAlign\": {},\n \"relativePopover\": {},\n \"resizing\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"popoverOpened\",\n \"name\": \"popoverOpened\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the popover is opened.\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }, {\n \"method\": \"popoverClosed\",\n \"name\": \"popoverClosed\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the popover is closed.\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"actionElement\",\n \"methodName\": \"handleActionChange\"\n }, {\n \"propName\": \"blockAlign\",\n \"methodName\": \"handleBlockChange\"\n }, {\n \"propName\": \"hidden\",\n \"methodName\": \"handleHiddenChange\"\n }, {\n \"propName\": \"inlineAlign\",\n \"methodName\": \"handleInlineChange\"\n }, {\n \"propName\": \"resizable\",\n \"methodName\": \"resizable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B,wBAAwB,CAAC,EAAE,CAAC;gBACpH,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gCAAgC,EAAE,WAAW,EAAE,uBAAA,IAAI,yBAAkB,MAAtB,IAAI,EAAmB,wBAAwB,CAAC,EAAE,CAAC;gBACpH,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,8BAA8B,EAAE,WAAW,EAAE,uBAAA,IAAI,yBAAkB,MAAtB,IAAI,EAAmB,sBAAsB,CAAC,EAAE,CAAC;gBAChH,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,EAAE,KAAK,uBAAA,IAAI,gBAAgB,EAAE,MAAA,CAAC,EAAE,CAAC;aAC3E,CAAC,EAAE;SACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__classPrivateFieldGet","__classPrivateFieldSet"],"sources":["node_modules/@genexus/chameleon-controls-library/dist/collection/components/dropdown/dropdown.css?tag=ch-dropdown&encapsulation=shadow","node_modules/@genexus/chameleon-controls-library/dist/collection/components/dropdown/dropdown.js","node_modules/@genexus/chameleon-controls-library/dist/collection/components/popover/utils.js","node_modules/@genexus/chameleon-controls-library/dist/collection/components/popover/popover.css?tag=ch-popover&encapsulation=shadow","node_modules/@genexus/chameleon-controls-library/dist/collection/components/popover/popover.js"],"sourcesContent":[":where(a, button) {\n all: unset;\n}\n\na,\nbutton {\n display: flex;\n align-items: center;\n inline-size: 100%;\n block-size: 100%;\n cursor: pointer;\n}\n\n*,\n::after,\n::before {\n box-sizing: border-box;\n}\n\n:host {\n --ch-dropdown-item__image-size: 0.875em;\n --ch-dropdown-item__background-image-size: 100%;\n --ch-dropdown-separation: 0px;\n --ch-dropdown-separation-x: var(--ch-dropdown-separation);\n --ch-dropdown-separation-y: var(--ch-dropdown-separation);\n display: flex;\n position: relative;\n inline-size: 100%;\n block-size: 100%;\n}\n\n.expandable-button {\n justify-content: center;\n align-self: center;\n position: relative;\n z-index: 108;\n}\n\n::slotted([slot=action]) {\n pointer-events: none;\n}\n\nch-popover {\n --ch-popover-separation-x: var(--ch-dropdown-separation-x);\n --ch-popover-separation-y: var(--ch-dropdown-separation-y);\n}\n\n.list {\n display: flex;\n flex-direction: column;\n}\n\n.action {\n text-align: start;\n}\n\n.pseudo-img--start::before,\n.pseudo-img--end::after {\n content: \"\";\n display: block;\n inline-size: var(--ch-dropdown-item__image-size);\n block-size: var(--ch-dropdown-item__image-size);\n min-inline-size: var(--ch-dropdown-item__image-size);\n}\n\n.pseudo-img--start {\n --ch-dropdown-item-img: var(--ch-dropdown-item-start-img);\n}\n\n.pseudo-img--end {\n --ch-dropdown-item-img: var(--ch-dropdown-item-end-img);\n}\n\n.start-img-type--background::before,\n.end-img-type--background::after {\n background: no-repeat center/var(--ch-dropdown-item__background-image-size) var(--ch-dropdown-item-img);\n}\n\n.start-img-type--mask::before,\n.end-img-type--mask::after {\n -webkit-mask: var(--ch-dropdown-item-img) 50% 50%/var(--ch-dropdown-item__background-image-size) var(--ch-dropdown-item__background-image-size) no-repeat;\n background-color: currentColor;\n}\n\n.content {\n inline-size: 100%;\n}","import { Host, h } from \"@stencil/core\";\nimport { focusComposedPath } from \"../common/helpers\";\nimport { isPseudoElementImg } from \"../../common/utils\";\nconst mapDropdownAlignToChWindowAlign = {\n OutsideStart: \"outside-start\",\n InsideStart: \"inside-start\",\n Center: \"center\",\n InsideEnd: \"inside-end\",\n OutsideEnd: \"outside-end\"\n};\nconst DROPDOWN_TAG_NAME = \"ch-dropdown\";\nconst WINDOW_ID = \"window\";\nconst elementIsDropdown = (element) => element?.tagName?.toLowerCase() === DROPDOWN_TAG_NAME;\nexport class ChDropDown {\n constructor() {\n this.actionGroupParent = false;\n this.buttonAccessibleName = undefined;\n this.caption = undefined;\n this.endImgSrc = undefined;\n this.endImgType = \"background\";\n this.expanded = false;\n this.href = undefined;\n this.leaf = false;\n this.level = undefined;\n this.nestedDropdown = false;\n this.openOnFocus = false;\n this.position = \"Center_OutsideEnd\";\n this.shortcut = undefined;\n this.showFooter = false;\n this.showHeader = false;\n this.startImgSrc = undefined;\n this.startImgType = \"background\";\n }\n #firstExpanded = false;\n // Refs\n #mainAction;\n el;\n handleExpandedChange(newExpandedValue) {\n if (newExpandedValue) {\n // Click\n document.addEventListener(\"click\", this.#closeOnClickOutside, {\n capture: true,\n passive: true\n });\n }\n else {\n // Click\n document.removeEventListener(\"click\", this.#closeOnClickOutside, {\n capture: true\n });\n // This is a WA to avoid a StencilJS's (or browser) issue when reusing\n // the top layer and interacting with the Tab key in the same top layer.\n // After the second opening, the Tab key stops working\n this.#mainAction.popoverTargetElement = null;\n }\n }\n /**\n * Fired when the visibility of the dropdown section is changed by user\n * interaction.\n */\n expandedChange;\n onActionClick() {\n // this.#closeDropdown();\n // @todo This behavior must be specified by a property\n // this.returnFocusToButton();\n }\n onRecursiveClose(event) {\n const stopperLevel = event.detail;\n if (this.level === stopperLevel) {\n event.stopPropagation();\n }\n this.#closeDropdown();\n }\n /**\n * Focus the dropdown action.\n */\n async focusElement() {\n this.#mainAction.focus();\n }\n /**\n * Collapse the content of the dropdown.\n */\n async collapseDropdown() {\n if (this.expanded) {\n this.expandedChange.emit(false);\n this.expanded = false;\n }\n }\n /**\n * Expand the content of the dropdown.\n */\n async expandDropdown() {\n if (!this.expanded) {\n this.expandedChange.emit(true);\n this.expanded = true;\n }\n }\n #closeDropdownSibling = () => {\n const currentFocusedElement = focusComposedPath();\n const currentFocusedItem = currentFocusedElement[currentFocusedElement.length - 1];\n if (!elementIsDropdown(currentFocusedItem)) {\n return;\n }\n if (currentFocusedItem.level < this.level) {\n return;\n }\n // Fire an event to close all dropdown parents up to a certain level\n currentFocusedItem.dispatchEvent(new CustomEvent(\"recursiveClose\", { bubbles: true, detail: this.level }));\n };\n #closeDropdown = () => {\n this.expandedChange.emit(false);\n this.expanded = false;\n };\n /**\n * Returns focus to the expandable button when closing the dropdown. Only\n * works if `openOnFocus = \"false\"`\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n // #returnFocusToButton = () => {\n // if (!this.openOnFocus) {\n // this.#mainAction.focus();\n // }\n // };\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #closeOnClickOutside = (event) => {\n if (event.composedPath().find(el => el === this.el) === undefined) {\n this.#closeDropdown();\n }\n };\n #handleMouseEnter = (event) => {\n event.stopPropagation();\n // We first must close the current expanded dropdown, since with the\n // keyboard we could have expanded a different dropdown\n this.#closeDropdownSibling();\n if (!this.expanded) {\n this.expandedChange.emit(true);\n this.expanded = true;\n }\n };\n #handleMouseLeave = (event) => {\n event.stopPropagation();\n if (this.expanded) {\n this.expandedChange.emit(false);\n this.expanded = false;\n }\n };\n // /**\n // * Check if the next focused element is a child element of the dropdown\n // * control.\n // */\n // // eslint-disable-next-line @stencil-community/own-props-must-be-private\n // #handleKeyUpEvents = (event: KeyboardEvent) => {\n // if (event.code !== TAB_KEY) {\n // return;\n // }\n // const isChildElement = event.composedPath().includes(this.el);\n // if (isChildElement) {\n // return;\n // }\n // this.#closeDropdown();\n // };\n #handleButtonClick = (event) => {\n event.stopPropagation();\n // If the nested dropdown is expanded and its expandable button is clicked\n // with the MOUSE and not the keyboard, do not change the visibility\n if (this.nestedDropdown && this.expanded && event.pointerType) {\n return;\n }\n // if (!this.expanded) {\n // // We first must close the current expanded dropdown, since with the\n // // mouse we could have expanded a different dropdown\n // this.#closeDropdownSibling();\n // }\n this.expanded = !this.expanded;\n this.expandedChange.emit(!this.expanded);\n };\n #dropDownItemContent = () => [\n h(\"span\", { slot: \"action\", class: \"content\", part: \"content\" }, this.caption),\n !!this.shortcut && (h(\"span\", { \"aria-hidden\": \"true\", slot: \"action\", part: \"shortcut\" }, this.shortcut))\n ];\n #firstLevelRender = () => (h(\"button\", { popoverTarget: WINDOW_ID, \"aria-controls\": WINDOW_ID, \"aria-expanded\": this.expanded.toString(), \"aria-haspopup\": \"true\", \"aria-label\": this.buttonAccessibleName, class: \"expandable-button\", part: \"action button expandable-action expandable-button\", type: \"button\", onClick: this.#handleButtonClick, ref: el => (this.#mainAction = el) }, h(\"slot\", { name: \"action\" })));\n #actionRender = () => {\n const pseudoStartImage = isPseudoElementImg(this.startImgSrc, this.startImgType);\n const pseudoEndImage = isPseudoElementImg(this.endImgSrc, this.endImgType);\n return this.href ? (h(\"a\", { \"aria-controls\": !this.leaf ? WINDOW_ID : null, \"aria-expanded\": !this.leaf ? this.expanded.toString() : null, \"aria-haspopup\": !this.leaf ? \"true\" : null, class: {\n action: true,\n [`start-img-type--${this.startImgType} pseudo-img--start`]: pseudoStartImage,\n [`end-img-type--${this.endImgType} pseudo-img--end`]: pseudoEndImage\n }, part: this.leaf\n ? \"action link\"\n : \"action link expandable-action expandable-link\", href: this.href, onClick: this.#handleButtonClick, onMouseEnter: !this.leaf && !this.actionGroupParent ? this.#handleMouseEnter : null, ref: el => (this.#mainAction = el) }, this.#dropDownItemContent())) : (h(\"button\", { popoverTarget: WINDOW_ID, \"aria-controls\": !this.leaf ? WINDOW_ID : null, \"aria-expanded\": !this.leaf ? this.expanded.toString() : null, \"aria-haspopup\": !this.leaf ? \"true\" : null, class: {\n action: true,\n [`start-img-type--${this.startImgType} pseudo-img--start`]: pseudoStartImage,\n [`end-img-type--${this.endImgType} pseudo-img--end`]: pseudoEndImage\n }, part: this.leaf\n ? \"action button\"\n : \"action button expandable-action expandable-button\", type: \"button\", onMouseEnter: !this.leaf && !this.actionGroupParent ? this.#handleMouseEnter : null, onClick: this.#handleButtonClick, ref: el => (this.#mainAction = el) }, this.#dropDownItemContent()));\n };\n #popoverRender = () => {\n this.#firstExpanded ||= this.expanded;\n if (!this.#firstExpanded) {\n return \"\";\n }\n const aligns = this.position.split(\"_\");\n const alignX = aligns[0];\n const alignY = aligns[1];\n const xAlignMapping = mapDropdownAlignToChWindowAlign[alignX];\n const yAlignMapping = mapDropdownAlignToChWindowAlign[alignY];\n const noNeedToAddDivListWrapper = !this.showHeader && !this.showFooter;\n return (h(\"ch-popover\", { role: noNeedToAddDivListWrapper ? \"list\" : null, id: WINDOW_ID, part: \"window\", actionById: true, actionElement: this.#mainAction, firstLayer: this.level === -1 || this.actionGroupParent, mode: \"manual\", hidden: !this.expanded, inlineAlign: xAlignMapping, blockAlign: yAlignMapping }, noNeedToAddDivListWrapper ? (h(\"slot\", null)) : ([\n this.showHeader && h(\"slot\", { name: \"header\" }),\n h(\"div\", { role: \"list\", class: \"list\", part: \"list\" }, h(\"slot\", null)),\n this.showFooter && h(\"slot\", { name: \"footer\" })\n ])));\n };\n render() {\n return (h(Host, { role: this.level !== -1 ? \"listitem\" : null, style: !!this.startImgSrc || !!this.endImgSrc\n ? {\n \"--ch-dropdown-item-start-img\": `url(\"${this.startImgSrc}\")`,\n \"--ch-dropdown-item-end-img\": `url(\"${this.endImgSrc}\")`\n }\n : undefined, onMouseLeave: !this.actionGroupParent && this.level !== -1\n ? this.#handleMouseLeave\n : null }, this.level === -1 && !this.leaf\n ? this.#firstLevelRender()\n : this.#actionRender(), !this.leaf && this.#popoverRender()));\n }\n static get is() { return \"ch-dropdown\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"dropdown.scss\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"dropdown.css\"]\n };\n }\n static get properties() {\n return {\n \"actionGroupParent\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies if the current parent of the item is the action-group control.\"\n },\n \"attribute\": \"action-group-parent\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"buttonAccessibleName\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"This attribute lets you specify the label for the expandable button.\\nImportant for accessibility.\"\n },\n \"attribute\": \"button-accessible-name\",\n \"reflect\": false\n },\n \"caption\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the caption that the control will display.\"\n },\n \"attribute\": \"caption\",\n \"reflect\": false\n },\n \"endImgSrc\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the src of the end image.\"\n },\n \"attribute\": \"end-img-src\",\n \"reflect\": false\n },\n \"endImgType\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"ImageRender\",\n \"resolved\": \"\\\"background\\\" | \\\"img\\\" | \\\"mask\\\"\",\n \"references\": {\n \"ImageRender\": {\n \"location\": \"import\",\n \"path\": \"../../common/types\",\n \"id\": \"src/common/types.ts::ImageRender\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies how the end image will be rendered.\"\n },\n \"attribute\": \"end-img-type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"background\\\"\"\n },\n \"expanded\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"`true` to display the dropdown section.\"\n },\n \"attribute\": \"expanded\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"href\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the hyperlink of the item. If this property is defined, the\\ncontrol will render an anchor tag with this `href`. Otherwise, it will\\nrender a button tag.\"\n },\n \"attribute\": \"href\",\n \"reflect\": false\n },\n \"leaf\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies whether the item contains a subtree. `true` if the item does not\\nhave a subtree.\"\n },\n \"attribute\": \"leaf\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"level\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Level in the render at which the item is placed.\"\n },\n \"attribute\": \"level\",\n \"reflect\": false\n },\n \"nestedDropdown\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"This attribute lets you specify if the control is nested in another\\ndropdown. Useful to manage keyboard interaction.\"\n },\n \"attribute\": \"nested-dropdown\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"openOnFocus\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Determine if the dropdown section should be opened when the expandable\\nbutton of the control is focused.\\nTODO: Add implementation\"\n },\n \"attribute\": \"open-on-focus\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"position\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"DropdownPosition\",\n \"resolved\": \"\\\"Center_OutsideEnd\\\" | \\\"Center_OutsideStart\\\" | \\\"InsideEnd_OutsideEnd\\\" | \\\"InsideEnd_OutsideStart\\\" | \\\"InsideStart_OutsideEnd\\\" | \\\"InsideStart_OutsideStart\\\" | \\\"OutsideEnd_Center\\\" | \\\"OutsideEnd_InsideEnd\\\" | \\\"OutsideEnd_InsideStart\\\" | \\\"OutsideEnd_OutsideEnd\\\" | \\\"OutsideEnd_OutsideStart\\\" | \\\"OutsideStart_Center\\\" | \\\"OutsideStart_InsideEnd\\\" | \\\"OutsideStart_InsideStart\\\" | \\\"OutsideStart_OutsideEnd\\\" | \\\"OutsideStart_OutsideStart\\\"\",\n \"references\": {\n \"DropdownPosition\": {\n \"location\": \"import\",\n \"path\": \"./types\",\n \"id\": \"src/components/dropdown/types.ts::DropdownPosition\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the position of the dropdown section that is placed relative to\\nthe expandable button.\"\n },\n \"attribute\": \"position\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"Center_OutsideEnd\\\"\"\n },\n \"shortcut\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the shortcut caption that the control will display.\"\n },\n \"attribute\": \"shortcut\",\n \"reflect\": false\n },\n \"showFooter\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"`true` to make available a slot to show a footer element.\"\n },\n \"attribute\": \"show-footer\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"showHeader\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"`true` to make available a slot to show a header element.\"\n },\n \"attribute\": \"show-header\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"startImgSrc\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the src for the left img.\"\n },\n \"attribute\": \"start-img-src\",\n \"reflect\": false\n },\n \"startImgType\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"ImageRender\",\n \"resolved\": \"\\\"background\\\" | \\\"img\\\" | \\\"mask\\\"\",\n \"references\": {\n \"ImageRender\": {\n \"location\": \"import\",\n \"path\": \"../../common/types\",\n \"id\": \"src/common/types.ts::ImageRender\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies how the start image will be rendered.\"\n },\n \"attribute\": \"start-img-type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"background\\\"\"\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"expandedChange\",\n \"name\": \"expandedChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Fired when the visibility of the dropdown section is changed by user\\ninteraction.\"\n },\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"focusElement\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Focus the dropdown action.\",\n \"tags\": []\n }\n },\n \"collapseDropdown\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Collapse the content of the dropdown.\",\n \"tags\": []\n }\n },\n \"expandDropdown\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Expand the content of the dropdown.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"expanded\",\n \"methodName\": \"handleExpandedChange\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"actionClick\",\n \"method\": \"onActionClick\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"recursiveClose\",\n \"method\": \"onRecursiveClose\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=dropdown.js.map\n","const alignToImplementationMap = {\n \"outside-start\": (_, popoverSize, separation) => -popoverSize - separation,\n \"inside-start\": (_, __, separation) => separation,\n center: (actionSize, popoverSize, separation) => actionSize * 0.5 + separation - popoverSize * 0.5,\n \"inside-end\": (actionSize, popoverSize, separation) => actionSize - (separation + popoverSize),\n \"outside-end\": (actionSize, _, separation) => actionSize + separation\n};\nexport const getAlignmentValue = (align, actionSize, popoverSize, separation) => alignToImplementationMap[align](actionSize, popoverSize, separation);\n//# sourceMappingURL=utils.js.map\n","*,\n::after,\n::before {\n box-sizing: border-box;\n}\n\n:host {\n /**\n * @prop --ch-popover-block-size:\n * Specifies the block size of the popover. Useful for scenarios where the\n * popover is resizable.\n * @default max-content\n */\n --ch-popover-block-size: max-content;\n /**\n * @prop --ch-popover-inline-size:\n * Specifies the inline size of the popover. Useful for scenarios where the\n * popover is resizable.\n * @default max-content\n */\n --ch-popover-inline-size: max-content;\n /**\n * @prop --ch-popover-max-block-size:\n * Specifies the maximum block size of the popover. Useful for scenarios where the\n * popover is resizable.\n * @default auto\n */\n --ch-popover-max-block-size: auto;\n /**\n * @prop --ch-popover-max-inline-size:\n * Specifies the maximum inline size of the popover. Useful for scenarios\n * where the popover is resizable.\n * @default auto\n */\n --ch-popover-max-inline-size: auto;\n /**\n * @prop --ch-popover-min-block-size:\n * Specifies the minimum block size of the popover. Useful for scenarios where the\n * popover is resizable.\n * @default auto\n */\n --ch-popover-min-block-size: auto;\n /**\n * @prop --ch-popover-min-inline-size:\n * Specifies the minimum inline size of the popover. Useful for scenarios\n * where the popover is resizable.\n * @default auto\n */\n --ch-popover-min-inline-size: auto;\n /**\n * @prop --ch-popover-resize-threshold:\n * Specifies the size of the threshold to resize the popover.\n * @default 4px\n */\n --ch-popover-resize-threshold: 8px;\n /**\n * @prop --ch-popover-separation-x:\n * Specifies the separation between the action and popover in the x axis.\n * @default 0px\n */\n --ch-popover-separation-x: 0px;\n /**\n * @prop --ch-popover-separation-y:\n * Specifies the separation between the action and popover in the y axis.\n * @default 0px\n */\n --ch-popover-separation-y: 0px;\n --ch-popover-resize-threshold--half-negative: calc(\n var(--ch-popover-resize-threshold) * -0.5\n );\n --ch-popover-border-inline-start-width: 0px;\n --ch-popover-border-inline-end-width: 0px;\n --ch-popover-border-block-start-width: 0px;\n --ch-popover-border-block-end-width: 0px;\n --ch-popover-resize__inline-start: calc(\n var(--ch-popover-resize-threshold--half-negative) -\n var(--ch-popover-border-inline-start-width) * 0.5\n );\n --ch-popover-resize__inline-end: calc(\n var(--ch-popover-resize-threshold--half-negative) -\n var(--ch-popover-border-inline-end-width) * 0.5\n );\n --ch-popover-resize__block-start: calc(\n var(--ch-popover-resize-threshold--half-negative) -\n var(--ch-popover-border-block-start-width) * 0.5\n );\n --ch-popover-resize__block-end: calc(\n var(--ch-popover-resize-threshold--half-negative) -\n var(--ch-popover-border-block-end-width) * 0.5\n );\n --ch-popover-dragged-x: 0px;\n --ch-popover-dragged-y: 0px;\n --ch-popover-rtl: 1;\n position: fixed;\n inline-size: var(--ch-popover-inline-size);\n block-size: var(--ch-popover-block-size);\n min-inline-size: var(--ch-popover-min-inline-size);\n min-block-size: var(--ch-popover-min-block-size);\n max-inline-size: var(--ch-popover-max-inline-size);\n max-block-size: var(--ch-popover-max-block-size);\n margin: 0;\n padding: 0;\n background-color: unset;\n border: unset;\n color: unset;\n overflow: visible;\n top: 0;\n inset-inline-start: 0;\n translate: calc((var(--ch-popover-action-left) + var(--ch-popover-inline) + var(--ch-popover-dragged-x)) * var(--ch-popover-rtl)) calc(var(--ch-popover-action-top) + var(--ch-popover-block) + var(--ch-popover-dragged-y));\n}\n\n:host([hidden]) {\n display: block !important;\n visibility: hidden;\n}\n\n@supports (content-visibility: hidden) {\n :host([hidden]) {\n content-visibility: hidden;\n }\n}\n@supports not (content-visibility: hidden) {\n :host([hidden]) {\n visibility: hidden;\n }\n}\n:host(.gx-popover-prevent-flickering) {\n visibility: hidden !important;\n}\n\n:host(.gx-popover-header-drag) {\n display: grid;\n grid-template-rows: max-content 1fr;\n}\n\n:host(.gx-popover-dragging) {\n cursor: move;\n}\n:host(.gx-popover-dragging) ::slotted(*) {\n pointer-events: none;\n user-select: none;\n}\n\n:host(.ch-popover-resizing) {\n pointer-events: none;\n user-select: none;\n}\n\n.edge__block-start, .edge__block-end {\n position: fixed;\n inset-inline: min(0px, (var(--ch-popover-resize-threshold) - var(--ch-popover-border-inline-start-width)) / 2) min(0px, (var(--ch-popover-resize-threshold) - var(--ch-popover-border-inline-end-width)) / 2);\n block-size: var(--ch-popover-resize-threshold);\n cursor: ns-resize;\n}\n.edge__inline-start, .edge__inline-end {\n position: fixed;\n inset-block: min(0px, (var(--ch-popover-resize-threshold) - var(--ch-popover-border-block-start-width)) / 2) min(0px, (var(--ch-popover-resize-threshold) - var(--ch-popover-border-block-end-width)) / 2);\n inline-size: var(--ch-popover-resize-threshold);\n cursor: ew-resize;\n}\n.edge__block-start {\n inset-block-start: var(--ch-popover-resize__block-start);\n}\n.edge__block-end {\n inset-block-end: var(--ch-popover-resize__block-end);\n}\n.edge__inline-start {\n inset-inline-start: var(--ch-popover-resize__inline-start);\n}\n.edge__inline-end {\n inset-inline-end: var(--ch-popover-resize__inline-end);\n}\n\n.corner__block-start-inline-start, .corner__block-end-inline-end {\n position: fixed;\n block-size: var(--ch-popover-resize-threshold);\n inline-size: var(--ch-popover-resize-threshold);\n cursor: nwse-resize;\n}\n.corner__block-start-inline-end, .corner__block-end-inline-start {\n position: fixed;\n block-size: var(--ch-popover-resize-threshold);\n inline-size: var(--ch-popover-resize-threshold);\n cursor: nesw-resize;\n}\n.corner__block-start-inline-start {\n inset-block-start: var(--ch-popover-resize__block-start);\n inset-inline-start: var(--ch-popover-resize__inline-start);\n}\n.corner__block-end-inline-end {\n inset-block-end: var(--ch-popover-resize__block-end);\n inset-inline-end: var(--ch-popover-resize__inline-end);\n}\n.corner__block-start-inline-end {\n inset-block-start: var(--ch-popover-resize__block-start);\n inset-inline-end: var(--ch-popover-resize__inline-end);\n}\n.corner__block-end-inline-start {\n inset-block-end: var(--ch-popover-resize__block-end);\n inset-inline-start: var(--ch-popover-resize__inline-start);\n}\n\n:host(.ch-popover-rtl) .corner__block-start-inline-start,\n:host(.ch-popover-rtl) .corner__block-end-inline-end {\n cursor: nesw-resize;\n}\n\n:host(.ch-popover-rtl) .corner__block-start-inline-end,\n:host(.ch-popover-rtl) .corner__block-end-inline-start {\n cursor: nwse-resize;\n}\n\n.resize-layer {\n position: fixed;\n inset: 0;\n pointer-events: none;\n}","import { Host, h } from \"@stencil/core\";\nimport { forceCSSMinMax, isRTL } from \"../../common/utils\";\nimport { SyncWithRAF } from \"../../common/sync-with-frames\";\nimport { getAlignmentValue } from \"./utils\";\nconst DRAGGING_CLASS = \"gx-popover-dragging\";\nconst POPOVER_PREVENT_FLICKERING_CLASS = \"gx-popover-prevent-flickering\";\nconst RESIZING_CLASS = \"ch-popover-resizing\";\n// Custom vars\nconst POPOVER_ALIGN_BLOCK = \"--ch-popover-block\";\nconst POPOVER_ALIGN_INLINE = \"--ch-popover-inline\";\nconst POPOVER_SEPARATION_X = \"--ch-popover-separation-x\";\nconst POPOVER_SEPARATION_Y = \"--ch-popover-separation-y\";\nconst POPOVER_ACTION_WIDTH = \"--ch-popover-action-width\";\nconst POPOVER_ACTION_HEIGHT = \"--ch-popover-action-height\";\nconst POPOVER_ACTION_LEFT = \"--ch-popover-action-left\";\nconst POPOVER_ACTION_TOP = \"--ch-popover-action-top\";\nconst POPOVER_DRAGGED_X = \"--ch-popover-dragged-x\";\nconst POPOVER_DRAGGED_Y = \"--ch-popover-dragged-y\";\nconst POPOVER_BLOCK_SIZE = \"--ch-popover-block-size\";\nconst POPOVER_INLINE_SIZE = \"--ch-popover-inline-size\";\nconst POPOVER_BORDER_BLOCK_START_SIZE = \"--ch-popover-border-block-start-width\";\nconst POPOVER_BORDER_BLOCK_END_SIZE = \"--ch-popover-border-block-end-width\";\nconst POPOVER_BORDER_INLINE_START_SIZE = \"--ch-popover-border-inline-start-width\";\nconst POPOVER_BORDER_INLINE_END_SIZE = \"--ch-popover-border-inline-end-width\";\nconst POPOVER_RTL_CLASS = \"ch-popover-rtl\";\nconst POPOVER_RTL = \"--ch-popover-rtl\";\nconst POPOVER_RTL_VALUE = \"-1\";\nconst addCursorInDocument = (cursor) => (document.body.style.cursor = cursor);\nconst resizingCursorDictionary = {\n \"block-start\": () => addCursorInDocument(\"ns-resize\"),\n \"block-end\": () => addCursorInDocument(\"ns-resize\"),\n \"inline-start\": () => addCursorInDocument(\"ew-resize\"),\n \"inline-end\": () => addCursorInDocument(\"ew-resize\"),\n \"block-start-inline-start\": rtl => addCursorInDocument(rtl ? \"nesw-resize\" : \"nwse-resize\"),\n \"block-start-inline-end\": rtl => addCursorInDocument(rtl ? \"nwse-resize\" : \"nesw-resize\"),\n \"block-end-inline-start\": rtl => addCursorInDocument(rtl ? \"nwse-resize\" : \"nesw-resize\"),\n \"block-end-inline-end\": rtl => addCursorInDocument(rtl ? \"nesw-resize\" : \"nwse-resize\")\n};\n// Utils\nconst fromPxToNumber = (pxValue) => Number(pxValue.replace(\"px\", \"\").trim());\nconst setProperty = (element, property, value) => element.style.setProperty(property, `${value}px`);\nconst addPopoverTargetElement = (actionElement, popoverElement, addAction) => {\n if (actionElement && addAction) {\n actionElement.popoverTargetElement = popoverElement;\n }\n};\nconst removePopoverTargetElement = (actionElement) => {\n if (actionElement) {\n actionElement.popoverTargetElement = undefined;\n }\n};\n/**\n * The `ch-popover` component represents a popover container that is positioned\n * relative to an element, but placed on the top layer using `position: fixed`.\n */\nexport class ChPopover {\n constructor() {\n this.actualBlockAlign = undefined;\n this.actualInlineAlign = undefined;\n this.relativePopover = false;\n this.resizing = false;\n this.actionById = false;\n this.actionElement = undefined;\n this.allowDrag = \"no\";\n this.blockAlign = \"center\";\n this.firstLayer = true;\n this.hidden = true;\n this.inlineAlign = \"center\";\n this.mode = \"auto\";\n this.responsiveAlignment = true;\n this.resizable = false;\n }\n // Sync computations with frames\n #borderSizeRAF; // Don't allocate memory until needed when dragging\n #dragRAF; // Don't allocate memory until needed when dragging\n #positionAdjustRAF; // Don't allocate memory until needed\n #resizeRAF; // Don't allocate memory until needed when dragging\n #adjustAlignment = false;\n // Watchers\n #checkPositionWatcher = false;\n #checkBorderSizeWatcher = false;\n #borderSizeObserver;\n #resizeObserver;\n #rtlWatcher;\n // Drag\n #draggedDistanceX = 0;\n #draggedDistanceY = 0;\n #dragging = false;\n #initialDragEvent;\n #lastDragEvent;\n #isRTLDirection;\n // Resize\n #currentEdge;\n #draggedDistanceXForResize = 0;\n #draggedDistanceYForResize = 0;\n #maxBlockSize = 0;\n #maxInlineSize = 0;\n #minBlockSize = 0;\n #minInlineSize = 0;\n #resizeByDirectionDictionary = {\n block: (popoverRect, direction) => {\n let currentDraggedDistanceY = this.#lastDragEvent.clientY - this.#initialDragEvent.clientY;\n // Start direction inverts the increment\n if (direction === \"start\") {\n currentDraggedDistanceY = -currentDraggedDistanceY;\n }\n const newBlockSize = popoverRect.height + currentDraggedDistanceY;\n const newRestrictedBlockSize = forceCSSMinMax(newBlockSize, this.#minBlockSize, this.#maxBlockSize);\n // Do not apply resizes or translations if the control is at the minimum\n // or maximum size\n if (newRestrictedBlockSize === popoverRect.height) {\n return;\n }\n // - - - - - - - - - - - - - DOM write operations - - - - - - - - - - - - -\n // By resizing the start edge the control is translated to improve the UX\n if (direction === \"start\") {\n this.#draggedDistanceYForResize -= currentDraggedDistanceY;\n setProperty(this.el, POPOVER_DRAGGED_Y, this.#draggedDistanceYForResize);\n }\n setProperty(this.el, POPOVER_BLOCK_SIZE, newRestrictedBlockSize);\n },\n inline: (popoverRect, direction) => {\n let currentDraggedDistanceX = this.#lastDragEvent.clientX - this.#initialDragEvent.clientX;\n if (this.#isRTLDirection) {\n currentDraggedDistanceX = -currentDraggedDistanceX;\n }\n // Start direction inverts the increment\n if (direction === \"start\") {\n currentDraggedDistanceX = -currentDraggedDistanceX;\n }\n const newInlineSize = popoverRect.width + currentDraggedDistanceX;\n const newRestrictedInlineSize = forceCSSMinMax(newInlineSize, this.#minInlineSize, this.#maxInlineSize);\n // Do not apply resizes or translations if the control is at the minimum\n // or maximum size\n if (newRestrictedInlineSize === popoverRect.width) {\n return;\n }\n // - - - - - - - - - - - - - DOM write operations - - - - - - - - - - - - -\n // By resizing the start edge the control is translated to improve the UX\n if (direction === \"start\") {\n this.#draggedDistanceXForResize -= currentDraggedDistanceX;\n setProperty(this.el, POPOVER_DRAGGED_X, this.#draggedDistanceXForResize);\n }\n setProperty(this.el, POPOVER_INLINE_SIZE, newRestrictedInlineSize);\n }\n };\n #resizeEdgesAndCornersDictionary = {\n \"block-start\": popoverRect => this.#resizeByDirectionDictionary.block(popoverRect, \"start\"),\n \"block-end\": popoverRect => this.#resizeByDirectionDictionary.block(popoverRect, \"end\"),\n \"inline-start\": popoverRect => this.#resizeByDirectionDictionary.inline(popoverRect, \"start\"),\n \"inline-end\": popoverRect => this.#resizeByDirectionDictionary.inline(popoverRect, \"end\"),\n \"block-start-inline-start\": popoverRect => {\n this.#resizeByDirectionDictionary.block(popoverRect, \"start\");\n this.#resizeByDirectionDictionary.inline(popoverRect, \"start\");\n },\n \"block-start-inline-end\": popoverRect => {\n this.#resizeByDirectionDictionary.block(popoverRect, \"start\");\n this.#resizeByDirectionDictionary.inline(popoverRect, \"end\");\n },\n \"block-end-inline-start\": popoverRect => {\n this.#resizeByDirectionDictionary.block(popoverRect, \"end\");\n this.#resizeByDirectionDictionary.inline(popoverRect, \"start\");\n },\n \"block-end-inline-end\": popoverRect => {\n this.#resizeByDirectionDictionary.block(popoverRect, \"end\");\n this.#resizeByDirectionDictionary.inline(popoverRect, \"end\");\n }\n };\n // Refs\n #resizeLayer;\n #windowRef;\n el;\n handleActionChange(newActionElement, oldActionElement) {\n // Reset dragged distance\n this.#draggedDistanceX = 0;\n this.#draggedDistanceY = 0;\n // Remove previous action element\n removePopoverTargetElement(oldActionElement);\n addPopoverTargetElement(newActionElement, this.el, !this.actionById);\n // Schedule update for watchers\n this.#checkPositionWatcher = true;\n }\n handleBlockChange() {\n this.#adjustAlignment = true;\n }\n handleHiddenChange(newHiddenValue) {\n // Schedule update for watchers\n this.#checkBorderSizeWatcher = true;\n this.#checkPositionWatcher = true;\n // Update the popover visualization\n if (newHiddenValue) {\n if (this.firstLayer) {\n this.#avoidFlickeringInTheNextRender(true);\n }\n this.el.hidePopover();\n }\n else {\n this.el.showPopover();\n }\n }\n handleInlineChange() {\n this.#adjustAlignment = true;\n }\n resizableChanged() {\n // Schedule update for border size watcher\n this.#checkBorderSizeWatcher = true;\n }\n /**\n * Emitted when the popover is opened.\n */\n popoverOpened;\n /**\n * Emitted when the popover is closed.\n */\n popoverClosed;\n #addDraggingClass = () => {\n if (!this.#dragging) {\n this.el.classList.add(DRAGGING_CLASS);\n this.#dragging = true;\n }\n };\n #removeDraggingClass = () => {\n this.el.classList.remove(DRAGGING_CLASS);\n this.#dragging = false;\n };\n #avoidFlickeringInTheNextRender = (addClass) => {\n if (addClass) {\n // Class to prevent flickering in the first position adjustment\n this.el.classList.add(POPOVER_PREVENT_FLICKERING_CLASS);\n }\n else {\n this.el.classList.remove(POPOVER_PREVENT_FLICKERING_CLASS);\n }\n };\n #setPositionWatcher = () => {\n if (!this.actionElement || this.hidden) {\n this.#removePositionWatcher();\n return;\n }\n // If it was observing the previous container, disconnect the observer\n if (this.#resizeObserver) {\n this.#resizeObserver.disconnect();\n }\n this.#positionAdjustRAF ??= new SyncWithRAF();\n this.#resizeObserver ??= new ResizeObserver(this.#updatePositionRAF);\n this.#resizeObserver.observe(this.actionElement);\n this.#resizeObserver.observe(this.el);\n // Faster first render. Don't wait until the next animation frame\n this.#updatePosition();\n // The popover's position is now set, so we no longer have to hide it\n if (this.firstLayer) {\n requestAnimationFrame(() => {\n this.#avoidFlickeringInTheNextRender(false);\n });\n }\n // Listeners\n this.#windowRef.addEventListener(\"resize\", this.#updatePositionRAF, {\n passive: true\n });\n document.addEventListener(\"scroll\", this.#updatePositionRAF, {\n capture: true,\n passive: true\n });\n };\n #updatePositionRAF = () => {\n this.#positionAdjustRAF.perform(this.#updatePosition);\n };\n #updatePosition = () => {\n // - - - - - - - - - - - - - DOM read operations - - - - - - - - - - - - -\n const computedStyle = getComputedStyle(this.el);\n const actionRect = this.actionElement.getBoundingClientRect();\n const popoverRect = this.el.getBoundingClientRect();\n if (!this.relativePopover) {\n const documentRect = document.documentElement.getBoundingClientRect();\n const insetInlineStart = this.#isRTLDirection\n ? documentRect.width - (actionRect.left + actionRect.width)\n : actionRect.left;\n // - - - - - - - - - - - - - DOM write operations - - - - - - - - - - - - -\n setProperty(this.el, POPOVER_ACTION_WIDTH, actionRect.width);\n setProperty(this.el, POPOVER_ACTION_HEIGHT, actionRect.height);\n setProperty(this.el, POPOVER_ACTION_LEFT, insetInlineStart);\n setProperty(this.el, POPOVER_ACTION_TOP, actionRect.top);\n }\n this.#setResponsiveAlignment(actionRect, popoverRect, computedStyle);\n };\n #setResponsiveAlignment = (actionRect, popoverRect, computedStyle) => {\n actionRect ??= this.actionElement.getBoundingClientRect();\n popoverRect ??= this.el.getBoundingClientRect();\n computedStyle ??= getComputedStyle(this.el);\n const separationX = computedStyle.getPropertyValue(POPOVER_SEPARATION_X);\n const separationY = computedStyle.getPropertyValue(POPOVER_SEPARATION_Y);\n // Alignment\n const blockAlignmentValue = getAlignmentValue(this.blockAlign, actionRect.height, popoverRect.height, fromPxToNumber(separationY));\n setProperty(this.el, POPOVER_ALIGN_BLOCK, blockAlignmentValue);\n const inlineAlignmentValue = getAlignmentValue(this.inlineAlign, actionRect.width, popoverRect.width, fromPxToNumber(separationX));\n setProperty(this.el, POPOVER_ALIGN_INLINE, inlineAlignmentValue);\n };\n #removePositionWatcher = () => {\n if (this.#resizeObserver) {\n this.#resizeObserver.disconnect();\n this.#resizeObserver = null; // Free the memory\n }\n // Remove listeners\n this.#windowRef.removeEventListener(\"resize\", this.#updatePositionRAF);\n document.removeEventListener(\"scroll\", this.#updatePositionRAF, {\n capture: true\n });\n };\n #handlePopoverToggle = (event) => {\n const willBeHidden = !(event.newState === \"open\");\n this.hidden = willBeHidden;\n // Emit events only when the action is committed by the user\n if (willBeHidden) {\n this.popoverClosed.emit();\n }\n else {\n this.popoverOpened.emit();\n }\n };\n // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n // Drag implementation\n // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n #handleMouseDown = (event) => {\n // We should not add preventDefault in this instance, because we would\n // prevent some normal actions like clicking a button or focusing an input\n this.#dragRAF ||= new SyncWithRAF();\n this.#initialDragEvent = event;\n // Add listeners\n document.addEventListener(\"mousemove\", this.#trackElementDragRAF, {\n capture: true\n });\n document.addEventListener(\"mouseup\", this.#handleDragEnd, {\n capture: true,\n passive: true\n });\n };\n #trackElementDragRAF = (event) => {\n this.#dragRAF.perform(this.#trackElementDrag, () => {\n // Improve drag UX by not selecting any button or clicking interactive\n // elements\n event.preventDefault();\n // We remove the pointer-events and user-select properties after the first\n // \"mousemove\", otherwise double clicking to select text would not work\n this.#addDraggingClass();\n this.#lastDragEvent = event;\n });\n };\n #trackElementDrag = () => {\n // - - - - - - - - - - - - - DOM read operations - - - - - - - - - - - - -\n const currentDraggedDistanceX = this.#lastDragEvent.clientX - this.#initialDragEvent.clientX;\n const currentDraggedDistanceY = this.#lastDragEvent.clientY - this.#initialDragEvent.clientY;\n // - - - - - - - - - - - - - DOM write operations - - - - - - - - - - - - -\n // Update total dragged distance in X\n if (currentDraggedDistanceX !== 0) {\n this.#draggedDistanceX += this.#isRTLDirection // Set dragged distance depending on RTL value\n ? -currentDraggedDistanceX\n : currentDraggedDistanceX;\n setProperty(this.el, POPOVER_DRAGGED_X, this.#draggedDistanceX);\n }\n // Update total dragged distance in Y\n if (currentDraggedDistanceY !== 0) {\n this.#draggedDistanceY += currentDraggedDistanceY;\n setProperty(this.el, POPOVER_DRAGGED_Y, this.#draggedDistanceY);\n }\n // Update last point\n this.#initialDragEvent = this.#lastDragEvent;\n };\n #handleDragEnd = () => {\n // Cancel RAF to prevent access to undefined references\n if (this.#dragRAF) {\n this.#dragRAF.cancel();\n }\n // Remove listeners\n document.removeEventListener(\"mousemove\", this.#trackElementDragRAF, {\n capture: true\n });\n document.removeEventListener(\"mouseup\", this.#handleDragEnd, {\n capture: true\n });\n this.#removeDraggingClass();\n // Free the memory\n this.#dragRAF = null;\n this.#initialDragEvent = null;\n this.#lastDragEvent = null;\n };\n // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n // Resize implementation\n // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n #handleEdgeResize = (edge) => (event) => {\n this.resizing = true;\n this.#resizeRAF ||= new SyncWithRAF();\n this.#currentEdge = edge;\n this.#initialDragEvent = event;\n // Specify the cursor for the resize operation. Useful to avoid showing\n // incorrect cursors during resizing\n resizingCursorDictionary[this.#currentEdge](this.#isRTLDirection);\n // Initialize drag variables to improve block-start and inline-start\n // resizing. Otherwise, the popover will always remain in the same X and Y\n // position, even when the block-start or inline-start edges are resized\n this.#draggedDistanceXForResize = this.#draggedDistanceX;\n this.#draggedDistanceYForResize = this.#draggedDistanceY;\n // Get minimum and maximum sizes on first resize operation\n const computedStyle = getComputedStyle(this.el);\n this.#maxBlockSize = fromPxToNumber(computedStyle.maxBlockSize);\n this.#maxInlineSize = fromPxToNumber(computedStyle.maxInlineSize);\n this.#minBlockSize = fromPxToNumber(computedStyle.minBlockSize);\n this.#minInlineSize = fromPxToNumber(computedStyle.minInlineSize);\n // Avoid repositioning the popover\n this.#removePositionWatcher();\n // Avoid watching border changes during the resize\n this.#removeBorderSizeWatcher();\n // Add listeners\n document.addEventListener(\"mousemove\", this.#trackElementResizeRAF, {\n capture: true\n });\n document.addEventListener(\"mouseup\", this.#handleResizeEnd, {\n capture: true,\n passive: true\n });\n };\n #trackElementResizeRAF = (event) => {\n this.#resizeRAF.perform(this.#trackElementResize, () => {\n // Improve drag UX by not selecting any button or clicking interactive\n // elements\n event.preventDefault();\n // We remove the pointer-events and user-select properties after the first\n // \"mousemove\", otherwise double clicking to select text would not work\n this.#addDraggingClass();\n this.#lastDragEvent = event;\n });\n };\n #trackElementResize = () => {\n // - - - - - - - - - - - - - DOM read operations - - - - - - - - - - - - -\n const popoverRect = this.el.getBoundingClientRect();\n // - - - - - - - - - - - - - DOM write operations - - - - - - - - - - - - -\n this.#resizeEdgesAndCornersDictionary[this.#currentEdge](popoverRect);\n // Update last point\n this.#initialDragEvent = this.#lastDragEvent;\n };\n #handleResizeEnd = () => {\n this.resizing = false;\n // Cancel RAF to prevent access to undefined references\n if (this.#resizeRAF) {\n this.#resizeRAF.cancel();\n }\n // Reset document cursor back to normal\n document.body.style.cursor = null;\n // Reset dragged distance to its original value\n setProperty(this.el, POPOVER_DRAGGED_X, this.#draggedDistanceX);\n setProperty(this.el, POPOVER_DRAGGED_Y, this.#draggedDistanceY);\n // Update the position of the popover when the resize ends\n this.#setPositionWatcher();\n // Start again watching border size changes\n this.#setBorderSizeWatcher();\n // Remove listeners\n document.removeEventListener(\"mousemove\", this.#trackElementResizeRAF, {\n capture: true\n });\n document.removeEventListener(\"mouseup\", this.#handleResizeEnd, {\n capture: true\n });\n this.#removeDraggingClass();\n // Free the memory\n this.#resizeRAF = null;\n this.#initialDragEvent = null;\n this.#lastDragEvent = null;\n };\n /**\n * This observer watches the size of each border in the control to adjust the\n * position of the invisible resize elements (edges and corners).\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #setBorderSizeWatcher = () => {\n if (!this.resizable || this.hidden) {\n this.#removeBorderSizeWatcher();\n return;\n }\n this.#borderSizeRAF ??= new SyncWithRAF();\n this.#borderSizeObserver = new ResizeObserver(this.#updateBorderSizeRAF);\n // Observe the size of the edges to know if the border\n this.#borderSizeObserver.observe(this.el, { box: \"border-box\" });\n this.#borderSizeObserver.observe(this.#resizeLayer);\n };\n #updateBorderSizeRAF = () => {\n this.#borderSizeRAF.perform(this.#updateBorderSize);\n };\n #updateBorderSize = () => {\n // - - - - - - - - - - - - - DOM read operations - - - - - - - - - - - - -\n const computedStyle = getComputedStyle(this.el);\n // - - - - - - - - - - - - - DOM write operations - - - - - - - - - - - - -\n this.el.style.setProperty(POPOVER_BORDER_BLOCK_START_SIZE, computedStyle.borderBlockStartWidth);\n this.el.style.setProperty(POPOVER_BORDER_BLOCK_END_SIZE, computedStyle.borderBlockEndWidth);\n this.el.style.setProperty(POPOVER_BORDER_INLINE_START_SIZE, computedStyle.borderInlineStartWidth);\n this.el.style.setProperty(POPOVER_BORDER_INLINE_END_SIZE, computedStyle.borderInlineEndWidth);\n };\n #removeBorderSizeWatcher = () => {\n if (this.#borderSizeObserver) {\n this.#borderSizeObserver.disconnect();\n this.#borderSizeObserver = null; // Free the memory\n }\n this.#borderSizeRAF = null; // Free the memory\n };\n connectedCallback() {\n this.#windowRef = window;\n // Responsive alignments\n this.actualBlockAlign = this.blockAlign;\n this.actualInlineAlign = this.inlineAlign;\n // Set RTL watcher\n this.#rtlWatcher = new MutationObserver(() => {\n this.#isRTLDirection = isRTL();\n if (this.#isRTLDirection) {\n this.el.style.setProperty(POPOVER_RTL, POPOVER_RTL_VALUE);\n this.el.classList.add(POPOVER_RTL_CLASS);\n }\n else {\n this.el.style.removeProperty(POPOVER_RTL);\n this.el.classList.remove(POPOVER_RTL_CLASS);\n }\n });\n if (this.firstLayer) {\n this.#avoidFlickeringInTheNextRender(true);\n }\n // Observe the dir attribute in the document\n this.#rtlWatcher.observe(document.documentElement, {\n attributeFilter: [\"dir\"]\n });\n }\n componentWillRender() {\n if (this.#checkPositionWatcher) {\n this.#checkPositionWatcher = false;\n // Update watchers\n this.#setPositionWatcher();\n }\n if (this.#checkBorderSizeWatcher) {\n this.#checkBorderSizeWatcher = false;\n // Wait until the resize edges have been rendered\n requestAnimationFrame(() => {\n this.#setBorderSizeWatcher();\n });\n }\n if (this.#adjustAlignment) {\n this.#setResponsiveAlignment();\n }\n }\n componentDidLoad() {\n // Initialize popoverTargetElement\n addPopoverTargetElement(this.actionElement, this.el, !this.actionById);\n // Initialize watchers\n this.#setPositionWatcher();\n this.#setBorderSizeWatcher();\n if (!this.hidden) {\n this.el.showPopover();\n }\n }\n disconnectedCallback() {\n this.#removePositionWatcher();\n this.#removeBorderSizeWatcher();\n // If the action element still exists, remove the reference\n removePopoverTargetElement(this.actionElement);\n // Defensive programming. Make sure the document does not have any unwanted handler\n this.#handleDragEnd();\n // Disconnect RTL watcher\n if (this.#rtlWatcher) {\n this.#rtlWatcher.disconnect();\n this.#rtlWatcher = null; // Free the memory\n }\n }\n render() {\n return (h(Host, { class: {\n \"gx-popover-header-drag\": !this.hidden && this.allowDrag === \"header\",\n [RESIZING_CLASS]: this.resizing\n }, popover: this.mode, onMouseDown: this.allowDrag === \"box\" ? this.#handleMouseDown : null, onToggle: this.#handlePopoverToggle }, this.allowDrag === \"header\" && (h(\"div\", { class: \"header\", part: \"header\", onMouseDown: this.#handleMouseDown }, h(\"slot\", { name: \"header\" }))), h(\"slot\", null), this.resizable &&\n !this.hidden && [\n h(\"div\", { class: \"edge__block-start\", onMouseDown: this.#handleEdgeResize(\"block-start\") }),\n h(\"div\", { class: \"edge__inline-end\", onMouseDown: this.#handleEdgeResize(\"inline-end\") }),\n h(\"div\", { class: \"edge__block-end\", onMouseDown: this.#handleEdgeResize(\"block-end\") }),\n h(\"div\", { class: \"edge__inline-start\", onMouseDown: this.#handleEdgeResize(\"inline-start\") }),\n h(\"div\", { class: \"corner__block-start-inline-start\", onMouseDown: this.#handleEdgeResize(\"block-start-inline-start\") }),\n h(\"div\", { class: \"corner__block-start-inline-end\", onMouseDown: this.#handleEdgeResize(\"block-start-inline-end\") }),\n h(\"div\", { class: \"corner__block-end-inline-start\", onMouseDown: this.#handleEdgeResize(\"block-end-inline-start\") }),\n h(\"div\", { class: \"corner__block-end-inline-end\", onMouseDown: this.#handleEdgeResize(\"block-end-inline-end\") }),\n h(\"div\", { class: \"resize-layer\", ref: el => (this.#resizeLayer = el) })\n ]));\n }\n static get is() { return \"ch-popover\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"popover.scss\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"popover.css\"]\n };\n }\n static get properties() {\n return {\n \"actionById\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"`true` if the `actionElement` binds the ch-popover using an external ID.\\nIf so, the `popoverTargetElement` property won't be configured in the\\naction element.\"\n },\n \"attribute\": \"action-by-id\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"actionElement\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"PopoverActionElement\",\n \"resolved\": \"HTMLButtonElement | HTMLInputElement\",\n \"references\": {\n \"PopoverActionElement\": {\n \"location\": \"import\",\n \"path\": \"./types\",\n \"id\": \"src/components/popover/types.ts::PopoverActionElement\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies a reference of the action that controls the popover control.\"\n }\n },\n \"allowDrag\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"box\\\" | \\\"header\\\" | \\\"no\\\"\",\n \"resolved\": \"\\\"box\\\" | \\\"header\\\" | \\\"no\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the drag behavior of the popover.\\nIf `allowDrag === \\\"header\\\"`, a slot with the `\\\"header\\\"` name will be\\navailable to place the header content.\"\n },\n \"attribute\": \"allow-drag\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"no\\\"\"\n },\n \"blockAlign\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"ChPopoverAlign\",\n \"resolved\": \"\\\"center\\\" | \\\"inside-end\\\" | \\\"inside-start\\\" | \\\"outside-end\\\" | \\\"outside-start\\\"\",\n \"references\": {\n \"ChPopoverAlign\": {\n \"location\": \"import\",\n \"path\": \"./types\",\n \"id\": \"src/components/popover/types.ts::ChPopoverAlign\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the block alignment of the window.\"\n },\n \"attribute\": \"block-align\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"center\\\"\"\n },\n \"firstLayer\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"`true` if the control is not stacked with another top layer.\"\n },\n \"attribute\": \"first-layer\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"hidden\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies whether the popover is hidden or visible.\"\n },\n \"attribute\": \"hidden\",\n \"reflect\": true,\n \"defaultValue\": \"true\"\n },\n \"inlineAlign\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"ChPopoverAlign\",\n \"resolved\": \"\\\"center\\\" | \\\"inside-end\\\" | \\\"inside-start\\\" | \\\"outside-end\\\" | \\\"outside-start\\\"\",\n \"references\": {\n \"ChPopoverAlign\": {\n \"location\": \"import\",\n \"path\": \"./types\",\n \"id\": \"src/components/popover/types.ts::ChPopoverAlign\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the inline alignment of the window.\"\n },\n \"attribute\": \"inline-align\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"center\\\"\"\n },\n \"mode\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"auto\\\" | \\\"manual\\\"\",\n \"resolved\": \"\\\"auto\\\" | \\\"manual\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Popovers that have the `\\\"auto\\\"` state can be \\\"light dismissed\\\" by\\nselecting outside the popover area, and generally only allow one popover\\nto be displayed on-screen at a time. By contrast, `\\\"manual\\\"` popovers must\\nalways be explicitly hidden, but allow for use cases such as nested\\npopovers in menus.\"\n },\n \"attribute\": \"mode\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"auto\\\"\"\n },\n \"responsiveAlignment\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies if the popover is automatically aligned is the content overflow\\nthe window.\"\n },\n \"attribute\": \"responsive-alignment\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"resizable\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies whether the control can be resized. If `true` the control can be\\nresized at runtime by dragging the edges or corners.\"\n },\n \"attribute\": \"resizable\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n }\n };\n }\n static get states() {\n return {\n \"actualBlockAlign\": {},\n \"actualInlineAlign\": {},\n \"relativePopover\": {},\n \"resizing\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"popoverOpened\",\n \"name\": \"popoverOpened\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the popover is opened.\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }, {\n \"method\": \"popoverClosed\",\n \"name\": \"popoverClosed\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the popover is closed.\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"actionElement\",\n \"methodName\": \"handleActionChange\"\n }, {\n \"propName\": \"blockAlign\",\n \"methodName\": \"handleBlockChange\"\n }, {\n \"propName\": \"hidden\",\n \"methodName\": \"handleHiddenChange\"\n }, {\n \"propName\": \"inlineAlign\",\n \"methodName\": \"handleInlineChange\"\n }, {\n \"propName\": \"resizable\",\n \"methodName\": \"resizableChanged\"\n }];\n }\n}\n//# sourceMappingURL=popover.js.map\n"],"version":3}