@nanahoshi/mona-ui 0.27.1 → 0.28.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 (359) hide show
  1. package/docs/api/auto-complete.md +67 -0
  2. package/docs/api/avatar.md +31 -0
  3. package/docs/api/breadcrumb.md +74 -0
  4. package/docs/api/button-group.md +71 -0
  5. package/docs/api/button.md +84 -0
  6. package/docs/api/calendar.md +123 -0
  7. package/docs/api/card.md +97 -0
  8. package/docs/api/chart.md +4380 -0
  9. package/docs/api/check-box.md +70 -0
  10. package/docs/api/chip.md +55 -0
  11. package/docs/api/circular-progress-bar.md +71 -0
  12. package/docs/api/collapsible.md +71 -0
  13. package/docs/api/color-gradient.md +54 -0
  14. package/docs/api/color-palette.md +52 -0
  15. package/docs/api/color-picker.md +89 -0
  16. package/docs/api/combo-box.md +69 -0
  17. package/docs/api/command.md +282 -0
  18. package/docs/api/common.md +599 -0
  19. package/docs/api/contextmenu.md +239 -0
  20. package/docs/api/date-input.md +119 -0
  21. package/docs/api/date-picker.md +67 -0
  22. package/docs/api/datetime-picker.md +72 -0
  23. package/docs/api/dialog.md +291 -0
  24. package/docs/api/dropdown-button.md +248 -0
  25. package/docs/api/dropdown-list.md +72 -0
  26. package/docs/api/dropdowns.md +172 -0
  27. package/docs/api/editor.md +117 -0
  28. package/docs/api/expansion-panel.md +85 -0
  29. package/docs/api/fieldset.md +33 -0
  30. package/docs/api/filter.md +116 -0
  31. package/docs/api/grid.md +1445 -0
  32. package/docs/api/i18n.md +1699 -0
  33. package/docs/api/label.md +58 -0
  34. package/docs/api/list-box.md +301 -0
  35. package/docs/api/list-view.md +294 -0
  36. package/docs/api/list.md +119 -0
  37. package/docs/api/locales.md +134 -0
  38. package/docs/api/menubar.md +275 -0
  39. package/docs/api/multi-select.md +92 -0
  40. package/docs/api/notification.md +164 -0
  41. package/docs/api/numeric-text-box.md +130 -0
  42. package/docs/api/otp-input.md +100 -0
  43. package/docs/api/pager.md +371 -0
  44. package/docs/api/placeholder.md +18 -0
  45. package/docs/api/popover.md +170 -0
  46. package/docs/api/popup-menu.md +328 -0
  47. package/docs/api/popup.md +299 -0
  48. package/docs/api/progress-bar.md +79 -0
  49. package/docs/api/query.md +367 -0
  50. package/docs/api/radio-button.md +113 -0
  51. package/docs/api/rating.md +187 -0
  52. package/docs/api/scroll-view.md +93 -0
  53. package/docs/api/segmented.md +114 -0
  54. package/docs/api/sheet.md +65 -0
  55. package/docs/api/sidebar.md +583 -0
  56. package/docs/api/skeleton.md +26 -0
  57. package/docs/api/slider.md +173 -0
  58. package/docs/api/spinner.md +132 -0
  59. package/docs/api/split-button.md +261 -0
  60. package/docs/api/splitter.md +57 -0
  61. package/docs/api/stepper.md +148 -0
  62. package/docs/api/switch.md +78 -0
  63. package/docs/api/tabs.md +139 -0
  64. package/docs/api/text-area.md +20 -0
  65. package/docs/api/text-box.md +106 -0
  66. package/docs/api/theme.md +627 -0
  67. package/docs/api/time-picker.md +69 -0
  68. package/docs/api/time-selector.md +54 -0
  69. package/docs/api/tooltip.md +112 -0
  70. package/docs/api/tree-view.md +631 -0
  71. package/docs/api/window.md +245 -0
  72. package/docs/auto-complete.md +28 -329
  73. package/docs/avatar.md +4 -24
  74. package/docs/breadcrumb.md +10 -65
  75. package/docs/button-group.md +7 -60
  76. package/docs/button.md +8 -67
  77. package/docs/calendar.md +16 -121
  78. package/docs/card.md +16 -79
  79. package/docs/chart-bar.md +16 -234
  80. package/docs/chart-financial.md +10 -121
  81. package/docs/chart-funnel.md +13 -176
  82. package/docs/chart-heatmap.md +15 -131
  83. package/docs/chart-line-area.md +12 -137
  84. package/docs/chart-pie.md +17 -221
  85. package/docs/chart-radar.md +13 -129
  86. package/docs/chart-radial.md +13 -211
  87. package/docs/chart-scatter.md +6 -74
  88. package/docs/chart-treemap.md +14 -196
  89. package/docs/chart.md +168 -1892
  90. package/docs/checkbox.md +5 -61
  91. package/docs/chip.md +7 -42
  92. package/docs/circular-progress-bar.md +9 -61
  93. package/docs/collapsible.md +5 -87
  94. package/docs/color-gradient.md +8 -81
  95. package/docs/color-palette.md +7 -69
  96. package/docs/color-picker.md +9 -105
  97. package/docs/combo-box.md +28 -331
  98. package/docs/command.md +25 -236
  99. package/docs/contextmenu.md +15 -140
  100. package/docs/date-picker.md +7 -110
  101. package/docs/datetime-picker.md +7 -129
  102. package/docs/decimal-textbox.md +6 -69
  103. package/docs/dialog.md +23 -263
  104. package/docs/dropdown-button.md +15 -146
  105. package/docs/dropdown-list.md +29 -332
  106. package/docs/editor.md +10 -164
  107. package/docs/expansion-panel.md +7 -69
  108. package/docs/fieldset.md +5 -24
  109. package/docs/grid-columns.md +12 -92
  110. package/docs/grid-editing.md +29 -291
  111. package/docs/grid-grouping.md +11 -50
  112. package/docs/grid-rows.md +10 -74
  113. package/docs/grid-selection.md +7 -36
  114. package/docs/grid-server.md +8 -293
  115. package/docs/grid-sorting-filtering.md +10 -333
  116. package/docs/grid-state-export.md +17 -228
  117. package/docs/grid.md +23 -216
  118. package/docs/input.md +7 -19
  119. package/docs/installation.md +147 -15
  120. package/docs/introduction.md +37 -15
  121. package/docs/label.md +8 -39
  122. package/docs/list-box.md +21 -253
  123. package/docs/list-view.md +25 -232
  124. package/docs/menubar.md +21 -167
  125. package/docs/multi-select.md +31 -350
  126. package/docs/notification.md +17 -116
  127. package/docs/numeric-textbox.md +9 -78
  128. package/docs/otp-input.md +9 -95
  129. package/docs/pager.md +19 -239
  130. package/docs/placeholder.md +5 -18
  131. package/docs/popover.md +13 -123
  132. package/docs/popup-menu.md +22 -243
  133. package/docs/popup.md +24 -248
  134. package/docs/progress-bar.md +10 -75
  135. package/docs/radio-button.md +8 -96
  136. package/docs/range-slider.md +9 -82
  137. package/docs/rating.md +15 -163
  138. package/docs/scroll-view.md +9 -86
  139. package/docs/segmented.md +8 -90
  140. package/docs/sheet.md +10 -74
  141. package/docs/sidebar-menus.md +20 -155
  142. package/docs/sidebar-state.md +16 -134
  143. package/docs/sidebar.md +18 -218
  144. package/docs/skeleton.md +5 -26
  145. package/docs/slider.md +9 -97
  146. package/docs/spinner.md +15 -95
  147. package/docs/split-button.md +21 -166
  148. package/docs/splitter.md +9 -56
  149. package/docs/stepper.md +13 -127
  150. package/docs/switch.md +8 -58
  151. package/docs/tabs.md +13 -111
  152. package/docs/textarea.md +4 -13
  153. package/docs/textbox.md +10 -77
  154. package/docs/theming-built-in-themes.md +67 -0
  155. package/docs/theming-custom-colors.md +274 -0
  156. package/docs/theming-custom-themes.md +168 -0
  157. package/docs/theming.md +164 -248
  158. package/docs/time-picker.md +7 -112
  159. package/docs/tooltip-directive.md +12 -96
  160. package/docs/tooltip.md +12 -96
  161. package/docs/tree-view.md +42 -495
  162. package/docs/window.md +19 -230
  163. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1089 -603
  164. package/fesm2022/nanahoshi-mona-ui-avatar.mjs +369 -184
  165. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +658 -371
  166. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +513 -359
  167. package/fesm2022/nanahoshi-mona-ui-button.mjs +622 -517
  168. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +2070 -1573
  169. package/fesm2022/nanahoshi-mona-ui-card.mjs +620 -316
  170. package/fesm2022/nanahoshi-mona-ui-chart.mjs +61151 -64921
  171. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +646 -317
  172. package/fesm2022/nanahoshi-mona-ui-chip.mjs +737 -516
  173. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +441 -242
  174. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +443 -389
  175. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1138 -814
  176. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +1114 -959
  177. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +858 -504
  178. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1181 -742
  179. package/fesm2022/nanahoshi-mona-ui-command.mjs +1454 -853
  180. package/fesm2022/nanahoshi-mona-ui-common.mjs +569 -740
  181. package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +978 -532
  182. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +283 -254
  183. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +973 -451
  184. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +1203 -658
  185. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +1415 -936
  186. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1165 -568
  187. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1142 -677
  188. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +1018 -729
  189. package/fesm2022/nanahoshi-mona-ui-editor.mjs +3589 -2122
  190. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +577 -359
  191. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +311 -151
  192. package/fesm2022/nanahoshi-mona-ui-filter.mjs +1086 -718
  193. package/fesm2022/nanahoshi-mona-ui-grid-grid-colgroup.component-NhONCVIX.mjs +77 -0
  194. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-Djv8ZnT5.mjs +480 -0
  195. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-WbXAzGCa.mjs +470 -0
  196. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-DkWTD3pN.mjs +2115 -0
  197. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DAHqTwBJ.mjs +330 -0
  198. package/fesm2022/nanahoshi-mona-ui-grid-grid.styles-BmLU-3zP.mjs +3766 -0
  199. package/fesm2022/nanahoshi-mona-ui-grid.mjs +5418 -2
  200. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +1379 -1079
  201. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +4451 -5068
  202. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +344 -143
  203. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +257 -127
  204. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +2080 -1829
  205. package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +103 -141
  206. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2498 -2706
  207. package/fesm2022/nanahoshi-mona-ui-internal.mjs +722 -1007
  208. package/fesm2022/nanahoshi-mona-ui-label.mjs +313 -202
  209. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1308 -1009
  210. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1411 -677
  211. package/fesm2022/nanahoshi-mona-ui-list.mjs +1 -6
  212. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +556 -577
  213. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +530 -573
  214. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +530 -573
  215. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +533 -576
  216. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +520 -555
  217. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +530 -571
  218. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +520 -555
  219. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +520 -555
  220. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +530 -571
  221. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +576 -591
  222. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +530 -565
  223. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +520 -555
  224. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +520 -555
  225. package/fesm2022/nanahoshi-mona-ui-locales.mjs +59 -77
  226. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +1411 -829
  227. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1326 -702
  228. package/fesm2022/nanahoshi-mona-ui-notification.mjs +763 -675
  229. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1306 -826
  230. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +1122 -897
  231. package/fesm2022/nanahoshi-mona-ui-pager.mjs +1110 -651
  232. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +95 -53
  233. package/fesm2022/nanahoshi-mona-ui-popover.mjs +559 -397
  234. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2323 -1694
  235. package/fesm2022/nanahoshi-mona-ui-popup.mjs +1657 -1455
  236. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +441 -267
  237. package/fesm2022/nanahoshi-mona-ui-query.mjs +211 -340
  238. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +1017 -548
  239. package/fesm2022/nanahoshi-mona-ui-rating.mjs +874 -624
  240. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +1130 -917
  241. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +705 -455
  242. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +461 -283
  243. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +2791 -2449
  244. package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +145 -90
  245. package/fesm2022/nanahoshi-mona-ui-slider.mjs +1563 -1103
  246. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +738 -673
  247. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1287 -647
  248. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +1313 -909
  249. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +761 -540
  250. package/fesm2022/nanahoshi-mona-ui-switch.mjs +611 -280
  251. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +1393 -841
  252. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +142 -73
  253. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +876 -374
  254. package/fesm2022/nanahoshi-mona-ui-theme.mjs +1465 -1449
  255. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +897 -443
  256. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1100 -703
  257. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +789 -538
  258. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +1361 -805
  259. package/fesm2022/nanahoshi-mona-ui-window.mjs +2145 -1531
  260. package/fesm2022/nanahoshi-mona-ui.mjs +1 -8
  261. package/llms.txt +80 -2
  262. package/package.json +62 -23
  263. package/types/nanahoshi-mona-ui-auto-complete.d.ts +367 -233
  264. package/types/nanahoshi-mona-ui-avatar.d.ts +722 -649
  265. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +134 -103
  266. package/types/nanahoshi-mona-ui-button-group.d.ts +213 -152
  267. package/types/nanahoshi-mona-ui-button.d.ts +227 -166
  268. package/types/nanahoshi-mona-ui-calendar.d.ts +324 -259
  269. package/types/nanahoshi-mona-ui-card.d.ts +125 -111
  270. package/types/nanahoshi-mona-ui-chart.d.ts +10483 -7326
  271. package/types/nanahoshi-mona-ui-check-box.d.ts +293 -180
  272. package/types/nanahoshi-mona-ui-chip.d.ts +208 -141
  273. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +194 -133
  274. package/types/nanahoshi-mona-ui-collapsible.d.ts +105 -87
  275. package/types/nanahoshi-mona-ui-color-gradient.d.ts +281 -213
  276. package/types/nanahoshi-mona-ui-color-palette.d.ts +201 -138
  277. package/types/nanahoshi-mona-ui-color-picker.d.ts +283 -194
  278. package/types/nanahoshi-mona-ui-combo-box.d.ts +401 -262
  279. package/types/nanahoshi-mona-ui-command.d.ts +279 -191
  280. package/types/nanahoshi-mona-ui-common.d.ts +360 -385
  281. package/types/nanahoshi-mona-ui-contextmenu.d.ts +142 -117
  282. package/types/nanahoshi-mona-ui-date-input.d.ts +97 -97
  283. package/types/nanahoshi-mona-ui-date-picker.d.ts +338 -208
  284. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +413 -259
  285. package/types/nanahoshi-mona-ui-dialog.d.ts +470 -381
  286. package/types/nanahoshi-mona-ui-dropdown-button.d.ts +216 -168
  287. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +369 -243
  288. package/types/nanahoshi-mona-ui-dropdowns.d.ts +255 -235
  289. package/types/nanahoshi-mona-ui-editor.d.ts +302 -235
  290. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +140 -109
  291. package/types/nanahoshi-mona-ui-fieldset.d.ts +98 -68
  292. package/types/nanahoshi-mona-ui-filter.d.ts +150 -124
  293. package/types/nanahoshi-mona-ui-grid.d.ts +1956 -1678
  294. package/types/nanahoshi-mona-ui-i18n-icu.d.ts +25 -34
  295. package/types/nanahoshi-mona-ui-i18n.d.ts +999 -1052
  296. package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +118 -71
  297. package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +56 -27
  298. package/types/nanahoshi-mona-ui-internal-list.d.ts +474 -408
  299. package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +143 -150
  300. package/types/nanahoshi-mona-ui-internal-tree.d.ts +493 -506
  301. package/types/nanahoshi-mona-ui-internal.d.ts +195 -213
  302. package/types/nanahoshi-mona-ui-label.d.ts +108 -78
  303. package/types/nanahoshi-mona-ui-list-box.d.ts +392 -322
  304. package/types/nanahoshi-mona-ui-list-view.d.ts +423 -282
  305. package/types/nanahoshi-mona-ui-list.d.ts +2 -1
  306. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +540 -542
  307. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +540 -542
  308. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +540 -542
  309. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +540 -542
  310. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +540 -542
  311. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +540 -542
  312. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +540 -542
  313. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +540 -542
  314. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +540 -542
  315. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +540 -542
  316. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +540 -542
  317. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +540 -542
  318. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +540 -542
  319. package/types/nanahoshi-mona-ui-locales.d.ts +17 -19
  320. package/types/nanahoshi-mona-ui-menubar.d.ts +210 -181
  321. package/types/nanahoshi-mona-ui-multi-select.d.ts +416 -276
  322. package/types/nanahoshi-mona-ui-notification.d.ts +140 -151
  323. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +407 -270
  324. package/types/nanahoshi-mona-ui-otp-input.d.ts +364 -241
  325. package/types/nanahoshi-mona-ui-pager.d.ts +379 -301
  326. package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -28
  327. package/types/nanahoshi-mona-ui-popover.d.ts +176 -134
  328. package/types/nanahoshi-mona-ui-popup-menu.d.ts +488 -344
  329. package/types/nanahoshi-mona-ui-popup.d.ts +698 -560
  330. package/types/nanahoshi-mona-ui-progress-bar.d.ts +197 -137
  331. package/types/nanahoshi-mona-ui-query.d.ts +82 -88
  332. package/types/nanahoshi-mona-ui-radio-button.d.ts +434 -269
  333. package/types/nanahoshi-mona-ui-rating.d.ts +348 -254
  334. package/types/nanahoshi-mona-ui-scroll-view.d.ts +244 -172
  335. package/types/nanahoshi-mona-ui-segmented.d.ts +250 -175
  336. package/types/nanahoshi-mona-ui-sheet.d.ts +115 -63
  337. package/types/nanahoshi-mona-ui-sidebar.d.ts +653 -493
  338. package/types/nanahoshi-mona-ui-skeleton.d.ts +55 -39
  339. package/types/nanahoshi-mona-ui-slider.d.ts +503 -354
  340. package/types/nanahoshi-mona-ui-spinner.d.ts +125 -112
  341. package/types/nanahoshi-mona-ui-split-button.d.ts +241 -196
  342. package/types/nanahoshi-mona-ui-splitter.d.ts +124 -78
  343. package/types/nanahoshi-mona-ui-stepper.d.ts +206 -181
  344. package/types/nanahoshi-mona-ui-switch.d.ts +197 -131
  345. package/types/nanahoshi-mona-ui-tabs.d.ts +349 -248
  346. package/types/nanahoshi-mona-ui-text-area.d.ts +52 -36
  347. package/types/nanahoshi-mona-ui-text-box.d.ts +349 -218
  348. package/types/nanahoshi-mona-ui-theme.d.ts +415 -408
  349. package/types/nanahoshi-mona-ui-time-picker.d.ts +357 -217
  350. package/types/nanahoshi-mona-ui-time-selector.d.ts +255 -170
  351. package/types/nanahoshi-mona-ui-tooltip.d.ts +222 -144
  352. package/types/nanahoshi-mona-ui-tree-view.d.ts +466 -308
  353. package/types/nanahoshi-mona-ui-window.d.ts +494 -399
  354. package/types/nanahoshi-mona-ui.d.ts +1 -2
  355. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs +0 -181
  356. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs +0 -208
  357. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs +0 -1082
  358. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs +0 -186
  359. package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs +0 -7568
