@taiga-ui/kit 3.60.0 → 3.61.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 (338) hide show
  1. package/bundles/taiga-ui-kit-abstract.umd.js +1 -1
  2. package/bundles/taiga-ui-kit-abstract.umd.js.map +1 -1
  3. package/bundles/taiga-ui-kit-components-accordion.umd.js +628 -774
  4. package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
  5. package/bundles/taiga-ui-kit-components-action.umd.js +452 -598
  6. package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
  7. package/bundles/taiga-ui-kit-components-arrow.umd.js +2 -2
  8. package/bundles/taiga-ui-kit-components-arrow.umd.js.map +1 -1
  9. package/bundles/taiga-ui-kit-components-avatar.umd.js +494 -640
  10. package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
  11. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +417 -563
  12. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
  13. package/bundles/taiga-ui-kit-components-calendar-month.umd.js +601 -747
  14. package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
  15. package/bundles/taiga-ui-kit-components-calendar-range.umd.js +572 -718
  16. package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
  17. package/bundles/taiga-ui-kit-components-carousel.umd.js +675 -821
  18. package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
  19. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +499 -645
  20. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
  21. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +439 -585
  22. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
  23. package/bundles/taiga-ui-kit-components-checkbox.umd.js +462 -608
  24. package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +1 -1
  25. package/bundles/taiga-ui-kit-components-combo-box.umd.js +688 -834
  26. package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
  27. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +510 -656
  28. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
  29. package/bundles/taiga-ui-kit-components-elastic-container.umd.js +441 -587
  30. package/bundles/taiga-ui-kit-components-elastic-container.umd.js.map +1 -1
  31. package/bundles/taiga-ui-kit-components-files.umd.js +662 -808
  32. package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
  33. package/bundles/taiga-ui-kit-components-filter.umd.js +461 -607
  34. package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
  35. package/bundles/taiga-ui-kit-components-input-copy.umd.js +554 -700
  36. package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
  37. package/bundles/taiga-ui-kit-components-input-count.umd.js +663 -809
  38. package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
  39. package/bundles/taiga-ui-kit-components-input-date-multi.umd.js +703 -849
  40. package/bundles/taiga-ui-kit-components-input-date-multi.umd.js.map +1 -1
  41. package/bundles/taiga-ui-kit-components-input-date-range.umd.js +827 -973
  42. package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
  43. package/bundles/taiga-ui-kit-components-input-date-time.umd.js +880 -1026
  44. package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
  45. package/bundles/taiga-ui-kit-components-input-date.umd.js +830 -976
  46. package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
  47. package/bundles/taiga-ui-kit-components-input-files.umd.js +829 -975
  48. package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
  49. package/bundles/taiga-ui-kit-components-input-inline.umd.js +466 -612
  50. package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
  51. package/bundles/taiga-ui-kit-components-input-month-range.umd.js +609 -755
  52. package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
  53. package/bundles/taiga-ui-kit-components-input-month.umd.js +642 -788
  54. package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
  55. package/bundles/taiga-ui-kit-components-input-number.umd.js +795 -941
  56. package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
  57. package/bundles/taiga-ui-kit-components-input-password.umd.js +574 -720
  58. package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
  59. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +665 -811
  60. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
  61. package/bundles/taiga-ui-kit-components-input-phone.umd.js +767 -913
  62. package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
  63. package/bundles/taiga-ui-kit-components-input-range.umd.js +650 -796
  64. package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
  65. package/bundles/taiga-ui-kit-components-input-slider.umd.js +591 -737
  66. package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
  67. package/bundles/taiga-ui-kit-components-input-tag.umd.js +956 -1102
  68. package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
  69. package/bundles/taiga-ui-kit-components-input-time.umd.js +875 -1021
  70. package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
  71. package/bundles/taiga-ui-kit-components-input-year.umd.js +560 -706
  72. package/bundles/taiga-ui-kit-components-input-year.umd.js.map +1 -1
  73. package/bundles/taiga-ui-kit-components-input.umd.js +515 -661
  74. package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
  75. package/bundles/taiga-ui-kit-components-items-with-more.umd.js +543 -689
  76. package/bundles/taiga-ui-kit-components-items-with-more.umd.js.map +1 -1
  77. package/bundles/taiga-ui-kit-components-line-clamp.umd.js +596 -742
  78. package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
  79. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +398 -544
  80. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js.map +1 -1
  81. package/bundles/taiga-ui-kit-components-multi-select.umd.js +1191 -1337
  82. package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
  83. package/bundles/taiga-ui-kit-components-pagination.umd.js +664 -810
  84. package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
  85. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js +10 -156
  86. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
  87. package/bundles/taiga-ui-kit-components-progress.umd.js +6 -152
  88. package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
  89. package/bundles/taiga-ui-kit-components-push.umd.js +14 -160
  90. package/bundles/taiga-ui-kit-components-push.umd.js.map +1 -1
  91. package/bundles/taiga-ui-kit-components-radio-block.umd.js +499 -645
  92. package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
  93. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +470 -616
  94. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
  95. package/bundles/taiga-ui-kit-components-radio-list.umd.js +482 -628
  96. package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +1 -1
  97. package/bundles/taiga-ui-kit-components-radio.umd.js +543 -689
  98. package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
  99. package/bundles/taiga-ui-kit-components-range.umd.js +665 -811
  100. package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
  101. package/bundles/taiga-ui-kit-components-rating.umd.js +500 -646
  102. package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
  103. package/bundles/taiga-ui-kit-components-routable-dialog.umd.js +434 -580
  104. package/bundles/taiga-ui-kit-components-routable-dialog.umd.js.map +1 -1
  105. package/bundles/taiga-ui-kit-components-select.umd.js +787 -933
  106. package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
  107. package/bundles/taiga-ui-kit-components-slider.umd.js +797 -943
  108. package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
  109. package/bundles/taiga-ui-kit-components-stepper.umd.js +623 -769
  110. package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
  111. package/bundles/taiga-ui-kit-components-tabs.umd.js +12 -158
  112. package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
  113. package/bundles/taiga-ui-kit-components-tag.umd.js +2 -2
  114. package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
  115. package/bundles/taiga-ui-kit-components-textarea.umd.js +820 -966
  116. package/bundles/taiga-ui-kit-components-textarea.umd.js.map +1 -1
  117. package/bundles/taiga-ui-kit-components-tiles.umd.js +693 -839
  118. package/bundles/taiga-ui-kit-components-tiles.umd.js.map +1 -1
  119. package/bundles/taiga-ui-kit-components-toggle.umd.js +565 -711
  120. package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
  121. package/bundles/taiga-ui-kit-components-tree.umd.js +4 -4
  122. package/bundles/taiga-ui-kit-components-tree.umd.js.map +1 -1
  123. package/bundles/taiga-ui-kit-constants.umd.js +24 -170
  124. package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
  125. package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js +491 -637
  126. package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js.map +1 -1
  127. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +459 -605
  128. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +1 -1
  129. package/bundles/taiga-ui-kit-directives-unmask-handler.umd.js +394 -540
  130. package/bundles/taiga-ui-kit-directives-unmask-handler.umd.js.map +1 -1
  131. package/bundles/taiga-ui-kit-pipes-field-error.umd.js +547 -693
  132. package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
  133. package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js +470 -616
  134. package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js.map +1 -1
  135. package/bundles/taiga-ui-kit-pipes-iso-to-country-code.umd.js +1 -1
  136. package/bundles/taiga-ui-kit-pipes-iso-to-country-code.umd.js.map +1 -1
  137. package/bundles/taiga-ui-kit-pipes-sort-countries.umd.js +378 -524
  138. package/bundles/taiga-ui-kit-pipes-sort-countries.umd.js.map +1 -1
  139. package/bundles/taiga-ui-kit-pipes-stringify-content.umd.js +1 -1
  140. package/bundles/taiga-ui-kit-pipes-stringify-content.umd.js.map +1 -1
  141. package/bundles/taiga-ui-kit-pipes-stringify.umd.js +2 -2
  142. package/bundles/taiga-ui-kit-pipes-stringify.umd.js.map +1 -1
  143. package/bundles/taiga-ui-kit-pipes-to-country-code.umd.js +2 -2
  144. package/bundles/taiga-ui-kit-pipes-to-country-code.umd.js.map +1 -1
  145. package/bundles/taiga-ui-kit-pipes-to-year.umd.js +1 -1
  146. package/bundles/taiga-ui-kit-pipes-to-year.umd.js.map +1 -1
  147. package/bundles/taiga-ui-kit-providers.umd.js +3 -3
  148. package/bundles/taiga-ui-kit-providers.umd.js.map +1 -1
  149. package/bundles/taiga-ui-kit-services.umd.js +1 -1
  150. package/bundles/taiga-ui-kit-services.umd.js.map +1 -1
  151. package/bundles/taiga-ui-kit-tokens.umd.js +243 -243
  152. package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
  153. package/bundles/taiga-ui-kit-utils-files.umd.js +2 -2
  154. package/bundles/taiga-ui-kit-utils-files.umd.js.map +1 -1
  155. package/bundles/taiga-ui-kit-utils-format.umd.js +2 -2
  156. package/bundles/taiga-ui-kit-utils-format.umd.js.map +1 -1
  157. package/bundles/taiga-ui-kit-utils-mask.umd.js +17 -163
  158. package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
  159. package/bundles/taiga-ui-kit-utils-math.umd.js +8 -154
  160. package/bundles/taiga-ui-kit-utils-math.umd.js.map +1 -1
  161. package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js +13 -159
  162. package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
  163. package/bundles/taiga-ui-kit-utils-phone.umd.js +2 -2
  164. package/bundles/taiga-ui-kit-utils-phone.umd.js.map +1 -1
  165. package/bundles/taiga-ui-kit-validators.umd.js +1 -1
  166. package/bundles/taiga-ui-kit-validators.umd.js.map +1 -1
  167. package/esm2015/abstract/abstract-native-select.js +2 -2
  168. package/esm2015/components/arrow/arrow.options.js +3 -3
  169. package/esm2015/components/avatar/avatar.options.js +2 -2
  170. package/esm2015/components/breadcrumbs/breadcrumbs.options.js +4 -4
  171. package/esm2015/components/combo-box/combo-box.component.js +2 -2
  172. package/esm2015/components/input-copy/input-copy.options.js +5 -5
  173. package/esm2015/components/input-count/input-count.options.js +5 -5
  174. package/esm2015/components/input-files/input-files.options.js +3 -3
  175. package/esm2015/components/input-files/max-size-rejection-error.pipe.js +2 -2
  176. package/esm2015/components/input-number/input-number.options.js +4 -4
  177. package/esm2015/components/input-password/input-password.options.js +3 -3
  178. package/esm2015/components/input-phone/input-phone.options.js +3 -3
  179. package/esm2015/components/input-phone/utils/complete-phone-insertion-preprocessor.js +6 -6
  180. package/esm2015/components/input-phone/utils/create-phone-mask-expression.js +6 -6
  181. package/esm2015/components/input-phone-international/utils/extract-value-from-event.js +3 -3
  182. package/esm2015/components/input-tag/input-tag.options.js +3 -3
  183. package/esm2015/components/input-time/input-time.options.js +5 -5
  184. package/esm2015/components/items-with-more/items-with-more.service.js +2 -2
  185. package/esm2015/components/multi-select/hide-selected.pipe.js +2 -2
  186. package/esm2015/components/multi-select/multi-select.options.js +2 -2
  187. package/esm2015/components/pdf-viewer/pdf-viewer.options.js +3 -3
  188. package/esm2015/components/pdf-viewer/pdf-viewer.service.js +3 -3
  189. package/esm2015/components/push/push.options.js +7 -7
  190. package/esm2015/components/push/push.service.js +3 -3
  191. package/esm2015/components/radio/radio.options.js +2 -2
  192. package/esm2015/components/rating/rating.options.js +3 -3
  193. package/esm2015/components/routable-dialog/generate-dialogable-route.js +6 -6
  194. package/esm2015/components/select/select.options.js +2 -2
  195. package/esm2015/components/slider/slider.options.js +3 -3
  196. package/esm2015/components/tabs/tab/tab.providers.js +5 -5
  197. package/esm2015/components/tabs/tabs-with-more/tabs-with-more.providers.js +3 -3
  198. package/esm2015/components/tag/tag.options.js +3 -3
  199. package/esm2015/components/textarea/deprecated.js +7 -7
  200. package/esm2015/components/tiles/tile.service.js +3 -3
  201. package/esm2015/components/toggle/toggle.options.js +4 -4
  202. package/esm2015/components/tree/misc/tree.tokens.js +5 -5
  203. package/esm2015/constants/date-mode-maskito-adapter.js +4 -4
  204. package/esm2015/constants/date-time-separator.js +2 -2
  205. package/esm2015/constants/group-class-names.js +10 -10
  206. package/esm2015/constants/masks.js +5 -5
  207. package/esm2015/constants/router-link-options.js +2 -2
  208. package/esm2015/pipes/field-error/field-error-content-pipe.js +4 -4
  209. package/esm2015/pipes/field-error/field-error-pipe.js +5 -5
  210. package/esm2015/pipes/filter-by-input/filter-by-input-with.pipe.js +2 -2
  211. package/esm2015/pipes/filter-by-input/filter-by-input.base.js +3 -3
  212. package/esm2015/pipes/filter-by-input/filter-by-input.pipe.js +2 -2
  213. package/esm2015/pipes/iso-to-country-code/iso-to-country-code.pipe.js +2 -2
  214. package/esm2015/pipes/sort-countries/sort-countries.pipe.js +2 -2
  215. package/esm2015/pipes/stringify/stringify.pipe.js +3 -3
  216. package/esm2015/pipes/stringify-content/stringify-content.pipe.js +2 -2
  217. package/esm2015/pipes/to-country-code/to-country-code.pipe.js +3 -3
  218. package/esm2015/pipes/to-year/to-year.pipe.js +2 -2
  219. package/esm2015/providers/month-formatter.provider.js +2 -2
  220. package/esm2015/providers/specific-dropdown-controllers.js +3 -3
  221. package/esm2015/services/dialog-form.service.js +2 -2
  222. package/esm2015/tokens/calendar-date-stream.js +2 -2
  223. package/esm2015/tokens/countries-masks.js +216 -216
  224. package/esm2015/tokens/date-inputs-value-transformers.js +4 -4
  225. package/esm2015/tokens/i18n.js +22 -22
  226. package/esm2015/tokens/input-date-options.js +2 -2
  227. package/esm2015/tokens/mobile-calendar.js +2 -2
  228. package/esm2015/tokens/month-formatter.js +2 -2
  229. package/esm2015/utils/files/format-size.js +2 -2
  230. package/esm2015/utils/files/get-accept-array.js +2 -2
  231. package/esm2015/utils/format/string-hash-to-hsl.js +3 -3
  232. package/esm2015/utils/mask/create-auto-corrected-time-pipe.js +6 -6
  233. package/esm2015/utils/mask/create-date-mask.js +5 -5
  234. package/esm2015/utils/mask/create-date-range-mask.js +2 -2
  235. package/esm2015/utils/mask/create-time-mask.js +4 -4
  236. package/esm2015/utils/math/horizontal-direction-to-number.js +3 -3
  237. package/esm2015/utils/miscellaneous/create-default-day-range-periods.js +7 -7
  238. package/esm2015/utils/miscellaneous/get-precision.js +2 -2
  239. package/esm2015/utils/phone/get-max-allowed-phone-length.js +2 -2
  240. package/esm2015/utils/phone/iso-to-country-code.js +2 -2
  241. package/esm2015/validators/unfinished.validator.js +2 -2
  242. package/fesm2015/taiga-ui-kit-abstract.js +1 -1
  243. package/fesm2015/taiga-ui-kit-abstract.js.map +1 -1
  244. package/fesm2015/taiga-ui-kit-components-arrow.js +2 -2
  245. package/fesm2015/taiga-ui-kit-components-arrow.js.map +1 -1
  246. package/fesm2015/taiga-ui-kit-components-avatar.js +1 -1
  247. package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
  248. package/fesm2015/taiga-ui-kit-components-breadcrumbs.js +3 -3
  249. package/fesm2015/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
  250. package/fesm2015/taiga-ui-kit-components-combo-box.js +1 -1
  251. package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
  252. package/fesm2015/taiga-ui-kit-components-input-copy.js +4 -4
  253. package/fesm2015/taiga-ui-kit-components-input-copy.js.map +1 -1
  254. package/fesm2015/taiga-ui-kit-components-input-count.js +4 -4
  255. package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
  256. package/fesm2015/taiga-ui-kit-components-input-files.js +3 -3
  257. package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
  258. package/fesm2015/taiga-ui-kit-components-input-number.js +3 -3
  259. package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
  260. package/fesm2015/taiga-ui-kit-components-input-password.js +2 -2
  261. package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
  262. package/fesm2015/taiga-ui-kit-components-input-phone-international.js +2 -2
  263. package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  264. package/fesm2015/taiga-ui-kit-components-input-phone.js +12 -12
  265. package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
  266. package/fesm2015/taiga-ui-kit-components-input-tag.js +2 -2
  267. package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
  268. package/fesm2015/taiga-ui-kit-components-input-time.js +4 -4
  269. package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
  270. package/fesm2015/taiga-ui-kit-components-items-with-more.js +1 -1
  271. package/fesm2015/taiga-ui-kit-components-items-with-more.js.map +1 -1
  272. package/fesm2015/taiga-ui-kit-components-multi-select.js +2 -2
  273. package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
  274. package/fesm2015/taiga-ui-kit-components-pdf-viewer.js +4 -4
  275. package/fesm2015/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
  276. package/fesm2015/taiga-ui-kit-components-push.js +8 -8
  277. package/fesm2015/taiga-ui-kit-components-push.js.map +1 -1
  278. package/fesm2015/taiga-ui-kit-components-radio.js +1 -1
  279. package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
  280. package/fesm2015/taiga-ui-kit-components-rating.js +2 -2
  281. package/fesm2015/taiga-ui-kit-components-rating.js.map +1 -1
  282. package/fesm2015/taiga-ui-kit-components-routable-dialog.js +5 -5
  283. package/fesm2015/taiga-ui-kit-components-routable-dialog.js.map +1 -1
  284. package/fesm2015/taiga-ui-kit-components-select.js +1 -1
  285. package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
  286. package/fesm2015/taiga-ui-kit-components-slider.js +2 -2
  287. package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
  288. package/fesm2015/taiga-ui-kit-components-tabs.js +6 -6
  289. package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
  290. package/fesm2015/taiga-ui-kit-components-tag.js +2 -2
  291. package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
  292. package/fesm2015/taiga-ui-kit-components-textarea.js +6 -6
  293. package/fesm2015/taiga-ui-kit-components-textarea.js.map +1 -1
  294. package/fesm2015/taiga-ui-kit-components-tiles.js +2 -2
  295. package/fesm2015/taiga-ui-kit-components-tiles.js.map +1 -1
  296. package/fesm2015/taiga-ui-kit-components-toggle.js +3 -3
  297. package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
  298. package/fesm2015/taiga-ui-kit-components-tree.js +4 -4
  299. package/fesm2015/taiga-ui-kit-components-tree.js.map +1 -1
  300. package/fesm2015/taiga-ui-kit-constants.js +18 -18
  301. package/fesm2015/taiga-ui-kit-constants.js.map +1 -1
  302. package/fesm2015/taiga-ui-kit-pipes-field-error.js +7 -7
  303. package/fesm2015/taiga-ui-kit-pipes-field-error.js.map +1 -1
  304. package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js +4 -4
  305. package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js.map +1 -1
  306. package/fesm2015/taiga-ui-kit-pipes-iso-to-country-code.js +1 -1
  307. package/fesm2015/taiga-ui-kit-pipes-iso-to-country-code.js.map +1 -1
  308. package/fesm2015/taiga-ui-kit-pipes-sort-countries.js +1 -1
  309. package/fesm2015/taiga-ui-kit-pipes-sort-countries.js.map +1 -1
  310. package/fesm2015/taiga-ui-kit-pipes-stringify-content.js +1 -1
  311. package/fesm2015/taiga-ui-kit-pipes-stringify-content.js.map +1 -1
  312. package/fesm2015/taiga-ui-kit-pipes-stringify.js +2 -2
  313. package/fesm2015/taiga-ui-kit-pipes-stringify.js.map +1 -1
  314. package/fesm2015/taiga-ui-kit-pipes-to-country-code.js +2 -2
  315. package/fesm2015/taiga-ui-kit-pipes-to-country-code.js.map +1 -1
  316. package/fesm2015/taiga-ui-kit-pipes-to-year.js +1 -1
  317. package/fesm2015/taiga-ui-kit-pipes-to-year.js.map +1 -1
  318. package/fesm2015/taiga-ui-kit-providers.js +3 -3
  319. package/fesm2015/taiga-ui-kit-providers.js.map +1 -1
  320. package/fesm2015/taiga-ui-kit-services.js +1 -1
  321. package/fesm2015/taiga-ui-kit-services.js.map +1 -1
  322. package/fesm2015/taiga-ui-kit-tokens.js +243 -243
  323. package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
  324. package/fesm2015/taiga-ui-kit-utils-files.js +2 -2
  325. package/fesm2015/taiga-ui-kit-utils-files.js.map +1 -1
  326. package/fesm2015/taiga-ui-kit-utils-format.js +2 -2
  327. package/fesm2015/taiga-ui-kit-utils-format.js.map +1 -1
  328. package/fesm2015/taiga-ui-kit-utils-mask.js +13 -13
  329. package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
  330. package/fesm2015/taiga-ui-kit-utils-math.js +2 -2
  331. package/fesm2015/taiga-ui-kit-utils-math.js.map +1 -1
  332. package/fesm2015/taiga-ui-kit-utils-miscellaneous.js +7 -7
  333. package/fesm2015/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
  334. package/fesm2015/taiga-ui-kit-utils-phone.js +2 -2
  335. package/fesm2015/taiga-ui-kit-utils-phone.js.map +1 -1
  336. package/fesm2015/taiga-ui-kit-validators.js +1 -1
  337. package/fesm2015/taiga-ui-kit-validators.js.map +1 -1
  338. package/package.json +4 -4
