@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,684 +1,1418 @@
1
- import { NgTemplateOutlet } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { Directive, input, inject, DestroyRef, ElementRef, computed, contentChild, TemplateRef, output, booleanAttribute, effect, untracked, Component, model } from '@angular/core';
4
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import { ImmutableList } from '@mirei/ts-collections';
6
- import { MonaI18nService } from '@nanahoshi/mona-ui/i18n';
7
- import { ListService, LIST_DEFAULT_MESSAGES, ListComponent, ListHeaderTemplateDirective, ListFooterTemplateDirective, ListGroupHeaderTemplateDirective, ListItemTemplateDirective, ListNoDataTemplateDirective, LIST_VIEW_HOST_LIST_SERVICE } from '@nanahoshi/mona-ui/internal/list';
8
- import { PagerComponent } from '@nanahoshi/mona-ui/pager';
9
- import { Subject, fromEvent, filter } from 'rxjs';
10
- import { twMerge } from 'tailwind-merge';
11
- import { cva } from 'class-variance-authority';
12
-
13
- class ListViewFooterTemplateDirective {
14
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewFooterTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
15
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: ListViewFooterTemplateDirective, isStandalone: true, selector: "ng-template[monaListViewFooterTemplate]", ngImport: i0 }); }
16
- }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewFooterTemplateDirective, decorators: [{
18
- type: Directive,
19
- args: [{
20
- selector: "ng-template[monaListViewFooterTemplate]"
21
- }]
22
- }] });
23
-
24
- /**
25
- * Template for the header of each group. The group's value is the template's implicit value (`let-group`); see
26
- * `ListViewGroupHeaderTemplateContext`. The context isn't type-checked, so templates written against the value's own
27
- * type keep compiling.
28
- */
29
- class ListViewGroupHeaderTemplateDirective {
30
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewGroupHeaderTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
31
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: ListViewGroupHeaderTemplateDirective, isStandalone: true, selector: "ng-template[monaListViewGroupHeaderTemplate]", ngImport: i0 }); }
32
- }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewGroupHeaderTemplateDirective, decorators: [{
34
- type: Directive,
35
- args: [{
36
- selector: "ng-template[monaListViewGroupHeaderTemplate]"
37
- }]
38
- }] });
39
-
40
- class ListViewHeaderTemplateDirective {
41
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewHeaderTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
42
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: ListViewHeaderTemplateDirective, isStandalone: true, selector: "ng-template[monaListViewHeaderTemplate]", ngImport: i0 }); }
43
- }
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewHeaderTemplateDirective, decorators: [{
45
- type: Directive,
46
- args: [{
47
- selector: "ng-template[monaListViewHeaderTemplate]"
48
- }]
49
- }] });
50
-
51
- /**
52
- * Template for each item of a list view. The data item is the template's implicit value (`let-item`). Bind the list
53
- * view's items to `monaListViewItemTemplateOf` to type it; without it, the item is `any` in templates.
54
- */
55
- // `any` by default: a template without `monaListViewItemTemplateOf` keeps an untyped item, as before the guard existed.
56
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
57
- class ListViewItemTemplateDirective {
58
- constructor() {
59
- /**
60
- * @description The list view's items, used only to type the template's item. Optional.
61
- * @default null
62
- */
63
- this.monaListViewItemTemplateOf = input(null, /* @ts-ignore */
64
- ...(ngDevMode ? [{ debugName: "monaListViewItemTemplateOf" }] : /* istanbul ignore next */ []));
65
- }
66
- static ngTemplateContextGuard(_directive, _context) {
67
- return true;
68
- }
69
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewItemTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
70
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: ListViewItemTemplateDirective, isStandalone: true, selector: "ng-template[monaListViewItemTemplate]", inputs: { monaListViewItemTemplateOf: { classPropertyName: "monaListViewItemTemplateOf", publicName: "monaListViewItemTemplateOf", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
71
- }
72
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewItemTemplateDirective, decorators: [{
73
- type: Directive,
74
- args: [{
75
- selector: "ng-template[monaListViewItemTemplate]"
76
- }]
77
- }], propDecorators: { monaListViewItemTemplateOf: [{ type: i0.Input, args: [{ isSignal: true, alias: "monaListViewItemTemplateOf", required: false }] }] } });
78
-
79
- class ListViewNoDataTemplateDirective {
80
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewNoDataTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
81
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: ListViewNoDataTemplateDirective, isStandalone: true, selector: "ng-template[monaListViewNoDataTemplate]", ngImport: i0 }); }
82
- }
83
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewNoDataTemplateDirective, decorators: [{
84
- type: Directive,
85
- args: [{
86
- selector: "ng-template[monaListViewNoDataTemplate]"
87
- }]
88
- }] });
89
-
1
+ import { NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, DestroyRef, Directive, ElementRef, TemplateRef, booleanAttribute, computed, contentChild, effect, inject, input, model, output, untracked } from "@angular/core";
4
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
5
+ import { ImmutableList } from "@mirei/ts-collections";
6
+ import { MonaI18nService } from "@nanahoshi/mona-ui/i18n";
7
+ import { LIST_DEFAULT_MESSAGES, LIST_VIEW_HOST_LIST_SERVICE, ListComponent, ListFooterTemplateDirective, ListGroupHeaderTemplateDirective, ListHeaderTemplateDirective, ListItemTemplateDirective, ListNoDataTemplateDirective, ListService } from "@nanahoshi/mona-ui/internal/list";
8
+ import { PagerComponent } from "@nanahoshi/mona-ui/pager";
9
+ import { Subject, filter, fromEvent } from "rxjs";
10
+ import { twMerge } from "tailwind-merge";
11
+ import { cva } from "class-variance-authority";
12
+ var ListViewFooterTemplateDirective = class ListViewFooterTemplateDirective {
13
+ static {
14
+ this.ɵfac = i0.ɵɵngDeclareFactory({
15
+ minVersion: "12.0.0",
16
+ version: "22.2.6",
17
+ ngImport: i0,
18
+ type: ListViewFooterTemplateDirective,
19
+ deps: [],
20
+ target: i0.ɵɵFactoryTarget.Directive
21
+ });
22
+ }
23
+ static {
24
+ this.ɵdir = i0.ɵɵngDeclareDirective({
25
+ minVersion: "14.0.0",
26
+ version: "22.2.6",
27
+ type: ListViewFooterTemplateDirective,
28
+ isStandalone: true,
29
+ selector: "ng-template[monaListViewFooterTemplate]",
30
+ ngImport: i0
31
+ });
32
+ }
33
+ };
34
+ i0.ɵɵngDeclareClassMetadata({
35
+ minVersion: "12.0.0",
36
+ version: "22.2.6",
37
+ ngImport: i0,
38
+ type: ListViewFooterTemplateDirective,
39
+ decorators: [{
40
+ type: Directive,
41
+ args: [{ selector: "ng-template[monaListViewFooterTemplate]" }]
42
+ }]
43
+ });
44
+ var ListViewGroupHeaderTemplateDirective = class ListViewGroupHeaderTemplateDirective {
45
+ static {
46
+ this.ɵfac = i0.ɵɵngDeclareFactory({
47
+ minVersion: "12.0.0",
48
+ version: "22.2.6",
49
+ ngImport: i0,
50
+ type: ListViewGroupHeaderTemplateDirective,
51
+ deps: [],
52
+ target: i0.ɵɵFactoryTarget.Directive
53
+ });
54
+ }
55
+ static {
56
+ this.ɵdir = i0.ɵɵngDeclareDirective({
57
+ minVersion: "14.0.0",
58
+ version: "22.2.6",
59
+ type: ListViewGroupHeaderTemplateDirective,
60
+ isStandalone: true,
61
+ selector: "ng-template[monaListViewGroupHeaderTemplate]",
62
+ ngImport: i0
63
+ });
64
+ }
65
+ };
66
+ i0.ɵɵngDeclareClassMetadata({
67
+ minVersion: "12.0.0",
68
+ version: "22.2.6",
69
+ ngImport: i0,
70
+ type: ListViewGroupHeaderTemplateDirective,
71
+ decorators: [{
72
+ type: Directive,
73
+ args: [{ selector: "ng-template[monaListViewGroupHeaderTemplate]" }]
74
+ }]
75
+ });
76
+ var ListViewHeaderTemplateDirective = class ListViewHeaderTemplateDirective {
77
+ static {
78
+ this.ɵfac = i0.ɵɵngDeclareFactory({
79
+ minVersion: "12.0.0",
80
+ version: "22.2.6",
81
+ ngImport: i0,
82
+ type: ListViewHeaderTemplateDirective,
83
+ deps: [],
84
+ target: i0.ɵɵFactoryTarget.Directive
85
+ });
86
+ }
87
+ static {
88
+ this.ɵdir = i0.ɵɵngDeclareDirective({
89
+ minVersion: "14.0.0",
90
+ version: "22.2.6",
91
+ type: ListViewHeaderTemplateDirective,
92
+ isStandalone: true,
93
+ selector: "ng-template[monaListViewHeaderTemplate]",
94
+ ngImport: i0
95
+ });
96
+ }
97
+ };
98
+ i0.ɵɵngDeclareClassMetadata({
99
+ minVersion: "12.0.0",
100
+ version: "22.2.6",
101
+ ngImport: i0,
102
+ type: ListViewHeaderTemplateDirective,
103
+ decorators: [{
104
+ type: Directive,
105
+ args: [{ selector: "ng-template[monaListViewHeaderTemplate]" }]
106
+ }]
107
+ });
108
+ var ListViewItemTemplateDirective = class ListViewItemTemplateDirective {
109
+ constructor() {
110
+ this.monaListViewItemTemplateOf = input(null, ...ngDevMode ? [{ debugName: "monaListViewItemTemplateOf" }] : /* istanbul ignore next */ []);
111
+ }
112
+ static ngTemplateContextGuard(_directive, _context) {
113
+ return true;
114
+ }
115
+ static {
116
+ this.ɵfac = i0.ɵɵngDeclareFactory({
117
+ minVersion: "12.0.0",
118
+ version: "22.2.6",
119
+ ngImport: i0,
120
+ type: ListViewItemTemplateDirective,
121
+ deps: [],
122
+ target: i0.ɵɵFactoryTarget.Directive
123
+ });
124
+ }
125
+ static {
126
+ this.ɵdir = i0.ɵɵngDeclareDirective({
127
+ minVersion: "17.1.0",
128
+ version: "22.2.6",
129
+ type: ListViewItemTemplateDirective,
130
+ isStandalone: true,
131
+ selector: "ng-template[monaListViewItemTemplate]",
132
+ inputs: { monaListViewItemTemplateOf: {
133
+ classPropertyName: "monaListViewItemTemplateOf",
134
+ publicName: "monaListViewItemTemplateOf",
135
+ isSignal: true,
136
+ isRequired: false,
137
+ transformFunction: null
138
+ } },
139
+ ngImport: i0
140
+ });
141
+ }
142
+ };
143
+ i0.ɵɵngDeclareClassMetadata({
144
+ minVersion: "12.0.0",
145
+ version: "22.2.6",
146
+ ngImport: i0,
147
+ type: ListViewItemTemplateDirective,
148
+ decorators: [{
149
+ type: Directive,
150
+ args: [{ selector: "ng-template[monaListViewItemTemplate]" }]
151
+ }],
152
+ propDecorators: { monaListViewItemTemplateOf: [{
153
+ type: i0.Input,
154
+ args: [{
155
+ isSignal: true,
156
+ alias: "monaListViewItemTemplateOf",
157
+ required: false
158
+ }]
159
+ }] }
160
+ });
161
+ var ListViewNoDataTemplateDirective = class ListViewNoDataTemplateDirective {
162
+ static {
163
+ this.ɵfac = i0.ɵɵngDeclareFactory({
164
+ minVersion: "12.0.0",
165
+ version: "22.2.6",
166
+ ngImport: i0,
167
+ type: ListViewNoDataTemplateDirective,
168
+ deps: [],
169
+ target: i0.ɵɵFactoryTarget.Directive
170
+ });
171
+ }
172
+ static {
173
+ this.ɵdir = i0.ɵɵngDeclareDirective({
174
+ minVersion: "14.0.0",
175
+ version: "22.2.6",
176
+ type: ListViewNoDataTemplateDirective,
177
+ isStandalone: true,
178
+ selector: "ng-template[monaListViewNoDataTemplate]",
179
+ ngImport: i0
180
+ });
181
+ }
182
+ };
183
+ i0.ɵɵngDeclareClassMetadata({
184
+ minVersion: "12.0.0",
185
+ version: "22.2.6",
186
+ ngImport: i0,
187
+ type: ListViewNoDataTemplateDirective,
188
+ decorators: [{
189
+ type: Directive,
190
+ args: [{ selector: "ng-template[monaListViewNoDataTemplate]" }]
191
+ }]
192
+ });
90
193
  const listViewBaseThemeVariants = cva(`
91
194
  flex h-full flex-col overflow-hidden
92
195
  bg-surface text-foreground
93
196
  border border-border
94
197
  outline-none focus-visible:outline-hidden
95
- `, {
96
- variants: {
97
- rounded: {
98
- small: "rounded-sm",
99
- medium: "rounded-md",
100
- large: "rounded-lg",
101
- none: "rounded-none"
102
- },
103
- size: {
104
- small: "text-sm",
105
- medium: "text-base",
106
- large: "text-lg"
107
- }
108
- }
109
- });
110
-
111
- /** How close to the end (in pixels) counts as scrolled to the bottom. */
198
+ `, { variants: {
199
+ rounded: {
200
+ small: "rounded-sm",
201
+ medium: "rounded-md",
202
+ large: "rounded-lg",
203
+ none: "rounded-none"
204
+ },
205
+ size: {
206
+ small: "text-sm",
207
+ medium: "text-base",
208
+ large: "text-lg"
209
+ }
210
+ } });
112
211
  const SCROLL_BOTTOM_THRESHOLD = 3;
113
- class ListViewComponent {
114
- #destroyRef;
115
- #hostElementRef;
116
- #atBottom;
117
- constructor() {
118
- this.#destroyRef = inject(DestroyRef);
119
- this.#hostElementRef = inject(ElementRef);
120
- this.#atBottom = false;
121
- this.baseClasses = computed(() => {
122
- const rounded = this.rounded();
123
- const size = this.size();
124
- const variantClasses = listViewBaseThemeVariants({ rounded, size });
125
- const userClass = this.userClass();
126
- return twMerge(variantClasses, userClass);
127
- }, /* @ts-ignore */
128
- ...(ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []));
129
- this.footerTemplate = contentChild(ListViewFooterTemplateDirective, { ...(ngDevMode ? { debugName: "footerTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
130
- this.groupHeaderTemplate = contentChild(ListViewGroupHeaderTemplateDirective, { ...(ngDevMode ? { debugName: "groupHeaderTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
131
- this.headerTemplate = contentChild(ListViewHeaderTemplateDirective, { ...(ngDevMode ? { debugName: "headerTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
132
- this.itemCount = computed(() => this.listItems().length, /* @ts-ignore */
133
- ...(ngDevMode ? [{ debugName: "itemCount" }] : /* istanbul ignore next */ []));
134
- this.itemTemplate = contentChild(ListViewItemTemplateDirective, { ...(ngDevMode ? { debugName: "itemTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
135
- this.listHeight = computed(() => {
136
- const height = this.height();
137
- return typeof height === "number" ? `${height}px` : height;
138
- }, /* @ts-ignore */
139
- ...(ngDevMode ? [{ debugName: "listHeight" }] : /* istanbul ignore next */ []));
140
- /** The items as given: a list, so equal items (two `"a"` strings) are both shown. */
141
- this.listItems = computed(() => ImmutableList.create(this.items()), /* @ts-ignore */
142
- ...(ngDevMode ? [{ debugName: "listItems" }] : /* istanbul ignore next */ []));
143
- this.listMaxHeight = computed(() => {
144
- const maxHeight = this.maxHeight();
145
- return typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight;
146
- }, /* @ts-ignore */
147
- ...(ngDevMode ? [{ debugName: "listMaxHeight" }] : /* istanbul ignore next */ []));
148
- this.listMaxWidth = computed(() => {
149
- const maxWidth = this.maxWidth();
150
- return typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth;
151
- }, /* @ts-ignore */
152
- ...(ngDevMode ? [{ debugName: "listMaxWidth" }] : /* istanbul ignore next */ []));
153
- /**
154
- * A list you can select from is a `listbox`; one that only shows items is a `list`.
155
- */
156
- this.listRole = computed(() => this.listService.selectableOptions().enabled ? "listbox" : "list", /* @ts-ignore */
157
- ...(ngDevMode ? [{ debugName: "listRole" }] : /* istanbul ignore next */ []));
158
- this.listService = inject(ListService);
159
- this.listWidth = computed(() => {
160
- const width = this.width();
161
- return typeof width === "number" ? `${width}px` : width;
162
- }, /* @ts-ignore */
163
- ...(ngDevMode ? [{ debugName: "listWidth" }] : /* istanbul ignore next */ []));
164
- this.messages = inject(MonaI18nService).componentMessages("list", LIST_DEFAULT_MESSAGES);
165
- this.noDataTemplate = contentChild(ListViewNoDataTemplateDirective, { ...(ngDevMode ? { debugName: "noDataTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
166
- /** The pager's name: the given one, else one built from the list's name, else the pager's own default. */
167
- this.pagerLabel = computed(() => {
168
- const pagerAriaLabel = this.pagerAriaLabel();
169
- if (pagerAriaLabel) {
170
- return pagerAriaLabel;
171
- }
172
- const ariaLabel = this.ariaLabel();
173
- return ariaLabel ? this.messages().pagerLabel(ariaLabel) : null;
174
- }, /* @ts-ignore */
175
- ...(ngDevMode ? [{ debugName: "pagerLabel" }] : /* istanbul ignore next */ []));
176
- /** Polite status text: loading, or the empty state. */
177
- this.statusText = computed(() => {
178
- if (this.loading()) {
179
- return this.messages().loading;
180
- }
181
- return this.itemCount() === 0 ? this.messages().noData : "";
182
- }, /* @ts-ignore */
183
- ...(ngDevMode ? [{ debugName: "statusText" }] : /* istanbul ignore next */ []));
184
- /**
185
- * @description Accessible name for the list view's `listbox` element. Describe what the list represents.
186
- * @default ""
187
- */
188
- this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
189
- /**
190
- * @description Id of the element that names the list view's list, as an alternative to `aria-label`.
191
- * @default ""
192
- */
193
- this.ariaLabelledBy = input("", { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: "aria-labelledby" });
194
- /**
195
- * @description Property name or predicate that marks an item as disabled. Disabled items can't be selected,
196
- * activated or reached by typeahead.
197
- * @default ""
198
- */
199
- this.disabledBy = input("", /* @ts-ignore */
200
- ...(ngDevMode ? [{ debugName: "disabledBy" }] : /* istanbul ignore next */ []));
201
- /**
202
- * @description Sets the height of the list view. With virtual scrolling, the viewport takes this height, so a
203
- * percentage needs a parent with a height; `""` sizes the viewport to its items instead.
204
- * @default 100%
205
- */
206
- this.height = input("100%", /* @ts-ignore */
207
- ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
208
- /**
209
- * @description Emitted with the data item when the user activates an enabled item by clicking it or pressing
210
- * Enter on it. Fires whether or not the list view is selectable.
211
- */
212
- this.itemActivate = output();
213
- /**
214
- * @description Collection of items to render.
215
- * @default []
216
- */
217
- this.items = input([], /* @ts-ignore */
218
- ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
219
- /**
220
- * @description Sets the classes of the inner UL element.
221
- * @default ""
222
- */
223
- this.listClass = input("", /* @ts-ignore */
224
- ...(ngDevMode ? [{ debugName: "listClass" }] : /* istanbul ignore next */ []));
225
- /**
226
- * @description Sets the classes of the list items.
227
- * @default ""
228
- */
229
- this.listItemClass = input("", /* @ts-ignore */
230
- ...(ngDevMode ? [{ debugName: "listItemClass" }] : /* istanbul ignore next */ []));
231
- /**
232
- * @description Sets the style of the list items.
233
- * @default {}
234
- */
235
- this.listItemStyle = input({}, /* @ts-ignore */
236
- ...(ngDevMode ? [{ debugName: "listItemStyle" }] : /* istanbul ignore next */ []));
237
- /**
238
- * @description Sets the style of the list.
239
- * @default {}
240
- */
241
- this.listStyle = input({}, /* @ts-ignore */
242
- ...(ngDevMode ? [{ debugName: "listStyle" }] : /* istanbul ignore next */ []));
243
- /**
244
- * @description Marks the list as loading: it gets `aria-busy` and a polite "Loading" status.
245
- * @default false
246
- */
247
- this.loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
248
- /**
249
- * @description Sets the maximum height of the list.
250
- * @default ""
251
- */
252
- this.maxHeight = input("", /* @ts-ignore */
253
- ...(ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []));
254
- /**
255
- * @description Sets the maximum width of the list.
256
- * @default ""
257
- */
258
- this.maxWidth = input("", /* @ts-ignore */
259
- ...(ngDevMode ? [{ debugName: "maxWidth" }] : /* istanbul ignore next */ []));
260
- /**
261
- * Page-size picks from the pager, forwarded to `ListViewPageableDirective`.
262
- * @internal
263
- */
264
- this.pageSizeSelect$ = new Subject();
265
- /**
266
- * @description Accessible name of the pager. Defaults to "{name} pagination" from the list view's `aria-label`,
267
- * so two paged list views on a page have different landmarks.
268
- * @default ""
269
- */
270
- this.pagerAriaLabel = input("", /* @ts-ignore */
271
- ...(ngDevMode ? [{ debugName: "pagerAriaLabel" }] : /* istanbul ignore next */ []));
272
- /**
273
- * @description Border-radius preset applied to the component.
274
- * @default medium
275
- */
276
- this.rounded = input("medium", /* @ts-ignore */
277
- ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
278
- /**
279
- * @description Emitted once each time the list is scrolled to its end, when the list view isn't paged. Scrolling
280
- * away and back emits again, as does reaching the new end after more items are added.
281
- */
282
- this.scrollBottom = output();
283
- /**
284
- * @description Size preset controlling the component's dimensions.
285
- * @default medium
286
- */
287
- this.size = input("medium", /* @ts-ignore */
288
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
289
- /**
290
- * @description Property name or accessor used to derive the display text from a data item.
291
- * @default ""
292
- */
293
- this.textField = input("", /* @ts-ignore */
294
- ...(ngDevMode ? [{ debugName: "textField" }] : /* istanbul ignore next */ []));
295
- /**
296
- * @description Additional CSS classes merged onto the host element via `tailwind-merge`.
297
- * @default ""
298
- */
299
- this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
300
- /**
301
- * @description Sets the width of the list view.
302
- * @default 100%
303
- */
304
- this.width = input("100%", /* @ts-ignore */
305
- ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
306
- // Arrow keys, Home/End and typeahead work without the navigable directive, which can still change or turn
307
- // them off. Without them only one item could be reached from the keyboard.
308
- this.listService.setNavigableOptions({ enabled: true, mode: "select", wrap: false });
309
- effect(() => {
310
- const textField = this.textField();
311
- untracked(() => this.listService.setTextField(textField ?? ""));
312
- });
313
- effect(() => {
314
- const disabledBy = this.disabledBy();
315
- untracked(() => this.listService.setDisabledBy(disabledBy ?? ""));
316
- });
317
- this.setScrollBottomEvent();
318
- }
319
- onItemActivate(item) {
320
- this.itemActivate.emit(item.data);
321
- }
322
- onPageChange(event) {
323
- this.listService.pageState.update(s => ({ ...s, page: event.page, skip: event.skip, take: event.take }));
324
- }
325
- onPageSizeSelect(event) {
326
- this.pageSizeSelect$.next(event);
327
- }
328
- /** Whether the scrolled element is this list view's own list or viewport, not a nested list view or template. */
329
- isListScroll(target) {
330
- if (!(target instanceof HTMLElement) ||
331
- target.closest("mona-list-view") !== this.#hostElementRef.nativeElement) {
332
- return false;
333
- }
334
- return target.matches("cdk-virtual-scroll-viewport") || target.matches("mona-list > ul");
335
- }
336
- /**
337
- * Scroll events don't bubble, so the host listens in the capture phase. That covers the list and the virtual
338
- * viewport whenever they are rendered, including ones created after the first render.
339
- */
340
- setScrollBottomEvent() {
341
- const host = this.#hostElementRef.nativeElement;
342
- fromEvent(host, "scroll", { capture: true })
343
- .pipe(takeUntilDestroyed(this.#destroyRef), filter(event => this.isListScroll(event.target)), filter(event => {
344
- const target = event.target;
345
- const atBottom = target.scrollHeight - target.scrollTop - target.clientHeight < SCROLL_BOTTOM_THRESHOLD;
346
- const arrived = atBottom && !this.#atBottom;
347
- this.#atBottom = atBottom;
348
- return arrived && !this.listService.pageableOptions().enabled;
349
- }))
350
- .subscribe(event => this.scrollBottom.emit(event));
351
- }
352
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
353
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ListViewComponent, isStandalone: true, selector: "mona-list-view", 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 }, disabledBy: { classPropertyName: "disabledBy", publicName: "disabledBy", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, listClass: { classPropertyName: "listClass", publicName: "listClass", isSignal: true, isRequired: false, transformFunction: null }, listItemClass: { classPropertyName: "listItemClass", publicName: "listItemClass", isSignal: true, isRequired: false, transformFunction: null }, listItemStyle: { classPropertyName: "listItemStyle", publicName: "listItemStyle", isSignal: true, isRequired: false, transformFunction: null }, listStyle: { classPropertyName: "listStyle", publicName: "listStyle", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, pagerAriaLabel: { classPropertyName: "pagerAriaLabel", publicName: "pagerAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemActivate: "itemActivate", scrollBottom: "scrollBottom" }, host: { properties: { "class": "baseClasses()", "attr.tabindex": "-1", "attr.aria-label": "null", "attr.aria-labelledby": "null" } }, providers: [
354
- {
355
- // Each list view has its own service, unless the component whose template it is in shares one on purpose.
356
- provide: ListService,
357
- useFactory: () => inject(LIST_VIEW_HOST_LIST_SERVICE, { optional: true, skipSelf: true }) ?? new ListService()
358
- }
359
- ], queries: [{ propertyName: "footerTemplate", first: true, predicate: ListViewFooterTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "groupHeaderTemplate", first: true, predicate: ListViewGroupHeaderTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ListViewHeaderTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: ListViewItemTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "noDataTemplate", first: true, predicate: ListViewNoDataTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<mona-list\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [busy]=\"loading()\"\n [listRole]=\"listRole()\"\n [data]=\"listItems()\"\n [height]=\"listHeight()\"\n [focusOnMount]=\"false\"\n [width]=\"listWidth()\"\n [maxHeight]=\"listMaxHeight()\"\n [maxWidth]=\"listMaxWidth()\"\n [listItemClass]=\"listItemClass()\"\n [listItemStyle]=\"listItemStyle()\"\n [listClass]=\"listClass()\"\n [listStyle]=\"listStyle()\"\n (itemActivate)=\"onItemActivate($event)\">\n @if (footerTemplate()) {\n <ng-template monaListFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n @if (groupHeaderTemplate()) {\n <ng-template monaListGroupHeaderTemplate let-groupHeader>\n <ng-container\n [ngTemplateOutlet]=\"groupHeaderTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: groupHeader }\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n</mona-list>\n\n@let pageableOptions = listService.pageableOptions();\n@if (pageableOptions.enabled && !listService.virtualScrollOptions().enabled && itemCount() > 0) {\n @let pageState = listService.pageState();\n <mona-pager\n [firstLast]=\"pageableOptions.firstLast\"\n [pageSizeValues]=\"pageableOptions.pageSizeValues\"\n [visiblePages]=\"pageableOptions.visiblePages\"\n [total]=\"itemCount()\"\n [skip]=\"pageState.skip\"\n [responsive]=\"false\"\n [rounded]=\"rounded()\"\n [pageSize]=\"pageState.take\"\n [previousNext]=\"pageableOptions.previousNext\"\n [showInfo]=\"pageableOptions.showInfo\"\n [type]=\"pageableOptions.type\"\n [size]=\"size()\"\n [aria-label]=\"pagerLabel()\"\n (pageChange)=\"onPageChange($event)\"\n (pageSizeSelect)=\"onPageSizeSelect($event)\"\n class=\"border-b-0 border-x-0 rounded-t-none\"></mona-pager>\n}\n<div role=\"status\" class=\"sr-only\">{{ statusText() }}</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PagerComponent, selector: "mona-pager", inputs: ["aria-label", "aria-labelledby", "firstLast", "navigable", "pageInput", "pageSize", "pageSizeValues", "previousNext", "responsive", "rounded", "showInfo", "size", "skip", "total", "type", "class", "visiblePages"], outputs: ["pageChange", "pageSizeChange", "pageSizeSelect", "skipChange"] }, { kind: "component", type: ListComponent, selector: "mona-list", inputs: ["ariaLabel", "ariaLabelledBy", "busy", "data", "focusOnMount", "height", "listClass", "listId", "listItemClass", "listItemStyle", "listRole", "listStyle", "maxHeight", "maxWidth", "size", "textField", "width"], outputs: ["itemActivate", "itemSelect"] }, { kind: "directive", type: ListHeaderTemplateDirective, selector: "ng-template[monaListHeaderTemplate]" }, { kind: "directive", type: ListFooterTemplateDirective, selector: "ng-template[monaListFooterTemplate]" }, { kind: "directive", type: ListGroupHeaderTemplateDirective, selector: "ng-template[monaListGroupHeaderTemplate]" }, { kind: "directive", type: ListItemTemplateDirective, selector: "ng-template[monaListItemTemplate]" }, { kind: "directive", type: ListNoDataTemplateDirective, selector: "ng-template[monaListNoDataTemplate]" }] }); }
360
- }
361
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewComponent, decorators: [{
362
- type: Component,
363
- args: [{ selector: "mona-list-view", providers: [
364
- {
365
- // Each list view has its own service, unless the component whose template it is in shares one on purpose.
366
- provide: ListService,
367
- useFactory: () => inject(LIST_VIEW_HOST_LIST_SERVICE, { optional: true, skipSelf: true }) ?? new ListService()
368
- }
369
- ], imports: [
370
- NgTemplateOutlet,
371
- PagerComponent,
372
- ListComponent,
373
- ListHeaderTemplateDirective,
374
- ListFooterTemplateDirective,
375
- ListGroupHeaderTemplateDirective,
376
- ListItemTemplateDirective,
377
- ListNoDataTemplateDirective
378
- ], host: {
379
- "[class]": "baseClasses()",
380
- "[attr.tabindex]": "-1",
381
- // The name belongs to the list inside; the host has no role to carry it.
382
- "[attr.aria-label]": "null",
383
- "[attr.aria-labelledby]": "null"
384
- }, template: "<mona-list\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [busy]=\"loading()\"\n [listRole]=\"listRole()\"\n [data]=\"listItems()\"\n [height]=\"listHeight()\"\n [focusOnMount]=\"false\"\n [width]=\"listWidth()\"\n [maxHeight]=\"listMaxHeight()\"\n [maxWidth]=\"listMaxWidth()\"\n [listItemClass]=\"listItemClass()\"\n [listItemStyle]=\"listItemStyle()\"\n [listClass]=\"listClass()\"\n [listStyle]=\"listStyle()\"\n (itemActivate)=\"onItemActivate($event)\">\n @if (footerTemplate()) {\n <ng-template monaListFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n @if (groupHeaderTemplate()) {\n <ng-template monaListGroupHeaderTemplate let-groupHeader>\n <ng-container\n [ngTemplateOutlet]=\"groupHeaderTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: groupHeader }\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n</mona-list>\n\n@let pageableOptions = listService.pageableOptions();\n@if (pageableOptions.enabled && !listService.virtualScrollOptions().enabled && itemCount() > 0) {\n @let pageState = listService.pageState();\n <mona-pager\n [firstLast]=\"pageableOptions.firstLast\"\n [pageSizeValues]=\"pageableOptions.pageSizeValues\"\n [visiblePages]=\"pageableOptions.visiblePages\"\n [total]=\"itemCount()\"\n [skip]=\"pageState.skip\"\n [responsive]=\"false\"\n [rounded]=\"rounded()\"\n [pageSize]=\"pageState.take\"\n [previousNext]=\"pageableOptions.previousNext\"\n [showInfo]=\"pageableOptions.showInfo\"\n [type]=\"pageableOptions.type\"\n [size]=\"size()\"\n [aria-label]=\"pagerLabel()\"\n (pageChange)=\"onPageChange($event)\"\n (pageSizeSelect)=\"onPageSizeSelect($event)\"\n class=\"border-b-0 border-x-0 rounded-t-none\"></mona-pager>\n}\n<div role=\"status\" class=\"sr-only\">{{ statusText() }}</div>\n" }]
385
- }], ctorParameters: () => [], propDecorators: { footerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ListViewFooterTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], groupHeaderTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ListViewGroupHeaderTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ListViewHeaderTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ListViewItemTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], noDataTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ListViewNoDataTemplateDirective), { ...{ read: TemplateRef }, 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 }] }], disabledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledBy", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], itemActivate: [{ type: i0.Output, args: ["itemActivate"] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], listClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "listClass", required: false }] }], listItemClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "listItemClass", required: false }] }], listItemStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "listItemStyle", required: false }] }], listStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "listStyle", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], pagerAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "pagerAriaLabel", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], scrollBottom: [{ type: i0.Output, args: ["scrollBottom"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], textField: [{ type: i0.Input, args: [{ isSignal: true, alias: "textField", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }] } });
386
-
387
- class ListViewGroupableDirective {
388
- #defaultOptions;
389
- #listService;
390
- constructor() {
391
- this.#defaultOptions = {
392
- enabled: true
393
- };
394
- this.#listService = inject((ListService));
395
- /** @description Property name or accessor used to derive the group key from a data item. */
396
- this.groupBy = input("", /* @ts-ignore */
397
- ...(ngDevMode ? [{ debugName: "groupBy" }] : /* istanbul ignore next */ []));
398
- /**
399
- * @description Enables grouping. An empty string enables grouping with default settings; pass an object to
400
- * configure `headerOrder`, `headerText`, `orderBy`, and `orderByDirection`.
401
- */
402
- this.options = input("", { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), alias: "monaListViewGroupable" });
403
- effect(() => {
404
- const groupBy = this.groupBy();
405
- untracked(() => {
406
- this.#listService.setGroupBy(groupBy ?? "");
407
- });
408
- });
409
- effect(() => {
410
- const options = this.options();
411
- untracked(() => {
412
- if (options === "") {
413
- this.#listService.setGroupableOptions(this.#defaultOptions);
414
- }
415
- else {
416
- this.#listService.setGroupableOptions({
417
- ...this.#defaultOptions,
418
- ...options,
419
- enabled: options.enabled ?? this.#defaultOptions.enabled
420
- });
421
- }
422
- });
423
- });
424
- }
425
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewGroupableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
426
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: ListViewGroupableDirective, isStandalone: true, selector: "mona-list-view[monaListViewGroupable]", inputs: { groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "monaListViewGroupable", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
427
- }
428
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewGroupableDirective, decorators: [{
429
- type: Directive,
430
- args: [{
431
- selector: "mona-list-view[monaListViewGroupable]"
432
- }]
433
- }], ctorParameters: () => [], propDecorators: { groupBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupBy", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "monaListViewGroupable", required: false }] }] } });
434
-
435
- class ListViewNavigableDirective {
436
- #defaultOptions;
437
- #listService;
438
- constructor() {
439
- this.#defaultOptions = {
440
- enabled: true,
441
- mode: "select",
442
- wrap: false
443
- };
444
- this.#listService = inject(ListService);
445
- /**
446
- * @description Configures keyboard navigation, which is on without the directive. An empty string keeps the
447
- * defaults (`enabled: true`, `mode: "select"`, `wrap: false`); pass an object to override any field.
448
- */
449
- this.options = input("", { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), alias: "monaListViewNavigable" });
450
- effect(() => {
451
- const options = this.options();
452
- untracked(() => {
453
- if (options === "") {
454
- this.#listService.setNavigableOptions(this.#defaultOptions);
455
- }
456
- else {
457
- this.#listService.setNavigableOptions({
458
- ...this.#defaultOptions,
459
- ...options
460
- });
461
- }
462
- });
463
- });
464
- }
465
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewNavigableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
466
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: ListViewNavigableDirective, isStandalone: true, selector: "mona-list-view[monaListViewNavigable]", inputs: { options: { classPropertyName: "options", publicName: "monaListViewNavigable", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
467
- }
468
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewNavigableDirective, decorators: [{
469
- type: Directive,
470
- args: [{
471
- selector: "mona-list-view[monaListViewNavigable]"
472
- }]
473
- }], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "monaListViewNavigable", required: false }] }] } });
474
-
475
- class ListViewPageableDirective {
476
- #defaultOptions;
477
- #listService;
478
- constructor() {
479
- this.#defaultOptions = {
480
- enabled: true,
481
- showInfo: false,
482
- firstLast: false,
483
- type: "numeric",
484
- previousNext: true,
485
- pageSize: 10,
486
- pageSizeValues: [5, 10, 20, 25, 50, 100],
487
- visiblePages: 5
488
- };
489
- this.#listService = inject(ListService);
490
- /**
491
- * @description Enables pagination. An empty string enables pagination with default settings (`type: "numeric"`,
492
- * `previousNext: true`, `pageSize: 10`, `pageSizeValues: [5, 10, 20, 25, 50, 100]`, `visiblePages: 5`); pass an
493
- * object to override any field. Has no visible effect while `monaListViewVirtualScroll` is enabled — see Pagination
494
- * and virtualization don't combine.
495
- */
496
- this.options = input("", { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), alias: "monaListViewPageable" });
497
- /**
498
- * @description The current page. Supports two-way binding via `[(page)]`; updates when the user navigates the pager and can be set to navigate programmatically.
499
- * @default 1
500
- */
501
- this.page = model(1, /* @ts-ignore */
502
- ...(ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []));
503
- /**
504
- * @description Items per page. Supports two-way binding via `[(pageSize)]`: it updates when the user picks a size
505
- * in the pager. While unset, the options' `pageSize` applies. A new size keeps the first item of the current
506
- * page in view.
507
- * @default undefined
508
- */
509
- this.pageSize = model(undefined, /* @ts-ignore */
510
- ...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
511
- /**
512
- * @description Emitted when the user picks a page size, before it is applied. Call `preventDefault()` on the
513
- * event to keep the current size.
514
- */
515
- this.pageSizeSelect = output();
516
- effect(() => {
517
- const options = this.options();
518
- untracked(() => {
519
- const mergedOptions = options === "" ? this.#defaultOptions : { ...this.#defaultOptions, ...options };
520
- this.#listService.setPageableOptions(mergedOptions);
521
- this.setTake(this.pageSize() ?? mergedOptions.pageSize);
522
- });
523
- });
524
- effect(() => {
525
- const pageSize = this.pageSize();
526
- untracked(() => {
527
- if (pageSize != null) {
528
- this.setTake(pageSize);
529
- }
530
- });
531
- });
532
- effect(() => {
533
- const page = this.page();
534
- untracked(() => {
535
- const pageState = this.#listService.pageState();
536
- if (pageState.page === page) {
537
- return;
538
- }
539
- this.#listService.pageState.set({ page, skip: (page - 1) * pageState.take, take: pageState.take });
540
- });
541
- });
542
- effect(() => {
543
- const pageState = this.#listService.pageState();
544
- untracked(() => {
545
- if (this.page() !== pageState.page) {
546
- this.page.set(pageState.page);
547
- }
548
- // Report sizes the user picked; an unset size stays unset while the options' size applies.
549
- const pageSize = this.pageSize();
550
- const optionsSize = this.#listService.pageableOptions().pageSize;
551
- if (pageSize !== pageState.take && (pageSize != null || pageState.take !== optionsSize)) {
552
- this.pageSize.set(pageState.take);
553
- }
554
- });
555
- });
556
- inject(ListViewComponent)
557
- .pageSizeSelect$.pipe(takeUntilDestroyed(inject(DestroyRef)))
558
- .subscribe(event => {
559
- this.pageSizeSelect.emit(event);
560
- });
561
- }
562
- /** Applies a page size, keeping the first item of the current page in view. */
563
- setTake(take) {
564
- const size = Math.max(1, Math.floor(take) || 1);
565
- const pageState = this.#listService.pageState();
566
- if (pageState.take === size) {
567
- return;
568
- }
569
- const page = Math.floor(pageState.skip / size) + 1;
570
- this.#listService.pageState.set({ page, skip: (page - 1) * size, take: size });
571
- }
572
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewPageableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
573
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: ListViewPageableDirective, isStandalone: true, selector: "mona-list-view[monaListViewPageable]", inputs: { options: { classPropertyName: "options", publicName: "monaListViewPageable", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { page: "pageChange", pageSize: "pageSizeChange", pageSizeSelect: "pageSizeSelect" }, ngImport: i0 }); }
574
- }
575
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewPageableDirective, decorators: [{
576
- type: Directive,
577
- args: [{
578
- selector: "mona-list-view[monaListViewPageable]"
579
- }]
580
- }], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "monaListViewPageable", required: false }] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], pageSizeSelect: [{ type: i0.Output, args: ["pageSizeSelect"] }] } });
581
-
582
- class ListViewSelectableDirective {
583
- #defaultOptions;
584
- #listService;
585
- constructor() {
586
- this.#defaultOptions = {
587
- mode: "single",
588
- enabled: true,
589
- toggleable: false
590
- };
591
- this.#listService = inject(ListService);
592
- /**
593
- * @description Enables selection. An empty string enables single selection with default settings; pass an object to
594
- * configure `mode` (`"single"` or `"multiple"`), `toggleable`, and `checkboxes`.
595
- */
596
- this.options = input("", { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), alias: "monaListViewSelectable" });
597
- /**
598
- * @description Property name or accessor used to derive the selection key from a data item. When omitted, the data
599
- * item itself is used as the key.
600
- */
601
- this.selectBy = input("", /* @ts-ignore */
602
- ...(ngDevMode ? [{ debugName: "selectBy" }] : /* istanbul ignore next */ []));
603
- /** @description The selection, expressed as keys rather than items. Bind `[(selectedKeys)]` to keep it in sync. */
604
- this.selectedKeys = input([], /* @ts-ignore */
605
- ...(ngDevMode ? [{ debugName: "selectedKeys" }] : /* istanbul ignore next */ []));
606
- /**
607
- * @description Emitted with the selected keys when the user selects or deselects an item. Not emitted for keys set
608
- * through `selectedKeys`.
609
- */
610
- this.selectedKeysChange = output();
611
- effect(() => {
612
- const selectBy = this.selectBy();
613
- untracked(() => {
614
- this.#listService.setValueField(selectBy ?? "");
615
- });
616
- });
617
- effect(() => {
618
- const selectedKeys = this.selectedKeys();
619
- untracked(() => {
620
- this.#listService.setSelectedKeys(selectedKeys ?? []);
621
- });
622
- });
623
- effect(() => {
624
- const options = this.options();
625
- untracked(() => {
626
- if (options === "") {
627
- this.#listService.setSelectableOptions(this.#defaultOptions);
628
- }
629
- else {
630
- this.#listService.setSelectableOptions({
631
- ...this.#defaultOptions,
632
- ...options
633
- });
634
- }
635
- });
636
- });
637
- this.#listService.selectedKeysChange$
638
- .pipe(takeUntilDestroyed())
639
- .subscribe(keys => this.selectedKeysChange.emit(keys));
640
- }
641
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewSelectableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
642
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: ListViewSelectableDirective, isStandalone: true, selector: "mona-list-view[monaListViewSelectable]", inputs: { options: { classPropertyName: "options", publicName: "monaListViewSelectable", isSignal: true, isRequired: false, transformFunction: null }, selectBy: { classPropertyName: "selectBy", publicName: "selectBy", isSignal: true, isRequired: false, transformFunction: null }, selectedKeys: { classPropertyName: "selectedKeys", publicName: "selectedKeys", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedKeysChange: "selectedKeysChange" }, ngImport: i0 }); }
643
- }
644
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewSelectableDirective, decorators: [{
645
- type: Directive,
646
- args: [{
647
- selector: "mona-list-view[monaListViewSelectable]"
648
- }]
649
- }], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "monaListViewSelectable", required: false }] }], selectBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectBy", required: false }] }], selectedKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedKeys", required: false }] }], selectedKeysChange: [{ type: i0.Output, args: ["selectedKeysChange"] }] } });
650
-
651
- class ListViewVirtualScrollDirective {
652
- #listService;
653
- constructor() {
654
- this.#listService = inject((ListService));
655
- /**
656
- * @description Enables virtual scrolling. `height` is the fixed row height, in pixels, used to measure the
657
- * viewport; when omitted, a `28`px row height is assumed.
658
- */
659
- this.options = input.required({ ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), alias: "monaListViewVirtualScroll" });
660
- effect(() => {
661
- const options = this.options();
662
- untracked(() => this.#listService.setVirtualScrollOptions(options));
663
- });
664
- }
665
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewVirtualScrollDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
666
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: ListViewVirtualScrollDirective, isStandalone: true, selector: "mona-list-view[monaListViewVirtualScroll]", inputs: { options: { classPropertyName: "options", publicName: "monaListViewVirtualScroll", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
667
- }
668
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListViewVirtualScrollDirective, decorators: [{
669
- type: Directive,
670
- args: [{
671
- selector: "mona-list-view[monaListViewVirtualScroll]"
672
- }]
673
- }], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "monaListViewVirtualScroll", required: true }] }] } });
674
-
675
- /*
676
- * Public API Surface of @nanahoshi/mona-ui/list-view
677
- */
678
-
679
- /**
680
- * Generated bundle index. Do not edit.
681
- */
682
-
212
+ var ListViewComponent = class ListViewComponent {
213
+ #destroyRef;
214
+ #hostElementRef;
215
+ #atBottom;
216
+ constructor() {
217
+ this.#destroyRef = inject(DestroyRef);
218
+ this.#hostElementRef = inject(ElementRef);
219
+ this.#atBottom = false;
220
+ this.baseClasses = computed(() => {
221
+ const rounded = this.rounded();
222
+ const size = this.size();
223
+ const variantClasses = listViewBaseThemeVariants({
224
+ rounded,
225
+ size
226
+ });
227
+ const userClass = this.userClass();
228
+ return twMerge(variantClasses, userClass);
229
+ }, ...ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []);
230
+ this.footerTemplate = contentChild(ListViewFooterTemplateDirective, {
231
+ ...ngDevMode ? { debugName: "footerTemplate" } : /* istanbul ignore next */ {},
232
+ read: TemplateRef
233
+ });
234
+ this.groupHeaderTemplate = contentChild(ListViewGroupHeaderTemplateDirective, {
235
+ ...ngDevMode ? { debugName: "groupHeaderTemplate" } : /* istanbul ignore next */ {},
236
+ read: TemplateRef
237
+ });
238
+ this.headerTemplate = contentChild(ListViewHeaderTemplateDirective, {
239
+ ...ngDevMode ? { debugName: "headerTemplate" } : /* istanbul ignore next */ {},
240
+ read: TemplateRef
241
+ });
242
+ this.itemCount = computed(() => this.listItems().length, ...ngDevMode ? [{ debugName: "itemCount" }] : /* istanbul ignore next */ []);
243
+ this.itemTemplate = contentChild(ListViewItemTemplateDirective, {
244
+ ...ngDevMode ? { debugName: "itemTemplate" } : /* istanbul ignore next */ {},
245
+ read: TemplateRef
246
+ });
247
+ this.listHeight = computed(() => {
248
+ const height = this.height();
249
+ return typeof height === "number" ? `${height}px` : height;
250
+ }, ...ngDevMode ? [{ debugName: "listHeight" }] : /* istanbul ignore next */ []);
251
+ this.listItems = computed(() => ImmutableList.create(this.items()), ...ngDevMode ? [{ debugName: "listItems" }] : /* istanbul ignore next */ []);
252
+ this.listMaxHeight = computed(() => {
253
+ const maxHeight = this.maxHeight();
254
+ return typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight;
255
+ }, ...ngDevMode ? [{ debugName: "listMaxHeight" }] : /* istanbul ignore next */ []);
256
+ this.listMaxWidth = computed(() => {
257
+ const maxWidth = this.maxWidth();
258
+ return typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth;
259
+ }, ...ngDevMode ? [{ debugName: "listMaxWidth" }] : /* istanbul ignore next */ []);
260
+ this.listRole = computed(() => this.listService.selectableOptions().enabled ? "listbox" : "list", ...ngDevMode ? [{ debugName: "listRole" }] : /* istanbul ignore next */ []);
261
+ this.listService = inject(ListService);
262
+ this.listWidth = computed(() => {
263
+ const width = this.width();
264
+ return typeof width === "number" ? `${width}px` : width;
265
+ }, ...ngDevMode ? [{ debugName: "listWidth" }] : /* istanbul ignore next */ []);
266
+ this.messages = inject(MonaI18nService).componentMessages("list", LIST_DEFAULT_MESSAGES);
267
+ this.noDataTemplate = contentChild(ListViewNoDataTemplateDirective, {
268
+ ...ngDevMode ? { debugName: "noDataTemplate" } : /* istanbul ignore next */ {},
269
+ read: TemplateRef
270
+ });
271
+ this.pagerLabel = computed(() => {
272
+ const pagerAriaLabel = this.pagerAriaLabel();
273
+ if (pagerAriaLabel) return pagerAriaLabel;
274
+ const ariaLabel = this.ariaLabel();
275
+ return ariaLabel ? this.messages().pagerLabel(ariaLabel) : null;
276
+ }, ...ngDevMode ? [{ debugName: "pagerLabel" }] : /* istanbul ignore next */ []);
277
+ this.statusText = computed(() => {
278
+ if (this.loading()) return this.messages().loading;
279
+ return this.itemCount() === 0 ? this.messages().noData : "";
280
+ }, ...ngDevMode ? [{ debugName: "statusText" }] : /* istanbul ignore next */ []);
281
+ this.ariaLabel = input("", {
282
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
283
+ alias: "aria-label"
284
+ });
285
+ this.ariaLabelledBy = input("", {
286
+ ...ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {},
287
+ alias: "aria-labelledby"
288
+ });
289
+ this.disabledBy = input("", ...ngDevMode ? [{ debugName: "disabledBy" }] : /* istanbul ignore next */ []);
290
+ this.height = input("100%", ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
291
+ this.itemActivate = output();
292
+ this.items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
293
+ this.listClass = input("", ...ngDevMode ? [{ debugName: "listClass" }] : /* istanbul ignore next */ []);
294
+ this.listItemClass = input("", ...ngDevMode ? [{ debugName: "listItemClass" }] : /* istanbul ignore next */ []);
295
+ this.listItemStyle = input({}, ...ngDevMode ? [{ debugName: "listItemStyle" }] : /* istanbul ignore next */ []);
296
+ this.listStyle = input({}, ...ngDevMode ? [{ debugName: "listStyle" }] : /* istanbul ignore next */ []);
297
+ this.loading = input(false, {
298
+ ...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
299
+ transform: booleanAttribute
300
+ });
301
+ this.maxHeight = input("", ...ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []);
302
+ this.maxWidth = input("", ...ngDevMode ? [{ debugName: "maxWidth" }] : /* istanbul ignore next */ []);
303
+ this.pageSizeSelect$ = new Subject();
304
+ this.pagerAriaLabel = input("", ...ngDevMode ? [{ debugName: "pagerAriaLabel" }] : /* istanbul ignore next */ []);
305
+ this.rounded = input("medium", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
306
+ this.scrollBottom = output();
307
+ this.size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
308
+ this.textField = input("", ...ngDevMode ? [{ debugName: "textField" }] : /* istanbul ignore next */ []);
309
+ this.userClass = input("", {
310
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
311
+ alias: "class"
312
+ });
313
+ this.width = input("100%", ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
314
+ this.listService.setNavigableOptions({
315
+ enabled: true,
316
+ mode: "select",
317
+ wrap: false
318
+ });
319
+ effect(() => {
320
+ const textField = this.textField();
321
+ untracked(() => this.listService.setTextField(textField ?? ""));
322
+ });
323
+ effect(() => {
324
+ const disabledBy = this.disabledBy();
325
+ untracked(() => this.listService.setDisabledBy(disabledBy ?? ""));
326
+ });
327
+ this.setScrollBottomEvent();
328
+ }
329
+ onItemActivate(item) {
330
+ this.itemActivate.emit(item.data);
331
+ }
332
+ onPageChange(event) {
333
+ this.listService.pageState.update((s) => ({
334
+ ...s,
335
+ page: event.page,
336
+ skip: event.skip,
337
+ take: event.take
338
+ }));
339
+ }
340
+ onPageSizeSelect(event) {
341
+ this.pageSizeSelect$.next(event);
342
+ }
343
+ isListScroll(target) {
344
+ if (!(target instanceof HTMLElement) || target.closest("mona-list-view") !== this.#hostElementRef.nativeElement) return false;
345
+ return target.matches("cdk-virtual-scroll-viewport") || target.matches("mona-list > ul");
346
+ }
347
+ setScrollBottomEvent() {
348
+ const host = this.#hostElementRef.nativeElement;
349
+ fromEvent(host, "scroll", { capture: true }).pipe(takeUntilDestroyed(this.#destroyRef), filter((event) => this.isListScroll(event.target)), filter((event) => {
350
+ const target = event.target;
351
+ const atBottom = target.scrollHeight - target.scrollTop - target.clientHeight < SCROLL_BOTTOM_THRESHOLD;
352
+ const arrived = atBottom && !this.#atBottom;
353
+ this.#atBottom = atBottom;
354
+ return arrived && !this.listService.pageableOptions().enabled;
355
+ })).subscribe((event) => this.scrollBottom.emit(event));
356
+ }
357
+ static {
358
+ this.ɵfac = i0.ɵɵngDeclareFactory({
359
+ minVersion: "12.0.0",
360
+ version: "22.2.6",
361
+ ngImport: i0,
362
+ type: ListViewComponent,
363
+ deps: [],
364
+ target: i0.ɵɵFactoryTarget.Component
365
+ });
366
+ }
367
+ static {
368
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
369
+ minVersion: "17.0.0",
370
+ version: "22.2.6",
371
+ type: ListViewComponent,
372
+ isStandalone: true,
373
+ selector: "mona-list-view",
374
+ inputs: {
375
+ ariaLabel: {
376
+ classPropertyName: "ariaLabel",
377
+ publicName: "aria-label",
378
+ isSignal: true,
379
+ isRequired: false,
380
+ transformFunction: null
381
+ },
382
+ ariaLabelledBy: {
383
+ classPropertyName: "ariaLabelledBy",
384
+ publicName: "aria-labelledby",
385
+ isSignal: true,
386
+ isRequired: false,
387
+ transformFunction: null
388
+ },
389
+ disabledBy: {
390
+ classPropertyName: "disabledBy",
391
+ publicName: "disabledBy",
392
+ isSignal: true,
393
+ isRequired: false,
394
+ transformFunction: null
395
+ },
396
+ height: {
397
+ classPropertyName: "height",
398
+ publicName: "height",
399
+ isSignal: true,
400
+ isRequired: false,
401
+ transformFunction: null
402
+ },
403
+ items: {
404
+ classPropertyName: "items",
405
+ publicName: "items",
406
+ isSignal: true,
407
+ isRequired: false,
408
+ transformFunction: null
409
+ },
410
+ listClass: {
411
+ classPropertyName: "listClass",
412
+ publicName: "listClass",
413
+ isSignal: true,
414
+ isRequired: false,
415
+ transformFunction: null
416
+ },
417
+ listItemClass: {
418
+ classPropertyName: "listItemClass",
419
+ publicName: "listItemClass",
420
+ isSignal: true,
421
+ isRequired: false,
422
+ transformFunction: null
423
+ },
424
+ listItemStyle: {
425
+ classPropertyName: "listItemStyle",
426
+ publicName: "listItemStyle",
427
+ isSignal: true,
428
+ isRequired: false,
429
+ transformFunction: null
430
+ },
431
+ listStyle: {
432
+ classPropertyName: "listStyle",
433
+ publicName: "listStyle",
434
+ isSignal: true,
435
+ isRequired: false,
436
+ transformFunction: null
437
+ },
438
+ loading: {
439
+ classPropertyName: "loading",
440
+ publicName: "loading",
441
+ isSignal: true,
442
+ isRequired: false,
443
+ transformFunction: null
444
+ },
445
+ maxHeight: {
446
+ classPropertyName: "maxHeight",
447
+ publicName: "maxHeight",
448
+ isSignal: true,
449
+ isRequired: false,
450
+ transformFunction: null
451
+ },
452
+ maxWidth: {
453
+ classPropertyName: "maxWidth",
454
+ publicName: "maxWidth",
455
+ isSignal: true,
456
+ isRequired: false,
457
+ transformFunction: null
458
+ },
459
+ pagerAriaLabel: {
460
+ classPropertyName: "pagerAriaLabel",
461
+ publicName: "pagerAriaLabel",
462
+ isSignal: true,
463
+ isRequired: false,
464
+ transformFunction: null
465
+ },
466
+ rounded: {
467
+ classPropertyName: "rounded",
468
+ publicName: "rounded",
469
+ isSignal: true,
470
+ isRequired: false,
471
+ transformFunction: null
472
+ },
473
+ size: {
474
+ classPropertyName: "size",
475
+ publicName: "size",
476
+ isSignal: true,
477
+ isRequired: false,
478
+ transformFunction: null
479
+ },
480
+ textField: {
481
+ classPropertyName: "textField",
482
+ publicName: "textField",
483
+ isSignal: true,
484
+ isRequired: false,
485
+ transformFunction: null
486
+ },
487
+ userClass: {
488
+ classPropertyName: "userClass",
489
+ publicName: "class",
490
+ isSignal: true,
491
+ isRequired: false,
492
+ transformFunction: null
493
+ },
494
+ width: {
495
+ classPropertyName: "width",
496
+ publicName: "width",
497
+ isSignal: true,
498
+ isRequired: false,
499
+ transformFunction: null
500
+ }
501
+ },
502
+ outputs: {
503
+ itemActivate: "itemActivate",
504
+ scrollBottom: "scrollBottom"
505
+ },
506
+ host: { properties: {
507
+ "class": "baseClasses()",
508
+ "attr.tabindex": "-1",
509
+ "attr.aria-label": "null",
510
+ "attr.aria-labelledby": "null"
511
+ } },
512
+ providers: [{
513
+ provide: ListService,
514
+ useFactory: () => inject(LIST_VIEW_HOST_LIST_SERVICE, {
515
+ optional: true,
516
+ skipSelf: true
517
+ }) ?? new ListService()
518
+ }],
519
+ queries: [
520
+ {
521
+ propertyName: "footerTemplate",
522
+ first: true,
523
+ predicate: ListViewFooterTemplateDirective,
524
+ descendants: true,
525
+ read: TemplateRef,
526
+ isSignal: true
527
+ },
528
+ {
529
+ propertyName: "groupHeaderTemplate",
530
+ first: true,
531
+ predicate: ListViewGroupHeaderTemplateDirective,
532
+ descendants: true,
533
+ read: TemplateRef,
534
+ isSignal: true
535
+ },
536
+ {
537
+ propertyName: "headerTemplate",
538
+ first: true,
539
+ predicate: ListViewHeaderTemplateDirective,
540
+ descendants: true,
541
+ read: TemplateRef,
542
+ isSignal: true
543
+ },
544
+ {
545
+ propertyName: "itemTemplate",
546
+ first: true,
547
+ predicate: ListViewItemTemplateDirective,
548
+ descendants: true,
549
+ read: TemplateRef,
550
+ isSignal: true
551
+ },
552
+ {
553
+ propertyName: "noDataTemplate",
554
+ first: true,
555
+ predicate: ListViewNoDataTemplateDirective,
556
+ descendants: true,
557
+ read: TemplateRef,
558
+ isSignal: true
559
+ }
560
+ ],
561
+ ngImport: i0,
562
+ template: "<mona-list\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [busy]=\"loading()\"\n [listRole]=\"listRole()\"\n [data]=\"listItems()\"\n [height]=\"listHeight()\"\n [focusOnMount]=\"false\"\n [width]=\"listWidth()\"\n [maxHeight]=\"listMaxHeight()\"\n [maxWidth]=\"listMaxWidth()\"\n [listItemClass]=\"listItemClass()\"\n [listItemStyle]=\"listItemStyle()\"\n [listClass]=\"listClass()\"\n [listStyle]=\"listStyle()\"\n (itemActivate)=\"onItemActivate($event)\">\n @if (footerTemplate()) {\n <ng-template monaListFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n @if (groupHeaderTemplate()) {\n <ng-template monaListGroupHeaderTemplate let-groupHeader>\n <ng-container\n [ngTemplateOutlet]=\"groupHeaderTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: groupHeader }\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n</mona-list>\n\n@let pageableOptions = listService.pageableOptions();\n@if (pageableOptions.enabled && !listService.virtualScrollOptions().enabled && itemCount() > 0) {\n @let pageState = listService.pageState();\n <mona-pager\n [firstLast]=\"pageableOptions.firstLast\"\n [pageSizeValues]=\"pageableOptions.pageSizeValues\"\n [visiblePages]=\"pageableOptions.visiblePages\"\n [total]=\"itemCount()\"\n [skip]=\"pageState.skip\"\n [responsive]=\"false\"\n [rounded]=\"rounded()\"\n [pageSize]=\"pageState.take\"\n [previousNext]=\"pageableOptions.previousNext\"\n [showInfo]=\"pageableOptions.showInfo\"\n [type]=\"pageableOptions.type\"\n [size]=\"size()\"\n [aria-label]=\"pagerLabel()\"\n (pageChange)=\"onPageChange($event)\"\n (pageSizeSelect)=\"onPageSizeSelect($event)\"\n class=\"border-b-0 border-x-0 rounded-t-none\"></mona-pager>\n}\n<div role=\"status\" class=\"sr-only\">{{ statusText() }}</div>\n",
563
+ dependencies: [
564
+ {
565
+ kind: "directive",
566
+ type: NgTemplateOutlet,
567
+ selector: "[ngTemplateOutlet]",
568
+ inputs: [
569
+ "ngTemplateOutletContext",
570
+ "ngTemplateOutlet",
571
+ "ngTemplateOutletInjector"
572
+ ]
573
+ },
574
+ {
575
+ kind: "component",
576
+ type: PagerComponent,
577
+ selector: "mona-pager",
578
+ inputs: [
579
+ "aria-label",
580
+ "aria-labelledby",
581
+ "firstLast",
582
+ "navigable",
583
+ "pageInput",
584
+ "pageSize",
585
+ "pageSizeValues",
586
+ "previousNext",
587
+ "responsive",
588
+ "rounded",
589
+ "showInfo",
590
+ "size",
591
+ "skip",
592
+ "total",
593
+ "type",
594
+ "class",
595
+ "visiblePages"
596
+ ],
597
+ outputs: [
598
+ "pageChange",
599
+ "pageSizeChange",
600
+ "pageSizeSelect",
601
+ "skipChange"
602
+ ]
603
+ },
604
+ {
605
+ kind: "component",
606
+ type: ListComponent,
607
+ selector: "mona-list",
608
+ inputs: [
609
+ "ariaLabel",
610
+ "ariaLabelledBy",
611
+ "busy",
612
+ "data",
613
+ "focusOnMount",
614
+ "height",
615
+ "listClass",
616
+ "listId",
617
+ "listItemClass",
618
+ "listItemStyle",
619
+ "listRole",
620
+ "listStyle",
621
+ "maxHeight",
622
+ "maxWidth",
623
+ "size",
624
+ "textField",
625
+ "width"
626
+ ],
627
+ outputs: ["itemActivate", "itemSelect"]
628
+ },
629
+ {
630
+ kind: "directive",
631
+ type: ListHeaderTemplateDirective,
632
+ selector: "ng-template[monaListHeaderTemplate]"
633
+ },
634
+ {
635
+ kind: "directive",
636
+ type: ListFooterTemplateDirective,
637
+ selector: "ng-template[monaListFooterTemplate]"
638
+ },
639
+ {
640
+ kind: "directive",
641
+ type: ListGroupHeaderTemplateDirective,
642
+ selector: "ng-template[monaListGroupHeaderTemplate]"
643
+ },
644
+ {
645
+ kind: "directive",
646
+ type: ListItemTemplateDirective,
647
+ selector: "ng-template[monaListItemTemplate]"
648
+ },
649
+ {
650
+ kind: "directive",
651
+ type: ListNoDataTemplateDirective,
652
+ selector: "ng-template[monaListNoDataTemplate]"
653
+ }
654
+ ]
655
+ });
656
+ }
657
+ };
658
+ i0.ɵɵngDeclareClassMetadata({
659
+ minVersion: "12.0.0",
660
+ version: "22.2.6",
661
+ ngImport: i0,
662
+ type: ListViewComponent,
663
+ decorators: [{
664
+ type: Component,
665
+ args: [{
666
+ selector: "mona-list-view",
667
+ providers: [{
668
+ provide: ListService,
669
+ useFactory: () => inject(LIST_VIEW_HOST_LIST_SERVICE, {
670
+ optional: true,
671
+ skipSelf: true
672
+ }) ?? new ListService()
673
+ }],
674
+ imports: [
675
+ NgTemplateOutlet,
676
+ PagerComponent,
677
+ ListComponent,
678
+ ListHeaderTemplateDirective,
679
+ ListFooterTemplateDirective,
680
+ ListGroupHeaderTemplateDirective,
681
+ ListItemTemplateDirective,
682
+ ListNoDataTemplateDirective
683
+ ],
684
+ host: {
685
+ "[class]": "baseClasses()",
686
+ "[attr.tabindex]": "-1",
687
+ "[attr.aria-label]": "null",
688
+ "[attr.aria-labelledby]": "null"
689
+ },
690
+ template: "<mona-list\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [busy]=\"loading()\"\n [listRole]=\"listRole()\"\n [data]=\"listItems()\"\n [height]=\"listHeight()\"\n [focusOnMount]=\"false\"\n [width]=\"listWidth()\"\n [maxHeight]=\"listMaxHeight()\"\n [maxWidth]=\"listMaxWidth()\"\n [listItemClass]=\"listItemClass()\"\n [listItemStyle]=\"listItemStyle()\"\n [listClass]=\"listClass()\"\n [listStyle]=\"listStyle()\"\n (itemActivate)=\"onItemActivate($event)\">\n @if (footerTemplate()) {\n <ng-template monaListFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n @if (groupHeaderTemplate()) {\n <ng-template monaListGroupHeaderTemplate let-groupHeader>\n <ng-container\n [ngTemplateOutlet]=\"groupHeaderTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: groupHeader }\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n</mona-list>\n\n@let pageableOptions = listService.pageableOptions();\n@if (pageableOptions.enabled && !listService.virtualScrollOptions().enabled && itemCount() > 0) {\n @let pageState = listService.pageState();\n <mona-pager\n [firstLast]=\"pageableOptions.firstLast\"\n [pageSizeValues]=\"pageableOptions.pageSizeValues\"\n [visiblePages]=\"pageableOptions.visiblePages\"\n [total]=\"itemCount()\"\n [skip]=\"pageState.skip\"\n [responsive]=\"false\"\n [rounded]=\"rounded()\"\n [pageSize]=\"pageState.take\"\n [previousNext]=\"pageableOptions.previousNext\"\n [showInfo]=\"pageableOptions.showInfo\"\n [type]=\"pageableOptions.type\"\n [size]=\"size()\"\n [aria-label]=\"pagerLabel()\"\n (pageChange)=\"onPageChange($event)\"\n (pageSizeSelect)=\"onPageSizeSelect($event)\"\n class=\"border-b-0 border-x-0 rounded-t-none\"></mona-pager>\n}\n<div role=\"status\" class=\"sr-only\">{{ statusText() }}</div>\n"
691
+ }]
692
+ }],
693
+ ctorParameters: () => [],
694
+ propDecorators: {
695
+ footerTemplate: [{
696
+ type: i0.ContentChild,
697
+ args: [i0.forwardRef(() => ListViewFooterTemplateDirective), {
698
+ read: TemplateRef,
699
+ isSignal: true
700
+ }]
701
+ }],
702
+ groupHeaderTemplate: [{
703
+ type: i0.ContentChild,
704
+ args: [i0.forwardRef(() => ListViewGroupHeaderTemplateDirective), {
705
+ read: TemplateRef,
706
+ isSignal: true
707
+ }]
708
+ }],
709
+ headerTemplate: [{
710
+ type: i0.ContentChild,
711
+ args: [i0.forwardRef(() => ListViewHeaderTemplateDirective), {
712
+ read: TemplateRef,
713
+ isSignal: true
714
+ }]
715
+ }],
716
+ itemTemplate: [{
717
+ type: i0.ContentChild,
718
+ args: [i0.forwardRef(() => ListViewItemTemplateDirective), {
719
+ read: TemplateRef,
720
+ isSignal: true
721
+ }]
722
+ }],
723
+ noDataTemplate: [{
724
+ type: i0.ContentChild,
725
+ args: [i0.forwardRef(() => ListViewNoDataTemplateDirective), {
726
+ read: TemplateRef,
727
+ isSignal: true
728
+ }]
729
+ }],
730
+ ariaLabel: [{
731
+ type: i0.Input,
732
+ args: [{
733
+ isSignal: true,
734
+ alias: "aria-label",
735
+ required: false
736
+ }]
737
+ }],
738
+ ariaLabelledBy: [{
739
+ type: i0.Input,
740
+ args: [{
741
+ isSignal: true,
742
+ alias: "aria-labelledby",
743
+ required: false
744
+ }]
745
+ }],
746
+ disabledBy: [{
747
+ type: i0.Input,
748
+ args: [{
749
+ isSignal: true,
750
+ alias: "disabledBy",
751
+ required: false
752
+ }]
753
+ }],
754
+ height: [{
755
+ type: i0.Input,
756
+ args: [{
757
+ isSignal: true,
758
+ alias: "height",
759
+ required: false
760
+ }]
761
+ }],
762
+ itemActivate: [{
763
+ type: i0.Output,
764
+ args: ["itemActivate"]
765
+ }],
766
+ items: [{
767
+ type: i0.Input,
768
+ args: [{
769
+ isSignal: true,
770
+ alias: "items",
771
+ required: false
772
+ }]
773
+ }],
774
+ listClass: [{
775
+ type: i0.Input,
776
+ args: [{
777
+ isSignal: true,
778
+ alias: "listClass",
779
+ required: false
780
+ }]
781
+ }],
782
+ listItemClass: [{
783
+ type: i0.Input,
784
+ args: [{
785
+ isSignal: true,
786
+ alias: "listItemClass",
787
+ required: false
788
+ }]
789
+ }],
790
+ listItemStyle: [{
791
+ type: i0.Input,
792
+ args: [{
793
+ isSignal: true,
794
+ alias: "listItemStyle",
795
+ required: false
796
+ }]
797
+ }],
798
+ listStyle: [{
799
+ type: i0.Input,
800
+ args: [{
801
+ isSignal: true,
802
+ alias: "listStyle",
803
+ required: false
804
+ }]
805
+ }],
806
+ loading: [{
807
+ type: i0.Input,
808
+ args: [{
809
+ isSignal: true,
810
+ alias: "loading",
811
+ required: false
812
+ }]
813
+ }],
814
+ maxHeight: [{
815
+ type: i0.Input,
816
+ args: [{
817
+ isSignal: true,
818
+ alias: "maxHeight",
819
+ required: false
820
+ }]
821
+ }],
822
+ maxWidth: [{
823
+ type: i0.Input,
824
+ args: [{
825
+ isSignal: true,
826
+ alias: "maxWidth",
827
+ required: false
828
+ }]
829
+ }],
830
+ pagerAriaLabel: [{
831
+ type: i0.Input,
832
+ args: [{
833
+ isSignal: true,
834
+ alias: "pagerAriaLabel",
835
+ required: false
836
+ }]
837
+ }],
838
+ rounded: [{
839
+ type: i0.Input,
840
+ args: [{
841
+ isSignal: true,
842
+ alias: "rounded",
843
+ required: false
844
+ }]
845
+ }],
846
+ scrollBottom: [{
847
+ type: i0.Output,
848
+ args: ["scrollBottom"]
849
+ }],
850
+ size: [{
851
+ type: i0.Input,
852
+ args: [{
853
+ isSignal: true,
854
+ alias: "size",
855
+ required: false
856
+ }]
857
+ }],
858
+ textField: [{
859
+ type: i0.Input,
860
+ args: [{
861
+ isSignal: true,
862
+ alias: "textField",
863
+ required: false
864
+ }]
865
+ }],
866
+ userClass: [{
867
+ type: i0.Input,
868
+ args: [{
869
+ isSignal: true,
870
+ alias: "class",
871
+ required: false
872
+ }]
873
+ }],
874
+ width: [{
875
+ type: i0.Input,
876
+ args: [{
877
+ isSignal: true,
878
+ alias: "width",
879
+ required: false
880
+ }]
881
+ }]
882
+ }
883
+ });
884
+ var ListViewGroupableDirective = class ListViewGroupableDirective {
885
+ #defaultOptions;
886
+ #listService;
887
+ constructor() {
888
+ this.#defaultOptions = { enabled: true };
889
+ this.#listService = inject(ListService);
890
+ this.groupBy = input("", ...ngDevMode ? [{ debugName: "groupBy" }] : /* istanbul ignore next */ []);
891
+ this.options = input("", {
892
+ ...ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {},
893
+ alias: "monaListViewGroupable"
894
+ });
895
+ effect(() => {
896
+ const groupBy = this.groupBy();
897
+ untracked(() => {
898
+ this.#listService.setGroupBy(groupBy ?? "");
899
+ });
900
+ });
901
+ effect(() => {
902
+ const options = this.options();
903
+ untracked(() => {
904
+ if (options === "") this.#listService.setGroupableOptions(this.#defaultOptions);
905
+ else this.#listService.setGroupableOptions({
906
+ ...this.#defaultOptions,
907
+ ...options,
908
+ enabled: options.enabled ?? this.#defaultOptions.enabled
909
+ });
910
+ });
911
+ });
912
+ }
913
+ static {
914
+ this.ɵfac = i0.ɵɵngDeclareFactory({
915
+ minVersion: "12.0.0",
916
+ version: "22.2.6",
917
+ ngImport: i0,
918
+ type: ListViewGroupableDirective,
919
+ deps: [],
920
+ target: i0.ɵɵFactoryTarget.Directive
921
+ });
922
+ }
923
+ static {
924
+ this.ɵdir = i0.ɵɵngDeclareDirective({
925
+ minVersion: "17.1.0",
926
+ version: "22.2.6",
927
+ type: ListViewGroupableDirective,
928
+ isStandalone: true,
929
+ selector: "mona-list-view[monaListViewGroupable]",
930
+ inputs: {
931
+ groupBy: {
932
+ classPropertyName: "groupBy",
933
+ publicName: "groupBy",
934
+ isSignal: true,
935
+ isRequired: false,
936
+ transformFunction: null
937
+ },
938
+ options: {
939
+ classPropertyName: "options",
940
+ publicName: "monaListViewGroupable",
941
+ isSignal: true,
942
+ isRequired: false,
943
+ transformFunction: null
944
+ }
945
+ },
946
+ ngImport: i0
947
+ });
948
+ }
949
+ };
950
+ i0.ɵɵngDeclareClassMetadata({
951
+ minVersion: "12.0.0",
952
+ version: "22.2.6",
953
+ ngImport: i0,
954
+ type: ListViewGroupableDirective,
955
+ decorators: [{
956
+ type: Directive,
957
+ args: [{ selector: "mona-list-view[monaListViewGroupable]" }]
958
+ }],
959
+ ctorParameters: () => [],
960
+ propDecorators: {
961
+ groupBy: [{
962
+ type: i0.Input,
963
+ args: [{
964
+ isSignal: true,
965
+ alias: "groupBy",
966
+ required: false
967
+ }]
968
+ }],
969
+ options: [{
970
+ type: i0.Input,
971
+ args: [{
972
+ isSignal: true,
973
+ alias: "monaListViewGroupable",
974
+ required: false
975
+ }]
976
+ }]
977
+ }
978
+ });
979
+ var ListViewNavigableDirective = class ListViewNavigableDirective {
980
+ #defaultOptions;
981
+ #listService;
982
+ constructor() {
983
+ this.#defaultOptions = {
984
+ enabled: true,
985
+ mode: "select",
986
+ wrap: false
987
+ };
988
+ this.#listService = inject(ListService);
989
+ this.options = input("", {
990
+ ...ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {},
991
+ alias: "monaListViewNavigable"
992
+ });
993
+ effect(() => {
994
+ const options = this.options();
995
+ untracked(() => {
996
+ if (options === "") this.#listService.setNavigableOptions(this.#defaultOptions);
997
+ else this.#listService.setNavigableOptions({
998
+ ...this.#defaultOptions,
999
+ ...options
1000
+ });
1001
+ });
1002
+ });
1003
+ }
1004
+ static {
1005
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1006
+ minVersion: "12.0.0",
1007
+ version: "22.2.6",
1008
+ ngImport: i0,
1009
+ type: ListViewNavigableDirective,
1010
+ deps: [],
1011
+ target: i0.ɵɵFactoryTarget.Directive
1012
+ });
1013
+ }
1014
+ static {
1015
+ this.ɵdir = i0.ɵɵngDeclareDirective({
1016
+ minVersion: "17.1.0",
1017
+ version: "22.2.6",
1018
+ type: ListViewNavigableDirective,
1019
+ isStandalone: true,
1020
+ selector: "mona-list-view[monaListViewNavigable]",
1021
+ inputs: { options: {
1022
+ classPropertyName: "options",
1023
+ publicName: "monaListViewNavigable",
1024
+ isSignal: true,
1025
+ isRequired: false,
1026
+ transformFunction: null
1027
+ } },
1028
+ ngImport: i0
1029
+ });
1030
+ }
1031
+ };
1032
+ i0.ɵɵngDeclareClassMetadata({
1033
+ minVersion: "12.0.0",
1034
+ version: "22.2.6",
1035
+ ngImport: i0,
1036
+ type: ListViewNavigableDirective,
1037
+ decorators: [{
1038
+ type: Directive,
1039
+ args: [{ selector: "mona-list-view[monaListViewNavigable]" }]
1040
+ }],
1041
+ ctorParameters: () => [],
1042
+ propDecorators: { options: [{
1043
+ type: i0.Input,
1044
+ args: [{
1045
+ isSignal: true,
1046
+ alias: "monaListViewNavigable",
1047
+ required: false
1048
+ }]
1049
+ }] }
1050
+ });
1051
+ var ListViewPageableDirective = class ListViewPageableDirective {
1052
+ #defaultOptions;
1053
+ #listService;
1054
+ constructor() {
1055
+ this.#defaultOptions = {
1056
+ enabled: true,
1057
+ showInfo: false,
1058
+ firstLast: false,
1059
+ type: "numeric",
1060
+ previousNext: true,
1061
+ pageSize: 10,
1062
+ pageSizeValues: [
1063
+ 5,
1064
+ 10,
1065
+ 20,
1066
+ 25,
1067
+ 50,
1068
+ 100
1069
+ ],
1070
+ visiblePages: 5
1071
+ };
1072
+ this.#listService = inject(ListService);
1073
+ this.options = input("", {
1074
+ ...ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {},
1075
+ alias: "monaListViewPageable"
1076
+ });
1077
+ this.page = model(1, ...ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []);
1078
+ this.pageSize = model(void 0, ...ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []);
1079
+ this.pageSizeSelect = output();
1080
+ effect(() => {
1081
+ const options = this.options();
1082
+ untracked(() => {
1083
+ const mergedOptions = options === "" ? this.#defaultOptions : {
1084
+ ...this.#defaultOptions,
1085
+ ...options
1086
+ };
1087
+ this.#listService.setPageableOptions(mergedOptions);
1088
+ this.setTake(this.pageSize() ?? mergedOptions.pageSize);
1089
+ });
1090
+ });
1091
+ effect(() => {
1092
+ const pageSize = this.pageSize();
1093
+ untracked(() => {
1094
+ if (pageSize != null) this.setTake(pageSize);
1095
+ });
1096
+ });
1097
+ effect(() => {
1098
+ const page = this.page();
1099
+ untracked(() => {
1100
+ const pageState = this.#listService.pageState();
1101
+ if (pageState.page === page) return;
1102
+ this.#listService.pageState.set({
1103
+ page,
1104
+ skip: (page - 1) * pageState.take,
1105
+ take: pageState.take
1106
+ });
1107
+ });
1108
+ });
1109
+ effect(() => {
1110
+ const pageState = this.#listService.pageState();
1111
+ untracked(() => {
1112
+ if (this.page() !== pageState.page) this.page.set(pageState.page);
1113
+ const pageSize = this.pageSize();
1114
+ const optionsSize = this.#listService.pageableOptions().pageSize;
1115
+ if (pageSize !== pageState.take && (pageSize != null || pageState.take !== optionsSize)) this.pageSize.set(pageState.take);
1116
+ });
1117
+ });
1118
+ inject(ListViewComponent).pageSizeSelect$.pipe(takeUntilDestroyed(inject(DestroyRef))).subscribe((event) => {
1119
+ this.pageSizeSelect.emit(event);
1120
+ });
1121
+ }
1122
+ setTake(take) {
1123
+ const size = Math.max(1, Math.floor(take) || 1);
1124
+ const pageState = this.#listService.pageState();
1125
+ if (pageState.take === size) return;
1126
+ const page = Math.floor(pageState.skip / size) + 1;
1127
+ this.#listService.pageState.set({
1128
+ page,
1129
+ skip: (page - 1) * size,
1130
+ take: size
1131
+ });
1132
+ }
1133
+ static {
1134
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1135
+ minVersion: "12.0.0",
1136
+ version: "22.2.6",
1137
+ ngImport: i0,
1138
+ type: ListViewPageableDirective,
1139
+ deps: [],
1140
+ target: i0.ɵɵFactoryTarget.Directive
1141
+ });
1142
+ }
1143
+ static {
1144
+ this.ɵdir = i0.ɵɵngDeclareDirective({
1145
+ minVersion: "17.1.0",
1146
+ version: "22.2.6",
1147
+ type: ListViewPageableDirective,
1148
+ isStandalone: true,
1149
+ selector: "mona-list-view[monaListViewPageable]",
1150
+ inputs: {
1151
+ options: {
1152
+ classPropertyName: "options",
1153
+ publicName: "monaListViewPageable",
1154
+ isSignal: true,
1155
+ isRequired: false,
1156
+ transformFunction: null
1157
+ },
1158
+ page: {
1159
+ classPropertyName: "page",
1160
+ publicName: "page",
1161
+ isSignal: true,
1162
+ isRequired: false,
1163
+ transformFunction: null
1164
+ },
1165
+ pageSize: {
1166
+ classPropertyName: "pageSize",
1167
+ publicName: "pageSize",
1168
+ isSignal: true,
1169
+ isRequired: false,
1170
+ transformFunction: null
1171
+ }
1172
+ },
1173
+ outputs: {
1174
+ page: "pageChange",
1175
+ pageSize: "pageSizeChange",
1176
+ pageSizeSelect: "pageSizeSelect"
1177
+ },
1178
+ ngImport: i0
1179
+ });
1180
+ }
1181
+ };
1182
+ i0.ɵɵngDeclareClassMetadata({
1183
+ minVersion: "12.0.0",
1184
+ version: "22.2.6",
1185
+ ngImport: i0,
1186
+ type: ListViewPageableDirective,
1187
+ decorators: [{
1188
+ type: Directive,
1189
+ args: [{ selector: "mona-list-view[monaListViewPageable]" }]
1190
+ }],
1191
+ ctorParameters: () => [],
1192
+ propDecorators: {
1193
+ options: [{
1194
+ type: i0.Input,
1195
+ args: [{
1196
+ isSignal: true,
1197
+ alias: "monaListViewPageable",
1198
+ required: false
1199
+ }]
1200
+ }],
1201
+ page: [{
1202
+ type: i0.Input,
1203
+ args: [{
1204
+ isSignal: true,
1205
+ alias: "page",
1206
+ required: false
1207
+ }]
1208
+ }, {
1209
+ type: i0.Output,
1210
+ args: ["pageChange"]
1211
+ }],
1212
+ pageSize: [{
1213
+ type: i0.Input,
1214
+ args: [{
1215
+ isSignal: true,
1216
+ alias: "pageSize",
1217
+ required: false
1218
+ }]
1219
+ }, {
1220
+ type: i0.Output,
1221
+ args: ["pageSizeChange"]
1222
+ }],
1223
+ pageSizeSelect: [{
1224
+ type: i0.Output,
1225
+ args: ["pageSizeSelect"]
1226
+ }]
1227
+ }
1228
+ });
1229
+ var ListViewSelectableDirective = class ListViewSelectableDirective {
1230
+ #defaultOptions;
1231
+ #listService;
1232
+ constructor() {
1233
+ this.#defaultOptions = {
1234
+ mode: "single",
1235
+ enabled: true,
1236
+ toggleable: false
1237
+ };
1238
+ this.#listService = inject(ListService);
1239
+ this.options = input("", {
1240
+ ...ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {},
1241
+ alias: "monaListViewSelectable"
1242
+ });
1243
+ this.selectBy = input("", ...ngDevMode ? [{ debugName: "selectBy" }] : /* istanbul ignore next */ []);
1244
+ this.selectedKeys = input([], ...ngDevMode ? [{ debugName: "selectedKeys" }] : /* istanbul ignore next */ []);
1245
+ this.selectedKeysChange = output();
1246
+ effect(() => {
1247
+ const selectBy = this.selectBy();
1248
+ untracked(() => {
1249
+ this.#listService.setValueField(selectBy ?? "");
1250
+ });
1251
+ });
1252
+ effect(() => {
1253
+ const selectedKeys = this.selectedKeys();
1254
+ untracked(() => {
1255
+ this.#listService.setSelectedKeys(selectedKeys ?? []);
1256
+ });
1257
+ });
1258
+ effect(() => {
1259
+ const options = this.options();
1260
+ untracked(() => {
1261
+ if (options === "") this.#listService.setSelectableOptions(this.#defaultOptions);
1262
+ else this.#listService.setSelectableOptions({
1263
+ ...this.#defaultOptions,
1264
+ ...options
1265
+ });
1266
+ });
1267
+ });
1268
+ this.#listService.selectedKeysChange$.pipe(takeUntilDestroyed()).subscribe((keys) => this.selectedKeysChange.emit(keys));
1269
+ }
1270
+ static {
1271
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1272
+ minVersion: "12.0.0",
1273
+ version: "22.2.6",
1274
+ ngImport: i0,
1275
+ type: ListViewSelectableDirective,
1276
+ deps: [],
1277
+ target: i0.ɵɵFactoryTarget.Directive
1278
+ });
1279
+ }
1280
+ static {
1281
+ this.ɵdir = i0.ɵɵngDeclareDirective({
1282
+ minVersion: "17.1.0",
1283
+ version: "22.2.6",
1284
+ type: ListViewSelectableDirective,
1285
+ isStandalone: true,
1286
+ selector: "mona-list-view[monaListViewSelectable]",
1287
+ inputs: {
1288
+ options: {
1289
+ classPropertyName: "options",
1290
+ publicName: "monaListViewSelectable",
1291
+ isSignal: true,
1292
+ isRequired: false,
1293
+ transformFunction: null
1294
+ },
1295
+ selectBy: {
1296
+ classPropertyName: "selectBy",
1297
+ publicName: "selectBy",
1298
+ isSignal: true,
1299
+ isRequired: false,
1300
+ transformFunction: null
1301
+ },
1302
+ selectedKeys: {
1303
+ classPropertyName: "selectedKeys",
1304
+ publicName: "selectedKeys",
1305
+ isSignal: true,
1306
+ isRequired: false,
1307
+ transformFunction: null
1308
+ }
1309
+ },
1310
+ outputs: { selectedKeysChange: "selectedKeysChange" },
1311
+ ngImport: i0
1312
+ });
1313
+ }
1314
+ };
1315
+ i0.ɵɵngDeclareClassMetadata({
1316
+ minVersion: "12.0.0",
1317
+ version: "22.2.6",
1318
+ ngImport: i0,
1319
+ type: ListViewSelectableDirective,
1320
+ decorators: [{
1321
+ type: Directive,
1322
+ args: [{ selector: "mona-list-view[monaListViewSelectable]" }]
1323
+ }],
1324
+ ctorParameters: () => [],
1325
+ propDecorators: {
1326
+ options: [{
1327
+ type: i0.Input,
1328
+ args: [{
1329
+ isSignal: true,
1330
+ alias: "monaListViewSelectable",
1331
+ required: false
1332
+ }]
1333
+ }],
1334
+ selectBy: [{
1335
+ type: i0.Input,
1336
+ args: [{
1337
+ isSignal: true,
1338
+ alias: "selectBy",
1339
+ required: false
1340
+ }]
1341
+ }],
1342
+ selectedKeys: [{
1343
+ type: i0.Input,
1344
+ args: [{
1345
+ isSignal: true,
1346
+ alias: "selectedKeys",
1347
+ required: false
1348
+ }]
1349
+ }],
1350
+ selectedKeysChange: [{
1351
+ type: i0.Output,
1352
+ args: ["selectedKeysChange"]
1353
+ }]
1354
+ }
1355
+ });
1356
+ var ListViewVirtualScrollDirective = class ListViewVirtualScrollDirective {
1357
+ #listService;
1358
+ constructor() {
1359
+ this.#listService = inject(ListService);
1360
+ this.options = input.required({
1361
+ ...ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {},
1362
+ alias: "monaListViewVirtualScroll"
1363
+ });
1364
+ effect(() => {
1365
+ const options = this.options();
1366
+ untracked(() => this.#listService.setVirtualScrollOptions(options));
1367
+ });
1368
+ }
1369
+ static {
1370
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1371
+ minVersion: "12.0.0",
1372
+ version: "22.2.6",
1373
+ ngImport: i0,
1374
+ type: ListViewVirtualScrollDirective,
1375
+ deps: [],
1376
+ target: i0.ɵɵFactoryTarget.Directive
1377
+ });
1378
+ }
1379
+ static {
1380
+ this.ɵdir = i0.ɵɵngDeclareDirective({
1381
+ minVersion: "17.1.0",
1382
+ version: "22.2.6",
1383
+ type: ListViewVirtualScrollDirective,
1384
+ isStandalone: true,
1385
+ selector: "mona-list-view[monaListViewVirtualScroll]",
1386
+ inputs: { options: {
1387
+ classPropertyName: "options",
1388
+ publicName: "monaListViewVirtualScroll",
1389
+ isSignal: true,
1390
+ isRequired: true,
1391
+ transformFunction: null
1392
+ } },
1393
+ ngImport: i0
1394
+ });
1395
+ }
1396
+ };
1397
+ i0.ɵɵngDeclareClassMetadata({
1398
+ minVersion: "12.0.0",
1399
+ version: "22.2.6",
1400
+ ngImport: i0,
1401
+ type: ListViewVirtualScrollDirective,
1402
+ decorators: [{
1403
+ type: Directive,
1404
+ args: [{ selector: "mona-list-view[monaListViewVirtualScroll]" }]
1405
+ }],
1406
+ ctorParameters: () => [],
1407
+ propDecorators: { options: [{
1408
+ type: i0.Input,
1409
+ args: [{
1410
+ isSignal: true,
1411
+ alias: "monaListViewVirtualScroll",
1412
+ required: true
1413
+ }]
1414
+ }] }
1415
+ });
683
1416
  export { ListViewComponent, ListViewFooterTemplateDirective, ListViewGroupHeaderTemplateDirective, ListViewGroupableDirective, ListViewHeaderTemplateDirective, ListViewItemTemplateDirective, ListViewNavigableDirective, ListViewNoDataTemplateDirective, ListViewPageableDirective, ListViewSelectableDirective, ListViewVirtualScrollDirective };
684
- //# sourceMappingURL=nanahoshi-mona-ui-list-view.mjs.map
1417
+
1418
+ //# sourceMappingURL=nanahoshi-mona-ui-list-view.mjs.map