ngwr 16.2.0 → 16.4.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 (418) hide show
  1. package/badge/styles/_tag.scss +73 -1
  2. package/calendar/styles/_index.scss +22 -0
  3. package/carousel/styles/_index.scss +53 -1
  4. package/cascader/styles/_rules.scss +7 -0
  5. package/color-picker/styles/_index.scss +21 -0
  6. package/date-picker/styles/_index.scss +19 -0
  7. package/dropdown/styles/_index.scss +13 -19
  8. package/fesm2022/ngwr-affix.mjs +3 -3
  9. package/fesm2022/ngwr-alert-testing.mjs +70 -0
  10. package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
  11. package/fesm2022/ngwr-alert.mjs +3 -3
  12. package/fesm2022/ngwr-anchor.mjs +17 -6
  13. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  14. package/fesm2022/ngwr-animations-aurora.mjs +3 -3
  15. package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
  16. package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
  17. package/fesm2022/ngwr-animations-confetti.mjs +3 -3
  18. package/fesm2022/ngwr-animations-decode.mjs +3 -3
  19. package/fesm2022/ngwr-animations-destruct.mjs +3 -3
  20. package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
  21. package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
  22. package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
  23. package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
  24. package/fesm2022/ngwr-animations-glitch.mjs +3 -3
  25. package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
  26. package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
  27. package/fesm2022/ngwr-animations-marquee.mjs +3 -3
  28. package/fesm2022/ngwr-animations-orbit.mjs +3 -3
  29. package/fesm2022/ngwr-animations-reveal.mjs +3 -3
  30. package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
  31. package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
  32. package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
  33. package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
  34. package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
  35. package/fesm2022/ngwr-animations-tilt.mjs +3 -3
  36. package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
  37. package/fesm2022/ngwr-avatar.mjs +3 -3
  38. package/fesm2022/ngwr-back-top.mjs +3 -3
  39. package/fesm2022/ngwr-badge.mjs +129 -11
  40. package/fesm2022/ngwr-badge.mjs.map +1 -1
  41. package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
  42. package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
  43. package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
  44. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  45. package/fesm2022/ngwr-burger-testing.mjs +45 -0
  46. package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
  47. package/fesm2022/ngwr-burger.mjs +3 -3
  48. package/fesm2022/ngwr-button.mjs +6 -6
  49. package/fesm2022/ngwr-calendar-testing.mjs +18 -0
  50. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  51. package/fesm2022/ngwr-calendar.mjs +500 -73
  52. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  53. package/fesm2022/ngwr-card.mjs +9 -9
  54. package/fesm2022/ngwr-carousel-testing.mjs +24 -1
  55. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
  56. package/fesm2022/ngwr-carousel.mjs +73 -10
  57. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  58. package/fesm2022/ngwr-cascader.mjs +45 -37
  59. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  60. package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
  61. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  62. package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
  63. package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
  64. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
  65. package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
  66. package/fesm2022/ngwr-charts-chart-legend.mjs +26 -11
  67. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  68. package/fesm2022/ngwr-charts-core.mjs +3 -3
  69. package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
  70. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  71. package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
  72. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  73. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  74. package/fesm2022/ngwr-charts-line-chart-testing.mjs +3 -2
  75. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  76. package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
  77. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  78. package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
  79. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
  81. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  82. package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
  83. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  84. package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
  85. package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
  86. package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
  87. package/fesm2022/ngwr-checkbox.mjs +6 -6
  88. package/fesm2022/ngwr-clipboard.mjs +3 -3
  89. package/fesm2022/ngwr-collapse.mjs +9 -9
  90. package/fesm2022/ngwr-color-picker-testing.mjs +11 -1
  91. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  92. package/fesm2022/ngwr-color-picker.mjs +153 -37
  93. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  94. package/fesm2022/ngwr-command-palette.mjs +3 -3
  95. package/fesm2022/ngwr-comment.mjs +10 -6
  96. package/fesm2022/ngwr-comment.mjs.map +1 -1
  97. package/fesm2022/ngwr-compare-testing.mjs +84 -0
  98. package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
  99. package/fesm2022/ngwr-compare.mjs +3 -3
  100. package/fesm2022/ngwr-context-menu.mjs +28 -13
  101. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  102. package/fesm2022/ngwr-cookie.mjs +3 -3
  103. package/fesm2022/ngwr-copy-value.mjs +3 -3
  104. package/fesm2022/ngwr-counter.mjs +6 -6
  105. package/fesm2022/ngwr-date-picker-testing.mjs +30 -4
  106. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  107. package/fesm2022/ngwr-date-picker.mjs +342 -69
  108. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  109. package/fesm2022/ngwr-date-stamp.mjs +3 -3
  110. package/fesm2022/ngwr-date.mjs +59 -8
  111. package/fesm2022/ngwr-date.mjs.map +1 -1
  112. package/fesm2022/ngwr-density.mjs +6 -6
  113. package/fesm2022/ngwr-descriptions.mjs +6 -6
  114. package/fesm2022/ngwr-dialog.mjs +18 -18
  115. package/fesm2022/ngwr-directives.mjs +15 -15
  116. package/fesm2022/ngwr-divider.mjs +3 -3
  117. package/fesm2022/ngwr-drawer.mjs +51 -29
  118. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  119. package/fesm2022/ngwr-dropdown-testing.mjs +11 -3
  120. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  121. package/fesm2022/ngwr-dropdown.mjs +70 -99
  122. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  123. package/fesm2022/ngwr-editor.mjs +4 -3
  124. package/fesm2022/ngwr-editor.mjs.map +1 -1
  125. package/fesm2022/ngwr-empty.mjs +3 -3
  126. package/fesm2022/ngwr-event-calendar.mjs +186 -33
  127. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  128. package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
  129. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  130. package/fesm2022/ngwr-file-upload.mjs +279 -16
  131. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  132. package/fesm2022/ngwr-form.mjs +9 -9
  133. package/fesm2022/ngwr-form.mjs.map +1 -1
  134. package/fesm2022/ngwr-graph-testing.mjs +30 -0
  135. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  136. package/fesm2022/ngwr-graph.mjs +664 -43
  137. package/fesm2022/ngwr-graph.mjs.map +1 -1
  138. package/fesm2022/ngwr-hotkey.mjs +6 -6
  139. package/fesm2022/ngwr-i18n-ar.mjs +27 -8
  140. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  141. package/fesm2022/ngwr-i18n-cs.mjs +27 -8
  142. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  143. package/fesm2022/ngwr-i18n-de.mjs +27 -8
  144. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  145. package/fesm2022/ngwr-i18n-en.mjs +27 -8
  146. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  147. package/fesm2022/ngwr-i18n-es.mjs +27 -8
  148. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  149. package/fesm2022/ngwr-i18n-fr.mjs +27 -8
  150. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  151. package/fesm2022/ngwr-i18n-he.mjs +27 -8
  152. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  153. package/fesm2022/ngwr-i18n-hi.mjs +27 -8
  154. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  155. package/fesm2022/ngwr-i18n-id.mjs +27 -8
  156. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  157. package/fesm2022/ngwr-i18n-it.mjs +27 -8
  158. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  159. package/fesm2022/ngwr-i18n-ja.mjs +27 -8
  160. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  161. package/fesm2022/ngwr-i18n-ko.mjs +27 -8
  162. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  163. package/fesm2022/ngwr-i18n-nl.mjs +27 -8
  164. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  165. package/fesm2022/ngwr-i18n-pl.mjs +27 -8
  166. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  167. package/fesm2022/ngwr-i18n-pt.mjs +27 -8
  168. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  169. package/fesm2022/ngwr-i18n-ru.mjs +27 -8
  170. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  171. package/fesm2022/ngwr-i18n-sv.mjs +27 -8
  172. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  173. package/fesm2022/ngwr-i18n-tr.mjs +27 -8
  174. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  175. package/fesm2022/ngwr-i18n-uk.mjs +27 -8
  176. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  177. package/fesm2022/ngwr-i18n-vi.mjs +27 -8
  178. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  179. package/fesm2022/ngwr-i18n-zh-tw.mjs +27 -8
  180. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  181. package/fesm2022/ngwr-i18n-zh.mjs +27 -8
  182. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  183. package/fesm2022/ngwr-i18n.mjs +9 -9
  184. package/fesm2022/ngwr-icon.mjs +6 -6
  185. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  186. package/fesm2022/ngwr-input-number-testing.mjs +11 -0
  187. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  188. package/fesm2022/ngwr-input-number.mjs +68 -7
  189. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  190. package/fesm2022/ngwr-input-otp.mjs +23 -3
  191. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  192. package/fesm2022/ngwr-input-testing.mjs +24 -1
  193. package/fesm2022/ngwr-input-testing.mjs.map +1 -1
  194. package/fesm2022/ngwr-input.mjs +152 -36
  195. package/fesm2022/ngwr-input.mjs.map +1 -1
  196. package/fesm2022/ngwr-keyboard.mjs +3 -3
  197. package/fesm2022/ngwr-knob.mjs +3 -3
  198. package/fesm2022/ngwr-layout.mjs +15 -15
  199. package/fesm2022/ngwr-lightbox.mjs +8 -8
  200. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  201. package/fesm2022/ngwr-list.mjs +8 -8
  202. package/fesm2022/ngwr-list.mjs.map +1 -1
  203. package/fesm2022/ngwr-load-state.mjs +15 -15
  204. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  205. package/fesm2022/ngwr-mention.mjs +6 -6
  206. package/fesm2022/ngwr-meta.mjs +6 -6
  207. package/fesm2022/ngwr-overlay.mjs +175 -13
  208. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  209. package/fesm2022/ngwr-page-header.mjs +3 -3
  210. package/fesm2022/ngwr-pagination.mjs +6 -3
  211. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  212. package/fesm2022/ngwr-pipes.mjs +31 -29
  213. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  214. package/fesm2022/ngwr-platform.mjs +9 -9
  215. package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
  216. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  217. package/fesm2022/ngwr-popconfirm.mjs +44 -63
  218. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  219. package/fesm2022/ngwr-popover-testing.mjs +7 -1
  220. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  221. package/fesm2022/ngwr-popover.mjs +58 -156
  222. package/fesm2022/ngwr-popover.mjs.map +1 -1
  223. package/fesm2022/ngwr-progress.mjs +50 -9
  224. package/fesm2022/ngwr-progress.mjs.map +1 -1
  225. package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
  226. package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
  227. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  228. package/fesm2022/ngwr-qr.mjs +3 -3
  229. package/fesm2022/ngwr-radio.mjs +6 -6
  230. package/fesm2022/ngwr-rating.mjs +3 -3
  231. package/fesm2022/ngwr-resizable-testing.mjs +113 -0
  232. package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
  233. package/fesm2022/ngwr-resizable.mjs +3 -3
  234. package/fesm2022/ngwr-result.mjs +12 -12
  235. package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
  236. package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
  237. package/fesm2022/ngwr-schema-form.mjs +416 -19
  238. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  239. package/fesm2022/ngwr-scroll.mjs +3 -3
  240. package/fesm2022/ngwr-segmented.mjs +3 -3
  241. package/fesm2022/ngwr-select-testing.mjs +19 -0
  242. package/fesm2022/ngwr-select-testing.mjs.map +1 -1
  243. package/fesm2022/ngwr-select.mjs +361 -84
  244. package/fesm2022/ngwr-select.mjs.map +1 -1
  245. package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
  246. package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
  247. package/fesm2022/ngwr-sidebar.mjs +3 -3
  248. package/fesm2022/ngwr-skeleton.mjs +3 -3
  249. package/fesm2022/ngwr-slider-testing.mjs +6 -0
  250. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  251. package/fesm2022/ngwr-slider.mjs +21 -3
  252. package/fesm2022/ngwr-slider.mjs.map +1 -1
  253. package/fesm2022/ngwr-sortable-list.mjs +29 -12
  254. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  255. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  256. package/fesm2022/ngwr-spinner.mjs +3 -3
  257. package/fesm2022/ngwr-splitter.mjs +3 -3
  258. package/fesm2022/ngwr-statistic.mjs +9 -9
  259. package/fesm2022/ngwr-stepper.mjs +42 -11
  260. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  261. package/fesm2022/ngwr-storage.mjs +3 -3
  262. package/fesm2022/ngwr-switch.mjs +3 -3
  263. package/fesm2022/ngwr-table-testing.mjs +157 -3
  264. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  265. package/fesm2022/ngwr-table.mjs +1051 -74
  266. package/fesm2022/ngwr-table.mjs.map +1 -1
  267. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  268. package/fesm2022/ngwr-tabs-testing.mjs +1 -1
  269. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  270. package/fesm2022/ngwr-tabs.mjs +15 -10
  271. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  272. package/fesm2022/ngwr-textarea-testing.mjs +11 -0
  273. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
  274. package/fesm2022/ngwr-textarea.mjs +128 -16
  275. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  276. package/fesm2022/ngwr-theme.mjs +3 -3
  277. package/fesm2022/ngwr-timeline.mjs +6 -6
  278. package/fesm2022/ngwr-toast.mjs +40 -19
  279. package/fesm2022/ngwr-toast.mjs.map +1 -1
  280. package/fesm2022/ngwr-toolbar.mjs +3 -3
  281. package/fesm2022/ngwr-tour-testing.mjs +13 -1
  282. package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
  283. package/fesm2022/ngwr-tour.mjs +19 -15
  284. package/fesm2022/ngwr-tour.mjs.map +1 -1
  285. package/fesm2022/ngwr-transfer-testing.mjs +6 -0
  286. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
  287. package/fesm2022/ngwr-transfer.mjs +24 -5
  288. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  289. package/fesm2022/ngwr-tree-testing.mjs +62 -2
  290. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  291. package/fesm2022/ngwr-tree.mjs +978 -79
  292. package/fesm2022/ngwr-tree.mjs.map +1 -1
  293. package/fesm2022/ngwr-typography.mjs +3 -3
  294. package/fesm2022/ngwr-utils-router.mjs +3 -3
  295. package/fesm2022/ngwr-utils.mjs +97 -1
  296. package/fesm2022/ngwr-utils.mjs.map +1 -1
  297. package/fesm2022/ngwr-version.mjs +1 -1
  298. package/fesm2022/ngwr-version.mjs.map +1 -1
  299. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  300. package/fesm2022/ngwr-window.mjs +33 -22
  301. package/fesm2022/ngwr-window.mjs.map +1 -1
  302. package/file-upload/styles/_index.scss +156 -0
  303. package/graph/styles/_index.scss +87 -0
  304. package/i18n/ar.json +29 -8
  305. package/i18n/cs.json +29 -8
  306. package/i18n/de.json +29 -8
  307. package/i18n/en.json +29 -8
  308. package/i18n/es.json +29 -8
  309. package/i18n/fr.json +29 -8
  310. package/i18n/he.json +29 -8
  311. package/i18n/hi.json +29 -8
  312. package/i18n/id.json +29 -8
  313. package/i18n/it.json +29 -8
  314. package/i18n/ja.json +29 -8
  315. package/i18n/ko.json +29 -8
  316. package/i18n/nl.json +29 -8
  317. package/i18n/pl.json +29 -8
  318. package/i18n/pt.json +29 -8
  319. package/i18n/ru.json +29 -8
  320. package/i18n/sv.json +29 -8
  321. package/i18n/tr.json +29 -8
  322. package/i18n/uk.json +29 -8
  323. package/i18n/vi.json +29 -8
  324. package/i18n/zh-TW.json +29 -8
  325. package/i18n/zh.json +29 -8
  326. package/input/styles/_index.scss +68 -1
  327. package/input-otp/styles/_index.scss +14 -0
  328. package/llms-full.txt +53 -21
  329. package/llms.txt +57 -24
  330. package/overlay/styles/_arrow.scss +4 -4
  331. package/package.json +33 -1
  332. package/popconfirm/styles/_index.scss +3 -11
  333. package/progress/styles/_index.scss +32 -0
  334. package/schema-form/styles/_index.scss +78 -0
  335. package/schematics/collection.json +5 -0
  336. package/schematics/eject/index.js +158 -0
  337. package/schematics/eject/schema.js +8 -0
  338. package/schematics/eject/schema.json +24 -0
  339. package/schematics/eject/source.js +295 -0
  340. package/schematics/use/rule.js +2 -0
  341. package/schematics/use/symbol-map.json +5 -0
  342. package/select/styles/_index.scss +127 -22
  343. package/skills/ngwr/SKILL.md +31 -4
  344. package/skills/ngwr/references/catalog.md +9 -1
  345. package/slider/styles/_index.scss +22 -0
  346. package/table/styles/_index.scss +191 -3
  347. package/textarea/styles/_index.scss +80 -0
  348. package/theme/styles/_focus.scss +16 -1
  349. package/theme/styles/_motion.scss +5 -0
  350. package/transfer/styles/_index.scss +84 -0
  351. package/tree/styles/_index.scss +138 -5
  352. package/types/ngwr-alert-testing.d.ts +88 -0
  353. package/types/ngwr-badge.d.ts +72 -2
  354. package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
  355. package/types/ngwr-burger-testing.d.ts +51 -0
  356. package/types/ngwr-calendar-testing.d.ts +18 -6
  357. package/types/ngwr-calendar.d.ts +272 -22
  358. package/types/ngwr-carousel-testing.d.ts +27 -6
  359. package/types/ngwr-carousel.d.ts +42 -6
  360. package/types/ngwr-cascader.d.ts +13 -6
  361. package/types/ngwr-charts-chart-legend.d.ts +9 -4
  362. package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
  363. package/types/ngwr-charts-line-chart.d.ts +7 -4
  364. package/types/ngwr-color-picker-testing.d.ts +15 -4
  365. package/types/ngwr-color-picker.d.ts +76 -6
  366. package/types/ngwr-compare-testing.d.ts +72 -0
  367. package/types/ngwr-context-menu.d.ts +2 -0
  368. package/types/ngwr-date-picker-testing.d.ts +23 -8
  369. package/types/ngwr-date-picker.d.ts +100 -9
  370. package/types/ngwr-date.d.ts +71 -1
  371. package/types/ngwr-drawer.d.ts +9 -0
  372. package/types/ngwr-dropdown-testing.d.ts +20 -0
  373. package/types/ngwr-dropdown.d.ts +26 -6
  374. package/types/ngwr-event-calendar.d.ts +66 -8
  375. package/types/ngwr-file-upload-testing.d.ts +31 -2
  376. package/types/ngwr-file-upload.d.ts +156 -3
  377. package/types/ngwr-form.d.ts +47 -3
  378. package/types/ngwr-graph-testing.d.ts +36 -3
  379. package/types/ngwr-graph.d.ts +309 -13
  380. package/types/ngwr-input-number-testing.d.ts +10 -0
  381. package/types/ngwr-input-number.d.ts +30 -1
  382. package/types/ngwr-input-otp.d.ts +10 -0
  383. package/types/ngwr-input-testing.d.ts +30 -0
  384. package/types/ngwr-input.d.ts +54 -3
  385. package/types/ngwr-overlay.d.ts +84 -5
  386. package/types/ngwr-pipes.d.ts +2 -1
  387. package/types/ngwr-popconfirm-testing.d.ts +12 -3
  388. package/types/ngwr-popconfirm.d.ts +28 -3
  389. package/types/ngwr-popover-testing.d.ts +19 -2
  390. package/types/ngwr-popover.d.ts +22 -2
  391. package/types/ngwr-progress.d.ts +29 -1
  392. package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
  393. package/types/ngwr-resizable-testing.d.ts +116 -0
  394. package/types/ngwr-schema-form-testing.d.ts +260 -0
  395. package/types/ngwr-schema-form.d.ts +76 -6
  396. package/types/ngwr-select-testing.d.ts +20 -0
  397. package/types/ngwr-select.d.ts +149 -11
  398. package/types/ngwr-sidebar-testing.d.ts +176 -0
  399. package/types/ngwr-slider-testing.d.ts +3 -1
  400. package/types/ngwr-slider.d.ts +21 -1
  401. package/types/ngwr-sortable-list.d.ts +6 -0
  402. package/types/ngwr-stepper.d.ts +20 -11
  403. package/types/ngwr-table-testing.d.ts +122 -7
  404. package/types/ngwr-table.d.ts +572 -50
  405. package/types/ngwr-tabs-testing.d.ts +14 -17
  406. package/types/ngwr-tabs.d.ts +6 -0
  407. package/types/ngwr-textarea-testing.d.ts +10 -0
  408. package/types/ngwr-textarea.d.ts +48 -2
  409. package/types/ngwr-toast.d.ts +8 -1
  410. package/types/ngwr-tour-testing.d.ts +10 -0
  411. package/types/ngwr-tour.d.ts +11 -2
  412. package/types/ngwr-transfer-testing.d.ts +3 -0
  413. package/types/ngwr-transfer.d.ts +24 -1
  414. package/types/ngwr-tree-testing.d.ts +65 -1
  415. package/types/ngwr-tree.d.ts +335 -12
  416. package/types/ngwr-utils.d.ts +107 -1
  417. package/types/ngwr-version.d.ts +1 -1
  418. package/types/ngwr-window.d.ts +7 -4