@@ -1,995 +1,849 @@
1
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'), require('@taiga-ui/kit/utils'), require('@taiga-ui/kit/components/files')) :
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', '@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.i2, global.i1, global["taiga-ui"].kit.tokens, global["taiga-ui"].kit.utils.files, global.rxjs, global.rxjs.operators, global.ng.common, global.i4, global["taiga-ui"].kit.utils, global["taiga-ui"].kit.components.files));
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'), require('@taiga-ui/kit/utils'), require('@taiga-ui/kit/components/files')) :
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', '@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.i2, global.i1, global["taiga-ui"].kit.tokens, global["taiga-ui"].kit.utils.files, global.rxjs, global.rxjs.operators, global.ng.common, global.i4, global["taiga-ui"].kit.utils, global["taiga-ui"].kit.components.files));
5
5
  })(this, (function (exports, i0, i6, i2, i1, tokens, files, i7, operators, i3, i4, utils, files$1) { 'use strict';
6
6
 
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () { return e[k]; }
17
- });
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
18
20
  }
19
- });
21
+ n["default"] = e;
22
+ return Object.freeze(n);
20
23
  }
21
- n["default"] = e;
22
- return Object.freeze(n);
23
- }
24
24
 
25
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
27
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
28
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
- var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
30
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
31
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
27
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
28
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
+ var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
30
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
31
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
32
32
 
