@taiga-ui/kit 3.9.0 → 3.11.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 (271) hide show
  1. package/bundles/taiga-ui-kit-components-accordion.umd.js +1 -1
  2. package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
  3. package/bundles/taiga-ui-kit-components-action.umd.js +1 -1
  4. package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
  5. package/bundles/taiga-ui-kit-components-avatar.umd.js +1 -1
  6. package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
  7. package/bundles/taiga-ui-kit-components-badge.umd.js +2 -4
  8. package/bundles/taiga-ui-kit-components-badge.umd.js.map +1 -1
  9. package/bundles/taiga-ui-kit-components-badged-content.umd.js +1 -1
  10. package/bundles/taiga-ui-kit-components-badged-content.umd.js.map +1 -1
  11. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +1 -1
  12. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
  13. package/bundles/taiga-ui-kit-components-calendar-month.umd.js +2 -2
  14. package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
  15. package/bundles/taiga-ui-kit-components-calendar-range.umd.js +2 -2
  16. package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
  17. package/bundles/taiga-ui-kit-components-carousel.umd.js +2 -5
  18. package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
  19. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +1 -1
  20. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
  21. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +1 -1
  22. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
  23. package/bundles/taiga-ui-kit-components-checkbox.umd.js +1 -1
  24. package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +1 -1
  25. package/bundles/taiga-ui-kit-components-combo-box.umd.js +2 -2
  26. package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
  27. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +23 -12
  28. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
  29. package/bundles/taiga-ui-kit-components-files.umd.js +1 -1
  30. package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
  31. package/bundles/taiga-ui-kit-components-filter.umd.js +1 -1
  32. package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
  33. package/bundles/taiga-ui-kit-components-input-copy.umd.js +1 -1
  34. package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
  35. package/bundles/taiga-ui-kit-components-input-count.umd.js +3 -3
  36. package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
  37. package/bundles/taiga-ui-kit-components-input-date-range.umd.js +4 -5
  38. package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
  39. package/bundles/taiga-ui-kit-components-input-date-time.umd.js +5 -3
  40. package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
  41. package/bundles/taiga-ui-kit-components-input-date.umd.js +7 -6
  42. package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
  43. package/bundles/taiga-ui-kit-components-input-files.umd.js +247 -70
  44. package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
  45. package/bundles/taiga-ui-kit-components-input-inline.umd.js +1 -1
  46. package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
  47. package/bundles/taiga-ui-kit-components-input-month-range.umd.js +17 -3
  48. package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
  49. package/bundles/taiga-ui-kit-components-input-month.umd.js +18 -4
  50. package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
  51. package/bundles/taiga-ui-kit-components-input-number.umd.js +4 -4
  52. package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
  53. package/bundles/taiga-ui-kit-components-input-password.umd.js +1 -1
  54. package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
  55. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +2 -2
  56. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
  57. package/bundles/taiga-ui-kit-components-input-phone.umd.js +4 -4
  58. package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
  59. package/bundles/taiga-ui-kit-components-input-range.umd.js +1 -1
  60. package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
  61. package/bundles/taiga-ui-kit-components-input-slider.umd.js +1 -1
  62. package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
  63. package/bundles/taiga-ui-kit-components-input-tag.umd.js +2 -2
  64. package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
  65. package/bundles/taiga-ui-kit-components-input-time.umd.js +2 -2
  66. package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
  67. package/bundles/taiga-ui-kit-components-input-year.umd.js +2 -2
  68. package/bundles/taiga-ui-kit-components-input-year.umd.js.map +1 -1
  69. package/bundles/taiga-ui-kit-components-input.umd.js +2 -2
  70. package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
  71. package/bundles/taiga-ui-kit-components-island.umd.js +1 -1
  72. package/bundles/taiga-ui-kit-components-island.umd.js.map +1 -1
  73. package/bundles/taiga-ui-kit-components-line-clamp.umd.js +1 -1
  74. package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
  75. package/bundles/taiga-ui-kit-components-marker-icon.umd.js +1 -1
  76. package/bundles/taiga-ui-kit-components-marker-icon.umd.js.map +1 -1
  77. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +10 -6
  78. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js.map +1 -1
  79. package/bundles/taiga-ui-kit-components-multi-select.umd.js +2 -2
  80. package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
  81. package/bundles/taiga-ui-kit-components-pagination.umd.js +1 -1
  82. package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
  83. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js +1 -1
  84. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
  85. package/bundles/taiga-ui-kit-components-progress.umd.js +1 -1
  86. package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
  87. package/bundles/taiga-ui-kit-components-push.umd.js +1 -1
  88. package/bundles/taiga-ui-kit-components-push.umd.js.map +1 -1
  89. package/bundles/taiga-ui-kit-components-radio-block.umd.js +1 -1
  90. package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
  91. package/bundles/taiga-ui-kit-components-radio-group.umd.js +1 -1
  92. package/bundles/taiga-ui-kit-components-radio-group.umd.js.map +1 -1
  93. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +1 -1
  94. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
  95. package/bundles/taiga-ui-kit-components-radio-list.umd.js +1 -1
  96. package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +1 -1
  97. package/bundles/taiga-ui-kit-components-radio.umd.js +1 -1
  98. package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
  99. package/bundles/taiga-ui-kit-components-range.umd.js +1 -1
  100. package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
  101. package/bundles/taiga-ui-kit-components-rating.umd.js +1 -1
  102. package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
  103. package/bundles/taiga-ui-kit-components-select-option.umd.js +8 -2
  104. package/bundles/taiga-ui-kit-components-select-option.umd.js.map +1 -1
  105. package/bundles/taiga-ui-kit-components-select.umd.js +2 -2
  106. package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
  107. package/bundles/taiga-ui-kit-components-slider.umd.js +1 -1
  108. package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
  109. package/bundles/taiga-ui-kit-components-stepper.umd.js +21 -14
  110. package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
  111. package/bundles/taiga-ui-kit-components-tabs.umd.js +2 -2
  112. package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
  113. package/bundles/taiga-ui-kit-components-tag.umd.js +1 -1
  114. package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
  115. package/bundles/taiga-ui-kit-components-text-area.umd.js +1 -1
  116. package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
  117. package/bundles/taiga-ui-kit-components-tiles.umd.js +619 -0
  118. package/bundles/taiga-ui-kit-components-tiles.umd.js.map +1 -0
  119. package/bundles/taiga-ui-kit-components-toggle.umd.js +1 -1
  120. package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
  121. package/bundles/taiga-ui-kit-components-tree.umd.js +1 -1
  122. package/bundles/taiga-ui-kit-components-tree.umd.js.map +1 -1
  123. package/bundles/taiga-ui-kit-components.umd.js +10 -4
  124. package/bundles/taiga-ui-kit-components.umd.js.map +1 -1
  125. package/bundles/taiga-ui-kit-constants.umd.js +1 -1
  126. package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
  127. package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js +1 -1
  128. package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js.map +1 -1
  129. package/bundles/taiga-ui-kit-directives-highlight.umd.js +1 -1
  130. package/bundles/taiga-ui-kit-directives-highlight.umd.js.map +1 -1
  131. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +1 -1
  132. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +1 -1
  133. package/bundles/taiga-ui-kit-directives-project-class.umd.js +1 -1
  134. package/bundles/taiga-ui-kit-directives-project-class.umd.js.map +1 -1
  135. package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js +1 -1
  136. package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js.map +1 -1
  137. package/bundles/taiga-ui-kit-pipes-field-error.umd.js +1 -1
  138. package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
  139. package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js +1 -1
  140. package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js.map +1 -1
  141. package/bundles/taiga-ui-kit-utils-format.umd.js +1 -1
  142. package/bundles/taiga-ui-kit-utils-format.umd.js.map +1 -1
  143. package/bundles/taiga-ui-kit-utils-mask.umd.js +1 -1
  144. package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
  145. package/bundles/taiga-ui-kit-utils-math.umd.js +1 -1
  146. package/bundles/taiga-ui-kit-utils-math.umd.js.map +1 -1
  147. package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js +1 -1
  148. package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
  149. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +3 -2
  150. package/components/data-list-wrapper/data-list-wrapper.component.d.ts +3 -2
  151. package/components/data-list-wrapper/data-list-wrapper.d.ts +2 -1
  152. package/components/index.d.ts +1 -0
  153. package/components/input-date/input-date.component.d.ts +2 -2
  154. package/components/input-date-range/input-date-range.component.d.ts +3 -3
  155. package/components/input-files/index.d.ts +2 -0
  156. package/components/input-files/input-files.component.d.ts +19 -5
  157. package/components/input-files/input-files.directive.d.ts +20 -0
  158. package/components/input-files/input-files.module.d.ts +8 -7
  159. package/components/input-files/input-files.options.d.ts +17 -0
  160. package/components/input-month/input-month.component.d.ts +4 -2
  161. package/components/input-month-range/input-month-range.component.d.ts +4 -2
  162. package/components/select-option/select-option.component.d.ts +4 -3
  163. package/components/stepper/stepper.component.d.ts +3 -2
  164. package/components/tiles/index.d.ts +4 -0
  165. package/components/tiles/package.json +10 -0
  166. package/components/tiles/taiga-ui-kit-components-tiles.d.ts +5 -0
  167. package/components/tiles/tile-handle.directive.d.ts +13 -0
  168. package/components/tiles/tile.component.d.ts +30 -0
  169. package/components/tiles/tiles.component.d.ts +12 -0
  170. package/components/tiles/tiles.module.d.ts +10 -0
  171. package/esm2015/components/badge/badge.component.js +2 -4
  172. package/esm2015/components/calendar-month/calendar-month.component.js +1 -1
  173. package/esm2015/components/calendar-range/calendar-range.component.js +1 -1
  174. package/esm2015/components/carousel/carousel.component.js +2 -5
  175. package/esm2015/components/combo-box/combo-box.component.js +2 -2
  176. package/esm2015/components/data-list-wrapper/data-list-group-wrapper.component.js +12 -7
  177. package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +12 -7
  178. package/esm2015/components/data-list-wrapper/data-list-wrapper.js +5 -4
  179. package/esm2015/components/index.js +2 -1
  180. package/esm2015/components/input/input.component.js +2 -2
  181. package/esm2015/components/input-count/input-count.component.js +3 -3
  182. package/esm2015/components/input-date/input-date.component.js +8 -7
  183. package/esm2015/components/input-date-range/input-date-range.component.js +7 -8
  184. package/esm2015/components/input-date-time/input-date-time.component.js +6 -4
  185. package/esm2015/components/input-files/index.js +3 -1
  186. package/esm2015/components/input-files/input-files.component.js +75 -26
  187. package/esm2015/components/input-files/input-files.directive.js +77 -0
  188. package/esm2015/components/input-files/input-files.module.js +12 -3
  189. package/esm2015/components/input-files/input-files.options.js +16 -0
  190. package/esm2015/components/input-month/input-month.component.js +15 -5
  191. package/esm2015/components/input-month-range/input-month-range.component.js +14 -4
  192. package/esm2015/components/input-number/input-number.component.js +4 -4
  193. package/esm2015/components/input-phone/input-phone.component.js +4 -4
  194. package/esm2015/components/input-phone-international/input-phone-international.component.js +2 -2
  195. package/esm2015/components/input-tag/input-tag.component.js +2 -2
  196. package/esm2015/components/input-time/input-time.component.js +2 -2
  197. package/esm2015/components/input-year/input-year.component.js +1 -1
  198. package/esm2015/components/multi-select/multi-select.component.js +2 -2
  199. package/esm2015/components/multi-select-option/multi-select-option.component.js +6 -3
  200. package/esm2015/components/select/select.component.js +2 -2
  201. package/esm2015/components/select-option/select-option.component.js +11 -5
  202. package/esm2015/components/stepper/step/step.component.js +1 -1
  203. package/esm2015/components/stepper/stepper.component.js +12 -9
  204. package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +1 -1
  205. package/esm2015/components/tiles/index.js +5 -0
  206. package/esm2015/components/tiles/taiga-ui-kit-components-tiles.js +5 -0
  207. package/esm2015/components/tiles/tile-handle.directive.js +53 -0
  208. package/esm2015/components/tiles/tile.component.js +101 -0
  209. package/esm2015/components/tiles/tiles.component.js +77 -0
  210. package/esm2015/components/tiles/tiles.module.js +20 -0
  211. package/esm2015/pipes/filter-by-input/filter-by-input.base.js +1 -2
  212. package/esm2015/utils/format/string-hash-to-hsl.js +2 -2
  213. package/fesm2015/taiga-ui-kit-components-badge.js +1 -3
  214. package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
  215. package/fesm2015/taiga-ui-kit-components-calendar-month.js +1 -1
  216. package/fesm2015/taiga-ui-kit-components-calendar-range.js +1 -1
  217. package/fesm2015/taiga-ui-kit-components-calendar-range.js.map +1 -1
  218. package/fesm2015/taiga-ui-kit-components-carousel.js +1 -4
  219. package/fesm2015/taiga-ui-kit-components-carousel.js.map +1 -1
  220. package/fesm2015/taiga-ui-kit-components-combo-box.js +1 -1
  221. package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
  222. package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +24 -13
  223. package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
  224. package/fesm2015/taiga-ui-kit-components-input-count.js +2 -2
  225. package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
  226. package/fesm2015/taiga-ui-kit-components-input-date-range.js +6 -7
  227. package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
  228. package/fesm2015/taiga-ui-kit-components-input-date-time.js +5 -3
  229. package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
  230. package/fesm2015/taiga-ui-kit-components-input-date.js +7 -6
  231. package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
  232. package/fesm2015/taiga-ui-kit-components-input-files.js +167 -29
  233. package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
  234. package/fesm2015/taiga-ui-kit-components-input-month-range.js +13 -3
  235. package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
  236. package/fesm2015/taiga-ui-kit-components-input-month.js +14 -4
  237. package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
  238. package/fesm2015/taiga-ui-kit-components-input-number.js +3 -3
  239. package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
  240. package/fesm2015/taiga-ui-kit-components-input-phone-international.js +1 -1
  241. package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  242. package/fesm2015/taiga-ui-kit-components-input-phone.js +3 -3
  243. package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
  244. package/fesm2015/taiga-ui-kit-components-input-tag.js +1 -1
  245. package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
  246. package/fesm2015/taiga-ui-kit-components-input-time.js +1 -1
  247. package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
  248. package/fesm2015/taiga-ui-kit-components-input-year.js +1 -1
  249. package/fesm2015/taiga-ui-kit-components-input-year.js.map +1 -1
  250. package/fesm2015/taiga-ui-kit-components-input.js +1 -1
  251. package/fesm2015/taiga-ui-kit-components-input.js.map +1 -1
  252. package/fesm2015/taiga-ui-kit-components-multi-select-option.js +7 -3
  253. package/fesm2015/taiga-ui-kit-components-multi-select-option.js.map +1 -1
  254. package/fesm2015/taiga-ui-kit-components-multi-select.js +1 -1
  255. package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
  256. package/fesm2015/taiga-ui-kit-components-select-option.js +10 -4
  257. package/fesm2015/taiga-ui-kit-components-select-option.js.map +1 -1
  258. package/fesm2015/taiga-ui-kit-components-select.js +1 -1
  259. package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
  260. package/fesm2015/taiga-ui-kit-components-stepper.js +12 -9
  261. package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
  262. package/fesm2015/taiga-ui-kit-components-tabs.js +1 -1
  263. package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
  264. package/fesm2015/taiga-ui-kit-components-tiles.js +241 -0
  265. package/fesm2015/taiga-ui-kit-components-tiles.js.map +1 -0
  266. package/fesm2015/taiga-ui-kit-components.js +1 -0
  267. package/fesm2015/taiga-ui-kit-components.js.map +1 -1
  268. package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js.map +1 -1
  269. package/fesm2015/taiga-ui-kit-utils-format.js +1 -1
  270. package/fesm2015/taiga-ui-kit-utils-format.js.map +1 -1
  271. package/package.json +4 -4