@@ -1,123 +1,223 @@
1
- import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { inject, TemplateRef, Directive, input, signal, DestroyRef, ElementRef, Injector, contentChildren, computed, linkedSignal, contentChild, viewChild, booleanAttribute, output, model, effect, untracked, afterRenderEffect, afterNextRender, Component } from '@angular/core';
4
- import { LucideEllipsis, LucideChevronsLeft, LucideChevronLeft, LucideChevronRight, LucideChevronsRight } from '@lucide/angular';
5
- import { ButtonDirective } from '@nanahoshi/mona-ui/button';
6
- import { DropdownListComponent, DropdownListValueTemplateDirective } from '@nanahoshi/mona-ui/dropdown-list';
7
- import { DropdownVirtualScrollDirective, DropdownItemTemplateDirective } from '@nanahoshi/mona-ui/dropdowns';
8
- import { formatNumber, injectComponentDirection, MonaI18nService } from '@nanahoshi/mona-ui/i18n';
9
- import { themeRaisedBackdropClasses, createElementControlId, NavigationKeys } from '@nanahoshi/mona-ui/internal';
10
- import { NumericTextBoxComponent } from '@nanahoshi/mona-ui/numeric-text-box';
11
- import { twMerge } from 'tailwind-merge';
12
- import { PreventableEvent } from '@nanahoshi/mona-ui/common';
13
- import { cva } from 'class-variance-authority';
14
-
15
- class PagerInfoTemplateDirective {
16
- constructor() {
17
- this.templateRef = inject(TemplateRef);
18
- }
19
- static ngTemplateContextGuard(_directive, _context) {
20
- return true;
21
- }
22
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PagerInfoTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
23
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: PagerInfoTemplateDirective, isStandalone: true, selector: "ng-template[monaPagerInfoTemplate]", ngImport: i0 }); }
24
- }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PagerInfoTemplateDirective, decorators: [{
26
- type: Directive,
27
- args: [{
28
- selector: "ng-template[monaPagerInfoTemplate]"
29
- }]
30
- }] });
31
-
32
- class PagerNavigationButtonsTemplateDirective {
33
- constructor() {
34
- this.templateRef = inject(TemplateRef);
35
- /** @description Which navigation button the template replaces. */
36
- this.type = input.required(/* @ts-ignore */
37
- ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
38
- }
39
- static ngTemplateContextGuard(_directive, _context) {
40
- return true;
41
- }
42
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PagerNavigationButtonsTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
43
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: PagerNavigationButtonsTemplateDirective, isStandalone: true, selector: "ng-template[monaPagerNavigationButtonsTemplate]", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
44
- }
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PagerNavigationButtonsTemplateDirective, decorators: [{
46
- type: Directive,
47
- args: [{
48
- selector: "ng-template[monaPagerNavigationButtonsTemplate]"
49
- }]
50
- }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }] } });
51
-
52
- class PagerNumericButtonsTemplateDirective {
53
- constructor() {
54
- this.templateRef = inject(TemplateRef);
55
- }
56
- static ngTemplateContextGuard(_directive, _context) {
57
- return true;
58
- }
59
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PagerNumericButtonsTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
60
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: PagerNumericButtonsTemplateDirective, isStandalone: true, selector: "ng-template[monaPagerNumericButtonsTemplate]", ngImport: i0 }); }
61
- }
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PagerNumericButtonsTemplateDirective, decorators: [{
63
- type: Directive,
64
- args: [{
65
- selector: "ng-template[monaPagerNumericButtonsTemplate]"
66
- }]
67
- }] });
68
-
69
- class PagerPageSizeTemplateDirective {
70
- static ngTemplateContextGuard(_directive, _context) {
71
- return true;
72
- }
73
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PagerPageSizeTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
74
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: PagerPageSizeTemplateDirective, isStandalone: true, selector: "ng-template[monaPagerPageSizeTemplate]", ngImport: i0 }); }
75
- }
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PagerPageSizeTemplateDirective, decorators: [{
77
- type: Directive,
78
- args: [{
79
- selector: "ng-template[monaPagerPageSizeTemplate]"
80
- }]
81
- }] });
82
-
83
- // Generated from i18n/catalogs/en-US.messages.json by scripts/generate-locale-catalogs.ts. Do not edit.
84
- // Edit the JSON file and run `npm run generate:locale-catalogs`.
1
+ import { DOCUMENT, NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, DestroyRef, Directive, ElementRef, Injector, TemplateRef, afterNextRender, afterRenderEffect, booleanAttribute, computed, contentChild, contentChildren, effect, inject, input, linkedSignal, model, output, signal, untracked, viewChild } from "@angular/core";
4
+ import { LucideChevronLeft, LucideChevronRight, LucideChevronsLeft, LucideChevronsRight, LucideEllipsis } from "@lucide/angular";
5
+ import { ButtonDirective } from "@nanahoshi/mona-ui/button";
6
+ import { DropdownListComponent, DropdownListValueTemplateDirective } from "@nanahoshi/mona-ui/dropdown-list";
7
+ import { DropdownItemTemplateDirective, DropdownVirtualScrollDirective } from "@nanahoshi/mona-ui/dropdowns";
8
+ import { MonaI18nService, formatNumber, injectComponentDirection } from "@nanahoshi/mona-ui/i18n";
9
+ import { NavigationKeys, createElementControlId, themeRaisedBackdropClasses } from "@nanahoshi/mona-ui/internal";
10
+ import { NumericTextBoxComponent } from "@nanahoshi/mona-ui/numeric-text-box";
11
+ import { twMerge } from "tailwind-merge";
12
+ import { PreventableEvent } from "@nanahoshi/mona-ui/common";
13
+ import { cva } from "class-variance-authority";
14
+ var PagerInfoTemplateDirective = class PagerInfoTemplateDirective {
15
+ constructor() {
16
+ this.templateRef = inject(TemplateRef);
17
+ }
18
+ static ngTemplateContextGuard(_directive, _context) {
19
+ return true;
20
+ }
21
+ static {
22
+ this.ɵfac = i0.ɵɵngDeclareFactory({
23
+ minVersion: "12.0.0",
24
+ version: "22.2.6",
25
+ ngImport: i0,
26
+ type: PagerInfoTemplateDirective,
27
+ deps: [],
28
+ target: i0.ɵɵFactoryTarget.Directive
29
+ });
30
+ }
31
+ static {
32
+ this.ɵdir = i0.ɵɵngDeclareDirective({
33
+ minVersion: "14.0.0",
34
+ version: "22.2.6",
35
+ type: PagerInfoTemplateDirective,
36
+ isStandalone: true,
37
+ selector: "ng-template[monaPagerInfoTemplate]",
38
+ ngImport: i0
39
+ });
40
+ }
41
+ };
42
+ i0.ɵɵngDeclareClassMetadata({
43
+ minVersion: "12.0.0",
44
+ version: "22.2.6",
45
+ ngImport: i0,
46
+ type: PagerInfoTemplateDirective,
47
+ decorators: [{
48
+ type: Directive,
49
+ args: [{ selector: "ng-template[monaPagerInfoTemplate]" }]
50
+ }]
51
+ });
52
+ var PagerNavigationButtonsTemplateDirective = class PagerNavigationButtonsTemplateDirective {
53
+ constructor() {
54
+ this.templateRef = inject(TemplateRef);
55
+ this.type = input.required(...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
56
+ }
57
+ static ngTemplateContextGuard(_directive, _context) {
58
+ return true;
59
+ }
60
+ static {
61
+ this.ɵfac = i0.ɵɵngDeclareFactory({
62
+ minVersion: "12.0.0",
63
+ version: "22.2.6",
64
+ ngImport: i0,
65
+ type: PagerNavigationButtonsTemplateDirective,
66
+ deps: [],
67
+ target: i0.ɵɵFactoryTarget.Directive
68
+ });
69
+ }
70
+ static {
71
+ this.ɵdir = i0.ɵɵngDeclareDirective({
72
+ minVersion: "17.1.0",
73
+ version: "22.2.6",
74
+ type: PagerNavigationButtonsTemplateDirective,
75
+ isStandalone: true,
76
+ selector: "ng-template[monaPagerNavigationButtonsTemplate]",
77
+ inputs: { type: {
78
+ classPropertyName: "type",
79
+ publicName: "type",
80
+ isSignal: true,
81
+ isRequired: true,
82
+ transformFunction: null
83
+ } },
84
+ ngImport: i0
85
+ });
86
+ }
87
+ };
88
+ i0.ɵɵngDeclareClassMetadata({
89
+ minVersion: "12.0.0",
90
+ version: "22.2.6",
91
+ ngImport: i0,
92
+ type: PagerNavigationButtonsTemplateDirective,
93
+ decorators: [{
94
+ type: Directive,
95
+ args: [{ selector: "ng-template[monaPagerNavigationButtonsTemplate]" }]
96
+ }],
97
+ propDecorators: { type: [{
98
+ type: i0.Input,
99
+ args: [{
100
+ isSignal: true,
101
+ alias: "type",
102
+ required: true
103
+ }]
104
+ }] }
105
+ });
106
+ var PagerNumericButtonsTemplateDirective = class PagerNumericButtonsTemplateDirective {
107
+ constructor() {
108
+ this.templateRef = inject(TemplateRef);
109
+ }
110
+ static ngTemplateContextGuard(_directive, _context) {
111
+ return true;
112
+ }
113
+ static {
114
+ this.ɵfac = i0.ɵɵngDeclareFactory({
115
+ minVersion: "12.0.0",
116
+ version: "22.2.6",
117
+ ngImport: i0,
118
+ type: PagerNumericButtonsTemplateDirective,
119
+ deps: [],
120
+ target: i0.ɵɵFactoryTarget.Directive
121
+ });
122
+ }
123
+ static {
124
+ this.ɵdir = i0.ɵɵngDeclareDirective({
125
+ minVersion: "14.0.0",
126
+ version: "22.2.6",
127
+ type: PagerNumericButtonsTemplateDirective,
128
+ isStandalone: true,
129
+ selector: "ng-template[monaPagerNumericButtonsTemplate]",
130
+ ngImport: i0
131
+ });
132
+ }
133
+ };
134
+ i0.ɵɵngDeclareClassMetadata({
135
+ minVersion: "12.0.0",
136
+ version: "22.2.6",
137
+ ngImport: i0,
138
+ type: PagerNumericButtonsTemplateDirective,
139
+ decorators: [{
140
+ type: Directive,
141
+ args: [{ selector: "ng-template[monaPagerNumericButtonsTemplate]" }]
142
+ }]
143
+ });
144
+ var PagerPageSizeTemplateDirective = class PagerPageSizeTemplateDirective {
145
+ static ngTemplateContextGuard(_directive, _context) {
146
+ return true;
147
+ }
148
+ static {
149
+ this.ɵfac = i0.ɵɵngDeclareFactory({
150
+ minVersion: "12.0.0",
151
+ version: "22.2.6",
152
+ ngImport: i0,
153
+ type: PagerPageSizeTemplateDirective,
154
+ deps: [],
155
+ target: i0.ɵɵFactoryTarget.Directive
156
+ });
157
+ }
158
+ static {
159
+ this.ɵdir = i0.ɵɵngDeclareDirective({
160
+ minVersion: "14.0.0",
161
+ version: "22.2.6",
162
+ type: PagerPageSizeTemplateDirective,
163
+ isStandalone: true,
164
+ selector: "ng-template[monaPagerPageSizeTemplate]",
165
+ ngImport: i0
166
+ });
167
+ }
168
+ };
169
+ i0.ɵɵngDeclareClassMetadata({
170
+ minVersion: "12.0.0",
171
+ version: "22.2.6",
172
+ ngImport: i0,
173
+ type: PagerPageSizeTemplateDirective,
174
+ decorators: [{
175
+ type: Directive,
176
+ args: [{ selector: "ng-template[monaPagerPageSizeTemplate]" }]
177
+ }]
178
+ });
85
179
  function localizeNumber(value, options) {
86
- return formatNumber(value, "en-US", options);
180
+ return formatNumber(value, "en-US", options);
87
181
  }
88
182
  const PLURAL_RULES = new Intl.PluralRules("en-US");
89
183
  function plural(category, forms) {
90
- return (forms[category] ?? forms.other)();
184
+ return (forms[category] ?? forms.other)();
91
185
  }
92
186
  const PAGER_DEFAULT_MESSAGES = {
93
- firstPageLabel: "First page",
94
- itemsPerPageLabel: "Items per page",
95
- jumpBackwardLabel: (pages) => `Jump back ${plural(PLURAL_RULES.select(pages), { one: () => `${localizeNumber(pages)} page`, other: () => `${localizeNumber(pages)} pages` })}`,
96
- jumpForwardLabel: (pages) => `Jump forward ${plural(PLURAL_RULES.select(pages), { one: () => `${localizeNumber(pages)} page`, other: () => `${localizeNumber(pages)} pages` })}`,
97
- lastPageLabel: "Last page",
98
- nextPageLabel: "Next page",
99
- ofText: "of",
100
- pageInputPrefix: (_totalPages) => "Page",
101
- pageInputSuffix: (totalPages) => `of ${localizeNumber(totalPages)}`,
102
- pageLabel: (page) => `Page ${localizeNumber(page)}`,
103
- pageSelectLabel: "Page",
104
- pageSizeLabel: (pageSize) => `${localizeNumber(pageSize)} / page`,
105
- pageStatus: (page, totalPages) => `Page ${localizeNumber(page)} of ${localizeNumber(totalPages)}`,
106
- pageText: "Page",
107
- pagerLabel: "Pagination",
108
- previousPageLabel: "Previous page",
109
- rangeStatus: (start, end, total) => `${localizeNumber(start)} - ${localizeNumber(end)} of ${plural(PLURAL_RULES.select(total), { one: () => `${localizeNumber(total)} item`, other: () => `${localizeNumber(total)} items` })}`
187
+ firstPageLabel: "First page",
188
+ itemsPerPageLabel: "Items per page",
189
+ jumpBackwardLabel: (pages) => `Jump back ${plural(PLURAL_RULES.select(pages), {
190
+ one: () => `${localizeNumber(pages)} page`,
191
+ other: () => `${localizeNumber(pages)} pages`
192
+ })}`,
193
+ jumpForwardLabel: (pages) => `Jump forward ${plural(PLURAL_RULES.select(pages), {
194
+ one: () => `${localizeNumber(pages)} page`,
195
+ other: () => `${localizeNumber(pages)} pages`
196
+ })}`,
197
+ lastPageLabel: "Last page",
198
+ nextPageLabel: "Next page",
199
+ ofText: "of",
200
+ pageInputPrefix: (_totalPages) => "Page",
201
+ pageInputSuffix: (totalPages) => `of ${localizeNumber(totalPages)}`,
202
+ pageLabel: (page) => `Page ${localizeNumber(page)}`,
203
+ pageSelectLabel: "Page",
204
+ pageSizeLabel: (pageSize) => `${localizeNumber(pageSize)} / page`,
205
+ pageStatus: (page, totalPages) => `Page ${localizeNumber(page)} of ${localizeNumber(totalPages)}`,
206
+ pageText: "Page",
207
+ pagerLabel: "Pagination",
208
+ previousPageLabel: "Previous page",
209
+ rangeStatus: (start, end, total) => `${localizeNumber(start)} - ${localizeNumber(end)} of ${plural(PLURAL_RULES.select(total), {
210
+ one: () => `${localizeNumber(total)} item`,
211
+ other: () => `${localizeNumber(total)} items`
212
+ })}`
213
+ };
214
+ var PageSizeChangeEvent = class extends PreventableEvent {
215
+ constructor(newPageSize, oldPageSize) {
216
+ super("pageSizeSelect");
217
+ this.newPageSize = newPageSize;
218
+ this.oldPageSize = oldPageSize;
219
+ }
110
220
  };
111
-
112
- /** The cancelable payload of the pager's `pageSizeSelect` event. */
113
- class PageSizeChangeEvent extends PreventableEvent {
114
- constructor(newPageSize, oldPageSize) {
115
- super("pageSizeSelect");
116
- this.newPageSize = newPageSize;
117
- this.oldPageSize = oldPageSize;
118
- }
119
- }
120
-
121
221
  const pagerBaseThemeVariants = cva(`
122
222
  flex flex-wrap items-center gap-y-1 px-2 py-1
123
223
  text-sm
@@ -129,22 +229,20 @@ const pagerBaseThemeVariants = cva(`
129
229
  [&_mona-numeric-text-box_input]:text-center
130
230
  [&_mona-dropdown-list]:mx-1
131
231
  [&_mona-dropdown-list]:my-0
132
- `, {
133
- variants: {
134
- rounded: {
135
- none: "rounded-none",
136
- small: "rounded-sm",
137
- medium: "rounded-md",
138
- large: "rounded-lg",
139
- full: "rounded-full"
140
- },
141
- size: {
142
- small: "text-xs",
143
- medium: "text-sm",
144
- large: "text-base"
145
- }
146
- }
147
- });
232
+ `, { variants: {
233
+ rounded: {
234
+ none: "rounded-none",
235
+ small: "rounded-sm",
236
+ medium: "rounded-md",
237
+ large: "rounded-lg",
238
+ full: "rounded-full"
239
+ },
240
+ size: {
241
+ small: "text-xs",
242
+ medium: "text-sm",
243
+ large: "text-base"
244
+ }
245
+ } });
148
246
  const pagerInfoThemeVariants = cva(`
149
247
  flex flex-1 items-center justify-end ps-2
150
248
  whitespace-nowrap text-muted-foreground
@@ -160,531 +258,892 @@ const pagerListThemeVariants = cva(`
160
258
  [&_li]:items-center [&_li]:justify-center
161
259
  `);
162
260
  const pagerListItemThemeVariants = cva("", {
163
- variants: {
164
- active: {
165
- true: "font-semibold text-foreground",
166
- false: ""
167
- }
168
- },
169
- defaultVariants: {
170
- active: false
171
- }
261
+ variants: { active: {
262
+ true: "font-semibold text-foreground",
263
+ false: ""
264
+ } },
265
+ defaultVariants: { active: false }
172
266
  });
173
-
174
- /** Below this width (in CSS pixels) a responsive pager replaces its page buttons with a page dropdown. */
175
267
  const COMPACT_WIDTH = 480;
176
268
  const DEFAULT_PAGE_SIZE = 5;
177
- const DEFAULT_PAGE_SIZES = [5, 10, 20, 50, 100];
178
- /** A whole number at least `minimum`, or `fallback` when the value isn't a finite number. */
269
+ const DEFAULT_PAGE_SIZES = [
270
+ 5,
271
+ 10,
272
+ 20,
273
+ 50,
274
+ 100
275
+ ];
179
276
  function toCount(value, fallback, minimum) {
180
- const numeric = typeof value === "number" ? value : Number(value);
181
- return Number.isFinite(numeric) ? Math.max(minimum, Math.floor(numeric)) : fallback;
277
+ const numeric = typeof value === "number" ? value : Number(value);
278
+ return Number.isFinite(numeric) ? Math.max(minimum, Math.floor(numeric)) : fallback;
182
279
  }
183
- class PagerComponent {
184
- #compact;
185
- #destroyRef;
186
- #direction;
187
- #document;
188
- #hostElementRef;
189
- #i18n;
190
- #id;
191
- #injector;
192
- #widthObserver;
193
- constructor() {
194
- this.#compact = signal(false, /* @ts-ignore */
195
- ...(ngDevMode ? [{ debugName: "#compact" }] : /* istanbul ignore next */ []));
196
- this.#destroyRef = inject(DestroyRef);
197
- this.#direction = injectComponentDirection();
198
- this.#document = inject(DOCUMENT);
199
- this.#hostElementRef = inject(ElementRef);
200
- this.#i18n = inject(MonaI18nService);
201
- this.#id = createElementControlId();
202
- this.#injector = inject(Injector);
203
- this.#widthObserver = null;
204
- this.navigationButtonsTemplateList = contentChildren(PagerNavigationButtonsTemplateDirective, /* @ts-ignore */
205
- ...(ngDevMode ? [{ debugName: "navigationButtonsTemplateList" }] : /* istanbul ignore next */ []));
206
- this.baseClasses = computed(() => twMerge(pagerBaseThemeVariants({ rounded: this.rounded(), size: this.size() }), this.userClasses()), /* @ts-ignore */
207
- ...(ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []));
208
- this.compact = this.#compact.asReadonly();
209
- /** The position of the last item on the current page, or 0 when there are no items. */
210
- this.end = computed(() => this.hasPages() ? Math.min(this.page() * this.pageSizeValue(), this.total()) : 0, /* @ts-ignore */
211
- ...(ngDevMode ? [{ debugName: "end" }] : /* istanbul ignore next */ []));
212
- this.firstNavigationContext = computed(() => this.createNavigationContext("first"), /* @ts-ignore */
213
- ...(ngDevMode ? [{ debugName: "firstNavigationContext" }] : /* istanbul ignore next */ []));
214
- this.firstPageNavigationTemplate = computed(() => this.findNavigationTemplate("first"), /* @ts-ignore */
215
- ...(ngDevMode ? [{ debugName: "firstPageNavigationTemplate" }] : /* istanbul ignore next */ []));
216
- this.hasPages = computed(() => this.pageCount() > 0, /* @ts-ignore */
217
- ...(ngDevMode ? [{ debugName: "hasPages" }] : /* istanbul ignore next */ []));
218
- this.iconSize = computed(() => {
219
- switch (this.size()) {
220
- case "small":
221
- return 18;
222
- case "large":
223
- return 22;
224
- default:
225
- return 20;
226
- }
227
- }, /* @ts-ignore */
228
- ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
229
- this.infoClasses = pagerInfoThemeVariants();
230
- this.infoContext = computed(() => {
231
- const context = this.pagerContext();
232
- return { ...context, $implicit: context };
233
- }, /* @ts-ignore */
234
- ...(ngDevMode ? [{ debugName: "infoContext" }] : /* istanbul ignore next */ []));
235
- this.inputClasses = pagerInputThemeVariants();
236
- this.inputValue = linkedSignal(() => this.page(), /* @ts-ignore */
237
- ...(ngDevMode ? [{ debugName: "inputValue" }] : /* istanbul ignore next */ []));
238
- this.jumpNextLabel = computed(() => this.messages().jumpForwardLabel(this.visiblePages()), /* @ts-ignore */
239
- ...(ngDevMode ? [{ debugName: "jumpNextLabel" }] : /* istanbul ignore next */ []));
240
- this.jumpPreviousLabel = computed(() => this.messages().jumpBackwardLabel(this.visiblePages()), /* @ts-ignore */
241
- ...(ngDevMode ? [{ debugName: "jumpPreviousLabel" }] : /* istanbul ignore next */ []));
242
- this.lastNavigationContext = computed(() => this.createNavigationContext("last"), /* @ts-ignore */
243
- ...(ngDevMode ? [{ debugName: "lastNavigationContext" }] : /* istanbul ignore next */ []));
244
- this.lastPageNavigationTemplate = computed(() => this.findNavigationTemplate("last"), /* @ts-ignore */
245
- ...(ngDevMode ? [{ debugName: "lastPageNavigationTemplate" }] : /* istanbul ignore next */ []));
246
- this.listClasses = pagerListThemeVariants();
247
- /** Announces page changes made by the user; programmatic changes stay silent. */
248
- this.liveStatus = signal("", /* @ts-ignore */
249
- ...(ngDevMode ? [{ debugName: "liveStatus" }] : /* istanbul ignore next */ []));
250
- this.messages = this.#i18n.componentMessages("pager", PAGER_DEFAULT_MESSAGES);
251
- this.nextNavigationContext = computed(() => this.createNavigationContext("next"), /* @ts-ignore */
252
- ...(ngDevMode ? [{ debugName: "nextNavigationContext" }] : /* istanbul ignore next */ []));
253
- this.nextPageNavigationTemplate = computed(() => this.findNavigationTemplate("next"), /* @ts-ignore */
254
- ...(ngDevMode ? [{ debugName: "nextPageNavigationTemplate" }] : /* istanbul ignore next */ []));
255
- this.numericButtonsContext = computed(() => {
256
- const context = this.pagerContext();
257
- const pages = this.pageItems()
258
- .filter(item => item.kind === "page")
259
- .map(item => item.page);
260
- return { ...context, $implicit: context, pages };
261
- }, /* @ts-ignore */
262
- ...(ngDevMode ? [{ debugName: "numericButtonsContext" }] : /* istanbul ignore next */ []));
263
- this.numericButtonsTemplate = contentChild(PagerNumericButtonsTemplateDirective, /* @ts-ignore */
264
- ...(ngDevMode ? [{ debugName: "numericButtonsTemplate" }] : /* istanbul ignore next */ []));
265
- /** The current page: the page holding `skip`, clamped to the last page. */
266
- this.page = computed(() => {
267
- const pageCount = this.pageCount();
268
- const page = Math.floor(this.skipValue() / this.pageSizeValue()) + 1;
269
- return pageCount === 0 ? 1 : Math.min(page, pageCount);
270
- }, /* @ts-ignore */
271
- ...(ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []));
272
- this.pageCount = computed(() => Math.ceil(this.total() / this.pageSizeValue()), /* @ts-ignore */
273
- ...(ngDevMode ? [{ debugName: "pageCount" }] : /* istanbul ignore next */ []));
274
- this.pageInputId = `${this.#id}-page`;
275
- this.pageInputLabelledBy = `${this.#id}-page-prefix ${this.#id}-page ${this.#id}-page-suffix`;
276
- this.pageInputPrefixId = `${this.#id}-page-prefix`;
277
- this.pageInputSuffixId = `${this.#id}-page-suffix`;
278
- this.pageItems = computed(() => this.buildPageItems(this.page(), this.visiblePages(), this.pageCount()), /* @ts-ignore */
279
- ...(ngDevMode ? [{ debugName: "pageItems" }] : /* istanbul ignore next */ []));
280
- this.pageList = computed(() => Array.from({ length: this.pageCount() }, (_, index) => index + 1), /* @ts-ignore */
281
- ...(ngDevMode ? [{ debugName: "pageList" }] : /* istanbul ignore next */ []));
282
- this.pageSizeContext = computed(() => ({
283
- ...this.pagerContext(),
284
- $implicit: this.pageSizeOptions()
285
- }), /* @ts-ignore */
286
- ...(ngDevMode ? [{ debugName: "pageSizeContext" }] : /* istanbul ignore next */ []));
287
- this.pageSizeDropdownList = viewChild("pageSizeDropdownList", /* @ts-ignore */
288
- ...(ngDevMode ? [{ debugName: "pageSizeDropdownList" }] : /* istanbul ignore next */ []));
289
- this.pageSizeOptions = computed(() => {
290
- const values = this.pageSizeValues();
291
- if (values === false) {
292
- return [];
293
- }
294
- return Array.isArray(values) ? values : DEFAULT_PAGE_SIZES;
295
- }, /* @ts-ignore */
296
- ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : /* istanbul ignore next */ []));
297
- this.pageSizeTemplate = contentChild(PagerPageSizeTemplateDirective, { ...(ngDevMode ? { debugName: "pageSizeTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
298
- /** The page size in use: `pageSize`, or the size the user picked since, as a whole number of at least 1. */
299
- this.pageSizeValue = computed(() => toCount(this.pageSize(), DEFAULT_PAGE_SIZE, 1), /* @ts-ignore */
300
- ...(ngDevMode ? [{ debugName: "pageSizeValue" }] : /* istanbul ignore next */ []));
301
- this.pagerContext = computed(() => ({
302
- currentPage: this.page(),
303
- end: this.end(),
304
- goToPage: (page) => this.goToPage(page),
305
- pageSize: this.pageSizeValue(),
306
- pageSizes: this.pageSizeOptions(),
307
- setPageSize: (pageSize) => this.changePageSize(pageSize),
308
- skip: (this.page() - 1) * this.pageSizeValue(),
309
- start: this.start(),
310
- total: this.total(),
311
- totalPages: this.pageCount()
312
- }), /* @ts-ignore */
313
- ...(ngDevMode ? [{ debugName: "pagerContext" }] : /* istanbul ignore next */ []));
314
- this.pagerInfo = computed(() => this.messages().rangeStatus(this.start(), this.end(), this.total()), /* @ts-ignore */
315
- ...(ngDevMode ? [{ debugName: "pagerInfo" }] : /* istanbul ignore next */ []));
316
- this.pagerInfoTemplate = contentChild(PagerInfoTemplateDirective, /* @ts-ignore */
317
- ...(ngDevMode ? [{ debugName: "pagerInfoTemplate" }] : /* istanbul ignore next */ []));
318
- this.previousNavigationContext = computed(() => this.createNavigationContext("previous"), /* @ts-ignore */
319
- ...(ngDevMode ? [{ debugName: "previousNavigationContext" }] : /* istanbul ignore next */ []));
320
- this.previousPageNavigationTemplate = computed(() => this.findNavigationTemplate("previous"), /* @ts-ignore */
321
- ...(ngDevMode ? [{ debugName: "previousPageNavigationTemplate" }] : /* istanbul ignore next */ []));
322
- /** `skip` as a whole number of at least 0. */
323
- this.skipValue = computed(() => toCount(this.skip(), 0, 0), /* @ts-ignore */
324
- ...(ngDevMode ? [{ debugName: "skipValue" }] : /* istanbul ignore next */ []));
325
- /** The position of the first item on the current page, or 0 when there are no items. */
326
- this.start = computed(() => (this.hasPages() ? (this.page() - 1) * this.pageSizeValue() + 1 : 0), /* @ts-ignore */
327
- ...(ngDevMode ? [{ debugName: "start" }] : /* istanbul ignore next */ []));
328
- /**
329
- * @description Accessible name of the pager's navigation landmark. Defaults to the localized "Pagination";
330
- * name each pager when a page has several.
331
- */
332
- this.ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
333
- /**
334
- * @description Id of the element that names the pager. Takes precedence over `aria-label`.
335
- */
336
- this.ariaLabelledBy = input("", { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: "aria-labelledby" });
337
- /**
338
- * @description Shows the first and last page navigation buttons.
339
- * @default true
340
- */
341
- this.firstLast = input(true, { ...(ngDevMode ? { debugName: "firstLast" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
342
- /**
343
- * @description Enables page shortcuts while a pager button has focus: Page Up and Page Down go to the
344
- * previous and next page, Home and End to the first and last, and the left and right arrows to the previous
345
- * and next page (mirrored right to left). The buttons themselves are always ordinary tab stops.
346
- * @default true
347
- */
348
- this.navigable = input(true, { ...(ngDevMode ? { debugName: "navigable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
349
- /**
350
- * @description Emitted when the user changes the page or the page size, or when the pager corrects a `skip`
351
- * that is past the last page or not on a page boundary. Setting `skip` or `pageSize` from code to a valid
352
- * value doesn't emit it.
353
- */
354
- this.pageChange = output();
355
- /**
356
- * @description Shows a numeric input for jumping directly to a page.
357
- * @default false
358
- */
359
- this.pageInput = input(false, { ...(ngDevMode ? { debugName: "pageInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
360
- /**
361
- * @description Number of items displayed per page; values below 1 count as 1. Supports two-way binding
362
- * (`[(pageSize)]`): `pageSizeChange` emits the new size after the user changes it, and `pageChange` reports it
363
- * as `take`.
364
- * @default 5
365
- */
366
- this.pageSize = model(DEFAULT_PAGE_SIZE, /* @ts-ignore */
367
- ...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
368
- /**
369
- * @description Emitted when the user picks a page size, before it is applied. Call `preventDefault()` on the
370
- * event to keep the current size.
371
- */
372
- this.pageSizeSelect = output();
373
- /**
374
- * @description Page-size options shown in the page-size dropdown. `true` shows the default options; `false`
375
- * or an empty array hides the dropdown.
376
- * @default [5, 10, 20, 50, 100]
377
- */
378
- this.pageSizeValues = input(DEFAULT_PAGE_SIZES, /* @ts-ignore */
379
- ...(ngDevMode ? [{ debugName: "pageSizeValues" }] : /* istanbul ignore next */ []));
380
- /**
381
- * @description Shows the previous and next page navigation buttons.
382
- * @default true
383
- */
384
- this.previousNext = input(true, { ...(ngDevMode ? { debugName: "previousNext" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
385
- /**
386
- * @description Replaces the page buttons with a page dropdown when the pager is narrower than 480px.
387
- * Other sections wrap onto a new line instead of being hidden.
388
- * @default true
389
- */
390
- this.responsive = input(true, { ...(ngDevMode ? { debugName: "responsive" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
391
- /**
392
- * @description Border-radius preset applied to the component.
393
- * @default "medium"
394
- */
395
- this.rounded = input("medium", /* @ts-ignore */
396
- ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
397
- /**
398
- * @description Displays the summary of the current page range and total item count.
399
- * @default true
400
- */
401
- this.showInfo = input(true, { ...(ngDevMode ? { debugName: "showInfo" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
402
- /**
403
- * @description Size preset controlling the component's dimensions.
404
- * @default "medium"
405
- */
406
- this.size = input("medium", /* @ts-ignore */
407
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
408
- /**
409
- * @description Number of items before the current page. Supports two-way binding. A value past the last page,
410
- * or between page boundaries, is corrected to the start of the page that holds it, and `pageChange` reports it.
411
- * @default 0
412
- */
413
- this.skip = model(0, /* @ts-ignore */
414
- ...(ngDevMode ? [{ debugName: "skip" }] : /* istanbul ignore next */ []));
415
- /**
416
- * @description Total number of items in the paged collection.
417
- * @default 0
418
- */
419
- this.total = input(0, { ...(ngDevMode ? { debugName: "total" } : /* istanbul ignore next */ {}), transform: (value) => toCount(value, 0, 0) });
420
- /**
421
- * @description Visual mode of the pager: numeric page buttons, or a page-jump input.
422
- * @default "numeric"
423
- */
424
- this.type = input("numeric", /* @ts-ignore */
425
- ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
426
- /**
427
- * @description Additional CSS classes merged onto the host element via `tailwind-merge`.
428
- * @default ""
429
- */
430
- this.userClasses = input("", { ...(ngDevMode ? { debugName: "userClasses" } : /* istanbul ignore next */ {}), alias: "class" });
431
- /**
432
- * @description Number of page buttons shown between the first and last page before the rest collapse into
433
- * jump buttons. At least 1.
434
- * @default 5
435
- */
436
- this.visiblePages = input(5, { ...(ngDevMode ? { debugName: "visiblePages" } : /* istanbul ignore next */ {}), transform: (value) => toCount(value, 5, 1) });
437
- effect(() => {
438
- const pageCount = this.pageCount();
439
- const skip = this.skip();
440
- const alignedSkip = (this.page() - 1) * this.pageSizeValue();
441
- if (pageCount === 0 || skip === alignedSkip) {
442
- return;
443
- }
444
- untracked(() => {
445
- this.skip.set(alignedSkip);
446
- this.emitPageChange();
447
- });
448
- });
449
- afterRenderEffect(() => {
450
- if (!this.responsive()) {
451
- this.#widthObserver?.disconnect();
452
- this.#widthObserver = null;
453
- untracked(() => this.#compact.set(false));
454
- return;
455
- }
456
- if (this.#widthObserver == null) {
457
- const host = this.#hostElementRef.nativeElement;
458
- this.#widthObserver = new ResizeObserver(() => {
459
- untracked(() => this.#compact.set(host.clientWidth < COMPACT_WIDTH));
460
- });
461
- this.#widthObserver.observe(host);
462
- }
463
- });
464
- this.#destroyRef.onDestroy(() => this.#widthObserver?.disconnect());
465
- }
466
- changePageSize(value) {
467
- const previous = this.pageSizeValue();
468
- if (value == null || !Number.isFinite(value) || value < 1 || value === previous) {
469
- return;
470
- }
471
- const event = new PageSizeChangeEvent(value, previous);
472
- this.pageSizeSelect.emit(event);
473
- if (event.isDefaultPrevented()) {
474
- this.pageSizeDropdownList()?.setValue(previous);
475
- return;
476
- }
477
- const firstItemSkip = (this.page() - 1) * previous;
478
- const focused = this.focusedInside();
479
- this.pageSize.set(value);
480
- this.skip.set(Math.floor(firstItemSkip / value) * value);
481
- this.emitPageChange();
482
- this.afterUserChange(focused);
483
- }
484
- commitPageInput() {
485
- const value = this.inputValue();
486
- if (value == null || !Number.isFinite(value) || !this.hasPages()) {
487
- this.inputValue.set(this.page());
488
- return;
489
- }
490
- const page = Math.min(Math.max(Math.round(value), 1), this.pageCount());
491
- this.inputValue.set(page);
492
- this.goToPage(page);
493
- }
494
- formatPageNumber(value) {
495
- return formatNumber(value, this.#i18n.localeId(), { maximumFractionDigits: 0 });
496
- }
497
- /** Goes to a page (clamped to the page range), as a user action: emits `pageChange` and announces the range. */
498
- goToPage(page) {
499
- if (page == null || !Number.isFinite(page) || !this.hasPages()) {
500
- return;
501
- }
502
- const target = Math.min(Math.max(Math.round(page), 1), this.pageCount());
503
- const skip = (target - 1) * this.pageSizeValue();
504
- if (target === this.page() && skip === this.skip()) {
505
- return;
506
- }
507
- const focused = this.focusedInside();
508
- this.skip.set(skip);
509
- this.emitPageChange();
510
- this.afterUserChange(focused);
511
- }
512
- onKeydown(event) {
513
- if (!this.navigable() ||
514
- event.defaultPrevented ||
515
- event.altKey ||
516
- event.ctrlKey ||
517
- event.metaKey ||
518
- !(event.target instanceof HTMLButtonElement) ||
519
- !this.hasPages()) {
520
- return;
521
- }
522
- const rtl = this.#direction() === "rtl";
523
- let page;
524
- switch (event.key) {
525
- case NavigationKeys.Home:
526
- page = 1;
527
- break;
528
- case NavigationKeys.End:
529
- page = this.pageCount();
530
- break;
531
- case NavigationKeys.PageUp:
532
- page = this.page() - 1;
533
- break;
534
- case NavigationKeys.PageDown:
535
- page = this.page() + 1;
536
- break;
537
- case NavigationKeys.ArrowLeft:
538
- page = this.page() + (rtl ? 1 : -1);
539
- break;
540
- case NavigationKeys.ArrowRight:
541
- page = this.page() + (rtl ? -1 : 1);
542
- break;
543
- default:
544
- return;
545
- }
546
- event.preventDefault();
547
- this.goToPage(page);
548
- }
549
- onPageInputEnter(event) {
550
- const keyboardEvent = event;
551
- if (keyboardEvent.isComposing || keyboardEvent.keyCode === 229) {
552
- return;
553
- }
554
- keyboardEvent.preventDefault();
555
- this.commitPageInput();
556
- }
557
- pageItemClasses(active) {
558
- return pagerListItemThemeVariants({ active });
559
- }
560
- /**
561
- * After a user change: announces the new range, and keeps focus in the pager when the focused control was
562
- * removed or disabled (a jump button that is no longer needed, Next on the last page).
563
- */
564
- afterUserChange(focusedInside) {
565
- this.liveStatus.set(this.pagerInfo());
566
- if (!focusedInside) {
567
- return;
568
- }
569
- const host = this.#hostElementRef.nativeElement;
570
- afterNextRender({
571
- read: () => {
572
- const active = this.#document.activeElement;
573
- if (active instanceof HTMLElement && host.contains(active) && !this.isDisabled(active)) {
574
- return;
575
- }
576
- const target = host.querySelector("button[aria-current='page']") ??
577
- Array.from(host.querySelectorAll("button")).find(b => !b.disabled);
578
- target?.focus();
579
- }
580
- }, { injector: this.#injector });
581
- }
582
- /**
583
- * The page buttons: the first and last page, a window of `visiblePages` pages around the current one, and a
584
- * jump button for each longer gap. A gap of one page shows that page instead.
585
- */
586
- buildPageItems(current, visible, count) {
587
- const page = (value) => ({ key: `page-${value}`, kind: "page", page: value });
588
- if (count === 0) {
589
- return [];
590
- }
591
- if (count <= visible + 2) {
592
- return Array.from({ length: count }, (_, index) => page(index + 1));
593
- }
594
- const windowStart = Math.min(Math.max(current - Math.floor((visible - 1) / 2), 2), count - visible);
595
- const windowEnd = windowStart + visible - 1;
596
- const items = [page(1)];
597
- if (windowStart === 3) {
598
- items.push(page(2));
599
- }
600
- else if (windowStart > 3) {
601
- items.push({
602
- direction: "backward",
603
- key: "jump-backward",
604
- kind: "jump",
605
- page: Math.max(current - visible, 1)
606
- });
607
- }
608
- for (let value = windowStart; value <= windowEnd; value++) {
609
- items.push(page(value));
610
- }
611
- if (windowEnd === count - 2) {
612
- items.push(page(count - 1));
613
- }
614
- else if (windowEnd < count - 2) {
615
- items.push({
616
- direction: "forward",
617
- key: "jump-forward",
618
- kind: "jump",
619
- page: Math.min(current + visible, count)
620
- });
621
- }
622
- items.push(page(count));
623
- return items;
624
- }
625
- createNavigationContext(type) {
626
- const context = this.pagerContext();
627
- const page = this.page();
628
- const pageCount = this.pageCount();
629
- const backward = type === "first" || type === "previous";
630
- const targetPage = type === "first" ? 1 : type === "previous" ? page - 1 : type === "next" ? page + 1 : pageCount;
631
- const disabled = !this.hasPages() || (backward ? page <= 1 : page >= pageCount);
632
- return {
633
- ...context,
634
- $implicit: context,
635
- disabled,
636
- navigate: () => this.goToPage(targetPage),
637
- targetPage: Math.min(Math.max(targetPage, 1), Math.max(pageCount, 1))
638
- };
639
- }
640
- emitPageChange() {
641
- const take = this.pageSizeValue();
642
- this.pageChange.emit({ page: this.page(), skip: (this.page() - 1) * take, take });
643
- }
644
- findNavigationTemplate(type) {
645
- return this.navigationButtonsTemplateList().find(template => template.type() === type);
646
- }
647
- focusedInside() {
648
- const active = this.#document.activeElement;
649
- return active != null && this.#hostElementRef.nativeElement.contains(active);
650
- }
651
- isDisabled(element) {
652
- return element.disabled === true || element.getAttribute("aria-disabled") === "true";
653
- }
654
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PagerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
655
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: PagerComponent, isStandalone: true, selector: "mona-pager", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, firstLast: { classPropertyName: "firstLast", publicName: "firstLast", isSignal: true, isRequired: false, transformFunction: null }, navigable: { classPropertyName: "navigable", publicName: "navigable", isSignal: true, isRequired: false, transformFunction: null }, pageInput: { classPropertyName: "pageInput", publicName: "pageInput", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeValues: { classPropertyName: "pageSizeValues", publicName: "pageSizeValues", isSignal: true, isRequired: false, transformFunction: null }, previousNext: { classPropertyName: "previousNext", publicName: "previousNext", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showInfo: { classPropertyName: "showInfo", publicName: "showInfo", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, skip: { classPropertyName: "skip", publicName: "skip", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, userClasses: { classPropertyName: "userClasses", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, visiblePages: { classPropertyName: "visiblePages", publicName: "visiblePages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange", pageSize: "pageSizeChange", pageSizeSelect: "pageSizeSelect", skip: "skipChange" }, host: { attributes: { "role": "navigation" }, listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.aria-label": "ariaLabelledBy() ? null : ariaLabel() || messages().pagerLabel", "attr.aria-labelledby": "ariaLabelledBy() || null", "class": "baseClasses()" } }, queries: [{ propertyName: "navigationButtonsTemplateList", predicate: PagerNavigationButtonsTemplateDirective, isSignal: true }, { propertyName: "numericButtonsTemplate", first: true, predicate: PagerNumericButtonsTemplateDirective, descendants: true, isSignal: true }, { propertyName: "pageSizeTemplate", first: true, predicate: PagerPageSizeTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "pagerInfoTemplate", first: true, predicate: PagerInfoTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "pageSizeDropdownList", first: true, predicate: ["pageSizeDropdownList"], descendants: true, isSignal: true }], ngImport: i0, template: "@let numericButtonsTemplateRef = numericButtonsTemplate()?.templateRef;\n@let pageSizeTemplateRef = pageSizeTemplate();\n@let pagerInfoTemplateRef = pagerInfoTemplate()?.templateRef;\n\n@if (compact()) {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li>\n <mona-dropdown-list\n class=\"w-20\"\n [data]=\"pageList()\"\n [value]=\"page()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n monaDropDownVirtualScroll\n (valueChange)=\"goToPage($event)\">\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else if (type() === \"numeric\") {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n\n @if (numericButtonsTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"numericButtonsTemplateRef\"\n [ngTemplateOutletContext]=\"numericButtonsContext()\"></ng-container>\n } @else {\n @for (item of pageItems(); track item.key) {\n @if (item.kind === \"page\") {\n <li [attr.data-page]=\"item.page\" [class]=\"pageItemClasses(page() === item.page)\">\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === item.page\"\n [attr.aria-label]=\"messages().pageLabel(item.page)\"\n [attr.aria-current]=\"page() === item.page ? 'page' : null\"\n (click)=\"goToPage(item.page)\">\n {{ formatPageNumber(item.page) }}\n </button>\n </li>\n } @else {\n <li>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"item.direction === 'backward' ? jumpPreviousLabel() : jumpNextLabel()\"\n (click)=\"goToPage(item.page)\">\n <svg lucideEllipsis [size]=\"iconSize()\"></svg>\n </button>\n </li>\n }\n }\n }\n\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n\n @if (hasPages() && pageInput()) {\n <li>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n </li>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else {\n <div [class]=\"inputClasses\">\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li class=\"flex items-center gap-2 mx-2\">\n <span [id]=\"pageInputPrefixId\">{{ messages().pageInputPrefix(pageCount()) }}</span>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-labelledby]=\"pageInputLabelledBy\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n <span [id]=\"pageInputSuffixId\">{{ messages().pageInputSuffix(pageCount()) }}</span>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n </ol>\n </div>\n}\n\n@if (showInfo()) {\n @if (pagerInfoTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"pagerInfoTemplateRef\" [ngTemplateOutletContext]=\"infoContext()\"></ng-container>\n } @else {\n <span [class]=\"infoClasses\">{{ pagerInfo() }}</span>\n }\n}\n<span class=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveStatus() }}</span>\n\n<ng-template #pageSizeSelector>\n @if (pageSizeOptions().length > 0) {\n <li>\n @if (pageSizeTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pageSizeTemplateRef\"\n [ngTemplateOutletContext]=\"pageSizeContext()\"></ng-container>\n } @else {\n <mona-dropdown-list\n [data]=\"pageSizeOptions()\"\n [aria-label]=\"messages().itemsPerPageLabel\"\n [value]=\"pageSizeValue()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (valueChange)=\"changePageSize($event)\"\n #pageSizeDropdownList>\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ messages().pageSizeLabel(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n }\n </li>\n }\n</ng-template>\n\n<ng-template #firstPageButton>\n <li>\n @let firstPageTemplate = firstPageNavigationTemplate();\n @if (firstPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"firstPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"firstNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().firstPageLabel\"\n [disabled]=\"firstNavigationContext().disabled\"\n (click)=\"goToPage(1)\">\n <svg lucideChevronsLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #previousPageButton>\n <li>\n @let previousPageTemplate = previousPageNavigationTemplate();\n @if (previousPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"previousPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"previousNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"previousNavigationContext().disabled\"\n [attr.aria-label]=\"messages().previousPageLabel\"\n (click)=\"goToPage(page() - 1)\">\n <svg lucideChevronLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #nextPageButton>\n <li>\n @let nextPageTemplate = nextPageNavigationTemplate();\n @if (nextPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"nextPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"nextNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"nextNavigationContext().disabled\"\n [attr.aria-label]=\"messages().nextPageLabel\"\n (click)=\"goToPage(page() + 1)\">\n <svg lucideChevronRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #lastPageButton>\n <li>\n @let lastPageTemplate = lastPageNavigationTemplate();\n @if (lastPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"lastPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"lastNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().lastPageLabel\"\n [disabled]=\"lastNavigationContext().disabled\"\n (click)=\"goToPage(pageCount())\">\n <svg lucideChevronsRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class", "value"], outputs: ["lookChange", "selectedChange"] }, { kind: "component", type: NumericTextBoxComponent, selector: "mona-numeric-text-box", inputs: ["formatter", "maxValue", "minValue", "step", "value"], outputs: ["valueChange"] }, { kind: "component", type: DropdownListComponent, selector: "mona-dropdown-list", inputs: ["aria-describedby", "aria-label", "aria-labelledby", "data", "disabled", "invalid", "itemDisabled", "loading", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "required", "rounded", "showClearButton", "size", "textField", "touched", "class", "value", "valueField", "valuePrimitive"], outputs: ["close", "closed", "open", "opened", "touch", "valueChange"] }, { kind: "directive", type: DropdownVirtualScrollDirective, selector: " mona-auto-complete[monaDropDownVirtualScroll], mona-dropdown-list[monaDropDownVirtualScroll], mona-combo-box[monaDropDownVirtualScroll], mona-multi-select[monaDropDownVirtualScroll] ", inputs: ["monaDropDownVirtualScroll"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DropdownListValueTemplateDirective, selector: "ng-template[monaDropDownListValueTemplate]" }, { kind: "directive", type: DropdownItemTemplateDirective, selector: " ng-template[monaDropDownItemTemplate], ng-template[monaAutoCompleteItemTemplate], ng-template[monaDropDownListItemTemplate], ng-template[monaComboBoxItemTemplate], ng-template[monaMultiSelectItemTemplate] " }, { kind: "component", type: LucideEllipsis, selector: "svg[lucideEllipsis], svg[lucideMoreHorizontal]" }, { kind: "component", type: LucideChevronsLeft, selector: "svg[lucideChevronsLeft]" }, { kind: "component", type: LucideChevronLeft, selector: "svg[lucideChevronLeft]" }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "component", type: LucideChevronsRight, selector: "svg[lucideChevronsRight]" }] }); }
656
- }
657
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PagerComponent, decorators: [{
658
- type: Component,
659
- args: [{ selector: "mona-pager", imports: [
660
- ButtonDirective,
661
- NumericTextBoxComponent,
662
- DropdownListComponent,
663
- DropdownVirtualScrollDirective,
664
- NgTemplateOutlet,
665
- DropdownListValueTemplateDirective,
666
- DropdownItemTemplateDirective,
667
- LucideEllipsis,
668
- LucideChevronsLeft,
669
- LucideChevronLeft,
670
- LucideChevronRight,
671
- LucideChevronsRight
672
- ], host: {
673
- "[attr.aria-label]": "ariaLabelledBy() ? null : ariaLabel() || messages().pagerLabel",
674
- "[attr.aria-labelledby]": "ariaLabelledBy() || null",
675
- "[class]": "baseClasses()",
676
- "(keydown)": "onKeydown($event)",
677
- role: "navigation"
678
- }, template: "@let numericButtonsTemplateRef = numericButtonsTemplate()?.templateRef;\n@let pageSizeTemplateRef = pageSizeTemplate();\n@let pagerInfoTemplateRef = pagerInfoTemplate()?.templateRef;\n\n@if (compact()) {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li>\n <mona-dropdown-list\n class=\"w-20\"\n [data]=\"pageList()\"\n [value]=\"page()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n monaDropDownVirtualScroll\n (valueChange)=\"goToPage($event)\">\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else if (type() === \"numeric\") {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n\n @if (numericButtonsTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"numericButtonsTemplateRef\"\n [ngTemplateOutletContext]=\"numericButtonsContext()\"></ng-container>\n } @else {\n @for (item of pageItems(); track item.key) {\n @if (item.kind === \"page\") {\n <li [attr.data-page]=\"item.page\" [class]=\"pageItemClasses(page() === item.page)\">\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === item.page\"\n [attr.aria-label]=\"messages().pageLabel(item.page)\"\n [attr.aria-current]=\"page() === item.page ? 'page' : null\"\n (click)=\"goToPage(item.page)\">\n {{ formatPageNumber(item.page) }}\n </button>\n </li>\n } @else {\n <li>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"item.direction === 'backward' ? jumpPreviousLabel() : jumpNextLabel()\"\n (click)=\"goToPage(item.page)\">\n <svg lucideEllipsis [size]=\"iconSize()\"></svg>\n </button>\n </li>\n }\n }\n }\n\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n\n @if (hasPages() && pageInput()) {\n <li>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n </li>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else {\n <div [class]=\"inputClasses\">\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li class=\"flex items-center gap-2 mx-2\">\n <span [id]=\"pageInputPrefixId\">{{ messages().pageInputPrefix(pageCount()) }}</span>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-labelledby]=\"pageInputLabelledBy\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n <span [id]=\"pageInputSuffixId\">{{ messages().pageInputSuffix(pageCount()) }}</span>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n </ol>\n </div>\n}\n\n@if (showInfo()) {\n @if (pagerInfoTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"pagerInfoTemplateRef\" [ngTemplateOutletContext]=\"infoContext()\"></ng-container>\n } @else {\n <span [class]=\"infoClasses\">{{ pagerInfo() }}</span>\n }\n}\n<span class=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveStatus() }}</span>\n\n<ng-template #pageSizeSelector>\n @if (pageSizeOptions().length > 0) {\n <li>\n @if (pageSizeTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pageSizeTemplateRef\"\n [ngTemplateOutletContext]=\"pageSizeContext()\"></ng-container>\n } @else {\n <mona-dropdown-list\n [data]=\"pageSizeOptions()\"\n [aria-label]=\"messages().itemsPerPageLabel\"\n [value]=\"pageSizeValue()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (valueChange)=\"changePageSize($event)\"\n #pageSizeDropdownList>\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ messages().pageSizeLabel(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n }\n </li>\n }\n</ng-template>\n\n<ng-template #firstPageButton>\n <li>\n @let firstPageTemplate = firstPageNavigationTemplate();\n @if (firstPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"firstPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"firstNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().firstPageLabel\"\n [disabled]=\"firstNavigationContext().disabled\"\n (click)=\"goToPage(1)\">\n <svg lucideChevronsLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #previousPageButton>\n <li>\n @let previousPageTemplate = previousPageNavigationTemplate();\n @if (previousPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"previousPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"previousNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"previousNavigationContext().disabled\"\n [attr.aria-label]=\"messages().previousPageLabel\"\n (click)=\"goToPage(page() - 1)\">\n <svg lucideChevronLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #nextPageButton>\n <li>\n @let nextPageTemplate = nextPageNavigationTemplate();\n @if (nextPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"nextPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"nextNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"nextNavigationContext().disabled\"\n [attr.aria-label]=\"messages().nextPageLabel\"\n (click)=\"goToPage(page() + 1)\">\n <svg lucideChevronRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #lastPageButton>\n <li>\n @let lastPageTemplate = lastPageNavigationTemplate();\n @if (lastPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"lastPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"lastNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().lastPageLabel\"\n [disabled]=\"lastNavigationContext().disabled\"\n (click)=\"goToPage(pageCount())\">\n <svg lucideChevronsRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n" }]
679
- }], ctorParameters: () => [], propDecorators: { navigationButtonsTemplateList: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PagerNavigationButtonsTemplateDirective), { isSignal: true }] }], numericButtonsTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PagerNumericButtonsTemplateDirective), { isSignal: true }] }], pageSizeDropdownList: [{ type: i0.ViewChild, args: ["pageSizeDropdownList", { isSignal: true }] }], pageSizeTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PagerPageSizeTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], pagerInfoTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PagerInfoTemplateDirective), { isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], firstLast: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstLast", required: false }] }], navigable: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigable", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], pageInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageInput", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], pageSizeSelect: [{ type: i0.Output, args: ["pageSizeSelect"] }], pageSizeValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeValues", required: false }] }], previousNext: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousNext", required: false }] }], responsive: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsive", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], showInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "showInfo", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], skip: [{ type: i0.Input, args: [{ isSignal: true, alias: "skip", required: false }] }, { type: i0.Output, args: ["skipChange"] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], userClasses: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], visiblePages: [{ type: i0.Input, args: [{ isSignal: true, alias: "visiblePages", required: false }] }] } });
680
-
681
- /*
682
- * Public API Surface of @nanahoshi/mona-ui/pager
683
- */
684
-
685
- /**
686
- * Generated bundle index. Do not edit.
687
- */
688
-
280
+ var PagerComponent = class PagerComponent {
281
+ #compact;
282
+ #destroyRef;
283
+ #direction;
284
+ #document;
285
+ #hostElementRef;
286
+ #i18n;
287
+ #id;
288
+ #injector;
289
+ #widthObserver;
290
+ constructor() {
291
+ this.#compact = signal(false, ...ngDevMode ? [{ debugName: "#compact" }] : /* istanbul ignore next */ []);
292
+ this.#destroyRef = inject(DestroyRef);
293
+ this.#direction = injectComponentDirection();
294
+ this.#document = inject(DOCUMENT);
295
+ this.#hostElementRef = inject(ElementRef);
296
+ this.#i18n = inject(MonaI18nService);
297
+ this.#id = createElementControlId();
298
+ this.#injector = inject(Injector);
299
+ this.#widthObserver = null;
300
+ this.navigationButtonsTemplateList = contentChildren(PagerNavigationButtonsTemplateDirective, ...ngDevMode ? [{ debugName: "navigationButtonsTemplateList" }] : /* istanbul ignore next */ []);
301
+ this.baseClasses = computed(() => twMerge(pagerBaseThemeVariants({
302
+ rounded: this.rounded(),
303
+ size: this.size()
304
+ }), this.userClasses()), ...ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []);
305
+ this.compact = this.#compact.asReadonly();
306
+ this.end = computed(() => this.hasPages() ? Math.min(this.page() * this.pageSizeValue(), this.total()) : 0, ...ngDevMode ? [{ debugName: "end" }] : /* istanbul ignore next */ []);
307
+ this.firstNavigationContext = computed(() => this.createNavigationContext("first"), ...ngDevMode ? [{ debugName: "firstNavigationContext" }] : /* istanbul ignore next */ []);
308
+ this.firstPageNavigationTemplate = computed(() => this.findNavigationTemplate("first"), ...ngDevMode ? [{ debugName: "firstPageNavigationTemplate" }] : /* istanbul ignore next */ []);
309
+ this.hasPages = computed(() => this.pageCount() > 0, ...ngDevMode ? [{ debugName: "hasPages" }] : /* istanbul ignore next */ []);
310
+ this.iconSize = computed(() => {
311
+ switch (this.size()) {
312
+ case "small": return 18;
313
+ case "large": return 22;
314
+ default: return 20;
315
+ }
316
+ }, ...ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []);
317
+ this.infoClasses = pagerInfoThemeVariants();
318
+ this.infoContext = computed(() => {
319
+ const context = this.pagerContext();
320
+ return {
321
+ ...context,
322
+ $implicit: context
323
+ };
324
+ }, ...ngDevMode ? [{ debugName: "infoContext" }] : /* istanbul ignore next */ []);
325
+ this.inputClasses = pagerInputThemeVariants();
326
+ this.inputValue = linkedSignal(() => this.page(), ...ngDevMode ? [{ debugName: "inputValue" }] : /* istanbul ignore next */ []);
327
+ this.jumpNextLabel = computed(() => this.messages().jumpForwardLabel(this.visiblePages()), ...ngDevMode ? [{ debugName: "jumpNextLabel" }] : /* istanbul ignore next */ []);
328
+ this.jumpPreviousLabel = computed(() => this.messages().jumpBackwardLabel(this.visiblePages()), ...ngDevMode ? [{ debugName: "jumpPreviousLabel" }] : /* istanbul ignore next */ []);
329
+ this.lastNavigationContext = computed(() => this.createNavigationContext("last"), ...ngDevMode ? [{ debugName: "lastNavigationContext" }] : /* istanbul ignore next */ []);
330
+ this.lastPageNavigationTemplate = computed(() => this.findNavigationTemplate("last"), ...ngDevMode ? [{ debugName: "lastPageNavigationTemplate" }] : /* istanbul ignore next */ []);
331
+ this.listClasses = pagerListThemeVariants();
332
+ this.liveStatus = signal("", ...ngDevMode ? [{ debugName: "liveStatus" }] : /* istanbul ignore next */ []);
333
+ this.messages = this.#i18n.componentMessages("pager", PAGER_DEFAULT_MESSAGES);
334
+ this.nextNavigationContext = computed(() => this.createNavigationContext("next"), ...ngDevMode ? [{ debugName: "nextNavigationContext" }] : /* istanbul ignore next */ []);
335
+ this.nextPageNavigationTemplate = computed(() => this.findNavigationTemplate("next"), ...ngDevMode ? [{ debugName: "nextPageNavigationTemplate" }] : /* istanbul ignore next */ []);
336
+ this.numericButtonsContext = computed(() => {
337
+ const context = this.pagerContext();
338
+ const pages = this.pageItems().filter((item) => item.kind === "page").map((item) => item.page);
339
+ return {
340
+ ...context,
341
+ $implicit: context,
342
+ pages
343
+ };
344
+ }, ...ngDevMode ? [{ debugName: "numericButtonsContext" }] : /* istanbul ignore next */ []);
345
+ this.numericButtonsTemplate = contentChild(PagerNumericButtonsTemplateDirective, ...ngDevMode ? [{ debugName: "numericButtonsTemplate" }] : /* istanbul ignore next */ []);
346
+ this.page = computed(() => {
347
+ const pageCount = this.pageCount();
348
+ const page = Math.floor(this.skipValue() / this.pageSizeValue()) + 1;
349
+ return pageCount === 0 ? 1 : Math.min(page, pageCount);
350
+ }, ...ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []);
351
+ this.pageCount = computed(() => Math.ceil(this.total() / this.pageSizeValue()), ...ngDevMode ? [{ debugName: "pageCount" }] : /* istanbul ignore next */ []);
352
+ this.pageInputId = `${this.#id}-page`;
353
+ this.pageInputLabelledBy = `${this.#id}-page-prefix ${this.#id}-page ${this.#id}-page-suffix`;
354
+ this.pageInputPrefixId = `${this.#id}-page-prefix`;
355
+ this.pageInputSuffixId = `${this.#id}-page-suffix`;
356
+ this.pageItems = computed(() => this.buildPageItems(this.page(), this.visiblePages(), this.pageCount()), ...ngDevMode ? [{ debugName: "pageItems" }] : /* istanbul ignore next */ []);
357
+ this.pageList = computed(() => Array.from({ length: this.pageCount() }, (_, index) => index + 1), ...ngDevMode ? [{ debugName: "pageList" }] : /* istanbul ignore next */ []);
358
+ this.pageSizeContext = computed(() => ({
359
+ ...this.pagerContext(),
360
+ $implicit: this.pageSizeOptions()
361
+ }), ...ngDevMode ? [{ debugName: "pageSizeContext" }] : /* istanbul ignore next */ []);
362
+ this.pageSizeDropdownList = viewChild("pageSizeDropdownList", ...ngDevMode ? [{ debugName: "pageSizeDropdownList" }] : /* istanbul ignore next */ []);
363
+ this.pageSizeOptions = computed(() => {
364
+ const values = this.pageSizeValues();
365
+ if (values === false) return [];
366
+ return Array.isArray(values) ? values : DEFAULT_PAGE_SIZES;
367
+ }, ...ngDevMode ? [{ debugName: "pageSizeOptions" }] : /* istanbul ignore next */ []);
368
+ this.pageSizeTemplate = contentChild(PagerPageSizeTemplateDirective, {
369
+ ...ngDevMode ? { debugName: "pageSizeTemplate" } : /* istanbul ignore next */ {},
370
+ read: TemplateRef
371
+ });
372
+ this.pageSizeValue = computed(() => toCount(this.pageSize(), DEFAULT_PAGE_SIZE, 1), ...ngDevMode ? [{ debugName: "pageSizeValue" }] : /* istanbul ignore next */ []);
373
+ this.pagerContext = computed(() => ({
374
+ currentPage: this.page(),
375
+ end: this.end(),
376
+ goToPage: (page) => this.goToPage(page),
377
+ pageSize: this.pageSizeValue(),
378
+ pageSizes: this.pageSizeOptions(),
379
+ setPageSize: (pageSize) => this.changePageSize(pageSize),
380
+ skip: (this.page() - 1) * this.pageSizeValue(),
381
+ start: this.start(),
382
+ total: this.total(),
383
+ totalPages: this.pageCount()
384
+ }), ...ngDevMode ? [{ debugName: "pagerContext" }] : /* istanbul ignore next */ []);
385
+ this.pagerInfo = computed(() => this.messages().rangeStatus(this.start(), this.end(), this.total()), ...ngDevMode ? [{ debugName: "pagerInfo" }] : /* istanbul ignore next */ []);
386
+ this.pagerInfoTemplate = contentChild(PagerInfoTemplateDirective, ...ngDevMode ? [{ debugName: "pagerInfoTemplate" }] : /* istanbul ignore next */ []);
387
+ this.previousNavigationContext = computed(() => this.createNavigationContext("previous"), ...ngDevMode ? [{ debugName: "previousNavigationContext" }] : /* istanbul ignore next */ []);
388
+ this.previousPageNavigationTemplate = computed(() => this.findNavigationTemplate("previous"), ...ngDevMode ? [{ debugName: "previousPageNavigationTemplate" }] : /* istanbul ignore next */ []);
389
+ this.skipValue = computed(() => toCount(this.skip(), 0, 0), ...ngDevMode ? [{ debugName: "skipValue" }] : /* istanbul ignore next */ []);
390
+ this.start = computed(() => this.hasPages() ? (this.page() - 1) * this.pageSizeValue() + 1 : 0, ...ngDevMode ? [{ debugName: "start" }] : /* istanbul ignore next */ []);
391
+ this.ariaLabel = input(null, {
392
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
393
+ alias: "aria-label"
394
+ });
395
+ this.ariaLabelledBy = input("", {
396
+ ...ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {},
397
+ alias: "aria-labelledby"
398
+ });
399
+ this.firstLast = input(true, {
400
+ ...ngDevMode ? { debugName: "firstLast" } : /* istanbul ignore next */ {},
401
+ transform: booleanAttribute
402
+ });
403
+ this.navigable = input(true, {
404
+ ...ngDevMode ? { debugName: "navigable" } : /* istanbul ignore next */ {},
405
+ transform: booleanAttribute
406
+ });
407
+ this.pageChange = output();
408
+ this.pageInput = input(false, {
409
+ ...ngDevMode ? { debugName: "pageInput" } : /* istanbul ignore next */ {},
410
+ transform: booleanAttribute
411
+ });
412
+ this.pageSize = model(DEFAULT_PAGE_SIZE, ...ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []);
413
+ this.pageSizeSelect = output();
414
+ this.pageSizeValues = input(DEFAULT_PAGE_SIZES, ...ngDevMode ? [{ debugName: "pageSizeValues" }] : /* istanbul ignore next */ []);
415
+ this.previousNext = input(true, {
416
+ ...ngDevMode ? { debugName: "previousNext" } : /* istanbul ignore next */ {},
417
+ transform: booleanAttribute
418
+ });
419
+ this.responsive = input(true, {
420
+ ...ngDevMode ? { debugName: "responsive" } : /* istanbul ignore next */ {},
421
+ transform: booleanAttribute
422
+ });
423
+ this.rounded = input("medium", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
424
+ this.showInfo = input(true, {
425
+ ...ngDevMode ? { debugName: "showInfo" } : /* istanbul ignore next */ {},
426
+ transform: booleanAttribute
427
+ });
428
+ this.size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
429
+ this.skip = model(0, ...ngDevMode ? [{ debugName: "skip" }] : /* istanbul ignore next */ []);
430
+ this.total = input(0, {
431
+ ...ngDevMode ? { debugName: "total" } : /* istanbul ignore next */ {},
432
+ transform: (value) => toCount(value, 0, 0)
433
+ });
434
+ this.type = input("numeric", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
435
+ this.userClasses = input("", {
436
+ ...ngDevMode ? { debugName: "userClasses" } : /* istanbul ignore next */ {},
437
+ alias: "class"
438
+ });
439
+ this.visiblePages = input(5, {
440
+ ...ngDevMode ? { debugName: "visiblePages" } : /* istanbul ignore next */ {},
441
+ transform: (value) => toCount(value, 5, 1)
442
+ });
443
+ effect(() => {
444
+ const pageCount = this.pageCount();
445
+ const skip = this.skip();
446
+ const alignedSkip = (this.page() - 1) * this.pageSizeValue();
447
+ if (pageCount === 0 || skip === alignedSkip) return;
448
+ untracked(() => {
449
+ this.skip.set(alignedSkip);
450
+ this.emitPageChange();
451
+ });
452
+ });
453
+ afterRenderEffect(() => {
454
+ if (!this.responsive()) {
455
+ this.#widthObserver?.disconnect();
456
+ this.#widthObserver = null;
457
+ untracked(() => this.#compact.set(false));
458
+ return;
459
+ }
460
+ if (this.#widthObserver == null) {
461
+ const host = this.#hostElementRef.nativeElement;
462
+ this.#widthObserver = new ResizeObserver(() => {
463
+ untracked(() => this.#compact.set(host.clientWidth < COMPACT_WIDTH));
464
+ });
465
+ this.#widthObserver.observe(host);
466
+ }
467
+ });
468
+ this.#destroyRef.onDestroy(() => this.#widthObserver?.disconnect());
469
+ }
470
+ changePageSize(value) {
471
+ const previous = this.pageSizeValue();
472
+ if (value == null || !Number.isFinite(value) || value < 1 || value === previous) return;
473
+ const event = new PageSizeChangeEvent(value, previous);
474
+ this.pageSizeSelect.emit(event);
475
+ if (event.isDefaultPrevented()) {
476
+ this.pageSizeDropdownList()?.setValue(previous);
477
+ return;
478
+ }
479
+ const firstItemSkip = (this.page() - 1) * previous;
480
+ const focused = this.focusedInside();
481
+ this.pageSize.set(value);
482
+ this.skip.set(Math.floor(firstItemSkip / value) * value);
483
+ this.emitPageChange();
484
+ this.afterUserChange(focused);
485
+ }
486
+ commitPageInput() {
487
+ const value = this.inputValue();
488
+ if (value == null || !Number.isFinite(value) || !this.hasPages()) {
489
+ this.inputValue.set(this.page());
490
+ return;
491
+ }
492
+ const page = Math.min(Math.max(Math.round(value), 1), this.pageCount());
493
+ this.inputValue.set(page);
494
+ this.goToPage(page);
495
+ }
496
+ formatPageNumber(value) {
497
+ return formatNumber(value, this.#i18n.localeId(), { maximumFractionDigits: 0 });
498
+ }
499
+ goToPage(page) {
500
+ if (page == null || !Number.isFinite(page) || !this.hasPages()) return;
501
+ const target = Math.min(Math.max(Math.round(page), 1), this.pageCount());
502
+ const skip = (target - 1) * this.pageSizeValue();
503
+ if (target === this.page() && skip === this.skip()) return;
504
+ const focused = this.focusedInside();
505
+ this.skip.set(skip);
506
+ this.emitPageChange();
507
+ this.afterUserChange(focused);
508
+ }
509
+ onKeydown(event) {
510
+ if (!this.navigable() || event.defaultPrevented || event.altKey || event.ctrlKey || event.metaKey || !(event.target instanceof HTMLButtonElement) || !this.hasPages()) return;
511
+ const rtl = this.#direction() === "rtl";
512
+ let page;
513
+ switch (event.key) {
514
+ case NavigationKeys.Home:
515
+ page = 1;
516
+ break;
517
+ case NavigationKeys.End:
518
+ page = this.pageCount();
519
+ break;
520
+ case NavigationKeys.PageUp:
521
+ page = this.page() - 1;
522
+ break;
523
+ case NavigationKeys.PageDown:
524
+ page = this.page() + 1;
525
+ break;
526
+ case NavigationKeys.ArrowLeft:
527
+ page = this.page() + (rtl ? 1 : -1);
528
+ break;
529
+ case NavigationKeys.ArrowRight:
530
+ page = this.page() + (rtl ? -1 : 1);
531
+ break;
532
+ default: return;
533
+ }
534
+ event.preventDefault();
535
+ this.goToPage(page);
536
+ }
537
+ onPageInputEnter(event) {
538
+ const keyboardEvent = event;
539
+ if (keyboardEvent.isComposing || keyboardEvent.keyCode === 229) return;
540
+ keyboardEvent.preventDefault();
541
+ this.commitPageInput();
542
+ }
543
+ pageItemClasses(active) {
544
+ return pagerListItemThemeVariants({ active });
545
+ }
546
+ afterUserChange(focusedInside) {
547
+ this.liveStatus.set(this.pagerInfo());
548
+ if (!focusedInside) return;
549
+ const host = this.#hostElementRef.nativeElement;
550
+ afterNextRender({ read: () => {
551
+ const active = this.#document.activeElement;
552
+ if (active instanceof HTMLElement && host.contains(active) && !this.isDisabled(active)) return;
553
+ (host.querySelector("button[aria-current='page']") ?? Array.from(host.querySelectorAll("button")).find((b) => !b.disabled))?.focus();
554
+ } }, { injector: this.#injector });
555
+ }
556
+ buildPageItems(current, visible, count) {
557
+ const page = (value) => ({
558
+ key: `page-${value}`,
559
+ kind: "page",
560
+ page: value
561
+ });
562
+ if (count === 0) return [];
563
+ if (count <= visible + 2) return Array.from({ length: count }, (_, index) => page(index + 1));
564
+ const windowStart = Math.min(Math.max(current - Math.floor((visible - 1) / 2), 2), count - visible);
565
+ const windowEnd = windowStart + visible - 1;
566
+ const items = [page(1)];
567
+ if (windowStart === 3) items.push(page(2));
568
+ else if (windowStart > 3) items.push({
569
+ direction: "backward",
570
+ key: "jump-backward",
571
+ kind: "jump",
572
+ page: Math.max(current - visible, 1)
573
+ });
574
+ for (let value = windowStart; value <= windowEnd; value++) items.push(page(value));
575
+ if (windowEnd === count - 2) items.push(page(count - 1));
576
+ else if (windowEnd < count - 2) items.push({
577
+ direction: "forward",
578
+ key: "jump-forward",
579
+ kind: "jump",
580
+ page: Math.min(current + visible, count)
581
+ });
582
+ items.push(page(count));
583
+ return items;
584
+ }
585
+ createNavigationContext(type) {
586
+ const context = this.pagerContext();
587
+ const page = this.page();
588
+ const pageCount = this.pageCount();
589
+ const backward = type === "first" || type === "previous";
590
+ const targetPage = type === "first" ? 1 : type === "previous" ? page - 1 : type === "next" ? page + 1 : pageCount;
591
+ const disabled = !this.hasPages() || (backward ? page <= 1 : page >= pageCount);
592
+ return {
593
+ ...context,
594
+ $implicit: context,
595
+ disabled,
596
+ navigate: () => this.goToPage(targetPage),
597
+ targetPage: Math.min(Math.max(targetPage, 1), Math.max(pageCount, 1))
598
+ };
599
+ }
600
+ emitPageChange() {
601
+ const take = this.pageSizeValue();
602
+ this.pageChange.emit({
603
+ page: this.page(),
604
+ skip: (this.page() - 1) * take,
605
+ take
606
+ });
607
+ }
608
+ findNavigationTemplate(type) {
609
+ return this.navigationButtonsTemplateList().find((template) => template.type() === type);
610
+ }
611
+ focusedInside() {
612
+ const active = this.#document.activeElement;
613
+ return active != null && this.#hostElementRef.nativeElement.contains(active);
614
+ }
615
+ isDisabled(element) {
616
+ return element.disabled === true || element.getAttribute("aria-disabled") === "true";
617
+ }
618
+ static {
619
+ this.ɵfac = i0.ɵɵngDeclareFactory({
620
+ minVersion: "12.0.0",
621
+ version: "22.2.6",
622
+ ngImport: i0,
623
+ type: PagerComponent,
624
+ deps: [],
625
+ target: i0.ɵɵFactoryTarget.Component
626
+ });
627
+ }
628
+ static {
629
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
630
+ minVersion: "17.0.0",
631
+ version: "22.2.6",
632
+ type: PagerComponent,
633
+ isStandalone: true,
634
+ selector: "mona-pager",
635
+ inputs: {
636
+ ariaLabel: {
637
+ classPropertyName: "ariaLabel",
638
+ publicName: "aria-label",
639
+ isSignal: true,
640
+ isRequired: false,
641
+ transformFunction: null
642
+ },
643
+ ariaLabelledBy: {
644
+ classPropertyName: "ariaLabelledBy",
645
+ publicName: "aria-labelledby",
646
+ isSignal: true,
647
+ isRequired: false,
648
+ transformFunction: null
649
+ },
650
+ firstLast: {
651
+ classPropertyName: "firstLast",
652
+ publicName: "firstLast",
653
+ isSignal: true,
654
+ isRequired: false,
655
+ transformFunction: null
656
+ },
657
+ navigable: {
658
+ classPropertyName: "navigable",
659
+ publicName: "navigable",
660
+ isSignal: true,
661
+ isRequired: false,
662
+ transformFunction: null
663
+ },
664
+ pageInput: {
665
+ classPropertyName: "pageInput",
666
+ publicName: "pageInput",
667
+ isSignal: true,
668
+ isRequired: false,
669
+ transformFunction: null
670
+ },
671
+ pageSize: {
672
+ classPropertyName: "pageSize",
673
+ publicName: "pageSize",
674
+ isSignal: true,
675
+ isRequired: false,
676
+ transformFunction: null
677
+ },
678
+ pageSizeValues: {
679
+ classPropertyName: "pageSizeValues",
680
+ publicName: "pageSizeValues",
681
+ isSignal: true,
682
+ isRequired: false,
683
+ transformFunction: null
684
+ },
685
+ previousNext: {
686
+ classPropertyName: "previousNext",
687
+ publicName: "previousNext",
688
+ isSignal: true,
689
+ isRequired: false,
690
+ transformFunction: null
691
+ },
692
+ responsive: {
693
+ classPropertyName: "responsive",
694
+ publicName: "responsive",
695
+ isSignal: true,
696
+ isRequired: false,
697
+ transformFunction: null
698
+ },
699
+ rounded: {
700
+ classPropertyName: "rounded",
701
+ publicName: "rounded",
702
+ isSignal: true,
703
+ isRequired: false,
704
+ transformFunction: null
705
+ },
706
+ showInfo: {
707
+ classPropertyName: "showInfo",
708
+ publicName: "showInfo",
709
+ isSignal: true,
710
+ isRequired: false,
711
+ transformFunction: null
712
+ },
713
+ size: {
714
+ classPropertyName: "size",
715
+ publicName: "size",
716
+ isSignal: true,
717
+ isRequired: false,
718
+ transformFunction: null
719
+ },
720
+ skip: {
721
+ classPropertyName: "skip",
722
+ publicName: "skip",
723
+ isSignal: true,
724
+ isRequired: false,
725
+ transformFunction: null
726
+ },
727
+ total: {
728
+ classPropertyName: "total",
729
+ publicName: "total",
730
+ isSignal: true,
731
+ isRequired: false,
732
+ transformFunction: null
733
+ },
734
+ type: {
735
+ classPropertyName: "type",
736
+ publicName: "type",
737
+ isSignal: true,
738
+ isRequired: false,
739
+ transformFunction: null
740
+ },
741
+ userClasses: {
742
+ classPropertyName: "userClasses",
743
+ publicName: "class",
744
+ isSignal: true,
745
+ isRequired: false,
746
+ transformFunction: null
747
+ },
748
+ visiblePages: {
749
+ classPropertyName: "visiblePages",
750
+ publicName: "visiblePages",
751
+ isSignal: true,
752
+ isRequired: false,
753
+ transformFunction: null
754
+ }
755
+ },
756
+ outputs: {
757
+ pageChange: "pageChange",
758
+ pageSize: "pageSizeChange",
759
+ pageSizeSelect: "pageSizeSelect",
760
+ skip: "skipChange"
761
+ },
762
+ host: {
763
+ attributes: { "role": "navigation" },
764
+ listeners: { "keydown": "onKeydown($event)" },
765
+ properties: {
766
+ "attr.aria-label": "ariaLabelledBy() ? null : ariaLabel() || messages().pagerLabel",
767
+ "attr.aria-labelledby": "ariaLabelledBy() || null",
768
+ "class": "baseClasses()"
769
+ }
770
+ },
771
+ queries: [
772
+ {
773
+ propertyName: "navigationButtonsTemplateList",
774
+ predicate: PagerNavigationButtonsTemplateDirective,
775
+ isSignal: true
776
+ },
777
+ {
778
+ propertyName: "numericButtonsTemplate",
779
+ first: true,
780
+ predicate: PagerNumericButtonsTemplateDirective,
781
+ descendants: true,
782
+ isSignal: true
783
+ },
784
+ {
785
+ propertyName: "pageSizeTemplate",
786
+ first: true,
787
+ predicate: PagerPageSizeTemplateDirective,
788
+ descendants: true,
789
+ read: TemplateRef,
790
+ isSignal: true
791
+ },
792
+ {
793
+ propertyName: "pagerInfoTemplate",
794
+ first: true,
795
+ predicate: PagerInfoTemplateDirective,
796
+ descendants: true,
797
+ isSignal: true
798
+ }
799
+ ],
800
+ viewQueries: [{
801
+ propertyName: "pageSizeDropdownList",
802
+ first: true,
803
+ predicate: ["pageSizeDropdownList"],
804
+ descendants: true,
805
+ isSignal: true
806
+ }],
807
+ ngImport: i0,
808
+ template: "@let numericButtonsTemplateRef = numericButtonsTemplate()?.templateRef;\n@let pageSizeTemplateRef = pageSizeTemplate();\n@let pagerInfoTemplateRef = pagerInfoTemplate()?.templateRef;\n\n@if (compact()) {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li>\n <mona-dropdown-list\n class=\"w-20\"\n [data]=\"pageList()\"\n [value]=\"page()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n monaDropDownVirtualScroll\n (valueChange)=\"goToPage($event)\">\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else if (type() === \"numeric\") {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n\n @if (numericButtonsTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"numericButtonsTemplateRef\"\n [ngTemplateOutletContext]=\"numericButtonsContext()\"></ng-container>\n } @else {\n @for (item of pageItems(); track item.key) {\n @if (item.kind === \"page\") {\n <li [attr.data-page]=\"item.page\" [class]=\"pageItemClasses(page() === item.page)\">\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === item.page\"\n [attr.aria-label]=\"messages().pageLabel(item.page)\"\n [attr.aria-current]=\"page() === item.page ? 'page' : null\"\n (click)=\"goToPage(item.page)\">\n {{ formatPageNumber(item.page) }}\n </button>\n </li>\n } @else {\n <li>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"item.direction === 'backward' ? jumpPreviousLabel() : jumpNextLabel()\"\n (click)=\"goToPage(item.page)\">\n <svg lucideEllipsis [size]=\"iconSize()\"></svg>\n </button>\n </li>\n }\n }\n }\n\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n\n @if (hasPages() && pageInput()) {\n <li>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n </li>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else {\n <div [class]=\"inputClasses\">\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li class=\"flex items-center gap-2 mx-2\">\n <span [id]=\"pageInputPrefixId\">{{ messages().pageInputPrefix(pageCount()) }}</span>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-labelledby]=\"pageInputLabelledBy\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n <span [id]=\"pageInputSuffixId\">{{ messages().pageInputSuffix(pageCount()) }}</span>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n </ol>\n </div>\n}\n\n@if (showInfo()) {\n @if (pagerInfoTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"pagerInfoTemplateRef\" [ngTemplateOutletContext]=\"infoContext()\"></ng-container>\n } @else {\n <span [class]=\"infoClasses\">{{ pagerInfo() }}</span>\n }\n}\n<span class=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveStatus() }}</span>\n\n<ng-template #pageSizeSelector>\n @if (pageSizeOptions().length > 0) {\n <li>\n @if (pageSizeTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pageSizeTemplateRef\"\n [ngTemplateOutletContext]=\"pageSizeContext()\"></ng-container>\n } @else {\n <mona-dropdown-list\n [data]=\"pageSizeOptions()\"\n [aria-label]=\"messages().itemsPerPageLabel\"\n [value]=\"pageSizeValue()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (valueChange)=\"changePageSize($event)\"\n #pageSizeDropdownList>\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ messages().pageSizeLabel(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n }\n </li>\n }\n</ng-template>\n\n<ng-template #firstPageButton>\n <li>\n @let firstPageTemplate = firstPageNavigationTemplate();\n @if (firstPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"firstPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"firstNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().firstPageLabel\"\n [disabled]=\"firstNavigationContext().disabled\"\n (click)=\"goToPage(1)\">\n <svg lucideChevronsLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #previousPageButton>\n <li>\n @let previousPageTemplate = previousPageNavigationTemplate();\n @if (previousPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"previousPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"previousNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"previousNavigationContext().disabled\"\n [attr.aria-label]=\"messages().previousPageLabel\"\n (click)=\"goToPage(page() - 1)\">\n <svg lucideChevronLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #nextPageButton>\n <li>\n @let nextPageTemplate = nextPageNavigationTemplate();\n @if (nextPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"nextPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"nextNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"nextNavigationContext().disabled\"\n [attr.aria-label]=\"messages().nextPageLabel\"\n (click)=\"goToPage(page() + 1)\">\n <svg lucideChevronRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #lastPageButton>\n <li>\n @let lastPageTemplate = lastPageNavigationTemplate();\n @if (lastPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"lastPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"lastNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().lastPageLabel\"\n [disabled]=\"lastNavigationContext().disabled\"\n (click)=\"goToPage(pageCount())\">\n <svg lucideChevronsRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n",
809
+ dependencies: [
810
+ {
811
+ kind: "directive",
812
+ type: ButtonDirective,
813
+ selector: "button[monaButton]",
814
+ inputs: [
815
+ "aria-haspopup",
816
+ "disabled",
817
+ "iconOnly",
818
+ "loading",
819
+ "look",
820
+ "rounded",
821
+ "selected",
822
+ "size",
823
+ "tabindex",
824
+ "toggleable",
825
+ "type",
826
+ "class",
827
+ "value"
828
+ ],
829
+ outputs: ["lookChange", "selectedChange"]
830
+ },
831
+ {
832
+ kind: "component",
833
+ type: NumericTextBoxComponent,
834
+ selector: "mona-numeric-text-box",
835
+ inputs: [
836
+ "formatter",
837
+ "maxValue",
838
+ "minValue",
839
+ "step",
840
+ "value"
841
+ ],
842
+ outputs: ["valueChange"]
843
+ },
844
+ {
845
+ kind: "component",
846
+ type: DropdownListComponent,
847
+ selector: "mona-dropdown-list",
848
+ inputs: [
849
+ "aria-describedby",
850
+ "aria-label",
851
+ "aria-labelledby",
852
+ "data",
853
+ "disabled",
854
+ "invalid",
855
+ "itemDisabled",
856
+ "loading",
857
+ "placeholder",
858
+ "popupClass",
859
+ "popupHeight",
860
+ "popupWidth",
861
+ "readonly",
862
+ "required",
863
+ "rounded",
864
+ "showClearButton",
865
+ "size",
866
+ "textField",
867
+ "touched",
868
+ "class",
869
+ "value",
870
+ "valueField",
871
+ "valuePrimitive"
872
+ ],
873
+ outputs: [
874
+ "close",
875
+ "closed",
876
+ "open",
877
+ "opened",
878
+ "touch",
879
+ "valueChange"
880
+ ]
881
+ },
882
+ {
883
+ kind: "directive",
884
+ type: DropdownVirtualScrollDirective,
885
+ selector: " mona-auto-complete[monaDropDownVirtualScroll], mona-dropdown-list[monaDropDownVirtualScroll], mona-combo-box[monaDropDownVirtualScroll], mona-multi-select[monaDropDownVirtualScroll] ",
886
+ inputs: ["monaDropDownVirtualScroll"]
887
+ },
888
+ {
889
+ kind: "directive",
890
+ type: NgTemplateOutlet,
891
+ selector: "[ngTemplateOutlet]",
892
+ inputs: [
893
+ "ngTemplateOutletContext",
894
+ "ngTemplateOutlet",
895
+ "ngTemplateOutletInjector"
896
+ ]
897
+ },
898
+ {
899
+ kind: "directive",
900
+ type: DropdownListValueTemplateDirective,
901
+ selector: "ng-template[monaDropDownListValueTemplate]"
902
+ },
903
+ {
904
+ kind: "directive",
905
+ type: DropdownItemTemplateDirective,
906
+ selector: " ng-template[monaDropDownItemTemplate], ng-template[monaAutoCompleteItemTemplate], ng-template[monaDropDownListItemTemplate], ng-template[monaComboBoxItemTemplate], ng-template[monaMultiSelectItemTemplate] "
907
+ },
908
+ {
909
+ kind: "component",
910
+ type: LucideEllipsis,
911
+ selector: "svg[lucideEllipsis], svg[lucideMoreHorizontal]"
912
+ },
913
+ {
914
+ kind: "component",
915
+ type: LucideChevronsLeft,
916
+ selector: "svg[lucideChevronsLeft]"
917
+ },
918
+ {
919
+ kind: "component",
920
+ type: LucideChevronLeft,
921
+ selector: "svg[lucideChevronLeft]"
922
+ },
923
+ {
924
+ kind: "component",
925
+ type: LucideChevronRight,
926
+ selector: "svg[lucideChevronRight]"
927
+ },
928
+ {
929
+ kind: "component",
930
+ type: LucideChevronsRight,
931
+ selector: "svg[lucideChevronsRight]"
932
+ }
933
+ ]
934
+ });
935
+ }
936
+ };
937
+ i0.ɵɵngDeclareClassMetadata({
938
+ minVersion: "12.0.0",
939
+ version: "22.2.6",
940
+ ngImport: i0,
941
+ type: PagerComponent,
942
+ decorators: [{
943
+ type: Component,
944
+ args: [{
945
+ selector: "mona-pager",
946
+ imports: [
947
+ ButtonDirective,
948
+ NumericTextBoxComponent,
949
+ DropdownListComponent,
950
+ DropdownVirtualScrollDirective,
951
+ NgTemplateOutlet,
952
+ DropdownListValueTemplateDirective,
953
+ DropdownItemTemplateDirective,
954
+ LucideEllipsis,
955
+ LucideChevronsLeft,
956
+ LucideChevronLeft,
957
+ LucideChevronRight,
958
+ LucideChevronsRight
959
+ ],
960
+ host: {
961
+ "[attr.aria-label]": "ariaLabelledBy() ? null : ariaLabel() || messages().pagerLabel",
962
+ "[attr.aria-labelledby]": "ariaLabelledBy() || null",
963
+ "[class]": "baseClasses()",
964
+ "(keydown)": "onKeydown($event)",
965
+ role: "navigation"
966
+ },
967
+ template: "@let numericButtonsTemplateRef = numericButtonsTemplate()?.templateRef;\n@let pageSizeTemplateRef = pageSizeTemplate();\n@let pagerInfoTemplateRef = pagerInfoTemplate()?.templateRef;\n\n@if (compact()) {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li>\n <mona-dropdown-list\n class=\"w-20\"\n [data]=\"pageList()\"\n [value]=\"page()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n monaDropDownVirtualScroll\n (valueChange)=\"goToPage($event)\">\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else if (type() === \"numeric\") {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n\n @if (numericButtonsTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"numericButtonsTemplateRef\"\n [ngTemplateOutletContext]=\"numericButtonsContext()\"></ng-container>\n } @else {\n @for (item of pageItems(); track item.key) {\n @if (item.kind === \"page\") {\n <li [attr.data-page]=\"item.page\" [class]=\"pageItemClasses(page() === item.page)\">\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === item.page\"\n [attr.aria-label]=\"messages().pageLabel(item.page)\"\n [attr.aria-current]=\"page() === item.page ? 'page' : null\"\n (click)=\"goToPage(item.page)\">\n {{ formatPageNumber(item.page) }}\n </button>\n </li>\n } @else {\n <li>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"item.direction === 'backward' ? jumpPreviousLabel() : jumpNextLabel()\"\n (click)=\"goToPage(item.page)\">\n <svg lucideEllipsis [size]=\"iconSize()\"></svg>\n </button>\n </li>\n }\n }\n }\n\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n\n @if (hasPages() && pageInput()) {\n <li>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n </li>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else {\n <div [class]=\"inputClasses\">\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li class=\"flex items-center gap-2 mx-2\">\n <span [id]=\"pageInputPrefixId\">{{ messages().pageInputPrefix(pageCount()) }}</span>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-labelledby]=\"pageInputLabelledBy\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n <span [id]=\"pageInputSuffixId\">{{ messages().pageInputSuffix(pageCount()) }}</span>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n </ol>\n </div>\n}\n\n@if (showInfo()) {\n @if (pagerInfoTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"pagerInfoTemplateRef\" [ngTemplateOutletContext]=\"infoContext()\"></ng-container>\n } @else {\n <span [class]=\"infoClasses\">{{ pagerInfo() }}</span>\n }\n}\n<span class=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveStatus() }}</span>\n\n<ng-template #pageSizeSelector>\n @if (pageSizeOptions().length > 0) {\n <li>\n @if (pageSizeTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pageSizeTemplateRef\"\n [ngTemplateOutletContext]=\"pageSizeContext()\"></ng-container>\n } @else {\n <mona-dropdown-list\n [data]=\"pageSizeOptions()\"\n [aria-label]=\"messages().itemsPerPageLabel\"\n [value]=\"pageSizeValue()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (valueChange)=\"changePageSize($event)\"\n #pageSizeDropdownList>\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ messages().pageSizeLabel(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n }\n </li>\n }\n</ng-template>\n\n<ng-template #firstPageButton>\n <li>\n @let firstPageTemplate = firstPageNavigationTemplate();\n @if (firstPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"firstPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"firstNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().firstPageLabel\"\n [disabled]=\"firstNavigationContext().disabled\"\n (click)=\"goToPage(1)\">\n <svg lucideChevronsLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #previousPageButton>\n <li>\n @let previousPageTemplate = previousPageNavigationTemplate();\n @if (previousPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"previousPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"previousNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"previousNavigationContext().disabled\"\n [attr.aria-label]=\"messages().previousPageLabel\"\n (click)=\"goToPage(page() - 1)\">\n <svg lucideChevronLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #nextPageButton>\n <li>\n @let nextPageTemplate = nextPageNavigationTemplate();\n @if (nextPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"nextPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"nextNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"nextNavigationContext().disabled\"\n [attr.aria-label]=\"messages().nextPageLabel\"\n (click)=\"goToPage(page() + 1)\">\n <svg lucideChevronRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #lastPageButton>\n <li>\n @let lastPageTemplate = lastPageNavigationTemplate();\n @if (lastPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"lastPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"lastNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().lastPageLabel\"\n [disabled]=\"lastNavigationContext().disabled\"\n (click)=\"goToPage(pageCount())\">\n <svg lucideChevronsRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n"
968
+ }]
969
+ }],
970
+ ctorParameters: () => [],
971
+ propDecorators: {
972
+ navigationButtonsTemplateList: [{
973
+ type: i0.ContentChildren,
974
+ args: [i0.forwardRef(() => PagerNavigationButtonsTemplateDirective), { isSignal: true }]
975
+ }],
976
+ numericButtonsTemplate: [{
977
+ type: i0.ContentChild,
978
+ args: [i0.forwardRef(() => PagerNumericButtonsTemplateDirective), { isSignal: true }]
979
+ }],
980
+ pageSizeDropdownList: [{
981
+ type: i0.ViewChild,
982
+ args: ["pageSizeDropdownList", { isSignal: true }]
983
+ }],
984
+ pageSizeTemplate: [{
985
+ type: i0.ContentChild,
986
+ args: [i0.forwardRef(() => PagerPageSizeTemplateDirective), {
987
+ read: TemplateRef,
988
+ isSignal: true
989
+ }]
990
+ }],
991
+ pagerInfoTemplate: [{
992
+ type: i0.ContentChild,
993
+ args: [i0.forwardRef(() => PagerInfoTemplateDirective), { isSignal: true }]
994
+ }],
995
+ ariaLabel: [{
996
+ type: i0.Input,
997
+ args: [{
998
+ isSignal: true,
999
+ alias: "aria-label",
1000
+ required: false
1001
+ }]
1002
+ }],
1003
+ ariaLabelledBy: [{
1004
+ type: i0.Input,
1005
+ args: [{
1006
+ isSignal: true,
1007
+ alias: "aria-labelledby",
1008
+ required: false
1009
+ }]
1010
+ }],
1011
+ firstLast: [{
1012
+ type: i0.Input,
1013
+ args: [{
1014
+ isSignal: true,
1015
+ alias: "firstLast",
1016
+ required: false
1017
+ }]
1018
+ }],
1019
+ navigable: [{
1020
+ type: i0.Input,
1021
+ args: [{
1022
+ isSignal: true,
1023
+ alias: "navigable",
1024
+ required: false
1025
+ }]
1026
+ }],
1027
+ pageChange: [{
1028
+ type: i0.Output,
1029
+ args: ["pageChange"]
1030
+ }],
1031
+ pageInput: [{
1032
+ type: i0.Input,
1033
+ args: [{
1034
+ isSignal: true,
1035
+ alias: "pageInput",
1036
+ required: false
1037
+ }]
1038
+ }],
1039
+ pageSize: [{
1040
+ type: i0.Input,
1041
+ args: [{
1042
+ isSignal: true,
1043
+ alias: "pageSize",
1044
+ required: false
1045
+ }]
1046
+ }, {
1047
+ type: i0.Output,
1048
+ args: ["pageSizeChange"]
1049
+ }],
1050
+ pageSizeSelect: [{
1051
+ type: i0.Output,
1052
+ args: ["pageSizeSelect"]
1053
+ }],
1054
+ pageSizeValues: [{
1055
+ type: i0.Input,
1056
+ args: [{
1057
+ isSignal: true,
1058
+ alias: "pageSizeValues",
1059
+ required: false
1060
+ }]
1061
+ }],
1062
+ previousNext: [{
1063
+ type: i0.Input,
1064
+ args: [{
1065
+ isSignal: true,
1066
+ alias: "previousNext",
1067
+ required: false
1068
+ }]
1069
+ }],
1070
+ responsive: [{
1071
+ type: i0.Input,
1072
+ args: [{
1073
+ isSignal: true,
1074
+ alias: "responsive",
1075
+ required: false
1076
+ }]
1077
+ }],
1078
+ rounded: [{
1079
+ type: i0.Input,
1080
+ args: [{
1081
+ isSignal: true,
1082
+ alias: "rounded",
1083
+ required: false
1084
+ }]
1085
+ }],
1086
+ showInfo: [{
1087
+ type: i0.Input,
1088
+ args: [{
1089
+ isSignal: true,
1090
+ alias: "showInfo",
1091
+ required: false
1092
+ }]
1093
+ }],
1094
+ size: [{
1095
+ type: i0.Input,
1096
+ args: [{
1097
+ isSignal: true,
1098
+ alias: "size",
1099
+ required: false
1100
+ }]
1101
+ }],
1102
+ skip: [{
1103
+ type: i0.Input,
1104
+ args: [{
1105
+ isSignal: true,
1106
+ alias: "skip",
1107
+ required: false
1108
+ }]
1109
+ }, {
1110
+ type: i0.Output,
1111
+ args: ["skipChange"]
1112
+ }],
1113
+ total: [{
1114
+ type: i0.Input,
1115
+ args: [{
1116
+ isSignal: true,
1117
+ alias: "total",
1118
+ required: false
1119
+ }]
1120
+ }],
1121
+ type: [{
1122
+ type: i0.Input,
1123
+ args: [{
1124
+ isSignal: true,
1125
+ alias: "type",
1126
+ required: false
1127
+ }]
1128
+ }],
1129
+ userClasses: [{
1130
+ type: i0.Input,
1131
+ args: [{
1132
+ isSignal: true,
1133
+ alias: "class",
1134
+ required: false
1135
+ }]
1136
+ }],
1137
+ visiblePages: [{
1138
+ type: i0.Input,
1139
+ args: [{
1140
+ isSignal: true,
1141
+ alias: "visiblePages",
1142
+ required: false
1143
+ }]
1144
+ }]
1145
+ }
1146
+ });
689
1147
  export { PAGER_DEFAULT_MESSAGES, PageSizeChangeEvent, PagerComponent, PagerInfoTemplateDirective, PagerNavigationButtonsTemplateDirective, PagerNumericButtonsTemplateDirective, PagerPageSizeTemplateDirective };
690
- //# sourceMappingURL=nanahoshi-mona-ui-pager.mjs.map
1148
+
1149
+ //# sourceMappingURL=nanahoshi-mona-ui-pager.mjs.map