@taiga-ui/addon-table 2.59.1 → 3.0.0-rc.1

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 (284) hide show
  1. package/bundles/taiga-ui-addon-table-components-reorder.umd.js +422 -297
  2. package/bundles/taiga-ui-addon-table-components-reorder.umd.js.map +1 -1
  3. package/bundles/taiga-ui-addon-table-components-table-pagination.umd.js +445 -314
  4. package/bundles/taiga-ui-addon-table-components-table-pagination.umd.js.map +1 -1
  5. package/bundles/taiga-ui-addon-table-components-table.umd.js +863 -659
  6. package/bundles/taiga-ui-addon-table-components-table.umd.js.map +1 -1
  7. package/bundles/taiga-ui-addon-table-components.umd.js +11 -25
  8. package/bundles/taiga-ui-addon-table-components.umd.js.map +1 -1
  9. package/bundles/taiga-ui-addon-table-directives-table-filters.umd.js +453 -320
  10. package/bundles/taiga-ui-addon-table-directives-table-filters.umd.js.map +1 -1
  11. package/bundles/taiga-ui-addon-table-directives.umd.js +5 -7
  12. package/bundles/taiga-ui-addon-table-directives.umd.js.map +1 -1
  13. package/bundles/taiga-ui-addon-table-interfaces.umd.js +2 -2
  14. package/bundles/taiga-ui-addon-table-interfaces.umd.js.map +1 -1
  15. package/bundles/taiga-ui-addon-table-tokens.umd.js +9 -5
  16. package/bundles/taiga-ui-addon-table-tokens.umd.js.map +1 -1
  17. package/bundles/taiga-ui-addon-table-types.umd.js +2 -2
  18. package/bundles/taiga-ui-addon-table-types.umd.js.map +1 -1
  19. package/bundles/taiga-ui-addon-table-utils.umd.js +9 -11
  20. package/bundles/taiga-ui-addon-table-utils.umd.js.map +1 -1
  21. package/bundles/taiga-ui-addon-table.umd.js +19 -21
  22. package/bundles/taiga-ui-addon-table.umd.js.map +1 -1
  23. package/components/index.d.ts +0 -1
  24. package/components/package.json +2 -5
  25. package/components/reorder/package.json +2 -5
  26. package/components/reorder/reorder.component.d.ts +3 -0
  27. package/components/reorder/reorder.module.d.ts +9 -0
  28. package/components/reorder/taiga-ui-addon-table-components-reorder.d.ts +1 -0
  29. package/components/table/directives/cell.directive.d.ts +3 -0
  30. package/components/table/directives/head.directive.d.ts +3 -0
  31. package/components/table/directives/resized.directive.d.ts +3 -0
  32. package/components/table/directives/row.directive.d.ts +3 -0
  33. package/components/table/directives/sort-by.directive.d.ts +3 -0
  34. package/components/table/directives/sortable.directive.d.ts +3 -0
  35. package/components/table/directives/table.directive.d.ts +5 -2
  36. package/components/table/directives/thead.directive.d.ts +3 -0
  37. package/components/table/package.json +2 -5
  38. package/components/table/pipes/table-sort.pipe.d.ts +3 -0
  39. package/components/table/providers/stuck.provider.d.ts +1 -3
  40. package/components/table/providers/table.provider.d.ts +0 -2
  41. package/components/table/providers/table.providers.d.ts +0 -6
  42. package/components/table/table.module.d.ts +22 -0
  43. package/components/table/taiga-ui-addon-table-components-table.d.ts +1 -0
  44. package/components/table/tbody/tbody.component.d.ts +3 -0
  45. package/components/table/td/td.component.d.ts +3 -0
  46. package/components/table/th/th.component.d.ts +3 -0
  47. package/components/table/th-group/th-group.component.d.ts +3 -0
  48. package/components/table/tr/tr.component.d.ts +3 -0
  49. package/components/table-pagination/package.json +2 -5
  50. package/components/table-pagination/table-pagination.component.d.ts +3 -0
  51. package/components/table-pagination/table-pagination.module.d.ts +8 -0
  52. package/components/table-pagination/taiga-ui-addon-table-components-table-pagination.d.ts +1 -0
  53. package/components/taiga-ui-addon-table-components.d.ts +1 -0
  54. package/directives/package.json +2 -5
  55. package/directives/table-filters/generic-filter.directive.d.ts +3 -0
  56. package/directives/table-filters/package.json +2 -5
  57. package/directives/table-filters/table-filter.directive.d.ts +3 -0
  58. package/directives/table-filters/table-filters.directive.d.ts +3 -0
  59. package/directives/table-filters/table-filters.module.d.ts +8 -0
  60. package/directives/table-filters/table-filters.pipe.d.ts +3 -0
  61. package/directives/table-filters/taiga-ui-addon-table-directives-table-filters.d.ts +1 -0
  62. package/directives/taiga-ui-addon-table-directives.d.ts +1 -0
  63. package/esm2015/components/index.js +1 -2
  64. package/esm2015/components/reorder/index.js +1 -1
  65. package/esm2015/components/reorder/reorder.component.js +34 -28
  66. package/esm2015/components/reorder/reorder.module.js +26 -13
  67. package/esm2015/components/reorder/taiga-ui-addon-table-components-reorder.js +1 -1
  68. package/esm2015/components/table/directives/cell.directive.js +18 -15
  69. package/esm2015/components/table/directives/head.directive.js +17 -17
  70. package/esm2015/components/table/directives/resized.directive.js +26 -25
  71. package/esm2015/components/table/directives/row.directive.js +18 -15
  72. package/esm2015/components/table/directives/sort-by.directive.js +26 -23
  73. package/esm2015/components/table/directives/sortable.directive.js +24 -18
  74. package/esm2015/components/table/directives/table.directive.js +48 -39
  75. package/esm2015/components/table/directives/thead.directive.js +33 -25
  76. package/esm2015/components/table/index.js +1 -1
  77. package/esm2015/components/table/pipes/table-sort.pipe.js +18 -15
  78. package/esm2015/components/table/providers/stuck.provider.js +6 -8
  79. package/esm2015/components/table/providers/table.provider.js +3 -5
  80. package/esm2015/components/table/providers/table.providers.js +7 -15
  81. package/esm2015/components/table/table.module.js +69 -41
  82. package/esm2015/components/table/taiga-ui-addon-table-components-table.js +1 -1
  83. package/esm2015/components/table/tbody/tbody.component.js +43 -32
  84. package/esm2015/components/table/td/td.component.js +23 -17
  85. package/esm2015/components/table/th/th.component.js +56 -36
  86. package/esm2015/components/table/th-group/th-group.component.js +27 -23
  87. package/esm2015/components/table/tr/tr.component.js +28 -22
  88. package/esm2015/components/table-pagination/index.js +1 -1
  89. package/esm2015/components/table-pagination/table-pagination-options.js +1 -1
  90. package/esm2015/components/table-pagination/table-pagination.component.js +40 -32
  91. package/esm2015/components/table-pagination/table-pagination.module.js +30 -13
  92. package/esm2015/components/table-pagination/taiga-ui-addon-table-components-table-pagination.js +1 -1
  93. package/esm2015/components/taiga-ui-addon-table-components.js +1 -1
  94. package/esm2015/directives/index.js +1 -1
  95. package/esm2015/directives/table-filters/abstract-table-filter.js +1 -1
  96. package/esm2015/directives/table-filters/generic-filter.directive.js +25 -20
  97. package/esm2015/directives/table-filters/index.js +2 -1
  98. package/esm2015/directives/table-filters/table-filter.directive.js +32 -24
  99. package/esm2015/directives/table-filters/table-filter.js +2 -1
  100. package/esm2015/directives/table-filters/table-filters.directive.js +12 -10
  101. package/esm2015/directives/table-filters/table-filters.module.js +30 -21
  102. package/esm2015/directives/table-filters/table-filters.pipe.js +16 -14
  103. package/esm2015/directives/table-filters/taiga-ui-addon-table-directives-table-filters.js +1 -1
  104. package/esm2015/directives/taiga-ui-addon-table-directives.js +1 -1
  105. package/esm2015/index.js +2 -1
  106. package/esm2015/interfaces/index.js +2 -1
  107. package/esm2015/interfaces/row-context.js +2 -1
  108. package/esm2015/interfaces/taiga-ui-addon-table-interfaces.js +2 -1
  109. package/esm2015/taiga-ui-addon-table.js +1 -1
  110. package/esm2015/tokens/i18n.js +4 -4
  111. package/esm2015/tokens/index.js +1 -1
  112. package/esm2015/tokens/taiga-ui-addon-table-tokens.js +1 -1
  113. package/esm2015/types/comparator.js +2 -1
  114. package/esm2015/types/index.js +2 -1
  115. package/esm2015/types/taiga-ui-addon-table-types.js +2 -1
  116. package/esm2015/utils/default-sort.js +4 -9
  117. package/esm2015/utils/index.js +1 -1
  118. package/esm2015/utils/taiga-ui-addon-table-utils.js +1 -1
  119. package/fesm2015/taiga-ui-addon-table-components-reorder.js +59 -38
  120. package/fesm2015/taiga-ui-addon-table-components-reorder.js.map +1 -1
  121. package/fesm2015/taiga-ui-addon-table-components-table-pagination.js +68 -41
  122. package/fesm2015/taiga-ui-addon-table-components-table-pagination.js.map +1 -1
  123. package/fesm2015/taiga-ui-addon-table-components-table.js +436 -347
  124. package/fesm2015/taiga-ui-addon-table-components-table.js.map +1 -1
  125. package/fesm2015/taiga-ui-addon-table-components.js +0 -1
  126. package/fesm2015/taiga-ui-addon-table-components.js.map +1 -1
  127. package/fesm2015/taiga-ui-addon-table-directives-table-filters.js +104 -76
  128. package/fesm2015/taiga-ui-addon-table-directives-table-filters.js.map +1 -1
  129. package/fesm2015/taiga-ui-addon-table-directives.js.map +1 -1
  130. package/fesm2015/taiga-ui-addon-table-interfaces.js.map +1 -1
  131. package/fesm2015/taiga-ui-addon-table-tokens.js +3 -3
  132. package/fesm2015/taiga-ui-addon-table-tokens.js.map +1 -1
  133. package/fesm2015/taiga-ui-addon-table-types.js.map +1 -1
  134. package/fesm2015/taiga-ui-addon-table-utils.js +4 -9
  135. package/fesm2015/taiga-ui-addon-table-utils.js.map +1 -1
  136. package/fesm2015/taiga-ui-addon-table.js +1 -0
  137. package/fesm2015/taiga-ui-addon-table.js.map +1 -1
  138. package/interfaces/package.json +2 -5
  139. package/interfaces/taiga-ui-addon-table-interfaces.d.ts +1 -0
  140. package/package.json +12 -15
  141. package/taiga-ui-addon-table.d.ts +1 -0
  142. package/tokens/package.json +2 -5
  143. package/tokens/taiga-ui-addon-table-tokens.d.ts +1 -0
  144. package/types/package.json +2 -5
  145. package/types/taiga-ui-addon-table-types.d.ts +1 -0
  146. package/utils/default-sort.d.ts +1 -5
  147. package/utils/package.json +2 -5
  148. package/utils/taiga-ui-addon-table-utils.d.ts +1 -0
  149. package/bundles/taiga-ui-addon-table-components-reorder.umd.min.js +0 -2
  150. package/bundles/taiga-ui-addon-table-components-reorder.umd.min.js.map +0 -1
  151. package/bundles/taiga-ui-addon-table-components-resizable-column.umd.js +0 -338
  152. package/bundles/taiga-ui-addon-table-components-resizable-column.umd.js.map +0 -1
  153. package/bundles/taiga-ui-addon-table-components-resizable-column.umd.min.js +0 -2
  154. package/bundles/taiga-ui-addon-table-components-resizable-column.umd.min.js.map +0 -1
  155. package/bundles/taiga-ui-addon-table-components-table-pagination.umd.min.js +0 -2
  156. package/bundles/taiga-ui-addon-table-components-table-pagination.umd.min.js.map +0 -1
  157. package/bundles/taiga-ui-addon-table-components-table.umd.min.js +0 -2
  158. package/bundles/taiga-ui-addon-table-components-table.umd.min.js.map +0 -1
  159. package/bundles/taiga-ui-addon-table-components.umd.min.js +0 -2
  160. package/bundles/taiga-ui-addon-table-components.umd.min.js.map +0 -1
  161. package/bundles/taiga-ui-addon-table-directives-table-filters.umd.min.js +0 -2
  162. package/bundles/taiga-ui-addon-table-directives-table-filters.umd.min.js.map +0 -1
  163. package/bundles/taiga-ui-addon-table-directives.umd.min.js +0 -2
  164. package/bundles/taiga-ui-addon-table-directives.umd.min.js.map +0 -1
  165. package/bundles/taiga-ui-addon-table-interfaces.umd.min.js +0 -2
  166. package/bundles/taiga-ui-addon-table-interfaces.umd.min.js.map +0 -1
  167. package/bundles/taiga-ui-addon-table-tokens.umd.min.js +0 -2
  168. package/bundles/taiga-ui-addon-table-tokens.umd.min.js.map +0 -1
  169. package/bundles/taiga-ui-addon-table-types.umd.min.js +0 -2
  170. package/bundles/taiga-ui-addon-table-types.umd.min.js.map +0 -1
  171. package/bundles/taiga-ui-addon-table-utils.umd.min.js +0 -2
  172. package/bundles/taiga-ui-addon-table-utils.umd.min.js.map +0 -1
  173. package/bundles/taiga-ui-addon-table.umd.min.js +0 -2
  174. package/bundles/taiga-ui-addon-table.umd.min.js.map +0 -1
  175. package/components/reorder/taiga-ui-addon-table-components-reorder.metadata.json +0 -1
  176. package/components/resizable-column/index.d.ts +0 -3
  177. package/components/resizable-column/package.json +0 -13
  178. package/components/resizable-column/resizable-column.component.d.ts +0 -5
  179. package/components/resizable-column/resizable-column.directive.d.ts +0 -9
  180. package/components/resizable-column/resizable-column.module.d.ts +0 -3
  181. package/components/resizable-column/taiga-ui-addon-table-components-resizable-column.d.ts +0 -4
  182. package/components/resizable-column/taiga-ui-addon-table-components-resizable-column.metadata.json +0 -1
  183. package/components/table/taiga-ui-addon-table-components-table.metadata.json +0 -1
  184. package/components/table-pagination/taiga-ui-addon-table-components-table-pagination.metadata.json +0 -1
  185. package/components/taiga-ui-addon-table-components.metadata.json +0 -1
  186. package/directives/table-filters/taiga-ui-addon-table-directives-table-filters.metadata.json +0 -1
  187. package/directives/taiga-ui-addon-table-directives.metadata.json +0 -1
  188. package/esm2015/components/resizable-column/index.js +0 -4
  189. package/esm2015/components/resizable-column/resizable-column.component.js +0 -30
  190. package/esm2015/components/resizable-column/resizable-column.directive.js +0 -37
  191. package/esm2015/components/resizable-column/resizable-column.module.js +0 -15
  192. package/esm2015/components/resizable-column/taiga-ui-addon-table-components-resizable-column.js +0 -5
  193. package/esm5/components/index.js +0 -5
  194. package/esm5/components/reorder/index.js +0 -3
  195. package/esm5/components/reorder/reorder.component.js +0 -72
  196. package/esm5/components/reorder/reorder.module.js +0 -27
  197. package/esm5/components/reorder/taiga-ui-addon-table-components-reorder.js +0 -5
  198. package/esm5/components/resizable-column/index.js +0 -4
  199. package/esm5/components/resizable-column/resizable-column.component.js +0 -31
  200. package/esm5/components/resizable-column/resizable-column.directive.js +0 -42
  201. package/esm5/components/resizable-column/resizable-column.module.js +0 -18
  202. package/esm5/components/resizable-column/taiga-ui-addon-table-components-resizable-column.js +0 -5
  203. package/esm5/components/table/directives/cell.directive.js +0 -25
  204. package/esm5/components/table/directives/head.directive.js +0 -22
  205. package/esm5/components/table/directives/resized.directive.js +0 -41
  206. package/esm5/components/table/directives/row.directive.js +0 -28
  207. package/esm5/components/table/directives/sort-by.directive.js +0 -41
  208. package/esm5/components/table/directives/sortable.directive.js +0 -52
  209. package/esm5/components/table/directives/table.directive.js +0 -88
  210. package/esm5/components/table/directives/thead.directive.js +0 -33
  211. package/esm5/components/table/index.js +0 -19
  212. package/esm5/components/table/pipes/table-sort.pipe.js +0 -31
  213. package/esm5/components/table/providers/stuck.provider.js +0 -21
  214. package/esm5/components/table/providers/table.provider.js +0 -17
  215. package/esm5/components/table/providers/table.providers.js +0 -48
  216. package/esm5/components/table/table.module.js +0 -63
  217. package/esm5/components/table/taiga-ui-addon-table-components-table.js +0 -5
  218. package/esm5/components/table/tbody/tbody.component.js +0 -70
  219. package/esm5/components/table/td/td.component.js +0 -22
  220. package/esm5/components/table/th/th.component.js +0 -88
  221. package/esm5/components/table/th-group/th-group.component.js +0 -42
  222. package/esm5/components/table/tr/tr.component.js +0 -45
  223. package/esm5/components/table-pagination/index.js +0 -4
  224. package/esm5/components/table-pagination/table-pagination-options.js +0 -17
  225. package/esm5/components/table-pagination/table-pagination.component.js +0 -113
  226. package/esm5/components/table-pagination/table-pagination.module.js +0 -28
  227. package/esm5/components/table-pagination/taiga-ui-addon-table-components-table-pagination.js +0 -5
  228. package/esm5/components/taiga-ui-addon-table-components.js +0 -5
  229. package/esm5/directives/index.js +0 -2
  230. package/esm5/directives/table-filters/abstract-table-filter.js +0 -7
  231. package/esm5/directives/table-filters/generic-filter.directive.js +0 -34
  232. package/esm5/directives/table-filters/index.js +0 -7
  233. package/esm5/directives/table-filters/table-filter.directive.js +0 -59
  234. package/esm5/directives/table-filters/table-filter.js +0 -1
  235. package/esm5/directives/table-filters/table-filters.directive.js +0 -39
  236. package/esm5/directives/table-filters/table-filters.module.js +0 -29
  237. package/esm5/directives/table-filters/table-filters.pipe.js +0 -23
  238. package/esm5/directives/table-filters/taiga-ui-addon-table-directives-table-filters.js +0 -5
  239. package/esm5/directives/taiga-ui-addon-table-directives.js +0 -5
  240. package/esm5/index.js +0 -5
  241. package/esm5/interfaces/index.js +0 -1
  242. package/esm5/interfaces/row-context.js +0 -1
  243. package/esm5/interfaces/taiga-ui-addon-table-interfaces.js +0 -4
  244. package/esm5/taiga-ui-addon-table.js +0 -5
  245. package/esm5/tokens/i18n.js +0 -9
  246. package/esm5/tokens/index.js +0 -2
  247. package/esm5/tokens/taiga-ui-addon-table-tokens.js +0 -5
  248. package/esm5/types/comparator.js +0 -1
  249. package/esm5/types/index.js +0 -1
  250. package/esm5/types/taiga-ui-addon-table-types.js +0 -4
  251. package/esm5/utils/default-sort.js +0 -18
  252. package/esm5/utils/index.js +0 -2
  253. package/esm5/utils/taiga-ui-addon-table-utils.js +0 -5
  254. package/fesm2015/taiga-ui-addon-table-components-resizable-column.js +0 -79
  255. package/fesm2015/taiga-ui-addon-table-components-resizable-column.js.map +0 -1
  256. package/fesm5/taiga-ui-addon-table-components-reorder.js +0 -99
  257. package/fesm5/taiga-ui-addon-table-components-reorder.js.map +0 -1
  258. package/fesm5/taiga-ui-addon-table-components-resizable-column.js +0 -88
  259. package/fesm5/taiga-ui-addon-table-components-resizable-column.js.map +0 -1
  260. package/fesm5/taiga-ui-addon-table-components-table-pagination.js +0 -156
  261. package/fesm5/taiga-ui-addon-table-components-table-pagination.js.map +0 -1
  262. package/fesm5/taiga-ui-addon-table-components-table.js +0 -669
  263. package/fesm5/taiga-ui-addon-table-components-table.js.map +0 -1
  264. package/fesm5/taiga-ui-addon-table-components.js +0 -9
  265. package/fesm5/taiga-ui-addon-table-components.js.map +0 -1
  266. package/fesm5/taiga-ui-addon-table-directives-table-filters.js +0 -174
  267. package/fesm5/taiga-ui-addon-table-directives-table-filters.js.map +0 -1
  268. package/fesm5/taiga-ui-addon-table-directives.js +0 -6
  269. package/fesm5/taiga-ui-addon-table-directives.js.map +0 -1
  270. package/fesm5/taiga-ui-addon-table-interfaces.js +0 -4
  271. package/fesm5/taiga-ui-addon-table-interfaces.js.map +0 -1
  272. package/fesm5/taiga-ui-addon-table-tokens.js +0 -16
  273. package/fesm5/taiga-ui-addon-table-tokens.js.map +0 -1
  274. package/fesm5/taiga-ui-addon-table-types.js +0 -4
  275. package/fesm5/taiga-ui-addon-table-types.js.map +0 -1
  276. package/fesm5/taiga-ui-addon-table-utils.js +0 -25
  277. package/fesm5/taiga-ui-addon-table-utils.js.map +0 -1
  278. package/fesm5/taiga-ui-addon-table.js +0 -9
  279. package/fesm5/taiga-ui-addon-table.js.map +0 -1
  280. package/interfaces/taiga-ui-addon-table-interfaces.metadata.json +0 -1
  281. package/taiga-ui-addon-table.metadata.json +0 -1
  282. package/tokens/taiga-ui-addon-table-tokens.metadata.json +0 -1
  283. package/types/taiga-ui-addon-table-types.metadata.json +0 -1
  284. package/utils/taiga-ui-addon-table-utils.metadata.json +0 -1