33
- /******************************************************************************
34
- Copyright (c) Microsoft Corporation.
33
+ /*! *****************************************************************************
34
+ Copyright (c) Microsoft Corporation.
35
35
 
36
- Permission to use, copy, modify, and/or distribute this software for any
37
- purpose with or without fee is hereby granted.
36
+ Permission to use, copy, modify, and/or distribute this software for any
37
+ purpose with or without fee is hereby granted.
38
38
 
39
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
40
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
41
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
42
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
43
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
44
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
45
- PERFORMANCE OF THIS SOFTWARE.
46
- ***************************************************************************** */
47
- /* global Reflect, Promise, SuppressedError, Symbol */
48
- var extendStatics = function (d, b) {
49
- extendStatics = Object.setPrototypeOf ||
50
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51
- function (d, b) { for (var p in b)
52
- if (Object.prototype.hasOwnProperty.call(b, p))
53
- d[p] = b[p]; };
54
- return extendStatics(d, b);
55
- };
56
- function __extends(d, b) {
57
- if (typeof b !== "function" && b !== null)
58
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
59
- extendStatics(d, b);
60
- function __() { this.constructor = d; }
61
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
62
- }
63
- var __assign = function () {
64
- __assign = Object.assign || function __assign(t) {
65
- for (var s, i = 1, n = arguments.length; i < n; i++) {
66
- s = arguments[i];
67
- for (var p in s)
68
- if (Object.prototype.hasOwnProperty.call(s, p))
69
- t[p] = s[p];
70
- }
71
- return t;
72
- };
73
- return __assign.apply(this, arguments);
74
- };
75
- function __rest(s, e) {
76
- var t = {};
77
- for (var p in s)
78
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
79
- t[p] = s[p];
80
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
81
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
82
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
83
- t[p[i]] = s[p[i]];
84
- }
85
- return t;
86
- }
87
- function __decorate(decorators, target, key, desc) {
88
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
89
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
90
- r = Reflect.decorate(decorators, target, key, desc);
91
- else
92
- for (var i = decorators.length - 1; i >= 0; i--)
93
- if (d = decorators[i])
94
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
95
- return c > 3 && r && Object.defineProperty(target, key, r), r;
96
- }
97
- function __param(paramIndex, decorator) {
98
- return function (target, key) { decorator(target, key, paramIndex); };
99
- }
100
- function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
101
- function accept(f) { if (f !== void 0 && typeof f !== "function")
102
- throw new TypeError("Function expected"); return f; }
103
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
104
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
105
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
106
- var _, done = false;
107
- for (var i = decorators.length - 1; i >= 0; i--) {
108
- var context = {};
109
- for (var p in contextIn)
110
- context[p] = p === "access" ? {} : contextIn[p];
111
- for (var p in contextIn.access)
112
- context.access[p] = contextIn.access[p];
113
- context.addInitializer = function (f) { if (done)
114
- throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
115
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
116
- if (kind === "accessor") {
117
- if (result === void 0)
118
- continue;
119
- if (result === null || typeof result !== "object")
120
- throw new TypeError("Object expected");
121
- if (_ = accept(result.get))
122
- descriptor.get = _;
123
- if (_ = accept(result.set))
124
- descriptor.set = _;
125
- if (_ = accept(result.init))
126
- initializers.unshift(_);
127
- }
128
- else if (_ = accept(result)) {
129
- if (kind === "field")
130
- initializers.unshift(_);
131
- else
132
- descriptor[key] = _;
133
- }
134
- }
135
- if (target)
136
- Object.defineProperty(target, contextIn.name, descriptor);
137
- done = true;
138
- }
139
- ;
140
- function __runInitializers(thisArg, initializers, value) {
141
- var useValue = arguments.length > 2;
142
- for (var i = 0; i < initializers.length; i++) {
143
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
144
- }
145
- return useValue ? value : void 0;
146
- }
147
- ;
148
- function __propKey(x) {
149
- return typeof x === "symbol" ? x : "".concat(x);
150
- }
151
- ;
152
- function __setFunctionName(f, name, prefix) {
153
- if (typeof name === "symbol")
154
- name = name.description ? "[".concat(name.description, "]") : "";
155
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
156
- }
157
- ;
158
- function __metadata(metadataKey, metadataValue) {
159
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
160
- return Reflect.metadata(metadataKey, metadataValue);
161
- }
162
- function __awaiter(thisArg, _arguments, P, generator) {
163
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
164
- return new (P || (P = Promise))(function (resolve, reject) {
165
- function fulfilled(value) { try {
166
- step(generator.next(value));
167
- }
168
- catch (e) {
169
- reject(e);
170
- } }
171
- function rejected(value) { try {
172
- step(generator["throw"](value));
173
- }
174
- catch (e) {
175
- reject(e);
176
- } }
177
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
178
- step((generator = generator.apply(thisArg, _arguments || [])).next());
179
- });
180
- }
181
- function __generator(thisArg, body) {
182
- var _ = { label: 0, sent: function () { if (t[0] & 1)
183
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
184
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
185
- function verb(n) { return function (v) { return step([n, v]); }; }
186
- function step(op) {
187
- if (f)
188
- throw new TypeError("Generator is already executing.");
189
- while (g && (g = 0, op[0] && (_ = 0)), _)
190
- try {
191
- 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)
192
- return t;
193
- if (y = 0, t)
194
- op = [op[0] & 2, t.value];
195
- switch (op[0]) {
196
- case 0:
197
- case 1:
198
- t = op;
199
- break;
200
- case 4:
201
- _.label++;
202
- return { value: op[1], done: false };
203
- case 5:
204
- _.label++;
205
- y = op[1];
206
- op = [0];
207
- continue;
208
- case 7:
209
- op = _.ops.pop();
210
- _.trys.pop();
211
- continue;
212
- default:
213
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
214
- _ = 0;
215
- continue;
216
- }
217
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
218
- _.label = op[1];
219
- break;
220
- }
221
- if (op[0] === 6 && _.label < t[1]) {
222
- _.label = t[1];
223
- t = op;
224
- break;
225
- }
226
- if (t && _.label < t[2]) {
227
- _.label = t[2];
228
- _.ops.push(op);
229
- break;
230
- }
231
- if (t[2])
232
- _.ops.pop();
233
- _.trys.pop();
234
- continue;
235
- }
236
- op = body.call(thisArg, _);
237
- }
238
- catch (e) {
239
- op = [6, e];
240
- y = 0;
241
- }
242
- finally {
243
- f = t = 0;
244
- }
245
- if (op[0] & 5)
246
- throw op[1];
247
- return { value: op[0] ? op[1] : void 0, done: true };
248
- }
249
- }
250
- var __createBinding = Object.create ? (function (o, m, k, k2) {
251
- if (k2 === undefined)
252
- k2 = k;
253
- var desc = Object.getOwnPropertyDescriptor(m, k);
254
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
255
- desc = { enumerable: true, get: function () { return m[k]; } };
256
- }
257
- Object.defineProperty(o, k2, desc);
258
- }) : (function (o, m, k, k2) {
259
- if (k2 === undefined)
260
- k2 = k;
261
- o[k2] = m[k];
262
- });
263
- function __exportStar(m, o) {
264
- for (var p in m)
265
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
266
- __createBinding(o, m, p);
267
- }
268
- function __values(o) {
269
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
270
- if (m)
271
- return m.call(o);
272
- if (o && typeof o.length === "number")
273
- return {
274
- next: function () {
275
- if (o && i >= o.length)
276
- o = void 0;
277
- return { value: o && o[i++], done: !o };
278
- }
279
- };
280
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
281
- }
282
- function __read(o, n) {
283
- var m = typeof Symbol === "function" && o[Symbol.iterator];
284
- if (!m)
285
- return o;
286
- var i = m.call(o), r, ar = [], e;
287
- try {
288
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
289
- ar.push(r.value);
290
- }
291
- catch (error) {
292
- e = { error: error };
293
- }
294
- finally {
295
- try {
296
- if (r && !r.done && (m = i["return"]))
297
- m.call(i);
298
- }
299
- finally {
300
- if (e)
301
- throw e.error;
302
- }
303
- }
304
- return ar;
305
- }
306
- /** @deprecated */
307
- function __spread() {
308
- for (var ar = [], i = 0; i < arguments.length; i++)
309
- ar = ar.concat(__read(arguments[i]));
310
- return ar;
311
- }
312
- /** @deprecated */
313
- function __spreadArrays() {
314
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
315
- s += arguments[i].length;
316
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
317
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
318
- r[k] = a[j];
319
- return r;
320
- }
321
- function __spreadArray(to, from, pack) {
322
- if (pack || arguments.length === 2)
323
- for (var i = 0, l = from.length, ar; i < l; i++) {
324
- if (ar || !(i in from)) {
325
- if (!ar)
326
- ar = Array.prototype.slice.call(from, 0, i);
327
- ar[i] = from[i];
328
- }
329
- }
330
- return to.concat(ar || Array.prototype.slice.call(from));
331
- }
332
- function __await(v) {
333
- return this instanceof __await ? (this.v = v, this) : new __await(v);
334
- }
335
- function __asyncGenerator(thisArg, _arguments, generator) {
336
- if (!Symbol.asyncIterator)
337
- throw new TypeError("Symbol.asyncIterator is not defined.");
338
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
339
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
340
- function verb(n) { if (g[n])
341
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
342
- function resume(n, v) { try {
343
- step(g[n](v));
344
- }
345
- catch (e) {
346
- settle(q[0][3], e);
347
- } }
348
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
349
- function fulfill(value) { resume("next", value); }
350
- function reject(value) { resume("throw", value); }
351
- function settle(f, v) { if (f(v), q.shift(), q.length)
352
- resume(q[0][0], q[0][1]); }
353
- }
354
- function __asyncDelegator(o) {
355
- var i, p;
356
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
357
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
358
- }
359
- function __asyncValues(o) {
360
- if (!Symbol.asyncIterator)
361
- throw new TypeError("Symbol.asyncIterator is not defined.");
362
- var m = o[Symbol.asyncIterator], i;
363
- 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);
364
- 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); }); }; }
365
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
366
- }
367
- function __makeTemplateObject(cooked, raw) {
368
- if (Object.defineProperty) {
369
- Object.defineProperty(cooked, "raw", { value: raw });
370
- }
371
- else {
372
- cooked.raw = raw;
373
- }
374
- return cooked;
375
- }
376
- ;
377
- var __setModuleDefault = Object.create ? (function (o, v) {
378
- Object.defineProperty(o, "default", { enumerable: true, value: v });
379
- }) : function (o, v) {
380
- o["default"] = v;
381
- };
382
- function __importStar(mod) {
383
- if (mod && mod.__esModule)
384
- return mod;
385
- var result = {};
386
- if (mod != null)
387
- for (var k in mod)
388
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
389
- __createBinding(result, mod, k);
390
- __setModuleDefault(result, mod);
391
- return result;
392
- }
393
- function __importDefault(mod) {
394
- return (mod && mod.__esModule) ? mod : { default: mod };
395
- }
396
- function __classPrivateFieldGet(receiver, state, kind, f) {
397
- if (kind === "a" && !f)
398
- throw new TypeError("Private accessor was defined without a getter");
399
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
400
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
401
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
402
- }
403
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
404
- if (kind === "m")
405
- throw new TypeError("Private method is not writable");
406
- if (kind === "a" && !f)
407
- throw new TypeError("Private accessor was defined without a setter");
408
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
409
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
410
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
411
- }
412
- function __classPrivateFieldIn(state, receiver) {
413
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
414
- throw new TypeError("Cannot use 'in' operator on non-object");
415
- return typeof state === "function" ? receiver === state : state.has(receiver);
416
- }
417
- function __addDisposableResource(env, value, async) {
418
- if (value !== null && value !== void 0) {
419
- if (typeof value !== "object" && typeof value !== "function")
420
- throw new TypeError("Object expected.");
421
- var dispose;
422
- if (async) {
423
- if (!Symbol.asyncDispose)
424
- throw new TypeError("Symbol.asyncDispose is not defined.");
425
- dispose = value[Symbol.asyncDispose];
426
- }
427
- if (dispose === void 0) {
428
- if (!Symbol.dispose)
429
- throw new TypeError("Symbol.dispose is not defined.");
430
- dispose = value[Symbol.dispose];
431
- }
432
- if (typeof dispose !== "function")
433
- throw new TypeError("Object not disposable.");
434
- env.stack.push({ value: value, dispose: dispose, async: async });
435
- }
436
- else if (async) {
437
- env.stack.push({ async: true });
438
- }
439
- return value;
440
- }
441
- var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
442
- var e = new Error(message);
443
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
444
- };
445
- function __disposeResources(env) {
446
- function fail(e) {
447
- env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
448
- env.hasError = true;
449
- }
450
- function next() {
451
- while (env.stack.length) {
452
- var rec = env.stack.pop();
453
- try {
454
- var result = rec.dispose && rec.dispose.call(rec.value);
455
- if (rec.async)
456
- return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
457
- }
458
- catch (e) {
459
- fail(e);
460
- }
461
- }
462
- if (env.hasError)
463
- throw env.error;
464
- }
465
- return next();
466
- }
467
- var tslib_es6 = {
468
- __extends: __extends,
469
- __assign: __assign,
470
- __rest: __rest,
471
- __decorate: __decorate,
472
- __param: __param,
473
- __metadata: __metadata,
474
- __awaiter: __awaiter,
475
- __generator: __generator,
476
- __createBinding: __createBinding,
477
- __exportStar: __exportStar,
478
- __values: __values,
479
- __read: __read,
480
- __spread: __spread,
481
- __spreadArrays: __spreadArrays,
482
- __spreadArray: __spreadArray,
483
- __await: __await,
484
- __asyncGenerator: __asyncGenerator,
485
- __asyncDelegator: __asyncDelegator,
486
- __asyncValues: __asyncValues,
487
- __makeTemplateObject: __makeTemplateObject,
488
- __importStar: __importStar,
489
- __importDefault: __importDefault,
490
- __classPrivateFieldGet: __classPrivateFieldGet,
491
- __classPrivateFieldSet: __classPrivateFieldSet,
492
- __classPrivateFieldIn: __classPrivateFieldIn,
493
- __addDisposableResource: __addDisposableResource,
494
- __disposeResources: __disposeResources,
495
- };
39
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
40
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
41
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
42
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
43
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
44
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
45
+ PERFORMANCE OF THIS SOFTWARE.
46
+ ***************************************************************************** */
47
+ /* global Reflect, Promise */
48
+ var extendStatics = function (d, b) {
49
+ extendStatics = Object.setPrototypeOf ||
50
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51
+ function (d, b) { for (var p in b)
52
+ if (Object.prototype.hasOwnProperty.call(b, p))
53
+ d[p] = b[p]; };
54
+ return extendStatics(d, b);
55
+ };
56
+ function __extends(d, b) {
57
+ if (typeof b !== "function" && b !== null)
58
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
59
+ extendStatics(d, b);
60
+ function __() { this.constructor = d; }
61
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
62
+ }
63
+ var __assign = function () {
64
+ __assign = Object.assign || function __assign(t) {
65
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
66
+ s = arguments[i];
67
+ for (var p in s)
68
+ if (Object.prototype.hasOwnProperty.call(s, p))
69
+ t[p] = s[p];
70
+ }
71
+ return t;
72
+ };
73
+ return __assign.apply(this, arguments);
74
+ };
75
+ function __rest(s, e) {
76
+ var t = {};
77
+ for (var p in s)
78
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
79
+ t[p] = s[p];
80
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
81
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
82
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
83
+ t[p[i]] = s[p[i]];
84
+ }
85
+ return t;
86
+ }
87
+ function __decorate(decorators, target, key, desc) {
88
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
89
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
90
+ r = Reflect.decorate(decorators, target, key, desc);
91
+ else
92
+ for (var i = decorators.length - 1; i >= 0; i--)
93
+ if (d = decorators[i])
94
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
95
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
96
+ }
97
+ function __param(paramIndex, decorator) {
98
+ return function (target, key) { decorator(target, key, paramIndex); };
99
+ }
100
+ function __metadata(metadataKey, metadataValue) {
101
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
102
+ return Reflect.metadata(metadataKey, metadataValue);
103
+ }
104
+ function __awaiter(thisArg, _arguments, P, generator) {
105
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
106
+ return new (P || (P = Promise))(function (resolve, reject) {
107
+ function fulfilled(value) { try {
108
+ step(generator.next(value));
109
+ }
110
+ catch (e) {
111
+ reject(e);
112
+ } }
113
+ function rejected(value) { try {
114
+ step(generator["throw"](value));
115
+ }
116
+ catch (e) {
117
+ reject(e);
118
+ } }
119
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
120
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
121
+ });
122
+ }
123
+ function __generator(thisArg, body) {
124
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
125
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
126
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
127
+ function verb(n) { return function (v) { return step([n, v]); }; }
128
+ function step(op) {
129
+ if (f)
130
+ throw new TypeError("Generator is already executing.");
131
+ while (_)
132
+ try {
133
+ 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)
134
+ return t;
135
+ if (y = 0, t)
136
+ op = [op[0] & 2, t.value];
137
+ switch (op[0]) {
138
+ case 0:
139
+ case 1:
140
+ t = op;
141
+ break;
142
+ case 4:
143
+ _.label++;
144
+ return { value: op[1], done: false };
145
+ case 5:
146
+ _.label++;
147
+ y = op[1];
148
+ op = [0];
149
+ continue;
150
+ case 7:
151
+ op = _.ops.pop();
152
+ _.trys.pop();
153
+ continue;
154
+ default:
155
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
156
+ _ = 0;
157
+ continue;
158
+ }
159
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
160
+ _.label = op[1];
161
+ break;
162
+ }
163
+ if (op[0] === 6 && _.label < t[1]) {
164
+ _.label = t[1];
165
+ t = op;
166
+ break;
167
+ }
168
+ if (t && _.label < t[2]) {
169
+ _.label = t[2];
170
+ _.ops.push(op);
171
+ break;
172
+ }
173
+ if (t[2])
174
+ _.ops.pop();
175
+ _.trys.pop();
176
+ continue;
177
+ }
178
+ op = body.call(thisArg, _);
179
+ }
180
+ catch (e) {
181
+ op = [6, e];
182
+ y = 0;
183
+ }
184
+ finally {
185
+ f = t = 0;
186
+ }
187
+ if (op[0] & 5)
188
+ throw op[1];
189
+ return { value: op[0] ? op[1] : void 0, done: true };
190
+ }
191
+ }
192
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
193
+ if (k2 === undefined)
194
+ k2 = k;
195
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
196
+ }) : (function (o, m, k, k2) {
197
+ if (k2 === undefined)
198
+ k2 = k;
199
+ o[k2] = m[k];
200
+ });
201
+ function __exportStar(m, o) {
202
+ for (var p in m)
203
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
204
+ __createBinding(o, m, p);
205
+ }
206
+ function __values(o) {
207
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
208
+ if (m)
209
+ return m.call(o);
210
+ if (o && typeof o.length === "number")
211
+ return {
212
+ next: function () {
213
+ if (o && i >= o.length)
214
+ o = void 0;
215
+ return { value: o && o[i++], done: !o };
216
+ }
217
+ };
218
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
219
+ }
220
+ function __read(o, n) {
221
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
222
+ if (!m)
223
+ return o;
224
+ var i = m.call(o), r, ar = [], e;
225
+ try {
226
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
227
+ ar.push(r.value);
228
+ }
229
+ catch (error) {
230
+ e = { error: error };
231
+ }
232
+ finally {
233
+ try {
234
+ if (r && !r.done && (m = i["return"]))
235
+ m.call(i);
236
+ }
237
+ finally {
238
+ if (e)
239
+ throw e.error;
240
+ }
241
+ }
242
+ return ar;
243
+ }
244
+ /** @deprecated */
245
+ function __spread() {
246
+ for (var ar = [], i = 0; i < arguments.length; i++)
247
+ ar = ar.concat(__read(arguments[i]));
248
+ return ar;
249
+ }
250
+ /** @deprecated */
251
+ function __spreadArrays() {
252
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
253
+ s += arguments[i].length;
254
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
255
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
256
+ r[k] = a[j];
257
+ return r;
258
+ }
259
+ function __spreadArray(to, from, pack) {
260
+ if (pack || arguments.length === 2)
261
+ for (var i = 0, l = from.length, ar; i < l; i++) {
262
+ if (ar || !(i in from)) {
263
+ if (!ar)
264
+ ar = Array.prototype.slice.call(from, 0, i);
265
+ ar[i] = from[i];
266
+ }
267
+ }
268
+ return to.concat(ar || from);
269
+ }
270
+ function __await(v) {
271
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
272
+ }
273
+ function __asyncGenerator(thisArg, _arguments, generator) {
274
+ if (!Symbol.asyncIterator)
275
+ throw new TypeError("Symbol.asyncIterator is not defined.");
276
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
277
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
278
+ function verb(n) { if (g[n])
279
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
280
+ function resume(n, v) { try {
281
+ step(g[n](v));
282
+ }
283
+ catch (e) {
284
+ settle(q[0][3], e);
285
+ } }
286
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
287
+ function fulfill(value) { resume("next", value); }
288
+ function reject(value) { resume("throw", value); }
289
+ function settle(f, v) { if (f(v), q.shift(), q.length)
290
+ resume(q[0][0], q[0][1]); }
291
+ }
292
+ function __asyncDelegator(o) {
293
+ var i, p;
294
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
295
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
296
+ }
297
+ function __asyncValues(o) {
298
+ if (!Symbol.asyncIterator)
299
+ throw new TypeError("Symbol.asyncIterator is not defined.");
300
+ var m = o[Symbol.asyncIterator], i;
301
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
302
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
303
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
304
+ }
305
+ function __makeTemplateObject(cooked, raw) {
306
+ if (Object.defineProperty) {
307
+ Object.defineProperty(cooked, "raw", { value: raw });
308
+ }
309
+ else {
310
+ cooked.raw = raw;
311
+ }
312
+ return cooked;
313
+ }
314
+ ;
315
+ var __setModuleDefault = Object.create ? (function (o, v) {
316
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
317
+ }) : function (o, v) {
318
+ o["default"] = v;
319
+ };
320
+ function __importStar(mod) {
321
+ if (mod && mod.__esModule)
322
+ return mod;
323
+ var result = {};
324
+ if (mod != null)
325
+ for (var k in mod)
326
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
327
+ __createBinding(result, mod, k);
328
+ __setModuleDefault(result, mod);
329
+ return result;
330
+ }
331
+ function __importDefault(mod) {
332
+ return (mod && mod.__esModule) ? mod : { default: mod };
333
+ }
334
+ function __classPrivateFieldGet(receiver, state, kind, f) {
335
+ if (kind === "a" && !f)
336
+ throw new TypeError("Private accessor was defined without a getter");
337
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
338
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
339
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
340
+ }
341
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
342
+ if (kind === "m")
343
+ throw new TypeError("Private method is not writable");
344
+ if (kind === "a" && !f)
345
+ throw new TypeError("Private accessor was defined without a setter");
346
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
347
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
348
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
349
+ }
496
350
 
