@ng-nest/ui 17.0.11 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (923) hide show
  1. package/README.md +1 -1
  2. package/affix/affix.component.d.ts +0 -2
  3. package/affix/affix.property.d.ts +12 -7
  4. package/alert/alert.component.d.ts +12 -11
  5. package/alert/alert.property.d.ts +36 -35
  6. package/anchor/anchor.component.d.ts +15 -18
  7. package/anchor/anchor.property.d.ts +17 -8
  8. package/api/api.component.d.ts +2 -7
  9. package/auto-complete/auto-complete-portal.component.d.ts +20 -25
  10. package/auto-complete/auto-complete.component.d.ts +17 -34
  11. package/auto-complete/auto-complete.property.d.ts +282 -20
  12. package/avatar/avatar.component.d.ts +29 -19
  13. package/avatar/avatar.property.d.ts +78 -12
  14. package/back-top/back-top.component.d.ts +12 -17
  15. package/back-top/back-top.property.d.ts +12 -8
  16. package/badge/badge.component.d.ts +9 -16
  17. package/badge/badge.property.d.ts +95 -13
  18. package/base-form/base-form.component.d.ts +53 -26
  19. package/base-form/base-form.module.d.ts +1 -2
  20. package/base-form/base-form.property.d.ts +173 -45
  21. package/button/button.component.d.ts +16 -14
  22. package/button/button.property.d.ts +242 -100
  23. package/button/buttons.component.d.ts +8 -10
  24. package/calendar/calendar.component.d.ts +41 -27
  25. package/calendar/calendar.property.d.ts +69 -10
  26. package/card/card.component.d.ts +4 -6
  27. package/card/card.property.d.ts +50 -9
  28. package/carousel/carousel-panel.component.d.ts +15 -14
  29. package/carousel/carousel.component.d.ts +18 -19
  30. package/carousel/carousel.property.d.ts +168 -28
  31. package/cascade/cascade-portal.component.d.ts +28 -28
  32. package/cascade/cascade.component.d.ts +24 -30
  33. package/cascade/cascade.property.d.ts +292 -20
  34. package/checkbox/checkbox.component.d.ts +17 -17
  35. package/checkbox/checkbox.property.d.ts +274 -35
  36. package/collapse/collapse-panel.component.d.ts +5 -2
  37. package/collapse/collapse.component.d.ts +3 -7
  38. package/collapse/collapse.property.d.ts +113 -20
  39. package/color/color.component.d.ts +4 -9
  40. package/color/color.property.d.ts +36 -8
  41. package/color-picker/color-picker-portal.component.d.ts +40 -52
  42. package/color-picker/color-picker.component.d.ts +19 -28
  43. package/color-picker/color-picker.property.d.ts +260 -10
  44. package/comment/comment-reply.component.d.ts +1 -8
  45. package/comment/comment.component.d.ts +4 -14
  46. package/comment/comment.property.d.ts +21 -15
  47. package/container/aside.component.d.ts +3 -8
  48. package/container/container.component.d.ts +5 -9
  49. package/container/container.property.d.ts +33 -19
  50. package/container/footer.component.d.ts +2 -5
  51. package/container/header.component.d.ts +2 -5
  52. package/container/main.component.d.ts +2 -7
  53. package/core/animation/badge.d.ts +8 -0
  54. package/core/animation/connect.d.ts +8 -1
  55. package/core/animation/consts.d.ts +4 -0
  56. package/core/animation/drop.d.ts +4 -0
  57. package/core/animation/fade.d.ts +4 -0
  58. package/core/animation/move.d.ts +4 -0
  59. package/core/animation/opacity.d.ts +4 -0
  60. package/core/animation/slide.d.ts +4 -1
  61. package/core/config/config.d.ts +174 -108
  62. package/core/config/config.service.d.ts +5 -5
  63. package/core/config/index.d.ts +1 -0
  64. package/core/functions/chunk.d.ts +12 -1
  65. package/core/functions/clone-deep.d.ts +16 -0
  66. package/core/functions/convert.d.ts +77 -4
  67. package/core/functions/csspx.d.ts +5 -0
  68. package/core/functions/date.d.ts +59 -3
  69. package/core/functions/drop.d.ts +13 -1
  70. package/core/functions/flex.d.ts +4 -0
  71. package/core/functions/group-by.d.ts +5 -1
  72. package/core/functions/guid.d.ts +2 -1
  73. package/core/functions/has-in.d.ts +4 -0
  74. package/core/functions/order-by.d.ts +5 -1
  75. package/core/functions/parent-path.d.ts +8 -0
  76. package/core/functions/property.d.ts +12 -6
  77. package/core/functions/public-api.d.ts +1 -0
  78. package/core/functions/remove.d.ts +5 -1
  79. package/core/functions/resize.d.ts +13 -1
  80. package/core/interfaces/data.type.d.ts +172 -3
  81. package/core/interfaces/identify.type.d.ts +60 -0
  82. package/core/interfaces/layout.type.d.ts +88 -37
  83. package/core/interfaces/result-list.type.d.ts +91 -3
  84. package/core/services/http.service.d.ts +0 -22
  85. package/core/services/repository.service.d.ts +1 -1
  86. package/core/services/reuse-strategy.service.d.ts +0 -22
  87. package/core/services/storage.service.d.ts +0 -21
  88. package/core/theme/theme.d.ts +45 -1
  89. package/core/theme/theme.service.d.ts +46 -11
  90. package/core/util/animation.d.ts +1 -1
  91. package/core/util/camel-to-kebab.d.ts +13 -0
  92. package/core/util/check.d.ts +10 -2
  93. package/core/util/computed-style.d.ts +8 -0
  94. package/core/util/host.d.ts +3 -2
  95. package/core/util/html.d.ts +3 -2
  96. package/core/util/kebab-to-camel.d.ts +13 -0
  97. package/core/util/log.d.ts +10 -2
  98. package/core/util/option.d.ts +3 -4
  99. package/core/util/public-api.d.ts +2 -0
  100. package/crumb/crumb.component.d.ts +1 -10
  101. package/crumb/crumb.property.d.ts +12 -8
  102. package/date-picker/date-picker-portal.component.d.ts +80 -33
  103. package/date-picker/date-picker.component.d.ts +74 -32
  104. package/date-picker/date-picker.property.d.ts +662 -214
  105. package/date-picker/date-range-portal.component.d.ts +102 -49
  106. package/date-picker/date-range.component.d.ts +87 -43
  107. package/date-picker/picker-date.component.d.ts +63 -17
  108. package/date-picker/picker-month.component.d.ts +59 -13
  109. package/date-picker/picker-quarter.component.d.ts +61 -15
  110. package/date-picker/picker-year.component.d.ts +8 -11
  111. package/description/description-item.component.d.ts +1 -1
  112. package/description/description.component.d.ts +6 -10
  113. package/description/description.property.d.ts +135 -16
  114. package/dialog/dialog-portal.component.d.ts +4 -4
  115. package/dialog/dialog-portal.directives.d.ts +1 -1
  116. package/dialog/dialog.component.d.ts +30 -23
  117. package/dialog/dialog.property.d.ts +77 -134
  118. package/doc/doc.component.d.ts +2 -5
  119. package/drag/drag.directive.d.ts +1 -1
  120. package/drag/drag.property.d.ts +4 -5
  121. package/drawer/drawer-container.component.d.ts +1 -1
  122. package/drawer/drawer-portal.component.d.ts +1 -1
  123. package/drawer/drawer.component.d.ts +15 -14
  124. package/drawer/drawer.property.d.ts +26 -18
  125. package/dropdown/dropdown-portal.component.d.ts +36 -45
  126. package/dropdown/dropdown.component.d.ts +17 -21
  127. package/dropdown/dropdown.property.d.ts +24 -21
  128. package/empty/empty.component.d.ts +0 -7
  129. package/empty/empty.property.d.ts +27 -4
  130. package/esm2022/affix/affix.component.mjs +6 -11
  131. package/esm2022/affix/affix.module.mjs +4 -4
  132. package/esm2022/affix/affix.property.mjs +22 -20
  133. package/esm2022/alert/alert.component.mjs +39 -44
  134. package/esm2022/alert/alert.module.mjs +4 -4
  135. package/esm2022/alert/alert.property.mjs +102 -107
  136. package/esm2022/anchor/anchor-inner.component.mjs +3 -3
  137. package/esm2022/anchor/anchor.component.mjs +73 -95
  138. package/esm2022/anchor/anchor.module.mjs +4 -4
  139. package/esm2022/anchor/anchor.property.mjs +45 -35
  140. package/esm2022/api/api.component.mjs +11 -14
  141. package/esm2022/api/api.module.mjs +4 -4
  142. package/esm2022/auto-complete/auto-complete-portal.component.mjs +36 -47
  143. package/esm2022/auto-complete/auto-complete.component.mjs +122 -162
  144. package/esm2022/auto-complete/auto-complete.module.mjs +4 -4
  145. package/esm2022/auto-complete/auto-complete.property.mjs +142 -55
  146. package/esm2022/avatar/avatar-group.component.mjs +3 -3
  147. package/esm2022/avatar/avatar.component.mjs +75 -81
  148. package/esm2022/avatar/avatar.module.mjs +4 -4
  149. package/esm2022/avatar/avatar.property.mjs +116 -45
  150. package/esm2022/back-top/back-top.component.mjs +57 -73
  151. package/esm2022/back-top/back-top.module.mjs +4 -4
  152. package/esm2022/back-top/back-top.property.mjs +37 -29
  153. package/esm2022/badge/badge.component.mjs +51 -59
  154. package/esm2022/badge/badge.module.mjs +4 -4
  155. package/esm2022/badge/badge.property.mjs +111 -38
  156. package/esm2022/base-form/base-form.component.mjs +89 -81
  157. package/esm2022/base-form/base-form.module.mjs +7 -8
  158. package/esm2022/base-form/base-form.property.mjs +200 -89
  159. package/esm2022/button/button.component.mjs +50 -59
  160. package/esm2022/button/button.module.mjs +4 -4
  161. package/esm2022/button/button.property.mjs +293 -98
  162. package/esm2022/button/buttons.component.mjs +35 -21
  163. package/esm2022/calendar/calendar.component.mjs +56 -84
  164. package/esm2022/calendar/calendar.module.mjs +4 -4
  165. package/esm2022/calendar/calendar.property.mjs +78 -24
  166. package/esm2022/card/card.component.mjs +10 -14
  167. package/esm2022/card/card.module.mjs +4 -4
  168. package/esm2022/card/card.property.mjs +57 -22
  169. package/esm2022/carousel/carousel-panel.component.mjs +98 -76
  170. package/esm2022/carousel/carousel.component.mjs +55 -65
  171. package/esm2022/carousel/carousel.module.mjs +4 -4
  172. package/esm2022/carousel/carousel.property.mjs +215 -85
  173. package/esm2022/cascade/cascade-portal.component.mjs +77 -69
  174. package/esm2022/cascade/cascade.component.mjs +107 -135
  175. package/esm2022/cascade/cascade.module.mjs +4 -4
  176. package/esm2022/cascade/cascade.property.mjs +137 -48
  177. package/esm2022/checkbox/checkbox.component.mjs +68 -83
  178. package/esm2022/checkbox/checkbox.module.mjs +4 -4
  179. package/esm2022/checkbox/checkbox.property.mjs +136 -73
  180. package/esm2022/collapse/collapse-panel.component.mjs +31 -21
  181. package/esm2022/collapse/collapse.component.mjs +16 -21
  182. package/esm2022/collapse/collapse.module.mjs +4 -4
  183. package/esm2022/collapse/collapse.property.mjs +156 -66
  184. package/esm2022/color/color.component.mjs +25 -26
  185. package/esm2022/color/color.module.mjs +4 -4
  186. package/esm2022/color/color.property.mjs +47 -27
  187. package/esm2022/color-picker/color-picker-portal.component.mjs +120 -130
  188. package/esm2022/color-picker/color-picker.component.mjs +76 -117
  189. package/esm2022/color-picker/color-picker.module.mjs +4 -4
  190. package/esm2022/color-picker/color-picker.property.mjs +123 -27
  191. package/esm2022/comment/comment-reply.component.mjs +9 -24
  192. package/esm2022/comment/comment.component.mjs +11 -40
  193. package/esm2022/comment/comment.module.mjs +4 -4
  194. package/esm2022/comment/comment.property.mjs +27 -50
  195. package/esm2022/container/aside.component.mjs +12 -15
  196. package/esm2022/container/container.component.mjs +21 -24
  197. package/esm2022/container/container.module.mjs +4 -4
  198. package/esm2022/container/container.property.mjs +55 -51
  199. package/esm2022/container/footer.component.mjs +14 -16
  200. package/esm2022/container/header.component.mjs +14 -16
  201. package/esm2022/container/main.component.mjs +10 -13
  202. package/esm2022/core/animation/badge.mjs +17 -3
  203. package/esm2022/core/animation/connect.mjs +17 -99
  204. package/esm2022/core/animation/consts.mjs +5 -1
  205. package/esm2022/core/animation/drop.mjs +5 -1
  206. package/esm2022/core/animation/fade.mjs +13 -3
  207. package/esm2022/core/animation/move.mjs +5 -1
  208. package/esm2022/core/animation/opacity.mjs +5 -1
  209. package/esm2022/core/animation/slide.mjs +5 -23
  210. package/esm2022/core/config/config.mjs +1 -1
  211. package/esm2022/core/config/config.service.mjs +11 -59
  212. package/esm2022/core/config/index.mjs +2 -0
  213. package/esm2022/core/functions/chunk.mjs +12 -1
  214. package/esm2022/core/functions/clone-deep.mjs +17 -1
  215. package/esm2022/core/functions/convert.mjs +110 -13
  216. package/esm2022/core/functions/csspx.mjs +17 -0
  217. package/esm2022/core/functions/date.mjs +80 -4
  218. package/esm2022/core/functions/drop.mjs +13 -1
  219. package/esm2022/core/functions/flex.mjs +5 -1
  220. package/esm2022/core/functions/group-by.mjs +5 -1
  221. package/esm2022/core/functions/guid.mjs +3 -2
  222. package/esm2022/core/functions/has-in.mjs +5 -1
  223. package/esm2022/core/functions/order-by.mjs +5 -1
  224. package/esm2022/core/functions/parent-path.mjs +9 -1
  225. package/esm2022/core/functions/property.mjs +16 -8
  226. package/esm2022/core/functions/public-api.mjs +2 -1
  227. package/esm2022/core/functions/remove.mjs +5 -1
  228. package/esm2022/core/functions/resize.mjs +7 -5
  229. package/esm2022/core/interfaces/data.type.mjs +97 -8
  230. package/esm2022/core/interfaces/identify.type.mjs +5 -2
  231. package/esm2022/core/interfaces/layout.type.mjs +1 -1
  232. package/esm2022/core/interfaces/result-list.type.mjs +1 -1
  233. package/esm2022/core/services/http.service.mjs +4 -33
  234. package/esm2022/core/services/preloading-strategy.service.mjs +4 -6
  235. package/esm2022/core/services/repository.service.mjs +1 -1
  236. package/esm2022/core/services/reuse-strategy.service.mjs +1 -26
  237. package/esm2022/core/services/storage.service.mjs +4 -26
  238. package/esm2022/core/theme/theme.mjs +55 -11
  239. package/esm2022/core/theme/theme.service.mjs +92 -20
  240. package/esm2022/core/util/animation.mjs +2 -23
  241. package/esm2022/core/util/camel-to-kebab.mjs +16 -0
  242. package/esm2022/core/util/check.mjs +11 -3
  243. package/esm2022/core/util/computed-style.mjs +9 -1
  244. package/esm2022/core/util/host.mjs +4 -3
  245. package/esm2022/core/util/html.mjs +5 -4
  246. package/esm2022/core/util/kebab-to-camel.mjs +16 -0
  247. package/esm2022/core/util/log.mjs +11 -3
  248. package/esm2022/core/util/option.mjs +4 -5
  249. package/esm2022/core/util/public-api.mjs +3 -1
  250. package/esm2022/crumb/crumb.component.mjs +6 -29
  251. package/esm2022/crumb/crumb.module.mjs +4 -4
  252. package/esm2022/crumb/crumb.property.mjs +21 -26
  253. package/esm2022/date-picker/date-picker-portal.component.mjs +86 -102
  254. package/esm2022/date-picker/date-picker.component.mjs +157 -191
  255. package/esm2022/date-picker/date-picker.module.mjs +4 -4
  256. package/esm2022/date-picker/date-picker.property.mjs +440 -462
  257. package/esm2022/date-picker/date-quarter.pipe.mjs +3 -3
  258. package/esm2022/date-picker/date-range-portal.component.mjs +172 -186
  259. package/esm2022/date-picker/date-range.component.mjs +224 -266
  260. package/esm2022/date-picker/picker-date.component.mjs +150 -150
  261. package/esm2022/date-picker/picker-month.component.mjs +115 -118
  262. package/esm2022/date-picker/picker-quarter.component.mjs +120 -119
  263. package/esm2022/date-picker/picker-year.component.mjs +121 -108
  264. package/esm2022/description/description-item.component.mjs +12 -11
  265. package/esm2022/description/description.component.mjs +33 -48
  266. package/esm2022/description/description.module.mjs +4 -4
  267. package/esm2022/description/description.property.mjs +175 -52
  268. package/esm2022/dialog/dialog-container.component.mjs +3 -3
  269. package/esm2022/dialog/dialog-portal.component.mjs +14 -20
  270. package/esm2022/dialog/dialog-portal.directives.mjs +20 -20
  271. package/esm2022/dialog/dialog-ref.mjs +1 -1
  272. package/esm2022/dialog/dialog.component.mjs +117 -131
  273. package/esm2022/dialog/dialog.module.mjs +4 -4
  274. package/esm2022/dialog/dialog.property.mjs +149 -139
  275. package/esm2022/dialog/dialog.service.mjs +7 -7
  276. package/esm2022/doc/doc.component.mjs +11 -12
  277. package/esm2022/doc/doc.module.mjs +4 -4
  278. package/esm2022/drag/drag.directive.mjs +8 -21
  279. package/esm2022/drag/drag.module.mjs +4 -4
  280. package/esm2022/drag/drag.property.mjs +10 -16
  281. package/esm2022/drawer/drawer-container.component.mjs +9 -9
  282. package/esm2022/drawer/drawer-portal.component.mjs +11 -13
  283. package/esm2022/drawer/drawer-portal.directives.mjs +9 -9
  284. package/esm2022/drawer/drawer.component.mjs +40 -59
  285. package/esm2022/drawer/drawer.module.mjs +4 -4
  286. package/esm2022/drawer/drawer.property.mjs +47 -54
  287. package/esm2022/drawer/drawer.service.mjs +6 -6
  288. package/esm2022/dropdown/dropdown-portal.component.mjs +90 -91
  289. package/esm2022/dropdown/dropdown.component.mjs +75 -91
  290. package/esm2022/dropdown/dropdown.module.mjs +4 -4
  291. package/esm2022/dropdown/dropdown.property.mjs +62 -59
  292. package/esm2022/empty/empty.component.mjs +6 -26
  293. package/esm2022/empty/empty.module.mjs +4 -4
  294. package/esm2022/empty/empty.property.mjs +41 -20
  295. package/esm2022/examples/examples.component.mjs +11 -12
  296. package/esm2022/examples/examples.module.mjs +4 -4
  297. package/esm2022/find/find.component.mjs +188 -232
  298. package/esm2022/find/find.module.mjs +4 -4
  299. package/esm2022/find/find.property.mjs +234 -193
  300. package/esm2022/form/control.component.mjs +138 -116
  301. package/esm2022/form/form.component.mjs +28 -36
  302. package/esm2022/form/form.module.mjs +4 -4
  303. package/esm2022/form/form.property.mjs +57 -55
  304. package/esm2022/highlight/highlight.component.mjs +54 -59
  305. package/esm2022/highlight/highlight.module.mjs +4 -4
  306. package/esm2022/highlight/highlight.property.mjs +25 -21
  307. package/esm2022/highlight/highlight.service.mjs +17 -0
  308. package/esm2022/highlight/public-api.mjs +2 -1
  309. package/esm2022/i18n/i18n.directive.mjs +17 -31
  310. package/esm2022/i18n/i18n.module.mjs +4 -4
  311. package/esm2022/i18n/i18n.pipe.mjs +4 -4
  312. package/esm2022/i18n/i18n.property.mjs +2 -2
  313. package/esm2022/i18n/i18n.service.mjs +4 -4
  314. package/esm2022/i18n/languages/ar_EG.mjs +122 -77
  315. package/esm2022/i18n/languages/bg_BG.mjs +135 -87
  316. package/esm2022/i18n/languages/ca_ES.mjs +130 -82
  317. package/esm2022/i18n/languages/cs_CZ.mjs +127 -79
  318. package/esm2022/i18n/languages/da_DK.mjs +129 -81
  319. package/esm2022/i18n/languages/de_DE.mjs +125 -77
  320. package/esm2022/i18n/languages/el_GR.mjs +132 -84
  321. package/esm2022/i18n/languages/en_GB.mjs +5 -2
  322. package/esm2022/i18n/languages/en_US.mjs +5 -2
  323. package/esm2022/i18n/languages/es_ES.mjs +131 -83
  324. package/esm2022/i18n/languages/et_EE.mjs +130 -82
  325. package/esm2022/i18n/languages/fa_IR.mjs +109 -61
  326. package/esm2022/i18n/languages/fi_FI.mjs +134 -86
  327. package/esm2022/i18n/languages/fr_BE.mjs +128 -80
  328. package/esm2022/i18n/languages/fr_FR.mjs +127 -79
  329. package/esm2022/i18n/languages/he_IL.mjs +119 -74
  330. package/esm2022/i18n/languages/hi_IN.mjs +104 -56
  331. package/esm2022/i18n/languages/hr_HR.mjs +133 -85
  332. package/esm2022/i18n/languages/hu_HU.mjs +132 -84
  333. package/esm2022/i18n/languages/hy_AM.mjs +133 -85
  334. package/esm2022/i18n/languages/id_ID.mjs +119 -71
  335. package/esm2022/i18n/languages/is_IS.mjs +125 -77
  336. package/esm2022/i18n/languages/it_IT.mjs +127 -79
  337. package/esm2022/i18n/languages/ja_JP.mjs +95 -47
  338. package/esm2022/i18n/languages/ka_GE.mjs +106 -58
  339. package/esm2022/i18n/languages/kn_IN.mjs +110 -62
  340. package/esm2022/i18n/languages/ko_KR.mjs +126 -70
  341. package/esm2022/i18n/languages/ku_IQ.mjs +117 -85
  342. package/esm2022/i18n/languages/lv_LV.mjs +128 -72
  343. package/esm2022/i18n/languages/mn_MN.mjs +138 -82
  344. package/esm2022/i18n/languages/ms_MY.mjs +124 -68
  345. package/esm2022/i18n/languages/nb_NO.mjs +133 -77
  346. package/esm2022/i18n/languages/ne_NP.mjs +117 -61
  347. package/esm2022/i18n/languages/nl_BE.mjs +134 -78
  348. package/esm2022/i18n/languages/nl_NL.mjs +134 -78
  349. package/esm2022/i18n/languages/pl_PL.mjs +132 -76
  350. package/esm2022/i18n/languages/pt_BR.mjs +133 -77
  351. package/esm2022/i18n/languages/pt_PT.mjs +133 -77
  352. package/esm2022/i18n/languages/ro_RO.mjs +130 -74
  353. package/esm2022/i18n/languages/ru_RU.mjs +131 -75
  354. package/esm2022/i18n/languages/sk_SK.mjs +130 -83
  355. package/esm2022/i18n/languages/sl_SI.mjs +121 -73
  356. package/esm2022/i18n/languages/sr_RS.mjs +138 -90
  357. package/esm2022/i18n/languages/sv_SE.mjs +132 -84
  358. package/esm2022/i18n/languages/ta_IN.mjs +117 -61
  359. package/esm2022/i18n/languages/th_TH.mjs +99 -43
  360. package/esm2022/i18n/languages/tr_TR.mjs +126 -70
  361. package/esm2022/i18n/languages/uk_UA.mjs +124 -68
  362. package/esm2022/i18n/languages/vi_VN.mjs +133 -77
  363. package/esm2022/i18n/languages/zh_CN.mjs +5 -2
  364. package/esm2022/i18n/languages/zh_TW.mjs +5 -2
  365. package/esm2022/icon/icon.component.mjs +46 -77
  366. package/esm2022/icon/icon.module.mjs +4 -4
  367. package/esm2022/icon/icon.property.mjs +52 -30
  368. package/esm2022/icon/icon.service.mjs +15 -14
  369. package/esm2022/image/image-group.component.mjs +15 -15
  370. package/esm2022/image/image-preview.component.mjs +47 -46
  371. package/esm2022/image/image.component.mjs +34 -53
  372. package/esm2022/image/image.module.mjs +4 -4
  373. package/esm2022/image/image.property.mjs +152 -38
  374. package/esm2022/index.mjs +1 -3
  375. package/esm2022/inner/inner.component.mjs +15 -20
  376. package/esm2022/inner/inner.module.mjs +4 -4
  377. package/esm2022/inner/inner.property.mjs +17 -15
  378. package/esm2022/input/input-group.component.mjs +5 -7
  379. package/esm2022/input/input.component.mjs +130 -143
  380. package/esm2022/input/input.module.mjs +4 -4
  381. package/esm2022/input/input.property.mjs +205 -143
  382. package/esm2022/input-number/input-number.component.mjs +68 -86
  383. package/esm2022/input-number/input-number.module.mjs +4 -4
  384. package/esm2022/input-number/input-number.property.mjs +130 -60
  385. package/esm2022/keyword/keyword.directive.mjs +46 -54
  386. package/esm2022/keyword/keyword.module.mjs +4 -4
  387. package/esm2022/keyword/keyword.property.mjs +32 -28
  388. package/esm2022/layout/col.component.mjs +48 -51
  389. package/esm2022/layout/layout.module.mjs +4 -4
  390. package/esm2022/layout/layout.property.mjs +71 -63
  391. package/esm2022/layout/row.component.mjs +36 -27
  392. package/esm2022/link/link.component.mjs +18 -45
  393. package/esm2022/link/link.module.mjs +4 -4
  394. package/esm2022/link/link.property.mjs +101 -41
  395. package/esm2022/list/list-drop-group.directive.mjs +9 -18
  396. package/esm2022/list/list-option.component.mjs +16 -33
  397. package/esm2022/list/list.component.mjs +160 -164
  398. package/esm2022/list/list.module.mjs +4 -4
  399. package/esm2022/list/list.property.mjs +195 -188
  400. package/esm2022/loading/loading.component.mjs +44 -45
  401. package/esm2022/loading/loading.module.mjs +4 -4
  402. package/esm2022/loading/loading.property.mjs +50 -52
  403. package/esm2022/menu/menu-node.component.mjs +21 -21
  404. package/esm2022/menu/menu.component.mjs +57 -76
  405. package/esm2022/menu/menu.module.mjs +4 -4
  406. package/esm2022/menu/menu.property.mjs +56 -73
  407. package/esm2022/message/message.component.mjs +8 -8
  408. package/esm2022/message/message.module.mjs +4 -4
  409. package/esm2022/message/message.property.mjs +1 -1
  410. package/esm2022/message/message.service.mjs +7 -7
  411. package/esm2022/message-box/message-box.component.mjs +5 -5
  412. package/esm2022/message-box/message-box.module.mjs +4 -4
  413. package/esm2022/message-box/message-box.service.mjs +6 -6
  414. package/esm2022/notification/notification.component.mjs +8 -8
  415. package/esm2022/notification/notification.module.mjs +4 -4
  416. package/esm2022/notification/notification.property.mjs +1 -1
  417. package/esm2022/notification/notification.service.mjs +8 -8
  418. package/esm2022/outlet/outlet.directive.mjs +12 -14
  419. package/esm2022/outlet/outlet.module.mjs +4 -4
  420. package/esm2022/outlet/outlet.property.mjs +2 -2
  421. package/esm2022/page-header/page-header.component.mjs +12 -28
  422. package/esm2022/page-header/page-header.module.mjs +4 -4
  423. package/esm2022/page-header/page-header.property.mjs +31 -27
  424. package/esm2022/pagination/pagination.component.mjs +74 -100
  425. package/esm2022/pagination/pagination.module.mjs +4 -4
  426. package/esm2022/pagination/pagination.property.mjs +99 -136
  427. package/esm2022/pattern/pattern.component.mjs +12 -13
  428. package/esm2022/pattern/pattern.module.mjs +4 -4
  429. package/esm2022/pattern/pattern.property.mjs +2 -2
  430. package/esm2022/popconfirm/popconfirm.component.mjs +35 -47
  431. package/esm2022/popconfirm/popconfirm.module.mjs +4 -4
  432. package/esm2022/popconfirm/popconfirm.property.mjs +76 -62
  433. package/esm2022/popover/popover-portal.component.mjs +24 -75
  434. package/esm2022/popover/popover.directive.mjs +70 -86
  435. package/esm2022/popover/popover.module.mjs +4 -4
  436. package/esm2022/popover/popover.property.mjs +71 -58
  437. package/esm2022/portal/portal.module.mjs +4 -4
  438. package/esm2022/portal/portal.property.mjs +1 -1
  439. package/esm2022/portal/portal.service.mjs +4 -4
  440. package/esm2022/progress/progress.component.mjs +173 -167
  441. package/esm2022/progress/progress.module.mjs +4 -4
  442. package/esm2022/progress/progress.property.mjs +67 -71
  443. package/esm2022/radio/radio.component.mjs +45 -61
  444. package/esm2022/radio/radio.module.mjs +4 -4
  445. package/esm2022/radio/radio.property.mjs +139 -66
  446. package/esm2022/rate/rate.component.mjs +61 -79
  447. package/esm2022/rate/rate.module.mjs +4 -4
  448. package/esm2022/rate/rate.property.mjs +121 -29
  449. package/esm2022/resizable/resizable.directive.mjs +30 -45
  450. package/esm2022/resizable/resizable.module.mjs +4 -4
  451. package/esm2022/resizable/resizable.property.mjs +16 -46
  452. package/esm2022/result/result.component.mjs +13 -17
  453. package/esm2022/result/result.module.mjs +4 -4
  454. package/esm2022/result/result.property.mjs +25 -17
  455. package/esm2022/ripple/ripple.directive.mjs +38 -27
  456. package/esm2022/ripple/ripple.module.mjs +4 -4
  457. package/esm2022/ripple/ripple.property.mjs +27 -20
  458. package/esm2022/select/select-portal.component.mjs +52 -67
  459. package/esm2022/select/select.component.mjs +301 -289
  460. package/esm2022/select/select.module.mjs +4 -4
  461. package/esm2022/select/select.property.mjs +195 -102
  462. package/esm2022/skeleton/skeleton.component.mjs +12 -23
  463. package/esm2022/skeleton/skeleton.module.mjs +4 -4
  464. package/esm2022/skeleton/skeleton.property.mjs +31 -28
  465. package/esm2022/slider/slider.component.mjs +103 -149
  466. package/esm2022/slider/slider.module.mjs +4 -4
  467. package/esm2022/slider/slider.property.mjs +60 -79
  468. package/esm2022/slider-select/slider-select.component.mjs +201 -220
  469. package/esm2022/slider-select/slider-select.module.mjs +4 -4
  470. package/esm2022/slider-select/slider-select.property.mjs +143 -70
  471. package/esm2022/statistic/countdown.component.mjs +13 -16
  472. package/esm2022/statistic/statistic.component.mjs +23 -21
  473. package/esm2022/statistic/statistic.module.mjs +4 -4
  474. package/esm2022/statistic/statistic.property.mjs +68 -34
  475. package/esm2022/steps/steps.component.mjs +33 -63
  476. package/esm2022/steps/steps.module.mjs +4 -4
  477. package/esm2022/steps/steps.property.mjs +28 -39
  478. package/esm2022/switch/switch.component.mjs +22 -37
  479. package/esm2022/switch/switch.module.mjs +4 -4
  480. package/esm2022/switch/switch.property.mjs +122 -32
  481. package/esm2022/table/table-body.component.mjs +134 -139
  482. package/esm2022/table/table-foot.component.mjs +15 -18
  483. package/esm2022/table/table-head.component.mjs +60 -91
  484. package/esm2022/table/table.component.mjs +192 -222
  485. package/esm2022/table/table.module.mjs +4 -4
  486. package/esm2022/table/table.property.mjs +396 -341
  487. package/esm2022/tabs/tab-content.component.mjs +13 -16
  488. package/esm2022/tabs/tab-link.directive.mjs +6 -6
  489. package/esm2022/tabs/tab.component.mjs +9 -17
  490. package/esm2022/tabs/tabs.component.mjs +83 -135
  491. package/esm2022/tabs/tabs.module.mjs +4 -4
  492. package/esm2022/tabs/tabs.property.mjs +80 -91
  493. package/esm2022/tag/tag.component.mjs +19 -33
  494. package/esm2022/tag/tag.module.mjs +4 -4
  495. package/esm2022/tag/tag.property.mjs +44 -68
  496. package/esm2022/text-retract/text-retract.component.mjs +29 -46
  497. package/esm2022/text-retract/text-retract.module.mjs +4 -4
  498. package/esm2022/text-retract/text-retract.property.mjs +22 -18
  499. package/esm2022/textarea/textarea.component.mjs +49 -79
  500. package/esm2022/textarea/textarea.module.mjs +4 -4
  501. package/esm2022/textarea/textarea.property.mjs +124 -47
  502. package/esm2022/theme/theme.component.mjs +86 -81
  503. package/esm2022/theme/theme.module.mjs +4 -4
  504. package/esm2022/theme/theme.property.mjs +35 -46
  505. package/esm2022/time-ago/time-ago.module.mjs +4 -4
  506. package/esm2022/time-ago/time-ago.pipe.mjs +12 -11
  507. package/esm2022/time-ago/time-ago.property.mjs +2 -2
  508. package/esm2022/time-picker/time-picker-frame.component.mjs +173 -188
  509. package/esm2022/time-picker/time-picker-portal.component.mjs +35 -42
  510. package/esm2022/time-picker/time-picker.component.mjs +139 -170
  511. package/esm2022/time-picker/time-picker.module.mjs +4 -4
  512. package/esm2022/time-picker/time-picker.property.mjs +158 -70
  513. package/esm2022/time-range/time-range.module.mjs +4 -4
  514. package/esm2022/time-range/time-range.pipe.mjs +10 -10
  515. package/esm2022/time-range/time-range.property.mjs +2 -2
  516. package/esm2022/timeline/timeline.component.mjs +14 -38
  517. package/esm2022/timeline/timeline.module.mjs +4 -4
  518. package/esm2022/timeline/timeline.property.mjs +30 -30
  519. package/esm2022/tooltip/tooltip-portal.component.mjs +51 -65
  520. package/esm2022/tooltip/tooltip.directive.mjs +65 -62
  521. package/esm2022/tooltip/tooltip.module.mjs +4 -4
  522. package/esm2022/tooltip/tooltip.property.mjs +53 -47
  523. package/esm2022/transfer/transfer.component.mjs +225 -184
  524. package/esm2022/transfer/transfer.module.mjs +4 -4
  525. package/esm2022/transfer/transfer.property.mjs +84 -76
  526. package/esm2022/tree/tree-node.component.mjs +142 -132
  527. package/esm2022/tree/tree.component.mjs +236 -232
  528. package/esm2022/tree/tree.module.mjs +4 -4
  529. package/esm2022/tree/tree.property.mjs +228 -226
  530. package/esm2022/tree/tree.service.mjs +4 -4
  531. package/esm2022/tree-file/tree-file.component.mjs +34 -43
  532. package/esm2022/tree-file/tree-file.module.mjs +4 -4
  533. package/esm2022/tree-file/tree-file.property.mjs +45 -56
  534. package/esm2022/tree-select/tree-select-portal.component.mjs +45 -78
  535. package/esm2022/tree-select/tree-select.component.mjs +283 -296
  536. package/esm2022/tree-select/tree-select.module.mjs +4 -4
  537. package/esm2022/tree-select/tree-select.property.mjs +203 -125
  538. package/esm2022/typography/typography.component.mjs +13 -10
  539. package/esm2022/typography/typography.module.mjs +4 -4
  540. package/esm2022/typography/typography.property.mjs +12 -11
  541. package/esm2022/upload/upload-portal.component.mjs +54 -57
  542. package/esm2022/upload/upload.component.mjs +79 -98
  543. package/esm2022/upload/upload.module.mjs +4 -4
  544. package/esm2022/upload/upload.property.mjs +73 -68
  545. package/examples/examples.component.d.ts +2 -5
  546. package/fesm2022/ng-nest-ui-affix.mjs +30 -32
  547. package/fesm2022/ng-nest-ui-affix.mjs.map +1 -1
  548. package/fesm2022/ng-nest-ui-alert.mjs +142 -152
  549. package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
  550. package/fesm2022/ng-nest-ui-anchor.mjs +121 -133
  551. package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
  552. package/fesm2022/ng-nest-ui-api.mjs +14 -17
  553. package/fesm2022/ng-nest-ui-api.mjs.map +1 -1
  554. package/fesm2022/ng-nest-ui-auto-complete.mjs +296 -260
  555. package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
  556. package/fesm2022/ng-nest-ui-avatar.mjs +195 -130
  557. package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
  558. package/fesm2022/ng-nest-ui-back-top.mjs +95 -103
  559. package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
  560. package/fesm2022/ng-nest-ui-badge.mjs +161 -96
  561. package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
  562. package/fesm2022/ng-nest-ui-base-form.mjs +286 -166
  563. package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
  564. package/fesm2022/ng-nest-ui-button.mjs +376 -175
  565. package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
  566. package/fesm2022/ng-nest-ui-calendar.mjs +134 -108
  567. package/fesm2022/ng-nest-ui-calendar.mjs.map +1 -1
  568. package/fesm2022/ng-nest-ui-card.mjs +67 -36
  569. package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
  570. package/fesm2022/ng-nest-ui-carousel.mjs +365 -223
  571. package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
  572. package/fesm2022/ng-nest-ui-cascade.mjs +318 -249
  573. package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
  574. package/fesm2022/ng-nest-ui-checkbox.mjs +203 -155
  575. package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
  576. package/fesm2022/ng-nest-ui-collapse.mjs +202 -106
  577. package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
  578. package/fesm2022/ng-nest-ui-color-picker.mjs +316 -270
  579. package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
  580. package/fesm2022/ng-nest-ui-color.mjs +73 -54
  581. package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
  582. package/fesm2022/ng-nest-ui-comment.mjs +44 -108
  583. package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
  584. package/fesm2022/ng-nest-ui-container.mjs +119 -123
  585. package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
  586. package/fesm2022/ng-nest-ui-core.mjs +985 -664
  587. package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
  588. package/fesm2022/ng-nest-ui-crumb.mjs +28 -55
  589. package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
  590. package/fesm2022/ng-nest-ui-date-picker.mjs +1552 -1671
  591. package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
  592. package/fesm2022/ng-nest-ui-description.mjs +218 -109
  593. package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
  594. package/fesm2022/ng-nest-ui-dialog.mjs +307 -316
  595. package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
  596. package/fesm2022/ng-nest-ui-doc.mjs +14 -15
  597. package/fesm2022/ng-nest-ui-doc.mjs.map +1 -1
  598. package/fesm2022/ng-nest-ui-drag.mjs +20 -39
  599. package/fesm2022/ng-nest-ui-drag.mjs.map +1 -1
  600. package/fesm2022/ng-nest-ui-drawer.mjs +116 -145
  601. package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
  602. package/fesm2022/ng-nest-ui-dropdown.mjs +223 -238
  603. package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
  604. package/fesm2022/ng-nest-ui-empty.mjs +49 -46
  605. package/fesm2022/ng-nest-ui-empty.mjs.map +1 -1
  606. package/fesm2022/ng-nest-ui-examples.mjs +14 -15
  607. package/fesm2022/ng-nest-ui-examples.mjs.map +1 -1
  608. package/fesm2022/ng-nest-ui-find.mjs +422 -425
  609. package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
  610. package/fesm2022/ng-nest-ui-form.mjs +218 -203
  611. package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
  612. package/fesm2022/ng-nest-ui-highlight.mjs +93 -81
  613. package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
  614. package/fesm2022/ng-nest-ui-i18n.mjs +5892 -3516
  615. package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
  616. package/fesm2022/ng-nest-ui-icon.mjs +112 -120
  617. package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
  618. package/fesm2022/ng-nest-ui-image.mjs +244 -147
  619. package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
  620. package/fesm2022/ng-nest-ui-inner.mjs +33 -35
  621. package/fesm2022/ng-nest-ui-inner.mjs.map +1 -1
  622. package/fesm2022/ng-nest-ui-input-number.mjs +198 -146
  623. package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
  624. package/fesm2022/ng-nest-ui-input.mjs +340 -292
  625. package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
  626. package/fesm2022/ng-nest-ui-keyword.mjs +78 -82
  627. package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
  628. package/fesm2022/ng-nest-ui-layout.mjs +151 -140
  629. package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
  630. package/fesm2022/ng-nest-ui-link.mjs +119 -86
  631. package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
  632. package/fesm2022/ng-nest-ui-list.mjs +376 -400
  633. package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
  634. package/fesm2022/ng-nest-ui-loading.mjs +94 -97
  635. package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
  636. package/fesm2022/ng-nest-ui-menu.mjs +131 -167
  637. package/fesm2022/ng-nest-ui-menu.mjs.map +1 -1
  638. package/fesm2022/ng-nest-ui-message-box.mjs +13 -13
  639. package/fesm2022/ng-nest-ui-message-box.mjs.map +1 -1
  640. package/fesm2022/ng-nest-ui-message.mjs +17 -17
  641. package/fesm2022/ng-nest-ui-message.mjs.map +1 -1
  642. package/fesm2022/ng-nest-ui-notification.mjs +18 -18
  643. package/fesm2022/ng-nest-ui-notification.mjs.map +1 -1
  644. package/fesm2022/ng-nest-ui-outlet.mjs +16 -18
  645. package/fesm2022/ng-nest-ui-outlet.mjs.map +1 -1
  646. package/fesm2022/ng-nest-ui-page-header.mjs +44 -55
  647. package/fesm2022/ng-nest-ui-page-header.mjs.map +1 -1
  648. package/fesm2022/ng-nest-ui-pagination.mjs +173 -236
  649. package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
  650. package/fesm2022/ng-nest-ui-pattern.mjs +16 -17
  651. package/fesm2022/ng-nest-ui-pattern.mjs.map +1 -1
  652. package/fesm2022/ng-nest-ui-popconfirm.mjs +110 -107
  653. package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
  654. package/fesm2022/ng-nest-ui-popover.mjs +163 -215
  655. package/fesm2022/ng-nest-ui-popover.mjs.map +1 -1
  656. package/fesm2022/ng-nest-ui-portal.mjs +7 -7
  657. package/fesm2022/ng-nest-ui-portal.mjs.map +1 -1
  658. package/fesm2022/ng-nest-ui-progress.mjs +240 -238
  659. package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
  660. package/fesm2022/ng-nest-ui-radio.mjs +184 -127
  661. package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
  662. package/fesm2022/ng-nest-ui-rate.mjs +182 -108
  663. package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
  664. package/fesm2022/ng-nest-ui-resizable.mjs +46 -91
  665. package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
  666. package/fesm2022/ng-nest-ui-result.mjs +38 -34
  667. package/fesm2022/ng-nest-ui-result.mjs.map +1 -1
  668. package/fesm2022/ng-nest-ui-ripple.mjs +66 -48
  669. package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
  670. package/fesm2022/ng-nest-ui-select.mjs +547 -459
  671. package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
  672. package/fesm2022/ng-nest-ui-skeleton.mjs +44 -52
  673. package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
  674. package/fesm2022/ng-nest-ui-slider-select.mjs +344 -290
  675. package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
  676. package/fesm2022/ng-nest-ui-slider.mjs +163 -228
  677. package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
  678. package/fesm2022/ng-nest-ui-statistic.mjs +102 -68
  679. package/fesm2022/ng-nest-ui-statistic.mjs.map +1 -1
  680. package/fesm2022/ng-nest-ui-steps.mjs +61 -102
  681. package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
  682. package/fesm2022/ng-nest-ui-switch.mjs +145 -69
  683. package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
  684. package/fesm2022/ng-nest-ui-table.mjs +784 -800
  685. package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
  686. package/fesm2022/ng-nest-ui-tabs.mjs +185 -259
  687. package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
  688. package/fesm2022/ng-nest-ui-tag.mjs +63 -101
  689. package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
  690. package/fesm2022/ng-nest-ui-text-retract.mjs +52 -64
  691. package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
  692. package/fesm2022/ng-nest-ui-textarea.mjs +173 -126
  693. package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
  694. package/fesm2022/ng-nest-ui-theme.mjs +123 -129
  695. package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
  696. package/fesm2022/ng-nest-ui-time-ago.mjs +16 -15
  697. package/fesm2022/ng-nest-ui-time-ago.mjs.map +1 -1
  698. package/fesm2022/ng-nest-ui-time-picker.mjs +498 -463
  699. package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
  700. package/fesm2022/ng-nest-ui-time-range.mjs +14 -14
  701. package/fesm2022/ng-nest-ui-time-range.mjs.map +1 -1
  702. package/fesm2022/ng-nest-ui-timeline.mjs +44 -68
  703. package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
  704. package/fesm2022/ng-nest-ui-tooltip.mjs +168 -170
  705. package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
  706. package/fesm2022/ng-nest-ui-transfer.mjs +311 -262
  707. package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
  708. package/fesm2022/ng-nest-ui-tree-file.mjs +80 -99
  709. package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
  710. package/fesm2022/ng-nest-ui-tree-select.mjs +527 -495
  711. package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
  712. package/fesm2022/ng-nest-ui-tree.mjs +601 -587
  713. package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
  714. package/fesm2022/ng-nest-ui-typography.mjs +26 -22
  715. package/fesm2022/ng-nest-ui-typography.mjs.map +1 -1
  716. package/fesm2022/ng-nest-ui-upload.mjs +204 -220
  717. package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
  718. package/fesm2022/ng-nest-ui.mjs +0 -2
  719. package/fesm2022/ng-nest-ui.mjs.map +1 -1
  720. package/find/find.component.d.ts +30 -34
  721. package/find/find.property.d.ts +321 -108
  722. package/form/control.component.d.ts +37 -18
  723. package/form/form.component.d.ts +8 -10
  724. package/form/form.property.d.ts +111 -27
  725. package/highlight/highlight.component.d.ts +10 -17
  726. package/highlight/highlight.property.d.ts +40 -11
  727. package/highlight/highlight.service.d.ts +8 -0
  728. package/highlight/public-api.d.ts +1 -0
  729. package/i18n/i18n.directive.d.ts +6 -9
  730. package/i18n/i18n.property.d.ts +6 -2
  731. package/i18n/i18n.service.d.ts +2 -2
  732. package/i18n/languages/ar_EG.d.ts +56 -0
  733. package/i18n/languages/bg_BG.d.ts +56 -0
  734. package/i18n/languages/ca_ES.d.ts +56 -0
  735. package/i18n/languages/cs_CZ.d.ts +56 -0
  736. package/i18n/languages/da_DK.d.ts +56 -0
  737. package/i18n/languages/de_DE.d.ts +56 -0
  738. package/i18n/languages/el_GR.d.ts +56 -0
  739. package/i18n/languages/en_GB.d.ts +3 -0
  740. package/i18n/languages/en_US.d.ts +3 -0
  741. package/i18n/languages/es_ES.d.ts +56 -0
  742. package/i18n/languages/et_EE.d.ts +56 -0
  743. package/i18n/languages/fa_IR.d.ts +56 -0
  744. package/i18n/languages/fi_FI.d.ts +56 -0
  745. package/i18n/languages/fr_BE.d.ts +60 -4
  746. package/i18n/languages/fr_FR.d.ts +56 -0
  747. package/i18n/languages/he_IL.d.ts +56 -0
  748. package/i18n/languages/hi_IN.d.ts +56 -0
  749. package/i18n/languages/hr_HR.d.ts +56 -0
  750. package/i18n/languages/hu_HU.d.ts +56 -0
  751. package/i18n/languages/hy_AM.d.ts +56 -0
  752. package/i18n/languages/id_ID.d.ts +56 -0
  753. package/i18n/languages/is_IS.d.ts +56 -0
  754. package/i18n/languages/it_IT.d.ts +56 -0
  755. package/i18n/languages/ja_JP.d.ts +56 -0
  756. package/i18n/languages/ka_GE.d.ts +56 -0
  757. package/i18n/languages/kn_IN.d.ts +56 -0
  758. package/i18n/languages/ko_KR.d.ts +56 -0
  759. package/i18n/languages/ku_IQ.d.ts +32 -0
  760. package/i18n/languages/lv_LV.d.ts +56 -0
  761. package/i18n/languages/mn_MN.d.ts +56 -0
  762. package/i18n/languages/ms_MY.d.ts +56 -0
  763. package/i18n/languages/nb_NO.d.ts +56 -0
  764. package/i18n/languages/ne_NP.d.ts +56 -0
  765. package/i18n/languages/nl_BE.d.ts +56 -0
  766. package/i18n/languages/nl_NL.d.ts +56 -0
  767. package/i18n/languages/pl_PL.d.ts +56 -0
  768. package/i18n/languages/pt_BR.d.ts +56 -0
  769. package/i18n/languages/pt_PT.d.ts +56 -0
  770. package/i18n/languages/ro_RO.d.ts +56 -0
  771. package/i18n/languages/ru_RU.d.ts +56 -0
  772. package/i18n/languages/sk_SK.d.ts +56 -1
  773. package/i18n/languages/sl_SI.d.ts +56 -0
  774. package/i18n/languages/sr_RS.d.ts +56 -0
  775. package/i18n/languages/sv_SE.d.ts +56 -0
  776. package/i18n/languages/ta_IN.d.ts +56 -0
  777. package/i18n/languages/th_TH.d.ts +56 -0
  778. package/i18n/languages/tr_TR.d.ts +56 -0
  779. package/i18n/languages/uk_UA.d.ts +56 -0
  780. package/i18n/languages/vi_VN.d.ts +56 -0
  781. package/i18n/languages/zh_CN.d.ts +3 -0
  782. package/i18n/languages/zh_TW.d.ts +3 -0
  783. package/icon/icon.component.d.ts +8 -14
  784. package/icon/icon.property.d.ts +31 -13
  785. package/icon/icon.service.d.ts +1 -1
  786. package/image/image-group.component.d.ts +1 -3
  787. package/image/image-preview.component.d.ts +11 -13
  788. package/image/image.component.d.ts +10 -11
  789. package/image/image.property.d.ts +117 -16
  790. package/index.d.ts +0 -2
  791. package/inner/inner.component.d.ts +3 -10
  792. package/inner/inner.property.d.ts +8 -4
  793. package/input/input-group.component.d.ts +0 -2
  794. package/input/input.component.d.ts +32 -30
  795. package/input/input.property.d.ts +347 -65
  796. package/input-number/input-number.component.d.ts +14 -19
  797. package/input-number/input-number.property.d.ts +292 -26
  798. package/keyword/keyword.directive.d.ts +4 -12
  799. package/keyword/keyword.property.d.ts +11 -7
  800. package/layout/col.component.d.ts +8 -11
  801. package/layout/layout.property.d.ts +25 -18
  802. package/layout/row.component.d.ts +7 -8
  803. package/link/link.component.d.ts +7 -13
  804. package/link/link.property.d.ts +64 -11
  805. package/list/list-drop-group.directive.d.ts +3 -5
  806. package/list/list-option.component.d.ts +7 -9
  807. package/list/list.component.d.ts +35 -30
  808. package/list/list.property.d.ts +126 -61
  809. package/loading/loading.component.d.ts +12 -12
  810. package/loading/loading.property.d.ts +20 -11
  811. package/menu/menu-node.component.d.ts +11 -8
  812. package/menu/menu.component.d.ts +18 -19
  813. package/menu/menu.property.d.ts +23 -28
  814. package/message/message.property.d.ts +1 -1
  815. package/notification/notification.property.d.ts +1 -1
  816. package/outlet/outlet.directive.d.ts +4 -4
  817. package/outlet/outlet.property.d.ts +1 -1
  818. package/package.json +78 -84
  819. package/page-header/page-header.component.d.ts +4 -8
  820. package/page-header/page-header.property.d.ts +11 -8
  821. package/pagination/pagination.component.d.ts +15 -22
  822. package/pagination/pagination.property.d.ts +34 -66
  823. package/pattern/pattern.component.d.ts +2 -5
  824. package/pattern/pattern.property.d.ts +1 -1
  825. package/popconfirm/popconfirm.component.d.ts +12 -14
  826. package/popconfirm/popconfirm.property.d.ts +32 -19
  827. package/popover/popover-portal.component.d.ts +16 -33
  828. package/popover/popover.directive.d.ts +6 -12
  829. package/popover/popover.property.d.ts +31 -22
  830. package/portal/portal.property.d.ts +2 -2
  831. package/portal/portal.service.d.ts +2 -2
  832. package/progress/progress.component.d.ts +25 -30
  833. package/progress/progress.property.d.ts +29 -20
  834. package/radio/radio.component.d.ts +14 -15
  835. package/radio/radio.property.d.ts +271 -31
  836. package/rate/rate.component.d.ts +14 -17
  837. package/rate/rate.property.d.ts +259 -12
  838. package/resizable/resizable.directive.d.ts +5 -5
  839. package/resizable/resizable.property.d.ts +14 -14
  840. package/result/result.component.d.ts +5 -7
  841. package/result/result.property.d.ts +11 -7
  842. package/ripple/ripple.directive.d.ts +5 -4
  843. package/ripple/ripple.property.d.ts +14 -5
  844. package/select/select-portal.component.d.ts +39 -43
  845. package/select/select.component.d.ts +53 -56
  846. package/select/select.property.d.ts +317 -37
  847. package/skeleton/skeleton.component.d.ts +4 -8
  848. package/skeleton/skeleton.property.d.ts +17 -8
  849. package/slider/slider.component.d.ts +34 -31
  850. package/slider/slider.property.d.ts +26 -22
  851. package/slider-select/slider-select.component.d.ts +38 -38
  852. package/slider-select/slider-select.property.d.ts +302 -28
  853. package/statistic/countdown.component.d.ts +2 -5
  854. package/statistic/statistic.component.d.ts +3 -8
  855. package/statistic/statistic.property.d.ts +44 -13
  856. package/steps/steps.component.d.ts +6 -16
  857. package/steps/steps.property.d.ts +15 -10
  858. package/style/core/index.css +0 -38
  859. package/style/core/index.css.map +1 -1
  860. package/style/core/var.scss +0 -4
  861. package/style/mixins/compatibility.scss +0 -1
  862. package/style/mixins/form.scss +8 -2
  863. package/style/params/index.scss +0 -1
  864. package/style/params/primary.scss +7 -28
  865. package/switch/switch.component.d.ts +9 -10
  866. package/switch/switch.property.d.ts +265 -16
  867. package/table/table-body.component.d.ts +21 -20
  868. package/table/table-foot.component.d.ts +7 -5
  869. package/table/table-head.component.d.ts +17 -19
  870. package/table/table.component.d.ts +62 -50
  871. package/table/table.property.d.ts +180 -178
  872. package/tabs/tab-content.component.d.ts +6 -8
  873. package/tabs/tab.component.d.ts +3 -5
  874. package/tabs/tabs.component.d.ts +17 -24
  875. package/tabs/tabs.property.d.ts +28 -24
  876. package/tag/tag.component.d.ts +7 -8
  877. package/tag/tag.property.d.ts +19 -21
  878. package/text-retract/text-retract.component.d.ts +4 -14
  879. package/text-retract/text-retract.property.d.ts +9 -5
  880. package/textarea/textarea.component.d.ts +17 -20
  881. package/textarea/textarea.property.d.ts +266 -30
  882. package/theme/theme.component.d.ts +24 -13
  883. package/theme/theme.property.d.ts +67 -16
  884. package/time-ago/time-ago.pipe.d.ts +7 -3
  885. package/time-ago/time-ago.property.d.ts +1 -1
  886. package/time-picker/time-picker-frame.component.d.ts +52 -39
  887. package/time-picker/time-picker-portal.component.d.ts +29 -29
  888. package/time-picker/time-picker.component.d.ts +29 -30
  889. package/time-picker/time-picker.property.d.ts +314 -23
  890. package/time-range/time-range.property.d.ts +1 -1
  891. package/timeline/timeline.component.d.ts +5 -13
  892. package/timeline/timeline.property.d.ts +12 -8
  893. package/tooltip/tooltip-portal.component.d.ts +23 -29
  894. package/tooltip/tooltip.directive.d.ts +10 -9
  895. package/tooltip/tooltip.property.d.ts +18 -14
  896. package/transfer/transfer.component.d.ts +23 -20
  897. package/transfer/transfer.property.d.ts +81 -25
  898. package/tree/tree-node.component.d.ts +21 -21
  899. package/tree/tree.component.d.ts +29 -28
  900. package/tree/tree.property.d.ts +129 -79
  901. package/tree-file/tree-file.component.d.ts +7 -9
  902. package/tree-file/tree-file.property.d.ts +40 -16
  903. package/tree-select/tree-select-portal.component.d.ts +38 -49
  904. package/tree-select/tree-select.component.d.ts +50 -53
  905. package/tree-select/tree-select.property.d.ts +328 -39
  906. package/typography/typography.component.d.ts +1 -1
  907. package/typography/typography.property.d.ts +3 -3
  908. package/upload/upload-portal.component.d.ts +14 -14
  909. package/upload/upload.component.d.ts +18 -17
  910. package/upload/upload.property.d.ts +73 -24
  911. package/border/border.component.d.ts +0 -11
  912. package/border/border.module.d.ts +0 -7
  913. package/border/border.property.d.ts +0 -6
  914. package/border/index.d.ts +0 -5
  915. package/border/public-api.d.ts +0 -3
  916. package/esm2022/border/border.component.mjs +0 -21
  917. package/esm2022/border/border.module.mjs +0 -16
  918. package/esm2022/border/border.property.mjs +0 -7
  919. package/esm2022/border/ng-nest-ui-border.mjs +0 -5
  920. package/esm2022/border/public-api.mjs +0 -4
  921. package/fesm2022/ng-nest-ui-border.mjs +0 -47
  922. package/fesm2022/ng-nest-ui-border.mjs.map +0 -1
  923. package/style/params/colors.scss +0 -38