@@ -11,6 +11,144 @@ import { _isTestEnvironment } from "@angular/cdk/platform";
11
11
  * Use of this source code is governed by an MIT-style license that can be
12
12
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
13
13
  */
14
+ const WR_ANCHORED_POSITIONS = {
15
+ top: {
16
+ originX: "center",
17
+ originY: "top",
18
+ overlayX: "center",
19
+ overlayY: "bottom"
20
+ },
21
+ "top-start": {
22
+ originX: "start",
23
+ originY: "top",
24
+ overlayX: "start",
25
+ overlayY: "bottom"
26
+ },
27
+ "top-end": {
28
+ originX: "end",
29
+ originY: "top",
30
+ overlayX: "end",
31
+ overlayY: "bottom"
32
+ },
33
+ bottom: {
34
+ originX: "center",
35
+ originY: "bottom",
36
+ overlayX: "center",
37
+ overlayY: "top"
38
+ },
39
+ "bottom-start": {
40
+ originX: "start",
41
+ originY: "bottom",
42
+ overlayX: "start",
43
+ overlayY: "top"
44
+ },
45
+ "bottom-end": {
46
+ originX: "end",
47
+ originY: "bottom",
48
+ overlayX: "end",
49
+ overlayY: "top"
50
+ },
51
+ left: {
52
+ originX: "start",
53
+ originY: "center",
54
+ overlayX: "end",
55
+ overlayY: "center"
56
+ },
57
+ "left-start": {
58
+ originX: "start",
59
+ originY: "top",
60
+ overlayX: "end",
61
+ overlayY: "top"
62
+ },
63
+ "left-end": {
64
+ originX: "start",
65
+ originY: "bottom",
66
+ overlayX: "end",
67
+ overlayY: "bottom"
68
+ },
69
+ right: {
70
+ originX: "end",
71
+ originY: "center",
72
+ overlayX: "start",
73
+ overlayY: "center"
74
+ },
75
+ "right-start": {
76
+ originX: "end",
77
+ originY: "top",
78
+ overlayX: "start",
79
+ overlayY: "top"
80
+ },
81
+ "right-end": {
82
+ originX: "end",
83
+ originY: "bottom",
84
+ overlayX: "start",
85
+ overlayY: "bottom"
86
+ }
87
+ };
88
+ const WR_ANCHORED_FALLBACKS = {
89
+ top: ["top", "bottom"],
90
+ "top-start": ["top-start", "bottom-start"],
91
+ "top-end": ["top-end", "bottom-end"],
92
+ bottom: ["bottom", "top"],
93
+ "bottom-start": ["bottom-start", "top-start"],
94
+ "bottom-end": ["bottom-end", "top-end"],
95
+ left: [
96
+ "left",
97
+ "right",
98
+ "bottom",
99
+ "top"
100
+ ],
101
+ "left-start": [
102
+ "left-start",
103
+ "right-start",
104
+ "bottom-start",
105
+ "top-start"
106
+ ],
107
+ "left-end": [
108
+ "left-end",
109
+ "right-end",
110
+ "bottom-end",
111
+ "top-end"
112
+ ],
113
+ right: [
114
+ "right",
115
+ "left",
116
+ "bottom",
117
+ "top"
118
+ ],
119
+ "right-start": [
120
+ "right-start",
121
+ "left-start",
122
+ "bottom-start",
123
+ "top-start"
124
+ ],
125
+ "right-end": [
126
+ "right-end",
127
+ "left-end",
128
+ "bottom-end",
129
+ "top-end"
130
+ ]
131
+ };
132
+ function wrAnchoredPositions(position, options = {}) {
133
+ const { gap, paneClass } = options;
134
+ return WR_ANCHORED_FALLBACKS[position].map((name) => {
135
+ const link = { ...WR_ANCHORED_POSITIONS[name] };
136
+ if (gap) {
137
+ if (name.startsWith("top")) link.offsetY = -gap;
138
+ else if (name.startsWith("bottom")) link.offsetY = gap;
139
+ else if (name.startsWith("left")) link.offsetX = -gap;
140
+ else link.offsetX = gap;
141
+ }
142
+ if (paneClass) link.panelClass = `${paneClass}--${name}`;
143
+ return link;
144
+ });
145
+ }
146
+ /**
147
+ * @license
148
+ *
149
+ * Use of this source code is governed by an MIT-style license that can be
150
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
151
+ */
14
152
  const SVG_NS = "http://www.w3.org/2000/svg";