@@ -1,84 +1,95 @@
1
- import { __decorate, __param } from 'tslib';
2
- import { TemplateRef, Inject, Input, Directive, ElementRef, Output, InjectionToken, SkipSelf, forwardRef, EventEmitter, ChangeDetectorRef, HostBinding, Optional, Component, ChangeDetectionStrategy, ContentChildren, Pipe, ContentChild, NgModule } from '@angular/core';
3
- import { tuiDefaultProp, typedFromEvent, preventDefault, TuiController, TuiTableSortKeyException, EMPTY_QUERY, tuiPure, TuiDestroyService, TuiMapperPipeModule } from '@taiga-ui/cdk';
1
+ import { __decorate } from 'tslib';
2
+ import * as i0 from '@angular/core';
3
+ import { TemplateRef, Directive, Inject, Input, ElementRef, Output, InjectionToken, SkipSelf, forwardRef, EventEmitter, ChangeDetectorRef, HostBinding, Component, ChangeDetectionStrategy, Optional, ContentChildren, Pipe, ContentChild, NgModule } from '@angular/core';
4
+ import * as i4 from '@taiga-ui/cdk';
5
+ import { tuiDefaultProp, tuiTypedFromEvent, tuiPreventDefault, AbstractTuiController, TuiTableSortKeyException, EMPTY_QUERY, tuiPure, TuiDestroyService, TuiMapperPipeModule } from '@taiga-ui/cdk';
6
+ import * as i2 from '@angular/common';
4
7
  import { DOCUMENT, CommonModule } from '@angular/common';
