@taiga-ui/kit 3.10.0 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/bundles/taiga-ui-kit-components-accordion.umd.js +3 -1
  2. package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
  3. package/bundles/taiga-ui-kit-components-arrow.umd.js.map +1 -1
  4. package/bundles/taiga-ui-kit-components-avatar.umd.js +9 -2
  5. package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
  6. package/bundles/taiga-ui-kit-components-badge.umd.js.map +1 -1
  7. package/bundles/taiga-ui-kit-components-badged-content.umd.js.map +1 -1
  8. package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
  9. package/bundles/taiga-ui-kit-components-calendar-range.umd.js +3 -1
  10. package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
  11. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
  12. package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
  13. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
  14. package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
  15. package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
  16. package/bundles/taiga-ui-kit-components-input-date-time.umd.js +3 -1
  17. package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
  18. package/bundles/taiga-ui-kit-components-input-date.umd.js +3 -1
  19. package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
  20. package/bundles/taiga-ui-kit-components-input-files.umd.js +246 -69
  21. package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
  22. package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
  23. package/bundles/taiga-ui-kit-components-input-month-range.umd.js +16 -2
  24. package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
  25. package/bundles/taiga-ui-kit-components-input-month.umd.js +17 -3
  26. package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
  27. package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
  28. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +20 -2
  29. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
  30. package/bundles/taiga-ui-kit-components-input-phone.umd.js +6 -2
  31. package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
  32. package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
  33. package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
  34. package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
  35. package/bundles/taiga-ui-kit-components-island.umd.js.map +1 -1
  36. package/bundles/taiga-ui-kit-components-marker-icon.umd.js.map +1 -1
  37. package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
  38. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
  39. package/bundles/taiga-ui-kit-components-push.umd.js +3 -1
  40. package/bundles/taiga-ui-kit-components-push.umd.js.map +1 -1
  41. package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
  42. package/bundles/taiga-ui-kit-components-range.umd.js +4 -2
  43. package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
  44. package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
  45. package/bundles/taiga-ui-kit-components-slider.umd.js +3 -1
  46. package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
  47. package/bundles/taiga-ui-kit-components-stepper.umd.js +20 -13
  48. package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
  49. package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
  50. package/bundles/taiga-ui-kit-components-tiles.umd.js +645 -0
  51. package/bundles/taiga-ui-kit-components-tiles.umd.js.map +1 -0
  52. package/bundles/taiga-ui-kit-components.umd.js +10 -4
  53. package/bundles/taiga-ui-kit-components.umd.js.map +1 -1
  54. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +3 -1
  55. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +1 -1
  56. package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js +3 -1
  57. package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js.map +1 -1
  58. package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
  59. package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js.map +1 -1
  60. package/bundles/taiga-ui-kit-pipes-stringify.umd.js.map +1 -1
  61. package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
  62. package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
  63. package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
  64. package/components/accordion/accordion.component.d.ts +1 -1
  65. package/components/arrow/arrow-options.d.ts +2 -2
  66. package/components/avatar/avatar-options.d.ts +1 -1
  67. package/components/avatar/avatar.component.d.ts +5 -3
  68. package/components/badge/badge.component.d.ts +1 -1
  69. package/components/badged-content/badged-content.component.d.ts +1 -1
  70. package/components/calendar-month/calendar-month.component.d.ts +1 -1
  71. package/components/calendar-range/calendar-range.component.d.ts +3 -3
  72. package/components/checkbox-block/checkbox-block.component.d.ts +1 -1
  73. package/components/combo-box/combo-box.component.d.ts +1 -1
  74. package/components/data-list-wrapper/data-list-wrapper.d.ts +3 -3
  75. package/components/filter/filter.component.d.ts +1 -1
  76. package/components/index.d.ts +1 -0
  77. package/components/input-date-range/input-date-range.component.d.ts +1 -1
  78. package/components/input-files/index.d.ts +2 -0
  79. package/components/input-files/input-files.component.d.ts +20 -6
  80. package/components/input-files/input-files.directive.d.ts +20 -0
  81. package/components/input-files/input-files.module.d.ts +8 -7
  82. package/components/input-files/input-files.options.d.ts +17 -0
  83. package/components/input-inline/input-inline.component.d.ts +1 -1
  84. package/components/input-month/input-month.component.d.ts +4 -2
  85. package/components/input-month-range/input-month-range.component.d.ts +4 -2
  86. package/components/input-password/input-password-options.d.ts +2 -2
  87. package/components/input-password/input-password.component.d.ts +3 -3
  88. package/components/input-phone/input-phone.component.d.ts +1 -1
  89. package/components/input-phone-international/input-phone-international.component.d.ts +1 -1
  90. package/components/input-phone-international/utils/extract-value-from-event.d.ts +1 -1
  91. package/components/input-range/input-range.component.d.ts +1 -1
  92. package/components/input-tag/input-tag-options.d.ts +1 -1
  93. package/components/input-tag/input-tag.component.d.ts +4 -4
  94. package/components/input-time/input-time-options.d.ts +2 -2
  95. package/components/island/island.component.d.ts +1 -1
  96. package/components/marker-icon/marker-icon.component.d.ts +1 -1
  97. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +1 -1
  98. package/components/multi-select/multi-select.component.d.ts +2 -2
  99. package/components/pdf-viewer/pdf-viewer.service.d.ts +1 -1
  100. package/components/push/push-alert.directive.d.ts +1 -1
  101. package/components/radio-block/radio-block.component.d.ts +1 -1
  102. package/components/range/range-change.directive.d.ts +2 -2
  103. package/components/range/range.component.d.ts +1 -1
  104. package/components/select/select.component.d.ts +1 -1
  105. package/components/slider/helpers/slider-readonly.directive.d.ts +2 -2
  106. package/components/stepper/step/step.component.d.ts +1 -1
  107. package/components/stepper/stepper.component.d.ts +3 -2
  108. package/components/tag/tag-options.d.ts +1 -1
  109. package/components/tag/tag.component.d.ts +2 -2
  110. package/components/tiles/index.d.ts +4 -0
  111. package/components/tiles/package.json +10 -0
  112. package/components/tiles/taiga-ui-kit-components-tiles.d.ts +5 -0
  113. package/components/tiles/tile-handle.directive.d.ts +13 -0
  114. package/components/tiles/tile.component.d.ts +30 -0
  115. package/components/tiles/tiles.component.d.ts +19 -0
  116. package/components/tiles/tiles.module.d.ts +10 -0
  117. package/directives/lazy-loading/lazy-loading.directive.d.ts +3 -2
  118. package/directives/lazy-loading/lazy-loading.service.d.ts +4 -3
  119. package/esm2015/components/accordion/accordion.component.js +5 -3
  120. package/esm2015/components/arrow/arrow-options.js +1 -1
  121. package/esm2015/components/avatar/avatar-options.js +1 -1
  122. package/esm2015/components/avatar/avatar.component.js +6 -3
  123. package/esm2015/components/badge/badge.component.js +1 -1
  124. package/esm2015/components/badged-content/badged-content.component.js +1 -1
  125. package/esm2015/components/calendar-month/calendar-month.component.js +1 -1
  126. package/esm2015/components/calendar-range/calendar-range.component.js +5 -3
  127. package/esm2015/components/checkbox-block/checkbox-block.component.js +1 -1
  128. package/esm2015/components/combo-box/combo-box.component.js +1 -1
  129. package/esm2015/components/data-list-wrapper/data-list-wrapper.js +1 -1
  130. package/esm2015/components/filter/filter.component.js +1 -1
  131. package/esm2015/components/index.js +2 -1
  132. package/esm2015/components/input-date/input-date.component.js +5 -3
  133. package/esm2015/components/input-date-range/input-date-range.component.js +1 -1
  134. package/esm2015/components/input-date-time/input-date-time.component.js +5 -3
  135. package/esm2015/components/input-files/index.js +3 -1
  136. package/esm2015/components/input-files/input-files.component.js +75 -26
  137. package/esm2015/components/input-files/input-files.directive.js +77 -0
  138. package/esm2015/components/input-files/input-files.module.js +12 -3
  139. package/esm2015/components/input-files/input-files.options.js +16 -0
  140. package/esm2015/components/input-inline/input-inline.component.js +1 -1
  141. package/esm2015/components/input-month/input-month.component.js +15 -5
  142. package/esm2015/components/input-month-range/input-month-range.component.js +14 -4
  143. package/esm2015/components/input-password/input-password-options.js +1 -1
  144. package/esm2015/components/input-password/input-password.component.js +1 -1
  145. package/esm2015/components/input-phone/input-phone.component.js +7 -3
  146. package/esm2015/components/input-phone-international/input-phone-international.component.js +13 -2
  147. package/esm2015/components/input-phone-international/tokens/countries-masks.js +9 -2
  148. package/esm2015/components/input-phone-international/utils/extract-value-from-event.js +1 -1
  149. package/esm2015/components/input-range/input-range.component.js +1 -1
  150. package/esm2015/components/input-tag/input-tag-options.js +1 -1
  151. package/esm2015/components/input-tag/input-tag.component.js +1 -1
  152. package/esm2015/components/input-time/input-time-options.js +1 -1
  153. package/esm2015/components/island/island.component.js +1 -1
  154. package/esm2015/components/marker-icon/marker-icon.component.js +1 -1
  155. package/esm2015/components/multi-select/hide-selected.pipe.js +1 -1
  156. package/esm2015/components/multi-select/multi-select-group/multi-select-group.component.js +1 -1
  157. package/esm2015/components/multi-select/multi-select.component.js +1 -1
  158. package/esm2015/components/pdf-viewer/pdf-viewer.service.js +1 -1
  159. package/esm2015/components/push/push-alert.directive.js +5 -3
  160. package/esm2015/components/radio-block/radio-block.component.js +1 -1
  161. package/esm2015/components/range/range-change.directive.js +5 -3
  162. package/esm2015/components/range/range.component.js +2 -2
  163. package/esm2015/components/select/select.component.js +1 -1
  164. package/esm2015/components/slider/helpers/slider-readonly.directive.js +5 -3
  165. package/esm2015/components/stepper/step/step.component.js +2 -2
  166. package/esm2015/components/stepper/stepper.component.js +12 -9
  167. package/esm2015/components/tag/tag-options.js +1 -1
  168. package/esm2015/components/tag/tag.component.js +1 -1
  169. package/esm2015/components/tiles/index.js +5 -0
  170. package/esm2015/components/tiles/taiga-ui-kit-components-tiles.js +5 -0
  171. package/esm2015/components/tiles/tile-handle.directive.js +53 -0
  172. package/esm2015/components/tiles/tile.component.js +102 -0
  173. package/esm2015/components/tiles/tiles.component.js +99 -0
  174. package/esm2015/components/tiles/tiles.module.js +20 -0
  175. package/esm2015/directives/lazy-loading/lazy-loading.directive.js +1 -1
  176. package/esm2015/directives/lazy-loading/lazy-loading.service.js +5 -3
  177. package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +5 -3
  178. package/esm2015/pipes/field-error/field-error-pipe.js +1 -1
  179. package/esm2015/pipes/filter-by-input/filter-by-input-with.pipe.js +1 -1
  180. package/esm2015/pipes/filter-by-input/filter-by-input.base.js +1 -1
  181. package/esm2015/pipes/filter-by-input/filter-by-input.pipe.js +1 -1
  182. package/esm2015/pipes/stringify/stringify.pipe.js +1 -1
  183. package/esm2015/tokens/input-date-options.js +1 -1
  184. package/esm2015/tokens/validation-errors.js +1 -1
  185. package/esm2015/types/dropdown-position.js +1 -1
  186. package/esm2015/types/file-state.js +1 -1
  187. package/esm2015/types/marker-icon-mode.js +1 -1
  188. package/esm2015/types/status.js +1 -1
  189. package/esm2015/types/step-state.js +1 -1
  190. package/esm2015/types/time-format-parts.js +1 -1
  191. package/esm2015/utils/mask/create-auto-corrected-date-time-pipe.js +1 -1
  192. package/esm2015/utils/mask/create-time-mask.js +1 -1
  193. package/esm2015/utils/miscellaneous/is-flat.js +1 -1
  194. package/esm2015/utils/miscellaneous/replay-control-value-changes-factory.js +1 -1
  195. package/fesm2015/taiga-ui-kit-components-accordion.js +3 -1
  196. package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
  197. package/fesm2015/taiga-ui-kit-components-arrow.js.map +1 -1
  198. package/fesm2015/taiga-ui-kit-components-avatar.js +5 -2
  199. package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
  200. package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
  201. package/fesm2015/taiga-ui-kit-components-badged-content.js.map +1 -1
  202. package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
  203. package/fesm2015/taiga-ui-kit-components-calendar-range.js +4 -2
  204. package/fesm2015/taiga-ui-kit-components-calendar-range.js.map +1 -1
  205. package/fesm2015/taiga-ui-kit-components-checkbox-block.js.map +1 -1
  206. package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
  207. package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
  208. package/fesm2015/taiga-ui-kit-components-filter.js.map +1 -1
  209. package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
  210. package/fesm2015/taiga-ui-kit-components-input-date-time.js +4 -2
  211. package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
  212. package/fesm2015/taiga-ui-kit-components-input-date.js +4 -2
  213. package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
  214. package/fesm2015/taiga-ui-kit-components-input-files.js +167 -29
  215. package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
  216. package/fesm2015/taiga-ui-kit-components-input-inline.js.map +1 -1
  217. package/fesm2015/taiga-ui-kit-components-input-month-range.js +13 -3
  218. package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
  219. package/fesm2015/taiga-ui-kit-components-input-month.js +14 -4
  220. package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
  221. package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
  222. package/fesm2015/taiga-ui-kit-components-input-phone-international.js +20 -2
  223. package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  224. package/fesm2015/taiga-ui-kit-components-input-phone.js +6 -2
  225. package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
  226. package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
  227. package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
  228. package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
  229. package/fesm2015/taiga-ui-kit-components-island.js.map +1 -1
  230. package/fesm2015/taiga-ui-kit-components-marker-icon.js.map +1 -1
  231. package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
  232. package/fesm2015/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
  233. package/fesm2015/taiga-ui-kit-components-push.js +4 -2
  234. package/fesm2015/taiga-ui-kit-components-push.js.map +1 -1
  235. package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
  236. package/fesm2015/taiga-ui-kit-components-range.js +4 -2
  237. package/fesm2015/taiga-ui-kit-components-range.js.map +1 -1
  238. package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
  239. package/fesm2015/taiga-ui-kit-components-slider.js +3 -1
  240. package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
  241. package/fesm2015/taiga-ui-kit-components-stepper.js +12 -9
  242. package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
  243. package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
  244. package/fesm2015/taiga-ui-kit-components-tiles.js +262 -0
  245. package/fesm2015/taiga-ui-kit-components-tiles.js.map +1 -0
  246. package/fesm2015/taiga-ui-kit-components.js +1 -0
  247. package/fesm2015/taiga-ui-kit-components.js.map +1 -1
  248. package/fesm2015/taiga-ui-kit-directives-lazy-loading.js +4 -2
  249. package/fesm2015/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
  250. package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js +4 -2
  251. package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
  252. package/fesm2015/taiga-ui-kit-pipes-field-error.js.map +1 -1
  253. package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js.map +1 -1
  254. package/fesm2015/taiga-ui-kit-pipes-stringify.js.map +1 -1
  255. package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
  256. package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
  257. package/fesm2015/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
  258. package/internal/primitive-calendar-range/primitive-calendar-range.component.d.ts +1 -1
  259. package/package.json +8 -8
  260. package/pipes/field-error/field-error-pipe.d.ts +1 -1
  261. package/pipes/filter-by-input/filter-by-input.base.d.ts +1 -1
  262. package/pipes/stringify/stringify.pipe.d.ts +1 -1
  263. package/tokens/input-date-options.d.ts +1 -1
  264. package/types/dropdown-position.d.ts +1 -1
  265. package/types/file-state.d.ts +1 -1
  266. package/types/marker-icon-mode.d.ts +1 -1
  267. package/types/status.d.ts +1 -1
  268. package/types/step-state.d.ts +1 -1
  269. package/types/time-format-parts.d.ts +1 -1
  270. package/utils/miscellaneous/is-flat.d.ts +1 -1
  271. package/utils/miscellaneous/replay-control-value-changes-factory.d.ts +1 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
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('@tinkoff/ng-polymorpheus'), require('@angular/common'), require('@taiga-ui/kit/utils'), require('@taiga-ui/kit/components/files')) :
3
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', '@tinkoff/ng-polymorpheus', '@angular/common', '@taiga-ui/kit/utils', '@taiga-ui/kit/components/files'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].kit = global["taiga-ui"].kit || {}, global["taiga-ui"].kit.components = global["taiga-ui"].kit.components || {}, global["taiga-ui"].kit.components["input-files"] = {}), global.ng.core, global.ng.forms, global.i4, global.i1, global["taiga-ui"].kit.tokens, global["taiga-ui"].kit.utils.files, global.rxjs, global.rxjs.operators, global.i2, global.ng.common, global["taiga-ui"].kit.utils, global["taiga-ui"].kit.components.files));
5
- })(this, (function (exports, i0, i6, i4, i1, tokens, files, i7, operators, i2, i3, utils, files$1) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].kit = global["taiga-ui"].kit || {}, global["taiga-ui"].kit.components = global["taiga-ui"].kit.components || {}, global["taiga-ui"].kit.components["input-files"] = {}), global.ng.core, global.ng.forms, global.i2, global.i1, global["taiga-ui"].kit.tokens, global["taiga-ui"].kit.utils.files, global.rxjs, global.rxjs.operators, global.i3, global.ng.common, global["taiga-ui"].kit.utils, global["taiga-ui"].kit.components.files));
5
+ })(this, (function (exports, i0, i6, i2, i1, tokens, files, i7, operators, i3, i4, utils, files$1) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -24,11 +24,11 @@
24
24
 
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
26
  var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
27
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
27
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
28
28
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
29
  var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
30
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
30
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
31
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
32
32
 
33
33
  /******************************************************************************
34
34
  Copyright (c) Microsoft Corporation.
@@ -357,6 +357,117 @@
357
357
  return typeof state === "function" ? receiver === state : state.has(receiver);
358
358
  }
359
359
 
360
+ var TUI_INPUT_FILES_DEFAULT_OPTIONS = {
361
+ capture: null,
362
+ accepts: "",
363
+ multiple: false,
364
+ size: "m",
365
+ maxFileSize: 30 * 1000 * 1000, // 30 MB
366
+ };
367
+ var TUI_INPUT_FILES_OPTIONS = new i0.InjectionToken("[TUI_INPUT_FILES_OPTIONS]: Default parameters for input files component", {
368
+ factory: function () { return TUI_INPUT_FILES_DEFAULT_OPTIONS; },
369
+ });
370
+ var tuiInputFilesOptionsProvider = function (options) { return ({
371
+ provide: TUI_INPUT_FILES_OPTIONS,
372
+ useValue: Object.assign(Object.assign({}, TUI_INPUT_FILES_DEFAULT_OPTIONS), options),
373
+ }); };
374
+
375
+ var TuiInputFilesDirective = /** @class */ (function () {
376
+ function TuiInputFilesDirective(host, elementRef, idService, options) {
377
+ this.host = host;
378
+ this.elementRef = elementRef;
379
+ this.idService = idService;
380
+ this.options = options;
381
+ }
382
+ Object.defineProperty(TuiInputFilesDirective.prototype, "tabIndex", {
383
+ get: function () {
384
+ return this.host.focusable ? 0 : -1;
385
+ },
386
+ enumerable: false,
387
+ configurable: true
388
+ });
389
+ Object.defineProperty(TuiInputFilesDirective.prototype, "id", {
390
+ get: function () {
391
+ return this.elementRef.nativeElement.id || this.idService.generate();
392
+ },
393
+ enumerable: false,
394
+ configurable: true
395
+ });
396
+ Object.defineProperty(TuiInputFilesDirective.prototype, "accept", {
397
+ get: function () {
398
+ var _a;
399
+ return (_a = this.elementRef.nativeElement.accept) !== null && _a !== void 0 ? _a : this.options.accepts;
400
+ },
401
+ enumerable: false,
402
+ configurable: true
403
+ });
404
+ Object.defineProperty(TuiInputFilesDirective.prototype, "multiple", {
405
+ get: function () {
406
+ var _a;
407
+ return (_a = this.elementRef.nativeElement.multiple) !== null && _a !== void 0 ? _a : this.options.multiple;
408
+ },
409
+ enumerable: false,
410
+ configurable: true
411
+ });
412
+ Object.defineProperty(TuiInputFilesDirective.prototype, "capture", {
413
+ get: function () {
414
+ var _a;
415
+ return ((_a = this.elementRef.nativeElement.capture) !== null && _a !== void 0 ? _a : this.options.capture);
416
+ },
417
+ enumerable: false,
418
+ configurable: true
419
+ });
420
+ Object.defineProperty(TuiInputFilesDirective.prototype, "input", {
421
+ get: function () {
422
+ return this.elementRef.nativeElement;
423
+ },
424
+ enumerable: false,
425
+ configurable: true
426
+ });
427
+ return TuiInputFilesDirective;
428
+ }());
429
+ TuiInputFilesDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiInputFilesDirective, deps: [{ token: TuiInputFilesComponent }, { token: i0.ElementRef }, { token: i2.TuiIdService }, { token: TUI_INPUT_FILES_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Directive });
430
+ TuiInputFilesDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiInputFilesDirective, selector: "input[tuiInputFiles]", host: { attributes: { "type": "file" }, properties: { "tabIndex": "this.tabIndex", "id": "this.id", "accept": "this.accept", "multiple": "this.multiple", "capture": "this.capture" }, classAttribute: "t-native" }, ngImport: i0__namespace });
431
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiInputFilesDirective, decorators: [{
432
+ type: i0.Directive,
433
+ args: [{
434
+ selector: "input[tuiInputFiles]",
435
+ host: {
436
+ type: "file",
437
+ class: "t-native",
438
+ },
439
+ }]
440
+ }], ctorParameters: function () {
441
+ return [{ type: TuiInputFilesComponent, decorators: [{
442
+ type: i0.Inject,
443
+ args: [TuiInputFilesComponent]
444
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
445
+ type: i0.Inject,
446
+ args: [i0.ElementRef]
447
+ }] }, { type: i2__namespace.TuiIdService, decorators: [{
448
+ type: i0.Inject,
449
+ args: [i2.TuiIdService]
450
+ }] }, { type: undefined, decorators: [{
451
+ type: i0.Inject,
452
+ args: [TUI_INPUT_FILES_OPTIONS]
453
+ }] }];
454
+ }, propDecorators: { tabIndex: [{
455
+ type: i0.HostBinding,
456
+ args: ["tabIndex"]
457
+ }], id: [{
458
+ type: i0.HostBinding,
459
+ args: ["id"]
460
+ }], accept: [{
461
+ type: i0.HostBinding,
462
+ args: ["accept"]
463
+ }], multiple: [{
464
+ type: i0.HostBinding,
465
+ args: ["multiple"]
466
+ }], capture: [{
467
+ type: i0.HostBinding,
468
+ args: ["capture"]
469
+ }] } });
470
+
360
471
  var TuiMaxSizeRejectionErrorPipe = /** @class */ (function () {
361
472
  function TuiMaxSizeRejectionErrorPipe(inputFileTexts$, units$) {
362
473
  this.inputFileTexts$ = inputFileTexts$;
@@ -385,23 +496,45 @@
385
496
  }] }];