@@ -1,10 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, Input, Output, inject, ElementRef, ChangeDetectorRef, ViewEncapsulation, ViewChild, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
- import { __decorate } from 'tslib';
4
- import * as i1$1 from '@ng-nest/ui/core';
5
- import { XWithConfig, XInputNumber, XInputBoolean, XProperty, XConfigService, XIsChange, removeNgTag, XIsEmpty, XIsFunction, XResize, stripTags, XParentPath, XIsUndefined } from '@ng-nest/ui/core';
6
- import { XPaginationProperty, XPaginationComponent } from '@ng-nest/ui/pagination';
7
- import { takeUntil } from 'rxjs/operators';
2
+ import { input, model, output, Component, inject, ChangeDetectorRef, viewChild, signal, computed, ElementRef, ViewEncapsulation, ChangeDetectionStrategy, Renderer2, effect, viewChildren, NgModule } from '@angular/core';
3
+ import { XPropertyFunction, XToDataConvert, XToNumber, XToBoolean, XToCssPixelValue, XProperty, XIsEmpty, XRemoveNgTag, XIsFunction, XResize, XStripTags, XParentPath, XIsChange, XIsArray, XIsUndefined } from '@ng-nest/ui/core';
4
+ import { XPaginationSizeData, XPaginationComponent } from '@ng-nest/ui/pagination';
5
+ import { map, takeUntil } from 'rxjs/operators';
8
6
  import { Subject, fromEvent } from 'rxjs';
9
7
  import { NgStyle, NgClass, NgTemplateOutlet, DOCUMENT } from '@angular/common';
10
8
  import { XLoadingComponent } from '@ng-nest/ui/loading';
@@ -16,10 +14,11 @@ import { XOutletDirective } from '@ng-nest/ui/outlet';
16
14
  import { XIconComponent } from '@ng-nest/ui/icon';
17
15
  import * as i1 from '@angular/forms';
18
16
  import { FormsModule } from '@angular/forms';