5
- import { TUI_ELEMENT_REF, TUI_TEXTFIELD_APPEARANCE, TUI_TEXTFIELD_LABEL_OUTSIDE, TUI_TEXTFIELD_SIZE, MODE_PROVIDER, TUI_MODE, watchedControllerFactory, TuiSvgModule } from '@taiga-ui/core';
8
+ import * as i1$1 from '@taiga-ui/core';
9
+ import { TUI_ELEMENT_REF, TUI_TEXTFIELD_APPEARANCE, TUI_TEXTFIELD_LABEL_OUTSIDE, TUI_TEXTFIELD_SIZE, MODE_PROVIDER, TUI_MODE, tuiWatchedControllerFactory, TuiSvgModule } from '@taiga-ui/core';
6
10
  import { switchMap, distinctUntilChanged, map, takeUntil, filter, startWith } from 'rxjs/operators';
7
- import { defaultSort } from '@taiga-ui/addon-table/utils';
11
+ import { tuiDefaultSort } from '@taiga-ui/addon-table/utils';
8
12
  import { IntersectionObserverService, INTERSECTION_ROOT_MARGIN, INTERSECTION_THRESHOLD } from '@ng-web-apis/intersection-observer';
9
- import { Observable } from 'rxjs';
10
13
  import { TUI_INPUT_COUNT_OPTIONS } from '@taiga-ui/kit';
14
+ import * as i1 from 'rxjs';
15
+ import * as i3 from '@tinkoff/ng-polymorpheus';
11
16
  import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
12
17
  import { NgControl } from '@angular/forms';
13
18
 
14
- let TuiCellDirective = class TuiCellDirective {
19
+ class TuiCellDirective {
15
20
  constructor(template) {
16
21
  this.template = template;
17
22
  this.tuiCell = ``;
18
23
  }
19
- };
20
- TuiCellDirective.ctorParameters = () => [
21
- { type: TemplateRef, decorators: [{ type: Inject, args: [TemplateRef,] }] }
22
- ];
24
+ }
25
+ TuiCellDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiCellDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
26
+ TuiCellDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiCellDirective, selector: "[tuiCell]", inputs: { tuiCell: "tuiCell" }, ngImport: i0 });
23
27
  __decorate([
24
- Input(),
25
28
  tuiDefaultProp()
26
29
  ], TuiCellDirective.prototype, "tuiCell", void 0);
27
- TuiCellDirective = __decorate([
28
- Directive({
29
- selector: `[tuiCell]`,
30
- }),
31
- __param(0, Inject(TemplateRef))
32
- ], TuiCellDirective);
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiCellDirective, decorators: [{
31
+ type: Directive,
32
+ args: [{
33
+ selector: `[tuiCell]`,
34
+ }]
35
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
36
+ type: Inject,
37
+ args: [TemplateRef]
38
+ }] }]; }, propDecorators: { tuiCell: [{
39
+ type: Input
40
+ }] } });
33
41
 
34
- let TuiHeadDirective = class TuiHeadDirective {
42
+ class TuiHeadDirective {
35
43
  constructor(template) {
36
44
  this.template = template;
37
45
  }
38
- };
39
- TuiHeadDirective.ctorParameters = () => [
40
- { type: TemplateRef, decorators: [{ type: Inject, args: [TemplateRef,] }] }
41
- ];
42
- __decorate([
43
- Input()
44
- ], TuiHeadDirective.prototype, "tuiHead", void 0);
45
- TuiHeadDirective = __decorate([
46
- Directive({
47
- selector: `[tuiHead]`,
48
- }),
49
- __param(0, Inject(TemplateRef))
50
- ], TuiHeadDirective);
46
+ }
47
+ TuiHeadDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiHeadDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
48
+ TuiHeadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiHeadDirective, selector: "[tuiHead]", inputs: { tuiHead: "tuiHead" }, ngImport: i0 });
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiHeadDirective, decorators: [{
50
+ type: Directive,
51
+ args: [{
52
+ selector: `[tuiHead]`,
53
+ }]
54
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
55
+ type: Inject,
56
+ args: [TemplateRef]
57
+ }] }]; }, propDecorators: { tuiHead: [{
58
+ type: Input
59
+ }] } });
51
60
 
52
- // @dynamic
53
- let TuiResizedDirective = class TuiResizedDirective {
61
+ class TuiResizedDirective {
54
62
  constructor(documentRef, elementRef, parentRef) {
55
63
  this.documentRef = documentRef;
56
64
  this.elementRef = elementRef;
57
65
  this.parentRef = parentRef;
58
- this.tuiResized = typedFromEvent(this.elementRef.nativeElement, `mousedown`).pipe(preventDefault(), switchMap(() => {
66
+ this.tuiResized = tuiTypedFromEvent(this.elementRef.nativeElement, `mousedown`).pipe(tuiPreventDefault(), switchMap(() => {
59
67
  const { width, right } = this.parentRef.nativeElement.getBoundingClientRect();
60
- return typedFromEvent(this.documentRef, `mousemove`).pipe(distinctUntilChanged(), map(({ clientX }) => width + clientX - right), takeUntil(typedFromEvent(this.documentRef, `mouseup`)));
68
+ return tuiTypedFromEvent(this.documentRef, `mousemove`).pipe(distinctUntilChanged(), map(({ clientX }) => width + clientX - right), takeUntil(tuiTypedFromEvent(this.documentRef, `mouseup`)));
61
69
  }));
62
70
  }
63
- };
64
- TuiResizedDirective.ctorParameters = () => [
65
- { type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
66
- { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
67
- { type: ElementRef, decorators: [{ type: Inject, args: [TUI_ELEMENT_REF,] }] }
68
- ];
69
- __decorate([
70
- Output()
71
- ], TuiResizedDirective.prototype, "tuiResized", void 0);
72
- TuiResizedDirective = __decorate([
73
- Directive({
74
- selector: `[tuiResized]`,
75
- }),
76
- __param(0, Inject(DOCUMENT)),
77
- __param(1, Inject(ElementRef)),
78
- __param(2, Inject(TUI_ELEMENT_REF))
79
- ], TuiResizedDirective);
71
+ }
72
+ TuiResizedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiResizedDirective, deps: [{ token: DOCUMENT }, { token: ElementRef }, { token: TUI_ELEMENT_REF }], target: i0.ɵɵFactoryTarget.Directive });
73
+ TuiResizedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiResizedDirective, selector: "[tuiResized]", outputs: { tuiResized: "tuiResized" }, ngImport: i0 });
74
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiResizedDirective, decorators: [{
75
+ type: Directive,
76
+ args: [{
77
+ selector: `[tuiResized]`,
78
+ }]
79
+ }], ctorParameters: function () { return [{ type: Document, decorators: [{
80
+ type: Inject,
81
+ args: [DOCUMENT]
82
+ }] }, { type: i0.ElementRef, decorators: [{
83
+ type: Inject,
84
+ args: [ElementRef]
85
+ }] }, { type: i0.ElementRef, decorators: [{
86
+ type: Inject,
87
+ args: [TUI_ELEMENT_REF]
88
+ }] }]; }, propDecorators: { tuiResized: [{
89
+ type: Output
90
+ }] } });
80
91
 
81
- let TuiRowDirective = class TuiRowDirective {
92
+ class TuiRowDirective {
82
93
  constructor(template) {
83
94
  this.template = template;
84
95
  this.tuiRowOf = [];
@@ -86,43 +97,35 @@ let TuiRowDirective = class TuiRowDirective {
86
97
  static ngTemplateContextGuard(_dir, _ctx) {
87
98
  return true;
88
99
  }
89
- };
90
- TuiRowDirective.ctorParameters = () => [
91
- { type: TemplateRef, decorators: [{ type: Inject, args: [TemplateRef,] }] }
92
- ];
100
+ }
101
+ TuiRowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRowDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
102
+ TuiRowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiRowDirective, selector: "ng-template[tuiRow]", inputs: { tuiRowOf: "tuiRowOf" }, ngImport: i0 });
93
103
  __decorate([
94
- Input(),
95
104
  tuiDefaultProp()
96
105
  ], TuiRowDirective.prototype, "tuiRowOf", void 0);
97
- TuiRowDirective = __decorate([
98
- Directive({
99
- selector: `ng-template[tuiRow]`,
100
- }),
101
- __param(0, Inject(TemplateRef))
102
- ], TuiRowDirective);
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRowDirective, decorators: [{
107
+ type: Directive,
108
+ args: [{
109
+ selector: `ng-template[tuiRow]`,
110
+ }]
111
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
112
+ type: Inject,
113
+ args: [TemplateRef]
114
+ }] }]; }, propDecorators: { tuiRowOf: [{
115
+ type: Input
116
+ }] } });
103
117
 
