@yinuo-ngm/server 1.0.15 → 1.0.16

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 (326) hide show
  1. package/lib/plugins/error-handler.plugin.js +5 -0
  2. package/lib/routes/api-client/hub-token.routes.js +22 -0
  3. package/lib/routes/index.js +2 -0
  4. package/lib/routes/node-version.routes.d.ts +2 -0
  5. package/lib/routes/node-version.routes.js +56 -0
  6. package/lib/routes/project.routes.js +5 -0
  7. package/lib/routes/sprite-browse.routes.js +19 -5
  8. package/lib/routes/sprite.routes.js +17 -11
  9. package/lib/routes/static-files.routes.js +16 -0
  10. package/lib/routes/task.routes.js +7 -0
  11. package/package.json +3 -3
  12. package/www/3rdpartylicenses.txt +14 -66
  13. package/www/browser/chunk-2BZRE4G7.js +1 -0
  14. package/www/browser/chunk-2X3MRS27.js +1 -0
  15. package/www/browser/chunk-4KETC6EB.js +1 -0
  16. package/www/browser/chunk-5T5KA5PG.js +1 -0
  17. package/www/browser/chunk-6CGHNKJI.js +1 -0
  18. package/www/browser/chunk-76TVIB33.js +63 -0
  19. package/www/browser/chunk-7J24TP36.js +1 -0
  20. package/www/browser/chunk-ACAZUX6C.js +1 -0
  21. package/www/browser/chunk-B6MBYCXI.js +1 -0
  22. package/www/browser/chunk-BYEU6KGP.js +2 -0
  23. package/www/browser/chunk-CZ5AZ3VW.js +1 -0
  24. package/www/browser/chunk-DW7F5PEA.js +1 -0
  25. package/www/browser/chunk-DXF7BVK5.js +1 -0
  26. package/www/browser/chunk-EEVPZGEY.js +1 -0
  27. package/www/browser/chunk-G2W3B7TJ.js +1 -0
  28. package/www/browser/chunk-GDWS2L66.js +1 -0
  29. package/www/browser/chunk-HFZLJHYR.js +1 -0
  30. package/www/browser/chunk-HGONFYP6.js +1 -0
  31. package/www/browser/chunk-HHBPULJW.js +2 -0
  32. package/www/browser/chunk-HRXCR3IN.js +1 -0
  33. package/www/browser/chunk-INL2PELS.js +1 -0
  34. package/www/browser/chunk-JHMEKUZ5.js +1 -0
  35. package/www/browser/chunk-JU3TEDBV.js +37 -0
  36. package/www/browser/chunk-JZULA5JV.js +1 -0
  37. package/www/browser/chunk-KVFR7GFV.js +20 -0
  38. package/www/browser/chunk-L5D75AMV.js +1 -0
  39. package/www/browser/chunk-L7TMCSHV.js +1 -0
  40. package/www/browser/chunk-LQ5OXSW7.js +3 -0
  41. package/www/browser/chunk-MVQTKINJ.js +1 -0
  42. package/www/browser/chunk-N4LRZJBP.js +1 -0
  43. package/www/browser/chunk-O2EYEF7J.js +1 -0
  44. package/www/browser/chunk-OMDHJIUB.js +1 -0
  45. package/www/browser/chunk-OWUAAOHW.js +2 -0
  46. package/www/browser/chunk-PIK5YPIB.js +1 -0
  47. package/www/browser/chunk-RHLQRQDK.js +9 -0
  48. package/www/browser/chunk-RW2JPJV7.js +1 -0
  49. package/www/browser/chunk-S3SJ4VVM.js +11 -0
  50. package/www/browser/chunk-SIVPP74B.js +0 -0
  51. package/www/browser/chunk-SPRWNZHF.js +15 -0
  52. package/www/browser/chunk-SQQNR223.js +1 -0
  53. package/www/browser/chunk-SVQWPHF5.js +1 -0
  54. package/www/browser/chunk-SYCNSLAW.js +4 -0
  55. package/www/browser/chunk-T3KK7ZXB.js +2 -0
  56. package/www/browser/chunk-TMX5TTV3.js +1 -0
  57. package/www/browser/chunk-UFY3FLDK.js +1 -0
  58. package/www/browser/chunk-UJOHBN2Y.js +1 -0
  59. package/www/browser/chunk-UQGCUFNM.js +1 -0
  60. package/www/browser/chunk-UXXWRMM6.js +1 -0
  61. package/www/browser/chunk-UZRJGJTD.js +2 -0
  62. package/www/browser/chunk-WD4IAQR3.js +1 -0
  63. package/www/browser/chunk-WF2QTF5L.js +1 -0
  64. package/www/browser/chunk-WI67LAOV.js +4 -0
  65. package/www/browser/chunk-WNCM6QKB.js +1 -0
  66. package/www/browser/chunk-XJ5KZQNN.js +1 -0
  67. package/www/browser/chunk-YETDFSQE.js +1 -0
  68. package/www/browser/chunk-YMTC5GZK.js +1 -0
  69. package/www/browser/chunk-YVZHJ76K.js +1 -0
  70. package/www/browser/chunk-ZNTJRLVH.js +1 -0
  71. package/www/browser/dark.css +1 -30433
  72. package/www/browser/default.css +1 -30149
  73. package/www/browser/index.html +3 -3
  74. package/www/browser/main-6LN5C22E.js +34 -0
  75. package/www/browser/scripts-U25HCVEI.js +6 -0
  76. package/www/browser/styles-ROAHD7MY.css +1 -0
  77. package/www/browser/add-widget-drawer.component.css.map +0 -7
  78. package/www/browser/advanced-editor.component.css.map +0 -7
  79. package/www/browser/api-client.component.css.map +0 -7
  80. package/www/browser/api-history-drawer.component.css.map +0 -7
  81. package/www/browser/app.css.map +0 -7
  82. package/www/browser/attachment-viewer.component.css.map +0 -7
  83. package/www/browser/auth-editor.component.css.map +0 -7
  84. package/www/browser/body-editor.component.css.map +0 -7
  85. package/www/browser/chunk-2YSUXBGC.js +0 -627
  86. package/www/browser/chunk-2YSUXBGC.js.map +0 -1
  87. package/www/browser/chunk-3G2GEOPV.js +0 -456
  88. package/www/browser/chunk-3G2GEOPV.js.map +0 -1
  89. package/www/browser/chunk-3L72DF3R.js +0 -1683
  90. package/www/browser/chunk-3L72DF3R.js.map +0 -1
  91. package/www/browser/chunk-3MCIETCQ.js +0 -8279
  92. package/www/browser/chunk-3MCIETCQ.js.map +0 -1
  93. package/www/browser/chunk-665WC4RU.js +0 -5383
  94. package/www/browser/chunk-665WC4RU.js.map +0 -1
  95. package/www/browser/chunk-6QMSEZPT.js +0 -10044
  96. package/www/browser/chunk-6QMSEZPT.js.map +0 -1
  97. package/www/browser/chunk-6TBQERYX.js +0 -280
  98. package/www/browser/chunk-6TBQERYX.js.map +0 -1
  99. package/www/browser/chunk-6UW4MRJZ.js +0 -43
  100. package/www/browser/chunk-6UW4MRJZ.js.map +0 -7
  101. package/www/browser/chunk-6XUMIL3W.js +0 -5495
  102. package/www/browser/chunk-6XUMIL3W.js.map +0 -1
  103. package/www/browser/chunk-724YOJI3.js +0 -903
  104. package/www/browser/chunk-724YOJI3.js.map +0 -1
  105. package/www/browser/chunk-766T7YES.js +0 -437
  106. package/www/browser/chunk-766T7YES.js.map +0 -1
  107. package/www/browser/chunk-7FC7DN65.js +0 -728
  108. package/www/browser/chunk-7FC7DN65.js.map +0 -1
  109. package/www/browser/chunk-APGQRYWX.js +0 -156
  110. package/www/browser/chunk-APGQRYWX.js.map +0 -7
  111. package/www/browser/chunk-AQHSGTHS.js +0 -1960
  112. package/www/browser/chunk-AQHSGTHS.js.map +0 -1
  113. package/www/browser/chunk-CTOEAJQK.js +0 -40
  114. package/www/browser/chunk-CTOEAJQK.js.map +0 -7
  115. package/www/browser/chunk-DEGQJKKZ.js +0 -409
  116. package/www/browser/chunk-DEGQJKKZ.js.map +0 -1
  117. package/www/browser/chunk-DIJX2663.js +0 -1166
  118. package/www/browser/chunk-DIJX2663.js.map +0 -1
  119. package/www/browser/chunk-E4XD4GLT.js +0 -427
  120. package/www/browser/chunk-E4XD4GLT.js.map +0 -1
  121. package/www/browser/chunk-EQOY6A3M.js +0 -212
  122. package/www/browser/chunk-EQOY6A3M.js.map +0 -1
  123. package/www/browser/chunk-ETTBRXVA.js +0 -2643
  124. package/www/browser/chunk-ETTBRXVA.js.map +0 -1
  125. package/www/browser/chunk-FLSUSPBD.js +0 -5569
  126. package/www/browser/chunk-FLSUSPBD.js.map +0 -1
  127. package/www/browser/chunk-FZNHBEAZ.js +0 -102
  128. package/www/browser/chunk-FZNHBEAZ.js.map +0 -1
  129. package/www/browser/chunk-GJC7CZIJ.js +0 -361
  130. package/www/browser/chunk-GJC7CZIJ.js.map +0 -7
  131. package/www/browser/chunk-GMCNMOTD.js +0 -844
  132. package/www/browser/chunk-GMCNMOTD.js.map +0 -7
  133. package/www/browser/chunk-H43HGCRW.js +0 -198
  134. package/www/browser/chunk-H43HGCRW.js.map +0 -7
  135. package/www/browser/chunk-J447GBHM.js +0 -160
  136. package/www/browser/chunk-J447GBHM.js.map +0 -1
  137. package/www/browser/chunk-JN3VOWP7.js +0 -384
  138. package/www/browser/chunk-JN3VOWP7.js.map +0 -1
  139. package/www/browser/chunk-KSHAGY2M.js +0 -399
  140. package/www/browser/chunk-KSHAGY2M.js.map +0 -7
  141. package/www/browser/chunk-KV72AKOD.js +0 -59
  142. package/www/browser/chunk-KV72AKOD.js.map +0 -7
  143. package/www/browser/chunk-LAVMY2SJ.js +0 -26
  144. package/www/browser/chunk-LAVMY2SJ.js.map +0 -7
  145. package/www/browser/chunk-LLRVGHG5.js +0 -73
  146. package/www/browser/chunk-LLRVGHG5.js.map +0 -7
  147. package/www/browser/chunk-LPME4AJ3.js +0 -196
  148. package/www/browser/chunk-LPME4AJ3.js.map +0 -1
  149. package/www/browser/chunk-LVPSURVU.js +0 -4615
  150. package/www/browser/chunk-LVPSURVU.js.map +0 -1
  151. package/www/browser/chunk-MMPO7QLO.js +0 -4146
  152. package/www/browser/chunk-MMPO7QLO.js.map +0 -7
  153. package/www/browser/chunk-O7LB6VFM.js +0 -1953
  154. package/www/browser/chunk-O7LB6VFM.js.map +0 -1
  155. package/www/browser/chunk-P5CWA4FO.js +0 -685
  156. package/www/browser/chunk-P5CWA4FO.js.map +0 -1
  157. package/www/browser/chunk-RBWIWNTL.js +0 -203
  158. package/www/browser/chunk-RBWIWNTL.js.map +0 -7
  159. package/www/browser/chunk-RUXJCM3V.js +0 -26199
  160. package/www/browser/chunk-RUXJCM3V.js.map +0 -1
  161. package/www/browser/chunk-S77VVYUZ.js +0 -168
  162. package/www/browser/chunk-S77VVYUZ.js.map +0 -1
  163. package/www/browser/chunk-SCXPYFOB.js +0 -4316
  164. package/www/browser/chunk-SCXPYFOB.js.map +0 -1
  165. package/www/browser/chunk-SS73S33S.js +0 -471
  166. package/www/browser/chunk-SS73S33S.js.map +0 -7
  167. package/www/browser/chunk-T6UAOWNP.js +0 -600
  168. package/www/browser/chunk-T6UAOWNP.js.map +0 -1
  169. package/www/browser/chunk-TEW4MY4J.js +0 -148
  170. package/www/browser/chunk-TEW4MY4J.js.map +0 -7
  171. package/www/browser/chunk-TVORF3SF.js +0 -82
  172. package/www/browser/chunk-TVORF3SF.js.map +0 -7
  173. package/www/browser/chunk-UAN42EUZ.js +0 -2147
  174. package/www/browser/chunk-UAN42EUZ.js.map +0 -1
  175. package/www/browser/chunk-ULOHDK7Y.js +0 -1
  176. package/www/browser/chunk-ULOHDK7Y.js.map +0 -7
  177. package/www/browser/chunk-UYJ3FVRV.js +0 -3978
  178. package/www/browser/chunk-UYJ3FVRV.js.map +0 -1
  179. package/www/browser/chunk-VXHZMSDM.js +0 -5509
  180. package/www/browser/chunk-VXHZMSDM.js.map +0 -1
  181. package/www/browser/chunk-VYNQPZQO.js +0 -281
  182. package/www/browser/chunk-VYNQPZQO.js.map +0 -1
  183. package/www/browser/chunk-W3J23PZI.js +0 -9213
  184. package/www/browser/chunk-W3J23PZI.js.map +0 -1
  185. package/www/browser/chunk-W5HGHCQT.js +0 -1642
  186. package/www/browser/chunk-W5HGHCQT.js.map +0 -7
  187. package/www/browser/chunk-XF5H7E4L.js +0 -4723
  188. package/www/browser/chunk-XF5H7E4L.js.map +0 -1
  189. package/www/browser/chunk-XNFNEBMY.js +0 -398
  190. package/www/browser/chunk-XNFNEBMY.js.map +0 -7
  191. package/www/browser/chunk-XQY5SPGI.js +0 -30811
  192. package/www/browser/chunk-XQY5SPGI.js.map +0 -1
  193. package/www/browser/chunk-Y7JBZHNK.js +0 -514
  194. package/www/browser/chunk-Y7JBZHNK.js.map +0 -1
  195. package/www/browser/chunk-YWHRP4X3.js +0 -406
  196. package/www/browser/chunk-YWHRP4X3.js.map +0 -1
  197. package/www/browser/chunk-Z7FJIV62.js +0 -95
  198. package/www/browser/chunk-Z7FJIV62.js.map +0 -7
  199. package/www/browser/chunk-ZBZHXS46.js +0 -1674
  200. package/www/browser/chunk-ZBZHXS46.js.map +0 -1
  201. package/www/browser/chunk-ZZA5NVAI.js +0 -735
  202. package/www/browser/chunk-ZZA5NVAI.js.map +0 -1
  203. package/www/browser/collection-modal.component.css.map +0 -7
  204. package/www/browser/collection-tree-item.component.css.map +0 -7
  205. package/www/browser/collection-tree.component.css.map +0 -7
  206. package/www/browser/config-change-bar-component.css.map +0 -7
  207. package/www/browser/config-item-component.css.map +0 -7
  208. package/www/browser/config-nav-component.css.map +0 -7
  209. package/www/browser/config-section-component.css.map +0 -7
  210. package/www/browser/create-summary-aside.component.css.map +0 -7
  211. package/www/browser/curl-actions.component.css.map +0 -7
  212. package/www/browser/dark.css.map +0 -7
  213. package/www/browser/dashboard-canvas.component.css.map +0 -7
  214. package/www/browser/dashboard.component.css.map +0 -7
  215. package/www/browser/default.css.map +0 -7
  216. package/www/browser/detail-item-card.component.css.map +0 -7
  217. package/www/browser/ellipsis-text.component.css.map +0 -7
  218. package/www/browser/env-modal.component.css.map +0 -7
  219. package/www/browser/env-picker.component.css.map +0 -7
  220. package/www/browser/feedback.component.css.map +0 -7
  221. package/www/browser/fs-explorer.component.css.map +0 -7
  222. package/www/browser/git-import-modal.component.css.map +0 -7
  223. package/www/browser/hub-v2-personal-token-modal.component.css.map +0 -7
  224. package/www/browser/issue-action-area.component.css.map +0 -7
  225. package/www/browser/issue-add-participants-dialog.component.css.map +0 -7
  226. package/www/browser/issue-assign-dialog.component.css.map +0 -7
  227. package/www/browser/issue-attachment-area.component.css.map +0 -7
  228. package/www/browser/issue-base-info-area.component.css.map +0 -7
  229. package/www/browser/issue-branches.component.css.map +0 -7
  230. package/www/browser/issue-close-dialog.component.css.map +0 -7
  231. package/www/browser/issue-collaborators-panel.component.css.map +0 -7
  232. package/www/browser/issue-comment-editor.component.css.map +0 -7
  233. package/www/browser/issue-create-branch-dialog.component.css.map +0 -7
  234. package/www/browser/issue-description-area.component.css.map +0 -7
  235. package/www/browser/issue-detail.component.css.map +0 -7
  236. package/www/browser/issue-resolve-dialog.component.css.map +0 -7
  237. package/www/browser/issue-start-own-branch-dialog.component.css.map +0 -7
  238. package/www/browser/issues-list-table.component.css.map +0 -7
  239. package/www/browser/issues.component.css.map +0 -7
  240. package/www/browser/kill-port-widget.component.css.map +0 -7
  241. package/www/browser/kv-table.component.css.map +0 -7
  242. package/www/browser/layout-footer.component.css.map +0 -7
  243. package/www/browser/layout-header.component.css.map +0 -7
  244. package/www/browser/layout-menu.component.css.map +0 -7
  245. package/www/browser/layout-project-nav.component.css.map +0 -7
  246. package/www/browser/layout-sidebar.component.css.map +0 -7
  247. package/www/browser/layout.component.css.map +0 -7
  248. package/www/browser/less-viewport-component.css.map +0 -7
  249. package/www/browser/main.js +0 -1872
  250. package/www/browser/main.js.map +0 -1
  251. package/www/browser/markdown-viewer.component.css.map +0 -7
  252. package/www/browser/news-feed-widget.component.css.map +0 -7
  253. package/www/browser/ng-devtool.component.css.map +0 -7
  254. package/www/browser/nginx-config-editor.component.css.map +0 -7
  255. package/www/browser/nginx-log-viewer.component.css.map +0 -7
  256. package/www/browser/nginx-secondary-logs-tab.component.css.map +0 -7
  257. package/www/browser/nginx-secondary-perf-tab.component.css.map +0 -7
  258. package/www/browser/nginx-secondary-settings-tab.component.css.map +0 -7
  259. package/www/browser/nginx-secondary-ssl-tab.component.css.map +0 -7
  260. package/www/browser/nginx-secondary-test-tab.component.css.map +0 -7
  261. package/www/browser/nginx-secondary-traffic-tab.component.css.map +0 -7
  262. package/www/browser/nginx-secondary-upstream-tab.component.css.map +0 -7
  263. package/www/browser/nginx-section-card.component.css.map +0 -7
  264. package/www/browser/nginx-server-drawer.component.css.map +0 -7
  265. package/www/browser/nginx-server-list.component.css.map +0 -7
  266. package/www/browser/nginx-stat-card.component.css.map +0 -7
  267. package/www/browser/nginx.component.css.map +0 -7
  268. package/www/browser/page-layout.component.css.map +0 -7
  269. package/www/browser/pick-workspace-modal.component.css.map +0 -7
  270. package/www/browser/polyfills.js +0 -26584
  271. package/www/browser/polyfills.js.map +0 -7
  272. package/www/browser/project-conf.component.css.map +0 -7
  273. package/www/browser/project-create-modal.component.css.map +0 -7
  274. package/www/browser/project-create.component.css.map +0 -7
  275. package/www/browser/project-deps.component.css.map +0 -7
  276. package/www/browser/project-edit-modal.component.css.map +0 -7
  277. package/www/browser/project-import.component.css.map +0 -7
  278. package/www/browser/project-item-popover.component.css.map +0 -7
  279. package/www/browser/project-item.component.css.map +0 -7
  280. package/www/browser/project-list.component.css.map +0 -7
  281. package/www/browser/projects.component.css.map +0 -7
  282. package/www/browser/quick-task-widget.component.css.map +0 -7
  283. package/www/browser/rd-action-area.component.css.map +0 -7
  284. package/www/browser/rd-advance-stage-dialog.component.css.map +0 -7
  285. package/www/browser/rd-block-dialog.component.css.map +0 -7
  286. package/www/browser/rd-create-dialog.component.css.map +0 -7
  287. package/www/browser/rd-detail.component.css.map +0 -7
  288. package/www/browser/rd-item-card.component.css.map +0 -7
  289. package/www/browser/rd-list-board.component.css.map +0 -7
  290. package/www/browser/rd-list-table.component.css.map +0 -7
  291. package/www/browser/rd.component.css.map +0 -7
  292. package/www/browser/request-collections.component.css.map +0 -7
  293. package/www/browser/request-editor.component.css.map +0 -7
  294. package/www/browser/request-list-item.component.css.map +0 -7
  295. package/www/browser/request-list.component.css.map +0 -7
  296. package/www/browser/request-tabs-bar.component.css.map +0 -7
  297. package/www/browser/request-tabs.component.css.map +0 -7
  298. package/www/browser/request-urlbar.component.css.map +0 -7
  299. package/www/browser/response-viewer.component.css.map +0 -7
  300. package/www/browser/scripts.js +0 -245
  301. package/www/browser/scripts.js.map +0 -7
  302. package/www/browser/setting.component.css.map +0 -7
  303. package/www/browser/sprite-conf-modal.component.css.map +0 -7
  304. package/www/browser/sprite-icons-panel-component.css.map +0 -7
  305. package/www/browser/sprite-images-panel-component.css.map +0 -7
  306. package/www/browser/sprite-result-tabs.component.css.map +0 -7
  307. package/www/browser/sprite-viewport-component.css.map +0 -7
  308. package/www/browser/sprite.component.css.map +0 -7
  309. package/www/browser/step-advance.component.css.map +0 -7
  310. package/www/browser/step-basic.component.css.map +0 -7
  311. package/www/browser/step-config.component.css.map +0 -7
  312. package/www/browser/step-features.component.css.map +0 -7
  313. package/www/browser/step-preset.component.css.map +0 -7
  314. package/www/browser/step-summary-aside.component.css.map +0 -7
  315. package/www/browser/styles.css +0 -258
  316. package/www/browser/styles.css.map +0 -7
  317. package/www/browser/system-log.component.css.map +0 -7
  318. package/www/browser/task-actions.component.css.map +0 -7
  319. package/www/browser/task-console.component.css.map +0 -7
  320. package/www/browser/task-header.component.css.map +0 -7
  321. package/www/browser/task-list.component.css.map +0 -7
  322. package/www/browser/tasks.component.css.map +0 -7
  323. package/www/browser/terminal-view.component.css.map +0 -7
  324. package/www/browser/welcome-widget.component.css.map +0 -7
  325. package/www/browser/widget-base.component.css.map +0 -7
  326. package/www/browser/widget-host.component.css.map +0 -7