497
- var TUI_INPUT_FILES_DEFAULT_OPTIONS = {
498
- capture: null,
499
- accepts: "",
500
- multiple: false,
501
- size: "m",
502
- maxFileSize: 30 * 1024 * 1024, // 30 MiB
503
- };
504
- /**
505
- * Default parameters for input files component
506
- */
507
- var TUI_INPUT_FILES_OPTIONS = i2.tuiCreateToken(TUI_INPUT_FILES_DEFAULT_OPTIONS);
508
- function tuiInputFilesOptionsProvider(options) {
509
- return i2.tuiProvideOptions(TUI_INPUT_FILES_OPTIONS, options, TUI_INPUT_FILES_DEFAULT_OPTIONS);
510
- }
351
+ var TUI_INPUT_FILES_DEFAULT_OPTIONS = {
352
+ capture: null,
353
+ accepts: '',
354
+ multiple: false,
355
+ size: 'm',
356
+ maxFileSize: 30 * 1024 * 1024, // 30 MiB
357
+ };
358
+ /**
359
+ * Default parameters for input files component
360
+ */
361
+ var TUI_INPUT_FILES_OPTIONS = i2.tuiCreateToken(TUI_INPUT_FILES_DEFAULT_OPTIONS);
362
+ function tuiInputFilesOptionsProvider(options) {
363
+ return i2.tuiProvideOptions(TUI_INPUT_FILES_OPTIONS, options, TUI_INPUT_FILES_DEFAULT_OPTIONS);
364
+ }
511
365
 
