@taiga-ui/kit 2.35.0 → 2.37.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 (473) hide show
  1. package/abstract/input-slider.d.ts +22 -3
  2. package/abstract/taiga-ui-kit-abstract.metadata.json +1 -1
  3. package/bundles/taiga-ui-kit-abstract.umd.js +65 -17
  4. package/bundles/taiga-ui-kit-abstract.umd.js.map +1 -1
  5. package/bundles/taiga-ui-kit-abstract.umd.min.js +2 -2
  6. package/bundles/taiga-ui-kit-abstract.umd.min.js.map +1 -1
  7. package/bundles/taiga-ui-kit-components-accordion.umd.js +1 -1
  8. package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
  9. package/bundles/taiga-ui-kit-components-accordion.umd.min.js +1 -1
  10. package/bundles/taiga-ui-kit-components-accordion.umd.min.js.map +1 -1
  11. package/bundles/taiga-ui-kit-components-arrow.umd.js.map +1 -1
  12. package/bundles/taiga-ui-kit-components-arrow.umd.min.js.map +1 -1
  13. package/bundles/taiga-ui-kit-components-badge.umd.js.map +1 -1
  14. package/bundles/taiga-ui-kit-components-badge.umd.min.js.map +1 -1
  15. package/bundles/taiga-ui-kit-components-badged-content.umd.js +1 -1
  16. package/bundles/taiga-ui-kit-components-badged-content.umd.js.map +1 -1
  17. package/bundles/taiga-ui-kit-components-badged-content.umd.min.js +1 -1
  18. package/bundles/taiga-ui-kit-components-badged-content.umd.min.js.map +1 -1
  19. package/bundles/taiga-ui-kit-components-combo-box.umd.js +1 -1
  20. package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
  21. package/bundles/taiga-ui-kit-components-combo-box.umd.min.js +1 -1
  22. package/bundles/taiga-ui-kit-components-combo-box.umd.min.js.map +1 -1
  23. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +4 -4
  24. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
  25. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js +2 -2
  26. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.min.js.map +1 -1
  27. package/bundles/taiga-ui-kit-components-files.umd.js +504 -0
  28. package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -0
  29. package/bundles/taiga-ui-kit-components-files.umd.min.js +16 -0
  30. package/bundles/taiga-ui-kit-components-files.umd.min.js.map +1 -0
  31. package/bundles/taiga-ui-kit-components-input-count.umd.js +2 -2
  32. package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
  33. package/bundles/taiga-ui-kit-components-input-count.umd.min.js +1 -1
  34. package/bundles/taiga-ui-kit-components-input-count.umd.min.js.map +1 -1
  35. package/bundles/taiga-ui-kit-components-input-date-range.umd.js +3 -1
  36. package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
  37. package/bundles/taiga-ui-kit-components-input-date-range.umd.min.js.map +1 -1
  38. package/bundles/taiga-ui-kit-components-input-date-time.umd.js +1 -1
  39. package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
  40. package/bundles/taiga-ui-kit-components-input-date-time.umd.min.js +1 -1
  41. package/bundles/taiga-ui-kit-components-input-date-time.umd.min.js.map +1 -1
  42. package/bundles/taiga-ui-kit-components-input-date.umd.js +4 -2
  43. package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
  44. package/bundles/taiga-ui-kit-components-input-date.umd.min.js +1 -1
  45. package/bundles/taiga-ui-kit-components-input-date.umd.min.js.map +1 -1
  46. package/bundles/taiga-ui-kit-components-input-file.umd.js +43 -45
  47. package/bundles/taiga-ui-kit-components-input-file.umd.js.map +1 -1
  48. package/bundles/taiga-ui-kit-components-input-file.umd.min.js +1 -1
  49. package/bundles/taiga-ui-kit-components-input-file.umd.min.js.map +1 -1
  50. package/bundles/taiga-ui-kit-components-input-files.umd.js +490 -0
  51. package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -0
  52. package/bundles/taiga-ui-kit-components-input-files.umd.min.js +16 -0
  53. package/bundles/taiga-ui-kit-components-input-files.umd.min.js.map +1 -0
  54. package/bundles/taiga-ui-kit-components-input-number.umd.js +16 -14
  55. package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
  56. package/bundles/taiga-ui-kit-components-input-number.umd.min.js +1 -1
  57. package/bundles/taiga-ui-kit-components-input-number.umd.min.js.map +1 -1
  58. package/bundles/taiga-ui-kit-components-input-password.umd.js +2 -2
  59. package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
  60. package/bundles/taiga-ui-kit-components-input-password.umd.min.js +1 -1
  61. package/bundles/taiga-ui-kit-components-input-password.umd.min.js.map +1 -1
  62. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +20 -8
  63. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
  64. package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js +2 -2
  65. package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js.map +1 -1
  66. package/bundles/taiga-ui-kit-components-input-phone.umd.js +5 -4
  67. package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
  68. package/bundles/taiga-ui-kit-components-input-phone.umd.min.js +1 -1
  69. package/bundles/taiga-ui-kit-components-input-phone.umd.min.js.map +1 -1
  70. package/bundles/taiga-ui-kit-components-input-range.umd.js +16 -4
  71. package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
  72. package/bundles/taiga-ui-kit-components-input-range.umd.min.js +2 -2
  73. package/bundles/taiga-ui-kit-components-input-range.umd.min.js.map +1 -1
  74. package/bundles/taiga-ui-kit-components-input-slider.umd.js +61 -14
  75. package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
  76. package/bundles/taiga-ui-kit-components-input-slider.umd.min.js +2 -2
  77. package/bundles/taiga-ui-kit-components-input-slider.umd.min.js.map +1 -1
  78. package/bundles/taiga-ui-kit-components-input-tag.umd.js +2 -2
  79. package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
  80. package/bundles/taiga-ui-kit-components-input-tag.umd.min.js +2 -2
  81. package/bundles/taiga-ui-kit-components-input-tag.umd.min.js.map +1 -1
  82. package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
  83. package/bundles/taiga-ui-kit-components-input-time.umd.min.js.map +1 -1
  84. package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
  85. package/bundles/taiga-ui-kit-components-input.umd.min.js.map +1 -1
  86. package/bundles/taiga-ui-kit-components-line-clamp.umd.js +3 -2
  87. package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
  88. package/bundles/taiga-ui-kit-components-line-clamp.umd.min.js +1 -1
  89. package/bundles/taiga-ui-kit-components-line-clamp.umd.min.js.map +1 -1
  90. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +2 -2
  91. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js.map +1 -1
  92. package/bundles/taiga-ui-kit-components-multi-select-option.umd.min.js +1 -1
  93. package/bundles/taiga-ui-kit-components-multi-select-option.umd.min.js.map +1 -1
  94. package/bundles/taiga-ui-kit-components-multi-select.umd.js +2 -2
  95. package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
  96. package/bundles/taiga-ui-kit-components-multi-select.umd.min.js +1 -1
  97. package/bundles/taiga-ui-kit-components-multi-select.umd.min.js.map +1 -1
  98. package/bundles/taiga-ui-kit-components-pagination.umd.js +1 -1
  99. package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
  100. package/bundles/taiga-ui-kit-components-pagination.umd.min.js +1 -1
  101. package/bundles/taiga-ui-kit-components-pagination.umd.min.js.map +1 -1
  102. package/bundles/taiga-ui-kit-components-progress.umd.js +1 -1
  103. package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
  104. package/bundles/taiga-ui-kit-components-progress.umd.min.js +1 -1
  105. package/bundles/taiga-ui-kit-components-progress.umd.min.js.map +1 -1
  106. package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
  107. package/bundles/taiga-ui-kit-components-radio.umd.min.js.map +1 -1
  108. package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
  109. package/bundles/taiga-ui-kit-components-select.umd.min.js.map +1 -1
  110. package/bundles/taiga-ui-kit-components-slider.umd.js +178 -16
  111. package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
  112. package/bundles/taiga-ui-kit-components-slider.umd.min.js +2 -2
  113. package/bundles/taiga-ui-kit-components-slider.umd.min.js.map +1 -1
  114. package/bundles/taiga-ui-kit-components-text-area.umd.js +50 -13
  115. package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
  116. package/bundles/taiga-ui-kit-components-text-area.umd.min.js +1 -1
  117. package/bundles/taiga-ui-kit-components-text-area.umd.min.js.map +1 -1
  118. package/bundles/taiga-ui-kit-components.umd.js +20 -4
  119. package/bundles/taiga-ui-kit-components.umd.js.map +1 -1
  120. package/bundles/taiga-ui-kit-components.umd.min.js +1 -1
  121. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js +22 -5
  122. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js.map +1 -1
  123. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.min.js +1 -1
  124. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.min.js.map +1 -1
  125. package/bundles/taiga-ui-kit-enums.umd.js.map +1 -1
  126. package/bundles/taiga-ui-kit-enums.umd.min.js.map +1 -1
  127. package/bundles/taiga-ui-kit-pipes-field-error.umd.js +10 -2
  128. package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
  129. package/bundles/taiga-ui-kit-pipes-field-error.umd.min.js +1 -1
  130. package/bundles/taiga-ui-kit-pipes-field-error.umd.min.js.map +1 -1
  131. package/bundles/taiga-ui-kit-tokens.umd.js +8 -0
  132. package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
  133. package/bundles/taiga-ui-kit-tokens.umd.min.js +1 -1
  134. package/bundles/taiga-ui-kit-tokens.umd.min.js.map +1 -1
  135. package/bundles/taiga-ui-kit-utils-files.umd.js +8 -0
  136. package/bundles/taiga-ui-kit-utils-files.umd.js.map +1 -1
  137. package/bundles/taiga-ui-kit-utils-files.umd.min.js +1 -1
  138. package/bundles/taiga-ui-kit-utils-files.umd.min.js.map +1 -1
  139. package/components/arrow/arrow-options.d.ts +4 -2
  140. package/components/arrow/taiga-ui-kit-components-arrow.metadata.json +1 -1
  141. package/components/badge/badge.component.d.ts +2 -1
  142. package/components/badge/taiga-ui-kit-components-badge.metadata.json +1 -1
  143. package/components/combo-box/combo-box.component.d.ts +4 -4
  144. package/components/combo-box/taiga-ui-kit-components-combo-box.metadata.json +1 -1
  145. package/components/data-list-wrapper/taiga-ui-kit-components-data-list-wrapper.metadata.json +1 -1
  146. package/components/files/file/file.component.d.ts +42 -0
  147. package/components/files/files.component.d.ts +12 -0
  148. package/components/files/files.module.d.ts +2 -0
  149. package/components/files/index.d.ts +2 -0
  150. package/components/files/package.json +13 -0
  151. package/components/files/taiga-ui-kit-components-files.d.ts +5 -0
  152. package/components/files/taiga-ui-kit-components-files.metadata.json +1 -0
  153. package/components/index.d.ts +2 -0
  154. package/components/input/input.component.d.ts +2 -2
  155. package/components/input/taiga-ui-kit-components-input.metadata.json +1 -1
  156. package/components/input-count/input-count.component.d.ts +3 -2
  157. package/components/input-count/taiga-ui-kit-components-input-count.metadata.json +1 -1
  158. package/components/input-date/input-date.component.d.ts +5 -3
  159. package/components/input-date/taiga-ui-kit-components-input-date.metadata.json +1 -1
  160. package/components/input-date-range/input-date-range.component.d.ts +3 -2
  161. package/components/input-date-range/taiga-ui-kit-components-input-date-range.metadata.json +1 -1
  162. package/components/input-date-time/input-date-time.component.d.ts +7 -5
  163. package/components/input-date-time/taiga-ui-kit-components-input-date-time.metadata.json +1 -1
  164. package/components/input-file/file/file.component.d.ts +1 -1
  165. package/components/input-file/taiga-ui-kit-components-input-file.metadata.json +1 -1
  166. package/components/input-files/index.d.ts +2 -0
  167. package/components/input-files/input-files.component.d.ts +41 -0
  168. package/components/input-files/input-files.module.d.ts +2 -0
  169. package/components/input-files/package.json +13 -0
  170. package/components/input-files/taiga-ui-kit-components-input-files.d.ts +4 -0
  171. package/components/input-files/taiga-ui-kit-components-input-files.metadata.json +1 -0
  172. package/components/input-number/input-number.component.d.ts +3 -2
  173. package/components/input-number/taiga-ui-kit-components-input-number.metadata.json +1 -1
  174. package/components/input-password/input-password.component.d.ts +4 -3
  175. package/components/input-password/taiga-ui-kit-components-input-password.metadata.json +1 -1
  176. package/components/input-phone/input-phone.component.d.ts +5 -6
  177. package/components/input-phone/taiga-ui-kit-components-input-phone.metadata.json +1 -1
  178. package/components/input-phone-international/input-phone-international.component.d.ts +4 -2
  179. package/components/input-phone-international/taiga-ui-kit-components-input-phone-international.metadata.json +1 -1
  180. package/components/input-range/input-range.component.d.ts +2 -0
  181. package/components/input-range/taiga-ui-kit-components-input-range.metadata.json +1 -1
  182. package/components/input-slider/input-slider.component.d.ts +19 -3
  183. package/components/input-slider/taiga-ui-kit-components-input-slider.metadata.json +1 -1
  184. package/components/input-tag/input-tag.component.d.ts +2 -1
  185. package/components/input-tag/taiga-ui-kit-components-input-tag.metadata.json +1 -1
  186. package/components/input-time/input-time.component.d.ts +2 -2
  187. package/components/input-time/taiga-ui-kit-components-input-time.metadata.json +1 -1
  188. package/components/multi-select/multi-select.component.d.ts +5 -5
  189. package/components/multi-select/taiga-ui-kit-components-multi-select.metadata.json +1 -1
  190. package/components/multi-select-option/taiga-ui-kit-components-multi-select-option.metadata.json +1 -1
  191. package/components/pagination/taiga-ui-kit-components-pagination.metadata.json +1 -1
  192. package/components/progress/utils/calculate-color-segments.d.ts +0 -4
  193. package/components/radio/radio.component.d.ts +1 -1
  194. package/components/select/select.component.d.ts +4 -4
  195. package/components/select/taiga-ui-kit-components-select.metadata.json +1 -1
  196. package/components/slider/index.d.ts +2 -0
  197. package/components/slider/slider-key-steps.directive.d.ts +27 -0
  198. package/components/slider/slider-options.d.ts +9 -0
  199. package/components/slider/slider.component.d.ts +6 -3
  200. package/components/slider/taiga-ui-kit-components-slider.metadata.json +1 -1
  201. package/components/taiga-ui-kit-components.metadata.json +1 -1
  202. package/components/text-area/index.d.ts +1 -0
  203. package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
  204. package/components/text-area/text-area.component.d.ts +2 -1
  205. package/components/text-area/text-area.directive.d.ts +5 -0
  206. package/directives/dropdown-selection/dropdown-selection.directive.d.ts +2 -2
  207. package/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.metadata.json +1 -1
  208. package/enums/file-state.d.ts +1 -0
  209. package/enums/taiga-ui-kit-enums.metadata.json +1 -1
  210. package/esm2015/abstract/input-slider.js +43 -4
  211. package/esm2015/components/accordion/accordion.component.js +2 -2
  212. package/esm2015/components/arrow/arrow-options.js +1 -1
  213. package/esm2015/components/badge/badge.component.js +1 -1
  214. package/esm2015/components/badged-content/badged-content.component.js +3 -3
  215. package/esm2015/components/combo-box/combo-box.component.js +2 -2
  216. package/esm2015/components/data-list-wrapper/data-list-group-wrapper.component.js +3 -3
  217. package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +3 -3
  218. package/esm2015/components/files/file/file.component.js +164 -0
  219. package/esm2015/components/files/files.component.js +45 -0
  220. package/esm2015/components/files/files.module.js +29 -0
  221. package/esm2015/components/files/index.js +3 -0
  222. package/esm2015/components/files/taiga-ui-kit-components-files.js +6 -0
  223. package/esm2015/components/index.js +3 -1
  224. package/esm2015/components/input/input.component.js +1 -1
  225. package/esm2015/components/input-count/input-count.component.js +3 -3
  226. package/esm2015/components/input-date/input-date.component.js +5 -3
  227. package/esm2015/components/input-date-range/input-date-range.component.js +4 -2
  228. package/esm2015/components/input-date-time/input-date-time.component.js +2 -2
  229. package/esm2015/components/input-file/file/file.component.js +19 -19
  230. package/esm2015/components/input-file/input-file.component.js +7 -7
  231. package/esm2015/components/input-file/input-file.module.js +3 -3
  232. package/esm2015/components/input-files/index.js +3 -0
  233. package/esm2015/components/input-files/input-files.component.js +208 -0
  234. package/esm2015/components/input-files/input-files.module.js +34 -0
  235. package/esm2015/components/input-files/taiga-ui-kit-components-input-files.js +5 -0
  236. package/esm2015/components/input-number/input-number.component.js +5 -5
  237. package/esm2015/components/input-password/input-password.component.js +3 -3
  238. package/esm2015/components/input-phone/input-phone.component.js +6 -5
  239. package/esm2015/components/input-phone-international/input-phone-international.component.js +20 -6
  240. package/esm2015/components/input-range/input-range.component.js +18 -6
  241. package/esm2015/components/input-slider/input-slider.component.js +55 -11
  242. package/esm2015/components/input-slider/input-slider.module.js +10 -6
  243. package/esm2015/components/input-tag/input-tag.component.js +3 -3
  244. package/esm2015/components/input-time/input-time.component.js +1 -1
  245. package/esm2015/components/line-clamp/line-clamp.directive.js +5 -4
  246. package/esm2015/components/multi-select/multi-select-group/multi-select-group.component.js +3 -3
  247. package/esm2015/components/multi-select/multi-select.component.js +2 -2
  248. package/esm2015/components/multi-select-option/multi-select-option.component.js +3 -3
  249. package/esm2015/components/pagination/pagination.component.js +2 -2
  250. package/esm2015/components/progress/utils/calculate-color-segments.js +3 -2
  251. package/esm2015/components/radio/radio.component.js +1 -1
  252. package/esm2015/components/select/select.component.js +2 -2
  253. package/esm2015/components/slider/index.js +3 -1
  254. package/esm2015/components/slider/slider-key-steps.directive.js +106 -0
  255. package/esm2015/components/slider/slider-options.js +13 -0
  256. package/esm2015/components/slider/slider.component.js +19 -11
  257. package/esm2015/components/slider/slider.module.js +14 -3
  258. package/esm2015/components/text-area/index.js +2 -1
  259. package/esm2015/components/text-area/text-area.component.js +21 -13
  260. package/esm2015/components/text-area/text-area.directive.js +22 -0
  261. package/esm2015/components/text-area/text-area.module.js +7 -6
  262. package/esm2015/components/text-area/text-area.providers.js +6 -2
  263. package/esm2015/directives/dropdown-selection/dropdown-selection.directive.js +23 -6
  264. package/esm2015/enums/file-state.js +1 -1
  265. package/esm2015/pipes/field-error/field-error-content-pipe.js +11 -3
  266. package/esm2015/tokens/i18n.js +7 -1
  267. package/esm2015/utils/files/get-accept-array.js +7 -0
  268. package/esm2015/utils/files/index.js +2 -1
  269. package/esm5/abstract/input-slider.js +65 -16
  270. package/esm5/components/accordion/accordion.component.js +2 -2
  271. package/esm5/components/arrow/arrow-options.js +1 -1
  272. package/esm5/components/badge/badge.component.js +1 -1
  273. package/esm5/components/badged-content/badged-content.component.js +3 -3
  274. package/esm5/components/combo-box/combo-box.component.js +2 -2
  275. package/esm5/components/data-list-wrapper/data-list-group-wrapper.component.js +3 -3
  276. package/esm5/components/data-list-wrapper/data-list-wrapper.component.js +3 -3
  277. package/esm5/components/files/file/file.component.js +213 -0
  278. package/esm5/components/files/files.component.js +50 -0
  279. package/esm5/components/files/files.module.js +32 -0
  280. package/esm5/components/files/index.js +3 -0
  281. package/esm5/components/files/taiga-ui-kit-components-files.js +6 -0
  282. package/esm5/components/index.js +3 -1
  283. package/esm5/components/input/input.component.js +1 -1
  284. package/esm5/components/input-count/input-count.component.js +3 -3
  285. package/esm5/components/input-date/input-date.component.js +5 -3
  286. package/esm5/components/input-date-range/input-date-range.component.js +4 -2
  287. package/esm5/components/input-date-time/input-date-time.component.js +2 -2
  288. package/esm5/components/input-file/file/file.component.js +37 -37
  289. package/esm5/components/input-file/input-file.component.js +7 -9
  290. package/esm5/components/input-file/input-file.module.js +3 -3
  291. package/esm5/components/input-files/index.js +3 -0
  292. package/esm5/components/input-files/input-files.component.js +239 -0
  293. package/esm5/components/input-files/input-files.module.js +37 -0
  294. package/esm5/components/input-files/taiga-ui-kit-components-input-files.js +5 -0
  295. package/esm5/components/input-number/input-number.component.js +18 -16
  296. package/esm5/components/input-password/input-password.component.js +3 -3
  297. package/esm5/components/input-phone/input-phone.component.js +6 -5
  298. package/esm5/components/input-phone-international/input-phone-international.component.js +21 -9
  299. package/esm5/components/input-range/input-range.component.js +18 -6
  300. package/esm5/components/input-slider/input-slider.component.js +58 -11
  301. package/esm5/components/input-slider/input-slider.module.js +10 -6
  302. package/esm5/components/input-tag/input-tag.component.js +3 -3
  303. package/esm5/components/input-time/input-time.component.js +1 -1
  304. package/esm5/components/line-clamp/line-clamp.directive.js +5 -4
  305. package/esm5/components/multi-select/multi-select-group/multi-select-group.component.js +3 -3
  306. package/esm5/components/multi-select/multi-select.component.js +2 -2
  307. package/esm5/components/multi-select-option/multi-select-option.component.js +3 -3
  308. package/esm5/components/pagination/pagination.component.js +2 -2
  309. package/esm5/components/progress/utils/calculate-color-segments.js +3 -2
  310. package/esm5/components/radio/radio.component.js +1 -1
  311. package/esm5/components/select/select.component.js +2 -2
  312. package/esm5/components/slider/index.js +3 -1
  313. package/esm5/components/slider/slider-key-steps.directive.js +137 -0
  314. package/esm5/components/slider/slider-options.js +14 -0
  315. package/esm5/components/slider/slider.component.js +19 -11
  316. package/esm5/components/slider/slider.module.js +14 -3
  317. package/esm5/components/text-area/index.js +2 -1
  318. package/esm5/components/text-area/text-area.component.js +21 -13
  319. package/esm5/components/text-area/text-area.directive.js +28 -0
  320. package/esm5/components/text-area/text-area.module.js +7 -6
  321. package/esm5/components/text-area/text-area.providers.js +6 -2
  322. package/esm5/directives/dropdown-selection/dropdown-selection.directive.js +23 -6
  323. package/esm5/enums/file-state.js +1 -1
  324. package/esm5/pipes/field-error/field-error-content-pipe.js +11 -3
  325. package/esm5/tokens/i18n.js +7 -1
  326. package/esm5/utils/files/get-accept-array.js +7 -0
  327. package/esm5/utils/files/index.js +2 -1
  328. package/fesm2015/taiga-ui-kit-abstract.js +42 -3
  329. package/fesm2015/taiga-ui-kit-abstract.js.map +1 -1
  330. package/fesm2015/taiga-ui-kit-components-accordion.js +1 -1
  331. package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
  332. package/fesm2015/taiga-ui-kit-components-arrow.js.map +1 -1
  333. package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
  334. package/fesm2015/taiga-ui-kit-components-badged-content.js +2 -2
  335. package/fesm2015/taiga-ui-kit-components-badged-content.js.map +1 -1
  336. package/fesm2015/taiga-ui-kit-components-combo-box.js +1 -1
  337. package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
  338. package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +4 -4
  339. package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
  340. package/fesm2015/taiga-ui-kit-components-files.js +232 -0
  341. package/fesm2015/taiga-ui-kit-components-files.js.map +1 -0
  342. package/fesm2015/taiga-ui-kit-components-input-count.js +2 -2
  343. package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
  344. package/fesm2015/taiga-ui-kit-components-input-date-range.js +3 -1
  345. package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
  346. package/fesm2015/taiga-ui-kit-components-input-date-time.js +1 -1
  347. package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
  348. package/fesm2015/taiga-ui-kit-components-input-date.js +4 -2
  349. package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
  350. package/fesm2015/taiga-ui-kit-components-input-file.js +25 -25
  351. package/fesm2015/taiga-ui-kit-components-input-file.js.map +1 -1
  352. package/fesm2015/taiga-ui-kit-components-input-files.js +242 -0
  353. package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -0
  354. package/fesm2015/taiga-ui-kit-components-input-number.js +4 -4
  355. package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
  356. package/fesm2015/taiga-ui-kit-components-input-password.js +3 -3
  357. package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
  358. package/fesm2015/taiga-ui-kit-components-input-phone-international.js +19 -5
  359. package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  360. package/fesm2015/taiga-ui-kit-components-input-phone.js +5 -4
  361. package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
  362. package/fesm2015/taiga-ui-kit-components-input-range.js +17 -5
  363. package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
  364. package/fesm2015/taiga-ui-kit-components-input-slider.js +61 -15
  365. package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
  366. package/fesm2015/taiga-ui-kit-components-input-tag.js +2 -2
  367. package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
  368. package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
  369. package/fesm2015/taiga-ui-kit-components-input.js.map +1 -1
  370. package/fesm2015/taiga-ui-kit-components-line-clamp.js +4 -3
  371. package/fesm2015/taiga-ui-kit-components-line-clamp.js.map +1 -1
  372. package/fesm2015/taiga-ui-kit-components-multi-select-option.js +2 -2
  373. package/fesm2015/taiga-ui-kit-components-multi-select-option.js.map +1 -1
  374. package/fesm2015/taiga-ui-kit-components-multi-select.js +2 -2
  375. package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
  376. package/fesm2015/taiga-ui-kit-components-pagination.js +1 -1
  377. package/fesm2015/taiga-ui-kit-components-pagination.js.map +1 -1
  378. package/fesm2015/taiga-ui-kit-components-progress.js +2 -2
  379. package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
  380. package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
  381. package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
  382. package/fesm2015/taiga-ui-kit-components-slider.js +143 -16
  383. package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
  384. package/fesm2015/taiga-ui-kit-components-text-area.js +47 -17
  385. package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
  386. package/fesm2015/taiga-ui-kit-components.js +2 -0
  387. package/fesm2015/taiga-ui-kit-components.js.map +1 -1
  388. package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js +22 -5
  389. package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
  390. package/fesm2015/taiga-ui-kit-enums.js.map +1 -1
  391. package/fesm2015/taiga-ui-kit-pipes-field-error.js +10 -2
  392. package/fesm2015/taiga-ui-kit-pipes-field-error.js.map +1 -1
  393. package/fesm2015/taiga-ui-kit-tokens.js +7 -1
  394. package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
  395. package/fesm2015/taiga-ui-kit-utils-files.js +8 -1
  396. package/fesm2015/taiga-ui-kit-utils-files.js.map +1 -1
  397. package/fesm5/taiga-ui-kit-abstract.js +64 -15
  398. package/fesm5/taiga-ui-kit-abstract.js.map +1 -1
  399. package/fesm5/taiga-ui-kit-components-accordion.js +1 -1
  400. package/fesm5/taiga-ui-kit-components-accordion.js.map +1 -1
  401. package/fesm5/taiga-ui-kit-components-arrow.js.map +1 -1
  402. package/fesm5/taiga-ui-kit-components-badge.js.map +1 -1
  403. package/fesm5/taiga-ui-kit-components-badged-content.js +2 -2
  404. package/fesm5/taiga-ui-kit-components-badged-content.js.map +1 -1
  405. package/fesm5/taiga-ui-kit-components-combo-box.js +1 -1
  406. package/fesm5/taiga-ui-kit-components-combo-box.js.map +1 -1
  407. package/fesm5/taiga-ui-kit-components-data-list-wrapper.js +4 -4
  408. package/fesm5/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
  409. package/fesm5/taiga-ui-kit-components-files.js +289 -0
  410. package/fesm5/taiga-ui-kit-components-files.js.map +1 -0
  411. package/fesm5/taiga-ui-kit-components-input-count.js +2 -2
  412. package/fesm5/taiga-ui-kit-components-input-count.js.map +1 -1
  413. package/fesm5/taiga-ui-kit-components-input-date-range.js +3 -1
  414. package/fesm5/taiga-ui-kit-components-input-date-range.js.map +1 -1
  415. package/fesm5/taiga-ui-kit-components-input-date-time.js +1 -1
  416. package/fesm5/taiga-ui-kit-components-input-date-time.js.map +1 -1
  417. package/fesm5/taiga-ui-kit-components-input-date.js +4 -2
  418. package/fesm5/taiga-ui-kit-components-input-date.js.map +1 -1
  419. package/fesm5/taiga-ui-kit-components-input-file.js +43 -45
  420. package/fesm5/taiga-ui-kit-components-input-file.js.map +1 -1
  421. package/fesm5/taiga-ui-kit-components-input-files.js +276 -0
  422. package/fesm5/taiga-ui-kit-components-input-files.js.map +1 -0
  423. package/fesm5/taiga-ui-kit-components-input-number.js +17 -15
  424. package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
  425. package/fesm5/taiga-ui-kit-components-input-password.js +3 -3
  426. package/fesm5/taiga-ui-kit-components-input-password.js.map +1 -1
  427. package/fesm5/taiga-ui-kit-components-input-phone-international.js +20 -8
  428. package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  429. package/fesm5/taiga-ui-kit-components-input-phone.js +5 -4
  430. package/fesm5/taiga-ui-kit-components-input-phone.js.map +1 -1
  431. package/fesm5/taiga-ui-kit-components-input-range.js +17 -5
  432. package/fesm5/taiga-ui-kit-components-input-range.js.map +1 -1
  433. package/fesm5/taiga-ui-kit-components-input-slider.js +65 -16
  434. package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
  435. package/fesm5/taiga-ui-kit-components-input-tag.js +2 -2
  436. package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
  437. package/fesm5/taiga-ui-kit-components-input-time.js.map +1 -1
  438. package/fesm5/taiga-ui-kit-components-input.js.map +1 -1
  439. package/fesm5/taiga-ui-kit-components-line-clamp.js +4 -3
  440. package/fesm5/taiga-ui-kit-components-line-clamp.js.map +1 -1
  441. package/fesm5/taiga-ui-kit-components-multi-select-option.js +2 -2
  442. package/fesm5/taiga-ui-kit-components-multi-select-option.js.map +1 -1
  443. package/fesm5/taiga-ui-kit-components-multi-select.js +2 -2
  444. package/fesm5/taiga-ui-kit-components-multi-select.js.map +1 -1
  445. package/fesm5/taiga-ui-kit-components-pagination.js +1 -1
  446. package/fesm5/taiga-ui-kit-components-pagination.js.map +1 -1
  447. package/fesm5/taiga-ui-kit-components-progress.js +2 -2
  448. package/fesm5/taiga-ui-kit-components-progress.js.map +1 -1
  449. package/fesm5/taiga-ui-kit-components-radio.js.map +1 -1
  450. package/fesm5/taiga-ui-kit-components-select.js.map +1 -1
  451. package/fesm5/taiga-ui-kit-components-slider.js +175 -17
  452. package/fesm5/taiga-ui-kit-components-slider.js.map +1 -1
  453. package/fesm5/taiga-ui-kit-components-text-area.js +53 -17
  454. package/fesm5/taiga-ui-kit-components-text-area.js.map +1 -1
  455. package/fesm5/taiga-ui-kit-components.js +2 -0
  456. package/fesm5/taiga-ui-kit-components.js.map +1 -1
  457. package/fesm5/taiga-ui-kit-directives-dropdown-selection.js +22 -5
  458. package/fesm5/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
  459. package/fesm5/taiga-ui-kit-enums.js.map +1 -1
  460. package/fesm5/taiga-ui-kit-pipes-field-error.js +10 -2
  461. package/fesm5/taiga-ui-kit-pipes-field-error.js.map +1 -1
  462. package/fesm5/taiga-ui-kit-tokens.js +7 -1
  463. package/fesm5/taiga-ui-kit-tokens.js.map +1 -1
  464. package/fesm5/taiga-ui-kit-utils-files.js +8 -1
  465. package/fesm5/taiga-ui-kit-utils-files.js.map +1 -1
  466. package/package.json +4 -4
  467. package/pipes/field-error/field-error-content-pipe.d.ts +1 -0
  468. package/pipes/field-error/taiga-ui-kit-pipes-field-error.metadata.json +1 -1
  469. package/tokens/i18n.d.ts +2 -0
  470. package/tokens/taiga-ui-kit-tokens.metadata.json +1 -1
  471. package/utils/files/get-accept-array.d.ts +1 -0
  472. package/utils/files/index.d.ts +1 -0
  473. package/utils/files/taiga-ui-kit-utils-files.metadata.json +1 -1
