ngwr 16.2.0 → 16.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/badge/styles/_tag.scss +73 -1
  2. package/calendar/styles/_index.scss +22 -0
  3. package/cascader/styles/_rules.scss +7 -0
  4. package/color-picker/styles/_index.scss +21 -0
  5. package/date-picker/styles/_index.scss +19 -0
  6. package/dropdown/styles/_index.scss +13 -19
  7. package/fesm2022/ngwr-affix.mjs +3 -3
  8. package/fesm2022/ngwr-alert-testing.mjs +70 -0
  9. package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
  10. package/fesm2022/ngwr-alert.mjs +3 -3
  11. package/fesm2022/ngwr-anchor.mjs +17 -6
  12. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  13. package/fesm2022/ngwr-animations-aurora.mjs +3 -3
  14. package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
  15. package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
  16. package/fesm2022/ngwr-animations-confetti.mjs +3 -3
  17. package/fesm2022/ngwr-animations-decode.mjs +3 -3
  18. package/fesm2022/ngwr-animations-destruct.mjs +3 -3
  19. package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
  20. package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
  21. package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
  22. package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
  23. package/fesm2022/ngwr-animations-glitch.mjs +3 -3
  24. package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
  25. package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
  26. package/fesm2022/ngwr-animations-marquee.mjs +3 -3
  27. package/fesm2022/ngwr-animations-orbit.mjs +3 -3
  28. package/fesm2022/ngwr-animations-reveal.mjs +3 -3
  29. package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
  30. package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
  31. package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
  32. package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
  33. package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
  34. package/fesm2022/ngwr-animations-tilt.mjs +3 -3
  35. package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
  36. package/fesm2022/ngwr-avatar.mjs +3 -3
  37. package/fesm2022/ngwr-back-top.mjs +3 -3
  38. package/fesm2022/ngwr-badge.mjs +129 -11
  39. package/fesm2022/ngwr-badge.mjs.map +1 -1
  40. package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
  41. package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
  42. package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
  43. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  44. package/fesm2022/ngwr-burger-testing.mjs +45 -0
  45. package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
  46. package/fesm2022/ngwr-burger.mjs +3 -3
  47. package/fesm2022/ngwr-button.mjs +6 -6
  48. package/fesm2022/ngwr-calendar-testing.mjs +18 -0
  49. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  50. package/fesm2022/ngwr-calendar.mjs +500 -73
  51. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  52. package/fesm2022/ngwr-card.mjs +9 -9
  53. package/fesm2022/ngwr-carousel.mjs +6 -6
  54. package/fesm2022/ngwr-cascader.mjs +37 -16
  55. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  56. package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
  57. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  58. package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
  59. package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
  60. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
  61. package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
  62. package/fesm2022/ngwr-charts-chart-legend.mjs +26 -11
  63. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  64. package/fesm2022/ngwr-charts-core.mjs +3 -3
  65. package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
  66. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  67. package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
  68. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  69. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  70. package/fesm2022/ngwr-charts-line-chart-testing.mjs +3 -2
  71. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  72. package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
  73. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  74. package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
  75. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  76. package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
  77. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  78. package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
  79. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
  81. package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
  82. package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
  83. package/fesm2022/ngwr-checkbox.mjs +6 -6
  84. package/fesm2022/ngwr-clipboard.mjs +3 -3
  85. package/fesm2022/ngwr-collapse.mjs +9 -9
  86. package/fesm2022/ngwr-color-picker-testing.mjs +11 -1
  87. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  88. package/fesm2022/ngwr-color-picker.mjs +153 -37
  89. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  90. package/fesm2022/ngwr-command-palette.mjs +3 -3
  91. package/fesm2022/ngwr-comment.mjs +10 -6
  92. package/fesm2022/ngwr-comment.mjs.map +1 -1
  93. package/fesm2022/ngwr-compare-testing.mjs +84 -0
  94. package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
  95. package/fesm2022/ngwr-compare.mjs +3 -3
  96. package/fesm2022/ngwr-context-menu.mjs +12 -12
  97. package/fesm2022/ngwr-cookie.mjs +3 -3
  98. package/fesm2022/ngwr-copy-value.mjs +3 -3
  99. package/fesm2022/ngwr-counter.mjs +6 -6
  100. package/fesm2022/ngwr-date-picker-testing.mjs +30 -4
  101. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  102. package/fesm2022/ngwr-date-picker.mjs +342 -69
  103. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  104. package/fesm2022/ngwr-date-stamp.mjs +3 -3
  105. package/fesm2022/ngwr-date.mjs +59 -8
  106. package/fesm2022/ngwr-date.mjs.map +1 -1
  107. package/fesm2022/ngwr-density.mjs +6 -6
  108. package/fesm2022/ngwr-descriptions.mjs +6 -6
  109. package/fesm2022/ngwr-dialog.mjs +18 -18
  110. package/fesm2022/ngwr-directives.mjs +15 -15
  111. package/fesm2022/ngwr-divider.mjs +3 -3
  112. package/fesm2022/ngwr-drawer.mjs +51 -29
  113. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  114. package/fesm2022/ngwr-dropdown-testing.mjs +11 -3
  115. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  116. package/fesm2022/ngwr-dropdown.mjs +52 -95
  117. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  118. package/fesm2022/ngwr-editor.mjs +4 -3
  119. package/fesm2022/ngwr-editor.mjs.map +1 -1
  120. package/fesm2022/ngwr-empty.mjs +3 -3
  121. package/fesm2022/ngwr-event-calendar.mjs +186 -33
  122. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  123. package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
  124. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  125. package/fesm2022/ngwr-file-upload.mjs +274 -15
  126. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  127. package/fesm2022/ngwr-form.mjs +9 -9
  128. package/fesm2022/ngwr-form.mjs.map +1 -1
  129. package/fesm2022/ngwr-graph-testing.mjs +3 -0
  130. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  131. package/fesm2022/ngwr-graph.mjs +102 -42
  132. package/fesm2022/ngwr-graph.mjs.map +1 -1
  133. package/fesm2022/ngwr-hotkey.mjs +6 -6
  134. package/fesm2022/ngwr-i18n-ar.mjs +19 -4
  135. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  136. package/fesm2022/ngwr-i18n-cs.mjs +19 -4
  137. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  138. package/fesm2022/ngwr-i18n-de.mjs +19 -4
  139. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  140. package/fesm2022/ngwr-i18n-en.mjs +19 -4
  141. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  142. package/fesm2022/ngwr-i18n-es.mjs +19 -4
  143. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  144. package/fesm2022/ngwr-i18n-fr.mjs +19 -4
  145. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  146. package/fesm2022/ngwr-i18n-he.mjs +19 -4
  147. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  148. package/fesm2022/ngwr-i18n-hi.mjs +19 -4
  149. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  150. package/fesm2022/ngwr-i18n-id.mjs +19 -4
  151. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  152. package/fesm2022/ngwr-i18n-it.mjs +19 -4
  153. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  154. package/fesm2022/ngwr-i18n-ja.mjs +19 -4
  155. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  156. package/fesm2022/ngwr-i18n-ko.mjs +19 -4
  157. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  158. package/fesm2022/ngwr-i18n-nl.mjs +19 -4
  159. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  160. package/fesm2022/ngwr-i18n-pl.mjs +19 -4
  161. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  162. package/fesm2022/ngwr-i18n-pt.mjs +19 -4
  163. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  164. package/fesm2022/ngwr-i18n-ru.mjs +19 -4
  165. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  166. package/fesm2022/ngwr-i18n-sv.mjs +19 -4
  167. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  168. package/fesm2022/ngwr-i18n-tr.mjs +19 -4
  169. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  170. package/fesm2022/ngwr-i18n-uk.mjs +19 -4
  171. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  172. package/fesm2022/ngwr-i18n-vi.mjs +19 -4
  173. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  174. package/fesm2022/ngwr-i18n-zh-tw.mjs +19 -4
  175. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  176. package/fesm2022/ngwr-i18n-zh.mjs +19 -4
  177. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  178. package/fesm2022/ngwr-i18n.mjs +9 -9
  179. package/fesm2022/ngwr-icon.mjs +6 -6
  180. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  181. package/fesm2022/ngwr-input-number-testing.mjs +11 -0
  182. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  183. package/fesm2022/ngwr-input-number.mjs +68 -7
  184. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  185. package/fesm2022/ngwr-input-otp.mjs +23 -3
  186. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  187. package/fesm2022/ngwr-input-testing.mjs +24 -1
  188. package/fesm2022/ngwr-input-testing.mjs.map +1 -1
  189. package/fesm2022/ngwr-input.mjs +152 -36
  190. package/fesm2022/ngwr-input.mjs.map +1 -1
  191. package/fesm2022/ngwr-keyboard.mjs +3 -3
  192. package/fesm2022/ngwr-knob.mjs +3 -3
  193. package/fesm2022/ngwr-layout.mjs +15 -15
  194. package/fesm2022/ngwr-lightbox.mjs +8 -8
  195. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  196. package/fesm2022/ngwr-list.mjs +8 -8
  197. package/fesm2022/ngwr-list.mjs.map +1 -1
  198. package/fesm2022/ngwr-load-state.mjs +15 -15
  199. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  200. package/fesm2022/ngwr-mention.mjs +6 -6
  201. package/fesm2022/ngwr-meta.mjs +6 -6
  202. package/fesm2022/ngwr-overlay.mjs +175 -13
  203. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  204. package/fesm2022/ngwr-page-header.mjs +3 -3
  205. package/fesm2022/ngwr-pagination.mjs +5 -3
  206. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  207. package/fesm2022/ngwr-pipes.mjs +31 -29
  208. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  209. package/fesm2022/ngwr-platform.mjs +9 -9
  210. package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
  211. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  212. package/fesm2022/ngwr-popconfirm.mjs +44 -63
  213. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  214. package/fesm2022/ngwr-popover-testing.mjs +7 -1
  215. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  216. package/fesm2022/ngwr-popover.mjs +58 -156
  217. package/fesm2022/ngwr-popover.mjs.map +1 -1
  218. package/fesm2022/ngwr-progress.mjs +50 -9
  219. package/fesm2022/ngwr-progress.mjs.map +1 -1
  220. package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
  221. package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
  222. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  223. package/fesm2022/ngwr-qr.mjs +3 -3
  224. package/fesm2022/ngwr-radio.mjs +6 -6
  225. package/fesm2022/ngwr-rating.mjs +3 -3
  226. package/fesm2022/ngwr-resizable-testing.mjs +113 -0
  227. package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
  228. package/fesm2022/ngwr-resizable.mjs +3 -3
  229. package/fesm2022/ngwr-result.mjs +12 -12
  230. package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
  231. package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
  232. package/fesm2022/ngwr-schema-form.mjs +415 -19
  233. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  234. package/fesm2022/ngwr-scroll.mjs +3 -3
  235. package/fesm2022/ngwr-segmented.mjs +3 -3
  236. package/fesm2022/ngwr-select-testing.mjs +19 -0
  237. package/fesm2022/ngwr-select-testing.mjs.map +1 -1
  238. package/fesm2022/ngwr-select.mjs +263 -83
  239. package/fesm2022/ngwr-select.mjs.map +1 -1
  240. package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
  241. package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
  242. package/fesm2022/ngwr-sidebar.mjs +3 -3
  243. package/fesm2022/ngwr-skeleton.mjs +3 -3
  244. package/fesm2022/ngwr-slider-testing.mjs +6 -0
  245. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  246. package/fesm2022/ngwr-slider.mjs +21 -3
  247. package/fesm2022/ngwr-slider.mjs.map +1 -1
  248. package/fesm2022/ngwr-sortable-list.mjs +29 -12
  249. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  250. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  251. package/fesm2022/ngwr-spinner.mjs +3 -3
  252. package/fesm2022/ngwr-splitter.mjs +3 -3
  253. package/fesm2022/ngwr-statistic.mjs +9 -9
  254. package/fesm2022/ngwr-stepper.mjs +42 -11
  255. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  256. package/fesm2022/ngwr-storage.mjs +3 -3
  257. package/fesm2022/ngwr-switch.mjs +3 -3
  258. package/fesm2022/ngwr-table-testing.mjs +88 -2
  259. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  260. package/fesm2022/ngwr-table.mjs +891 -74
  261. package/fesm2022/ngwr-table.mjs.map +1 -1
  262. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  263. package/fesm2022/ngwr-tabs-testing.mjs +1 -1
  264. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  265. package/fesm2022/ngwr-tabs.mjs +15 -10
  266. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  267. package/fesm2022/ngwr-textarea-testing.mjs +11 -0
  268. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
  269. package/fesm2022/ngwr-textarea.mjs +128 -16
  270. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  271. package/fesm2022/ngwr-theme.mjs +3 -3
  272. package/fesm2022/ngwr-timeline.mjs +6 -6
  273. package/fesm2022/ngwr-toast.mjs +40 -19
  274. package/fesm2022/ngwr-toast.mjs.map +1 -1
  275. package/fesm2022/ngwr-toolbar.mjs +3 -3
  276. package/fesm2022/ngwr-tour.mjs +6 -6
  277. package/fesm2022/ngwr-transfer-testing.mjs +6 -0
  278. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
  279. package/fesm2022/ngwr-transfer.mjs +24 -5
  280. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  281. package/fesm2022/ngwr-tree-testing.mjs +62 -2
  282. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  283. package/fesm2022/ngwr-tree.mjs +966 -78
  284. package/fesm2022/ngwr-tree.mjs.map +1 -1
  285. package/fesm2022/ngwr-typography.mjs +3 -3
  286. package/fesm2022/ngwr-utils-router.mjs +3 -3
  287. package/fesm2022/ngwr-utils.mjs +34 -1
  288. package/fesm2022/ngwr-utils.mjs.map +1 -1
  289. package/fesm2022/ngwr-version.mjs +1 -1
  290. package/fesm2022/ngwr-version.mjs.map +1 -1
  291. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  292. package/fesm2022/ngwr-window.mjs +33 -22
  293. package/fesm2022/ngwr-window.mjs.map +1 -1
  294. package/file-upload/styles/_index.scss +156 -0
  295. package/i18n/ar.json +21 -4
  296. package/i18n/cs.json +21 -4
  297. package/i18n/de.json +21 -4
  298. package/i18n/en.json +21 -4
  299. package/i18n/es.json +21 -4
  300. package/i18n/fr.json +21 -4
  301. package/i18n/he.json +21 -4
  302. package/i18n/hi.json +21 -4
  303. package/i18n/id.json +21 -4
  304. package/i18n/it.json +21 -4
  305. package/i18n/ja.json +21 -4
  306. package/i18n/ko.json +21 -4
  307. package/i18n/nl.json +21 -4
  308. package/i18n/pl.json +21 -4
  309. package/i18n/pt.json +21 -4
  310. package/i18n/ru.json +21 -4
  311. package/i18n/sv.json +21 -4
  312. package/i18n/tr.json +21 -4
  313. package/i18n/uk.json +21 -4
  314. package/i18n/vi.json +21 -4
  315. package/i18n/zh-TW.json +21 -4
  316. package/i18n/zh.json +21 -4
  317. package/input/styles/_index.scss +68 -1
  318. package/input-otp/styles/_index.scss +14 -0
  319. package/llms-full.txt +52 -20
  320. package/overlay/styles/_arrow.scss +4 -4
  321. package/package.json +33 -1
  322. package/popconfirm/styles/_index.scss +3 -11
  323. package/progress/styles/_index.scss +32 -0
  324. package/schema-form/styles/_index.scss +78 -0
  325. package/schematics/use/rule.js +2 -0
  326. package/schematics/use/symbol-map.json +4 -0
  327. package/select/styles/_index.scss +114 -22
  328. package/skills/ngwr/SKILL.md +1 -1
  329. package/skills/ngwr/references/catalog.md +9 -1
  330. package/slider/styles/_index.scss +22 -0
  331. package/table/styles/_index.scss +167 -3
  332. package/textarea/styles/_index.scss +80 -0
  333. package/theme/styles/_focus.scss +5 -0
  334. package/theme/styles/_motion.scss +5 -0
  335. package/transfer/styles/_index.scss +84 -0
  336. package/tree/styles/_index.scss +138 -5
  337. package/types/ngwr-alert-testing.d.ts +88 -0
  338. package/types/ngwr-badge.d.ts +72 -2
  339. package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
  340. package/types/ngwr-burger-testing.d.ts +51 -0
  341. package/types/ngwr-calendar-testing.d.ts +18 -6
  342. package/types/ngwr-calendar.d.ts +272 -22
  343. package/types/ngwr-cascader.d.ts +10 -1
  344. package/types/ngwr-charts-chart-legend.d.ts +9 -4
  345. package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
  346. package/types/ngwr-charts-line-chart.d.ts +7 -4
  347. package/types/ngwr-color-picker-testing.d.ts +15 -4
  348. package/types/ngwr-color-picker.d.ts +76 -6
  349. package/types/ngwr-compare-testing.d.ts +72 -0
  350. package/types/ngwr-date-picker-testing.d.ts +23 -8
  351. package/types/ngwr-date-picker.d.ts +100 -9
  352. package/types/ngwr-date.d.ts +71 -1
  353. package/types/ngwr-drawer.d.ts +9 -0
  354. package/types/ngwr-dropdown-testing.d.ts +20 -0
  355. package/types/ngwr-dropdown.d.ts +24 -6
  356. package/types/ngwr-event-calendar.d.ts +66 -8
  357. package/types/ngwr-file-upload-testing.d.ts +31 -2
  358. package/types/ngwr-file-upload.d.ts +148 -1
  359. package/types/ngwr-form.d.ts +47 -3
  360. package/types/ngwr-graph-testing.d.ts +8 -3
  361. package/types/ngwr-graph.d.ts +147 -7
  362. package/types/ngwr-input-number-testing.d.ts +10 -0
  363. package/types/ngwr-input-number.d.ts +30 -1
  364. package/types/ngwr-input-otp.d.ts +10 -0
  365. package/types/ngwr-input-testing.d.ts +30 -0
  366. package/types/ngwr-input.d.ts +54 -3
  367. package/types/ngwr-overlay.d.ts +84 -5
  368. package/types/ngwr-pipes.d.ts +2 -1
  369. package/types/ngwr-popconfirm-testing.d.ts +12 -3
  370. package/types/ngwr-popconfirm.d.ts +28 -3
  371. package/types/ngwr-popover-testing.d.ts +19 -2
  372. package/types/ngwr-popover.d.ts +22 -2
  373. package/types/ngwr-progress.d.ts +29 -1
  374. package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
  375. package/types/ngwr-resizable-testing.d.ts +116 -0
  376. package/types/ngwr-schema-form-testing.d.ts +260 -0
  377. package/types/ngwr-schema-form.d.ts +76 -6
  378. package/types/ngwr-select-testing.d.ts +20 -0
  379. package/types/ngwr-select.d.ts +112 -11
  380. package/types/ngwr-sidebar-testing.d.ts +176 -0
  381. package/types/ngwr-slider-testing.d.ts +3 -1
  382. package/types/ngwr-slider.d.ts +21 -1
  383. package/types/ngwr-sortable-list.d.ts +6 -0
  384. package/types/ngwr-stepper.d.ts +20 -11
  385. package/types/ngwr-table-testing.d.ts +70 -6
  386. package/types/ngwr-table.d.ts +480 -50
  387. package/types/ngwr-tabs-testing.d.ts +14 -17
  388. package/types/ngwr-tabs.d.ts +6 -0
  389. package/types/ngwr-textarea-testing.d.ts +10 -0
  390. package/types/ngwr-textarea.d.ts +48 -2
  391. package/types/ngwr-toast.d.ts +8 -1
  392. package/types/ngwr-transfer-testing.d.ts +3 -0
  393. package/types/ngwr-transfer.d.ts +24 -1
  394. package/types/ngwr-tree-testing.d.ts +65 -1
  395. package/types/ngwr-tree.d.ts +333 -12
  396. package/types/ngwr-utils.d.ts +28 -0
  397. package/types/ngwr-version.d.ts +1 -1
  398. package/types/ngwr-window.d.ts +7 -4