512
- var TuiInputFilesDirective = /** @class */ (function () {
513
- function TuiInputFilesDirective(host, el, idService, options) {
514
- this.host = host;
515
- this.el = el;
516
- this.idService = idService;
517
- this.options = options;
518
- }
519
- Object.defineProperty(TuiInputFilesDirective.prototype, "tabIndex", {
520
- get: function () {
521
- return this.host.focusable ? 0 : -1;
522
- },
523
- enumerable: false,
524
- configurable: true
525
- });
526
- Object.defineProperty(TuiInputFilesDirective.prototype, "id", {
527
- get: function () {
528
- return this.el.nativeElement.id || this.idService.generate();
529
- },
530
- enumerable: false,
531
- configurable: true
532
- });
533
- Object.defineProperty(TuiInputFilesDirective.prototype, "accept", {
534
- get: function () {
535
- var _a;
536
- return (_a = this.el.nativeElement.accept) !== null && _a !== void 0 ? _a : this.options.accepts;
537
- },
538
- enumerable: false,
539
- configurable: true
540
- });
541
- Object.defineProperty(TuiInputFilesDirective.prototype, "multiple", {
542
- get: function () {
543
- var _a;
544
- return (_a = this.el.nativeElement.multiple) !== null && _a !== void 0 ? _a : this.options.multiple;
545
- },
546
- enumerable: false,
547
- configurable: true
548
- });
549
- Object.defineProperty(TuiInputFilesDirective.prototype, "capture", {
550
- get: function () {
551
- var _a;
552
- return (_a = this.el.nativeElement.getAttribute('capture')) !== null && _a !== void 0 ? _a : this.options.capture;
553
- },
554
- enumerable: false,
555
- configurable: true
556
- });
557
- Object.defineProperty(TuiInputFilesDirective.prototype, "input", {
558
- get: function () {
559
- return this.el.nativeElement;
560
- },
561
- enumerable: false,
562
- configurable: true
563
- });
564
- return TuiInputFilesDirective;
565
- }());
566
- TuiInputFilesDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputFilesDirective, deps: [{ token: i0.forwardRef(function () { return TuiInputFilesComponent; }) }, { token: i0.ElementRef }, { token: i2.TuiIdService }, { token: TUI_INPUT_FILES_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Directive });
567
- TuiInputFilesDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputFilesDirective, selector: "input[tuiInputFiles]", host: { attributes: { "type": "file" }, properties: { "tabIndex": "this.tabIndex", "id": "this.id", "accept": "this.accept", "multiple": "this.multiple", "attr.capture": "this.capture" }, classAttribute: "t-native" }, ngImport: i0__namespace });
568
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputFilesDirective, decorators: [{
569
- type: i0.Directive,
570
- args: [{
571
- selector: 'input[tuiInputFiles]',
572
- host: {
573
- type: 'file',
574
- class: 't-native',
575
- },
576
- }]
577
- }], ctorParameters: function () {
578
- return [{ type: TuiInputFilesComponent, decorators: [{
579
- type: i0.Inject,
580
- args: [i0.forwardRef(function () { return TuiInputFilesComponent; })]
581
- }] }, { type: i0__namespace.ElementRef, decorators: [{
582
- type: i0.Inject,
583
- args: [i0.ElementRef]
584
- }] }, { type: i2__namespace.TuiIdService, decorators: [{
585
- type: i0.Inject,
586
- args: [i2.TuiIdService]
587
- }] }, { type: undefined, decorators: [{
588
- type: i0.Inject,
589
- args: [TUI_INPUT_FILES_OPTIONS]
590
- }] }];
591
- }, propDecorators: { tabIndex: [{
592
- type: i0.HostBinding,
593
- args: ['tabIndex']
594
- }], id: [{
595
- type: i0.HostBinding,
596
- args: ['id']
597
- }], accept: [{
598
- type: i0.HostBinding,
599
- args: ['accept']
600
- }], multiple: [{
601
- type: i0.HostBinding,
602
- args: ['multiple']
603
- }], capture: [{
604
- type: i0.HostBinding,
605
- args: ['attr.capture']
606
- }] } });
366
+ var TuiInputFilesDirective = /** @class */ (function () {
367
+ function TuiInputFilesDirective(host, el, idService, options) {
368
+ this.host = host;
369
+ this.el = el;
370
+ this.idService = idService;
371
+ this.options = options;
372
+ }
373
+ Object.defineProperty(TuiInputFilesDirective.prototype, "tabIndex", {
374
+ get: function () {
375
+ return this.host.focusable ? 0 : -1;
376
+ },
377
+ enumerable: false,
378
+ configurable: true
379
+ });
380
+ Object.defineProperty(TuiInputFilesDirective.prototype, "id", {
381
+ get: function () {
382
+ return this.el.nativeElement.id || this.idService.generate();
383
+ },
384
+ enumerable: false,
385
+ configurable: true
386
+ });
387
+ Object.defineProperty(TuiInputFilesDirective.prototype, "accept", {
388
+ get: function () {
389
+ var _a;
390
+ return (_a = this.el.nativeElement.accept) !== null && _a !== void 0 ? _a : this.options.accepts;
391
+ },
392
+ enumerable: false,
393
+ configurable: true
394
+ });
395
+ Object.defineProperty(TuiInputFilesDirective.prototype, "multiple", {
396
+ get: function () {
397
+ var _a;
398
+ return (_a = this.el.nativeElement.multiple) !== null && _a !== void 0 ? _a : this.options.multiple;
399
+ },
400
+ enumerable: false,
401
+ configurable: true
402
+ });
403
+ Object.defineProperty(TuiInputFilesDirective.prototype, "capture", {
404
+ get: function () {
405
+ var _a;
406
+ return (_a = this.el.nativeElement.getAttribute('capture')) !== null && _a !== void 0 ? _a : this.options.capture;
407
+ },
408
+ enumerable: false,
409
+ configurable: true
410
+ });
411
+ Object.defineProperty(TuiInputFilesDirective.prototype, "input", {
412
+ get: function () {
413
+ return this.el.nativeElement;
414
+ },
415
+ enumerable: false,
416
+ configurable: true
417
+ });
418
+ return TuiInputFilesDirective;
419
+ }());
420
+ TuiInputFilesDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputFilesDirective, deps: [{ token: i0.forwardRef(function () { return TuiInputFilesComponent; }) }, { token: i0.ElementRef }, { token: i2.TuiIdService }, { token: TUI_INPUT_FILES_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Directive });
421
+ TuiInputFilesDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputFilesDirective, selector: "input[tuiInputFiles]", host: { attributes: { "type": "file" }, properties: { "tabIndex": "this.tabIndex", "id": "this.id", "accept": "this.accept", "multiple": "this.multiple", "attr.capture": "this.capture" }, classAttribute: "t-native" }, ngImport: i0__namespace });
422
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputFilesDirective, decorators: [{
423
+ type: i0.Directive,
424
+ args: [{
425
+ selector: 'input[tuiInputFiles]',
426
+ host: {
427
+ type: 'file',
428
+ class: 't-native',
429
+ },
430
+ }]
431
+ }], ctorParameters: function () {
432
+ return [{ type: TuiInputFilesComponent, decorators: [{
433
+ type: i0.Inject,
434
+ args: [i0.forwardRef(function () { return TuiInputFilesComponent; })]
435
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
436
+ type: i0.Inject,
437
+ args: [i0.ElementRef]
438
+ }] }, { type: i2__namespace.TuiIdService, decorators: [{
439
+ type: i0.Inject,
440
+ args: [i2.TuiIdService]
441
+ }] }, { type: undefined, decorators: [{
442
+ type: i0.Inject,
443
+ args: [TUI_INPUT_FILES_OPTIONS]
444
+ }] }];
445
+ }, propDecorators: { tabIndex: [{
446
+ type: i0.HostBinding,
447
+ args: ['tabIndex']
448
+ }], id: [{
449
+ type: i0.HostBinding,
450
+ args: ['id']
451
+ }], accept: [{
452
+ type: i0.HostBinding,
453
+ args: ['accept']
454
+ }], multiple: [{
455
+ type: i0.HostBinding,
456
+ args: ['multiple']
457
+ }], capture: [{
458
+ type: i0.HostBinding,
459
+ args: ['attr.capture']
460
+ }] } });
607
461
 
608
- var TuiMaxSizeRejectionErrorPipe = /** @class */ (function () {
609
- function TuiMaxSizeRejectionErrorPipe(inputFileTexts$, units$) {
610
- this.inputFileTexts$ = inputFileTexts$;
611
- this.units$ = units$;
612
- }
613
- TuiMaxSizeRejectionErrorPipe.prototype.transform = function (maxFileSize) {
614
- return i7.combineLatest([this.inputFileTexts$, this.units$]).pipe(operators.map(function (_a) {
615
- var _b = __read(_a, 2), maxSizeRejectionReason = _b[0].maxSizeRejectionReason, units = _b[1];
616
- return "" + maxSizeRejectionReason + utils.tuiFormatSize(units, maxFileSize);
617
- }));
618
- };
619
- return TuiMaxSizeRejectionErrorPipe;
620
- }());
621
- TuiMaxSizeRejectionErrorPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiMaxSizeRejectionErrorPipe, deps: [{ token: tokens.TUI_INPUT_FILE_TEXTS }, { token: tokens.TUI_DIGITAL_INFORMATION_UNITS }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
622
- TuiMaxSizeRejectionErrorPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiMaxSizeRejectionErrorPipe, name: "tuiMaxSizeRejectionError" });
623
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiMaxSizeRejectionErrorPipe, decorators: [{
624
- type: i0.Pipe,
625
- args: [{ name: "tuiMaxSizeRejectionError" }]
626
- }], ctorParameters: function () {
627
- return [{ type: undefined, decorators: [{
628
- type: i0.Inject,
629
- args: [tokens.TUI_INPUT_FILE_TEXTS]
630
- }] }, { type: undefined, decorators: [{
631
- type: i0.Inject,
632
- args: [tokens.TUI_DIGITAL_INFORMATION_UNITS]
633
- }] }];
634
- } });
462
+ var TuiMaxSizeRejectionErrorPipe = /** @class */ (function () {
463
+ function TuiMaxSizeRejectionErrorPipe(inputFileTexts$, units$) {
464
+ this.inputFileTexts$ = inputFileTexts$;
465
+ this.units$ = units$;
466
+ }
467
+ TuiMaxSizeRejectionErrorPipe.prototype.transform = function (maxFileSize) {
468
+ return i7.combineLatest([this.inputFileTexts$, this.units$]).pipe(operators.map(function (_a) {
469
+ var _b = __read(_a, 2), maxSizeRejectionReason = _b[0].maxSizeRejectionReason, units = _b[1];
470
+ return "" + maxSizeRejectionReason + utils.tuiFormatSize(units, maxFileSize);
471
+ }));
472
+ };
473
+ return TuiMaxSizeRejectionErrorPipe;
474
+ }());
475
+ TuiMaxSizeRejectionErrorPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiMaxSizeRejectionErrorPipe, deps: [{ token: tokens.TUI_INPUT_FILE_TEXTS }, { token: tokens.TUI_DIGITAL_INFORMATION_UNITS }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
476
+ TuiMaxSizeRejectionErrorPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiMaxSizeRejectionErrorPipe, name: "tuiMaxSizeRejectionError" });
477
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiMaxSizeRejectionErrorPipe, decorators: [{
478
+ type: i0.Pipe,
479
+ args: [{ name: 'tuiMaxSizeRejectionError' }]
480
+ }], ctorParameters: function () {
481
+ return [{ type: undefined, decorators: [{
482
+ type: i0.Inject,
483
+ args: [tokens.TUI_INPUT_FILE_TEXTS]
484
+ }] }, { type: undefined, decorators: [{
485
+ type: i0.Inject,
486
+ args: [tokens.TUI_DIGITAL_INFORMATION_UNITS]
487
+ }] }];
488
+ } });
635
489
 