104
- // eslint-disable-next-line @typescript-eslint/naming-convention
105
- function stuckFactory({ nativeElement }, entries$) {
106
- const stream$ = entries$.pipe(map(([{ intersectionRatio }]) => intersectionRatio < 1));
107
- nativeElement[`$.class._stuck`] = stream$;
108
- return stream$;
109
- }
110
118
  const TUI_STUCK = new InjectionToken(`Stream of sticky stuck events`);
111
119
  const TUI_STUCK_PROVIDER = {
112
120
  provide: TUI_STUCK,
113
121
  deps: [ElementRef, IntersectionObserverService],
114
- useFactory: stuckFactory,
122
+ useFactory: ({ nativeElement }, entries$) => {
123
+ const stream$ = entries$.pipe(map(([{ intersectionRatio }]) => intersectionRatio < 1));
124
+ nativeElement[`$.class._stuck`] = stream$;
125
+ return stream$;
126
+ },
115
127
  };
116
128
 
117
- // TODO: 3.0 remove in ivy compilation
118
- const TABLE_THRESHOLD = [0, 1];
119
- const TABLE_LABEL = {
120
- labelOutside: true,
121
- };
122
- // eslint-disable-next-line @typescript-eslint/naming-convention
123
- function inputCountOptionsFactory(options) {
124
- return Object.assign(Object.assign({}, options), { hideButtons: true });
125
- }
126
129
  const TUI_TABLE_PROVIDERS = [
127
130
  {
128
131
  provide: INTERSECTION_ROOT_MARGIN,
@@ -130,21 +133,22 @@ const TUI_TABLE_PROVIDERS = [
130
133
  },
131
134
  {
132
135
  provide: INTERSECTION_THRESHOLD,
133
- useValue: TABLE_THRESHOLD,
136
+ useValue: [0, 1],
134
137
  },
135
138
  {
136
139
  provide: TUI_TEXTFIELD_APPEARANCE,
137
- // TODO: 3.0 remove in ivy compilation
138
- useValue: `table`,
140
+ useValue: "table" /* Table */,
139
141
  },
140
142
  {
141
143
  provide: TUI_TEXTFIELD_LABEL_OUTSIDE,
142
- useValue: TABLE_LABEL,
144
+ useValue: {
145
+ labelOutside: true,
146
+ },
143
147
  },
144
148
  {
145
149
  provide: TUI_INPUT_COUNT_OPTIONS,
146
150
  deps: [[new SkipSelf(), TUI_INPUT_COUNT_OPTIONS]],
147
- useFactory: inputCountOptionsFactory,
151
+ useFactory: (options) => (Object.assign(Object.assign({}, options), { hideButtons: true })),
148
152
  },
149
153
  {
150
154
  provide: TUI_TEXTFIELD_SIZE,
@@ -155,7 +159,7 @@ const TUI_TABLE_PROVIDERS = [
155
159
  TUI_STUCK_PROVIDER,
156
160
  ];
157
161
 
158
- let TuiTableDirective = class TuiTableDirective extends TuiController {
162
+ class TuiTableDirective extends AbstractTuiController {
159
163
  constructor(entries$, mode$, stuck$, changeDetectorRef) {
160
164
  super();
161
165
  this.entries$ = entries$;
@@ -185,58 +189,67 @@ let TuiTableDirective = class TuiTableDirective extends TuiController {
185
189
  ngAfterViewInit() {
186
190
  this.changeDetectorRef.detectChanges();
187
191
  }
188
- };
189
- TuiTableDirective.ctorParameters = () => [
190
- { type: Observable, decorators: [{ type: Inject, args: [IntersectionObserverService,] }] },
191
- { type: Observable, decorators: [{ type: Inject, args: [TUI_MODE,] }] },
192
- { type: Observable, decorators: [{ type: Inject, args: [TUI_STUCK,] }] },
193
- { type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] }
194
- ];
192
+ }
193
+ TuiTableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableDirective, deps: [{ token: IntersectionObserverService }, { token: TUI_MODE }, { token: TUI_STUCK }, { token: ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
194
+ TuiTableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiTableDirective, selector: "table[tuiTable]", inputs: { columns: "columns", size: "size", direction: "direction", sorter: "sorter" }, outputs: { directionChange: "directionChange", sorterChange: "sorterChange" }, host: { listeners: { "$.data-mode.attr": "mode$", "$.class._stuck": "stuck$" }, properties: { "attr.data-size": "this.size" }, styleAttribute: "border-collapse: separate" }, providers: TUI_TABLE_PROVIDERS, usesInheritance: true, ngImport: i0 });
195
195
  __decorate([
196
- Input(),
197
196
  tuiDefaultProp()
198
197
  ], TuiTableDirective.prototype, "columns", void 0);
199
198
  __decorate([
200
- Input(),
201
- HostBinding(`attr.data-size`),
202
199
  tuiDefaultProp()
203
200
  ], TuiTableDirective.prototype, "size", void 0);
204
201
  __decorate([
205
- Input(),
206
202
  tuiDefaultProp()
207
203
  ], TuiTableDirective.prototype, "direction", void 0);
208
204
  __decorate([
209
- Output()
210
- ], TuiTableDirective.prototype, "directionChange", void 0);
211
- __decorate([
212
- Output()
213
- ], TuiTableDirective.prototype, "sorterChange", void 0);
214
- __decorate([
215
- Input(),
216
205
  tuiDefaultProp()
217
206
  ], TuiTableDirective.prototype, "sorter", void 0);
218
- TuiTableDirective = __decorate([
219
- Directive({
220
- selector: `table[tuiTable]`,
221
- providers: TUI_TABLE_PROVIDERS,
222
- host: {
223
- '($.data-mode.attr)': `mode$`,
224
- '($.class._stuck)': `stuck$`,
225
- style: `border-collapse: separate`,
226
- },
227
- }),
228
- __param(0, Inject(IntersectionObserverService)),
229
- __param(1, Inject(TUI_MODE)),
230
- __param(2, Inject(TUI_STUCK)),
231
- __param(3, Inject(ChangeDetectorRef))
232
- ], TuiTableDirective);
207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableDirective, decorators: [{
208
+ type: Directive,
209
+ args: [{
210
+ selector: `table[tuiTable]`,
211
+ providers: TUI_TABLE_PROVIDERS,
212
+ host: {
213
+ '($.data-mode.attr)': `mode$`,
214
+ '($.class._stuck)': `stuck$`,
215
+ style: `border-collapse: separate`,
216
+ },
217
+ }]
218
+ }], ctorParameters: function () { return [{ type: i1.Observable, decorators: [{
219
+ type: Inject,
220
+ args: [IntersectionObserverService]
221
+ }] }, { type: i1.Observable, decorators: [{
222
+ type: Inject,
223
+ args: [TUI_MODE]
224
+ }] }, { type: i1.Observable, decorators: [{
225
+ type: Inject,
226
+ args: [TUI_STUCK]
227
+ }] }, { type: i0.ChangeDetectorRef, decorators: [{
228
+ type: Inject,
229
+ args: [ChangeDetectorRef]
230
+ }] }]; }, propDecorators: { columns: [{
231
+ type: Input
232
+ }], size: [{
233
+ type: Input
234
+ }, {
235
+ type: HostBinding,
236
+ args: [`attr.data-size`]
237
+ }], direction: [{
238
+ type: Input
239
+ }], directionChange: [{
240
+ type: Output
241
+ }], sorterChange: [{
242
+ type: Output
243
+ }], sorter: [{
244
+ type: Input
245
+ }] } });
233
246
 
234
- let TuiThComponent = class TuiThComponent {
247
+ class TuiThComponent {
235
248
  constructor(head, table) {
236
249
  this.head = head;
237
250
  this.table = table;
238
251
  this.sorter = this.head
239
- ? (a, b) => defaultSort(a[this.key], b[this.key])
252
+ ? (a, b) => tuiDefaultSort(a[this.key], b[this.key])
240
253
  : null;
241
254
  this.resizable = false;
242
255
  this.sticky = false;
@@ -257,47 +270,62 @@ let TuiThComponent = class TuiThComponent {
257
270
  onResized(width) {
258
271
  this.width = width;
259
272
  }
260
- };
261
- TuiThComponent.ctorParameters = () => [
262
- { type: TuiHeadDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiHeadDirective,] }] },
263
- { type: TuiTableDirective, decorators: [{ type: Optional }, { type: Inject, args: [forwardRef(() => TuiTableDirective),] }] }
264
- ];
273
+ }
274
+ TuiThComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiThComponent, deps: [{ token: TuiHeadDirective, optional: true }, { token: forwardRef(() => TuiTableDirective), optional: true }], target: i0.ɵɵFactoryTarget.Component });
275
+ TuiThComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiThComponent, selector: "th[tuiTh]", inputs: { sorter: "sorter", resizable: "resizable", sticky: "sticky" }, host: { properties: { "class._sticky": "this.sticky", "style.width.px": "this.width" } }, providers: [
276
+ {
277
+ provide: TUI_ELEMENT_REF,
278
+ useExisting: ElementRef,
279
+ },
280
+ ], ngImport: i0, template: "<button\n *ngIf=\"sorter && table; else content\"\n type=\"button\"\n class=\"t-sort\"\n [class.t-sort_sorted]=\"isCurrent\"\n (click)=\"table.updateSorter(sorter)\"\n>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n {{ table.change$ | async }}\n <tui-svg\n class=\"t-sort-icon\"\n [src]=\"icon\"\n [class.t-sort-icon_rotated]=\"isCurrent && table.direction === 1\"\n ></tui-svg>\n</button>\n<ng-template #content><ng-content></ng-content></ng-template>\n<div\n *ngIf=\"resizable\"\n class=\"t-bar\"\n (tuiResized)=\"onResized($event)\"\n></div>\n", styles: [":host{transition-property:box-shadow;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;top:0;z-index:20;height:var(--tui-height-m);font:var(--tui-font-text-s);text-align:left;font-weight:bold;color:var(--tui-text-02);background:var(--tui-base-01);cursor:default;padding:0 .75rem;box-sizing:border-box;box-shadow:0 .3125rem rgba(237,237,237,0);border:1px solid var(--tui-base-04)}:host:not(:first-child){border-left:none}:host._sticky{position:-webkit-sticky;position:sticky;z-index:30}:host._sticky:first-child{left:0}:host._sticky:after{transition-property:opacity;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;top:0;left:100%;bottom:0;width:.3125rem;pointer-events:none;background:rgba(237,237,237,.7);opacity:0}:host-context(tr:not(:first-child)){border-top:none}:host-context(table[data-size=\"l\"]){height:var(--tui-height-l);font:var(--tui-font-text-m);font-weight:bold;padding:0 1rem}:host-context(thead[tuiThead]){position:-webkit-sticky;position:sticky}:host-context(table._stuck)._sticky:after{opacity:1}:host-context(thead[tuiThead]._stuck){box-shadow:0 .3125rem rgba(237,237,237,.7)}:host-context(table[data-mode=\"onDark\"]):after{background:rgba(60,60,60,.9)}:host-context(table[data-mode=\"onDark\"] thead[tuiThead]._stuck){box-shadow:0 .3125rem rgba(60,60,60,.9)}:host-context(table[data-mode=\"onDark\"] thead[tuiThead]._stuck):first-child{box-shadow:.0625rem .3125rem rgba(60,60,60,.9)}:host-context(table[data-size=\"l\"] thead[tuiThead] tr:nth-child(2)){top:var(--tui-height-l)}:host-context(table[data-size=\"m\"] thead[tuiThead] tr:nth-child(2)){top:var(--tui-height-m)}:host-context(table[data-size=\"s\"] thead[tuiThead] tr:nth-child(2)){top:var(--tui-height-s)}.t-sort{transition-property:color;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;display:inline-flex;flex-direction:inherit;align-items:center;outline:none;font-weight:bold;cursor:pointer}.t-sort_sorted{color:var(--tui-text-01)}.t-sort_sorted .t-sort-icon_rotated{transform:scaleY(-1)}.t-sort:focus-visible{background:var(--tui-selection)}.t-sort:hover{color:var(--tui-text-01)}.t-bar{transition-property:opacity;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:0;bottom:0;right:-1px;width:3px;justify-self:flex-end;border-left:2px solid transparent;background:var(--tui-support-12);background-clip:content-box;cursor:ew-resize;opacity:0}.t-bar:hover,.t-bar:active{opacity:1}\n"], components: [{ type: i1$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: TuiResizedDirective, selector: "[tuiResized]", outputs: ["tuiResized"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
265
281
  __decorate([
266
- Input(),
267
282
  tuiDefaultProp()
268
283
  ], TuiThComponent.prototype, "sorter", void 0);
269
284
  __decorate([
270
- Input(),
271
285
  tuiDefaultProp()
272
286
  ], TuiThComponent.prototype, "resizable", void 0);
273
287
  __decorate([
274
- Input(),
275
- HostBinding(`class._sticky`),
276
288
  tuiDefaultProp()
277
289
  ], TuiThComponent.prototype, "sticky", void 0);
278
- __decorate([
279
- HostBinding(`style.width.px`)
280
- ], TuiThComponent.prototype, "width", void 0);
281
- TuiThComponent = __decorate([
282
- Component({
283
- selector: `th[tuiTh]`,
284
- template: "<button\n *ngIf=\"sorter && table; else content\"\n type=\"button\"\n class=\"t-sort\"\n [class.t-sort_sorted]=\"isCurrent\"\n (click)=\"table.updateSorter(sorter)\"\n>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n {{ table.change$ | async }}\n <tui-svg\n class=\"t-sort-icon\"\n [src]=\"icon\"\n [class.t-sort-icon_rotated]=\"isCurrent && table.direction === -1\"\n ></tui-svg>\n</button>\n<ng-template #content><ng-content></ng-content></ng-template>\n<div\n *ngIf=\"resizable\"\n class=\"t-bar\"\n (tuiResized)=\"onResized($event)\"\n></div>\n",
285
- changeDetection: ChangeDetectionStrategy.OnPush,
286
- providers: [
287
- {
288
- provide: TUI_ELEMENT_REF,
289
- useExisting: ElementRef,
290
- },
291
- ],
292
- styles: [":host{transition-property:box-shadow;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:relative;top:0;z-index:20;height:var(--tui-height-m);font:var(--tui-font-text-s);text-align:left;font-weight:700;color:var(--tui-text-02);background:var(--tui-base-01);cursor:default;padding:0 .75rem;box-sizing:border-box;box-shadow:0 .3125rem rgba(237,237,237,0);border:1px solid var(--tui-base-04)}:host:not(:first-child){border-left:none}:host._sticky{position:-webkit-sticky;position:sticky;z-index:30}:host._sticky:first-child{left:0}:host._sticky:after{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;content:'';position:absolute;top:0;left:100%;bottom:0;width:.3125rem;pointer-events:none;background:rgba(237,237,237,.7);opacity:0}:host-context(tr:not(:first-child)){border-top:none}:host-context(table[data-size='l']){height:var(--tui-height-l);font:var(--tui-font-text-m);font-weight:700;padding:0 1rem}:host-context(thead[tuiThead]){position:-webkit-sticky;position:sticky}:host-context(table._stuck)._sticky:after{opacity:1}:host-context(thead[tuiThead]._stuck){box-shadow:0 .3125rem rgba(237,237,237,.7)}:host-context(table[data-mode=onDark]):after{background:rgba(60,60,60,.9)}:host-context(table[data-mode=onDark]thead[tuiThead]._stuck){box-shadow:0 .3125rem rgba(60,60,60,.9)}:host-context(table[data-mode=onDark]thead[tuiThead]._stuck):first-child{box-shadow:.0625rem .3125rem rgba(60,60,60,.9)}:host-context(table[data-size='l']thead[tuiThead]tr:nth-child(2)){top:var(--tui-height-l)}:host-context(table[data-size='m']thead[tuiThead]tr:nth-child(2)){top:var(--tui-height-m)}:host-context(table[data-size='s']thead[tuiThead]tr:nth-child(2)){top:var(--tui-height-s)}.t-sort{transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;display:inline-flex;flex-direction:inherit;align-items:center;outline:0;font-weight:700;cursor:pointer}.t-sort_sorted{color:var(--tui-text-01)}.t-sort_sorted .t-sort-icon_rotated{transform:scaleY(-1)}.t-sort:focus-visible{background:var(--tui-selection)}.t-sort:hover{color:var(--tui-text-01)}.t-bar{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:absolute;top:0;bottom:0;right:-1px;width:3px;justify-self:flex-end;border-left:2px solid transparent;background:var(--tui-support-12);background-clip:content-box;cursor:ew-resize;opacity:0}.t-bar:active,.t-bar:hover{opacity:1}"]
293
- }),
294
- __param(0, Optional()),
295
- __param(0, Inject(TuiHeadDirective)),
296
- __param(1, Optional()),
297
- __param(1, Inject(forwardRef(() => TuiTableDirective)))
298
- ], TuiThComponent);
290
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiThComponent, decorators: [{
291
+ type: Component,
292
+ args: [{
293
+ selector: `th[tuiTh]`,
294
+ templateUrl: `./th.template.html`,
295
+ styleUrls: [`./th.style.less`],
296
+ changeDetection: ChangeDetectionStrategy.OnPush,
297
+ providers: [
298
+ {
299
+ provide: TUI_ELEMENT_REF,
300
+ useExisting: ElementRef,
301
+ },
302
+ ],
303
+ }]
304
+ }], ctorParameters: function () { return [{ type: TuiHeadDirective, decorators: [{
305
+ type: Optional
306
+ }, {
307
+ type: Inject,
308
+ args: [TuiHeadDirective]
309
+ }] }, { type: TuiTableDirective, decorators: [{
310
+ type: Optional
311
+ }, {
312
+ type: Inject,
313
+ args: [forwardRef(() => TuiTableDirective)]
314
+ }] }]; }, propDecorators: { sorter: [{
315
+ type: Input
316
+ }], resizable: [{
317
+ type: Input
318
+ }], sticky: [{
319
+ type: Input
320
+ }, {
321
+ type: HostBinding,
322
+ args: [`class._sticky`]
323
+ }], width: [{
324
+ type: HostBinding,
325
+ args: [`style.width.px`]
326
+ }] } });
299
327
 
300
- let TuiSortableDirective = class TuiSortableDirective {
328
+ class TuiSortableDirective {
301
329
  constructor(sortBy, table, th) {
302
330
  this.sortBy = sortBy;
303
331
  this.table = table;
@@ -319,22 +347,26 @@ let TuiSortableDirective = class TuiSortableDirective {
319
347
  get match() {
320
348
  return this.sortBy.tuiSortBy === this.key;
321
349
  }
322
- };
323
- TuiSortableDirective.ctorParameters = () => [
324
- { type: TuiSortByDirective, decorators: [{ type: Inject, args: [forwardRef(() => TuiSortByDirective),] }] },
325
- { type: TuiTableDirective, decorators: [{ type: Inject, args: [TuiTableDirective,] }] },
326
- { type: TuiThComponent, decorators: [{ type: Inject, args: [TuiThComponent,] }] }
327
- ];
328
- TuiSortableDirective = __decorate([
329
- Directive({
330
- selector: `th[tuiTh][tuiSortable]`,
331
- }),
332
- __param(0, Inject(forwardRef(() => TuiSortByDirective))),
333
- __param(1, Inject(TuiTableDirective)),
334
- __param(2, Inject(TuiThComponent))
335
- ], TuiSortableDirective);
350
+ }
351
+ TuiSortableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSortableDirective, deps: [{ token: forwardRef(() => TuiSortByDirective) }, { token: TuiTableDirective }, { token: TuiThComponent }], target: i0.ɵɵFactoryTarget.Directive });
352
+ TuiSortableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSortableDirective, selector: "th[tuiTh][tuiSortable]", ngImport: i0 });
353
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSortableDirective, decorators: [{
354
+ type: Directive,
355
+ args: [{
356
+ selector: `th[tuiTh][tuiSortable]`,
357
+ }]
358
+ }], ctorParameters: function () { return [{ type: TuiSortByDirective, decorators: [{
359
+ type: Inject,
360
+ args: [forwardRef(() => TuiSortByDirective)]
361
+ }] }, { type: TuiTableDirective, decorators: [{
362
+ type: Inject,
363
+ args: [TuiTableDirective]
364
+ }] }, { type: TuiThComponent, decorators: [{
365
+ type: Inject,
366
+ args: [TuiThComponent]
367
+ }] }]; } });
336
368
 
