ngwr 16.5.0 → 16.7.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 (450) hide show
  1. package/avatar/styles/_index.scss +39 -0
  2. package/back-top/styles/_index.scss +6 -0
  3. package/breadcrumbs/styles/_rules.scss +34 -0
  4. package/button/styles/_index.scss +45 -2
  5. package/cascader/styles/_rules.scss +7 -0
  6. package/charts/chart-legend/styles/_index.scss +1 -9
  7. package/copy-value/styles/_index.scss +4 -0
  8. package/counter/styles/_index.scss +1 -8
  9. package/date-picker/styles/_index.scss +15 -9
  10. package/dialog/styles/_index.scss +37 -0
  11. package/dropdown/styles/_index.scss +17 -0
  12. package/editor/styles/_index.scss +1 -8
  13. package/event-calendar/styles/_index.scss +2 -6
  14. package/fesm2022/ngwr-affix.mjs +4 -4
  15. package/fesm2022/ngwr-affix.mjs.map +1 -1
  16. package/fesm2022/ngwr-alert.mjs +3 -3
  17. package/fesm2022/ngwr-anchor.mjs +12 -5
  18. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  19. package/fesm2022/ngwr-animations-aurora.mjs +3 -3
  20. package/fesm2022/ngwr-animations-aurora.mjs.map +1 -1
  21. package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
  22. package/fesm2022/ngwr-animations-blur-reveal.mjs.map +1 -1
  23. package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
  24. package/fesm2022/ngwr-animations-click-sparks.mjs.map +1 -1
  25. package/fesm2022/ngwr-animations-confetti.mjs +3 -3
  26. package/fesm2022/ngwr-animations-confetti.mjs.map +1 -1
  27. package/fesm2022/ngwr-animations-decode.mjs +3 -3
  28. package/fesm2022/ngwr-animations-decode.mjs.map +1 -1
  29. package/fesm2022/ngwr-animations-destruct.mjs +3 -3
  30. package/fesm2022/ngwr-animations-destruct.mjs.map +1 -1
  31. package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
  32. package/fesm2022/ngwr-animations-dot-grid.mjs.map +1 -1
  33. package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
  34. package/fesm2022/ngwr-animations-falling-letters.mjs.map +1 -1
  35. package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
  36. package/fesm2022/ngwr-animations-flow-lines.mjs.map +1 -1
  37. package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
  38. package/fesm2022/ngwr-animations-fluid-cursor.mjs.map +1 -1
  39. package/fesm2022/ngwr-animations-glitch.mjs +3 -3
  40. package/fesm2022/ngwr-animations-glitch.mjs.map +1 -1
  41. package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
  42. package/fesm2022/ngwr-animations-glow-border.mjs.map +1 -1
  43. package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
  44. package/fesm2022/ngwr-animations-gradient-flow.mjs.map +1 -1
  45. package/fesm2022/ngwr-animations-marquee.mjs +4 -3
  46. package/fesm2022/ngwr-animations-marquee.mjs.map +1 -1
  47. package/fesm2022/ngwr-animations-orbit.mjs +3 -3
  48. package/fesm2022/ngwr-animations-orbit.mjs.map +1 -1
  49. package/fesm2022/ngwr-animations-reveal.mjs +3 -3
  50. package/fesm2022/ngwr-animations-reveal.mjs.map +1 -1
  51. package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
  52. package/fesm2022/ngwr-animations-ripple-grid.mjs.map +1 -1
  53. package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
  54. package/fesm2022/ngwr-animations-rotate-reveal.mjs.map +1 -1
  55. package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
  56. package/fesm2022/ngwr-animations-shimmer.mjs.map +1 -1
  57. package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
  58. package/fesm2022/ngwr-animations-spotlight.mjs.map +1 -1
  59. package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
  60. package/fesm2022/ngwr-animations-thread-lines.mjs.map +1 -1
  61. package/fesm2022/ngwr-animations-tilt.mjs +23 -16
  62. package/fesm2022/ngwr-animations-tilt.mjs.map +1 -1
  63. package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
  64. package/fesm2022/ngwr-animations-typewriter.mjs.map +1 -1
  65. package/fesm2022/ngwr-avatar.mjs +171 -6
  66. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  67. package/fesm2022/ngwr-back-top.mjs +3 -3
  68. package/fesm2022/ngwr-badge.mjs +6 -6
  69. package/fesm2022/ngwr-breadcrumbs.mjs +47 -13
  70. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  71. package/fesm2022/ngwr-burger.mjs +3 -3
  72. package/fesm2022/ngwr-button.mjs +38 -9
  73. package/fesm2022/ngwr-button.mjs.map +1 -1
  74. package/fesm2022/ngwr-calendar.mjs +3 -3
  75. package/fesm2022/ngwr-card.mjs +9 -9
  76. package/fesm2022/ngwr-carousel.mjs +14 -8
  77. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  78. package/fesm2022/ngwr-cascader.mjs +27 -7
  79. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-bar-chart.mjs +3 -3
  81. package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
  82. package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
  83. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
  84. package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
  85. package/fesm2022/ngwr-charts-chart-legend.mjs +9 -9
  86. package/fesm2022/ngwr-charts-core.mjs +18 -11
  87. package/fesm2022/ngwr-charts-core.mjs.map +1 -1
  88. package/fesm2022/ngwr-charts-donut-chart.mjs +3 -3
  89. package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
  90. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  91. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  92. package/fesm2022/ngwr-charts-line-chart.mjs +3 -3
  93. package/fesm2022/ngwr-charts-meter-group.mjs +7 -5
  94. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  95. package/fesm2022/ngwr-charts-radar-chart.mjs +3 -3
  96. package/fesm2022/ngwr-charts-scatter-chart.mjs +3 -3
  97. package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
  98. package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
  99. package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
  100. package/fesm2022/ngwr-checkbox.mjs +9 -8
  101. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  102. package/fesm2022/ngwr-clipboard.mjs +3 -3
  103. package/fesm2022/ngwr-collapse.mjs +9 -9
  104. package/fesm2022/ngwr-color-picker.mjs +27 -7
  105. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  106. package/fesm2022/ngwr-command-palette.mjs +3 -3
  107. package/fesm2022/ngwr-comment.mjs +7 -6
  108. package/fesm2022/ngwr-comment.mjs.map +1 -1
  109. package/fesm2022/ngwr-compare.mjs +3 -3
  110. package/fesm2022/ngwr-context-menu.mjs +16 -17
  111. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  112. package/fesm2022/ngwr-cookie.mjs +3 -3
  113. package/fesm2022/ngwr-copy-value.mjs +3 -3
  114. package/fesm2022/ngwr-counter.mjs +6 -6
  115. package/fesm2022/ngwr-date-picker-testing.mjs +35 -0
  116. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  117. package/fesm2022/ngwr-date-picker.mjs +151 -54
  118. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  119. package/fesm2022/ngwr-date-stamp.mjs +3 -3
  120. package/fesm2022/ngwr-date.mjs +40 -16
  121. package/fesm2022/ngwr-date.mjs.map +1 -1
  122. package/fesm2022/ngwr-density.mjs +6 -6
  123. package/fesm2022/ngwr-descriptions.mjs +6 -6
  124. package/fesm2022/ngwr-dialog.mjs +35 -24
  125. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  126. package/fesm2022/ngwr-directives.mjs +189 -23
  127. package/fesm2022/ngwr-directives.mjs.map +1 -1
  128. package/fesm2022/ngwr-divider.mjs +3 -3
  129. package/fesm2022/ngwr-drawer.mjs +18 -18
  130. package/fesm2022/ngwr-dropdown-testing.mjs +5 -1
  131. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  132. package/fesm2022/ngwr-dropdown.mjs +59 -16
  133. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  134. package/fesm2022/ngwr-editor.mjs +6 -5
  135. package/fesm2022/ngwr-editor.mjs.map +1 -1
  136. package/fesm2022/ngwr-empty.mjs +3 -3
  137. package/fesm2022/ngwr-event-calendar.mjs +27 -15
  138. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  139. package/fesm2022/ngwr-file-upload-testing.mjs +5 -0
  140. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  141. package/fesm2022/ngwr-file-upload.mjs +68 -13
  142. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  143. package/fesm2022/ngwr-form.mjs +181 -12
  144. package/fesm2022/ngwr-form.mjs.map +1 -1
  145. package/fesm2022/ngwr-graph-testing.mjs +30 -0
  146. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  147. package/fesm2022/ngwr-graph.mjs +100 -11
  148. package/fesm2022/ngwr-graph.mjs.map +1 -1
  149. package/fesm2022/ngwr-hotkey.mjs +6 -6
  150. package/fesm2022/ngwr-i18n-ar.mjs +21 -2
  151. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  152. package/fesm2022/ngwr-i18n-cs.mjs +21 -2
  153. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  154. package/fesm2022/ngwr-i18n-de.mjs +21 -2
  155. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  156. package/fesm2022/ngwr-i18n-en.mjs +21 -2
  157. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  158. package/fesm2022/ngwr-i18n-es.mjs +21 -2
  159. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  160. package/fesm2022/ngwr-i18n-fr.mjs +21 -2
  161. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  162. package/fesm2022/ngwr-i18n-he.mjs +21 -2
  163. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  164. package/fesm2022/ngwr-i18n-hi.mjs +21 -2
  165. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  166. package/fesm2022/ngwr-i18n-id.mjs +21 -2
  167. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  168. package/fesm2022/ngwr-i18n-it.mjs +21 -2
  169. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  170. package/fesm2022/ngwr-i18n-ja.mjs +21 -2
  171. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  172. package/fesm2022/ngwr-i18n-kk.mjs +520 -0
  173. package/fesm2022/ngwr-i18n-kk.mjs.map +1 -0
  174. package/fesm2022/ngwr-i18n-ko.mjs +21 -2
  175. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  176. package/fesm2022/ngwr-i18n-nl.mjs +21 -2
  177. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  178. package/fesm2022/ngwr-i18n-pl.mjs +21 -2
  179. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  180. package/fesm2022/ngwr-i18n-pt.mjs +21 -2
  181. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  182. package/fesm2022/ngwr-i18n-ru.mjs +21 -2
  183. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  184. package/fesm2022/ngwr-i18n-sv.mjs +21 -2
  185. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  186. package/fesm2022/ngwr-i18n-tr.mjs +21 -2
  187. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  188. package/fesm2022/ngwr-i18n-uk.mjs +21 -2
  189. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  190. package/fesm2022/ngwr-i18n-vi.mjs +21 -2
  191. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  192. package/fesm2022/ngwr-i18n-zh-tw.mjs +21 -2
  193. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  194. package/fesm2022/ngwr-i18n-zh.mjs +21 -2
  195. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  196. package/fesm2022/ngwr-i18n.mjs +91 -20
  197. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  198. package/fesm2022/ngwr-icon.mjs +6 -6
  199. package/fesm2022/ngwr-image-cropper.mjs +8 -4
  200. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  201. package/fesm2022/ngwr-input-number.mjs +27 -4
  202. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  203. package/fesm2022/ngwr-input-otp.mjs +5 -5
  204. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  205. package/fesm2022/ngwr-input.mjs +25 -17
  206. package/fesm2022/ngwr-input.mjs.map +1 -1
  207. package/fesm2022/ngwr-keyboard.mjs +3 -3
  208. package/fesm2022/ngwr-knob.mjs +3 -3
  209. package/fesm2022/ngwr-layout.mjs +15 -15
  210. package/fesm2022/ngwr-layout.mjs.map +1 -1
  211. package/fesm2022/ngwr-lightbox.mjs +8 -8
  212. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  213. package/fesm2022/ngwr-list.mjs +9 -9
  214. package/fesm2022/ngwr-list.mjs.map +1 -1
  215. package/fesm2022/ngwr-load-state.mjs +16 -15
  216. package/fesm2022/ngwr-load-state.mjs.map +1 -1
  217. package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -1
  218. package/fesm2022/ngwr-loading-bar.mjs +8 -8
  219. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  220. package/fesm2022/ngwr-mention.mjs +14 -6
  221. package/fesm2022/ngwr-mention.mjs.map +1 -1
  222. package/fesm2022/ngwr-meta.mjs +15 -12
  223. package/fesm2022/ngwr-meta.mjs.map +1 -1
  224. package/fesm2022/ngwr-overlay.mjs +9 -9
  225. package/fesm2022/ngwr-page-header.mjs +24 -3
  226. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  227. package/fesm2022/ngwr-pagination-testing.mjs +3 -0
  228. package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
  229. package/fesm2022/ngwr-pagination.mjs +34 -5
  230. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  231. package/fesm2022/ngwr-pipes.mjs +35 -28
  232. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  233. package/fesm2022/ngwr-platform.mjs +9 -9
  234. package/fesm2022/ngwr-popconfirm.mjs +9 -7
  235. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  236. package/fesm2022/ngwr-popover.mjs +162 -18
  237. package/fesm2022/ngwr-popover.mjs.map +1 -1
  238. package/fesm2022/ngwr-progress.mjs +75 -10
  239. package/fesm2022/ngwr-progress.mjs.map +1 -1
  240. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  241. package/fesm2022/ngwr-qr.mjs +9 -5
  242. package/fesm2022/ngwr-qr.mjs.map +1 -1
  243. package/fesm2022/ngwr-radio.mjs +77 -11
  244. package/fesm2022/ngwr-radio.mjs.map +1 -1
  245. package/fesm2022/ngwr-rating.mjs +3 -3
  246. package/fesm2022/ngwr-resizable.mjs +3 -3
  247. package/fesm2022/ngwr-result.mjs +12 -12
  248. package/fesm2022/ngwr-schema-form.mjs +20 -7
  249. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  250. package/fesm2022/ngwr-scroll.mjs +233 -10
  251. package/fesm2022/ngwr-scroll.mjs.map +1 -1
  252. package/fesm2022/ngwr-segmented.mjs +23 -3
  253. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  254. package/fesm2022/ngwr-select.mjs +106 -26
  255. package/fesm2022/ngwr-select.mjs.map +1 -1
  256. package/fesm2022/ngwr-sidebar-testing.mjs +17 -1
  257. package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -1
  258. package/fesm2022/ngwr-sidebar.mjs +66 -11
  259. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  260. package/fesm2022/ngwr-skeleton.mjs +3 -3
  261. package/fesm2022/ngwr-slider.mjs +3 -3
  262. package/fesm2022/ngwr-sortable-list.mjs +27 -15
  263. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  264. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  265. package/fesm2022/ngwr-spinner.mjs +3 -3
  266. package/fesm2022/ngwr-splitter.mjs +3 -3
  267. package/fesm2022/ngwr-statistic.mjs +9 -9
  268. package/fesm2022/ngwr-stepper.mjs +6 -6
  269. package/fesm2022/ngwr-storage.mjs +4 -4
  270. package/fesm2022/ngwr-storage.mjs.map +1 -1
  271. package/fesm2022/ngwr-switch.mjs +5 -5
  272. package/fesm2022/ngwr-switch.mjs.map +1 -1
  273. package/fesm2022/ngwr-table-router.mjs +89 -0
  274. package/fesm2022/ngwr-table-router.mjs.map +1 -0
  275. package/fesm2022/ngwr-table-testing.mjs +5 -0
  276. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  277. package/fesm2022/ngwr-table.mjs +307 -47
  278. package/fesm2022/ngwr-table.mjs.map +1 -1
  279. package/fesm2022/ngwr-tabs-router.mjs +9 -5
  280. package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
  281. package/fesm2022/ngwr-tabs-testing.mjs +8 -1
  282. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  283. package/fesm2022/ngwr-tabs.mjs +60 -10
  284. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  285. package/fesm2022/ngwr-textarea.mjs +5 -5
  286. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  287. package/fesm2022/ngwr-theme.mjs +3 -3
  288. package/fesm2022/ngwr-timeline.mjs +6 -6
  289. package/fesm2022/ngwr-toast.mjs +43 -15
  290. package/fesm2022/ngwr-toast.mjs.map +1 -1
  291. package/fesm2022/ngwr-toolbar.mjs +3 -3
  292. package/fesm2022/ngwr-tour.mjs +9 -8
  293. package/fesm2022/ngwr-tour.mjs.map +1 -1
  294. package/fesm2022/ngwr-transfer.mjs +4 -3
  295. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  296. package/fesm2022/ngwr-tree.mjs +3 -3
  297. package/fesm2022/ngwr-typography.mjs +23 -3
  298. package/fesm2022/ngwr-typography.mjs.map +1 -1
  299. package/fesm2022/ngwr-utils-router.mjs +3 -3
  300. package/fesm2022/ngwr-utils-router.mjs.map +1 -1
  301. package/fesm2022/ngwr-utils.mjs +74 -4
  302. package/fesm2022/ngwr-utils.mjs.map +1 -1
  303. package/fesm2022/ngwr-validators.mjs +33 -1
  304. package/fesm2022/ngwr-validators.mjs.map +1 -1
  305. package/fesm2022/ngwr-version.mjs +1 -1
  306. package/fesm2022/ngwr-version.mjs.map +1 -1
  307. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  308. package/fesm2022/ngwr-window.mjs +18 -13
  309. package/fesm2022/ngwr-window.mjs.map +1 -1
  310. package/file-upload/styles/_index.scss +16 -0
  311. package/form/styles/_index.scss +37 -0
  312. package/graph/styles/_index.scss +49 -9
  313. package/i18n/ar.json +19 -2
  314. package/i18n/cs.json +19 -2
  315. package/i18n/de.json +19 -2
  316. package/i18n/en.json +19 -2
  317. package/i18n/es.json +19 -2
  318. package/i18n/fr.json +19 -2
  319. package/i18n/he.json +19 -2
  320. package/i18n/hi.json +19 -2
  321. package/i18n/id.json +19 -2
  322. package/i18n/it.json +19 -2
  323. package/i18n/ja.json +19 -2
  324. package/i18n/kk.json +567 -0
  325. package/i18n/ko.json +19 -2
  326. package/i18n/nl.json +19 -2
  327. package/i18n/pl.json +19 -2
  328. package/i18n/pt.json +19 -2
  329. package/i18n/ru.json +19 -2
  330. package/i18n/sv.json +19 -2
  331. package/i18n/tr.json +19 -2
  332. package/i18n/uk.json +19 -2
  333. package/i18n/vi.json +19 -2
  334. package/i18n/zh-TW.json +19 -2
  335. package/i18n/zh.json +19 -2
  336. package/image-cropper/styles/_index.scss +1 -9
  337. package/input-number/styles/_index.scss +7 -0
  338. package/layout/styles/_index.scss +13 -1
  339. package/llms-full.txt +37 -26
  340. package/llms.txt +4 -1
  341. package/loading-bar/styles/_rules.scss +6 -0
  342. package/package.json +16 -8
  343. package/page-header/styles/_index.scss +18 -0
  344. package/pagination/styles/_index.scss +6 -0
  345. package/popover/styles/_index.scss +9 -0
  346. package/progress/styles/_index.scss +64 -0
  347. package/schematics/use/symbol-map.json +7 -0
  348. package/segmented/styles/_index.scss +7 -0
  349. package/select/styles/_index.scss +7 -0
  350. package/sidebar/styles/_index.scss +64 -6
  351. package/skills/ngwr/SKILL.md +7 -6
  352. package/skills/ngwr/references/catalog.md +7 -5
  353. package/sortable-list/styles/_rules.scss +1 -9
  354. package/speed-dial/styles/_index.scss +6 -0
  355. package/stepper/styles/_index.scss +1 -9
  356. package/table/styles/_index.scss +168 -30
  357. package/tabs/styles/_index.scss +9 -0
  358. package/theme/_index.scss +12 -1
  359. package/theme/styles/_colors.scss +11 -0
  360. package/theme/styles/_contrast.scss +6 -0
  361. package/theme/styles/_focus.scss +3 -1
  362. package/theme/styles/_index.scss +1 -0
  363. package/theme/styles/_mixins.scss +45 -0
  364. package/theme/styles/_print.scss +17 -0
  365. package/toast/styles/_index.scss +7 -0
  366. package/tour/styles/_index.scss +9 -0
  367. package/tree/styles/_index.scss +1 -9
  368. package/types/ngwr-anchor.d.ts +3 -0
  369. package/types/ngwr-animations-aurora.d.ts +6 -0
  370. package/types/ngwr-animations-blur-reveal.d.ts +6 -0
  371. package/types/ngwr-animations-click-sparks.d.ts +6 -0
  372. package/types/ngwr-animations-confetti.d.ts +6 -0
  373. package/types/ngwr-animations-decode.d.ts +6 -0
  374. package/types/ngwr-animations-destruct.d.ts +6 -0
  375. package/types/ngwr-animations-dot-grid.d.ts +6 -0
  376. package/types/ngwr-animations-falling-letters.d.ts +6 -0
  377. package/types/ngwr-animations-flow-lines.d.ts +6 -0
  378. package/types/ngwr-animations-fluid-cursor.d.ts +6 -0
  379. package/types/ngwr-animations-glitch.d.ts +6 -0
  380. package/types/ngwr-animations-glow-border.d.ts +6 -0
  381. package/types/ngwr-animations-gradient-flow.d.ts +6 -0
  382. package/types/ngwr-animations-marquee.d.ts +6 -0
  383. package/types/ngwr-animations-orbit.d.ts +6 -0
  384. package/types/ngwr-animations-reveal.d.ts +6 -0
  385. package/types/ngwr-animations-ripple-grid.d.ts +6 -0
  386. package/types/ngwr-animations-rotate-reveal.d.ts +6 -0
  387. package/types/ngwr-animations-shimmer.d.ts +6 -0
  388. package/types/ngwr-animations-spotlight.d.ts +6 -0
  389. package/types/ngwr-animations-thread-lines.d.ts +6 -0
  390. package/types/ngwr-animations-tilt.d.ts +10 -0
  391. package/types/ngwr-animations-typewriter.d.ts +6 -0
  392. package/types/ngwr-avatar.d.ts +39 -0
  393. package/types/ngwr-breadcrumbs.d.ts +25 -0
  394. package/types/ngwr-button.d.ts +35 -3
  395. package/types/ngwr-carousel.d.ts +2 -0
  396. package/types/ngwr-cascader.d.ts +7 -0
  397. package/types/ngwr-charts-core.d.ts +16 -0
  398. package/types/ngwr-charts-meter-group.d.ts +2 -0
  399. package/types/ngwr-checkbox.d.ts +1 -0
  400. package/types/ngwr-color-picker.d.ts +1 -0
  401. package/types/ngwr-context-menu.d.ts +1 -1
  402. package/types/ngwr-date-picker-testing.d.ts +22 -0
  403. package/types/ngwr-date-picker.d.ts +97 -17
  404. package/types/ngwr-date.d.ts +51 -0
  405. package/types/ngwr-dialog.d.ts +39 -8
  406. package/types/ngwr-directives.d.ts +57 -4
  407. package/types/ngwr-drawer.d.ts +1 -1
  408. package/types/ngwr-dropdown-testing.d.ts +8 -1
  409. package/types/ngwr-dropdown.d.ts +30 -1
  410. package/types/ngwr-event-calendar.d.ts +4 -0
  411. package/types/ngwr-file-upload-testing.d.ts +10 -0
  412. package/types/ngwr-file-upload.d.ts +55 -1
  413. package/types/ngwr-form.d.ts +87 -1
  414. package/types/ngwr-graph-testing.d.ts +28 -1
  415. package/types/ngwr-graph.d.ts +53 -3
  416. package/types/ngwr-i18n-kk.d.ts +3 -0
  417. package/types/ngwr-i18n.d.ts +65 -5
  418. package/types/ngwr-image-cropper.d.ts +6 -0
  419. package/types/ngwr-input-number.d.ts +8 -0
  420. package/types/ngwr-input.d.ts +7 -0
  421. package/types/ngwr-layout.d.ts +1 -1
  422. package/types/ngwr-loading-bar-router.d.ts +6 -0
  423. package/types/ngwr-page-header.d.ts +23 -1
  424. package/types/ngwr-pagination-testing.d.ts +8 -0
  425. package/types/ngwr-pagination.d.ts +16 -0
  426. package/types/ngwr-popconfirm.d.ts +1 -1
  427. package/types/ngwr-popover.d.ts +67 -4
  428. package/types/ngwr-progress.d.ts +63 -1
  429. package/types/ngwr-radio.d.ts +47 -5
  430. package/types/ngwr-scroll.d.ts +86 -0
  431. package/types/ngwr-segmented.d.ts +7 -0
  432. package/types/ngwr-select.d.ts +88 -25
  433. package/types/ngwr-sidebar-testing.d.ts +21 -7
  434. package/types/ngwr-sidebar.d.ts +66 -4
  435. package/types/ngwr-sortable-list.d.ts +20 -7
  436. package/types/ngwr-table-router.d.ts +49 -0
  437. package/types/ngwr-table-testing.d.ts +7 -0
  438. package/types/ngwr-table.d.ts +241 -10
  439. package/types/ngwr-tabs-router.d.ts +7 -1
  440. package/types/ngwr-tabs-testing.d.ts +5 -1
  441. package/types/ngwr-tabs.d.ts +34 -1
  442. package/types/ngwr-toast.d.ts +11 -0
  443. package/types/ngwr-tour.d.ts +0 -1
  444. package/types/ngwr-typography.d.ts +7 -0
  445. package/types/ngwr-utils-router.d.ts +6 -0
  446. package/types/ngwr-utils.d.ts +69 -2
  447. package/types/ngwr-validators.d.ts +49 -1
  448. package/types/ngwr-version.d.ts +1 -1
  449. package/typography/styles/_index.scss +4 -0
  450. package/window/styles/_index.scss +1 -9
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-page-header.mjs","names":[],"sources":["../../../projects/lib/page-header/page-header.ts","../../../projects/lib/page-header/page-header.html"],"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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, input } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Top-of-page heading block. Four named slots via attribute selectors:\n * `[wrPageHeaderBreadcrumbs]` (top row), `[wrPageHeaderActions]` (right\n * side), `[wrPageHeaderExtra]` (row of tags / metadata) and\n * `[wrPageHeaderFilters]` (a last row of controls, full width, wrapping; present\n * only when projected). Title + subtitle come from inputs.\n *\n * `compact` puts the breadcrumbs beside the title on one line and the subtitle\n * after it, with a smaller title. The line wraps when there is no room: long\n * crumbs wrap inside their own box, and the title drops below them once less\n * than 16rem is left beside them. `responsive` works the same with and without\n * it.\n *\n * `sticky` keeps the header in view while the page scrolls: CSS\n * `position: sticky` at `--wr-page-header-sticky-top` (default `0`; set it to\n * your app bar's height to sit under it), `z-index` from\n * `--wr-page-header-sticky-z`, an opaque `--wr-page-header-sticky-bg`. Sticky\n * pins against the nearest ancestor that scrolls, and an ancestor with\n * `overflow: hidden` (or `auto`, `scroll`, `clip` on either axis) is that\n * ancestor even when it never scrolls: the header then sticks inside a box that\n * does not move, which reads as sticky doing nothing. Keep every ancestor between\n * the header and the scroller at `overflow: visible`.\n *\n * A sticky header covers the top of the scroller, and the browser scrolls a\n * newly focused element only until it is inside the scrollport, so a control\n * tabbed to from above can land under the header. The component cannot set\n * `scroll-padding` on a scroller it does not own: set\n * `scroll-padding-block-start` on the scroller (`html` for the page) to the\n * header's height plus `--wr-page-header-sticky-top`, and focus, anchors and\n * `scrollIntoView()` all stop short of it.\n *\n * A bare `<div>` wrapper in the actions or the filters slot, one with no `class`\n * and no `style`, is laid out as a wrapping row with the region's own gap, so\n * the controls inside it are spaced exactly like controls projected one by one.\n * The gap follows `--wr-density-gap`. Give the wrapper a class or a style and\n * its layout is yours: the header sets nothing on it. The extra row spaces its\n * own children and leaves a wrapper alone, since that is where metadata prose\n * goes, so project tags through an `<ng-container>` as below.\n *\n * @example\n * ```html\n * <wr-page-header title=\"Settings\" subtitle=\"Manage your workspace\" compact sticky>\n * <nav wrPageHeaderBreadcrumbs>…</nav>\n * <div wrPageHeaderActions>\n * <button wr-btn>Invite</button>\n * <button wr-btn color=\"primary\">Save</button>\n * </div>\n * <ng-container wrPageHeaderExtra>\n * <wr-tag>v2.4</wr-tag>\n * <wr-tag color=\"success\">Stable</wr-tag>\n * </ng-container>\n * <div wrPageHeaderFilters>\n * <wr-select placeholder=\"Status\" />\n * <wr-input placeholder=\"Search\" />\n * </div>\n * </wr-page-header>\n * ```\n *\n * @see https://ngwr.dev/reference/components/page-header\n */\n@Component({\n selector: 'wr-page-header',\n templateUrl: './page-header.html',\n encapsulation: ViewEncapsulation.None,\n // See `WrAlert`: a static `title=` feeds the input AND lands on the host,\n // where the browser draws it as a tooltip over the whole component.\n host: {\n class: 'wr-page-header',\n '[class.wr-page-header--responsive]': 'responsive()',\n '[class.wr-page-header--compact]': 'compact()',\n '[class.wr-page-header--sticky]': 'sticky()',\n '[attr.title]': 'null',\n },\n})\nexport class WrPageHeader {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('page-header');\n }\n\n /** Primary title shown as an h1. */\n readonly title = input<string>('');\n\n /** Secondary line below the title. */\n readonly subtitle = input<string>('');\n\n /**\n * Stack the title and actions vertically when the header's own box is too\n * narrow to sit them side by side (a container query on its own width, not\n * the viewport — so it adapts inside a narrow column or split pane).\n * @default false\n */\n readonly responsive = input(false, { transform: coerceBooleanProperty });\n\n /**\n * One-line head: the breadcrumbs beside the title instead of above it, the\n * subtitle after the title, a smaller title. Wraps when there is no room.\n * @default false\n */\n readonly compact = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Keep the header in view while the page scrolls (`position: sticky` at\n * `--wr-page-header-sticky-top`, under `--wr-page-header-sticky-z`).\n * @default false\n */\n readonly sticky = input(false, { transform: coerceBooleanProperty });\n}\n","<div class=\"wr-page-header__breadcrumbs\">\n <ng-content select=\"[wrPageHeaderBreadcrumbs]\" />\n</div>\n\n<div class=\"wr-page-header__main\">\n <div class=\"wr-page-header__heading\">\n @if (title()) {\n <h1 class=\"wr-page-header__title\">{{ title() }}</h1>\n }\n @if (subtitle()) {\n <p class=\"wr-page-header__subtitle\">{{ subtitle() }}</p>\n }\n </div>\n <div class=\"wr-page-header__actions\">\n <ng-content select=\"[wrPageHeaderActions]\" />\n </div>\n</div>\n\n<div class=\"wr-page-header__extra\">\n <ng-content select=\"[wrPageHeaderExtra]\" />\n</div>\n\n<div class=\"wr-page-header__filters\">\n <ng-content select=\"[wrPageHeaderFilters]\" />\n</div>\n"],"mappings":";;;;;;;;;;AAsFA,IAAa,eAAb,MAAa,aAAY;CACvB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,aAAa;CAChF;CAGS,QAAQ,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAGzB,WAAW,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAQ5B,aAAa,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,aAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CAO5D,UAAU,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CAOzD,SAAS,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,SAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CA/BtD,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAY,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAZ,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAY,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,YAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,SAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,QAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA;GAAA,YAAA;IAAA,oCAAA;IAAA,iCAAA;IAAA,gCAAA;IAAA,cAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UCtFzB;EAyBA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AD6Da,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EAdxB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAgB,eAEX,kBAAkB;GAAI,MAG/B;IACJ,OAAO;IACP,sCAAsC;IACtC,mCAAmC;IACnC,kCAAkC;IAClC,gBAAgB;GACjB;GAAA,UAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"ngwr-page-header.mjs","names":[],"sources":["../../../projects/lib/page-header/page-header.ts","../../../projects/lib/page-header/page-header.html"],"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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, input } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Top-of-page heading block. Four named slots via attribute selectors:\n * `[wrPageHeaderBreadcrumbs]` (top row), `[wrPageHeaderActions]` (right\n * side), `[wrPageHeaderExtra]` (row of tags / metadata) and\n * `[wrPageHeaderFilters]` (a last row of controls, full width, wrapping; present\n * only when projected). Title + subtitle come from inputs.\n *\n * `compact` puts the breadcrumbs beside the title on one line and the subtitle\n * after it, with a smaller title. The line wraps when there is no room: long\n * crumbs wrap inside their own box, and the title drops below them once less\n * than 16rem is left beside them. `responsive` works the same with and without\n * it.\n *\n * `sticky` keeps the header in view while the page scrolls: CSS\n * `position: sticky` at `--wr-page-header-sticky-top` (default `0`; set it to\n * your app bar's height to sit under it), `z-index` from\n * `--wr-page-header-sticky-z`, an opaque `--wr-page-header-sticky-bg`. Sticky\n * pins against the nearest ancestor that scrolls, and an ancestor with\n * `overflow: hidden` (or `auto`, `scroll`, `clip` on either axis) is that\n * ancestor even when it never scrolls: the header then sticks inside a box that\n * does not move, which reads as sticky doing nothing. Keep every ancestor between\n * the header and the scroller at `overflow: visible`.\n *\n * A sticky header covers the top of the scroller, and the browser scrolls a\n * newly focused element only until it is inside the scrollport, so a control\n * tabbed to from above can land under the header. The component cannot set\n * `scroll-padding` on a scroller it does not own: set\n * `scroll-padding-block-start` on the scroller (`html` for the page) to the\n * header's height plus `--wr-page-header-sticky-top`, and focus, anchors and\n * `scrollIntoView()` all stop short of it.\n *\n * The filters row is inside the header's own box, so under `sticky` it stays in\n * view with the title: it is the place for a view switch or tabs as well.\n *\n * `bleed` carries the header over the padding of the box it tops, to the top and\n * both side edges, and pads it by as much, so a sticky header's background and\n * border run edge to edge. The amount is `--wr-page-header-bleed`, which reads\n * `--wr-layout-content-padding`: inside `wr-layout-content` it follows the\n * content's padding, and anywhere else it is zero until set. Make the header\n * the first thing in that box.\n *\n * A bare `<div>` wrapper in the actions or the filters slot, one with no `class`\n * and no `style`, is laid out as a wrapping row with the region's own gap, so\n * the controls inside it are spaced exactly like controls projected one by one.\n * The gap follows `--wr-density-gap`. Give the wrapper a class or a style and\n * its layout is yours: the header sets nothing on it. The extra row spaces its\n * own children and leaves a wrapper alone, since that is where metadata prose\n * goes, so project tags through an `<ng-container>` as below.\n *\n * @example\n * ```html\n * <wr-page-header title=\"Settings\" subtitle=\"Manage your workspace\" compact sticky bleed>\n * <nav wrPageHeaderBreadcrumbs>…</nav>\n * <div wrPageHeaderActions>\n * <button wr-btn>Invite</button>\n * <button wr-btn color=\"primary\">Save</button>\n * </div>\n * <ng-container wrPageHeaderExtra>\n * <wr-tag>v2.4</wr-tag>\n * <wr-tag color=\"success\">Stable</wr-tag>\n * </ng-container>\n * <div wrPageHeaderFilters>\n * <wr-select placeholder=\"Status\" />\n * <wr-input placeholder=\"Search\" />\n * </div>\n * </wr-page-header>\n * ```\n *\n * @see https://ngwr.dev/reference/components/page-header\n */\n@Component({\n selector: 'wr-page-header',\n templateUrl: './page-header.html',\n encapsulation: ViewEncapsulation.None,\n // See `WrAlert`: a static `title=` feeds the input AND lands on the host,\n // where the browser draws it as a tooltip over the whole component.\n host: {\n class: 'wr-page-header',\n '[class.wr-page-header--responsive]': 'responsive()',\n '[class.wr-page-header--compact]': 'compact()',\n '[class.wr-page-header--sticky]': 'sticky()',\n '[class.wr-page-header--bleed]': 'bleed()',\n '[attr.title]': 'null',\n },\n})\nexport class WrPageHeader {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('page-header');\n }\n\n /** Primary title shown as an h1. */\n readonly title = input<string>('');\n\n /** Secondary line below the title. */\n readonly subtitle = input<string>('');\n\n /**\n * Stack the title and actions vertically when the header's own box is too\n * narrow to sit them side by side (a container query on its own width, not\n * the viewport — so it adapts inside a narrow column or split pane).\n * @default false\n */\n readonly responsive = input(false, { transform: coerceBooleanProperty });\n\n /**\n * One-line head: the breadcrumbs beside the title instead of above it, the\n * subtitle after the title, a smaller title. Wraps when there is no room.\n * @default false\n */\n readonly compact = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Keep the header in view while the page scrolls (`position: sticky` at\n * `--wr-page-header-sticky-top`, under `--wr-page-header-sticky-z`).\n * @default false\n */\n readonly sticky = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Run over the padding of the box the header tops, to the top and both side\n * edges, by `--wr-page-header-bleed` (the content padding inside\n * `wr-layout-content`, zero elsewhere until set).\n * @default false\n */\n readonly bleed = input(false, { transform: coerceBooleanProperty });\n}\n","<div class=\"wr-page-header__breadcrumbs\">\n <ng-content select=\"[wrPageHeaderBreadcrumbs]\" />\n</div>\n\n<div class=\"wr-page-header__main\">\n <div class=\"wr-page-header__heading\">\n @if (title()) {\n <h1 class=\"wr-page-header__title\">{{ title() }}</h1>\n }\n @if (subtitle()) {\n <p class=\"wr-page-header__subtitle\">{{ subtitle() }}</p>\n }\n </div>\n <div class=\"wr-page-header__actions\">\n <ng-content select=\"[wrPageHeaderActions]\" />\n </div>\n</div>\n\n<div class=\"wr-page-header__extra\">\n <ng-content select=\"[wrPageHeaderExtra]\" />\n</div>\n\n<div class=\"wr-page-header__filters\">\n <ng-content select=\"[wrPageHeaderFilters]\" />\n</div>\n"],"mappings":";;;;;;;;;;AAiGA,IAAa,eAAb,MAAa,aAAY;CACvB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,aAAa;CAChF;CAGS,QAAQ,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAGzB,WAAW,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAQ5B,aAAa,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,aAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CAO5D,UAAU,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CAOzD,SAAS,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,SAAA,+BAAA,CAAA;EAAI,WAAW;CA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,kCAAkC;IAClC,iCAAiC;IACjC,gBAAgB;GACjB;GAAA,UAAA;EAAA,CAAA"}
@@ -34,6 +34,9 @@ var WrPaginationHarness = class WrPaginationHarness extends ComponentHarness {
34
34
  async isDisabled() {
35
35
  return (await this.host()).hasClass("wr-pagination--disabled");
36
36
  }
37
+ async isHidden() {
38
+ return (await this.host()).hasClass("wr-pagination--hidden");
39
+ }
37
40
  async getStrip() {
38
41
  const slots = await this.stripSlots();
39
42
  return Promise.all(slots.map(async (slot) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-pagination-testing.mjs","names":[],"sources":["../../../projects/lib/pagination/testing/wr-pagination-harness.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 { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport { WrButtonHarness } from 'ngwr/button/testing';\nimport type { WrPaginationSize } from 'ngwr/pagination';\nimport { WrSelectHarness } from 'ngwr/select/testing';\n\nimport type { WrPaginationHarnessFilters } from './types';\n\n/**\n * Test harness for `<wr-pagination>` — the numbered strip, its two step controls,\n * the total label and the page-size changer.\n *\n * The strip is not the page list: it is a WINDOW over it, at most seven pages wide,\n * with an `…` standing in for every page it skipped. So \"which pages can I click\"\n * and \"how many pages are there\" are different questions and this harness keeps\n * them apart —\n * {@link getPages} answers the first, {@link getTotalPages} the second, and\n * {@link getStrip} shows the gaps for what they are. A gap is a `<span>`, not a\n * control; counting the strip's children as pages is the mistake this API exists to\n * make impossible.\n *\n * **Which page is current has two answers, and this reads the ARIA one.** The\n * current cell is also PAINTED — the template binds\n * `[color]=\"isCurrent(page) ? 'primary' : null\"`, so `.wr-btn--primary` sits on it\n * too. But colour is a theming decision, while `aria-current=\"page\"` is the\n * navigation contract: it is what a screen-reader user hears, what the\n * component's own spec pins, and the only one of the two that still means\n * \"you are here\" after a restyle. A harness that read the class would be reporting\n * on the paint.\n *\n * **No roving tab stop to disambiguate.** Every cell is a `<wr-btn>` ELEMENT with\n * its own tab stop (`tabindex=\"0\"`, dropped only while the control is off), so the\n * pager has no separate \"focused\" item that could drift from the current page —\n * unlike a tab strip or a radio group, there is one active state here and\n * {@link getCurrentPage} is it.\n *\n * Composed rather than re-queried: the cells and step controls are driven through\n * {@link WrButtonHarness}, which already knows how a `<wr-btn>` says it is off —\n * both the `disabled` attribute (written on every shape, though inert on a custom\n * element) and `aria-disabled`, in that order — and the size changer through\n * {@link WrSelectHarness}, whose panel is a portal in the overlay container and\n * nowhere inside the pager.\n *\n * jsdom notes: every method here is a class / attribute read or a no-arg click, so\n * none of it needs layout. Two things are therefore invisible in a unit test and\n * deliberately absent from this API — the responsive collapse, which is a container\n * query ({@link isResponsive} reports only that it is ALLOWED), and the compact\n * `‹ 3 / 10 ›` pager it swaps in, which duplicates {@link getCurrentPage} and\n * {@link getTotalPages} and which a real browser would read as empty text while\n * CSS keeps it hidden.\n *\n * @example\n * ```ts\n * const pager = await loader.getHarness(WrPaginationHarness);\n *\n * expect(await pager.getPages()).toEqual([1, 2, 3, 4, 5, 10]);\n * await pager.goToPage(3);\n * expect(await pager.getCurrentPage()).toBe(3);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrPaginationHarness extends ComponentHarness {\n static hostSelector = 'wr-pagination';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrPaginationHarnessFilters = {}): HarnessPredicate<WrPaginationHarness> {\n return new HarnessPredicate(WrPaginationHarness, options)\n .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label))\n .addOption('page', options.page, async (harness, page) => {\n // The nullable read on purpose: the throwing getter would reject the whole\n // query over one pager that announces no current page, taking its\n // well-behaved neighbours down with it.\n return (await harness.currentPageOrNull()) === page;\n })\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /** The numbered cells, in DOM order — ascending, and never a gap. */\n private readonly pageCells = this.locatorForAll(WrButtonHarness.with({ selector: '.wr-pagination__page' }));\n\n /**\n * The two controls bracketing the strip: previous, then next.\n *\n * Located by POSITION, not by their labels. `prevLabel` / `nextLabel` are inputs\n * and both fall back to the `pagination.prev` / `pagination.next` catalog entries,\n * so an English `aria-label` match works right up until someone ships a locale —\n * whereas the nav's shape (one step control, the strip, one step control) is\n * structural. `:not(.wr-pagination__page)` is what keeps the cells out of it.\n */\n private readonly stepControls = this.locatorForAll(\n WrButtonHarness.with({ selector: '.wr-pagination__nav > wr-btn:not(.wr-pagination__page)' })\n );\n\n /** Both kinds of strip slot, in DOM order — cells and the gaps between them. */\n private readonly stripSlots = this.locatorForAll('.wr-pagination__page, .wr-pagination__ellipsis');\n\n private readonly totalLabel = this.locatorForOptional('.wr-pagination__total');\n\n private readonly sizeChanger = this.locatorForOptional(WrSelectHarness.with({ selector: '.wr-pagination__size' }));\n\n /**\n * The accessible name of the `role=\"navigation\"` landmark.\n *\n * `''` only if the landmark lost its name, which is a bug rather than a state: a\n * page with two unnamed pagers gives a screen-reader user two identical\n * \"navigation\" landmarks.\n */\n async getLabel(): Promise<string> {\n return (await (await this.host()).getAttribute('aria-label')) ?? '';\n }\n\n /**\n * The size the pager RENDERS at, from its host modifier.\n *\n * The modifier is always emitted — `sm` included — so the fall-through below is\n * only ever reached for the default, and a size the strip is not wearing cannot\n * come back from here. The page-size changer is not covered by this value: it is\n * a bare `<wr-select>` at its own default size.\n */\n async getSize(): Promise<WrPaginationSize> {\n const host = await this.host();\n if (await host.hasClass('wr-pagination--lg')) return 'lg';\n if (await host.hasClass('wr-pagination--md')) return 'md';\n return 'sm';\n }\n\n /**\n * Whether the pager is ALLOWED to collapse into its compact pager.\n *\n * Whether it HAS collapsed is a container query on the control's own box, and a\n * unit test has no layout for one to answer — assert this input in jsdom and the\n * reflow itself in a real browser.\n */\n async isResponsive(): Promise<boolean> {\n return (await this.host()).hasClass('wr-pagination--responsive');\n }\n\n /**\n * Whether the whole control refuses interaction.\n *\n * Read from the host modifier, because a `role=\"navigation\"` landmark has no ARIA\n * disabled state to prefer — the per-control answer lives on the buttons\n * themselves (`disabled` plus `aria-disabled` on each), which is what\n * {@link isPreviousDisabled} and {@link isNextDisabled} read.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-pagination--disabled');\n }\n\n /**\n * The whole strip in DOM order: a `number` for every page cell, and the gap\n * marker's own text (`…`) for every ellipsis.\n *\n * The marker is read from the DOM rather than compared against a literal, so a\n * component that changes what it draws in a gap changes this too instead of\n * quietly reporting a page.\n */\n async getStrip(): Promise<(number | string)[]> {\n const slots = await this.stripSlots();\n return Promise.all(\n slots.map(async slot => {\n const text = (await slot.text()).trim();\n return (await slot.hasClass('wr-pagination__ellipsis')) ? text : Number(text);\n })\n );\n }\n\n /**\n * The pages that can be clicked right now, ascending. Gaps are not pages and are\n * not here — `[1, 8, 9, 10, 11, 12, 20]` for a twenty-page list sitting on 10.\n */\n async getPages(): Promise<number[]> {\n const cells = await this.pageCells();\n return Promise.all(cells.map(async cell => Number(await cell.getText())));\n }\n\n /**\n * How many pages there are — not how many are on the strip.\n *\n * Taken from the LAST cell, which the window always pins to the final page (the\n * first is pinned the same way), so this survives the gap that usually precedes\n * it. Deliberately not read from the compact `3 / 10` pager: that span is\n * CSS-hidden outside responsive mode, so a browser-based harness environment\n * would read it as empty.\n */\n async getTotalPages(): Promise<number> {\n const pages = await this.getPages();\n const last = pages.at(-1);\n if (last === undefined) {\n throw new Error(\n 'WrPaginationHarness.getTotalPages(): the strip has no page cells at all. The pager offers page ' +\n '1 even for an empty list, so this is a rendering failure rather than an empty state.'\n );\n }\n return last;\n }\n\n /**\n * The page the pager announces as current, from `aria-current=\"page\"`.\n *\n * Throws when no cell claims it. The window always keeps the current page on the\n * strip, so getting here means `page` is not one of the pages at all. The\n * component clamps a host write into `1..totalPages`, which leaves one survivor:\n * a fractional page, which is in range and matches no cell — and which leaves\n * every cell looking equally inactive to an assistive tech user.\n */\n async getCurrentPage(): Promise<number> {\n const page = await this.currentPageOrNull();\n if (page === null) {\n throw new Error(\n 'WrPaginationHarness.getCurrentPage(): no cell carries `aria-current=\"page\"`. The visible window ' +\n `always includes the current page, so \\`page\\` is not a whole number — the component ` +\n `clamps it into 1..${await this.getTotalPages()} but does not round it.`\n );\n }\n return page;\n }\n\n /**\n * Click the cell for a page.\n *\n * Throws when that page is not on the strip — a seven-slot window over twenty\n * pages simply has no cell for page 15, and a silent no-op there reads as\n * \"navigation is broken\" three assertions later. Step with {@link next} /\n * {@link previous}, or move the host's own `page` model.\n *\n * A disabled pager is still clicked; the component's own guard is what refuses\n * the move, so assert the page rather than assume it. Clicking the CURRENT page\n * is a no-op by the same guard.\n */\n async goToPage(page: number): Promise<void> {\n for (const cell of await this.pageCells()) {\n if (Number(await cell.getText()) === page) {\n await cell.click();\n return;\n }\n }\n\n throw new Error(\n `WrPaginationHarness.goToPage(): page ${page} is not on the strip, which offers ` +\n `${(await this.getStrip()).join(' ')}. The window shows at most seven pages — step with next() / ` +\n 'previous(), or set the page on the host.'\n );\n }\n\n /**\n * Jump to page 1.\n *\n * There is no dedicated first / last control in this component; the window pins\n * the first and last page to the ends of the strip instead, so these two click\n * cells like any other page.\n */\n async goToFirst(): Promise<void> {\n return this.goToPage(1);\n }\n\n /** Jump to the last page — the trailing cell, not the last one before a gap. */\n async goToLast(): Promise<void> {\n return this.goToPage(await this.getTotalPages());\n }\n\n /**\n * Click the next-page control.\n *\n * Disabled on the last page, and a disabled `<wr-btn>` is still clicked here (see\n * {@link goToPage}) — {@link isNextDisabled} is the question, this is the action.\n */\n async next(): Promise<void> {\n return (await this.stepControl('next')).click();\n }\n\n /** Click the previous-page control. Disabled on the first page. */\n async previous(): Promise<void> {\n return (await this.stepControl('previous')).click();\n }\n\n /**\n * Whether the next-page control refuses the move — true on the last page, and\n * true for every control while the pager is disabled.\n *\n * Answered by {@link WrButtonHarness}, which reads the `disabled` attribute first\n * and `aria-disabled` second. A `<wr-btn>` element carries both: the attribute is\n * inert on anything but a real `<button>`, which is why the component adds the\n * ARIA state as well — so this is the accessible answer whichever branch supplies\n * it.\n */\n async isNextDisabled(): Promise<boolean> {\n return (await this.stepControl('next')).isDisabled();\n }\n\n /** Whether the previous-page control refuses the move — true on the first page. */\n async isPreviousDisabled(): Promise<boolean> {\n return (await this.stepControl('previous')).isDisabled();\n }\n\n /** Whether the pager shows its \"X–Y of Z\" label (the `showTotal` input). */\n async hasTotal(): Promise<boolean> {\n return (await this.totalLabel()) !== null;\n }\n\n /**\n * The total label exactly as rendered, e.g. `1–10 of 95`.\n *\n * The WHOLE string is one catalog entry (`pagination.range`) and the three\n * numbers in it are formatted per `LOCALE_ID`, so a spec asserting the literal\n * owns both the copy and the locale it asserts under. Note the range separator\n * is an en dash, not the ASCII hyphen this used to print.\n *\n * Throws when the label is not rendered, which is a `showTotal` that was never\n * set rather than a total of zero (a zero total still renders `0–0 of 0`).\n */\n async getTotalText(): Promise<string> {\n const label = await this.totalLabel();\n if (!label) {\n throw new Error(\n 'WrPaginationHarness.getTotalText(): this pager renders no total label — set `showTotal`. A ' +\n 'total of 0 still renders one.'\n );\n }\n return label.text();\n }\n\n /** Whether the pager renders its page-size changer (the `showSizeChanger` input). */\n async hasPageSizeChanger(): Promise<boolean> {\n return (await this.sizeChanger()) !== null;\n }\n\n /**\n * The page-size changer as a {@link WrSelectHarness} — for anything this harness\n * does not wrap: the offered labels, the open state, keyboard driving.\n *\n * Composed rather than re-queried on purpose: the changer is a real\n * `<wr-select>`, its options live in the overlay container rather than inside the\n * pager, and the select harness is the thing that already knows how to scope them\n * to their own trigger.\n *\n * Throws when there is no changer — an `undefined` here would turn into a\n * confusing failure inside a select call.\n */\n async getPageSizeSelect(): Promise<WrSelectHarness> {\n const select = await this.sizeChanger();\n if (!select) {\n throw new Error('WrPaginationHarness.getPageSizeSelect(): no page-size changer here — set `showSizeChanger`.');\n }\n return select;\n }\n\n /**\n * The page size currently in effect.\n *\n * The changer's trigger is the only place the size reaches the DOM, so this reads\n * it there and takes the digits: the label is localizable (`pagination.perPage`,\n * `{{size}} / page`) but interpolates the number in every language — unless a\n * catalog entry drops the placeholder, which is the second throw below.\n *\n * Throws when there is no changer at all: a pager without one says nothing on\n * screen about its page size, and the host's own model is where to assert it.\n */\n async getPageSize(): Promise<number> {\n const text = await (await this.getPageSizeSelect()).getValueText();\n const digits = /\\d+/.exec(text);\n if (!digits) {\n throw new Error(\n `WrPaginationHarness.getPageSize(): the changer reads \"${text}\", which names no number — a ` +\n 'catalog entry for `pagination.perPage` that drops `{{size}}` takes the size off the screen.'\n );\n }\n return Number(digits[0]);\n }\n\n /**\n * Pick a page size through the changer, the way a user does.\n *\n * Matched on the digits rather than the whole label, for the same reason\n * {@link getPageSize} reads them: `20 / page` and `20 / стр.` are the same option.\n * Throws when no option offers that size, naming what is on offer.\n *\n * Changing the size can move the page — the component pulls `page` back\n * when the new size leaves it past the end — so re-read {@link getCurrentPage}\n * afterwards rather than assuming it held.\n */\n async setPageSize(size: number): Promise<void> {\n const select = await this.getPageSizeSelect();\n if (await this.isDisabled()) {\n // Without this the call fails inside the select harness, whose message blames\n // a tag-mode panel and a `minChars` search that have nothing to do with it.\n throw new Error(\n 'WrPaginationHarness.setPageSize(): the pager is disabled, so its changer refuses to open — the ' +\n 'pager hands its own `disabled` straight to it.'\n );\n }\n\n await select.open();\n\n const labels = await select.getOptionLabels();\n const digits = new RegExp(`(^|\\\\D)${size}(\\\\D|$)`);\n const match = labels.find(label => digits.test(label));\n if (match === undefined) {\n throw new Error(\n `WrPaginationHarness.setPageSize(): no option offers ${size} — the changer offers ` +\n `${labels.join(', ')}. \\`pageSizeOptions\\` is what decides that list.`\n );\n }\n\n await select.selectOption({ text: match });\n }\n\n /** The current page, or `null` when no cell announces one. @see getCurrentPage */\n private async currentPageOrNull(): Promise<number | null> {\n const cell = await this.locatorForOptional(\n WrButtonHarness.with({ selector: '.wr-pagination__page[aria-current=\"page\"]' })\n )();\n return cell ? Number(await cell.getText()) : null;\n }\n\n private async stepControl(which: 'previous' | 'next'): Promise<WrButtonHarness> {\n const controls = await this.stepControls();\n if (controls.length !== 2) {\n throw new Error(\n `WrPaginationHarness: expected the nav to bracket the strip with a previous and a next control, ` +\n `found ${controls.length}. They are addressed by position, since their labels are localizable.`\n );\n }\n return which === 'previous' ? controls[0] : controls[1];\n }\n}\n"],"mappings":";;;;;;;;;AAqEA,IAAa,sBAAb,MAAa,4BAA4B,iBAAgB;CACvD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAsC,CAAA,GAAE;EAClD,OAAO,IAAI,iBAAiB,qBAAqB,OAAO,CAAC,CACtD,UAAU,SAAS,QAAQ,QAAQ,SAAS,UAAU,iBAAiB,cAAc,QAAQ,SAAQ,GAAI,KAAK,CAAC,CAAC,CAChH,UAAU,QAAQ,QAAQ,MAAM,OAAO,SAAS,SAAQ;GAIvD,OAAQ,MAAM,QAAQ,kBAAiB,MAAQ;EACjD,CAAC,CAAC,CACD,UAAU,YAAY,QAAQ,UAAU,OAAO,SAAS,aAAc,MAAM,QAAQ,WAAU,MAAQ,QAAQ;CACnH;CAGiB,YAAY,KAAK,cAAc,gBAAgB,KAAK,EAAE,UAAU,uBAAsB,CAAE,CAAC;CAWzF,eAAe,KAAK,cACnC,gBAAgB,KAAK,EAAE,UAAU,yDAAwD,CAAE,CAAC;CAI7E,aAAa,KAAK,cAAc,gDAAgD;CAEhF,aAAa,KAAK,mBAAmB,uBAAuB;CAE5D,cAAc,KAAK,mBAAmB,gBAAgB,KAAK,EAAE,UAAU,uBAAsB,CAAE,CAAC;CASjH,MAAM,WAAQ;EACZ,OAAQ,OAAO,MAAM,KAAK,KAAI,EAAA,CAAI,aAAa,YAAY,KAAM;CACnE;CAUA,MAAM,UAAO;EACX,MAAM,OAAO,MAAM,KAAK,KAAI;EAC5B,IAAI,MAAM,KAAK,SAAS,mBAAmB,GAAG,OAAO;EACrD,IAAI,MAAM,KAAK,SAAS,mBA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M,QAAQ,OAAO,MAAK,UAAS,OAAO,KAAK,KAAK,CAAC;EACrD,IAAI,UAAU,QACZ,MAAM,IAAI,MACR,uDAAuD,KAAI,wBACtD,OAAO,KAAK,IAAI,EAAC,iDAAkD;EAI5E,MAAM,OAAO,aAAa,EAAE,MAAM,MAAK,CAAE;CAC3C;CAGQ,MAAM,oBAAiB;EAC7B,MAAM,OAAO,MAAM,KAAK,mBACtB,gBAAgB,KAAK,EAAE,UAAU,8CAA2C,CAAE,CAAC,CAChF,CAAA;EACD,OAAO,OAAO,OAAO,MAAM,KAAK,QAAO,CAAE,IAAI;CAC/C;CAEQ,MAAM,YAAY,OAA0B;EAClD,MAAM,WAAW,MAAM,KAAK,aAAY;EACxC,IAAI,SAAS,WAAW,GACtB,MAAM,IAAI,MACR,wGACW,SAAS,OAAM,sEAAuE;EAGrG,OAAO,UAAU,aAAa,SAAS,KAAK,SAAS;CACvD"}
1
+ {"version":3,"file":"ngwr-pagination-testing.mjs","names":[],"sources":["../../../projects/lib/pagination/testing/wr-pagination-harness.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 { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport { WrButtonHarness } from 'ngwr/button/testing';\nimport type { WrPaginationSize } from 'ngwr/pagination';\nimport { WrSelectHarness } from 'ngwr/select/testing';\n\nimport type { WrPaginationHarnessFilters } from './types';\n\n/**\n * Test harness for `<wr-pagination>` — the numbered strip, its two step controls,\n * the total label and the page-size changer.\n *\n * The strip is not the page list: it is a WINDOW over it, at most seven pages wide,\n * with an `…` standing in for every page it skipped. So \"which pages can I click\"\n * and \"how many pages are there\" are different questions and this harness keeps\n * them apart —\n * {@link getPages} answers the first, {@link getTotalPages} the second, and\n * {@link getStrip} shows the gaps for what they are. A gap is a `<span>`, not a\n * control; counting the strip's children as pages is the mistake this API exists to\n * make impossible.\n *\n * **Which page is current has two answers, and this reads the ARIA one.** The\n * current cell is also PAINTED — the template binds\n * `[color]=\"isCurrent(page) ? 'primary' : null\"`, so `.wr-btn--primary` sits on it\n * too. But colour is a theming decision, while `aria-current=\"page\"` is the\n * navigation contract: it is what a screen-reader user hears, what the\n * component's own spec pins, and the only one of the two that still means\n * \"you are here\" after a restyle. A harness that read the class would be reporting\n * on the paint.\n *\n * **No roving tab stop to disambiguate.** Every cell is a `<wr-btn>` ELEMENT with\n * its own tab stop (`tabindex=\"0\"`, dropped only while the control is off), so the\n * pager has no separate \"focused\" item that could drift from the current page —\n * unlike a tab strip or a radio group, there is one active state here and\n * {@link getCurrentPage} is it.\n *\n * Composed rather than re-queried: the cells and step controls are driven through\n * {@link WrButtonHarness}, which already knows how a `<wr-btn>` says it is off —\n * both the `disabled` attribute (written on every shape, though inert on a custom\n * element) and `aria-disabled`, in that order — and the size changer through\n * {@link WrSelectHarness}, whose panel is a portal in the overlay container and\n * nowhere inside the pager.\n *\n * jsdom notes: every method here is a class / attribute read or a no-arg click, so\n * none of it needs layout. Two things are therefore invisible in a unit test and\n * deliberately absent from this API — the responsive collapse, which is a container\n * query ({@link isResponsive} reports only that it is ALLOWED), and the compact\n * `‹ 3 / 10 ›` pager it swaps in, which duplicates {@link getCurrentPage} and\n * {@link getTotalPages} and which a real browser would read as empty text while\n * CSS keeps it hidden.\n *\n * @example\n * ```ts\n * const pager = await loader.getHarness(WrPaginationHarness);\n *\n * expect(await pager.getPages()).toEqual([1, 2, 3, 4, 5, 10]);\n * await pager.goToPage(3);\n * expect(await pager.getCurrentPage()).toBe(3);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrPaginationHarness extends ComponentHarness {\n static hostSelector = 'wr-pagination';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrPaginationHarnessFilters = {}): HarnessPredicate<WrPaginationHarness> {\n return new HarnessPredicate(WrPaginationHarness, options)\n .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label))\n .addOption('page', options.page, async (harness, page) => {\n // The nullable read on purpose: the throwing getter would reject the whole\n // query over one pager that announces no current page, taking its\n // well-behaved neighbours down with it.\n return (await harness.currentPageOrNull()) === page;\n })\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /** The numbered cells, in DOM order — ascending, and never a gap. */\n private readonly pageCells = this.locatorForAll(WrButtonHarness.with({ selector: '.wr-pagination__page' }));\n\n /**\n * The two controls bracketing the strip: previous, then next.\n *\n * Located by POSITION, not by their labels. `prevLabel` / `nextLabel` are inputs\n * and both fall back to the `pagination.prev` / `pagination.next` catalog entries,\n * so an English `aria-label` match works right up until someone ships a locale —\n * whereas the nav's shape (one step control, the strip, one step control) is\n * structural. `:not(.wr-pagination__page)` is what keeps the cells out of it.\n */\n private readonly stepControls = this.locatorForAll(\n WrButtonHarness.with({ selector: '.wr-pagination__nav > wr-btn:not(.wr-pagination__page)' })\n );\n\n /** Both kinds of strip slot, in DOM order — cells and the gaps between them. */\n private readonly stripSlots = this.locatorForAll('.wr-pagination__page, .wr-pagination__ellipsis');\n\n private readonly totalLabel = this.locatorForOptional('.wr-pagination__total');\n\n private readonly sizeChanger = this.locatorForOptional(WrSelectHarness.with({ selector: '.wr-pagination__size' }));\n\n /**\n * The accessible name of the `role=\"navigation\"` landmark.\n *\n * `''` only if the landmark lost its name, which is a bug rather than a state: a\n * page with two unnamed pagers gives a screen-reader user two identical\n * \"navigation\" landmarks.\n */\n async getLabel(): Promise<string> {\n return (await (await this.host()).getAttribute('aria-label')) ?? '';\n }\n\n /**\n * The size the pager RENDERS at, from its host modifier.\n *\n * The modifier is always emitted — `sm` included — so the fall-through below is\n * only ever reached for the default, and a size the strip is not wearing cannot\n * come back from here. The page-size changer is not covered by this value: it is\n * a bare `<wr-select>` at its own default size.\n */\n async getSize(): Promise<WrPaginationSize> {\n const host = await this.host();\n if (await host.hasClass('wr-pagination--lg')) return 'lg';\n if (await host.hasClass('wr-pagination--md')) return 'md';\n return 'sm';\n }\n\n /**\n * Whether the pager is ALLOWED to collapse into its compact pager.\n *\n * Whether it HAS collapsed is a container query on the control's own box, and a\n * unit test has no layout for one to answer — assert this input in jsdom and the\n * reflow itself in a real browser.\n */\n async isResponsive(): Promise<boolean> {\n return (await this.host()).hasClass('wr-pagination--responsive');\n }\n\n /**\n * Whether the whole control refuses interaction.\n *\n * Read from the host modifier, because a `role=\"navigation\"` landmark has no ARIA\n * disabled state to prefer — the per-control answer lives on the buttons\n * themselves (`disabled` plus `aria-disabled` on each), which is what\n * {@link isPreviousDisabled} and {@link isNextDisabled} read.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-pagination--disabled');\n }\n\n /**\n * Whether `hideOnSinglePage` has hidden the pager: everything fits on one page,\n * so it renders nothing and its host takes no box.\n *\n * Ask this first on a pager that may be hidden. It has no cells, step controls,\n * total label or size changer then, so the reads that need one throw.\n */\n async isHidden(): Promise<boolean> {\n return (await this.host()).hasClass('wr-pagination--hidden');\n }\n\n /**\n * The whole strip in DOM order: a `number` for every page cell, and the gap\n * marker's own text (`…`) for every ellipsis.\n *\n * The marker is read from the DOM rather than compared against a literal, so a\n * component that changes what it draws in a gap changes this too instead of\n * quietly reporting a page.\n */\n async getStrip(): Promise<(number | string)[]> {\n const slots = await this.stripSlots();\n return Promise.all(\n slots.map(async slot => {\n const text = (await slot.text()).trim();\n return (await slot.hasClass('wr-pagination__ellipsis')) ? text : Number(text);\n })\n );\n }\n\n /**\n * The pages that can be clicked right now, ascending. Gaps are not pages and are\n * not here — `[1, 8, 9, 10, 11, 12, 20]` for a twenty-page list sitting on 10.\n */\n async getPages(): Promise<number[]> {\n const cells = await this.pageCells();\n return Promise.all(cells.map(async cell => Number(await cell.getText())));\n }\n\n /**\n * How many pages there are — not how many are on the strip.\n *\n * Taken from the LAST cell, which the window always pins to the final page (the\n * first is pinned the same way), so this survives the gap that usually precedes\n * it. Deliberately not read from the compact `3 / 10` pager: that span is\n * CSS-hidden outside responsive mode, so a browser-based harness environment\n * would read it as empty.\n */\n async getTotalPages(): Promise<number> {\n const pages = await this.getPages();\n const last = pages.at(-1);\n if (last === undefined) {\n throw new Error(\n 'WrPaginationHarness.getTotalPages(): the strip has no page cells at all. The pager offers page ' +\n '1 even for an empty list, so this is a rendering failure rather than an empty state.'\n );\n }\n return last;\n }\n\n /**\n * The page the pager announces as current, from `aria-current=\"page\"`.\n *\n * Throws when no cell claims it. The window always keeps the current page on the\n * strip, so getting here means `page` is not one of the pages at all. The\n * component clamps a host write into `1..totalPages`, which leaves one survivor:\n * a fractional page, which is in range and matches no cell — and which leaves\n * every cell looking equally inactive to an assistive tech user.\n */\n async getCurrentPage(): Promise<number> {\n const page = await this.currentPageOrNull();\n if (page === null) {\n throw new Error(\n 'WrPaginationHarness.getCurrentPage(): no cell carries `aria-current=\"page\"`. The visible window ' +\n `always includes the current page, so \\`page\\` is not a whole number — the component ` +\n `clamps it into 1..${await this.getTotalPages()} but does not round it.`\n );\n }\n return page;\n }\n\n /**\n * Click the cell for a page.\n *\n * Throws when that page is not on the strip — a seven-slot window over twenty\n * pages simply has no cell for page 15, and a silent no-op there reads as\n * \"navigation is broken\" three assertions later. Step with {@link next} /\n * {@link previous}, or move the host's own `page` model.\n *\n * A disabled pager is still clicked; the component's own guard is what refuses\n * the move, so assert the page rather than assume it. Clicking the CURRENT page\n * is a no-op by the same guard.\n */\n async goToPage(page: number): Promise<void> {\n for (const cell of await this.pageCells()) {\n if (Number(await cell.getText()) === page) {\n await cell.click();\n return;\n }\n }\n\n throw new Error(\n `WrPaginationHarness.goToPage(): page ${page} is not on the strip, which offers ` +\n `${(await this.getStrip()).join(' ')}. The window shows at most seven pages — step with next() / ` +\n 'previous(), or set the page on the host.'\n );\n }\n\n /**\n * Jump to page 1.\n *\n * There is no dedicated first / last control in this component; the window pins\n * the first and last page to the ends of the strip instead, so these two click\n * cells like any other page.\n */\n async goToFirst(): Promise<void> {\n return this.goToPage(1);\n }\n\n /** Jump to the last page — the trailing cell, not the last one before a gap. */\n async goToLast(): Promise<void> {\n return this.goToPage(await this.getTotalPages());\n }\n\n /**\n * Click the next-page control.\n *\n * Disabled on the last page, and a disabled `<wr-btn>` is still clicked here (see\n * {@link goToPage}) — {@link isNextDisabled} is the question, this is the action.\n */\n async next(): Promise<void> {\n return (await this.stepControl('next')).click();\n }\n\n /** Click the previous-page control. Disabled on the first page. */\n async previous(): Promise<void> {\n return (await this.stepControl('previous')).click();\n }\n\n /**\n * Whether the next-page control refuses the move — true on the last page, and\n * true for every control while the pager is disabled.\n *\n * Answered by {@link WrButtonHarness}, which reads the `disabled` attribute first\n * and `aria-disabled` second. A `<wr-btn>` element carries both: the attribute is\n * inert on anything but a real `<button>`, which is why the component adds the\n * ARIA state as well — so this is the accessible answer whichever branch supplies\n * it.\n */\n async isNextDisabled(): Promise<boolean> {\n return (await this.stepControl('next')).isDisabled();\n }\n\n /** Whether the previous-page control refuses the move — true on the first page. */\n async isPreviousDisabled(): Promise<boolean> {\n return (await this.stepControl('previous')).isDisabled();\n }\n\n /** Whether the pager shows its \"X–Y of Z\" label (the `showTotal` input). */\n async hasTotal(): Promise<boolean> {\n return (await this.totalLabel()) !== null;\n }\n\n /**\n * The total label exactly as rendered, e.g. `1–10 of 95`.\n *\n * The WHOLE string is one catalog entry (`pagination.range`) and the three\n * numbers in it are formatted per `LOCALE_ID`, so a spec asserting the literal\n * owns both the copy and the locale it asserts under. Note the range separator\n * is an en dash, not the ASCII hyphen this used to print.\n *\n * Throws when the label is not rendered, which is a `showTotal` that was never\n * set rather than a total of zero (a zero total still renders `0–0 of 0`).\n */\n async getTotalText(): Promise<string> {\n const label = await this.totalLabel();\n if (!label) {\n throw new Error(\n 'WrPaginationHarness.getTotalText(): this pager renders no total label — set `showTotal`. A ' +\n 'total of 0 still renders one.'\n );\n }\n return label.text();\n }\n\n /** Whether the pager renders its page-size changer (the `showSizeChanger` input). */\n async hasPageSizeChanger(): Promise<boolean> {\n return (await this.sizeChanger()) !== null;\n }\n\n /**\n * The page-size changer as a {@link WrSelectHarness} — for anything this harness\n * does not wrap: the offered labels, the open state, keyboard driving.\n *\n * Composed rather than re-queried on purpose: the changer is a real\n * `<wr-select>`, its options live in the overlay container rather than inside the\n * pager, and the select harness is the thing that already knows how to scope them\n * to their own trigger.\n *\n * Throws when there is no changer — an `undefined` here would turn into a\n * confusing failure inside a select call.\n */\n async getPageSizeSelect(): Promise<WrSelectHarness> {\n const select = await this.sizeChanger();\n if (!select) {\n throw new Error('WrPaginationHarness.getPageSizeSelect(): no page-size changer here — set `showSizeChanger`.');\n }\n return select;\n }\n\n /**\n * The page size currently in effect.\n *\n * The changer's trigger is the only place the size reaches the DOM, so this reads\n * it there and takes the digits: the label is localizable (`pagination.perPage`,\n * `{{size}} / page`) but interpolates the number in every language — unless a\n * catalog entry drops the placeholder, which is the second throw below.\n *\n * Throws when there is no changer at all: a pager without one says nothing on\n * screen about its page size, and the host's own model is where to assert it.\n */\n async getPageSize(): Promise<number> {\n const text = await (await this.getPageSizeSelect()).getValueText();\n const digits = /\\d+/.exec(text);\n if (!digits) {\n throw new Error(\n `WrPaginationHarness.getPageSize(): the changer reads \"${text}\", which names no number — a ` +\n 'catalog entry for `pagination.perPage` that drops `{{size}}` takes the size off the screen.'\n );\n }\n return Number(digits[0]);\n }\n\n /**\n * Pick a page size through the changer, the way a user does.\n *\n * Matched on the digits rather than the whole label, for the same reason\n * {@link getPageSize} reads them: `20 / page` and `20 / стр.` are the same option.\n * Throws when no option offers that size, naming what is on offer.\n *\n * Changing the size can move the page — the component pulls `page` back\n * when the new size leaves it past the end — so re-read {@link getCurrentPage}\n * afterwards rather than assuming it held.\n */\n async setPageSize(size: number): Promise<void> {\n const select = await this.getPageSizeSelect();\n if (await this.isDisabled()) {\n // Without this the call fails inside the select harness, whose message blames\n // a tag-mode panel and a `minChars` search that have nothing to do with it.\n throw new Error(\n 'WrPaginationHarness.setPageSize(): the pager is disabled, so its changer refuses to open — the ' +\n 'pager hands its own `disabled` straight to it.'\n );\n }\n\n await select.open();\n\n const labels = await select.getOptionLabels();\n const digits = new RegExp(`(^|\\\\D)${size}(\\\\D|$)`);\n const match = labels.find(label => digits.test(label));\n if (match === undefined) {\n throw new Error(\n `WrPaginationHarness.setPageSize(): no option offers ${size} — the changer offers ` +\n `${labels.join(', ')}. \\`pageSizeOptions\\` is what decides that list.`\n );\n }\n\n await select.selectOption({ text: match });\n }\n\n /** The current page, or `null` when no cell announces one. @see getCurrentPage */\n private async currentPageOrNull(): Promise<number | null> {\n const cell = await this.locatorForOptional(\n WrButtonHarness.with({ selector: '.wr-pagination__page[aria-current=\"page\"]' })\n )();\n return cell ? Number(await cell.getText()) : null;\n }\n\n private async stepControl(which: 'previous' | 'next'): Promise<WrButtonHarness> {\n const controls = await this.stepControls();\n if (controls.length !== 2) {\n throw new Error(\n `WrPaginationHarness: expected the nav to bracket the strip with a previous and a next control, ` +\n `found ${controls.length}. They are addressed by position, since their labels are localizable.`\n );\n }\n return which === 'previous' ? controls[0] : controls[1];\n }\n}\n"],"mappings":";;;;;;;;;AAqEA,IAAa,sBAAb,MAAa,4BAA4B,iBAAgB;CACvD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAsC,CAAA,GAAE;EAClD,OAAO,IAAI,iBAAiB,qBAAqB,OAAO,CAAC,CACtD,UAAU,SAAS,QAAQ,QAAQ,SAAS,UAAU,iBAAiB,cAAc,QAAQ,SAAQ,GAAI,KAAK,CAAC,CAAC,CAChH,UAAU,QAAQ,QAAQ,MAAM,OAAO,SAAS,SAAQ;GAIvD,OAAQ,MAAM,QAAQ,kBAAiB,MAAQ;EACjD,CAAC,CAAC,CACD,UAAU,YAAY,QAAQ,UAAU,OAAO,SAAS,aAAc,MAAM,QAAQ,WAAU,MAAQ,QAAQ;CACnH;CAGiB,YAAY,KAAK,cAAc,gBAAgB,KAAK,EAAE,UAAU,uBAAsB,CAAE,CAAC;CAWzF,eAAe,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AAC,QACH,MAAM,IAAI,MAAM,6FAA6F;EAE/G,OAAO;CACT;CAaA,MAAM,cAAW;EACf,MAAM,OAAO,OAAO,MAAM,KAAK,kBAAiB,EAAA,CAAI,aAAY;EAChE,MAAM,SAAS,MAAM,KAAK,IAAI;EAC9B,IAAI,CAAC,QACH,MAAM,IAAI,MACR,yDAAyD,KAAI,6HACkC;EAGnG,OAAO,OAAO,OAAO,EAAE;CACzB;CAaA,MAAM,YAAY,MAAY;EAC5B,MAAM,SAAS,MAAM,KAAK,kBAAiB;EAC3C,IAAI,MAAM,KAAK,WAAU,GAGvB,MAAM,IAAI,MACR,+IACkD;EAItD,MAAM,OAAO,KAAI;EAEjB,MAAM,SAAS,MAAM,OAAO,gBAAe;EAC3C,MAAM,SAAS,IAAI,OAAO,UAAU,KAAI,QAAS;EACjD,MAAM,QAAQ,OAAO,MAAK,UAAS,OAAO,KAAK,KAAK,CAAC;EACrD,IAAI,UAAU,QACZ,MAAM,IAAI,MACR,uDAAuD,KAAI,wBACtD,OAAO,KAAK,IAAI,EAAC,iDAAkD;EAI5E,MAAM,OAAO,aAAa,EAAE,MAAM,MAAK,CAAE;CAC3C;CAGQ,MAAM,oBAAiB;EAC7B,MAAM,OAAO,MAAM,KAAK,mBACtB,gBAAgB,KAAK,EAAE,UAAU,8CAA2C,CAAE,CAAC,CAChF,CAAA;EACD,OAAO,OAAO,OAAO,MAAM,KAAK,QAAO,CAAE,IAAI;CAC/C;CAEQ,MAAM,YAAY,OAA0B;EAClD,MAAM,WAAW,MAAM,KAAK,aAAY;EACxC,IAAI,SAAS,WAAW,GACtB,MAAM,IAAI,MACR,wGACW,SAAS,OAAM,sEAAuE;EAGrG,OAAO,UAAU,aAAa,SAAS,KAAK,SAAS;CACvD"}
@@ -44,6 +44,10 @@ var WrPagination = class WrPagination {
44
44
  ...ngDevMode ? { debugName: "responsive" } : /* istanbul ignore next */ {},
45
45
  transform: coerceBooleanProperty
46
46
  });
47
+ hideOnSinglePage = input(false, {
48
+ ...ngDevMode ? { debugName: "hideOnSinglePage" } : /* istanbul ignore next */ {},
49
+ transform: coerceBooleanProperty
50
+ });
47
51
  prevLabel = input(null, ...ngDevMode ? [{ debugName: "prevLabel" }] : /* istanbul ignore next */ []);
48
52
  nextLabel = input(null, ...ngDevMode ? [{ debugName: "nextLabel" }] : /* istanbul ignore next */ []);
49
53
  itemsPerPageLabel = input(null, ...ngDevMode ? [{ debugName: "itemsPerPageLabel" }] : /* istanbul ignore next */ []);
@@ -60,6 +64,12 @@ var WrPagination = class WrPagination {
60
64
  return Math.max(1, this.total());
61
65
  }, ...ngDevMode ? [{ debugName: "usablePageSize" }] : /* istanbul ignore next */ []);
62
66
  totalPages = computed(() => Math.max(1, Math.ceil(this.total() / this.usablePageSize())), ...ngDevMode ? [{ debugName: "totalPages" }] : /* istanbul ignore next */ []);
67
+ hidden = computed(() => {
68
+ if (!this.hideOnSinglePage()) return false;
69
+ if (!this.showSizeChanger()) return this.totalPages() <= 1;
70
+ const offered = this.pageSizeOptions().filter((size) => Number.isFinite(size) && size >= 1);
71
+ return this.total() <= Math.min(this.usablePageSize(), ...offered);
72
+ }, ...ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []);
63
73
  prevPage = computed(() => Math.min(this.page() - 1, this.totalPages()), ...ngDevMode ? [{ debugName: "prevPage" }] : /* istanbul ignore next */ []);
64
74
  rangeLabel = computed(() => {
65
75
  const size = this.usablePageSize();
@@ -113,6 +123,7 @@ var WrPagination = class WrPagination {
113
123
  ];
114
124
  if (this.disabled()) parts.push("wr-pagination--disabled");
115
125
  if (this.responsive()) parts.push("wr-pagination--responsive");
126
+ if (this.hidden()) parts.push("wr-pagination--hidden");
116
127
  return parts.join(" ");
117
128
  }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
118
129
  isCurrent(page) {
@@ -139,7 +150,7 @@ var WrPagination = class WrPagination {
139
150
  }
140
151
  static ɵfac = i0.ɵɵngDeclareFactory({
141
152
  minVersion: "12.0.0",
142
- version: "22.2.6",
153
+ version: "22.3.0",
143
154
  ngImport: i0,
144
155
  type: WrPagination,
145
156
  deps: [],
@@ -147,7 +158,7 @@ var WrPagination = class WrPagination {
147
158
  });
148
159
  static ɵcmp = i0.ɵɵngDeclareComponent({
149
160
  minVersion: "17.0.0",
150
- version: "22.2.6",
161
+ version: "22.3.0",
151
162
  type: WrPagination,
152
163
  isStandalone: true,
153
164
  selector: "wr-pagination",
@@ -229,6 +240,13 @@ var WrPagination = class WrPagination {
229
240
  isRequired: false,
230
241
  transformFunction: null
231
242
  },
243
+ hideOnSinglePage: {
244
+ classPropertyName: "hideOnSinglePage",
245
+ publicName: "hideOnSinglePage",
246
+ isSignal: true,
247
+ isRequired: false,
248
+ transformFunction: null
249
+ },
232
250
  prevLabel: {
233
251
  classPropertyName: "prevLabel",
234
252
  publicName: "prevLabel",
@@ -271,7 +289,7 @@ var WrPagination = class WrPagination {
271
289
  classAttribute: "wr-pagination"
272
290
  },
273
291
  ngImport: i0,
274
- template: "<div class=\"wr-pagination__inner\">\n @if (showTotal()) {\n <span class=\"wr-pagination__total\">{{ rangeLabel() }}</span>\n }\n\n <div class=\"wr-pagination__nav\">\n <!--\n `wr-pagination__nav-btn` exists so the stylesheet can mirror the arrow\n glyph under `dir=\"rtl\"`. A class rather than `:first-child` /\n `:last-child` on the row: those two positions do hold today — which is why\n the `--square` end caps use them — but only while the prev button, the\n compact label and the next button all stay unconditional and in this\n order. A mirror keyed to position would follow a reorder, or land on a\n page cell, without a word.\n\n The two `[disabled]` bindings compare against the RANGE (`<= 1`,\n `>= totalPages()`) rather than for equality with its ends. While `total`\n is 0 the guard effect stops enforcing the upper bound, so the page can\n legitimately sit past `totalPages()` — and `=== totalPages()` reported\n next as enabled there while `goTo` refused the step. Prev is still\n enabled in that state, correctly: `prevPage()` walks it back into range.\n -->\n <wr-btn\n class=\"wr-pagination__nav-btn\"\n [size]=\"size()\"\n outlined\n [attr.aria-label]=\"resolvedPrev()\"\n [disabled]=\"disabled() || page() <= 1\"\n (click)=\"goTo(prevPage())\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/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 >\n <path d=\"m12 19-7-7 7-7\" />\n <path d=\"M19 12H5\" />\n </svg>\n </wr-btn>\n\n <!-- Tracked by page, not by slot: the window slides on every move, and the\n focused button has to stay the page it was. The two ellipses are\n different items, and the leading one is always the second entry. -->\n @for (page of pages(); track page === ellipsis ? ($index === 1 ? 'before' : 'after') : page) {\n @if (page === ellipsis) {\n <span class=\"wr-pagination__ellipsis\">{{ ellipsis }}</span>\n } @else {\n <wr-btn\n class=\"wr-pagination__page\"\n [size]=\"size()\"\n [outlined]=\"!isCurrent(page)\"\n [color]=\"isCurrent(page) ? 'primary' : null\"\n [attr.aria-current]=\"isCurrent(page) ? 'page' : null\"\n [attr.aria-label]=\"goToPage({ page })\"\n [disabled]=\"disabled()\"\n (click)=\"goTo(page)\"\n >\n {{ page }}\n </wr-btn>\n }\n }\n\n <!-- Compact pager — shown only in responsive mode on a narrow box (CSS). Not\n `aria-hidden`: `display: none` already keeps whichever of the two is\n hidden out of the accessibility tree, and on a narrow box this label is\n the only position on screen. -->\n <span class=\"wr-pagination__current\">{{ compactLabel() }}</span>\n\n <wr-btn\n class=\"wr-pagination__nav-btn\"\n [size]=\"size()\"\n outlined\n [attr.aria-label]=\"resolvedNext()\"\n [disabled]=\"disabled() || page() >= totalPages()\"\n (click)=\"goTo(page() + 1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/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 >\n <path d=\"M5 12h14\" />\n <path d=\"m12 5 7 7-7 7\" />\n </svg>\n </wr-btn>\n </div>\n\n @if (showSizeChanger()) {\n <!--\n `ariaLabel`, not `[attr.aria-label]`: `<wr-select>`'s host carries no role,\n so an attribute there names nothing and never reaches the `role=\"combobox\"`\n button inside — the size changer announced itself as the catalog's generic\n \"Select\".\n -->\n <wr-select\n class=\"wr-pagination__size\"\n [ariaLabel]=\"resolvedItemsPerPage()\"\n [size]=\"size()\"\n [disabled]=\"disabled()\"\n [value]=\"pageSize()\"\n (valueChange)=\"onSizeChange($event)\"\n >\n @for (option of pageSizeOptions(); track option) {\n <wr-option [value]=\"option\">{{ perPage({ size: option }) }}</wr-option>\n }\n </wr-select>\n }\n</div>\n",
292
+ template: "@if (!hidden()) {\n <div class=\"wr-pagination__inner\">\n @if (showTotal()) {\n <span class=\"wr-pagination__total\">{{ rangeLabel() }}</span>\n }\n\n <div class=\"wr-pagination__nav\">\n <!--\n `wr-pagination__nav-btn` exists so the stylesheet can mirror the arrow\n glyph under `dir=\"rtl\"`. A class rather than `:first-child` /\n `:last-child` on the row: those two positions do hold today — which is why\n the `--square` end caps use them — but only while the prev button, the\n compact label and the next button all stay unconditional and in this\n order. A mirror keyed to position would follow a reorder, or land on a\n page cell, without a word.\n\n The two `[disabled]` bindings compare against the RANGE (`<= 1`,\n `>= totalPages()`) rather than for equality with its ends. While `total`\n is 0 the guard effect stops enforcing the upper bound, so the page can\n legitimately sit past `totalPages()` — and `=== totalPages()` reported\n next as enabled there while `goTo` refused the step. Prev is still\n enabled in that state, correctly: `prevPage()` walks it back into range.\n -->\n <wr-btn\n class=\"wr-pagination__nav-btn\"\n [size]=\"size()\"\n outlined\n [attr.aria-label]=\"resolvedPrev()\"\n [disabled]=\"disabled() || page() <= 1\"\n (click)=\"goTo(prevPage())\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/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 >\n <path d=\"m12 19-7-7 7-7\" />\n <path d=\"M19 12H5\" />\n </svg>\n </wr-btn>\n\n <!-- Tracked by page, not by slot: the window slides on every move, and the\n focused button has to stay the page it was. The two ellipses are\n different items, and the leading one is always the second entry. -->\n @for (page of pages(); track page === ellipsis ? ($index === 1 ? 'before' : 'after') : page) {\n @if (page === ellipsis) {\n <span class=\"wr-pagination__ellipsis\">{{ ellipsis }}</span>\n } @else {\n <wr-btn\n class=\"wr-pagination__page\"\n [size]=\"size()\"\n [outlined]=\"!isCurrent(page)\"\n [color]=\"isCurrent(page) ? 'primary' : null\"\n [attr.aria-current]=\"isCurrent(page) ? 'page' : null\"\n [attr.aria-label]=\"goToPage({ page })\"\n [disabled]=\"disabled()\"\n (click)=\"goTo(page)\"\n >\n {{ page }}\n </wr-btn>\n }\n }\n\n <!-- Compact pager — shown only in responsive mode on a narrow box (CSS). Not\n `aria-hidden`: `display: none` already keeps whichever of the two is\n hidden out of the accessibility tree, and on a narrow box this label is\n the only position on screen. -->\n <span class=\"wr-pagination__current\">{{ compactLabel() }}</span>\n\n <wr-btn\n class=\"wr-pagination__nav-btn\"\n [size]=\"size()\"\n outlined\n [attr.aria-label]=\"resolvedNext()\"\n [disabled]=\"disabled() || page() >= totalPages()\"\n (click)=\"goTo(page() + 1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/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 >\n <path d=\"M5 12h14\" />\n <path d=\"m12 5 7 7-7 7\" />\n </svg>\n </wr-btn>\n </div>\n\n @if (showSizeChanger()) {\n <!--\n `ariaLabel`, not `[attr.aria-label]`: `<wr-select>`'s host carries no role,\n so an attribute there names nothing and never reaches the `role=\"combobox\"`\n button inside — the size changer announced itself as the catalog's generic\n \"Select\".\n -->\n <wr-select\n class=\"wr-pagination__size\"\n [ariaLabel]=\"resolvedItemsPerPage()\"\n [size]=\"size()\"\n [disabled]=\"disabled()\"\n [value]=\"pageSize()\"\n (valueChange)=\"onSizeChange($event)\"\n >\n @for (option of pageSizeOptions(); track option) {\n <wr-option [value]=\"option\">{{ perPage({ size: option }) }}</wr-option>\n }\n </wr-select>\n }\n </div>\n}\n",
275
293
  dependencies: [
276
294
  {
277
295
  kind: "component",
@@ -285,6 +303,7 @@ var WrPagination = class WrPagination {
285
303
  "iconPosition",
286
304
  "disabled",
287
305
  "outlined",
306
+ "ghost",
288
307
  "block",
289
308
  "loading",
290
309
  "disabledWhenLoading"
@@ -300,6 +319,7 @@ var WrPagination = class WrPagination {
300
319
  "ariaLabel",
301
320
  "disabled",
302
321
  "readonly",
322
+ "block",
303
323
  "rounded",
304
324
  "size",
305
325
  "mode",
@@ -307,6 +327,7 @@ var WrPagination = class WrPagination {
307
327
  "searchQuery",
308
328
  "options",
309
329
  "displayWith",
330
+ "valueWith",
310
331
  "loader",
311
332
  "serverSearch",
312
333
  "debounceMs",
@@ -360,7 +381,7 @@ var WrPagination = class WrPagination {
360
381
  };
361
382
  i0.ɵɵngDeclareClassMetadata({
362
383
  minVersion: "12.0.0",
363
- version: "22.2.6",
384
+ version: "22.3.0",
364
385
  ngImport: i0,
365
386
  type: WrPagination,
366
387
  decorators: [{
@@ -379,7 +400,7 @@ i0.ɵɵngDeclareClassMetadata({
379
400
  WrSelect,
380
401
  WrOption
381
402
  ],
382
- template: "<div class=\"wr-pagination__inner\">\n @if (showTotal()) {\n <span class=\"wr-pagination__total\">{{ rangeLabel() }}</span>\n }\n\n <div class=\"wr-pagination__nav\">\n <!--\n `wr-pagination__nav-btn` exists so the stylesheet can mirror the arrow\n glyph under `dir=\"rtl\"`. A class rather than `:first-child` /\n `:last-child` on the row: those two positions do hold today — which is why\n the `--square` end caps use them — but only while the prev button, the\n compact label and the next button all stay unconditional and in this\n order. A mirror keyed to position would follow a reorder, or land on a\n page cell, without a word.\n\n The two `[disabled]` bindings compare against the RANGE (`<= 1`,\n `>= totalPages()`) rather than for equality with its ends. While `total`\n is 0 the guard effect stops enforcing the upper bound, so the page can\n legitimately sit past `totalPages()` — and `=== totalPages()` reported\n next as enabled there while `goTo` refused the step. Prev is still\n enabled in that state, correctly: `prevPage()` walks it back into range.\n -->\n <wr-btn\n class=\"wr-pagination__nav-btn\"\n [size]=\"size()\"\n outlined\n [attr.aria-label]=\"resolvedPrev()\"\n [disabled]=\"disabled() || page() <= 1\"\n (click)=\"goTo(prevPage())\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/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 >\n <path d=\"m12 19-7-7 7-7\" />\n <path d=\"M19 12H5\" />\n </svg>\n </wr-btn>\n\n <!-- Tracked by page, not by slot: the window slides on every move, and the\n focused button has to stay the page it was. The two ellipses are\n different items, and the leading one is always the second entry. -->\n @for (page of pages(); track page === ellipsis ? ($index === 1 ? 'before' : 'after') : page) {\n @if (page === ellipsis) {\n <span class=\"wr-pagination__ellipsis\">{{ ellipsis }}</span>\n } @else {\n <wr-btn\n class=\"wr-pagination__page\"\n [size]=\"size()\"\n [outlined]=\"!isCurrent(page)\"\n [color]=\"isCurrent(page) ? 'primary' : null\"\n [attr.aria-current]=\"isCurrent(page) ? 'page' : null\"\n [attr.aria-label]=\"goToPage({ page })\"\n [disabled]=\"disabled()\"\n (click)=\"goTo(page)\"\n >\n {{ page }}\n </wr-btn>\n }\n }\n\n <!-- Compact pager — shown only in responsive mode on a narrow box (CSS). Not\n `aria-hidden`: `display: none` already keeps whichever of the two is\n hidden out of the accessibility tree, and on a narrow box this label is\n the only position on screen. -->\n <span class=\"wr-pagination__current\">{{ compactLabel() }}</span>\n\n <wr-btn\n class=\"wr-pagination__nav-btn\"\n [size]=\"size()\"\n outlined\n [attr.aria-label]=\"resolvedNext()\"\n [disabled]=\"disabled() || page() >= totalPages()\"\n (click)=\"goTo(page() + 1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/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 >\n <path d=\"M5 12h14\" />\n <path d=\"m12 5 7 7-7 7\" />\n </svg>\n </wr-btn>\n </div>\n\n @if (showSizeChanger()) {\n <!--\n `ariaLabel`, not `[attr.aria-label]`: `<wr-select>`'s host carries no role,\n so an attribute there names nothing and never reaches the `role=\"combobox\"`\n button inside — the size changer announced itself as the catalog's generic\n \"Select\".\n -->\n <wr-select\n class=\"wr-pagination__size\"\n [ariaLabel]=\"resolvedItemsPerPage()\"\n [size]=\"size()\"\n [disabled]=\"disabled()\"\n [value]=\"pageSize()\"\n (valueChange)=\"onSizeChange($event)\"\n >\n @for (option of pageSizeOptions(); track option) {\n <wr-option [value]=\"option\">{{ perPage({ size: option }) }}</wr-option>\n }\n </wr-select>\n }\n</div>\n"
403
+ template: "@if (!hidden()) {\n <div class=\"wr-pagination__inner\">\n @if (showTotal()) {\n <span class=\"wr-pagination__total\">{{ rangeLabel() }}</span>\n }\n\n <div class=\"wr-pagination__nav\">\n <!--\n `wr-pagination__nav-btn` exists so the stylesheet can mirror the arrow\n glyph under `dir=\"rtl\"`. A class rather than `:first-child` /\n `:last-child` on the row: those two positions do hold today — which is why\n the `--square` end caps use them — but only while the prev button, the\n compact label and the next button all stay unconditional and in this\n order. A mirror keyed to position would follow a reorder, or land on a\n page cell, without a word.\n\n The two `[disabled]` bindings compare against the RANGE (`<= 1`,\n `>= totalPages()`) rather than for equality with its ends. While `total`\n is 0 the guard effect stops enforcing the upper bound, so the page can\n legitimately sit past `totalPages()` — and `=== totalPages()` reported\n next as enabled there while `goTo` refused the step. Prev is still\n enabled in that state, correctly: `prevPage()` walks it back into range.\n -->\n <wr-btn\n class=\"wr-pagination__nav-btn\"\n [size]=\"size()\"\n outlined\n [attr.aria-label]=\"resolvedPrev()\"\n [disabled]=\"disabled() || page() <= 1\"\n (click)=\"goTo(prevPage())\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/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 >\n <path d=\"m12 19-7-7 7-7\" />\n <path d=\"M19 12H5\" />\n </svg>\n </wr-btn>\n\n <!-- Tracked by page, not by slot: the window slides on every move, and the\n focused button has to stay the page it was. The two ellipses are\n different items, and the leading one is always the second entry. -->\n @for (page of pages(); track page === ellipsis ? ($index === 1 ? 'before' : 'after') : page) {\n @if (page === ellipsis) {\n <span class=\"wr-pagination__ellipsis\">{{ ellipsis }}</span>\n } @else {\n <wr-btn\n class=\"wr-pagination__page\"\n [size]=\"size()\"\n [outlined]=\"!isCurrent(page)\"\n [color]=\"isCurrent(page) ? 'primary' : null\"\n [attr.aria-current]=\"isCurrent(page) ? 'page' : null\"\n [attr.aria-label]=\"goToPage({ page })\"\n [disabled]=\"disabled()\"\n (click)=\"goTo(page)\"\n >\n {{ page }}\n </wr-btn>\n }\n }\n\n <!-- Compact pager — shown only in responsive mode on a narrow box (CSS). Not\n `aria-hidden`: `display: none` already keeps whichever of the two is\n hidden out of the accessibility tree, and on a narrow box this label is\n the only position on screen. -->\n <span class=\"wr-pagination__current\">{{ compactLabel() }}</span>\n\n <wr-btn\n class=\"wr-pagination__nav-btn\"\n [size]=\"size()\"\n outlined\n [attr.aria-label]=\"resolvedNext()\"\n [disabled]=\"disabled() || page() >= totalPages()\"\n (click)=\"goTo(page() + 1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/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 >\n <path d=\"M5 12h14\" />\n <path d=\"m12 5 7 7-7 7\" />\n </svg>\n </wr-btn>\n </div>\n\n @if (showSizeChanger()) {\n <!--\n `ariaLabel`, not `[attr.aria-label]`: `<wr-select>`'s host carries no role,\n so an attribute there names nothing and never reaches the `role=\"combobox\"`\n button inside — the size changer announced itself as the catalog's generic\n \"Select\".\n -->\n <wr-select\n class=\"wr-pagination__size\"\n [ariaLabel]=\"resolvedItemsPerPage()\"\n [size]=\"size()\"\n [disabled]=\"disabled()\"\n [value]=\"pageSize()\"\n (valueChange)=\"onSizeChange($event)\"\n >\n @for (option of pageSizeOptions(); track option) {\n <wr-option [value]=\"option\">{{ perPage({ size: option }) }}</wr-option>\n }\n </wr-select>\n }\n </div>\n}\n"
383
404
  }]
384
405
  }],
385
406
  ctorParameters: () => [],
@@ -478,6 +499,14 @@ i0.ɵɵngDeclareClassMetadata({
478
499
  required: false
479
500
  }]
480
501
  }],
502
+ hideOnSinglePage: [{
503
+ type: i0.Input,
504
+ args: [{
505
+ isSignal: true,
506
+ alias: "hideOnSinglePage",
507
+ required: false
508
+ }]
509
+ }],
481
510
  prevLabel: [{
482
511
  type: i0.Input,
483
512
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-pagination.mjs","names":[],"sources":["../../../projects/lib/pagination/pagination.ts","../../../projects/lib/pagination/pagination.html"],"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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, LOCALE_ID, ViewEncapsulation, computed, effect, inject, input, model } from '@angular/core';\n\nimport { WrButton } from 'ngwr/button';\nimport { useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { WrOption, WrSelect } from 'ngwr/select';\nimport { wrNumAttr, wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrPaginationAlign, WrPaginationShape, WrPaginationSize } from './types';\n\nconst ELLIPSIS = '…' as const;\ntype PageEntry = number | typeof ELLIPSIS;\n\n/**\n * Numbered page navigator with optional total / page-size controls.\n *\n * Two-way binds `page` and `pageSize` via signal `model()` inputs.\n *\n * @example\n * ```html\n * <wr-pagination\n * [total]=\"120\"\n * [(page)]=\"page\"\n * [(pageSize)]=\"size\"\n * showTotal\n * showSizeChanger\n * />\n * ```\n *\n * @see https://ngwr.dev/reference/components/pagination\n */\n@Component({\n selector: 'wr-pagination',\n templateUrl: './pagination.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-pagination', '[class]': 'classes()', role: 'navigation', '[attr.aria-label]': 'navLabel()' },\n imports: [WrButton, WrSelect, WrOption],\n})\nexport class WrPagination {\n /**\n * Currently displayed page (1-based). Two-way bindable.\n *\n * `page` rather than `currentPage` since v14, so this and `<wr-table>` — which\n * renders one of these in its own footer — spell the two concepts they share\n * one way each. It also names the output: a `model()` called `X` forces\n * `(XChange)`, so the old name produced `(currentPageChange)` against the\n * table's `(pageChange)`.\n */\n readonly page = model<number>(1);\n\n /** Items per page. Two-way bindable. */\n readonly pageSize = model<number>(10);\n\n /** Total item count across all pages. */\n readonly total = input(0, { transform: wrNumAttr(0) });\n\n /** Options shown in the page-size dropdown. */\n readonly pageSizeOptions = input<readonly number[]>([10, 20, 50, 100]);\n\n /** Render the page-size dropdown. @default false */\n readonly showSizeChanger = input(false, { transform: coerceBooleanProperty });\n\n /** Render the \"X–Y of Z\" total label. @default false */\n readonly showTotal = input(false, { transform: coerceBooleanProperty });\n\n /** Horizontal alignment. @default 'start' */\n readonly align = input<WrPaginationAlign>('start');\n\n /** Size variant — cascades to every internal button. @default 'sm' */\n readonly size = input<WrPaginationSize>('sm');\n\n /** Cell corner treatment. @default 'rounded' */\n readonly shape = input<WrPaginationShape>('rounded');\n\n /** Disable interaction. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Collapse to a compact `‹ page / total ›` pager when the control's own box\n * is too narrow for the full numbered strip (a container query on its own\n * width, not the viewport). @default false\n */\n readonly responsive = input(false, { transform: coerceBooleanProperty });\n\n /** Previous-page button aria-label. Falls back to `pagination.prev`. */\n readonly prevLabel = input<string | null>(null);\n\n /** Next-page button aria-label. Falls back to `pagination.next`. */\n readonly nextLabel = input<string | null>(null);\n\n /** \"Items per page\" label. Falls back to `pagination.itemsPerPage`. */\n readonly itemsPerPageLabel = input<string | null>(null);\n\n /** Accessible name for the `role=\"navigation\"` host. Falls back to `pagination.label`. */\n readonly label = input<string | null>(null);\n\n /** Resolved labels. */\n protected readonly resolvedPrev = useI18nText(this.prevLabel, 'pagination.prev', 'Previous page');\n protected readonly resolvedNext = useI18nText(this.nextLabel, 'pagination.next', 'Next page');\n protected readonly resolvedItemsPerPage = useI18nText(\n this.itemsPerPageLabel,\n 'pagination.itemsPerPage',\n 'Items per page'\n );\n\n /**\n * Page-size option text — interpolates `{{size}}`. Was the template literal\n * `{{ option }} / page`, which no catalog could reach, so a Russian UI read\n * \"25 / page\".\n */\n protected readonly perPage = useI18nFormatter('pagination.perPage', '{{size}} / page');\n\n /** Per-page-button aria-label — interpolates `{{page}}`. */\n protected readonly goToPage = useI18nFormatter('pagination.goToPage', 'Go to page {{page}}');\n\n /** The nav landmark's own accessible name — was a hardcoded English literal. */\n protected readonly navLabel = useI18nText(this.label, 'pagination.label', 'Pagination');\n\n /** Internal: total page count. */\n /**\n * A page size that is not a positive number yields ONE page, not `Infinity`.\n *\n * `pageSize` is a `model()`, so Angular offers no `transform` to coerce it and\n * whatever the host writes arrives raw. At 0 the division is `Infinity`,\n * `Math.max(1, …)` keeps it, and the item list below pushes `total` as the\n * last page — so the strip rendered a clickable cell reading \"Infinity\", and\n * clicking it locked the tab. `NaN` (a `pageSize` bound to an emptied number\n * field) came through untouched for the same reason.\n *\n * One page is the honest answer: a size of zero describes no paging at all.\n * Note this is about `pageSize` and does NOT touch the recorded contract\n * about `total` — pagination still refuses to pull the page DOWN while\n * `total` is at or below zero, because 0 is ambiguous with \"still loading\".\n */\n private readonly usablePageSize = computed(() => {\n const size = this.pageSize();\n if (Number.isFinite(size) && size >= 1) return size;\n // Everything on one page. Deliberately not `Infinity`, which gives the\n // right page COUNT by accident and then puts `Infinity` in the range label\n // the moment `page` is above 1.\n return Math.max(1, this.total());\n });\n\n protected readonly totalPages = computed(() => Math.max(1, Math.ceil(this.total() / this.usablePageSize())));\n\n /**\n * Internal: where the previous arrow goes. Clamped to the end of the valid\n * range rather than being a plain `page() - 1`, because the page can\n * legitimately sit past that end while `total` is 0 (see the guard effect).\n * From page 5 of one page, `goTo(4)` is refused as out of range, so the arrow\n * was enabled and did nothing — and under `responsive` on a narrow box the\n * numbered cells are hidden by a container query, which left no way back at\n * all. `Math.min` only ever moves the target INWARD, so `goTo`'s own\n * past-the-end refusal keeps working as the backstop it is.\n */\n protected readonly prevPage = computed(() => Math.min(this.page() - 1, this.totalPages()));\n\n /**\n * Internal: the \"1–10 of 235\" line, as ONE catalog template.\n *\n * It used to be `` `${start}-${end} ${of} ${total}` ``, which localised the\n * word in the middle and nothing else: the ASCII hyphen between the bounds and\n * the operand order were both frozen in TypeScript, so ja-JP and ar-SA got\n * English word order and no language could change the range separator. The\n * three numbers go through `Intl.NumberFormat` for the same reason the total\n * beside them does — a five-figure total needs the locale's grouping, and\n * ar-SA needs its own digits.\n *\n * The `ofLabel` input is gone with it: an input for the middle word is the\n * concatenation, re-offered as API.\n */\n protected readonly rangeLabel = computed(() => {\n // The same guarded size, or the range label reads \"1 – NaN of 100\".\n const size = this.usablePageSize();\n const start = this.total() === 0 ? 0 : (this.page() - 1) * size + 1;\n const end = Math.min(this.page() * size, this.total());\n return this.rangeText({\n from: this.number(start),\n to: this.number(end),\n total: this.number(this.total()),\n });\n });\n\n /** Internal: the compact pager's `1 / 24`, likewise a catalog template. */\n protected readonly compactLabel = computed(() =>\n this.compactText({ current: this.number(this.page()), total: this.number(this.totalPages()) })\n );\n\n private readonly rangeText = useI18nFormatter('pagination.range', '{{from}}–{{to}} of {{total}}');\n private readonly compactText = useI18nFormatter('pagination.compact', '{{current}} / {{total}}');\n\n private readonly locale = inject(LOCALE_ID);\n\n /**\n * Grouped per `LOCALE_ID`. Only the range and the compact pager go through\n * this — a page NUMBER on a button is an identifier, and `1,024` on a button\n * reads as two things.\n */\n private number(value: number): string {\n return new Intl.NumberFormat(this.locale).format(value);\n }\n\n /**\n * Internal: page list with ellipses. Window of 7 visible page slots.\n *\n * 1 … 5 6 [7] 8 9 … 20\n */\n protected readonly pages = computed<readonly PageEntry[]>(() => {\n const total = this.totalPages();\n const current = this.page();\n\n if (total <= 7) {\n return Array.from({ length: total }, (_, i) => i + 1);\n }\n\n const items: PageEntry[] = [1];\n if (current > 4) items.push(ELLIPSIS);\n\n let start: number;\n let end: number;\n if (current <= 4) {\n start = 2;\n end = 5;\n } else if (current >= total - 3) {\n start = total - 4;\n end = total - 1;\n } else {\n start = current - 2;\n end = current + 2;\n }\n\n for (let i = start; i <= end; i++) items.push(i);\n if (current < total - 3) items.push(ELLIPSIS);\n if (end !== total) items.push(total);\n\n return items;\n });\n\n protected readonly ellipsis = ELLIPSIS;\n\n protected readonly classes = computed(() => {\n const parts = [`wr-pagination--${this.align()}`, `wr-pagination--${this.size()}`, `wr-pagination--${this.shape()}`];\n if (this.disabled()) parts.push('wr-pagination--disabled');\n if (this.responsive()) parts.push('wr-pagination--responsive');\n return parts.join(' ');\n });\n\n protected isCurrent(page: number): boolean {\n return this.page() === page;\n }\n\n protected goTo(page: number | typeof ELLIPSIS): void {\n if (typeof page !== 'number') return;\n if (this.disabled() || page < 1 || page > this.totalPages() || page === this.page()) return;\n this.page.set(page);\n }\n\n /**\n * `wr-select` carries an `unknown` value by design, so the size arrives\n * untyped and is narrowed here. It used to arrive as `any` through\n * `[ngModel]`, which hid the coercion rather than removing the need for it.\n */\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('pagination');\n // `page` is a plain `model` — a `model()` takes no transform — so a\n // shrinking `total` and a host `[(page)]` write both land in it\n // unchecked. The guard used to read and write the page inside `untracked()`\n // and pull DOWNWARDS only, so it fired when `total` / `pageSize` moved and\n // never when the host wrote: past the end no cell carries `aria-current`,\n // the arrow at that end stays enabled and inert (`goTo` refuses the step\n // rather than correcting the stored page), and below 1 `rangeLabel()` counts\n // backwards (\"-9-0 of 120\"). Two-sided and tracked, the same shape\n // `wr-stepper` and `wr-carousel` use for their own host-owned `model()`.\n //\n // Only the UPPER bound is conditional. A `total` at or below 0 is the one\n // value where pulling the page down is destructive rather than cosmetic:\n // there is no `loading` input, so 0 is genuinely ambiguous between \"the\n // list is empty\" and \"the page is still in flight\", and the second is the\n // ordinary state of a server-paged host — Angular's `resource` drops its\n // value whenever the params change, and a params function returning an\n // object literal is never reference-equal, so `total` reads 0 between the\n // click and the response. `totalPages()` is 1 there, so the guard pulled\n // every page above the first back to 1 and emitted a `pageChange`\n // the host could not tell from a click: the pager could not leave page 1,\n // and each click cost two events. A negative `total` is folded into the\n // same branch because it is as meaningless as a zero one.\n //\n // The LOWER bound is unconditional, and gating it on `total` was a mistake\n // in the first cut of this fix: no value of `total` makes page 0 correct,\n // and while it was skipped a host write of -3 survived — `rangeLabel()`\n // guards `start` for an empty total and not `end`, so it read \"0--30 of 0\",\n // and the compact pager read \"-3 / 1\". It is written as one expression\n // rather than an early return so the effect depends on `page()` and\n // `total()` on every run, whichever branch decides the result.\n //\n // What IS still given up while `total` is 0 and the held page is past the\n // first: no cell carries `aria-current`, because `pages` renders the single\n // page and that is not the page the host holds. `rangeLabel()` is not in\n // that list — it already special-cases an empty total and reads \"0-0 of 0\".\n // Nor are the arrows: they compare against the RANGE rather than its ends\n // (see the template), so past the end next renders disabled and prev stays\n // enabled and steps back INTO range via `prevPage`. That is a change from\n // the \"enabled and inert\" behaviour described above, which this component\n // used to accept at both ends.\n effect(() => {\n const page = this.page();\n const floored = Math.max(1, page);\n const clamped = this.total() <= 0 ? floored : Math.min(floored, this.totalPages());\n if (clamped !== page) this.page.set(clamped);\n });\n }\n\n protected onSizeChange(size: unknown): void {\n const next = Number(size);\n if (this.disabled() || !Number.isFinite(next) || next <= 0 || next === this.pageSize()) return;\n // The size and nothing else. This used to clamp the page against the new\n // size too, and it read a value that was already superseded: `pageSize.set`\n // emits `pageSizeChange` synchronously, so by the following statement the\n // host has run its own policy — most tables reset to the first page — and\n // that write has not reached the model yet, it arrives on the next binding\n // pass. So the clamp computed a cap from the PRE-change page and wrote the\n // result over the host's decision: from page 6 at size 10, choosing 25\n // emitted `pageChange(5)` on top of the host's reset to 1, which the\n // host cannot tell from a navigation, and a second request went out. The\n // guard effect in the constructor takes it over and runs once the bindings\n // have settled, so it clamps the page the host actually wants.\n //\n // For a SETTLED `total` that is the whole story. For the server-paged host\n // this fix exists for it is not: the size change invalidates the payload\n // too, so `total` reads 0 and the guard returns early. Measured, from page\n // 6 at size 10 choosing 25 with a host that does not reset — in flight:\n // `navigations []`, page 6, total 0; after settle: `navigations [5]`, page\n // 5. So a non-resetting host issues one doomed request for a page that no\n // longer exists and is corrected only when the answer lands. That is an\n // accepted cost of refusing to write back from transient state, not\n // something the guard covers.\n this.pageSize.set(next);\n }\n}\n","<div class=\"wr-pagination__inner\">\n @if (showTotal()) {\n <span class=\"wr-pagination__total\">{{ rangeLabel() }}</span>\n }\n\n <div class=\"wr-pagination__nav\">\n <!--\n `wr-pagination__nav-btn` exists so the stylesheet can mirror the arrow\n glyph under `dir=\"rtl\"`. A class rather than `:first-child` /\n `:last-child` on the row: those two positions do hold today — which is why\n the `--square` end caps use them — but only while the prev button, the\n compact label and the next button all stay unconditional and in this\n order. A mirror keyed to position would follow a reorder, or land on a\n page cell, without a word.\n\n The two `[disabled]` bindings compare against the RANGE (`<= 1`,\n `>= totalPages()`) rather than for equality with its ends. While `total`\n is 0 the guard effect stops enforcing the upper bound, so the page can\n legitimately sit past `totalPages()` — and `=== totalPages()` reported\n next as enabled there while `goTo` refused the step. Prev is still\n enabled in that state, correctly: `prevPage()` walks it back into range.\n -->\n <wr-btn\n class=\"wr-pagination__nav-btn\"\n [size]=\"size()\"\n outlined\n [attr.aria-label]=\"resolvedPrev()\"\n [disabled]=\"disabled() || page() <= 1\"\n (click)=\"goTo(prevPage())\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/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 >\n <path d=\"m12 19-7-7 7-7\" />\n <path d=\"M19 12H5\" />\n </svg>\n </wr-btn>\n\n <!-- Tracked by page, not by slot: the window slides on every move, and the\n focused button has to stay the page it was. The two ellipses are\n different items, and the leading one is always the second entry. -->\n @for (page of pages(); track page === ellipsis ? ($index === 1 ? 'before' : 'after') : page) {\n @if (page === ellipsis) {\n <span class=\"wr-pagination__ellipsis\">{{ ellipsis }}</span>\n } @else {\n <wr-btn\n class=\"wr-pagination__page\"\n [size]=\"size()\"\n [outlined]=\"!isCurrent(page)\"\n [color]=\"isCurrent(page) ? 'primary' : null\"\n [attr.aria-current]=\"isCurrent(page) ? 'page' : null\"\n [attr.aria-label]=\"goToPage({ page })\"\n [disabled]=\"disabled()\"\n (click)=\"goTo(page)\"\n >\n {{ page }}\n </wr-btn>\n }\n }\n\n <!-- Compact pager — shown only in responsive mode on a narrow box (CSS). Not\n `aria-hidden`: `display: none` already keeps whichever of the two is\n hidden out of the accessibility tree, and on a narrow box this label is\n the only position on screen. -->\n <span class=\"wr-pagination__current\">{{ compactLabel() }}</span>\n\n <wr-btn\n class=\"wr-pagination__nav-btn\"\n [size]=\"size()\"\n outlined\n [attr.aria-label]=\"resolvedNext()\"\n [disabled]=\"disabled() || page() >= totalPages()\"\n (click)=\"goTo(page() + 1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/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 >\n <path d=\"M5 12h14\" />\n <path d=\"m12 5 7 7-7 7\" />\n </svg>\n </wr-btn>\n </div>\n\n @if (showSizeChanger()) {\n <!--\n `ariaLabel`, not `[attr.aria-label]`: `<wr-select>`'s host carries no role,\n so an attribute there names nothing and never reaches the `role=\"combobox\"`\n button inside — the size changer announced itself as the catalog's generic\n \"Select\".\n -->\n <wr-select\n class=\"wr-pagination__size\"\n [ariaLabel]=\"resolvedItemsPerPage()\"\n [size]=\"size()\"\n [disabled]=\"disabled()\"\n [value]=\"pageSize()\"\n (valueChange)=\"onSizeChange($event)\"\n >\n @for (option of pageSizeOptions(); track option) {\n <wr-option [value]=\"option\">{{ perPage({ size: option }) }}</wr-option>\n }\n </wr-select>\n }\n</div>\n"],"mappings":";;;;;;;;;;;;;AAiBA,MAAM,WAAW;AA4BjB,IAAa,eAAb,MAAa,aAAY;CAUd,OAAO,MAAc,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAGvB,WAAW,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAG5B,QAAQ,MAAM,GAAC;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAAI,WAAW,UAAU,CAAC;CAAC,CAAA;CAG1C,kBAAkB,MAAyB;EAAC;EAAI;EAAI;EAAI;CAAG,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,kBAAA,CAAA,+BAAA,CAAA,CAAA;CAG7D,kBAAkB,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WA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A,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,SAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAQ,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;IAAA;GAAA;EAAA;EAAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AAE3B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EAPxB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAe,eAEV,kBAAkB;GAAI,MAC/B;IAAE,OAAO;IAAiB,WAAW;IAAa,MAAM;IAAc,qBAAqB;GAAY;GAAE,SACtG;IAAC;IAAU;IAAU;GAAQ;GAAC,UAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"ngwr-pagination.mjs","names":[],"sources":["../../../projects/lib/pagination/pagination.ts","../../../projects/lib/pagination/pagination.html"],"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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, LOCALE_ID, ViewEncapsulation, computed, effect, inject, input, model } from '@angular/core';\n\nimport { WrButton } from 'ngwr/button';\nimport { useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { WrOption, WrSelect } from 'ngwr/select';\nimport { wrNumAttr, wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrPaginationAlign, WrPaginationShape, WrPaginationSize } from './types';\n\nconst ELLIPSIS = '…' as const;\ntype PageEntry = number | typeof ELLIPSIS;\n\n/**\n * Numbered page navigator with optional total / page-size controls.\n *\n * Two-way binds `page` and `pageSize` via signal `model()` inputs.\n *\n * @example\n * ```html\n * <wr-pagination\n * [total]=\"120\"\n * [(page)]=\"page\"\n * [(pageSize)]=\"size\"\n * showTotal\n * showSizeChanger\n * />\n * ```\n *\n * @see https://ngwr.dev/reference/components/pagination\n */\n@Component({\n selector: 'wr-pagination',\n templateUrl: './pagination.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-pagination', '[class]': 'classes()', role: 'navigation', '[attr.aria-label]': 'navLabel()' },\n imports: [WrButton, WrSelect, WrOption],\n})\nexport class WrPagination {\n /**\n * Currently displayed page (1-based). Two-way bindable.\n *\n * `page` rather than `currentPage` since v14, so this and `<wr-table>` — which\n * renders one of these in its own footer — spell the two concepts they share\n * one way each. It also names the output: a `model()` called `X` forces\n * `(XChange)`, so the old name produced `(currentPageChange)` against the\n * table's `(pageChange)`.\n */\n readonly page = model<number>(1);\n\n /** Items per page. Two-way bindable. */\n readonly pageSize = model<number>(10);\n\n /** Total item count across all pages. */\n readonly total = input(0, { transform: wrNumAttr(0) });\n\n /** Options shown in the page-size dropdown. */\n readonly pageSizeOptions = input<readonly number[]>([10, 20, 50, 100]);\n\n /** Render the page-size dropdown. @default false */\n readonly showSizeChanger = input(false, { transform: coerceBooleanProperty });\n\n /** Render the \"X–Y of Z\" total label. @default false */\n readonly showTotal = input(false, { transform: coerceBooleanProperty });\n\n /** Horizontal alignment. @default 'start' */\n readonly align = input<WrPaginationAlign>('start');\n\n /** Size variant — cascades to every internal button. @default 'sm' */\n readonly size = input<WrPaginationSize>('sm');\n\n /** Cell corner treatment. @default 'rounded' */\n readonly shape = input<WrPaginationShape>('rounded');\n\n /** Disable interaction. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Collapse to a compact `‹ page / total ›` pager when the control's own box\n * is too narrow for the full numbered strip (a container query on its own\n * width, not the viewport). @default false\n */\n readonly responsive = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Render nothing while everything fits on one page, an empty list included.\n * The host stays in the DOM with `display: none`: no layout box, no tab stop,\n * no landmark, and the total label goes with the strip. With\n * `showSizeChanger` it hides only when the smallest size on offer also gives\n * one page, so choosing a large size cannot remove the way back.\n * @default false\n */\n readonly hideOnSinglePage = input(false, { transform: coerceBooleanProperty });\n\n /** Previous-page button aria-label. Falls back to `pagination.prev`. */\n readonly prevLabel = input<string | null>(null);\n\n /** Next-page button aria-label. Falls back to `pagination.next`. */\n readonly nextLabel = input<string | null>(null);\n\n /** \"Items per page\" label. Falls back to `pagination.itemsPerPage`. */\n readonly itemsPerPageLabel = input<string | null>(null);\n\n /** Accessible name for the `role=\"navigation\"` host. Falls back to `pagination.label`. */\n readonly label = input<string | null>(null);\n\n /** Resolved labels. */\n protected readonly resolvedPrev = useI18nText(this.prevLabel, 'pagination.prev', 'Previous page');\n protected readonly resolvedNext = useI18nText(this.nextLabel, 'pagination.next', 'Next page');\n protected readonly resolvedItemsPerPage = useI18nText(\n this.itemsPerPageLabel,\n 'pagination.itemsPerPage',\n 'Items per page'\n );\n\n /**\n * Page-size option text — interpolates `{{size}}`. Was the template literal\n * `{{ option }} / page`, which no catalog could reach, so a Russian UI read\n * \"25 / page\".\n */\n protected readonly perPage = useI18nFormatter('pagination.perPage', '{{size}} / page');\n\n /** Per-page-button aria-label — interpolates `{{page}}`. */\n protected readonly goToPage = useI18nFormatter('pagination.goToPage', 'Go to page {{page}}');\n\n /** The nav landmark's own accessible name — was a hardcoded English literal. */\n protected readonly navLabel = useI18nText(this.label, 'pagination.label', 'Pagination');\n\n /** Internal: total page count. */\n /**\n * A page size that is not a positive number yields ONE page, not `Infinity`.\n *\n * `pageSize` is a `model()`, so Angular offers no `transform` to coerce it and\n * whatever the host writes arrives raw. At 0 the division is `Infinity`,\n * `Math.max(1, …)` keeps it, and the item list below pushes `total` as the\n * last page — so the strip rendered a clickable cell reading \"Infinity\", and\n * clicking it locked the tab. `NaN` (a `pageSize` bound to an emptied number\n * field) came through untouched for the same reason.\n *\n * One page is the honest answer: a size of zero describes no paging at all.\n * Note this is about `pageSize` and does NOT touch the recorded contract\n * about `total` — pagination still refuses to pull the page DOWN while\n * `total` is at or below zero, because 0 is ambiguous with \"still loading\".\n */\n private readonly usablePageSize = computed(() => {\n const size = this.pageSize();\n if (Number.isFinite(size) && size >= 1) return size;\n // Everything on one page. Deliberately not `Infinity`, which gives the\n // right page COUNT by accident and then puts `Infinity` in the range label\n // the moment `page` is above 1.\n return Math.max(1, this.total());\n });\n\n protected readonly totalPages = computed(() => Math.max(1, Math.ceil(this.total() / this.usablePageSize())));\n\n /** Internal: whether `hideOnSinglePage` applies right now. */\n protected readonly hidden = computed(() => {\n if (!this.hideOnSinglePage()) return false;\n if (!this.showSizeChanger()) return this.totalPages() <= 1;\n const offered = this.pageSizeOptions().filter(size => Number.isFinite(size) && size >= 1);\n return this.total() <= Math.min(this.usablePageSize(), ...offered);\n });\n\n /**\n * Internal: where the previous arrow goes. Clamped to the end of the valid\n * range rather than being a plain `page() - 1`, because the page can\n * legitimately sit past that end while `total` is 0 (see the guard effect).\n * From page 5 of one page, `goTo(4)` is refused as out of range, so the arrow\n * was enabled and did nothing — and under `responsive` on a narrow box the\n * numbered cells are hidden by a container query, which left no way back at\n * all. `Math.min` only ever moves the target INWARD, so `goTo`'s own\n * past-the-end refusal keeps working as the backstop it is.\n */\n protected readonly prevPage = computed(() => Math.min(this.page() - 1, this.totalPages()));\n\n /**\n * Internal: the \"1–10 of 235\" line, as ONE catalog template.\n *\n * It used to be `` `${start}-${end} ${of} ${total}` ``, which localised the\n * word in the middle and nothing else: the ASCII hyphen between the bounds and\n * the operand order were both frozen in TypeScript, so ja-JP and ar-SA got\n * English word order and no language could change the range separator. The\n * three numbers go through `Intl.NumberFormat` for the same reason the total\n * beside them does — a five-figure total needs the locale's grouping, and\n * ar-SA needs its own digits.\n *\n * The `ofLabel` input is gone with it: an input for the middle word is the\n * concatenation, re-offered as API.\n */\n protected readonly rangeLabel = computed(() => {\n // The same guarded size, or the range label reads \"1 – NaN of 100\".\n const size = this.usablePageSize();\n const start = this.total() === 0 ? 0 : (this.page() - 1) * size + 1;\n const end = Math.min(this.page() * size, this.total());\n return this.rangeText({\n from: this.number(start),\n to: this.number(end),\n total: this.number(this.total()),\n });\n });\n\n /** Internal: the compact pager's `1 / 24`, likewise a catalog template. */\n protected readonly compactLabel = computed(() =>\n this.compactText({ current: this.number(this.page()), total: this.number(this.totalPages()) })\n );\n\n private readonly rangeText = useI18nFormatter('pagination.range', '{{from}}–{{to}} of {{total}}');\n private readonly compactText = useI18nFormatter('pagination.compact', '{{current}} / {{total}}');\n\n private readonly locale = inject(LOCALE_ID);\n\n /**\n * Grouped per `LOCALE_ID`. Only the range and the compact pager go through\n * this — a page NUMBER on a button is an identifier, and `1,024` on a button\n * reads as two things.\n */\n private number(value: number): string {\n return new Intl.NumberFormat(this.locale).format(value);\n }\n\n /**\n * Internal: page list with ellipses. Window of 7 visible page slots.\n *\n * 1 … 5 6 [7] 8 9 … 20\n */\n protected readonly pages = computed<readonly PageEntry[]>(() => {\n const total = this.totalPages();\n const current = this.page();\n\n if (total <= 7) {\n return Array.from({ length: total }, (_, i) => i + 1);\n }\n\n const items: PageEntry[] = [1];\n if (current > 4) items.push(ELLIPSIS);\n\n let start: number;\n let end: number;\n if (current <= 4) {\n start = 2;\n end = 5;\n } else if (current >= total - 3) {\n start = total - 4;\n end = total - 1;\n } else {\n start = current - 2;\n end = current + 2;\n }\n\n for (let i = start; i <= end; i++) items.push(i);\n if (current < total - 3) items.push(ELLIPSIS);\n if (end !== total) items.push(total);\n\n return items;\n });\n\n protected readonly ellipsis = ELLIPSIS;\n\n protected readonly classes = computed(() => {\n const parts = [`wr-pagination--${this.align()}`, `wr-pagination--${this.size()}`, `wr-pagination--${this.shape()}`];\n if (this.disabled()) parts.push('wr-pagination--disabled');\n if (this.responsive()) parts.push('wr-pagination--responsive');\n if (this.hidden()) parts.push('wr-pagination--hidden');\n return parts.join(' ');\n });\n\n protected isCurrent(page: number): boolean {\n return this.page() === page;\n }\n\n protected goTo(page: number | typeof ELLIPSIS): void {\n if (typeof page !== 'number') return;\n if (this.disabled() || page < 1 || page > this.totalPages() || page === this.page()) return;\n this.page.set(page);\n }\n\n /**\n * `wr-select` carries an `unknown` value by design, so the size arrives\n * untyped and is narrowed here. It used to arrive as `any` through\n * `[ngModel]`, which hid the coercion rather than removing the need for it.\n */\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('pagination');\n // `page` is a plain `model` — a `model()` takes no transform — so a\n // shrinking `total` and a host `[(page)]` write both land in it\n // unchecked. The guard used to read and write the page inside `untracked()`\n // and pull DOWNWARDS only, so it fired when `total` / `pageSize` moved and\n // never when the host wrote: past the end no cell carries `aria-current`,\n // the arrow at that end stays enabled and inert (`goTo` refuses the step\n // rather than correcting the stored page), and below 1 `rangeLabel()` counts\n // backwards (\"-9-0 of 120\"). Two-sided and tracked, the same shape\n // `wr-stepper` and `wr-carousel` use for their own host-owned `model()`.\n //\n // Only the UPPER bound is conditional. A `total` at or below 0 is the one\n // value where pulling the page down is destructive rather than cosmetic:\n // there is no `loading` input, so 0 is genuinely ambiguous between \"the\n // list is empty\" and \"the page is still in flight\", and the second is the\n // ordinary state of a server-paged host — Angular's `resource` drops its\n // value whenever the params change, and a params function returning an\n // object literal is never reference-equal, so `total` reads 0 between the\n // click and the response. `totalPages()` is 1 there, so the guard pulled\n // every page above the first back to 1 and emitted a `pageChange`\n // the host could not tell from a click: the pager could not leave page 1,\n // and each click cost two events. A negative `total` is folded into the\n // same branch because it is as meaningless as a zero one.\n //\n // The LOWER bound is unconditional, and gating it on `total` was a mistake\n // in the first cut of this fix: no value of `total` makes page 0 correct,\n // and while it was skipped a host write of -3 survived — `rangeLabel()`\n // guards `start` for an empty total and not `end`, so it read \"0--30 of 0\",\n // and the compact pager read \"-3 / 1\". It is written as one expression\n // rather than an early return so the effect depends on `page()` and\n // `total()` on every run, whichever branch decides the result.\n //\n // What IS still given up while `total` is 0 and the held page is past the\n // first: no cell carries `aria-current`, because `pages` renders the single\n // page and that is not the page the host holds. `rangeLabel()` is not in\n // that list — it already special-cases an empty total and reads \"0-0 of 0\".\n // Nor are the arrows: they compare against the RANGE rather than its ends\n // (see the template), so past the end next renders disabled and prev stays\n // enabled and steps back INTO range via `prevPage`. That is a change from\n // the \"enabled and inert\" behaviour described above, which this component\n // used to accept at both ends.\n effect(() => {\n const page = this.page();\n const floored = Math.max(1, page);\n const clamped = this.total() <= 0 ? floored : Math.min(floored, this.totalPages());\n if (clamped !== page) this.page.set(clamped);\n });\n }\n\n protected onSizeChange(size: unknown): void {\n const next = Number(size);\n if (this.disabled() || !Number.isFinite(next) || next <= 0 || next === this.pageSize()) return;\n // The size and nothing else. This used to clamp the page against the new\n // size too, and it read a value that was already superseded: `pageSize.set`\n // emits `pageSizeChange` synchronously, so by the following statement the\n // host has run its own policy — most tables reset to the first page — and\n // that write has not reached the model yet, it arrives on the next binding\n // pass. So the clamp computed a cap from the PRE-change page and wrote the\n // result over the host's decision: from page 6 at size 10, choosing 25\n // emitted `pageChange(5)` on top of the host's reset to 1, which the\n // host cannot tell from a navigation, and a second request went out. The\n // guard effect in the constructor takes it over and runs once the bindings\n // have settled, so it clamps the page the host actually wants.\n //\n // For a SETTLED `total` that is the whole story. For the server-paged host\n // this fix exists for it is not: the size change invalidates the payload\n // too, so `total` reads 0 and the guard returns early. Measured, from page\n // 6 at size 10 choosing 25 with a host that does not reset — in flight:\n // `navigations []`, page 6, total 0; after settle: `navigations [5]`, page\n // 5. So a non-resetting host issues one doomed request for a page that no\n // longer exists and is corrected only when the answer lands. That is an\n // accepted cost of refusing to write back from transient state, not\n // something the guard covers.\n this.pageSize.set(next);\n }\n}\n","@if (!hidden()) {\n <div class=\"wr-pagination__inner\">\n @if (showTotal()) {\n <span class=\"wr-pagination__total\">{{ rangeLabel() }}</span>\n }\n\n <div class=\"wr-pagination__nav\">\n <!--\n `wr-pagination__nav-btn` exists so the stylesheet can mirror the arrow\n glyph under `dir=\"rtl\"`. A class rather than `:first-child` /\n `:last-child` on the row: those two positions do hold today — which is why\n the `--square` end caps use them — but only while the prev button, the\n compact label and the next button all stay unconditional and in this\n order. A mirror keyed to position would follow a reorder, or land on a\n page cell, without a word.\n\n The two `[disabled]` bindings compare against the RANGE (`<= 1`,\n `>= totalPages()`) rather than for equality with its ends. While `total`\n is 0 the guard effect stops enforcing the upper bound, so the page can\n legitimately sit past `totalPages()` — and `=== totalPages()` reported\n next as enabled there while `goTo` refused the step. Prev is still\n enabled in that state, correctly: `prevPage()` walks it back into range.\n -->\n <wr-btn\n class=\"wr-pagination__nav-btn\"\n [size]=\"size()\"\n outlined\n [attr.aria-label]=\"resolvedPrev()\"\n [disabled]=\"disabled() || page() <= 1\"\n (click)=\"goTo(prevPage())\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/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 >\n <path d=\"m12 19-7-7 7-7\" />\n <path d=\"M19 12H5\" />\n </svg>\n </wr-btn>\n\n <!-- Tracked by page, not by slot: the window slides on every move, and the\n focused button has to stay the page it was. The two ellipses are\n different items, and the leading one is always the second entry. -->\n @for (page of pages(); track page === ellipsis ? ($index === 1 ? 'before' : 'after') : page) {\n @if (page === ellipsis) {\n <span class=\"wr-pagination__ellipsis\">{{ ellipsis }}</span>\n } @else {\n <wr-btn\n class=\"wr-pagination__page\"\n [size]=\"size()\"\n [outlined]=\"!isCurrent(page)\"\n [color]=\"isCurrent(page) ? 'primary' : null\"\n [attr.aria-current]=\"isCurrent(page) ? 'page' : null\"\n [attr.aria-label]=\"goToPage({ page })\"\n [disabled]=\"disabled()\"\n (click)=\"goTo(page)\"\n >\n {{ page }}\n </wr-btn>\n }\n }\n\n <!-- Compact pager — shown only in responsive mode on a narrow box (CSS). Not\n `aria-hidden`: `display: none` already keeps whichever of the two is\n hidden out of the accessibility tree, and on a narrow box this label is\n the only position on screen. -->\n <span class=\"wr-pagination__current\">{{ compactLabel() }}</span>\n\n <wr-btn\n class=\"wr-pagination__nav-btn\"\n [size]=\"size()\"\n outlined\n [attr.aria-label]=\"resolvedNext()\"\n [disabled]=\"disabled() || page() >= totalPages()\"\n (click)=\"goTo(page() + 1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/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 >\n <path d=\"M5 12h14\" />\n <path d=\"m12 5 7 7-7 7\" />\n </svg>\n </wr-btn>\n </div>\n\n @if (showSizeChanger()) {\n <!--\n `ariaLabel`, not `[attr.aria-label]`: `<wr-select>`'s host carries no role,\n so an attribute there names nothing and never reaches the `role=\"combobox\"`\n button inside — the size changer announced itself as the catalog's generic\n \"Select\".\n -->\n <wr-select\n class=\"wr-pagination__size\"\n [ariaLabel]=\"resolvedItemsPerPage()\"\n [size]=\"size()\"\n [disabled]=\"disabled()\"\n [value]=\"pageSize()\"\n (valueChange)=\"onSizeChange($event)\"\n >\n @for (option of pageSizeOptions(); track option) {\n <wr-option [value]=\"option\">{{ perPage({ size: option }) }}</wr-option>\n }\n </wr-select>\n }\n </div>\n}\n"],"mappings":";;;;;;;;;;;;;AAiBA,MAAM,WAAW;AA4BjB,IAAa,eAAb,MAAa,aAAY;CAUd,OAAO,MAAc,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAGvB,WAAW,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAG5B,QAAQ,MAAM,GAAC;E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