@@ -7,7 +7,7 @@ import { Directionality } from "@angular/cdk/bidi";
7
7
  import { ScrollStrategyOptions } from "@angular/cdk/overlay";
8
8
  import { TemplatePortal } from "@angular/cdk/portal";
9
9
  import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
10
- import { WR_OVERLAY, WrOutsideClick, wrFollowDirection } from "ngwr/overlay";
10
+ import { WR_ANCHORED_FALLBACKS, WR_ANCHORED_POSITIONS, WR_OVERLAY, WrOutsideClick, wrAnchoredPositions, wrFollowDirection } from "ngwr/overlay";
11
11
  import { FocusMonitor } from "@angular/cdk/a11y";
12
12
  /**
13
13
  * @license
@@ -42,78 +42,8 @@ function wrDropdownItems(pane) {
42
42
  * Use of this source code is governed by an MIT-style license that can be
43
43
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
44
44
  */
45
- const WR_DROPDOWN_POSITIONS = {
46
- top: {
47
- originX: "center",
48
- originY: "top",
49
- overlayX: "center",
50
- overlayY: "bottom"
51
- },
52
- "top-start": {
53
- originX: "start",
54
- originY: "top",
55
- overlayX: "start",
56
- overlayY: "bottom"
57
- },
58
- "top-end": {
59
- originX: "end",
60
- originY: "top",
61
- overlayX: "end",
62
- overlayY: "bottom"
63
- },
64
- bottom: {
65
- originX: "center",
66
- originY: "bottom",
67
- overlayX: "center",
68
- overlayY: "top"
69
- },
70
- "bottom-start": {
71
- originX: "start",
72
- originY: "bottom",
73
- overlayX: "start",
74
- overlayY: "top"
75
- },
76
- "bottom-end": {
77
- originX: "end",
78
- originY: "bottom",
79
- overlayX: "end",
80
- overlayY: "top"
81
- },
82
- left: {
83
- originX: "start",
84
- originY: "center",
85
- overlayX: "end",
86
- overlayY: "center"
87
- },
88
- right: {
89
- originX: "end",
90
- originY: "center",
91
- overlayX: "start",
92
- overlayY: "center"
93
- }
94
- };
95
- const WR_DROPDOWN_FALLBACKS = {
96
- top: ["top", "bottom"],
97
- "top-start": ["top-start", "bottom-start"],
98
- "top-end": ["top-end", "bottom-end"],
99
- bottom: ["bottom", "top"],
100
- "bottom-start": ["bottom-start", "top-start"],
101
- "bottom-end": ["bottom-end", "top-end"],
102
- left: [
103
- "left",
104
- "right",
105
- "bottom",
106
- "top"
107
- ],
108
- right: [
109
- "right",
110
- "left",
111
- "bottom",
112
- "top"
113
- ]
114
- };
115
45
  function wrDropdownPositions(position) {
116
- return WR_DROPDOWN_FALLBACKS[position].map((name) => ({ ...WR_DROPDOWN_POSITIONS[name] }));
46
+ return wrAnchoredPositions(position);
117
47
  }
118
48
  /**
119
49
  * @license
@@ -121,7 +51,7 @@ function wrDropdownPositions(position) {
121
51
  * Use of this source code is governed by an MIT-style license that can be
122
52
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
123
53
  */
124
- const isSidePlacement = (name) => name === "left" || name === "right";
54
+ const isSidePlacement = (name) => name.startsWith("left") || name.startsWith("right");
125
55
  let triggerUid = 0;
126
56
  var WrDropdown = class WrDropdown {
127
57
  menu = input.required({
@@ -134,6 +64,11 @@ var WrDropdown = class WrDropdown {
134
64
  ...ngDevMode ? { debugName: "arrow" } : /* istanbul ignore next */ {},
135
65
  transform: coerceBooleanProperty
136
66
  });
67
+ disabled = input(false, {
68
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
69
+ alias: "wrDropdownDisabled",
70
+ transform: coerceBooleanProperty
71
+ });
137
72
  panelClass = input(null, ...ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []);
138
73
  opened = output();
139
74
  closed = output();
@@ -161,19 +96,24 @@ var WrDropdown = class WrDropdown {
161
96
  if (this.isOpen()) this.openOverlay();
162
97
  else this.closeOverlay();
163
98
  });
99
+ effect(() => {
100
+ if (this.disabled()) this.openState.set(false);
101
+ });
164
102
  }
165
103
  open() {
104
+ if (this.disabled()) return;
166
105
  this.openState.set(true);
167
106
  }
168
107
  close() {
169
108
  this.openState.set(false);
170
109
  }
171
110
  toggle() {
172
- this.openState.update((v) => !v);
111
+ if (this.isOpen()) this.close();
112
+ else this.open();
173
113
  }
174
114
  openedByPointer = false;
175
115
  onClick(event) {
176
- if (this.trigger() !== "click") return;
116
+ if (this.disabled() || this.trigger() !== "click") return;
177
117
  event.stopPropagation();
178
118
  this.openedByPointer = false;
179
119
  this.toggle();
@@ -181,7 +121,7 @@ var WrDropdown = class WrDropdown {
181
121
  onMouseEnter() {
182
122
  if (this.trigger() !== "hover") return;
183
123
  this.openedByPointer = true;
184
- this.openState.set(true);
124
+ this.open();
185
125
  }
186
126
  onMouseLeave(event) {
187
127
  if (this.trigger() !== "hover") return;
@@ -201,12 +141,12 @@ var WrDropdown = class WrDropdown {
201
141
  });
202
142
  const ref = this.overlayRef;
203
143
  const pane = ref.overlayElement;
204
- let chain = WR_DROPDOWN_FALLBACKS[requested];
144
+ let chain = WR_ANCHORED_FALLBACKS[requested];
205
145
  let links = positions;
206
146
  connected.positionChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ connectionPair }) => {
207
147
  const landed = chain[links.indexOf(connectionPair)];
208
148
  if (!landed) return;
209
- for (const name of Object.keys(WR_DROPDOWN_POSITIONS)) pane.classList.toggle(`wr-dropdown-overlay--${name}`, name === landed);
149
+ for (const name of Object.keys(WR_ANCHORED_POSITIONS)) pane.classList.toggle(`wr-dropdown-overlay--${name}`, name === landed);
210
150
  if (isSidePlacement(landed) || !chain.some(isSidePlacement)) return;
211
151
  const kept = chain.flatMap((name, i) => isSidePlacement(name) ? [] : [i]);
212
152
  chain = kept.map((i) => chain[i]);
@@ -256,7 +196,7 @@ var WrDropdown = class WrDropdown {
256
196
  }
257
197
  }