337
- let TuiSortByDirective = class TuiSortByDirective {
369
+ class TuiSortByDirective {
338
370
  constructor(table) {
339
371
  this.table = table;
340
372
  this.sortables = EMPTY_QUERY;
@@ -342,57 +374,68 @@ let TuiSortByDirective = class TuiSortByDirective {
342
374
  this.tuiSortByChange = this.table.sorterChange.pipe(filter(() => !!this.sortables.length), map(sorter => this.getKey(sorter)));
343
375
  }
344
376
  getKey(sorter) {
345
- var _a, _b;
346
- return (_b = (_a = this.sortables.find(s => s.sorter === sorter)) === null || _a === void 0 ? void 0 : _a.key) !== null && _b !== void 0 ? _b : null;
377
+ var _a;
378
+ return ((_a = this.sortables.find(s => s.sorter === sorter)) === null || _a === void 0 ? void 0 : _a.key) || null;
347
379
  }
348
- };
349
- TuiSortByDirective.ctorParameters = () => [
350
- { type: TuiTableDirective, decorators: [{ type: Inject, args: [TuiTableDirective,] }] }
351
- ];
352
- __decorate([
353
- ContentChildren(TuiSortableDirective, { descendants: true })
354
- ], TuiSortByDirective.prototype, "sortables", void 0);
380
+ }
381
+ TuiSortByDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSortByDirective, deps: [{ token: TuiTableDirective }], target: i0.ɵɵFactoryTarget.Directive });
382
+ TuiSortByDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSortByDirective, selector: "table[tuiTable][tuiSortBy]", inputs: { tuiSortBy: "tuiSortBy" }, outputs: { tuiSortByChange: "tuiSortByChange" }, queries: [{ propertyName: "sortables", predicate: TuiSortableDirective, descendants: true }], ngImport: i0 });
355
383
  __decorate([
356
- Input(),
357
384
  tuiDefaultProp()
358
385
  ], TuiSortByDirective.prototype, "tuiSortBy", void 0);