@@ -0,0 +1,619 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ng-web-apis/mutation-observer'), require('@taiga-ui/cdk'), require('rxjs'), require('rxjs/operators'), require('@angular/common')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/tiles', ['exports', '@angular/core', '@ng-web-apis/mutation-observer', '@taiga-ui/cdk', 'rxjs', 'rxjs/operators', '@angular/common'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].kit = global["taiga-ui"].kit || {}, global["taiga-ui"].kit.components = global["taiga-ui"].kit.components || {}, global["taiga-ui"].kit.components.tiles = {}), global.ng.core, global.mutationObserver, global.cdk, global.rxjs, global.rxjs.operators, global.ng.common));
5
+ })(this, (function (exports, i0, mutationObserver, cdk, i3, operators, i1) { 'use strict';
6
+
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
24
+
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
27
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
28
+
29
+ /******************************************************************************
30
+ Copyright (c) Microsoft Corporation.
31
+
32
+ Permission to use, copy, modify, and/or distribute this software for any
33
+ purpose with or without fee is hereby granted.
34
+
35
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
36
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
37
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
38
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
39
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
40
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
41
+ PERFORMANCE OF THIS SOFTWARE.
42
+ ***************************************************************************** */
43
+ /* global Reflect, Promise */
44
+ var extendStatics = function (d, b) {
45
+ extendStatics = Object.setPrototypeOf ||
46
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
47
+ function (d, b) { for (var p in b)
48
+ if (Object.prototype.hasOwnProperty.call(b, p))
49
+ d[p] = b[p]; };
50
+ return extendStatics(d, b);
51
+ };
52
+ function __extends(d, b) {
53
+ if (typeof b !== "function" && b !== null)
54
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
55
+ extendStatics(d, b);
56
+ function __() { this.constructor = d; }
57
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
58
+ }
59
+ var __assign = function () {
60
+ __assign = Object.assign || function __assign(t) {
61
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
62
+ s = arguments[i];
63
+ for (var p in s)
64
+ if (Object.prototype.hasOwnProperty.call(s, p))
65
+ t[p] = s[p];
66
+ }
67
+ return t;
68
+ };
69
+ return __assign.apply(this, arguments);
70
+ };
71
+ function __rest(s, e) {
72
+ var t = {};
73
+ for (var p in s)
74
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
75
+ t[p] = s[p];
76
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
77
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
78
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
79
+ t[p[i]] = s[p[i]];
80
+ }
81
+ return t;
82
+ }
83
+ function __decorate(decorators, target, key, desc) {
84
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
85
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
86
+ r = Reflect.decorate(decorators, target, key, desc);
87
+ else
88
+ for (var i = decorators.length - 1; i >= 0; i--)
89
+ if (d = decorators[i])
90
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
91
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
92
+ }
93
+ function __param(paramIndex, decorator) {
94
+ return function (target, key) { decorator(target, key, paramIndex); };
95
+ }
96
+ function __metadata(metadataKey, metadataValue) {
97
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
98
+ return Reflect.metadata(metadataKey, metadataValue);
99
+ }
100
+ function __awaiter(thisArg, _arguments, P, generator) {
101
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
102
+ return new (P || (P = Promise))(function (resolve, reject) {
103
+ function fulfilled(value) { try {
104
+ step(generator.next(value));
105
+ }
106
+ catch (e) {
107
+ reject(e);
108
+ } }
109
+ function rejected(value) { try {
110
+ step(generator["throw"](value));
111
+ }
112
+ catch (e) {
113
+ reject(e);
114
+ } }
115
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
116
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
117
+ });
118
+ }
119
+ function __generator(thisArg, body) {
120
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
121
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
122
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
123
+ function verb(n) { return function (v) { return step([n, v]); }; }
124
+ function step(op) {
125
+ if (f)
126
+ throw new TypeError("Generator is already executing.");
127
+ while (g && (g = 0, op[0] && (_ = 0)), _)
128
+ try {
129
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
130
+ return t;
131
+ if (y = 0, t)
132
+ op = [op[0] & 2, t.value];
133
+ switch (op[0]) {
134
+ case 0:
135
+ case 1:
136
+ t = op;
137
+ break;
138
+ case 4:
139
+ _.label++;
140
+ return { value: op[1], done: false };
141
+ case 5:
142
+ _.label++;
143
+ y = op[1];
144
+ op = [0];
145
+ continue;
146
+ case 7:
147
+ op = _.ops.pop();
148
+ _.trys.pop();
149
+ continue;
150
+ default:
151
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
152
+ _ = 0;
153
+ continue;
154
+ }
155
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
156
+ _.label = op[1];
157
+ break;
158
+ }
159
+ if (op[0] === 6 && _.label < t[1]) {
160
+ _.label = t[1];
161
+ t = op;
162
+ break;
163
+ }
164
+ if (t && _.label < t[2]) {
165
+ _.label = t[2];
166
+ _.ops.push(op);
167
+ break;
168
+ }
169
+ if (t[2])
170
+ _.ops.pop();
171
+ _.trys.pop();
172
+ continue;
173
+ }
174
+ op = body.call(thisArg, _);
175
+ }
176
+ catch (e) {
177
+ op = [6, e];
178
+ y = 0;
179
+ }
180
+ finally {
181
+ f = t = 0;
182
+ }
183
+ if (op[0] & 5)
184
+ throw op[1];
185
+ return { value: op[0] ? op[1] : void 0, done: true };
186
+ }
187
+ }
188
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
189
+ if (k2 === undefined)
190
+ k2 = k;
191
+ var desc = Object.getOwnPropertyDescriptor(m, k);
192
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
193
+ desc = { enumerable: true, get: function () { return m[k]; } };
194
+ }
195
+ Object.defineProperty(o, k2, desc);
196
+ }) : (function (o, m, k, k2) {
197
+ if (k2 === undefined)
198
+ k2 = k;
199
+ o[k2] = m[k];
200
+ });
201
+ function __exportStar(m, o) {
202
+ for (var p in m)
203
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
204
+ __createBinding(o, m, p);
205
+ }
206
+ function __values(o) {
207
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
208
+ if (m)
209
+ return m.call(o);
210
+ if (o && typeof o.length === "number")
211
+ return {
212
+ next: function () {
213
+ if (o && i >= o.length)
214
+ o = void 0;
215
+ return { value: o && o[i++], done: !o };
216
+ }
217
+ };
218
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
219
+ }
220
+ function __read(o, n) {
221
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
222
+ if (!m)
223
+ return o;
224
+ var i = m.call(o), r, ar = [], e;
225
+ try {
226
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
227
+ ar.push(r.value);
228
+ }
229
+ catch (error) {
230
+ e = { error: error };
231
+ }
232
+ finally {
233
+ try {
234
+ if (r && !r.done && (m = i["return"]))
235
+ m.call(i);
236
+ }
237
+ finally {
238
+ if (e)
239
+ throw e.error;
240
+ }
241
+ }
242
+ return ar;
243
+ }
244
+ /** @deprecated */
245
+ function __spread() {
246
+ for (var ar = [], i = 0; i < arguments.length; i++)
247
+ ar = ar.concat(__read(arguments[i]));
248
+ return ar;
249
+ }
250
+ /** @deprecated */
251
+ function __spreadArrays() {
252
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
253
+ s += arguments[i].length;
254
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
255
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
256
+ r[k] = a[j];
257
+ return r;
258
+ }
259
+ function __spreadArray(to, from, pack) {
260
+ if (pack || arguments.length === 2)
261
+ for (var i = 0, l = from.length, ar; i < l; i++) {
262
+ if (ar || !(i in from)) {
263
+ if (!ar)
264
+ ar = Array.prototype.slice.call(from, 0, i);
265
+ ar[i] = from[i];
266
+ }
267
+ }
268
+ return to.concat(ar || Array.prototype.slice.call(from));
269
+ }
270
+ function __await(v) {
271
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
272
+ }
273
+ function __asyncGenerator(thisArg, _arguments, generator) {
274
+ if (!Symbol.asyncIterator)
275
+ throw new TypeError("Symbol.asyncIterator is not defined.");
276
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
277
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
278
+ function verb(n) { if (g[n])
279
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
280
+ function resume(n, v) { try {
281
+ step(g[n](v));
282
+ }
283
+ catch (e) {
284
+ settle(q[0][3], e);
285
+ } }
286
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
287
+ function fulfill(value) { resume("next", value); }
288
+ function reject(value) { resume("throw", value); }
289
+ function settle(f, v) { if (f(v), q.shift(), q.length)
290
+ resume(q[0][0], q[0][1]); }
291
+ }
292
+ function __asyncDelegator(o) {
293
+ var i, p;
294
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
295
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
296
+ }
297
+ function __asyncValues(o) {
298
+ if (!Symbol.asyncIterator)
299
+ throw new TypeError("Symbol.asyncIterator is not defined.");
300
+ var m = o[Symbol.asyncIterator], i;
301
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
302
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
303
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
304
+ }
305
+ function __makeTemplateObject(cooked, raw) {
306
+ if (Object.defineProperty) {
307
+ Object.defineProperty(cooked, "raw", { value: raw });
308
+ }
309
+ else {
310
+ cooked.raw = raw;
311
+ }
312
+ return cooked;
313
+ }
314
+ ;
315
+ var __setModuleDefault = Object.create ? (function (o, v) {
316
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
317
+ }) : function (o, v) {
318
+ o["default"] = v;
319
+ };
320
+ function __importStar(mod) {
321
+ if (mod && mod.__esModule)
322
+ return mod;
323
+ var result = {};
324
+ if (mod != null)
325
+ for (var k in mod)
326
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
327
+ __createBinding(result, mod, k);
328
+ __setModuleDefault(result, mod);
329
+ return result;
330
+ }
331
+ function __importDefault(mod) {
332
+ return (mod && mod.__esModule) ? mod : { default: mod };
333
+ }
334
+ function __classPrivateFieldGet(receiver, state, kind, f) {
335
+ if (kind === "a" && !f)
336
+ throw new TypeError("Private accessor was defined without a getter");
337
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
338
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
339
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
340
+ }
341
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
342
+ if (kind === "m")
343
+ throw new TypeError("Private method is not writable");
344
+ if (kind === "a" && !f)
345
+ throw new TypeError("Private accessor was defined without a setter");
346
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
347
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
348
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
349
+ }
350
+ function __classPrivateFieldIn(state, receiver) {
351
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
352
+ throw new TypeError("Cannot use 'in' operator on non-object");
353
+ return typeof state === "function" ? receiver === state : state.has(receiver);
354
+ }
355
+
356
+ var TuiTilesComponent = /** @class */ (function () {
357
+ function TuiTilesComponent(elementRef) {
358
+ this.elementRef = elementRef;
359
+ this.items = [];
360
+ this.itemsChange = new i0.EventEmitter();
361
+ this.element = null;
362
+ }
363
+ TuiTilesComponent.prototype.reorder = function (element) {
364
+ if (!this.element || !element || this.element === element) {
365
+ return;
366
+ }
367
+ var elements = Array.from(this.elementRef.nativeElement.children);
368
+ var currentIndex = elements.indexOf(this.element);
369
+ var newIndex = elements.indexOf(element);
370
+ var items = __spreadArray([], __read(this.items));
371
+ var dragged = items[currentIndex];
372
+ items[currentIndex] = items[newIndex];
373
+ items[newIndex] = dragged;
374
+ this.itemsChange.emit(items);
375
+ };
376
+ return TuiTilesComponent;
377
+ }());
378
+ TuiTilesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiTilesComponent, deps: [{ token: i0.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
379
+ TuiTilesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiTilesComponent, selector: "tui-tiles", inputs: { items: "items" }, outputs: { itemsChange: "itemsChange" }, host: { listeners: { "pointerleave": "reorder()" }, properties: { "class._dragged": "this.element" } }, providers: [
380
+ cdk.TuiResizeService,
381
+ mutationObserver.MutationObserverService,
382
+ {
383
+ provide: mutationObserver.MUTATION_OBSERVER_INIT,
384
+ useValue: { childList: true },
385
+ },
386
+ ], ngImport: i0__namespace, template: "\n <ng-content></ng-content>\n ", isInline: true, styles: ["tui-tiles{position:relative;z-index:0;display:grid;grid-auto-flow:dense;justify-items:stretch}tui-tiles._dragged tui-tile>.t-wrapper{pointer-events:none}tui-tiles._dragged tui-tile:not(._dragged)>.t-wrapper{transition:all .3s}tui-tiles:not(._dragged) tui-tile._dragged>.t-wrapper{transition:all .3s}tui-tile>.t-wrapper{position:absolute;z-index:0}tui-tile._dragged>.t-wrapper{z-index:1;transition:none}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
387
+ __decorate([
388
+ cdk.tuiDefaultProp()
389
+ ], TuiTilesComponent.prototype, "items", void 0);
390
+ __decorate([
391
+ cdk.tuiDebounce(500)
392
+ ], TuiTilesComponent.prototype, "reorder", null);
393
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiTilesComponent, decorators: [{
394
+ type: i0.Component,
395
+ args: [{
396
+ selector: "tui-tiles",
397
+ template: "\n <ng-content></ng-content>\n ",
398
+ styleUrls: ["tiles.style.less"],
399
+ encapsulation: i0.ViewEncapsulation.None,
400
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
401
+ providers: [
402
+ cdk.TuiResizeService,
403
+ mutationObserver.MutationObserverService,
404
+ {
405
+ provide: mutationObserver.MUTATION_OBSERVER_INIT,
406
+ useValue: { childList: true },
407
+ },
408
+ ],
409
+ }]
410
+ }], ctorParameters: function () {
411
+ return [{ type: i0__namespace.ElementRef, decorators: [{
412
+ type: i0.Inject,
413
+ args: [i0.ElementRef]
414
+ }] }];
415
+ }, propDecorators: { items: [{
416
+ type: i0.Input
417
+ }], itemsChange: [{
418
+ type: i0.Output
419
+ }], element: [{
420
+ type: i0.HostBinding,
421
+ args: ["class._dragged"]
422
+ }], reorder: [{
423
+ type: i0.HostListener,
424
+ args: ["pointerleave"]
425
+ }] } });
426
+
427
+ var TuiTileComponent = /** @class */ (function () {
428
+ function TuiTileComponent(ngZone, elementRef, tiles, resize$, mutation$) {
429
+ var _this = this;
430
+ this.ngZone = ngZone;
431
+ this.elementRef = elementRef;
432
+ this.tiles = tiles;
433
+ this.resize$ = resize$;
434
+ this.mutation$ = mutation$;
435
+ this.width = 0;
436
+ this.height = 0;
437
+ this.dragged = false;
438
+ this.offset$ = new i3.BehaviorSubject([0, 0]);
439
+ this.position$ = i3.combineLatest([
440
+ this.offset$.pipe(operators.distinctUntilChanged(cdk.tuiArrayShallowEquals)),
441
+ this.resize$.pipe(operators.startWith(null)),
442
+ this.mutation$.pipe(operators.startWith(null)),
443
+ ]).pipe(operators.map(function (_a) {
444
+ var _b = __read(_a, 1), _c = __read(_b[0], 2), left = _c[0], top = _c[1];
445
+ return ({
446
+ top: top || _this.element.offsetTop,
447
+ left: left || _this.element.offsetLeft,
448
+ width: _this.element.clientWidth,
449
+ height: _this.element.clientHeight,
450
+ });
451
+ }), cdk.tuiZonefull(this.ngZone));
452
+ }
453
+ Object.defineProperty(TuiTileComponent.prototype, "column", {
454
+ get: function () {
455
+ return "span " + this.width;
456
+ },
457
+ enumerable: false,
458
+ configurable: true
459
+ });
460
+ Object.defineProperty(TuiTileComponent.prototype, "row", {
461
+ get: function () {
462
+ return "span " + this.height;
463
+ },
464
+ enumerable: false,
465
+ configurable: true
466
+ });
467
+ Object.defineProperty(TuiTileComponent.prototype, "element", {
468
+ get: function () {
469
+ return this.elementRef.nativeElement;
470
+ },
471
+ enumerable: false,
472
+ configurable: true
473
+ });
474
+ TuiTileComponent.prototype.onEnter = function () {
475
+ this.tiles.reorder(this.element);
476
+ };
477
+ TuiTileComponent.prototype.onDrag = function (dragged) {
478
+ this.dragged = this.dragged || dragged;
479
+ this.tiles.element = dragged ? this.element : null;
480
+ };
481
+ TuiTileComponent.prototype.onTransitionEnd = function () {
482
+ this.dragged = false;
483
+ };
484
+ return TuiTileComponent;
485
+ }());
486
+ TuiTileComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiTileComponent, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: TuiTilesComponent }, { token: cdk.TuiResizeService }, { token: mutationObserver.MutationObserverService }], target: i0__namespace.ɵɵFactoryTarget.Component });
487
+ TuiTileComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiTileComponent, selector: "tui-tile", inputs: { width: "width", height: "height" }, host: { listeners: { "pointerenter": "onEnter()" }, properties: { "class._dragged": "this.dragged", "style.gridColumn": "this.column", "style.gridRow": "this.row" } }, ngImport: i0__namespace, template: "<div\n *ngIf=\"position$ | async as position\"\n class=\"t-wrapper\"\n [style.top.px]=\"position.top\"\n [style.left.px]=\"position.left\"\n [style.width.px]=\"position.width\"\n [style.height.px]=\"position.height\"\n (transitionend.self)=\"onTransitionEnd()\"\n>\n <ng-content></ng-content>\n</div>\n", directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
488
+ __decorate([
489
+ cdk.tuiDefaultProp()
490
+ ], TuiTileComponent.prototype, "width", void 0);
491
+ __decorate([
492
+ cdk.tuiDefaultProp()
493
+ ], TuiTileComponent.prototype, "height", void 0);
494
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiTileComponent, decorators: [{
495
+ type: i0.Component,
496
+ args: [{
497
+ selector: "tui-tile",
498
+ templateUrl: "tile.template.html",
499
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
500
+ }]
501
+ }], ctorParameters: function () {
502
+ return [{ type: i0__namespace.NgZone, decorators: [{
503
+ type: i0.Inject,
504
+ args: [i0.NgZone]
505
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
506
+ type: i0.Inject,
507
+ args: [i0.ElementRef]
508
+ }] }, { type: TuiTilesComponent, decorators: [{
509
+ type: i0.Inject,
510
+ args: [TuiTilesComponent]
511
+ }] }, { type: i3__namespace.Observable, decorators: [{
512
+ type: i0.Inject,
513
+ args: [cdk.TuiResizeService]
514
+ }] }, { type: i3__namespace.Observable, decorators: [{
515
+ type: i0.Inject,
516
+ args: [mutationObserver.MutationObserverService]
517
+ }] }];
518
+ }, propDecorators: { width: [{
519
+ type: i0.Input
520
+ }], height: [{
521
+ type: i0.Input
522
+ }], dragged: [{
523
+ type: i0.HostBinding,
524
+ args: ["class._dragged"]
525
+ }], column: [{
526
+ type: i0.HostBinding,
527
+ args: ["style.gridColumn"]
528
+ }], row: [{
529
+ type: i0.HostBinding,
530
+ args: ["style.gridRow"]
531
+ }], onEnter: [{
532
+ type: i0.HostListener,
533
+ args: ["pointerenter"]
534
+ }] } });
535
+
536
+ var TuiTileHandleDirective = /** @class */ (function () {
537
+ function TuiTileHandleDirective(tile) {
538
+ this.tile = tile;
539
+ this.x = NaN;
540
+ this.y = NaN;
541
+ }
542
+ TuiTileHandleDirective.prototype.onStart = function (_a) {
543
+ var x = _a.x, y = _a.y, pointerId = _a.pointerId, target = _a.target;
544
+ if (cdk.tuiIsElement(target)) {
545
+ target.releasePointerCapture(pointerId);
546
+ }
547
+ this.onPointer(x, y);
548
+ };
549
+ TuiTileHandleDirective.prototype.onPointer = function (x, y) {
550
+ if (x === void 0) { x = NaN; }
551
+ if (y === void 0) { y = NaN; }
552
+ this.x = x - this.tile.element.offsetLeft;
553
+ this.y = y - this.tile.element.offsetTop;
554
+ this.tile.onDrag(!Number.isNaN(x));
555
+ this.tile.offset$.next([0, 0]);
556
+ };
557
+ TuiTileHandleDirective.prototype.onMove = function (x, y) {
558
+ if (!Number.isNaN(this.x)) {
559
+ this.tile.offset$.next([x - this.x, y - this.y]);
560
+ }
561
+ };
562
+ return TuiTileHandleDirective;
563
+ }());
564
+ TuiTileHandleDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiTileHandleDirective, deps: [{ token: TuiTileComponent }], target: i0__namespace.ɵɵFactoryTarget.Directive });
565
+ TuiTileHandleDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiTileHandleDirective, selector: "[tuiTileHandle]", host: { listeners: { "pointerdown.silent.prevent": "onStart($event)", "document:pointerup.silent": "onPointer()", "document:pointermove.silent": "onMove($event.x,$event.y)" }, properties: { "style.touchAction": "\"none\"" } }, ngImport: i0__namespace });
566
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiTileHandleDirective, decorators: [{
567
+ type: i0.Directive,
568
+ args: [{
569
+ selector: "[tuiTileHandle]",
570
+ host: {
571
+ '[style.touchAction]': "\"none\"",
572
+ },
573
+ }]
574
+ }], ctorParameters: function () {
575
+ return [{ type: TuiTileComponent, decorators: [{
576
+ type: i0.Inject,
577
+ args: [TuiTileComponent]
578
+ }] }];
579
+ }, propDecorators: { onStart: [{
580
+ type: i0.HostListener,
581
+ args: ["pointerdown.silent.prevent", ["$event"]]
582
+ }], onPointer: [{
583
+ type: i0.HostListener,
584
+ args: ["document:pointerup.silent"]
585
+ }], onMove: [{
586
+ type: i0.HostListener,
587
+ args: ["document:pointermove.silent", ["$event.x", "$event.y"]]
588
+ }] } });
589
+
590
+ var TuiTilesModule = /** @class */ (function () {
591
+ function TuiTilesModule() {
592
+ }
593
+ return TuiTilesModule;
594
+ }());
595
+ TuiTilesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiTilesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
596
+ TuiTilesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiTilesModule, declarations: [TuiTilesComponent, TuiTileComponent, TuiTileHandleDirective], imports: [i1.CommonModule], exports: [TuiTilesComponent, TuiTileComponent, TuiTileHandleDirective] });
597
+ TuiTilesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiTilesModule, imports: [[i1.CommonModule]] });
598
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiTilesModule, decorators: [{
599
+ type: i0.NgModule,
600
+ args: [{
601
+ imports: [i1.CommonModule],
602
+ declarations: [TuiTilesComponent, TuiTileComponent, TuiTileHandleDirective],
603
+ exports: [TuiTilesComponent, TuiTileComponent, TuiTileHandleDirective],
604
+ }]
605
+ }] });
606
+
607
+ /**
608
+ * Generated bundle index. Do not edit.
609
+ */
610
+
611
+ exports.TuiTileComponent = TuiTileComponent;
612
+ exports.TuiTileHandleDirective = TuiTileHandleDirective;
613
+ exports.TuiTilesComponent = TuiTilesComponent;
614
+ exports.TuiTilesModule = TuiTilesModule;
615
+
616
+ Object.defineProperty(exports, '__esModule', { value: true });
617
+
618
+ }));
619
+ //# sourceMappingURL=taiga-ui-kit-components-tiles.umd.js.map