19
- import * as i3 from '@angular/cdk/scrolling';
20
- import { ScrollingModule } from '@angular/cdk/scrolling';
17
+ import * as i2$1 from '@angular/cdk/scrolling';
18
+ import { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';
21
19
  import { XEmptyComponent } from '@ng-nest/ui/empty';
22
20
  import { XButtonComponent } from '@ng-nest/ui/button';
21
+ import { toSignal } from '@angular/core/rxjs-interop';
23
22
 
24
23
  /**
25
24
  * Table
@@ -27,321 +26,394 @@ import { XButtonComponent } from '@ng-nest/ui/button';
27
26
  * @decorator component
28
27
  */
29
28
  const XTablePrefix = 'x-table';
30
- const X_CONFIG_NAME = 'table';
29
+ const X_TABLE_CONFIG_NAME = 'table';
31
30
  /**
32
31
  * Table Property
33
32
  */
34
- class XTableProperty extends XPaginationProperty {
33
+ class XTableProperty extends XPropertyFunction(X_TABLE_CONFIG_NAME) {
35
34
  constructor() {
36
35
  super(...arguments);
37
36
  /**
38
37
  * @zh_CN 行数据
39
38
  * @en_US Row data
40
39
  */
41
- this.data = [];
40
+ this.data = input([], { transform: XToDataConvert });
42
41
  /**
43
42
  * @zh_CN 列集合
44
43
  * @en_US Column set
45
44
  */
46
- this.columns = [];
45
+ this.columns = input([]);
47
46
  /**
48
- * @zh_CN 当前选中行改变
49
- * @en_US The currently selected row changes
47
+ * @zh_CN 表头和行高,单位 px
48
+ * @en_US Header and row height, unit px
50
49
  */
51
- this.activatedRowChange = new EventEmitter();
50
+ this.rowHeight = input(this.config?.rowHeight ?? 42, { transform: XToNumber });
51
+ /**
52
+ * @zh_CN 是否启用加载 loading
53
+ * @en_US Whether to enable loading
54
+ */
55
+ this.loading = input(this.config?.loading ?? false, { transform: XToBoolean });
56
+ /**
57
+ * @zh_CN 是否展示列边框
58
+ * @en_US Whether to show column borders
59
+ */
60
+ this.bordered = input(this.config?.bordered ?? false, { transform: XToBoolean });
61
+ /**
62
+ * @zh_CN 是否显示列头
63
+ * @en_US Whether to display the column headers
64
+ */
65
+ this.showHeader = input(this.config?.showHeader ?? true, { transform: XToBoolean });
66
+ /**
67
+ * @zh_CN 列头显示位置
68
+ * @en_US Whether to display the column headers
69
+ */
70
+ this.headerPosition = input(this.config?.headerPosition ?? 'top');
71
+ /**
72
+ * @zh_CN 当前选中行数据
73
+ * @en_US Currently selected row data
74
+ */
75
+ this.activatedRow = model();
52
76
  /**
53
77
  * @zh_CN 列头自定义模板,通过 key-value 的方式指定每列的模版
54
78
  * @en_US Column header custom template
55
79
  */
56
- this.headColumnTpl = {};
80
+ this.headColumnTpl = input({});
81
+ /**
82
+ * @zh_CN 列头单元格自定义模板,优先级低于列头自定义模板
83
+ * @en_US Column header custom template
84
+ */
85
+ this.headThTpl = input();
57
86
  /**
58
87
  * @zh_CN 列内容自定义模板,通过 key-value 的方式指定每列的模版
59
88
  * @en_US Column content custom template
60
89
  */
61
- this.bodyColumnTpl = {};
90
+ this.bodyColumnTpl = input({});
91
+ /**
92
+ * @zh_CN 单元格的自定义模板,优先级低于列内容自定义模板
93
+ * @en_US Custom template of cells
94
+ */
95
+ this.bodyTdTpl = input();
96
+ /**
97
+ * @zh_CN 行条件样式
98
+ * @en_US Row condition class
99
+ */
100
+ this.rowClass = input();
101
+ /**
102
+ * @zh_CN 列头搜索自定义模板
103
+ * @en_US Line head search custom template
104
+ */
105
+ this.headSearchTpl = input();
62
106
  /**
63
107
  * @zh_CN 排序点击的事件
64
108
  * @en_US Sort click events
65
109
  */
66
- this.sortChange = new EventEmitter();
110
+ this.sortChange = output();
67
111
  /**
68
112
  * @zh_CN 列头 checkbox 事件
69
113
  * @en_US head checkbox event
70
114
  */
71
- this.headCheckboxChange = new EventEmitter();
115
+ this.headCheckboxChange = output();
72
116
  /**
73
117
  * @zh_CN body checkbox 事件
74
118
  * @en_US head checkbox event
75
119
  */
76
- this.bodyCheckboxChange = new EventEmitter();
120
+ this.bodyCheckboxChange = output();
121
+ /**
122
+ * @zh_CN 允许行点击选中当前行
123
+ * @en_US Allow row click to select
124
+ */
125
+ this.allowSelectRow = input(this.config?.allowSelectRow ?? true, { transform: XToBoolean });
126
+ /**
127
+ * @zh_CN 允许行点击选中 checkbox
128
+ * @en_US Allow lines to click checkbox
129
+ */
130
+ this.allowCheckRow = input(this.config?.allowCheckRow ?? true, { transform: XToBoolean });
131
+ /**
132
+ * @zh_CN 开启虚拟滚动
133
+ * @en_US Turn on virtual scrolling
134
+ */
135
+ this.virtualScroll = input(this.config?.virtualScroll ?? false, { transform: XToBoolean });
136
+ /**
137
+ * @zh_CN body 数据高度
138
+ * @en_US body data height
139
+ */
140
+ this.bodyHeight = input(undefined, { transform: XToNumber });
141
+ /**
142
+ * @zh_CN itemSize,对应 cdk scroll 中的参数
143
+ * @en_US itemSize,corresponding to the parameters in cdk scroll
144
+ */
145
+ this.itemSize = input(this.config?.itemSize ?? 42, { transform: XToNumber });
77
146
  /**
78
147
  * @zh_CN 超出可视窗口缓冲区的最小值,对应 cdk scroll 中的参数
79
148
  * @en_US Exceed the minimum value of the visible window buffer, corresponding to the parameters in cdk scroll
80
149
  */
81
- this.minBufferPx = 100;
150
+ this.minBufferPx = input(100, { transform: XToNumber });
82
151
  /**
83
152
  * @zh_CN 渲染新数据缓冲区的像素,对应 cdk scroll 中的参数
84
153
  * @en_US Render the pixels of the new data buffer, corresponding to the parameters in cdk scroll
85
154
  */
86
- this.maxBufferPx = 200;
155
+ this.maxBufferPx = input(200, { transform: XToNumber });
156
+ /**
157
+ * @zh_CN 自适应高度,table 高度等于屏幕高度减掉此处设置的数值
158
+ * @en_US Adaptive height, table height is equal to the screen height minus the value set here
159
+ */
160
+ this.adaptionHeight = input(undefined, { transform: XToNumber });
87
161
  /**
88
162
  * @zh_CN 文档高度百分比,弹窗百分比高度用到
89
163
  * @en_US Document height percentage, used by pop-up window percentage height
90
164
  */
91
- this.docPercent = 1;
165
+ this.docPercent = input(1, { transform: XToNumber });
92
166
  /**
93
167
  * @zh_CN checkbox 列初始选中的数据,列中激活 checkbox
94
168
  * @en_US Checkbox column initially selected data, checkbox is activated in column
95
169
  */
96
- this.checkedRow = {};
170
+ this.checkedRow = input({});
97
171
  /**
98
172
  * @zh_CN 如果 data 是函数类型,可以通过此参数控制请求,常用于弹框中的表格,弹出后再请求
99
173
  * @en_US If data is a function type, you can use this parameter to control the request, which is often used in the form in the pop-up box, and then request it after it pops up
100
174
  */
101
- this.manual = true;
175
+ this.manual = model(true);
176
+ /**
177
+ * @zh_CN 滚动区域高宽
178
+ * @en_US Height and width of rolling area
179
+ */
180
+ this.scroll = input();
181
+ /**
182
+ * @zh_CN 表格页头
183
+ * @en_US Table header
184
+ */
185
+ this.header = input();
186
+ /**
187
+ * @zh_CN 表格页尾
188
+ * @en_US Table footer
189
+ */
190
+ this.footer = input();
191
+ /**
192
+ * @zh_CN 单元格配置
193
+ * @en_US Cell config
194
+ */
195
+ this.cellConfig = input();
102
196
  /**
103
- * @zh_CN 参数控制请求改变事件
104
- * @en_US Parameter control request change event
197
+ * @zh_CN 尺寸
198
+ * @en_US Size
105
199
  */
106
- this.manualChange = new EventEmitter();
200
+ this.rowSize = input(this.config?.rowSize ?? 'medium');
107
201
  /**
108
202
  * @zh_CN 分页器位置
109
203
  * @en_US Pagination position
110
204
  */
111
- this.paginationPosition = 'bottom-left';
205
+ this.paginationPosition = input('bottom-left');
206
+ /**
207
+ * @zh_CN 隐藏表格外边框
208
+ * @en_US Hidden table wrap border
209
+ */
210
+ this.hiddenWrapBorder = input(this.config?.hiddenWrapBorder ?? false, {
211
+ transform: XToBoolean
212
+ });
213
+ /**
214
+ * @zh_CN 隐藏分页器按钮边框
215
+ * @en_US Hidden pagination button border
216
+ */
217
+ this.hiddenPaginationBorder = input(this.config?.hiddenPaginationBorder ?? false, {
218
+ transform: XToBoolean
219
+ });
220
+ /**
221
+ * @zh_CN 显示分页器
222
+ * @en_US Pagination position
223
+ */
224
+ this.showPagination = input(this.config?.showPagination ?? true, {
225
+ transform: XToBoolean
226
+ });
227
+ /**
228
+ * @zh_CN 树形表格
229
+ * @en_US Tree table
230
+ */
231
+ this.treeTable = input(this.config?.treeTable ?? true, {
232
+ transform: XToBoolean
233
+ });
234
+ /**
235
+ * @zh_CN 树形表格展开所有节点
236
+ * @en_US Tree table
237
+ */
238
+ this.expandedAll = input(this.config?.expandedAll ?? false, {
239
+ transform: XToBoolean
240
+ });
241
+ /**
242
+ * @zh_CN 默认展开的层级,-1 不展开
243
+ * @en_US Default expanded level
244
+ */
245
+ this.expandedLevel = input(this.config?.expandedLevel ?? -1, {
246
+ transform: XToNumber
247
+ });
112
248
  /**
113
249
  * @zh_CN 展开的节点
114
250
  * @en_US Expanded node
115
251
  */
116
- this.expanded = [];
252
+ this.expanded = input([]);
253
+ /**
254
+ * @zh_CN 自定义展开内容
255
+ * @en_US Customized expansion content
256
+ */
257
+ this.expandTpl = input();
258
+ /**
259
+ * @zh_CN 显示数据为空的提示
260
+ * @en_US Display a prompt with empty data
261
+ */
262
+ this.showEmpty = input(this.config?.showEmpty ?? true, {
263
+ transform: XToBoolean
264
+ });
265
+ /**
266
+ * @zh_CN 数据为空的提示图片地址或自定义模板
267
+ * @en_US Picture address or custom template
268
+ */
269
+ this.emptyImg = input(this.config?.emptyImg ?? undefined);
270
+ /**
271
+ * @zh_CN 数据为空的提示内容或自定义模板
272
+ * @en_US Content or custom template
273
+ */
274
+ this.emptyContent = input(this.config?.emptyContent ?? undefined);
275
+ /**
276
+ * @zh_CN 当前页码
277
+ * @en_US Current page number
278
+ */
279
+ this.index = model(this.config?.index ?? 1);
280
+ /**
281
+ * @zh_CN 每页显示条数
282
+ * @en_US Number of items displayed per page
283
+ */
284
+ this.size = model(this.config?.size ?? 10);
285
+ /**
286
+ * @zh_CN 总数
287
+ * @en_US Total
288
+ */
289
+ this.total = model(0);
290
+ /**
291
+ * @zh_CN 查询条件
292
+ * @en_US Query conditions
293
+ */
294
+ this.query = model({});
295
+ /**
296
+ * @zh_CN 最多显示的分页数量
297
+ * @en_US The largest number of pages display
298
+ */
299
+ this.pageLinkSize = input(this.config?.pageLinkSize ?? 5, { transform: XToNumber });
300
+ /**
301
+ * @zh_CN 显示首尾页跳转
302
+ * @en_US Display the first and last page
303
+ */
304
+ this.showEllipsis = input(this.config?.showEllipsis ?? true, { transform: XToBoolean });
305
+ /**
306
+ * @zh_CN 显示总条数
307
+ * @en_US Display the total
308
+ */
309
+ this.showTotal = input(this.config?.showTotal ?? true, { transform: XToBoolean });
310
+ /**
311
+ * @zh_CN 按钮间距
312
+ * @en_US Button spacing
313
+ */
314
+ this.space = input(this.config?.space ?? '0.25rem', { transform: XToCssPixelValue });
315
+ /**
316
+ * @zh_CN 添加背景色
317
+ * @en_US Show background
318
+ */
319
+ this.showBackground = input(this.config?.showBackground ?? false, { transform: XToBoolean });
320
+ /**
321
+ * @zh_CN 显示分页条数
322
+ * @en_US Show size
323
+ */
324
+ this.showSize = input(this.config?.showSize ?? false, { transform: XToBoolean });
325
+ /**
326
+ * @zh_CN 分页条数选择框的宽度
327
+ * @en_US size with select
328
+ */
329
+ this.sizeWidth = input(this.config?.sizeWidth ?? '6.875rem', { transform: XToCssPixelValue });
330
+ /**
331
+ * @zh_CN 显示输入分页条数(不能跟下拉选项同时使用)
332
+ * @en_US Display the number of input page breaks (cannot exist with the drop-down options of page breaks)
333
+ */
334
+ this.showInputSize = input(this.config?.showInputSize ?? false, { transform: XToBoolean });
335
+ /**
336
+ * @zh_CN 分页条数输入框的宽度
337
+ * @en_US size with input
338
+ */
339
+ this.inputSizeWidth = input(this.config?.sizeWidth ?? '3.125rem', {
340
+ transform: XToCssPixelValue
341
+ });
342
+ /**
343
+ * @zh_CN 分页选择的数据项
344
+ * @en_US Paging choose items of data
345
+ */
346
+ this.sizeData = input(this.config?.sizeData ?? XPaginationSizeData);
347
+ /**
348
+ * @zh_CN 禁用整个分页
349
+ * @en_US disabled
350
+ */
351
+ this.disabled = input(false, { transform: XToBoolean });
352
+ /**
353
+ * @zh_CN 显示跳转输入框
354
+ * @en_US Show size
355
+ */
356
+ this.showJump = input(false, { transform: XToBoolean });
357
+ /**
358
+ * @zh_CN 跳转页的宽度
359
+ * @en_US size with
360
+ */
361
+ this.jumpWidth = input(this.config?.jumpWidth ?? '3.125rem', { transform: XToCssPixelValue });
362
+ /**
363
+ * @zh_CN 总数自定义模板
364
+ * @en_US Total template
365
+ */
366
+ this.totalTpl = input();
367
+ /**
368
+ * @zh_CN 简单分页
369
+ * @en_US Simple
370
+ */
371
+ this.simple = input(this.config?.simple ?? false, { transform: XToBoolean });
372
+ /**
373
+ * @zh_CN 简单分页输入框宽度
374
+ * @en_US Simple index with
375
+ */
376
+ this.simpleIndexWidth = input(this.config?.simpleIndexWidth ?? '8.125rem', {
377
+ transform: XToCssPixelValue
378
+ });
117
379
  /**
118
380
  * @zh_CN 列头拖动开始事件,返回拖动的列
119
381
  * @en_US Column Header Drag End Event
120
382
  */
121
- this.columnDragStarted = new EventEmitter();
383
+ this.columnDragStarted = output();
122
384
  /**
123
385
  * @zh_CN 列头拖动结束事件,返回拖动的列
124
386
  * @en_US The column header is dragging, and the event is triggered when the order is changed
125
387
  */
126
- this.columnDragEnded = new EventEmitter();
388
+ this.columnDragEnded = output();
127
389
  /**
128
390
  * @zh_CN 当用户把一个条目投放进该容器时就会触发,拖动放开的事件,返回拖动排序后的列数据
129
391
  * @en_US The column header is dragging, and the event is triggered when the order is changed
130
392
  */
131
- this.columnDropListDropped = new EventEmitter();
393
+ this.columnDropListDropped = output();
132
394
  /**
133
395
  * @zh_CN 开始拖动列宽的事件
134
396
  * @en_US Event to started drag column width
135
397
  */
136
- this.columnDragWidthStarted = new EventEmitter();
398
+ this.columnDragWidthStarted = output();
137
399
  /**
138
400
  * @zh_CN 正在拖动列宽时的事件
139
401
  * @en_US Event to moved drag column width
140
402
  */
141
- this.columnDragWidthMoved = new EventEmitter();
403
+ this.columnDragWidthMoved = output();
142
404
  /**
143
405
  * @zh_CN 结束拖动列宽的事件
144
406
  * @en_US Event to ended drag column width
145
407
  */
146
- this.columnDragWidthEnded = new EventEmitter();
408
+ this.columnDragWidthEnded = output();
147
409
  }
148
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
149
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: XTableProperty, selector: "x-table-property", inputs: { data: "data", columns: "columns", rowHeight: "rowHeight", loading: "loading", bordered: "bordered", showHeader: "showHeader", headerPosition: "headerPosition", activatedRow: "activatedRow", headColumnTpl: "headColumnTpl", headThTpl: "headThTpl", bodyColumnTpl: "bodyColumnTpl", bodyTdTpl: "bodyTdTpl", rowClass: "rowClass", headSearchTpl: "headSearchTpl", allowSelectRow: "allowSelectRow", allowCheckRow: "allowCheckRow", virtualScroll: "virtualScroll", bodyHeight: "bodyHeight", itemSize: "itemSize", minBufferPx: "minBufferPx", maxBufferPx: "maxBufferPx", adaptionHeight: "adaptionHeight", docPercent: "docPercent", checkedRow: "checkedRow", manual: "manual", scroll: "scroll", header: "header", footer: "footer", cellConfig: "cellConfig", rowSize: "rowSize", paginationPosition: "paginationPosition", hiddenWrapBorder: "hiddenWrapBorder", hiddenPaginationBorder: "hiddenPaginationBorder", showPagination: "showPagination", treeTable: "treeTable", expandedAll: "expandedAll", expandedLevel: "expandedLevel", expanded: "expanded", expandTpl: "expandTpl", showEmpty: "showEmpty", emptyImg: "emptyImg", emptyContent: "emptyContent" }, outputs: { activatedRowChange: "activatedRowChange", sortChange: "sortChange", headCheckboxChange: "headCheckboxChange", bodyCheckboxChange: "bodyCheckboxChange", manualChange: "manualChange", columnDragStarted: "columnDragStarted", columnDragEnded: "columnDragEnded", columnDropListDropped: "columnDropListDropped", columnDragWidthStarted: "columnDragWidthStarted", columnDragWidthMoved: "columnDragWidthMoved", columnDragWidthEnded: "columnDragWidthEnded" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
410
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
411
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.0.1", type: XTableProperty, selector: "x-table-property", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, headerPosition: { classPropertyName: "headerPosition", publicName: "headerPosition", isSignal: true, isRequired: false, transformFunction: null }, activatedRow: { classPropertyName: "activatedRow", publicName: "activatedRow", isSignal: true, isRequired: false, transformFunction: null }, headColumnTpl: { classPropertyName: "headColumnTpl", publicName: "headColumnTpl", isSignal: true, isRequired: false, transformFunction: null }, headThTpl: { classPropertyName: "headThTpl", publicName: "headThTpl", isSignal: true, isRequired: false, transformFunction: null }, bodyColumnTpl: { classPropertyName: "bodyColumnTpl", publicName: "bodyColumnTpl", isSignal: true, isRequired: false, transformFunction: null }, bodyTdTpl: { classPropertyName: "bodyTdTpl", publicName: "bodyTdTpl", isSignal: true, isRequired: false, transformFunction: null }, rowClass: { classPropertyName: "rowClass", publicName: "rowClass", isSignal: true, isRequired: false, transformFunction: null }, headSearchTpl: { classPropertyName: "headSearchTpl", publicName: "headSearchTpl", isSignal: true, isRequired: false, transformFunction: null }, allowSelectRow: { classPropertyName: "allowSelectRow", publicName: "allowSelectRow", isSignal: true, isRequired: false, transformFunction: null }, allowCheckRow: { classPropertyName: "allowCheckRow", publicName: "allowCheckRow", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, bodyHeight: { classPropertyName: "bodyHeight", publicName: "bodyHeight", isSignal: true, isRequired: false, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, minBufferPx: { classPropertyName: "minBufferPx", publicName: "minBufferPx", isSignal: true, isRequired: false, transformFunction: null }, maxBufferPx: { classPropertyName: "maxBufferPx", publicName: "maxBufferPx", isSignal: true, isRequired: false, transformFunction: null }, adaptionHeight: { classPropertyName: "adaptionHeight", publicName: "adaptionHeight", isSignal: true, isRequired: false, transformFunction: null }, docPercent: { classPropertyName: "docPercent", publicName: "docPercent", isSignal: true, isRequired: false, transformFunction: null }, checkedRow: { classPropertyName: "checkedRow", publicName: "checkedRow", isSignal: true, isRequired: false, transformFunction: null }, manual: { classPropertyName: "manual", publicName: "manual", isSignal: true, isRequired: false, transformFunction: null }, scroll: { classPropertyName: "scroll", publicName: "scroll", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, footer: { classPropertyName: "footer", publicName: "footer", isSignal: true, isRequired: false, transformFunction: null }, cellConfig: { classPropertyName: "cellConfig", publicName: "cellConfig", isSignal: true, isRequired: false, transformFunction: null }, rowSize: { classPropertyName: "rowSize", publicName: "rowSize", isSignal: true, isRequired: false, transformFunction: null }, paginationPosition: { classPropertyName: "paginationPosition", publicName: "paginationPosition", isSignal: true, isRequired: false, transformFunction: null }, hiddenWrapBorder: { classPropertyName: "hiddenWrapBorder", publicName: "hiddenWrapBorder", isSignal: true, isRequired: false, transformFunction: null }, hiddenPaginationBorder: { classPropertyName: "hiddenPaginationBorder", publicName: "hiddenPaginationBorder", isSignal: true, isRequired: false, transformFunction: null }, showPagination: { classPropertyName: "showPagination", publicName: "showPagination", isSignal: true, isRequired: false, transformFunction: null }, treeTable: { classPropertyName: "treeTable", publicName: "treeTable", isSignal: true, isRequired: false, transformFunction: null }, expandedAll: { classPropertyName: "expandedAll", publicName: "expandedAll", isSignal: true, isRequired: false, transformFunction: null }, expandedLevel: { classPropertyName: "expandedLevel", publicName: "expandedLevel", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, expandTpl: { classPropertyName: "expandTpl", publicName: "expandTpl", isSignal: true, isRequired: false, transformFunction: null }, showEmpty: { classPropertyName: "showEmpty", publicName: "showEmpty", isSignal: true, isRequired: false, transformFunction: null }, emptyImg: { classPropertyName: "emptyImg", publicName: "emptyImg", isSignal: true, isRequired: false, transformFunction: null }, emptyContent: { classPropertyName: "emptyContent", publicName: "emptyContent", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, pageLinkSize: { classPropertyName: "pageLinkSize", publicName: "pageLinkSize", isSignal: true, isRequired: false, transformFunction: null }, showEllipsis: { classPropertyName: "showEllipsis", publicName: "showEllipsis", isSignal: true, isRequired: false, transformFunction: null }, showTotal: { classPropertyName: "showTotal", publicName: "showTotal", isSignal: true, isRequired: false, transformFunction: null }, space: { classPropertyName: "space", publicName: "space", isSignal: true, isRequired: false, transformFunction: null }, showBackground: { classPropertyName: "showBackground", publicName: "showBackground", isSignal: true, isRequired: false, transformFunction: null }, showSize: { classPropertyName: "showSize", publicName: "showSize", isSignal: true, isRequired: false, transformFunction: null }, sizeWidth: { classPropertyName: "sizeWidth", publicName: "sizeWidth", isSignal: true, isRequired: false, transformFunction: null }, showInputSize: { classPropertyName: "showInputSize", publicName: "showInputSize", isSignal: true, isRequired: false, transformFunction: null }, inputSizeWidth: { classPropertyName: "inputSizeWidth", publicName: "inputSizeWidth", isSignal: true, isRequired: false, transformFunction: null }, sizeData: { classPropertyName: "sizeData", publicName: "sizeData", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, showJump: { classPropertyName: "showJump", publicName: "showJump", isSignal: true, isRequired: false, transformFunction: null }, jumpWidth: { classPropertyName: "jumpWidth", publicName: "jumpWidth", isSignal: true, isRequired: false, transformFunction: null }, totalTpl: { classPropertyName: "totalTpl", publicName: "totalTpl", isSignal: true, isRequired: false, transformFunction: null }, simple: { classPropertyName: "simple", publicName: "simple", isSignal: true, isRequired: false, transformFunction: null }, simpleIndexWidth: { classPropertyName: "simpleIndexWidth", publicName: "simpleIndexWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activatedRow: "activatedRowChange", sortChange: "sortChange", headCheckboxChange: "headCheckboxChange", bodyCheckboxChange: "bodyCheckboxChange", manual: "manualChange", index: "indexChange", size: "sizeChange", total: "totalChange", query: "queryChange", columnDragStarted: "columnDragStarted", columnDragEnded: "columnDragEnded", columnDropListDropped: "columnDropListDropped", columnDragWidthStarted: "columnDragWidthStarted", columnDragWidthMoved: "columnDragWidthMoved", columnDragWidthEnded: "columnDragWidthEnded" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
150
412
  }
151
- __decorate([
152
- XWithConfig(X_CONFIG_NAME, 42),
153
- XInputNumber()
154
- ], XTableProperty.prototype, "rowHeight", void 0);
155
- __decorate([
156
- XWithConfig(X_CONFIG_NAME, false),
157
- XInputBoolean()
158
- ], XTableProperty.prototype, "loading", void 0);
159
- __decorate([
160
- XWithConfig(X_CONFIG_NAME, false),
161
- XInputBoolean()
162
- ], XTableProperty.prototype, "bordered", void 0);
163
- __decorate([
164
- XWithConfig(X_CONFIG_NAME, true),
165
- XInputBoolean()
166
- ], XTableProperty.prototype, "showHeader", void 0);
167
- __decorate([
168
- XWithConfig(X_CONFIG_NAME, 'top')
169
- ], XTableProperty.prototype, "headerPosition", void 0);
170
- __decorate([
171
- XWithConfig(X_CONFIG_NAME, true),
172
- XInputBoolean()
173
- ], XTableProperty.prototype, "allowSelectRow", void 0);
174
- __decorate([
175
- XWithConfig(X_CONFIG_NAME, true),
176
- XInputBoolean()
177
- ], XTableProperty.prototype, "allowCheckRow", void 0);
178
- __decorate([
179
- XWithConfig(X_CONFIG_NAME),
180
- XInputBoolean()
181
- ], XTableProperty.prototype, "virtualScroll", void 0);
182
- __decorate([
183
- XInputNumber()
184
- ], XTableProperty.prototype, "bodyHeight", void 0);
185
- __decorate([
186
- XWithConfig(X_CONFIG_NAME, 42),
187
- XInputNumber()
188
- ], XTableProperty.prototype, "itemSize", void 0);
189
- __decorate([
190
- XInputNumber()
191
- ], XTableProperty.prototype, "adaptionHeight", void 0);
192
- __decorate([
193
- XInputNumber()
194
- ], XTableProperty.prototype, "docPercent", void 0);
195
- __decorate([
196
- XInputBoolean()
197
- ], XTableProperty.prototype, "manual", void 0);
198
- __decorate([
199
- XWithConfig(X_CONFIG_NAME, 'medium')
200
- ], XTableProperty.prototype, "rowSize", void 0);
201
- __decorate([
202
- XWithConfig(X_CONFIG_NAME, false),
203
- XInputBoolean()
204
- ], XTableProperty.prototype, "hiddenWrapBorder", void 0);
205
- __decorate([
206
- XWithConfig(X_CONFIG_NAME, false),
207
- XInputBoolean()
208
- ], XTableProperty.prototype, "hiddenPaginationBorder", void 0);
209
- __decorate([
210
- XWithConfig(X_CONFIG_NAME, true),
211
- XInputBoolean()
212
- ], XTableProperty.prototype, "showPagination", void 0);
213
- __decorate([
214
- XWithConfig(X_CONFIG_NAME, false),
215
- XInputBoolean()
216
- ], XTableProperty.prototype, "treeTable", void 0);
217
- __decorate([
218
- XWithConfig(X_CONFIG_NAME, false),
219
- XInputBoolean()
220
- ], XTableProperty.prototype, "expandedAll", void 0);
221
- __decorate([
222
- XWithConfig(X_CONFIG_NAME, -1),
223
- XInputNumber()
224
- ], XTableProperty.prototype, "expandedLevel", void 0);
225
- __decorate([
226
- XWithConfig(X_CONFIG_NAME, true),
227
- XInputBoolean()
228
- ], XTableProperty.prototype, "showEmpty", void 0);
229
- __decorate([
230
- XWithConfig(X_CONFIG_NAME)
231
- ], XTableProperty.prototype, "emptyImg", void 0);
232
- __decorate([
233
- XWithConfig(X_CONFIG_NAME)
234
- ], XTableProperty.prototype, "emptyContent", void 0);
235
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableProperty, decorators: [{
413
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableProperty, decorators: [{
236
414
  type: Component,
237
415
  args: [{ selector: `${XTablePrefix}-property`, template: '' }]
238
- }], propDecorators: { data: [{
239
- type: Input
240
- }], columns: [{
241
- type: Input
242
- }], rowHeight: [{
243
- type: Input
244
- }], loading: [{
245
- type: Input
246
- }], bordered: [{
247
- type: Input
248
- }], showHeader: [{
249
- type: Input
250
- }], headerPosition: [{
251
- type: Input
252
- }], activatedRow: [{
253
- type: Input
254
- }], activatedRowChange: [{
255
- type: Output
256
- }], headColumnTpl: [{
257
- type: Input
258
- }], headThTpl: [{
259
- type: Input
260
- }], bodyColumnTpl: [{
261
- type: Input
262
- }], bodyTdTpl: [{
263
- type: Input
264
- }], rowClass: [{
265
- type: Input
266
- }], headSearchTpl: [{
267
- type: Input
268
- }], sortChange: [{
269
- type: Output
270
- }], headCheckboxChange: [{
271
- type: Output
272
- }], bodyCheckboxChange: [{
273
- type: Output
274
- }], allowSelectRow: [{
275
- type: Input
276
- }], allowCheckRow: [{
277
- type: Input
278
- }], virtualScroll: [{
279
- type: Input
280
- }], bodyHeight: [{
281
- type: Input
282
- }], itemSize: [{
283
- type: Input
284
- }], minBufferPx: [{
285
- type: Input
286
- }], maxBufferPx: [{
287
- type: Input
288
- }], adaptionHeight: [{
289
- type: Input
290
- }], docPercent: [{
291
- type: Input
292
- }], checkedRow: [{
293
- type: Input
294
- }], manual: [{
295
- type: Input
296
- }], scroll: [{
297
- type: Input
298
- }], header: [{
299
- type: Input
300
- }], footer: [{
301
- type: Input
302
- }], manualChange: [{
303
- type: Output
304
- }], cellConfig: [{
305
- type: Input
306
- }], rowSize: [{
307
- type: Input
308
- }], paginationPosition: [{
309
- type: Input
310
- }], hiddenWrapBorder: [{
311
- type: Input
312
- }], hiddenPaginationBorder: [{
313
- type: Input
314
- }], showPagination: [{
315
- type: Input
316
- }], treeTable: [{
317
- type: Input
318
- }], expandedAll: [{
319
- type: Input
320
- }], expandedLevel: [{
321
- type: Input
322
- }], expanded: [{
323
- type: Input
324
- }], expandTpl: [{
325
- type: Input
326
- }], showEmpty: [{
327
- type: Input
328
- }], emptyImg: [{
329
- type: Input
330
- }], emptyContent: [{
331
- type: Input
332
- }], columnDragStarted: [{
333
- type: Output
334
- }], columnDragEnded: [{
335
- type: Output
336
- }], columnDropListDropped: [{
337
- type: Output
338
- }], columnDragWidthStarted: [{
339
- type: Output
340
- }], columnDragWidthMoved: [{
341
- type: Output
342
- }], columnDragWidthEnded: [{
343
- type: Output
344
- }] } });
416
+ }] });
345
417
  /**
346
418
  * Table Head
347
419
  * @selector x-table-head
@@ -358,42 +430,45 @@ class XTableHeadProperty extends XProperty {
358
430
  * @zh_CN 列集合
359
431
  * @en_US Column set
360
432
  */
361
- this.columns = [];
433
+ this.columns = input([]);
362
434
  /**
363
435
  * @zh_CN 高度,单位 px
364
436
  * @en_US Height in px
365
437
  */
366
- this.rowHeight = 42;
438
+ this.rowHeight = input(42, { transform: XToNumber });
367
439
  /**
368
440
  * @zh_CN 自定义模板
369
441
  * @en_US Custom template
370
442
  */
371
- this.columnTpl = {};
443
+ this.columnTpl = input({});
444
+ /**
445
+ * @zh_CN 竖向滚动条宽度
446
+ * @en_US Vertical scroll bar width
447
+ */
448
+ this.scrollYWidth = input(null, { transform: XToNumber });
449
+ /**
450
+ * @zh_CN 横向滚动条宽度
451
+ * @en_US Horizontal scroll bar width
452
+ */
453
+ this.scrollXWidth = input(null, { transform: XToNumber });
454
+ /**
455
+ * @zh_CN 单元格配置
456
+ * @en_US Cell merge rules
457
+ */
458
+ this.cellConfig = input();
459
+ /**
460
+ * @zh_CN 显示的位置
461
+ * @en_US Display position
462
+ */
463
+ this.position = input();
372
464
  }
373
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableHeadProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
374
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: XTableHeadProperty, selector: "x-table-head-property", inputs: { columns: "columns", rowHeight: "rowHeight", columnTpl: "columnTpl", scrollYWidth: "scrollYWidth", scrollXWidth: "scrollXWidth", cellConfig: "cellConfig", position: "position" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
465
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableHeadProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
466
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.0.1", type: XTableHeadProperty, selector: "x-table-head-property", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null }, columnTpl: { classPropertyName: "columnTpl", publicName: "columnTpl", isSignal: true, isRequired: false, transformFunction: null }, scrollYWidth: { classPropertyName: "scrollYWidth", publicName: "scrollYWidth", isSignal: true, isRequired: false, transformFunction: null }, scrollXWidth: { classPropertyName: "scrollXWidth", publicName: "scrollXWidth", isSignal: true, isRequired: false, transformFunction: null }, cellConfig: { classPropertyName: "cellConfig", publicName: "cellConfig", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
375
467
  }
376
- __decorate([
377
- XInputNumber()
378
- ], XTableHeadProperty.prototype, "rowHeight", void 0);
379
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableHeadProperty, decorators: [{
468
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableHeadProperty, decorators: [{
380
469
  type: Component,
381
470
  args: [{ selector: `${XTableHeadPrefix}-property`, template: '' }]
382
- }], propDecorators: { columns: [{
383
- type: Input
384
- }], rowHeight: [{
385
- type: Input
386
- }], columnTpl: [{
387
- type: Input
388
- }], scrollYWidth: [{
389
- type: Input
390
- }], scrollXWidth: [{
391
- type: Input
392
- }], cellConfig: [{
393
- type: Input
394
- }], position: [{
395
- type: Input
396
- }] } });
471
+ }] });
397
472
  /**
398
473
  * Table Body
399
474
  * @selector x-table-body
@@ -410,134 +485,105 @@ class XTableBodyProperty extends XProperty {
410
485
  * @zh_CN 行数据
411
486
  * @en_US Row data
412
487
  */
413
- this.data = [];
488
+ this.data = input([]);
414
489
  /**
415
490
  * @zh_CN 列集合
416
491
  * @en_US Column set
417
492
  */
418
- this.columns = [];
493
+ this.columns = input([]);
419
494
  /**
420
495
  * @zh_CN 自定义模板
421
496
  * @en_US Custom template
422
497
  */
423
- this.columnTpl = {};
498
+ this.columnTpl = input({});
424
499
  /**
425
- * @zh_CN 当前选中行改变
426
- * @en_US The currently selected row changes
500
+ * @zh_CN 当前选中行数据
501
+ * @en_US Currently selected row data
427
502
  */
428
- this.activatedRowChange = new EventEmitter();
503
+ this.activatedRow = model();
429
504
  /**
430
505
  * @zh_CN 高度,单位 px。设置为 0 表示行高自适应内容高度。
431
506
  * @en_US Height in px. set to 0 means that the row height is adaptive to the content height
432
507
  */
433
- this.rowHeight = 42;
508
+ this.rowHeight = input(42, { transform: XToNumber });
509
+ /**
510
+ * @zh_CN body 数据高度
511
+ * @en_US body data height
512
+ */
513
+ this.bodyHeight = input(null, { transform: XToNumber });
434
514
  /**
435
515
  * @zh_CN 允许行点击选中
436
516
  * @en_US Allow row click to select
437
517
  */