15
153
  const CLOSE_ICON_ATTRS = [
16
154
  ["class", "wr-icon__svg"],
@@ -184,7 +322,7 @@ var WrOutsideClick = class WrOutsideClick {
184
322
  }
185
323
  static ɵfac = i0.ɵɵngDeclareFactory({
186
324
  minVersion: "12.0.0",
187
- version: "22.2.5",
325
+ version: "22.2.6",
188
326
  ngImport: i0,
189
327
  type: WrOutsideClick,
190
328
  deps: [],
@@ -192,14 +330,14 @@ var WrOutsideClick = class WrOutsideClick {
192
330
  });
193
331
  static ɵprov = i0.ɵɵngDeclareService({
194
332
  minVersion: "22.0.0",
195
- version: "22.2.5",
333
+ version: "22.2.6",
196
334
  ngImport: i0,
197
335
  type: WrOutsideClick
198
336
  });
199
337
  };
200
338
  i0.ɵɵngDeclareClassMetadata({
201
339
  minVersion: "12.0.0",
202
- version: "22.2.5",
340
+ version: "22.2.6",
203
341
  ngImport: i0,
204
342
  type: WrOutsideClick,
205
343
  decorators: [{ type: Service }]
@@ -225,7 +363,7 @@ var WrOverlayContainer = class WrOverlayContainer extends OverlayContainer {
225
363
  }
226
364
  static ɵfac = i0.ɵɵngDeclareFactory({
227
365
  minVersion: "12.0.0",
228
- version: "22.2.5",
366
+ version: "22.2.6",
229
367
  ngImport: i0,
230
368
  type: WrOverlayContainer,
231
369
  deps: [],
@@ -233,14 +371,14 @@ var WrOverlayContainer = class WrOverlayContainer extends OverlayContainer {
233
371
  });
234
372
  static ɵprov = i0.ɵɵngDeclareService({
235
373
  minVersion: "22.0.0",
236
- version: "22.2.5",
374
+ version: "22.2.6",
237
375
  ngImport: i0,
238
376
  type: WrOverlayContainer
239
377
  });
240
378
  };
241
379
  i0.ɵɵngDeclareClassMetadata({
242
380
  minVersion: "12.0.0",
243
- version: "22.2.5",
381
+ version: "22.2.6",
244
382
  ngImport: i0,
245
383
  type: WrOverlayContainer,
246
384
  decorators: [{ type: Service }]
@@ -262,12 +400,22 @@ var WrOverlayOrder = class WrOverlayOrder {
262
400
  layers = [];
263
401
  toasts = null;
264
402
  under = 0;
403
+ stale = true;
404
+ placing = false;
405
+ onBeforeToggle = (event) => {
406
+ if (this.placing || event.target === this.toasts) return;
407
+ if (event.newState === "open") this.stale = true;
408
+ };
409
+ onFullscreenChange = () => {
410
+ this.stale = true;
411
+ };
265
412
  add(host, toasts = "above") {
266
413
  const layer = {
267
414
  host,
268
415
  coversToasts: toasts === "below"
269
416
  };
270
417
  this.layers.push(layer);
418
+ this.stale = true;
271
419
  return () => {
272
420
  const at = this.layers.indexOf(layer);
273
421
  if (at < 0) return;
@@ -278,25 +426,37 @@ var WrOverlayOrder = class WrOverlayOrder {
278
426
  }
279
427
  raiseToasts(host) {
280
428
  if (host !== this.toasts) {
429
+ this.dropToasts();
281
430
  this.toasts = host;
282
431
  this.under = this.layers.length;
432
+ this.stale = true;
433
+ host.ownerDocument.addEventListener("beforetoggle", this.onBeforeToggle, true);
434
+ host.ownerDocument.addEventListener("fullscreenchange", this.onFullscreenChange);
283
435
  }
284
- this.place(true);
436
+ return this.place(true);
437
+ }
438
+ joined() {
439
+ this.stale = true;
285
440
  }
286
441
  dropToasts() {
442
+ const doc = this.toasts?.ownerDocument;
443
+ doc?.removeEventListener("beforetoggle", this.onBeforeToggle, true);
444
+ doc?.removeEventListener("fullscreenchange", this.onFullscreenChange);
287
445
  this.toasts = null;
288
446
  }
289
447
  place(raise) {
290
448
  const toasts = this.toasts;
291
- if (!toasts) return;
449
+ if (!toasts) return false;
292
450
  let start = this.layers.length;
293
451
  while (start > 0 && this.layers[start - 1].coversToasts) start--;
294
452
  const covering = this.layers.slice(start);
295
- if (this.under === start && (covering.length > 0 || !raise)) return;
453
+ if (this.under === start && (covering.length > 0 || !raise || !this.stale)) return false;
296
454
  const doc = toasts.ownerDocument;
297
455
  const focused = doc.activeElement;
456
+ this.placing = true;
298
457
  reshow(toasts);
299
458
  this.under = start;
459
+ this.stale = false;
300
460
  if (covering.length > 0) {
301
461
  const above = /* @__PURE__ */ new Set();
302
462
  for (let el = covering[0].host; el; el = el.nextElementSibling) above.add(el);
@@ -304,11 +464,13 @@ var WrOverlayOrder = class WrOverlayOrder {
304
464
  above.delete(toasts);
305
465
  above.forEach(reshow);
306
466
  }
467
+ this.placing = false;
307
468
  if (focused?.isConnected && doc.activeElement !== focused) focused.focus({ preventScroll: true });
469
+ return true;
308
470
  }
309
471
  static ɵfac = i0.ɵɵngDeclareFactory({
310
472
  minVersion: "12.0.0",
311
- version: "22.2.5",
473
+ version: "22.2.6",
312
474
  ngImport: i0,
313
475
  type: WrOverlayOrder,
314
476
  deps: [],
@@ -316,14 +478,14 @@ var WrOverlayOrder = class WrOverlayOrder {
316
478
  });
317
479
  static ɵprov = i0.ɵɵngDeclareService({
318
480
  minVersion: "22.0.0",
319
- version: "22.2.5",
481
+ version: "22.2.6",
320
482
  ngImport: i0,
321
483
  type: WrOverlayOrder
322
484
  });
323
485
  };
324
486
  i0.ɵɵngDeclareClassMetadata({
325
487
  minVersion: "12.0.0",
326
- version: "22.2.5",
488
+ version: "22.2.6",
327
489
  ngImport: i0,
328
490
  type: WrOverlayOrder,
329
491
  decorators: [{ type: Service }]
@@ -368,6 +530,6 @@ const WR_OVERLAY = new InjectionToken("WR_OVERLAY", {
368
530
  }).get(Overlay);
369
531
  }
370
532
  });
371
- export { WR_OVERLAY, WR_OVERLAY_CONTAINER, WrOutsideClick, WrOverlayContainer, WrOverlayOrder, wrAppendOverlayClose, wrFollowDirection, wrFollowSize, wrMirrorOffsets };
533
+ export { WR_ANCHORED_FALLBACKS, WR_ANCHORED_POSITIONS, WR_OVERLAY, WR_OVERLAY_CONTAINER, WrOutsideClick, WrOverlayContainer, WrOverlayOrder, wrAnchoredPositions, wrAppendOverlayClose, wrFollowDirection, wrFollowSize, wrMirrorOffsets };
372
534
 
373
535
  //# sourceMappingURL=ngwr-overlay.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-overlay.mjs","names":["DOCUMENT"],"sources":["../../../projects/lib/overlay/wr-overlay-close.ts","../../../projects/lib/overlay/wr-follow-direction.ts","../../../projects/lib/overlay/wr-follow-size.ts","../../../projects/lib/overlay/wr-mirror-offsets.ts","../../../projects/lib/overlay/wr-outside-click.ts","../../../projects/lib/overlay/wr-overlay-container.ts","../../../projects/lib/overlay/wr-overlay-order.ts","../../../projects/lib/overlay/tokens/wr-overlay-container.token.ts","../../../projects/lib/overlay/tokens/wr-overlay.token.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\nconst SVG_NS = 'http://www.w3.org/2000/svg';\n\n/** The same 24×24 stroked ✕ the rest of the library's chrome draws (alert, toast, lightbox). */\nconst CLOSE_ICON_ATTRS: readonly (readonly [string, string])[] = [\n ['class', 'wr-icon__svg'],\n ['viewBox', '0 0 24 24'],\n ['fill', 'none'],\n ['stroke', 'currentColor'],\n ['stroke-width', '2'],\n ['stroke-linecap', 'round'],\n ['stroke-linejoin', 'round'],\n ['aria-hidden', 'true'],\n];\nconst CLOSE_ICON_PATHS: readonly string[] = ['M18 6 6 18', 'm6 6 12 12'];\n\n/**\n * Builds the ✕ node by node.\n *\n * It was one `innerHTML = CLOSE_ICON`, and the string was a compile-time\n * constant, so it was never an injection risk — it was an AVAILABILITY one.\n * Under `require-trusted-types-for 'script'` an `innerHTML` write throws\n * `TrustedHTML assignment` whatever the string is, and the throw landed after\n * the overlay was on screen: a modal with no ✕, no backdrop subscription and no\n * Escape handler, over the whole application. `createElementNS` is not a\n * Trusted Types sink, so there is nothing left to police.\n */\nfunction createCloseIcon(doc: Document): SVGSVGElement {\n const svg = doc.createElementNS(SVG_NS, 'svg');\n // `setAttribute`, not `.className` — on an SVG element that property is an\n // `SVGAnimatedString` and assigning a string to it silently does nothing.\n for (const [name, value] of CLOSE_ICON_ATTRS) svg.setAttribute(name, value);\n for (const d of CLOSE_ICON_PATHS) {\n const path = doc.createElementNS(SVG_NS, 'path');\n path.setAttribute('d', d);\n svg.appendChild(path);\n }\n return svg;\n}\n\n/**\n * Appends a dismiss (✕) button to a service-opened overlay panel.\n *\n * `WrDialog` and `WrDrawerManager` build their panel around a component the\n * consumer supplies, so there is no template of their own to put a corner button\n * in — they call this instead. Component-driven overlays (`<wr-drawer>`) render\n * the same markup in their template.\n *\n * Uses `host.ownerDocument` rather than the global `document`, so it carries no\n * hidden browser-only assumption; callers still gate on the platform because\n * they have nothing to append to on the server.\n *\n * @param host Panel element the button is appended to (and positioned against).\n * @param className BEM class for the button, e.g. `wr-dialog__close`.\n * @param label Accessible name — already localized by the caller.\n * @param onClose Invoked on click.\n */\nexport function wrAppendOverlayClose(\n host: HTMLElement,\n className: string,\n label: string,\n onClose: () => void\n): HTMLButtonElement {\n const button = host.ownerDocument.createElement('button');\n button.type = 'button';\n button.className = className;\n button.setAttribute('aria-label', label);\n button.appendChild(createCloseIcon(host.ownerDocument));\n button.addEventListener('click', onClose);\n host.appendChild(button);\n return button;\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 { Direction, Directionality } from '@angular/cdk/bidi';\nimport type { OverlayRef } from '@angular/cdk/overlay';\nimport { type Injector, effect, untracked } from '@angular/core';\n\nimport { Subscription } from 'rxjs';\n\nimport { wrNoop } from 'ngwr/utils';\n\n/**\n * Keep an OPEN overlay on the application's reading direction.\n *\n * The CDK reads the direction ONCE, as a string, when the overlay is created\n * (`overlayConfig.direction ||= directionality.value`), writes it as the host's\n * `dir` on attach, and never looks at it again — `updatePosition()` does not\n * touch it and `setDirection()` is the only thing that does. So an application\n * that flips direction while a panel is open mirrors the page and leaves the\n * panel behind, still `ltr`, still resolving `start` to the left. This site's\n * own LTR/RTL switch is the demonstration: it lives inside a `wr-dropdown`, and\n * the `wr-segmented` it is built from reads `Directionality` live — so the thumb\n * slides to the other slot while the pane around it still renders `ltr`, and\n * parks under the wrong label.\n *\n * Call it once per `OverlayRef`, right after `overlay.create(...)`. The follower\n * ends itself when that overlay detaches or is disposed, so a reopen — which is\n * always a NEW ref in this library — needs a new call, and the returned teardown\n * is only for stopping early.\n *\n * `onDirectionChange` is for the sites whose position LIST is itself\n * direction-dependent (the four that pass their table through\n * {@link wrMirrorOffsets}): it runs with the new direction already on the ref\n * and before the overlay repositions, so the strategy is carrying the mirrored\n * offsets by the time the CDK re-resolves them.\n *\n * SSR-safe: it touches no browser global of its own, and the CDK's position\n * strategies no-op off the browser, so a flip on the server only rewrites the\n * attribute.\n *\n * @param overlayRef The overlay to keep in step, freshly created.\n * @param dir The `Directionality` the caller injected. `null` — an optional\n * inject with no provider, i.e. a bare `TestBed` — means there is nothing\n * ambient to follow and this does nothing at all.\n * @param injector Owns the `valueSignal` watch; the caller's own is right.\n * @param onDirectionChange Re-applies direction-dependent state, e.g.\n * `strategy.withPositions(wrMirrorOffsets(TABLE, direction === 'rtl'))`.\n * @returns Stops following. Idempotent, and unnecessary in the normal case.\n *\n * @example\n * ```ts\n * this.overlayRef = this.overlay.create({ positionStrategy, ... });\n * wrFollowDirection(this.overlayRef, this.dir, this.injector, direction =>\n * positionStrategy.withPositions(\n * wrMirrorOffsets(wrPopconfirmPositions(this.position()), direction === 'rtl')\n * )\n * );\n * ```\n */\nexport function wrFollowDirection(\n overlayRef: OverlayRef,\n dir: Directionality | null,\n injector: Injector,\n onDirectionChange?: (direction: Direction) => void\n): () => void {\n if (!dir) return wrNoop;\n\n const apply = (next: Direction): void => {\n // Comparing against the REF rather than a direction captured up here does\n // three jobs at once: the watch's mandatory first run is a no-op, a flip\n // that arrives down both channels is applied once, and a same-value write\n // never yanks a panel the user is reading.\n if (next === overlayRef.getDirection()) return;\n\n overlayRef.setDirection(next); // rewrites the host's `dir`; it does NOT reposition\n onDirectionChange?.(next); // the caller re-mirrors its position list here\n overlayRef.updatePosition(); // re-resolves start/end against the direction just set\n };\n\n // Two channels, because they are not the same thing. `valueSignal` is the\n // state — `Directionality.value` is a getter over it, so nothing can change\n // direction without writing it. `change` is an EventEmitter the root instance\n // never emits: it reads the document once at construction and only completes\n // the emitter on destroy, so it belongs to the `[dir]` directive (and to an\n // app, like this site's header, that emits it by hand as a courtesy). Keying\n // on `change` alone would be dead for an app that just writes the signal;\n // keying on the signal alone would ignore the `{ value, change }` test double\n // that a dozen of the library's RTL specs hand their component.\n //\n // `untracked` because of WHERE this is called from: half the call sites open\n // their overlay out of an `effect(() => { if (this.isOpen()) … })`, and\n // `effect()` refuses in dev mode to be created inside a reactive context.\n // Laundering only the CREATION is exactly right — the watch below still\n // depends on `valueSignal` and on nothing else.\n const watch = untracked(() =>\n effect(\n () => {\n // Read as a plain optional function rather than as a `Signal`, because\n // the case being guarded is a double that has no signal at all: falling\n // back to `value` registers no dependency, so the watch simply never\n // re-runs and `change` carries that case on its own.\n const read: (() => Direction) | undefined = dir.valueSignal;\n apply(read ? read() : dir.value);\n },\n { injector }\n )\n );\n\n // rxjs owns the teardown, and an `OverlayRef` is why. Open and close happen in\n // an event handler or an effect, never in an injection context, so the idiom\n // that suggests itself — `takeUntilDestroyed(destroyRef)` — would tie this to\n // the DIRECTIVE's lifetime: a menu opened fifty times would leave fifty\n // followers behind, each pinning a disposed ref. (`WrOutsideClick`'s JSDoc\n // records that same mistake, made at ten call sites.) `detachments()` is the\n // overlay's own lifetime and the one channel every dismissal goes through.\n // And it is not hygiene: `setDirection()` writes through the host element\n // `dispose()` nulls, so a watch that outlives its overlay THROWS on the next\n // flip.\n const teardown = new Subscription();\n const stop = (): void => teardown.unsubscribe();\n\n teardown.add(() => watch.destroy());\n teardown.add(dir.change.subscribe(apply));\n // Both handlers, for the reason `WrOutsideClick` gives: a live ref arrives\n // through `next`, one already disposed before this call has only `complete`\n // left to give.\n teardown.add(overlayRef.detachments().subscribe({ next: stop, complete: stop }));\n\n // `Subscription.unsubscribe()` is a no-op once closed, so the caller's copy of\n // this and the automatic one cannot fight, and calling it twice is free.\n return stop;\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 { OverlayRef } from '@angular/cdk/overlay';\n\nimport { wrNoop } from 'ngwr/utils';\n\n/**\n * Keep an OPEN overlay positioned as its content changes size.\n *\n * The CDK positions a pane once, when it attaches, and again on scroll or\n * resize of the window. A panel whose content renders after that, or grows later\n * (a time row that appears, a calendar that gains a sixth week), is measured at\n * its first, smaller size: flipped above the origin at that height, it then\n * grows downward over the field it belongs to. This watches the pane with a\n * `ResizeObserver` and calls `updatePosition()` on every change, so the flip\n * decision always uses the size the panel has now.\n *\n * Call it once per `OverlayRef`, right after `attach(...)`. It ends itself when\n * the overlay detaches or is disposed. No-op where `ResizeObserver` does not\n * exist (SSR, old engines).\n *\n * @param overlayRef The overlay to keep in place.\n * @returns Stops observing. Idempotent, and unnecessary in the normal case.\n */\nexport function wrFollowSize(overlayRef: OverlayRef): () => void {\n if (typeof ResizeObserver === 'undefined') return wrNoop;\n\n const observer = new ResizeObserver(() => overlayRef.updatePosition());\n observer.observe(overlayRef.overlayElement);\n\n const stop = (): void => {\n observer.disconnect();\n subscription.unsubscribe();\n };\n // Both handlers: a live ref arrives through `next`, a disposed one only completes.\n const subscription = overlayRef.detachments().subscribe({ next: stop, complete: stop });\n return stop;\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 * Mirror the horizontal offsets of a connected-position list for RTL.\n *\n * The CDK mirrors `originX` / `overlayX` under `dir=\"rtl\"` — a `start` anchor\n * resolves to the origin's right edge — but it does NOT mirror `offsetX`, which\n * it adds to the final PHYSICAL x (`_getOffset` returns `position.offsetX`\n * verbatim). So a position that meant \"sit to the inline-start of the trigger,\n * 8px clear of it\" keeps its `-8` under RTL, where the panel is now on the\n * right: the gap becomes an 8px OVERLAP, and the panel sits on top of the thing\n * it is describing.\n *\n * Nothing in the CDK will do this for us, and the amount is per position, so\n * every ngwr overlay that offsets along the inline axis passes its list through\n * here. `offsetY` is untouched: the block axis does not flip.\n *\n * @example\n * ```ts\n * const dir = inject(Directionality, { optional: true });\n *\n * strategy.withPositions(wrMirrorOffsets(WR_POPOVER_POSITIONS[position], dir?.value === 'rtl'));\n * ```\n */\nexport function wrMirrorOffsets(positions: readonly ConnectedPosition[], isRtl: boolean): ConnectedPosition[] {\n // Copied rather than mutated even when there is nothing to do: the position\n // tables are module-level constants shared by every instance, so handing back\n // the same objects invites a caller to write through them.\n if (!isRtl) return positions.map(position => ({ ...position }));\n\n return positions.map(position => ({\n ...position,\n ...(position.offsetX == null ? {} : { offsetX: -position.offsetX }),\n }));\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 { OverlayRef } from '@angular/cdk/overlay';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { PLATFORM_ID, Service, inject } from '@angular/core';\n\nimport { Observable, type Subscriber } from 'rxjs';\n\n/** One live subscription to `WrOutsideClick.outsidePointerEvents()`. */\ninterface Watcher {\n readonly overlayRef: OverlayRef;\n readonly subscriber: Subscriber<MouseEvent>;\n}\n\n/**\n * Shadow-piercing `event.target` — `composedPath()[0]` is the real originator\n * when the click started inside a shadow root, where `target` is retargeted to\n * the host.\n */\nfunction eventTarget(event: Event): EventTarget | null {\n if (event.composedPath) {\n try {\n return event.composedPath()[0] ?? event.target;\n } catch {\n /* Detached / synthetic events can throw — fall through to `target`. */\n }\n }\n return event.target;\n}\n\n/** `parent.contains(child)`, but stepping out of shadow roots through their hosts. */\nfunction containsAcrossShadow(parent: Node, child: EventTarget | null): boolean {\n const hasShadowRoot = typeof ShadowRoot !== 'undefined';\n let current = child as Node | null;\n while (current) {\n if (current === parent) return true;\n current = hasShadowRoot && current instanceof ShadowRoot ? current.host : current.parentNode;\n }\n return false;\n}\n\n/**\n * Outside-click source for overlays — a drop-in replacement for\n * `OverlayRef.outsidePointerEvents()`.\n *\n * **Why this exists.** CDK's `OverlayOutsideClickDispatcher` binds its\n * listeners to `document.body`. When page content is shorter than the viewport,\n * a click in the empty space below it targets `<html>` — and `<html>` is\n * `body`'s *parent*, so the event bubbles straight to the document and `body`\n * never sees it. The overlay silently stays open. Listening on the document\n * itself catches both cases, and costs nothing else.\n *\n * Semantics are otherwise identical to the CDK's, deliberately:\n *\n * - Emits on `click` / `auxclick` / `contextmenu`, in the capture phase, and\n * tracks `pointerdown` so a `click` is judged by where the press *started*\n * (a drag that ends outside the pane doesn't count as an outside click).\n * - Walks watchers top-most first and stops at the first one that contains the\n * event, so clicking inside a stacked overlay can't close the ones beneath\n * it (a `wr-select` opened inside a `wr-popover`, say).\n * - Fires for the very click that opened the overlay, which is why every caller\n * also ignores events landing on its own trigger.\n *\n * Registration is per subscription: the document listeners go up with the first\n * watcher and come down with the last, so an app with no open overlay has none.\n * That sentence was aspirational until v11 — see {@link outsidePointerEvents}.\n */\n@Service()\nexport class WrOutsideClick {\n private readonly doc = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /** In attach order — last is top-most. */\n private readonly watchers: Watcher[] = [];\n private cleanup: (() => void) | null = null;\n private pressOrigin: EventTarget | null = null;\n\n /**\n * Emits every `click` / `auxclick` / `contextmenu` that lands outside the\n * given overlay's pane, for as long as the overlay is attached.\n *\n * **It completes when the overlay detaches, and that is load-bearing.** Every\n * one of the ten call sites subscribes inside its own `openOverlay()` and\n * pipes `takeUntilDestroyed(destroyRef)` — a DIRECTIVE lifetime, not an\n * overlay one — and none of them unsubscribes on close, because the natural\n * reading of that idiom is \"this ends with the component\". Without the\n * completion below the teardown never ran: one watcher accumulated per OPEN\n * for the life of the page, each pinning a disposed `OverlayRef` (and through\n * it a detached pane, its portal outlet and their injectors), the four\n * capture-phase document listeners could never come down because\n * `watchers.length` never reached zero, and every click on the page walked a\n * list that only grew. A `mode=\"tooltip\"` popover made it unbounded — one\n * permanent watcher per hover.\n *\n * Completing here rather than fixing ten call sites is deliberate: the next\n * component to open an overlay would have made the same reasonable mistake.\n * It is also what CDK's own `OverlayRef.outsidePointerEvents()` does.\n */\n outsidePointerEvents(overlayRef: OverlayRef): Observable<MouseEvent> {\n return new Observable<MouseEvent>(subscriber => {\n if (!this.isBrowser) return;\n\n const watcher: Watcher = { overlayRef, subscriber };\n this.watchers.push(watcher);\n if (this.watchers.length === 1) this.listen();\n\n // BOTH handlers, and the second one is not defensive padding. `dispose()`\n // emits a detachment and then completes the subject, so a live overlay\n // arrives through `next` — but a ref that was already disposed before\n // anyone subscribed has nothing left to emit and arrives through\n // `complete` alone. Listening for `next` only left exactly the watcher\n // this whole change exists to remove.\n const ended = (): void => subscriber.complete();\n const detached = overlayRef.detachments().subscribe({ next: ended, complete: ended });\n\n return () => {\n detached.unsubscribe();\n const index = this.watchers.indexOf(watcher);\n if (index > -1) this.watchers.splice(index, 1);\n if (!this.watchers.length) this.unlisten();\n };\n });\n }\n\n private readonly onPointerDown = (event: Event): void => {\n this.pressOrigin = eventTarget(event);\n };\n\n private readonly onClick = (event: Event): void => {\n const target = eventTarget(event);\n // `detail > 0` means the click really came from a pointer press. A click\n // activated by Enter or Space carries `detail: 0` and has no `pointerdown`\n // of its own — so trusting a leftover origin there judged it by a press\n // that belonged to something else entirely. A press inside the pane that\n // never produced a click (a drag released off-window, a node removed under\n // the finger, a cancelled touch) survives in `pressOrigin`, and the next\n // keyboard activation anywhere on the page then read as \"inside\": the panel\n // would not close, for keyboard users only.\n const fromPointer = event.type === 'click' && (event as MouseEvent).detail > 0;\n const origin = fromPointer && this.pressOrigin ? this.pressOrigin : target;\n this.pressOrigin = null;\n\n // Snapshot: a watcher that closes on this event unsubscribes synchronously,\n // mutating `watchers` while we're walking it.\n const watchers = this.watchers.slice();\n for (let i = watchers.length - 1; i > -1; i--) {\n const { overlayRef, subscriber } = watchers[i];\n if (!overlayRef.hasAttached()) continue;\n\n const pane = overlayRef.overlayElement;\n if (containsAcrossShadow(pane, target) || containsAcrossShadow(pane, origin)) break;\n\n subscriber.next(event as MouseEvent);\n }\n };\n\n private listen(): void {\n const options: AddEventListenerOptions = { capture: true };\n const doc = this.doc;\n\n doc.addEventListener('pointerdown', this.onPointerDown, options);\n doc.addEventListener('click', this.onClick, options);\n doc.addEventListener('auxclick', this.onClick, options);\n doc.addEventListener('contextmenu', this.onClick, options);\n\n this.cleanup = () => {\n doc.removeEventListener('pointerdown', this.onPointerDown, options);\n doc.removeEventListener('click', this.onClick, options);\n doc.removeEventListener('auxclick', this.onClick, options);\n doc.removeEventListener('contextmenu', this.onClick, options);\n };\n }\n\n private unlisten(): void {\n this.cleanup?.();\n this.cleanup = null;\n this.pressOrigin = null;\n }\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 { OverlayContainer } from '@angular/cdk/overlay';\nimport { _isTestEnvironment } from '@angular/cdk/platform';\nimport { Service } from '@angular/core';\n\nconst CONTAINER_CLASS = 'wr-overlay-container';\nconst PLATFORM_ATTR = 'data-wr-platform';\n\n/**\n * The overlay container every NGWR overlay renders into — a CDK\n * `OverlayContainer` subclass that tags its element with\n * `.wr-overlay-container` in addition to CDK's own `.cdk-overlay-container`.\n *\n * It is what `WR_OVERLAY_CONTAINER` resolves to by default, and it is never\n * provided as CDK's root `OverlayContainer`: that one stays the element\n * Angular Material, NG-ZORRO and every other CDK consumer share, so NGWR's\n * overlays sit in an element of their own. The class is the stable hook for\n * styling them, e.g.:\n *\n * ```scss\n * .wr-overlay-container .cdk-overlay-pane { font-size: var(--wr-text-sm); }\n * ```\n *\n * Not a z-index: CDK 22 promotes overlays into the top layer, which no\n * z-index reaches.\n */\n@Service()\nexport class WrOverlayContainer extends OverlayContainer {\n // Not `super._createContainer()`: CDK stamps its element `platform=\"test\"`\n // (or `\"server\"`) and, creating one, removes every `.cdk-overlay-container`\n // carrying either — so under Karma, Jasmine, Jest or Mocha the root container\n // and this one would detach each other. Same conditions, own attribute, and\n // only its own leftovers swept; CDK's class stays for the structural styles.\n protected override _createContainer(): void {\n const testing = _isTestEnvironment();\n\n if (this._platform.isBrowser || testing) {\n this._document\n .querySelectorAll(\n `.${CONTAINER_CLASS}[${PLATFORM_ATTR}=\"server\"], .${CONTAINER_CLASS}[${PLATFORM_ATTR}=\"test\"]`\n )\n .forEach(stale => stale.remove());\n }\n\n const container = this._document.createElement('div');\n container.classList.add('cdk-overlay-container', CONTAINER_CLASS);\n if (testing) container.setAttribute(PLATFORM_ATTR, 'test');\n else if (!this._platform.isBrowser) container.setAttribute(PLATFORM_ATTR, 'server');\n\n this._document.body.appendChild(container);\n this._containerElement = container;\n }\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 { Service } from '@angular/core';\n\ninterface Layer {\n readonly host: HTMLElement;\n readonly coversToasts: boolean;\n}\n\n/**\n * Move a popover host to the end of the top layer. Both calls run in one\n * task, so no frame shows it hidden. A host that is not a popover (jsdom,\n * `usePopover: false`) has no place in the top layer to change.\n */\nfunction reshow(host: Element): void {\n if (!host.isConnected || !host.hasAttribute('popover')) return;\n try {\n (host as HTMLElement).hidePopover();\n (host as HTMLElement).showPopover();\n } catch {\n // `hidePopover` throws on a host that is not showing: nothing to move.\n }\n}\n\n/**\n * Keeps the global toast host under the overlays opened with\n * `toasts: 'below'`, and above every other one.\n *\n * The top layer is ordered by the moment of promotion and by nothing else, so\n * the only way to put the toast host under an overlay is to promote that\n * overlay again after it. The toast host therefore belongs right under the\n * trailing run of covering overlays: the ones opened after the last overlay\n * that wants toasts above it. A covering overlay under such an overlay cannot\n * be moved over the toasts without also moving over the modal above it, so the\n * newer overlay's rule wins until it closes.\n *\n * @internal\n */\n@Service()\nexport class WrOverlayOrder {\n /** Open overlays in the order they were promoted. */\n private readonly layers: Layer[] = [];\n private toasts: HTMLElement | null = null;\n /** How many of `layers` sit under the toast host. */\n private under = 0;\n\n /**\n * Register an overlay right after it is attached, which is when the CDK\n * promotes it. Returns the function that takes it off the list.\n */\n add(host: HTMLElement, toasts: 'above' | 'below' = 'above'): () => void {\n const layer: Layer = { host, coversToasts: toasts === 'below' };\n this.layers.push(layer);\n return () => {\n const at = this.layers.indexOf(layer);\n if (at < 0) return;\n this.layers.splice(at, 1);\n if (at < this.under) this.under--;\n // The overlay that goes may have been the one deciding for those under it.\n this.place(false);\n };\n }\n\n /** Put the toast host on top, then every overlay that covers toasts over it. */\n raiseToasts(host: HTMLElement): void {\n if (host !== this.toasts) {\n this.toasts = host;\n this.under = this.layers.length;\n }\n this.place(true);\n }\n\n dropToasts(): void {\n this.toasts = null;\n }\n\n /**\n * @param raise with no covering overlay open, raise the host even where the\n * list says it is on top: a popover this list does not know may have joined.\n */\n private place(raise: boolean): void {\n const toasts = this.toasts;\n if (!toasts) return;\n\n let start = this.layers.length;\n while (start > 0 && this.layers[start - 1].coversToasts) start--;\n const covering = this.layers.slice(start);\n // Already right under the covering overlays: moving anything would only\n // put the toasts over them for the length of this call.\n if (this.under === start && (covering.length > 0 || !raise)) return;\n\n const doc = toasts.ownerDocument;\n const focused = doc.activeElement as HTMLElement | null;\n\n reshow(toasts);\n this.under = start;\n\n if (covering.length > 0) {\n // Whatever was attached after the first covering overlay sits above it\n // (a select panel inside the dialog), and has to stay there. Hosts are\n // appended on attach, so the siblings after it are those, in order.\n const above = new Set<Element>();\n for (let el: Element | null = covering[0].host; el; el = el.nextElementSibling) above.add(el);\n for (const layer of covering) above.add(layer.host);\n above.delete(toasts);\n above.forEach(reshow);\n }\n\n // Showing a popover runs its focusing steps, which move focus to an\n // `autofocus` descendant.\n if (focused?.isConnected && doc.activeElement !== focused) focused.focus({ preventScroll: true });\n }\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 { OverlayContainer } from '@angular/cdk/overlay';\nimport { InjectionToken, inject } from '@angular/core';\n\nimport { WrOverlayContainer } from '../wr-overlay-container';\n\n/**\n * Injection token for the overlay container NGWR components render into.\n *\n * Isolated by default: a `WrOverlayContainer`, tagged `.wr-overlay-container`,\n * and never CDK's root `OverlayContainer`. Every CDK consumer that shares the\n * root one (Angular Material, NG-ZORRO) shares its element too, and with it\n * the z-index stacking, the `.cdk-overlay-pane` rules and the lifecycle — so\n * one library's overlays end up under, restyled by or torn down with\n * another's. CDK's root container is left untouched for them.\n *\n * @internal\n */\nexport const WR_OVERLAY_CONTAINER = new InjectionToken<OverlayContainer>('WR_OVERLAY_CONTAINER', {\n providedIn: 'root',\n factory: () => inject(WrOverlayContainer),\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 { Overlay, OverlayContainer, OverlayPositionBuilder } from '@angular/cdk/overlay';\nimport { EnvironmentInjector, InjectionToken, Injector, inject } from '@angular/core';\n\nimport { WR_OVERLAY_CONTAINER } from './wr-overlay-container.token';\n\n/**\n * Injection token for the CDK `Overlay` service NGWR components should\n * use to open panels.\n *\n * Isolated by default: a fresh `Overlay` bound to `WR_OVERLAY_CONTAINER`\n * rather than CDK's root one, so NGWR overlays never share a DOM root — and\n * with it z-index, styles and lifecycle — with Angular Material, NG-ZORRO or\n * any other CDK consumer. CDK's root `Overlay` and `OverlayContainer` are\n * left untouched, so those libraries keep theirs.\n *\n * @internal — directives/services inside the lib inject this instead of\n * CDK's `Overlay` directly.\n */\nexport const WR_OVERLAY = new InjectionToken<Overlay>('WR_OVERLAY', {\n providedIn: 'root',\n factory: (): Overlay => {\n const parent = inject(EnvironmentInjector);\n const container = inject(WR_OVERLAY_CONTAINER);\n\n // `Overlay` reads `OverlayContainer` from its own injector, so a child that\n // answers with ours gets a fresh instance bound to it. Providing either in\n // the root instead would move every other CDK consumer into it as well.\n // The position builder comes along because a connected position strategy\n // measures the container it reads from its builder's injector: left in the\n // root, the first dropdown created CDK's own container just to measure it.\n const child = Injector.create({\n parent,\n providers: [\n { provide: OverlayContainer, useValue: container },\n { provide: OverlayPositionBuilder, useClass: OverlayPositionBuilder },\n { provide: Overlay, useClass: Overlay },\n ],\n });\n\n return child.get(Overlay);\n },\n});\n"],"mappings":";;;;;;;;;;;;;AAOA,MAAM,SAAS;AAGf,MAAM,mBAA2D;CAC/D,CAAC,SAAS,cAAc;CACxB,CAAC,WAAW,WAAW;CACvB,CAAC,QAAQ,MAAM;CACf,CAAC,UAAU,cAAc;CACzB,CAAC,gBAAgB,GAAG;CACpB,CAAC,kBAAkB,OAAO;CAC1B,CAAC,mBAAmB,OAAO;CAC3B,CAAC,eAAe,MAAM;AACvB;AACD,MAAM,mBAAsC,CAAC,cAAc,YAAY;AAavE,SAAS,gBAAgB,KAAa;CACpC,MAAM,MAAM,IAAI,gBAAgB,QAAQ,KAAK;CAG7C,KAAK,MAAM,CAAC,MAAM,UAAU,kBAAkB,IAAI,aAAa,MAAM,KAAK;CAC1E,KAAK,MAAM,KAAK,kBAAkB;EAChC,MAAM,OAAO,IAAI,gBAAgB,QAAQ,MAAM;EAC/C,KAAK,aAAa,KAAK,CAAC;EACxB,IAAI,YAAY,IAAI;CACtB;CACA,OAAO;AACT;AAmBA,SAAgB,qBACd,MACA,WACA,OACA,SAAmB;CAEnB,MAAM,SAAS,KAAK,cAAc,cAAc,QAAQ;CACxD,OAAO,OAAO;CACd,OAAO,YAAY;CACnB,OAAO,aAAa,cAAc,KAAK;CACvC,OAAO,YAAY,gBAAgB,KAAK,aAAa,CAAC;CACtD,OAAO,iBAAiB,SAAS,OAAO;CACxC,KAAK,YAAY,MAAM;CACvB,OAAO;AACT;;;;;;;ACdA,SAAgB,kBACd,YACA,KACA,UACA,mBAAkD;CAElD,IAAI,CAAC,KAAK,OAAO;CAEjB,MAAM,SAAS,SAAyB;EAKtC,IAAI,SAAS,WAAW,aAAY,GAAI;EAExC,WAAW,aAAa,IAAI;EAC5B,oBAAoB,IAAI;EACxB,WAAW,eAA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ClE,YAAY;CACZ,eAAuB;EACrB,MAAM,SAAS,OAAO,mBAAmB;EACzC,MAAM,YAAY,OAAO,oBAAoB;EAiB7C,OATc,SAAS,OAAO;GAC5B;GACA,WAAW;IACT;KAAE,SAAS;KAAkB,UAAU;IAAS;IAChD;KAAE,SAAS;KAAwB,UAAU;IAAsB;IACnE;KAAE,SAAS;KAAS,UAAU;IAAO;GACtC;EACF,CAEM,CAAA,CAAM,IAAI,OAAO;CAC1B;AACD,CAAA"}
1
+ {"version":3,"file":"ngwr-overlay.mjs","names":["DOCUMENT"],"sources":["../../../projects/lib/overlay/wr-anchored-positions.ts","../../../projects/lib/overlay/wr-overlay-close.ts","../../../projects/lib/overlay/wr-follow-direction.ts","../../../projects/lib/overlay/wr-follow-size.ts","../../../projects/lib/overlay/wr-mirror-offsets.ts","../../../projects/lib/overlay/wr-outside-click.ts","../../../projects/lib/overlay/wr-overlay-container.ts","../../../projects/lib/overlay/wr-overlay-order.ts","../../../projects/lib/overlay/tokens/wr-overlay-container.token.ts","../../../projects/lib/overlay/tokens/wr-overlay.token.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\nimport type { ConnectedPosition } from '@angular/cdk/overlay';\n\n/**\n * Where an anchored panel sits relative to its trigger: a side, optionally\n * aligned to the trigger's start or end edge. The one set `wr-popover`,\n * `wr-dropdown` and `wr-popconfirm` take as `position`.\n *\n * `left` / `right` and `-start` / `-end` are logical: under `dir=\"rtl\"` they\n * mirror, the name staying as written.\n */\nexport type WrAnchoredPosition =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'right'\n | 'right-start'\n | 'right-end';\n\n/**\n * The CDK geometry for each placement: one position, no gap and no fallbacks.\n *\n * Everything anchors on `start` / `end` or `center`, which the CDK resolves\n * against the direction, so the table itself needs no mirroring. A gap added by\n * `wrAnchoredPositions` is an offset in physical pixels and does: see\n * `wrMirrorOffsets`.\n *\n * @internal\n */\nexport const WR_ANCHORED_POSITIONS: Record<WrAnchoredPosition, 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 'left-start': { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top' },\n 'left-end': { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom' },\n right: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center' },\n 'right-start': { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top' },\n 'right-end': { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom' },\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 panel that fits never moves.\n *\n * Alignment is preserved down the whole chain — a `-start` panel stays\n * `-start` — because the alignment is the author's answer to \"which end of the\n * trigger does this belong to\", and a flip is about the side, not about that.\n *\n * The two axes are deliberately NOT symmetric. A block-axis placement (`top*` /\n * `bottom*`) flips only to its opposite, the classic behaviour, so a dropdown-ish\n * panel can never surprise anyone by appearing beside its trigger. An inline-axis\n * one (`left*` / `right*`) also gets the two block-axis sides, because on a phone\n * NEITHER side fits: at 375px a 233px panel beside a mid-page trigger overflows\n * by 109px to the right and 97px to the left, and only below/above has room.\n *\n * @internal\n */\nexport const WR_ANCHORED_FALLBACKS: Record<WrAnchoredPosition, readonly WrAnchoredPosition[]> = {\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 'left-start': ['left-start', 'right-start', 'bottom-start', 'top-start'],\n 'left-end': ['left-end', 'right-end', 'bottom-end', 'top-end'],\n right: ['right', 'left', 'bottom', 'top'],\n 'right-start': ['right-start', 'left-start', 'bottom-start', 'top-start'],\n 'right-end': ['right-end', 'left-end', 'bottom-end', 'top-end'],\n};\n\n/** How a host dresses the links `wrAnchoredPositions` returns. @internal */\nexport interface WrAnchoredPositionsOptions {\n /**\n * Distance between the trigger and the panel, in px, as a CDK offset pointing\n * away from the trigger. Left out by a host whose gap is padding on the pane.\n *\n * It is the reason a flip list matters rather than being a nicety: the\n * flexible strategy emits `offsetX` as a `transform` on the pane, AFTER\n * `withPush` has already decided the coordinate. Push therefore parks a\n * right-anchored panel flush against the viewport edge and the offset then\n * shoves it back out, so a side placement that does not fit loses its border\n * and corner off-screen no matter how hard push works.\n */\n readonly gap?: number;\n /**\n * The pane's base class. Each link is tagged `<paneClass>--<placement>`, so\n * the pane names the placement it ACTUALLY took: the CDK applies a position's\n * own `panelClass` when it lands on it and clears it on the next one. Left\n * out by a host that writes the class itself.\n */\n readonly paneClass?: string;\n}\n\n/**\n * The list `withPositions()` wants for a placement: its fallback chain in\n * order, as fresh objects, so a caller may also tell which link the CDK landed\n * on by the identity of the position it reports back.\n *\n * @internal\n */\nexport function wrAnchoredPositions(\n position: WrAnchoredPosition,\n options: WrAnchoredPositionsOptions = {}\n): ConnectedPosition[] {\n const { gap, paneClass } = options;\n return WR_ANCHORED_FALLBACKS[position].map(name => {\n const link: ConnectedPosition = { ...WR_ANCHORED_POSITIONS[name] };\n if (gap) {\n if (name.startsWith('top')) link.offsetY = -gap;\n else if (name.startsWith('bottom')) link.offsetY = gap;\n else if (name.startsWith('left')) link.offsetX = -gap;\n else link.offsetX = gap;\n }\n if (paneClass) link.panelClass = `${paneClass}--${name}`;\n return link;\n });\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\nconst SVG_NS = 'http://www.w3.org/2000/svg';\n\n/** The same 24×24 stroked ✕ the rest of the library's chrome draws (alert, toast, lightbox). */\nconst CLOSE_ICON_ATTRS: readonly (readonly [string, string])[] = [\n ['class', 'wr-icon__svg'],\n ['viewBox', '0 0 24 24'],\n ['fill', 'none'],\n ['stroke', 'currentColor'],\n ['stroke-width', '2'],\n ['stroke-linecap', 'round'],\n ['stroke-linejoin', 'round'],\n ['aria-hidden', 'true'],\n];\nconst CLOSE_ICON_PATHS: readonly string[] = ['M18 6 6 18', 'm6 6 12 12'];\n\n/**\n * Builds the ✕ node by node.\n *\n * It was one `innerHTML = CLOSE_ICON`, and the string was a compile-time\n * constant, so it was never an injection risk — it was an AVAILABILITY one.\n * Under `require-trusted-types-for 'script'` an `innerHTML` write throws\n * `TrustedHTML assignment` whatever the string is, and the throw landed after\n * the overlay was on screen: a modal with no ✕, no backdrop subscription and no\n * Escape handler, over the whole application. `createElementNS` is not a\n * Trusted Types sink, so there is nothing left to police.\n */\nfunction createCloseIcon(doc: Document): SVGSVGElement {\n const svg = doc.createElementNS(SVG_NS, 'svg');\n // `setAttribute`, not `.className` — on an SVG element that property is an\n // `SVGAnimatedString` and assigning a string to it silently does nothing.\n for (const [name, value] of CLOSE_ICON_ATTRS) svg.setAttribute(name, value);\n for (const d of CLOSE_ICON_PATHS) {\n const path = doc.createElementNS(SVG_NS, 'path');\n path.setAttribute('d', d);\n svg.appendChild(path);\n }\n return svg;\n}\n\n/**\n * Appends a dismiss (✕) button to a service-opened overlay panel.\n *\n * `WrDialog` and `WrDrawerManager` build their panel around a component the\n * consumer supplies, so there is no template of their own to put a corner button\n * in — they call this instead. Component-driven overlays (`<wr-drawer>`) render\n * the same markup in their template.\n *\n * Uses `host.ownerDocument` rather than the global `document`, so it carries no\n * hidden browser-only assumption; callers still gate on the platform because\n * they have nothing to append to on the server.\n *\n * @param host Panel element the button is appended to (and positioned against).\n * @param className BEM class for the button, e.g. `wr-dialog__close`.\n * @param label Accessible name — already localized by the caller.\n * @param onClose Invoked on click.\n */\nexport function wrAppendOverlayClose(\n host: HTMLElement,\n className: string,\n label: string,\n onClose: () => void\n): HTMLButtonElement {\n const button = host.ownerDocument.createElement('button');\n button.type = 'button';\n button.className = className;\n button.setAttribute('aria-label', label);\n button.appendChild(createCloseIcon(host.ownerDocument));\n button.addEventListener('click', onClose);\n host.appendChild(button);\n return button;\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 { Direction, Directionality } from '@angular/cdk/bidi';\nimport type { OverlayRef } from '@angular/cdk/overlay';\nimport { type Injector, effect, untracked } from '@angular/core';\n\nimport { Subscription } from 'rxjs';\n\nimport { wrNoop } from 'ngwr/utils';\n\n/**\n * Keep an OPEN overlay on the application's reading direction.\n *\n * The CDK reads the direction ONCE, as a string, when the overlay is created\n * (`overlayConfig.direction ||= directionality.value`), writes it as the host's\n * `dir` on attach, and never looks at it again — `updatePosition()` does not\n * touch it and `setDirection()` is the only thing that does. So an application\n * that flips direction while a panel is open mirrors the page and leaves the\n * panel behind, still `ltr`, still resolving `start` to the left. This site's\n * own LTR/RTL switch is the demonstration: it lives inside a `wr-dropdown`, and\n * the `wr-segmented` it is built from reads `Directionality` live — so the thumb\n * slides to the other slot while the pane around it still renders `ltr`, and\n * parks under the wrong label.\n *\n * Call it once per `OverlayRef`, right after `overlay.create(...)`. The follower\n * ends itself when that overlay detaches or is disposed, so a reopen — which is\n * always a NEW ref in this library — needs a new call, and the returned teardown\n * is only for stopping early.\n *\n * `onDirectionChange` is for the sites whose position LIST is itself\n * direction-dependent (the four that pass their table through\n * {@link wrMirrorOffsets}): it runs with the new direction already on the ref\n * and before the overlay repositions, so the strategy is carrying the mirrored\n * offsets by the time the CDK re-resolves them.\n *\n * SSR-safe: it touches no browser global of its own, and the CDK's position\n * strategies no-op off the browser, so a flip on the server only rewrites the\n * attribute.\n *\n * @param overlayRef The overlay to keep in step, freshly created.\n * @param dir The `Directionality` the caller injected. `null` — an optional\n * inject with no provider, i.e. a bare `TestBed` — means there is nothing\n * ambient to follow and this does nothing at all.\n * @param injector Owns the `valueSignal` watch; the caller's own is right.\n * @param onDirectionChange Re-applies direction-dependent state, e.g.\n * `strategy.withPositions(wrMirrorOffsets(TABLE, direction === 'rtl'))`.\n * @returns Stops following. Idempotent, and unnecessary in the normal case.\n *\n * @example\n * ```ts\n * this.overlayRef = this.overlay.create({ positionStrategy, ... });\n * wrFollowDirection(this.overlayRef, this.dir, this.injector, direction =>\n * positionStrategy.withPositions(\n * wrMirrorOffsets(wrPopconfirmPositions(this.position()), direction === 'rtl')\n * )\n * );\n * ```\n */\nexport function wrFollowDirection(\n overlayRef: OverlayRef,\n dir: Directionality | null,\n injector: Injector,\n onDirectionChange?: (direction: Direction) => void\n): () => void {\n if (!dir) return wrNoop;\n\n const apply = (next: Direction): void => {\n // Comparing against the REF rather than a direction captured up here does\n // three jobs at once: the watch's mandatory first run is a no-op, a flip\n // that arrives down both channels is applied once, and a same-value write\n // never yanks a panel the user is reading.\n if (next === overlayRef.getDirection()) return;\n\n overlayRef.setDirection(next); // rewrites the host's `dir`; it does NOT reposition\n onDirectionChange?.(next); // the caller re-mirrors its position list here\n overlayRef.updatePosition(); // re-resolves start/end against the direction just set\n };\n\n // Two channels, because they are not the same thing. `valueSignal` is the\n // state — `Directionality.value` is a getter over it, so nothing can change\n // direction without writing it. `change` is an EventEmitter the root instance\n // never emits: it reads the document once at construction and only completes\n // the emitter on destroy, so it belongs to the `[dir]` directive (and to an\n // app, like this site's header, that emits it by hand as a courtesy). Keying\n // on `change` alone would be dead for an app that just writes the signal;\n // keying on the signal alone would ignore the `{ value, change }` test double\n // that a dozen of the library's RTL specs hand their component.\n //\n // `untracked` because of WHERE this is called from: half the call sites open\n // their overlay out of an `effect(() => { if (this.isOpen()) … })`, and\n // `effect()` refuses in dev mode to be created inside a reactive context.\n // Laundering only the CREATION is exactly right — the watch below still\n // depends on `valueSignal` and on nothing else.\n const watch = untracked(() =>\n effect(\n () => {\n // Read as a plain optional function rather than as a `Signal`, because\n // the case being guarded is a double that has no signal at all: falling\n // back to `value` registers no dependency, so the watch simply never\n // re-runs and `change` carries that case on its own.\n const read: (() => Direction) | undefined = dir.valueSignal;\n apply(read ? read() : dir.value);\n },\n { injector }\n )\n );\n\n // rxjs owns the teardown, and an `OverlayRef` is why. Open and close happen in\n // an event handler or an effect, never in an injection context, so the idiom\n // that suggests itself — `takeUntilDestroyed(destroyRef)` — would tie this to\n // the DIRECTIVE's lifetime: a menu opened fifty times would leave fifty\n // followers behind, each pinning a disposed ref. (`WrOutsideClick`'s JSDoc\n // records that same mistake, made at ten call sites.) `detachments()` is the\n // overlay's own lifetime and the one channel every dismissal goes through.\n // And it is not hygiene: `setDirection()` writes through the host element\n // `dispose()` nulls, so a watch that outlives its overlay THROWS on the next\n // flip.\n const teardown = new Subscription();\n const stop = (): void => teardown.unsubscribe();\n\n teardown.add(() => watch.destroy());\n teardown.add(dir.change.subscribe(apply));\n // Both handlers, for the reason `WrOutsideClick` gives: a live ref arrives\n // through `next`, one already disposed before this call has only `complete`\n // left to give.\n teardown.add(overlayRef.detachments().subscribe({ next: stop, complete: stop }));\n\n // `Subscription.unsubscribe()` is a no-op once closed, so the caller's copy of\n // this and the automatic one cannot fight, and calling it twice is free.\n return stop;\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 { OverlayRef } from '@angular/cdk/overlay';\n\nimport { wrNoop } from 'ngwr/utils';\n\n/**\n * Keep an OPEN overlay positioned as its content changes size.\n *\n * The CDK positions a pane once, when it attaches, and again on scroll or\n * resize of the window. A panel whose content renders after that, or grows later\n * (a time row that appears, a calendar that gains a sixth week), is measured at\n * its first, smaller size: flipped above the origin at that height, it then\n * grows downward over the field it belongs to. This watches the pane with a\n * `ResizeObserver` and calls `updatePosition()` on every change, so the flip\n * decision always uses the size the panel has now.\n *\n * Call it once per `OverlayRef`, right after `attach(...)`. It ends itself when\n * the overlay detaches or is disposed. No-op where `ResizeObserver` does not\n * exist (SSR, old engines).\n *\n * @param overlayRef The overlay to keep in place.\n * @returns Stops observing. Idempotent, and unnecessary in the normal case.\n */\nexport function wrFollowSize(overlayRef: OverlayRef): () => void {\n if (typeof ResizeObserver === 'undefined') return wrNoop;\n\n const observer = new ResizeObserver(() => overlayRef.updatePosition());\n observer.observe(overlayRef.overlayElement);\n\n const stop = (): void => {\n observer.disconnect();\n subscription.unsubscribe();\n };\n // Both handlers: a live ref arrives through `next`, a disposed one only completes.\n const subscription = overlayRef.detachments().subscribe({ next: stop, complete: stop });\n return stop;\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 * Mirror the horizontal offsets of a connected-position list for RTL.\n *\n * The CDK mirrors `originX` / `overlayX` under `dir=\"rtl\"` — a `start` anchor\n * resolves to the origin's right edge — but it does NOT mirror `offsetX`, which\n * it adds to the final PHYSICAL x (`_getOffset` returns `position.offsetX`\n * verbatim). So a position that meant \"sit to the inline-start of the trigger,\n * 8px clear of it\" keeps its `-8` under RTL, where the panel is now on the\n * right: the gap becomes an 8px OVERLAP, and the panel sits on top of the thing\n * it is describing.\n *\n * Nothing in the CDK will do this for us, and the amount is per position, so\n * every ngwr overlay that offsets along the inline axis passes its list through\n * here. `offsetY` is untouched: the block axis does not flip.\n *\n * @example\n * ```ts\n * const dir = inject(Directionality, { optional: true });\n *\n * strategy.withPositions(wrMirrorOffsets(wrAnchoredPositions(position, { gap: 8 }), dir?.value === 'rtl'));\n * ```\n */\nexport function wrMirrorOffsets(positions: readonly ConnectedPosition[], isRtl: boolean): ConnectedPosition[] {\n // Copied rather than mutated even when there is nothing to do: the position\n // tables are module-level constants shared by every instance, so handing back\n // the same objects invites a caller to write through them.\n if (!isRtl) return positions.map(position => ({ ...position }));\n\n return positions.map(position => ({\n ...position,\n ...(position.offsetX == null ? {} : { offsetX: -position.offsetX }),\n }));\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 { OverlayRef } from '@angular/cdk/overlay';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { PLATFORM_ID, Service, inject } from '@angular/core';\n\nimport { Observable, type Subscriber } from 'rxjs';\n\n/** One live subscription to `WrOutsideClick.outsidePointerEvents()`. */\ninterface Watcher {\n readonly overlayRef: OverlayRef;\n readonly subscriber: Subscriber<MouseEvent>;\n}\n\n/**\n * Shadow-piercing `event.target` — `composedPath()[0]` is the real originator\n * when the click started inside a shadow root, where `target` is retargeted to\n * the host.\n */\nfunction eventTarget(event: Event): EventTarget | null {\n if (event.composedPath) {\n try {\n return event.composedPath()[0] ?? event.target;\n } catch {\n /* Detached / synthetic events can throw — fall through to `target`. */\n }\n }\n return event.target;\n}\n\n/** `parent.contains(child)`, but stepping out of shadow roots through their hosts. */\nfunction containsAcrossShadow(parent: Node, child: EventTarget | null): boolean {\n const hasShadowRoot = typeof ShadowRoot !== 'undefined';\n let current = child as Node | null;\n while (current) {\n if (current === parent) return true;\n current = hasShadowRoot && current instanceof ShadowRoot ? current.host : current.parentNode;\n }\n return false;\n}\n\n/**\n * Outside-click source for overlays — a drop-in replacement for\n * `OverlayRef.outsidePointerEvents()`.\n *\n * **Why this exists.** CDK's `OverlayOutsideClickDispatcher` binds its\n * listeners to `document.body`. When page content is shorter than the viewport,\n * a click in the empty space below it targets `<html>` — and `<html>` is\n * `body`'s *parent*, so the event bubbles straight to the document and `body`\n * never sees it. The overlay silently stays open. Listening on the document\n * itself catches both cases, and costs nothing else.\n *\n * Semantics are otherwise identical to the CDK's, deliberately:\n *\n * - Emits on `click` / `auxclick` / `contextmenu`, in the capture phase, and\n * tracks `pointerdown` so a `click` is judged by where the press *started*\n * (a drag that ends outside the pane doesn't count as an outside click).\n * - Walks watchers top-most first and stops at the first one that contains the\n * event, so clicking inside a stacked overlay can't close the ones beneath\n * it (a `wr-select` opened inside a `wr-popover`, say).\n * - Fires for the very click that opened the overlay, which is why every caller\n * also ignores events landing on its own trigger.\n *\n * Registration is per subscription: the document listeners go up with the first\n * watcher and come down with the last, so an app with no open overlay has none.\n * That sentence was aspirational until v11 — see {@link outsidePointerEvents}.\n */\n@Service()\nexport class WrOutsideClick {\n private readonly doc = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /** In attach order — last is top-most. */\n private readonly watchers: Watcher[] = [];\n private cleanup: (() => void) | null = null;\n private pressOrigin: EventTarget | null = null;\n\n /**\n * Emits every `click` / `auxclick` / `contextmenu` that lands outside the\n * given overlay's pane, for as long as the overlay is attached.\n *\n * **It completes when the overlay detaches, and that is load-bearing.** Every\n * one of the ten call sites subscribes inside its own `openOverlay()` and\n * pipes `takeUntilDestroyed(destroyRef)` — a DIRECTIVE lifetime, not an\n * overlay one — and none of them unsubscribes on close, because the natural\n * reading of that idiom is \"this ends with the component\". Without the\n * completion below the teardown never ran: one watcher accumulated per OPEN\n * for the life of the page, each pinning a disposed `OverlayRef` (and through\n * it a detached pane, its portal outlet and their injectors), the four\n * capture-phase document listeners could never come down because\n * `watchers.length` never reached zero, and every click on the page walked a\n * list that only grew. A `mode=\"tooltip\"` popover made it unbounded — one\n * permanent watcher per hover.\n *\n * Completing here rather than fixing ten call sites is deliberate: the next\n * component to open an overlay would have made the same reasonable mistake.\n * It is also what CDK's own `OverlayRef.outsidePointerEvents()` does.\n */\n outsidePointerEvents(overlayRef: OverlayRef): Observable<MouseEvent> {\n return new Observable<MouseEvent>(subscriber => {\n if (!this.isBrowser) return;\n\n const watcher: Watcher = { overlayRef, subscriber };\n this.watchers.push(watcher);\n if (this.watchers.length === 1) this.listen();\n\n // BOTH handlers, and the second one is not defensive padding. `dispose()`\n // emits a detachment and then completes the subject, so a live overlay\n // arrives through `next` — but a ref that was already disposed before\n // anyone subscribed has nothing left to emit and arrives through\n // `complete` alone. Listening for `next` only left exactly the watcher\n // this whole change exists to remove.\n const ended = (): void => subscriber.complete();\n const detached = overlayRef.detachments().subscribe({ next: ended, complete: ended });\n\n return () => {\n detached.unsubscribe();\n const index = this.watchers.indexOf(watcher);\n if (index > -1) this.watchers.splice(index, 1);\n if (!this.watchers.length) this.unlisten();\n };\n });\n }\n\n private readonly onPointerDown = (event: Event): void => {\n this.pressOrigin = eventTarget(event);\n };\n\n private readonly onClick = (event: Event): void => {\n const target = eventTarget(event);\n // `detail > 0` means the click really came from a pointer press. A click\n // activated by Enter or Space carries `detail: 0` and has no `pointerdown`\n // of its own — so trusting a leftover origin there judged it by a press\n // that belonged to something else entirely. A press inside the pane that\n // never produced a click (a drag released off-window, a node removed under\n // the finger, a cancelled touch) survives in `pressOrigin`, and the next\n // keyboard activation anywhere on the page then read as \"inside\": the panel\n // would not close, for keyboard users only.\n const fromPointer = event.type === 'click' && (event as MouseEvent).detail > 0;\n const origin = fromPointer && this.pressOrigin ? this.pressOrigin : target;\n this.pressOrigin = null;\n\n // Snapshot: a watcher that closes on this event unsubscribes synchronously,\n // mutating `watchers` while we're walking it.\n const watchers = this.watchers.slice();\n for (let i = watchers.length - 1; i > -1; i--) {\n const { overlayRef, subscriber } = watchers[i];\n if (!overlayRef.hasAttached()) continue;\n\n const pane = overlayRef.overlayElement;\n if (containsAcrossShadow(pane, target) || containsAcrossShadow(pane, origin)) break;\n\n subscriber.next(event as MouseEvent);\n }\n };\n\n private listen(): void {\n const options: AddEventListenerOptions = { capture: true };\n const doc = this.doc;\n\n doc.addEventListener('pointerdown', this.onPointerDown, options);\n doc.addEventListener('click', this.onClick, options);\n doc.addEventListener('auxclick', this.onClick, options);\n doc.addEventListener('contextmenu', this.onClick, options);\n\n this.cleanup = () => {\n doc.removeEventListener('pointerdown', this.onPointerDown, options);\n doc.removeEventListener('click', this.onClick, options);\n doc.removeEventListener('auxclick', this.onClick, options);\n doc.removeEventListener('contextmenu', this.onClick, options);\n };\n }\n\n private unlisten(): void {\n this.cleanup?.();\n this.cleanup = null;\n this.pressOrigin = null;\n }\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 { OverlayContainer } from '@angular/cdk/overlay';\nimport { _isTestEnvironment } from '@angular/cdk/platform';\nimport { Service } from '@angular/core';\n\nconst CONTAINER_CLASS = 'wr-overlay-container';\nconst PLATFORM_ATTR = 'data-wr-platform';\n\n/**\n * The overlay container every NGWR overlay renders into — a CDK\n * `OverlayContainer` subclass that tags its element with\n * `.wr-overlay-container` in addition to CDK's own `.cdk-overlay-container`.\n *\n * It is what `WR_OVERLAY_CONTAINER` resolves to by default, and it is never\n * provided as CDK's root `OverlayContainer`: that one stays the element\n * Angular Material, NG-ZORRO and every other CDK consumer share, so NGWR's\n * overlays sit in an element of their own. The class is the stable hook for\n * styling them, e.g.:\n *\n * ```scss\n * .wr-overlay-container .cdk-overlay-pane { font-size: var(--wr-text-sm); }\n * ```\n *\n * Not a z-index: CDK 22 promotes overlays into the top layer, which no\n * z-index reaches.\n */\n@Service()\nexport class WrOverlayContainer extends OverlayContainer {\n // Not `super._createContainer()`: CDK stamps its element `platform=\"test\"`\n // (or `\"server\"`) and, creating one, removes every `.cdk-overlay-container`\n // carrying either — so under Karma, Jasmine, Jest or Mocha the root container\n // and this one would detach each other. Same conditions, own attribute, and\n // only its own leftovers swept; CDK's class stays for the structural styles.\n protected override _createContainer(): void {\n const testing = _isTestEnvironment();\n\n if (this._platform.isBrowser || testing) {\n this._document\n .querySelectorAll(\n `.${CONTAINER_CLASS}[${PLATFORM_ATTR}=\"server\"], .${CONTAINER_CLASS}[${PLATFORM_ATTR}=\"test\"]`\n )\n .forEach(stale => stale.remove());\n }\n\n const container = this._document.createElement('div');\n container.classList.add('cdk-overlay-container', CONTAINER_CLASS);\n if (testing) container.setAttribute(PLATFORM_ATTR, 'test');\n else if (!this._platform.isBrowser) container.setAttribute(PLATFORM_ATTR, 'server');\n\n this._document.body.appendChild(container);\n this._containerElement = container;\n }\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 { Service } from '@angular/core';\n\ninterface Layer {\n readonly host: HTMLElement;\n readonly coversToasts: boolean;\n}\n\n/**\n * Move a popover host to the end of the top layer. Both calls run in one\n * task, so no frame shows it hidden. A host that is not a popover (jsdom,\n * `usePopover: false`) has no place in the top layer to change.\n */\nfunction reshow(host: Element): void {\n if (!host.isConnected || !host.hasAttribute('popover')) return;\n try {\n (host as HTMLElement).hidePopover();\n (host as HTMLElement).showPopover();\n } catch {\n // `hidePopover` throws on a host that is not showing: nothing to move.\n }\n}\n\n/**\n * Keeps the global toast host under the overlays opened with\n * `toasts: 'below'`, and above every other one.\n *\n * The top layer is ordered by the moment of promotion and by nothing else, so\n * the only way to put the toast host under an overlay is to promote that\n * overlay again after it. The toast host therefore belongs right under the\n * trailing run of covering overlays: the ones opened after the last overlay\n * that wants toasts above it. A covering overlay under such an overlay cannot\n * be moved over the toasts without also moving over the modal above it, so the\n * newer overlay's rule wins until it closes.\n *\n * @internal\n */\n@Service()\nexport class WrOverlayOrder {\n /** Open overlays in the order they were promoted. */\n private readonly layers: Layer[] = [];\n private toasts: HTMLElement | null = null;\n /** How many of `layers` sit under the toast host. */\n private under = 0;\n /** Something may have joined the top layer since the toast host was last raised. */\n private stale = true;\n private placing = false;\n\n // Neither event bubbles out of a shadow tree, so a popover shown inside one\n // goes unseen until an overlay joins the container.\n private readonly onBeforeToggle = (event: Event): void => {\n if (this.placing || event.target === this.toasts) return;\n if ((event as ToggleEvent).newState === 'open') this.stale = true;\n };\n private readonly onFullscreenChange = (): void => {\n this.stale = true;\n };\n\n /**\n * Register an overlay right after it is attached, which is when the CDK\n * promotes it. Returns the function that takes it off the list.\n */\n add(host: HTMLElement, toasts: 'above' | 'below' = 'above'): () => void {\n const layer: Layer = { host, coversToasts: toasts === 'below' };\n this.layers.push(layer);\n this.stale = true;\n return () => {\n const at = this.layers.indexOf(layer);\n if (at < 0) return;\n this.layers.splice(at, 1);\n if (at < this.under) this.under--;\n // The overlay that goes may have been the one deciding for those under it.\n this.place(false);\n };\n }\n\n /**\n * Put the toast host on top, then every overlay that covers toasts over it.\n * Returns whether anything had to move.\n */\n raiseToasts(host: HTMLElement): boolean {\n if (host !== this.toasts) {\n this.dropToasts();\n this.toasts = host;\n this.under = this.layers.length;\n this.stale = true;\n // `beforetoggle` does not bubble, so it is caught on the way down.\n host.ownerDocument.addEventListener('beforetoggle', this.onBeforeToggle, true);\n host.ownerDocument.addEventListener('fullscreenchange', this.onFullscreenChange);\n }\n return this.place(true);\n }\n\n /** An overlay that is not on the list was promoted. */\n joined(): void {\n this.stale = true;\n }\n\n dropToasts(): void {\n const doc = this.toasts?.ownerDocument;\n doc?.removeEventListener('beforetoggle', this.onBeforeToggle, true);\n doc?.removeEventListener('fullscreenchange', this.onFullscreenChange);\n this.toasts = null;\n }\n\n /**\n * @param raise with no covering overlay open, raise the host even where the\n * list says it is on top, if a popover this list does not know may have joined.\n */\n private place(raise: boolean): boolean {\n const toasts = this.toasts;\n if (!toasts) return false;\n\n let start = this.layers.length;\n while (start > 0 && this.layers[start - 1].coversToasts) start--;\n const covering = this.layers.slice(start);\n // Already right under the covering overlays: moving anything would only\n // put the toasts over them for the length of this call.\n if (this.under === start && (covering.length > 0 || !raise || !this.stale)) return false;\n\n const doc = toasts.ownerDocument;\n const focused = doc.activeElement as HTMLElement | null;\n\n this.placing = true;\n reshow(toasts);\n this.under = start;\n this.stale = false;\n\n if (covering.length > 0) {\n // Whatever was attached after the first covering overlay sits above it\n // (a select panel inside the dialog), and has to stay there. Hosts are\n // appended on attach, so the siblings after it are those, in order.\n const above = new Set<Element>();\n for (let el: Element | null = covering[0].host; el; el = el.nextElementSibling) above.add(el);\n for (const layer of covering) above.add(layer.host);\n above.delete(toasts);\n above.forEach(reshow);\n }\n this.placing = false;\n\n // Showing a popover runs its focusing steps, which move focus to an\n // `autofocus` descendant.\n if (focused?.isConnected && doc.activeElement !== focused) focused.focus({ preventScroll: true });\n return true;\n }\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 { OverlayContainer } from '@angular/cdk/overlay';\nimport { InjectionToken, inject } from '@angular/core';\n\nimport { WrOverlayContainer } from '../wr-overlay-container';\n\n/**\n * Injection token for the overlay container NGWR components render into.\n *\n * Isolated by default: a `WrOverlayContainer`, tagged `.wr-overlay-container`,\n * and never CDK's root `OverlayContainer`. Every CDK consumer that shares the\n * root one (Angular Material, NG-ZORRO) shares its element too, and with it\n * the z-index stacking, the `.cdk-overlay-pane` rules and the lifecycle — so\n * one library's overlays end up under, restyled by or torn down with\n * another's. CDK's root container is left untouched for them.\n *\n * @internal\n */\nexport const WR_OVERLAY_CONTAINER = new InjectionToken<OverlayContainer>('WR_OVERLAY_CONTAINER', {\n providedIn: 'root',\n factory: () => inject(WrOverlayContainer),\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 { Overlay, OverlayContainer, OverlayPositionBuilder } from '@angular/cdk/overlay';\nimport { EnvironmentInjector, InjectionToken, Injector, inject } from '@angular/core';\n\nimport { WR_OVERLAY_CONTAINER } from './wr-overlay-container.token';\n\n/**\n * Injection token for the CDK `Overlay` service NGWR components should\n * use to open panels.\n *\n * Isolated by default: a fresh `Overlay` bound to `WR_OVERLAY_CONTAINER`\n * rather than CDK's root one, so NGWR overlays never share a DOM root — and\n * with it z-index, styles and lifecycle — with Angular Material, NG-ZORRO or\n * any other CDK consumer. CDK's root `Overlay` and `OverlayContainer` are\n * left untouched, so those libraries keep theirs.\n *\n * @internal — directives/services inside the lib inject this instead of\n * CDK's `Overlay` directly.\n */\nexport const WR_OVERLAY = new InjectionToken<Overlay>('WR_OVERLAY', {\n providedIn: 'root',\n factory: (): Overlay => {\n const parent = inject(EnvironmentInjector);\n const container = inject(WR_OVERLAY_CONTAINER);\n\n // `Overlay` reads `OverlayContainer` from its own injector, so a child that\n // answers with ours gets a fresh instance bound to it. Providing either in\n // the root instead would move every other CDK consumer into it as well.\n // The position builder comes along because a connected position strategy\n // measures the container it reads from its builder's injector: left in the\n // root, the first dropdown created CDK's own container just to measure it.\n const child = Injector.create({\n parent,\n providers: [\n { provide: OverlayContainer, useValue: container },\n { provide: OverlayPositionBuilder, useClass: OverlayPositionBuilder },\n { provide: Overlay, useClass: Overlay },\n ],\n });\n\n return child.get(Overlay);\n },\n});\n"],"mappings":";;;;;;;;;;;;;AAyCA,MAAa,wBAAuE;CAClF,KAAK;EAAE,SAAS;EAAU,SAAS;EAAO,UAAU;EAAU,UAAU;CAAQ;CAChF,aAAa;EAAE,SAAS;EAAS,SAAS;EAAO,UAAU;EAAS,UAAU;CAAQ;CACtF,WAAW;EAAE,SAAS;EAAO,SAAS;EAAO,UAAU;EAAO,UAAU;CAAQ;CAChF,QAAQ;EAAE,SAAS;EAAU,SAAS;EAAU,UAAU;EAAU,UAAU;CAAK;CACnF,gBAAgB;EAAE,SAAS;EAAS,SAAS;EAAU,UAAU;EAAS,UAAU;CAAK;CACzF,cAAc;EAAE,SAAS;EAAO,SAAS;EAAU,UAAU;EAAO,UAAU;CAAK;CACnF,MA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,EAAE,eAAe,KAAI,CAAE;EAChG,OAAO;CACT;CA1GW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAc,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAd,OAAA,QAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;CAAc,CAAA;;AAAd,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA,EAD1B,MAAA,Q;;;;;;;;ACnBD,MAAa,uBAAuB,IAAI,eAAiC,wBAAwB;CAC/F,YAAY;CACZ,eAAe,OAAO,kBAAkB;AACzC,CAAA;;;;;;;ACFD,MAAa,aAAa,IAAI,eAAwB,cAAc;CAClE,YAAY;CACZ,eAAuB;EACrB,MAAM,SAAS,OAAO,mBAAmB;EACzC,MAAM,YAAY,OAAO,oBAAoB;EAiB7C,OATc,SAAS,OAAO;GAC5B;GACA,WAAW;IACT;KAAE,SAAS;KAAkB,UAAU;IAAS;IAChD;KAAE,SAAS;KAAwB,UAAU;IAAsB;IACnE;KAAE,SAAS;KAAS,UAAU;IAAO;GACtC;EACF,CAEM,CAAA,CAAM,IAAI,OAAO;CAC1B;AACD,CAAA"}
@@ -28,7 +28,7 @@ var WrPageHeader = class WrPageHeader {
28
28
  });
29
29
  static ɵfac = i0.ɵɵngDeclareFactory({
30
30
  minVersion: "12.0.0",
31
- version: "22.2.5",
31
+ version: "22.2.6",
32
32
  ngImport: i0,
33
33
  type: WrPageHeader,
34
34
  deps: [],
@@ -36,7 +36,7 @@ var WrPageHeader = class WrPageHeader {
36
36
  });
37
37
  static ɵcmp = i0.ɵɵngDeclareComponent({
38
38
  minVersion: "17.0.0",
39
- version: "22.2.5",
39
+ version: "22.2.6",
40
40
  type: WrPageHeader,
41
41
  isStandalone: true,
42
42
  selector: "wr-page-header",
@@ -93,7 +93,7 @@ var WrPageHeader = class WrPageHeader {
93
93
  };
94
94
  i0.ɵɵngDeclareClassMetadata({
95
95
  minVersion: "12.0.0",
96
- version: "22.2.5",
96
+ version: "22.2.6",
97
97
  ngImport: i0,
98
98
  type: WrPageHeader,
99
99
  decorators: [{
@@ -139,7 +139,7 @@ var WrPagination = class WrPagination {
139
139
  }
140
140
  static ɵfac = i0.ɵɵngDeclareFactory({
141
141
  minVersion: "12.0.0",
142
- version: "22.2.5",
142
+ version: "22.2.6",
143
143
  ngImport: i0,
144
144
  type: WrPagination,
145
145
  deps: [],
@@ -147,7 +147,7 @@ var WrPagination = class WrPagination {
147
147
  });
148
148
  static ɵcmp = i0.ɵɵngDeclareComponent({
149
149
  minVersion: "17.0.0",
150
- version: "22.2.5",
150
+ version: "22.2.6",
151
151
  type: WrPagination,
152
152
  isStandalone: true,
153
153
  selector: "wr-pagination",
@@ -321,6 +321,7 @@ var WrPagination = class WrPagination {
321
321
  "loadErrorText",
322
322
  "retryable",
323
323
  "retryText",
324
+ "resultsText",
324
325
  "loading",
325
326
  "separators",
326
327
  "allowDuplicates",
@@ -329,6 +330,8 @@ var WrPagination = class WrPagination {
329
330
  "panelClass",
330
331
  "position",
331
332
  "maxItems",
333
+ "selectAll",
334
+ "selectAllLabel",
332
335
  "maxTagCount",
333
336
  "value"
334
337
  ],
@@ -357,7 +360,7 @@ var WrPagination = class WrPagination {
357
360
  };
358
361
  i0.ɵɵngDeclareClassMetadata({
359
362
  minVersion: "12.0.0",
360
- version: "22.2.5",
363
+ version: "22.2.6",
361
364
  ngImport: i0,
362
365
  type: WrPagination,
363
366
  decorators: [{