636
- var TuiInputFilesComponent = /** @class */ (function (_super) {
637
- __extends(TuiInputFilesComponent, _super);
638
- function TuiInputFilesComponent(control, cdr, isMobile, inputFileTexts$, options) {
639
- var _this = _super.call(this, control, cdr) || this;
640
- _this.isMobile = isMobile;
641
- _this.inputFileTexts$ = inputFileTexts$;
642
- _this.options = options;
643
- _this.dataTransfer = null;
644
- /**
645
- * @deprecated: use `<input tuiInputFiles accept="image/*" />`
646
- */
647
- _this.accept = _this.options.accepts;
648
- /**
649
- * @deprecated: use `<input tuiInputFiles multiple />`
650
- */
651
- _this.multiple = _this.options.multiple;
652
- _this.size = _this.options.size;
653
- _this.maxFileSize = _this.options.maxFileSize;
654
- _this.reject = new i0.EventEmitter();
655
- return _this;
656
- }
657
- Object.defineProperty(TuiInputFilesComponent.prototype, "computedMultiple", {
658
- get: function () {
659
- var _a, _b;
660
- return (_b = (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.multiple) !== null && _b !== void 0 ? _b : this.multiple;
661
- },
662
- enumerable: false,
663
- configurable: true
664
- });
665
- Object.defineProperty(TuiInputFilesComponent.prototype, "computedAccept", {
666
- get: function () {
667
- var _a, _b;
668
- return (_b = (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.accept) !== null && _b !== void 0 ? _b : this.accept;
669
- },
670
- enumerable: false,
671
- configurable: true
672
- });
673
- Object.defineProperty(TuiInputFilesComponent.prototype, "nativeFocusableElement", {
674
- get: function () {
675
- var _a;
676
- return ((_a = this.input) === null || _a === void 0 ? void 0 : _a.nativeElement) || null;
677
- },
678
- enumerable: false,
679
- configurable: true
680
- });
681
- Object.defineProperty(TuiInputFilesComponent.prototype, "focused", {
682
- get: function () {
683
- return i2.tuiIsNativeFocused(this.nativeFocusableElement);
684
- },
685
- enumerable: false,
686
- configurable: true
687
- });
688
- Object.defineProperty(TuiInputFilesComponent.prototype, "computedPseudoHovered", {
689
- get: function () {
690
- var _a;
691
- return (_a = this.pseudoHover) !== null && _a !== void 0 ? _a : (this.fileDragged || null);
692
- },
693
- enumerable: false,
694
- configurable: true
695
- });
696
- Object.defineProperty(TuiInputFilesComponent.prototype, "computedLink$", {
697
- get: function () {
698
- return this.computeLink$(this.fileDragged, this.computedMultiple, this.link);
699
- },
700
- enumerable: false,
701
- configurable: true
702
- });
703
- Object.defineProperty(TuiInputFilesComponent.prototype, "computedLabel$", {
704
- get: function () {
705
- return this.computeLabel$(this.isMobile, this.fileDragged, this.computedMultiple, this.label);
706
- },
707
- enumerable: false,
708
- configurable: true
709
- });
710
- Object.defineProperty(TuiInputFilesComponent.prototype, "fileDragged", {
711
- get: function () {
712
- var _a;
713
- return !!((_a = this.dataTransfer) === null || _a === void 0 ? void 0 : _a.types.includes('Files'));
714
- },
715
- enumerable: false,
716
- configurable: true
717
- });
718
- Object.defineProperty(TuiInputFilesComponent.prototype, "arrayValue", {
719
- get: function () {
720
- return this.getValueArray(this.value);
721
- },
722
- enumerable: false,
723
- configurable: true
724
- });
725
- TuiInputFilesComponent.prototype.onFocused = function (focused) {
726
- this.updateFocused(focused);
727
- };
728
- TuiInputFilesComponent.prototype.onFilesSelected = function () {
729
- var _a, _b, _c;
730
- 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;
731
- if (!input) {
732
- return;
733
- }
734
- this.processSelectedFiles(input.files);
735
- input.value = '';
736
- };
737
- TuiInputFilesComponent.prototype.onDropped = function (event) {
738
- this.processSelectedFiles(event.files);
739
- };
740
- TuiInputFilesComponent.prototype.onDragOver = function (dataTransfer) {
741
- this.dataTransfer = dataTransfer;
742
- };
743
- TuiInputFilesComponent.prototype.removeFile = function (removedFile) {
744
- this.value = this.computedMultiple
745
- ? this.arrayValue.filter(function (file) { return file !== removedFile; })
746
- : null;
747
- };
748
- TuiInputFilesComponent.prototype.computeLink$ = function (fileDragged, multiple, link) {
749
- return fileDragged
750
- ? i7.of('')
751
- : this.inputFileTexts$.pipe(operators.map(function (texts) { return multiple && !link
752
- ? texts.defaultLinkMultiple
753
- : link || texts.defaultLinkSingle; }));
754
- };
755
- TuiInputFilesComponent.prototype.computeLabel$ = function (isMobile, fileDragged, multiple, label) {
756
- if (isMobile) {
757
- return i7.of('');
758
- }
759
- if (fileDragged) {
760
- return this.inputFileTexts$.pipe(operators.map(function (texts) { return (multiple ? texts.dropMultiple : texts.drop); }));
761
- }
762
- return this.inputFileTexts$.pipe(operators.map(function (texts) { return multiple && !label
763
- ? texts.defaultLabelMultiple
764
- : label || texts.defaultLabelSingle; }));
765
- };
766
- TuiInputFilesComponent.prototype.getValueArray = function (value) {
767
- if (!value) {
768
- return i2.EMPTY_ARRAY;
769
- }
770
- return Array.isArray(value) ? value : [value];
771
- };
772
- TuiInputFilesComponent.prototype.processSelectedFiles = function (files) {
773
- var _this = this;
774
- // IE11 after selecting a file through the open dialog generates a second event passing an empty FileList.
775
- if (!(files === null || files === void 0 ? void 0 : files.length)) {
776
- return;
777
- }
778
- var errors = {
779
- formatRejection: this.formatRejection,
780
- maxSizeRejection: this.maxSizeRejection,
781
- };
782
- var newFiles = this.computedMultiple ? Array.from(files) : [files[0]];
783
- var tooBigFiles = newFiles.filter(function (file) { return file.size > _this.maxFileSize; });
784
- var wrongFormatFiles = newFiles.filter(function (file) { return !_this.isFormatAcceptable(file) && !tooBigFiles.includes(file); });
785
- var acceptedFiles = newFiles.filter(function (file) { return !tooBigFiles.includes(file) && !wrongFormatFiles.includes(file); });
786
- if (tooBigFiles.length || wrongFormatFiles.length) {
787
- this.rejectFiles(__spreadArray(__spreadArray([], __read(tooBigFiles.map(function (file) { return ({
788
- name: file.name,
789
- type: file.type,
790
- size: file.size,
791
- content: errors.maxSizeRejection,
792
- }); }))), __read(wrongFormatFiles.map(function (file) { return ({
793
- name: file.name,
794
- type: file.type,
795
- size: file.size,
796
- content: errors.formatRejection,
797
- }); }))));
798
- }
799
- this.value = this.computedMultiple
800
- ? __spreadArray(__spreadArray([], __read(this.arrayValue)), __read(acceptedFiles)) : acceptedFiles[0] || null;
801
- };
802
- TuiInputFilesComponent.prototype.isFormatAcceptable = function (file) {
803
- if (!this.computedAccept) {
804
- return true;
805
- }
806
- var extension = "." + (file.name.split('.').pop() || '').toLowerCase();
807
- return files.tuiGetAcceptArray(this.computedAccept).some(function (format) { return format === extension ||
808
- format === file.type ||
809
- (format.split('/')[1] === '*' &&
810
- file.type.split('/')[0] === format.split('/')[0]); });
811
- };
812
- TuiInputFilesComponent.prototype.rejectFiles = function (rejectedFiles) {
813
- this.reject.emit(this.computedMultiple ? rejectedFiles : rejectedFiles[0]);
814
- };
815
- return TuiInputFilesComponent;
816
- }(i2.AbstractTuiNullableControl));
817
- TuiInputFilesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", 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 });
818
- TuiInputFilesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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: i0__namespace.forwardRef(function () { return TuiInputFilesDirective; }), descendants: true }, { propertyName: "template", first: true, predicate: i0.TemplateRef, descendants: true }], 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 appearance=\"input-file\"\n tuiWrapper\n class=\"t-wrapper\"\n [active]=\"pseudoActive\"\n [class._mobile]=\"isMobile\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover || fileDragged || null\"\n>\n <label\n automation-id=\"tui-input-file__label\"\n class=\"t-label\"\n (mousedown.prevent.silent)=\"(0)\"\n (tuiDroppableDragOverChange)=\"onDragOver($event)\"\n (tuiDroppableDropped)=\"onDropped($event)\"\n >\n <div class=\"t-description\">\n <ng-container *ngTemplateOutlet=\"template || null; context: {$implicit: fileDragged}\"></ng-container>\n <div *ngIf=\"!template\">\n <a tuiLink>\n <ng-container *polymorpheusOutlet=\"computedLink$ | async as text\">\n {{ text }}\n </ng-container>\n </a>\n <span\n *polymorpheusOutlet=\"computedLabel$ | async as text\"\n [textContent]=\"text\"\n ></span>\n </div>\n </div>\n <ng-container *ngIf=\"!readOnly && !computedDisabled\">\n <ng-content select=\"input\"></ng-content>\n <input\n #input\n title=\"\"\n type=\"file\"\n class=\"t-native\"\n [accept]=\"accept\"\n [id]=\"id\"\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;min-height:var(--tui-height-l);border-radius:var(--tui-radius-m);font:var(--tui-font-text-m)}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}tui-input-files .t-label{width:100%;text-align:center}tui-input-files .t-description{display:flex;justify-content:center;align-items:center;height:100%;padding:1rem 0;box-sizing:border-box}[tuiWrapper][data-appearance=input-file]{background:transparent;word-wrap:break-word;color:var(--tui-text-02);min-height:inherit;border-radius:inherit;padding:0 .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:after,[tuiWrapper][data-appearance=input-file][data-state=disabled][data-state=disabled]:after{color:var(--tui-text-03)}:focus-visible:not([data-focused=\"false\"])>[tuiWrapper][data-appearance=input-file]:after,[data-focused=true]>[tuiWrapper][data-appearance=input-file]:after{border-style:solid;border-width:2px;color:var(--tui-focus)}[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)}:focus-visible:not([data-focused=\"false\"])>[tuiWrapper][data-appearance=input-file][data-mode=onDark]:after,[data-focused=true]>[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.TuiDroppableDirective, selector: "[tuiDroppableDropped], [tuiDroppableDragOverChange]", outputs: ["tuiDroppableDropped", "tuiDroppableDragOverChange"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i2__namespace.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }], pipes: { "async": i3__namespace.AsyncPipe, "tuiMaxSizeRejectionError": TuiMaxSizeRejectionErrorPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
819
- __decorate([
820
- i2.tuiPure
821
- ], TuiInputFilesComponent.prototype, "computeLink$", null);
822
- __decorate([
823
- i2.tuiPure
824
- ], TuiInputFilesComponent.prototype, "computeLabel$", null);
825
- __decorate([
826
- i2.tuiPure
827
- ], TuiInputFilesComponent.prototype, "getValueArray", null);
828
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputFilesComponent, decorators: [{
829
- type: i0.Component,
830
- args: [{
831
- selector: 'tui-input-files',
832
- templateUrl: './input-files.template.html',
833
- styleUrls: ['./input-files.style.less'],
834
- encapsulation: i0.ViewEncapsulation.None,
835
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
836
- providers: [i1.MODE_PROVIDER, i2.tuiAsFocusableItemAccessor(TuiInputFilesComponent)],
837
- }]
838
- }], ctorParameters: function () {
839
- return [{ type: i6__namespace.NgControl, decorators: [{
840
- type: i0.Optional
841
- }, {
842
- type: i0.Self
843
- }, {
844
- type: i0.Inject,
845
- args: [i6.NgControl]
846
- }] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
847
- type: i0.Inject,
848
- args: [i0.ChangeDetectorRef]
849
- }] }, { type: undefined, decorators: [{
850
- type: i0.Inject,
851
- args: [i2.TUI_IS_MOBILE]
852
- }] }, { type: i7__namespace.Observable, decorators: [{
853
- type: i0.Inject,
854
- args: [tokens.TUI_INPUT_FILE_TEXTS]
855
- }] }, { type: undefined, decorators: [{
856
- type: i0.Inject,
857
- args: [TUI_INPUT_FILES_OPTIONS]
858
- }] }];
859
- }, propDecorators: { input: [{
860
- type: i0.ViewChild,
861
- args: ['input']
862
- }], nativeInput: [{
863
- type: i0.ContentChild,
864
- args: [i0.forwardRef(function () { return TuiInputFilesDirective; })]
865
- }], template: [{
866
- type: i0.ContentChild,
867
- args: [i0.TemplateRef]
868
- }], formatRejection: [{
869
- type: i0.ViewChild,
870
- args: ['formatRejection']
871
- }], maxSizeRejection: [{
872
- type: i0.ViewChild,
873
- args: ['maxSizeRejection']
874
- }], link: [{
875
- type: i0.Input
876
- }], label: [{
877
- type: i0.Input
878
- }], accept: [{
879
- type: i0.Input
880
- }], multiple: [{
881
- type: i0.Input
882
- }], size: [{
883
- type: i0.Input
884
- }], maxFileSize: [{
885
- type: i0.Input
886
- }], reject: [{
887
- type: i0.Output
888
- }], onFocused: [{
889
- type: i0.HostListener,
890
- args: ['focusin', ['true']]
891
- }, {
892
- type: i0.HostListener,
893
- args: ['focusout', ['false']]
894
- }], onFilesSelected: [{
895
- type: i0.HostListener,
896
- args: ['change']
897
- }], computeLink$: [], computeLabel$: [], getValueArray: [] } });
490
+ var TuiInputFilesComponent = /** @class */ (function (_super) {
491
+ __extends(TuiInputFilesComponent, _super);
492
+ function TuiInputFilesComponent(control, cdr, isMobile, inputFileTexts$, options) {
493
+ var _this = _super.call(this, control, cdr) || this;
494
+ _this.isMobile = isMobile;
495
+ _this.inputFileTexts$ = inputFileTexts$;
496
+ _this.options = options;
497
+ _this.dataTransfer = null;
498
+ /**
499
+ * @deprecated: use `<input tuiInputFiles accept="image/*" />`
500
+ */
501
+ _this.accept = _this.options.accepts;
502
+ /**
503
+ * @deprecated: use `<input tuiInputFiles multiple />`
504
+ */
505
+ _this.multiple = _this.options.multiple;
506
+ _this.size = _this.options.size;
507
+ _this.maxFileSize = _this.options.maxFileSize;
508
+ _this.reject = new i0.EventEmitter();
509
+ return _this;
510
+ }
511
+ Object.defineProperty(TuiInputFilesComponent.prototype, "computedMultiple", {
512
+ get: function () {
513
+ var _a, _b;
514
+ return (_b = (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.multiple) !== null && _b !== void 0 ? _b : this.multiple;
515
+ },
516
+ enumerable: false,
517
+ configurable: true
518
+ });
519
+ Object.defineProperty(TuiInputFilesComponent.prototype, "computedAccept", {
520
+ get: function () {
521
+ var _a, _b;
522
+ return (_b = (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.accept) !== null && _b !== void 0 ? _b : this.accept;
523
+ },
524
+ enumerable: false,
525
+ configurable: true
526
+ });
527
+ Object.defineProperty(TuiInputFilesComponent.prototype, "nativeFocusableElement", {
528
+ get: function () {
529
+ var _a;
530
+ return ((_a = this.input) === null || _a === void 0 ? void 0 : _a.nativeElement) || null;
531
+ },
532
+ enumerable: false,
533
+ configurable: true
534
+ });
535
+ Object.defineProperty(TuiInputFilesComponent.prototype, "focused", {
536
+ get: function () {
537
+ return i2.tuiIsNativeFocused(this.nativeFocusableElement);
538
+ },
539
+ enumerable: false,
540
+ configurable: true
541
+ });
542
+ Object.defineProperty(TuiInputFilesComponent.prototype, "computedPseudoHovered", {
543
+ get: function () {
544
+ var _a;
545
+ return (_a = this.pseudoHover) !== null && _a !== void 0 ? _a : (this.fileDragged || null);
546
+ },
547
+ enumerable: false,
548
+ configurable: true
549
+ });
550
+ Object.defineProperty(TuiInputFilesComponent.prototype, "computedLink$", {
551
+ get: function () {
552
+ return this.computeLink$(this.fileDragged, this.computedMultiple, this.link);
553
+ },
554
+ enumerable: false,
555
+ configurable: true
556
+ });
557
+ Object.defineProperty(TuiInputFilesComponent.prototype, "computedLabel$", {
558
+ get: function () {
559
+ return this.computeLabel$(this.isMobile, this.fileDragged, this.computedMultiple, this.label);
560
+ },
561
+ enumerable: false,
562
+ configurable: true
563
+ });
564
+ Object.defineProperty(TuiInputFilesComponent.prototype, "fileDragged", {
565
+ get: function () {
566
+ var _a;
567
+ return !!((_a = this.dataTransfer) === null || _a === void 0 ? void 0 : _a.types.includes('Files'));
568
+ },
569
+ enumerable: false,
570
+ configurable: true
571
+ });
572
+ Object.defineProperty(TuiInputFilesComponent.prototype, "arrayValue", {
573
+ get: function () {
574
+ return this.getValueArray(this.value);
575
+ },
576
+ enumerable: false,
577
+ configurable: true
578
+ });
579
+ TuiInputFilesComponent.prototype.onFocused = function (focused) {
580
+ this.updateFocused(focused);
581
+ };
582
+ TuiInputFilesComponent.prototype.onFilesSelected = function () {
583
+ var _a, _b, _c;
584
+ 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;
585
+ if (!input) {
586
+ return;
587
+ }
588
+ this.processSelectedFiles(input.files);
589
+ input.value = '';
590
+ };
591
+ TuiInputFilesComponent.prototype.onDropped = function (event) {
592
+ this.processSelectedFiles(event.files);
593
+ };
594
+ TuiInputFilesComponent.prototype.onDragOver = function (dataTransfer) {
595
+ this.dataTransfer = dataTransfer;
596
+ };
597
+ TuiInputFilesComponent.prototype.removeFile = function (removedFile) {
598
+ this.value = this.computedMultiple
599
+ ? this.arrayValue.filter(function (file) { return file !== removedFile; })
600
+ : null;
601
+ };
602
+ TuiInputFilesComponent.prototype.computeLink$ = function (fileDragged, multiple, link) {
603
+ return fileDragged
604
+ ? i7.of('')
605
+ : this.inputFileTexts$.pipe(operators.map(function (texts) { return multiple && !link
606
+ ? texts.defaultLinkMultiple
607
+ : link || texts.defaultLinkSingle; }));
608
+ };
609
+ TuiInputFilesComponent.prototype.computeLabel$ = function (isMobile, fileDragged, multiple, label) {
610
+ if (isMobile) {
611
+ return i7.of('');
612
+ }
613
+ if (fileDragged) {
614
+ return this.inputFileTexts$.pipe(operators.map(function (texts) { return (multiple ? texts.dropMultiple : texts.drop); }));
615
+ }
616
+ return this.inputFileTexts$.pipe(operators.map(function (texts) { return multiple && !label
617
+ ? texts.defaultLabelMultiple
618
+ : label || texts.defaultLabelSingle; }));
619
+ };
620
+ TuiInputFilesComponent.prototype.getValueArray = function (value) {
621
+ if (!value) {
622
+ return i2.EMPTY_ARRAY;
623
+ }
624
+ return Array.isArray(value) ? value : [value];
625
+ };
626
+ TuiInputFilesComponent.prototype.processSelectedFiles = function (files) {
627
+ var _this = this;
628
+ // IE11 after selecting a file through the open dialog generates a second event passing an empty FileList.
629
+ if (!(files === null || files === void 0 ? void 0 : files.length)) {
630
+ return;
631
+ }
632
+ var errors = {
633
+ formatRejection: this.formatRejection,
634
+ maxSizeRejection: this.maxSizeRejection,
635
+ };
636
+ var newFiles = this.computedMultiple ? Array.from(files) : [files[0]];
637
+ var tooBigFiles = newFiles.filter(function (file) { return file.size > _this.maxFileSize; });
638
+ var wrongFormatFiles = newFiles.filter(function (file) { return !_this.isFormatAcceptable(file) && !tooBigFiles.includes(file); });
639
+ var acceptedFiles = newFiles.filter(function (file) { return !tooBigFiles.includes(file) && !wrongFormatFiles.includes(file); });
640
+ if (tooBigFiles.length || wrongFormatFiles.length) {
641
+ this.rejectFiles(__spreadArray(__spreadArray([], __read(tooBigFiles.map(function (file) { return ({
642
+ name: file.name,
643
+ type: file.type,
644
+ size: file.size,
645
+ content: errors.maxSizeRejection,
646
+ }); }))), __read(wrongFormatFiles.map(function (file) { return ({
647
+ name: file.name,
648
+ type: file.type,
649
+ size: file.size,
650
+ content: errors.formatRejection,
651
+ }); }))));
652
+ }
653
+ this.value = this.computedMultiple
654
+ ? __spreadArray(__spreadArray([], __read(this.arrayValue)), __read(acceptedFiles)) : acceptedFiles[0] || null;
655
+ };
656
+ TuiInputFilesComponent.prototype.isFormatAcceptable = function (file) {
657
+ if (!this.computedAccept) {
658
+ return true;
659
+ }
660
+ var extension = "." + (file.name.split('.').pop() || '').toLowerCase();
661
+ return files.tuiGetAcceptArray(this.computedAccept).some(function (format) { return format === extension ||
662
+ format === file.type ||
663
+ (format.split('/')[1] === '*' &&
664
+ file.type.split('/')[0] === format.split('/')[0]); });
665
+ };
666
+ TuiInputFilesComponent.prototype.rejectFiles = function (rejectedFiles) {
667
+ this.reject.emit(this.computedMultiple ? rejectedFiles : rejectedFiles[0]);
668
+ };
669
+ return TuiInputFilesComponent;
670
+ }(i2.AbstractTuiNullableControl));
671
+ TuiInputFilesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", 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 });
672
+ TuiInputFilesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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: i0__namespace.forwardRef(function () { return TuiInputFilesDirective; }), descendants: true }, { propertyName: "template", first: true, predicate: i0.TemplateRef, descendants: true }], 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 appearance=\"input-file\"\n tuiWrapper\n class=\"t-wrapper\"\n [active]=\"pseudoActive\"\n [class._mobile]=\"isMobile\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover || fileDragged || null\"\n>\n <label\n automation-id=\"tui-input-file__label\"\n class=\"t-label\"\n (mousedown.prevent.silent)=\"(0)\"\n (tuiDroppableDragOverChange)=\"onDragOver($event)\"\n (tuiDroppableDropped)=\"onDropped($event)\"\n >\n <div class=\"t-description\">\n <ng-container *ngTemplateOutlet=\"template || null; context: {$implicit: fileDragged}\"></ng-container>\n <div *ngIf=\"!template\">\n <a tuiLink>\n <ng-container *polymorpheusOutlet=\"computedLink$ | async as text\">\n {{ text }}\n </ng-container>\n </a>\n <span\n *polymorpheusOutlet=\"computedLabel$ | async as text\"\n [textContent]=\"text\"\n ></span>\n </div>\n </div>\n <ng-container *ngIf=\"!readOnly && !computedDisabled\">\n <ng-content select=\"input\"></ng-content>\n <input\n #input\n title=\"\"\n type=\"file\"\n class=\"t-native\"\n [accept]=\"accept\"\n [id]=\"id\"\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;min-height:var(--tui-height-l);border-radius:var(--tui-radius-m);font:var(--tui-font-text-m)}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}tui-input-files .t-label{width:100%;text-align:center}tui-input-files .t-description{display:flex;justify-content:center;align-items:center;height:100%;padding:1rem 0;box-sizing:border-box}[tuiWrapper][data-appearance=input-file]{background:transparent;word-wrap:break-word;color:var(--tui-text-02);min-height:inherit;border-radius:inherit;padding:0 .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:after,[tuiWrapper][data-appearance=input-file][data-state=disabled][data-state=disabled]:after{color:var(--tui-text-03)}:focus-visible:not([data-focused=\"false\"])>[tuiWrapper][data-appearance=input-file]:after,[data-focused=true]>[tuiWrapper][data-appearance=input-file]:after{border-style:solid;border-width:2px;color:var(--tui-focus)}[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)}:focus-visible:not([data-focused=\"false\"])>[tuiWrapper][data-appearance=input-file][data-mode=onDark]:after,[data-focused=true]>[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.TuiDroppableDirective, selector: "[tuiDroppableDropped], [tuiDroppableDragOverChange]", outputs: ["tuiDroppableDropped", "tuiDroppableDragOverChange"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i2__namespace.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }], pipes: { "async": i3__namespace.AsyncPipe, "tuiMaxSizeRejectionError": TuiMaxSizeRejectionErrorPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
673
+ __decorate([
674
+ i2.tuiPure
675
+ ], TuiInputFilesComponent.prototype, "computeLink$", null);
676
+ __decorate([
677
+ i2.tuiPure
678
+ ], TuiInputFilesComponent.prototype, "computeLabel$", null);
679
+ __decorate([
680
+ i2.tuiPure
681
+ ], TuiInputFilesComponent.prototype, "getValueArray", null);
682
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputFilesComponent, decorators: [{
683
+ type: i0.Component,
684
+ args: [{
685
+ selector: 'tui-input-files',
686
+ templateUrl: './input-files.template.html',
687
+ styleUrls: ['./input-files.style.less'],
688
+ encapsulation: i0.ViewEncapsulation.None,
689
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
690
+ providers: [i1.MODE_PROVIDER, i2.tuiAsFocusableItemAccessor(TuiInputFilesComponent)],
691
+ }]
692
+ }], ctorParameters: function () {
693
+ return [{ type: i6__namespace.NgControl, decorators: [{
694
+ type: i0.Optional
695
+ }, {
696
+ type: i0.Self
697
+ }, {
698
+ type: i0.Inject,
699
+ args: [i6.NgControl]
700
+ }] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
701
+ type: i0.Inject,
702
+ args: [i0.ChangeDetectorRef]
703
+ }] }, { type: undefined, decorators: [{
704
+ type: i0.Inject,
705
+ args: [i2.TUI_IS_MOBILE]
706
+ }] }, { type: i7__namespace.Observable, decorators: [{
707
+ type: i0.Inject,
708
+ args: [tokens.TUI_INPUT_FILE_TEXTS]
709
+ }] }, { type: undefined, decorators: [{
710
+ type: i0.Inject,
711
+ args: [TUI_INPUT_FILES_OPTIONS]
712
+ }] }];
713
+ }, propDecorators: { input: [{
714
+ type: i0.ViewChild,
715
+ args: ['input']
716
+ }], nativeInput: [{
717
+ type: i0.ContentChild,
718
+ args: [i0.forwardRef(function () { return TuiInputFilesDirective; })]
719
+ }], template: [{
720
+ type: i0.ContentChild,
721
+ args: [i0.TemplateRef]
722
+ }], formatRejection: [{
723
+ type: i0.ViewChild,
724
+ args: ['formatRejection']
725
+ }], maxSizeRejection: [{
726
+ type: i0.ViewChild,
727
+ args: ['maxSizeRejection']
728
+ }], link: [{
729
+ type: i0.Input
730
+ }], label: [{
731
+ type: i0.Input
732
+ }], accept: [{
733
+ type: i0.Input
734
+ }], multiple: [{
735
+ type: i0.Input
736
+ }], size: [{
737
+ type: i0.Input
738
+ }], maxFileSize: [{
739
+ type: i0.Input
740
+ }], reject: [{
741
+ type: i0.Output
742
+ }], onFocused: [{
743
+ type: i0.HostListener,
744
+ args: ['focusin', ['true']]
745
+ }, {
746
+ type: i0.HostListener,
747
+ args: ['focusout', ['false']]
748
+ }], onFilesSelected: [{
749
+ type: i0.HostListener,
750
+ args: ['change']
751
+ }], computeLink$: [], computeLabel$: [], getValueArray: [] } });
898
752
 