438
- this.allowSelectRow = true;
518
+ this.allowSelectRow = input(true, { transform: XToBoolean });
439
519
  /**
440
520
  * @zh_CN 开启虚拟滚动
441
521
  * @en_US Turn on virtual scrolling
442
522
  */
443
- this.virtualScroll = false;
523
+ this.virtualScroll = input(false, { transform: XToBoolean });
444
524
  /**
445
525
  * @zh_CN itemSize,对应 cdk scroll 中的参数
446
526
  * @en_US itemSize,corresponding to the parameters in cdk scroll
447
527
  */
448
- this.itemSize = 42;
528
+ this.itemSize = input(42, { transform: XToNumber });
449
529
  /**
450
530
  * @zh_CN 超出可视窗口缓冲区的最小值,对应 cdk scroll 中的参数
451
531
  * @en_US Exceed the minimum value of the visible window buffer, corresponding to the parameters in cdk scroll
452
532
  */
453
- this.minBufferPx = 100;
533
+ this.minBufferPx = input(100, { transform: XToNumber });
454
534
  /**
455
535
  * @zh_CN 渲染新数据缓冲区的像素,对应 cdk scroll 中的参数
456
536
  * @en_US Render the pixels of the new data buffer, corresponding to the parameters in cdk scroll
457
537
  */
458
- this.maxBufferPx = 200;
538
+ this.maxBufferPx = input(200, { transform: XToNumber });
539
+ /**
540
+ * @zh_CN 自适应高度,table 高度等于屏幕高度减掉此处设置的数值
541
+ * @en_US Adaptive height, table height is equal to the screen height minus the value set here
542
+ */
543
+ this.adaptionHeight = input(null, { transform: XToNumber });
459
544
  /**
460
545
  * @zh_CN 文档高度百分比,弹窗百分比高度用到
461
546
  * @en_US Document height percentage, used by pop-up window percentage height
462
547
  */
463
- this.docPercent = 1;
548
+ this.docPercent = input(1, { transform: XToNumber });
549
+ /**
550
+ * @zh_CN 滚动区域高宽
551
+ * @en_US Height and width of rolling area
552
+ */
553
+ this.scroll = input();
554
+ /**
555
+ * @zh_CN 单元格配置规则
556
+ * @en_US Cell config rules
557
+ */
558
+ this.cellConfig = input();
559
+ /**
560
+ * @zh_CN 行条件样式
561
+ * @en_US Row condition class
562
+ */
563
+ this.rowClass = input();
464
564
  /**
465
565
  * @zh_CN 树形表格下的层级
466
566
  * @en_US The level under the tree table
467
567
  */
468
- this.level = 0;
568
+ this.level = input(0, { transform: XToNumber });
569
+ /**
570
+ * @zh_CN 树形表格展开所有节点
571
+ * @en_US Tree table
572
+ */
573
+ this.expandedAll = input(false, { transform: XToBoolean });
574
+ /**
575
+ * @zh_CN 自定义展开内容
576
+ * @en_US Customized expansion content
577
+ */
578
+ this.expandTpl = input();
469
579
  }
470
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableBodyProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
471
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: XTableBodyProperty, selector: "x-table-body-property", inputs: { data: "data", columns: "columns", columnTpl: "columnTpl", activatedRow: "activatedRow", rowHeight: "rowHeight", bodyHeight: "bodyHeight", allowSelectRow: "allowSelectRow", virtualScroll: "virtualScroll", itemSize: "itemSize", minBufferPx: "minBufferPx", maxBufferPx: "maxBufferPx", adaptionHeight: "adaptionHeight", docPercent: "docPercent", scroll: "scroll", cellConfig: "cellConfig", rowClass: "rowClass", level: "level", expandedAll: "expandedAll", expandTpl: "expandTpl" }, outputs: { activatedRowChange: "activatedRowChange" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
580
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableBodyProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
581
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.0.1", type: XTableBodyProperty, selector: "x-table-body-property", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, columnTpl: { classPropertyName: "columnTpl", publicName: "columnTpl", isSignal: true, isRequired: false, transformFunction: null }, activatedRow: { classPropertyName: "activatedRow", publicName: "activatedRow", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null }, bodyHeight: { classPropertyName: "bodyHeight", publicName: "bodyHeight", isSignal: true, isRequired: false, transformFunction: null }, allowSelectRow: { classPropertyName: "allowSelectRow", publicName: "allowSelectRow", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, minBufferPx: { classPropertyName: "minBufferPx", publicName: "minBufferPx", isSignal: true, isRequired: false, transformFunction: null }, maxBufferPx: { classPropertyName: "maxBufferPx", publicName: "maxBufferPx", isSignal: true, isRequired: false, transformFunction: null }, adaptionHeight: { classPropertyName: "adaptionHeight", publicName: "adaptionHeight", isSignal: true, isRequired: false, transformFunction: null }, docPercent: { classPropertyName: "docPercent", publicName: "docPercent", isSignal: true, isRequired: false, transformFunction: null }, scroll: { classPropertyName: "scroll", publicName: "scroll", isSignal: true, isRequired: false, transformFunction: null }, cellConfig: { classPropertyName: "cellConfig", publicName: "cellConfig", isSignal: true, isRequired: false, transformFunction: null }, rowClass: { classPropertyName: "rowClass", publicName: "rowClass", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, expandedAll: { classPropertyName: "expandedAll", publicName: "expandedAll", isSignal: true, isRequired: false, transformFunction: null }, expandTpl: { classPropertyName: "expandTpl", publicName: "expandTpl", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activatedRow: "activatedRowChange" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
472
582
  }
473
- __decorate([
474
- XInputNumber()
475
- ], XTableBodyProperty.prototype, "rowHeight", void 0);
476
- __decorate([
477
- XInputNumber()
478
- ], XTableBodyProperty.prototype, "bodyHeight", void 0);
479
- __decorate([
480
- XInputBoolean()
481
- ], XTableBodyProperty.prototype, "allowSelectRow", void 0);
482
- __decorate([
483
- XInputBoolean()
484
- ], XTableBodyProperty.prototype, "virtualScroll", void 0);
485
- __decorate([
486
- XInputNumber()
487
- ], XTableBodyProperty.prototype, "itemSize", void 0);
488
- __decorate([
489
- XInputNumber()
490
- ], XTableBodyProperty.prototype, "adaptionHeight", void 0);
491
- __decorate([
492
- XInputNumber()
493
- ], XTableBodyProperty.prototype, "docPercent", void 0);
494
- __decorate([
495
- XInputBoolean()
496
- ], XTableBodyProperty.prototype, "expandedAll", void 0);
497
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableBodyProperty, decorators: [{
583
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableBodyProperty, decorators: [{
498
584
  type: Component,
499
585
  args: [{ selector: `${XTableBodyPrefix}-property`, template: '' }]
500
- }], propDecorators: { data: [{
501
- type: Input
502
- }], columns: [{
503
- type: Input
504
- }], columnTpl: [{
505
- type: Input
506
- }], activatedRow: [{
507
- type: Input
508
- }], activatedRowChange: [{
509
- type: Output
510
- }], rowHeight: [{
511
- type: Input
512
- }], bodyHeight: [{
513
- type: Input
514
- }], allowSelectRow: [{
515
- type: Input
516
- }], virtualScroll: [{
517
- type: Input
518
- }], itemSize: [{
519
- type: Input
520
- }], minBufferPx: [{
521
- type: Input
522
- }], maxBufferPx: [{
523
- type: Input
524
- }], adaptionHeight: [{
525
- type: Input
526
- }], docPercent: [{
527
- type: Input
528
- }], scroll: [{
529
- type: Input
530
- }], cellConfig: [{
531
- type: Input
532
- }], rowClass: [{
533
- type: Input
534
- }], level: [{
535
- type: Input
536
- }], expandedAll: [{
537
- type: Input
538
- }], expandTpl: [{
539
- type: Input
540
- }] } });
586
+ }] });
541
587
  /**
542
588
  * Table Foot
543
589
  * @selector x-table-foot
@@ -548,53 +594,63 @@ const XTableFootPrefix = 'x-table-foot';
548
594
  * Table Foot Property
549
595
  */
550
596
  class XTableFootProperty extends XProperty {
551
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableFootProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
552
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: XTableFootProperty, selector: "x-table-foot-property", inputs: { footer: "footer", rowHeight: "rowHeight" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
597
+ constructor() {
598
+ super(...arguments);
599
+ /**
600
+ * @zh_CN 表格页尾
601
+ * @en_US Table footer
602
+ */
603
+ this.footer = input();
604
+ /**
605
+ * @zh_CN 表头和行高,单位 px
606
+ * @en_US Header and row height, unit px
607
+ */
608
+ this.rowHeight = input(null, { transform: XToNumber });
609
+ }
610
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableFootProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
611
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.0.1", type: XTableFootProperty, selector: "x-table-foot-property", inputs: { footer: { classPropertyName: "footer", publicName: "footer", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
553
612
  }
554
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableFootProperty, decorators: [{
613
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableFootProperty, decorators: [{
555
614
  type: Component,
556
615
  args: [{ selector: `${XTableFootPrefix}-property`, template: '' }]
557
- }], propDecorators: { footer: [{
558
- type: Input
559
- }], rowHeight: [{
560
- type: Input
561
- }] } });
616
+ }] });
562
617
 
563
618
  class XTableHeadComponent extends XTableHeadProperty {
564
619
  constructor() {
565
620
  super(...arguments);
566
- this.sort = [];
567
- this.sortStr = '';
568
- this.theadStyle = {};
569
- this.thClassMap = {};
570
- this.elementRef = inject(ElementRef);
621
+ this.table = inject(XTableComponent, { optional: true });
571
622
  this.cdr = inject(ChangeDetectorRef);
572
- this.configService = inject(XConfigService);
573
- this.initColumns = [];
574
- }
575
- get getRowHeight() {
576
- return this.rowHeight == 0 ? '' : this.rowHeight;
577
- }
578
- ngOnChanges(simples) {
579
- const { columns, scrollYWidth, scrollXWidth, cellConfig } = simples;
580
- if (XIsChange(columns)) {
581
- this.initColumns = [...this.columns];
582
- }
583
- XIsChange(columns, scrollYWidth, scrollXWidth, cellConfig) && this.cdr.detectChanges();
623
+ this.thead = viewChild.required('thead');
624
+ this.sort = signal([]);
625
+ this.sortStr = signal('');
626
+ this.theadStyle = computed(() => {
627
+ let height = this.rowHeight() === 0 ? '' : this.rowHeight();
628
+ if (this.cellConfig() && this.cellConfig().cells) {
629
+ const spt = this.cellConfig().cells?.map((x) => {
630
+ const gridAreaSpt = x.gridArea?.split('/');
631
+ return gridAreaSpt && gridAreaSpt.length > 3 ? Number(gridAreaSpt[2]) : 2;
632
+ });
633
+ height = ((Math.max(...spt) - 1) * height);
634
+ }
635
+ return {
636
+ ['min-height']: `${this.getRowHeight()}px`
637
+ };
638
+ });
639
+ this.thClassMap = computed(() => ({
640
+ [`${XTablePrefix}-th-${this.table.rowSize()}`]: !XIsEmpty(this.table.rowSize())
641
+ }));
642
+ this.initColumns = computed(() => [...this.columns()]);
643
+ this.getRowHeight = computed(() => (this.rowHeight() == 0 ? '' : this.rowHeight()));
644
+ this.elementRef = inject(ElementRef);
584
645
  }
585
646
  ngOnInit() {
586
- removeNgTag(this.elementRef.nativeElement);
587
- this.setStyle();
647
+ XRemoveNgTag(this.elementRef.nativeElement);
588
648
  }
589
649
  ngAfterViewInit() {
590
- this.table.theads.push(this.thead);
591
- this.table.theadsChange.push(() => this.cdr.detectChanges());
592
- this.setThClassMap();
593
- }
594
- setThClassMap() {
595
- this.thClassMap = {
596
- [`${XTablePrefix}-th-${this.table.rowSize}`]: !XIsEmpty(this.table.rowSize)
597
- };
650
+ this.table.theads.update((x) => {
651
+ x.push(this.thead());
652
+ return [...x];
653
+ });
598
654
  }
599
655
  getFlex(column) {
600
656
  if (column.width)
@@ -605,47 +661,26 @@ class XTableHeadComponent extends XTableHeadProperty {
605
661
  }
606
662
  getColumnRight(right) {
607
663
  if (Number(right) >= 0) {
608
- if (Number(this.scrollYWidth) >= 0) {
609
- return Number(right) + Number(this.scrollYWidth);
664
+ if (Number(this.scrollYWidth()) >= 0) {
665
+ return Number(right) + Number(this.scrollYWidth());
610
666
  }
611
667
  return Number(right);
612
668
  }
613
- // return right;
614
669
  return '';
615
670
  }
616
671
  getColumnWidth(column) {
617
- // if (Number(column.right) === 0) {
618
- // if (Number(this.scrollYWidth) >= 0) {
619
- // return Number(column.width) + Number(this.scrollYWidth);
620
- // }
621
- // return column.width;
622
- // }
623
672
  return column.width;
624
673
  }
625
- setStyle() {
626
- let height = this.rowHeight == 0 ? '' : this.rowHeight;
627
- if (this.cellConfig && this.cellConfig.cells) {
628
- const spt = this.cellConfig.cells.map((x) => {
629
- const gridAreaSpt = x.gridArea?.split('/');
630
- return gridAreaSpt && gridAreaSpt.length > 3 ? Number(gridAreaSpt[2]) : 2;
631
- });
632
- height = ((Math.max(...spt) - 1) * height);
633
- }
634
- this.theadStyle = {
635
- // height: `${height}px`,
636
- ['min-height']: `${this.getRowHeight}px`
637
- };
638
- }
639
674
  onSort(column) {
640
675
  if (!column.sort)
641
676
  return;
642
- if (XIsEmpty(this.sort))
643
- this.sort = [];
644
- let sort = this.sort?.find((y) => y.field === column.id);
677
+ if (XIsEmpty(this.sort()))
678
+ this.sort.set([]);
679
+ let sort = this.sort().find((y) => y.field === column.id);
645
680
  if (sort) {
646
681
  if (sort.value === 'asc') {
647
- this.sort = [];
648
- this.sortStr = '';
682
+ this.sort.set([]);
683
+ this.sortStr.set('');
649
684
  }
650
685
  else {
651
686
  sort.value = 'asc';
@@ -653,14 +688,13 @@ class XTableHeadComponent extends XTableHeadProperty {
653
688
  }
654
689
  else {
655
690
  sort = { field: column.id, value: 'desc' };
656
- this.sort = [sort];
691
+ this.sort.set([sort]);
657
692
  }
658
- if (!XIsEmpty(this.sort))
659
- this.sortStr = `${sort.field} ${sort.value}`;
660
- this.table.checkSort(this.sort);
661
- this.table.sortChange.emit(this.sort);
693
+ if (!XIsEmpty(this.sort()))
694
+ this.sortStr.set(`${sort.field} ${sort.value}`);
695
+ this.table.checkSort(this.sort());
696
+ this.table.sortChange.emit(this.sort());
662
697
  this.table.resetScroll(false, true);
663
- this.cdr.detectChanges();
664
698
  }
665
699
  dragWidthMoved(position, column) {
666
700
  if (column.width) {
@@ -669,8 +703,7 @@ class XTableHeadComponent extends XTableHeadProperty {
669
703
  column.width = 60;
670
704
  XIsFunction(column.dragWidthMoved) && column.dragWidthMoved({ position, column });
671
705
  this.table.columnDragWidthMoved.emit({ position, column });
672
- this.cdr.detectChanges();
673
- this.table.bodyChange();
706
+ this.table.detectChanges();
674
707
  }
675
708
  }
676
709
  dragWidthStarted(position, column) {
@@ -688,46 +721,41 @@ class XTableHeadComponent extends XTableHeadProperty {
688
721
  }
689
722
  }
690
723
  dropListDropped(event) {
691
- const previous = this.initColumns[event.previousIndex];
692
- const current = this.initColumns[event.currentIndex];
724
+ const previous = this.initColumns()[event.previousIndex];
725
+ const current = this.initColumns()[event.currentIndex];
693
726
  const middle = { left: previous.left, right: previous.right };
694
727
  previous.left = current.left;
695
728
  previous.right = current.right;
696
729
  current.left = middle.left;
697
730
  current.right = middle.right;
698
- moveItemInArray(this.initColumns, event.previousIndex, event.currentIndex);
699
- this.table.columnDropListDropped.emit(this.initColumns);
731
+ moveItemInArray(this.initColumns(), event.previousIndex, event.currentIndex);
732
+ this.table.columnDropListDropped.emit(this.initColumns());
700
733
  }
701
734
  dropListSorted(event) {
702
- const previous = this.columns[event.previousIndex];
703
- const current = this.columns[event.currentIndex];
735
+ const previous = this.columns()[event.previousIndex];
736
+ const current = this.columns()[event.currentIndex];
704
737
  const middle = { left: previous.left, right: previous.right };
705
738
  previous.left = current.left;
706
739
  previous.right = current.right;
707
740
  current.left = middle.left;
708
741
  current.right = middle.right;
709
- moveItemInArray(this.columns, event.previousIndex, event.currentIndex);
710
- this.dragChange();
742
+ moveItemInArray(this.columns(), event.previousIndex, event.currentIndex);
743
+ this.table.detectChanges();
711
744
  }
712
745
  dragStarted(_event, column) {
713
746
  column.dragging = true;
714
- this.dragChange();
715
- this.table.theadsChanges();
747
+ this.table.detectChanges();
716
748
  this.table.columnDragStarted.emit(column);
717
749
  }
718
750
  dragEnded(column) {
719
751
  column.dragging = false;
720
- this.dragChange();
721
- this.table.theadsChanges();
752
+ this.table.detectChanges();
722
753
  this.table.columnDragEnded.emit(column);
723
754
  }
724
- dragChange() {
725
- this.table.bodyChange();
726
- }
727
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableHeadComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
728
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: XTableHeadComponent, isStandalone: true, selector: "x-table-head", inputs: { table: "table" }, viewQueries: [{ propertyName: "thead", first: true, predicate: ["thead"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<thead\r\n #thead\r\n [ngStyle]=\"theadStyle\"\r\n [class.x-table-head-top]=\"position === 'top'\"\r\n [class.x-table-head-bottom]=\"position === 'bottom'\"\r\n>\r\n @if (cellConfig) {\r\n <tr [style.gridTemplateColumns]=\"cellConfig.gridTemplateColumns\" [style.min-height.px]=\"getRowHeight\">\r\n @for (column of cellConfig.cells; track column.id) {\r\n <th\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [class.x-table-width-drag]=\"column.dragWidth\"\r\n [style.grid-area]=\"column.gridArea\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [title]=\"column?.label\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"></ng-container>\r\n @if (column.dragWidth) {\r\n <div\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"columnsTpl\"></ng-container>\r\n }\r\n @if (table.headSearchTpl) {\r\n <ng-container *ngTemplateOutlet=\"columnsTpl; context: { case: 'search' }\"></ng-container>\r\n }\r\n</thead>\r\n\r\n<ng-template #columnsTpl let-case=\"case\">\r\n <tr\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListSorted)=\"dropListSorted($event)\"\r\n (cdkDropListDropped)=\"dropListDropped($event)\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [style.padding-right.px]=\"scrollYWidth\"\r\n [style.width.px]=\"scrollXWidth\"\r\n [class.x-table-search]=\"case === 'search'\"\r\n >\r\n @for (column of initColumns; track column.id) {\r\n <th\r\n cdkDrag\r\n [cdkDragDisabled]=\"column.draggingWidth || !column.dragColumn\"\r\n (cdkDragStarted)=\"dragStarted($event, column)\"\r\n (cdkDragEnded)=\"dragEnded(column)\"\r\n [ngClass]=\"thClassMap\"\r\n [class.x-table-th]=\"true\"\r\n [class.x-table-sticky]=\"table.getSticky(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [style.width.px]=\"getColumnWidth(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"getColumnRight(column.right)\"\r\n [style.flex]=\"getFlex(column)\"\r\n >\r\n @switch (case) {\r\n @case ('search') {\r\n <ng-container *ngTemplateOutlet=\"table.headSearchTpl; context: { $column: column }\"></ng-container>\r\n }\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"></ng-container>\r\n @if (column.dragWidth) {\r\n <div\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n }\r\n }\r\n }\r\n </th>\r\n }\r\n </tr>\r\n</ng-template>\r\n\r\n<ng-template #columnBaseTpl let-column=\"column\">\r\n @switch (column.type) {\r\n @case ('checkbox') {\r\n @if (column.headChecked) {\r\n <x-checkbox\r\n [data]=\"[{ id: true, label: column.label }]\"\r\n [(ngModel)]=\"table.checkedValues[column.id]\"\r\n (ngModelChange)=\"table.headChecked($event, column)\"\r\n [indeterminate]=\"table.checkedValues[column.id + table.indeterminate]\"\r\n single\r\n ></x-checkbox>\r\n }\r\n @if (!column.headChecked) {\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></ng-container>\r\n }\r\n }\r\n @case ('index') {\r\n <a>\r\n <ng-container *xOutlet=\"columnTpl[column.id]; context: { $column: column }\">\r\n <ng-container *xOutlet=\"table.headThTpl; context: { $column: column }\">\r\n {{ column.label }}\r\n </ng-container>\r\n </ng-container>\r\n </a>\r\n }\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></ng-container>\r\n }\r\n }\r\n</ng-template>\r\n\r\n<ng-template #cloumnDefaultTpl let-column=\"column\">\r\n <a [class.x-table-sort]=\"column.sort\" (click)=\"onSort(column)\" [style.text-align]=\"column.textAlign\">\r\n <ng-container *xOutlet=\"columnTpl[column.id]; context: { $column: column }\">\r\n <ng-container *xOutlet=\"table.headThTpl; context: { $column: column }\">\r\n {{ column.label }}\r\n </ng-container>\r\n </ng-container>\r\n @if (column.sort) {\r\n <x-icon\r\n type=\"fto-bar-chart\"\r\n class=\"x-table-sort-icon\"\r\n [class.x-table-icon-up]=\"sortStr === column.id + ' desc'\"\r\n [class.x-table-icon-down]=\"sortStr === column.id + ' asc'\"\r\n ></x-icon>\r\n }\r\n </a>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: XDragDirective, selector: "[x-drag]" }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: XCheckboxComponent, selector: "x-checkbox" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: XIconComponent, selector: "x-icon" }], encapsulation: i0.ViewEncapsulation.None }); }
755
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableHeadComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
756
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.1", type: XTableHeadComponent, isStandalone: true, selector: "x-table-head", viewQueries: [{ propertyName: "thead", first: true, predicate: ["thead"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<thead\r\n #thead\r\n [ngStyle]=\"theadStyle()\"\r\n [class.x-table-head-top]=\"position() === 'top'\"\r\n [class.x-table-head-bottom]=\"position() === 'bottom'\"\r\n>\r\n @if (cellConfig()) {\r\n <tr [style.gridTemplateColumns]=\"cellConfig()!.gridTemplateColumns\" [style.min-height.px]=\"getRowHeight()\">\r\n @for (column of cellConfig()!.cells; track column.id) {\r\n <th\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [class.x-table-width-drag]=\"column.dragWidth\"\r\n [style.grid-area]=\"column.gridArea\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n [title]=\"column?.label\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"></ng-container>\r\n @if (column.dragWidth) {\r\n <div\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"columnsTpl\"></ng-container>\r\n }\r\n @if (table.headSearchTpl()) {\r\n <ng-container *ngTemplateOutlet=\"columnsTpl; context: { case: 'search' }\"></ng-container>\r\n }\r\n</thead>\r\n\r\n<ng-template #columnsTpl let-case=\"case\">\r\n <tr\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListSorted)=\"dropListSorted($event)\"\r\n (cdkDropListDropped)=\"dropListDropped($event)\"\r\n [style.height.px]=\"getRowHeight()\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n [style.padding-right.px]=\"scrollYWidth()\"\r\n [style.width.px]=\"scrollXWidth()\"\r\n [class.x-table-search]=\"case === 'search'\"\r\n >\r\n @for (column of initColumns(); track column.id) {\r\n <th\r\n cdkDrag\r\n [cdkDragDisabled]=\"column.draggingWidth || !column.dragColumn\"\r\n (cdkDragStarted)=\"dragStarted($event, column)\"\r\n (cdkDragEnded)=\"dragEnded(column)\"\r\n [ngClass]=\"thClassMap()\"\r\n [class.x-table-th]=\"true\"\r\n [class.x-table-sticky]=\"table.getSticky(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n [style.width.px]=\"getColumnWidth(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"getColumnRight(column.right)\"\r\n [style.flex]=\"getFlex(column)\"\r\n >\r\n @switch (case) {\r\n @case ('search') {\r\n <ng-container *xOutlet=\"table.headSearchTpl()!; context: { $column: column }\"></ng-container>\r\n }\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"></ng-container>\r\n @if (column.dragWidth) {\r\n <div\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n }\r\n }\r\n }\r\n </th>\r\n }\r\n </tr>\r\n</ng-template>\r\n\r\n<ng-template #columnBaseTpl let-column=\"column\">\r\n @switch (column.type) {\r\n @case ('checkbox') {\r\n @if (column.headChecked) {\r\n <x-checkbox\r\n [data]=\"[{ id: true, label: column.label }]\"\r\n [(ngModel)]=\"table.checkedValues()[column.id]\"\r\n (ngModelChange)=\"table.headChecked($event, column)\"\r\n [indeterminate]=\"table.checkedValues()[column.id + table.indeterminate()]\"\r\n single\r\n ></x-checkbox>\r\n }\r\n @if (!column.headChecked) {\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></ng-container>\r\n }\r\n }\r\n @case ('index') {\r\n <a\r\n ><ng-container *xOutlet=\"columnTpl()[column.id]; context: { $column: column }\">\r\n <ng-container *xOutlet=\"table.headThTpl(); context: { $column: column }\">\r\n {{ column.label }}\r\n </ng-container>\r\n </ng-container></a\r\n >\r\n }\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></ng-container>\r\n }\r\n }\r\n</ng-template>\r\n\r\n<ng-template #cloumnDefaultTpl let-column=\"column\">\r\n <a [class.x-table-sort]=\"column.sort\" (click)=\"onSort(column)\" [style.text-align]=\"column.textAlign\">\r\n <ng-container *xOutlet=\"columnTpl()[column.id]; context: { $column: column }\">\r\n <ng-container *xOutlet=\"table.headThTpl(); context: { $column: column }\">\r\n {{ column.label }}\r\n </ng-container>\r\n </ng-container>\r\n @if (column.sort) {\r\n <x-icon\r\n type=\"fto-bar-chart\"\r\n class=\"x-table-sort-icon\"\r\n [class.x-table-icon-up]=\"sortStr() === column.id + ' desc'\"\r\n [class.x-table-icon-down]=\"sortStr() === column.id + ' asc'\"\r\n ></x-icon>\r\n }\r\n </a>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: XDragDirective, selector: "[x-drag]" }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: XCheckboxComponent, selector: "x-checkbox" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: XIconComponent, selector: "x-icon" }], encapsulation: i0.ViewEncapsulation.None }); }
729
757
  }
730
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableHeadComponent, decorators: [{
758
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableHeadComponent, decorators: [{
731
759
  type: Component,
732
760
  args: [{ selector: `${XTableHeadPrefix}`, standalone: true, imports: [
733
761
  NgStyle,
@@ -739,169 +767,191 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
739
767
  XCheckboxComponent,
740
768
  XOutletDirective,
741
769
  XIconComponent
742
- ], encapsulation: ViewEncapsulation.None, template: "<thead\r\n #thead\r\n [ngStyle]=\"theadStyle\"\r\n [class.x-table-head-top]=\"position === 'top'\"\r\n [class.x-table-head-bottom]=\"position === 'bottom'\"\r\n>\r\n @if (cellConfig) {\r\n <tr [style.gridTemplateColumns]=\"cellConfig.gridTemplateColumns\" [style.min-height.px]=\"getRowHeight\">\r\n @for (column of cellConfig.cells; track column.id) {\r\n <th\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [class.x-table-width-drag]=\"column.dragWidth\"\r\n [style.grid-area]=\"column.gridArea\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [title]=\"column?.label\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"></ng-container>\r\n @if (column.dragWidth) {\r\n <div\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"columnsTpl\"></ng-container>\r\n }\r\n @if (table.headSearchTpl) {\r\n <ng-container *ngTemplateOutlet=\"columnsTpl; context: { case: 'search' }\"></ng-container>\r\n }\r\n</thead>\r\n\r\n<ng-template #columnsTpl let-case=\"case\">\r\n <tr\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListSorted)=\"dropListSorted($event)\"\r\n (cdkDropListDropped)=\"dropListDropped($event)\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [style.padding-right.px]=\"scrollYWidth\"\r\n [style.width.px]=\"scrollXWidth\"\r\n [class.x-table-search]=\"case === 'search'\"\r\n >\r\n @for (column of initColumns; track column.id) {\r\n <th\r\n cdkDrag\r\n [cdkDragDisabled]=\"column.draggingWidth || !column.dragColumn\"\r\n (cdkDragStarted)=\"dragStarted($event, column)\"\r\n (cdkDragEnded)=\"dragEnded(column)\"\r\n [ngClass]=\"thClassMap\"\r\n [class.x-table-th]=\"true\"\r\n [class.x-table-sticky]=\"table.getSticky(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [style.width.px]=\"getColumnWidth(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"getColumnRight(column.right)\"\r\n [style.flex]=\"getFlex(column)\"\r\n >\r\n @switch (case) {\r\n @case ('search') {\r\n <ng-container *ngTemplateOutlet=\"table.headSearchTpl; context: { $column: column }\"></ng-container>\r\n }\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"></ng-container>\r\n @if (column.dragWidth) {\r\n <div\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n }\r\n }\r\n }\r\n </th>\r\n }\r\n </tr>\r\n</ng-template>\r\n\r\n<ng-template #columnBaseTpl let-column=\"column\">\r\n @switch (column.type) {\r\n @case ('checkbox') {\r\n @if (column.headChecked) {\r\n <x-checkbox\r\n [data]=\"[{ id: true, label: column.label }]\"\r\n [(ngModel)]=\"table.checkedValues[column.id]\"\r\n (ngModelChange)=\"table.headChecked($event, column)\"\r\n [indeterminate]=\"table.checkedValues[column.id + table.indeterminate]\"\r\n single\r\n ></x-checkbox>\r\n }\r\n @if (!column.headChecked) {\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></ng-container>\r\n }\r\n }\r\n @case ('index') {\r\n <a>\r\n <ng-container *xOutlet=\"columnTpl[column.id]; context: { $column: column }\">\r\n <ng-container *xOutlet=\"table.headThTpl; context: { $column: column }\">\r\n {{ column.label }}\r\n </ng-container>\r\n </ng-container>\r\n </a>\r\n }\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></ng-container>\r\n }\r\n }\r\n</ng-template>\r\n\r\n<ng-template #cloumnDefaultTpl let-column=\"column\">\r\n <a [class.x-table-sort]=\"column.sort\" (click)=\"onSort(column)\" [style.text-align]=\"column.textAlign\">\r\n <ng-container *xOutlet=\"columnTpl[column.id]; context: { $column: column }\">\r\n <ng-container *xOutlet=\"table.headThTpl; context: { $column: column }\">\r\n {{ column.label }}\r\n </ng-container>\r\n </ng-container>\r\n @if (column.sort) {\r\n <x-icon\r\n type=\"fto-bar-chart\"\r\n class=\"x-table-sort-icon\"\r\n [class.x-table-icon-up]=\"sortStr === column.id + ' desc'\"\r\n [class.x-table-icon-down]=\"sortStr === column.id + ' asc'\"\r\n ></x-icon>\r\n }\r\n </a>\r\n</ng-template>\r\n" }]
743
- }], propDecorators: { thead: [{
744
- type: ViewChild,
745
- args: ['thead']
746
- }], table: [{
747
- type: Input
748
- }] } });
770
+ ], encapsulation: ViewEncapsulation.None, template: "<thead\r\n #thead\r\n [ngStyle]=\"theadStyle()\"\r\n [class.x-table-head-top]=\"position() === 'top'\"\r\n [class.x-table-head-bottom]=\"position() === 'bottom'\"\r\n>\r\n @if (cellConfig()) {\r\n <tr [style.gridTemplateColumns]=\"cellConfig()!.gridTemplateColumns\" [style.min-height.px]=\"getRowHeight()\">\r\n @for (column of cellConfig()!.cells; track column.id) {\r\n <th\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [class.x-table-width-drag]=\"column.dragWidth\"\r\n [style.grid-area]=\"column.gridArea\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n [title]=\"column?.label\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"></ng-container>\r\n @if (column.dragWidth) {\r\n <div\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"columnsTpl\"></ng-container>\r\n }\r\n @if (table.headSearchTpl()) {\r\n <ng-container *ngTemplateOutlet=\"columnsTpl; context: { case: 'search' }\"></ng-container>\r\n }\r\n</thead>\r\n\r\n<ng-template #columnsTpl let-case=\"case\">\r\n <tr\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListSorted)=\"dropListSorted($event)\"\r\n (cdkDropListDropped)=\"dropListDropped($event)\"\r\n [style.height.px]=\"getRowHeight()\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n [style.padding-right.px]=\"scrollYWidth()\"\r\n [style.width.px]=\"scrollXWidth()\"\r\n [class.x-table-search]=\"case === 'search'\"\r\n >\r\n @for (column of initColumns(); track column.id) {\r\n <th\r\n cdkDrag\r\n [cdkDragDisabled]=\"column.draggingWidth || !column.dragColumn\"\r\n (cdkDragStarted)=\"dragStarted($event, column)\"\r\n (cdkDragEnded)=\"dragEnded(column)\"\r\n [ngClass]=\"thClassMap()\"\r\n [class.x-table-th]=\"true\"\r\n [class.x-table-sticky]=\"table.getSticky(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n [style.width.px]=\"getColumnWidth(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"getColumnRight(column.right)\"\r\n [style.flex]=\"getFlex(column)\"\r\n >\r\n @switch (case) {\r\n @case ('search') {\r\n <ng-container *xOutlet=\"table.headSearchTpl()!; context: { $column: column }\"></ng-container>\r\n }\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"></ng-container>\r\n @if (column.dragWidth) {\r\n <div\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n }\r\n }\r\n }\r\n </th>\r\n }\r\n </tr>\r\n</ng-template>\r\n\r\n<ng-template #columnBaseTpl let-column=\"column\">\r\n @switch (column.type) {\r\n @case ('checkbox') {\r\n @if (column.headChecked) {\r\n <x-checkbox\r\n [data]=\"[{ id: true, label: column.label }]\"\r\n [(ngModel)]=\"table.checkedValues()[column.id]\"\r\n (ngModelChange)=\"table.headChecked($event, column)\"\r\n [indeterminate]=\"table.checkedValues()[column.id + table.indeterminate()]\"\r\n single\r\n ></x-checkbox>\r\n }\r\n @if (!column.headChecked) {\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></ng-container>\r\n }\r\n }\r\n @case ('index') {\r\n <a\r\n ><ng-container *xOutlet=\"columnTpl()[column.id]; context: { $column: column }\">\r\n <ng-container *xOutlet=\"table.headThTpl(); context: { $column: column }\">\r\n {{ column.label }}\r\n </ng-container>\r\n </ng-container></a\r\n >\r\n }\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></ng-container>\r\n }\r\n }\r\n</ng-template>\r\n\r\n<ng-template #cloumnDefaultTpl let-column=\"column\">\r\n <a [class.x-table-sort]=\"column.sort\" (click)=\"onSort(column)\" [style.text-align]=\"column.textAlign\">\r\n <ng-container *xOutlet=\"columnTpl()[column.id]; context: { $column: column }\">\r\n <ng-container *xOutlet=\"table.headThTpl(); context: { $column: column }\">\r\n {{ column.label }}\r\n </ng-container>\r\n </ng-container>\r\n @if (column.sort) {\r\n <x-icon\r\n type=\"fto-bar-chart\"\r\n class=\"x-table-sort-icon\"\r\n [class.x-table-icon-up]=\"sortStr() === column.id + ' desc'\"\r\n [class.x-table-icon-down]=\"sortStr() === column.id + ' asc'\"\r\n ></x-icon>\r\n }\r\n </a>\r\n</ng-template>\r\n" }]
771
+ }] });
749
772
 