359
- __decorate([
360
- Output()
361
- ], TuiSortByDirective.prototype, "tuiSortByChange", void 0);
362
- TuiSortByDirective = __decorate([
363
- Directive({
364
- selector: `table[tuiTable][tuiSortBy]`,
365
- }),
366
- __param(0, Inject(TuiTableDirective))
367
- ], TuiSortByDirective);
386
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSortByDirective, decorators: [{
387
+ type: Directive,
388
+ args: [{
389
+ selector: `table[tuiTable][tuiSortBy]`,
390
+ }]
391
+ }], ctorParameters: function () { return [{ type: TuiTableDirective, decorators: [{
392
+ type: Inject,
393
+ args: [TuiTableDirective]
394
+ }] }]; }, propDecorators: { sortables: [{
395
+ type: ContentChildren,
396
+ args: [TuiSortableDirective, { descendants: true }]
397
+ }], tuiSortBy: [{
398
+ type: Input
399
+ }], tuiSortByChange: [{
400
+ type: Output
401
+ }] } });
368
402
 
369
- let TuiTheadDirective = class TuiTheadDirective {
403
+ class TuiTheadDirective {
370
404
  constructor(stuck$) {
371
405
  this.stuck$ = stuck$;
372
406
  }
373
- };
374
- TuiTheadDirective.ctorParameters = () => [
375
- { type: Observable, decorators: [{ type: Inject, args: [TUI_STUCK,] }] }
376
- ];
377
- TuiTheadDirective = __decorate([
378
- Directive({
379
- selector: `thead[tuiThead]`,
380
- providers: [
381
- TUI_STUCK_PROVIDER,
382
- IntersectionObserverService,
383
- {
384
- provide: INTERSECTION_ROOT_MARGIN,
385
- useValue: `0px 10000px 10000px 10000px`,
386
- },
387
- ],
388
- host: {
389
- '($.class._stuck)': `stuck$`,
407
+ }
408
+ TuiTheadDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTheadDirective, deps: [{ token: TUI_STUCK }], target: i0.ɵɵFactoryTarget.Directive });
409
+ TuiTheadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiTheadDirective, selector: "thead[tuiThead]", host: { listeners: { "$.class._stuck": "stuck$" } }, providers: [
410
+ TUI_STUCK_PROVIDER,
411
+ IntersectionObserverService,
412
+ {
413
+ provide: INTERSECTION_ROOT_MARGIN,
414
+ useValue: `0px 10000px 10000px 10000px`,
390
415
  },
391
- }),
392
- __param(0, Inject(TUI_STUCK))
393
- ], TuiTheadDirective);
416
+ ], ngImport: i0 });
417
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTheadDirective, decorators: [{
418
+ type: Directive,
419
+ args: [{
420
+ selector: `thead[tuiThead]`,
421
+ providers: [
422
+ TUI_STUCK_PROVIDER,
423
+ IntersectionObserverService,
424
+ {
425
+ provide: INTERSECTION_ROOT_MARGIN,
426
+ useValue: `0px 10000px 10000px 10000px`,
427
+ },
428
+ ],
429
+ host: {
430
+ '($.class._stuck)': `stuck$`,
431
+ },
432
+ }]
433
+ }], ctorParameters: function () { return [{ type: i1.Observable, decorators: [{
434
+ type: Inject,
435
+ args: [TUI_STUCK]
436
+ }] }]; } });
394
437
 
395
- let TuiTableSortPipe = class TuiTableSortPipe {
438
+ class TuiTableSortPipe {
396
439
  constructor(table) {
397
440
  this.table = table;
398
441
  }
@@ -402,34 +445,58 @@ let TuiTableSortPipe = class TuiTableSortPipe {
402
445
  sort(data, sorter, direction) {
403
446
  return [...data].sort((a, b) => direction * sorter(a, b));
404
447
  }
405
- };
406
- TuiTableSortPipe.ctorParameters = () => [
407
- { type: TuiTableDirective, decorators: [{ type: Inject, args: [TuiTableDirective,] }] }
408
- ];
448
+ }
449
+ TuiTableSortPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableSortPipe, deps: [{ token: TuiTableDirective }], target: i0.ɵɵFactoryTarget.Pipe });
450
+ TuiTableSortPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableSortPipe, name: "tuiTableSort", pure: false });
409
451
  __decorate([
410
452
  tuiPure
411
453
  ], TuiTableSortPipe.prototype, "sort", null);
412
- TuiTableSortPipe = __decorate([
413
- Pipe({
414
- name: `tuiTableSort`,
415
- pure: false,
416
- }),
417
- __param(0, Inject(TuiTableDirective))
418
- ], TuiTableSortPipe);
454
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableSortPipe, decorators: [{
455
+ type: Pipe,
456
+ args: [{
457
+ name: `tuiTableSort`,
458
+ pure: false,
459
+ }]
460
+ }], ctorParameters: function () { return [{ type: TuiTableDirective, decorators: [{
461
+ type: Inject,
462
+ args: [TuiTableDirective]
463
+ }] }]; }, propDecorators: { sort: [] } });
419
464
 
420
- // TODO: 3.0 remove in ivy compilation
421
- const TABLE_FACTORY = watchedControllerFactory;
422
465
  const TUI_TABLE_PROVIDER = [
423
466
  TuiDestroyService,
424
467
  TuiTableSortPipe,
425
468
  {
426
469
  provide: TuiTableDirective,
427
470
  deps: [[new SkipSelf(), TuiTableDirective], ChangeDetectorRef, TuiDestroyService],
428
- useFactory: TABLE_FACTORY,
471
+ useFactory: tuiWatchedControllerFactory,
429
472
  },
430
473
  ];
431
474
 
432
- let TuiTrComponent = class TuiTrComponent {
475
+ class TuiTdComponent {
476
+ }
477
+ TuiTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTdComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
478
+ TuiTdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiTdComponent, selector: "th[tuiTd], td[tuiTd]", host: { properties: { "class._editable": "this.control" } }, queries: [{ propertyName: "control", first: true, predicate: NgControl, descendants: true }], ngImport: i0, template: `
479
+ <ng-content></ng-content>
480
+ `, isInline: true, styles: [":host{position:relative;height:var(--tui-height-m);font:var(--tui-font-text-s);text-align:left;padding:0 .75rem;background:var(--tui-base-01);border:1px solid var(--tui-base-04);border-top:none;box-sizing:border-box;transform:translate(0)}:host:first-child{left:0}:host:not(:first-child){border-left:none}:host._editable:focus-within{z-index:1}:host._editable{padding:0;vertical-align:top}:host(th){position:-webkit-sticky;position:sticky;z-index:1}:host(th):after{transition-property:opacity;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;top:0;bottom:0;left:100%;width:.3125rem;pointer-events:none;background:rgba(237,237,237,.7);opacity:0}:host(th):focus-within:not(:disabled){z-index:11}:host-context(table[data-mode=\"onDark\"]):after{background:rgba(60,60,60,.9)}:host-context(table._stuck){z-index:10}:host-context(table._stuck):last-of-type:after{opacity:1}:host-context(table[data-size=\"l\"]){font:var(--tui-font-text-m);height:var(--tui-height-l);padding-left:1rem;padding-right:1rem}:host-context(table[data-size=\"l\"])._editable{padding:0}:host(td):focus-within{z-index:1}:host(td):not(:focus-within){z-index:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
481
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTdComponent, decorators: [{
482
+ type: Component,
483
+ args: [{
484
+ selector: `th[tuiTd], td[tuiTd]`,
485
+ template: `
486
+ <ng-content></ng-content>
487
+ `,
488
+ styleUrls: [`./td.style.less`],
489
+ changeDetection: ChangeDetectionStrategy.OnPush,
490
+ }]
491
+ }], propDecorators: { control: [{
492
+ type: HostBinding,
493
+ args: [`class._editable`]
494
+ }, {
495
+ type: ContentChild,
496
+ args: [NgControl]
497
+ }] } });
498
+
499
+ class TuiTrComponent {
433
500
  constructor(table, body) {
434
501
  this.table = table;
435
502
  this.body = body;
@@ -437,26 +504,29 @@ let TuiTrComponent = class TuiTrComponent {
437
504
  this.cells$ = this.cells.changes.pipe(startWith(null), map(() => this.cells.reduce((record, item) => (Object.assign(Object.assign({}, record), { [item.tuiCell]: item })), {})));
438
505
  this.item$ = this.body.rows.changes.pipe(startWith(null), map(() => this.body.sorted[this.body.rows.toArray().findIndex(row => row === this)]));
439
506
  }
440
- };
441
- TuiTrComponent.ctorParameters = () => [
442
- { type: TuiTableDirective, decorators: [{ type: Inject, args: [forwardRef(() => TuiTableDirective),] }] },
443
- { type: TuiTbodyComponent, decorators: [{ type: Inject, args: [forwardRef(() => TuiTbodyComponent),] }] }
444
- ];
445
- __decorate([
446
- ContentChildren(forwardRef(() => TuiCellDirective))
447
- ], TuiTrComponent.prototype, "cells", void 0);
448
- TuiTrComponent = __decorate([
449
- Component({
450
- selector: `tr[tuiTr]`,
451
- template: "<ng-container *ngIf=\"cells$ | async as items\">\n <ng-container\n *ngFor=\"let key of table.columns\"\n [ngTemplateOutlet]=\"items[key.toString()]?.template || plain\"\n >\n <ng-template #plain>\n <td\n *ngIf=\"item$ | async as item\"\n tuiTd\n >\n {{ item[key.toString()] }}\n </td>\n </ng-template>\n </ng-container>\n</ng-container>\n",
452
- changeDetection: ChangeDetectionStrategy.OnPush,
453
- providers: [TUI_TABLE_PROVIDER]
454
- }),
455
- __param(0, Inject(forwardRef(() => TuiTableDirective))),
456
- __param(1, Inject(forwardRef(() => TuiTbodyComponent)))
457
- ], TuiTrComponent);
507
+ }
508
+ TuiTrComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTrComponent, deps: [{ token: forwardRef(() => TuiTableDirective) }, { token: forwardRef(() => TuiTbodyComponent) }], target: i0.ɵɵFactoryTarget.Component });
509
+ TuiTrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiTrComponent, selector: "tr[tuiTr]", providers: [TUI_TABLE_PROVIDER], queries: [{ propertyName: "cells", predicate: i0.forwardRef(function () { return TuiCellDirective; }) }], ngImport: i0, template: "<ng-container *ngIf=\"cells$ | async as items\">\n <ng-container\n *ngFor=\"let key of table.columns\"\n [ngTemplateOutlet]=\"items[key.toString()]?.template || plain\"\n >\n <ng-template #plain>\n <td\n *ngIf=\"item$ | async as item\"\n tuiTd\n >\n {{ item[key.toString()] }}\n </td>\n </ng-template>\n </ng-container>\n</ng-container>\n", components: [{ type: TuiTdComponent, selector: "th[tuiTd], td[tuiTd]" }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
510
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTrComponent, decorators: [{
511
+ type: Component,
512
+ args: [{
513
+ selector: `tr[tuiTr]`,
514
+ templateUrl: `./tr.template.html`,
515
+ changeDetection: ChangeDetectionStrategy.OnPush,
516
+ providers: [TUI_TABLE_PROVIDER],
517
+ }]
518
+ }], ctorParameters: function () { return [{ type: TuiTableDirective, decorators: [{
519
+ type: Inject,
520
+ args: [forwardRef(() => TuiTableDirective)]
521
+ }] }, { type: TuiTbodyComponent, decorators: [{
522
+ type: Inject,
523
+ args: [forwardRef(() => TuiTbodyComponent)]
524
+ }] }]; }, propDecorators: { cells: [{
525
+ type: ContentChildren,
526
+ args: [forwardRef(() => TuiCellDirective)]
527
+ }] } });
458
528
 