@@ -0,0 +1,490 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/kit/tokens'), require('@taiga-ui/kit/utils/files'), require('rxjs'), require('rxjs/operators'), require('@angular/common'), require('@tinkoff/ng-polymorpheus')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-files', ['exports', '@angular/core', '@angular/forms', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/tokens', '@taiga-ui/kit/utils/files', 'rxjs', 'rxjs/operators', '@angular/common', '@tinkoff/ng-polymorpheus'], factory) :
4
+ (global = 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['input-files'] = {}), global.ng.core, global.ng.forms, global.cdk, global.core$1, global['taiga-ui'].kit.tokens, global['taiga-ui'].kit.utils.files, global.rxjs, global.rxjs.operators, global.ng.common, global.ngPolymorpheus));
5
+ }(this, (function (exports, core, forms, cdk, core$1, tokens, files, rxjs, operators, common, ngPolymorpheus) { 'use strict';
6
+
7
+ /*! *****************************************************************************
8
+ Copyright (c) Microsoft Corporation.
9
+
10
+ Permission to use, copy, modify, and/or distribute this software for any
11
+ purpose with or without fee is hereby granted.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
+ PERFORMANCE OF THIS SOFTWARE.
20
+ ***************************************************************************** */
21
+ /* global Reflect, Promise */
22
+
23
+ var extendStatics = function(d, b) {
24
+ extendStatics = Object.setPrototypeOf ||
25
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27
+ return extendStatics(d, b);
28
+ };
29
+
30
+ function __extends(d, b) {
31
+ extendStatics(d, b);
32
+ function __() { this.constructor = d; }
33
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
+ }
35
+
36
+ var __assign = function() {
37
+ __assign = Object.assign || function __assign(t) {
38
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
39
+ s = arguments[i];
40
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
41
+ }
42
+ return t;
43
+ };
44
+ return __assign.apply(this, arguments);
45
+ };
46
+
47
+ function __rest(s, e) {
48
+ var t = {};
49
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
+ t[p] = s[p];
51
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
+ t[p[i]] = s[p[i]];
55
+ }
56
+ return t;
57
+ }
58
+
59
+ function __decorate(decorators, target, key, desc) {
60
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
62
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
63
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
64
+ }
65
+
66
+ function __param(paramIndex, decorator) {
67
+ return function (target, key) { decorator(target, key, paramIndex); }
68
+ }
69
+
70
+ function __metadata(metadataKey, metadataValue) {
71
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
72
+ }
73
+
74
+ function __awaiter(thisArg, _arguments, P, generator) {
75
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
76
+ return new (P || (P = Promise))(function (resolve, reject) {
77
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
78
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
79
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
80
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
81
+ });
82
+ }
83
+
84
+ function __generator(thisArg, body) {
85
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
86
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
87
+ function verb(n) { return function (v) { return step([n, v]); }; }
88
+ function step(op) {
89
+ if (f) throw new TypeError("Generator is already executing.");
90
+ while (_) try {
91
+ 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) return t;
92
+ if (y = 0, t) op = [op[0] & 2, t.value];
93
+ switch (op[0]) {
94
+ case 0: case 1: t = op; break;
95
+ case 4: _.label++; return { value: op[1], done: false };
96
+ case 5: _.label++; y = op[1]; op = [0]; continue;
97
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
98
+ default:
99
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
100
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
101
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
102
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
103
+ if (t[2]) _.ops.pop();
104
+ _.trys.pop(); continue;
105
+ }
106
+ op = body.call(thisArg, _);
107
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
108
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
109
+ }
110
+ }
111
+
112
+ function __createBinding(o, m, k, k2) {
113
+ if (k2 === undefined) k2 = k;
114
+ o[k2] = m[k];
115
+ }
116
+
117
+ function __exportStar(m, exports) {
118
+ for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
119
+ }
120
+
121
+ function __values(o) {
122
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
123
+ if (m) return m.call(o);
124
+ if (o && typeof o.length === "number") return {
125
+ next: function () {
126
+ if (o && i >= o.length) o = void 0;
127
+ return { value: o && o[i++], done: !o };
128
+ }
129
+ };
130
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
131
+ }
132
+
133
+ function __read(o, n) {
134
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
135
+ if (!m) return o;
136
+ var i = m.call(o), r, ar = [], e;
137
+ try {
138
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
139
+ }
140
+ catch (error) { e = { error: error }; }
141
+ finally {
142
+ try {
143
+ if (r && !r.done && (m = i["return"])) m.call(i);
144
+ }
145
+ finally { if (e) throw e.error; }
146
+ }
147
+ return ar;
148
+ }
149
+
150
+ function __spread() {
151
+ for (var ar = [], i = 0; i < arguments.length; i++)
152
+ ar = ar.concat(__read(arguments[i]));
153
+ return ar;
154
+ }
155
+
156
+ function __spreadArrays() {
157
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
158
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
159
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
160
+ r[k] = a[j];
161
+ return r;
162
+ };
163
+
164
+ function __await(v) {
165
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
166
+ }
167
+
168
+ function __asyncGenerator(thisArg, _arguments, generator) {
169
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
170
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
171
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
172
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
173
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
174
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
175
+ function fulfill(value) { resume("next", value); }
176
+ function reject(value) { resume("throw", value); }
177
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
178
+ }
179
+
180
+ function __asyncDelegator(o) {
181
+ var i, p;
182
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
183
+ 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; }
184
+ }
185
+
186
+ function __asyncValues(o) {
187
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
188
+ var m = o[Symbol.asyncIterator], i;
189
+ 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);
190
+ 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); }); }; }
191
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
192
+ }
193
+
194
+ function __makeTemplateObject(cooked, raw) {
195
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
196
+ return cooked;
197
+ };
198
+
199
+ function __importStar(mod) {
200
+ if (mod && mod.__esModule) return mod;
201
+ var result = {};
202
+ if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
203
+ result.default = mod;
204
+ return result;
205
+ }
206
+
207
+ function __importDefault(mod) {
208
+ return (mod && mod.__esModule) ? mod : { default: mod };
209
+ }
210
+
211
+ function __classPrivateFieldGet(receiver, privateMap) {
212
+ if (!privateMap.has(receiver)) {
213
+ throw new TypeError("attempted to get private field on non-instance");
214
+ }
215
+ return privateMap.get(receiver);
216
+ }
217
+
218
+ function __classPrivateFieldSet(receiver, privateMap, value) {
219
+ if (!privateMap.has(receiver)) {
220
+ throw new TypeError("attempted to set private field on non-instance");
221
+ }
222
+ privateMap.set(receiver, value);
223
+ return value;
224
+ }
225
+
226
+ var DEFAULT_MAX_SIZE = 30 * 1000 * 1000; // 30 MB
227
+ // @dynamic
228
+ var TuiInputFilesComponent = /** @class */ (function (_super) {
229
+ __extends(TuiInputFilesComponent, _super);
230
+ function TuiInputFilesComponent(control, changeDetectorRef, isMobile, inputFileTexts$, units$) {
231
+ var _this = _super.call(this, control, changeDetectorRef) || this;
232
+ _this.isMobile = isMobile;
233
+ _this.inputFileTexts$ = inputFileTexts$;
234
+ _this.units$ = units$;
235
+ _this.dataTransfer = null;
236
+ _this.link = '';
237
+ _this.label = '';
238
+ _this.accept = '';
239
+ _this.multiple = false;
240
+ _this.size = 'm';
241
+ _this.maxFileSize = DEFAULT_MAX_SIZE;
242
+ _this.reject = new core.EventEmitter();
243
+ return _this;
244
+ }
245
+ TuiInputFilesComponent_1 = TuiInputFilesComponent;
246
+ Object.defineProperty(TuiInputFilesComponent.prototype, "nativeFocusableElement", {
247
+ get: function () {
248
+ var _a;
249
+ return ((_a = this.input) === null || _a === void 0 ? void 0 : _a.nativeElement) || null;
250
+ },
251
+ enumerable: true,
252
+ configurable: true
253
+ });
254
+ Object.defineProperty(TuiInputFilesComponent.prototype, "focused", {
255
+ get: function () {
256
+ return cdk.isNativeFocused(this.nativeFocusableElement);
257
+ },
258
+ enumerable: true,
259
+ configurable: true
260
+ });
261
+ Object.defineProperty(TuiInputFilesComponent.prototype, "computedLink$", {
262
+ get: function () {
263
+ return this.computeLink$(this.fileDragged, this.multiple, this.link);
264
+ },
265
+ enumerable: true,
266
+ configurable: true
267
+ });
268
+ Object.defineProperty(TuiInputFilesComponent.prototype, "computedLabel$", {
269
+ get: function () {
270
+ return this.computeLabel$(this.isMobile, this.fileDragged, this.multiple, this.label);
271
+ },
272
+ enumerable: true,
273
+ configurable: true
274
+ });
275
+ Object.defineProperty(TuiInputFilesComponent.prototype, "fileDragged", {
276
+ get: function () {
277
+ var _a;
278
+ return !!((_a = this.dataTransfer) === null || _a === void 0 ? void 0 : _a.types.includes('Files'));
279
+ },
280
+ enumerable: true,
281
+ configurable: true
282
+ });
283
+ Object.defineProperty(TuiInputFilesComponent.prototype, "arrayValue", {
284
+ get: function () {
285
+ return this.getValueArray(this.value);
286
+ },
287
+ enumerable: true,
288
+ configurable: true
289
+ });
290
+ TuiInputFilesComponent.prototype.onHovered = function (hovered) {
291
+ this.updateHovered(hovered);
292
+ };
293
+ TuiInputFilesComponent.prototype.onFocused = function (focused) {
294
+ this.updateFocused(focused);
295
+ };
296
+ TuiInputFilesComponent.prototype.onPressed = function (pressed) {
297
+ this.updatePressed(pressed);
298
+ };
299
+ TuiInputFilesComponent.prototype.onFilesSelected = function (input, texts, units) {
300
+ this.processSelectedFiles(input.files, texts, units);
301
+ input.value = '';
302
+ };
303
+ TuiInputFilesComponent.prototype.onDropped = function (event, texts, units) {
304
+ this.processSelectedFiles(event.files, texts, units);
305
+ };
306
+ TuiInputFilesComponent.prototype.onDragOver = function (dataTransfer) {
307
+ this.dataTransfer = dataTransfer;
308
+ };
309
+ TuiInputFilesComponent.prototype.removeFile = function (removedFile) {
310
+ this.updateValue(this.multiple ? this.arrayValue.filter(function (file) { return file !== removedFile; }) : null);
311
+ };
312
+ TuiInputFilesComponent.prototype.computeLink$ = function (fileDragged, multiple, link) {
313
+ return fileDragged
314
+ ? rxjs.of('')
315
+ : this.inputFileTexts$.pipe(operators.map(function (texts) {
316
+ return multiple && link === ''
317
+ ? texts.defaultLinkMultiple
318
+ : link || texts.defaultLinkSingle;
319
+ }));
320
+ };
321
+ TuiInputFilesComponent.prototype.computeLabel$ = function (isMobile, fileDragged, multiple, label) {
322
+ if (isMobile) {
323
+ return rxjs.of('');
324
+ }
325
+ if (fileDragged) {
326
+ return this.inputFileTexts$.pipe(operators.map(function (texts) { return (multiple ? texts.dropMultiple : texts.drop); }));
327
+ }
328
+ return this.inputFileTexts$.pipe(operators.map(function (texts) {
329
+ return multiple && label === ''
330
+ ? texts.defaultLabelMultiple
331
+ : label || texts.defaultLabelSingle;
332
+ }));
333
+ };
334
+ TuiInputFilesComponent.prototype.getValueArray = function (value) {
335
+ if (!value) {
336
+ return cdk.EMPTY_ARRAY;
337
+ }
338
+ return Array.isArray(value) ? value : [value];
339
+ };
340
+ TuiInputFilesComponent.prototype.processSelectedFiles = function (files$1, texts, units) {
341
+ var _this = this;
342
+ // IE11 after selecting a file through the open dialog generates a second event passing an empty FileList.
343
+ if (!(files$1 === null || files$1 === void 0 ? void 0 : files$1.length)) {
344
+ return;
345
+ }
346
+ var newFiles = this.multiple ? Array.from(files$1) : [files$1[0]];
347
+ var tooBigFiles = newFiles.filter(function (file) { return file.size > _this.maxFileSize; });
348
+ var wrongFormatFiles = newFiles.filter(function (file) { return !_this.isFormatAcceptable(file) && !tooBigFiles.includes(file); });
349
+ var acceptedFiles = newFiles.filter(function (file) { return !tooBigFiles.includes(file) && !wrongFormatFiles.includes(file); });
350
+ if (tooBigFiles.length || wrongFormatFiles.length) {
351
+ this.rejectFiles(__spread(tooBigFiles.map(function (file) { return ({
352
+ name: file.name,
353
+ type: file.type,
354
+ size: file.size,
355
+ content: texts.maxSizeRejectionReason +
356
+ files.formatSize(units, _this.maxFileSize),
357
+ }); }), wrongFormatFiles.map(function (file) { return ({
358
+ name: file.name,
359
+ type: file.type,
360
+ size: file.size,
361
+ content: texts.formatRejectionReason,
362
+ }); })));
363
+ }
364
+ this.updateValue(this.multiple
365
+ ? __spread(this.arrayValue, acceptedFiles) : acceptedFiles[0] || null);
366
+ };
367
+ TuiInputFilesComponent.prototype.isFormatAcceptable = function (file) {
368
+ if (!this.accept) {
369
+ return true;
370
+ }
371
+ var extension = "." + (file.name.split('.').pop() || '').toLowerCase();
372
+ return files.getAcceptArray(this.accept).some(function (format) {
373
+ return format === extension ||
374
+ format === file.type ||
375
+ (format.split('/')[1] === '*' &&
376
+ file.type.split('/')[0] === format.split('/')[0]);
377
+ });
378
+ };
379
+ TuiInputFilesComponent.prototype.rejectFiles = function (rejectedFiles) {
380
+ this.reject.emit(this.multiple ? rejectedFiles : rejectedFiles[0]);
381
+ };
382
+ var TuiInputFilesComponent_1;
383
+ TuiInputFilesComponent.ctorParameters = function () { return [
384
+ { type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }, { type: core.Inject, args: [forms.NgControl,] }] },
385
+ { type: core.ChangeDetectorRef, decorators: [{ type: core.Inject, args: [core.ChangeDetectorRef,] }] },
386
+ { type: Boolean, decorators: [{ type: core.Inject, args: [cdk.TUI_IS_MOBILE,] }] },
387
+ { type: rxjs.Observable, decorators: [{ type: core.Inject, args: [tokens.TUI_INPUT_FILE_TEXTS,] }] },
388
+ { type: rxjs.Observable, decorators: [{ type: core.Inject, args: [tokens.TUI_DIGITAL_INFORMATION_UNITS,] }] }
389
+ ]; };
390
+ __decorate([
391
+ core.ViewChild('input')
392
+ ], TuiInputFilesComponent.prototype, "input", void 0);
393
+ __decorate([
394
+ core.Input(),
395
+ cdk.tuiDefaultProp()
396
+ ], TuiInputFilesComponent.prototype, "link", void 0);
397
+ __decorate([
398
+ core.Input(),
399
+ cdk.tuiDefaultProp()
400
+ ], TuiInputFilesComponent.prototype, "label", void 0);
401
+ __decorate([
402
+ core.Input(),
403
+ cdk.tuiDefaultProp()
404
+ ], TuiInputFilesComponent.prototype, "accept", void 0);
405
+ __decorate([
406
+ core.Input(),
407
+ cdk.tuiDefaultProp()
408
+ ], TuiInputFilesComponent.prototype, "multiple", void 0);
409
+ __decorate([
410
+ core.Input(),
411
+ cdk.tuiDefaultProp()
412
+ ], TuiInputFilesComponent.prototype, "size", void 0);
413
+ __decorate([
414
+ core.Input(),
415
+ cdk.tuiDefaultProp()
416
+ ], TuiInputFilesComponent.prototype, "maxFileSize", void 0);
417
+ __decorate([
418
+ core.Output()
419
+ ], TuiInputFilesComponent.prototype, "reject", void 0);
420
+ __decorate([
421
+ cdk.tuiPure
422
+ ], TuiInputFilesComponent.prototype, "computeLink$", null);
423
+ __decorate([
424
+ cdk.tuiPure
425
+ ], TuiInputFilesComponent.prototype, "computeLabel$", null);
426
+ __decorate([
427
+ cdk.tuiPure
428
+ ], TuiInputFilesComponent.prototype, "getValueArray", null);
429
+ TuiInputFilesComponent = TuiInputFilesComponent_1 = __decorate([
430
+ core.Component({
431
+ selector: 'tui-input-files',
432
+ template: "<tui-wrapper\n appearance=\"input-file\"\n class=\"t-wrapper\"\n [class._mobile]=\"isMobile\"\n [focused]=\"computedFocused\"\n [hovered]=\"computedHovered || fileDragged\"\n [pressed]=\"computedPressed\"\n [disabled]=\"computedDisabled\"\n>\n <label\n *ngIf=\"units$ | async as units\"\n automation-id=\"tui-input-file__label\"\n >\n <a tuiLink>\n <span\n polymorpheus-outlet\n class=\"t-inline\"\n [content]=\"computedLink$ | async\"\n ></span>\n </a>\n <ng-container *ngIf=\"computedLabel$ | async as computedLabel\">\n <span>&nbsp;</span>\n <span\n polymorpheus-outlet\n class=\"t-inline\"\n [content]=\"computedLabel\"\n ></span>\n </ng-container>\n <ng-container *ngIf=\"!readOnly && !computedDisabled\">\n <input\n *ngIf=\"inputFileTexts$ | async as texts\"\n #input\n type=\"file\"\n class=\"t-native\"\n [id]=\"id\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n [tuiFocusable]=\"focusable\"\n (change)=\"onFilesSelected(input, texts, units)\"\n (tuiHoveredChange)=\"onHovered($event)\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiPressedChange)=\"onPressed($event)\"\n (tuiDroppableDropped)=\"onDropped($event, texts, units)\"\n (tuiDroppableDragOverChange)=\"onDragOver($event)\"\n (mousedown.prevent.silent)=\"0\"\n />\n </ng-container>\n </label>\n</tui-wrapper>\n",
433
+ changeDetection: core.ChangeDetectionStrategy.OnPush,
434
+ encapsulation: core.ViewEncapsulation.None,
435
+ providers: [
436
+ core$1.MODE_PROVIDER,
437
+ {
438
+ provide: cdk.TUI_FOCUSABLE_ITEM_ACCESSOR,
439
+ useExisting: core.forwardRef(function () { return TuiInputFilesComponent_1; }),
440
+ },
441
+ ],
442
+ styles: ["tui-input-files{display:block}tui-wrapper[data-appearance=input-file]{display:flex;background:0 0;font:var(--tui-font-text-m);word-wrap:break-word;color:var(--tui-text-02);flex:1;justify-content:center;align-items:center;min-height:var(--tui-height-l);border-radius:var(--tui-radius-m);padding:1rem .5rem;box-sizing:border-box}tui-wrapper[data-appearance=input-file]:after{border:1px dashed;color:var(--tui-link)}tui-wrapper[data-appearance=input-file]._mobile:after{border:1px solid}tui-wrapper[data-appearance=input-file][data-state=hovered]{background:var(--tui-secondary)}tui-wrapper[data-appearance=input-file][data-state=hovered]:after{color:var(--tui-link-hover)}tui-wrapper[data-appearance=input-file][data-state=pressed]{background:var(--tui-secondary-hover)}tui-wrapper[data-appearance=input-file][data-state=disabled]{opacity:var(--tui-disabled-opacity);pointer-events:none}tui-wrapper[data-appearance=input-file][data-state=disabled]:after{color:var(--tui-text-03)}tui-wrapper[data-appearance=input-file]._focused:after{border-style:solid;border-width:2px;color:var(--tui-focus)}tui-wrapper[data-appearance=input-file][data-mode=onDark],tui-wrapper[data-appearance=input-file][data-mode=onDark]._focused:after,tui-wrapper[data-appearance=input-file][data-mode=onDark]:after{color:var(--tui-text-01-night)}tui-wrapper[data-appearance=input-file][data-mode=onDark][data-state=hovered]{background:var(--tui-clear-inverse-hover)}tui-wrapper[data-appearance=input-file][data-mode=onDark][data-state=hovered]:after,tui-wrapper[data-appearance=input-file][data-mode=onDark][data-state=pressed]:after{color:var(--tui-text-03-night)}tui-wrapper[data-appearance=input-file][data-mode=onDark][data-state=pressed]{background:var(--tui-clear-inverse-active)}tui-wrapper[data-appearance=input-file][data-mode=onLight],tui-wrapper[data-appearance=input-file][data-mode=onLight]:after{color:var(--tui-text-01)}tui-wrapper[data-appearance=input-file][data-mode=onLight][data-state=hovered]{background:var(--tui-clear-hover)}tui-wrapper[data-appearance=input-file][data-mode=onLight][data-state=hovered]:after,tui-wrapper[data-appearance=input-file][data-mode=onLight][data-state=pressed]:after{color:var(--tui-text-03)}tui-wrapper[data-appearance=input-file][data-mode=onLight][data-state=pressed]{background:var(--tui-clear-active)}.t-native{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}.t-native::-webkit-file-upload-button{display:none}.t-inline{display:inline}"]
443
+ }),
444
+ __param(0, core.Optional()),
445
+ __param(0, core.Self()),
446
+ __param(0, core.Inject(forms.NgControl)),
447
+ __param(1, core.Inject(core.ChangeDetectorRef)),
448
+ __param(2, core.Inject(cdk.TUI_IS_MOBILE)),
449
+ __param(3, core.Inject(tokens.TUI_INPUT_FILE_TEXTS)),
450
+ __param(4, core.Inject(tokens.TUI_DIGITAL_INFORMATION_UNITS))
451
+ ], TuiInputFilesComponent);
452
+ return TuiInputFilesComponent;
453
+ }(cdk.AbstractTuiNullableControl));
454
+
455
+ var TuiInputFilesModule = /** @class */ (function () {
456
+ function TuiInputFilesModule() {
457
+ }
458
+ TuiInputFilesModule = __decorate([
459
+ core.NgModule({
460
+ imports: [
461
+ common.CommonModule,
462
+ ngPolymorpheus.PolymorpheusModule,
463
+ cdk.TuiLetModule,
464
+ cdk.TuiFocusedModule,
465
+ cdk.TuiFocusVisibleModule,
466
+ cdk.TuiPressedModule,
467
+ cdk.TuiHoveredModule,
468
+ cdk.TuiFocusableModule,
469
+ cdk.TuiDroppableModule,
470
+ core$1.TuiWrapperModule,
471
+ core$1.TuiSvgModule,
472
+ core$1.TuiLinkModule,
473
+ core$1.TuiLoaderModule,
474
+ core$1.TuiButtonModule,
475
+ core$1.TuiGroupModule,
476
+ ],
477
+ declarations: [TuiInputFilesComponent],
478
+ exports: [TuiInputFilesComponent],
479
+ })
480
+ ], TuiInputFilesModule);
481
+ return TuiInputFilesModule;
482
+ }());
483
+
484
+ exports.TuiInputFilesComponent = TuiInputFilesComponent;
485
+ exports.TuiInputFilesModule = TuiInputFilesModule;
486
+
487
+ Object.defineProperty(exports, '__esModule', { value: true });
488
+
489
+ })));
490
+ //# sourceMappingURL=taiga-ui-kit-components-input-files.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-kit-components-input-files.umd.js","sources":["../../../node_modules/tslib/tslib.es6.js","ng://@taiga-ui/kit/components/input-files/input-files.component.ts","ng://@taiga-ui/kit/components/input-files/input-files.module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n 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; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n 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);\r\n 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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n Optional,\n Output,\n Self,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n EMPTY_ARRAY,\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_IS_MOBILE,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER, TuiSizeL} from '@taiga-ui/core';\nimport {TuiFileLike} from '@taiga-ui/kit/interfaces';\nimport {TUI_DIGITAL_INFORMATION_UNITS, TUI_INPUT_FILE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {formatSize, getAcceptArray} from '@taiga-ui/kit/utils/files';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nconst DEFAULT_MAX_SIZE = 30 * 1000 * 1000; // 30 MB\n\n// @dynamic\n@Component({\n selector: 'tui-input-files',\n templateUrl: './input-files.template.html',\n styleUrls: ['./input-files.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n MODE_PROVIDER,\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputFilesComponent),\n },\n ],\n})\nexport class TuiInputFilesComponent\n extends AbstractTuiNullableControl<TuiFileLike | ReadonlyArray<TuiFileLike>>\n implements TuiFocusableElementAccessor\n{\n @ViewChild('input')\n private readonly input?: ElementRef<HTMLInputElement>;\n\n private dataTransfer: DataTransfer | null = null;\n\n @Input()\n @tuiDefaultProp()\n link: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n label: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n accept = '';\n\n @Input()\n @tuiDefaultProp()\n multiple = false;\n\n @Input()\n @tuiDefaultProp()\n size: TuiSizeL = 'm';\n\n @Input()\n @tuiDefaultProp()\n maxFileSize = DEFAULT_MAX_SIZE;\n\n @Output()\n reject = new EventEmitter<ReadonlyArray<TuiFileLike> | TuiFileLike>();\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef)\n changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_IS_MOBILE)\n readonly isMobile: boolean,\n @Inject(TUI_INPUT_FILE_TEXTS)\n readonly inputFileTexts$: Observable<\n Record<\n | 'defaultLabelSingle'\n | 'defaultLabelMultiple'\n | 'defaultLinkSingle'\n | 'defaultLinkMultiple'\n | 'maxSizeRejectionReason'\n | 'formatRejectionReason'\n | 'drop'\n | 'dropMultiple',\n string\n >\n >,\n @Inject(TUI_DIGITAL_INFORMATION_UNITS)\n readonly units$: Observable<[string, string, string]>,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.input?.nativeElement || null;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get computedLink$(): Observable<PolymorpheusContent> {\n return this.computeLink$(this.fileDragged, this.multiple, this.link);\n }\n\n get computedLabel$(): Observable<PolymorpheusContent> {\n return this.computeLabel$(\n this.isMobile,\n this.fileDragged,\n this.multiple,\n this.label,\n );\n }\n\n get fileDragged(): boolean {\n return !!this.dataTransfer?.types.includes('Files');\n }\n\n get arrayValue(): ReadonlyArray<TuiFileLike> {\n return this.getValueArray(this.value);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n onPressed(pressed: boolean) {\n this.updatePressed(pressed);\n }\n\n onFilesSelected(\n input: HTMLInputElement,\n texts: Record<'maxSizeRejectionReason' | 'formatRejectionReason', string>,\n units: [string, string, string],\n ) {\n this.processSelectedFiles(input.files, texts, units);\n input.value = '';\n }\n\n onDropped(\n event: DataTransfer,\n texts: Record<'maxSizeRejectionReason' | 'formatRejectionReason', string>,\n units: [string, string, string],\n ) {\n this.processSelectedFiles(event.files, texts, units);\n }\n\n onDragOver(dataTransfer: DataTransfer | null) {\n this.dataTransfer = dataTransfer;\n }\n\n removeFile(removedFile: TuiFileLike) {\n this.updateValue(\n this.multiple ? this.arrayValue.filter(file => file !== removedFile) : null,\n );\n }\n\n @tuiPure\n private computeLink$(\n fileDragged: boolean,\n multiple: boolean,\n link: PolymorpheusContent,\n ): Observable<PolymorpheusContent> {\n return fileDragged\n ? of('')\n : this.inputFileTexts$.pipe(\n map(texts =>\n multiple && link === ''\n ? texts.defaultLinkMultiple\n : link || texts.defaultLinkSingle,\n ),\n );\n }\n\n @tuiPure\n private computeLabel$(\n isMobile: boolean,\n fileDragged: boolean,\n multiple: boolean,\n label: PolymorpheusContent,\n ): Observable<PolymorpheusContent> {\n if (isMobile) {\n return of('');\n }\n\n if (fileDragged) {\n return this.inputFileTexts$.pipe(\n map(texts => (multiple ? texts.dropMultiple : texts.drop)),\n );\n }\n\n return this.inputFileTexts$.pipe(\n map(texts =>\n multiple && label === ''\n ? texts.defaultLabelMultiple\n : label || texts.defaultLabelSingle,\n ),\n );\n }\n\n @tuiPure\n private getValueArray(\n value: TuiFileLike | ReadonlyArray<TuiFileLike> | null,\n ): ReadonlyArray<TuiFileLike> {\n if (!value) {\n return EMPTY_ARRAY;\n }\n\n return Array.isArray(value) ? value : [value];\n }\n\n private processSelectedFiles(\n files: FileList | null,\n texts: Record<'maxSizeRejectionReason' | 'formatRejectionReason', string>,\n units: [string, string, string],\n ) {\n // IE11 after selecting a file through the open dialog generates a second event passing an empty FileList.\n if (!files?.length) {\n return;\n }\n\n const newFiles = this.multiple ? Array.from(files) : [files[0]];\n const tooBigFiles = newFiles.filter(file => file.size > this.maxFileSize);\n const wrongFormatFiles = newFiles.filter(\n file => !this.isFormatAcceptable(file) && !tooBigFiles.includes(file),\n );\n const acceptedFiles = newFiles.filter(\n file => !tooBigFiles.includes(file) && !wrongFormatFiles.includes(file),\n );\n\n if (tooBigFiles.length || wrongFormatFiles.length) {\n this.rejectFiles([\n ...tooBigFiles.map(file => ({\n name: file.name,\n type: file.type,\n size: file.size,\n content:\n texts.maxSizeRejectionReason +\n formatSize(units, this.maxFileSize),\n })),\n ...wrongFormatFiles.map(file => ({\n name: file.name,\n type: file.type,\n size: file.size,\n content: texts.formatRejectionReason,\n })),\n ]);\n }\n\n this.updateValue(\n this.multiple\n ? [...this.arrayValue, ...acceptedFiles]\n : acceptedFiles[0] || null,\n );\n }\n\n private isFormatAcceptable(file: File): boolean {\n if (!this.accept) {\n return true;\n }\n\n const extension = `.${(file.name.split('.').pop() || '').toLowerCase()}`;\n\n return getAcceptArray(this.accept).some(\n format =>\n format === extension ||\n format === file.type ||\n (format.split('/')[1] === '*' &&\n file.type.split('/')[0] === format.split('/')[0]),\n );\n }\n\n private rejectFiles(rejectedFiles: ReadonlyArray<TuiFileLike>) {\n this.reject.emit(this.multiple ? rejectedFiles : rejectedFiles[0]);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiDroppableModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiHoveredModule,\n TuiLetModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {\n TuiButtonModule,\n TuiGroupModule,\n TuiLinkModule,\n TuiLoaderModule,\n TuiSvgModule,\n TuiWrapperModule,\n} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiInputFilesComponent} from './input-files.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiLetModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiPressedModule,\n TuiHoveredModule,\n TuiFocusableModule,\n TuiDroppableModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLinkModule,\n TuiLoaderModule,\n TuiButtonModule,\n TuiGroupModule,\n ],\n declarations: [TuiInputFilesComponent],\n exports: [TuiInputFilesComponent],\n})\nexport class TuiInputFilesModule {}\n"],"names":["EventEmitter","isNativeFocused","of","map","EMPTY_ARRAY","files","formatSize","getAcceptArray","NgControl","Optional","Self","Inject","ChangeDetectorRef","TUI_IS_MOBILE","Observable","TUI_INPUT_FILE_TEXTS","TUI_DIGITAL_INFORMATION_UNITS","ViewChild","Input","tuiDefaultProp","Output","tuiPure","Component","ChangeDetectionStrategy","ViewEncapsulation","MODE_PROVIDER","TUI_FOCUSABLE_ITEM_ACCESSOR","forwardRef","AbstractTuiNullableControl","NgModule","CommonModule","PolymorpheusModule","TuiLetModule","TuiFocusedModule","TuiFocusVisibleModule","TuiPressedModule","TuiHoveredModule","TuiFocusableModule","TuiDroppableModule","TuiWrapperModule","TuiSvgModule","TuiLinkModule","TuiLoaderModule","TuiButtonModule","TuiGroupModule"],"mappings":";;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACA;IACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;IACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,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;SAAmC;QAAtB,mBAAmB;YArB/BC,aAAQ,CAAC;gBACN,OAAO,EAAE;oBACLC,mBAAY;oBACZC,iCAAkB;oBAClBC,gBAAY;oBACZC,oBAAgB;oBAChBC,yBAAqB;oBACrBC,oBAAgB;oBAChBC,oBAAgB;oBAChBC,sBAAkB;oBAClBC,sBAAkB;oBAClBC,uBAAgB;oBAChBC,mBAAY;oBACZC,oBAAa;oBACbC,sBAAe;oBACfC,sBAAe;oBACfC,qBAAc;iBACjB;gBACD,YAAY,EAAE,CAAC,sBAAsB,CAAC;gBACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;aACpC,CAAC;WACW,mBAAmB,CAAG;QAAD,0BAAC;KAAnC;;;;;;;;;;;;;"}
@@ -0,0 +1,16 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@taiga-ui/cdk"),require("@taiga-ui/core"),require("@taiga-ui/kit/tokens"),require("@taiga-ui/kit/utils/files"),require("rxjs"),require("rxjs/operators"),require("@angular/common"),require("@tinkoff/ng-polymorpheus")):"function"==typeof define&&define.amd?define("@taiga-ui/kit/components/input-files",["exports","@angular/core","@angular/forms","@taiga-ui/cdk","@taiga-ui/core","@taiga-ui/kit/tokens","@taiga-ui/kit/utils/files","rxjs","rxjs/operators","@angular/common","@tinkoff/ng-polymorpheus"],t):t(((e=e||self)["taiga-ui"]=e["taiga-ui"]||{},e["taiga-ui"].kit=e["taiga-ui"].kit||{},e["taiga-ui"].kit.components=e["taiga-ui"].kit.components||{},e["taiga-ui"].kit.components["input-files"]={}),e.ng.core,e.ng.forms,e.cdk,e.core$1,e["taiga-ui"].kit.tokens,e["taiga-ui"].kit.utils.files,e.rxjs,e.rxjs.operators,e.ng.common,e.ngPolymorpheus)}(this,(function(e,t,a,r,i,n,o,u,p,l,s){"use strict";
2
+ /*! *****************************************************************************
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
15
+ ***************************************************************************** */var c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])})(e,t)};function d(e,t,a,r){var i,n=arguments.length,o=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,a):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,a,r);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(o=(n<3?i(o):n>3?i(t,a,o):i(t,a))||o);return n>3&&o&&Object.defineProperty(t,a,o),o}function f(e,t){return function(a,r){t(a,r,e)}}function g(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var r,i,n=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(i)throw i.error}}return o}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}var y=function(e){function l(a,r,i,n,o){var u=e.call(this,a,r)||this;return u.isMobile=i,u.inputFileTexts$=n,u.units$=o,u.dataTransfer=null,u.link="",u.label="",u.accept="",u.multiple=!1,u.size="m",u.maxFileSize=3e7,u.reject=new t.EventEmitter,u}var s;return function(e,t){function a(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}(l,e),s=l,Object.defineProperty(l.prototype,"nativeFocusableElement",{get:function(){var e;return(null===(e=this.input)||void 0===e?void 0:e.nativeElement)||null},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"focused",{get:function(){return r.isNativeFocused(this.nativeFocusableElement)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"computedLink$",{get:function(){return this.computeLink$(this.fileDragged,this.multiple,this.link)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"computedLabel$",{get:function(){return this.computeLabel$(this.isMobile,this.fileDragged,this.multiple,this.label)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"fileDragged",{get:function(){var e;return!!(null===(e=this.dataTransfer)||void 0===e?void 0:e.types.includes("Files"))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"arrayValue",{get:function(){return this.getValueArray(this.value)},enumerable:!0,configurable:!0}),l.prototype.onHovered=function(e){this.updateHovered(e)},l.prototype.onFocused=function(e){this.updateFocused(e)},l.prototype.onPressed=function(e){this.updatePressed(e)},l.prototype.onFilesSelected=function(e,t,a){this.processSelectedFiles(e.files,t,a),e.value=""},l.prototype.onDropped=function(e,t,a){this.processSelectedFiles(e.files,t,a)},l.prototype.onDragOver=function(e){this.dataTransfer=e},l.prototype.removeFile=function(e){this.updateValue(this.multiple?this.arrayValue.filter((function(t){return t!==e})):null)},l.prototype.computeLink$=function(e,t,a){return e?u.of(""):this.inputFileTexts$.pipe(p.map((function(e){return t&&""===a?e.defaultLinkMultiple:a||e.defaultLinkSingle})))},l.prototype.computeLabel$=function(e,t,a,r){return e?u.of(""):t?this.inputFileTexts$.pipe(p.map((function(e){return a?e.dropMultiple:e.drop}))):this.inputFileTexts$.pipe(p.map((function(e){return a&&""===r?e.defaultLabelMultiple:r||e.defaultLabelSingle})))},l.prototype.getValueArray=function(e){return e?Array.isArray(e)?e:[e]:r.EMPTY_ARRAY},l.prototype.processSelectedFiles=function(e,t,a){var r=this;if(null==e?void 0:e.length){var i=this.multiple?Array.from(e):[e[0]],n=i.filter((function(e){return e.size>r.maxFileSize})),u=i.filter((function(e){return!r.isFormatAcceptable(e)&&!n.includes(e)})),p=i.filter((function(e){return!n.includes(e)&&!u.includes(e)}));(n.length||u.length)&&this.rejectFiles(m(n.map((function(e){return{name:e.name,type:e.type,size:e.size,content:t.maxSizeRejectionReason+o.formatSize(a,r.maxFileSize)}})),u.map((function(e){return{name:e.name,type:e.type,size:e.size,content:t.formatRejectionReason}})))),this.updateValue(this.multiple?m(this.arrayValue,p):p[0]||null)}},l.prototype.isFormatAcceptable=function(e){if(!this.accept)return!0;var t="."+(e.name.split(".").pop()||"").toLowerCase();return o.getAcceptArray(this.accept).some((function(a){return a===t||a===e.type||"*"===a.split("/")[1]&&e.type.split("/")[0]===a.split("/")[0]}))},l.prototype.rejectFiles=function(e){this.reject.emit(this.multiple?e:e[0])},l.ctorParameters=function(){return[{type:a.NgControl,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[a.NgControl]}]},{type:t.ChangeDetectorRef,decorators:[{type:t.Inject,args:[t.ChangeDetectorRef]}]},{type:Boolean,decorators:[{type:t.Inject,args:[r.TUI_IS_MOBILE]}]},{type:u.Observable,decorators:[{type:t.Inject,args:[n.TUI_INPUT_FILE_TEXTS]}]},{type:u.Observable,decorators:[{type:t.Inject,args:[n.TUI_DIGITAL_INFORMATION_UNITS]}]}]},d([t.ViewChild("input")],l.prototype,"input",void 0),d([t.Input(),r.tuiDefaultProp()],l.prototype,"link",void 0),d([t.Input(),r.tuiDefaultProp()],l.prototype,"label",void 0),d([t.Input(),r.tuiDefaultProp()],l.prototype,"accept",void 0),d([t.Input(),r.tuiDefaultProp()],l.prototype,"multiple",void 0),d([t.Input(),r.tuiDefaultProp()],l.prototype,"size",void 0),d([t.Input(),r.tuiDefaultProp()],l.prototype,"maxFileSize",void 0),d([t.Output()],l.prototype,"reject",void 0),d([r.tuiPure],l.prototype,"computeLink$",null),d([r.tuiPure],l.prototype,"computeLabel$",null),d([r.tuiPure],l.prototype,"getValueArray",null),l=s=d([t.Component({selector:"tui-input-files",template:'<tui-wrapper\n appearance="input-file"\n class="t-wrapper"\n [class._mobile]="isMobile"\n [focused]="computedFocused"\n [hovered]="computedHovered || fileDragged"\n [pressed]="computedPressed"\n [disabled]="computedDisabled"\n>\n <label\n *ngIf="units$ | async as units"\n automation-id="tui-input-file__label"\n >\n <a tuiLink>\n <span\n polymorpheus-outlet\n class="t-inline"\n [content]="computedLink$ | async"\n ></span>\n </a>\n <ng-container *ngIf="computedLabel$ | async as computedLabel">\n <span>&nbsp;</span>\n <span\n polymorpheus-outlet\n class="t-inline"\n [content]="computedLabel"\n ></span>\n </ng-container>\n <ng-container *ngIf="!readOnly && !computedDisabled">\n <input\n *ngIf="inputFileTexts$ | async as texts"\n #input\n type="file"\n class="t-native"\n [id]="id"\n [accept]="accept"\n [multiple]="multiple"\n [tuiFocusable]="focusable"\n (change)="onFilesSelected(input, texts, units)"\n (tuiHoveredChange)="onHovered($event)"\n (tuiFocusedChange)="onFocused($event)"\n (tuiPressedChange)="onPressed($event)"\n (tuiDroppableDropped)="onDropped($event, texts, units)"\n (tuiDroppableDragOverChange)="onDragOver($event)"\n (mousedown.prevent.silent)="0"\n />\n </ng-container>\n </label>\n</tui-wrapper>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,providers:[i.MODE_PROVIDER,{provide:r.TUI_FOCUSABLE_ITEM_ACCESSOR,useExisting:t.forwardRef((function(){return s}))}],styles:["tui-input-files{display:block}tui-wrapper[data-appearance=input-file]{display:flex;background:0 0;font:var(--tui-font-text-m);word-wrap:break-word;color:var(--tui-text-02);flex:1;justify-content:center;align-items:center;min-height:var(--tui-height-l);border-radius:var(--tui-radius-m);padding:1rem .5rem;box-sizing:border-box}tui-wrapper[data-appearance=input-file]:after{border:1px dashed;color:var(--tui-link)}tui-wrapper[data-appearance=input-file]._mobile:after{border:1px solid}tui-wrapper[data-appearance=input-file][data-state=hovered]{background:var(--tui-secondary)}tui-wrapper[data-appearance=input-file][data-state=hovered]:after{color:var(--tui-link-hover)}tui-wrapper[data-appearance=input-file][data-state=pressed]{background:var(--tui-secondary-hover)}tui-wrapper[data-appearance=input-file][data-state=disabled]{opacity:var(--tui-disabled-opacity);pointer-events:none}tui-wrapper[data-appearance=input-file][data-state=disabled]:after{color:var(--tui-text-03)}tui-wrapper[data-appearance=input-file]._focused:after{border-style:solid;border-width:2px;color:var(--tui-focus)}tui-wrapper[data-appearance=input-file][data-mode=onDark],tui-wrapper[data-appearance=input-file][data-mode=onDark]._focused:after,tui-wrapper[data-appearance=input-file][data-mode=onDark]:after{color:var(--tui-text-01-night)}tui-wrapper[data-appearance=input-file][data-mode=onDark][data-state=hovered]{background:var(--tui-clear-inverse-hover)}tui-wrapper[data-appearance=input-file][data-mode=onDark][data-state=hovered]:after,tui-wrapper[data-appearance=input-file][data-mode=onDark][data-state=pressed]:after{color:var(--tui-text-03-night)}tui-wrapper[data-appearance=input-file][data-mode=onDark][data-state=pressed]{background:var(--tui-clear-inverse-active)}tui-wrapper[data-appearance=input-file][data-mode=onLight],tui-wrapper[data-appearance=input-file][data-mode=onLight]:after{color:var(--tui-text-01)}tui-wrapper[data-appearance=input-file][data-mode=onLight][data-state=hovered]{background:var(--tui-clear-hover)}tui-wrapper[data-appearance=input-file][data-mode=onLight][data-state=hovered]:after,tui-wrapper[data-appearance=input-file][data-mode=onLight][data-state=pressed]:after{color:var(--tui-text-03)}tui-wrapper[data-appearance=input-file][data-mode=onLight][data-state=pressed]{background:var(--tui-clear-active)}.t-native{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}.t-native::-webkit-file-upload-button{display:none}.t-inline{display:inline}"]}),f(0,t.Optional()),f(0,t.Self()),f(0,t.Inject(a.NgControl)),f(1,t.Inject(t.ChangeDetectorRef)),f(2,t.Inject(r.TUI_IS_MOBILE)),f(3,t.Inject(n.TUI_INPUT_FILE_TEXTS)),f(4,t.Inject(n.TUI_DIGITAL_INFORMATION_UNITS))],l)}(r.AbstractTuiNullableControl),v=function(){function e(){}return e=d([t.NgModule({imports:[l.CommonModule,s.PolymorpheusModule,r.TuiLetModule,r.TuiFocusedModule,r.TuiFocusVisibleModule,r.TuiPressedModule,r.TuiHoveredModule,r.TuiFocusableModule,r.TuiDroppableModule,i.TuiWrapperModule,i.TuiSvgModule,i.TuiLinkModule,i.TuiLoaderModule,i.TuiButtonModule,i.TuiGroupModule],declarations:[y],exports:[y]})],e)}();e.TuiInputFilesComponent=y,e.TuiInputFilesModule=v,Object.defineProperty(e,"__esModule",{value:!0})}));
16
+ //# sourceMappingURL=taiga-ui-kit-components-input-files.umd.min.js.map