@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,827 +1,681 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/platform-browser'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/kit/tokens'), require('rxjs'), require('rxjs/operators'), require('@taiga-ui/kit/utils'), require('@angular/common'), require('@tinkoff/ng-polymorpheus')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/files', ['exports', '@angular/core', '@angular/platform-browser', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/tokens', 'rxjs', 'rxjs/operators', '@taiga-ui/kit/utils', '@angular/common', '@tinkoff/ng-polymorpheus'], 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.files = {}), global.ng.core, global.ng.platformBrowser, global.i3, global.i1, global["taiga-ui"].kit.tokens, global.rxjs, global.rxjs.operators, global["taiga-ui"].kit.utils, global.ng.common, global.i4));
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/platform-browser'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/kit/tokens'), require('rxjs'), require('rxjs/operators'), require('@taiga-ui/kit/utils'), require('@angular/common'), require('@tinkoff/ng-polymorpheus')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/files', ['exports', '@angular/core', '@angular/platform-browser', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/tokens', 'rxjs', 'rxjs/operators', '@taiga-ui/kit/utils', '@angular/common', '@tinkoff/ng-polymorpheus'], 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.files = {}), global.ng.core, global.ng.platformBrowser, global.i3, global.i1, global["taiga-ui"].kit.tokens, global.rxjs, global.rxjs.operators, global["taiga-ui"].kit.utils, global.ng.common, global.i4));
5
5
  })(this, (function (exports, i0, i5, i3, i1, tokens, i3$1, operators, utils, i2, i4) { '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 i5__namespace = /*#__PURE__*/_interopNamespace(i5);
27
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
28
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
- var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
30
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
27
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
28
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
+ var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
30
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
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_FILE_DEFAULT_OPTIONS = {
498
- formatSize: utils.tuiFormatSize,
499
- };
500
- /**
501
- * Default parameters for file component
502
- */
503
- var TUI_FILE_OPTIONS = i3.tuiCreateToken(TUI_FILE_DEFAULT_OPTIONS);
351
+ var TUI_FILE_DEFAULT_OPTIONS = {
352
+ formatSize: utils.tuiFormatSize,
353
+ };
354
+ /**
355
+ * Default parameters for file component
356
+ */
357
+ var TUI_FILE_OPTIONS = i3.tuiCreateToken(TUI_FILE_DEFAULT_OPTIONS);
504
358
 
505
- var TuiFileComponent = /** @class */ (function () {
506
- function TuiFileComponent(sanitizer, icons, fileTexts$, options, units$) {
507
- this.sanitizer = sanitizer;
508
- this.icons = icons;
509
- this.fileTexts$ = fileTexts$;
510
- this.options = options;
511
- this.units$ = units$;
512
- this.file = { name: '' };
513
- this.state = 'normal';
514
- this.size = 'm';
515
- this.showDelete = true;
516
- this.showSize = true;
517
- this.removed = new i0.EventEmitter();
518
- this.focused = false;
519
- }
520
- Object.defineProperty(TuiFileComponent.prototype, "preview", {
521
- get: function () {
522
- return this.isBig ? this.createPreview(this.file, this.sanitizer) : '';
523
- },
524
- enumerable: false,
525
- configurable: true
526
- });
527
- Object.defineProperty(TuiFileComponent.prototype, "isBig", {
528
- get: function () {
529
- return this.size === 'l';
530
- },
531
- enumerable: false,
532
- configurable: true
533
- });
534
- Object.defineProperty(TuiFileComponent.prototype, "isLoading", {
535
- get: function () {
536
- return this.state === 'loading';
537
- },
538
- enumerable: false,
539
- configurable: true
540
- });
541
- Object.defineProperty(TuiFileComponent.prototype, "isError", {
542
- get: function () {
543
- return this.state === 'error';
544
- },
545
- enumerable: false,
546
- configurable: true
547
- });
548
- Object.defineProperty(TuiFileComponent.prototype, "isDeleted", {
549
- get: function () {
550
- return this.state === 'deleted';
551
- },
552
- enumerable: false,
553
- configurable: true
554
- });
555
- Object.defineProperty(TuiFileComponent.prototype, "allowDelete", {
556
- get: function () {
557
- return this.showDelete && i3.tuiIsObserved(this.removed);
558
- },
559
- enumerable: false,
560
- configurable: true
561
- });
562
- Object.defineProperty(TuiFileComponent.prototype, "icon", {
563
- get: function () {
564
- if (this.state === 'normal' && this.isBig) {
565
- return 'tuiIconFileLarge';
566
- }
567
- switch (this.state) {
568
- case 'deleted':
569
- return 'tuiIconTrashLarge';
570
- case 'error':
571
- return 'tuiIconAlertCircleLarge';
572
- default:
573
- return 'tuiIconCheckCircleLarge';
574
- }
575
- },
576
- enumerable: false,
577
- configurable: true
578
- });
579
- Object.defineProperty(TuiFileComponent.prototype, "src", {
580
- get: function () {
581
- return this.file.src || '';
582
- },
583
- enumerable: false,
584
- configurable: true
585
- });
586
- Object.defineProperty(TuiFileComponent.prototype, "name", {
587
- get: function () {
588
- return this.getName(this.file);
589
- },
590
- enumerable: false,
591
- configurable: true
592
- });
593
- Object.defineProperty(TuiFileComponent.prototype, "type", {
594
- get: function () {
595
- return this.getType(this.file);
596
- },
597
- enumerable: false,
598
- configurable: true
599
- });
600
- Object.defineProperty(TuiFileComponent.prototype, "content$", {
601
- get: function () {
602
- return this.calculateContent$(this.state, this.file, this.fileTexts$);
603
- },
604
- enumerable: false,
605
- configurable: true
606
- });
607
- Object.defineProperty(TuiFileComponent.prototype, "fileSize$", {
608
- get: function () {
609
- return this.calculateFileSize$(this.file, this.units$);
610
- },
611
- enumerable: false,
612
- configurable: true
613
- });
614
- TuiFileComponent.prototype.onRemoveClick = function () {
615
- this.removed.emit();
616
- };
617
- TuiFileComponent.prototype.onFocusVisible = function (focusVisible) {
618
- this.focused = focusVisible;
619
- };
620
- TuiFileComponent.prototype.calculateContent$ = function (state, file, fileTexts$) {
621
- return state === 'error' && !file.content
622
- ? fileTexts$.pipe(operators.map(function (texts) { return texts.loadingError; }))
623
- : i3$1.of(this.file.content || '');
624
- };
625
- TuiFileComponent.prototype.calculateFileSize$ = function (file, units$) {
626
- var _this = this;
627
- return units$.pipe(operators.map(function (units) { return _this.options.formatSize(units, file.size); }));
628
- };
629
- TuiFileComponent.prototype.createPreview = function (file, sanitizer) {
630
- if (file.src) {
631
- return file.src;
632
- }
633
- // TODO: iframe warning
634
- if (file instanceof File && file.type && file.type.startsWith('image/')) {
635
- return sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(file));
636
- }
637
- return '';
638
- };
639
- TuiFileComponent.prototype.getName = function (file) {
640
- return file.name.split('.').slice(0, -1).join('.');
641
- };
642
- TuiFileComponent.prototype.getType = function (file) {
643
- return "." + file.name.split('.').pop() || '';
644
- };
645
- return TuiFileComponent;
646
- }());
647
- TuiFileComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFileComponent, deps: [{ token: i5.DomSanitizer }, { token: i1.TUI_COMMON_ICONS }, { token: tokens.TUI_FILE_TEXTS }, { token: TUI_FILE_OPTIONS }, { token: tokens.TUI_DIGITAL_INFORMATION_UNITS }], target: i0__namespace.ɵɵFactoryTarget.Component });
648
- TuiFileComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiFileComponent, selector: "tui-file", inputs: { file: "file", state: "state", size: "size", showDelete: "showDelete", showSize: "showSize", leftContent: "leftContent" }, outputs: { removed: "removed" }, host: { properties: { "attr.data-delete": "this.showDelete", "class._focused": "this.focused", "class._link": "this.src" } }, ngImport: i0__namespace, template: "<ng-container\n *ngIf=\"!src; else withLink\"\n [ngTemplateOutlet]=\"fileInfoTemplate\"\n></ng-container>\n\n<ng-template #withLink>\n <a\n rel=\"noreferrer noopener\"\n target=\"_blank\"\n class=\"t-link\"\n [href]=\"src\"\n (tuiFocusVisibleChange)=\"onFocusVisible($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"fileInfoTemplate\"></ng-container>\n </a>\n</ng-template>\n\n<ng-template #fileInfoTemplate>\n <div\n class=\"t-preview\"\n [class.t-preview_big]=\"isBig\"\n >\n <ng-container *polymorpheusOutlet=\"leftContent || defaultLeftContent as text\">\n {{ text }}\n </ng-container>\n </div>\n <div class=\"t-wrapper\">\n <div class=\"t-text\">\n <div\n automation-id=\"tui-file__name\"\n class=\"t-name\"\n >\n {{ name }}\n </div>\n <div\n automation-id=\"tui-file__type\"\n class=\"t-type\"\n >\n {{ type }}\n </div>\n <div\n *ngIf=\"showSize && (fileSize$ | async) as fileSize\"\n automation-id=\"tui-file__size\"\n class=\"t-size\"\n >\n {{ fileSize }}\n </div>\n </div>\n <div\n *ngIf=\"content$ | async as content\"\n automation-id=\"tui-file__content\"\n class=\"t-content\"\n >\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n </div>\n <ng-content></ng-content>\n </div>\n <ng-container *ngIf=\"allowDelete\">\n <button\n *ngIf=\"fileTexts$ | async as texts\"\n appearance=\"icon\"\n automation-id=\"tui-file__remove\"\n size=\"xs\"\n tuiIconButton\n tuiPreventDefault=\"mousedown\"\n type=\"button\"\n class=\"t-remove\"\n [icon]=\"icons.close\"\n [title]=\"texts.remove\"\n (click.prevent)=\"onRemoveClick()\"\n ></button>\n </ng-container>\n</ng-template>\n\n<ng-template #defaultLeftContent>\n <img\n *ngIf=\"preview; else loader\"\n alt=\"file preview\"\n automation-id=\"tui-file__preview\"\n class=\"t-image\"\n [src]=\"preview\"\n />\n <ng-template #loader>\n <tui-loader\n *ngIf=\"isLoading; else svg\"\n automation-id=\"tui-file__loader\"\n class=\"t-loader\"\n [inheritColor]=\"isBig\"\n ></tui-loader>\n </ng-template>\n <ng-template #svg>\n <tui-svg\n automation-id=\"tui-file__icon\"\n class=\"t-icon\"\n [class.t-icon_blank]=\"isBig || isDeleted\"\n [class.t-icon_error]=\"isError\"\n [src]=\"icon\"\n ></tui-svg>\n </ng-template>\n</ng-template>\n", styles: [":host{position:relative;display:flex;align-items:center;font:var(--tui-font-text-m);background:var(--tui-base-01);border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m)}:host[data-delete=always] .t-remove{opacity:1}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host:not(._link){padding:.5625rem 2.1875rem .5625rem .5625rem}:host:hover .t-remove{opacity:1}:host._focused{border-color:var(--tui-focus);box-shadow:0 0 0 1px inset var(--tui-focus)}.t-link{display:flex;flex:1;padding:.5625rem 2.1875rem .5625rem .5625rem;text-decoration:none;outline:none;cursor:pointer;color:var(--tui-text-01);max-width:calc(100% - 2.75rem)}.t-link:hover{background-color:var(--tui-base-02)}.t-preview{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:1.5rem;height:1.5rem;margin-right:.75rem;border-radius:var(--tui-radius-m);overflow:hidden;color:var(--tui-base-06)}.t-preview_big{width:4rem;height:4rem;margin-right:1rem}.t-preview_big:before{position:absolute;top:0;left:0;width:100%;height:100%;content:\"\";background:var(--tui-base-08);opacity:.08}.t-image{max-width:100%;max-height:100%}.t-loader{position:absolute;top:0;left:0;width:100%;height:100%}.t-icon{position:absolute;top:0;left:0;bottom:0;right:0;color:var(--tui-success-fill);margin:auto}.t-icon_blank{color:var(--tui-base-06)}.t-icon_error{color:var(--tui-error-fill)}.t-remove{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.625rem;right:.625rem}.t-remove:focus{opacity:1}.t-remove:focus-visible{box-shadow:inset 0 0 0 2px var(--tui-focus)}@media (hover: hover) and (pointer: fine){.t-remove{opacity:0}}.t-wrapper{display:flex;flex-direction:column;justify-content:center;overflow:hidden}.t-text{display:flex}.t-size{flex-shrink:0;opacity:var(--tui-disabled-opacity);margin-left:.5rem}.t-type{flex-shrink:0}.t-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-content{font:var(--tui-font-text-s);color:var(--tui-error-fill)}\n"], components: [{ type: i1__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i1__namespace.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { type: i1__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace.TuiFocusVisibleDirective, selector: "[tuiFocusVisibleChange]", outputs: ["tuiFocusVisibleChange"] }, { type: i4__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i3__namespace.TuiPreventDefaultDirective, selector: "[tuiPreventDefault]", inputs: ["tuiPreventDefault"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
649
- __decorate([
650
- i3.tuiPure
651
- ], TuiFileComponent.prototype, "calculateContent$", null);
652
- __decorate([
653
- i3.tuiPure
654
- ], TuiFileComponent.prototype, "calculateFileSize$", null);
655
- __decorate([
656
- i3.tuiPure
657
- ], TuiFileComponent.prototype, "createPreview", null);
658
- __decorate([
659
- i3.tuiPure
660
- ], TuiFileComponent.prototype, "getName", null);
661
- __decorate([
662
- i3.tuiPure
663
- ], TuiFileComponent.prototype, "getType", null);
664
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFileComponent, decorators: [{
665
- type: i0.Component,
666
- args: [{
667
- selector: 'tui-file',
668
- templateUrl: './file.template.html',
669
- styleUrls: ['./file.style.less'],
670
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
671
- }]
672
- }], ctorParameters: function () {
673
- return [{ type: i5__namespace.DomSanitizer, decorators: [{
674
- type: i0.Inject,
675
- args: [i5.DomSanitizer]
676
- }] }, { type: undefined, decorators: [{
677
- type: i0.Inject,
678
- args: [i1.TUI_COMMON_ICONS]
679
- }] }, { type: undefined, decorators: [{
680
- type: i0.Inject,
681
- args: [tokens.TUI_FILE_TEXTS]
682
- }] }, { type: undefined, decorators: [{
683
- type: i0.Inject,
684
- args: [TUI_FILE_OPTIONS]
685
- }] }, { type: undefined, decorators: [{
686
- type: i0.Inject,
687
- args: [tokens.TUI_DIGITAL_INFORMATION_UNITS]
688
- }] }];
689
- }, propDecorators: { file: [{
690
- type: i0.Input
691
- }], state: [{
692
- type: i0.Input
693
- }], size: [{
694
- type: i0.Input
695
- }], showDelete: [{
696
- type: i0.Input
697
- }, {
698
- type: i0.HostBinding,
699
- args: ['attr.data-delete']
700
- }], showSize: [{
701
- type: i0.Input
702
- }], leftContent: [{
703
- type: i0.Input
704
- }], removed: [{
705
- type: i0.Output
706
- }], focused: [{
707
- type: i0.HostBinding,
708
- args: ['class._focused']
709
- }], src: [{
710
- type: i0.HostBinding,
711
- args: ['class._link']
712
- }], calculateContent$: [], calculateFileSize$: [], createPreview: [], getName: [], getType: [] } });
359
+ var TuiFileComponent = /** @class */ (function () {
360
+ function TuiFileComponent(sanitizer, icons, fileTexts$, options, units$) {
361
+ this.sanitizer = sanitizer;
362
+ this.icons = icons;
363
+ this.fileTexts$ = fileTexts$;
364
+ this.options = options;
365
+ this.units$ = units$;
366
+ this.file = { name: '' };
367
+ this.state = 'normal';
368
+ this.size = 'm';
369
+ this.showDelete = true;
370
+ this.showSize = true;
371
+ this.removed = new i0.EventEmitter();
372
+ this.focused = false;
373
+ }
374
+ Object.defineProperty(TuiFileComponent.prototype, "preview", {
375
+ get: function () {
376
+ return this.isBig ? this.createPreview(this.file, this.sanitizer) : '';
377
+ },
378
+ enumerable: false,
379
+ configurable: true
380
+ });
381
+ Object.defineProperty(TuiFileComponent.prototype, "isBig", {
382
+ get: function () {
383
+ return this.size === 'l';
384
+ },
385
+ enumerable: false,
386
+ configurable: true
387
+ });
388
+ Object.defineProperty(TuiFileComponent.prototype, "isLoading", {
389
+ get: function () {
390
+ return this.state === 'loading';
391
+ },
392
+ enumerable: false,
393
+ configurable: true
394
+ });
395
+ Object.defineProperty(TuiFileComponent.prototype, "isError", {
396
+ get: function () {
397
+ return this.state === 'error';
398
+ },
399
+ enumerable: false,
400
+ configurable: true
401
+ });
402
+ Object.defineProperty(TuiFileComponent.prototype, "isDeleted", {
403
+ get: function () {
404
+ return this.state === 'deleted';
405
+ },
406
+ enumerable: false,
407
+ configurable: true
408
+ });
409
+ Object.defineProperty(TuiFileComponent.prototype, "allowDelete", {
410
+ get: function () {
411
+ return this.showDelete && i3.tuiIsObserved(this.removed);
412
+ },
413
+ enumerable: false,
414
+ configurable: true
415
+ });
416
+ Object.defineProperty(TuiFileComponent.prototype, "icon", {
417
+ get: function () {
418
+ if (this.state === 'normal' && this.isBig) {
419
+ return 'tuiIconFileLarge';
420
+ }
421
+ switch (this.state) {
422
+ case 'deleted':
423
+ return 'tuiIconTrashLarge';
424
+ case 'error':
425
+ return 'tuiIconAlertCircleLarge';
426
+ default:
427
+ return 'tuiIconCheckCircleLarge';
428
+ }
429
+ },
430
+ enumerable: false,
431
+ configurable: true
432
+ });
433
+ Object.defineProperty(TuiFileComponent.prototype, "src", {
434
+ get: function () {
435
+ return this.file.src || '';
436
+ },
437
+ enumerable: false,
438
+ configurable: true
439
+ });
440
+ Object.defineProperty(TuiFileComponent.prototype, "name", {
441
+ get: function () {
442
+ return this.getName(this.file);
443
+ },
444
+ enumerable: false,
445
+ configurable: true
446
+ });
447
+ Object.defineProperty(TuiFileComponent.prototype, "type", {
448
+ get: function () {
449
+ return this.getType(this.file);
450
+ },
451
+ enumerable: false,
452
+ configurable: true
453
+ });
454
+ Object.defineProperty(TuiFileComponent.prototype, "content$", {
455
+ get: function () {
456
+ return this.calculateContent$(this.state, this.file, this.fileTexts$);
457
+ },
458
+ enumerable: false,
459
+ configurable: true
460
+ });
461
+ Object.defineProperty(TuiFileComponent.prototype, "fileSize$", {
462
+ get: function () {
463
+ return this.calculateFileSize$(this.file, this.units$);
464
+ },
465
+ enumerable: false,
466
+ configurable: true
467
+ });
468
+ TuiFileComponent.prototype.onRemoveClick = function () {
469
+ this.removed.emit();
470
+ };
471
+ TuiFileComponent.prototype.onFocusVisible = function (focusVisible) {
472
+ this.focused = focusVisible;
473
+ };
474
+ TuiFileComponent.prototype.calculateContent$ = function (state, file, fileTexts$) {
475
+ return state === 'error' && !file.content
476
+ ? fileTexts$.pipe(operators.map(function (texts) { return texts.loadingError; }))
477
+ : i3$1.of(this.file.content || '');
478
+ };
479
+ TuiFileComponent.prototype.calculateFileSize$ = function (file, units$) {
480
+ var _this = this;
481
+ return units$.pipe(operators.map(function (units) { return _this.options.formatSize(units, file.size); }));
482
+ };
483
+ TuiFileComponent.prototype.createPreview = function (file, sanitizer) {
484
+ if (file.src) {
485
+ return file.src;
486
+ }
487
+ // TODO: iframe warning
488
+ if (file instanceof File && file.type && file.type.startsWith('image/')) {
489
+ return sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(file));
490
+ }
491
+ return '';
492
+ };
493
+ TuiFileComponent.prototype.getName = function (file) {
494
+ return file.name.split('.').slice(0, -1).join('.');
495
+ };
496
+ TuiFileComponent.prototype.getType = function (file) {
497
+ return "." + file.name.split('.').pop() || '';
498
+ };
499
+ return TuiFileComponent;
500
+ }());
501
+ TuiFileComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFileComponent, deps: [{ token: i5.DomSanitizer }, { token: i1.TUI_COMMON_ICONS }, { token: tokens.TUI_FILE_TEXTS }, { token: TUI_FILE_OPTIONS }, { token: tokens.TUI_DIGITAL_INFORMATION_UNITS }], target: i0__namespace.ɵɵFactoryTarget.Component });
502
+ TuiFileComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiFileComponent, selector: "tui-file", inputs: { file: "file", state: "state", size: "size", showDelete: "showDelete", showSize: "showSize", leftContent: "leftContent" }, outputs: { removed: "removed" }, host: { properties: { "attr.data-delete": "this.showDelete", "class._focused": "this.focused", "class._link": "this.src" } }, ngImport: i0__namespace, template: "<ng-container\n *ngIf=\"!src; else withLink\"\n [ngTemplateOutlet]=\"fileInfoTemplate\"\n></ng-container>\n\n<ng-template #withLink>\n <a\n rel=\"noreferrer noopener\"\n target=\"_blank\"\n class=\"t-link\"\n [href]=\"src\"\n (tuiFocusVisibleChange)=\"onFocusVisible($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"fileInfoTemplate\"></ng-container>\n </a>\n</ng-template>\n\n<ng-template #fileInfoTemplate>\n <div\n class=\"t-preview\"\n [class.t-preview_big]=\"isBig\"\n >\n <ng-container *polymorpheusOutlet=\"leftContent || defaultLeftContent as text\">\n {{ text }}\n </ng-container>\n </div>\n <div class=\"t-wrapper\">\n <div class=\"t-text\">\n <div\n automation-id=\"tui-file__name\"\n class=\"t-name\"\n >\n {{ name }}\n </div>\n <div\n automation-id=\"tui-file__type\"\n class=\"t-type\"\n >\n {{ type }}\n </div>\n <div\n *ngIf=\"showSize && (fileSize$ | async) as fileSize\"\n automation-id=\"tui-file__size\"\n class=\"t-size\"\n >\n {{ fileSize }}\n </div>\n </div>\n <div\n *ngIf=\"content$ | async as content\"\n automation-id=\"tui-file__content\"\n class=\"t-content\"\n >\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n </div>\n <ng-content></ng-content>\n </div>\n <ng-container *ngIf=\"allowDelete\">\n <button\n *ngIf=\"fileTexts$ | async as texts\"\n appearance=\"icon\"\n automation-id=\"tui-file__remove\"\n size=\"xs\"\n tuiIconButton\n tuiPreventDefault=\"mousedown\"\n type=\"button\"\n class=\"t-remove\"\n [icon]=\"icons.close\"\n [title]=\"texts.remove\"\n (click.prevent)=\"onRemoveClick()\"\n ></button>\n </ng-container>\n</ng-template>\n\n<ng-template #defaultLeftContent>\n <img\n *ngIf=\"preview; else loader\"\n alt=\"file preview\"\n automation-id=\"tui-file__preview\"\n class=\"t-image\"\n [src]=\"preview\"\n />\n <ng-template #loader>\n <tui-loader\n *ngIf=\"isLoading; else svg\"\n automation-id=\"tui-file__loader\"\n class=\"t-loader\"\n [inheritColor]=\"isBig\"\n ></tui-loader>\n </ng-template>\n <ng-template #svg>\n <tui-svg\n automation-id=\"tui-file__icon\"\n class=\"t-icon\"\n [class.t-icon_blank]=\"isBig || isDeleted\"\n [class.t-icon_error]=\"isError\"\n [src]=\"icon\"\n ></tui-svg>\n </ng-template>\n</ng-template>\n", styles: [":host{position:relative;display:flex;align-items:center;font:var(--tui-font-text-m);background:var(--tui-base-01);border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m)}:host[data-delete=always] .t-remove{opacity:1}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host:not(._link){padding:.5625rem 2.1875rem .5625rem .5625rem}:host:hover .t-remove{opacity:1}:host._focused{border-color:var(--tui-focus);box-shadow:0 0 0 1px inset var(--tui-focus)}.t-link{display:flex;flex:1;padding:.5625rem 2.1875rem .5625rem .5625rem;text-decoration:none;outline:none;cursor:pointer;color:var(--tui-text-01);max-width:calc(100% - 2.75rem)}.t-link:hover{background-color:var(--tui-base-02)}.t-preview{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:1.5rem;height:1.5rem;margin-right:.75rem;border-radius:var(--tui-radius-m);overflow:hidden;color:var(--tui-base-06)}.t-preview_big{width:4rem;height:4rem;margin-right:1rem}.t-preview_big:before{position:absolute;top:0;left:0;width:100%;height:100%;content:\"\";background:var(--tui-base-08);opacity:.08}.t-image{max-width:100%;max-height:100%}.t-loader{position:absolute;top:0;left:0;width:100%;height:100%}.t-icon{position:absolute;top:0;left:0;bottom:0;right:0;color:var(--tui-success-fill);margin:auto}.t-icon_blank{color:var(--tui-base-06)}.t-icon_error{color:var(--tui-error-fill)}.t-remove{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.625rem;right:.625rem}.t-remove:focus{opacity:1}.t-remove:focus-visible{box-shadow:inset 0 0 0 2px var(--tui-focus)}@media (hover: hover) and (pointer: fine){.t-remove{opacity:0}}.t-wrapper{display:flex;flex-direction:column;justify-content:center;overflow:hidden}.t-text{display:flex}.t-size{flex-shrink:0;opacity:var(--tui-disabled-opacity);margin-left:.5rem}.t-type{flex-shrink:0}.t-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-content{font:var(--tui-font-text-s);color:var(--tui-error-fill)}\n"], components: [{ type: i1__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i1__namespace.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { type: i1__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace.TuiFocusVisibleDirective, selector: "[tuiFocusVisibleChange]", outputs: ["tuiFocusVisibleChange"] }, { type: i4__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i3__namespace.TuiPreventDefaultDirective, selector: "[tuiPreventDefault]", inputs: ["tuiPreventDefault"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
503
+ __decorate([
504
+ i3.tuiPure
505
+ ], TuiFileComponent.prototype, "calculateContent$", null);
506
+ __decorate([
507
+ i3.tuiPure
508
+ ], TuiFileComponent.prototype, "calculateFileSize$", null);
509
+ __decorate([
510
+ i3.tuiPure
511
+ ], TuiFileComponent.prototype, "createPreview", null);
512
+ __decorate([
513
+ i3.tuiPure
514
+ ], TuiFileComponent.prototype, "getName", null);
515
+ __decorate([
516
+ i3.tuiPure
517
+ ], TuiFileComponent.prototype, "getType", null);
518
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFileComponent, decorators: [{
519
+ type: i0.Component,
520
+ args: [{
521
+ selector: 'tui-file',
522
+ templateUrl: './file.template.html',
523
+ styleUrls: ['./file.style.less'],
524
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
525
+ }]
526
+ }], ctorParameters: function () {
527
+ return [{ type: i5__namespace.DomSanitizer, decorators: [{
528
+ type: i0.Inject,
529
+ args: [i5.DomSanitizer]
530
+ }] }, { type: undefined, decorators: [{
531
+ type: i0.Inject,
532
+ args: [i1.TUI_COMMON_ICONS]
533
+ }] }, { type: undefined, decorators: [{
534
+ type: i0.Inject,
535
+ args: [tokens.TUI_FILE_TEXTS]
536
+ }] }, { type: undefined, decorators: [{
537
+ type: i0.Inject,
538
+ args: [TUI_FILE_OPTIONS]
539
+ }] }, { type: undefined, decorators: [{
540
+ type: i0.Inject,
541
+ args: [tokens.TUI_DIGITAL_INFORMATION_UNITS]
542
+ }] }];
543
+ }, propDecorators: { file: [{
544
+ type: i0.Input
545
+ }], state: [{
546
+ type: i0.Input
547
+ }], size: [{
548
+ type: i0.Input
549
+ }], showDelete: [{
550
+ type: i0.Input
551
+ }, {
552
+ type: i0.HostBinding,
553
+ args: ['attr.data-delete']
554
+ }], showSize: [{
555
+ type: i0.Input
556
+ }], leftContent: [{
557
+ type: i0.Input
558
+ }], removed: [{
559
+ type: i0.Output
560
+ }], focused: [{
561
+ type: i0.HostBinding,
562
+ args: ['class._focused']
563
+ }], src: [{
564
+ type: i0.HostBinding,
565
+ args: ['class._link']
566
+ }], calculateContent$: [], calculateFileSize$: [], createPreview: [], getName: [], getType: [] } });
713
567
 
714
- var TuiFilesComponent = /** @class */ (function () {
715
- function TuiFilesComponent(hideText$, showAllText$) {
716
- this.hideText$ = hideText$;
717
- this.showAllText$ = showAllText$;
718
- this.items = i3.EMPTY_QUERY;
719
- this.max = 0;
720
- this.expanded = false;
721
- this.expandedChange = new i0.EventEmitter();
722
- }
723
- Object.defineProperty(TuiFilesComponent.prototype, "hasExtraItems", {
724
- get: function () {
725
- return !!this.max && this.items.length > this.max;
726
- },
727
- enumerable: false,
728
- configurable: true
729
- });
730
- TuiFilesComponent.prototype.toggle = function () {
731
- this.expanded = !this.expanded;
732
- this.expandedChange.emit(this.expanded);
733
- };
734
- return TuiFilesComponent;
735
- }());
736
- TuiFilesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFilesComponent, deps: [{ token: tokens.TUI_HIDE_TEXT }, { token: tokens.TUI_SHOW_ALL_TEXT }], target: i0__namespace.ɵɵFactoryTarget.Component });
737
- TuiFilesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiFilesComponent, selector: "tui-files", inputs: { max: "max", expanded: "expanded" }, outputs: { expandedChange: "expandedChange" }, queries: [{ propertyName: "items", predicate: i3.TuiItemDirective, read: i0.TemplateRef }], ngImport: i0__namespace, template: "<ng-container *ngIf=\"items?.changes | async\"></ng-container>\n\n<section\n orientation=\"vertical\"\n tuiGroup\n class=\"t-files\"\n [collapsed]=\"true\"\n>\n <ng-content></ng-content>\n <ng-container *ngFor=\"let item of items; let index = index\">\n <ng-container\n *ngIf=\"!max || index < max\"\n [ngTemplateOutlet]=\"item\"\n ></ng-container>\n </ng-container>\n <tui-expand\n *ngIf=\"hasExtraItems\"\n [expanded]=\"expanded\"\n >\n <div class=\"t-extra-items\">\n <ng-container *ngFor=\"let item of items; let index = index\">\n <ng-container\n *ngIf=\"max && index >= max\"\n [ngTemplateOutlet]=\"item\"\n ></ng-container>\n </ng-container>\n </div>\n </tui-expand>\n <button\n *ngIf=\"hasExtraItems\"\n appearance=\"whiteblock\"\n size=\"m\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [class.t-button_collapsed]=\"!expanded\"\n (click)=\"toggle()\"\n >\n {{ (expanded ? hideText$ : showAllText$) | async }}\n </button>\n</section>\n", styles: ["tui-files{display:block}tui-files .t-files{position:relative;display:block;width:100%;height:100%;border-radius:var(--tui-radius-m);overflow:hidden}tui-files .t-button{z-index:3;width:100%;background:var(--tui-base-01)}tui-files .t-button_collapsed{box-shadow:var(--tui-shadow-modal);margin-top:-1.5rem}tui-files .t-extra-items tui-file{border-radius:0;margin-top:0;margin-bottom:-.0625rem}\n"], components: [{ type: i1__namespace.TuiExpandComponent, selector: "tui-expand", inputs: ["async", "expanded"] }, { type: i1__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
738
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFilesComponent, decorators: [{
739
- type: i0.Component,
740
- args: [{
741
- selector: 'tui-files',
742
- templateUrl: './files.component.html',
743
- styleUrls: ['./files.component.less'],
744
- encapsulation: i0.ViewEncapsulation.None,
745
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
746
- }]
747
- }], ctorParameters: function () {
748
- return [{ type: i3__namespace$1.Observable, decorators: [{
749
- type: i0.Inject,
750
- args: [tokens.TUI_HIDE_TEXT]
751
- }] }, { type: i3__namespace$1.Observable, decorators: [{
752
- type: i0.Inject,
753
- args: [tokens.TUI_SHOW_ALL_TEXT]
754
- }] }];
755
- }, propDecorators: { items: [{
756
- type: i0.ContentChildren,
757
- args: [i3.TuiItemDirective, { read: i0.TemplateRef }]
758
- }], max: [{
759
- type: i0.Input
760
- }], expanded: [{
761
- type: i0.Input
762
- }], expandedChange: [{
763
- type: i0.Output
764
- }] } });
568
+ var TuiFilesComponent = /** @class */ (function () {
569
+ function TuiFilesComponent(hideText$, showAllText$) {
570
+ this.hideText$ = hideText$;
571
+ this.showAllText$ = showAllText$;
572
+ this.items = i3.EMPTY_QUERY;
573
+ this.max = 0;
574
+ this.expanded = false;
575
+ this.expandedChange = new i0.EventEmitter();
576
+ }
577
+ Object.defineProperty(TuiFilesComponent.prototype, "hasExtraItems", {
578
+ get: function () {
579
+ return !!this.max && this.items.length > this.max;
580
+ },
581
+ enumerable: false,
582
+ configurable: true
583
+ });
584
+ TuiFilesComponent.prototype.toggle = function () {
585
+ this.expanded = !this.expanded;
586
+ this.expandedChange.emit(this.expanded);
587
+ };
588
+ return TuiFilesComponent;
589
+ }());
590
+ TuiFilesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFilesComponent, deps: [{ token: tokens.TUI_HIDE_TEXT }, { token: tokens.TUI_SHOW_ALL_TEXT }], target: i0__namespace.ɵɵFactoryTarget.Component });
591
+ TuiFilesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiFilesComponent, selector: "tui-files", inputs: { max: "max", expanded: "expanded" }, outputs: { expandedChange: "expandedChange" }, queries: [{ propertyName: "items", predicate: i3.TuiItemDirective, read: i0.TemplateRef }], ngImport: i0__namespace, template: "<ng-container *ngIf=\"items?.changes | async\"></ng-container>\n\n<section\n orientation=\"vertical\"\n tuiGroup\n class=\"t-files\"\n [collapsed]=\"true\"\n>\n <ng-content></ng-content>\n <ng-container *ngFor=\"let item of items; let index = index\">\n <ng-container\n *ngIf=\"!max || index < max\"\n [ngTemplateOutlet]=\"item\"\n ></ng-container>\n </ng-container>\n <tui-expand\n *ngIf=\"hasExtraItems\"\n [expanded]=\"expanded\"\n >\n <div class=\"t-extra-items\">\n <ng-container *ngFor=\"let item of items; let index = index\">\n <ng-container\n *ngIf=\"max && index >= max\"\n [ngTemplateOutlet]=\"item\"\n ></ng-container>\n </ng-container>\n </div>\n </tui-expand>\n <button\n *ngIf=\"hasExtraItems\"\n appearance=\"whiteblock\"\n size=\"m\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [class.t-button_collapsed]=\"!expanded\"\n (click)=\"toggle()\"\n >\n {{ (expanded ? hideText$ : showAllText$) | async }}\n </button>\n</section>\n", styles: ["tui-files{display:block}tui-files .t-files{position:relative;display:block;width:100%;height:100%;border-radius:var(--tui-radius-m);overflow:hidden}tui-files .t-button{z-index:3;width:100%;background:var(--tui-base-01)}tui-files .t-button_collapsed{box-shadow:var(--tui-shadow-modal);margin-top:-1.5rem}tui-files .t-extra-items tui-file{border-radius:0;margin-top:0;margin-bottom:-.0625rem}\n"], components: [{ type: i1__namespace.TuiExpandComponent, selector: "tui-expand", inputs: ["async", "expanded"] }, { type: i1__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
592
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFilesComponent, decorators: [{
593
+ type: i0.Component,
594
+ args: [{
595
+ selector: 'tui-files',
596
+ templateUrl: './files.component.html',
597
+ styleUrls: ['./files.component.less'],
598
+ encapsulation: i0.ViewEncapsulation.None,
599
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
600
+ }]
601
+ }], ctorParameters: function () {
602
+ return [{ type: i3__namespace$1.Observable, decorators: [{
603
+ type: i0.Inject,
604
+ args: [tokens.TUI_HIDE_TEXT]
605
+ }] }, { type: i3__namespace$1.Observable, decorators: [{
606
+ type: i0.Inject,
607
+ args: [tokens.TUI_SHOW_ALL_TEXT]
608
+ }] }];
609
+ }, propDecorators: { items: [{
610
+ type: i0.ContentChildren,
611
+ args: [i3.TuiItemDirective, { read: i0.TemplateRef }]
612
+ }], max: [{
613
+ type: i0.Input
614
+ }], expanded: [{
615
+ type: i0.Input
616
+ }], expandedChange: [{
617
+ type: i0.Output
618
+ }] } });
765
619
 