899
- var TuiInputFilesModule = /** @class */ (function () {
900
- function TuiInputFilesModule() {
901
- }
902
- return TuiInputFilesModule;
903
- }());
904
- TuiInputFilesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputFilesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
905
- TuiInputFilesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputFilesModule, declarations: [TuiInputFilesComponent,
906
- TuiInputFilesDirective,
907
- TuiMaxSizeRejectionErrorPipe], imports: [i3.CommonModule,
908
- i4.PolymorpheusModule,
909
- i2.TuiLetModule,
910
- i2.TuiFocusedModule,
911
- i2.TuiFocusVisibleModule,
912
- i2.TuiPressedModule,
913
- i2.TuiHoveredModule,
914
- i2.TuiFocusableModule,
915
- i2.TuiDroppableModule,
916
- i1.TuiWrapperModule,
917
- i1.TuiSvgModule,
918
- i1.TuiLinkModule,
919
- i1.TuiLoaderModule,
920
- i1.TuiButtonModule,
921
- i1.TuiGroupModule,
922
- files$1.TuiFilesModule], exports: [TuiInputFilesComponent,
923
- TuiInputFilesDirective,
924
- files$1.TuiFilesComponent,
925
- files$1.TuiFileComponent,
926
- i2.TuiItemDirective] });
927
- TuiInputFilesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputFilesModule, imports: [[
928
- i3.CommonModule,
929
- i4.PolymorpheusModule,
930
- i2.TuiLetModule,
931
- i2.TuiFocusedModule,
932
- i2.TuiFocusVisibleModule,
933
- i2.TuiPressedModule,
934
- i2.TuiHoveredModule,
935
- i2.TuiFocusableModule,
936
- i2.TuiDroppableModule,
937
- i1.TuiWrapperModule,
938
- i1.TuiSvgModule,
939
- i1.TuiLinkModule,
940
- i1.TuiLoaderModule,
941
- i1.TuiButtonModule,
942
- i1.TuiGroupModule,
943
- files$1.TuiFilesModule,
944
- ]] });
945
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputFilesModule, decorators: [{
946
- type: i0.NgModule,
947
- args: [{
948
- imports: [
949
- i3.CommonModule,
950
- i4.PolymorpheusModule,
951
- i2.TuiLetModule,
952
- i2.TuiFocusedModule,
953
- i2.TuiFocusVisibleModule,
954
- i2.TuiPressedModule,
955
- i2.TuiHoveredModule,
956
- i2.TuiFocusableModule,
957
- i2.TuiDroppableModule,
958
- i1.TuiWrapperModule,
959
- i1.TuiSvgModule,
960
- i1.TuiLinkModule,
961
- i1.TuiLoaderModule,
962
- i1.TuiButtonModule,
963
- i1.TuiGroupModule,
964
- files$1.TuiFilesModule,
965
- ],
966
- declarations: [
967
- TuiInputFilesComponent,
968
- TuiInputFilesDirective,
969
- TuiMaxSizeRejectionErrorPipe,
970
- ],
971
- exports: [
972
- TuiInputFilesComponent,
973
- TuiInputFilesDirective,
974
- files$1.TuiFilesComponent,
975
- files$1.TuiFileComponent,
976
- i2.TuiItemDirective,
977
- ],
978
- }]
979
- }] });
753
+ var TuiInputFilesModule = /** @class */ (function () {
754
+ function TuiInputFilesModule() {
755
+ }
756
+ return TuiInputFilesModule;
757
+ }());
758
+ TuiInputFilesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputFilesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
759
+ TuiInputFilesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputFilesModule, declarations: [TuiInputFilesComponent,
760
+ TuiInputFilesDirective,
761
+ TuiMaxSizeRejectionErrorPipe], imports: [i3.CommonModule,
762
+ i4.PolymorpheusModule,
763
+ i2.TuiLetModule,
764
+ i2.TuiFocusedModule,
765
+ i2.TuiFocusVisibleModule,
766
+ i2.TuiPressedModule,
767
+ i2.TuiHoveredModule,
768
+ i2.TuiFocusableModule,
769
+ i2.TuiDroppableModule,
770
+ i1.TuiWrapperModule,
771
+ i1.TuiSvgModule,
772
+ i1.TuiLinkModule,
773
+ i1.TuiLoaderModule,
774
+ i1.TuiButtonModule,
775
+ i1.TuiGroupModule,
776
+ files$1.TuiFilesModule], exports: [TuiInputFilesComponent,
777
+ TuiInputFilesDirective,
778
+ files$1.TuiFilesComponent,
779
+ files$1.TuiFileComponent,
780
+ i2.TuiItemDirective] });
781
+ TuiInputFilesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputFilesModule, imports: [[
782
+ i3.CommonModule,
783
+ i4.PolymorpheusModule,
784
+ i2.TuiLetModule,
785
+ i2.TuiFocusedModule,
786
+ i2.TuiFocusVisibleModule,
787
+ i2.TuiPressedModule,
788
+ i2.TuiHoveredModule,
789
+ i2.TuiFocusableModule,
790
+ i2.TuiDroppableModule,
791
+ i1.TuiWrapperModule,
792
+ i1.TuiSvgModule,
793
+ i1.TuiLinkModule,
794
+ i1.TuiLoaderModule,
795
+ i1.TuiButtonModule,
796
+ i1.TuiGroupModule,
797
+ files$1.TuiFilesModule,
798
+ ]] });
799
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputFilesModule, decorators: [{
800
+ type: i0.NgModule,
801
+ args: [{
802
+ imports: [
803
+ i3.CommonModule,
804
+ i4.PolymorpheusModule,
805
+ i2.TuiLetModule,
806
+ i2.TuiFocusedModule,
807
+ i2.TuiFocusVisibleModule,
808
+ i2.TuiPressedModule,
809
+ i2.TuiHoveredModule,
810
+ i2.TuiFocusableModule,
811
+ i2.TuiDroppableModule,
812
+ i1.TuiWrapperModule,
813
+ i1.TuiSvgModule,
814
+ i1.TuiLinkModule,
815
+ i1.TuiLoaderModule,
816
+ i1.TuiButtonModule,
817
+ i1.TuiGroupModule,
818
+ files$1.TuiFilesModule,
819
+ ],
820
+ declarations: [
821
+ TuiInputFilesComponent,
822
+ TuiInputFilesDirective,
823
+ TuiMaxSizeRejectionErrorPipe,
824
+ ],
825
+ exports: [
826
+ TuiInputFilesComponent,
827
+ TuiInputFilesDirective,
828
+ files$1.TuiFilesComponent,
829
+ files$1.TuiFileComponent,
830
+ i2.TuiItemDirective,
831
+ ],
832
+ }]
833
+ }] });
980
834
 