750
773
  class XTableFootComponent extends XTableFootProperty {
751
774
  constructor() {
752
775
  super(...arguments);
776
+ this.tfoot = viewChild.required('tfoot');
777
+ this.table = inject(XTableComponent, { optional: true });
778
+ this.cdr = inject(ChangeDetectorRef);
779
+ this.getRowHeight = computed(() => (this.rowHeight() == 0 ? '' : this.rowHeight()));
753
780
  this.elementRef = inject(ElementRef);
754
781
  }
755
- get getRowHeight() {
756
- return this.rowHeight == 0 ? '' : this.rowHeight;
757
- }
758
782
  ngOnInit() {
759
- removeNgTag(this.elementRef.nativeElement);
783
+ XRemoveNgTag(this.elementRef.nativeElement);
760
784
  }
761
785
  ngAfterViewInit() {
762
- this.table.tfoot = this.tfoot;
786
+ this.table.tfoot.set(this.tfoot());
763
787
  }
764
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableFootComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
765
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: XTableFootComponent, isStandalone: true, selector: "x-table-foot", inputs: { table: "table" }, viewQueries: [{ propertyName: "tfoot", first: true, predicate: ["tfoot"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<tfoot #tfoot class=\"x-table-footer\" [style.height.px]=\"getRowHeight\" [style.min-height.px]=\"getRowHeight\">\r\n <ng-container *xOutlet=\"footer\">{{ footer }}</ng-container>\r\n</tfoot>\r\n", dependencies: [{ kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
788
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableFootComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
789
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.0.1", type: XTableFootComponent, isStandalone: true, selector: "x-table-foot", viewQueries: [{ propertyName: "tfoot", first: true, predicate: ["tfoot"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<tfoot #tfoot class=\"x-table-footer\" [style.height.px]=\"getRowHeight()!\" [style.min-height.px]=\"getRowHeight()\">\r\n <ng-container *xOutlet=\"footer()\">{{ footer() }}</ng-container>\r\n</tfoot>\r\n", dependencies: [{ kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
766
790
  }
767
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableFootComponent, decorators: [{
791
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableFootComponent, decorators: [{
768
792
  type: Component,
769
- args: [{ selector: `${XTableFootPrefix}`, standalone: true, imports: [XOutletDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<tfoot #tfoot class=\"x-table-footer\" [style.height.px]=\"getRowHeight\" [style.min-height.px]=\"getRowHeight\">\r\n <ng-container *xOutlet=\"footer\">{{ footer }}</ng-container>\r\n</tfoot>\r\n" }]
770
- }], propDecorators: { tfoot: [{
771
- type: ViewChild,
772
- args: ['tfoot']
773
- }], table: [{
774
- type: Input
775
- }] } });
793
+ args: [{ selector: `${XTableFootPrefix}`, standalone: true, imports: [XOutletDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<tfoot #tfoot class=\"x-table-footer\" [style.height.px]=\"getRowHeight()!\" [style.min-height.px]=\"getRowHeight()\">\r\n <ng-container *xOutlet=\"footer()\">{{ footer() }}</ng-container>\r\n</tfoot>\r\n" }]
794
+ }] });
776
795
 
777
796
  class XTableBodyComponent extends XTableBodyProperty {
778
- get isEmpty() {
779
- return this.data?.length === 0;
780
- }
781
- get getRowHeight() {
782
- return this.rowHeight == 0 ? '' : this.rowHeight;
783
- }
784
- get getItemSize() {
785
- return this.rowHeight !== 0 && this.itemSize > Number(this.rowHeight) ? this.rowHeight : this.itemSize;
786
- }
787
- constructor(
788
- // @Optional() @Host() public table: XTableComponent,
789
- renderer, elementRef, cdr, configService) {
797
+ constructor() {
790
798
  super();
791
- this.renderer = renderer;
792
- this.elementRef = elementRef;
793
- this.cdr = cdr;
794
- this.configService = configService;
795
- this.tbodyStyle = {};
799
+ this.renderer = inject(Renderer2);
800
+ this.elementRef = inject((ElementRef));
801
+ this.cdr = inject(ChangeDetectorRef);
802
+ this.tbody = viewChild.required('tbody');
803
+ this.virtualBody = viewChild(CdkVirtualScrollViewport);
804
+ this.table = inject(XTableComponent, { optional: true });
796
805
  this.doc = inject(DOCUMENT);
797
- this._unSubject = new Subject();
798
- }
799
- ngOnChanges(simples) {
800
- const { data, columns, activatedRow, mergeRule, expandedAll, adaptionHeight } = simples;
801
- XIsChange(data, columns, activatedRow, mergeRule, expandedAll) && this.cdr.detectChanges();
802
- XIsChange(adaptionHeight) && this.setAdaptionHeight();
806
+ this.unSubject = new Subject();
807
+ this.tbodyStyle = signal({});
808
+ this.isEmpty = computed(() => this.data().length === 0);
809
+ this.getRowHeight = computed(() => (this.rowHeight() == 0 ? '' : this.rowHeight()));
810
+ this.getItemSize = computed(() => this.rowHeight() !== 0 && this.itemSize() > this.rowHeight() ? this.rowHeight() : this.itemSize());
811
+ this.docChanged = toSignal(fromEvent(this.doc.defaultView, 'resize').pipe(map(() => this.doc.documentElement.clientWidth)));
812
+ this.bodyHeightSignal = computed(() => {
813
+ const adaptionHeight = this.adaptionHeight();
814
+ if (adaptionHeight && adaptionHeight > 0) {
815
+ this.docChanged();
816
+ const captionHeight = this.table.caption()?.nativeElement.clientHeight || 0;
817
+ let headHeight = 0;
818
+ for (let thead of this.table.theads()) {
819
+ headHeight += thead.nativeElement.clientHeight;
820
+ }
821
+ const footHeight = this.table.tfoot()?.nativeElement.clientHeight || 0;
822
+ const paginationHeight = this.table.pagination()?.elementRef.nativeElement.clientHeight || 0;
823
+ let bodyHeight = this.docPercent() * this.doc.documentElement.clientHeight -
824
+ captionHeight -
825
+ headHeight -
826
+ footHeight -
827
+ paginationHeight -
828
+ adaptionHeight;
829
+ if (bodyHeight < 0)
830
+ bodyHeight = 0;
831
+ return bodyHeight;
832
+ }
833
+ if (this.scroll()?.y && !this.bodyHeight()) {
834
+ return this.scroll().y;
835
+ }
836
+ return this.bodyHeight();
837
+ });
838
+ this.minBufferPxSignal = computed(() => {
839
+ const adaptionHeight = this.adaptionHeight();
840
+ if (adaptionHeight && adaptionHeight > 0) {
841
+ return this.bodyHeight();
842
+ }
843
+ return this.minBufferPx();
844
+ });
845
+ this.maxBufferPxSignal = computed(() => {
846
+ const adaptionHeight = this.adaptionHeight();
847
+ if (adaptionHeight && adaptionHeight > 0) {
848
+ return this.bodyHeight() * 1.2;
849
+ }
850
+ return this.maxBufferPx();
851
+ });
852
+ effect(() => {
853
+ if (this.virtualBody()) {
854
+ this.virtualBody()['_scrollStrategy']['_minBufferPx'] = this.minBufferPxSignal();
855
+ }
856
+ });
857
+ effect(() => {
858
+ if (this.virtualBody()) {
859
+ this.virtualBody()['_scrollStrategy']['_maxBufferPx'] = this.maxBufferPxSignal();
860
+ }
861
+ });
803
862
  }
804
863
  ngOnInit() {
805
- removeNgTag(this.elementRef.nativeElement);
806
- if (this.level > 0)
807
- removeNgTag(this.tbody.nativeElement);
808
- if (this.scroll?.y && !this.bodyHeight) {
809
- this.bodyHeight = this.scroll.y;
810
- }
864
+ XRemoveNgTag(this.elementRef.nativeElement);
865
+ if (this.level() > 0)
866
+ XRemoveNgTag(this.tbody().nativeElement);
811
867
  }
812
868
  ngAfterViewInit() {
813
- this.table.virtualBody = this.virtualBody;
814
- this.table.bodyChange = () => this.cdr.detectChanges();
869
+ this.table.virtualBody.set(this.virtualBody());
870
+ // this.table.bodyChange = () => this.cdr.detectChanges();
815
871
  this.setSubject();
816
872
  this.setScroll();
817
873
  }
818
874
  ngOnDestroy() {
819
- this._unSubject.next();
820
- this._unSubject.unsubscribe();
821
- this._resizeObserver?.disconnect();
875
+ this.unSubject.next();
876
+ this.unSubject.complete();
877
+ this.resizeObserver?.disconnect();
822
878
  }
823
879
  setSubject() {
824
- if (this.virtualBody) {
825
- this.table.scrollContentEle = this.virtualBody?.elementRef?.nativeElement.querySelector('.cdk-virtual-scroll-content-wrapper');
826
- if (this.scroll?.x) {
827
- this.renderer.setStyle(this.table.scrollContentEle, 'width', `${this.scroll.x}px`);
880
+ if (this.virtualBody()) {
881
+ this.table.scrollContentEle.set(this.virtualBody().elementRef.nativeElement.querySelector('.cdk-virtual-scroll-content-wrapper'));
882
+ if (this.scroll()?.x) {
883
+ this.renderer.setStyle(this.table.scrollContentEle(), 'width', `${this.scroll()?.x}px`);
828
884
  }
829
- XResize(this.table.table.nativeElement, this.table.scrollContentEle)
830
- .pipe(takeUntil(this._unSubject))
885
+ XResize(this.table.table().nativeElement, this.table.scrollContentEle())
886
+ .pipe(takeUntil(this.unSubject))
831
887
  .subscribe((x) => {
832
- this._resizeObserver = x.resizeObserver;
833
- this.setAdaptionHeight();
888
+ this.resizeObserver = x.resizeObserver;
834
889
  this.setScroll();
835
890
  });
836
- fromEvent(this.doc.defaultView, 'resize')
837
- .pipe(takeUntil(this._unSubject))
838
- .subscribe(() => {
839
- this.setAdaptionHeight();
840
- });
841
891
  }
842
- if (this.table.scrollContentEle) {
843
- fromEvent(this.virtualBody.elementRef.nativeElement, 'scroll')
844
- .pipe(takeUntil(this._unSubject))
892
+ if (this.table.scrollContentEle()) {
893
+ fromEvent(this.virtualBody().elementRef.nativeElement, 'scroll')
894
+ .pipe(takeUntil(this.unSubject))
845
895
  .subscribe((x) => {
846
896
  const ele = x.srcElement;
847
- this.table.scrollTop = ele.scrollTop;
848
- this.table.scrollLeft = ele.scrollLeft;
849
- if (ele.scrollLeft >= 0 && this.table.theads.length > 0) {
850
- for (let thead of this.table.theads) {
851
- thead.nativeElement.scrollLeft = this.table.scrollLeft;
897
+ this.table.scrollTop.set(ele.scrollTop);
898
+ this.table.scrollLeft.set(ele.scrollLeft);
899
+ if (ele.scrollLeft >= 0 && this.table.theads().length > 0) {
900
+ for (let thead of this.table.theads()) {
901
+ thead.nativeElement.scrollLeft = this.table.scrollLeft();
852
902
  }
853
903
  }
854
- this.table.scrollLeftMax = ele.scrollLeft + ele.clientWidth === ele.scrollWidth;
855
- this.table.cdr.detectChanges();
904
+ this.table.scrollLeftMax.set(ele.scrollLeft + ele.clientWidth === ele.scrollWidth);
856
905
  });
857
906
  }
858
907
  }
859
908
  setScroll() {
860
- if (!this.virtualBody)
909
+ if (!this.virtualBody())
861
910
  return;
862
- const ele = this.virtualBody.elementRef.nativeElement;
863
- const hasY = ele.scrollHeight > this.bodyHeight;
864
- const hasX = this.table.scrollContentEle.clientWidth > ele.clientWidth;
865
- if (!this.table.hasScrollY && hasY) {
866
- this.table.hasScrollY = true;
867
- this.table.scrollYWidth = ele.offsetWidth - ele.clientWidth;
911
+ const ele = this.virtualBody().elementRef.nativeElement;
912
+ const hasY = ele.scrollHeight > this.bodyHeightSignal();
913
+ const hasX = this.table.scrollContentEle().clientWidth > ele.clientWidth;
914
+ if (!this.table.hasScrollY() && hasY) {
915
+ this.table.hasScrollY.set(true);
916
+ this.table.scrollYWidth.set(ele.offsetWidth - ele.clientWidth);
868
917
  }
869
- else if (this.table.hasScrollY && !hasY) {
870
- this.table.hasScrollY = false;
871
- this.table.scrollYWidth = 0;
918
+ else if (this.table.hasScrollY() && !hasY) {
919
+ this.table.hasScrollY.set(false);
920
+ this.table.scrollYWidth.set(0);
872
921
  }
873
- if (!this.table.hasScrollX && hasX) {
874
- this.table.hasScrollX = true;
875
- this.table.scrollXHeight = ele.offsetHeight - ele.clientHeight;
922
+ if (!this.table.hasScrollX() && hasX) {
923
+ this.table.hasScrollX.set(true);
924
+ this.table.scrollXHeight.set(ele.offsetHeight - ele.clientHeight);
876
925
  }
877
- else if (this.table.hasScrollX && !hasX) {
878
- this.table.hasScrollX = false;
879
- this.table.scrollXHeight = 0;
880
- this.table.scrollXWidth = null;
926
+ else if (this.table.hasScrollX() && !hasX) {
927
+ this.table.hasScrollX.set(false);
928
+ this.table.scrollXHeight.set(0);
929
+ this.table.scrollXWidth.set(null);
881
930
  }
882
931
  if (hasX) {
883
- this.table.scrollXWidth = ele.offsetWidth + ele.scrollWidth - ele.clientWidth;
932
+ this.table.scrollXWidth.set(ele.offsetWidth + ele.scrollWidth - ele.clientWidth);
884
933
  }
885
- this.virtualBody.checkViewportSize();
886
- this.table.cdr.detectChanges();
934
+ this.virtualBody().checkViewportSize();
935
+ // this.table.cdr.detectChanges();
887
936
  }
888
937
  setStyle() {
889
- let height = this.rowHeight == 0 ? '' : this.rowHeight;
890
- if (this.cellConfig && this.cellConfig.cells) {
891
- const spt = this.cellConfig.cells.map((x) => {
938
+ let height = this.rowHeight() === 0 ? '' : this.rowHeight();
939
+ if (this.cellConfig() && this.cellConfig().cells) {
940
+ const spt = this.cellConfig().cells?.map((x) => {
892
941
  const gridAreaSpt = x.gridArea?.split('/');
893
942
  return gridAreaSpt && gridAreaSpt.length > 3 ? Number(gridAreaSpt[2]) : 2;
894
943
  });
895
944
  height = ((Math.max(...spt) - 1) * height);
896
945
  }
897
- this.tbodyStyle = {
946
+ this.tbodyStyle.set({
898
947
  height: `${height}px`
899
- };
948
+ });
900
949
  }
901
950
  getIndex(index, item) {
902
951
  if (!isNaN(index))
903
952
  return index;
904
- return this.data.indexOf(item);
953
+ console.log(this.data(), item);
954
+ return this.data().indexOf(item);
905
955
  }
906
956
  getFlex(column) {
907
957
  if (column.width)
@@ -912,59 +962,30 @@ class XTableBodyComponent extends XTableBodyProperty {
912
962
  }
913
963
  getTitle(row, column) {
914
964
  let it = row[column.id];
915
- return it ? stripTags(it) : '';
916
- }
917
- setAdaptionHeight() {
918
- if (this.adaptionHeight > 0) {
919
- const captionHeight = this.table.tcaption?.nativeElement.clientHeight || 0;
920
- let headHeight = 0;
921
- for (let thead of this.table.theads) {
922
- headHeight += thead.nativeElement.clientHeight;
923
- }
924
- const footHeight = this.table.tfoot?.nativeElement.clientHeight || 0;
925
- const paginationHeight = this.table.pagination?.elementRef.nativeElement.clientHeight || 0;
926
- this.bodyHeight =
927
- Number(this.docPercent) * this.doc.documentElement.clientHeight -
928
- captionHeight -
929
- headHeight -
930
- footHeight -
931
- paginationHeight -
932
- Number(this.adaptionHeight);
933
- if (this.bodyHeight < 0)
934
- this.bodyHeight = 0;
935
- this.minBufferPx = this.bodyHeight;
936
- this.maxBufferPx = this.bodyHeight * 1.2;
937
- if (this.virtualBody) {
938
- this.virtualBody['_scrollStrategy']['_minBufferPx'] = this.minBufferPx;
939
- this.virtualBody['_scrollStrategy']['_maxBufferPx'] = this.maxBufferPx;
940
- }
941
- this.cdr.detectChanges();
942
- }
965
+ return it ? XStripTags(it) : '';
943
966
  }
944
967
  rowClick(event, row) {
945
968
  if (row.disabled)
946
969
  return;
947
- this.activatedRow = row;
948
- if (this.table.allowCheckRow && this.table.rowChecked) {
970
+ if (this.table.allowCheckRow() && this.table.rowChecked()) {
949
971
  if (!XParentPath(event.target).includes('x-checkbox')) {
950
- row[this.table.rowChecked.id] = !row[this.table.rowChecked.id];
951
- this.table.bodyChecked(row[this.table.rowChecked.id], this.table.rowChecked, row);
972
+ row[this.table.rowChecked().id] = !row[this.table.rowChecked().id];
973
+ this.table.bodyChecked(row[this.table.rowChecked().id], this.table.rowChecked(), row);
952
974
  }
953
975
  }
954
- this.activatedRowChange.emit(row);
955
- this.cdr.detectChanges();
976
+ this.activatedRow.set(row);
956
977
  }
957
978
  onExpanded(_event, node) {
958
979
  node.expanded = !node.expanded;
959
- this.cdr.detectChanges();
980
+ // this.cdr.detectChanges();
960
981
  }
961
982
  trackByItem(_index, item) {
962
983
  return item.id;
963
984
  }
964
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableBodyComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$1.XConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
965
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: XTableBodyComponent, isStandalone: true, selector: "x-table-body", inputs: { table: "table" }, viewQueries: [{ propertyName: "tbody", first: true, predicate: ["tbody"], descendants: true }, { propertyName: "virtualBody", first: true, predicate: ["virtualBody"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<tbody #tbody>\r\n @if (cellConfig) {\r\n @for (row of data; track row.id; let i = $index) {\r\n <tr [style.gridTemplateColumns]=\"cellConfig.gridTemplateColumns\">\r\n @for (column of cellConfig.cells; track column; let j = $index) {\r\n <td\r\n [title]=\"getTitle(row, column)\"\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [style.grid-area]=\"column.gridArea\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"cellTpl; context: { column: column, row: row, i: i }\"></ng-container>\r\n </td>\r\n }\r\n </tr>\r\n }\r\n } @else {\r\n @if (virtualScroll) {\r\n <cdk-virtual-scroll-viewport\r\n #virtualBody\r\n [itemSize]=\"getItemSize\"\r\n [minBufferPx]=\"minBufferPx\"\r\n [maxBufferPx]=\"maxBufferPx\"\r\n [style.height.px]=\"bodyHeight\"\r\n >\r\n <tr\r\n *cdkVirtualFor=\"let row of data; let index = index; trackBy: trackByItem\"\r\n [class.x-table-activated]=\"allowSelectRow && activatedRow?.id === row.id\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n (click)=\"rowClick($event, row)\"\r\n >\r\n <!-- rowHeight \u4E3A 0 \u7684\u65F6\u5019\uFF0Cindex \u4E0B\u6807\u83B7\u53D6\u4E0D\u5230 -->\r\n <ng-container *ngTemplateOutlet=\"rowTpl; context: { row: row, i: getIndex(index, row) }\"></ng-container>\r\n </tr>\r\n </cdk-virtual-scroll-viewport>\r\n } @else {\r\n @for (row of data; track row.id; let i = $index) {\r\n <tr\r\n [class.x-table-activated]=\"allowSelectRow && activatedRow?.id === row.id\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n (click)=\"rowClick($event, row)\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"rowTpl; context: { row: row, i: i }\"></ng-container>\r\n </tr>\r\n @if (table.treeTable && row.children && row.expanded) {\r\n <div class=\"x-table-children\" [class.x-table-expandTpl]=\"expandTpl\">\r\n <x-table-body\r\n [data]=\"row.children\"\r\n [columns]=\"table.columns\"\r\n [itemSize]=\"table.itemSize\"\r\n [rowHeight]=\"table.rowHeight\"\r\n [columnTpl]=\"table.bodyColumnTpl\"\r\n [allowSelectRow]=\"table.allowSelectRow\"\r\n [rowClass]=\"table.rowClass\"\r\n [cellConfig]=\"table.cellConfig?.tbody\"\r\n [(activatedRow)]=\"table.activatedRow\"\r\n [expandedAll]=\"expandedAll\"\r\n [expandTpl]=\"expandTpl\"\r\n (activatedRowChange)=\"table.activatedRowChange.emit($event)\"\r\n [level]=\"row.level! + 1\"\r\n [table]=\"table\"\r\n ></x-table-body>\r\n </div>\r\n }\r\n }\r\n }\r\n }\r\n @if (table.showEmpty && isEmpty && level === 0) {\r\n <x-empty [img]=\"table.emptyImg\" [content]=\"table.emptyContent\"></x-empty>\r\n }\r\n</tbody>\r\n\r\n<ng-template #rowTpl let-row=\"row\" let-i=\"i\">\r\n @if (level > 0 && expandTpl) {\r\n <ng-container *xOutlet=\"expandTpl; context: { $row: row, $index: i, $level: level }\"></ng-container>\r\n } @else if (level === 0 || !expandTpl) {\r\n <ng-container *xOutlet=\"rowDefault; context: { row: row, i: i, level: level }\"></ng-container>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #rowDefault let-row=\"row\" let-i=\"i\">\r\n @for (column of columns; track column.id; let j = $index) {\r\n <td\r\n [style.width.px]=\"column.width\"\r\n [style.flex]=\"getFlex(column)\"\r\n [title]=\"getTitle(row, column)\"\r\n [class.x-table-dragging]=\"column.dragging\"\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [ngClass]=\"!rowClass ? {} : rowClass(row, i)\"\r\n >\r\n <ng-template *ngTemplateOutlet=\"cellTpl; context: { column: column, row: row, i: i }\"></ng-template>\r\n </td>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #cellTpl let-column=\"column\" let-row=\"row\" let-i=\"i\">\r\n @switch (column.type) {\r\n @case ('checkbox') {\r\n <x-checkbox\r\n [data]=\"[{ id: true, label: '' }]\"\r\n [(ngModel)]=\"row[column.id]\"\r\n [disabled]=\"row.disabled\"\r\n (ngModelChange)=\"table.bodyChecked($event, column, row)\"\r\n single\r\n ></x-checkbox>\r\n }\r\n @case ('index') {\r\n <div>{{ table.getIndex(i) }}</div>\r\n }\r\n @default {\r\n @if (table.isExpandColumn(column)) {\r\n <x-button\r\n [class.is-leaf]=\"!row.leaf\"\r\n [class.is-expanded]=\"row.expanded\"\r\n (click)=\"onExpanded($event, row)\"\r\n icon=\"fto-chevron-right\"\r\n size=\"mini\"\r\n onlyIcon\r\n class=\"x-table-expand\"\r\n [style.margin-left.rem]=\"row.level - 0.5\"\r\n ></x-button>\r\n }\r\n <ng-container *xOutlet=\"columnTpl[column.id]; context: { $column: column, $row: row, $index: table.getIndex(i) }\">\r\n <ng-container *xOutlet=\"table.bodyTdTpl; context: { $column: column, $row: row, $index: table.getIndex(i) }\">\r\n <div [innerHTML]=\"row[column.id]\" [style.text-align]=\"column.textAlign\"></div>\r\n {{ table.rowExpandNext && table.rowExpandNext.id === column.id ? 'x-table-body-level-' + row.level : '' }}\r\n </ng-container>\r\n </ng-container>\r\n }\r\n }\r\n</ng-template>\r\n", dependencies: [{ kind: "component", type: XTableBodyComponent, selector: "x-table-body", inputs: ["table"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: XEmptyComponent, selector: "x-empty" }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i3.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i3.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i3.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: XCheckboxComponent, selector: "x-checkbox" }, { kind: "component", type: XButtonComponent, selector: "x-button" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
985
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
986
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.1", type: XTableBodyComponent, isStandalone: true, selector: "x-table-body", viewQueries: [{ propertyName: "tbody", first: true, predicate: ["tbody"], descendants: true, isSignal: true }, { propertyName: "virtualBody", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<tbody #tbody>\r\n @if (cellConfig()) {\r\n @for (row of data(); track row.id; let i = $index) {\r\n <tr [style.gridTemplateColumns]=\"cellConfig()!.gridTemplateColumns\">\r\n @for (column of cellConfig()!.cells; track column; let j = $index) {\r\n <td\r\n [title]=\"getTitle(row, column)\"\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [style.grid-area]=\"column.gridArea\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"cellTpl; context: { column: column, row: row, i: i }\"></ng-container>\r\n </td>\r\n }\r\n </tr>\r\n }\r\n } @else {\r\n @if (virtualScroll()) {\r\n <cdk-virtual-scroll-viewport\r\n #virtualBody\r\n [itemSize]=\"getItemSize()\"\r\n [minBufferPx]=\"minBufferPxSignal()\"\r\n [maxBufferPx]=\"maxBufferPxSignal()\"\r\n [style.height.px]=\"bodyHeightSignal()\"\r\n >\r\n <tr\r\n *cdkVirtualFor=\"let row of data(); let index = index; trackBy: trackByItem\"\r\n [class.x-table-activated]=\"allowSelectRow() && activatedRow()?.id === row.id\"\r\n [style.height.px]=\"getRowHeight()\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n (click)=\"rowClick($event, row)\"\r\n >\r\n <!-- rowHeight \u4E3A 0 \u7684\u65F6\u5019\uFF0Cindex \u4E0B\u6807\u83B7\u53D6\u4E0D\u5230 -->\r\n <ng-container *ngTemplateOutlet=\"rowTpl; context: { row: row, i: getIndex(index, row) }\"></ng-container>\r\n </tr>\r\n </cdk-virtual-scroll-viewport>\r\n } @else {\r\n @for (row of data(); track row.id; let i = $index) {\r\n <tr\r\n [class.x-table-activated]=\"allowSelectRow() && activatedRow()?.id === row.id\"\r\n [style.height.px]=\"getRowHeight()\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n (click)=\"rowClick($event, row)\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"rowTpl; context: { row: row, i: i }\"></ng-container>\r\n </tr>\r\n @if (table.treeTable() && row.children && row.expanded) {\r\n <div class=\"x-table-children\" [class.x-table-expandTpl]=\"expandTpl()\">\r\n <x-table-body\r\n [data]=\"row.children\"\r\n [columns]=\"table.columns()\"\r\n [itemSize]=\"table.itemSize()\"\r\n [rowHeight]=\"table.rowHeight()\"\r\n [columnTpl]=\"table.bodyColumnTpl()\"\r\n [allowSelectRow]=\"table.allowSelectRow()\"\r\n [rowClass]=\"table.rowClass()\"\r\n [cellConfig]=\"table.cellConfig()?.tbody\"\r\n [(activatedRow)]=\"table.activatedRow\"\r\n [expandedAll]=\"expandedAll()\"\r\n [expandTpl]=\"expandTpl()\"\r\n [level]=\"row.level! + 1\"\r\n ></x-table-body>\r\n </div>\r\n }\r\n }\r\n }\r\n }\r\n @if (table.showEmpty() && isEmpty() && level() === 0) {\r\n <x-empty [img]=\"table.emptyImg()!\" [content]=\"table.emptyContent()!\"></x-empty>\r\n }\r\n</tbody>\r\n\r\n<ng-template #rowTpl let-row=\"row\" let-i=\"i\">\r\n @if (level() > 0 && expandTpl()) {\r\n <ng-container *xOutlet=\"expandTpl(); context: { $row: row, $index: i, $level: level() }\"></ng-container>\r\n } @else if (level() === 0 || !expandTpl()) {\r\n <ng-container *xOutlet=\"rowDefault; context: { row: row, i: i, level: level() }\"></ng-container>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #rowDefault let-row=\"row\" let-i=\"i\">\r\n @for (column of columns(); track column.id; let j = $index) {\r\n <td\r\n [style.width.px]=\"column.width\"\r\n [style.flex]=\"getFlex(column)\"\r\n [title]=\"getTitle(row, column)\"\r\n [class.x-table-dragging]=\"column.dragging\"\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [ngClass]=\"!rowClass() ? {} : rowClass()!(row, i)\"\r\n >\r\n <ng-template *ngTemplateOutlet=\"cellTpl; context: { column: column, row: row, i: i }\"></ng-template>\r\n </td>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #cellTpl let-column=\"column\" let-row=\"row\" let-i=\"i\">\r\n @switch (column.type) {\r\n @case ('checkbox') {\r\n <x-checkbox\r\n [data]=\"[{ id: true, label: '' }]\"\r\n [(ngModel)]=\"row[column.id]\"\r\n [disabled]=\"row.disabled\"\r\n (ngModelChange)=\"table.bodyChecked($event, column, row)\"\r\n single\r\n ></x-checkbox>\r\n }\r\n @case ('index') {\r\n <div>{{ table.getIndex(i) }}</div>\r\n }\r\n @default {\r\n @if (table.isExpandColumn(column)) {\r\n <x-button\r\n [class.is-leaf]=\"!row.leaf\"\r\n [class.is-expanded]=\"row.expanded\"\r\n (click)=\"onExpanded($event, row)\"\r\n icon=\"fto-chevron-right\"\r\n size=\"mini\"\r\n onlyIcon\r\n flat\r\n plain\r\n class=\"x-table-expand\"\r\n [style.margin-left.rem]=\"row.level - 0.5\"\r\n ></x-button>\r\n }\r\n <ng-container\r\n *xOutlet=\"columnTpl()[column.id]; context: { $column: column, $row: row, $index: table.getIndex(i) }\"\r\n >\r\n <ng-container *xOutlet=\"table.bodyTdTpl(); context: { $column: column, $row: row, $index: table.getIndex(i) }\">\r\n <div [innerHTML]=\"row[column.id]\" [style.text-align]=\"column.textAlign\"></div>\r\n {{ table.rowExpand() && table.rowExpand()!.id === column.id ? 'x-table-body-level-' + row.level : '' }}\r\n </ng-container>\r\n </ng-container>\r\n }\r\n }\r\n</ng-template>\r\n", dependencies: [{ kind: "component", type: XTableBodyComponent, selector: "x-table-body" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: XEmptyComponent, selector: "x-empty" }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i2$1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i2$1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i2$1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: XCheckboxComponent, selector: "x-checkbox" }, { kind: "component", type: XButtonComponent, selector: "x-button" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
966
987
  }
967
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableBodyComponent, decorators: [{
988
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableBodyComponent, decorators: [{
968
989
  type: Component,
969
990
  args: [{ selector: `${XTableBodyPrefix}`, standalone: true, imports: [
970
991
  NgClass,
@@ -975,84 +996,122 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
975
996
  XOutletDirective,
976
997
  XCheckboxComponent,
977
998
  XButtonComponent
978
- ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<tbody #tbody>\r\n @if (cellConfig) {\r\n @for (row of data; track row.id; let i = $index) {\r\n <tr [style.gridTemplateColumns]=\"cellConfig.gridTemplateColumns\">\r\n @for (column of cellConfig.cells; track column; let j = $index) {\r\n <td\r\n [title]=\"getTitle(row, column)\"\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [style.grid-area]=\"column.gridArea\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"cellTpl; context: { column: column, row: row, i: i }\"></ng-container>\r\n </td>\r\n }\r\n </tr>\r\n }\r\n } @else {\r\n @if (virtualScroll) {\r\n <cdk-virtual-scroll-viewport\r\n #virtualBody\r\n [itemSize]=\"getItemSize\"\r\n [minBufferPx]=\"minBufferPx\"\r\n [maxBufferPx]=\"maxBufferPx\"\r\n [style.height.px]=\"bodyHeight\"\r\n >\r\n <tr\r\n *cdkVirtualFor=\"let row of data; let index = index; trackBy: trackByItem\"\r\n [class.x-table-activated]=\"allowSelectRow && activatedRow?.id === row.id\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n (click)=\"rowClick($event, row)\"\r\n >\r\n <!-- rowHeight \u4E3A 0 \u7684\u65F6\u5019\uFF0Cindex \u4E0B\u6807\u83B7\u53D6\u4E0D\u5230 -->\r\n <ng-container *ngTemplateOutlet=\"rowTpl; context: { row: row, i: getIndex(index, row) }\"></ng-container>\r\n </tr>\r\n </cdk-virtual-scroll-viewport>\r\n } @else {\r\n @for (row of data; track row.id; let i = $index) {\r\n <tr\r\n [class.x-table-activated]=\"allowSelectRow && activatedRow?.id === row.id\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n (click)=\"rowClick($event, row)\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"rowTpl; context: { row: row, i: i }\"></ng-container>\r\n </tr>\r\n @if (table.treeTable && row.children && row.expanded) {\r\n <div class=\"x-table-children\" [class.x-table-expandTpl]=\"expandTpl\">\r\n <x-table-body\r\n [data]=\"row.children\"\r\n [columns]=\"table.columns\"\r\n [itemSize]=\"table.itemSize\"\r\n [rowHeight]=\"table.rowHeight\"\r\n [columnTpl]=\"table.bodyColumnTpl\"\r\n [allowSelectRow]=\"table.allowSelectRow\"\r\n [rowClass]=\"table.rowClass\"\r\n [cellConfig]=\"table.cellConfig?.tbody\"\r\n [(activatedRow)]=\"table.activatedRow\"\r\n [expandedAll]=\"expandedAll\"\r\n [expandTpl]=\"expandTpl\"\r\n (activatedRowChange)=\"table.activatedRowChange.emit($event)\"\r\n [level]=\"row.level! + 1\"\r\n [table]=\"table\"\r\n ></x-table-body>\r\n </div>\r\n }\r\n }\r\n }\r\n }\r\n @if (table.showEmpty && isEmpty && level === 0) {\r\n <x-empty [img]=\"table.emptyImg\" [content]=\"table.emptyContent\"></x-empty>\r\n }\r\n</tbody>\r\n\r\n<ng-template #rowTpl let-row=\"row\" let-i=\"i\">\r\n @if (level > 0 && expandTpl) {\r\n <ng-container *xOutlet=\"expandTpl; context: { $row: row, $index: i, $level: level }\"></ng-container>\r\n } @else if (level === 0 || !expandTpl) {\r\n <ng-container *xOutlet=\"rowDefault; context: { row: row, i: i, level: level }\"></ng-container>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #rowDefault let-row=\"row\" let-i=\"i\">\r\n @for (column of columns; track column.id; let j = $index) {\r\n <td\r\n [style.width.px]=\"column.width\"\r\n [style.flex]=\"getFlex(column)\"\r\n [title]=\"getTitle(row, column)\"\r\n [class.x-table-dragging]=\"column.dragging\"\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [ngClass]=\"!rowClass ? {} : rowClass(row, i)\"\r\n >\r\n <ng-template *ngTemplateOutlet=\"cellTpl; context: { column: column, row: row, i: i }\"></ng-template>\r\n </td>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #cellTpl let-column=\"column\" let-row=\"row\" let-i=\"i\">\r\n @switch (column.type) {\r\n @case ('checkbox') {\r\n <x-checkbox\r\n [data]=\"[{ id: true, label: '' }]\"\r\n [(ngModel)]=\"row[column.id]\"\r\n [disabled]=\"row.disabled\"\r\n (ngModelChange)=\"table.bodyChecked($event, column, row)\"\r\n single\r\n ></x-checkbox>\r\n }\r\n @case ('index') {\r\n <div>{{ table.getIndex(i) }}</div>\r\n }\r\n @default {\r\n @if (table.isExpandColumn(column)) {\r\n <x-button\r\n [class.is-leaf]=\"!row.leaf\"\r\n [class.is-expanded]=\"row.expanded\"\r\n (click)=\"onExpanded($event, row)\"\r\n icon=\"fto-chevron-right\"\r\n size=\"mini\"\r\n onlyIcon\r\n class=\"x-table-expand\"\r\n [style.margin-left.rem]=\"row.level - 0.5\"\r\n ></x-button>\r\n }\r\n <ng-container *xOutlet=\"columnTpl[column.id]; context: { $column: column, $row: row, $index: table.getIndex(i) }\">\r\n <ng-container *xOutlet=\"table.bodyTdTpl; context: { $column: column, $row: row, $index: table.getIndex(i) }\">\r\n <div [innerHTML]=\"row[column.id]\" [style.text-align]=\"column.textAlign\"></div>\r\n {{ table.rowExpandNext && table.rowExpandNext.id === column.id ? 'x-table-body-level-' + row.level : '' }}\r\n </ng-container>\r\n </ng-container>\r\n }\r\n }\r\n</ng-template>\r\n" }]
979
- }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$1.XConfigService }], propDecorators: { tbody: [{
980
- type: ViewChild,
981
- args: ['tbody']
982
- }], virtualBody: [{
983
- type: ViewChild,
984
- args: ['virtualBody']
985
- }], table: [{
986
- type: Input
987
- }] } });
999
+ ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<tbody #tbody>\r\n @if (cellConfig()) {\r\n @for (row of data(); track row.id; let i = $index) {\r\n <tr [style.gridTemplateColumns]=\"cellConfig()!.gridTemplateColumns\">\r\n @for (column of cellConfig()!.cells; track column; let j = $index) {\r\n <td\r\n [title]=\"getTitle(row, column)\"\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [style.grid-area]=\"column.gridArea\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"cellTpl; context: { column: column, row: row, i: i }\"></ng-container>\r\n </td>\r\n }\r\n </tr>\r\n }\r\n } @else {\r\n @if (virtualScroll()) {\r\n <cdk-virtual-scroll-viewport\r\n #virtualBody\r\n [itemSize]=\"getItemSize()\"\r\n [minBufferPx]=\"minBufferPxSignal()\"\r\n [maxBufferPx]=\"maxBufferPxSignal()\"\r\n [style.height.px]=\"bodyHeightSignal()\"\r\n >\r\n <tr\r\n *cdkVirtualFor=\"let row of data(); let index = index; trackBy: trackByItem\"\r\n [class.x-table-activated]=\"allowSelectRow() && activatedRow()?.id === row.id\"\r\n [style.height.px]=\"getRowHeight()\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n (click)=\"rowClick($event, row)\"\r\n >\r\n <!-- rowHeight \u4E3A 0 \u7684\u65F6\u5019\uFF0Cindex \u4E0B\u6807\u83B7\u53D6\u4E0D\u5230 -->\r\n <ng-container *ngTemplateOutlet=\"rowTpl; context: { row: row, i: getIndex(index, row) }\"></ng-container>\r\n </tr>\r\n </cdk-virtual-scroll-viewport>\r\n } @else {\r\n @for (row of data(); track row.id; let i = $index) {\r\n <tr\r\n [class.x-table-activated]=\"allowSelectRow() && activatedRow()?.id === row.id\"\r\n [style.height.px]=\"getRowHeight()\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n (click)=\"rowClick($event, row)\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"rowTpl; context: { row: row, i: i }\"></ng-container>\r\n </tr>\r\n @if (table.treeTable() && row.children && row.expanded) {\r\n <div class=\"x-table-children\" [class.x-table-expandTpl]=\"expandTpl()\">\r\n <x-table-body\r\n [data]=\"row.children\"\r\n [columns]=\"table.columns()\"\r\n [itemSize]=\"table.itemSize()\"\r\n [rowHeight]=\"table.rowHeight()\"\r\n [columnTpl]=\"table.bodyColumnTpl()\"\r\n [allowSelectRow]=\"table.allowSelectRow()\"\r\n [rowClass]=\"table.rowClass()\"\r\n [cellConfig]=\"table.cellConfig()?.tbody\"\r\n [(activatedRow)]=\"table.activatedRow\"\r\n [expandedAll]=\"expandedAll()\"\r\n [expandTpl]=\"expandTpl()\"\r\n [level]=\"row.level! + 1\"\r\n ></x-table-body>\r\n </div>\r\n }\r\n }\r\n }\r\n }\r\n @if (table.showEmpty() && isEmpty() && level() === 0) {\r\n <x-empty [img]=\"table.emptyImg()!\" [content]=\"table.emptyContent()!\"></x-empty>\r\n }\r\n</tbody>\r\n\r\n<ng-template #rowTpl let-row=\"row\" let-i=\"i\">\r\n @if (level() > 0 && expandTpl()) {\r\n <ng-container *xOutlet=\"expandTpl(); context: { $row: row, $index: i, $level: level() }\"></ng-container>\r\n } @else if (level() === 0 || !expandTpl()) {\r\n <ng-container *xOutlet=\"rowDefault; context: { row: row, i: i, level: level() }\"></ng-container>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #rowDefault let-row=\"row\" let-i=\"i\">\r\n @for (column of columns(); track column.id; let j = $index) {\r\n <td\r\n [style.width.px]=\"column.width\"\r\n [style.flex]=\"getFlex(column)\"\r\n [title]=\"getTitle(row, column)\"\r\n [class.x-table-dragging]=\"column.dragging\"\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [ngClass]=\"!rowClass() ? {} : rowClass()!(row, i)\"\r\n >\r\n <ng-template *ngTemplateOutlet=\"cellTpl; context: { column: column, row: row, i: i }\"></ng-template>\r\n </td>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #cellTpl let-column=\"column\" let-row=\"row\" let-i=\"i\">\r\n @switch (column.type) {\r\n @case ('checkbox') {\r\n <x-checkbox\r\n [data]=\"[{ id: true, label: '' }]\"\r\n [(ngModel)]=\"row[column.id]\"\r\n [disabled]=\"row.disabled\"\r\n (ngModelChange)=\"table.bodyChecked($event, column, row)\"\r\n single\r\n ></x-checkbox>\r\n }\r\n @case ('index') {\r\n <div>{{ table.getIndex(i) }}</div>\r\n }\r\n @default {\r\n @if (table.isExpandColumn(column)) {\r\n <x-button\r\n [class.is-leaf]=\"!row.leaf\"\r\n [class.is-expanded]=\"row.expanded\"\r\n (click)=\"onExpanded($event, row)\"\r\n icon=\"fto-chevron-right\"\r\n size=\"mini\"\r\n onlyIcon\r\n flat\r\n plain\r\n class=\"x-table-expand\"\r\n [style.margin-left.rem]=\"row.level - 0.5\"\r\n ></x-button>\r\n }\r\n <ng-container\r\n *xOutlet=\"columnTpl()[column.id]; context: { $column: column, $row: row, $index: table.getIndex(i) }\"\r\n >\r\n <ng-container *xOutlet=\"table.bodyTdTpl(); context: { $column: column, $row: row, $index: table.getIndex(i) }\">\r\n <div [innerHTML]=\"row[column.id]\" [style.text-align]=\"column.textAlign\"></div>\r\n {{ table.rowExpand() && table.rowExpand()!.id === column.id ? 'x-table-body-level-' + row.level : '' }}\r\n </ng-container>\r\n </ng-container>\r\n }\r\n }\r\n</ng-template>\r\n" }]
1000
+ }], ctorParameters: () => [] });
988
1001
 
989
1002
  class XTableComponent extends XTableProperty {
990
- get getScrollLeft() {
991
- return this.scrollLeft > 0;
992
- }
993
- get getScrollTop() {
994
- return this.scrollTop > 0;
995
- }
996
- get getRowHeight() {
997
- return this.rowHeight == 0 ? '' : this.rowHeight;
998
- }
999
- get getStickyTopScrollTop() {
1000
- return this.tcaption ? this.tcaption.nativeElement.offsetHeight : 0;
1001
- }
1002
- get getStickyBottomScrollTop() {
1003
- let top = 0;
1004
- if (this.footer && this.tfoot) {
1005
- top += this.tfoot?.nativeElement.clientHeight + 1;
1006
- }
1007
- return top;
1008
- }
1009
- get getStickyTopRightEleHeight() {
1010
- if (this.stickyTopRightEle) {
1011
- return this.stickyTopRightEle.nativeElement.offsetHeight;
1012
- }
1013
- else {
1014
- return 0;
1015
- }
1016
- }
1017
- get getStickyBottomRightEleHeight() {
1018
- if (this.stickyBottomRightEle) {
1019
- return this.stickyBottomRightEle.nativeElement.offsetHeight;
1020
- }
1021
- else {
1022
- return 0;
1023
- }
1024
- }
1025
- constructor(renderer, elementRef, cdr, configService) {
1026
- super();
1027
- this.renderer = renderer;
1028
- this.elementRef = elementRef;
1029
- this.cdr = cdr;
1030
- this.configService = configService;
1031
- this.theads = [];
1003
+ constructor() {
1004
+ super(...arguments);
1005
+ this.renderer = inject(Renderer2);
1006
+ this.elementRef = inject((ElementRef));
1007
+ this.cdr = inject(ChangeDetectorRef);
1008
+ this.unSubject = new Subject();
1009
+ this.classMap = computed(() => ({ [`${XTablePrefix}-row-size-${this.rowSize()}`]: !XIsEmpty(this.rowSize()) }));
1010
+ this.theads = signal([]);
1011
+ this.tfoot = signal(null);
1012
+ this.virtualBody = signal(null);
1032
1013
  this.theadsChange = [];
1033
- this.hasScrollY = false;
1034
- this.scrollYWidth = 0;
1035
- this.hasScrollX = false;
1036
- this.scrollXHeight = 0;
1037
- this.scrollLeft = 0;
1038
- this.scrollLeftMax = false;
1039
- this.scrollTop = 0;
1040
- this.dataIsFunc = false;
1041
- this.getting = false;
1042
- this.tableData = [];
1043
- this.treeTableData = [];
1044
- this.checkedValues = {};
1045
- this.indeterminate = '$$indeterminate';
1046
- this._unSubject = new Subject();
1014
+ this.scrollContentEle = signal(null);
1015
+ this.hasScrollY = signal(false);
1016
+ this.scrollYWidth = signal(0);
1017
+ this.hasScrollX = signal(false);
1018
+ this.scrollXHeight = signal(0);
1019
+ this.scrollXWidth = signal(null);
1020
+ this.scrollLeft = signal(0);
1021
+ this.scrollLeftMax = signal(false);
1022
+ this.scrollTop = signal(0);
1023
+ this.rowChecked = signal(null);
1024
+ this.headCheckboxList = signal([]);
1025
+ this.rowExpand = signal(null);
1026
+ this.headExpandList = signal([]);
1027
+ this.dataIsFunc = signal(false);
1028
+ this.getting = signal(false);
1029
+ this.tableData = signal([]);
1030
+ this.treeTableData = signal([]);
1031
+ this.checkedValues = signal({});
1032
+ this.indeterminate = signal('$$indeterminate');
1033
+ this.table = viewChild.required('table');
1034
+ this.caption = viewChild('caption');
1035
+ this.pagination = viewChild('pagination');
1036
+ this.stickyTopRightEle = viewChild('stickyTopRightEle');
1037
+ this.stickyBottomRightEle = viewChild('stickyBottomRightEle');
1038
+ this.headCom = viewChildren(XTableHeadComponent);
1039
+ this.bodyCom = viewChildren(XTableBodyComponent);
1040
+ this.footCom = viewChild(XTableFootComponent);
1041
+ this.getScrollLeft = computed(() => this.scrollLeft() > 0);
1042
+ this.getScrollTop = computed(() => this.scrollTop() > 0);
1043
+ this.getRowHeight = computed(() => (this.rowHeight() === 0 ? '' : this.rowHeight()));
1044
+ this.getStickyTopScrollTop = computed(() => (this.caption() ? this.caption().nativeElement.offsetHeight : 0));
1045
+ this.getStickyBottomScrollTop = computed(() => {
1046
+ let top = 0;
1047
+ if (this.footer() && this.tfoot()) {
1048
+ top += this.tfoot().nativeElement.clientHeight + 1;
1049
+ }
1050
+ return top;
1051
+ });
1052
+ this.getStickyTopRightEleHeight = computed(() => {
1053
+ if (this.stickyTopRightEle()) {
1054
+ return this.stickyTopRightEle().nativeElement.offsetHeight;
1055
+ }
1056
+ else {
1057
+ return 0;
1058
+ }
1059
+ });
1060
+ this.getStickyBottomRightEleHeight = computed(() => {
1061
+ if (this.stickyBottomRightEle()) {
1062
+ return this.stickyBottomRightEle().nativeElement.offsetHeight;
1063
+ }
1064
+ else {
1065
+ return 0;
1066
+ }
1067
+ });
1068
+ this.hasStickyTopRight = computed(() => this.showHeader() &&
1069
+ (this.headerPosition() === 'top' || this.headerPosition() === 'top-bottom') &&
1070
+ this.columns().some((x) => Number(x.right) >= 0));
1071
+ this.hasStickyTopRightSearch = computed(() => !!this.headSearchTpl());
1072
+ this.hasStickyBottomRight = computed(() => this.showHeader() &&
1073
+ (this.headerPosition() === 'bottom' || this.headerPosition() === 'top-bottom') &&
1074
+ this.columns().some((x) => Number(x.right) >= 0));
1075
+ this.cellConfigSignal = computed(() => {
1076
+ const cellConfig = this.cellConfig();
1077
+ if (!cellConfig)
1078
+ return;
1079
+ const setRule = (rule) => {
1080
+ if (!rule)
1081
+ return;
1082
+ let gridTemplateColumns = '', cells = [];
1083
+ if (!rule.gridTemplateColumns) {
1084
+ gridTemplateColumns = `${this.columns()
1085
+ .map((x) => {
1086
+ if (x.width)
1087
+ return x.width;
1088
+ if (x.flex)
1089
+ return `${x.flex}fr`;
1090
+ return '1fr';
1091
+ })
1092
+ .join(' ')}`;
1093
+ }
1094
+ if (!rule.cells)
1095
+ return;
1096
+ cells = rule.cells.map((y) => {
1097
+ const col = this.columns().find((z) => z.id === y.id);
1098
+ if (col) {
1099
+ return { ...col, ...y };
1100
+ }
1101
+ return y;
1102
+ });
1103
+ return { gridTemplateColumns, cells };
1104
+ };
1105
+ return { thead: setRule(cellConfig.thead), tbody: setRule(cellConfig.tbody) };
1106
+ });
1047
1107
  }
1048
1108
  ngOnInit() {
1049
- this.setClassMap();
1050
1109
  this.setRowChecked();
1051
1110
  this.setRowExpand();
1052
1111
  this.setPaginationPosition();
1053
1112
  }
1054
1113
  ngOnChanges(simples) {
1055
- const { data, checkedRow, columns, activatedRow, manual, showPagination, expandedAll, cellConfig } = simples;
1114
+ const { data, checkedRow, columns, activatedRow, manual, showPagination, expandedAll } = simples;
1056
1115
  XIsChange(expandedAll) && this.setExpandedAll();
1057
1116
  XIsChange(data, checkedRow) && this.setData();
1058
1117
  if (XIsChange(columns)) {
@@ -1061,23 +1120,13 @@ class XTableComponent extends XTableProperty {
1061
1120
  }
1062
1121
  XIsChange(columns, activatedRow, showPagination) && this.cdr.detectChanges();
1063
1122
  XIsChange(manual) && this.setManual();
1064
- XIsChange(cellConfig) && this.setMerge();
1065
1123
  }
1066
1124
  ngOnDestroy() {
1067
- this._unSubject.next();
1068
- this._unSubject.complete();
1069
- }
1070
- ngAfterViewInit() {
1071
- this.tcaption = this.caption;
1072
- }
1073
- setClassMap() {
1074
- this.classMap = {
1075
- [`${XTablePrefix}-row-size-${this.rowSize}`]: !XIsEmpty(this.rowSize)
1076
- };
1077
- this.cdr.detectChanges();
1125
+ this.unSubject.next();
1126
+ this.unSubject.complete();
1078
1127
  }
1079
1128
  setPaginationPosition() {
1080
- this.renderer.addClass(this.elementRef.nativeElement, `x-table-${this.paginationPosition}`);
1129
+ this.renderer.addClass(this.elementRef.nativeElement, `x-table-${this.paginationPosition()}`);
1081
1130
  }
1082
1131
  getSticky(column) {
1083
1132
  return this.getStickyLeft(column) || this.getStickyRight(column);
@@ -1086,7 +1135,7 @@ class XTableComponent extends XTableProperty {
1086
1135
  return Number(column.left) >= 0;
1087
1136
  }
1088
1137
  getStickyLeftLast(column) {
1089
- let lefts = this.columns.filter((x) => Number(x.left) >= 0);
1138
+ let lefts = this.columns().filter((x) => Number(x.left) >= 0);
1090
1139
  if (lefts.length === 0)
1091
1140
  return false;
1092
1141
  return lefts[lefts.length - 1].id === column.id;
@@ -1095,144 +1144,89 @@ class XTableComponent extends XTableProperty {
1095
1144
  return Number(column.right) >= 0;
1096
1145
  }
1097
1146
  getStickyRightFirst(column) {
1098
- let rights = this.columns.filter((x) => Number(x.right) >= 0);
1147
+ let rights = this.columns().filter((x) => Number(x.right) >= 0);
1099
1148
  if (rights.length === 0)
1100
1149
  return false;
1101
1150
  return rights[0].id === column.id;
1102
1151
  }
1103
- hasStickyTopRight() {
1104
- return (this.showHeader &&
1105
- (this.headerPosition === 'top' || this.headerPosition === 'top-bottom') &&
1106
- this.columns.some((x) => Number(x.right) >= 0));
1107
- }
1108
- hasStickyTopRightSearch() {
1109
- return this.headSearchTpl ? true : false;
1110
- }
1111
- hasStickyBottomRight() {
1112
- return (this.showHeader &&
1113
- (this.headerPosition === 'bottom' || this.headerPosition === 'top-bottom') &&
1114
- this.columns.some((x) => Number(x.right) >= 0));
1115
- }
1116
1152
  getIndex(index) {
1117
- return (Number(this.index) - 1) * Number(this.size) + index + 1;
1153
+ return (this.index() - 1) * this.size() + index + 1;
1118
1154
  }
1119
1155
  setData() {
1120
- if (Array.isArray(this.data)) {
1121
- this.dataIsFunc = false;
1122
- this.tableData = this.data;
1123
- this.setChecked(this.data);
1124
- this.setHeadCheckboxList(this.data);
1125
- this.setExpand(this.data);
1126
- this.setHeadExpandList();
1156
+ const data = this.data();
1157
+ if (XIsArray(data)) {
1158
+ this.dataIsFunc.set(false);
1159
+ this.tableData.set(data);
1160
+ this.setChecked(data);
1161
+ this.setHeadCheckboxList(data);
1162
+ this.setExpand(data);
1127
1163
  this.detectChanges();
1128
1164
  }
1129
- else if (this.data instanceof Function) {
1130
- this.dataIsFunc = true;
1165
+ else if (data instanceof Function) {
1166
+ this.dataIsFunc.set(true);
1131
1167
  this.getDataByFunc();
1132
1168
  }
1133
1169
  }
1134
1170
  getDataByFunc() {
1135
- if (!this.manual)
1171
+ if (!this.manual())
1136
1172
  return;
1137
- this.getting = true;
1138
- this.cdr.detectChanges();
1139
- this._unSubject.next();
1140
- this.data(this.index, this.size, this.query)
1141
- .pipe(takeUntil(this._unSubject))
1173
+ this.getting.set(true);
1174
+ this.unSubject.next();
1175
+ this.data()(this.index(), this.size(), this.query())
1176
+ .pipe(takeUntil(this.unSubject))
1142
1177
  .subscribe((x) => {
1143
1178
  let [data, total] = [x.list, x.total];
1144
- if (this.virtualBody) {
1145
- this.virtualBody.scrollToIndex(0);
1146
- this.virtualBody.checkViewportSize();
1179
+ if (this.virtualBody()) {
1180
+ this.virtualBody().scrollToIndex(0);
1181
+ this.virtualBody().checkViewportSize();
1147
1182
  }
1148
- this.getting = false;
1149
- this.tableData = data;
1183
+ this.getting.set(false);
1184
+ this.tableData.set(data);
1150
1185
  this.setChecked(data);
1151
1186
  this.setHeadCheckboxList(data);
1152
1187
  this.setExpand(data);
1153
- this.setHeadExpandList();
1154
- this.total = total;
1155
- this.detectChanges();
1188
+ this.total.set(total);
1156
1189
  });
1157
1190
  }
1158
1191
  setManual() {
1159
- if (this.dataIsFunc)
1192
+ if (this.dataIsFunc())
1160
1193
  this.getDataByFunc();
1161
1194
  }
1162
1195
  setRowChecked() {
1163
- this.rowChecked = this.columns.find((x) => x.rowChecked);
1164
- this.headCheckboxList = this.columns.filter((x) => x.type === 'checkbox' && x.headChecked);
1196
+ this.rowChecked.set(this.columns().find((x) => x.rowChecked));
1197
+ this.headCheckboxList.set(this.columns().filter((x) => x.type === 'checkbox' && x.headChecked));
1165
1198
  }
1166
1199
  setRowExpand() {
1167
- this.rowExpand = this.columns.find((x) => x.rowExpand);
1200
+ this.rowExpand.set(this.columns().find((x) => x.rowExpand));
1168
1201
  }
1169
1202
  isExpandColumn(column) {
1170
- let expandColumn = this.columns.find((x) => x.id === column.id && x.type === 'expand');
1203
+ let expandColumn = this.columns().find((x) => x.id === column.id && x.type === 'expand');
1171
1204
  if (expandColumn) {
1172
1205
  return true;
1173
1206
  }
1174
1207
  return false;
1175
1208
  }
1176
- setMerge() {
1177
- if (!this.cellConfig)
1178
- return;
1179
- const setRule = (rule) => {
1180
- if (!rule)
1181
- return;
1182
- let gridTemplateColumns = '', cells = [];
1183
- if (!rule.gridTemplateColumns) {
1184
- gridTemplateColumns = `${this.columns
1185
- .map((x) => {
1186
- if (x.width)
1187
- return x.width;
1188
- if (x.flex)
1189
- return `${x.flex}fr`;
1190
- return '1fr';
1191
- })
1192
- .join(' ')}`;
1193
- }
1194
- if (!rule.cells)
1195
- return;
1196
- cells = rule.cells.map((y) => {
1197
- const col = this.columns.find((z) => z.id === y.id);
1198
- if (col) {
1199
- return { ...col, ...y };
1200
- }
1201
- return y;
1202
- });
1203
- return { gridTemplateColumns, cells };
1204
- };
1205
- this.cellConfig.thead = setRule(this.cellConfig.thead);
1206
- this.cellConfig.tbody = setRule(this.cellConfig.tbody);
1207
- }
1208
- pageChange(type) {
1209
- this.dataIsFunc && this.getDataByFunc();
1210
- if (type === 'index') {
1211
- this.indexChange.emit(Number(this.index));
1212
- }
1213
- else if (type === 'size') {
1214
- this.sizeChange.emit(Number(this.size));
1215
- }
1209
+ pageChange(_type) {
1210
+ this.dataIsFunc() && this.getDataByFunc();
1216
1211
  this.resetScroll();
1217
1212
  }
1218
1213
  change(index) {
1219
- this.index = index;
1220
- this.dataIsFunc && this.getDataByFunc();
1221
- this.indexChange.emit(this.index);
1214
+ this.index.set(index);
1215
+ this.dataIsFunc() && this.getDataByFunc();
1222
1216
  this.resetScroll();
1223
1217
  }
1224
1218
  resetScroll(x = true, y = true) {
1225
- if (this.hasScrollX && x)
1226
- this.virtualBody?.scrollTo({ left: 0 });
1227
- if (this.hasScrollY && y)
1228
- this.virtualBody?.scrollTo({ top: 0 });
1219
+ if (this.hasScrollX() && x)
1220
+ this.virtualBody()?.scrollTo({ left: 0 });
1221
+ if (this.hasScrollY() && y)
1222
+ this.virtualBody()?.scrollTo({ top: 0 });
1229
1223
  }
1230
1224
  setChecked(data) {
1231
1225
  let result = [];
1232
- if (XIsEmpty(data) || !this.checkedRow)
1226
+ if (XIsEmpty(data) || !this.checkedRow())
1233
1227
  return;
1234
- for (let key in this.checkedRow) {
1235
- const arr = this.checkedRow[key];
1228
+ for (let key in this.checkedRow()) {
1229
+ const arr = this.checkedRow()[key];
1236
1230
  for (let item of data) {
1237
1231
  item[key] = arr.includes(item.id);
1238
1232
  result = [...result, item];
@@ -1242,17 +1236,16 @@ class XTableComponent extends XTableProperty {
1242
1236
  data = [...result];
1243
1237
  }
1244
1238
  setHeadCheckboxList(data) {
1245
- if (XIsEmpty(data) || !this.headCheckboxList)
1239
+ if (XIsEmpty(data) || !this.headCheckboxList())
1246
1240
  return;
1247
- for (let column of this.headCheckboxList) {
1241
+ for (let column of this.headCheckboxList()) {
1248
1242
  this.setCheckedValues(column);
1249
1243
  }
1250
1244
  }
1251
1245
  setExpand(data) {
1252
1246
  const getChildren = (node, level) => {
1253
1247
  node.level = level;
1254
- node.expanded =
1255
- Boolean(this.expandedAll) || level <= Number(this.expandedLevel) || this.expanded.includes(node.id);
1248
+ node.expanded = this.expandedAll() || level <= this.expandedLevel() || this.expanded().includes(node.id);
1256
1249
  if (XIsUndefined(node.children))
1257
1250
  node.children = data.filter((y) => y.pid === node.id);
1258
1251
  if (XIsUndefined(node.leaf))
@@ -1261,16 +1254,16 @@ class XTableComponent extends XTableProperty {
1261
1254
  node.children?.map((y) => getChildren(y, level + 1));
1262
1255
  return node;
1263
1256
  };
1264
- this.treeTableData = data
1257
+ this.treeTableData.set(data
1265
1258
  .filter((x) => XIsEmpty(x.pid))
1266
1259
  .map((x, index) => {
1267
1260
  if (XIsUndefined(x.id))
1268
1261
  x.id = index + 1;
1269
1262
  return getChildren(x, 0);
1270
- });
1263
+ }));
1271
1264
  }
1272
1265
  setExpandedAll() {
1273
- if (!this.treeTable || this.treeTableData?.length === 0)
1266
+ if (!this.treeTable() || this.treeTableData()?.length === 0)
1274
1267
  return;
1275
1268
  const setChildren = (nodes) => {
1276
1269
  if (XIsEmpty(nodes))
@@ -1280,57 +1273,63 @@ class XTableComponent extends XTableProperty {
1280
1273
  setChildren(x.children);
1281
1274
  });
1282
1275
  };
1283
- setChildren(this.treeTableData);
1284
- this.detectChanges();
1276
+ this.treeTableData.update((x) => {
1277
+ setChildren(x);
1278
+ return [...x];
1279
+ });
1285
1280
  }
1286
- setHeadExpandList() { }
1287
1281
  checkSort(sort) {
1288
1282
  if (!this.dataIsFunc)
1289
1283
  return;
1290
- if (typeof this.query === 'undefined')
1291
- this.query = {};
1292
- this.query.sort = sort;
1293
- this.queryChange.emit(this.query);
1284
+ let query = this.query();
1285
+ if (typeof query === 'undefined')
1286
+ query = {};
1287
+ query.sort = sort;
1288
+ this.query.set(query);
1294
1289
  this.getDataByFunc();
1295
1290
  }
1296
1291
  headChecked(checked, column) {
1297
- this.tableData.forEach((x) => {
1298
- if (!x.disabled) {
1299
- x[column.id] = checked;
1300
- }
1292
+ this.tableData.update((z) => {
1293
+ z.forEach((x) => {
1294
+ if (!x.disabled) {
1295
+ x[column.id] = checked;
1296
+ }
1297
+ });
1298
+ return [...z];
1301
1299
  });
1302
1300
  this.setCheckedValues(column);
1303
- this.headCheckboxChange.emit({ rows: this.tableData, checkbox: this.checkedValues });
1301
+ this.headCheckboxChange.emit({ rows: this.tableData(), checkbox: this.checkedValues() });
1304
1302
  this.detectChanges();
1305
1303
  }
1306
1304
  bodyChecked(_checked, column, row) {
1307
1305
  this.setCheckedValues(column);
1308
1306
  this.bodyCheckboxChange.emit(row);
1309
- this.detectChanges();
1307
+ // this.detectChanges();
1310
1308
  }
1311
1309
  setCheckedValues(column) {
1312
- const notDisabled = this.tableData.filter((x) => !x.disabled);
1310
+ const notDisabled = this.tableData().filter((x) => !x.disabled);
1313
1311
  const count = notDisabled.length;
1314
1312
  const checkedLen = notDisabled.filter((x) => x[column.id]).length;
1315
- this.checkedValues[column.id] = count === checkedLen && count !== 0;
1316
- this.checkedValues[column.id + this.indeterminate] = checkedLen > 0 && checkedLen < count;
1313
+ this.checkedValues.update((x) => {
1314
+ x[column.id] = count === checkedLen && count !== 0;
1315
+ x[column.id + this.indeterminate()] = checkedLen > 0 && checkedLen < count;
1316
+ return { ...x };
1317
+ });
1317
1318
  }
1318
1319
  detectChanges() {
1319
- this.bodyChange && this.bodyChange();
1320
- this.theadsChanges();
1321
- this.cdr.detectChanges();
1322
- }
1323
- theadsChanges() {
1324
- if (this.theadsChange && this.theadsChange.length > 0) {
1325
- for (let item of this.theadsChange) {
1326
- item();
1327
- }
1328
- }
1320
+ this.headCom()?.forEach((x) => {
1321
+ x.cdr.markForCheck();
1322
+ });
1323
+ this.bodyCom()?.forEach((x) => {
1324
+ x.cdr.markForCheck();
1325
+ });
1326
+ this.footCom()?.cdr.markForCheck();
1327
+ this.cdr.markForCheck();
1329
1328
  }
1330
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$1.XConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
1331
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: XTableComponent, isStandalone: true, selector: "x-table", viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true }, { propertyName: "caption", first: true, predicate: ["caption"], descendants: true }, { propertyName: "pagination", first: true, predicate: ["pagination"], descendants: true }, { propertyName: "stickyTopRightEle", first: true, predicate: ["stickyTopRightEle"], descendants: true }, { propertyName: "stickyBottomRightEle", first: true, predicate: ["stickyBottomRightEle"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<table\r\n #table\r\n class=\"x-table\"\r\n [ngClass]=\"classMap\"\r\n [x-loading]=\"loading && getting\"\r\n [class.x-table-wrap-border-hidden]=\"hiddenWrapBorder\"\r\n [class.x-table-scroll-left]=\"getScrollLeft\"\r\n [class.x-table-scroll-left-max]=\"scrollLeftMax\"\r\n [class.x-table-scroll-top]=\"getScrollTop\"\r\n [class.x-table-has-scroll-right]=\"scrollYWidth\"\r\n [class.x-table-has-scroll-bottom]=\"scrollXWidth\"\r\n [class.x-table-bordered]=\"bordered\"\r\n [class.x-table-td-adaption-height]=\"rowHeight == 0\"\r\n [class.x-table-cell-config]=\"cellConfig\"\r\n>\r\n @if (header) {\r\n <caption #caption class=\"x-table-header\" [style.height.px]=\"getRowHeight\" [style.min-height.px]=\"getRowHeight\">\r\n <ng-container *xOutlet=\"header\">{{ header }}</ng-container>\r\n </caption>\r\n }\r\n @if (showHeader && (headerPosition === 'top' || headerPosition === 'top-bottom')) {\r\n <x-table-head\r\n [columns]=\"columns\"\r\n [rowHeight]=\"rowHeight\"\r\n [columnTpl]=\"headColumnTpl\"\r\n [scrollYWidth]=\"scrollYWidth\"\r\n [scrollXWidth]=\"scrollXWidth\"\r\n [cellConfig]=\"cellConfig?.thead\"\r\n [position]=\"'top'\"\r\n [table]=\"this\"\r\n ></x-table-head>\r\n }\r\n <x-table-body\r\n [data]=\"treeTable ? treeTableData : tableData\"\r\n [columns]=\"columns\"\r\n [itemSize]=\"itemSize\"\r\n [rowHeight]=\"rowHeight\"\r\n [bodyHeight]=\"bodyHeight\"\r\n [columnTpl]=\"bodyColumnTpl\"\r\n [allowSelectRow]=\"allowSelectRow\"\r\n [virtualScroll]=\"virtualScroll\"\r\n [minBufferPx]=\"minBufferPx\"\r\n [maxBufferPx]=\"maxBufferPx\"\r\n [adaptionHeight]=\"adaptionHeight\"\r\n [docPercent]=\"docPercent\"\r\n [scroll]=\"scroll\"\r\n [rowClass]=\"rowClass\"\r\n [cellConfig]=\"cellConfig?.tbody\"\r\n [expandedAll]=\"expandedAll\"\r\n [expandTpl]=\"expandTpl\"\r\n [(activatedRow)]=\"activatedRow\"\r\n (activatedRowChange)=\"activatedRowChange.emit($event)\"\r\n [table]=\"this\"\r\n ></x-table-body>\r\n @if (showHeader && (headerPosition === 'bottom' || headerPosition === 'top-bottom')) {\r\n <x-table-head\r\n [columns]=\"columns\"\r\n [rowHeight]=\"rowHeight\"\r\n [columnTpl]=\"headColumnTpl\"\r\n [scrollYWidth]=\"scrollYWidth\"\r\n [scrollXWidth]=\"scrollXWidth\"\r\n [cellConfig]=\"cellConfig?.thead\"\r\n [position]=\"'bottom'\"\r\n [table]=\"this\"\r\n ></x-table-head>\r\n }\r\n @if (footer) {\r\n <x-table-foot [table]=\"this\" [footer]=\"footer\" [rowHeight]=\"rowHeight\"></x-table-foot>\r\n }\r\n @if (hasStickyTopRight()) {\r\n <div\r\n #stickyTopRightEle\r\n class=\"x-table-sticky-right-scroll\"\r\n [class.x-table-border-bottom]=\"headSearchTpl\"\r\n [style.top.px]=\"getStickyTopScrollTop\"\r\n [style.width.px]=\"scrollYWidth\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n ></div>\r\n }\r\n @if (hasStickyTopRight() && headSearchTpl) {\r\n <div\r\n class=\"x-table-sticky-right-scroll\"\r\n [style.top.px]=\"getStickyTopScrollTop + getStickyTopRightEleHeight\"\r\n [style.width.px]=\"scrollYWidth\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n ></div>\r\n }\r\n @if (hasStickyBottomRight()) {\r\n <div\r\n #stickyBottomRightEle\r\n class=\"x-table-sticky-right-scroll\"\r\n [style.bottom.px]=\"getStickyBottomScrollTop\"\r\n [style.width.px]=\"scrollYWidth\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n ></div>\r\n }\r\n @if (hasStickyBottomRight() && headSearchTpl) {\r\n <div\r\n class=\"x-table-sticky-right-scroll\"\r\n [class.x-table-border-bottom]=\"headSearchTpl\"\r\n [style.bottom.px]=\"getStickyBottomScrollTop + getStickyBottomRightEleHeight\"\r\n [style.width.px]=\"scrollYWidth\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n ></div>\r\n }\r\n</table>\r\n@if (showPagination && size) {\r\n <x-pagination\r\n #pagination\r\n [(index)]=\"index\"\r\n [(size)]=\"size\"\r\n [(query)]=\"query\"\r\n [total]=\"total\"\r\n (indexChange)=\"pageChange('index')\"\r\n (sizeChange)=\"pageChange('size')\"\r\n [showEllipsis]=\"showEllipsis\"\r\n [showTotal]=\"showTotal\"\r\n [space]=\"space\"\r\n [hiddenBorder]=\"hiddenPaginationBorder!\"\r\n [showSize]=\"showSize\"\r\n [showJump]=\"showJump\"\r\n [jumpWidth]=\"jumpWidth\"\r\n [showInputSize]=\"showInputSize\"\r\n [inputSizeWidth]=\"inputSizeWidth\"\r\n [sizeData]=\"sizeData\"\r\n [sizeWidth]=\"sizeWidth\"\r\n [pageLinkSize]=\"pageLinkSize\"\r\n [disabled]=\"disabled\"\r\n [totalTpl]=\"totalTpl\"\r\n [simple]=\"simple\"\r\n [simpleIndexWidth]=\"simpleIndexWidth\"\r\n >\r\n </x-pagination>\r\n}\r\n", styles: [".x-table{margin:0;padding:0;display:flex;flex-direction:column;border-collapse:collapse;width:100%;position:relative}.x-table:not(.x-table-wrap-border-hidden){border:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>thead{position:relative;overflow:hidden;display:block;background-color:var(--x-background);min-height:42px}.x-table>thead>tr{width:100%;display:flex;min-height:42px}.x-table>thead>tr>th{display:flex;align-items:center;flex:1;position:relative;font-weight:600;background-color:var(--x-background);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>thead>tr>th>a{display:inline-flex;align-items:center;color:var(--x-text-300);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.x-table>thead>tr>th.x-table-sticky{position:sticky;z-index:5}.x-table>thead>tr>th .x-table-drag-width{position:absolute;height:100%;width:.1875rem;right:-.125rem;cursor:ew-resize;transition:background-color var(--x-animation-duration-fast);z-index:1}.x-table>thead>tr>th .x-table-drag-width:hover{background-color:var(--x-primary)}.x-table>thead>tr.cdk-drop-list-dragging>th.cdk-drag-placeholder{background-color:var(--x-background-a200);opacity:.9}.x-table>thead.x-table-head-bottom>tr>th{border-bottom:none}.x-table>thead.x-table-head-bottom>tr.x-table-search>th{border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>tbody{display:block;border-top:none;position:relative;min-height:7rem}.x-table>tbody tr{display:flex}.x-table>tbody tr>td{display:flex;align-items:center;position:relative;justify-content:space-between;overflow:hidden;background-color:var(--x-background);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>tbody tr>td>div{flex:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.x-table>tbody tr>td.x-table-sticky{position:sticky;z-index:5}.x-table>tbody tr>td>x-button .x-icon{transition:var(--x-animation-duration-base)}.x-table>tbody tr>td>x-button.is-leaf{visibility:hidden}.x-table>tbody tr>td>x-button.is-expanded .x-icon{transform:rotate(90deg)}.x-table>tbody tr>td.x-table-dragging{background-color:var(--x-background-a200);opacity:.9}.x-table>tbody tr.x-table-activated>td{background-color:var(--x-background-a400)}.x-table>tbody tr:hover:not(.x-table-activated)>td{background-color:var(--x-background-a200)}.x-table>tbody tr:last-child{border-bottom:none}.x-table>tbody x-empty{position:absolute;top:0;width:100%;padding:calc(var(--x-font-size) * 2)}.x-table-sort{cursor:pointer;transition:transform .2s}.x-table-sort:hover{color:var(--x-text-300)}.x-table-sort:active{transform:translate(1px,1px)}.x-table-sort-icon.x-icon{margin-left:.25rem;display:none;font-size:1rem;transform:rotate(90deg) rotateY(180deg);transition:.3s}.x-table-sort-icon.x-icon.x-table-icon-up,.x-table-sort-icon.x-icon.x-table-icon-down{display:inherit}.x-table-sort-icon.x-icon.x-table-icon-down{transform:rotate(90deg)}.x-table-scroll-top>thead{box-shadow:0 var(--x-box-shadow-light-width) var(--x-box-shadow-light-width) var(--x-box-shadow-light-color);z-index:1}.x-table-scroll-left .x-table-sticky-left-last{box-shadow:var(--x-box-shadow-light-width) var(--x-box-shadow-light-width) var(--x-box-shadow-light-width) var(--x-box-shadow-light-color);border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-td-adaption-height>tbody tr>td{overflow:inherit}.x-table-td-adaption-height>tbody tr>td>div{white-space:inherit;text-overflow:inherit;overflow:inherit}.x-table-bordered>thead>tr>th,.x-table-bordered>tbody tr>td{border-right:var(--x-border-width) var(--x-border-style) var(--x-border);padding-left:calc(var(--x-font-size) / 2)}.x-table-bordered>thead>tr>th:last-child,.x-table-bordered>tbody tr>td:last-child{border-right:none}.x-table-cell-config>thead tr,.x-table-cell-config>tbody tr{display:grid;grid-auto-flow:row;height:100%}.x-table-cell-config>thead>tr>th,.x-table-cell-config>tbody tr>td{border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-cell-config>thead>tr>th:last-child,.x-table-cell-config>tbody tr>td:last-child{border-right:none}.x-table-expand{margin-right:.5rem}.x-table-expandTpl>tr{display:block!important;height:inherit!important}.x-table-header{border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);text-align:left;display:flex;align-items:center}.x-table-footer{display:flex;align-items:center}.x-table-sticky-right-scroll{position:absolute;right:0;min-height:42px;background-color:var(--x-background);z-index:1}.x-table-has-scroll-right .x-table-footer{border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-has-scroll-bottom:not(.x-table-scroll-left-max) .x-table-sticky-right-first{box-shadow:var(--x-box-shadow-light-width-minus) var(--x-box-shadow-light-width) var(--x-box-shadow-light-width) var(--x-box-shadow-light-color);border-left:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-border-bottom{border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-border-top{border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-row-size-big>thead>tr>th,.x-table-row-size-big>tbody tr>td{padding:calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4) calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4)}.x-table-row-size-big .x-table-header,.x-table-row-size-big .x-table-footer{padding:calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4) calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4)}.x-table-row-size-large>thead>tr>th,.x-table-row-size-large>tbody tr>td{padding:calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3) calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3)}.x-table-row-size-large .x-table-header,.x-table-row-size-large .x-table-footer{padding:calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3) calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3)}.x-table-row-size-medium>thead>tr>th,.x-table-row-size-medium>tbody tr>td{padding:calc(var(--x-font-size) / 2) var(--x-font-size) calc(var(--x-font-size) / 2) var(--x-font-size)}.x-table-row-size-medium .x-table-header,.x-table-row-size-medium .x-table-footer{padding:calc(var(--x-font-size) / 2) var(--x-font-size) calc(var(--x-font-size) / 2) var(--x-font-size)}.x-table-row-size-small>thead>tr>th,.x-table-row-size-small>tbody tr>td{padding:calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3) calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3)}.x-table-row-size-small .x-table-header,.x-table-row-size-small .x-table-footer{padding:calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3) calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3)}.x-table-row-size-mini>thead>tr>th,.x-table-row-size-mini>tbody tr>td{padding:calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2) calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2)}.x-table-row-size-mini .x-table-header,.x-table-row-size-mini .x-table-footer{padding:calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2) calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2)}x-table{width:100%;display:flex;flex-direction:column}x-table .x-pagination{padding-top:calc(var(--x-font-size) / 2)}x-table.x-table-top-left{flex-direction:column-reverse}x-table.x-table-top-left .x-pagination{padding-top:0;padding-bottom:calc(var(--x-font-size) / 2)}x-table.x-table-top-center{flex-direction:column-reverse;align-items:center}x-table.x-table-top-center .x-pagination{padding-top:0;padding-bottom:calc(var(--x-font-size) / 2)}x-table.x-table-top-right{flex-direction:column-reverse;align-items:flex-end}x-table.x-table-top-right .x-pagination{padding-top:0;padding-bottom:calc(var(--x-font-size) / 2)}x-table.x-table-bottom-center{align-items:center}x-table.x-table-bottom-right{align-items:flex-end}body>.x-table-th{display:block}body>.x-table-th-big{padding:calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4) calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4)}body>.x-table-th-large{padding:calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3) calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3)}body>.x-table-th-medium{padding:calc(var(--x-font-size) / 2) var(--x-font-size) calc(var(--x-font-size) / 2) var(--x-font-size)}body>.x-table-th-small{padding:calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3) calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3)}body>.x-table-th-mini{padding:calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2) calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2)}body>.x-table-th.cdk-drag-preview{display:flex;align-items:center;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-style:dashed;border-radius:var(--x-border-radius);background-color:var(--x-background);opacity:.8;box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color)}body>.x-table-th.cdk-drag-preview>a{display:inline-flex;align-items:center;color:var(--x-text-300);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}body>.x-table-th.cdk-drag-animating{transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: XLoadingComponent, selector: "x-loading, [x-loading]" }, { kind: "component", type: XTableHeadComponent, selector: "x-table-head", inputs: ["table"] }, { kind: "component", type: XTableFootComponent, selector: "x-table-foot", inputs: ["table"] }, { kind: "component", type: XTableBodyComponent, selector: "x-table-body", inputs: ["table"] }, { kind: "component", type: XPaginationComponent, selector: "x-pagination" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1329
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1330
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.1", type: XTableComponent, isStandalone: true, selector: "x-table", viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true, isSignal: true }, { propertyName: "caption", first: true, predicate: ["caption"], descendants: true, isSignal: true }, { propertyName: "pagination", first: true, predicate: ["pagination"], descendants: true, isSignal: true }, { propertyName: "stickyTopRightEle", first: true, predicate: ["stickyTopRightEle"], descendants: true, isSignal: true }, { propertyName: "stickyBottomRightEle", first: true, predicate: ["stickyBottomRightEle"], descendants: true, isSignal: true }, { propertyName: "headCom", predicate: XTableHeadComponent, descendants: true, isSignal: true }, { propertyName: "bodyCom", predicate: XTableBodyComponent, descendants: true, isSignal: true }, { propertyName: "footCom", first: true, predicate: XTableFootComponent, descendants: true, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<table\r\n #table\r\n class=\"x-table\"\r\n [ngClass]=\"classMap()\"\r\n [x-loading]=\"loading() && getting()\"\r\n [class.x-table-wrap-border-hidden]=\"hiddenWrapBorder()\"\r\n [class.x-table-scroll-left]=\"getScrollLeft()\"\r\n [class.x-table-scroll-left-max]=\"scrollLeftMax()\"\r\n [class.x-table-scroll-top]=\"getScrollTop()\"\r\n [class.x-table-has-scroll-right]=\"scrollYWidth()\"\r\n [class.x-table-has-scroll-bottom]=\"scrollXWidth()\"\r\n [class.x-table-bordered]=\"bordered()\"\r\n [class.x-table-td-adaption-height]=\"rowHeight() == 0\"\r\n [class.x-table-cell-config]=\"!!cellConfigSignal()\"\r\n>\r\n @if (header()) {\r\n <caption #caption class=\"x-table-header\" [style.height.px]=\"getRowHeight()\" [style.min-height.px]=\"getRowHeight()\">\r\n <ng-container *xOutlet=\"header()\">{{ header() }}</ng-container>\r\n </caption>\r\n }\r\n @if (showHeader() && (headerPosition() === 'top' || headerPosition() === 'top-bottom')) {\r\n <x-table-head\r\n [columns]=\"columns()\"\r\n [rowHeight]=\"rowHeight()\"\r\n [columnTpl]=\"headColumnTpl()\"\r\n [scrollYWidth]=\"scrollYWidth()\"\r\n [scrollXWidth]=\"scrollXWidth()!\"\r\n [cellConfig]=\"cellConfigSignal()?.thead\"\r\n [position]=\"'top'\"\r\n ></x-table-head>\r\n }\r\n <x-table-body\r\n [data]=\"treeTable() ? treeTableData() : tableData()\"\r\n [columns]=\"columns()\"\r\n [itemSize]=\"itemSize()\"\r\n [rowHeight]=\"rowHeight()\"\r\n [bodyHeight]=\"bodyHeight()!\"\r\n [columnTpl]=\"bodyColumnTpl()\"\r\n [allowSelectRow]=\"allowSelectRow()\"\r\n [virtualScroll]=\"virtualScroll()\"\r\n [minBufferPx]=\"minBufferPx()\"\r\n [maxBufferPx]=\"maxBufferPx()\"\r\n [adaptionHeight]=\"adaptionHeight()!\"\r\n [docPercent]=\"docPercent()\"\r\n [scroll]=\"scroll()\"\r\n [rowClass]=\"rowClass()\"\r\n [cellConfig]=\"cellConfigSignal()?.tbody\"\r\n [expandedAll]=\"expandedAll()\"\r\n [expandTpl]=\"expandTpl()\"\r\n [(activatedRow)]=\"activatedRow\"\r\n ></x-table-body>\r\n @if (showHeader() && (headerPosition() === 'bottom' || headerPosition() === 'top-bottom')) {\r\n <x-table-head\r\n [columns]=\"columns()\"\r\n [rowHeight]=\"rowHeight()\"\r\n [columnTpl]=\"headColumnTpl()\"\r\n [scrollYWidth]=\"scrollYWidth()\"\r\n [scrollXWidth]=\"scrollXWidth()!\"\r\n [cellConfig]=\"cellConfigSignal()?.thead\"\r\n [position]=\"'bottom'\"\r\n ></x-table-head>\r\n }\r\n @if (footer()) {\r\n <x-table-foot [footer]=\"footer()\" [rowHeight]=\"rowHeight()\"></x-table-foot>\r\n }\r\n @if (hasStickyTopRight()) {\r\n <div\r\n #stickyTopRightEle\r\n class=\"x-table-sticky-right-scroll\"\r\n [class.x-table-border-bottom]=\"headSearchTpl()\"\r\n [style.top.px]=\"getStickyTopScrollTop()\"\r\n [style.width.px]=\"scrollYWidth()\"\r\n [style.height.px]=\"getRowHeight()\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n ></div>\r\n }\r\n @if (hasStickyTopRight() && headSearchTpl()) {\r\n <div\r\n class=\"x-table-sticky-right-scroll\"\r\n [style.top.px]=\"getStickyTopScrollTop() + getStickyTopRightEleHeight()\"\r\n [style.width.px]=\"scrollYWidth()\"\r\n [style.height.px]=\"getRowHeight()\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n ></div>\r\n }\r\n @if (hasStickyBottomRight()) {\r\n <div\r\n #stickyBottomRightEle\r\n class=\"x-table-sticky-right-scroll\"\r\n [style.bottom.px]=\"getStickyBottomScrollTop()\"\r\n [style.width.px]=\"scrollYWidth()\"\r\n [style.height.px]=\"getRowHeight()\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n ></div>\r\n }\r\n @if (hasStickyBottomRight() && headSearchTpl()) {\r\n <div\r\n class=\"x-table-sticky-right-scroll\"\r\n [class.x-table-border-bottom]=\"headSearchTpl()\"\r\n [style.bottom.px]=\"getStickyBottomScrollTop() + getStickyBottomRightEleHeight()\"\r\n [style.width.px]=\"scrollYWidth()\"\r\n [style.height.px]=\"getRowHeight()\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n ></div>\r\n }\r\n</table>\r\n@if (showPagination() && size()) {\r\n <x-pagination\r\n #pagination\r\n [(index)]=\"index\"\r\n [(size)]=\"size\"\r\n [(query)]=\"query\"\r\n [total]=\"total()\"\r\n (indexChange)=\"pageChange('index')\"\r\n (sizeChange)=\"pageChange('size')\"\r\n [showEllipsis]=\"showEllipsis()\"\r\n [showTotal]=\"showTotal()\"\r\n [space]=\"space()\"\r\n [showBackground]=\"showBackground()\"\r\n [showSize]=\"showSize()\"\r\n [showJump]=\"showJump()\"\r\n [jumpWidth]=\"jumpWidth()\"\r\n [showInputSize]=\"showInputSize()\"\r\n [inputSizeWidth]=\"inputSizeWidth()\"\r\n [sizeData]=\"sizeData()\"\r\n [sizeWidth]=\"sizeWidth()\"\r\n [pageLinkSize]=\"pageLinkSize()\"\r\n [disabled]=\"disabled()\"\r\n [totalTpl]=\"totalTpl()\"\r\n [simple]=\"simple()\"\r\n [simpleIndexWidth]=\"simpleIndexWidth()\"\r\n >\r\n </x-pagination>\r\n}\r\n", styles: [".x-table{margin:0;padding:0;display:flex;flex-direction:column;border-collapse:collapse;width:100%;position:relative}.x-table:not(.x-table-wrap-border-hidden){border:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>thead{position:relative;overflow:hidden;display:block;min-height:42px}.x-table>thead>tr{width:100%;display:flex;min-height:42px}.x-table>thead>tr>th{display:flex;align-items:center;flex:1;position:relative;font-weight:600;background-color:var(--x-background);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>thead>tr>th>a{display:inline-flex;align-items:center;color:var(--x-text-300);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.x-table>thead>tr>th.x-table-sticky{position:sticky;z-index:5}.x-table>thead>tr>th .x-table-drag-width{position:absolute;height:100%;width:.1875rem;right:-.125rem;cursor:ew-resize;transition:background-color var(--x-animation-duration-fast);z-index:1}.x-table>thead>tr>th .x-table-drag-width:hover{background-color:var(--x-primary)}.x-table>thead>tr.cdk-drop-list-dragging>th.cdk-drag-placeholder{background-color:var(--x-background-a200);opacity:.9}.x-table>thead.x-table-head-bottom>tr>th{border-top:var(--x-border-width) var(--x-border-style) var(--x-border);border-bottom:none}.x-table>thead.x-table-head-bottom>tr.x-table-search>th{border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>tbody{display:block;border-top:none;position:relative;min-height:7rem}.x-table>tbody tr{display:flex}.x-table>tbody tr>td{display:flex;align-items:center;position:relative;justify-content:space-between;overflow:hidden;background-color:var(--x-background);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>tbody tr>td>div{flex:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.x-table>tbody tr>td.x-table-sticky{position:sticky;z-index:5}.x-table>tbody tr>td>x-button .x-icon{transition:var(--x-animation-duration-base)}.x-table>tbody tr>td>x-button.is-leaf{visibility:hidden}.x-table>tbody tr>td>x-button.is-expanded .x-icon{transform:rotate(90deg)}.x-table>tbody tr>td.x-table-dragging{background-color:var(--x-background-a200);opacity:.9}.x-table>tbody tr.x-table-activated>td{background-color:var(--x-primary-900)}.x-table>tbody tr:hover:not(.x-table-activated)>td{background-color:var(--x-background-a100)}.x-table>tbody tr:last-child>td{border-bottom:none}.x-table>tbody x-empty{position:absolute;top:0;width:100%;padding:calc(var(--x-font-size) * 2)}.x-table-sort{cursor:pointer;transition:transform .2s}.x-table-sort:hover{color:var(--x-text-300)}.x-table-sort:active{transform:translate(1px,1px)}.x-table-sort-icon.x-icon{margin-left:.25rem;display:none;font-size:1rem;transform:rotate(90deg) rotateY(180deg);transition:.3s}.x-table-sort-icon.x-icon.x-table-icon-up,.x-table-sort-icon.x-icon.x-table-icon-down{display:inherit}.x-table-sort-icon.x-icon.x-table-icon-down{transform:rotate(90deg)}.x-table-scroll-top>thead{box-shadow:var(--x-box-shadow-bottom);z-index:1}.x-table-scroll-left .x-table-sticky-left-last{box-shadow:var(--x-box-shadow-right);border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-td-adaption-height>tbody tr>td{overflow:inherit}.x-table-td-adaption-height>tbody tr>td>div{white-space:inherit;text-overflow:inherit;overflow:inherit}.x-table-bordered>thead>tr>th,.x-table-bordered>tbody tr>td{border-right:var(--x-border-width) var(--x-border-style) var(--x-border);padding-left:calc(var(--x-font-size) / 2)}.x-table-bordered>thead>tr>th:last-child,.x-table-bordered>tbody tr>td:last-child{border-right:none}.x-table-cell-config>thead tr,.x-table-cell-config>tbody tr{display:grid;grid-auto-flow:row;height:100%}.x-table-cell-config>thead>tr>th,.x-table-cell-config>tbody tr>td{border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-cell-config>thead>tr>th:last-child,.x-table-cell-config>tbody tr>td:last-child{border-right:none}.x-table-expand{margin-right:.5rem}.x-table-expandTpl>tr{display:block!important;height:inherit!important}.x-table-header{border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);text-align:left;display:flex;align-items:center}.x-table-footer{display:flex;align-items:center;border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-sticky-right-scroll{position:absolute;right:0;min-height:42px;background-color:var(--x-background);z-index:1}.x-table-has-scroll-right .x-table-footer{border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-has-scroll-bottom:not(.x-table-scroll-left-max) .x-table-sticky-right-first{box-shadow:var(--x-box-shadow-left);border-left:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-border-bottom{border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-border-top{border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-row-size-big>thead>tr>th,.x-table-row-size-big>tbody tr>td{padding:calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4) calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4)}.x-table-row-size-big .x-table-header,.x-table-row-size-big .x-table-footer{padding:calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4) calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4)}.x-table-row-size-large>thead>tr>th,.x-table-row-size-large>tbody tr>td{padding:calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3) calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3)}.x-table-row-size-large .x-table-header,.x-table-row-size-large .x-table-footer{padding:calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3) calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3)}.x-table-row-size-medium>thead>tr>th,.x-table-row-size-medium>tbody tr>td{padding:calc(var(--x-font-size) / 2) var(--x-font-size) calc(var(--x-font-size) / 2) var(--x-font-size)}.x-table-row-size-medium .x-table-header,.x-table-row-size-medium .x-table-footer{padding:calc(var(--x-font-size) / 2) var(--x-font-size) calc(var(--x-font-size) / 2) var(--x-font-size)}.x-table-row-size-small>thead>tr>th,.x-table-row-size-small>tbody tr>td{padding:calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3) calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3)}.x-table-row-size-small .x-table-header,.x-table-row-size-small .x-table-footer{padding:calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3) calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3)}.x-table-row-size-mini>thead>tr>th,.x-table-row-size-mini>tbody tr>td{padding:calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2) calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2)}.x-table-row-size-mini .x-table-header,.x-table-row-size-mini .x-table-footer{padding:calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2) calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2)}x-table{width:100%;display:flex;flex-direction:column}x-table .x-pagination{padding-top:calc(var(--x-font-size) / 2)}x-table.x-table-top-left{flex-direction:column-reverse}x-table.x-table-top-left .x-pagination{padding-top:0;padding-bottom:calc(var(--x-font-size) / 2)}x-table.x-table-top-center{flex-direction:column-reverse;align-items:center}x-table.x-table-top-center .x-pagination{padding-top:0;padding-bottom:calc(var(--x-font-size) / 2)}x-table.x-table-top-right{flex-direction:column-reverse;align-items:flex-end}x-table.x-table-top-right .x-pagination{padding-top:0;padding-bottom:calc(var(--x-font-size) / 2)}x-table.x-table-bottom-center{align-items:center}x-table.x-table-bottom-right{align-items:flex-end}body>.x-table-th{display:block}body>.x-table-th-big{padding:calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4) calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4)}body>.x-table-th-large{padding:calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3) calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3)}body>.x-table-th-medium{padding:calc(var(--x-font-size) / 2) var(--x-font-size) calc(var(--x-font-size) / 2) var(--x-font-size)}body>.x-table-th-small{padding:calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3) calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3)}body>.x-table-th-mini{padding:calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2) calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2)}body>.x-table-th.cdk-drag-preview{display:flex;align-items:center;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-style:dashed;background-color:var(--x-background);opacity:.8;box-shadow:var(--x-box-shadow)}body>.x-table-th.cdk-drag-preview>a{display:inline-flex;align-items:center;color:var(--x-text-300);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}body>.x-table-th.cdk-drag-animating{transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: XLoadingComponent, selector: "x-loading, [x-loading]" }, { kind: "component", type: XTableHeadComponent, selector: "x-table-head" }, { kind: "component", type: XTableFootComponent, selector: "x-table-foot" }, { kind: "component", type: XTableBodyComponent, selector: "x-table-body" }, { kind: "component", type: XPaginationComponent, selector: "x-pagination" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1332
1331
  }
1333
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableComponent, decorators: [{
1332
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableComponent, decorators: [{
1334
1333
  type: Component,
1335
1334
  args: [{ selector: `${XTablePrefix}`, standalone: true, imports: [
1336
1335
  NgClass,
@@ -1340,30 +1339,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
1340
1339
  XTableFootComponent,
1341
1340
  XTableBodyComponent,
1342
1341
  XPaginationComponent
1343
- ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<table\r\n #table\r\n class=\"x-table\"\r\n [ngClass]=\"classMap\"\r\n [x-loading]=\"loading && getting\"\r\n [class.x-table-wrap-border-hidden]=\"hiddenWrapBorder\"\r\n [class.x-table-scroll-left]=\"getScrollLeft\"\r\n [class.x-table-scroll-left-max]=\"scrollLeftMax\"\r\n [class.x-table-scroll-top]=\"getScrollTop\"\r\n [class.x-table-has-scroll-right]=\"scrollYWidth\"\r\n [class.x-table-has-scroll-bottom]=\"scrollXWidth\"\r\n [class.x-table-bordered]=\"bordered\"\r\n [class.x-table-td-adaption-height]=\"rowHeight == 0\"\r\n [class.x-table-cell-config]=\"cellConfig\"\r\n>\r\n @if (header) {\r\n <caption #caption class=\"x-table-header\" [style.height.px]=\"getRowHeight\" [style.min-height.px]=\"getRowHeight\">\r\n <ng-container *xOutlet=\"header\">{{ header }}</ng-container>\r\n </caption>\r\n }\r\n @if (showHeader && (headerPosition === 'top' || headerPosition === 'top-bottom')) {\r\n <x-table-head\r\n [columns]=\"columns\"\r\n [rowHeight]=\"rowHeight\"\r\n [columnTpl]=\"headColumnTpl\"\r\n [scrollYWidth]=\"scrollYWidth\"\r\n [scrollXWidth]=\"scrollXWidth\"\r\n [cellConfig]=\"cellConfig?.thead\"\r\n [position]=\"'top'\"\r\n [table]=\"this\"\r\n ></x-table-head>\r\n }\r\n <x-table-body\r\n [data]=\"treeTable ? treeTableData : tableData\"\r\n [columns]=\"columns\"\r\n [itemSize]=\"itemSize\"\r\n [rowHeight]=\"rowHeight\"\r\n [bodyHeight]=\"bodyHeight\"\r\n [columnTpl]=\"bodyColumnTpl\"\r\n [allowSelectRow]=\"allowSelectRow\"\r\n [virtualScroll]=\"virtualScroll\"\r\n [minBufferPx]=\"minBufferPx\"\r\n [maxBufferPx]=\"maxBufferPx\"\r\n [adaptionHeight]=\"adaptionHeight\"\r\n [docPercent]=\"docPercent\"\r\n [scroll]=\"scroll\"\r\n [rowClass]=\"rowClass\"\r\n [cellConfig]=\"cellConfig?.tbody\"\r\n [expandedAll]=\"expandedAll\"\r\n [expandTpl]=\"expandTpl\"\r\n [(activatedRow)]=\"activatedRow\"\r\n (activatedRowChange)=\"activatedRowChange.emit($event)\"\r\n [table]=\"this\"\r\n ></x-table-body>\r\n @if (showHeader && (headerPosition === 'bottom' || headerPosition === 'top-bottom')) {\r\n <x-table-head\r\n [columns]=\"columns\"\r\n [rowHeight]=\"rowHeight\"\r\n [columnTpl]=\"headColumnTpl\"\r\n [scrollYWidth]=\"scrollYWidth\"\r\n [scrollXWidth]=\"scrollXWidth\"\r\n [cellConfig]=\"cellConfig?.thead\"\r\n [position]=\"'bottom'\"\r\n [table]=\"this\"\r\n ></x-table-head>\r\n }\r\n @if (footer) {\r\n <x-table-foot [table]=\"this\" [footer]=\"footer\" [rowHeight]=\"rowHeight\"></x-table-foot>\r\n }\r\n @if (hasStickyTopRight()) {\r\n <div\r\n #stickyTopRightEle\r\n class=\"x-table-sticky-right-scroll\"\r\n [class.x-table-border-bottom]=\"headSearchTpl\"\r\n [style.top.px]=\"getStickyTopScrollTop\"\r\n [style.width.px]=\"scrollYWidth\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n ></div>\r\n }\r\n @if (hasStickyTopRight() && headSearchTpl) {\r\n <div\r\n class=\"x-table-sticky-right-scroll\"\r\n [style.top.px]=\"getStickyTopScrollTop + getStickyTopRightEleHeight\"\r\n [style.width.px]=\"scrollYWidth\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n ></div>\r\n }\r\n @if (hasStickyBottomRight()) {\r\n <div\r\n #stickyBottomRightEle\r\n class=\"x-table-sticky-right-scroll\"\r\n [style.bottom.px]=\"getStickyBottomScrollTop\"\r\n [style.width.px]=\"scrollYWidth\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n ></div>\r\n }\r\n @if (hasStickyBottomRight() && headSearchTpl) {\r\n <div\r\n class=\"x-table-sticky-right-scroll\"\r\n [class.x-table-border-bottom]=\"headSearchTpl\"\r\n [style.bottom.px]=\"getStickyBottomScrollTop + getStickyBottomRightEleHeight\"\r\n [style.width.px]=\"scrollYWidth\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n ></div>\r\n }\r\n</table>\r\n@if (showPagination && size) {\r\n <x-pagination\r\n #pagination\r\n [(index)]=\"index\"\r\n [(size)]=\"size\"\r\n [(query)]=\"query\"\r\n [total]=\"total\"\r\n (indexChange)=\"pageChange('index')\"\r\n (sizeChange)=\"pageChange('size')\"\r\n [showEllipsis]=\"showEllipsis\"\r\n [showTotal]=\"showTotal\"\r\n [space]=\"space\"\r\n [hiddenBorder]=\"hiddenPaginationBorder!\"\r\n [showSize]=\"showSize\"\r\n [showJump]=\"showJump\"\r\n [jumpWidth]=\"jumpWidth\"\r\n [showInputSize]=\"showInputSize\"\r\n [inputSizeWidth]=\"inputSizeWidth\"\r\n [sizeData]=\"sizeData\"\r\n [sizeWidth]=\"sizeWidth\"\r\n [pageLinkSize]=\"pageLinkSize\"\r\n [disabled]=\"disabled\"\r\n [totalTpl]=\"totalTpl\"\r\n [simple]=\"simple\"\r\n [simpleIndexWidth]=\"simpleIndexWidth\"\r\n >\r\n </x-pagination>\r\n}\r\n", styles: [".x-table{margin:0;padding:0;display:flex;flex-direction:column;border-collapse:collapse;width:100%;position:relative}.x-table:not(.x-table-wrap-border-hidden){border:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>thead{position:relative;overflow:hidden;display:block;background-color:var(--x-background);min-height:42px}.x-table>thead>tr{width:100%;display:flex;min-height:42px}.x-table>thead>tr>th{display:flex;align-items:center;flex:1;position:relative;font-weight:600;background-color:var(--x-background);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>thead>tr>th>a{display:inline-flex;align-items:center;color:var(--x-text-300);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.x-table>thead>tr>th.x-table-sticky{position:sticky;z-index:5}.x-table>thead>tr>th .x-table-drag-width{position:absolute;height:100%;width:.1875rem;right:-.125rem;cursor:ew-resize;transition:background-color var(--x-animation-duration-fast);z-index:1}.x-table>thead>tr>th .x-table-drag-width:hover{background-color:var(--x-primary)}.x-table>thead>tr.cdk-drop-list-dragging>th.cdk-drag-placeholder{background-color:var(--x-background-a200);opacity:.9}.x-table>thead.x-table-head-bottom>tr>th{border-bottom:none}.x-table>thead.x-table-head-bottom>tr.x-table-search>th{border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>tbody{display:block;border-top:none;position:relative;min-height:7rem}.x-table>tbody tr{display:flex}.x-table>tbody tr>td{display:flex;align-items:center;position:relative;justify-content:space-between;overflow:hidden;background-color:var(--x-background);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>tbody tr>td>div{flex:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.x-table>tbody tr>td.x-table-sticky{position:sticky;z-index:5}.x-table>tbody tr>td>x-button .x-icon{transition:var(--x-animation-duration-base)}.x-table>tbody tr>td>x-button.is-leaf{visibility:hidden}.x-table>tbody tr>td>x-button.is-expanded .x-icon{transform:rotate(90deg)}.x-table>tbody tr>td.x-table-dragging{background-color:var(--x-background-a200);opacity:.9}.x-table>tbody tr.x-table-activated>td{background-color:var(--x-background-a400)}.x-table>tbody tr:hover:not(.x-table-activated)>td{background-color:var(--x-background-a200)}.x-table>tbody tr:last-child{border-bottom:none}.x-table>tbody x-empty{position:absolute;top:0;width:100%;padding:calc(var(--x-font-size) * 2)}.x-table-sort{cursor:pointer;transition:transform .2s}.x-table-sort:hover{color:var(--x-text-300)}.x-table-sort:active{transform:translate(1px,1px)}.x-table-sort-icon.x-icon{margin-left:.25rem;display:none;font-size:1rem;transform:rotate(90deg) rotateY(180deg);transition:.3s}.x-table-sort-icon.x-icon.x-table-icon-up,.x-table-sort-icon.x-icon.x-table-icon-down{display:inherit}.x-table-sort-icon.x-icon.x-table-icon-down{transform:rotate(90deg)}.x-table-scroll-top>thead{box-shadow:0 var(--x-box-shadow-light-width) var(--x-box-shadow-light-width) var(--x-box-shadow-light-color);z-index:1}.x-table-scroll-left .x-table-sticky-left-last{box-shadow:var(--x-box-shadow-light-width) var(--x-box-shadow-light-width) var(--x-box-shadow-light-width) var(--x-box-shadow-light-color);border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-td-adaption-height>tbody tr>td{overflow:inherit}.x-table-td-adaption-height>tbody tr>td>div{white-space:inherit;text-overflow:inherit;overflow:inherit}.x-table-bordered>thead>tr>th,.x-table-bordered>tbody tr>td{border-right:var(--x-border-width) var(--x-border-style) var(--x-border);padding-left:calc(var(--x-font-size) / 2)}.x-table-bordered>thead>tr>th:last-child,.x-table-bordered>tbody tr>td:last-child{border-right:none}.x-table-cell-config>thead tr,.x-table-cell-config>tbody tr{display:grid;grid-auto-flow:row;height:100%}.x-table-cell-config>thead>tr>th,.x-table-cell-config>tbody tr>td{border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-cell-config>thead>tr>th:last-child,.x-table-cell-config>tbody tr>td:last-child{border-right:none}.x-table-expand{margin-right:.5rem}.x-table-expandTpl>tr{display:block!important;height:inherit!important}.x-table-header{border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);text-align:left;display:flex;align-items:center}.x-table-footer{display:flex;align-items:center}.x-table-sticky-right-scroll{position:absolute;right:0;min-height:42px;background-color:var(--x-background);z-index:1}.x-table-has-scroll-right .x-table-footer{border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-has-scroll-bottom:not(.x-table-scroll-left-max) .x-table-sticky-right-first{box-shadow:var(--x-box-shadow-light-width-minus) var(--x-box-shadow-light-width) var(--x-box-shadow-light-width) var(--x-box-shadow-light-color);border-left:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-border-bottom{border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-border-top{border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-row-size-big>thead>tr>th,.x-table-row-size-big>tbody tr>td{padding:calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4) calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4)}.x-table-row-size-big .x-table-header,.x-table-row-size-big .x-table-footer{padding:calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4) calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4)}.x-table-row-size-large>thead>tr>th,.x-table-row-size-large>tbody tr>td{padding:calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3) calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3)}.x-table-row-size-large .x-table-header,.x-table-row-size-large .x-table-footer{padding:calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3) calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3)}.x-table-row-size-medium>thead>tr>th,.x-table-row-size-medium>tbody tr>td{padding:calc(var(--x-font-size) / 2) var(--x-font-size) calc(var(--x-font-size) / 2) var(--x-font-size)}.x-table-row-size-medium .x-table-header,.x-table-row-size-medium .x-table-footer{padding:calc(var(--x-font-size) / 2) var(--x-font-size) calc(var(--x-font-size) / 2) var(--x-font-size)}.x-table-row-size-small>thead>tr>th,.x-table-row-size-small>tbody tr>td{padding:calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3) calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3)}.x-table-row-size-small .x-table-header,.x-table-row-size-small .x-table-footer{padding:calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3) calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3)}.x-table-row-size-mini>thead>tr>th,.x-table-row-size-mini>tbody tr>td{padding:calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2) calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2)}.x-table-row-size-mini .x-table-header,.x-table-row-size-mini .x-table-footer{padding:calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2) calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2)}x-table{width:100%;display:flex;flex-direction:column}x-table .x-pagination{padding-top:calc(var(--x-font-size) / 2)}x-table.x-table-top-left{flex-direction:column-reverse}x-table.x-table-top-left .x-pagination{padding-top:0;padding-bottom:calc(var(--x-font-size) / 2)}x-table.x-table-top-center{flex-direction:column-reverse;align-items:center}x-table.x-table-top-center .x-pagination{padding-top:0;padding-bottom:calc(var(--x-font-size) / 2)}x-table.x-table-top-right{flex-direction:column-reverse;align-items:flex-end}x-table.x-table-top-right .x-pagination{padding-top:0;padding-bottom:calc(var(--x-font-size) / 2)}x-table.x-table-bottom-center{align-items:center}x-table.x-table-bottom-right{align-items:flex-end}body>.x-table-th{display:block}body>.x-table-th-big{padding:calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4) calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4)}body>.x-table-th-large{padding:calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3) calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3)}body>.x-table-th-medium{padding:calc(var(--x-font-size) / 2) var(--x-font-size) calc(var(--x-font-size) / 2) var(--x-font-size)}body>.x-table-th-small{padding:calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3) calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3)}body>.x-table-th-mini{padding:calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2) calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2)}body>.x-table-th.cdk-drag-preview{display:flex;align-items:center;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-style:dashed;border-radius:var(--x-border-radius);background-color:var(--x-background);opacity:.8;box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color)}body>.x-table-th.cdk-drag-preview>a{display:inline-flex;align-items:center;color:var(--x-text-300);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}body>.x-table-th.cdk-drag-animating{transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}\n"] }]
1344
- }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$1.XConfigService }], propDecorators: { table: [{
1345
- type: ViewChild,
1346
- args: ['table']
1347
- }], caption: [{
1348
- type: ViewChild,
1349
- args: ['caption']
1350
- }], pagination: [{
1351
- type: ViewChild,
1352
- args: ['pagination']
1353
- }], stickyTopRightEle: [{
1354
- type: ViewChild,
1355
- args: ['stickyTopRightEle']
1356
- }], stickyBottomRightEle: [{
1357
- type: ViewChild,
1358
- args: ['stickyBottomRightEle']
1359
- }] } });
1342
+ ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<table\r\n #table\r\n class=\"x-table\"\r\n [ngClass]=\"classMap()\"\r\n [x-loading]=\"loading() && getting()\"\r\n [class.x-table-wrap-border-hidden]=\"hiddenWrapBorder()\"\r\n [class.x-table-scroll-left]=\"getScrollLeft()\"\r\n [class.x-table-scroll-left-max]=\"scrollLeftMax()\"\r\n [class.x-table-scroll-top]=\"getScrollTop()\"\r\n [class.x-table-has-scroll-right]=\"scrollYWidth()\"\r\n [class.x-table-has-scroll-bottom]=\"scrollXWidth()\"\r\n [class.x-table-bordered]=\"bordered()\"\r\n [class.x-table-td-adaption-height]=\"rowHeight() == 0\"\r\n [class.x-table-cell-config]=\"!!cellConfigSignal()\"\r\n>\r\n @if (header()) {\r\n <caption #caption class=\"x-table-header\" [style.height.px]=\"getRowHeight()\" [style.min-height.px]=\"getRowHeight()\">\r\n <ng-container *xOutlet=\"header()\">{{ header() }}</ng-container>\r\n </caption>\r\n }\r\n @if (showHeader() && (headerPosition() === 'top' || headerPosition() === 'top-bottom')) {\r\n <x-table-head\r\n [columns]=\"columns()\"\r\n [rowHeight]=\"rowHeight()\"\r\n [columnTpl]=\"headColumnTpl()\"\r\n [scrollYWidth]=\"scrollYWidth()\"\r\n [scrollXWidth]=\"scrollXWidth()!\"\r\n [cellConfig]=\"cellConfigSignal()?.thead\"\r\n [position]=\"'top'\"\r\n ></x-table-head>\r\n }\r\n <x-table-body\r\n [data]=\"treeTable() ? treeTableData() : tableData()\"\r\n [columns]=\"columns()\"\r\n [itemSize]=\"itemSize()\"\r\n [rowHeight]=\"rowHeight()\"\r\n [bodyHeight]=\"bodyHeight()!\"\r\n [columnTpl]=\"bodyColumnTpl()\"\r\n [allowSelectRow]=\"allowSelectRow()\"\r\n [virtualScroll]=\"virtualScroll()\"\r\n [minBufferPx]=\"minBufferPx()\"\r\n [maxBufferPx]=\"maxBufferPx()\"\r\n [adaptionHeight]=\"adaptionHeight()!\"\r\n [docPercent]=\"docPercent()\"\r\n [scroll]=\"scroll()\"\r\n [rowClass]=\"rowClass()\"\r\n [cellConfig]=\"cellConfigSignal()?.tbody\"\r\n [expandedAll]=\"expandedAll()\"\r\n [expandTpl]=\"expandTpl()\"\r\n [(activatedRow)]=\"activatedRow\"\r\n ></x-table-body>\r\n @if (showHeader() && (headerPosition() === 'bottom' || headerPosition() === 'top-bottom')) {\r\n <x-table-head\r\n [columns]=\"columns()\"\r\n [rowHeight]=\"rowHeight()\"\r\n [columnTpl]=\"headColumnTpl()\"\r\n [scrollYWidth]=\"scrollYWidth()\"\r\n [scrollXWidth]=\"scrollXWidth()!\"\r\n [cellConfig]=\"cellConfigSignal()?.thead\"\r\n [position]=\"'bottom'\"\r\n ></x-table-head>\r\n }\r\n @if (footer()) {\r\n <x-table-foot [footer]=\"footer()\" [rowHeight]=\"rowHeight()\"></x-table-foot>\r\n }\r\n @if (hasStickyTopRight()) {\r\n <div\r\n #stickyTopRightEle\r\n class=\"x-table-sticky-right-scroll\"\r\n [class.x-table-border-bottom]=\"headSearchTpl()\"\r\n [style.top.px]=\"getStickyTopScrollTop()\"\r\n [style.width.px]=\"scrollYWidth()\"\r\n [style.height.px]=\"getRowHeight()\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n ></div>\r\n }\r\n @if (hasStickyTopRight() && headSearchTpl()) {\r\n <div\r\n class=\"x-table-sticky-right-scroll\"\r\n [style.top.px]=\"getStickyTopScrollTop() + getStickyTopRightEleHeight()\"\r\n [style.width.px]=\"scrollYWidth()\"\r\n [style.height.px]=\"getRowHeight()\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n ></div>\r\n }\r\n @if (hasStickyBottomRight()) {\r\n <div\r\n #stickyBottomRightEle\r\n class=\"x-table-sticky-right-scroll\"\r\n [style.bottom.px]=\"getStickyBottomScrollTop()\"\r\n [style.width.px]=\"scrollYWidth()\"\r\n [style.height.px]=\"getRowHeight()\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n ></div>\r\n }\r\n @if (hasStickyBottomRight() && headSearchTpl()) {\r\n <div\r\n class=\"x-table-sticky-right-scroll\"\r\n [class.x-table-border-bottom]=\"headSearchTpl()\"\r\n [style.bottom.px]=\"getStickyBottomScrollTop() + getStickyBottomRightEleHeight()\"\r\n [style.width.px]=\"scrollYWidth()\"\r\n [style.height.px]=\"getRowHeight()\"\r\n [style.min-height.px]=\"getRowHeight()\"\r\n ></div>\r\n }\r\n</table>\r\n@if (showPagination() && size()) {\r\n <x-pagination\r\n #pagination\r\n [(index)]=\"index\"\r\n [(size)]=\"size\"\r\n [(query)]=\"query\"\r\n [total]=\"total()\"\r\n (indexChange)=\"pageChange('index')\"\r\n (sizeChange)=\"pageChange('size')\"\r\n [showEllipsis]=\"showEllipsis()\"\r\n [showTotal]=\"showTotal()\"\r\n [space]=\"space()\"\r\n [showBackground]=\"showBackground()\"\r\n [showSize]=\"showSize()\"\r\n [showJump]=\"showJump()\"\r\n [jumpWidth]=\"jumpWidth()\"\r\n [showInputSize]=\"showInputSize()\"\r\n [inputSizeWidth]=\"inputSizeWidth()\"\r\n [sizeData]=\"sizeData()\"\r\n [sizeWidth]=\"sizeWidth()\"\r\n [pageLinkSize]=\"pageLinkSize()\"\r\n [disabled]=\"disabled()\"\r\n [totalTpl]=\"totalTpl()\"\r\n [simple]=\"simple()\"\r\n [simpleIndexWidth]=\"simpleIndexWidth()\"\r\n >\r\n </x-pagination>\r\n}\r\n", styles: [".x-table{margin:0;padding:0;display:flex;flex-direction:column;border-collapse:collapse;width:100%;position:relative}.x-table:not(.x-table-wrap-border-hidden){border:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>thead{position:relative;overflow:hidden;display:block;min-height:42px}.x-table>thead>tr{width:100%;display:flex;min-height:42px}.x-table>thead>tr>th{display:flex;align-items:center;flex:1;position:relative;font-weight:600;background-color:var(--x-background);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>thead>tr>th>a{display:inline-flex;align-items:center;color:var(--x-text-300);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.x-table>thead>tr>th.x-table-sticky{position:sticky;z-index:5}.x-table>thead>tr>th .x-table-drag-width{position:absolute;height:100%;width:.1875rem;right:-.125rem;cursor:ew-resize;transition:background-color var(--x-animation-duration-fast);z-index:1}.x-table>thead>tr>th .x-table-drag-width:hover{background-color:var(--x-primary)}.x-table>thead>tr.cdk-drop-list-dragging>th.cdk-drag-placeholder{background-color:var(--x-background-a200);opacity:.9}.x-table>thead.x-table-head-bottom>tr>th{border-top:var(--x-border-width) var(--x-border-style) var(--x-border);border-bottom:none}.x-table>thead.x-table-head-bottom>tr.x-table-search>th{border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>tbody{display:block;border-top:none;position:relative;min-height:7rem}.x-table>tbody tr{display:flex}.x-table>tbody tr>td{display:flex;align-items:center;position:relative;justify-content:space-between;overflow:hidden;background-color:var(--x-background);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table>tbody tr>td>div{flex:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.x-table>tbody tr>td.x-table-sticky{position:sticky;z-index:5}.x-table>tbody tr>td>x-button .x-icon{transition:var(--x-animation-duration-base)}.x-table>tbody tr>td>x-button.is-leaf{visibility:hidden}.x-table>tbody tr>td>x-button.is-expanded .x-icon{transform:rotate(90deg)}.x-table>tbody tr>td.x-table-dragging{background-color:var(--x-background-a200);opacity:.9}.x-table>tbody tr.x-table-activated>td{background-color:var(--x-primary-900)}.x-table>tbody tr:hover:not(.x-table-activated)>td{background-color:var(--x-background-a100)}.x-table>tbody tr:last-child>td{border-bottom:none}.x-table>tbody x-empty{position:absolute;top:0;width:100%;padding:calc(var(--x-font-size) * 2)}.x-table-sort{cursor:pointer;transition:transform .2s}.x-table-sort:hover{color:var(--x-text-300)}.x-table-sort:active{transform:translate(1px,1px)}.x-table-sort-icon.x-icon{margin-left:.25rem;display:none;font-size:1rem;transform:rotate(90deg) rotateY(180deg);transition:.3s}.x-table-sort-icon.x-icon.x-table-icon-up,.x-table-sort-icon.x-icon.x-table-icon-down{display:inherit}.x-table-sort-icon.x-icon.x-table-icon-down{transform:rotate(90deg)}.x-table-scroll-top>thead{box-shadow:var(--x-box-shadow-bottom);z-index:1}.x-table-scroll-left .x-table-sticky-left-last{box-shadow:var(--x-box-shadow-right);border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-td-adaption-height>tbody tr>td{overflow:inherit}.x-table-td-adaption-height>tbody tr>td>div{white-space:inherit;text-overflow:inherit;overflow:inherit}.x-table-bordered>thead>tr>th,.x-table-bordered>tbody tr>td{border-right:var(--x-border-width) var(--x-border-style) var(--x-border);padding-left:calc(var(--x-font-size) / 2)}.x-table-bordered>thead>tr>th:last-child,.x-table-bordered>tbody tr>td:last-child{border-right:none}.x-table-cell-config>thead tr,.x-table-cell-config>tbody tr{display:grid;grid-auto-flow:row;height:100%}.x-table-cell-config>thead>tr>th,.x-table-cell-config>tbody tr>td{border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-cell-config>thead>tr>th:last-child,.x-table-cell-config>tbody tr>td:last-child{border-right:none}.x-table-expand{margin-right:.5rem}.x-table-expandTpl>tr{display:block!important;height:inherit!important}.x-table-header{border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);text-align:left;display:flex;align-items:center}.x-table-footer{display:flex;align-items:center;border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-sticky-right-scroll{position:absolute;right:0;min-height:42px;background-color:var(--x-background);z-index:1}.x-table-has-scroll-right .x-table-footer{border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-has-scroll-bottom:not(.x-table-scroll-left-max) .x-table-sticky-right-first{box-shadow:var(--x-box-shadow-left);border-left:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-border-bottom{border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-border-top{border-top:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-row-size-big>thead>tr>th,.x-table-row-size-big>tbody tr>td{padding:calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4) calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4)}.x-table-row-size-big .x-table-header,.x-table-row-size-big .x-table-footer{padding:calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4) calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4)}.x-table-row-size-large>thead>tr>th,.x-table-row-size-large>tbody tr>td{padding:calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3) calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3)}.x-table-row-size-large .x-table-header,.x-table-row-size-large .x-table-footer{padding:calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3) calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3)}.x-table-row-size-medium>thead>tr>th,.x-table-row-size-medium>tbody tr>td{padding:calc(var(--x-font-size) / 2) var(--x-font-size) calc(var(--x-font-size) / 2) var(--x-font-size)}.x-table-row-size-medium .x-table-header,.x-table-row-size-medium .x-table-footer{padding:calc(var(--x-font-size) / 2) var(--x-font-size) calc(var(--x-font-size) / 2) var(--x-font-size)}.x-table-row-size-small>thead>tr>th,.x-table-row-size-small>tbody tr>td{padding:calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3) calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3)}.x-table-row-size-small .x-table-header,.x-table-row-size-small .x-table-footer{padding:calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3) calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3)}.x-table-row-size-mini>thead>tr>th,.x-table-row-size-mini>tbody tr>td{padding:calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2) calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2)}.x-table-row-size-mini .x-table-header,.x-table-row-size-mini .x-table-footer{padding:calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2) calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2)}x-table{width:100%;display:flex;flex-direction:column}x-table .x-pagination{padding-top:calc(var(--x-font-size) / 2)}x-table.x-table-top-left{flex-direction:column-reverse}x-table.x-table-top-left .x-pagination{padding-top:0;padding-bottom:calc(var(--x-font-size) / 2)}x-table.x-table-top-center{flex-direction:column-reverse;align-items:center}x-table.x-table-top-center .x-pagination{padding-top:0;padding-bottom:calc(var(--x-font-size) / 2)}x-table.x-table-top-right{flex-direction:column-reverse;align-items:flex-end}x-table.x-table-top-right .x-pagination{padding-top:0;padding-bottom:calc(var(--x-font-size) / 2)}x-table.x-table-bottom-center{align-items:center}x-table.x-table-bottom-right{align-items:flex-end}body>.x-table-th{display:block}body>.x-table-th-big{padding:calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4) calc(var(--x-font-size) / 5 * 4) calc(var(--x-font-size) * 5 / 4)}body>.x-table-th-large{padding:calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3) calc(var(--x-font-size) / 4 * 3) calc(var(--x-font-size) * 4 / 3)}body>.x-table-th-medium{padding:calc(var(--x-font-size) / 2) var(--x-font-size) calc(var(--x-font-size) / 2) var(--x-font-size)}body>.x-table-th-small{padding:calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3) calc(var(--x-font-size) / 3) calc(var(--x-font-size) * 2 / 3)}body>.x-table-th-mini{padding:calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2) calc(var(--x-font-size) / 4) calc(var(--x-font-size) / 2)}body>.x-table-th.cdk-drag-preview{display:flex;align-items:center;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-style:dashed;background-color:var(--x-background);opacity:.8;box-shadow:var(--x-box-shadow)}body>.x-table-th.cdk-drag-preview>a{display:inline-flex;align-items:center;color:var(--x-text-300);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}body>.x-table-th.cdk-drag-animating{transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}\n"] }]
1343
+ }] });
1360
1344
 
1361
1345
  class XTableModule {
1362
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1363
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.0", ngImport: i0, type: XTableModule, imports: [XTableComponent, XTableHeadComponent, XTableBodyComponent, XTableFootComponent], exports: [XTableComponent] }); }
1364
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableModule, imports: [XTableComponent, XTableHeadComponent, XTableBodyComponent] }); }
1346
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1347
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: XTableModule, imports: [XTableComponent, XTableHeadComponent, XTableBodyComponent, XTableFootComponent], exports: [XTableComponent] }); }
1348
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableModule, imports: [XTableComponent, XTableHeadComponent, XTableBodyComponent] }); }
1365
1349
  }
1366
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: XTableModule, decorators: [{
1350
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: XTableModule, decorators: [{
1367
1351
  type: NgModule,
1368
1352
  args: [{
1369
1353
  exports: [XTableComponent],