766
- var TuiFilesModule = /** @class */ (function () {
767
- function TuiFilesModule() {
768
- }
769
- return TuiFilesModule;
770
- }());
771
- TuiFilesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFilesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
772
- TuiFilesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFilesModule, declarations: [TuiFilesComponent, TuiFileComponent], imports: [i2.CommonModule,
773
- i1.TuiGroupModule,
774
- i1.TuiLoaderModule,
775
- i4.PolymorpheusModule,
776
- i1.TuiSvgModule,
777
- i3.TuiFocusVisibleModule,
778
- i1.TuiButtonModule,
779
- i3.TuiItemModule,
780
- i1.TuiExpandModule,
781
- i3.TuiPreventDefaultModule], exports: [TuiFilesComponent, TuiFileComponent, i3.TuiItemDirective] });
782
- TuiFilesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFilesModule, imports: [[
783
- i2.CommonModule,
784
- i1.TuiGroupModule,
785
- i1.TuiLoaderModule,
786
- i4.PolymorpheusModule,
787
- i1.TuiSvgModule,
788
- i3.TuiFocusVisibleModule,
789
- i1.TuiButtonModule,
790
- i3.TuiItemModule,
791
- i1.TuiExpandModule,
792
- i3.TuiPreventDefaultModule,
793
- ]] });
794
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFilesModule, decorators: [{
795
- type: i0.NgModule,
796
- args: [{
797
- imports: [
798
- i2.CommonModule,
799
- i1.TuiGroupModule,
800
- i1.TuiLoaderModule,
801
- i4.PolymorpheusModule,
802
- i1.TuiSvgModule,
803
- i3.TuiFocusVisibleModule,
804
- i1.TuiButtonModule,
805
- i3.TuiItemModule,
806
- i1.TuiExpandModule,
807
- i3.TuiPreventDefaultModule,
808
- ],
809
- declarations: [TuiFilesComponent, TuiFileComponent],
810
- exports: [TuiFilesComponent, TuiFileComponent, i3.TuiItemDirective],
811
- }]
812
- }] });
620
+ var TuiFilesModule = /** @class */ (function () {
621
+ function TuiFilesModule() {
622
+ }
623
+ return TuiFilesModule;
624
+ }());
625
+ TuiFilesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFilesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
626
+ TuiFilesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFilesModule, declarations: [TuiFilesComponent, TuiFileComponent], imports: [i2.CommonModule,
627
+ i1.TuiGroupModule,
628
+ i1.TuiLoaderModule,
629
+ i4.PolymorpheusModule,
630
+ i1.TuiSvgModule,
631
+ i3.TuiFocusVisibleModule,
632
+ i1.TuiButtonModule,
633
+ i3.TuiItemModule,
634
+ i1.TuiExpandModule,
635
+ i3.TuiPreventDefaultModule], exports: [TuiFilesComponent, TuiFileComponent, i3.TuiItemDirective] });
636
+ TuiFilesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFilesModule, imports: [[
637
+ i2.CommonModule,
638
+ i1.TuiGroupModule,
639
+ i1.TuiLoaderModule,
640
+ i4.PolymorpheusModule,
641
+ i1.TuiSvgModule,
642
+ i3.TuiFocusVisibleModule,
643
+ i1.TuiButtonModule,
644
+ i3.TuiItemModule,
645
+ i1.TuiExpandModule,
646
+ i3.TuiPreventDefaultModule,
647
+ ]] });
648
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiFilesModule, decorators: [{
649
+ type: i0.NgModule,
650
+ args: [{
651
+ imports: [
652
+ i2.CommonModule,
653
+ i1.TuiGroupModule,
654
+ i1.TuiLoaderModule,
655
+ i4.PolymorpheusModule,
656
+ i1.TuiSvgModule,
657
+ i3.TuiFocusVisibleModule,
658
+ i1.TuiButtonModule,
659
+ i3.TuiItemModule,
660
+ i1.TuiExpandModule,
661
+ i3.TuiPreventDefaultModule,
662
+ ],
663
+ declarations: [TuiFilesComponent, TuiFileComponent],
664
+ exports: [TuiFilesComponent, TuiFileComponent, i3.TuiItemDirective],
665
+ }]
666
+ }] });
813
667
 