459
- let TuiTbodyComponent = class TuiTbodyComponent {
529
+ class TuiTbodyComponent {
460
530
  constructor(pipe, table) {
461
531
  this.pipe = pipe;
462
532
  this.table = table;
@@ -474,129 +544,148 @@ let TuiTbodyComponent = class TuiTbodyComponent {
474
544
  this.open = !this.open;
475
545
  this.openChange.emit(this.open);
476
546
  }
477
- };
478
- TuiTbodyComponent.ctorParameters = () => [
479
- { type: TuiTableSortPipe, decorators: [{ type: Inject, args: [TuiTableSortPipe,] }] },
480
- { type: TuiTableDirective, decorators: [{ type: Inject, args: [forwardRef(() => TuiTableDirective),] }] }
481
- ];
547
+ }
548
+ TuiTbodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTbodyComponent, deps: [{ token: TuiTableSortPipe }, { token: forwardRef(() => TuiTableDirective) }], target: i0.ɵɵFactoryTarget.Component });
549
+ TuiTbodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiTbodyComponent, selector: "tbody[tuiTbody]", inputs: { data: "data", heading: "heading", open: "open" }, outputs: { openChange: "openChange" }, providers: TUI_TABLE_PROVIDER, queries: [{ propertyName: "row", first: true, predicate: i0.forwardRef(function () { return TuiRowDirective; }), descendants: true }, { propertyName: "rows", predicate: i0.forwardRef(function () { return TuiTrComponent; }) }], ngImport: i0, template: "<ng-content></ng-content>\n<tr *ngIf=\"heading\">\n <th\n class=\"t-heading\"\n [colSpan]=\"table.columns.length\"\n >\n <button\n type=\"button\"\n class=\"t-expand\"\n (click)=\"onClick()\"\n >\n <span class=\"t-name\">\n <ng-container *polymorpheusOutlet=\"heading as text\">\n {{ text }}\n </ng-container>\n </span>\n <tui-svg\n src=\"tuiIconChevronDownLarge\"\n class=\"t-chevron\"\n [class.t-chevron_rotated]=\"open\"\n ></tui-svg>\n </button>\n </th>\n</tr>\n<ng-container *ngIf=\"open && row\">\n <ng-container\n *ngFor=\"let item of sorted; let index = index\"\n [ngTemplateOutlet]=\"row.template\"\n [ngTemplateOutletContext]=\"item | tuiMapper: toContext:index\"\n ></ng-container>\n</ng-container>\n", styles: [":host{border-color:var(--tui-base-04)}:host tr{border-color:inherit}.t-expand{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;display:flex;width:100%;height:100%;align-items:center;box-sizing:border-box;outline:none;font-weight:bold;cursor:pointer;border-color:inherit}.t-expand:focus-visible .t-name{background:var(--tui-selection)}.t-expand:before,.t-expand:after{content:\"\";position:-webkit-sticky;position:sticky;height:100%;border-left:1px solid;border-color:inherit}.t-expand:before{left:0}.t-expand:after{right:0}.t-heading{height:var(--tui-height-m);font:var(--tui-font-text-s);padding:0;background:var(--tui-base-02);border-bottom:1px solid var(--tui-base-04);border-color:inherit}:host-context(table[data-size=\"l\"]) .t-heading{font:var(--tui-font-text-m);height:var(--tui-height-l)}.t-name{position:-webkit-sticky;position:sticky;left:.75rem;display:inline-block}:host-context(table[data-size=\"l\"]) .t-name{left:1rem}.t-chevron{transition-property:transform;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:-webkit-sticky;position:sticky;right:.75rem;margin:0 .6875rem 0 auto}.t-chevron_rotated{transform:rotate(180deg)}\n"], components: [{ type: i1$1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "tuiMapper": i4.TuiMapperPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
482
550
  __decorate([
483
- Input(),
484
551
  tuiDefaultProp()
485
552
  ], TuiTbodyComponent.prototype, "data", void 0);
486
553
  __decorate([
487
- Input(),
488
554
  tuiDefaultProp()
489
555
  ], TuiTbodyComponent.prototype, "heading", void 0);
490
556
  __decorate([
491
- Input(),
492
557
  tuiDefaultProp()
493
558
  ], TuiTbodyComponent.prototype, "open", void 0);
494
- __decorate([
495
- Output()
496
- ], TuiTbodyComponent.prototype, "openChange", void 0);
497
- __decorate([
498
- ContentChild(forwardRef(() => TuiRowDirective))
499
- ], TuiTbodyComponent.prototype, "row", void 0);
500
- __decorate([
501
- ContentChildren(forwardRef(() => TuiTrComponent))
502
- ], TuiTbodyComponent.prototype, "rows", void 0);
503
- TuiTbodyComponent = __decorate([
504
- Component({
505
- selector: `tbody[tuiTbody]`,
506
- template: "<ng-content></ng-content>\n<tr *ngIf=\"heading\">\n <th\n class=\"t-heading\"\n [colSpan]=\"table.columns.length\"\n >\n <button\n type=\"button\"\n class=\"t-expand\"\n (click)=\"onClick()\"\n >\n <span\n polymorpheus-outlet\n class=\"t-name\"\n [content]=\"heading\"\n ></span>\n <tui-svg\n src=\"tuiIconChevronDownLarge\"\n class=\"t-chevron\"\n [class.t-chevron_rotated]=\"open\"\n ></tui-svg>\n </button>\n </th>\n</tr>\n<ng-container *ngIf=\"open && row\">\n <ng-container\n *ngFor=\"let item of sorted; let index = index\"\n [ngTemplateOutlet]=\"row.template\"\n [ngTemplateOutletContext]=\"item | tuiMapper: toContext:index\"\n ></ng-container>\n</ng-container>\n",
507
- changeDetection: ChangeDetectionStrategy.OnPush,
508
- providers: TUI_TABLE_PROVIDER,
509
- styles: [":host{border-color:var(--tui-base-04)}:host tr{border-color:inherit}.t-expand{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;display:flex;width:100%;height:100%;align-items:center;box-sizing:border-box;outline:0;font-weight:700;cursor:pointer;border-color:inherit}.t-expand:focus-visible .t-name{background:var(--tui-selection)}.t-expand:after,.t-expand:before{content:'';position:-webkit-sticky;position:sticky;height:100%;border-left:1px solid;border-color:inherit}.t-expand:before{left:0}.t-expand:after{right:0}.t-heading{height:var(--tui-height-m);font:var(--tui-font-text-s);padding:0;background:var(--tui-base-02);border-bottom:1px solid var(--tui-base-04);border-color:inherit}:host-context(table[data-size='l']) .t-heading{font:var(--tui-font-text-m);height:var(--tui-height-l)}.t-name{position:-webkit-sticky;position:sticky;left:.75rem;display:inline-block}:host-context(table[data-size='l']) .t-name{left:1rem}.t-chevron{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:-webkit-sticky;position:sticky;right:.75rem;margin:0 .6875rem 0 auto}.t-chevron_rotated{transform:rotate(180deg)}"]
510
- }),
511
- __param(0, Inject(TuiTableSortPipe)),
512
- __param(1, Inject(forwardRef(() => TuiTableDirective)))
513
- ], TuiTbodyComponent);
559
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTbodyComponent, decorators: [{
560
+ type: Component,
561
+ args: [{
562
+ selector: `tbody[tuiTbody]`,
563
+ templateUrl: `./tbody.template.html`,
564
+ styleUrls: [`./tbody.style.less`],
565
+ changeDetection: ChangeDetectionStrategy.OnPush,
566
+ providers: TUI_TABLE_PROVIDER,
567
+ }]
568
+ }], ctorParameters: function () { return [{ type: TuiTableSortPipe, decorators: [{
569
+ type: Inject,
570
+ args: [TuiTableSortPipe]
571
+ }] }, { type: TuiTableDirective, decorators: [{
572
+ type: Inject,
573
+ args: [forwardRef(() => TuiTableDirective)]
574
+ }] }]; }, propDecorators: { data: [{
575
+ type: Input
576
+ }], heading: [{
577
+ type: Input
578
+ }], open: [{
579
+ type: Input
580
+ }], openChange: [{
581
+ type: Output
582
+ }], row: [{
583
+ type: ContentChild,
584
+ args: [forwardRef(() => TuiRowDirective)]
585
+ }], rows: [{
586
+ type: ContentChildren,
587
+ args: [forwardRef(() => TuiTrComponent)]
588
+ }] } });
514
589
 