@@ -1,3978 +0,0 @@
1
- import {
2
- NzRadioComponent
3
- } from "./chunk-JN3VOWP7.js";
4
- import {
5
- NzCheckboxComponent,
6
- NzCheckboxModule
7
- } from "./chunk-766T7YES.js";
8
- import {
9
- NzResizeObserver
10
- } from "./chunk-S77VVYUZ.js";
11
- import {
12
- NzSpinComponent
13
- } from "./chunk-EQOY6A3M.js";
14
- import {
15
- NzDropDownDirective,
16
- NzDropDownModule,
17
- NzDropdownMenuComponent,
18
- NzMenuDirective,
19
- NzMenuItemComponent
20
- } from "./chunk-ZBZHXS46.js";
21
- import {
22
- NzEmbedEmptyComponent,
23
- NzEmptyModule,
24
- NzOptionComponent,
25
- NzSelectComponent,
26
- NzSelectModule
27
- } from "./chunk-ETTBRXVA.js";
28
- import {
29
- CdkFixedSizeVirtualScroll,
30
- CdkScrollable,
31
- CdkVirtualForOf,
32
- CdkVirtualScrollViewport,
33
- Directionality,
34
- FormsModule,
35
- NgControlStatus,
36
- NgModel,
37
- NzBreakpointEnum,
38
- NzBreakpointService,
39
- NzButtonComponent,
40
- NzButtonModule,
41
- NzConfigService,
42
- NzI18nService,
43
- NzIconDirective,
44
- NzIconModule,
45
- NzOutletModule,
46
- NzResizeService,
47
- NzStringTemplateOutletDirective,
48
- NzTransitionPatchDirective,
49
- NzWaveDirective,
50
- Platform,
51
- ScrollingModule,
52
- WithConfig,
53
- arraysEqual,
54
- fromEventOutsideAngular,
55
- gridResponsiveMap,
56
- isNil,
57
- measureScrollbar,
58
- onConfigChangeEventForComponent,
59
- takeUntilDestroyed,
60
- toNumber
61
- } from "./chunk-RUXJCM3V.js";
62
- import {
63
- AsyncPipe,
64
- NgTemplateOutlet
65
- } from "./chunk-3MCIETCQ.js";
66
- import {
67
- BehaviorSubject,
68
- ChangeDetectionStrategy,
69
- ChangeDetectorRef,
70
- Component,
71
- ContentChild,
72
- ContentChildren,
73
- DestroyRef,
74
- Directive,
75
- EMPTY,
76
- ElementRef,
77
- EventEmitter,
78
- FactoryTarget,
79
- Injectable,
80
- Input,
81
- NgModule,
82
- NgZone,
83
- Output,
84
- Renderer2,
85
- ReplaySubject,
86
- Subject,
87
- TemplateRef,
88
- ViewChild,
89
- ViewChildren,
90
- ViewEncapsulation,
91
- __esDecorate,
92
- __publicField,
93
- __runInitializers,
94
- __spreadProps,
95
- __spreadValues,
96
- booleanAttribute,
97
- combineLatest,
98
- core_exports,
99
- debounceTime,
100
- delay,
101
- distinctUntilChanged,
102
- filter,
103
- inject,
104
- input,
105
- map,
106
- merge,
107
- mergeMap,
108
- numberAttribute,
109
- of,
110
- skip,
111
- startWith,
112
- switchMap,
113
- ɵɵngDeclareClassMetadata,
114
- ɵɵngDeclareComponent,
115
- ɵɵngDeclareDirective,
116
- ɵɵngDeclareFactory,
117
- ɵɵngDeclareInjectable,
118
- ɵɵngDeclareInjector,
119
- ɵɵngDeclareNgModule
120
- } from "./chunk-XQY5SPGI.js";
121
-
122
- // node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-pagination.mjs
123
- var NzPaginationItemComponent = class _NzPaginationItemComponent {
124
- active = false;
125
- locale;
126
- index = null;
127
- disabled = false;
128
- direction = "ltr";
129
- type = null;
130
- itemRender = null;
131
- diffIndex = new EventEmitter();
132
- gotoIndex = new EventEmitter();
133
- title = null;
134
- clickItem() {
135
- if (!this.disabled) {
136
- if (this.type === "page") {
137
- this.gotoIndex.emit(this.index);
138
- } else {
139
- this.diffIndex.emit({
140
- next: 1,
141
- prev: -1,
142
- prev_5: -5,
143
- next_5: 5
144
- }[this.type]);
145
- }
146
- }
147
- }
148
- ngOnChanges(changes) {
149
- const { locale, index, type } = changes;
150
- if (locale || index || type) {
151
- this.title = {
152
- page: `${this.index}`,
153
- next: this.locale?.next_page,
154
- prev: this.locale?.prev_page,
155
- prev_5: this.locale?.prev_5,
156
- next_5: this.locale?.next_5
157
- }[this.type];
158
- }
159
- }
160
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzPaginationItemComponent, deps: [], target: FactoryTarget.Component });
161
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzPaginationItemComponent, isStandalone: true, selector: "li[nz-pagination-item]", inputs: { active: "active", locale: "locale", index: "index", disabled: "disabled", direction: "direction", type: "type", itemRender: "itemRender" }, outputs: { diffIndex: "diffIndex", gotoIndex: "gotoIndex" }, host: { listeners: { "click": "clickItem()" }, properties: { "class.ant-pagination-prev": "type === 'prev'", "class.ant-pagination-next": "type === 'next'", "class.ant-pagination-item": "type === 'page'", "class.ant-pagination-jump-prev": "type === 'prev_5'", "class.ant-pagination-jump-prev-custom-icon": "type === 'prev_5'", "class.ant-pagination-jump-next": "type === 'next_5'", "class.ant-pagination-jump-next-custom-icon": "type === 'next_5'", "class.ant-pagination-disabled": "disabled", "class.ant-pagination-item-active": "active", "attr.title": "title" } }, usesOnChanges: true, ngImport: core_exports, template: `
162
- <ng-template #renderItemTemplate let-type let-page="page">
163
- @switch (type) {
164
- @case ('page') {
165
- <a>{{ page }}</a>
166
- }
167
- @case ('prev') {
168
- <button type="button" [disabled]="disabled" [attr.title]="locale.prev_page" class="ant-pagination-item-link">
169
- @if (direction === 'rtl') {
170
- <nz-icon nzType="right" />
171
- } @else {
172
- <nz-icon nzType="left" />
173
- }
174
- </button>
175
- }
176
- @case ('next') {
177
- <button type="button" [disabled]="disabled" [attr.title]="locale.next_page" class="ant-pagination-item-link">
178
- @if (direction === 'rtl') {
179
- <nz-icon nzType="left" />
180
- } @else {
181
- <nz-icon nzType="right" />
182
- }
183
- </button>
184
- }
185
- @default {
186
- <a class="ant-pagination-item-link">
187
- <div class="ant-pagination-item-container">
188
- @switch (type) {
189
- @case ('prev_5') {
190
- @if (direction === 'rtl') {
191
- <nz-icon nzType="double-right" class="ant-pagination-item-link-icon" />
192
- } @else {
193
- <nz-icon nzType="double-left" class="ant-pagination-item-link-icon" />
194
- }
195
- }
196
- @case ('next_5') {
197
- @if (direction === 'rtl') {
198
- <nz-icon nzType="double-left" class="ant-pagination-item-link-icon" />
199
- } @else {
200
- <nz-icon nzType="double-right" class="ant-pagination-item-link-icon" />
201
- }
202
- }
203
- }
204
- <span class="ant-pagination-item-ellipsis">\u2022\u2022\u2022</span>
205
- </div>
206
- </a>
207
- }
208
- }
209
- </ng-template>
210
- <ng-template
211
- [ngTemplateOutlet]="itemRender || renderItemTemplate"
212
- [ngTemplateOutletContext]="{ $implicit: type, page: index }"
213
- />
214
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
215
- };
216
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzPaginationItemComponent, decorators: [{
217
- type: Component,
218
- args: [{
219
- selector: "li[nz-pagination-item]",
220
- encapsulation: ViewEncapsulation.None,
221
- changeDetection: ChangeDetectionStrategy.OnPush,
222
- template: `
223
- <ng-template #renderItemTemplate let-type let-page="page">
224
- @switch (type) {
225
- @case ('page') {
226
- <a>{{ page }}</a>
227
- }
228
- @case ('prev') {
229
- <button type="button" [disabled]="disabled" [attr.title]="locale.prev_page" class="ant-pagination-item-link">
230
- @if (direction === 'rtl') {
231
- <nz-icon nzType="right" />
232
- } @else {
233
- <nz-icon nzType="left" />
234
- }
235
- </button>
236
- }
237
- @case ('next') {
238
- <button type="button" [disabled]="disabled" [attr.title]="locale.next_page" class="ant-pagination-item-link">
239
- @if (direction === 'rtl') {
240
- <nz-icon nzType="left" />
241
- } @else {
242
- <nz-icon nzType="right" />
243
- }
244
- </button>
245
- }
246
- @default {
247
- <a class="ant-pagination-item-link">
248
- <div class="ant-pagination-item-container">
249
- @switch (type) {
250
- @case ('prev_5') {
251
- @if (direction === 'rtl') {
252
- <nz-icon nzType="double-right" class="ant-pagination-item-link-icon" />
253
- } @else {
254
- <nz-icon nzType="double-left" class="ant-pagination-item-link-icon" />
255
- }
256
- }
257
- @case ('next_5') {
258
- @if (direction === 'rtl') {
259
- <nz-icon nzType="double-left" class="ant-pagination-item-link-icon" />
260
- } @else {
261
- <nz-icon nzType="double-right" class="ant-pagination-item-link-icon" />
262
- }
263
- }
264
- }
265
- <span class="ant-pagination-item-ellipsis">\u2022\u2022\u2022</span>
266
- </div>
267
- </a>
268
- }
269
- }
270
- </ng-template>
271
- <ng-template
272
- [ngTemplateOutlet]="itemRender || renderItemTemplate"
273
- [ngTemplateOutletContext]="{ $implicit: type, page: index }"
274
- />
275
- `,
276
- host: {
277
- "[class.ant-pagination-prev]": `type === 'prev'`,
278
- "[class.ant-pagination-next]": `type === 'next'`,
279
- "[class.ant-pagination-item]": `type === 'page'`,
280
- "[class.ant-pagination-jump-prev]": `type === 'prev_5'`,
281
- "[class.ant-pagination-jump-prev-custom-icon]": `type === 'prev_5'`,
282
- "[class.ant-pagination-jump-next]": `type === 'next_5'`,
283
- "[class.ant-pagination-jump-next-custom-icon]": `type === 'next_5'`,
284
- "[class.ant-pagination-disabled]": "disabled",
285
- "[class.ant-pagination-item-active]": "active",
286
- "[attr.title]": "title",
287
- "(click)": "clickItem()"
288
- },
289
- imports: [NzIconModule, NgTemplateOutlet]
290
- }]
291
- }], propDecorators: { active: [{
292
- type: Input
293
- }], locale: [{
294
- type: Input
295
- }], index: [{
296
- type: Input
297
- }], disabled: [{
298
- type: Input
299
- }], direction: [{
300
- type: Input
301
- }], type: [{
302
- type: Input
303
- }], itemRender: [{
304
- type: Input
305
- }], diffIndex: [{
306
- type: Output
307
- }], gotoIndex: [{
308
- type: Output
309
- }] } });
310
- var NzPaginationOptionsComponent = class _NzPaginationOptionsComponent {
311
- nzSize = "default";
312
- disabled = false;
313
- showSizeChanger = false;
314
- showQuickJumper = false;
315
- locale;
316
- total = 0;
317
- pageIndex = 1;
318
- pageSize = 10;
319
- pageSizeOptions = [];
320
- pageIndexChange = new EventEmitter();
321
- pageSizeChange = new EventEmitter();
322
- listOfPageSizeOption = [];
323
- onPageSizeChange(size) {
324
- if (this.pageSize !== size) {
325
- this.pageSizeChange.next(size);
326
- }
327
- }
328
- jumpToPageViaInput($event) {
329
- const target = $event.target;
330
- const index = Math.floor(toNumber(target.value, this.pageIndex));
331
- this.pageIndexChange.next(index);
332
- target.value = "";
333
- }
334
- ngOnChanges(changes) {
335
- const { pageSize, pageSizeOptions, locale } = changes;
336
- if (pageSize || pageSizeOptions || locale) {
337
- this.listOfPageSizeOption = [.../* @__PURE__ */ new Set([...this.pageSizeOptions, this.pageSize])].map((item) => ({
338
- value: item,
339
- label: `${item} ${this.locale.items_per_page}`
340
- }));
341
- }
342
- }
343
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzPaginationOptionsComponent, deps: [], target: FactoryTarget.Component });
344
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzPaginationOptionsComponent, isStandalone: true, selector: "li[nz-pagination-options]", inputs: { nzSize: "nzSize", disabled: "disabled", showSizeChanger: "showSizeChanger", showQuickJumper: "showQuickJumper", locale: "locale", total: "total", pageIndex: "pageIndex", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions" }, outputs: { pageIndexChange: "pageIndexChange", pageSizeChange: "pageSizeChange" }, host: { classAttribute: "ant-pagination-options" }, usesOnChanges: true, ngImport: core_exports, template: `
345
- @if (showSizeChanger) {
346
- <nz-select
347
- class="ant-pagination-options-size-changer"
348
- [nzDisabled]="disabled"
349
- [nzSize]="nzSize"
350
- [ngModel]="pageSize"
351
- (ngModelChange)="onPageSizeChange($event)"
352
- >
353
- @for (option of listOfPageSizeOption; track option.value) {
354
- <nz-option [nzLabel]="option.label" [nzValue]="option.value" />
355
- }
356
- </nz-select>
357
- }
358
-
359
- @if (showQuickJumper) {
360
- <div class="ant-pagination-options-quick-jumper">
361
- {{ locale.jump_to }}
362
- <input [disabled]="disabled" (keydown.enter)="jumpToPageViaInput($event)" />
363
- {{ locale.page }}
364
- </div>
365
- }
366
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzVariant", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzPrefix", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus", "nzOnClear"], exportAs: ["nzSelect"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
367
- };
368
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzPaginationOptionsComponent, decorators: [{
369
- type: Component,
370
- args: [{
371
- selector: "li[nz-pagination-options]",
372
- encapsulation: ViewEncapsulation.None,
373
- changeDetection: ChangeDetectionStrategy.OnPush,
374
- template: `
375
- @if (showSizeChanger) {
376
- <nz-select
377
- class="ant-pagination-options-size-changer"
378
- [nzDisabled]="disabled"
379
- [nzSize]="nzSize"
380
- [ngModel]="pageSize"
381
- (ngModelChange)="onPageSizeChange($event)"
382
- >
383
- @for (option of listOfPageSizeOption; track option.value) {
384
- <nz-option [nzLabel]="option.label" [nzValue]="option.value" />
385
- }
386
- </nz-select>
387
- }
388
-
389
- @if (showQuickJumper) {
390
- <div class="ant-pagination-options-quick-jumper">
391
- {{ locale.jump_to }}
392
- <input [disabled]="disabled" (keydown.enter)="jumpToPageViaInput($event)" />
393
- {{ locale.page }}
394
- </div>
395
- }
396
- `,
397
- host: { class: "ant-pagination-options" },
398
- imports: [NzSelectModule, FormsModule]
399
- }]
400
- }], propDecorators: { nzSize: [{
401
- type: Input
402
- }], disabled: [{
403
- type: Input
404
- }], showSizeChanger: [{
405
- type: Input
406
- }], showQuickJumper: [{
407
- type: Input
408
- }], locale: [{
409
- type: Input
410
- }], total: [{
411
- type: Input
412
- }], pageIndex: [{
413
- type: Input
414
- }], pageSize: [{
415
- type: Input
416
- }], pageSizeOptions: [{
417
- type: Input
418
- }], pageIndexChange: [{
419
- type: Output
420
- }], pageSizeChange: [{
421
- type: Output
422
- }] } });
423
- var NzPaginationDefaultComponent = class _NzPaginationDefaultComponent {
424
- cdr = inject(ChangeDetectorRef);
425
- directionality = inject(Directionality);
426
- destroyRef = inject(DestroyRef);
427
- template;
428
- nzSize = "default";
429
- itemRender = null;
430
- showTotal = null;
431
- disabled = false;
432
- locale;
433
- showSizeChanger = false;
434
- showQuickJumper = false;
435
- total = 0;
436
- pageIndex = 1;
437
- pageSize = 10;
438
- pageSizeOptions = [10, 20, 30, 40];
439
- pageIndexChange = new EventEmitter();
440
- pageSizeChange = new EventEmitter();
441
- ranges = [0, 0];
442
- listOfPageItem = [];
443
- dir = "ltr";
444
- constructor() {
445
- const el = inject(ElementRef).nativeElement;
446
- const renderer = inject(Renderer2);
447
- renderer.removeChild(renderer.parentNode(el), el);
448
- }
449
- ngOnInit() {
450
- this.directionality.change?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((direction) => {
451
- this.dir = direction;
452
- this.cdr.detectChanges();
453
- });
454
- this.dir = this.directionality.value;
455
- }
456
- jumpPage(index) {
457
- this.onPageIndexChange(index);
458
- }
459
- jumpDiff(diff) {
460
- this.jumpPage(this.pageIndex + diff);
461
- }
462
- trackByPageItem(_, value) {
463
- return `${value.type}-${value.index}`;
464
- }
465
- onPageIndexChange(index) {
466
- this.pageIndexChange.next(index);
467
- }
468
- onPageSizeChange(size) {
469
- this.pageSizeChange.next(size);
470
- }
471
- getLastIndex(total, pageSize) {
472
- return Math.ceil(total / pageSize);
473
- }
474
- buildIndexes() {
475
- const lastIndex = this.getLastIndex(this.total, this.pageSize);
476
- this.listOfPageItem = this.getListOfPageItem(this.pageIndex, lastIndex);
477
- }
478
- getListOfPageItem(pageIndex, lastIndex) {
479
- const concatWithPrevNext = (listOfPage) => {
480
- const prevItem = {
481
- type: "prev",
482
- disabled: pageIndex === 1
483
- };
484
- const nextItem = {
485
- type: "next",
486
- disabled: pageIndex === lastIndex
487
- };
488
- return [prevItem, ...listOfPage, nextItem];
489
- };
490
- const generatePage = (start, end) => {
491
- const list = [];
492
- for (let i = start; i <= end; i++) {
493
- list.push({ index: i, type: "page" });
494
- }
495
- return list;
496
- };
497
- if (lastIndex <= 9) {
498
- return concatWithPrevNext(generatePage(1, lastIndex));
499
- } else {
500
- const generateRangeItem = (selected, last) => {
501
- let listOfRange = [];
502
- const prevFiveItem = {
503
- type: "prev_5"
504
- };
505
- const nextFiveItem = {
506
- type: "next_5"
507
- };
508
- const firstPageItem = generatePage(1, 1);
509
- const lastPageItem = generatePage(lastIndex, lastIndex);
510
- if (selected < 5) {
511
- const maxLeft = selected === 4 ? 6 : 5;
512
- listOfRange = [...generatePage(2, maxLeft), nextFiveItem];
513
- } else if (selected < last - 3) {
514
- listOfRange = [prevFiveItem, ...generatePage(selected - 2, selected + 2), nextFiveItem];
515
- } else {
516
- const minRight = selected === last - 3 ? last - 5 : last - 4;
517
- listOfRange = [prevFiveItem, ...generatePage(minRight, last - 1)];
518
- }
519
- return [...firstPageItem, ...listOfRange, ...lastPageItem];
520
- };
521
- return concatWithPrevNext(generateRangeItem(pageIndex, lastIndex));
522
- }
523
- }
524
- ngOnChanges(changes) {
525
- const { pageIndex, pageSize, total } = changes;
526
- if (pageIndex || pageSize || total) {
527
- this.ranges = [(this.pageIndex - 1) * this.pageSize + 1, Math.min(this.pageIndex * this.pageSize, this.total)];
528
- this.buildIndexes();
529
- }
530
- }
531
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzPaginationDefaultComponent, deps: [], target: FactoryTarget.Component });
532
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzPaginationDefaultComponent, isStandalone: true, selector: "nz-pagination-default", inputs: { nzSize: "nzSize", itemRender: "itemRender", showTotal: "showTotal", disabled: "disabled", locale: "locale", showSizeChanger: "showSizeChanger", showQuickJumper: "showQuickJumper", total: "total", pageIndex: "pageIndex", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions" }, outputs: { pageIndexChange: "pageIndexChange", pageSizeChange: "pageSizeChange" }, host: { properties: { "class.ant-pagination-rtl": "dir === 'rtl'" } }, viewQueries: [{ propertyName: "template", first: true, predicate: ["containerTemplate"], descendants: true, static: true }], usesOnChanges: true, ngImport: core_exports, template: `
533
- <ng-template #containerTemplate>
534
- <ul>
535
- @if (showTotal) {
536
- <li class="ant-pagination-total-text">
537
- <ng-template
538
- [ngTemplateOutlet]="showTotal"
539
- [ngTemplateOutletContext]="{ $implicit: total, range: ranges }"
540
- />
541
- </li>
542
- }
543
-
544
- @for (page of listOfPageItem; track trackByPageItem($index, page)) {
545
- <li
546
- nz-pagination-item
547
- [locale]="locale"
548
- [type]="page.type"
549
- [index]="page.index"
550
- [disabled]="!!page.disabled"
551
- [itemRender]="itemRender"
552
- [active]="pageIndex === page.index"
553
- (gotoIndex)="jumpPage($event)"
554
- (diffIndex)="jumpDiff($event)"
555
- [direction]="dir"
556
- ></li>
557
- }
558
-
559
- @if (showQuickJumper || showSizeChanger) {
560
- <li
561
- nz-pagination-options
562
- [total]="total"
563
- [locale]="locale"
564
- [disabled]="disabled"
565
- [nzSize]="nzSize"
566
- [showSizeChanger]="showSizeChanger"
567
- [showQuickJumper]="showQuickJumper"
568
- [pageIndex]="pageIndex"
569
- [pageSize]="pageSize"
570
- [pageSizeOptions]="pageSizeOptions"
571
- (pageIndexChange)="onPageIndexChange($event)"
572
- (pageSizeChange)="onPageSizeChange($event)"
573
- ></li>
574
- }
575
- </ul>
576
- </ng-template>
577
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NzPaginationItemComponent, selector: "li[nz-pagination-item]", inputs: ["active", "locale", "index", "disabled", "direction", "type", "itemRender"], outputs: ["diffIndex", "gotoIndex"] }, { kind: "component", type: NzPaginationOptionsComponent, selector: "li[nz-pagination-options]", inputs: ["nzSize", "disabled", "showSizeChanger", "showQuickJumper", "locale", "total", "pageIndex", "pageSize", "pageSizeOptions"], outputs: ["pageIndexChange", "pageSizeChange"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
578
- };
579
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzPaginationDefaultComponent, decorators: [{
580
- type: Component,
581
- args: [{
582
- selector: "nz-pagination-default",
583
- encapsulation: ViewEncapsulation.None,
584
- changeDetection: ChangeDetectionStrategy.OnPush,
585
- template: `
586
- <ng-template #containerTemplate>
587
- <ul>
588
- @if (showTotal) {
589
- <li class="ant-pagination-total-text">
590
- <ng-template
591
- [ngTemplateOutlet]="showTotal"
592
- [ngTemplateOutletContext]="{ $implicit: total, range: ranges }"
593
- />
594
- </li>
595
- }
596
-
597
- @for (page of listOfPageItem; track trackByPageItem($index, page)) {
598
- <li
599
- nz-pagination-item
600
- [locale]="locale"
601
- [type]="page.type"
602
- [index]="page.index"
603
- [disabled]="!!page.disabled"
604
- [itemRender]="itemRender"
605
- [active]="pageIndex === page.index"
606
- (gotoIndex)="jumpPage($event)"
607
- (diffIndex)="jumpDiff($event)"
608
- [direction]="dir"
609
- ></li>
610
- }
611
-
612
- @if (showQuickJumper || showSizeChanger) {
613
- <li
614
- nz-pagination-options
615
- [total]="total"
616
- [locale]="locale"
617
- [disabled]="disabled"
618
- [nzSize]="nzSize"
619
- [showSizeChanger]="showSizeChanger"
620
- [showQuickJumper]="showQuickJumper"
621
- [pageIndex]="pageIndex"
622
- [pageSize]="pageSize"
623
- [pageSizeOptions]="pageSizeOptions"
624
- (pageIndexChange)="onPageIndexChange($event)"
625
- (pageSizeChange)="onPageSizeChange($event)"
626
- ></li>
627
- }
628
- </ul>
629
- </ng-template>
630
- `,
631
- imports: [NgTemplateOutlet, NzPaginationItemComponent, NzPaginationOptionsComponent],
632
- host: {
633
- "[class.ant-pagination-rtl]": "dir === 'rtl'"
634
- }
635
- }]
636
- }], ctorParameters: () => [], propDecorators: { template: [{
637
- type: ViewChild,
638
- args: ["containerTemplate", { static: true }]
639
- }], nzSize: [{
640
- type: Input
641
- }], itemRender: [{
642
- type: Input
643
- }], showTotal: [{
644
- type: Input
645
- }], disabled: [{
646
- type: Input
647
- }], locale: [{
648
- type: Input
649
- }], showSizeChanger: [{
650
- type: Input
651
- }], showQuickJumper: [{
652
- type: Input
653
- }], total: [{
654
- type: Input
655
- }], pageIndex: [{
656
- type: Input
657
- }], pageSize: [{
658
- type: Input
659
- }], pageSizeOptions: [{
660
- type: Input
661
- }], pageIndexChange: [{
662
- type: Output
663
- }], pageSizeChange: [{
664
- type: Output
665
- }] } });
666
- var NzPaginationSimpleComponent = class _NzPaginationSimpleComponent {
667
- cdr = inject(ChangeDetectorRef);
668
- directionality = inject(Directionality);
669
- destroyRef = inject(DestroyRef);
670
- template;
671
- itemRender = null;
672
- disabled = false;
673
- locale;
674
- total = 0;
675
- pageIndex = 1;
676
- pageSize = 10;
677
- pageIndexChange = new EventEmitter();
678
- lastIndex = 0;
679
- isFirstIndex = false;
680
- isLastIndex = false;
681
- dir = "ltr";
682
- constructor() {
683
- const el = inject(ElementRef).nativeElement;
684
- const renderer = inject(Renderer2);
685
- renderer.removeChild(renderer.parentNode(el), el);
686
- }
687
- ngOnInit() {
688
- this.directionality.change?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((direction) => {
689
- this.dir = direction;
690
- this.cdr.detectChanges();
691
- });
692
- this.dir = this.directionality.value;
693
- }
694
- jumpToPageViaInput($event) {
695
- const target = $event.target;
696
- const index = toNumber(target.value, this.pageIndex);
697
- this.onPageIndexChange(index);
698
- target.value = `${this.pageIndex}`;
699
- }
700
- prePage() {
701
- this.onPageIndexChange(this.pageIndex - 1);
702
- }
703
- nextPage() {
704
- this.onPageIndexChange(this.pageIndex + 1);
705
- }
706
- onPageIndexChange(index) {
707
- this.pageIndexChange.next(index);
708
- }
709
- updateBindingValue() {
710
- this.lastIndex = Math.ceil(this.total / this.pageSize);
711
- this.isFirstIndex = this.pageIndex === 1;
712
- this.isLastIndex = this.pageIndex === this.lastIndex;
713
- }
714
- ngOnChanges(changes) {
715
- const { pageIndex, total, pageSize } = changes;
716
- if (pageIndex || total || pageSize) {
717
- this.updateBindingValue();
718
- }
719
- }
720
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzPaginationSimpleComponent, deps: [], target: FactoryTarget.Component });
721
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: _NzPaginationSimpleComponent, isStandalone: true, selector: "nz-pagination-simple", inputs: { itemRender: "itemRender", disabled: "disabled", locale: "locale", total: "total", pageIndex: "pageIndex", pageSize: "pageSize" }, outputs: { pageIndexChange: "pageIndexChange" }, host: { properties: { "class.ant-pagination-rtl": "dir === 'rtl'" } }, viewQueries: [{ propertyName: "template", first: true, predicate: ["containerTemplate"], descendants: true, static: true }], usesOnChanges: true, ngImport: core_exports, template: `
722
- <ng-template #containerTemplate>
723
- <ul>
724
- <li
725
- nz-pagination-item
726
- [locale]="locale"
727
- [attr.title]="locale.prev_page"
728
- [disabled]="isFirstIndex"
729
- [direction]="dir"
730
- (click)="prePage()"
731
- type="prev"
732
- [itemRender]="itemRender"
733
- ></li>
734
- <li [attr.title]="pageIndex + '/' + lastIndex" class="ant-pagination-simple-pager">
735
- <input [disabled]="disabled" [value]="pageIndex" (keydown.enter)="jumpToPageViaInput($event)" size="3" />
736
- <span class="ant-pagination-slash">/</span>
737
- {{ lastIndex }}
738
- </li>
739
- <li
740
- nz-pagination-item
741
- [locale]="locale"
742
- [attr.title]="locale?.next_page"
743
- [disabled]="isLastIndex"
744
- [direction]="dir"
745
- (click)="nextPage()"
746
- type="next"
747
- [itemRender]="itemRender"
748
- ></li>
749
- </ul>
750
- </ng-template>
751
- `, isInline: true, dependencies: [{ kind: "component", type: NzPaginationItemComponent, selector: "li[nz-pagination-item]", inputs: ["active", "locale", "index", "disabled", "direction", "type", "itemRender"], outputs: ["diffIndex", "gotoIndex"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
752
- };
753
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzPaginationSimpleComponent, decorators: [{
754
- type: Component,
755
- args: [{
756
- selector: "nz-pagination-simple",
757
- encapsulation: ViewEncapsulation.None,
758
- changeDetection: ChangeDetectionStrategy.OnPush,
759
- template: `
760
- <ng-template #containerTemplate>
761
- <ul>
762
- <li
763
- nz-pagination-item
764
- [locale]="locale"
765
- [attr.title]="locale.prev_page"
766
- [disabled]="isFirstIndex"
767
- [direction]="dir"
768
- (click)="prePage()"
769
- type="prev"
770
- [itemRender]="itemRender"
771
- ></li>
772
- <li [attr.title]="pageIndex + '/' + lastIndex" class="ant-pagination-simple-pager">
773
- <input [disabled]="disabled" [value]="pageIndex" (keydown.enter)="jumpToPageViaInput($event)" size="3" />
774
- <span class="ant-pagination-slash">/</span>
775
- {{ lastIndex }}
776
- </li>
777
- <li
778
- nz-pagination-item
779
- [locale]="locale"
780
- [attr.title]="locale?.next_page"
781
- [disabled]="isLastIndex"
782
- [direction]="dir"
783
- (click)="nextPage()"
784
- type="next"
785
- [itemRender]="itemRender"
786
- ></li>
787
- </ul>
788
- </ng-template>
789
- `,
790
- imports: [NzPaginationItemComponent],
791
- host: {
792
- "[class.ant-pagination-rtl]": "dir === 'rtl'"
793
- }
794
- }]
795
- }], ctorParameters: () => [], propDecorators: { template: [{
796
- type: ViewChild,
797
- args: ["containerTemplate", { static: true }]
798
- }], itemRender: [{
799
- type: Input
800
- }], disabled: [{
801
- type: Input
802
- }], locale: [{
803
- type: Input
804
- }], total: [{
805
- type: Input
806
- }], pageIndex: [{
807
- type: Input
808
- }], pageSize: [{
809
- type: Input
810
- }], pageIndexChange: [{
811
- type: Output
812
- }] } });
813
- var NZ_CONFIG_MODULE_NAME = "pagination";
814
- var NzPaginationComponent = (() => {
815
- var _a;
816
- let _nzSize_decorators;
817
- let _nzSize_initializers = [];
818
- let _nzSize_extraInitializers = [];
819
- let _nzPageSizeOptions_decorators;
820
- let _nzPageSizeOptions_initializers = [];
821
- let _nzPageSizeOptions_extraInitializers = [];
822
- let _nzShowSizeChanger_decorators;
823
- let _nzShowSizeChanger_initializers = [];
824
- let _nzShowSizeChanger_extraInitializers = [];
825
- let _nzShowQuickJumper_decorators;
826
- let _nzShowQuickJumper_initializers = [];
827
- let _nzShowQuickJumper_extraInitializers = [];
828
- let _nzSimple_decorators;
829
- let _nzSimple_initializers = [];
830
- let _nzSimple_extraInitializers = [];
831
- return _a = class {
832
- _nzModuleName = NZ_CONFIG_MODULE_NAME;
833
- i18n = inject(NzI18nService);
834
- cdr = inject(ChangeDetectorRef);
835
- breakpointService = inject(NzBreakpointService);
836
- nzConfigService = inject(NzConfigService);
837
- directionality = inject(Directionality);
838
- destroyRef = inject(DestroyRef);
839
- nzPageSizeChange = new EventEmitter();
840
- nzPageIndexChange = new EventEmitter();
841
- nzShowTotal = null;
842
- nzItemRender = null;
843
- nzSize = __runInitializers(this, _nzSize_initializers, "default");
844
- nzPageSizeOptions = (__runInitializers(this, _nzSize_extraInitializers), __runInitializers(this, _nzPageSizeOptions_initializers, [10, 20, 30, 40]));
845
- nzShowSizeChanger = (__runInitializers(this, _nzPageSizeOptions_extraInitializers), __runInitializers(this, _nzShowSizeChanger_initializers, false));
846
- nzShowQuickJumper = (__runInitializers(this, _nzShowSizeChanger_extraInitializers), __runInitializers(this, _nzShowQuickJumper_initializers, false));
847
- nzSimple = (__runInitializers(this, _nzShowQuickJumper_extraInitializers), __runInitializers(this, _nzSimple_initializers, false));
848
- nzDisabled = (__runInitializers(this, _nzSimple_extraInitializers), false);
849
- nzResponsive = false;
850
- nzHideOnSinglePage = false;
851
- nzTotal = 0;
852
- nzPageIndex = 1;
853
- nzPageSize = 10;
854
- nzAlign = input("start", ...ngDevMode ? [{ debugName: "nzAlign" }] : []);
855
- showPagination = true;
856
- locale;
857
- size = "default";
858
- dir = "ltr";
859
- total$ = new ReplaySubject(1);
860
- validatePageIndex(value, lastIndex) {
861
- if (value > lastIndex) {
862
- return lastIndex;
863
- } else if (value < 1) {
864
- return 1;
865
- } else {
866
- return value;
867
- }
868
- }
869
- onPageIndexChange(index) {
870
- const lastIndex = this.getLastIndex(this.nzTotal, this.nzPageSize);
871
- const validIndex = this.validatePageIndex(index, lastIndex);
872
- if (validIndex !== this.nzPageIndex && !this.nzDisabled) {
873
- this.nzPageIndex = validIndex;
874
- this.nzPageIndexChange.emit(this.nzPageIndex);
875
- }
876
- }
877
- onPageSizeChange(size) {
878
- this.nzPageSize = size;
879
- this.nzPageSizeChange.emit(size);
880
- const lastIndex = this.getLastIndex(this.nzTotal, this.nzPageSize);
881
- if (this.nzPageIndex > lastIndex) {
882
- this.onPageIndexChange(lastIndex);
883
- }
884
- }
885
- onTotalChange(total) {
886
- const lastIndex = this.getLastIndex(total, this.nzPageSize);
887
- if (this.nzPageIndex > lastIndex) {
888
- Promise.resolve().then(() => {
889
- this.onPageIndexChange(lastIndex);
890
- this.cdr.markForCheck();
891
- });
892
- }
893
- }
894
- getLastIndex(total, pageSize) {
895
- return Math.ceil(total / pageSize);
896
- }
897
- ngOnInit() {
898
- this.i18n.localeChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
899
- this.locale = this.i18n.getLocaleData("Pagination");
900
- this.cdr.markForCheck();
901
- });
902
- this.total$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((total) => {
903
- this.onTotalChange(total);
904
- });
905
- this.breakpointService.subscribe(gridResponsiveMap).pipe(takeUntilDestroyed(this.destroyRef)).subscribe((bp) => {
906
- if (this.nzResponsive) {
907
- this.size = bp === NzBreakpointEnum.xs ? "small" : "default";
908
- this.cdr.markForCheck();
909
- }
910
- });
911
- this.directionality.change?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((direction) => {
912
- this.dir = direction;
913
- this.cdr.detectChanges();
914
- });
915
- this.dir = this.directionality.value;
916
- }
917
- ngOnChanges(changes) {
918
- const { nzHideOnSinglePage, nzTotal, nzPageSize, nzSize } = changes;
919
- if (nzTotal) {
920
- this.total$.next(this.nzTotal);
921
- }
922
- if (nzHideOnSinglePage || nzTotal || nzPageSize) {
923
- this.showPagination = this.nzHideOnSinglePage && this.nzTotal > this.nzPageSize || this.nzTotal > 0 && !this.nzHideOnSinglePage;
924
- }
925
- if (nzSize) {
926
- this.size = nzSize.currentValue;
927
- }
928
- }
929
- }, (() => {
930
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? /* @__PURE__ */ Object.create(null) : void 0;
931
- _nzSize_decorators = [WithConfig()];
932
- _nzPageSizeOptions_decorators = [WithConfig()];
933
- _nzShowSizeChanger_decorators = [WithConfig()];
934
- _nzShowQuickJumper_decorators = [WithConfig()];
935
- _nzSimple_decorators = [WithConfig()];
936
- __esDecorate(null, null, _nzSize_decorators, { kind: "field", name: "nzSize", static: false, private: false, access: { has: (obj) => "nzSize" in obj, get: (obj) => obj.nzSize, set: (obj, value) => {
937
- obj.nzSize = value;
938
- } }, metadata: _metadata }, _nzSize_initializers, _nzSize_extraInitializers);
939
- __esDecorate(null, null, _nzPageSizeOptions_decorators, { kind: "field", name: "nzPageSizeOptions", static: false, private: false, access: { has: (obj) => "nzPageSizeOptions" in obj, get: (obj) => obj.nzPageSizeOptions, set: (obj, value) => {
940
- obj.nzPageSizeOptions = value;
941
- } }, metadata: _metadata }, _nzPageSizeOptions_initializers, _nzPageSizeOptions_extraInitializers);
942
- __esDecorate(null, null, _nzShowSizeChanger_decorators, { kind: "field", name: "nzShowSizeChanger", static: false, private: false, access: { has: (obj) => "nzShowSizeChanger" in obj, get: (obj) => obj.nzShowSizeChanger, set: (obj, value) => {
943
- obj.nzShowSizeChanger = value;
944
- } }, metadata: _metadata }, _nzShowSizeChanger_initializers, _nzShowSizeChanger_extraInitializers);
945
- __esDecorate(null, null, _nzShowQuickJumper_decorators, { kind: "field", name: "nzShowQuickJumper", static: false, private: false, access: { has: (obj) => "nzShowQuickJumper" in obj, get: (obj) => obj.nzShowQuickJumper, set: (obj, value) => {
946
- obj.nzShowQuickJumper = value;
947
- } }, metadata: _metadata }, _nzShowQuickJumper_initializers, _nzShowQuickJumper_extraInitializers);
948
- __esDecorate(null, null, _nzSimple_decorators, { kind: "field", name: "nzSimple", static: false, private: false, access: { has: (obj) => "nzSimple" in obj, get: (obj) => obj.nzSimple, set: (obj, value) => {
949
- obj.nzSimple = value;
950
- } }, metadata: _metadata }, _nzSimple_initializers, _nzSimple_extraInitializers);
951
- if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
952
- })(), __publicField(_a, "\u0275fac", \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _a, deps: [], target: FactoryTarget.Component })), __publicField(_a, "\u0275cmp", \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _a, isStandalone: true, selector: "nz-pagination", inputs: { nzShowTotal: { classPropertyName: "nzShowTotal", publicName: "nzShowTotal", isSignal: false, isRequired: false, transformFunction: null }, nzItemRender: { classPropertyName: "nzItemRender", publicName: "nzItemRender", isSignal: false, isRequired: false, transformFunction: null }, nzSize: { classPropertyName: "nzSize", publicName: "nzSize", isSignal: false, isRequired: false, transformFunction: null }, nzPageSizeOptions: { classPropertyName: "nzPageSizeOptions", publicName: "nzPageSizeOptions", isSignal: false, isRequired: false, transformFunction: null }, nzShowSizeChanger: { classPropertyName: "nzShowSizeChanger", publicName: "nzShowSizeChanger", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, nzShowQuickJumper: { classPropertyName: "nzShowQuickJumper", publicName: "nzShowQuickJumper", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, nzSimple: { classPropertyName: "nzSimple", publicName: "nzSimple", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, nzDisabled: { classPropertyName: "nzDisabled", publicName: "nzDisabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, nzResponsive: { classPropertyName: "nzResponsive", publicName: "nzResponsive", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, nzHideOnSinglePage: { classPropertyName: "nzHideOnSinglePage", publicName: "nzHideOnSinglePage", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, nzTotal: { classPropertyName: "nzTotal", publicName: "nzTotal", isSignal: false, isRequired: false, transformFunction: numberAttribute }, nzPageIndex: { classPropertyName: "nzPageIndex", publicName: "nzPageIndex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, nzPageSize: { classPropertyName: "nzPageSize", publicName: "nzPageSize", isSignal: false, isRequired: false, transformFunction: numberAttribute }, nzAlign: { classPropertyName: "nzAlign", publicName: "nzAlign", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nzPageSizeChange: "nzPageSizeChange", nzPageIndexChange: "nzPageIndexChange" }, host: { properties: { "class.ant-pagination-simple": "nzSimple", "class.ant-pagination-disabled": "nzDisabled", "class.ant-pagination-mini": "!nzSimple && size === 'small'", "class.ant-pagination-rtl": "dir === 'rtl'", "class.ant-pagination-start": 'nzAlign() === "start"', "class.ant-pagination-center": 'nzAlign() === "center"', "class.ant-pagination-end": 'nzAlign() === "end"' }, classAttribute: "ant-pagination" }, exportAs: ["nzPagination"], usesOnChanges: true, ngImport: core_exports, template: `
953
- @if (showPagination) {
954
- @if (nzSimple) {
955
- <ng-template [ngTemplateOutlet]="simplePagination.template" />
956
- } @else {
957
- <ng-template [ngTemplateOutlet]="defaultPagination.template" />
958
- }
959
- }
960
-
961
- <nz-pagination-simple
962
- #simplePagination
963
- [disabled]="nzDisabled"
964
- [itemRender]="nzItemRender"
965
- [locale]="locale"
966
- [pageSize]="nzPageSize"
967
- [total]="nzTotal"
968
- [pageIndex]="nzPageIndex"
969
- (pageIndexChange)="onPageIndexChange($event)"
970
- />
971
- <nz-pagination-default
972
- #defaultPagination
973
- [nzSize]="size"
974
- [itemRender]="nzItemRender"
975
- [showTotal]="nzShowTotal"
976
- [disabled]="nzDisabled"
977
- [locale]="locale"
978
- [showSizeChanger]="nzShowSizeChanger"
979
- [showQuickJumper]="nzShowQuickJumper"
980
- [total]="nzTotal"
981
- [pageIndex]="nzPageIndex"
982
- [pageSize]="nzPageSize"
983
- [pageSizeOptions]="nzPageSizeOptions"
984
- (pageIndexChange)="onPageIndexChange($event)"
985
- (pageSizeChange)="onPageSizeChange($event)"
986
- />
987
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NzPaginationSimpleComponent, selector: "nz-pagination-simple", inputs: ["itemRender", "disabled", "locale", "total", "pageIndex", "pageSize"], outputs: ["pageIndexChange"] }, { kind: "component", type: NzPaginationDefaultComponent, selector: "nz-pagination-default", inputs: ["nzSize", "itemRender", "showTotal", "disabled", "locale", "showSizeChanger", "showQuickJumper", "total", "pageIndex", "pageSize", "pageSizeOptions"], outputs: ["pageIndexChange", "pageSizeChange"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None })), _a;
988
- })();
989
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzPaginationComponent, decorators: [{
990
- type: Component,
991
- args: [{
992
- selector: "nz-pagination",
993
- exportAs: "nzPagination",
994
- encapsulation: ViewEncapsulation.None,
995
- changeDetection: ChangeDetectionStrategy.OnPush,
996
- template: `
997
- @if (showPagination) {
998
- @if (nzSimple) {
999
- <ng-template [ngTemplateOutlet]="simplePagination.template" />
1000
- } @else {
1001
- <ng-template [ngTemplateOutlet]="defaultPagination.template" />
1002
- }
1003
- }
1004
-
1005
- <nz-pagination-simple
1006
- #simplePagination
1007
- [disabled]="nzDisabled"
1008
- [itemRender]="nzItemRender"
1009
- [locale]="locale"
1010
- [pageSize]="nzPageSize"
1011
- [total]="nzTotal"
1012
- [pageIndex]="nzPageIndex"
1013
- (pageIndexChange)="onPageIndexChange($event)"
1014
- />
1015
- <nz-pagination-default
1016
- #defaultPagination
1017
- [nzSize]="size"
1018
- [itemRender]="nzItemRender"
1019
- [showTotal]="nzShowTotal"
1020
- [disabled]="nzDisabled"
1021
- [locale]="locale"
1022
- [showSizeChanger]="nzShowSizeChanger"
1023
- [showQuickJumper]="nzShowQuickJumper"
1024
- [total]="nzTotal"
1025
- [pageIndex]="nzPageIndex"
1026
- [pageSize]="nzPageSize"
1027
- [pageSizeOptions]="nzPageSizeOptions"
1028
- (pageIndexChange)="onPageIndexChange($event)"
1029
- (pageSizeChange)="onPageSizeChange($event)"
1030
- />
1031
- `,
1032
- host: {
1033
- class: "ant-pagination",
1034
- "[class.ant-pagination-simple]": "nzSimple",
1035
- "[class.ant-pagination-disabled]": "nzDisabled",
1036
- "[class.ant-pagination-mini]": `!nzSimple && size === 'small'`,
1037
- "[class.ant-pagination-rtl]": `dir === 'rtl'`,
1038
- "[class.ant-pagination-start]": 'nzAlign() === "start"',
1039
- "[class.ant-pagination-center]": 'nzAlign() === "center"',
1040
- "[class.ant-pagination-end]": 'nzAlign() === "end"'
1041
- },
1042
- imports: [NgTemplateOutlet, NzPaginationSimpleComponent, NzPaginationDefaultComponent]
1043
- }]
1044
- }], propDecorators: { nzPageSizeChange: [{
1045
- type: Output
1046
- }], nzPageIndexChange: [{
1047
- type: Output
1048
- }], nzShowTotal: [{
1049
- type: Input
1050
- }], nzItemRender: [{
1051
- type: Input
1052
- }], nzSize: [{
1053
- type: Input
1054
- }], nzPageSizeOptions: [{
1055
- type: Input
1056
- }], nzShowSizeChanger: [{
1057
- type: Input,
1058
- args: [{ transform: booleanAttribute }]
1059
- }], nzShowQuickJumper: [{
1060
- type: Input,
1061
- args: [{ transform: booleanAttribute }]
1062
- }], nzSimple: [{
1063
- type: Input,
1064
- args: [{ transform: booleanAttribute }]
1065
- }], nzDisabled: [{
1066
- type: Input,
1067
- args: [{ transform: booleanAttribute }]
1068
- }], nzResponsive: [{
1069
- type: Input,
1070
- args: [{ transform: booleanAttribute }]
1071
- }], nzHideOnSinglePage: [{
1072
- type: Input,
1073
- args: [{ transform: booleanAttribute }]
1074
- }], nzTotal: [{
1075
- type: Input,
1076
- args: [{ transform: numberAttribute }]
1077
- }], nzPageIndex: [{
1078
- type: Input,
1079
- args: [{ transform: numberAttribute }]
1080
- }], nzPageSize: [{
1081
- type: Input,
1082
- args: [{ transform: numberAttribute }]
1083
- }] } });
1084
- var NzPaginationModule = class _NzPaginationModule {
1085
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzPaginationModule, deps: [], target: FactoryTarget.NgModule });
1086
- static \u0275mod = \u0275\u0275ngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: core_exports, type: _NzPaginationModule, imports: [
1087
- NzPaginationComponent,
1088
- NzPaginationSimpleComponent,
1089
- NzPaginationOptionsComponent,
1090
- NzPaginationItemComponent,
1091
- NzPaginationDefaultComponent
1092
- ], exports: [NzPaginationComponent] });
1093
- static \u0275inj = \u0275\u0275ngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzPaginationModule, imports: [
1094
- NzPaginationComponent,
1095
- NzPaginationSimpleComponent,
1096
- NzPaginationOptionsComponent,
1097
- NzPaginationItemComponent,
1098
- NzPaginationDefaultComponent
1099
- ] });
1100
- };
1101
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzPaginationModule, decorators: [{
1102
- type: NgModule,
1103
- args: [{
1104
- imports: [
1105
- NzPaginationComponent,
1106
- NzPaginationSimpleComponent,
1107
- NzPaginationOptionsComponent,
1108
- NzPaginationItemComponent,
1109
- NzPaginationDefaultComponent
1110
- ],
1111
- exports: [NzPaginationComponent]
1112
- }]
1113
- }] });
1114
-
1115
- // node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-table.mjs
1116
- var NZ_CONFIG_MODULE_NAME$2 = "filterTrigger";
1117
- var NzFilterTriggerComponent = (() => {
1118
- var _a;
1119
- let _nzBackdrop_decorators;
1120
- let _nzBackdrop_initializers = [];
1121
- let _nzBackdrop_extraInitializers = [];
1122
- return _a = class {
1123
- _nzModuleName = NZ_CONFIG_MODULE_NAME$2;
1124
- nzConfigService = inject(NzConfigService);
1125
- cdr = inject(ChangeDetectorRef);
1126
- destroyRef = inject(DestroyRef);
1127
- nzActive = false;
1128
- nzDropdownMenu;
1129
- nzVisible = false;
1130
- nzBackdrop = __runInitializers(this, _nzBackdrop_initializers, false);
1131
- nzVisibleChange = (__runInitializers(this, _nzBackdrop_extraInitializers), new EventEmitter());
1132
- nzDropdown;
1133
- onVisibleChange(visible) {
1134
- this.nzVisible = visible;
1135
- this.nzVisibleChange.next(visible);
1136
- }
1137
- hide() {
1138
- this.nzVisible = false;
1139
- this.cdr.markForCheck();
1140
- }
1141
- show() {
1142
- this.nzVisible = true;
1143
- this.cdr.markForCheck();
1144
- }
1145
- ngOnInit() {
1146
- fromEventOutsideAngular(this.nzDropdown.nativeElement, "click").pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => event.stopPropagation());
1147
- }
1148
- }, (() => {
1149
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? /* @__PURE__ */ Object.create(null) : void 0;
1150
- _nzBackdrop_decorators = [WithConfig()];
1151
- __esDecorate(null, null, _nzBackdrop_decorators, { kind: "field", name: "nzBackdrop", static: false, private: false, access: { has: (obj) => "nzBackdrop" in obj, get: (obj) => obj.nzBackdrop, set: (obj, value) => {
1152
- obj.nzBackdrop = value;
1153
- } }, metadata: _metadata }, _nzBackdrop_initializers, _nzBackdrop_extraInitializers);
1154
- if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1155
- })(), __publicField(_a, "\u0275fac", \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _a, deps: [], target: FactoryTarget.Component })), __publicField(_a, "\u0275cmp", \u0275\u0275ngDeclareComponent({ minVersion: "16.1.0", version: "20.3.0", type: _a, isStandalone: true, selector: "nz-filter-trigger", inputs: { nzActive: "nzActive", nzDropdownMenu: "nzDropdownMenu", nzVisible: "nzVisible", nzBackdrop: ["nzBackdrop", "nzBackdrop", booleanAttribute] }, outputs: { nzVisibleChange: "nzVisibleChange" }, viewQueries: [{ propertyName: "nzDropdown", first: true, predicate: NzDropDownDirective, descendants: true, read: ElementRef, static: true }], exportAs: ["nzFilterTrigger"], ngImport: core_exports, template: `
1156
- <span
1157
- nz-dropdown
1158
- class="ant-table-filter-trigger"
1159
- nzTrigger="click"
1160
- nzPlacement="bottomRight"
1161
- [nzBackdrop]="nzBackdrop"
1162
- [nzClickHide]="false"
1163
- [nzDropdownMenu]="nzDropdownMenu"
1164
- [class.active]="nzActive"
1165
- [class.ant-table-filter-open]="nzVisible"
1166
- [nzVisible]="nzVisible"
1167
- (nzVisibleChange)="onVisibleChange($event)"
1168
- >
1169
- <ng-content></ng-content>
1170
- </span>
1171
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzArrow", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None })), _a;
1172
- })();
1173
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzFilterTriggerComponent, decorators: [{
1174
- type: Component,
1175
- args: [{
1176
- selector: "nz-filter-trigger",
1177
- exportAs: `nzFilterTrigger`,
1178
- changeDetection: ChangeDetectionStrategy.OnPush,
1179
- encapsulation: ViewEncapsulation.None,
1180
- template: `
1181
- <span
1182
- nz-dropdown
1183
- class="ant-table-filter-trigger"
1184
- nzTrigger="click"
1185
- nzPlacement="bottomRight"
1186
- [nzBackdrop]="nzBackdrop"
1187
- [nzClickHide]="false"
1188
- [nzDropdownMenu]="nzDropdownMenu"
1189
- [class.active]="nzActive"
1190
- [class.ant-table-filter-open]="nzVisible"
1191
- [nzVisible]="nzVisible"
1192
- (nzVisibleChange)="onVisibleChange($event)"
1193
- >
1194
- <ng-content></ng-content>
1195
- </span>
1196
- `,
1197
- imports: [NzDropDownModule]
1198
- }]
1199
- }], propDecorators: { nzActive: [{
1200
- type: Input
1201
- }], nzDropdownMenu: [{
1202
- type: Input
1203
- }], nzVisible: [{
1204
- type: Input
1205
- }], nzBackdrop: [{
1206
- type: Input,
1207
- args: [{ transform: booleanAttribute }]
1208
- }], nzVisibleChange: [{
1209
- type: Output
1210
- }], nzDropdown: [{
1211
- type: ViewChild,
1212
- args: [NzDropDownDirective, { static: true, read: ElementRef }]
1213
- }] } });
1214
- var NzTableFilterComponent = class _NzTableFilterComponent {
1215
- cdr = inject(ChangeDetectorRef);
1216
- i18n = inject(NzI18nService);
1217
- destroyRef = inject(DestroyRef);
1218
- contentTemplate = null;
1219
- customFilter = false;
1220
- extraTemplate = null;
1221
- filterMultiple = true;
1222
- listOfFilter = [];
1223
- filterChange = new EventEmitter();
1224
- locale;
1225
- isChecked = false;
1226
- isVisible = false;
1227
- listOfParsedFilter = [];
1228
- listOfChecked = [];
1229
- check(filter2) {
1230
- if (this.filterMultiple) {
1231
- this.listOfParsedFilter = this.listOfParsedFilter.map((item) => {
1232
- if (item === filter2) {
1233
- return __spreadProps(__spreadValues({}, item), { checked: !filter2.checked });
1234
- } else {
1235
- return item;
1236
- }
1237
- });
1238
- filter2.checked = !filter2.checked;
1239
- } else {
1240
- this.listOfParsedFilter = this.listOfParsedFilter.map((item) => __spreadProps(__spreadValues({}, item), { checked: item === filter2 }));
1241
- }
1242
- this.isChecked = this.getCheckedStatus(this.listOfParsedFilter);
1243
- }
1244
- confirm() {
1245
- this.isVisible = false;
1246
- this.emitFilterData();
1247
- }
1248
- reset() {
1249
- this.isVisible = false;
1250
- this.listOfParsedFilter = this.parseListOfFilter(this.listOfFilter, true);
1251
- this.isChecked = this.getCheckedStatus(this.listOfParsedFilter);
1252
- this.emitFilterData();
1253
- }
1254
- onVisibleChange(value) {
1255
- this.isVisible = value;
1256
- if (!value) {
1257
- this.emitFilterData();
1258
- } else {
1259
- this.listOfChecked = this.listOfParsedFilter.filter((item) => item.checked).map((item) => item.value);
1260
- }
1261
- }
1262
- emitFilterData() {
1263
- const listOfChecked = this.listOfParsedFilter.filter((item) => item.checked).map((item) => item.value);
1264
- if (!arraysEqual(this.listOfChecked, listOfChecked)) {
1265
- if (this.filterMultiple) {
1266
- this.filterChange.emit(listOfChecked);
1267
- } else {
1268
- this.filterChange.emit(listOfChecked.length > 0 ? listOfChecked[0] : null);
1269
- }
1270
- }
1271
- }
1272
- parseListOfFilter(listOfFilter, reset) {
1273
- return listOfFilter.map((item) => {
1274
- const checked = reset ? false : !!item.byDefault;
1275
- return { text: item.text, value: item.value, checked };
1276
- });
1277
- }
1278
- getCheckedStatus(listOfParsedFilter) {
1279
- return listOfParsedFilter.some((item) => item.checked);
1280
- }
1281
- ngOnInit() {
1282
- this.i18n.localeChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
1283
- this.locale = this.i18n.getLocaleData("Table");
1284
- this.cdr.markForCheck();
1285
- });
1286
- }
1287
- ngOnChanges(changes) {
1288
- const { listOfFilter } = changes;
1289
- if (listOfFilter && this.listOfFilter && this.listOfFilter.length) {
1290
- this.listOfParsedFilter = this.parseListOfFilter(this.listOfFilter);
1291
- this.isChecked = this.getCheckedStatus(this.listOfParsedFilter);
1292
- }
1293
- }
1294
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableFilterComponent, deps: [], target: FactoryTarget.Component });
1295
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzTableFilterComponent, isStandalone: true, selector: "nz-table-filter", inputs: { contentTemplate: "contentTemplate", customFilter: "customFilter", extraTemplate: "extraTemplate", filterMultiple: "filterMultiple", listOfFilter: "listOfFilter" }, outputs: { filterChange: "filterChange" }, host: { classAttribute: "ant-table-filter-column" }, usesOnChanges: true, ngImport: core_exports, template: `
1296
- <span class="ant-table-column-title">
1297
- <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
1298
- </span>
1299
- @if (!customFilter) {
1300
- <nz-filter-trigger
1301
- [nzVisible]="isVisible"
1302
- [nzActive]="isChecked"
1303
- [nzDropdownMenu]="filterMenu"
1304
- (nzVisibleChange)="onVisibleChange($event)"
1305
- >
1306
- <nz-icon nzType="filter" nzTheme="fill" />
1307
- </nz-filter-trigger>
1308
- <nz-dropdown-menu #filterMenu="nzDropdownMenu">
1309
- <div class="ant-table-filter-dropdown">
1310
- <ul nz-menu>
1311
- @for (f of listOfParsedFilter; track f.value) {
1312
- <li nz-menu-item [nzSelected]="f.checked" (click)="check(f)">
1313
- @if (!filterMultiple) {
1314
- <label nz-radio [ngModel]="f.checked" (ngModelChange)="check(f)"></label>
1315
- } @else {
1316
- <label nz-checkbox [ngModel]="f.checked" (ngModelChange)="check(f)"></label>
1317
- }
1318
- <span>{{ f.text }}</span>
1319
- </li>
1320
- }
1321
- </ul>
1322
- <div class="ant-table-filter-dropdown-btns">
1323
- <button nz-button nzType="link" nzSize="small" (click)="reset()" [disabled]="!isChecked">
1324
- {{ locale.filterReset }}
1325
- </button>
1326
- <button nz-button nzType="primary" nzSize="small" (click)="confirm()">{{ locale.filterConfirm }}</button>
1327
- </div>
1328
- </div>
1329
- </nz-dropdown-menu>
1330
- } @else {
1331
- <ng-container [ngTemplateOutlet]="extraTemplate"></ng-container>
1332
- }
1333
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NzFilterTriggerComponent, selector: "nz-filter-trigger", inputs: ["nzActive", "nzDropdownMenu", "nzVisible", "nzBackdrop"], outputs: ["nzVisibleChange"], exportAs: ["nzFilterTrigger"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "component", type: NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "component", type: NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus", "nz-radio-button"], exportAs: ["nzRadio"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: NzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: NzWaveDirective, selector: '[nz-wave],button[nz-button]:not([nzType="link"]):not([nzType="text"])', inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
1334
- };
1335
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTableFilterComponent, decorators: [{
1336
- type: Component,
1337
- args: [{
1338
- selector: "nz-table-filter",
1339
- changeDetection: ChangeDetectionStrategy.OnPush,
1340
- encapsulation: ViewEncapsulation.None,
1341
- template: `
1342
- <span class="ant-table-column-title">
1343
- <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
1344
- </span>
1345
- @if (!customFilter) {
1346
- <nz-filter-trigger
1347
- [nzVisible]="isVisible"
1348
- [nzActive]="isChecked"
1349
- [nzDropdownMenu]="filterMenu"
1350
- (nzVisibleChange)="onVisibleChange($event)"
1351
- >
1352
- <nz-icon nzType="filter" nzTheme="fill" />
1353
- </nz-filter-trigger>
1354
- <nz-dropdown-menu #filterMenu="nzDropdownMenu">
1355
- <div class="ant-table-filter-dropdown">
1356
- <ul nz-menu>
1357
- @for (f of listOfParsedFilter; track f.value) {
1358
- <li nz-menu-item [nzSelected]="f.checked" (click)="check(f)">
1359
- @if (!filterMultiple) {
1360
- <label nz-radio [ngModel]="f.checked" (ngModelChange)="check(f)"></label>
1361
- } @else {
1362
- <label nz-checkbox [ngModel]="f.checked" (ngModelChange)="check(f)"></label>
1363
- }
1364
- <span>{{ f.text }}</span>
1365
- </li>
1366
- }
1367
- </ul>
1368
- <div class="ant-table-filter-dropdown-btns">
1369
- <button nz-button nzType="link" nzSize="small" (click)="reset()" [disabled]="!isChecked">
1370
- {{ locale.filterReset }}
1371
- </button>
1372
- <button nz-button nzType="primary" nzSize="small" (click)="confirm()">{{ locale.filterConfirm }}</button>
1373
- </div>
1374
- </div>
1375
- </nz-dropdown-menu>
1376
- } @else {
1377
- <ng-container [ngTemplateOutlet]="extraTemplate"></ng-container>
1378
- }
1379
- `,
1380
- host: { class: "ant-table-filter-column" },
1381
- imports: [
1382
- NgTemplateOutlet,
1383
- NzFilterTriggerComponent,
1384
- NzIconModule,
1385
- NzDropDownModule,
1386
- NzRadioComponent,
1387
- NzCheckboxModule,
1388
- FormsModule,
1389
- NzButtonModule
1390
- ]
1391
- }]
1392
- }], propDecorators: { contentTemplate: [{
1393
- type: Input
1394
- }], customFilter: [{
1395
- type: Input
1396
- }], extraTemplate: [{
1397
- type: Input
1398
- }], filterMultiple: [{
1399
- type: Input
1400
- }], listOfFilter: [{
1401
- type: Input
1402
- }], filterChange: [{
1403
- type: Output
1404
- }] } });
1405
- var NzRowExpandButtonDirective = class _NzRowExpandButtonDirective {
1406
- expand = false;
1407
- spaceMode = false;
1408
- expandChange = new EventEmitter();
1409
- onHostClick() {
1410
- if (!this.spaceMode) {
1411
- this.expand = !this.expand;
1412
- this.expandChange.next(this.expand);
1413
- }
1414
- }
1415
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzRowExpandButtonDirective, deps: [], target: FactoryTarget.Directive });
1416
- static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzRowExpandButtonDirective, isStandalone: true, selector: "button[nz-row-expand-button]", inputs: { expand: "expand", spaceMode: "spaceMode" }, outputs: { expandChange: "expandChange" }, host: { listeners: { "click": "onHostClick()" }, properties: { "type": "'button'", "class.ant-table-row-expand-icon-expanded": "!spaceMode && expand === true", "class.ant-table-row-expand-icon-collapsed": "!spaceMode && expand === false", "class.ant-table-row-expand-icon-spaced": "spaceMode" }, classAttribute: "ant-table-row-expand-icon" }, ngImport: core_exports });
1417
- };
1418
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzRowExpandButtonDirective, decorators: [{
1419
- type: Directive,
1420
- args: [{
1421
- selector: "button[nz-row-expand-button]",
1422
- host: {
1423
- class: "ant-table-row-expand-icon",
1424
- "[type]": `'button'`,
1425
- "[class.ant-table-row-expand-icon-expanded]": `!spaceMode && expand === true`,
1426
- "[class.ant-table-row-expand-icon-collapsed]": `!spaceMode && expand === false`,
1427
- "[class.ant-table-row-expand-icon-spaced]": "spaceMode",
1428
- "(click)": "onHostClick()"
1429
- }
1430
- }]
1431
- }], propDecorators: { expand: [{
1432
- type: Input
1433
- }], spaceMode: [{
1434
- type: Input
1435
- }], expandChange: [{
1436
- type: Output
1437
- }] } });
1438
- var NzRowIndentDirective = class _NzRowIndentDirective {
1439
- indentSize = 0;
1440
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzRowIndentDirective, deps: [], target: FactoryTarget.Directive });
1441
- static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzRowIndentDirective, isStandalone: true, selector: "nz-row-indent", inputs: { indentSize: "indentSize" }, host: { properties: { "style.padding-left.px": "indentSize" }, classAttribute: "ant-table-row-indent" }, ngImport: core_exports });
1442
- };
1443
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzRowIndentDirective, decorators: [{
1444
- type: Directive,
1445
- args: [{
1446
- selector: "nz-row-indent",
1447
- host: {
1448
- class: "ant-table-row-indent",
1449
- "[style.padding-left.px]": "indentSize"
1450
- }
1451
- }]
1452
- }], propDecorators: { indentSize: [{
1453
- type: Input
1454
- }] } });
1455
- var NzTableSelectionComponent = class _NzTableSelectionComponent {
1456
- listOfSelections = [];
1457
- checked = false;
1458
- disabled = false;
1459
- indeterminate = false;
1460
- label = null;
1461
- showCheckbox = false;
1462
- showRowSelection = false;
1463
- checkedChange = new EventEmitter();
1464
- onCheckedChange(checked) {
1465
- this.checked = checked;
1466
- this.checkedChange.emit(checked);
1467
- }
1468
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableSelectionComponent, deps: [], target: FactoryTarget.Component });
1469
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzTableSelectionComponent, isStandalone: true, selector: "nz-table-selection", inputs: { listOfSelections: "listOfSelections", checked: "checked", disabled: "disabled", indeterminate: "indeterminate", label: "label", showCheckbox: "showCheckbox", showRowSelection: "showRowSelection" }, outputs: { checkedChange: "checkedChange" }, host: { classAttribute: "ant-table-selection" }, ngImport: core_exports, template: `
1470
- @if (showCheckbox) {
1471
- <label
1472
- nz-checkbox
1473
- [class.ant-table-selection-select-all-custom]="showRowSelection"
1474
- [ngModel]="checked"
1475
- [nzDisabled]="disabled"
1476
- [nzIndeterminate]="indeterminate"
1477
- [attr.aria-label]="label"
1478
- (ngModelChange)="onCheckedChange($event)"
1479
- ></label>
1480
- }
1481
- @if (showRowSelection) {
1482
- <div class="ant-table-selection-extra">
1483
- <span nz-dropdown class="ant-table-selection-down" nzPlacement="bottomLeft" [nzDropdownMenu]="selectionMenu">
1484
- <nz-icon nzType="down" />
1485
- </span>
1486
- <nz-dropdown-menu #selectionMenu="nzDropdownMenu">
1487
- <ul nz-menu class="ant-table-selection-menu">
1488
- @for (selection of listOfSelections; track selection) {
1489
- <li nz-menu-item (click)="selection.onSelect()">
1490
- {{ selection.text }}
1491
- </li>
1492
- }
1493
- </ul>
1494
- </nz-dropdown-menu>
1495
- </div>
1496
- }
1497
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzArrow", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
1498
- };
1499
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTableSelectionComponent, decorators: [{
1500
- type: Component,
1501
- args: [{
1502
- selector: "nz-table-selection",
1503
- changeDetection: ChangeDetectionStrategy.OnPush,
1504
- encapsulation: ViewEncapsulation.None,
1505
- template: `
1506
- @if (showCheckbox) {
1507
- <label
1508
- nz-checkbox
1509
- [class.ant-table-selection-select-all-custom]="showRowSelection"
1510
- [ngModel]="checked"
1511
- [nzDisabled]="disabled"
1512
- [nzIndeterminate]="indeterminate"
1513
- [attr.aria-label]="label"
1514
- (ngModelChange)="onCheckedChange($event)"
1515
- ></label>
1516
- }
1517
- @if (showRowSelection) {
1518
- <div class="ant-table-selection-extra">
1519
- <span nz-dropdown class="ant-table-selection-down" nzPlacement="bottomLeft" [nzDropdownMenu]="selectionMenu">
1520
- <nz-icon nzType="down" />
1521
- </span>
1522
- <nz-dropdown-menu #selectionMenu="nzDropdownMenu">
1523
- <ul nz-menu class="ant-table-selection-menu">
1524
- @for (selection of listOfSelections; track selection) {
1525
- <li nz-menu-item (click)="selection.onSelect()">
1526
- {{ selection.text }}
1527
- </li>
1528
- }
1529
- </ul>
1530
- </nz-dropdown-menu>
1531
- </div>
1532
- }
1533
- `,
1534
- host: { class: "ant-table-selection" },
1535
- imports: [FormsModule, NzCheckboxModule, NzDropDownModule, NzIconModule]
1536
- }]
1537
- }], propDecorators: { listOfSelections: [{
1538
- type: Input
1539
- }], checked: [{
1540
- type: Input
1541
- }], disabled: [{
1542
- type: Input
1543
- }], indeterminate: [{
1544
- type: Input
1545
- }], label: [{
1546
- type: Input
1547
- }], showCheckbox: [{
1548
- type: Input
1549
- }], showRowSelection: [{
1550
- type: Input
1551
- }], checkedChange: [{
1552
- type: Output
1553
- }] } });
1554
- var NzTableSortersComponent = class _NzTableSortersComponent {
1555
- sortDirections = ["ascend", "descend", null];
1556
- sortOrder = null;
1557
- contentTemplate = null;
1558
- isUp = false;
1559
- isDown = false;
1560
- ngOnChanges(changes) {
1561
- const { sortDirections } = changes;
1562
- if (sortDirections) {
1563
- this.isUp = this.sortDirections.indexOf("ascend") !== -1;
1564
- this.isDown = this.sortDirections.indexOf("descend") !== -1;
1565
- }
1566
- }
1567
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableSortersComponent, deps: [], target: FactoryTarget.Component });
1568
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzTableSortersComponent, isStandalone: true, selector: "nz-table-sorters", inputs: { sortDirections: "sortDirections", sortOrder: "sortOrder", contentTemplate: "contentTemplate" }, host: { classAttribute: "ant-table-column-sorters" }, usesOnChanges: true, ngImport: core_exports, template: `
1569
- <span class="ant-table-column-title"><ng-template [ngTemplateOutlet]="contentTemplate"></ng-template></span>
1570
- <span class="ant-table-column-sorter" [class.ant-table-column-sorter-full]="isDown && isUp">
1571
- <span class="ant-table-column-sorter-inner">
1572
- @if (isUp) {
1573
- <nz-icon nzType="caret-up" class="ant-table-column-sorter-up" [class.active]="sortOrder === 'ascend'" />
1574
- }
1575
- @if (isDown) {
1576
- <nz-icon nzType="caret-down" class="ant-table-column-sorter-down" [class.active]="sortOrder === 'descend'" />
1577
- }
1578
- </span>
1579
- </span>
1580
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
1581
- };
1582
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTableSortersComponent, decorators: [{
1583
- type: Component,
1584
- args: [{
1585
- selector: "nz-table-sorters",
1586
- changeDetection: ChangeDetectionStrategy.OnPush,
1587
- encapsulation: ViewEncapsulation.None,
1588
- template: `
1589
- <span class="ant-table-column-title"><ng-template [ngTemplateOutlet]="contentTemplate"></ng-template></span>
1590
- <span class="ant-table-column-sorter" [class.ant-table-column-sorter-full]="isDown && isUp">
1591
- <span class="ant-table-column-sorter-inner">
1592
- @if (isUp) {
1593
- <nz-icon nzType="caret-up" class="ant-table-column-sorter-up" [class.active]="sortOrder === 'ascend'" />
1594
- }
1595
- @if (isDown) {
1596
- <nz-icon nzType="caret-down" class="ant-table-column-sorter-down" [class.active]="sortOrder === 'descend'" />
1597
- }
1598
- </span>
1599
- </span>
1600
- `,
1601
- host: {
1602
- class: "ant-table-column-sorters"
1603
- },
1604
- imports: [NzIconModule, NgTemplateOutlet]
1605
- }]
1606
- }], propDecorators: { sortDirections: [{
1607
- type: Input
1608
- }], sortOrder: [{
1609
- type: Input
1610
- }], contentTemplate: [{
1611
- type: Input
1612
- }] } });
1613
- var NzCellFixedDirective = class _NzCellFixedDirective {
1614
- renderer = inject(Renderer2);
1615
- el = inject(ElementRef).nativeElement;
1616
- nzRight = false;
1617
- nzLeft = false;
1618
- colspan = null;
1619
- colSpan = null;
1620
- changes$ = new Subject();
1621
- isAutoLeft = false;
1622
- isAutoRight = false;
1623
- isFixedLeft = false;
1624
- isFixedRight = false;
1625
- isFixed = false;
1626
- setAutoLeftWidth(autoLeft) {
1627
- this.renderer.setStyle(this.el, "left", autoLeft);
1628
- }
1629
- setAutoRightWidth(autoRight) {
1630
- this.renderer.setStyle(this.el, "right", autoRight);
1631
- }
1632
- setIsFirstRight(isFirstRight) {
1633
- this.setFixClass(isFirstRight, "ant-table-cell-fix-right-first");
1634
- }
1635
- setIsLastLeft(isLastLeft) {
1636
- this.setFixClass(isLastLeft, "ant-table-cell-fix-left-last");
1637
- }
1638
- setFixClass(flag, className) {
1639
- this.renderer.removeClass(this.el, className);
1640
- if (flag) {
1641
- this.renderer.addClass(this.el, className);
1642
- }
1643
- }
1644
- ngOnChanges() {
1645
- this.setIsFirstRight(false);
1646
- this.setIsLastLeft(false);
1647
- this.isAutoLeft = this.nzLeft === "" || this.nzLeft === true;
1648
- this.isAutoRight = this.nzRight === "" || this.nzRight === true;
1649
- this.isFixedLeft = this.nzLeft !== false;
1650
- this.isFixedRight = this.nzRight !== false;
1651
- this.isFixed = this.isFixedLeft || this.isFixedRight;
1652
- const validatePx = (value) => {
1653
- if (typeof value === "string" && value !== "") {
1654
- return value;
1655
- } else {
1656
- return null;
1657
- }
1658
- };
1659
- this.setAutoLeftWidth(validatePx(this.nzLeft));
1660
- this.setAutoRightWidth(validatePx(this.nzRight));
1661
- this.changes$.next();
1662
- }
1663
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzCellFixedDirective, deps: [], target: FactoryTarget.Directive });
1664
- static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzCellFixedDirective, isStandalone: true, selector: "td[nzRight],th[nzRight],td[nzLeft],th[nzLeft]", inputs: { nzRight: "nzRight", nzLeft: "nzLeft", colspan: "colspan", colSpan: "colSpan" }, host: { properties: { "class.ant-table-cell-fix-right": "isFixedRight", "class.ant-table-cell-fix-left": "isFixedLeft", "style.position": "isFixed? 'sticky' : null" } }, usesOnChanges: true, ngImport: core_exports });
1665
- };
1666
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzCellFixedDirective, decorators: [{
1667
- type: Directive,
1668
- args: [{
1669
- selector: "td[nzRight],th[nzRight],td[nzLeft],th[nzLeft]",
1670
- host: {
1671
- "[class.ant-table-cell-fix-right]": `isFixedRight`,
1672
- "[class.ant-table-cell-fix-left]": `isFixedLeft`,
1673
- "[style.position]": `isFixed? 'sticky' : null`
1674
- }
1675
- }]
1676
- }], propDecorators: { nzRight: [{
1677
- type: Input
1678
- }], nzLeft: [{
1679
- type: Input
1680
- }], colspan: [{
1681
- type: Input
1682
- }], colSpan: [{
1683
- type: Input
1684
- }] } });
1685
- var NzTableStyleService = class _NzTableStyleService {
1686
- theadTemplate$ = new ReplaySubject(1);
1687
- tfootTemplate$ = new ReplaySubject(1);
1688
- tfootFixed$ = new ReplaySubject(1);
1689
- hasFixLeft$ = new ReplaySubject(1);
1690
- hasFixRight$ = new ReplaySubject(1);
1691
- hostWidth$ = new ReplaySubject(1);
1692
- columnCount$ = new ReplaySubject(1);
1693
- showEmpty$ = new ReplaySubject(1);
1694
- noResult$ = new ReplaySubject(1);
1695
- listOfThWidthConfigPx$ = new BehaviorSubject([]);
1696
- tableWidthConfigPx$ = new BehaviorSubject([]);
1697
- manualWidthConfigPx$ = combineLatest([this.tableWidthConfigPx$, this.listOfThWidthConfigPx$]).pipe(map(([widthConfig, listOfWidth]) => widthConfig.length ? widthConfig : listOfWidth));
1698
- listOfAutoWidthPx$ = new ReplaySubject(1);
1699
- listOfListOfThWidthPx$ = merge(
1700
- /** init with manual width **/
1701
- this.manualWidthConfigPx$,
1702
- combineLatest([this.listOfAutoWidthPx$, this.manualWidthConfigPx$]).pipe(map(([autoWidth, manualWidth]) => {
1703
- if (autoWidth.length === manualWidth.length) {
1704
- return autoWidth.map((width, index) => {
1705
- if (width === "0px") {
1706
- return manualWidth[index] || null;
1707
- } else {
1708
- return manualWidth[index] || width;
1709
- }
1710
- });
1711
- } else {
1712
- return manualWidth;
1713
- }
1714
- }))
1715
- );
1716
- listOfMeasureColumn$ = new ReplaySubject(1);
1717
- listOfListOfThWidth$ = this.listOfAutoWidthPx$.pipe(map((list) => list.map((width) => parseInt(width, 10))));
1718
- enableAutoMeasure$ = new ReplaySubject(1);
1719
- setTheadTemplate(template) {
1720
- this.theadTemplate$.next(template);
1721
- }
1722
- setTfootTemplate(template) {
1723
- this.tfootTemplate$.next(template);
1724
- }
1725
- setTfootFixed(fixed) {
1726
- this.tfootFixed$.next(fixed);
1727
- }
1728
- setHasFixLeft(hasFixLeft) {
1729
- this.hasFixLeft$.next(hasFixLeft);
1730
- }
1731
- setHasFixRight(hasFixRight) {
1732
- this.hasFixRight$.next(hasFixRight);
1733
- }
1734
- setTableWidthConfig(widthConfig) {
1735
- this.tableWidthConfigPx$.next(widthConfig);
1736
- }
1737
- setListOfTh(listOfTh) {
1738
- let columnCount = 0;
1739
- listOfTh.forEach((th) => {
1740
- columnCount += th.colspan && +th.colspan || th.colSpan && +th.colSpan || 1;
1741
- });
1742
- const listOfThPx = listOfTh.map((item) => item.nzWidth);
1743
- this.columnCount$.next(columnCount);
1744
- this.listOfThWidthConfigPx$.next(listOfThPx);
1745
- }
1746
- setListOfMeasureColumn(listOfTh) {
1747
- const listOfKeys = [];
1748
- listOfTh.forEach((th) => {
1749
- const length = th.colspan && +th.colspan || th.colSpan && +th.colSpan || 1;
1750
- for (let i = 0; i < length; i++) {
1751
- listOfKeys.push(`measure_key_${i}`);
1752
- }
1753
- });
1754
- this.listOfMeasureColumn$.next(listOfKeys);
1755
- }
1756
- setListOfAutoWidth(listOfAutoWidth) {
1757
- this.listOfAutoWidthPx$.next(listOfAutoWidth.map((width) => `${width}px`));
1758
- }
1759
- setShowEmpty(showEmpty) {
1760
- this.showEmpty$.next(showEmpty);
1761
- }
1762
- setNoResult(noResult) {
1763
- this.noResult$.next(noResult);
1764
- }
1765
- setScroll(scrollX, scrollY) {
1766
- const enableAutoMeasure = !!(scrollX || scrollY);
1767
- if (!enableAutoMeasure) {
1768
- this.setListOfAutoWidth([]);
1769
- }
1770
- this.enableAutoMeasure$.next(enableAutoMeasure);
1771
- }
1772
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableStyleService, deps: [], target: FactoryTarget.Injectable });
1773
- static \u0275prov = \u0275\u0275ngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableStyleService });
1774
- };
1775
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTableStyleService, decorators: [{
1776
- type: Injectable
1777
- }] });
1778
- var NzTableCellDirective = class _NzTableCellDirective {
1779
- isInsideTable = !!inject(NzTableStyleService, { optional: true });
1780
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableCellDirective, deps: [], target: FactoryTarget.Directive });
1781
- static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzTableCellDirective, isStandalone: true, selector: "th:not(.nz-disable-th), td:not(.nz-disable-td)", host: { properties: { "class.ant-table-cell": "isInsideTable" } }, ngImport: core_exports });
1782
- };
1783
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTableCellDirective, decorators: [{
1784
- type: Directive,
1785
- args: [{
1786
- selector: "th:not(.nz-disable-th), td:not(.nz-disable-td)",
1787
- host: {
1788
- "[class.ant-table-cell]": "isInsideTable"
1789
- }
1790
- }]
1791
- }] });
1792
- var NzTableDataService = class _NzTableDataService {
1793
- destroyRef = inject(DestroyRef);
1794
- pageIndex$ = new BehaviorSubject(1);
1795
- frontPagination$ = new BehaviorSubject(true);
1796
- pageSize$ = new BehaviorSubject(10);
1797
- listOfData$ = new BehaviorSubject([]);
1798
- listOfCustomColumn$ = new BehaviorSubject([]);
1799
- pageIndexDistinct$ = this.pageIndex$.pipe(distinctUntilChanged());
1800
- pageSizeDistinct$ = this.pageSize$.pipe(distinctUntilChanged());
1801
- listOfCalcOperator$ = new BehaviorSubject([]);
1802
- queryParams$ = combineLatest([
1803
- this.pageIndexDistinct$,
1804
- this.pageSizeDistinct$,
1805
- this.listOfCalcOperator$
1806
- ]).pipe(debounceTime(0), skip(1), map(([pageIndex, pageSize, listOfCalc]) => ({
1807
- pageIndex,
1808
- pageSize,
1809
- sort: listOfCalc.filter((item) => item.sortFn).map((item) => ({
1810
- key: item.key,
1811
- value: item.sortOrder
1812
- })),
1813
- filter: listOfCalc.filter((item) => item.filterFn).map((item) => ({
1814
- key: item.key,
1815
- value: item.filterValue
1816
- }))
1817
- })));
1818
- listOfDataAfterCalc$ = combineLatest([this.listOfData$, this.listOfCalcOperator$]).pipe(map(([listOfData, listOfCalcOperator]) => {
1819
- let listOfDataAfterCalc = [...listOfData];
1820
- const listOfFilterOperator = listOfCalcOperator.filter((item) => {
1821
- const { filterValue, filterFn } = item;
1822
- const isReset = filterValue === null || filterValue === void 0 || Array.isArray(filterValue) && filterValue.length === 0;
1823
- return !isReset && typeof filterFn === "function";
1824
- });
1825
- for (const item of listOfFilterOperator) {
1826
- const { filterFn, filterValue } = item;
1827
- listOfDataAfterCalc = listOfDataAfterCalc.filter((data) => filterFn(filterValue, data));
1828
- }
1829
- const listOfSortOperator = listOfCalcOperator.filter((item) => item.sortOrder !== null && typeof item.sortFn === "function").sort((a, b) => +b.sortPriority - +a.sortPriority);
1830
- if (listOfCalcOperator.length) {
1831
- listOfDataAfterCalc.sort((record1, record2) => {
1832
- for (const item of listOfSortOperator) {
1833
- const { sortFn, sortOrder } = item;
1834
- if (sortFn && sortOrder) {
1835
- const compareResult = sortFn(record1, record2, sortOrder);
1836
- if (compareResult !== 0) {
1837
- return sortOrder === "ascend" ? compareResult : -compareResult;
1838
- }
1839
- }
1840
- }
1841
- return 0;
1842
- });
1843
- }
1844
- return listOfDataAfterCalc;
1845
- }));
1846
- listOfFrontEndCurrentPageData$ = combineLatest([
1847
- this.pageIndexDistinct$,
1848
- this.pageSizeDistinct$,
1849
- this.listOfDataAfterCalc$
1850
- ]).pipe(takeUntilDestroyed(this.destroyRef), filter((value) => {
1851
- const [pageIndex, pageSize, listOfData] = value;
1852
- const maxPageIndex = Math.ceil(listOfData.length / pageSize) || 1;
1853
- return pageIndex <= maxPageIndex;
1854
- }), map(([pageIndex, pageSize, listOfData]) => listOfData.slice((pageIndex - 1) * pageSize, pageIndex * pageSize)));
1855
- listOfCurrentPageData$ = this.frontPagination$.pipe(switchMap((pagination) => pagination ? this.listOfFrontEndCurrentPageData$ : this.listOfDataAfterCalc$));
1856
- total$ = this.frontPagination$.pipe(switchMap((pagination) => pagination ? this.listOfDataAfterCalc$ : this.listOfData$), map((list) => list.length), distinctUntilChanged());
1857
- updatePageSize(size) {
1858
- this.pageSize$.next(size);
1859
- }
1860
- updateFrontPagination(pagination) {
1861
- this.frontPagination$.next(pagination);
1862
- }
1863
- updatePageIndex(index) {
1864
- this.pageIndex$.next(index);
1865
- }
1866
- updateListOfData(list) {
1867
- this.listOfData$.next(list);
1868
- }
1869
- updateListOfCustomColumn(list) {
1870
- this.listOfCustomColumn$.next(list);
1871
- }
1872
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableDataService, deps: [], target: FactoryTarget.Injectable });
1873
- static \u0275prov = \u0275\u0275ngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableDataService });
1874
- };
1875
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTableDataService, decorators: [{
1876
- type: Injectable
1877
- }] });
1878
- var NzCustomColumnDirective = class _NzCustomColumnDirective {
1879
- el = inject(ElementRef).nativeElement;
1880
- renderer = inject(Renderer2);
1881
- nzTableDataService = inject(NzTableDataService);
1882
- destroyRef = inject(DestroyRef);
1883
- nzCellControl = null;
1884
- ngOnInit() {
1885
- this.nzTableDataService.listOfCustomColumn$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((item) => {
1886
- item.forEach((v, i) => {
1887
- if (v.value === this.nzCellControl) {
1888
- this.renderer.setStyle(this.el, "display", v.default ? "block" : "none");
1889
- this.renderer.setStyle(this.el, "order", i);
1890
- this.renderer.setStyle(this.el, "flex", v.fixWidth ? `1 0 ${v.width}px` : `1 1 ${v.width}px`);
1891
- }
1892
- });
1893
- });
1894
- }
1895
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzCustomColumnDirective, deps: [], target: FactoryTarget.Directive });
1896
- static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzCustomColumnDirective, isStandalone: true, selector: "td[nzCellControl],th[nzCellControl]", inputs: { nzCellControl: "nzCellControl" }, ngImport: core_exports });
1897
- };
1898
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzCustomColumnDirective, decorators: [{
1899
- type: Directive,
1900
- args: [{
1901
- selector: "td[nzCellControl],th[nzCellControl]"
1902
- }]
1903
- }], propDecorators: { nzCellControl: [{
1904
- type: Input
1905
- }] } });
1906
- var NzTdAddOnComponent = class _NzTdAddOnComponent {
1907
- nzChecked = false;
1908
- nzDisabled = false;
1909
- nzIndeterminate = false;
1910
- nzLabel = null;
1911
- nzIndentSize = 0;
1912
- nzShowExpand = false;
1913
- nzShowCheckbox = false;
1914
- nzExpand = false;
1915
- nzExpandIcon = null;
1916
- nzCheckedChange = new EventEmitter();
1917
- nzExpandChange = new EventEmitter();
1918
- isNzShowExpandChanged = false;
1919
- isNzShowCheckboxChanged = false;
1920
- onCheckedChange(checked) {
1921
- this.nzChecked = checked;
1922
- this.nzCheckedChange.emit(checked);
1923
- }
1924
- onExpandChange(expand) {
1925
- this.nzExpand = expand;
1926
- this.nzExpandChange.emit(expand);
1927
- }
1928
- ngOnChanges(changes) {
1929
- const isFirstChange = (value) => value && value.firstChange && value.currentValue !== void 0;
1930
- const { nzExpand, nzChecked, nzShowExpand, nzShowCheckbox } = changes;
1931
- if (nzShowExpand) {
1932
- this.isNzShowExpandChanged = true;
1933
- }
1934
- if (nzShowCheckbox) {
1935
- this.isNzShowCheckboxChanged = true;
1936
- }
1937
- if (isFirstChange(nzExpand) && !this.isNzShowExpandChanged) {
1938
- this.nzShowExpand = true;
1939
- }
1940
- if (isFirstChange(nzChecked) && !this.isNzShowCheckboxChanged) {
1941
- this.nzShowCheckbox = true;
1942
- }
1943
- }
1944
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTdAddOnComponent, deps: [], target: FactoryTarget.Component });
1945
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzTdAddOnComponent, isStandalone: true, selector: "td[nzChecked], td[nzDisabled], td[nzIndeterminate], td[nzIndentSize], td[nzExpand], td[nzShowExpand], td[nzShowCheckbox]", inputs: { nzChecked: "nzChecked", nzDisabled: "nzDisabled", nzIndeterminate: "nzIndeterminate", nzLabel: "nzLabel", nzIndentSize: "nzIndentSize", nzShowExpand: ["nzShowExpand", "nzShowExpand", booleanAttribute], nzShowCheckbox: ["nzShowCheckbox", "nzShowCheckbox", booleanAttribute], nzExpand: ["nzExpand", "nzExpand", booleanAttribute], nzExpandIcon: "nzExpandIcon" }, outputs: { nzCheckedChange: "nzCheckedChange", nzExpandChange: "nzExpandChange" }, host: { properties: { "class.ant-table-cell-with-append": "nzShowExpand || nzIndentSize > 0", "class.ant-table-selection-column": "nzShowCheckbox" } }, usesOnChanges: true, ngImport: core_exports, template: `
1946
- @if (nzShowExpand || nzIndentSize > 0) {
1947
- <nz-row-indent [indentSize]="nzIndentSize"></nz-row-indent>
1948
- @if (nzExpandIcon) {
1949
- <ng-template [ngTemplateOutlet]="nzExpandIcon"></ng-template>
1950
- } @else {
1951
- <button
1952
- nz-row-expand-button
1953
- [expand]="nzExpand"
1954
- (expandChange)="onExpandChange($event)"
1955
- [spaceMode]="!nzShowExpand"
1956
- ></button>
1957
- }
1958
- }
1959
- @if (nzShowCheckbox) {
1960
- <label
1961
- nz-checkbox
1962
- [nzDisabled]="nzDisabled"
1963
- [ngModel]="nzChecked"
1964
- [nzIndeterminate]="nzIndeterminate"
1965
- [attr.aria-label]="nzLabel"
1966
- (ngModelChange)="onCheckedChange($event)"
1967
- ></label>
1968
- }
1969
- <ng-content></ng-content>
1970
- `, isInline: true, dependencies: [{ kind: "directive", type: NzRowIndentDirective, selector: "nz-row-indent", inputs: ["indentSize"] }, { kind: "directive", type: NzRowExpandButtonDirective, selector: "button[nz-row-expand-button]", inputs: ["expand", "spaceMode"], outputs: ["expandChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
1971
- };
1972
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTdAddOnComponent, decorators: [{
1973
- type: Component,
1974
- args: [{
1975
- selector: "td[nzChecked], td[nzDisabled], td[nzIndeterminate], td[nzIndentSize], td[nzExpand], td[nzShowExpand], td[nzShowCheckbox]",
1976
- changeDetection: ChangeDetectionStrategy.OnPush,
1977
- encapsulation: ViewEncapsulation.None,
1978
- template: `
1979
- @if (nzShowExpand || nzIndentSize > 0) {
1980
- <nz-row-indent [indentSize]="nzIndentSize"></nz-row-indent>
1981
- @if (nzExpandIcon) {
1982
- <ng-template [ngTemplateOutlet]="nzExpandIcon"></ng-template>
1983
- } @else {
1984
- <button
1985
- nz-row-expand-button
1986
- [expand]="nzExpand"
1987
- (expandChange)="onExpandChange($event)"
1988
- [spaceMode]="!nzShowExpand"
1989
- ></button>
1990
- }
1991
- }
1992
- @if (nzShowCheckbox) {
1993
- <label
1994
- nz-checkbox
1995
- [nzDisabled]="nzDisabled"
1996
- [ngModel]="nzChecked"
1997
- [nzIndeterminate]="nzIndeterminate"
1998
- [attr.aria-label]="nzLabel"
1999
- (ngModelChange)="onCheckedChange($event)"
2000
- ></label>
2001
- }
2002
- <ng-content></ng-content>
2003
- `,
2004
- host: {
2005
- "[class.ant-table-cell-with-append]": `nzShowExpand || nzIndentSize > 0`,
2006
- "[class.ant-table-selection-column]": `nzShowCheckbox`
2007
- },
2008
- imports: [NzRowIndentDirective, NzRowExpandButtonDirective, NgTemplateOutlet, NzCheckboxModule, FormsModule]
2009
- }]
2010
- }], propDecorators: { nzChecked: [{
2011
- type: Input
2012
- }], nzDisabled: [{
2013
- type: Input
2014
- }], nzIndeterminate: [{
2015
- type: Input
2016
- }], nzLabel: [{
2017
- type: Input
2018
- }], nzIndentSize: [{
2019
- type: Input
2020
- }], nzShowExpand: [{
2021
- type: Input,
2022
- args: [{ transform: booleanAttribute }]
2023
- }], nzShowCheckbox: [{
2024
- type: Input,
2025
- args: [{ transform: booleanAttribute }]
2026
- }], nzExpand: [{
2027
- type: Input,
2028
- args: [{ transform: booleanAttribute }]
2029
- }], nzExpandIcon: [{
2030
- type: Input
2031
- }], nzCheckedChange: [{
2032
- type: Output
2033
- }], nzExpandChange: [{
2034
- type: Output
2035
- }] } });
2036
- var NZ_CONFIG_MODULE_NAME$1 = "table";
2037
- var NzThAddOnComponent = (() => {
2038
- var _a;
2039
- let _nzSortDirections_decorators;
2040
- let _nzSortDirections_initializers = [];
2041
- let _nzSortDirections_extraInitializers = [];
2042
- return _a = class {
2043
- _nzModuleName = NZ_CONFIG_MODULE_NAME$1;
2044
- nzConfigService = inject(NzConfigService);
2045
- el = inject(ElementRef).nativeElement;
2046
- destroyRef = inject(DestroyRef);
2047
- cdr = inject(ChangeDetectorRef);
2048
- ngZone = inject(NgZone);
2049
- manualClickOrder$ = new Subject();
2050
- calcOperatorChange$ = new Subject();
2051
- nzFilterValue = null;
2052
- sortOrder = null;
2053
- sortDirections = ["ascend", "descend", null];
2054
- sortOrderChange$ = new Subject();
2055
- isNzShowSortChanged = false;
2056
- isNzShowFilterChanged = false;
2057
- nzColumnKey;
2058
- nzFilterMultiple = true;
2059
- nzSortOrder = null;
2060
- nzSortPriority = false;
2061
- nzSortDirections = __runInitializers(this, _nzSortDirections_initializers, ["ascend", "descend", null]);
2062
- nzFilters = (__runInitializers(this, _nzSortDirections_extraInitializers), []);
2063
- nzSortFn = null;
2064
- nzFilterFn = null;
2065
- nzShowSort = false;
2066
- nzShowFilter = false;
2067
- nzCustomFilter = false;
2068
- nzCheckedChange = new EventEmitter();
2069
- nzSortOrderChange = new EventEmitter();
2070
- nzFilterChange = new EventEmitter();
2071
- getNextSortDirection(sortDirections, current) {
2072
- const index = sortDirections.indexOf(current);
2073
- if (index === sortDirections.length - 1) {
2074
- return sortDirections[0];
2075
- } else {
2076
- return sortDirections[index + 1];
2077
- }
2078
- }
2079
- setSortOrder(order) {
2080
- this.sortOrderChange$.next(order);
2081
- }
2082
- clearSortOrder() {
2083
- if (this.sortOrder !== null) {
2084
- this.setSortOrder(null);
2085
- }
2086
- }
2087
- onFilterValueChange(value) {
2088
- this.nzFilterChange.emit(value);
2089
- this.nzFilterValue = value;
2090
- this.updateCalcOperator();
2091
- }
2092
- updateCalcOperator() {
2093
- this.calcOperatorChange$.next();
2094
- }
2095
- ngOnInit() {
2096
- fromEventOutsideAngular(this.el, "click").pipe(filter(() => this.nzShowSort), takeUntilDestroyed(this.destroyRef)).subscribe(() => {
2097
- const nextOrder = this.getNextSortDirection(this.sortDirections, this.sortOrder);
2098
- this.ngZone.run(() => {
2099
- this.setSortOrder(nextOrder);
2100
- this.manualClickOrder$.next(this);
2101
- });
2102
- });
2103
- this.sortOrderChange$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((order) => {
2104
- if (this.sortOrder !== order) {
2105
- this.sortOrder = order;
2106
- this.nzSortOrderChange.emit(order);
2107
- }
2108
- this.updateCalcOperator();
2109
- this.cdr.markForCheck();
2110
- });
2111
- }
2112
- ngOnChanges(changes) {
2113
- const { nzSortDirections, nzFilters, nzSortOrder, nzSortFn, nzFilterFn, nzSortPriority, nzFilterMultiple, nzShowSort, nzShowFilter } = changes;
2114
- if (nzSortDirections) {
2115
- if (this.nzSortDirections && this.nzSortDirections.length) {
2116
- this.sortDirections = this.nzSortDirections;
2117
- }
2118
- }
2119
- if (nzSortOrder) {
2120
- this.sortOrder = this.nzSortOrder;
2121
- this.setSortOrder(this.nzSortOrder);
2122
- }
2123
- if (nzShowSort) {
2124
- this.isNzShowSortChanged = true;
2125
- }
2126
- if (nzShowFilter) {
2127
- this.isNzShowFilterChanged = true;
2128
- }
2129
- const isFirstChange = (value) => value && value.firstChange && value.currentValue !== void 0;
2130
- if ((isFirstChange(nzSortOrder) || isFirstChange(nzSortFn)) && !this.isNzShowSortChanged) {
2131
- this.nzShowSort = true;
2132
- }
2133
- if (isFirstChange(nzFilters) && !this.isNzShowFilterChanged) {
2134
- this.nzShowFilter = true;
2135
- }
2136
- if ((nzFilters || nzFilterMultiple) && this.nzShowFilter) {
2137
- const listOfValue = this.nzFilters.filter((item) => item.byDefault).map((item) => item.value);
2138
- this.nzFilterValue = this.nzFilterMultiple ? listOfValue : listOfValue[0] || null;
2139
- }
2140
- if (nzSortFn || nzFilterFn || nzSortPriority || nzFilters) {
2141
- this.updateCalcOperator();
2142
- }
2143
- }
2144
- }, (() => {
2145
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? /* @__PURE__ */ Object.create(null) : void 0;
2146
- _nzSortDirections_decorators = [WithConfig()];
2147
- __esDecorate(null, null, _nzSortDirections_decorators, { kind: "field", name: "nzSortDirections", static: false, private: false, access: { has: (obj) => "nzSortDirections" in obj, get: (obj) => obj.nzSortDirections, set: (obj, value) => {
2148
- obj.nzSortDirections = value;
2149
- } }, metadata: _metadata }, _nzSortDirections_initializers, _nzSortDirections_extraInitializers);
2150
- if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
2151
- })(), __publicField(_a, "\u0275fac", \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _a, deps: [], target: FactoryTarget.Component })), __publicField(_a, "\u0275cmp", \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _a, isStandalone: true, selector: "th[nzColumnKey], th[nzSortFn], th[nzSortOrder], th[nzFilters], th[nzShowSort], th[nzShowFilter], th[nzCustomFilter]", inputs: { nzColumnKey: "nzColumnKey", nzFilterMultiple: "nzFilterMultiple", nzSortOrder: "nzSortOrder", nzSortPriority: "nzSortPriority", nzSortDirections: "nzSortDirections", nzFilters: "nzFilters", nzSortFn: "nzSortFn", nzFilterFn: "nzFilterFn", nzShowSort: ["nzShowSort", "nzShowSort", booleanAttribute], nzShowFilter: ["nzShowFilter", "nzShowFilter", booleanAttribute], nzCustomFilter: ["nzCustomFilter", "nzCustomFilter", booleanAttribute] }, outputs: { nzCheckedChange: "nzCheckedChange", nzSortOrderChange: "nzSortOrderChange", nzFilterChange: "nzFilterChange" }, host: { properties: { "class.ant-table-column-has-sorters": "nzShowSort", "class.ant-table-column-sort": "sortOrder === 'descend' || sortOrder === 'ascend'" } }, usesOnChanges: true, ngImport: core_exports, template: `
2152
- @if (nzShowFilter || nzCustomFilter) {
2153
- <nz-table-filter
2154
- [contentTemplate]="notFilterTemplate"
2155
- [extraTemplate]="extraTemplate"
2156
- [customFilter]="nzCustomFilter"
2157
- [filterMultiple]="nzFilterMultiple"
2158
- [listOfFilter]="nzFilters"
2159
- (filterChange)="onFilterValueChange($event)"
2160
- ></nz-table-filter>
2161
- } @else {
2162
- <ng-container [ngTemplateOutlet]="notFilterTemplate"></ng-container>
2163
- }
2164
- <ng-template #notFilterTemplate>
2165
- <ng-template [ngTemplateOutlet]="nzShowSort ? sortTemplate : contentTemplate"></ng-template>
2166
- </ng-template>
2167
- <ng-template #extraTemplate>
2168
- <ng-content select="[nz-th-extra]"></ng-content>
2169
- <ng-content select="nz-filter-trigger"></ng-content>
2170
- </ng-template>
2171
- <ng-template #sortTemplate>
2172
- <nz-table-sorters
2173
- [sortOrder]="sortOrder"
2174
- [sortDirections]="sortDirections"
2175
- [contentTemplate]="contentTemplate"
2176
- ></nz-table-sorters>
2177
- </ng-template>
2178
- <ng-template #contentTemplate>
2179
- <ng-content></ng-content>
2180
- </ng-template>
2181
- `, isInline: true, dependencies: [{ kind: "component", type: NzTableFilterComponent, selector: "nz-table-filter", inputs: ["contentTemplate", "customFilter", "extraTemplate", "filterMultiple", "listOfFilter"], outputs: ["filterChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NzTableSortersComponent, selector: "nz-table-sorters", inputs: ["sortDirections", "sortOrder", "contentTemplate"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None })), _a;
2182
- })();
2183
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzThAddOnComponent, decorators: [{
2184
- type: Component,
2185
- args: [{
2186
- selector: "th[nzColumnKey], th[nzSortFn], th[nzSortOrder], th[nzFilters], th[nzShowSort], th[nzShowFilter], th[nzCustomFilter]",
2187
- encapsulation: ViewEncapsulation.None,
2188
- changeDetection: ChangeDetectionStrategy.OnPush,
2189
- template: `
2190
- @if (nzShowFilter || nzCustomFilter) {
2191
- <nz-table-filter
2192
- [contentTemplate]="notFilterTemplate"
2193
- [extraTemplate]="extraTemplate"
2194
- [customFilter]="nzCustomFilter"
2195
- [filterMultiple]="nzFilterMultiple"
2196
- [listOfFilter]="nzFilters"
2197
- (filterChange)="onFilterValueChange($event)"
2198
- ></nz-table-filter>
2199
- } @else {
2200
- <ng-container [ngTemplateOutlet]="notFilterTemplate"></ng-container>
2201
- }
2202
- <ng-template #notFilterTemplate>
2203
- <ng-template [ngTemplateOutlet]="nzShowSort ? sortTemplate : contentTemplate"></ng-template>
2204
- </ng-template>
2205
- <ng-template #extraTemplate>
2206
- <ng-content select="[nz-th-extra]"></ng-content>
2207
- <ng-content select="nz-filter-trigger"></ng-content>
2208
- </ng-template>
2209
- <ng-template #sortTemplate>
2210
- <nz-table-sorters
2211
- [sortOrder]="sortOrder"
2212
- [sortDirections]="sortDirections"
2213
- [contentTemplate]="contentTemplate"
2214
- ></nz-table-sorters>
2215
- </ng-template>
2216
- <ng-template #contentTemplate>
2217
- <ng-content></ng-content>
2218
- </ng-template>
2219
- `,
2220
- host: {
2221
- "[class.ant-table-column-has-sorters]": "nzShowSort",
2222
- "[class.ant-table-column-sort]": `sortOrder === 'descend' || sortOrder === 'ascend'`
2223
- },
2224
- imports: [NzTableFilterComponent, NgTemplateOutlet, NzTableSortersComponent]
2225
- }]
2226
- }], propDecorators: { nzColumnKey: [{
2227
- type: Input
2228
- }], nzFilterMultiple: [{
2229
- type: Input
2230
- }], nzSortOrder: [{
2231
- type: Input
2232
- }], nzSortPriority: [{
2233
- type: Input
2234
- }], nzSortDirections: [{
2235
- type: Input
2236
- }], nzFilters: [{
2237
- type: Input
2238
- }], nzSortFn: [{
2239
- type: Input
2240
- }], nzFilterFn: [{
2241
- type: Input
2242
- }], nzShowSort: [{
2243
- type: Input,
2244
- args: [{ transform: booleanAttribute }]
2245
- }], nzShowFilter: [{
2246
- type: Input,
2247
- args: [{ transform: booleanAttribute }]
2248
- }], nzCustomFilter: [{
2249
- type: Input,
2250
- args: [{ transform: booleanAttribute }]
2251
- }], nzCheckedChange: [{
2252
- type: Output
2253
- }], nzSortOrderChange: [{
2254
- type: Output
2255
- }], nzFilterChange: [{
2256
- type: Output
2257
- }] } });
2258
- var NzThMeasureDirective = class _NzThMeasureDirective {
2259
- renderer = inject(Renderer2);
2260
- el = inject(ElementRef).nativeElement;
2261
- changes$ = new Subject();
2262
- nzWidth = null;
2263
- colspan = null;
2264
- colSpan = null;
2265
- rowspan = null;
2266
- rowSpan = null;
2267
- ngOnChanges(changes) {
2268
- const { nzWidth, colspan, rowspan, colSpan, rowSpan } = changes;
2269
- if (colspan || colSpan) {
2270
- const col = this.colspan || this.colSpan;
2271
- if (!isNil(col)) {
2272
- this.renderer.setAttribute(this.el, "colspan", `${col}`);
2273
- } else {
2274
- this.renderer.removeAttribute(this.el, "colspan");
2275
- }
2276
- }
2277
- if (rowspan || rowSpan) {
2278
- const row = this.rowspan || this.rowSpan;
2279
- if (!isNil(row)) {
2280
- this.renderer.setAttribute(this.el, "rowspan", `${row}`);
2281
- } else {
2282
- this.renderer.removeAttribute(this.el, "rowspan");
2283
- }
2284
- }
2285
- if (nzWidth || colspan) {
2286
- this.changes$.next();
2287
- }
2288
- }
2289
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzThMeasureDirective, deps: [], target: FactoryTarget.Directive });
2290
- static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzThMeasureDirective, isStandalone: true, selector: "th", inputs: { nzWidth: "nzWidth", colspan: "colspan", colSpan: "colSpan", rowspan: "rowspan", rowSpan: "rowSpan" }, usesOnChanges: true, ngImport: core_exports });
2291
- };
2292
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzThMeasureDirective, decorators: [{
2293
- type: Directive,
2294
- args: [{
2295
- selector: "th"
2296
- }]
2297
- }], propDecorators: { nzWidth: [{
2298
- type: Input
2299
- }], colspan: [{
2300
- type: Input
2301
- }], colSpan: [{
2302
- type: Input
2303
- }], rowspan: [{
2304
- type: Input
2305
- }], rowSpan: [{
2306
- type: Input
2307
- }] } });
2308
- var NzThSelectionComponent = class _NzThSelectionComponent {
2309
- nzSelections = [];
2310
- nzChecked = false;
2311
- nzDisabled = false;
2312
- nzIndeterminate = false;
2313
- nzLabel = null;
2314
- nzShowCheckbox = false;
2315
- nzShowRowSelection = false;
2316
- nzCheckedChange = new EventEmitter();
2317
- isNzShowExpandChanged = false;
2318
- isNzShowCheckboxChanged = false;
2319
- onCheckedChange(checked) {
2320
- this.nzChecked = checked;
2321
- this.nzCheckedChange.emit(checked);
2322
- }
2323
- ngOnChanges(changes) {
2324
- const isFirstChange = (value) => value && value.firstChange && value.currentValue !== void 0;
2325
- const { nzChecked, nzSelections, nzShowExpand, nzShowCheckbox } = changes;
2326
- if (nzShowExpand) {
2327
- this.isNzShowExpandChanged = true;
2328
- }
2329
- if (nzShowCheckbox) {
2330
- this.isNzShowCheckboxChanged = true;
2331
- }
2332
- if (isFirstChange(nzSelections) && !this.isNzShowExpandChanged) {
2333
- this.nzShowRowSelection = true;
2334
- }
2335
- if (isFirstChange(nzChecked) && !this.isNzShowCheckboxChanged) {
2336
- this.nzShowCheckbox = true;
2337
- }
2338
- }
2339
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzThSelectionComponent, deps: [], target: FactoryTarget.Component });
2340
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "16.1.0", version: "20.3.0", type: _NzThSelectionComponent, isStandalone: true, selector: "th[nzSelections],th[nzChecked],th[nzShowCheckbox],th[nzShowRowSelection]", inputs: { nzSelections: "nzSelections", nzChecked: ["nzChecked", "nzChecked", booleanAttribute], nzDisabled: ["nzDisabled", "nzDisabled", booleanAttribute], nzIndeterminate: "nzIndeterminate", nzLabel: "nzLabel", nzShowCheckbox: ["nzShowCheckbox", "nzShowCheckbox", booleanAttribute], nzShowRowSelection: ["nzShowRowSelection", "nzShowRowSelection", booleanAttribute] }, outputs: { nzCheckedChange: "nzCheckedChange" }, host: { classAttribute: "ant-table-selection-column" }, usesOnChanges: true, ngImport: core_exports, template: `
2341
- <nz-table-selection
2342
- [checked]="nzChecked"
2343
- [disabled]="nzDisabled"
2344
- [indeterminate]="nzIndeterminate"
2345
- [label]="nzLabel"
2346
- [listOfSelections]="nzSelections"
2347
- [showCheckbox]="nzShowCheckbox"
2348
- [showRowSelection]="nzShowRowSelection"
2349
- (checkedChange)="onCheckedChange($event)"
2350
- ></nz-table-selection>
2351
- <ng-content></ng-content>
2352
- `, isInline: true, dependencies: [{ kind: "component", type: NzTableSelectionComponent, selector: "nz-table-selection", inputs: ["listOfSelections", "checked", "disabled", "indeterminate", "label", "showCheckbox", "showRowSelection"], outputs: ["checkedChange"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
2353
- };
2354
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzThSelectionComponent, decorators: [{
2355
- type: Component,
2356
- args: [{
2357
- selector: "th[nzSelections],th[nzChecked],th[nzShowCheckbox],th[nzShowRowSelection]",
2358
- encapsulation: ViewEncapsulation.None,
2359
- changeDetection: ChangeDetectionStrategy.OnPush,
2360
- template: `
2361
- <nz-table-selection
2362
- [checked]="nzChecked"
2363
- [disabled]="nzDisabled"
2364
- [indeterminate]="nzIndeterminate"
2365
- [label]="nzLabel"
2366
- [listOfSelections]="nzSelections"
2367
- [showCheckbox]="nzShowCheckbox"
2368
- [showRowSelection]="nzShowRowSelection"
2369
- (checkedChange)="onCheckedChange($event)"
2370
- ></nz-table-selection>
2371
- <ng-content></ng-content>
2372
- `,
2373
- host: { class: "ant-table-selection-column" },
2374
- imports: [NzTableSelectionComponent]
2375
- }]
2376
- }], propDecorators: { nzSelections: [{
2377
- type: Input
2378
- }], nzChecked: [{
2379
- type: Input,
2380
- args: [{ transform: booleanAttribute }]
2381
- }], nzDisabled: [{
2382
- type: Input,
2383
- args: [{ transform: booleanAttribute }]
2384
- }], nzIndeterminate: [{
2385
- type: Input
2386
- }], nzLabel: [{
2387
- type: Input
2388
- }], nzShowCheckbox: [{
2389
- type: Input,
2390
- args: [{ transform: booleanAttribute }]
2391
- }], nzShowRowSelection: [{
2392
- type: Input,
2393
- args: [{ transform: booleanAttribute }]
2394
- }], nzCheckedChange: [{
2395
- type: Output
2396
- }] } });
2397
- var NzCellAlignDirective = class _NzCellAlignDirective {
2398
- nzAlign = null;
2399
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzCellAlignDirective, deps: [], target: FactoryTarget.Directive });
2400
- static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzCellAlignDirective, isStandalone: true, selector: "th[nzAlign],td[nzAlign]", inputs: { nzAlign: "nzAlign" }, host: { properties: { "style.text-align": "nzAlign" } }, ngImport: core_exports });
2401
- };
2402
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzCellAlignDirective, decorators: [{
2403
- type: Directive,
2404
- args: [{
2405
- selector: "th[nzAlign],td[nzAlign]",
2406
- host: {
2407
- "[style.text-align]": "nzAlign"
2408
- }
2409
- }]
2410
- }], propDecorators: { nzAlign: [{
2411
- type: Input
2412
- }] } });
2413
- var NzCellEllipsisDirective = class _NzCellEllipsisDirective {
2414
- nzEllipsis = true;
2415
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzCellEllipsisDirective, deps: [], target: FactoryTarget.Directive });
2416
- static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "16.1.0", version: "20.3.0", type: _NzCellEllipsisDirective, isStandalone: true, selector: "th[nzEllipsis],td[nzEllipsis]", inputs: { nzEllipsis: ["nzEllipsis", "nzEllipsis", booleanAttribute] }, host: { properties: { "class.ant-table-cell-ellipsis": "nzEllipsis" } }, ngImport: core_exports });
2417
- };
2418
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzCellEllipsisDirective, decorators: [{
2419
- type: Directive,
2420
- args: [{
2421
- selector: "th[nzEllipsis],td[nzEllipsis]",
2422
- host: {
2423
- "[class.ant-table-cell-ellipsis]": "nzEllipsis"
2424
- }
2425
- }]
2426
- }], propDecorators: { nzEllipsis: [{
2427
- type: Input,
2428
- args: [{ transform: booleanAttribute }]
2429
- }] } });
2430
- var NzCellBreakWordDirective = class _NzCellBreakWordDirective {
2431
- nzBreakWord = true;
2432
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzCellBreakWordDirective, deps: [], target: FactoryTarget.Directive });
2433
- static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "16.1.0", version: "20.3.0", type: _NzCellBreakWordDirective, isStandalone: true, selector: "th[nzBreakWord],td[nzBreakWord]", inputs: { nzBreakWord: ["nzBreakWord", "nzBreakWord", booleanAttribute] }, host: { properties: { "style.word-break": "nzBreakWord ? 'break-all' : ''" } }, ngImport: core_exports });
2434
- };
2435
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzCellBreakWordDirective, decorators: [{
2436
- type: Directive,
2437
- args: [{
2438
- selector: "th[nzBreakWord],td[nzBreakWord]",
2439
- host: {
2440
- "[style.word-break]": `nzBreakWord ? 'break-all' : ''`
2441
- }
2442
- }]
2443
- }], propDecorators: { nzBreakWord: [{
2444
- type: Input,
2445
- args: [{ transform: booleanAttribute }]
2446
- }] } });
2447
- var NzTableContentComponent = class _NzTableContentComponent {
2448
- tableLayout = "auto";
2449
- theadTemplate = null;
2450
- contentTemplate = null;
2451
- tfootTemplate = null;
2452
- listOfColWidth = [];
2453
- scrollX = null;
2454
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableContentComponent, deps: [], target: FactoryTarget.Component });
2455
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzTableContentComponent, isStandalone: true, selector: "table[nz-table-content]", inputs: { tableLayout: "tableLayout", theadTemplate: "theadTemplate", contentTemplate: "contentTemplate", tfootTemplate: "tfootTemplate", listOfColWidth: "listOfColWidth", scrollX: "scrollX" }, host: { properties: { "style.table-layout": "tableLayout", "class.ant-table-fixed": "scrollX", "style.width": "scrollX", "style.min-width": "scrollX ? '100%' : null" } }, ngImport: core_exports, template: `
2456
- @if (listOfColWidth.length > 0) {
2457
- <colgroup>
2458
- @for (width of listOfColWidth; track $index) {
2459
- <col [style.width]="width" [style.minWidth]="width" />
2460
- }
2461
- </colgroup>
2462
- }
2463
- @if (theadTemplate) {
2464
- <thead class="ant-table-thead">
2465
- <ng-template [ngTemplateOutlet]="theadTemplate"></ng-template>
2466
- </thead>
2467
- }
2468
- <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
2469
- <ng-content></ng-content>
2470
- @if (tfootTemplate) {
2471
- <tfoot class="ant-table-summary">
2472
- <ng-template [ngTemplateOutlet]="tfootTemplate"></ng-template>
2473
- </tfoot>
2474
- }
2475
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
2476
- };
2477
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTableContentComponent, decorators: [{
2478
- type: Component,
2479
- args: [{
2480
- selector: "table[nz-table-content]",
2481
- changeDetection: ChangeDetectionStrategy.OnPush,
2482
- encapsulation: ViewEncapsulation.None,
2483
- template: `
2484
- @if (listOfColWidth.length > 0) {
2485
- <colgroup>
2486
- @for (width of listOfColWidth; track $index) {
2487
- <col [style.width]="width" [style.minWidth]="width" />
2488
- }
2489
- </colgroup>
2490
- }
2491
- @if (theadTemplate) {
2492
- <thead class="ant-table-thead">
2493
- <ng-template [ngTemplateOutlet]="theadTemplate"></ng-template>
2494
- </thead>
2495
- }
2496
- <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
2497
- <ng-content></ng-content>
2498
- @if (tfootTemplate) {
2499
- <tfoot class="ant-table-summary">
2500
- <ng-template [ngTemplateOutlet]="tfootTemplate"></ng-template>
2501
- </tfoot>
2502
- }
2503
- `,
2504
- host: {
2505
- "[style.table-layout]": "tableLayout",
2506
- "[class.ant-table-fixed]": "scrollX",
2507
- "[style.width]": "scrollX",
2508
- "[style.min-width]": `scrollX ? '100%' : null`
2509
- },
2510
- imports: [NgTemplateOutlet]
2511
- }]
2512
- }], propDecorators: { tableLayout: [{
2513
- type: Input
2514
- }], theadTemplate: [{
2515
- type: Input
2516
- }], contentTemplate: [{
2517
- type: Input
2518
- }], tfootTemplate: [{
2519
- type: Input
2520
- }], listOfColWidth: [{
2521
- type: Input
2522
- }], scrollX: [{
2523
- type: Input
2524
- }] } });
2525
- var NzTableFixedRowComponent = class _NzTableFixedRowComponent {
2526
- nzTableStyleService = inject(NzTableStyleService);
2527
- renderer = inject(Renderer2);
2528
- destroyRef = inject(DestroyRef);
2529
- tdElement;
2530
- hostWidth$ = new BehaviorSubject(null);
2531
- enableAutoMeasure$ = new BehaviorSubject(false);
2532
- ngOnInit() {
2533
- if (this.nzTableStyleService) {
2534
- const { enableAutoMeasure$, hostWidth$ } = this.nzTableStyleService;
2535
- enableAutoMeasure$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(this.enableAutoMeasure$);
2536
- hostWidth$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(this.hostWidth$);
2537
- }
2538
- }
2539
- ngAfterViewInit() {
2540
- this.nzTableStyleService.columnCount$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((count) => {
2541
- this.renderer.setAttribute(this.tdElement.nativeElement, "colspan", `${count}`);
2542
- });
2543
- }
2544
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableFixedRowComponent, deps: [], target: FactoryTarget.Component });
2545
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzTableFixedRowComponent, isStandalone: true, selector: "tr[nz-table-fixed-row], tr[nzExpand]", viewQueries: [{ propertyName: "tdElement", first: true, predicate: ["tdElement"], descendants: true, static: true }], ngImport: core_exports, template: `
2546
- <td class="nz-disable-td ant-table-cell" #tdElement>
2547
- @if (enableAutoMeasure$ | async) {
2548
- <div
2549
- class="ant-table-expanded-row-fixed"
2550
- style="position: sticky; left: 0; overflow: hidden;"
2551
- [style.width.px]="hostWidth$ | async"
2552
- >
2553
- <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
2554
- </div>
2555
- } @else {
2556
- <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
2557
- }
2558
- </td>
2559
- <ng-template #contentTemplate>
2560
- <ng-content></ng-content>
2561
- </ng-template>
2562
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
2563
- };
2564
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTableFixedRowComponent, decorators: [{
2565
- type: Component,
2566
- args: [{
2567
- selector: "tr[nz-table-fixed-row], tr[nzExpand]",
2568
- changeDetection: ChangeDetectionStrategy.OnPush,
2569
- encapsulation: ViewEncapsulation.None,
2570
- template: `
2571
- <td class="nz-disable-td ant-table-cell" #tdElement>
2572
- @if (enableAutoMeasure$ | async) {
2573
- <div
2574
- class="ant-table-expanded-row-fixed"
2575
- style="position: sticky; left: 0; overflow: hidden;"
2576
- [style.width.px]="hostWidth$ | async"
2577
- >
2578
- <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
2579
- </div>
2580
- } @else {
2581
- <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
2582
- }
2583
- </td>
2584
- <ng-template #contentTemplate>
2585
- <ng-content></ng-content>
2586
- </ng-template>
2587
- `,
2588
- imports: [AsyncPipe, NgTemplateOutlet]
2589
- }]
2590
- }], propDecorators: { tdElement: [{
2591
- type: ViewChild,
2592
- args: ["tdElement", { static: true }]
2593
- }] } });
2594
- var NzTableInnerDefaultComponent = class _NzTableInnerDefaultComponent {
2595
- tableLayout = "auto";
2596
- listOfColWidth = [];
2597
- theadTemplate = null;
2598
- contentTemplate = null;
2599
- tfootTemplate = null;
2600
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableInnerDefaultComponent, deps: [], target: FactoryTarget.Component });
2601
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: _NzTableInnerDefaultComponent, isStandalone: true, selector: "nz-table-inner-default", inputs: { tableLayout: "tableLayout", listOfColWidth: "listOfColWidth", theadTemplate: "theadTemplate", contentTemplate: "contentTemplate", tfootTemplate: "tfootTemplate" }, host: { classAttribute: "ant-table-container" }, ngImport: core_exports, template: `
2602
- <div class="ant-table-content">
2603
- <table
2604
- nz-table-content
2605
- [contentTemplate]="contentTemplate"
2606
- [tableLayout]="tableLayout"
2607
- [listOfColWidth]="listOfColWidth"
2608
- [theadTemplate]="theadTemplate"
2609
- [tfootTemplate]="tfootTemplate"
2610
- ></table>
2611
- </div>
2612
- `, isInline: true, dependencies: [{ kind: "component", type: NzTableContentComponent, selector: "table[nz-table-content]", inputs: ["tableLayout", "theadTemplate", "contentTemplate", "tfootTemplate", "listOfColWidth", "scrollX"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
2613
- };
2614
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTableInnerDefaultComponent, decorators: [{
2615
- type: Component,
2616
- args: [{
2617
- selector: "nz-table-inner-default",
2618
- changeDetection: ChangeDetectionStrategy.OnPush,
2619
- encapsulation: ViewEncapsulation.None,
2620
- template: `
2621
- <div class="ant-table-content">
2622
- <table
2623
- nz-table-content
2624
- [contentTemplate]="contentTemplate"
2625
- [tableLayout]="tableLayout"
2626
- [listOfColWidth]="listOfColWidth"
2627
- [theadTemplate]="theadTemplate"
2628
- [tfootTemplate]="tfootTemplate"
2629
- ></table>
2630
- </div>
2631
- `,
2632
- host: { class: "ant-table-container" },
2633
- imports: [NzTableContentComponent]
2634
- }]
2635
- }], propDecorators: { tableLayout: [{
2636
- type: Input
2637
- }], listOfColWidth: [{
2638
- type: Input
2639
- }], theadTemplate: [{
2640
- type: Input
2641
- }], contentTemplate: [{
2642
- type: Input
2643
- }], tfootTemplate: [{
2644
- type: Input
2645
- }] } });
2646
- var NzTrMeasureComponent = class _NzTrMeasureComponent {
2647
- nzResizeObserver = inject(NzResizeObserver);
2648
- ngZone = inject(NgZone);
2649
- destroyRef = inject(DestroyRef);
2650
- listOfMeasureColumn = [];
2651
- listOfAutoWidth = new EventEmitter();
2652
- listOfTdElement;
2653
- ngAfterViewInit() {
2654
- this.listOfTdElement.changes.pipe(startWith(this.listOfTdElement)).pipe(switchMap((list) => combineLatest(list.toArray().map((item) => this.nzResizeObserver.observe(item).pipe(map(([entry]) => {
2655
- const { width } = entry.target.getBoundingClientRect();
2656
- return Math.floor(width);
2657
- }))))), debounceTime(16), takeUntilDestroyed(this.destroyRef)).subscribe((data) => {
2658
- if (this.ngZone instanceof NgZone && NgZone.isInAngularZone()) {
2659
- this.listOfAutoWidth.next(data);
2660
- } else {
2661
- this.ngZone.run(() => this.listOfAutoWidth.next(data));
2662
- }
2663
- });
2664
- }
2665
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTrMeasureComponent, deps: [], target: FactoryTarget.Component });
2666
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzTrMeasureComponent, isStandalone: true, selector: "tr[nz-table-measure-row]", inputs: { listOfMeasureColumn: "listOfMeasureColumn" }, outputs: { listOfAutoWidth: "listOfAutoWidth" }, host: { classAttribute: "ant-table-measure-now" }, viewQueries: [{ propertyName: "listOfTdElement", predicate: ["tdElement"], descendants: true }], ngImport: core_exports, template: `
2667
- @for (th of listOfMeasureColumn; track $index) {
2668
- <td #tdElement class="nz-disable-td" style="padding: 0; border: 0; height: 0;"></td>
2669
- }
2670
- `, isInline: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
2671
- };
2672
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTrMeasureComponent, decorators: [{
2673
- type: Component,
2674
- args: [{
2675
- selector: "tr[nz-table-measure-row]",
2676
- changeDetection: ChangeDetectionStrategy.OnPush,
2677
- encapsulation: ViewEncapsulation.None,
2678
- template: `
2679
- @for (th of listOfMeasureColumn; track $index) {
2680
- <td #tdElement class="nz-disable-td" style="padding: 0; border: 0; height: 0;"></td>
2681
- }
2682
- `,
2683
- host: {
2684
- class: "ant-table-measure-now"
2685
- }
2686
- }]
2687
- }], propDecorators: { listOfMeasureColumn: [{
2688
- type: Input
2689
- }], listOfAutoWidth: [{
2690
- type: Output
2691
- }], listOfTdElement: [{
2692
- type: ViewChildren,
2693
- args: ["tdElement"]
2694
- }] } });
2695
- var NzTbodyComponent = class _NzTbodyComponent {
2696
- showEmpty$ = new BehaviorSubject(false);
2697
- noResult$ = new BehaviorSubject(void 0);
2698
- listOfMeasureColumn$ = new BehaviorSubject([]);
2699
- nzTableStyleService = inject(NzTableStyleService, { optional: true });
2700
- isInsideTable = !!this.nzTableStyleService;
2701
- constructor() {
2702
- if (this.nzTableStyleService) {
2703
- const { showEmpty$, noResult$, listOfMeasureColumn$ } = this.nzTableStyleService;
2704
- noResult$.pipe(takeUntilDestroyed()).subscribe(this.noResult$);
2705
- listOfMeasureColumn$.pipe(takeUntilDestroyed()).subscribe(this.listOfMeasureColumn$);
2706
- showEmpty$.pipe(takeUntilDestroyed()).subscribe(this.showEmpty$);
2707
- }
2708
- }
2709
- onListOfAutoWidthChange(listOfAutoWidth) {
2710
- this.nzTableStyleService?.setListOfAutoWidth(listOfAutoWidth);
2711
- }
2712
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTbodyComponent, deps: [], target: FactoryTarget.Component });
2713
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzTbodyComponent, isStandalone: true, selector: "tbody", host: { properties: { "class.ant-table-tbody": "isInsideTable" } }, ngImport: core_exports, template: `
2714
- @if (listOfMeasureColumn$ | async; as listOfMeasureColumn) {
2715
- @if (isInsideTable && listOfMeasureColumn.length) {
2716
- <tr
2717
- nz-table-measure-row
2718
- [listOfMeasureColumn]="listOfMeasureColumn"
2719
- (listOfAutoWidth)="onListOfAutoWidthChange($event)"
2720
- ></tr>
2721
- }
2722
- }
2723
- <ng-content></ng-content>
2724
- @if (showEmpty$ | async) {
2725
- <tr class="ant-table-placeholder" nz-table-fixed-row>
2726
- <nz-embed-empty nzComponentName="table" [specificContent]="(noResult$ | async)!"></nz-embed-empty>
2727
- </tr>
2728
- }
2729
- `, isInline: true, dependencies: [{ kind: "component", type: NzTrMeasureComponent, selector: "tr[nz-table-measure-row]", inputs: ["listOfMeasureColumn"], outputs: ["listOfAutoWidth"] }, { kind: "component", type: NzTableFixedRowComponent, selector: "tr[nz-table-fixed-row], tr[nzExpand]" }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: NzEmbedEmptyComponent, selector: "nz-embed-empty", inputs: ["nzComponentName", "specificContent"], exportAs: ["nzEmbedEmpty"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
2730
- };
2731
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTbodyComponent, decorators: [{
2732
- type: Component,
2733
- args: [{
2734
- selector: "tbody",
2735
- changeDetection: ChangeDetectionStrategy.OnPush,
2736
- encapsulation: ViewEncapsulation.None,
2737
- template: `
2738
- @if (listOfMeasureColumn$ | async; as listOfMeasureColumn) {
2739
- @if (isInsideTable && listOfMeasureColumn.length) {
2740
- <tr
2741
- nz-table-measure-row
2742
- [listOfMeasureColumn]="listOfMeasureColumn"
2743
- (listOfAutoWidth)="onListOfAutoWidthChange($event)"
2744
- ></tr>
2745
- }
2746
- }
2747
- <ng-content></ng-content>
2748
- @if (showEmpty$ | async) {
2749
- <tr class="ant-table-placeholder" nz-table-fixed-row>
2750
- <nz-embed-empty nzComponentName="table" [specificContent]="(noResult$ | async)!"></nz-embed-empty>
2751
- </tr>
2752
- }
2753
- `,
2754
- host: {
2755
- "[class.ant-table-tbody]": "isInsideTable"
2756
- },
2757
- imports: [AsyncPipe, NzTrMeasureComponent, NzTableFixedRowComponent, NzEmptyModule]
2758
- }]
2759
- }], ctorParameters: () => [] });
2760
- var NzTableInnerScrollComponent = class _NzTableInnerScrollComponent {
2761
- renderer = inject(Renderer2);
2762
- ngZone = inject(NgZone);
2763
- platform = inject(Platform);
2764
- resizeService = inject(NzResizeService);
2765
- destroyRef = inject(DestroyRef);
2766
- data = [];
2767
- scrollX = null;
2768
- scrollY = null;
2769
- contentTemplate = null;
2770
- widthConfig = [];
2771
- listOfColWidth = [];
2772
- theadTemplate = null;
2773
- tfootTemplate = null;
2774
- tfootFixed = null;
2775
- virtualTemplate = null;
2776
- virtualItemSize = 0;
2777
- virtualMaxBufferPx = 200;
2778
- virtualMinBufferPx = 100;
2779
- tableMainElement;
2780
- virtualForTrackBy = (index) => index;
2781
- tableHeaderElement;
2782
- tableBodyElement;
2783
- tableFootElement;
2784
- cdkVirtualScrollViewport;
2785
- headerStyleMap = {};
2786
- bodyStyleMap = {};
2787
- verticalScrollBarWidth = 0;
2788
- noDataVirtualHeight = "182px";
2789
- data$ = new Subject();
2790
- scroll$ = new Subject();
2791
- setScrollPositionClassName(clear = false) {
2792
- const { scrollWidth, scrollLeft, clientWidth } = this.tableBodyElement.nativeElement;
2793
- const leftClassName = "ant-table-ping-left";
2794
- const rightClassName = "ant-table-ping-right";
2795
- if (scrollWidth === clientWidth && scrollWidth !== 0 || clear) {
2796
- this.renderer.removeClass(this.tableMainElement, leftClassName);
2797
- this.renderer.removeClass(this.tableMainElement, rightClassName);
2798
- } else if (scrollLeft === 0) {
2799
- this.renderer.removeClass(this.tableMainElement, leftClassName);
2800
- this.renderer.addClass(this.tableMainElement, rightClassName);
2801
- } else if (scrollWidth === scrollLeft + clientWidth) {
2802
- this.renderer.removeClass(this.tableMainElement, rightClassName);
2803
- this.renderer.addClass(this.tableMainElement, leftClassName);
2804
- } else {
2805
- this.renderer.addClass(this.tableMainElement, leftClassName);
2806
- this.renderer.addClass(this.tableMainElement, rightClassName);
2807
- }
2808
- }
2809
- constructor() {
2810
- this.destroyRef.onDestroy(() => {
2811
- this.setScrollPositionClassName(true);
2812
- });
2813
- }
2814
- ngOnChanges(changes) {
2815
- const { scrollX, scrollY, data } = changes;
2816
- if (scrollX || scrollY) {
2817
- const hasVerticalScrollBar = this.verticalScrollBarWidth !== 0;
2818
- this.headerStyleMap = {
2819
- overflowX: "hidden",
2820
- overflowY: this.scrollY && hasVerticalScrollBar ? "scroll" : "hidden"
2821
- };
2822
- this.bodyStyleMap = {
2823
- overflowY: this.scrollY ? "scroll" : "hidden",
2824
- overflowX: this.scrollX ? "auto" : null,
2825
- maxHeight: this.scrollY
2826
- };
2827
- this.ngZone.runOutsideAngular(() => this.scroll$.next());
2828
- }
2829
- if (data) {
2830
- this.ngZone.runOutsideAngular(() => this.data$.next());
2831
- }
2832
- }
2833
- ngAfterViewInit() {
2834
- if (this.platform.isBrowser) {
2835
- const scrollEvent$ = this.scroll$.pipe(startWith(null), delay(0), switchMap(() => fromEventOutsideAngular(this.tableBodyElement.nativeElement, "scroll").pipe(startWith(true))));
2836
- const resize$ = this.resizeService.connect();
2837
- merge(scrollEvent$, resize$, this.data$, this.scroll$).pipe(startWith(true), delay(0), takeUntilDestroyed(this.destroyRef)).subscribe(() => this.setScrollPositionClassName());
2838
- scrollEvent$.pipe(filter(() => !!this.scrollY)).subscribe(() => {
2839
- this.tableHeaderElement.nativeElement.scrollLeft = this.tableBodyElement.nativeElement.scrollLeft;
2840
- if (this.tableFootElement) {
2841
- this.tableFootElement.nativeElement.scrollLeft = this.tableBodyElement.nativeElement.scrollLeft;
2842
- }
2843
- });
2844
- }
2845
- }
2846
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableInnerScrollComponent, deps: [], target: FactoryTarget.Component });
2847
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzTableInnerScrollComponent, isStandalone: true, selector: "nz-table-inner-scroll", inputs: { data: "data", scrollX: "scrollX", scrollY: "scrollY", contentTemplate: "contentTemplate", widthConfig: "widthConfig", listOfColWidth: "listOfColWidth", theadTemplate: "theadTemplate", tfootTemplate: "tfootTemplate", tfootFixed: "tfootFixed", virtualTemplate: "virtualTemplate", virtualItemSize: "virtualItemSize", virtualMaxBufferPx: "virtualMaxBufferPx", virtualMinBufferPx: "virtualMinBufferPx", tableMainElement: "tableMainElement", virtualForTrackBy: "virtualForTrackBy", verticalScrollBarWidth: "verticalScrollBarWidth", noDataVirtualHeight: "noDataVirtualHeight" }, host: { classAttribute: "ant-table-container" }, viewQueries: [{ propertyName: "tableHeaderElement", first: true, predicate: ["tableHeaderElement"], descendants: true, read: ElementRef }, { propertyName: "tableBodyElement", first: true, predicate: ["tableBodyElement"], descendants: true, read: ElementRef }, { propertyName: "tableFootElement", first: true, predicate: ["tableFootElement"], descendants: true, read: ElementRef }, { propertyName: "cdkVirtualScrollViewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, read: CdkVirtualScrollViewport }], usesOnChanges: true, ngImport: core_exports, template: `
2848
- @if (scrollY) {
2849
- <div #tableHeaderElement [style]="headerStyleMap" class="ant-table-header nz-table-hide-scrollbar">
2850
- <table
2851
- nz-table-content
2852
- tableLayout="fixed"
2853
- [scrollX]="scrollX"
2854
- [listOfColWidth]="listOfColWidth"
2855
- [theadTemplate]="theadTemplate"
2856
- [tfootTemplate]="tfootFixed === 'top' ? tfootTemplate : null"
2857
- ></table>
2858
- </div>
2859
- @if (!virtualTemplate) {
2860
- <div #tableBodyElement cdkScrollable class="ant-table-body" [style]="bodyStyleMap">
2861
- <table
2862
- nz-table-content
2863
- tableLayout="fixed"
2864
- [scrollX]="scrollX"
2865
- [listOfColWidth]="listOfColWidth"
2866
- [contentTemplate]="contentTemplate"
2867
- ></table>
2868
- </div>
2869
- } @else {
2870
- <cdk-virtual-scroll-viewport
2871
- #tableBodyElement
2872
- [itemSize]="virtualItemSize"
2873
- [maxBufferPx]="virtualMaxBufferPx"
2874
- [minBufferPx]="virtualMinBufferPx"
2875
- [style.height]="data.length ? scrollY : noDataVirtualHeight"
2876
- >
2877
- <table nz-table-content tableLayout="fixed" [scrollX]="scrollX" [listOfColWidth]="listOfColWidth">
2878
- <tbody>
2879
- <ng-container *cdkVirtualFor="let item of data; let i = index; trackBy: virtualForTrackBy">
2880
- <ng-template
2881
- [ngTemplateOutlet]="virtualTemplate"
2882
- [ngTemplateOutletContext]="{ $implicit: item, index: i }"
2883
- ></ng-template>
2884
- </ng-container>
2885
- </tbody>
2886
- </table>
2887
- </cdk-virtual-scroll-viewport>
2888
- }
2889
- @if (tfootFixed === 'bottom') {
2890
- <div #tableFootElement class="ant-table-summary" [style]="headerStyleMap">
2891
- <table
2892
- nz-table-content
2893
- tableLayout="fixed"
2894
- [scrollX]="scrollX"
2895
- [listOfColWidth]="listOfColWidth"
2896
- [tfootTemplate]="tfootTemplate"
2897
- ></table>
2898
- </div>
2899
- }
2900
- } @else {
2901
- <div class="ant-table-content" #tableBodyElement [style]="bodyStyleMap">
2902
- <table
2903
- nz-table-content
2904
- tableLayout="fixed"
2905
- [scrollX]="scrollX"
2906
- [listOfColWidth]="listOfColWidth"
2907
- [theadTemplate]="theadTemplate"
2908
- [contentTemplate]="contentTemplate"
2909
- [tfootTemplate]="tfootTemplate"
2910
- ></table>
2911
- </div>
2912
- }
2913
- `, isInline: true, dependencies: [{ kind: "component", type: NzTableContentComponent, selector: "table[nz-table-content]", inputs: ["tableLayout", "theadTemplate", "contentTemplate", "tfootTemplate", "listOfColWidth", "scrollX"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "directive", type: CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NzTbodyComponent, selector: "tbody" }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
2914
- };
2915
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTableInnerScrollComponent, decorators: [{
2916
- type: Component,
2917
- args: [{
2918
- selector: "nz-table-inner-scroll",
2919
- changeDetection: ChangeDetectionStrategy.OnPush,
2920
- encapsulation: ViewEncapsulation.None,
2921
- template: `
2922
- @if (scrollY) {
2923
- <div #tableHeaderElement [style]="headerStyleMap" class="ant-table-header nz-table-hide-scrollbar">
2924
- <table
2925
- nz-table-content
2926
- tableLayout="fixed"
2927
- [scrollX]="scrollX"
2928
- [listOfColWidth]="listOfColWidth"
2929
- [theadTemplate]="theadTemplate"
2930
- [tfootTemplate]="tfootFixed === 'top' ? tfootTemplate : null"
2931
- ></table>
2932
- </div>
2933
- @if (!virtualTemplate) {
2934
- <div #tableBodyElement cdkScrollable class="ant-table-body" [style]="bodyStyleMap">
2935
- <table
2936
- nz-table-content
2937
- tableLayout="fixed"
2938
- [scrollX]="scrollX"
2939
- [listOfColWidth]="listOfColWidth"
2940
- [contentTemplate]="contentTemplate"
2941
- ></table>
2942
- </div>
2943
- } @else {
2944
- <cdk-virtual-scroll-viewport
2945
- #tableBodyElement
2946
- [itemSize]="virtualItemSize"
2947
- [maxBufferPx]="virtualMaxBufferPx"
2948
- [minBufferPx]="virtualMinBufferPx"
2949
- [style.height]="data.length ? scrollY : noDataVirtualHeight"
2950
- >
2951
- <table nz-table-content tableLayout="fixed" [scrollX]="scrollX" [listOfColWidth]="listOfColWidth">
2952
- <tbody>
2953
- <ng-container *cdkVirtualFor="let item of data; let i = index; trackBy: virtualForTrackBy">
2954
- <ng-template
2955
- [ngTemplateOutlet]="virtualTemplate"
2956
- [ngTemplateOutletContext]="{ $implicit: item, index: i }"
2957
- ></ng-template>
2958
- </ng-container>
2959
- </tbody>
2960
- </table>
2961
- </cdk-virtual-scroll-viewport>
2962
- }
2963
- @if (tfootFixed === 'bottom') {
2964
- <div #tableFootElement class="ant-table-summary" [style]="headerStyleMap">
2965
- <table
2966
- nz-table-content
2967
- tableLayout="fixed"
2968
- [scrollX]="scrollX"
2969
- [listOfColWidth]="listOfColWidth"
2970
- [tfootTemplate]="tfootTemplate"
2971
- ></table>
2972
- </div>
2973
- }
2974
- } @else {
2975
- <div class="ant-table-content" #tableBodyElement [style]="bodyStyleMap">
2976
- <table
2977
- nz-table-content
2978
- tableLayout="fixed"
2979
- [scrollX]="scrollX"
2980
- [listOfColWidth]="listOfColWidth"
2981
- [theadTemplate]="theadTemplate"
2982
- [contentTemplate]="contentTemplate"
2983
- [tfootTemplate]="tfootTemplate"
2984
- ></table>
2985
- </div>
2986
- }
2987
- `,
2988
- host: { class: "ant-table-container" },
2989
- imports: [NzTableContentComponent, ScrollingModule, NgTemplateOutlet, NzTbodyComponent]
2990
- }]
2991
- }], ctorParameters: () => [], propDecorators: { data: [{
2992
- type: Input
2993
- }], scrollX: [{
2994
- type: Input
2995
- }], scrollY: [{
2996
- type: Input
2997
- }], contentTemplate: [{
2998
- type: Input
2999
- }], widthConfig: [{
3000
- type: Input
3001
- }], listOfColWidth: [{
3002
- type: Input
3003
- }], theadTemplate: [{
3004
- type: Input
3005
- }], tfootTemplate: [{
3006
- type: Input
3007
- }], tfootFixed: [{
3008
- type: Input
3009
- }], virtualTemplate: [{
3010
- type: Input
3011
- }], virtualItemSize: [{
3012
- type: Input
3013
- }], virtualMaxBufferPx: [{
3014
- type: Input
3015
- }], virtualMinBufferPx: [{
3016
- type: Input
3017
- }], tableMainElement: [{
3018
- type: Input
3019
- }], virtualForTrackBy: [{
3020
- type: Input
3021
- }], tableHeaderElement: [{
3022
- type: ViewChild,
3023
- args: ["tableHeaderElement", { read: ElementRef }]
3024
- }], tableBodyElement: [{
3025
- type: ViewChild,
3026
- args: ["tableBodyElement", { read: ElementRef }]
3027
- }], tableFootElement: [{
3028
- type: ViewChild,
3029
- args: ["tableFootElement", { read: ElementRef }]
3030
- }], cdkVirtualScrollViewport: [{
3031
- type: ViewChild,
3032
- args: [CdkVirtualScrollViewport, { read: CdkVirtualScrollViewport }]
3033
- }], verticalScrollBarWidth: [{
3034
- type: Input
3035
- }], noDataVirtualHeight: [{
3036
- type: Input
3037
- }] } });
3038
- var NzTableVirtualScrollDirective = class _NzTableVirtualScrollDirective {
3039
- templateRef = inject(TemplateRef);
3040
- static ngTemplateContextGuard(_dir, _ctx) {
3041
- return true;
3042
- }
3043
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableVirtualScrollDirective, deps: [], target: FactoryTarget.Directive });
3044
- static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzTableVirtualScrollDirective, isStandalone: true, selector: "[nz-virtual-scroll]", exportAs: ["nzVirtualScroll"], ngImport: core_exports });
3045
- };
3046
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTableVirtualScrollDirective, decorators: [{
3047
- type: Directive,
3048
- args: [{
3049
- selector: "[nz-virtual-scroll]",
3050
- exportAs: "nzVirtualScroll"
3051
- }]
3052
- }] });
3053
- var NzTableTitleFooterComponent = class _NzTableTitleFooterComponent {
3054
- title = null;
3055
- footer = null;
3056
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableTitleFooterComponent, deps: [], target: FactoryTarget.Component });
3057
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: _NzTableTitleFooterComponent, isStandalone: true, selector: "nz-table-title-footer", inputs: { title: "title", footer: "footer" }, host: { properties: { "class.ant-table-title": "title !== null", "class.ant-table-footer": "footer !== null" } }, ngImport: core_exports, template: `
3058
- <ng-container *nzStringTemplateOutlet="title">{{ title }}</ng-container>
3059
- <ng-container *nzStringTemplateOutlet="footer">{{ footer }}</ng-container>
3060
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
3061
- };
3062
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTableTitleFooterComponent, decorators: [{
3063
- type: Component,
3064
- args: [{
3065
- selector: "nz-table-title-footer",
3066
- changeDetection: ChangeDetectionStrategy.OnPush,
3067
- encapsulation: ViewEncapsulation.None,
3068
- template: `
3069
- <ng-container *nzStringTemplateOutlet="title">{{ title }}</ng-container>
3070
- <ng-container *nzStringTemplateOutlet="footer">{{ footer }}</ng-container>
3071
- `,
3072
- host: {
3073
- "[class.ant-table-title]": `title !== null`,
3074
- "[class.ant-table-footer]": `footer !== null`
3075
- },
3076
- imports: [NzOutletModule]
3077
- }]
3078
- }], propDecorators: { title: [{
3079
- type: Input
3080
- }], footer: [{
3081
- type: Input
3082
- }] } });
3083
- var NZ_CONFIG_MODULE_NAME2 = "table";
3084
- var NzTableComponent = (() => {
3085
- var _a;
3086
- let _nzLoadingIndicator_decorators;
3087
- let _nzLoadingIndicator_initializers = [];
3088
- let _nzLoadingIndicator_extraInitializers = [];
3089
- let _nzBordered_decorators;
3090
- let _nzBordered_initializers = [];
3091
- let _nzBordered_extraInitializers = [];
3092
- let _nzSize_decorators;
3093
- let _nzSize_initializers = [];
3094
- let _nzSize_extraInitializers = [];
3095
- let _nzShowSizeChanger_decorators;
3096
- let _nzShowSizeChanger_initializers = [];
3097
- let _nzShowSizeChanger_extraInitializers = [];
3098
- let _nzHideOnSinglePage_decorators;
3099
- let _nzHideOnSinglePage_initializers = [];
3100
- let _nzHideOnSinglePage_extraInitializers = [];
3101
- let _nzShowQuickJumper_decorators;
3102
- let _nzShowQuickJumper_initializers = [];
3103
- let _nzShowQuickJumper_extraInitializers = [];
3104
- let _nzSimple_decorators;
3105
- let _nzSimple_initializers = [];
3106
- let _nzSimple_extraInitializers = [];
3107
- return _a = class {
3108
- _nzModuleName = NZ_CONFIG_MODULE_NAME2;
3109
- elementRef = inject(ElementRef);
3110
- nzResizeObserver = inject(NzResizeObserver);
3111
- cdr = inject(ChangeDetectorRef);
3112
- nzTableStyleService = inject(NzTableStyleService);
3113
- nzTableDataService = inject(NzTableDataService);
3114
- directionality = inject(Directionality);
3115
- destroyRef = inject(DestroyRef);
3116
- nzTableLayout = "auto";
3117
- nzShowTotal = null;
3118
- nzItemRender = null;
3119
- nzTitle = null;
3120
- nzFooter = null;
3121
- nzNoResult = void 0;
3122
- nzPageSizeOptions = [10, 20, 30, 40, 50];
3123
- nzVirtualItemSize = 0;
3124
- nzVirtualMaxBufferPx = 200;
3125
- nzVirtualMinBufferPx = 100;
3126
- nzVirtualForTrackBy = (index) => index;
3127
- nzLoadingDelay = 0;
3128
- nzPageIndex = 1;
3129
- nzPageSize = 10;
3130
- nzTotal = 0;
3131
- nzWidthConfig = [];
3132
- nzData = [];
3133
- nzCustomColumn = [];
3134
- nzPaginationPosition = "bottom";
3135
- nzScroll = { x: null, y: null };
3136
- noDataVirtualHeight = "182px";
3137
- nzPaginationType = "default";
3138
- nzFrontPagination = true;
3139
- nzTemplateMode = false;
3140
- nzShowPagination = true;
3141
- nzLoading = false;
3142
- nzOuterBordered = false;
3143
- nzLoadingIndicator = __runInitializers(this, _nzLoadingIndicator_initializers, null);
3144
- nzBordered = (__runInitializers(this, _nzLoadingIndicator_extraInitializers), __runInitializers(this, _nzBordered_initializers, false));
3145
- nzSize = (__runInitializers(this, _nzBordered_extraInitializers), __runInitializers(this, _nzSize_initializers, "default"));
3146
- nzShowSizeChanger = (__runInitializers(this, _nzSize_extraInitializers), __runInitializers(this, _nzShowSizeChanger_initializers, false));
3147
- nzHideOnSinglePage = (__runInitializers(this, _nzShowSizeChanger_extraInitializers), __runInitializers(this, _nzHideOnSinglePage_initializers, false));
3148
- nzShowQuickJumper = (__runInitializers(this, _nzHideOnSinglePage_extraInitializers), __runInitializers(this, _nzShowQuickJumper_initializers, false));
3149
- nzSimple = (__runInitializers(this, _nzShowQuickJumper_extraInitializers), __runInitializers(this, _nzSimple_initializers, false));
3150
- nzPageSizeChange = (__runInitializers(this, _nzSimple_extraInitializers), new EventEmitter());
3151
- nzPageIndexChange = new EventEmitter();
3152
- nzQueryParams = new EventEmitter();
3153
- nzCurrentPageDataChange = new EventEmitter();
3154
- nzCustomColumnChange = new EventEmitter();
3155
- /** public data for ngFor tr */
3156
- data = [];
3157
- cdkVirtualScrollViewport;
3158
- scrollX = null;
3159
- scrollY = null;
3160
- theadTemplate = null;
3161
- tfootTemplate = null;
3162
- tfootFixed = null;
3163
- listOfAutoColWidth = [];
3164
- listOfManualColWidth = [];
3165
- hasFixLeft = false;
3166
- hasFixRight = false;
3167
- showPagination = true;
3168
- templateMode$ = new BehaviorSubject(false);
3169
- dir = "ltr";
3170
- nzVirtualScrollDirective;
3171
- nzTableInnerScrollComponent;
3172
- verticalScrollBarWidth = 0;
3173
- onPageSizeChange(size) {
3174
- this.nzTableDataService.updatePageSize(size);
3175
- }
3176
- onPageIndexChange(index) {
3177
- this.nzTableDataService.updatePageIndex(index);
3178
- }
3179
- constructor() {
3180
- onConfigChangeEventForComponent(NZ_CONFIG_MODULE_NAME2, () => this.cdr.markForCheck());
3181
- }
3182
- ngOnInit() {
3183
- const { pageIndexDistinct$, pageSizeDistinct$, listOfCurrentPageData$, total$, queryParams$, listOfCustomColumn$ } = this.nzTableDataService;
3184
- const { theadTemplate$, tfootTemplate$, tfootFixed$, hasFixLeft$, hasFixRight$ } = this.nzTableStyleService;
3185
- this.dir = this.directionality.value;
3186
- this.directionality.change?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((direction) => {
3187
- this.dir = direction;
3188
- this.cdr.detectChanges();
3189
- });
3190
- queryParams$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(this.nzQueryParams);
3191
- pageIndexDistinct$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((pageIndex) => {
3192
- if (pageIndex !== this.nzPageIndex) {
3193
- this.nzPageIndex = pageIndex;
3194
- this.nzPageIndexChange.next(pageIndex);
3195
- }
3196
- });
3197
- pageSizeDistinct$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((pageSize) => {
3198
- if (pageSize !== this.nzPageSize) {
3199
- this.nzPageSize = pageSize;
3200
- this.nzPageSizeChange.next(pageSize);
3201
- }
3202
- });
3203
- total$.pipe(takeUntilDestroyed(this.destroyRef), filter((total) => this.nzFrontPagination && total !== this.nzTotal)).subscribe((total) => {
3204
- this.nzTotal = total;
3205
- this.cdr.markForCheck();
3206
- });
3207
- listOfCurrentPageData$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((data) => {
3208
- this.data = data;
3209
- this.nzCurrentPageDataChange.next(data);
3210
- this.cdr.markForCheck();
3211
- });
3212
- listOfCustomColumn$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((data) => {
3213
- this.nzCustomColumn = data;
3214
- this.nzCustomColumnChange.next(data);
3215
- this.cdr.markForCheck();
3216
- });
3217
- theadTemplate$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((theadTemplate) => {
3218
- this.theadTemplate = theadTemplate;
3219
- this.cdr.markForCheck();
3220
- });
3221
- combineLatest([tfootTemplate$, tfootFixed$]).pipe(takeUntilDestroyed(this.destroyRef)).subscribe(([tfootTemplate, tfootFixed]) => {
3222
- this.tfootTemplate = tfootTemplate;
3223
- this.tfootFixed = tfootFixed;
3224
- this.cdr.markForCheck();
3225
- });
3226
- hasFixLeft$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((hasFixLeft) => {
3227
- this.hasFixLeft = hasFixLeft;
3228
- this.cdr.markForCheck();
3229
- });
3230
- hasFixRight$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((hasFixRight) => {
3231
- this.hasFixRight = hasFixRight;
3232
- this.cdr.markForCheck();
3233
- });
3234
- combineLatest([total$, this.templateMode$]).pipe(map(([total, templateMode]) => total === 0 && !templateMode), takeUntilDestroyed(this.destroyRef)).subscribe((empty) => {
3235
- this.nzTableStyleService.setShowEmpty(empty);
3236
- });
3237
- this.verticalScrollBarWidth = measureScrollbar("vertical");
3238
- this.nzTableStyleService.listOfListOfThWidthPx$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((listOfWidth) => {
3239
- this.listOfAutoColWidth = listOfWidth;
3240
- this.cdr.markForCheck();
3241
- });
3242
- this.nzTableStyleService.manualWidthConfigPx$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((listOfWidth) => {
3243
- this.listOfManualColWidth = listOfWidth;
3244
- this.cdr.markForCheck();
3245
- });
3246
- }
3247
- ngOnChanges(changes) {
3248
- const { nzScroll, nzPageIndex, nzPageSize, nzFrontPagination, nzData, nzCustomColumn, nzWidthConfig, nzNoResult, nzTemplateMode } = changes;
3249
- if (nzPageIndex) {
3250
- this.nzTableDataService.updatePageIndex(this.nzPageIndex);
3251
- }
3252
- if (nzPageSize) {
3253
- this.nzTableDataService.updatePageSize(this.nzPageSize);
3254
- }
3255
- if (nzData) {
3256
- this.nzData = this.nzData || [];
3257
- this.nzTableDataService.updateListOfData(this.nzData);
3258
- }
3259
- if (nzCustomColumn) {
3260
- this.nzCustomColumn = this.nzCustomColumn || [];
3261
- this.nzTableDataService.updateListOfCustomColumn(this.nzCustomColumn);
3262
- }
3263
- if (nzFrontPagination) {
3264
- this.nzTableDataService.updateFrontPagination(this.nzFrontPagination);
3265
- }
3266
- if (nzScroll) {
3267
- this.setScrollOnChanges();
3268
- }
3269
- if (nzWidthConfig) {
3270
- this.nzTableStyleService.setTableWidthConfig(this.nzWidthConfig);
3271
- }
3272
- if (nzTemplateMode) {
3273
- this.templateMode$.next(this.nzTemplateMode);
3274
- }
3275
- if (nzNoResult) {
3276
- this.nzTableStyleService.setNoResult(this.nzNoResult);
3277
- }
3278
- this.updateShowPagination();
3279
- }
3280
- ngAfterViewInit() {
3281
- this.nzResizeObserver.observe(this.elementRef).pipe(map(([entry]) => {
3282
- const { width } = entry.target.getBoundingClientRect();
3283
- const scrollBarWidth = this.scrollY ? this.verticalScrollBarWidth : 0;
3284
- return Math.floor(width - scrollBarWidth);
3285
- }), takeUntilDestroyed(this.destroyRef)).subscribe(this.nzTableStyleService.hostWidth$);
3286
- if (this.nzTableInnerScrollComponent && this.nzTableInnerScrollComponent.cdkVirtualScrollViewport) {
3287
- this.cdkVirtualScrollViewport = this.nzTableInnerScrollComponent.cdkVirtualScrollViewport;
3288
- }
3289
- }
3290
- setScrollOnChanges() {
3291
- this.scrollX = this.nzScroll && this.nzScroll.x || null;
3292
- this.scrollY = this.nzScroll && this.nzScroll.y || null;
3293
- this.nzTableStyleService.setScroll(this.scrollX, this.scrollY);
3294
- }
3295
- updateShowPagination() {
3296
- this.showPagination = this.nzHideOnSinglePage && this.nzData.length > this.nzPageSize || this.nzData.length > 0 && !this.nzHideOnSinglePage || !this.nzFrontPagination && this.nzTotal > this.nzPageSize;
3297
- }
3298
- }, (() => {
3299
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? /* @__PURE__ */ Object.create(null) : void 0;
3300
- _nzLoadingIndicator_decorators = [WithConfig()];
3301
- _nzBordered_decorators = [WithConfig()];
3302
- _nzSize_decorators = [WithConfig()];
3303
- _nzShowSizeChanger_decorators = [WithConfig()];
3304
- _nzHideOnSinglePage_decorators = [WithConfig()];
3305
- _nzShowQuickJumper_decorators = [WithConfig()];
3306
- _nzSimple_decorators = [WithConfig()];
3307
- __esDecorate(null, null, _nzLoadingIndicator_decorators, { kind: "field", name: "nzLoadingIndicator", static: false, private: false, access: { has: (obj) => "nzLoadingIndicator" in obj, get: (obj) => obj.nzLoadingIndicator, set: (obj, value) => {
3308
- obj.nzLoadingIndicator = value;
3309
- } }, metadata: _metadata }, _nzLoadingIndicator_initializers, _nzLoadingIndicator_extraInitializers);
3310
- __esDecorate(null, null, _nzBordered_decorators, { kind: "field", name: "nzBordered", static: false, private: false, access: { has: (obj) => "nzBordered" in obj, get: (obj) => obj.nzBordered, set: (obj, value) => {
3311
- obj.nzBordered = value;
3312
- } }, metadata: _metadata }, _nzBordered_initializers, _nzBordered_extraInitializers);
3313
- __esDecorate(null, null, _nzSize_decorators, { kind: "field", name: "nzSize", static: false, private: false, access: { has: (obj) => "nzSize" in obj, get: (obj) => obj.nzSize, set: (obj, value) => {
3314
- obj.nzSize = value;
3315
- } }, metadata: _metadata }, _nzSize_initializers, _nzSize_extraInitializers);
3316
- __esDecorate(null, null, _nzShowSizeChanger_decorators, { kind: "field", name: "nzShowSizeChanger", static: false, private: false, access: { has: (obj) => "nzShowSizeChanger" in obj, get: (obj) => obj.nzShowSizeChanger, set: (obj, value) => {
3317
- obj.nzShowSizeChanger = value;
3318
- } }, metadata: _metadata }, _nzShowSizeChanger_initializers, _nzShowSizeChanger_extraInitializers);
3319
- __esDecorate(null, null, _nzHideOnSinglePage_decorators, { kind: "field", name: "nzHideOnSinglePage", static: false, private: false, access: { has: (obj) => "nzHideOnSinglePage" in obj, get: (obj) => obj.nzHideOnSinglePage, set: (obj, value) => {
3320
- obj.nzHideOnSinglePage = value;
3321
- } }, metadata: _metadata }, _nzHideOnSinglePage_initializers, _nzHideOnSinglePage_extraInitializers);
3322
- __esDecorate(null, null, _nzShowQuickJumper_decorators, { kind: "field", name: "nzShowQuickJumper", static: false, private: false, access: { has: (obj) => "nzShowQuickJumper" in obj, get: (obj) => obj.nzShowQuickJumper, set: (obj, value) => {
3323
- obj.nzShowQuickJumper = value;
3324
- } }, metadata: _metadata }, _nzShowQuickJumper_initializers, _nzShowQuickJumper_extraInitializers);
3325
- __esDecorate(null, null, _nzSimple_decorators, { kind: "field", name: "nzSimple", static: false, private: false, access: { has: (obj) => "nzSimple" in obj, get: (obj) => obj.nzSimple, set: (obj, value) => {
3326
- obj.nzSimple = value;
3327
- } }, metadata: _metadata }, _nzSimple_initializers, _nzSimple_extraInitializers);
3328
- if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
3329
- })(), __publicField(_a, "\u0275fac", \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _a, deps: [], target: FactoryTarget.Component })), __publicField(_a, "\u0275cmp", \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _a, isStandalone: true, selector: "nz-table", inputs: { nzTableLayout: "nzTableLayout", nzShowTotal: "nzShowTotal", nzItemRender: "nzItemRender", nzTitle: "nzTitle", nzFooter: "nzFooter", nzNoResult: "nzNoResult", nzPageSizeOptions: "nzPageSizeOptions", nzVirtualItemSize: "nzVirtualItemSize", nzVirtualMaxBufferPx: "nzVirtualMaxBufferPx", nzVirtualMinBufferPx: "nzVirtualMinBufferPx", nzVirtualForTrackBy: "nzVirtualForTrackBy", nzLoadingDelay: "nzLoadingDelay", nzPageIndex: "nzPageIndex", nzPageSize: "nzPageSize", nzTotal: "nzTotal", nzWidthConfig: "nzWidthConfig", nzData: "nzData", nzCustomColumn: "nzCustomColumn", nzPaginationPosition: "nzPaginationPosition", nzScroll: "nzScroll", noDataVirtualHeight: "noDataVirtualHeight", nzPaginationType: "nzPaginationType", nzFrontPagination: ["nzFrontPagination", "nzFrontPagination", booleanAttribute], nzTemplateMode: ["nzTemplateMode", "nzTemplateMode", booleanAttribute], nzShowPagination: ["nzShowPagination", "nzShowPagination", booleanAttribute], nzLoading: ["nzLoading", "nzLoading", booleanAttribute], nzOuterBordered: ["nzOuterBordered", "nzOuterBordered", booleanAttribute], nzLoadingIndicator: "nzLoadingIndicator", nzBordered: ["nzBordered", "nzBordered", booleanAttribute], nzSize: "nzSize", nzShowSizeChanger: ["nzShowSizeChanger", "nzShowSizeChanger", booleanAttribute], nzHideOnSinglePage: ["nzHideOnSinglePage", "nzHideOnSinglePage", booleanAttribute], nzShowQuickJumper: ["nzShowQuickJumper", "nzShowQuickJumper", booleanAttribute], nzSimple: ["nzSimple", "nzSimple", booleanAttribute] }, outputs: { nzPageSizeChange: "nzPageSizeChange", nzPageIndexChange: "nzPageIndexChange", nzQueryParams: "nzQueryParams", nzCurrentPageDataChange: "nzCurrentPageDataChange", nzCustomColumnChange: "nzCustomColumnChange" }, host: { properties: { "class.ant-table-wrapper-rtl": 'dir === "rtl"', "class.ant-table-custom-column": "nzCustomColumn.length" }, classAttribute: "ant-table-wrapper" }, providers: [NzTableStyleService, NzTableDataService], queries: [{ propertyName: "nzVirtualScrollDirective", first: true, predicate: NzTableVirtualScrollDirective, descendants: true }], viewQueries: [{ propertyName: "nzTableInnerScrollComponent", first: true, predicate: NzTableInnerScrollComponent, descendants: true }], exportAs: ["nzTable"], usesOnChanges: true, ngImport: core_exports, template: `
3330
- <nz-spin [nzDelay]="nzLoadingDelay" [nzSpinning]="nzLoading" [nzIndicator]="nzLoadingIndicator">
3331
- @if (nzPaginationPosition === 'both' || nzPaginationPosition === 'top') {
3332
- <ng-template [ngTemplateOutlet]="paginationTemplate"></ng-template>
3333
- }
3334
- <div
3335
- #tableMainElement
3336
- class="ant-table"
3337
- [class.ant-table-rtl]="dir === 'rtl'"
3338
- [class.ant-table-fixed-header]="nzData.length && scrollY"
3339
- [class.ant-table-fixed-column]="scrollX"
3340
- [class.ant-table-has-fix-left]="hasFixLeft"
3341
- [class.ant-table-has-fix-right]="hasFixRight"
3342
- [class.ant-table-bordered]="nzBordered"
3343
- [class.nz-table-out-bordered]="nzOuterBordered && !nzBordered"
3344
- [class.ant-table-middle]="nzSize === 'middle'"
3345
- [class.ant-table-small]="nzSize === 'small'"
3346
- >
3347
- @if (nzTitle) {
3348
- <nz-table-title-footer [title]="nzTitle"></nz-table-title-footer>
3349
- }
3350
- @if (scrollY || scrollX) {
3351
- <nz-table-inner-scroll
3352
- [data]="data"
3353
- [scrollX]="scrollX"
3354
- [scrollY]="scrollY"
3355
- [contentTemplate]="contentTemplate"
3356
- [listOfColWidth]="listOfAutoColWidth"
3357
- [theadTemplate]="theadTemplate"
3358
- [tfootTemplate]="tfootTemplate"
3359
- [tfootFixed]="tfootFixed"
3360
- [verticalScrollBarWidth]="verticalScrollBarWidth"
3361
- [virtualTemplate]="nzVirtualScrollDirective ? nzVirtualScrollDirective.templateRef : null"
3362
- [virtualItemSize]="nzVirtualItemSize"
3363
- [virtualMaxBufferPx]="nzVirtualMaxBufferPx"
3364
- [virtualMinBufferPx]="nzVirtualMinBufferPx"
3365
- [tableMainElement]="tableMainElement"
3366
- [virtualForTrackBy]="nzVirtualForTrackBy"
3367
- [noDataVirtualHeight]="noDataVirtualHeight"
3368
- ></nz-table-inner-scroll>
3369
- } @else {
3370
- <nz-table-inner-default
3371
- [tableLayout]="nzTableLayout"
3372
- [listOfColWidth]="listOfManualColWidth"
3373
- [theadTemplate]="theadTemplate"
3374
- [contentTemplate]="contentTemplate"
3375
- [tfootTemplate]="tfootTemplate"
3376
- ></nz-table-inner-default>
3377
- }
3378
- @if (nzFooter) {
3379
- <nz-table-title-footer [footer]="nzFooter"></nz-table-title-footer>
3380
- }
3381
- </div>
3382
- @if (nzPaginationPosition === 'both' || nzPaginationPosition === 'bottom') {
3383
- <ng-template [ngTemplateOutlet]="paginationTemplate"></ng-template>
3384
- }
3385
- </nz-spin>
3386
- <ng-template #paginationTemplate>
3387
- @if (nzShowPagination && data.length) {
3388
- <nz-pagination
3389
- [hidden]="!showPagination"
3390
- class="ant-table-pagination ant-table-pagination-right"
3391
- [nzShowSizeChanger]="nzShowSizeChanger"
3392
- [nzPageSizeOptions]="nzPageSizeOptions"
3393
- [nzItemRender]="nzItemRender!"
3394
- [nzShowQuickJumper]="nzShowQuickJumper"
3395
- [nzHideOnSinglePage]="nzHideOnSinglePage"
3396
- [nzShowTotal]="nzShowTotal"
3397
- [nzSize]="nzPaginationType === 'small' ? 'small' : nzSize === 'default' ? 'default' : 'small'"
3398
- [nzPageSize]="nzPageSize"
3399
- [nzTotal]="nzTotal"
3400
- [nzSimple]="nzSimple"
3401
- [nzPageIndex]="nzPageIndex"
3402
- (nzPageSizeChange)="onPageSizeChange($event)"
3403
- (nzPageIndexChange)="onPageIndexChange($event)"
3404
- ></nz-pagination>
3405
- }
3406
- </ng-template>
3407
- <ng-template #contentTemplate>
3408
- <ng-content></ng-content>
3409
- </ng-template>
3410
- `, isInline: true, dependencies: [{ kind: "component", type: NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NzTableTitleFooterComponent, selector: "nz-table-title-footer", inputs: ["title", "footer"] }, { kind: "component", type: NzTableInnerScrollComponent, selector: "nz-table-inner-scroll", inputs: ["data", "scrollX", "scrollY", "contentTemplate", "widthConfig", "listOfColWidth", "theadTemplate", "tfootTemplate", "tfootFixed", "virtualTemplate", "virtualItemSize", "virtualMaxBufferPx", "virtualMinBufferPx", "tableMainElement", "virtualForTrackBy", "verticalScrollBarWidth", "noDataVirtualHeight"] }, { kind: "component", type: NzTableInnerDefaultComponent, selector: "nz-table-inner-default", inputs: ["tableLayout", "listOfColWidth", "theadTemplate", "contentTemplate", "tfootTemplate"] }, { kind: "ngmodule", type: NzPaginationModule }, { kind: "component", type: NzPaginationComponent, selector: "nz-pagination", inputs: ["nzShowTotal", "nzItemRender", "nzSize", "nzPageSizeOptions", "nzShowSizeChanger", "nzShowQuickJumper", "nzSimple", "nzDisabled", "nzResponsive", "nzHideOnSinglePage", "nzTotal", "nzPageIndex", "nzPageSize", "nzAlign"], outputs: ["nzPageSizeChange", "nzPageIndexChange"], exportAs: ["nzPagination"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None })), _a;
3411
- })();
3412
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTableComponent, decorators: [{
3413
- type: Component,
3414
- args: [{
3415
- selector: "nz-table",
3416
- exportAs: "nzTable",
3417
- providers: [NzTableStyleService, NzTableDataService],
3418
- changeDetection: ChangeDetectionStrategy.OnPush,
3419
- encapsulation: ViewEncapsulation.None,
3420
- template: `
3421
- <nz-spin [nzDelay]="nzLoadingDelay" [nzSpinning]="nzLoading" [nzIndicator]="nzLoadingIndicator">
3422
- @if (nzPaginationPosition === 'both' || nzPaginationPosition === 'top') {
3423
- <ng-template [ngTemplateOutlet]="paginationTemplate"></ng-template>
3424
- }
3425
- <div
3426
- #tableMainElement
3427
- class="ant-table"
3428
- [class.ant-table-rtl]="dir === 'rtl'"
3429
- [class.ant-table-fixed-header]="nzData.length && scrollY"
3430
- [class.ant-table-fixed-column]="scrollX"
3431
- [class.ant-table-has-fix-left]="hasFixLeft"
3432
- [class.ant-table-has-fix-right]="hasFixRight"
3433
- [class.ant-table-bordered]="nzBordered"
3434
- [class.nz-table-out-bordered]="nzOuterBordered && !nzBordered"
3435
- [class.ant-table-middle]="nzSize === 'middle'"
3436
- [class.ant-table-small]="nzSize === 'small'"
3437
- >
3438
- @if (nzTitle) {
3439
- <nz-table-title-footer [title]="nzTitle"></nz-table-title-footer>
3440
- }
3441
- @if (scrollY || scrollX) {
3442
- <nz-table-inner-scroll
3443
- [data]="data"
3444
- [scrollX]="scrollX"
3445
- [scrollY]="scrollY"
3446
- [contentTemplate]="contentTemplate"
3447
- [listOfColWidth]="listOfAutoColWidth"
3448
- [theadTemplate]="theadTemplate"
3449
- [tfootTemplate]="tfootTemplate"
3450
- [tfootFixed]="tfootFixed"
3451
- [verticalScrollBarWidth]="verticalScrollBarWidth"
3452
- [virtualTemplate]="nzVirtualScrollDirective ? nzVirtualScrollDirective.templateRef : null"
3453
- [virtualItemSize]="nzVirtualItemSize"
3454
- [virtualMaxBufferPx]="nzVirtualMaxBufferPx"
3455
- [virtualMinBufferPx]="nzVirtualMinBufferPx"
3456
- [tableMainElement]="tableMainElement"
3457
- [virtualForTrackBy]="nzVirtualForTrackBy"
3458
- [noDataVirtualHeight]="noDataVirtualHeight"
3459
- ></nz-table-inner-scroll>
3460
- } @else {
3461
- <nz-table-inner-default
3462
- [tableLayout]="nzTableLayout"
3463
- [listOfColWidth]="listOfManualColWidth"
3464
- [theadTemplate]="theadTemplate"
3465
- [contentTemplate]="contentTemplate"
3466
- [tfootTemplate]="tfootTemplate"
3467
- ></nz-table-inner-default>
3468
- }
3469
- @if (nzFooter) {
3470
- <nz-table-title-footer [footer]="nzFooter"></nz-table-title-footer>
3471
- }
3472
- </div>
3473
- @if (nzPaginationPosition === 'both' || nzPaginationPosition === 'bottom') {
3474
- <ng-template [ngTemplateOutlet]="paginationTemplate"></ng-template>
3475
- }
3476
- </nz-spin>
3477
- <ng-template #paginationTemplate>
3478
- @if (nzShowPagination && data.length) {
3479
- <nz-pagination
3480
- [hidden]="!showPagination"
3481
- class="ant-table-pagination ant-table-pagination-right"
3482
- [nzShowSizeChanger]="nzShowSizeChanger"
3483
- [nzPageSizeOptions]="nzPageSizeOptions"
3484
- [nzItemRender]="nzItemRender!"
3485
- [nzShowQuickJumper]="nzShowQuickJumper"
3486
- [nzHideOnSinglePage]="nzHideOnSinglePage"
3487
- [nzShowTotal]="nzShowTotal"
3488
- [nzSize]="nzPaginationType === 'small' ? 'small' : nzSize === 'default' ? 'default' : 'small'"
3489
- [nzPageSize]="nzPageSize"
3490
- [nzTotal]="nzTotal"
3491
- [nzSimple]="nzSimple"
3492
- [nzPageIndex]="nzPageIndex"
3493
- (nzPageSizeChange)="onPageSizeChange($event)"
3494
- (nzPageIndexChange)="onPageIndexChange($event)"
3495
- ></nz-pagination>
3496
- }
3497
- </ng-template>
3498
- <ng-template #contentTemplate>
3499
- <ng-content></ng-content>
3500
- </ng-template>
3501
- `,
3502
- host: {
3503
- class: "ant-table-wrapper",
3504
- "[class.ant-table-wrapper-rtl]": 'dir === "rtl"',
3505
- "[class.ant-table-custom-column]": `nzCustomColumn.length`
3506
- },
3507
- imports: [
3508
- NzSpinComponent,
3509
- NgTemplateOutlet,
3510
- NzTableTitleFooterComponent,
3511
- NzTableInnerScrollComponent,
3512
- NzTableInnerDefaultComponent,
3513
- NzPaginationModule
3514
- ]
3515
- }]
3516
- }], ctorParameters: () => [], propDecorators: { nzTableLayout: [{
3517
- type: Input
3518
- }], nzShowTotal: [{
3519
- type: Input
3520
- }], nzItemRender: [{
3521
- type: Input
3522
- }], nzTitle: [{
3523
- type: Input
3524
- }], nzFooter: [{
3525
- type: Input
3526
- }], nzNoResult: [{
3527
- type: Input
3528
- }], nzPageSizeOptions: [{
3529
- type: Input
3530
- }], nzVirtualItemSize: [{
3531
- type: Input
3532
- }], nzVirtualMaxBufferPx: [{
3533
- type: Input
3534
- }], nzVirtualMinBufferPx: [{
3535
- type: Input
3536
- }], nzVirtualForTrackBy: [{
3537
- type: Input
3538
- }], nzLoadingDelay: [{
3539
- type: Input
3540
- }], nzPageIndex: [{
3541
- type: Input
3542
- }], nzPageSize: [{
3543
- type: Input
3544
- }], nzTotal: [{
3545
- type: Input
3546
- }], nzWidthConfig: [{
3547
- type: Input
3548
- }], nzData: [{
3549
- type: Input
3550
- }], nzCustomColumn: [{
3551
- type: Input
3552
- }], nzPaginationPosition: [{
3553
- type: Input
3554
- }], nzScroll: [{
3555
- type: Input
3556
- }], noDataVirtualHeight: [{
3557
- type: Input
3558
- }], nzPaginationType: [{
3559
- type: Input
3560
- }], nzFrontPagination: [{
3561
- type: Input,
3562
- args: [{ transform: booleanAttribute }]
3563
- }], nzTemplateMode: [{
3564
- type: Input,
3565
- args: [{ transform: booleanAttribute }]
3566
- }], nzShowPagination: [{
3567
- type: Input,
3568
- args: [{ transform: booleanAttribute }]
3569
- }], nzLoading: [{
3570
- type: Input,
3571
- args: [{ transform: booleanAttribute }]
3572
- }], nzOuterBordered: [{
3573
- type: Input,
3574
- args: [{ transform: booleanAttribute }]
3575
- }], nzLoadingIndicator: [{
3576
- type: Input
3577
- }], nzBordered: [{
3578
- type: Input,
3579
- args: [{ transform: booleanAttribute }]
3580
- }], nzSize: [{
3581
- type: Input
3582
- }], nzShowSizeChanger: [{
3583
- type: Input,
3584
- args: [{ transform: booleanAttribute }]
3585
- }], nzHideOnSinglePage: [{
3586
- type: Input,
3587
- args: [{ transform: booleanAttribute }]
3588
- }], nzShowQuickJumper: [{
3589
- type: Input,
3590
- args: [{ transform: booleanAttribute }]
3591
- }], nzSimple: [{
3592
- type: Input,
3593
- args: [{ transform: booleanAttribute }]
3594
- }], nzPageSizeChange: [{
3595
- type: Output
3596
- }], nzPageIndexChange: [{
3597
- type: Output
3598
- }], nzQueryParams: [{
3599
- type: Output
3600
- }], nzCurrentPageDataChange: [{
3601
- type: Output
3602
- }], nzCustomColumnChange: [{
3603
- type: Output
3604
- }], nzVirtualScrollDirective: [{
3605
- type: ContentChild,
3606
- args: [NzTableVirtualScrollDirective, { static: false }]
3607
- }], nzTableInnerScrollComponent: [{
3608
- type: ViewChild,
3609
- args: [NzTableInnerScrollComponent]
3610
- }] } });
3611
- function fixedAttribute(value) {
3612
- return value === "top" || value === "bottom" ? value : booleanAttribute(value) ? "bottom" : null;
3613
- }
3614
- var NzTfootSummaryComponent = class _NzTfootSummaryComponent {
3615
- nzFixed = null;
3616
- templateRef;
3617
- nzTableStyleService = inject(NzTableStyleService, { optional: true });
3618
- isInsideTable = !!this.nzTableStyleService;
3619
- ngOnInit() {
3620
- this.nzTableStyleService?.setTfootTemplate(this.templateRef);
3621
- }
3622
- ngOnChanges(changes) {
3623
- const { nzFixed } = changes;
3624
- this.nzTableStyleService?.setTfootFixed(nzFixed.currentValue);
3625
- }
3626
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTfootSummaryComponent, deps: [], target: FactoryTarget.Component });
3627
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzTfootSummaryComponent, isStandalone: true, selector: "tfoot[nzSummary]", inputs: { nzFixed: ["nzFixed", "nzFixed", fixedAttribute] }, host: { properties: { "class.ant-table-summary": "!isInsideTable || !nzFixed" } }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["contentTemplate"], descendants: true, static: true }], usesOnChanges: true, ngImport: core_exports, template: `
3628
- <ng-template #contentTemplate>
3629
- <ng-content></ng-content>
3630
- </ng-template>
3631
- @if (!isInsideTable || !nzFixed) {
3632
- <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
3633
- }
3634
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
3635
- };
3636
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTfootSummaryComponent, decorators: [{
3637
- type: Component,
3638
- args: [{
3639
- selector: "tfoot[nzSummary]",
3640
- changeDetection: ChangeDetectionStrategy.OnPush,
3641
- encapsulation: ViewEncapsulation.None,
3642
- template: `
3643
- <ng-template #contentTemplate>
3644
- <ng-content></ng-content>
3645
- </ng-template>
3646
- @if (!isInsideTable || !nzFixed) {
3647
- <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
3648
- }
3649
- `,
3650
- imports: [NgTemplateOutlet],
3651
- host: {
3652
- "[class.ant-table-summary]": "!isInsideTable || !nzFixed"
3653
- }
3654
- }]
3655
- }], propDecorators: { nzFixed: [{
3656
- type: Input,
3657
- args: [{ transform: fixedAttribute }]
3658
- }], templateRef: [{
3659
- type: ViewChild,
3660
- args: ["contentTemplate", { static: true }]
3661
- }] } });
3662
- var NzTrDirective = class _NzTrDirective {
3663
- destroyRef = inject(DestroyRef);
3664
- listOfNzThDirective;
3665
- listOfCellFixedDirective;
3666
- listOfFixedColumns$ = new ReplaySubject(1);
3667
- listOfColumns$ = new ReplaySubject(1);
3668
- listOfFixedColumnsChanges$ = this.listOfFixedColumns$.pipe(switchMap((list) => merge(this.listOfFixedColumns$, ...list.map((c) => c.changes$)).pipe(mergeMap(() => this.listOfFixedColumns$))), takeUntilDestroyed(this.destroyRef));
3669
- listOfFixedLeftColumnChanges$ = this.listOfFixedColumnsChanges$.pipe(map((list) => list.filter((item) => item.nzLeft !== false)));
3670
- listOfFixedRightColumnChanges$ = this.listOfFixedColumnsChanges$.pipe(map((list) => list.filter((item) => item.nzRight !== false)));
3671
- listOfColumnsChanges$ = this.listOfColumns$.pipe(switchMap((list) => merge(this.listOfColumns$, ...list.map((c) => c.changes$)).pipe(mergeMap(() => this.listOfColumns$))), takeUntilDestroyed(this.destroyRef));
3672
- nzTableStyleService = inject(NzTableStyleService, { optional: true });
3673
- isInsideTable = !!this.nzTableStyleService;
3674
- ngAfterContentInit() {
3675
- if (this.nzTableStyleService) {
3676
- this.listOfCellFixedDirective.changes.pipe(startWith(this.listOfCellFixedDirective), takeUntilDestroyed(this.destroyRef)).subscribe(this.listOfFixedColumns$);
3677
- this.listOfNzThDirective.changes.pipe(startWith(this.listOfNzThDirective), takeUntilDestroyed(this.destroyRef)).subscribe(this.listOfColumns$);
3678
- this.listOfFixedLeftColumnChanges$.subscribe((listOfFixedLeft) => {
3679
- listOfFixedLeft.forEach((cell) => cell.setIsLastLeft(cell === listOfFixedLeft[listOfFixedLeft.length - 1]));
3680
- });
3681
- this.listOfFixedRightColumnChanges$.subscribe((listOfFixedRight) => {
3682
- listOfFixedRight.forEach((cell) => cell.setIsFirstRight(cell === listOfFixedRight[0]));
3683
- });
3684
- combineLatest([this.nzTableStyleService.listOfListOfThWidth$, this.listOfFixedLeftColumnChanges$]).pipe(takeUntilDestroyed(this.destroyRef)).subscribe(([listOfAutoWidth, listOfLeftCell]) => {
3685
- listOfLeftCell.forEach((cell, index) => {
3686
- if (cell.isAutoLeft) {
3687
- const currentArray = listOfLeftCell.slice(0, index);
3688
- const count = currentArray.reduce((pre, cur) => pre + (cur.colspan || cur.colSpan || 1), 0);
3689
- const width = listOfAutoWidth.slice(0, count).reduce((pre, cur) => pre + cur, 0);
3690
- cell.setAutoLeftWidth(`${width}px`);
3691
- }
3692
- });
3693
- });
3694
- combineLatest([this.nzTableStyleService.listOfListOfThWidth$, this.listOfFixedRightColumnChanges$]).pipe(takeUntilDestroyed(this.destroyRef)).subscribe(([listOfAutoWidth, listOfRightCell]) => {
3695
- listOfRightCell.forEach((_, index) => {
3696
- const cell = listOfRightCell[listOfRightCell.length - index - 1];
3697
- if (cell.isAutoRight) {
3698
- const currentArray = listOfRightCell.slice(listOfRightCell.length - index, listOfRightCell.length);
3699
- const count = currentArray.reduce((pre, cur) => pre + (cur.colspan || cur.colSpan || 1), 0);
3700
- const width = listOfAutoWidth.slice(listOfAutoWidth.length - count, listOfAutoWidth.length).reduce((pre, cur) => pre + cur, 0);
3701
- cell.setAutoRightWidth(`${width}px`);
3702
- }
3703
- });
3704
- });
3705
- }
3706
- }
3707
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTrDirective, deps: [], target: FactoryTarget.Directive });
3708
- static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzTrDirective, isStandalone: true, selector: "tr:not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])", host: { properties: { "class.ant-table-row": "isInsideTable" } }, queries: [{ propertyName: "listOfNzThDirective", predicate: NzThMeasureDirective }, { propertyName: "listOfCellFixedDirective", predicate: NzCellFixedDirective }], ngImport: core_exports });
3709
- };
3710
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTrDirective, decorators: [{
3711
- type: Directive,
3712
- args: [{
3713
- selector: "tr:not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])",
3714
- host: {
3715
- "[class.ant-table-row]": "isInsideTable"
3716
- }
3717
- }]
3718
- }], propDecorators: { listOfNzThDirective: [{
3719
- type: ContentChildren,
3720
- args: [NzThMeasureDirective]
3721
- }], listOfCellFixedDirective: [{
3722
- type: ContentChildren,
3723
- args: [NzCellFixedDirective]
3724
- }] } });
3725
- var NzTheadComponent = class _NzTheadComponent {
3726
- nzTableStyleService = inject(NzTableStyleService, { optional: true });
3727
- nzTableDataService = inject(NzTableDataService, { optional: true });
3728
- destroyRef = inject(DestroyRef);
3729
- el = inject(ElementRef).nativeElement;
3730
- renderer = inject(Renderer2);
3731
- isInsideTable = !!this.nzTableStyleService;
3732
- templateRef;
3733
- listOfNzTrDirective;
3734
- listOfNzThAddOnComponent;
3735
- nzSortOrderChange = new EventEmitter();
3736
- ngOnInit() {
3737
- if (this.nzTableStyleService) {
3738
- this.nzTableStyleService.setTheadTemplate(this.templateRef);
3739
- }
3740
- }
3741
- ngAfterContentInit() {
3742
- if (this.nzTableStyleService) {
3743
- const firstTableRow$ = this.listOfNzTrDirective.changes.pipe(startWith(this.listOfNzTrDirective), map((item) => item && item.first), takeUntilDestroyed(this.destroyRef));
3744
- const listOfColumnsChanges$ = firstTableRow$.pipe(switchMap((firstTableRow) => firstTableRow ? firstTableRow.listOfColumnsChanges$ : EMPTY));
3745
- listOfColumnsChanges$.subscribe((data) => this.nzTableStyleService.setListOfTh(data));
3746
- this.nzTableStyleService.enableAutoMeasure$.pipe(switchMap((enable) => enable ? listOfColumnsChanges$ : of([]))).pipe(takeUntilDestroyed(this.destroyRef)).subscribe((data) => this.nzTableStyleService.setListOfMeasureColumn(data));
3747
- const listOfFixedLeftColumnChanges$ = firstTableRow$.pipe(switchMap((firstTr) => firstTr ? firstTr.listOfFixedLeftColumnChanges$ : EMPTY));
3748
- const listOfFixedRightColumnChanges$ = firstTableRow$.pipe(switchMap((firstTr) => firstTr ? firstTr.listOfFixedRightColumnChanges$ : EMPTY));
3749
- listOfFixedLeftColumnChanges$.subscribe((listOfFixedLeftColumn) => {
3750
- this.nzTableStyleService.setHasFixLeft(listOfFixedLeftColumn.length !== 0);
3751
- });
3752
- listOfFixedRightColumnChanges$.subscribe((listOfFixedRightColumn) => {
3753
- this.nzTableStyleService.setHasFixRight(listOfFixedRightColumn.length !== 0);
3754
- });
3755
- }
3756
- if (this.nzTableDataService) {
3757
- const listOfColumn$ = this.listOfNzThAddOnComponent.changes.pipe(startWith(this.listOfNzThAddOnComponent));
3758
- const manualSort$ = listOfColumn$.pipe(switchMap(() => merge(...this.listOfNzThAddOnComponent.map((th) => th.manualClickOrder$))), takeUntilDestroyed(this.destroyRef));
3759
- manualSort$.subscribe((data) => {
3760
- const emitValue = { key: data.nzColumnKey, value: data.sortOrder };
3761
- this.nzSortOrderChange.emit(emitValue);
3762
- if (data.nzSortFn && data.nzSortPriority === false) {
3763
- this.listOfNzThAddOnComponent.filter((th) => th !== data).forEach((th) => th.clearSortOrder());
3764
- }
3765
- });
3766
- const listOfCalcOperator$ = listOfColumn$.pipe(
3767
- switchMap((list) => merge(listOfColumn$, ...list.map((c) => c.calcOperatorChange$)).pipe(mergeMap(() => listOfColumn$))),
3768
- map((list) => list.filter((item) => !!item.nzSortFn || !!item.nzFilterFn).map((item) => {
3769
- const { nzSortFn, sortOrder, nzFilterFn, nzFilterValue, nzSortPriority, nzColumnKey } = item;
3770
- return {
3771
- key: nzColumnKey,
3772
- sortFn: nzSortFn,
3773
- sortPriority: nzSortPriority,
3774
- sortOrder,
3775
- filterFn: nzFilterFn,
3776
- filterValue: nzFilterValue
3777
- };
3778
- })),
3779
- // TODO: after checked error here
3780
- delay(0),
3781
- takeUntilDestroyed(this.destroyRef)
3782
- );
3783
- listOfCalcOperator$.subscribe((list) => {
3784
- this.nzTableDataService?.listOfCalcOperator$.next(list);
3785
- });
3786
- }
3787
- }
3788
- ngAfterViewInit() {
3789
- if (this.nzTableStyleService) {
3790
- this.renderer.removeChild(this.renderer.parentNode(this.el), this.el);
3791
- }
3792
- }
3793
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTheadComponent, deps: [], target: FactoryTarget.Component });
3794
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzTheadComponent, isStandalone: true, selector: "thead:not(.ant-table-thead)", outputs: { nzSortOrderChange: "nzSortOrderChange" }, queries: [{ propertyName: "listOfNzTrDirective", predicate: NzTrDirective, descendants: true }, { propertyName: "listOfNzThAddOnComponent", predicate: NzThAddOnComponent, descendants: true }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["contentTemplate"], descendants: true, static: true }], ngImport: core_exports, template: `
3795
- <ng-template #contentTemplate>
3796
- <ng-content></ng-content>
3797
- </ng-template>
3798
- @if (!isInsideTable) {
3799
- <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
3800
- }
3801
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
3802
- };
3803
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTheadComponent, decorators: [{
3804
- type: Component,
3805
- args: [{
3806
- selector: "thead:not(.ant-table-thead)",
3807
- changeDetection: ChangeDetectionStrategy.OnPush,
3808
- encapsulation: ViewEncapsulation.None,
3809
- template: `
3810
- <ng-template #contentTemplate>
3811
- <ng-content></ng-content>
3812
- </ng-template>
3813
- @if (!isInsideTable) {
3814
- <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
3815
- }
3816
- `,
3817
- imports: [NgTemplateOutlet]
3818
- }]
3819
- }], propDecorators: { templateRef: [{
3820
- type: ViewChild,
3821
- args: ["contentTemplate", { static: true }]
3822
- }], listOfNzTrDirective: [{
3823
- type: ContentChildren,
3824
- args: [NzTrDirective, { descendants: true }]
3825
- }], listOfNzThAddOnComponent: [{
3826
- type: ContentChildren,
3827
- args: [NzThAddOnComponent, { descendants: true }]
3828
- }], nzSortOrderChange: [{
3829
- type: Output
3830
- }] } });
3831
- var NzTrExpandDirective = class _NzTrExpandDirective {
3832
- nzExpand = true;
3833
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTrExpandDirective, deps: [], target: FactoryTarget.Directive });
3834
- static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "16.1.0", version: "20.3.0", type: _NzTrExpandDirective, isStandalone: true, selector: "tr[nzExpand]", inputs: { nzExpand: ["nzExpand", "nzExpand", booleanAttribute] }, host: { properties: { "hidden": "!nzExpand" }, classAttribute: "ant-table-expanded-row" }, ngImport: core_exports });
3835
- };
3836
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTrExpandDirective, decorators: [{
3837
- type: Directive,
3838
- args: [{
3839
- selector: "tr[nzExpand]",
3840
- host: {
3841
- class: "ant-table-expanded-row",
3842
- "[hidden]": `!nzExpand`
3843
- }
3844
- }]
3845
- }], propDecorators: { nzExpand: [{
3846
- type: Input,
3847
- args: [{ transform: booleanAttribute }]
3848
- }] } });
3849
- var NzTableModule = class _NzTableModule {
3850
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableModule, deps: [], target: FactoryTarget.NgModule });
3851
- static \u0275mod = \u0275\u0275ngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableModule, imports: [
3852
- NzTableComponent,
3853
- NzThAddOnComponent,
3854
- NzTableCellDirective,
3855
- NzThMeasureDirective,
3856
- NzTdAddOnComponent,
3857
- NzTheadComponent,
3858
- NzTbodyComponent,
3859
- NzTrDirective,
3860
- NzTrExpandDirective,
3861
- NzTfootSummaryComponent,
3862
- NzTableVirtualScrollDirective,
3863
- NzCellFixedDirective,
3864
- NzCustomColumnDirective,
3865
- NzTableContentComponent,
3866
- NzTableTitleFooterComponent,
3867
- NzTableInnerDefaultComponent,
3868
- NzTableInnerScrollComponent,
3869
- NzTrMeasureComponent,
3870
- NzRowIndentDirective,
3871
- NzRowExpandButtonDirective,
3872
- NzCellBreakWordDirective,
3873
- NzCellAlignDirective,
3874
- NzTableSortersComponent,
3875
- NzTableFilterComponent,
3876
- NzTableSelectionComponent,
3877
- NzCellEllipsisDirective,
3878
- NzFilterTriggerComponent,
3879
- NzTableFixedRowComponent,
3880
- NzThSelectionComponent
3881
- ], exports: [
3882
- NzTableComponent,
3883
- NzThAddOnComponent,
3884
- NzTableCellDirective,
3885
- NzThMeasureDirective,
3886
- NzTdAddOnComponent,
3887
- NzTheadComponent,
3888
- NzTbodyComponent,
3889
- NzTrDirective,
3890
- NzTableVirtualScrollDirective,
3891
- NzCellFixedDirective,
3892
- NzCustomColumnDirective,
3893
- NzFilterTriggerComponent,
3894
- NzTrExpandDirective,
3895
- NzTfootSummaryComponent,
3896
- NzCellBreakWordDirective,
3897
- NzCellAlignDirective,
3898
- NzCellEllipsisDirective,
3899
- NzTableFixedRowComponent,
3900
- NzThSelectionComponent
3901
- ] });
3902
- static \u0275inj = \u0275\u0275ngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTableModule, imports: [
3903
- NzTableComponent,
3904
- NzThAddOnComponent,
3905
- NzTdAddOnComponent,
3906
- NzTbodyComponent,
3907
- NzTableTitleFooterComponent,
3908
- NzTableInnerScrollComponent,
3909
- NzTableSortersComponent,
3910
- NzTableFilterComponent,
3911
- NzTableSelectionComponent,
3912
- NzFilterTriggerComponent,
3913
- NzThSelectionComponent
3914
- ] });
3915
- };
3916
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTableModule, decorators: [{
3917
- type: NgModule,
3918
- args: [{
3919
- imports: [
3920
- NzTableComponent,
3921
- NzThAddOnComponent,
3922
- NzTableCellDirective,
3923
- NzThMeasureDirective,
3924
- NzTdAddOnComponent,
3925
- NzTheadComponent,
3926
- NzTbodyComponent,
3927
- NzTrDirective,
3928
- NzTrExpandDirective,
3929
- NzTfootSummaryComponent,
3930
- NzTableVirtualScrollDirective,
3931
- NzCellFixedDirective,
3932
- NzCustomColumnDirective,
3933
- NzTableContentComponent,
3934
- NzTableTitleFooterComponent,
3935
- NzTableInnerDefaultComponent,
3936
- NzTableInnerScrollComponent,
3937
- NzTrMeasureComponent,
3938
- NzRowIndentDirective,
3939
- NzRowExpandButtonDirective,
3940
- NzCellBreakWordDirective,
3941
- NzCellAlignDirective,
3942
- NzTableSortersComponent,
3943
- NzTableFilterComponent,
3944
- NzTableSelectionComponent,
3945
- NzCellEllipsisDirective,
3946
- NzFilterTriggerComponent,
3947
- NzTableFixedRowComponent,
3948
- NzThSelectionComponent
3949
- ],
3950
- exports: [
3951
- NzTableComponent,
3952
- NzThAddOnComponent,
3953
- NzTableCellDirective,
3954
- NzThMeasureDirective,
3955
- NzTdAddOnComponent,
3956
- NzTheadComponent,
3957
- NzTbodyComponent,
3958
- NzTrDirective,
3959
- NzTableVirtualScrollDirective,
3960
- NzCellFixedDirective,
3961
- NzCustomColumnDirective,
3962
- NzFilterTriggerComponent,
3963
- NzTrExpandDirective,
3964
- NzTfootSummaryComponent,
3965
- NzCellBreakWordDirective,
3966
- NzCellAlignDirective,
3967
- NzCellEllipsisDirective,
3968
- NzTableFixedRowComponent,
3969
- NzThSelectionComponent
3970
- ]
3971
- }]
3972
- }] });
3973
-
3974
- export {
3975
- NzPaginationModule,
3976
- NzTableModule
3977
- };
3978
- //# sourceMappingURL=chunk-UYJ3FVRV.js.map