386
497
  } });
387
498
 
388
- var DEFAULT_MAX_SIZE = 30 * 1000 * 1000; // 30 MB
389
499
  var TuiInputFilesComponent = /** @class */ (function (_super) {
390
500
  __extends(TuiInputFilesComponent, _super);
391
- function TuiInputFilesComponent(control, changeDetectorRef, isMobile, inputFileTexts$) {
501
+ function TuiInputFilesComponent(control, changeDetectorRef, isMobile, inputFileTexts$, options) {
392
502
  var _this = _super.call(this, control, changeDetectorRef) || this;
393
503
  _this.isMobile = isMobile;
394
504
  _this.inputFileTexts$ = inputFileTexts$;
505
+ _this.options = options;
395
506
  _this.dataTransfer = null;
396
507
  _this.link = "";
397
508
  _this.label = "";
398
- _this.accept = "";
399
- _this.multiple = false;
400
- _this.size = "m";
401
- _this.maxFileSize = DEFAULT_MAX_SIZE;
509
+ /**
510
+ * @deprecated: use `<input tuiInputFiles accept="image/*" />`
511
+ */
512
+ _this.accept = _this.options.accepts;
513
+ /**
514
+ * @deprecated: use `<input tuiInputFiles multiple />`
515
+ */
516
+ _this.multiple = _this.options.multiple;
517
+ _this.size = _this.options.size;
518
+ _this.maxFileSize = _this.options.maxFileSize;
402
519
  _this.reject = new i0.EventEmitter();
403
520
  return _this;
404
521
  }
522
+ Object.defineProperty(TuiInputFilesComponent.prototype, "computedMultiple", {
523
+ get: function () {
524
+ var _a, _b;
525
+ return (_b = (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.multiple) !== null && _b !== void 0 ? _b : this.multiple;
526
+ },
527
+ enumerable: false,
528
+ configurable: true
529
+ });
530
+ Object.defineProperty(TuiInputFilesComponent.prototype, "computedAccept", {
531
+ get: function () {
532
+ var _a, _b;
533
+ return (_b = (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.accept) !== null && _b !== void 0 ? _b : this.accept;
534
+ },
535
+ enumerable: false,
536
+ configurable: true
537
+ });
405
538
  Object.defineProperty(TuiInputFilesComponent.prototype, "nativeFocusableElement", {
406
539
  get: function () {
407
540
  var _a;
@@ -412,7 +545,7 @@
412
545
  });
413
546
  Object.defineProperty(TuiInputFilesComponent.prototype, "focused", {
414
547
  get: function () {
415
- return i4.tuiIsNativeFocused(this.nativeFocusableElement);
548
+ return i2.tuiIsNativeFocused(this.nativeFocusableElement);
416
549
  },
417
550
  enumerable: false,
418
551
  configurable: true
@@ -427,14 +560,14 @@
427
560
  });
428
561
  Object.defineProperty(TuiInputFilesComponent.prototype, "computedLink$", {
429
562
  get: function () {
430
- return this.computeLink$(this.fileDragged, this.multiple, this.link);
563
+ return this.computeLink$(this.fileDragged, this.computedMultiple, this.link);
431
564
  },
432
565
  enumerable: false,
433
566
  configurable: true
434
567
  });
435
568
  Object.defineProperty(TuiInputFilesComponent.prototype, "computedLabel$", {
436
569
  get: function () {
437
- return this.computeLabel$(this.isMobile, this.fileDragged, this.multiple, this.label);
570
+ return this.computeLabel$(this.isMobile, this.fileDragged, this.computedMultiple, this.label);
438
571
  },
439
572
  enumerable: false,
440
573
  configurable: true
@@ -457,18 +590,25 @@
457
590
  TuiInputFilesComponent.prototype.onFocused = function (focused) {
458
591
  this.updateFocused(focused);
459
592
  };
460
- TuiInputFilesComponent.prototype.onFilesSelected = function (input, errors) {
461
- this.processSelectedFiles(input.files, errors);
593
+ TuiInputFilesComponent.prototype.onFilesSelected = function () {
594
+ var _a, _b, _c;
595
+ var input = (_b = (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.input) !== null && _b !== void 0 ? _b : (_c = this.input) === null || _c === void 0 ? void 0 : _c.nativeElement;
596
+ if (!input) {
597
+ return;
598
+ }
599
+ this.processSelectedFiles(input.files);
462
600
  input.value = "";
463
601
  };
464
- TuiInputFilesComponent.prototype.onDropped = function (event, errors) {
465
- this.processSelectedFiles(event.files, errors);
602
+ TuiInputFilesComponent.prototype.onDropped = function (event) {
603
+ this.processSelectedFiles(event.files);
466
604
  };
467
605
  TuiInputFilesComponent.prototype.onDragOver = function (dataTransfer) {
468
606
  this.dataTransfer = dataTransfer;
469
607
  };
470
608
  TuiInputFilesComponent.prototype.removeFile = function (removedFile) {
471
- this.updateValue(this.multiple ? this.arrayValue.filter(function (file) { return file !== removedFile; }) : null);
609
+ this.updateValue(this.computedMultiple
610
+ ? this.arrayValue.filter(function (file) { return file !== removedFile; })
611
+ : null);
472
612
  };
473
613
  TuiInputFilesComponent.prototype.computeLink$ = function (fileDragged, multiple, link) {
474
614
  return fileDragged
@@ -490,17 +630,21 @@
490
630
  };
491
631
  TuiInputFilesComponent.prototype.getValueArray = function (value) {
492
632
  if (!value) {
493
- return i4.EMPTY_ARRAY;
633
+ return i2.EMPTY_ARRAY;
494
634
  }
495
635
  return Array.isArray(value) ? value : [value];
496
636
  };
497
- TuiInputFilesComponent.prototype.processSelectedFiles = function (files, errors) {
637
+ TuiInputFilesComponent.prototype.processSelectedFiles = function (files) {
498
638
  var _this = this;
499
639
  // IE11 after selecting a file through the open dialog generates a second event passing an empty FileList.
500
640
  if (!(files === null || files === void 0 ? void 0 : files.length)) {
501
641
  return;
502
642
  }
503
- var newFiles = this.multiple ? Array.from(files) : [files[0]];
643
+ var errors = {
644
+ formatRejection: this.formatRejection,
645
+ maxSizeRejection: this.maxSizeRejection,
646
+ };
647
+ var newFiles = this.computedMultiple ? Array.from(files) : [files[0]];
504
648
  var tooBigFiles = newFiles.filter(function (file) { return file.size > _this.maxFileSize; });
505
649
  var wrongFormatFiles = newFiles.filter(function (file) { return !_this.isFormatAcceptable(file) && !tooBigFiles.includes(file); });
506
650
  var acceptedFiles = newFiles.filter(function (file) { return !tooBigFiles.includes(file) && !wrongFormatFiles.includes(file); });
@@ -517,52 +661,52 @@
517
661
  content: errors.formatRejection,
518
662
  }); }))));
519
663
  }
520
- this.updateValue(this.multiple
664
+ this.updateValue(this.computedMultiple
521
665
  ? __spreadArray(__spreadArray([], __read(this.arrayValue)), __read(acceptedFiles)) : acceptedFiles[0] || null);
522
666
  };
523
667
  TuiInputFilesComponent.prototype.isFormatAcceptable = function (file) {
524
- if (!this.accept) {
668
+ if (!this.computedAccept) {
525
669
  return true;
526
670
  }
527
671
  var extension = "." + (file.name.split(".").pop() || "").toLowerCase();
528
- return files.tuiGetAcceptArray(this.accept).some(function (format) { return format === extension ||
672
+ return files.tuiGetAcceptArray(this.computedAccept).some(function (format) { return format === extension ||
529
673
  format === file.type ||
530
674
  (format.split("/")[1] === "*" &&
531
675
  file.type.split("/")[0] === format.split("/")[0]); });
532
676
  };
533
677
  TuiInputFilesComponent.prototype.rejectFiles = function (rejectedFiles) {
534
- this.reject.emit(this.multiple ? rejectedFiles : rejectedFiles[0]);
678
+ this.reject.emit(this.computedMultiple ? rejectedFiles : rejectedFiles[0]);
535
679
  };
536
680
  return TuiInputFilesComponent;
537
- }(i4.AbstractTuiNullableControl));
538
- TuiInputFilesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiInputFilesComponent, deps: [{ token: i6.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: i4.TUI_IS_MOBILE }, { token: tokens.TUI_INPUT_FILE_TEXTS }], target: i0__namespace.ɵɵFactoryTarget.Component });
539
- TuiInputFilesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiInputFilesComponent, selector: "tui-input-files", inputs: { link: "link", label: "label", accept: "accept", multiple: "multiple", size: "size", maxFileSize: "maxFileSize" }, outputs: { reject: "reject" }, providers: [i1.MODE_PROVIDER, i4.tuiAsFocusableItemAccessor(TuiInputFilesComponent)], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div\n tuiWrapper\n appearance=\"input-file\"\n class=\"t-wrapper\"\n [class._mobile]=\"isMobile\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover || fileDragged || null\"\n [active]=\"pseudoActive\"\n [disabled]=\"computedDisabled\"\n>\n <label automation-id=\"tui-input-file__label\">\n <a tuiLink>\n <ng-container *polymorpheusOutlet=\"computedLink$ | async as text\">\n {{ text }}\n </ng-container>\n </a>\n <ng-container *polymorpheusOutlet=\"computedLabel$ | async as text\">\n {{ text }}\n </ng-container>\n <ng-container *ngIf=\"!readOnly && !computedDisabled\">\n <input\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, {formatRejection, maxSizeRejection})\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiDroppableDropped)=\"onDropped($event, {formatRejection, maxSizeRejection})\"\n (tuiDroppableDragOverChange)=\"onDragOver($event)\"\n (mousedown.prevent.silent)=\"(0)\"\n />\n </ng-container>\n </label>\n</div>\n\n<ng-template #formatRejection>\n {{ (inputFileTexts$ | async)?.formatRejectionReason || '' }}\n</ng-template>\n\n<ng-template #maxSizeRejection>\n {{ maxFileSize | tuiMaxSizeRejectionError | async }}\n</ng-template>\n", styles: ["tui-input-files{display:block}tui-input-files .t-native{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}tui-input-files .t-native::-webkit-file-upload-button{display:none}[tuiWrapper][data-appearance=input-file]{display:flex;background:transparent;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}[tuiWrapper][data-appearance=input-file]:after{border:1px dashed;color:var(--tui-link)}[tuiWrapper][data-appearance=input-file]._mobile:after{border:1px solid}[tuiWrapper][data-appearance=input-file]:disabled:disabled,[tuiWrapper][data-appearance=input-file][data-state=disabled][data-state=disabled]{opacity:var(--tui-disabled-opacity);pointer-events:none}[tuiWrapper][data-appearance=input-file]:disabled:disabled:after,[tuiWrapper][data-appearance=input-file][data-state=disabled][data-state=disabled]:after{color:var(--tui-text-03)}[tuiWrapper][data-appearance=input-file]:focus-visible:focus-visible:after{border-style:solid;border-width:2px;color:var(--tui-focus)}[tuiWrapper][data-appearance=input-file]._focused._focused:after{border-style:solid;border-width:2px;color:var(--tui-focus)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]{color:var(--tui-text-01-night)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]:after{color:var(--tui-text-01-night)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]:focus-visible:focus-visible:after{color:var(--tui-text-01-night)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]._focused._focused:after{color:var(--tui-text-01-night)}@media (hover: hover){[tuiWrapper][data-appearance=input-file][data-mode=onDark]:hover:not(._no-hover),[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=hover]{background:var(--tui-clear-inverse-hover)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]:hover:not(._no-hover):after,[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=hover]:after{color:var(--tui-text-03-night)}}[tuiWrapper][data-appearance=input-file][data-mode=onDark]:active:not(._no-active),[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=active],[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=active]:hover{background:var(--tui-clear-inverse-active)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]:active:not(._no-active):after,[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=active]:after,[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=active]:hover:after{color:var(--tui-text-03-night)}[tuiWrapper][data-appearance=input-file][data-mode=onLight]{color:var(--tui-text-01)}[tuiWrapper][data-appearance=input-file][data-mode=onLight]:after{color:var(--tui-text-01)}@media (hover: hover){[tuiWrapper][data-appearance=input-file][data-mode=onLight]:hover:not(._no-hover),[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=hover]{background:var(--tui-clear-hover)}[tuiWrapper][data-appearance=input-file][data-mode=onLight]:hover:not(._no-hover):after,[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=hover]:after{color:var(--tui-text-03)}}[tuiWrapper][data-appearance=input-file][data-mode=onLight]:active:not(._no-active),[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=active],[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=active]:hover{background:var(--tui-clear-active)}[tuiWrapper][data-appearance=input-file][data-mode=onLight]:active:not(._no-active):after,[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=active]:after,[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=active]:hover:after{color:var(--tui-text-03)}@media (hover: hover){[tuiWrapper][data-appearance=input-file]:hover:not(._no-hover),[tuiWrapper][data-appearance=input-file][data-state=hover]{background:var(--tui-secondary)}[tuiWrapper][data-appearance=input-file]:hover:not(._no-hover):after,[tuiWrapper][data-appearance=input-file][data-state=hover]:after{color:var(--tui-link-hover)}}[tuiWrapper][data-appearance=input-file]:active:not(._no-active),[tuiWrapper][data-appearance=input-file][data-state=active],[tuiWrapper][data-appearance=input-file][data-state=active]:hover{background:var(--tui-secondary-hover)}\n"], components: [{ type: i1__namespace.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }], directives: [{ type: i1__namespace.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i2__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i4__namespace.TuiFocusedDirective, selector: "[tuiFocusedChange]", outputs: ["tuiFocusedChange"] }, { type: i4__namespace.TuiDroppableDirective, selector: "[tuiDroppableDropped], [tuiDroppableDragOverChange]", outputs: ["tuiDroppableDropped", "tuiDroppableDragOverChange"] }], pipes: { "async": i3__namespace.AsyncPipe, "tuiMaxSizeRejectionError": TuiMaxSizeRejectionErrorPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
681
+ }(i2.AbstractTuiNullableControl));
682
+ TuiInputFilesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiInputFilesComponent, deps: [{ token: i6.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: i2.TUI_IS_MOBILE }, { token: tokens.TUI_INPUT_FILE_TEXTS }, { token: TUI_INPUT_FILES_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Component });
683
+ TuiInputFilesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiInputFilesComponent, selector: "tui-input-files", inputs: { link: "link", label: "label", accept: "accept", multiple: "multiple", size: "size", maxFileSize: "maxFileSize" }, outputs: { reject: "reject" }, host: { listeners: { "focusin": "onFocused(true)", "focusout": "onFocused(false)", "change": "onFilesSelected()" } }, providers: [i1.MODE_PROVIDER, i2.tuiAsFocusableItemAccessor(TuiInputFilesComponent)], queries: [{ propertyName: "nativeInput", first: true, predicate: TuiInputFilesDirective, descendants: true, read: TuiInputFilesDirective }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "formatRejection", first: true, predicate: ["formatRejection"], descendants: true }, { propertyName: "maxSizeRejection", first: true, predicate: ["maxSizeRejection"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div\n tuiWrapper\n appearance=\"input-file\"\n class=\"t-wrapper\"\n [class._mobile]=\"isMobile\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover || fileDragged || null\"\n [active]=\"pseudoActive\"\n [disabled]=\"computedDisabled\"\n>\n <label\n automation-id=\"tui-input-file__label\"\n class=\"t-label\"\n (tuiDroppableDropped)=\"onDropped($event)\"\n (tuiDroppableDragOverChange)=\"onDragOver($event)\"\n (mousedown.prevent.silent)=\"(0)\"\n >\n <a tuiLink>\n <ng-container *polymorpheusOutlet=\"computedLink$ | async as text\">\n {{ text }}\n </ng-container>\n </a>\n <ng-container *polymorpheusOutlet=\"computedLabel$ | async as text\">\n {{ text }}\n </ng-container>\n <ng-container *ngIf=\"!readOnly && !computedDisabled\">\n <ng-content select=\"input\"></ng-content>\n <input\n #input\n type=\"file\"\n class=\"t-native\"\n [id]=\"id\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n [tuiFocusable]=\"focusable\"\n />\n </ng-container>\n </label>\n</div>\n\n<ng-template #formatRejection>\n {{ (inputFileTexts$ | async)?.formatRejectionReason || '' }}\n</ng-template>\n\n<ng-template #maxSizeRejection>\n {{ maxFileSize | tuiMaxSizeRejectionError | async }}\n</ng-template>\n", styles: ["tui-input-files{display:block}tui-input-files .t-native{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}tui-input-files .t-native::-webkit-file-upload-button{display:none}tui-input-files .t-native+.t-native{display:none}[tuiWrapper][data-appearance=input-file]{display:flex;background:transparent;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}[tuiWrapper][data-appearance=input-file]:after{border:1px dashed;color:var(--tui-link)}[tuiWrapper][data-appearance=input-file]._mobile:after{border:1px solid}[tuiWrapper][data-appearance=input-file]:disabled:disabled,[tuiWrapper][data-appearance=input-file][data-state=disabled][data-state=disabled]{opacity:var(--tui-disabled-opacity);pointer-events:none}[tuiWrapper][data-appearance=input-file]:disabled:disabled:after,[tuiWrapper][data-appearance=input-file][data-state=disabled][data-state=disabled]:after{color:var(--tui-text-03)}[tuiWrapper][data-appearance=input-file]:focus-visible:focus-visible:after{border-style:solid;border-width:2px;color:var(--tui-focus)}[tuiWrapper][data-appearance=input-file]._focused._focused:after{border-style:solid;border-width:2px;color:var(--tui-focus)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]{color:var(--tui-text-01-night)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]:after{color:var(--tui-text-01-night)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]:focus-visible:focus-visible:after{color:var(--tui-text-01-night)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]._focused._focused:after{color:var(--tui-text-01-night)}@media (hover: hover){[tuiWrapper][data-appearance=input-file][data-mode=onDark]:hover:not(._no-hover),[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=hover]{background:var(--tui-clear-inverse-hover)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]:hover:not(._no-hover):after,[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=hover]:after{color:var(--tui-text-03-night)}}[tuiWrapper][data-appearance=input-file][data-mode=onDark]:active:not(._no-active),[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=active],[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=active]:hover{background:var(--tui-clear-inverse-active)}[tuiWrapper][data-appearance=input-file][data-mode=onDark]:active:not(._no-active):after,[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=active]:after,[tuiWrapper][data-appearance=input-file][data-mode=onDark][data-state=active]:hover:after{color:var(--tui-text-03-night)}[tuiWrapper][data-appearance=input-file][data-mode=onLight]{color:var(--tui-text-01)}[tuiWrapper][data-appearance=input-file][data-mode=onLight]:after{color:var(--tui-text-01)}@media (hover: hover){[tuiWrapper][data-appearance=input-file][data-mode=onLight]:hover:not(._no-hover),[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=hover]{background:var(--tui-clear-hover)}[tuiWrapper][data-appearance=input-file][data-mode=onLight]:hover:not(._no-hover):after,[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=hover]:after{color:var(--tui-text-03)}}[tuiWrapper][data-appearance=input-file][data-mode=onLight]:active:not(._no-active),[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=active],[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=active]:hover{background:var(--tui-clear-active)}[tuiWrapper][data-appearance=input-file][data-mode=onLight]:active:not(._no-active):after,[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=active]:after,[tuiWrapper][data-appearance=input-file][data-mode=onLight][data-state=active]:hover:after{color:var(--tui-text-03)}@media (hover: hover){[tuiWrapper][data-appearance=input-file]:hover:not(._no-hover),[tuiWrapper][data-appearance=input-file][data-state=hover]{background:var(--tui-secondary)}[tuiWrapper][data-appearance=input-file]:hover:not(._no-hover):after,[tuiWrapper][data-appearance=input-file][data-state=hover]:after{color:var(--tui-link-hover)}}[tuiWrapper][data-appearance=input-file]:active:not(._no-active),[tuiWrapper][data-appearance=input-file][data-state=active],[tuiWrapper][data-appearance=input-file][data-state=active]:hover{background:var(--tui-secondary-hover)}.t-label{text-align:center}\n"], components: [{ type: i1__namespace.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }], directives: [{ type: i1__namespace.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i2__namespace.TuiDroppableDirective, selector: "[tuiDroppableDropped], [tuiDroppableDragOverChange]", outputs: ["tuiDroppableDropped", "tuiDroppableDragOverChange"] }, { type: i3__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }], pipes: { "async": i4__namespace.AsyncPipe, "tuiMaxSizeRejectionError": TuiMaxSizeRejectionErrorPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
540
684
  __decorate([
541
- i4.tuiDefaultProp()
685
+ i2.tuiDefaultProp()
542
686
  ], TuiInputFilesComponent.prototype, "link", void 0);
543
687
  __decorate([
544
- i4.tuiDefaultProp()
688
+ i2.tuiDefaultProp()
545
689
  ], TuiInputFilesComponent.prototype, "label", void 0);
546
690
  __decorate([
547
- i4.tuiDefaultProp()
691
+ i2.tuiDefaultProp()
548
692
  ], TuiInputFilesComponent.prototype, "accept", void 0);
549
693
  __decorate([
550
- i4.tuiDefaultProp()
694
+ i2.tuiDefaultProp()
551
695
  ], TuiInputFilesComponent.prototype, "multiple", void 0);
552
696
  __decorate([
553
- i4.tuiDefaultProp()
697
+ i2.tuiDefaultProp()
554
698
  ], TuiInputFilesComponent.prototype, "size", void 0);
555
699
  __decorate([
556
- i4.tuiDefaultProp()
700
+ i2.tuiDefaultProp()
557
701
  ], TuiInputFilesComponent.prototype, "maxFileSize", void 0);
558
702
  __decorate([
559
- i4.tuiPure
703
+ i2.tuiPure
560
704
  ], TuiInputFilesComponent.prototype, "computeLink$", null);
561
705
  __decorate([
562
- i4.tuiPure
706
+ i2.tuiPure
563
707
  ], TuiInputFilesComponent.prototype, "computeLabel$", null);
564
708
  __decorate([
565
- i4.tuiPure
709
+ i2.tuiPure
566
710
  ], TuiInputFilesComponent.prototype, "getValueArray", null);
567
711
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiInputFilesComponent, decorators: [{
568
712
  type: i0.Component,
@@ -572,7 +716,7 @@
572
716
  styleUrls: ["./input-files.style.less"],
573
717
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
574
718
  encapsulation: i0.ViewEncapsulation.None,
575
- providers: [i1.MODE_PROVIDER, i4.tuiAsFocusableItemAccessor(TuiInputFilesComponent)],
719
+ providers: [i1.MODE_PROVIDER, i2.tuiAsFocusableItemAccessor(TuiInputFilesComponent)],
576
720
  }]
577
721
  }], ctorParameters: function () {
578
722
  return [{ type: i6__namespace.NgControl, decorators: [{
@@ -587,14 +731,26 @@
587
731
  args: [i0.ChangeDetectorRef]
588
732
  }] }, { type: undefined, decorators: [{
589
733
  type: i0.Inject,
590
- args: [i4.TUI_IS_MOBILE]
734
+ args: [i2.TUI_IS_MOBILE]
591
735
  }] }, { type: i7__namespace.Observable, decorators: [{
592
736
  type: i0.Inject,
593
737
  args: [tokens.TUI_INPUT_FILE_TEXTS]
738
+ }] }, { type: undefined, decorators: [{
739
+ type: i0.Inject,
740
+ args: [TUI_INPUT_FILES_OPTIONS]
594
741
  }] }];
595
742
  }, propDecorators: { input: [{
596
743
  type: i0.ViewChild,
597
744
  args: ["input"]
745
+ }], nativeInput: [{
746
+ type: i0.ContentChild,
747
+ args: [TuiInputFilesDirective, { read: TuiInputFilesDirective }]
748
+ }], formatRejection: [{
749
+ type: i0.ViewChild,
750
+ args: ["formatRejection"]
751
+ }], maxSizeRejection: [{
752
+ type: i0.ViewChild,
753
+ args: ["maxSizeRejection"]
598
754
  }], link: [{
599
755
  type: i0.Input
600
756
  }], label: [{
@@ -609,6 +765,15 @@
609
765
  type: i0.Input
610
766
  }], reject: [{
611
767
  type: i0.Output
768
+ }], onFocused: [{
769
+ type: i0.HostListener,
770
+ args: ["focusin", ["true"]]
771
+ }, {
772
+ type: i0.HostListener,
773
+ args: ["focusout", ["false"]]
774
+ }], onFilesSelected: [{
775
+ type: i0.HostListener,
776
+ args: ["change"]
612
777
  }], computeLink$: [], computeLabel$: [], getValueArray: [] } });
613
778
 
614
779
  var TuiInputFilesModule = /** @class */ (function () {
@@ -617,15 +782,17 @@
617
782
  return TuiInputFilesModule;
618
783
  }());
619
784
  TuiInputFilesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiInputFilesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
620
- TuiInputFilesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiInputFilesModule, declarations: [TuiInputFilesComponent, TuiMaxSizeRejectionErrorPipe], imports: [i3.CommonModule,
621
- i2.PolymorpheusModule,
622
- i4.TuiLetModule,
623
- i4.TuiFocusedModule,
624
- i4.TuiFocusVisibleModule,
625
- i4.TuiPressedModule,
626
- i4.TuiHoveredModule,
627
- i4.TuiFocusableModule,
628
- i4.TuiDroppableModule,
785
+ TuiInputFilesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiInputFilesModule, declarations: [TuiInputFilesComponent,
786
+ TuiInputFilesDirective,
787
+ TuiMaxSizeRejectionErrorPipe], imports: [i4.CommonModule,
788
+ i3.PolymorpheusModule,
789
+ i2.TuiLetModule,
790
+ i2.TuiFocusedModule,
791
+ i2.TuiFocusVisibleModule,
792
+ i2.TuiPressedModule,
793
+ i2.TuiHoveredModule,
794
+ i2.TuiFocusableModule,
795
+ i2.TuiDroppableModule,
629
796
  i1.TuiWrapperModule,
630
797
  i1.TuiSvgModule,
631
798
  i1.TuiLinkModule,
@@ -633,19 +800,20 @@
633
800
  i1.TuiButtonModule,
634
801
  i1.TuiGroupModule,
635
802
  files$1.TuiFilesModule], exports: [TuiInputFilesComponent,
803
+ TuiInputFilesDirective,
636
804
  files$1.TuiFilesComponent,
637
805
  files$1.TuiFileComponent,
638
- i4.TuiItemDirective] });
806
+ i2.TuiItemDirective] });
639
807
  TuiInputFilesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiInputFilesModule, imports: [[
640
- i3.CommonModule,
641
- i2.PolymorpheusModule,
642
- i4.TuiLetModule,
643
- i4.TuiFocusedModule,
644
- i4.TuiFocusVisibleModule,
645
- i4.TuiPressedModule,
646
- i4.TuiHoveredModule,
647
- i4.TuiFocusableModule,
648
- i4.TuiDroppableModule,
808
+ i4.CommonModule,
809
+ i3.PolymorpheusModule,
810
+ i2.TuiLetModule,
811
+ i2.TuiFocusedModule,
812
+ i2.TuiFocusVisibleModule,
813
+ i2.TuiPressedModule,
814
+ i2.TuiHoveredModule,
815
+ i2.TuiFocusableModule,
816
+ i2.TuiDroppableModule,
649
817
  i1.TuiWrapperModule,
650
818
  i1.TuiSvgModule,
651
819
  i1.TuiLinkModule,
@@ -658,15 +826,15 @@
658
826
  type: i0.NgModule,
659
827
  args: [{
660
828
  imports: [
661
- i3.CommonModule,
662
- i2.PolymorpheusModule,
663
- i4.TuiLetModule,
664
- i4.TuiFocusedModule,
665
- i4.TuiFocusVisibleModule,
666
- i4.TuiPressedModule,
667
- i4.TuiHoveredModule,
668
- i4.TuiFocusableModule,
669
- i4.TuiDroppableModule,
829
+ i4.CommonModule,
830
+ i3.PolymorpheusModule,
831
+ i2.TuiLetModule,
832
+ i2.TuiFocusedModule,
833
+ i2.TuiFocusVisibleModule,
834
+ i2.TuiPressedModule,
835
+ i2.TuiHoveredModule,
836
+ i2.TuiFocusableModule,
837
+ i2.TuiDroppableModule,
670
838
  i1.TuiWrapperModule,
671
839
  i1.TuiSvgModule,
672
840
  i1.TuiLinkModule,
@@ -675,12 +843,17 @@
675
843
  i1.TuiGroupModule,
676
844
  files$1.TuiFilesModule,
677
845
  ],
678
- declarations: [TuiInputFilesComponent, TuiMaxSizeRejectionErrorPipe],
846
+ declarations: [
847
+ TuiInputFilesComponent,
848
+ TuiInputFilesDirective,
849
+ TuiMaxSizeRejectionErrorPipe,
850
+ ],
679
851
  exports: [
680
852
  TuiInputFilesComponent,
853
+ TuiInputFilesDirective,
681
854
  files$1.TuiFilesComponent,
682
855
  files$1.TuiFileComponent,
683
- i4.TuiItemDirective,
856
+ i2.TuiItemDirective,
684
857
  ],
685
858
  }]
686
859
  }] });
@@ -689,8 +862,12 @@
689
862
  * Generated bundle index. Do not edit.
690
863
  */
691
864
 
865
+ exports.TUI_INPUT_FILES_DEFAULT_OPTIONS = TUI_INPUT_FILES_DEFAULT_OPTIONS;
866
+ exports.TUI_INPUT_FILES_OPTIONS = TUI_INPUT_FILES_OPTIONS;
692
867
  exports.TuiInputFilesComponent = TuiInputFilesComponent;
868
+ exports.TuiInputFilesDirective = TuiInputFilesDirective;
693
869
  exports.TuiInputFilesModule = TuiInputFilesModule;
870
+ exports.tuiInputFilesOptionsProvider = tuiInputFilesOptionsProvider;
694
871
 
695
872
  Object.defineProperty(exports, '__esModule', { value: true });
696
873