515
- let TuiTdComponent = class TuiTdComponent {
516
- };
517
- __decorate([
518
- HostBinding(`class._editable`),
519
- ContentChild(NgControl)
520
- ], TuiTdComponent.prototype, "control", void 0);
521
- TuiTdComponent = __decorate([
522
- Component({
523
- selector: `th[tuiTd], td[tuiTd]`,
524
- template: `
525
- <ng-content></ng-content>
526
- `,
527
- changeDetection: ChangeDetectionStrategy.OnPush,
528
- styles: [":host{position:relative;height:var(--tui-height-m);font:var(--tui-font-text-s);text-align:left;padding:0 .75rem;background:var(--tui-base-01);border:1px solid var(--tui-base-04);border-top:none;box-sizing:border-box;transform:translate3d(0,0,0)}:host:first-child{left:0}:host:not(:first-child){border-left:none}:host._editable:focus-within{z-index:1}:host._editable{padding:0;vertical-align:top}:host(th){position:-webkit-sticky;position:sticky;z-index:1}:host(th):after{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;content:'';position:absolute;top:0;bottom:0;left:100%;width:.3125rem;pointer-events:none;background:rgba(237,237,237,.7);opacity:0}:host(th):focus-within:not(:disabled){z-index:11}:host-context(table[data-mode=onDark]):after{background:rgba(60,60,60,.9)}:host-context(table._stuck){z-index:10}:host-context(table._stuck):last-of-type:after{opacity:1}:host-context(table[data-size='l']){font:var(--tui-font-text-m);height:var(--tui-height-l);padding-left:1rem;padding-right:1rem}:host-context(table[data-size='l'])._editable{padding:0}:host(td):focus-within{z-index:1}:host(td):not(:focus-within){z-index:0}"]
529
- })
530
- ], TuiTdComponent);
531
-
532
- let TuiThGroupComponent = class TuiThGroupComponent {
590
+ class TuiThGroupComponent {
533
591
  constructor(table) {
534
592
  this.table = table;
535
593
  this.heads = EMPTY_QUERY;
536
594
  this.heads$ = this.heads.changes.pipe(startWith(null), map(() => this.heads.reduce((record, item) => (Object.assign(Object.assign({}, record), { [item.tuiHead]: item })), {})));
537
595
  }
538
- };
539
- TuiThGroupComponent.ctorParameters = () => [
540
- { type: TuiTableDirective, decorators: [{ type: Inject, args: [forwardRef(() => TuiTableDirective),] }] }
541
- ];
542
- __decorate([
543
- ContentChild(forwardRef(() => TuiThComponent))
544
- ], TuiThGroupComponent.prototype, "th", void 0);
545
- __decorate([
546
- ContentChildren(forwardRef(() => TuiHeadDirective))
547
- ], TuiThGroupComponent.prototype, "heads", void 0);
548
- TuiThGroupComponent = __decorate([
549
- Component({
550
- selector: `tr[tuiThGroup]`,
551
- template: "<ng-content></ng-content>\n<ng-container *ngIf=\"heads$ | async as headings\">\n <ng-container\n *ngFor=\"let key of table.columns\"\n [ngTemplateOutlet]=\"headings[key.toString()]?.template || plain\"\n >\n <ng-template #plain>\n <th\n *ngIf=\"!th && !heads.length\"\n tuiTh\n >\n {{ key.toString() }}\n </th>\n </ng-template>\n </ng-container>\n</ng-container>\n",
552
- changeDetection: ChangeDetectionStrategy.OnPush,
553
- providers: [TUI_TABLE_PROVIDER]
554
- }),
555
- __param(0, Inject(forwardRef(() => TuiTableDirective)))
556
- ], TuiThGroupComponent);
596
+ }
597
+ TuiThGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiThGroupComponent, deps: [{ token: forwardRef(() => TuiTableDirective) }], target: i0.ɵɵFactoryTarget.Component });
598
+ TuiThGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiThGroupComponent, selector: "tr[tuiThGroup]", providers: [TUI_TABLE_PROVIDER], queries: [{ propertyName: "th", first: true, predicate: i0.forwardRef(function () { return TuiThComponent; }), descendants: true }, { propertyName: "heads", predicate: i0.forwardRef(function () { return TuiHeadDirective; }) }], ngImport: i0, template: "<ng-content></ng-content>\n<ng-container *ngIf=\"heads$ | async as headings\">\n <ng-container\n *ngFor=\"let key of table.columns\"\n [ngTemplateOutlet]=\"headings[key.toString()]?.template || plain\"\n >\n <ng-template #plain>\n <th\n *ngIf=\"!th && !heads.length\"\n tuiTh\n >\n {{ key.toString() }}\n </th>\n </ng-template>\n </ng-container>\n</ng-container>\n", components: [{ type: TuiThComponent, selector: "th[tuiTh]", inputs: ["sorter", "resizable", "sticky"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
599
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiThGroupComponent, decorators: [{
600
+ type: Component,
601
+ args: [{
602
+ selector: `tr[tuiThGroup]`,
603
+ templateUrl: `./th-group.template.html`,
604
+ changeDetection: ChangeDetectionStrategy.OnPush,
605
+ providers: [TUI_TABLE_PROVIDER],
606
+ }]
607
+ }], ctorParameters: function () { return [{ type: TuiTableDirective, decorators: [{
608
+ type: Inject,
609
+ args: [forwardRef(() => TuiTableDirective)]
610
+ }] }]; }, propDecorators: { th: [{
611
+ type: ContentChild,
612
+ args: [forwardRef(() => TuiThComponent)]
613
+ }], heads: [{
614
+ type: ContentChildren,
615
+ args: [forwardRef(() => TuiHeadDirective)]
616
+ }] } });
557
617
 
558
- let TuiTableModule = class TuiTableModule {
559
- };
560
- TuiTableModule = __decorate([
561
- NgModule({
562
- imports: [CommonModule, PolymorpheusModule, TuiMapperPipeModule, TuiSvgModule],
563
- declarations: [
564
- TuiTableDirective,
565
- TuiTbodyComponent,
566
- TuiThGroupComponent,
567
- TuiThComponent,
568
- TuiTdComponent,
569
- TuiTrComponent,
570
- TuiCellDirective,
571
- TuiHeadDirective,
572
- TuiRowDirective,
573
- TuiSortByDirective,
574
- TuiSortableDirective,
575
- TuiTheadDirective,
576
- TuiResizedDirective,
577
- TuiTableSortPipe,
578
- ],
579
- exports: [
580
- TuiTableDirective,
581
- TuiTbodyComponent,
582
- TuiThGroupComponent,
583
- TuiThComponent,
584
- TuiTdComponent,
585
- TuiTrComponent,
586
- TuiCellDirective,
587
- TuiHeadDirective,
588
- TuiRowDirective,
589
- TuiSortByDirective,
590
- TuiSortableDirective,
591
- TuiTheadDirective,
592
- TuiTableSortPipe,
593
- ],
594
- })
595
- ], TuiTableModule);
618
+ class TuiTableModule {
619
+ }
620
+ TuiTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
621
+ TuiTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableModule, declarations: [TuiTableDirective,
622
+ TuiTbodyComponent,
623
+ TuiThGroupComponent,
624
+ TuiThComponent,
625
+ TuiTdComponent,
626
+ TuiTrComponent,
627
+ TuiCellDirective,
628
+ TuiHeadDirective,
629
+ TuiRowDirective,
630
+ TuiSortByDirective,
631
+ TuiSortableDirective,
632
+ TuiTheadDirective,
633
+ TuiResizedDirective,
634
+ TuiTableSortPipe], imports: [CommonModule, PolymorpheusModule, TuiMapperPipeModule, TuiSvgModule], exports: [TuiTableDirective,
635
+ TuiTbodyComponent,
636
+ TuiThGroupComponent,
637
+ TuiThComponent,
638
+ TuiTdComponent,
639
+ TuiTrComponent,
640
+ TuiCellDirective,
641
+ TuiHeadDirective,
642
+ TuiRowDirective,
643
+ TuiSortByDirective,
644
+ TuiSortableDirective,
645
+ TuiTheadDirective,
646
+ TuiTableSortPipe] });
647
+ TuiTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableModule, imports: [[CommonModule, PolymorpheusModule, TuiMapperPipeModule, TuiSvgModule]] });
648
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiTableModule, decorators: [{
649
+ type: NgModule,
650
+ args: [{
651
+ imports: [CommonModule, PolymorpheusModule, TuiMapperPipeModule, TuiSvgModule],
652
+ declarations: [
653
+ TuiTableDirective,
654
+ TuiTbodyComponent,
655
+ TuiThGroupComponent,
656
+ TuiThComponent,
657
+ TuiTdComponent,
658
+ TuiTrComponent,
659
+ TuiCellDirective,
660
+ TuiHeadDirective,
661
+ TuiRowDirective,
662
+ TuiSortByDirective,
663
+ TuiSortableDirective,
664
+ TuiTheadDirective,
665
+ TuiResizedDirective,
666
+ TuiTableSortPipe,
667
+ ],
668
+ exports: [
669
+ TuiTableDirective,
670
+ TuiTbodyComponent,
671
+ TuiThGroupComponent,
672
+ TuiThComponent,
673
+ TuiTdComponent,
674
+ TuiTrComponent,
675
+ TuiCellDirective,
676
+ TuiHeadDirective,
677
+ TuiRowDirective,
678
+ TuiSortByDirective,
679
+ TuiSortableDirective,
680
+ TuiTheadDirective,
681
+ TuiTableSortPipe,
682
+ ],
683
+ }]
684
+ }] });
596
685
 
597
686
  /**
598
687
  * Generated bundle index. Do not edit.
599
688
  */
600
689
 
601
- export { TABLE_FACTORY, TABLE_LABEL, TABLE_THRESHOLD, TUI_STUCK, TUI_STUCK_PROVIDER, TUI_TABLE_PROVIDER, TUI_TABLE_PROVIDERS, TuiCellDirective, TuiHeadDirective, TuiResizedDirective, TuiRowDirective, TuiSortByDirective, TuiSortableDirective, TuiTableDirective, TuiTableModule, TuiTableSortPipe, TuiTbodyComponent, TuiTdComponent, TuiThComponent, TuiThGroupComponent, TuiTheadDirective, TuiTrComponent, inputCountOptionsFactory, stuckFactory };
690
+ export { TUI_STUCK, TUI_STUCK_PROVIDER, TUI_TABLE_PROVIDER, TUI_TABLE_PROVIDERS, TuiCellDirective, TuiHeadDirective, TuiResizedDirective, TuiRowDirective, TuiSortByDirective, TuiSortableDirective, TuiTableDirective, TuiTableModule, TuiTableSortPipe, TuiTbodyComponent, TuiTdComponent, TuiThComponent, TuiThGroupComponent, TuiTheadDirective, TuiTrComponent };
602
691
  //# sourceMappingURL=taiga-ui-addon-table-components-table.js.map