258
198
  onKeydown(event) {
259
- if (this.isOpen() || this.trigger() === "manual") return;
199
+ if (this.disabled() || this.isOpen() || this.trigger() === "manual") return;
260
200
  if (event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === "Enter" || event.key === " ") {
261
201
  event.preventDefault();
262
202
  this.openedByPointer = false;
@@ -324,7 +264,7 @@ var WrDropdown = class WrDropdown {
324
264
  onOverlayMouseLeave = (event) => this.onMenusLeave(event.relatedTarget);
325
265
  static ɵfac = i0.ɵɵngDeclareFactory({
326
266
  minVersion: "12.0.0",
327
- version: "22.2.5",
267
+ version: "22.2.6",
328
268
  ngImport: i0,
329
269
  type: WrDropdown,
330
270
  deps: [],
@@ -332,7 +272,7 @@ var WrDropdown = class WrDropdown {
332
272
  });
333
273
  static ɵdir = i0.ɵɵngDeclareDirective({
334
274
  minVersion: "17.1.0",
335
- version: "22.2.5",
275
+ version: "22.2.6",
336
276
  type: WrDropdown,
337
277
  isStandalone: true,
338
278
  selector: "[wrDropdown]",
@@ -365,6 +305,13 @@ var WrDropdown = class WrDropdown {
365
305
  isRequired: false,
366
306
  transformFunction: null
367
307
  },
308
+ disabled: {
309
+ classPropertyName: "disabled",
310
+ publicName: "wrDropdownDisabled",
311
+ isSignal: true,
312
+ isRequired: false,
313
+ transformFunction: null
314
+ },
368
315
  panelClass: {
369
316
  classPropertyName: "panelClass",
370
317
  publicName: "panelClass",
@@ -385,9 +332,10 @@ var WrDropdown = class WrDropdown {
385
332
  "mouseleave": "onMouseLeave($event)"
386
333
  },
387
334
  properties: {
335
+ "class.wr-dropdown-trigger--disabled": "disabled()",
388
336
  "attr.id": "triggerId",
389
- "attr.aria-haspopup": "\"menu\"",
390
- "attr.aria-expanded": "isOpen()",
337
+ "attr.aria-haspopup": "disabled() ? null : \"menu\"",
338
+ "attr.aria-expanded": "disabled() ? null : isOpen()",
391
339
  "attr.aria-controls": "isOpen() ? menu().menuId() : null"
392
340
  },
393
341
  classAttribute: "wr-dropdown-trigger"
@@ -398,7 +346,7 @@ var WrDropdown = class WrDropdown {
398
346
  };
399
347
  i0.ɵɵngDeclareClassMetadata({
400
348
  minVersion: "12.0.0",
401
- version: "22.2.5",
349
+ version: "22.2.6",
402
350
  ngImport: i0,
403
351
  type: WrDropdown,
404
352
  decorators: [{
@@ -408,9 +356,10 @@ i0.ɵɵngDeclareClassMetadata({
408
356
  exportAs: "wrDropdown",
409
357
  host: {
410
358
  class: "wr-dropdown-trigger",
359
+ "[class.wr-dropdown-trigger--disabled]": "disabled()",
411
360
  "[attr.id]": "triggerId",
412
- "[attr.aria-haspopup]": "\"menu\"",
413
- "[attr.aria-expanded]": "isOpen()",
361
+ "[attr.aria-haspopup]": "disabled() ? null : \"menu\"",
362
+ "[attr.aria-expanded]": "disabled() ? null : isOpen()",
414
363
  "[attr.aria-controls]": "isOpen() ? menu().menuId() : null",
415
364
  "(click)": "onClick($event)",
416
365
  "(keydown)": "onKeydown($event)",
@@ -453,6 +402,14 @@ i0.ɵɵngDeclareClassMetadata({
453
402
  required: false
454
403
  }]
455
404
  }],
405
+ disabled: [{
406
+ type: i0.Input,
407
+ args: [{
408
+ isSignal: true,
409
+ alias: "wrDropdownDisabled",
410
+ required: false
411
+ }]
412
+ }],
456
413
  panelClass: [{
457
414
  type: i0.Input,
458
415
  args: [{
@@ -487,7 +444,7 @@ var WrDropdownMenu = class WrDropdownMenu {
487
444
  triggerId = signal(null, ...ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []);
488
445
  static ɵfac = i0.ɵɵngDeclareFactory({
489
446
  minVersion: "12.0.0",
490
- version: "22.2.5",
447
+ version: "22.2.6",
491
448
  ngImport: i0,
492
449
  type: WrDropdownMenu,
493
450
  deps: [],
@@ -495,7 +452,7 @@ var WrDropdownMenu = class WrDropdownMenu {
495
452
  });
496
453
  static ɵcmp = i0.ɵɵngDeclareComponent({
497
454
  minVersion: "17.2.0",
498
- version: "22.2.5",
455
+ version: "22.2.6",
499
456
  type: WrDropdownMenu,
500
457
  isStandalone: true,
501
458
  selector: "wr-dropdown-menu",
@@ -516,7 +473,7 @@ var WrDropdownMenu = class WrDropdownMenu {
516
473
  };
517
474
  i0.ɵɵngDeclareClassMetadata({
518
475
  minVersion: "12.0.0",
519
- version: "22.2.5",
476
+ version: "22.2.6",
520
477
  ngImport: i0,
521
478
  type: WrDropdownMenu,
522
479
  decorators: [{
@@ -563,7 +520,7 @@ var WrDropdownItem = class WrDropdownItem {
563
520
  }
564
521
  static ɵfac = i0.ɵɵngDeclareFactory({
565
522
  minVersion: "12.0.0",
566
- version: "22.2.5",
523
+ version: "22.2.6",
567
524
  ngImport: i0,
568
525
  type: WrDropdownItem,
569
526
  deps: [],
@@ -571,7 +528,7 @@ var WrDropdownItem = class WrDropdownItem {
571
528
  });
572
529
  static ɵcmp = i0.ɵɵngDeclareComponent({
573
530
  minVersion: "17.0.0",
574
- version: "22.2.5",
531
+ version: "22.2.6",
575
532
  type: WrDropdownItem,
576
533
  isStandalone: true,
577
534
  selector: "wr-dropdown-item",
@@ -617,7 +574,7 @@ var WrDropdownItem = class WrDropdownItem {
617
574
  };
618
575
  i0.ɵɵngDeclareClassMetadata({
619
576
  minVersion: "12.0.0",
620
- version: "22.2.5",
577
+ version: "22.2.6",
621
578
  ngImport: i0,
622
579
  type: WrDropdownItem,
623
580
  decorators: [{
@@ -837,7 +794,7 @@ var WrDropdownSubmenu = class WrDropdownSubmenu {
837
794
  };
838
795
  static ɵfac = i0.ɵɵngDeclareFactory({
839
796
  minVersion: "12.0.0",
840
- version: "22.2.5",
797
+ version: "22.2.6",
841
798
  ngImport: i0,
842
799
  type: WrDropdownSubmenu,
843
800
  deps: [],
@@ -845,7 +802,7 @@ var WrDropdownSubmenu = class WrDropdownSubmenu {
845
802
  });
846
803
  static ɵdir = i0.ɵɵngDeclareDirective({
847
804
  minVersion: "17.1.0",
848
- version: "22.2.5",
805
+ version: "22.2.6",
849
806
  type: WrDropdownSubmenu,
850
807
  isStandalone: true,
851
808
  selector: "[wrDropdownSubmenu]",
@@ -893,7 +850,7 @@ var WrDropdownSubmenu = class WrDropdownSubmenu {
893
850
  };
894
851
  i0.ɵɵngDeclareClassMetadata({
895
852
  minVersion: "12.0.0",
896
- version: "22.2.5",
853
+ version: "22.2.6",
897
854
  ngImport: i0,
898
855
  type: WrDropdownSubmenu,
899
856
  decorators: [{
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-dropdown.mjs","names":[],"sources":["../../../projects/lib/dropdown/dropdown-chain.ts","../../../projects/lib/dropdown/types/dropdown-position.ts","../../../projects/lib/dropdown/dropdown.ts","../../../projects/lib/dropdown/dropdown-menu.ts","../../../projects/lib/dropdown/dropdown-item.ts","../../../projects/lib/dropdown/dropdown-item.html","../../../projects/lib/dropdown/dropdown-submenu.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/** Open levels by their pane, so an item can find the level it was rendered in. */\nconst levels = new WeakMap<HTMLElement, WrDropdownLevel>();\n\n/**\n * One open menu of a dropdown: the root, or a submenu hanging off an item.\n *\n * Every level is its own overlay pane, a sibling of the others in the overlay\n * container, so neither the DOM nor the injector tree says which pane opened\n * which. This is that link.\n *\n * @internal\n */\nexport interface WrDropdownLevel {\n readonly pane: HTMLElement;\n /** `null` on the root menu. */\n readonly parent: WrDropdownLevel | null;\n /** The submenu open from one of this pane's items. */\n child: WrDropdownLevel | null;\n /** Close this level and every level below it. */\n close(): void;\n /** Root only: the pointer left a pane below for `related`. */\n pointerLeft?(related: EventTarget | null): void;\n}\n\n/** @internal */\nexport function wrDropdownRegisterLevel(level: WrDropdownLevel): void {\n levels.set(level.pane, level);\n if (level.parent) level.parent.child = level;\n}\n\n/** @internal */\nexport function wrDropdownReleaseLevel(level: WrDropdownLevel): void {\n levels.delete(level.pane);\n if (level.parent?.child === level) level.parent.child = null;\n}\n\n/** The open level `el` is rendered in. @internal */\nexport function wrDropdownLevelAround(el: HTMLElement): WrDropdownLevel | null {\n const pane = el.closest<HTMLElement>('.wr-dropdown-overlay');\n return (pane && levels.get(pane)) ?? null;\n}\n\n/** The level at or below `from` whose pane holds `node`. @internal */\nexport function wrDropdownLevelOf(from: WrDropdownLevel, node: unknown): WrDropdownLevel | null {\n if (!(node instanceof Node)) return null;\n for (let level: WrDropdownLevel | null = from; level; level = level.child) {\n if (level.pane.contains(node)) return level;\n }\n return null;\n}\n\n/** The focus stops of one pane. A disabled item is not one. @internal */\nexport function wrDropdownItems(pane: HTMLElement): HTMLElement[] {\n return Array.from(pane.querySelectorAll<HTMLElement>('.wr-dropdown-item:not(.wr-dropdown-item--disabled)'));\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { ConnectedPosition } from '@angular/cdk/overlay';\n\n/**\n * Where the dropdown menu opens, relative to the trigger.\n */\nexport type WrDropdownPosition =\n 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'right';\n\n/**\n * The CDK geometry for each placement — one position, no fallbacks.\n *\n * No `offsetX` / `offsetY`, unlike `wr-popover`'s table: the gap between the\n * trigger and the menu is PADDING on the pane (`.wr-dropdown-overlay--<placement>`),\n * so the pointer crossing it is still over the overlay and a `trigger=\"hover\"`\n * menu does not close on the way in. It also means nothing here is\n * direction-dependent, which is why the directive needs no `wrMirrorOffsets`.\n *\n * @internal\n */\nexport const WR_DROPDOWN_POSITIONS: Record<WrDropdownPosition, ConnectedPosition> = {\n top: { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom' },\n 'top-start': { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n 'top-end': { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },\n bottom: { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top' },\n 'bottom-start': { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n 'bottom-end': { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n left: { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center' },\n right: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center' },\n};\n\n/**\n * What each placement is allowed to flip to when it does not fit, best first.\n * The requested placement always leads, so a menu that fits never moves.\n *\n * The same chains as `wr-popover`'s, restricted to the eight placements a\n * dropdown offers — which needs no editing, since every link in those eight\n * chains is itself one of the eight. Alignment is kept down the chain, a\n * block-axis placement only flips to its opposite, and a side placement may\n * also fall below or above, because on a phone neither side of a mid-page\n * trigger has the room. Once it has, the directive drops the side links for as\n * long as the menu stays open — the gap changes axis with the placement, so a\n * pane is only measured correctly against links on one axis at a time.\n *\n * Each list used to hold ONE position. With `withPush(true)` and nothing to\n * fall back to, a menu that did not fit below its trigger was pushed back up\n * over it instead — measured in Chromium at 1280×700 with a `bottom-start`\n * trigger 40px above the fold: the menu's top landed at 626, inside the\n * trigger's 630–660 box, covering the control that opened it.\n *\n * @internal\n */\nexport const WR_DROPDOWN_FALLBACKS: Record<WrDropdownPosition, readonly WrDropdownPosition[]> = {\n top: ['top', 'bottom'],\n 'top-start': ['top-start', 'bottom-start'],\n 'top-end': ['top-end', 'bottom-end'],\n bottom: ['bottom', 'top'],\n 'bottom-start': ['bottom-start', 'top-start'],\n 'bottom-end': ['bottom-end', 'top-end'],\n left: ['left', 'right', 'bottom', 'top'],\n right: ['right', 'left', 'bottom', 'top'],\n};\n\n/**\n * The list `withPositions()` wants — the chain in `WR_DROPDOWN_FALLBACKS` order,\n * as fresh objects, so the directive can tell which link the CDK landed on by\n * the IDENTITY of the position it reports back.\n *\n * Deliberately untagged, and this is where the dropdown parts from `wr-popover`,\n * which puts each placement's class in the position's own `panelClass`. The CDK\n * takes those classes off the pane BEFORE it measures it for fit, and here the\n * class carries the gap, as padding — so a tagged list is measured without its\n * gap. A menu with less room than that gap was judged to fit and the flexible\n * bounding box squeezed it instead: measured in Chromium at 1280×700 with 2px to\n * spare below the trigger, the menu's box shrank from 74px to 68px and its last\n * row ran through the bottom border. The directive writes the class itself, which\n * the CDK leaves alone, so the pane is measured with the gap it will render with.\n *\n * @internal\n */\nexport function wrDropdownPositions(position: WrDropdownPosition): ConnectedPosition[] {\n return WR_DROPDOWN_FALLBACKS[position].map(name => ({ ...WR_DROPDOWN_POSITIONS[name] }));\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Injector,\n ViewContainerRef,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { WR_OVERLAY, WrOutsideClick, wrFollowDirection } from 'ngwr/overlay';\nimport { wrToClassList, wrCheckStyles, type WrClassInput, wrRestoreFocus } from 'ngwr/utils';\n\nimport {\n type WrDropdownLevel,\n wrDropdownItems,\n wrDropdownLevelOf,\n wrDropdownRegisterLevel,\n wrDropdownReleaseLevel,\n} from './dropdown-chain';\nimport type { WrDropdownMenu } from './dropdown-menu';\nimport {\n WR_DROPDOWN_FALLBACKS,\n WR_DROPDOWN_POSITIONS,\n type WrDropdownPosition,\n type WrDropdownTrigger,\n wrDropdownPositions,\n} from './types';\n\n/** Whether a placement puts the menu BESIDE its trigger, where the gap is inline padding. */\nconst isSidePlacement = (name: WrDropdownPosition): boolean => name === 'left' || name === 'right';\n\n/**\n * Attach to any element to open a `<wr-dropdown-menu>` as a CDK overlay.\n *\n * @example\n * ```html\n * <button [wrDropdown]=\"menu\" position=\"bottom-start\" trigger=\"click\">\n * Actions\n * </button>\n *\n * <wr-dropdown-menu #menu>\n * <wr-dropdown-item icon=\"copy\" (click)=\"copy()\">Copy</wr-dropdown-item>\n * <wr-dropdown-item icon=\"trash\" (click)=\"remove()\">Delete</wr-dropdown-item>\n * </wr-dropdown-menu>\n * ```\n *\n * @see https://ngwr.dev/reference/components/dropdown\n */\nlet triggerUid = 0;\n\n@Directive({\n selector: '[wrDropdown]',\n exportAs: 'wrDropdown',\n host: {\n class: 'wr-dropdown-trigger',\n '[attr.id]': 'triggerId',\n '[attr.aria-haspopup]': '\"menu\"',\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.aria-controls]': 'isOpen() ? menu().menuId() : null',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeydown($event)',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave($event)',\n },\n})\nexport class WrDropdown {\n /** Menu to open. Pass a `<wr-dropdown-menu>` template reference. */\n readonly menu = input.required<WrDropdownMenu>({ alias: 'wrDropdown' });\n\n /**\n * How the menu opens. `manual` leaves the host alone, for one menu shared by\n * many anchors: a click handler records the row, then calls `open()`.\n *\n * @default 'click'\n * @example\n * ```html\n * <button #trigger=\"wrDropdown\" [wrDropdown]=\"menu\" trigger=\"manual\" (click)=\"pick(row); trigger.open()\">\n * ```\n */\n readonly trigger = input<WrDropdownTrigger>('click');\n\n /**\n * Where the menu anchors relative to the trigger. A placement that does not\n * fit flips to the opposite side (a `left` / `right` menu may also drop below\n * or above, and then stays there until it closes), and the pane's\n * `wr-dropdown-overlay--<placement>` class names the side it actually took.\n * @default 'bottom-start'\n */\n readonly position = input<WrDropdownPosition>('bottom-start');\n\n /**\n * Draw a small arrow on the menu's edge, pointing at the trigger — the one\n * `wr-popover` and `wr-popconfirm` draw, from the same shared rule. It follows\n * the placement the menu actually took, so a flipped menu points the right\n * way, and it widens the gap to the trigger from 0.25rem to popover's 0.5rem\n * so the tip does not touch the control.\n *\n * Turn it off on a menu with no padding of its own (`--wr-dropdown-padding: 0`)\n * or one that clips its overflow: the square reaches about 3px inside the\n * menu's border, over the first row, and `overflow` cuts its tip off.\n * Read when the menu opens. @default true\n */\n readonly arrow = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Extra CSS classes for the menu's overlay pane.\n *\n * The pane is appended to the overlay container, not to this component, so\n * nothing in the consumer's own template encloses it and no descendant rule\n * written around the trigger can reach it. This input is the only per-instance\n * handle on it. A space-separated string works as well as an array.\n */\n readonly panelClass = input<WrClassInput>(null);\n\n /** Fires after the menu opens. */\n readonly opened = output<void>();\n\n /** Fires after the menu closes. */\n readonly closed = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly overlay = inject(WR_OVERLAY);\n /**\n * The reading direction the open menu has to keep up with.\n *\n * Optional inject: `Directionality` is root-provided, so this is never null in\n * an app — but a bare `TestBed` that provides nothing should still get a menu\n * that opens, with simply nothing ambient to follow.\n */\n private readonly dir = inject(Directionality, { optional: true });\n private readonly outsideClick = inject(WrOutsideClick);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n private readonly openState = signal(false);\n\n /** Whether the menu is open. Read-only: `open()` and `close()` change it. */\n readonly isOpen = this.openState.asReadonly();\n\n /** The id used only when the consumer's element carries none of its own. */\n private readonly fallbackId = `wr-dropdown-trigger-${++triggerUid}`;\n\n /**\n * Id the menu names itself after. The trigger is the CONSUMER's own element, so\n * an `id` they already put there wins: overwriting it broke `<label for>`,\n * `document.getElementById` and any `aria-labelledby` aimed at that button from\n * elsewhere in their app. The generated one is only a fallback so the menu has\n * something to reference.\n *\n * A GETTER, read fresh by the host binding on every pass, rather than a field\n * resolved in the constructor. A static `id=\"…\"` is on the element before a\n * directive is instantiated and so was already honoured; a BOUND `[id]` is\n * not — it lands with the rest of the template's bindings, which run before\n * host bindings but after construction, so the constructor read an empty\n * string, fell through to the fallback, and the host binding then wrote that\n * fallback over the value the template had just set. Everything bound was\n * lost — `[id]`, `[attr.id]` and an interpolated `id=\"dd-{{ n }}\"` alike —\n * while the static form survived, which is the shape that makes it look like\n * a naming convention rather than a defect.\n *\n * `.id` rather than `getAttribute`: it is always a string, and an empty one is\n * no id at all, so it falls through to the fallback.\n */\n protected get triggerId(): string {\n return this.host.nativeElement.id || this.fallbackId;\n }\n\n private overlayRef: OverlayRef | null = null;\n\n /** The root menu's link to the submenus open below it. */\n private level: WrDropdownLevel | null = null;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('dropdown');\n // The host view carrying `[wrDropdown]` can be destroyed while the menu is\n // open — a route change, or an `@if` around the trigger. The overlay lives\n // in the CDK container, not in that view, so nothing removes it unless we do.\n this.destroyRef.onDestroy(() => this.closeOverlay(false));\n\n effect(() => {\n if (this.isOpen()) {\n this.openOverlay();\n } else {\n this.closeOverlay();\n }\n });\n }\n\n /** Open the menu. */\n open(): void {\n this.openState.set(true);\n }\n\n /** Close the menu. */\n close(): void {\n this.openState.set(false);\n }\n\n /** Toggle the menu. */\n toggle(): void {\n this.openState.update(v => !v);\n }\n\n // Host listeners\n\n /** @internal */\n /**\n * Whether the pointer, rather than the keyboard, opened the current menu.\n *\n * A hover-opened menu must not take focus — the APG shows a menu on hover and\n * leaves the caret where it was — while a keyboard-opened one must. The\n * trigger MODE cannot answer that on its own: a `trigger=\"hover\"` menu is\n * still openable with Enter, and that open should focus the first item.\n */\n private openedByPointer = false;\n\n protected onClick(event: MouseEvent): void {\n if (this.trigger() !== 'click') return;\n event.stopPropagation();\n this.openedByPointer = false;\n this.toggle();\n }\n\n /** @internal */\n protected onMouseEnter(): void {\n if (this.trigger() !== 'hover') return;\n // A POINTER opened this, so the menu must not take the keyboard with it —\n // see `openedByPointer`.\n this.openedByPointer = true;\n this.openState.set(true);\n }\n\n /** @internal */\n protected onMouseLeave(event: MouseEvent): void {\n if (this.trigger() !== 'hover') return;\n const related = event.relatedTarget as Node | null;\n if (this.inMenus(related)) return;\n this.openState.set(false);\n }\n\n // Overlay management\n\n private openOverlay(): void {\n if (this.overlayRef) return;\n\n const requested = this.position();\n // A list of fresh objects, kept: the CDK reports the link it landed on by\n // handing that same object back, which is how the pane learns its placement.\n const positions = wrDropdownPositions(requested);\n\n // `withGrowAfterOpen`: past the first pass the CDK never gives the pane a box\n // larger than the last one it gave it. A menu measured with the wrong gap\n // (see the `positionChanges` handler below) is laid out once in a box sized\n // for the placement it is about to leave, and without this the pass that\n // corrects it inherits that box — a `right` menu with 70px below its trigger\n // moved above it into a 70px box and was squeezed all the same. The menu's\n // content does not change while it is open, so the box only ever grows back\n // to what the menu already needs.\n const connected = this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(positions)\n .withPush(true)\n .withGrowAfterOpen(true);\n\n this.overlayRef = this.overlay.create({\n positionStrategy: connected,\n scrollStrategy: this.scrollStrategies.reposition(),\n // The menu starts on the placement it asked for, which is what the CDK\n // measures it with — see `wrDropdownPositions` for why that class must\n // already be on the pane rather than arrive with the position.\n panelClass: wrToClassList(\n 'wr-dropdown-overlay',\n `wr-dropdown-overlay--${requested}`,\n this.arrow() && 'wr-dropdown-overlay--arrow',\n this.panelClass()\n ),\n });\n\n // When the menu flips, the pane has to name the side it actually took: the\n // gap padding belongs on the edge facing the trigger and the arrow hangs off\n // that same edge, and both key off this class. The CDK emits synchronously\n // from inside its own `apply()`, so the swap lands in the same frame as the\n // move, and the next measurement (a scroll, a resize) sees the new gap.\n const ref = this.overlayRef;\n const pane = ref.overlayElement;\n // Index-aligned: `links[i]` is the object the CDK hands back for `chain[i]`.\n let chain = WR_DROPDOWN_FALLBACKS[requested];\n let links = positions;\n connected.positionChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ connectionPair }) => {\n const landed = chain[links.indexOf(connectionPair)];\n if (!landed) return;\n for (const name of Object.keys(WR_DROPDOWN_POSITIONS)) {\n pane.classList.toggle(`wr-dropdown-overlay--${name}`, name === landed);\n }\n\n // A `left` / `right` menu that fell below or above was tested for fit\n // with the WRONG gap. The CDK measures the pane once per pass, for every\n // link, with the class on it at the time — the side placement's, whose\n // gap is inline padding — so the block link was judged by a box one gap\n // shorter than the one the swap above has just given it, and a menu with\n // less room than that gap was squeezed instead of flipped. Measured in\n // Chromium at 375×700, `right` with 76px below the trigger: the menu shrank\n // from 74px to 68px and its last row ran through the bottom border.\n //\n // So the sides are dropped for as long as this menu stays open and the\n // pane is measured again, now carrying the block gap, against block links\n // only. Not re-admitted afterwards: measured with a block gap, a side link\n // looks one gap narrower than it renders, which is the same mistake the\n // other way round and a menu that would flap between the two. Deferred to\n // a microtask because this runs INSIDE the CDK's `apply()`, which records\n // the link it landed on after this returns — a nested pass would have that\n // record overwritten by the outer one. A microtask still lands before the\n // frame is painted.\n if (isSidePlacement(landed) || !chain.some(isSidePlacement)) return;\n const kept = chain.flatMap((name, i) => (isSidePlacement(name) ? [] : [i]));\n chain = kept.map(i => chain[i]);\n links = kept.map(i => links[i]);\n connected.withPositions(links);\n queueMicrotask(() => {\n if (this.overlayRef === ref) ref.updatePosition();\n });\n });\n\n // `create()` above froze the direction into the ref as a string, and nothing\n // in the CDK ever revisits it. This menu is where it shows first: the docs\n // site keeps its own LTR/RTL switch INSIDE a dropdown, so the flip is made\n // from within the one panel that has to answer it.\n //\n // No callback — `WR_DROPDOWN_POSITIONS` anchors on `start` / `end` and\n // carries no `offsetX`, so letting the CDK re-resolve those against the new\n // direction is the whole job.\n wrFollowDirection(this.overlayRef, this.dir, this.injector);\n\n // Wire trigger id into menu so it can render aria-labelledby.\n this.menu().triggerId.set(this.triggerId);\n\n const portal = new TemplatePortal(this.menu().contentTpl(), this.vcr);\n this.overlayRef.attach(portal);\n\n this.level = {\n pane,\n parent: null,\n child: null,\n close: () => this.close(),\n pointerLeft: related => this.onMenusLeave(related),\n };\n wrDropdownRegisterLevel(this.level);\n\n // Focus the first menu item after the menu renders — unless a POINTER\n // opened it. This used to be unconditional, so merely sweeping the cursor\n // over a `trigger=\"hover\"` menu yanked the caret out of whatever the user\n // was typing; the APG's own rule is that hover shows a menu and does not\n // move focus into it. A keyboard open (Enter / Space / ArrowDown) still\n // focuses the first item, on a hover trigger too.\n if (!this.openedByPointer) queueMicrotask(() => this.focusItemAt(0));\n\n this.outsideClick\n .outsidePointerEvents(this.overlayRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (this.host.nativeElement.contains(event.target as Node)) return;\n this.openState.set(false);\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n this.handleMenuKeydown(event);\n });\n\n if (this.trigger() === 'hover') {\n this.overlayRef.overlayElement.addEventListener('mouseleave', this.onOverlayMouseLeave);\n }\n\n this.opened.emit();\n }\n\n /**\n * Tear the overlay down, and tell the host — unless the host is going away\n * with it.\n *\n * `notify: false` is the DESTROY path, and it is not a nicety. An `output()`\n * belongs to the view that declares it, so emitting from `onDestroy` is\n * refused: Angular logs `NG0953: Unexpected emit for destroyed OutputRef` and\n * the listener never runs. Measured — a `(closed)` handler on a dropdown whose\n * host view is removed while the menu is open fired zero times and left a\n * console error behind. There is nobody to notify at that point, because the\n * consumer's own view is being torn down in the same pass; `wr-popconfirm`\n * already disposes without emitting, and this brings the other two into line.\n *\n * The focus hand-back is skipped for the same reason — the host element is on\n * its way out of the document.\n */\n private closeOverlay(notify = true): void {\n if (!this.overlayRef) return;\n if (this.trigger() === 'hover') {\n this.overlayRef.overlayElement.removeEventListener('mouseleave', this.onOverlayMouseLeave);\n }\n // Take the focus back before the pane goes, or it lands on `<body>` and the\n // next Tab starts from the top of the document. Only when focus is actually\n // inside the menu: closing a menu nobody was in must not steal the caret\n // from wherever the user has since moved.\n // Submenus count, and are read before they close: each hands focus to its\n // own item on the way out.\n const focusWasInside = this.inMenus(document.activeElement);\n if (this.level) {\n this.level.child?.close();\n wrDropdownReleaseLevel(this.level);\n this.level = null;\n }\n this.overlayRef.dispose();\n this.overlayRef = null;\n if (notify) {\n if (focusWasInside) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n this.closed.emit();\n }\n }\n\n // Keyboard handling\n\n /** @internal Trigger keydown — ArrowDown/Up/Enter/Space open the menu. */\n protected onKeydown(event: KeyboardEvent): void {\n if (this.isOpen() || this.trigger() === 'manual') return;\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp' || event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n // Opened from the keyboard — including on a `hover` trigger, which stays\n // keyboard-operable — so the first item SHOULD take focus.\n this.openedByPointer = false;\n this.open();\n }\n }\n\n private handleMenuKeydown(event: KeyboardEvent): void {\n // The one keyboard handler of the whole chain: a submenu pane does not\n // listen, so the dispatcher brings its keys here, and the pane they were\n // typed in is the one the arrows walk.\n const level = this.level && wrDropdownLevelOf(this.level, event.target);\n const submenu = level?.parent ? level : null;\n const items = this.getItems(level?.pane);\n if (items.length === 0 && event.key !== 'Escape' && event.key !== 'Tab') return;\n const current = document.activeElement as HTMLElement | null;\n const idx = current ? items.indexOf(current) : -1;\n\n // CDK's keyboard dispatcher feeds this overlay EVERY document keydown, not\n // just the ones typed into it — and a `trigger=\"hover\"` menu is open with\n // the caret deliberately left wherever the user was (see `openedByPointer`).\n // So ownership is checked here rather than assumed: without it, ArrowDown /\n // ArrowUp / Home / End pressed in an unrelated field were `preventDefault`ed\n // and yanked focus into the menu. The trigger counts as ours — a hover menu\n // that the user has tabbed back to should still open to the keyboard.\n const typedIn = event.target;\n const ours = typedIn instanceof Node && (this.host.nativeElement.contains(typedIn) || level !== null);\n // Escape (and Tab) still close from anywhere — routing to the topmost\n // overlay regardless of focus is the dispatcher's whole job. Escape just\n // must not drag the caret onto the trigger from a field the user is in.\n if (!ours && event.key !== 'Escape' && event.key !== 'Tab') return;\n\n // Escape, or the arrow pointing back at the parent menu, steps out of a\n // submenu one level and lands on the item that owns it.\n if (submenu && (event.key === 'Escape' || event.key === (this.dir?.value === 'rtl' ? 'ArrowRight' : 'ArrowLeft'))) {\n event.preventDefault();\n submenu.close();\n return;\n }\n\n const focusAt = (index: number): void => {\n event.preventDefault();\n items[index]?.focus();\n };\n\n switch (event.key) {\n case 'Escape':\n event.preventDefault();\n this.openState.set(false);\n if (ours) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n break;\n case 'Tab':\n // Tab closes the menu and moves on, in either direction, from the\n // TRIGGER. Left alone, the browser's Tab runs from the item, and the\n // menu sits in the overlay container at the end of `<body>`: Tab went\n // to the top of the page and Shift+Tab to the footer, and the close\n // then found focus outside the pane and had nothing to hand back. So\n // the trigger takes focus here, synchronously and with no\n // `preventDefault`, and the browser's own Tab carries on from it to\n // its real neighbour — by the time the close runs, focus is already\n // past the pane and `closeOverlay` leaves it there. Not from a field\n // outside the menu, for the reason Escape gives above.\n if (ours) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n this.openState.set(false);\n break;\n case 'ArrowDown':\n focusAt(idx < items.length - 1 ? idx + 1 : 0);\n break;\n case 'ArrowUp':\n focusAt(idx > 0 ? idx - 1 : items.length - 1);\n break;\n case 'Home':\n focusAt(0);\n break;\n case 'End':\n focusAt(items.length - 1);\n break;\n default:\n break;\n }\n }\n\n /** The focus stops of `pane`, the root menu's own by default. */\n private getItems(pane = this.overlayRef?.overlayElement): readonly HTMLElement[] {\n return pane ? wrDropdownItems(pane) : [];\n }\n\n /** Whether `node` is in the root menu or in a submenu open below it. */\n private inMenus(node: unknown): boolean {\n return this.level !== null && wrDropdownLevelOf(this.level, node) !== null;\n }\n\n /** A `trigger=\"hover\"` menu closes once the pointer is off the trigger and every pane. */\n private onMenusLeave(related: EventTarget | null): void {\n if (this.trigger() !== 'hover') return;\n if (related instanceof Node && this.host.nativeElement.contains(related)) return;\n if (this.inMenus(related)) return;\n this.openState.set(false);\n }\n\n private focusItemAt(index: number): void {\n const items = this.getItems();\n if (items.length === 0) return;\n const clamped = ((index % items.length) + items.length) % items.length;\n items[clamped]?.focus();\n }\n\n private readonly onOverlayMouseLeave = (event: MouseEvent): void => this.onMenusLeave(event.relatedTarget);\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Component, TemplateRef, ViewEncapsulation, signal, viewChild } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\nlet uid = 0;\n\n/**\n * Holds the menu content rendered when a {@link WrDropdown} opens.\n *\n * The component itself doesn't render anywhere — the directive grabs its\n * internal `<ng-template>` and portals it into an overlay.\n *\n * @example\n * ```html\n * <button [wrDropdown]=\"menu\">Actions</button>\n * <wr-dropdown-menu #menu>\n * <wr-dropdown-item icon=\"copy\">Copy</wr-dropdown-item>\n * <wr-dropdown-item icon=\"trash\">Delete</wr-dropdown-item>\n * </wr-dropdown-menu>\n * ```\n *\n * @see https://ngwr.dev/reference/components/dropdown\n */\n@Component({\n selector: 'wr-dropdown-menu',\n template:\n '<ng-template><div class=\"wr-dropdown-menu\" role=\"menu\" [attr.id]=\"menuId()\" [attr.aria-labelledby]=\"triggerId() || null\"><ng-content /></div></ng-template>',\n exportAs: 'wrDropdownMenu',\n encapsulation: ViewEncapsulation.None,\n // A BOUND display rather than a static `style` attribute: Angular writes a\n // binding through `style.setProperty`, which no CSP governs, while a real\n // `style=\"…\"` attribute is refused under `style-src 'self'` — and this host\n // would then lay out an empty box in the middle of the content.\n host: { '[style.display]': \"'none'\" },\n})\nexport class WrDropdownMenu {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('dropdown');\n }\n\n /** The internal template the directive portals into the overlay. @internal */\n readonly contentTpl = viewChild.required(TemplateRef);\n\n /** Stable id used on the menu element and referenced from the trigger's `aria-controls`. */\n readonly menuId = signal(`wr-dropdown-menu-${++uid}`);\n\n /** Trigger element id, set by the directive for `aria-labelledby` wiring. */\n readonly triggerId = signal<string | null>(null);\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ElementRef, ViewEncapsulation, computed, inject, input } from '@angular/core';\n\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Single row inside a `<wr-dropdown-menu>`.\n *\n * @example\n * ```html\n * <wr-dropdown-item icon=\"copy\" (click)=\"copy()\">Copy</wr-dropdown-item>\n * <wr-dropdown-item icon=\"trash\" disabled>Delete</wr-dropdown-item>\n * ```\n */\n@Component({\n selector: 'wr-dropdown-item',\n templateUrl: './dropdown-item.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'menuitem',\n class: 'wr-dropdown-item',\n '[class]': 'classes()',\n '[attr.tabindex]': '-1',\n '[attr.aria-disabled]': 'disabled() ? true : null',\n '(keydown.enter)': 'activate($event)',\n '(keydown.space)': 'activate($event)',\n },\n imports: [WrIcon],\n})\nexport class WrDropdownItem {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('dropdown');\n }\n\n /** Optional leading icon name. @default null */\n readonly icon = input<WrIconName | null>(null);\n\n /** Disable interaction (suppresses pointer + keyboard). @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n protected readonly classes = computed(() => {\n const parts: string[] = [];\n if (this.disabled()) parts.push('wr-dropdown-item--disabled');\n return parts.join(' ');\n });\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** @internal Keyboard activation — fires the same click consumers bind to. */\n protected activate(event: Event): void {\n if (this.disabled()) return;\n event.preventDefault();\n this.host.nativeElement.click();\n }\n}\n","@if (icon(); as name) {\n <wr-icon class=\"wr-dropdown-item__icon\" [name]=\"name\" />\n}\n<span class=\"wr-dropdown-item__label\">\n <ng-content />\n</span>\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { type ConnectedPosition, type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { DestroyRef, Directive, ElementRef, Injector, ViewContainerRef, inject, input, signal } from '@angular/core';\n\nimport type { Subscription } from 'rxjs';\n\nimport { WR_OVERLAY, WrOutsideClick, wrFollowDirection } from 'ngwr/overlay';\nimport { wrCheckStyles, wrNumAttr, wrRestoreFocus } from 'ngwr/utils';\n\nimport {\n type WrDropdownLevel,\n wrDropdownItems,\n wrDropdownLevelAround,\n wrDropdownLevelOf,\n wrDropdownRegisterLevel,\n wrDropdownReleaseLevel,\n} from './dropdown-chain';\nimport type { WrDropdownMenu } from './dropdown-menu';\n\n/**\n * Beside the item at the inline end, then at the inline start, each first with\n * the tops aligned and then the bottoms. `start` / `end` and no offsets, so the\n * CDK mirrors the list under RTL by itself.\n */\nconst POSITIONS: ConnectedPosition[] = [\n { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom' },\n { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom' },\n];\n\nlet itemUid = 0;\n\n/**\n * Put on a `<wr-dropdown-item>` to open another `<wr-dropdown-menu>` beside it.\n * The submenu's own items can carry it too, to any depth.\n *\n * @example\n * ```html\n * <button [wrDropdown]=\"file\">File</button>\n *\n * <wr-dropdown-menu #file>\n * <wr-dropdown-item>New</wr-dropdown-item>\n * <wr-dropdown-item [wrDropdownSubmenu]=\"exportAs\">Export</wr-dropdown-item>\n * </wr-dropdown-menu>\n *\n * <wr-dropdown-menu #exportAs>\n * <wr-dropdown-item (click)=\"export('csv')\">CSV</wr-dropdown-item>\n * <wr-dropdown-item (click)=\"export('pdf')\">PDF</wr-dropdown-item>\n * </wr-dropdown-menu>\n * ```\n *\n * @see https://ngwr.dev/reference/components/dropdown\n */\n@Directive({\n selector: '[wrDropdownSubmenu]',\n exportAs: 'wrDropdownSubmenu',\n host: {\n class: 'wr-dropdown-submenu-trigger',\n '[attr.id]': 'itemId',\n 'aria-haspopup': 'menu',\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.aria-controls]': 'isOpen() ? menu().menuId() : null',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeydown($event)',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave($event)',\n },\n})\nexport class WrDropdownSubmenu {\n /** Menu to open beside the item. Pass a `<wr-dropdown-menu>` template reference. */\n readonly menu = input.required<WrDropdownMenu>({ alias: 'wrDropdownSubmenu' });\n\n /** How long the pointer rests on the item before the submenu opens, in ms. @default 150 */\n readonly showDelay = input(150, { transform: wrNumAttr(150) });\n\n /**\n * How long the submenu stays once the pointer has left both the item and the\n * submenu, in ms. Long enough to cross a neighbouring item on the way in.\n * @default 150\n */\n readonly hideDelay = input(150, { transform: wrNumAttr(150) });\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly overlay = inject(WR_OVERLAY);\n private readonly dir = inject(Directionality, { optional: true });\n private readonly outsideClick = inject(WrOutsideClick);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly injector = inject(Injector);\n\n private readonly openState = signal(false);\n\n /** Whether the submenu is open. Read-only: `open()` and `close()` change it. */\n readonly isOpen = this.openState.asReadonly();\n\n private readonly fallbackId = `wr-dropdown-submenu-trigger-${++itemUid}`;\n\n /** The consumer's own `id` wins, read fresh for the reason `WrDropdown` gives. */\n protected get itemId(): string {\n return this.host.nativeElement.id || this.fallbackId;\n }\n\n private overlayRef: OverlayRef | null = null;\n private level: WrDropdownLevel | null = null;\n private outside: Subscription | null = null;\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('dropdown');\n // The item is projected content: it outlives the pane it was rendered in,\n // and goes only with the consumer's own view.\n inject(DestroyRef).onDestroy(() => this.dispose(false));\n }\n\n /** Open the submenu and move focus to its first item. The item has to be in an open menu. */\n open(): void {\n this.show(true);\n }\n\n /** Close the submenu and every submenu below it. */\n close(): void {\n this.dispose(true);\n }\n\n /** @internal A real click opens; Enter and Space arrive as a click with no pointer behind it. */\n protected onClick(event: MouseEvent): void {\n this.show(event.detail === 0);\n }\n\n /** @internal The arrow pointing the way the menus cascade walks into the submenu. */\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key !== (this.dir?.value === 'rtl' ? 'ArrowLeft' : 'ArrowRight') || this.disabled) return;\n event.preventDefault();\n this.show(true);\n }\n\n /** @internal */\n protected onMouseEnter(): void {\n this.clearTimers();\n if (this.overlayRef || this.disabled) return;\n this.showTimer = setTimeout(() => this.show(false), this.showDelay());\n }\n\n /** @internal */\n protected onMouseLeave(event: MouseEvent): void {\n this.clearTimers();\n if (!this.level || wrDropdownLevelOf(this.level, event.relatedTarget)) return;\n this.hideLater();\n }\n\n private get disabled(): boolean {\n return this.host.nativeElement.getAttribute('aria-disabled') === 'true';\n }\n\n /** A pointer shows the submenu and leaves the caret alone; the keyboard walks in. */\n private show(focus: boolean): void {\n this.clearTimers();\n if (!this.overlayRef) this.attach();\n if (focus && this.overlayRef) wrDropdownItems(this.overlayRef.overlayElement)[0]?.focus();\n }\n\n private attach(): void {\n const parent = wrDropdownLevelAround(this.host.nativeElement);\n if (!parent || this.disabled) return;\n parent.child?.close();\n\n const ref = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(POSITIONS)\n .withPush(true)\n .withGrowAfterOpen(true),\n scrollStrategy: this.scrollStrategies.reposition(),\n panelClass: ['wr-dropdown-overlay', 'wr-dropdown-overlay--submenu'],\n });\n wrFollowDirection(ref, this.dir, this.injector);\n\n this.menu().triggerId.set(this.itemId);\n ref.attach(new TemplatePortal(this.menu().contentTpl(), this.vcr));\n\n const pane = ref.overlayElement;\n pane.addEventListener('mouseenter', this.clearTimers);\n pane.addEventListener('mouseleave', this.onPaneLeave);\n pane.addEventListener('click', this.onPaneClick);\n\n // Listening is also what keeps a click INSIDE this pane from reading as a\n // click outside the menus under it: the registry stops at the first pane\n // that holds the target.\n this.outside = this.outsideClick.outsidePointerEvents(ref).subscribe(event => {\n if (!this.host.nativeElement.contains(event.target as Node)) this.close();\n });\n\n // No `keydownEvents()` subscription: the CDK routes keys to the topmost\n // overlay that listens, and the root menu answers for every level.\n this.overlayRef = ref;\n this.level = { pane, parent, child: null, close: () => this.close() };\n wrDropdownRegisterLevel(this.level);\n this.openState.set(true);\n }\n\n private dispose(restoreFocus: boolean): void {\n this.clearTimers();\n const ref = this.overlayRef;\n const level = this.level;\n if (!ref || !level) return;\n\n // Read before the levels below go, since each hands focus up to its own item.\n const focusWasInside = wrDropdownLevelOf(level, document.activeElement) !== null;\n level.child?.close();\n wrDropdownReleaseLevel(level);\n\n const pane = ref.overlayElement;\n pane.removeEventListener('mouseenter', this.clearTimers);\n pane.removeEventListener('mouseleave', this.onPaneLeave);\n pane.removeEventListener('click', this.onPaneClick);\n this.outside?.unsubscribe();\n this.outside = null;\n\n ref.dispose();\n this.overlayRef = null;\n this.level = null;\n this.openState.set(false);\n if (restoreFocus && focusWasInside) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n }\n\n private hideLater(): void {\n this.hideTimer = setTimeout(() => this.close(), this.hideDelay());\n }\n\n private readonly clearTimers = (): void => {\n if (this.showTimer !== null) clearTimeout(this.showTimer);\n if (this.hideTimer !== null) clearTimeout(this.hideTimer);\n this.showTimer = this.hideTimer = null;\n };\n\n private readonly onPaneLeave = (event: MouseEvent): void => {\n const level = this.level;\n const related = event.relatedTarget;\n if (!level) return;\n if (related instanceof Node && this.host.nativeElement.contains(related)) return;\n if (wrDropdownLevelOf(level, related)) return;\n this.clearTimers();\n this.hideLater();\n\n let root = level;\n while (root.parent) root = root.parent;\n root.pointerLeft?.(related);\n };\n\n /** Choosing a leaf closes every submenu, up to the root menu's own item. */\n private readonly onPaneClick = (event: MouseEvent): void => {\n const item = event.target instanceof Element ? event.target.closest('.wr-dropdown-item') : null;\n if (!item || item.matches('.wr-dropdown-item--disabled, .wr-dropdown-submenu-trigger')) return;\n\n let top = this.level;\n while (top?.parent?.parent) top = top.parent;\n top?.close();\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAQA,MAAM,yBAAS,IAAI,QAAO;AAwB1B,SAAgB,wBAAwB,OAAsB;CAC5D,OAAO,IAAI,MAAM,MAAM,KAAK;CAC5B,IAAI,MAAM,QAAQ,MAAM,OAAO,QAAQ;AACzC;AAGA,SAAgB,uBAAuB,OAAsB;CAC3D,OAAO,OAAO,MAAM,IAAI;CACxB,IAAI,MAAM,QAAQ,UAAU,OAAO,MAAM,OAAO,QAAQ;AAC1D;AAGA,SAAgB,sBAAsB,IAAe;CACnD,MAAM,OAAO,GAAG,QAAqB,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IACxB,WAAW;IACX,aAAa;IACb,gBAAgB;IAChB,gBAAgB;GACjB;EACF,CAAA"}
1
+ {"version":3,"file":"ngwr-dropdown.mjs","names":[],"sources":["../../../projects/lib/dropdown/dropdown-chain.ts","../../../projects/lib/dropdown/types/dropdown-position.ts","../../../projects/lib/dropdown/dropdown.ts","../../../projects/lib/dropdown/dropdown-menu.ts","../../../projects/lib/dropdown/dropdown-item.ts","../../../projects/lib/dropdown/dropdown-item.html","../../../projects/lib/dropdown/dropdown-submenu.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/** Open levels by their pane, so an item can find the level it was rendered in. */\nconst levels = new WeakMap<HTMLElement, WrDropdownLevel>();\n\n/**\n * One open menu of a dropdown: the root, or a submenu hanging off an item.\n *\n * Every level is its own overlay pane, a sibling of the others in the overlay\n * container, so neither the DOM nor the injector tree says which pane opened\n * which. This is that link.\n *\n * @internal\n */\nexport interface WrDropdownLevel {\n readonly pane: HTMLElement;\n /** `null` on the root menu. */\n readonly parent: WrDropdownLevel | null;\n /** The submenu open from one of this pane's items. */\n child: WrDropdownLevel | null;\n /** Close this level and every level below it. */\n close(): void;\n /** Root only: the pointer left a pane below for `related`. */\n pointerLeft?(related: EventTarget | null): void;\n}\n\n/** @internal */\nexport function wrDropdownRegisterLevel(level: WrDropdownLevel): void {\n levels.set(level.pane, level);\n if (level.parent) level.parent.child = level;\n}\n\n/** @internal */\nexport function wrDropdownReleaseLevel(level: WrDropdownLevel): void {\n levels.delete(level.pane);\n if (level.parent?.child === level) level.parent.child = null;\n}\n\n/** The open level `el` is rendered in. @internal */\nexport function wrDropdownLevelAround(el: HTMLElement): WrDropdownLevel | null {\n const pane = el.closest<HTMLElement>('.wr-dropdown-overlay');\n return (pane && levels.get(pane)) ?? null;\n}\n\n/** The level at or below `from` whose pane holds `node`. @internal */\nexport function wrDropdownLevelOf(from: WrDropdownLevel, node: unknown): WrDropdownLevel | null {\n if (!(node instanceof Node)) return null;\n for (let level: WrDropdownLevel | null = from; level; level = level.child) {\n if (level.pane.contains(node)) return level;\n }\n return null;\n}\n\n/** The focus stops of one pane. A disabled item is not one. @internal */\nexport function wrDropdownItems(pane: HTMLElement): HTMLElement[] {\n return Array.from(pane.querySelectorAll<HTMLElement>('.wr-dropdown-item:not(.wr-dropdown-item--disabled)'));\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { ConnectedPosition } from '@angular/cdk/overlay';\n\nimport { type WrAnchoredPosition, wrAnchoredPositions } from 'ngwr/overlay';\n\n/**\n * Where the dropdown menu opens, relative to the trigger.\n */\nexport type WrDropdownPosition = WrAnchoredPosition;\n\n/**\n * The list `withPositions()` wants — the shared fallback chain `wr-popover`\n * walks, as fresh objects, so the directive can tell which link the CDK landed\n * on by the IDENTITY of the position it reports back.\n *\n * No gap, unlike `wr-popover`'s list: the distance between the trigger and the\n * menu is PADDING on the pane (`.wr-dropdown-overlay--<placement>`), so the\n * pointer crossing it is still over the overlay and a `trigger=\"hover\"` menu\n * does not close on the way in. It also means nothing here is\n * direction-dependent, which is why the directive needs no `wrMirrorOffsets`.\n *\n * Deliberately untagged too, where `wr-popover` puts each placement's class in\n * the position's own `panelClass`. The CDK takes those classes off the pane\n * BEFORE it measures it for fit, and here the class carries the gap, as padding\n * — so a tagged list is measured without its gap. A menu with less room than\n * that gap was judged to fit and the flexible bounding box squeezed it instead:\n * measured in Chromium at 1280×700 with 2px to spare below the trigger, the\n * menu's box shrank from 74px to 68px and its last row ran through the bottom\n * border. The directive writes the class itself, which the CDK leaves alone, so\n * the pane is measured with the gap it will render with. Once a side placement\n * has fallen below or above, the directive drops the side links for as long as\n * the menu stays open — the gap changes axis with the placement, so a pane is\n * only measured correctly against links on one axis at a time.\n *\n * @internal\n */\nexport function wrDropdownPositions(position: WrDropdownPosition): ConnectedPosition[] {\n return wrAnchoredPositions(position);\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Injector,\n ViewContainerRef,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport {\n WR_ANCHORED_FALLBACKS,\n WR_ANCHORED_POSITIONS,\n WR_OVERLAY,\n WrOutsideClick,\n wrFollowDirection,\n} from 'ngwr/overlay';\nimport { wrToClassList, wrCheckStyles, type WrClassInput, wrRestoreFocus } from 'ngwr/utils';\n\nimport {\n type WrDropdownLevel,\n wrDropdownItems,\n wrDropdownLevelOf,\n wrDropdownRegisterLevel,\n wrDropdownReleaseLevel,\n} from './dropdown-chain';\nimport type { WrDropdownMenu } from './dropdown-menu';\nimport { type WrDropdownPosition, type WrDropdownTrigger, wrDropdownPositions } from './types';\n\n/** Whether a placement puts the menu BESIDE its trigger, where the gap is inline padding. */\nconst isSidePlacement = (name: WrDropdownPosition): boolean => name.startsWith('left') || name.startsWith('right');\n\n/**\n * Attach to any element to open a `<wr-dropdown-menu>` as a CDK overlay.\n *\n * @example\n * ```html\n * <button [wrDropdown]=\"menu\" position=\"bottom-start\" trigger=\"click\">\n * Actions\n * </button>\n *\n * <wr-dropdown-menu #menu>\n * <wr-dropdown-item icon=\"copy\" (click)=\"copy()\">Copy</wr-dropdown-item>\n * <wr-dropdown-item icon=\"trash\" (click)=\"remove()\">Delete</wr-dropdown-item>\n * </wr-dropdown-menu>\n * ```\n *\n * @see https://ngwr.dev/reference/components/dropdown\n */\nlet triggerUid = 0;\n\n@Directive({\n selector: '[wrDropdown]',\n exportAs: 'wrDropdown',\n host: {\n class: 'wr-dropdown-trigger',\n '[class.wr-dropdown-trigger--disabled]': 'disabled()',\n '[attr.id]': 'triggerId',\n '[attr.aria-haspopup]': 'disabled() ? null : \"menu\"',\n '[attr.aria-expanded]': 'disabled() ? null : isOpen()',\n '[attr.aria-controls]': 'isOpen() ? menu().menuId() : null',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeydown($event)',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave($event)',\n },\n})\nexport class WrDropdown {\n /** Menu to open. Pass a `<wr-dropdown-menu>` template reference. */\n readonly menu = input.required<WrDropdownMenu>({ alias: 'wrDropdown' });\n\n /**\n * How the menu opens. `manual` leaves the host alone, for one menu shared by\n * many anchors: a click handler records the row, then calls `open()`.\n *\n * @default 'click'\n * @example\n * ```html\n * <button #trigger=\"wrDropdown\" [wrDropdown]=\"menu\" trigger=\"manual\" (click)=\"pick(row); trigger.open()\">\n * ```\n */\n readonly trigger = input<WrDropdownTrigger>('click');\n\n /**\n * Where the menu anchors relative to the trigger: the twelve placements\n * `wr-popover` takes. A placement that does not fit flips to the opposite side\n * (a `left*` / `right*` menu may also drop below or above, and then stays\n * there until it closes), and the pane's\n * `wr-dropdown-overlay--<placement>` class names the side it actually took.\n * @default 'bottom-start'\n */\n readonly position = input<WrDropdownPosition>('bottom-start');\n\n /**\n * Draw a small arrow on the menu's edge, pointing at the trigger — the one\n * `wr-popover` and `wr-popconfirm` draw, from the same shared rule. It follows\n * the placement the menu actually took, so a flipped menu points the right\n * way, and it widens the gap to the trigger from 0.25rem to popover's 0.5rem\n * so the tip does not touch the control.\n *\n * Turn it off on a menu with no padding of its own (`--wr-dropdown-padding: 0`)\n * or one that clips its overflow: the square reaches about 3px inside the\n * menu's border, over the first row, and `overflow` cuts its tip off.\n * Read when the menu opens. @default true\n */\n readonly arrow = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Turns the trigger off: no click, hover or key opens the menu, `open()` and\n * `toggle()` do nothing (a `manual` trigger included), and an open menu\n * closes. The host publishes no popup ARIA meanwhile and carries\n * `wr-dropdown-trigger--disabled`.\n *\n * The host's own `disabled` stays yours: the directive never sets it.\n *\n * @default false\n */\n readonly disabled = input(false, { alias: 'wrDropdownDisabled', transform: coerceBooleanProperty });\n\n /**\n * Extra CSS classes for the menu's overlay pane.\n *\n * The pane is appended to the overlay container, not to this component, so\n * nothing in the consumer's own template encloses it and no descendant rule\n * written around the trigger can reach it. This input is the only per-instance\n * handle on it. A space-separated string works as well as an array.\n */\n readonly panelClass = input<WrClassInput>(null);\n\n /** Fires after the menu opens. */\n readonly opened = output<void>();\n\n /** Fires after the menu closes. */\n readonly closed = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly overlay = inject(WR_OVERLAY);\n /**\n * The reading direction the open menu has to keep up with.\n *\n * Optional inject: `Directionality` is root-provided, so this is never null in\n * an app — but a bare `TestBed` that provides nothing should still get a menu\n * that opens, with simply nothing ambient to follow.\n */\n private readonly dir = inject(Directionality, { optional: true });\n private readonly outsideClick = inject(WrOutsideClick);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n private readonly openState = signal(false);\n\n /** Whether the menu is open. Read-only: `open()` and `close()` change it. */\n readonly isOpen = this.openState.asReadonly();\n\n /** The id used only when the consumer's element carries none of its own. */\n private readonly fallbackId = `wr-dropdown-trigger-${++triggerUid}`;\n\n /**\n * Id the menu names itself after. The trigger is the CONSUMER's own element, so\n * an `id` they already put there wins: overwriting it broke `<label for>`,\n * `document.getElementById` and any `aria-labelledby` aimed at that button from\n * elsewhere in their app. The generated one is only a fallback so the menu has\n * something to reference.\n *\n * A GETTER, read fresh by the host binding on every pass, rather than a field\n * resolved in the constructor. A static `id=\"…\"` is on the element before a\n * directive is instantiated and so was already honoured; a BOUND `[id]` is\n * not — it lands with the rest of the template's bindings, which run before\n * host bindings but after construction, so the constructor read an empty\n * string, fell through to the fallback, and the host binding then wrote that\n * fallback over the value the template had just set. Everything bound was\n * lost — `[id]`, `[attr.id]` and an interpolated `id=\"dd-{{ n }}\"` alike —\n * while the static form survived, which is the shape that makes it look like\n * a naming convention rather than a defect.\n *\n * `.id` rather than `getAttribute`: it is always a string, and an empty one is\n * no id at all, so it falls through to the fallback.\n */\n protected get triggerId(): string {\n return this.host.nativeElement.id || this.fallbackId;\n }\n\n private overlayRef: OverlayRef | null = null;\n\n /** The root menu's link to the submenus open below it. */\n private level: WrDropdownLevel | null = null;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('dropdown');\n // The host view carrying `[wrDropdown]` can be destroyed while the menu is\n // open — a route change, or an `@if` around the trigger. The overlay lives\n // in the CDK container, not in that view, so nothing removes it unless we do.\n this.destroyRef.onDestroy(() => this.closeOverlay(false));\n\n effect(() => {\n if (this.isOpen()) {\n this.openOverlay();\n } else {\n this.closeOverlay();\n }\n });\n effect(() => {\n if (this.disabled()) this.openState.set(false);\n });\n }\n\n /** Open the menu. Does nothing while the trigger is disabled. */\n open(): void {\n if (this.disabled()) return;\n this.openState.set(true);\n }\n\n /** Close the menu. */\n close(): void {\n this.openState.set(false);\n }\n\n /** Toggle the menu. */\n toggle(): void {\n if (this.isOpen()) this.close();\n else this.open();\n }\n\n // Host listeners\n\n /** @internal */\n /**\n * Whether the pointer, rather than the keyboard, opened the current menu.\n *\n * A hover-opened menu must not take focus — the APG shows a menu on hover and\n * leaves the caret where it was — while a keyboard-opened one must. The\n * trigger MODE cannot answer that on its own: a `trigger=\"hover\"` menu is\n * still openable with Enter, and that open should focus the first item.\n */\n private openedByPointer = false;\n\n protected onClick(event: MouseEvent): void {\n if (this.disabled() || this.trigger() !== 'click') return;\n event.stopPropagation();\n this.openedByPointer = false;\n this.toggle();\n }\n\n /** @internal */\n protected onMouseEnter(): void {\n if (this.trigger() !== 'hover') return;\n // A POINTER opened this, so the menu must not take the keyboard with it —\n // see `openedByPointer`.\n this.openedByPointer = true;\n this.open();\n }\n\n /** @internal */\n protected onMouseLeave(event: MouseEvent): void {\n if (this.trigger() !== 'hover') return;\n const related = event.relatedTarget as Node | null;\n if (this.inMenus(related)) return;\n this.openState.set(false);\n }\n\n // Overlay management\n\n private openOverlay(): void {\n if (this.overlayRef) return;\n\n const requested = this.position();\n // A list of fresh objects, kept: the CDK reports the link it landed on by\n // handing that same object back, which is how the pane learns its placement.\n const positions = wrDropdownPositions(requested);\n\n // `withGrowAfterOpen`: past the first pass the CDK never gives the pane a box\n // larger than the last one it gave it. A menu measured with the wrong gap\n // (see the `positionChanges` handler below) is laid out once in a box sized\n // for the placement it is about to leave, and without this the pass that\n // corrects it inherits that box — a `right` menu with 70px below its trigger\n // moved above it into a 70px box and was squeezed all the same. The menu's\n // content does not change while it is open, so the box only ever grows back\n // to what the menu already needs.\n const connected = this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(positions)\n .withPush(true)\n .withGrowAfterOpen(true);\n\n this.overlayRef = this.overlay.create({\n positionStrategy: connected,\n scrollStrategy: this.scrollStrategies.reposition(),\n // The menu starts on the placement it asked for, which is what the CDK\n // measures it with — see `wrDropdownPositions` for why that class must\n // already be on the pane rather than arrive with the position.\n panelClass: wrToClassList(\n 'wr-dropdown-overlay',\n `wr-dropdown-overlay--${requested}`,\n this.arrow() && 'wr-dropdown-overlay--arrow',\n this.panelClass()\n ),\n });\n\n // When the menu flips, the pane has to name the side it actually took: the\n // gap padding belongs on the edge facing the trigger and the arrow hangs off\n // that same edge, and both key off this class. The CDK emits synchronously\n // from inside its own `apply()`, so the swap lands in the same frame as the\n // move, and the next measurement (a scroll, a resize) sees the new gap.\n const ref = this.overlayRef;\n const pane = ref.overlayElement;\n // Index-aligned: `links[i]` is the object the CDK hands back for `chain[i]`.\n let chain = WR_ANCHORED_FALLBACKS[requested];\n let links = positions;\n connected.positionChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ connectionPair }) => {\n const landed = chain[links.indexOf(connectionPair)];\n if (!landed) return;\n for (const name of Object.keys(WR_ANCHORED_POSITIONS)) {\n pane.classList.toggle(`wr-dropdown-overlay--${name}`, name === landed);\n }\n\n // A `left` / `right` menu that fell below or above was tested for fit\n // with the WRONG gap. The CDK measures the pane once per pass, for every\n // link, with the class on it at the time — the side placement's, whose\n // gap is inline padding — so the block link was judged by a box one gap\n // shorter than the one the swap above has just given it, and a menu with\n // less room than that gap was squeezed instead of flipped. Measured in\n // Chromium at 375×700, `right` with 76px below the trigger: the menu shrank\n // from 74px to 68px and its last row ran through the bottom border.\n //\n // So the sides are dropped for as long as this menu stays open and the\n // pane is measured again, now carrying the block gap, against block links\n // only. Not re-admitted afterwards: measured with a block gap, a side link\n // looks one gap narrower than it renders, which is the same mistake the\n // other way round and a menu that would flap between the two. Deferred to\n // a microtask because this runs INSIDE the CDK's `apply()`, which records\n // the link it landed on after this returns — a nested pass would have that\n // record overwritten by the outer one. A microtask still lands before the\n // frame is painted.\n if (isSidePlacement(landed) || !chain.some(isSidePlacement)) return;\n const kept = chain.flatMap((name, i) => (isSidePlacement(name) ? [] : [i]));\n chain = kept.map(i => chain[i]);\n links = kept.map(i => links[i]);\n connected.withPositions(links);\n queueMicrotask(() => {\n if (this.overlayRef === ref) ref.updatePosition();\n });\n });\n\n // `create()` above froze the direction into the ref as a string, and nothing\n // in the CDK ever revisits it. This menu is where it shows first: the docs\n // site keeps its own LTR/RTL switch INSIDE a dropdown, so the flip is made\n // from within the one panel that has to answer it.\n //\n // No callback — `WR_ANCHORED_POSITIONS` anchors on `start` / `end` and\n // carries no `offsetX`, so letting the CDK re-resolve those against the new\n // direction is the whole job.\n wrFollowDirection(this.overlayRef, this.dir, this.injector);\n\n // Wire trigger id into menu so it can render aria-labelledby.\n this.menu().triggerId.set(this.triggerId);\n\n const portal = new TemplatePortal(this.menu().contentTpl(), this.vcr);\n this.overlayRef.attach(portal);\n\n this.level = {\n pane,\n parent: null,\n child: null,\n close: () => this.close(),\n pointerLeft: related => this.onMenusLeave(related),\n };\n wrDropdownRegisterLevel(this.level);\n\n // Focus the first menu item after the menu renders — unless a POINTER\n // opened it. This used to be unconditional, so merely sweeping the cursor\n // over a `trigger=\"hover\"` menu yanked the caret out of whatever the user\n // was typing; the APG's own rule is that hover shows a menu and does not\n // move focus into it. A keyboard open (Enter / Space / ArrowDown) still\n // focuses the first item, on a hover trigger too.\n if (!this.openedByPointer) queueMicrotask(() => this.focusItemAt(0));\n\n this.outsideClick\n .outsidePointerEvents(this.overlayRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (this.host.nativeElement.contains(event.target as Node)) return;\n this.openState.set(false);\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n this.handleMenuKeydown(event);\n });\n\n if (this.trigger() === 'hover') {\n this.overlayRef.overlayElement.addEventListener('mouseleave', this.onOverlayMouseLeave);\n }\n\n this.opened.emit();\n }\n\n /**\n * Tear the overlay down, and tell the host — unless the host is going away\n * with it.\n *\n * `notify: false` is the DESTROY path, and it is not a nicety. An `output()`\n * belongs to the view that declares it, so emitting from `onDestroy` is\n * refused: Angular logs `NG0953: Unexpected emit for destroyed OutputRef` and\n * the listener never runs. Measured — a `(closed)` handler on a dropdown whose\n * host view is removed while the menu is open fired zero times and left a\n * console error behind. There is nobody to notify at that point, because the\n * consumer's own view is being torn down in the same pass; `wr-popconfirm`\n * already disposes without emitting, and this brings the other two into line.\n *\n * The focus hand-back is skipped for the same reason — the host element is on\n * its way out of the document.\n */\n private closeOverlay(notify = true): void {\n if (!this.overlayRef) return;\n if (this.trigger() === 'hover') {\n this.overlayRef.overlayElement.removeEventListener('mouseleave', this.onOverlayMouseLeave);\n }\n // Take the focus back before the pane goes, or it lands on `<body>` and the\n // next Tab starts from the top of the document. Only when focus is actually\n // inside the menu: closing a menu nobody was in must not steal the caret\n // from wherever the user has since moved.\n // Submenus count, and are read before they close: each hands focus to its\n // own item on the way out.\n const focusWasInside = this.inMenus(document.activeElement);\n if (this.level) {\n this.level.child?.close();\n wrDropdownReleaseLevel(this.level);\n this.level = null;\n }\n this.overlayRef.dispose();\n this.overlayRef = null;\n if (notify) {\n if (focusWasInside) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n this.closed.emit();\n }\n }\n\n // Keyboard handling\n\n /** @internal Trigger keydown — ArrowDown/Up/Enter/Space open the menu. */\n protected onKeydown(event: KeyboardEvent): void {\n if (this.disabled() || this.isOpen() || this.trigger() === 'manual') return;\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp' || event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n // Opened from the keyboard — including on a `hover` trigger, which stays\n // keyboard-operable — so the first item SHOULD take focus.\n this.openedByPointer = false;\n this.open();\n }\n }\n\n private handleMenuKeydown(event: KeyboardEvent): void {\n // The one keyboard handler of the whole chain: a submenu pane does not\n // listen, so the dispatcher brings its keys here, and the pane they were\n // typed in is the one the arrows walk.\n const level = this.level && wrDropdownLevelOf(this.level, event.target);\n const submenu = level?.parent ? level : null;\n const items = this.getItems(level?.pane);\n if (items.length === 0 && event.key !== 'Escape' && event.key !== 'Tab') return;\n const current = document.activeElement as HTMLElement | null;\n const idx = current ? items.indexOf(current) : -1;\n\n // CDK's keyboard dispatcher feeds this overlay EVERY document keydown, not\n // just the ones typed into it — and a `trigger=\"hover\"` menu is open with\n // the caret deliberately left wherever the user was (see `openedByPointer`).\n // So ownership is checked here rather than assumed: without it, ArrowDown /\n // ArrowUp / Home / End pressed in an unrelated field were `preventDefault`ed\n // and yanked focus into the menu. The trigger counts as ours — a hover menu\n // that the user has tabbed back to should still open to the keyboard.\n const typedIn = event.target;\n const ours = typedIn instanceof Node && (this.host.nativeElement.contains(typedIn) || level !== null);\n // Escape (and Tab) still close from anywhere — routing to the topmost\n // overlay regardless of focus is the dispatcher's whole job. Escape just\n // must not drag the caret onto the trigger from a field the user is in.\n if (!ours && event.key !== 'Escape' && event.key !== 'Tab') return;\n\n // Escape, or the arrow pointing back at the parent menu, steps out of a\n // submenu one level and lands on the item that owns it.\n if (submenu && (event.key === 'Escape' || event.key === (this.dir?.value === 'rtl' ? 'ArrowRight' : 'ArrowLeft'))) {\n event.preventDefault();\n submenu.close();\n return;\n }\n\n const focusAt = (index: number): void => {\n event.preventDefault();\n items[index]?.focus();\n };\n\n switch (event.key) {\n case 'Escape':\n event.preventDefault();\n this.openState.set(false);\n if (ours) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n break;\n case 'Tab':\n // Tab closes the menu and moves on, in either direction, from the\n // TRIGGER. Left alone, the browser's Tab runs from the item, and the\n // menu sits in the overlay container at the end of `<body>`: Tab went\n // to the top of the page and Shift+Tab to the footer, and the close\n // then found focus outside the pane and had nothing to hand back. So\n // the trigger takes focus here, synchronously and with no\n // `preventDefault`, and the browser's own Tab carries on from it to\n // its real neighbour — by the time the close runs, focus is already\n // past the pane and `closeOverlay` leaves it there. Not from a field\n // outside the menu, for the reason Escape gives above.\n if (ours) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n this.openState.set(false);\n break;\n case 'ArrowDown':\n focusAt(idx < items.length - 1 ? idx + 1 : 0);\n break;\n case 'ArrowUp':\n focusAt(idx > 0 ? idx - 1 : items.length - 1);\n break;\n case 'Home':\n focusAt(0);\n break;\n case 'End':\n focusAt(items.length - 1);\n break;\n default:\n break;\n }\n }\n\n /** The focus stops of `pane`, the root menu's own by default. */\n private getItems(pane = this.overlayRef?.overlayElement): readonly HTMLElement[] {\n return pane ? wrDropdownItems(pane) : [];\n }\n\n /** Whether `node` is in the root menu or in a submenu open below it. */\n private inMenus(node: unknown): boolean {\n return this.level !== null && wrDropdownLevelOf(this.level, node) !== null;\n }\n\n /** A `trigger=\"hover\"` menu closes once the pointer is off the trigger and every pane. */\n private onMenusLeave(related: EventTarget | null): void {\n if (this.trigger() !== 'hover') return;\n if (related instanceof Node && this.host.nativeElement.contains(related)) return;\n if (this.inMenus(related)) return;\n this.openState.set(false);\n }\n\n private focusItemAt(index: number): void {\n const items = this.getItems();\n if (items.length === 0) return;\n const clamped = ((index % items.length) + items.length) % items.length;\n items[clamped]?.focus();\n }\n\n private readonly onOverlayMouseLeave = (event: MouseEvent): void => this.onMenusLeave(event.relatedTarget);\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Component, TemplateRef, ViewEncapsulation, signal, viewChild } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\nlet uid = 0;\n\n/**\n * Holds the menu content rendered when a {@link WrDropdown} opens.\n *\n * The component itself doesn't render anywhere — the directive grabs its\n * internal `<ng-template>` and portals it into an overlay.\n *\n * @example\n * ```html\n * <button [wrDropdown]=\"menu\">Actions</button>\n * <wr-dropdown-menu #menu>\n * <wr-dropdown-item icon=\"copy\">Copy</wr-dropdown-item>\n * <wr-dropdown-item icon=\"trash\">Delete</wr-dropdown-item>\n * </wr-dropdown-menu>\n * ```\n *\n * @see https://ngwr.dev/reference/components/dropdown\n */\n@Component({\n selector: 'wr-dropdown-menu',\n template:\n '<ng-template><div class=\"wr-dropdown-menu\" role=\"menu\" [attr.id]=\"menuId()\" [attr.aria-labelledby]=\"triggerId() || null\"><ng-content /></div></ng-template>',\n exportAs: 'wrDropdownMenu',\n encapsulation: ViewEncapsulation.None,\n // A BOUND display rather than a static `style` attribute: Angular writes a\n // binding through `style.setProperty`, which no CSP governs, while a real\n // `style=\"…\"` attribute is refused under `style-src 'self'` — and this host\n // would then lay out an empty box in the middle of the content.\n host: { '[style.display]': \"'none'\" },\n})\nexport class WrDropdownMenu {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('dropdown');\n }\n\n /** The internal template the directive portals into the overlay. @internal */\n readonly contentTpl = viewChild.required(TemplateRef);\n\n /** Stable id used on the menu element and referenced from the trigger's `aria-controls`. */\n readonly menuId = signal(`wr-dropdown-menu-${++uid}`);\n\n /** Trigger element id, set by the directive for `aria-labelledby` wiring. */\n readonly triggerId = signal<string | null>(null);\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ElementRef, ViewEncapsulation, computed, inject, input } from '@angular/core';\n\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Single row inside a `<wr-dropdown-menu>`.\n *\n * @example\n * ```html\n * <wr-dropdown-item icon=\"copy\" (click)=\"copy()\">Copy</wr-dropdown-item>\n * <wr-dropdown-item icon=\"trash\" disabled>Delete</wr-dropdown-item>\n * ```\n */\n@Component({\n selector: 'wr-dropdown-item',\n templateUrl: './dropdown-item.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'menuitem',\n class: 'wr-dropdown-item',\n '[class]': 'classes()',\n '[attr.tabindex]': '-1',\n '[attr.aria-disabled]': 'disabled() ? true : null',\n '(keydown.enter)': 'activate($event)',\n '(keydown.space)': 'activate($event)',\n },\n imports: [WrIcon],\n})\nexport class WrDropdownItem {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('dropdown');\n }\n\n /** Optional leading icon name. @default null */\n readonly icon = input<WrIconName | null>(null);\n\n /** Disable interaction (suppresses pointer + keyboard). @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n protected readonly classes = computed(() => {\n const parts: string[] = [];\n if (this.disabled()) parts.push('wr-dropdown-item--disabled');\n return parts.join(' ');\n });\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** @internal Keyboard activation — fires the same click consumers bind to. */\n protected activate(event: Event): void {\n if (this.disabled()) return;\n event.preventDefault();\n this.host.nativeElement.click();\n }\n}\n","@if (icon(); as name) {\n <wr-icon class=\"wr-dropdown-item__icon\" [name]=\"name\" />\n}\n<span class=\"wr-dropdown-item__label\">\n <ng-content />\n</span>\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { type ConnectedPosition, type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { DestroyRef, Directive, ElementRef, Injector, ViewContainerRef, inject, input, signal } from '@angular/core';\n\nimport type { Subscription } from 'rxjs';\n\nimport { WR_OVERLAY, WrOutsideClick, wrFollowDirection } from 'ngwr/overlay';\nimport { wrCheckStyles, wrNumAttr, wrRestoreFocus } from 'ngwr/utils';\n\nimport {\n type WrDropdownLevel,\n wrDropdownItems,\n wrDropdownLevelAround,\n wrDropdownLevelOf,\n wrDropdownRegisterLevel,\n wrDropdownReleaseLevel,\n} from './dropdown-chain';\nimport type { WrDropdownMenu } from './dropdown-menu';\n\n/**\n * Beside the item at the inline end, then at the inline start, each first with\n * the tops aligned and then the bottoms. `start` / `end` and no offsets, so the\n * CDK mirrors the list under RTL by itself.\n */\nconst POSITIONS: ConnectedPosition[] = [\n { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom' },\n { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom' },\n];\n\nlet itemUid = 0;\n\n/**\n * Put on a `<wr-dropdown-item>` to open another `<wr-dropdown-menu>` beside it.\n * The submenu's own items can carry it too, to any depth.\n *\n * @example\n * ```html\n * <button [wrDropdown]=\"file\">File</button>\n *\n * <wr-dropdown-menu #file>\n * <wr-dropdown-item>New</wr-dropdown-item>\n * <wr-dropdown-item [wrDropdownSubmenu]=\"exportAs\">Export</wr-dropdown-item>\n * </wr-dropdown-menu>\n *\n * <wr-dropdown-menu #exportAs>\n * <wr-dropdown-item (click)=\"export('csv')\">CSV</wr-dropdown-item>\n * <wr-dropdown-item (click)=\"export('pdf')\">PDF</wr-dropdown-item>\n * </wr-dropdown-menu>\n * ```\n *\n * @see https://ngwr.dev/reference/components/dropdown\n */\n@Directive({\n selector: '[wrDropdownSubmenu]',\n exportAs: 'wrDropdownSubmenu',\n host: {\n class: 'wr-dropdown-submenu-trigger',\n '[attr.id]': 'itemId',\n 'aria-haspopup': 'menu',\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.aria-controls]': 'isOpen() ? menu().menuId() : null',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeydown($event)',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave($event)',\n },\n})\nexport class WrDropdownSubmenu {\n /** Menu to open beside the item. Pass a `<wr-dropdown-menu>` template reference. */\n readonly menu = input.required<WrDropdownMenu>({ alias: 'wrDropdownSubmenu' });\n\n /** How long the pointer rests on the item before the submenu opens, in ms. @default 150 */\n readonly showDelay = input(150, { transform: wrNumAttr(150) });\n\n /**\n * How long the submenu stays once the pointer has left both the item and the\n * submenu, in ms. Long enough to cross a neighbouring item on the way in.\n * @default 150\n */\n readonly hideDelay = input(150, { transform: wrNumAttr(150) });\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly overlay = inject(WR_OVERLAY);\n private readonly dir = inject(Directionality, { optional: true });\n private readonly outsideClick = inject(WrOutsideClick);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly injector = inject(Injector);\n\n private readonly openState = signal(false);\n\n /** Whether the submenu is open. Read-only: `open()` and `close()` change it. */\n readonly isOpen = this.openState.asReadonly();\n\n private readonly fallbackId = `wr-dropdown-submenu-trigger-${++itemUid}`;\n\n /** The consumer's own `id` wins, read fresh for the reason `WrDropdown` gives. */\n protected get itemId(): string {\n return this.host.nativeElement.id || this.fallbackId;\n }\n\n private overlayRef: OverlayRef | null = null;\n private level: WrDropdownLevel | null = null;\n private outside: Subscription | null = null;\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('dropdown');\n // The item is projected content: it outlives the pane it was rendered in,\n // and goes only with the consumer's own view.\n inject(DestroyRef).onDestroy(() => this.dispose(false));\n }\n\n /** Open the submenu and move focus to its first item. The item has to be in an open menu. */\n open(): void {\n this.show(true);\n }\n\n /** Close the submenu and every submenu below it. */\n close(): void {\n this.dispose(true);\n }\n\n /** @internal A real click opens; Enter and Space arrive as a click with no pointer behind it. */\n protected onClick(event: MouseEvent): void {\n this.show(event.detail === 0);\n }\n\n /** @internal The arrow pointing the way the menus cascade walks into the submenu. */\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key !== (this.dir?.value === 'rtl' ? 'ArrowLeft' : 'ArrowRight') || this.disabled) return;\n event.preventDefault();\n this.show(true);\n }\n\n /** @internal */\n protected onMouseEnter(): void {\n this.clearTimers();\n if (this.overlayRef || this.disabled) return;\n this.showTimer = setTimeout(() => this.show(false), this.showDelay());\n }\n\n /** @internal */\n protected onMouseLeave(event: MouseEvent): void {\n this.clearTimers();\n if (!this.level || wrDropdownLevelOf(this.level, event.relatedTarget)) return;\n this.hideLater();\n }\n\n private get disabled(): boolean {\n return this.host.nativeElement.getAttribute('aria-disabled') === 'true';\n }\n\n /** A pointer shows the submenu and leaves the caret alone; the keyboard walks in. */\n private show(focus: boolean): void {\n this.clearTimers();\n if (!this.overlayRef) this.attach();\n if (focus && this.overlayRef) wrDropdownItems(this.overlayRef.overlayElement)[0]?.focus();\n }\n\n private attach(): void {\n const parent = wrDropdownLevelAround(this.host.nativeElement);\n if (!parent || this.disabled) return;\n parent.child?.close();\n\n const ref = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(POSITIONS)\n .withPush(true)\n .withGrowAfterOpen(true),\n scrollStrategy: this.scrollStrategies.reposition(),\n panelClass: ['wr-dropdown-overlay', 'wr-dropdown-overlay--submenu'],\n });\n wrFollowDirection(ref, this.dir, this.injector);\n\n this.menu().triggerId.set(this.itemId);\n ref.attach(new TemplatePortal(this.menu().contentTpl(), this.vcr));\n\n const pane = ref.overlayElement;\n pane.addEventListener('mouseenter', this.clearTimers);\n pane.addEventListener('mouseleave', this.onPaneLeave);\n pane.addEventListener('click', this.onPaneClick);\n\n // Listening is also what keeps a click INSIDE this pane from reading as a\n // click outside the menus under it: the registry stops at the first pane\n // that holds the target.\n this.outside = this.outsideClick.outsidePointerEvents(ref).subscribe(event => {\n if (!this.host.nativeElement.contains(event.target as Node)) this.close();\n });\n\n // No `keydownEvents()` subscription: the CDK routes keys to the topmost\n // overlay that listens, and the root menu answers for every level.\n this.overlayRef = ref;\n this.level = { pane, parent, child: null, close: () => this.close() };\n wrDropdownRegisterLevel(this.level);\n this.openState.set(true);\n }\n\n private dispose(restoreFocus: boolean): void {\n this.clearTimers();\n const ref = this.overlayRef;\n const level = this.level;\n if (!ref || !level) return;\n\n // Read before the levels below go, since each hands focus up to its own item.\n const focusWasInside = wrDropdownLevelOf(level, document.activeElement) !== null;\n level.child?.close();\n wrDropdownReleaseLevel(level);\n\n const pane = ref.overlayElement;\n pane.removeEventListener('mouseenter', this.clearTimers);\n pane.removeEventListener('mouseleave', this.onPaneLeave);\n pane.removeEventListener('click', this.onPaneClick);\n this.outside?.unsubscribe();\n this.outside = null;\n\n ref.dispose();\n this.overlayRef = null;\n this.level = null;\n this.openState.set(false);\n if (restoreFocus && focusWasInside) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n }\n\n private hideLater(): void {\n this.hideTimer = setTimeout(() => this.close(), this.hideDelay());\n }\n\n private readonly clearTimers = (): void => {\n if (this.showTimer !== null) clearTimeout(this.showTimer);\n if (this.hideTimer !== null) clearTimeout(this.hideTimer);\n this.showTimer = this.hideTimer = null;\n };\n\n private readonly onPaneLeave = (event: MouseEvent): void => {\n const level = this.level;\n const related = event.relatedTarget;\n if (!level) return;\n if (related instanceof Node && this.host.nativeElement.contains(related)) return;\n if (wrDropdownLevelOf(level, related)) return;\n this.clearTimers();\n this.hideLater();\n\n let root = level;\n while (root.parent) root = root.parent;\n root.pointerLeft?.(related);\n };\n\n /** Choosing a leaf closes every submenu, up to the root menu's own item. */\n private readonly onPaneClick = (event: MouseEvent): void => {\n const item = event.target instanceof Element ? event.target.closest('.wr-dropdown-item') : null;\n if (!item || item.matches('.wr-dropdown-item--disabled, .wr-dropdown-submenu-trigger')) return;\n\n let top = this.level;\n while (top?.parent?.parent) top = top.parent;\n top?.close();\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAQA,MAAM,yBAAS,IAAI,QAAO;AAwB1B,SAAgB,wBAAwB,OAAsB;CAC5D,OAAO,IAAI,MAAM,MAAM,KAAK;CAC5B,IAAI,MAAM,QAAQ,MAAM,OAAO,QAAQ;AACzC;AAGA,SAAgB,uBAAuB,OAAsB;CAC3D,OAAO,OAAO,MAAM,IAAI;CACxB,IAAI,MAAM,QAAQ,UAAU,OAAO,MAAM,OAAO,QAAQ;AAC1D;AAGA,SAAgB,sBAAsB,IAAe;CACnD,MAAM,OAAO,GAAG,QAAqB,sBAAsB;CAC3D,QAAQ,QAAQ,OAAO,IAAI,IAAI,MAAM;AACvC;AAGA,SAAgB,kBAAkB,MAAuB,MAAa;CACpE,IAAI,EAAE,gBAAgB,OAAO,OAAO;CACpC,KAAK,IAAI,QAAgC,MAAM,OAAO,QAAQ,MAAM,OAClE,IAAI,MAAM,KAAK,SAAS,IAAI,GAAG,OAAO;CAExC,OAAO;AACT;AAGA,SAAgB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