814
- /**
815
- * Generated bundle index. Do not edit.
816
- */
668
+ /**
669
+ * Generated bundle index. Do not edit.
670
+ */
817
671
 
818
- exports.TUI_FILE_DEFAULT_OPTIONS = TUI_FILE_DEFAULT_OPTIONS;
819
- exports.TUI_FILE_OPTIONS = TUI_FILE_OPTIONS;
820
- exports.TuiFileComponent = TuiFileComponent;
821
- exports.TuiFilesComponent = TuiFilesComponent;
822
- exports.TuiFilesModule = TuiFilesModule;
672
+ exports.TUI_FILE_DEFAULT_OPTIONS = TUI_FILE_DEFAULT_OPTIONS;
673
+ exports.TUI_FILE_OPTIONS = TUI_FILE_OPTIONS;
674
+ exports.TuiFileComponent = TuiFileComponent;
675
+ exports.TuiFilesComponent = TuiFilesComponent;
676
+ exports.TuiFilesModule = TuiFilesModule;
823
677
 
824
- Object.defineProperty(exports, '__esModule', { value: true });
678
+ Object.defineProperty(exports, '__esModule', { value: true });
825
679
 
826
680
  }));
827
681
  //# sourceMappingURL=taiga-ui-kit-components-files.umd.js.map