981
- /**
982
- * Generated bundle index. Do not edit.
983
- */
835
+ /**
836
+ * Generated bundle index. Do not edit.
837
+ */
984
838
 
985
- exports.TUI_INPUT_FILES_DEFAULT_OPTIONS = TUI_INPUT_FILES_DEFAULT_OPTIONS;
986
- exports.TUI_INPUT_FILES_OPTIONS = TUI_INPUT_FILES_OPTIONS;
987
- exports.TuiInputFilesComponent = TuiInputFilesComponent;
988
- exports.TuiInputFilesDirective = TuiInputFilesDirective;
989
- exports.TuiInputFilesModule = TuiInputFilesModule;
990
- exports.tuiInputFilesOptionsProvider = tuiInputFilesOptionsProvider;
839
+ exports.TUI_INPUT_FILES_DEFAULT_OPTIONS = TUI_INPUT_FILES_DEFAULT_OPTIONS;
840
+ exports.TUI_INPUT_FILES_OPTIONS = TUI_INPUT_FILES_OPTIONS;
841
+ exports.TuiInputFilesComponent = TuiInputFilesComponent;
842
+ exports.TuiInputFilesDirective = TuiInputFilesDirective;
843
+ exports.TuiInputFilesModule = TuiInputFilesModule;
844
+ exports.tuiInputFilesOptionsProvider = tuiInputFilesOptionsProvider;
991
845
 
992
- Object.defineProperty(exports, '__esModule', { value: true });
846
+ Object.defineProperty(exports, '__esModule', { value: true });
993
847
 
994
848
  }));
995
849
  //# sourceMappingURL=taiga-ui-kit-components-input-files.umd.js.map