@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,829 +1,683 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@taiga-ui/kit/components/slider'), require('@taiga-ui/kit/utils'), require('@angular/common'), require('@taiga-ui/kit/constants'), require('rxjs'), require('rxjs/operators')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/range', ['exports', '@angular/core', '@angular/forms', '@taiga-ui/cdk', '@taiga-ui/kit/components/slider', '@taiga-ui/kit/utils', '@angular/common', '@taiga-ui/kit/constants', 'rxjs', 'rxjs/operators'], 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.range = {}), global.ng.core, global.ng.forms, global.i3, global["taiga-ui"].kit.components.slider, global["taiga-ui"].kit.utils, global.ng.common, global["taiga-ui"].kit.constants, global.rxjs, global.rxjs.operators));
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@taiga-ui/kit/components/slider'), require('@taiga-ui/kit/utils'), require('@angular/common'), require('@taiga-ui/kit/constants'), require('rxjs'), require('rxjs/operators')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/range', ['exports', '@angular/core', '@angular/forms', '@taiga-ui/cdk', '@taiga-ui/kit/components/slider', '@taiga-ui/kit/utils', '@angular/common', '@taiga-ui/kit/constants', 'rxjs', 'rxjs/operators'], 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.range = {}), global.ng.core, global.ng.forms, global.i3, global["taiga-ui"].kit.components.slider, global["taiga-ui"].kit.utils, global.ng.common, global["taiga-ui"].kit.constants, global.rxjs, global.rxjs.operators));
5
5
  })(this, (function (exports, i0, i2, i3, i1, utils, common, constants, i2$1, operators) { '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 i2__namespace = /*#__PURE__*/_interopNamespace(i2);
27
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
28
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
- var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
27
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
28
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
+ var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
30
30
 
31
- /******************************************************************************
32
- Copyright (c) Microsoft Corporation.
31
+ /*! *****************************************************************************
32
+ Copyright (c) Microsoft Corporation.
33
33
 
34
- Permission to use, copy, modify, and/or distribute this software for any
35
- purpose with or without fee is hereby granted.
34
+ Permission to use, copy, modify, and/or distribute this software for any
35
+ purpose with or without fee is hereby granted.
36
36
 
37
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
38
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
39
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
40
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
41
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
42
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
43
- PERFORMANCE OF THIS SOFTWARE.
44
- ***************************************************************************** */
45
- /* global Reflect, Promise, SuppressedError, Symbol */
46
- var extendStatics = function (d, b) {
47
- extendStatics = Object.setPrototypeOf ||
48
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49
- function (d, b) { for (var p in b)
50
- if (Object.prototype.hasOwnProperty.call(b, p))
51
- d[p] = b[p]; };
52
- return extendStatics(d, b);
53
- };
54
- function __extends(d, b) {
55
- if (typeof b !== "function" && b !== null)
56
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
57
- extendStatics(d, b);
58
- function __() { this.constructor = d; }
59
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
60
- }
61
- var __assign = function () {
62
- __assign = Object.assign || function __assign(t) {
63
- for (var s, i = 1, n = arguments.length; i < n; i++) {
64
- s = arguments[i];
65
- for (var p in s)
66
- if (Object.prototype.hasOwnProperty.call(s, p))
67
- t[p] = s[p];
68
- }
69
- return t;
70
- };
71
- return __assign.apply(this, arguments);
72
- };
73
- function __rest(s, e) {
74
- var t = {};
75
- for (var p in s)
76
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
77
- t[p] = s[p];
78
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
79
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
80
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
81
- t[p[i]] = s[p[i]];
82
- }
83
- return t;
84
- }
85
- function __decorate(decorators, target, key, desc) {
86
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
87
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
88
- r = Reflect.decorate(decorators, target, key, desc);
89
- else
90
- for (var i = decorators.length - 1; i >= 0; i--)
91
- if (d = decorators[i])
92
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
93
- return c > 3 && r && Object.defineProperty(target, key, r), r;
94
- }
95
- function __param(paramIndex, decorator) {
96
- return function (target, key) { decorator(target, key, paramIndex); };
97
- }
98
- function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
99
- function accept(f) { if (f !== void 0 && typeof f !== "function")
100
- throw new TypeError("Function expected"); return f; }
101
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
102
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
103
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
104
- var _, done = false;
105
- for (var i = decorators.length - 1; i >= 0; i--) {
106
- var context = {};
107
- for (var p in contextIn)
108
- context[p] = p === "access" ? {} : contextIn[p];
109
- for (var p in contextIn.access)
110
- context.access[p] = contextIn.access[p];
111
- context.addInitializer = function (f) { if (done)
112
- throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
113
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
114
- if (kind === "accessor") {
115
- if (result === void 0)
116
- continue;
117
- if (result === null || typeof result !== "object")
118
- throw new TypeError("Object expected");
119
- if (_ = accept(result.get))
120
- descriptor.get = _;
121
- if (_ = accept(result.set))
122
- descriptor.set = _;
123
- if (_ = accept(result.init))
124
- initializers.unshift(_);
125
- }
126
- else if (_ = accept(result)) {
127
- if (kind === "field")
128
- initializers.unshift(_);
129
- else
130
- descriptor[key] = _;
131
- }
132
- }
133
- if (target)
134
- Object.defineProperty(target, contextIn.name, descriptor);
135
- done = true;
136
- }
137
- ;
138
- function __runInitializers(thisArg, initializers, value) {
139
- var useValue = arguments.length > 2;
140
- for (var i = 0; i < initializers.length; i++) {
141
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
142
- }
143
- return useValue ? value : void 0;
144
- }
145
- ;
146
- function __propKey(x) {
147
- return typeof x === "symbol" ? x : "".concat(x);
148
- }
149
- ;
150
- function __setFunctionName(f, name, prefix) {
151
- if (typeof name === "symbol")
152
- name = name.description ? "[".concat(name.description, "]") : "";
153
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
154
- }
155
- ;
156
- function __metadata(metadataKey, metadataValue) {
157
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
158
- return Reflect.metadata(metadataKey, metadataValue);
159
- }
160
- function __awaiter(thisArg, _arguments, P, generator) {
161
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
162
- return new (P || (P = Promise))(function (resolve, reject) {
163
- function fulfilled(value) { try {
164
- step(generator.next(value));
165
- }
166
- catch (e) {
167
- reject(e);
168
- } }
169
- function rejected(value) { try {
170
- step(generator["throw"](value));
171
- }
172
- catch (e) {
173
- reject(e);
174
- } }
175
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
176
- step((generator = generator.apply(thisArg, _arguments || [])).next());
177
- });
178
- }
179
- function __generator(thisArg, body) {
180
- var _ = { label: 0, sent: function () { if (t[0] & 1)
181
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
182
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
183
- function verb(n) { return function (v) { return step([n, v]); }; }
184
- function step(op) {
185
- if (f)
186
- throw new TypeError("Generator is already executing.");
187
- while (g && (g = 0, op[0] && (_ = 0)), _)
188
- try {
189
- 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)
190
- return t;
191
- if (y = 0, t)
192
- op = [op[0] & 2, t.value];
193
- switch (op[0]) {
194
- case 0:
195
- case 1:
196
- t = op;
197
- break;
198
- case 4:
199
- _.label++;
200
- return { value: op[1], done: false };
201
- case 5:
202
- _.label++;
203
- y = op[1];
204
- op = [0];
205
- continue;
206
- case 7:
207
- op = _.ops.pop();
208
- _.trys.pop();
209
- continue;
210
- default:
211
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
212
- _ = 0;
213
- continue;
214
- }
215
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
216
- _.label = op[1];
217
- break;
218
- }
219
- if (op[0] === 6 && _.label < t[1]) {
220
- _.label = t[1];
221
- t = op;
222
- break;
223
- }
224
- if (t && _.label < t[2]) {
225
- _.label = t[2];
226
- _.ops.push(op);
227
- break;
228
- }
229
- if (t[2])
230
- _.ops.pop();
231
- _.trys.pop();
232
- continue;
233
- }
234
- op = body.call(thisArg, _);
235
- }
236
- catch (e) {
237
- op = [6, e];
238
- y = 0;
239
- }
240
- finally {
241
- f = t = 0;
242
- }
243
- if (op[0] & 5)
244
- throw op[1];
245
- return { value: op[0] ? op[1] : void 0, done: true };
246
- }
247
- }
248
- var __createBinding = Object.create ? (function (o, m, k, k2) {
249
- if (k2 === undefined)
250
- k2 = k;
251
- var desc = Object.getOwnPropertyDescriptor(m, k);
252
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
253
- desc = { enumerable: true, get: function () { return m[k]; } };
254
- }
255
- Object.defineProperty(o, k2, desc);
256
- }) : (function (o, m, k, k2) {
257
- if (k2 === undefined)
258
- k2 = k;
259
- o[k2] = m[k];
260
- });
261
- function __exportStar(m, o) {
262
- for (var p in m)
263
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
264
- __createBinding(o, m, p);
265
- }
266
- function __values(o) {
267
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
268
- if (m)
269
- return m.call(o);
270
- if (o && typeof o.length === "number")
271
- return {
272
- next: function () {
273
- if (o && i >= o.length)
274
- o = void 0;
275
- return { value: o && o[i++], done: !o };
276
- }
277
- };
278
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
279
- }
280
- function __read(o, n) {
281
- var m = typeof Symbol === "function" && o[Symbol.iterator];
282
- if (!m)
283
- return o;
284
- var i = m.call(o), r, ar = [], e;
285
- try {
286
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
287
- ar.push(r.value);
288
- }
289
- catch (error) {
290
- e = { error: error };
291
- }
292
- finally {
293
- try {
294
- if (r && !r.done && (m = i["return"]))
295
- m.call(i);
296
- }
297
- finally {
298
- if (e)
299
- throw e.error;
300
- }
301
- }
302
- return ar;
303
- }
304
- /** @deprecated */
305
- function __spread() {
306
- for (var ar = [], i = 0; i < arguments.length; i++)
307
- ar = ar.concat(__read(arguments[i]));
308
- return ar;
309
- }
310
- /** @deprecated */
311
- function __spreadArrays() {
312
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
313
- s += arguments[i].length;
314
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
315
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
316
- r[k] = a[j];
317
- return r;
318
- }
319
- function __spreadArray(to, from, pack) {
320
- if (pack || arguments.length === 2)
321
- for (var i = 0, l = from.length, ar; i < l; i++) {
322
- if (ar || !(i in from)) {
323
- if (!ar)
324
- ar = Array.prototype.slice.call(from, 0, i);
325
- ar[i] = from[i];
326
- }
327
- }
328
- return to.concat(ar || Array.prototype.slice.call(from));
329
- }
330
- function __await(v) {
331
- return this instanceof __await ? (this.v = v, this) : new __await(v);
332
- }
333
- function __asyncGenerator(thisArg, _arguments, generator) {
334
- if (!Symbol.asyncIterator)
335
- throw new TypeError("Symbol.asyncIterator is not defined.");
336
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
337
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
338
- function verb(n) { if (g[n])
339
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
340
- function resume(n, v) { try {
341
- step(g[n](v));
342
- }
343
- catch (e) {
344
- settle(q[0][3], e);
345
- } }
346
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
347
- function fulfill(value) { resume("next", value); }
348
- function reject(value) { resume("throw", value); }
349
- function settle(f, v) { if (f(v), q.shift(), q.length)
350
- resume(q[0][0], q[0][1]); }
351
- }
352
- function __asyncDelegator(o) {
353
- var i, p;
354
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
355
- 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; }
356
- }
357
- function __asyncValues(o) {
358
- if (!Symbol.asyncIterator)
359
- throw new TypeError("Symbol.asyncIterator is not defined.");
360
- var m = o[Symbol.asyncIterator], i;
361
- 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);
362
- 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); }); }; }
363
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
364
- }
365
- function __makeTemplateObject(cooked, raw) {
366
- if (Object.defineProperty) {
367
- Object.defineProperty(cooked, "raw", { value: raw });
368
- }
369
- else {
370
- cooked.raw = raw;
371
- }
372
- return cooked;
373
- }
374
- ;
375
- var __setModuleDefault = Object.create ? (function (o, v) {
376
- Object.defineProperty(o, "default", { enumerable: true, value: v });
377
- }) : function (o, v) {
378
- o["default"] = v;
379
- };
380
- function __importStar(mod) {
381
- if (mod && mod.__esModule)
382
- return mod;
383
- var result = {};
384
- if (mod != null)
385
- for (var k in mod)
386
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
387
- __createBinding(result, mod, k);
388
- __setModuleDefault(result, mod);
389
- return result;
390
- }
391
- function __importDefault(mod) {
392
- return (mod && mod.__esModule) ? mod : { default: mod };
393
- }
394
- function __classPrivateFieldGet(receiver, state, kind, f) {
395
- if (kind === "a" && !f)
396
- throw new TypeError("Private accessor was defined without a getter");
397
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
398
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
399
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
400
- }
401
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
402
- if (kind === "m")
403
- throw new TypeError("Private method is not writable");
404
- if (kind === "a" && !f)
405
- throw new TypeError("Private accessor was defined without a setter");
406
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
407
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
408
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
409
- }
410
- function __classPrivateFieldIn(state, receiver) {
411
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
412
- throw new TypeError("Cannot use 'in' operator on non-object");
413
- return typeof state === "function" ? receiver === state : state.has(receiver);
414
- }
415
- function __addDisposableResource(env, value, async) {
416
- if (value !== null && value !== void 0) {
417
- if (typeof value !== "object" && typeof value !== "function")
418
- throw new TypeError("Object expected.");
419
- var dispose;
420
- if (async) {
421
- if (!Symbol.asyncDispose)
422
- throw new TypeError("Symbol.asyncDispose is not defined.");
423
- dispose = value[Symbol.asyncDispose];
424
- }
425
- if (dispose === void 0) {
426
- if (!Symbol.dispose)
427
- throw new TypeError("Symbol.dispose is not defined.");
428
- dispose = value[Symbol.dispose];
429
- }
430
- if (typeof dispose !== "function")
431
- throw new TypeError("Object not disposable.");
432
- env.stack.push({ value: value, dispose: dispose, async: async });
433
- }
434
- else if (async) {
435
- env.stack.push({ async: true });
436
- }
437
- return value;
438
- }
439
- var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
440
- var e = new Error(message);
441
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
442
- };
443
- function __disposeResources(env) {
444
- function fail(e) {
445
- env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
446
- env.hasError = true;
447
- }
448
- function next() {
449
- while (env.stack.length) {
450
- var rec = env.stack.pop();
451
- try {
452
- var result = rec.dispose && rec.dispose.call(rec.value);
453
- if (rec.async)
454
- return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
455
- }
456
- catch (e) {
457
- fail(e);
458
- }
459
- }
460
- if (env.hasError)
461
- throw env.error;
462
- }
463
- return next();
464
- }
465
- var tslib_es6 = {
466
- __extends: __extends,
467
- __assign: __assign,
468
- __rest: __rest,
469
- __decorate: __decorate,
470
- __param: __param,
471
- __metadata: __metadata,
472
- __awaiter: __awaiter,
473
- __generator: __generator,
474
- __createBinding: __createBinding,
475
- __exportStar: __exportStar,
476
- __values: __values,
477
- __read: __read,
478
- __spread: __spread,
479
- __spreadArrays: __spreadArrays,
480
- __spreadArray: __spreadArray,
481
- __await: __await,
482
- __asyncGenerator: __asyncGenerator,
483
- __asyncDelegator: __asyncDelegator,
484
- __asyncValues: __asyncValues,
485
- __makeTemplateObject: __makeTemplateObject,
486
- __importStar: __importStar,
487
- __importDefault: __importDefault,
488
- __classPrivateFieldGet: __classPrivateFieldGet,
489
- __classPrivateFieldSet: __classPrivateFieldSet,
490
- __classPrivateFieldIn: __classPrivateFieldIn,
491
- __addDisposableResource: __addDisposableResource,
492
- __disposeResources: __disposeResources,
493
- };
37
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
38
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
39
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
40
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
41
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
42
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
43
+ PERFORMANCE OF THIS SOFTWARE.
44
+ ***************************************************************************** */
45
+ /* global Reflect, Promise */
46
+ var extendStatics = function (d, b) {
47
+ extendStatics = Object.setPrototypeOf ||
48
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49
+ function (d, b) { for (var p in b)
50
+ if (Object.prototype.hasOwnProperty.call(b, p))
51
+ d[p] = b[p]; };
52
+ return extendStatics(d, b);
53
+ };
54
+ function __extends(d, b) {
55
+ if (typeof b !== "function" && b !== null)
56
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
57
+ extendStatics(d, b);
58
+ function __() { this.constructor = d; }
59
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
60
+ }
61
+ var __assign = function () {
62
+ __assign = Object.assign || function __assign(t) {
63
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
64
+ s = arguments[i];
65
+ for (var p in s)
66
+ if (Object.prototype.hasOwnProperty.call(s, p))
67
+ t[p] = s[p];
68
+ }
69
+ return t;
70
+ };
71
+ return __assign.apply(this, arguments);
72
+ };
73
+ function __rest(s, e) {
74
+ var t = {};
75
+ for (var p in s)
76
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
77
+ t[p] = s[p];
78
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
79
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
80
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
81
+ t[p[i]] = s[p[i]];
82
+ }
83
+ return t;
84
+ }
85
+ function __decorate(decorators, target, key, desc) {
86
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
87
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
88
+ r = Reflect.decorate(decorators, target, key, desc);
89
+ else
90
+ for (var i = decorators.length - 1; i >= 0; i--)
91
+ if (d = decorators[i])
92
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
93
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
94
+ }
95
+ function __param(paramIndex, decorator) {
96
+ return function (target, key) { decorator(target, key, paramIndex); };
97
+ }
98
+ function __metadata(metadataKey, metadataValue) {
99
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
100
+ return Reflect.metadata(metadataKey, metadataValue);
101
+ }
102
+ function __awaiter(thisArg, _arguments, P, generator) {
103
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
104
+ return new (P || (P = Promise))(function (resolve, reject) {
105
+ function fulfilled(value) { try {
106
+ step(generator.next(value));
107
+ }
108
+ catch (e) {
109
+ reject(e);
110
+ } }
111
+ function rejected(value) { try {
112
+ step(generator["throw"](value));
113
+ }
114
+ catch (e) {
115
+ reject(e);
116
+ } }
117
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
118
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
119
+ });
120
+ }
121
+ function __generator(thisArg, body) {
122
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
123
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
124
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
125
+ function verb(n) { return function (v) { return step([n, v]); }; }
126
+ function step(op) {
127
+ if (f)
128
+ throw new TypeError("Generator is already executing.");
129
+ while (_)
130
+ try {
131
+ 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)
132
+ return t;
133
+ if (y = 0, t)
134
+ op = [op[0] & 2, t.value];
135
+ switch (op[0]) {
136
+ case 0:
137
+ case 1:
138
+ t = op;
139
+ break;
140
+ case 4:
141
+ _.label++;
142
+ return { value: op[1], done: false };
143
+ case 5:
144
+ _.label++;
145
+ y = op[1];
146
+ op = [0];
147
+ continue;
148
+ case 7:
149
+ op = _.ops.pop();
150
+ _.trys.pop();
151
+ continue;
152
+ default:
153
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
154
+ _ = 0;
155
+ continue;
156
+ }
157
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
158
+ _.label = op[1];
159
+ break;
160
+ }
161
+ if (op[0] === 6 && _.label < t[1]) {
162
+ _.label = t[1];
163
+ t = op;
164
+ break;
165
+ }
166
+ if (t && _.label < t[2]) {
167
+ _.label = t[2];
168
+ _.ops.push(op);
169
+ break;
170
+ }
171
+ if (t[2])
172
+ _.ops.pop();
173
+ _.trys.pop();
174
+ continue;
175
+ }
176
+ op = body.call(thisArg, _);
177
+ }
178
+ catch (e) {
179
+ op = [6, e];
180
+ y = 0;
181
+ }
182
+ finally {
183
+ f = t = 0;
184
+ }
185
+ if (op[0] & 5)
186
+ throw op[1];
187
+ return { value: op[0] ? op[1] : void 0, done: true };
188
+ }
189
+ }
190
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
191
+ if (k2 === undefined)
192
+ k2 = k;
193
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
194
+ }) : (function (o, m, k, k2) {
195
+ if (k2 === undefined)
196
+ k2 = k;
197
+ o[k2] = m[k];
198
+ });
199
+ function __exportStar(m, o) {
200
+ for (var p in m)
201
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
202
+ __createBinding(o, m, p);
203
+ }
204
+ function __values(o) {
205
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
206
+ if (m)
207
+ return m.call(o);
208
+ if (o && typeof o.length === "number")
209
+ return {
210
+ next: function () {
211
+ if (o && i >= o.length)
212
+ o = void 0;
213
+ return { value: o && o[i++], done: !o };
214
+ }
215
+ };
216
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
217
+ }
218
+ function __read(o, n) {
219
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
220
+ if (!m)
221
+ return o;
222
+ var i = m.call(o), r, ar = [], e;
223
+ try {
224
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
225
+ ar.push(r.value);
226
+ }
227
+ catch (error) {
228
+ e = { error: error };
229
+ }
230
+ finally {
231
+ try {
232
+ if (r && !r.done && (m = i["return"]))
233
+ m.call(i);
234
+ }
235
+ finally {
236
+ if (e)
237
+ throw e.error;
238
+ }
239
+ }
240
+ return ar;
241
+ }
242
+ /** @deprecated */
243
+ function __spread() {
244
+ for (var ar = [], i = 0; i < arguments.length; i++)
245
+ ar = ar.concat(__read(arguments[i]));
246
+ return ar;
247
+ }
248
+ /** @deprecated */
249
+ function __spreadArrays() {
250
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
251
+ s += arguments[i].length;
252
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
253
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
254
+ r[k] = a[j];
255
+ return r;
256
+ }
257
+ function __spreadArray(to, from, pack) {
258
+ if (pack || arguments.length === 2)
259
+ for (var i = 0, l = from.length, ar; i < l; i++) {
260
+ if (ar || !(i in from)) {
261
+ if (!ar)
262
+ ar = Array.prototype.slice.call(from, 0, i);
263
+ ar[i] = from[i];
264
+ }
265
+ }
266
+ return to.concat(ar || from);
267
+ }
268
+ function __await(v) {
269
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
270
+ }
271
+ function __asyncGenerator(thisArg, _arguments, generator) {
272
+ if (!Symbol.asyncIterator)
273
+ throw new TypeError("Symbol.asyncIterator is not defined.");
274
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
275
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
276
+ function verb(n) { if (g[n])
277
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
278
+ function resume(n, v) { try {
279
+ step(g[n](v));
280
+ }
281
+ catch (e) {
282
+ settle(q[0][3], e);
283
+ } }
284
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
285
+ function fulfill(value) { resume("next", value); }
286
+ function reject(value) { resume("throw", value); }
287
+ function settle(f, v) { if (f(v), q.shift(), q.length)
288
+ resume(q[0][0], q[0][1]); }
289
+ }
290
+ function __asyncDelegator(o) {
291
+ var i, p;
292
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
293
+ 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; }
294
+ }
295
+ function __asyncValues(o) {
296
+ if (!Symbol.asyncIterator)
297
+ throw new TypeError("Symbol.asyncIterator is not defined.");
298
+ var m = o[Symbol.asyncIterator], i;
299
+ 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);
300
+ 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); }); }; }
301
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
302
+ }
303
+ function __makeTemplateObject(cooked, raw) {
304
+ if (Object.defineProperty) {
305
+ Object.defineProperty(cooked, "raw", { value: raw });
306
+ }
307
+ else {
308
+ cooked.raw = raw;
309
+ }
310
+ return cooked;
311
+ }
312
+ ;
313
+ var __setModuleDefault = Object.create ? (function (o, v) {
314
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
315
+ }) : function (o, v) {
316
+ o["default"] = v;
317
+ };
318
+ function __importStar(mod) {
319
+ if (mod && mod.__esModule)
320
+ return mod;
321
+ var result = {};
322
+ if (mod != null)
323
+ for (var k in mod)
324
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
325
+ __createBinding(result, mod, k);
326
+ __setModuleDefault(result, mod);
327
+ return result;
328
+ }
329
+ function __importDefault(mod) {
330
+ return (mod && mod.__esModule) ? mod : { default: mod };
331
+ }
332
+ function __classPrivateFieldGet(receiver, state, kind, f) {
333
+ if (kind === "a" && !f)
334
+ throw new TypeError("Private accessor was defined without a getter");
335
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
336
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
337
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
338
+ }
339
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
340
+ if (kind === "m")
341
+ throw new TypeError("Private method is not writable");
342
+ if (kind === "a" && !f)
343
+ throw new TypeError("Private accessor was defined without a setter");
344
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
345
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
346
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
347
+ }
494
348
 
495
- var TuiRangeComponent = /** @class */ (function (_super) {
496
- __extends(TuiRangeComponent, _super);
497
- function TuiRangeComponent(control, cdr, el) {
498
- var _this = _super.call(this, control, cdr) || this;
499
- _this.el = el;
500
- _this.min = 0;
501
- _this.max = 100;
502
- _this.step = 1;
503
- _this.size = 'm';
504
- _this.segments = 1;
505
- _this.keySteps = null;
506
- _this.slidersRefs = i3.EMPTY_QUERY;
507
- _this.lastActiveThumb = 'right';
508
- return _this;
509
- }
510
- Object.defineProperty(TuiRangeComponent.prototype, "nativeFocusableElement", {
511
- get: function () {
512
- var _a = __read(this.slidersRefs, 2), sliderLeftRef = _a[0], sliderRightRef = _a[1];
513
- if (this.computedDisabled ||
514
- !this.focusable ||
515
- !sliderLeftRef ||
516
- !sliderRightRef) {
517
- return null;
518
- }
519
- var isLeftThumbLocked = this.right === 100;
520
- return isLeftThumbLocked
521
- ? sliderRightRef.nativeElement
522
- : sliderLeftRef.nativeElement;
523
- },
524
- enumerable: false,
525
- configurable: true
526
- });
527
- Object.defineProperty(TuiRangeComponent.prototype, "focused", {
528
- get: function () {
529
- return i3.tuiIsNativeFocusedIn(this.el.nativeElement);
530
- },
531
- enumerable: false,
532
- configurable: true
533
- });
534
- Object.defineProperty(TuiRangeComponent.prototype, "fractionStep", {
535
- get: function () {
536
- return this.step / (this.max - this.min);
537
- },
538
- enumerable: false,
539
- configurable: true
540
- });
541
- Object.defineProperty(TuiRangeComponent.prototype, "computedKeySteps", {
542
- get: function () {
543
- return this.computePureKeySteps(this.keySteps, this.min, this.max);
544
- },
545
- enumerable: false,
546
- configurable: true
547
- });
548
- Object.defineProperty(TuiRangeComponent.prototype, "segmentWidthRatio", {
549
- get: function () {
550
- return 1 / this.segments;
551
- },
552
- enumerable: false,
553
- configurable: true
554
- });
555
- Object.defineProperty(TuiRangeComponent.prototype, "left", {
556
- get: function () {
557
- return this.getPercentageFromValue(this.value[0]);
558
- },
559
- enumerable: false,
560
- configurable: true
561
- });
562
- Object.defineProperty(TuiRangeComponent.prototype, "right", {
563
- get: function () {
564
- return 100 - this.getPercentageFromValue(this.value[1]);
565
- },
566
- enumerable: false,
567
- configurable: true
568
- });
569
- TuiRangeComponent.prototype.onFocused = function (focused) {
570
- this.updateFocused(focused);
571
- };
572
- TuiRangeComponent.prototype.changeByStep = function (coefficient, target) {
573
- var _a = __read(this.slidersRefs, 2), sliderLeftRef = _a[0], sliderRightRef = _a[1];
574
- var leftThumbElement = sliderLeftRef.nativeElement;
575
- var rightThumbElement = sliderRightRef.nativeElement;
576
- var isRightThumb = target === this.el.nativeElement
577
- ? this.lastActiveThumb === 'right'
578
- : target === rightThumbElement;
579
- var activeThumbElement = isRightThumb ? rightThumbElement : leftThumbElement;
580
- var previousValue = isRightThumb ? this.value[1] : this.value[0];
581
- /** @bad TODO think about a solution without twice conversion */
582
- var previousFraction = this.getPercentageFromValue(previousValue) / 100;
583
- var newFractionValue = previousFraction + coefficient * this.fractionStep;
584
- this.processValue(this.getValueFromFraction(newFractionValue), isRightThumb);
585
- if (activeThumbElement) {
586
- activeThumbElement.focus();
587
- }
588
- };
589
- TuiRangeComponent.prototype.processValue = function (value, right) {
590
- if (right) {
591
- this.updateEnd(value);
592
- }
593
- else {
594
- this.updateStart(value);
595
- }
596
- this.lastActiveThumb = right ? 'right' : 'left';
597
- };
598
- TuiRangeComponent.prototype.getValueFromFraction = function (fraction) {
599
- var guardedFraction = i3.tuiClamp(i3.tuiQuantize(fraction, this.fractionStep), 0, 1);
600
- return utils.tuiPercentageToKeyStepValue(guardedFraction * 100, this.computedKeySteps);
601
- };
602
- TuiRangeComponent.prototype.getPercentageFromValue = function (value) {
603
- return utils.tuiKeyStepValueToPercentage(value, this.computedKeySteps);
604
- };
605
- TuiRangeComponent.prototype.getFallbackValue = function () {
606
- return [0, 0];
607
- };
608
- TuiRangeComponent.prototype.computePureKeySteps = function (keySteps, min, max) {
609
- return (keySteps || [
610
- [0, min],
611
- [100, max],
612
- ]);
613
- };
614
- TuiRangeComponent.prototype.updateStart = function (value) {
615
- this.value = [Math.min(value, this.value[1]), this.value[1]];
616
- };
617
- TuiRangeComponent.prototype.updateEnd = function (value) {
618
- this.value = [this.value[0], Math.max(value, this.value[0])];
619
- };
620
- return TuiRangeComponent;
621
- }(i3.AbstractTuiControl));
622
- TuiRangeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeComponent, deps: [{ token: i2.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
623
- TuiRangeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiRangeComponent, selector: "tui-range", inputs: { min: "min", max: "max", step: "step", size: "size", segments: "segments", keySteps: "keySteps" }, host: { listeners: { "focusin": "onFocused(true)", "focusout": "onFocused(false)", "keydown.arrowUp.prevent": "changeByStep(1,$event.target)", "keydown.arrowRight.prevent": "changeByStep(1,$event.target)", "keydown.arrowLeft.prevent": "changeByStep(-1,$event.target)", "keydown.arrowDown.prevent": "changeByStep(-1,$event.target)" }, properties: { "attr.tabindex": "-1", "attr.aria-disabled": "computedDisabled", "attr.data-size": "this.size", "style.--left.%": "this.left", "style.--right.%": "this.right" } }, viewQueries: [{ propertyName: "slidersRefs", predicate: i1.TuiSliderComponent, descendants: true, read: i0.ElementRef }], usesInheritance: true, ngImport: i0__namespace, template: "<div\n class=\"t-track\"\n [style.--bg-size-ratio]=\"1 - segmentWidthRatio\"\n [style.--segment-width.%]=\"segmentWidthRatio * 100\"\n>\n <input\n automation-id=\"tui-range__left\"\n readonly\n step=\"any\"\n tuiSlider\n type=\"range\"\n class=\"t-thumb\"\n [disabled]=\"computedDisabled\"\n [keySteps]=\"computedKeySteps\"\n [max]=\"max\"\n [min]=\"min\"\n [ngModel]=\"value[0]\"\n [size]=\"size\"\n [tuiFocusable]=\"focusable\"\n />\n <input\n automation-id=\"tui-range__right\"\n readonly\n step=\"any\"\n tuiSlider\n type=\"range\"\n class=\"t-thumb\"\n [disabled]=\"computedDisabled\"\n [keySteps]=\"computedKeySteps\"\n [max]=\"max\"\n [min]=\"min\"\n [ngModel]=\"value[1]\"\n [size]=\"size\"\n [tuiFocusable]=\"focusable\"\n />\n</div>\n", styles: [":host{position:relative;display:block;height:.125rem;border-radius:var(--tui-radius-m);background:var(--tui-base-03);cursor:pointer;outline:none;margin:.4375rem 0;touch-action:pan-x}:host:active{cursor:ew-resize}:host:after{content:\"\";position:absolute;top:-.4375rem;bottom:-.4375rem;width:100%}:host._disabled{opacity:var(--tui-disabled-opacity);cursor:auto}:host[data-size=s] .t-track{position:relative;margin:0 .25rem;height:100%}:host[data-size=s] .t-track:before{content:\"\";position:absolute;top:0;left:var(--left);right:var(--right);height:100%;background:var(--tui-primary);margin:0 calc(-.5rem / 2 - 1px)}:host[data-size=s] .t-track:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";left:.125rem;right:.375rem;background-image:repeating-linear-gradient(to right,var(--tui-base-06) 0 .25rem,transparent 0 calc(var(--segment-width) / var(--bg-size-ratio)));background-position-x:right;background-repeat:no-repeat;background-size:calc(100% * var(--bg-size-ratio))}:host[data-size=m] .t-track{position:relative;margin:0 .375rem;height:100%}:host[data-size=m] .t-track:before{content:\"\";position:absolute;top:0;left:var(--left);right:var(--right);height:100%;background:var(--tui-primary);margin:0 calc(-.75rem / 2 - 1px)}:host[data-size=m] .t-track:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";left:.25rem;right:.5rem;background-image:repeating-linear-gradient(to right,var(--tui-base-06) 0 .25rem,transparent 0 calc(var(--segment-width) / var(--bg-size-ratio)));background-position-x:right;background-repeat:no-repeat;background-size:calc(100% * var(--bg-size-ratio))}.t-thumb{pointer-events:none;position:absolute;top:.0625rem;left:0;right:0;z-index:1;transform:translateY(-50%);margin:0}.t-thumb::-webkit-slider-thumb{pointer-events:all}.t-thumb::-moz-range-thumb{pointer-events:all}input[type=range].t-thumb::-webkit-slider-runnable-track{background:transparent}input[type=range].t-thumb::-moz-range-track{background:transparent}input[type=range].t-thumb::-moz-range-progress{background:transparent}input[type=range].t-thumb::-ms-track{background:transparent}input[type=range].t-thumb::-ms-fill-lower{background:transparent}.t-thumb:last-of-type{--tui-slider-thumb-transform: translateX(50%) translateX(1px)}.t-thumb:first-of-type{--tui-slider-thumb-transform: translateX(-50%) translateX(-1px)}:host._disabled .t-thumb{opacity:1}\n"], components: [{ type: i1__namespace.TuiSliderComponent, selector: "input[type=range][tuiSlider]", inputs: ["size", "segments"] }], directives: [{ type: i1__namespace.TuiSliderReadonlyDirective, selector: "input[tuiSlider][readonly]", inputs: ["readonly"] }, { type: i1__namespace.TuiSliderKeyStepsDirective, selector: "input[tuiSlider][keySteps]", inputs: ["keySteps"] }, { type: i2__namespace.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { type: i2__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3__namespace.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
624
- __decorate([
625
- i3.tuiPure
626
- ], TuiRangeComponent.prototype, "computePureKeySteps", null);
627
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeComponent, decorators: [{
628
- type: i0.Component,
629
- args: [{
630
- selector: 'tui-range',
631
- templateUrl: './range.template.html',
632
- styleUrls: ['./range.style.less'],
633
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
634
- host: {
635
- '[attr.tabindex]': '-1',
636
- '[attr.aria-disabled]': 'computedDisabled',
637
- },
638
- }]
639
- }], ctorParameters: function () {
640
- return [{ type: i2__namespace.NgControl, decorators: [{
641
- type: i0.Optional
642
- }, {
643
- type: i0.Self
644
- }, {
645
- type: i0.Inject,
646
- args: [i2.NgControl]
647
- }] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
648
- type: i0.Inject,
649
- args: [i0.ChangeDetectorRef]
650
- }] }, { type: i0__namespace.ElementRef, decorators: [{
651
- type: i0.Inject,
652
- args: [i0.ElementRef]
653
- }] }];
654
- }, propDecorators: { min: [{
655
- type: i0.Input
656
- }], max: [{
657
- type: i0.Input
658
- }], step: [{
659
- type: i0.Input
660
- }], size: [{
661
- type: i0.Input
662
- }, {
663
- type: i0.HostBinding,
664
- args: ['attr.data-size']
665
- }], segments: [{
666
- type: i0.Input
667
- }], keySteps: [{
668
- type: i0.Input
669
- }], slidersRefs: [{
670
- type: i0.ViewChildren,
671
- args: [i1.TuiSliderComponent, { read: i0.ElementRef }]
672
- }], left: [{
673
- type: i0.HostBinding,
674
- args: ['style.--left.%']
675
- }], right: [{
676
- type: i0.HostBinding,
677
- args: ['style.--right.%']
678
- }], onFocused: [{
679
- type: i0.HostListener,
680
- args: ['focusin', ['true']]
681
- }, {
682
- type: i0.HostListener,
683
- args: ['focusout', ['false']]
684
- }], changeByStep: [{
685
- type: i0.HostListener,
686
- args: ['keydown.arrowUp.prevent', ['1', '$event.target']]
687
- }, {
688
- type: i0.HostListener,
689
- args: ['keydown.arrowRight.prevent', ['1', '$event.target']]
690
- }, {
691
- type: i0.HostListener,
692
- args: ['keydown.arrowLeft.prevent', ['-1', '$event.target']]
693
- }, {
694
- type: i0.HostListener,
695
- args: ['keydown.arrowDown.prevent', ['-1', '$event.target']]
696
- }], computePureKeySteps: [] } });
349
+ var TuiRangeComponent = /** @class */ (function (_super) {
350
+ __extends(TuiRangeComponent, _super);
351
+ function TuiRangeComponent(control, cdr, el) {
352
+ var _this = _super.call(this, control, cdr) || this;
353
+ _this.el = el;
354
+ _this.min = 0;
355
+ _this.max = 100;
356
+ _this.step = 1;
357
+ _this.size = 'm';
358
+ _this.segments = 1;
359
+ _this.keySteps = null;
360
+ _this.slidersRefs = i3.EMPTY_QUERY;
361
+ _this.lastActiveThumb = 'right';
362
+ return _this;
363
+ }
364
+ Object.defineProperty(TuiRangeComponent.prototype, "nativeFocusableElement", {
365
+ get: function () {
366
+ var _a = __read(this.slidersRefs, 2), sliderLeftRef = _a[0], sliderRightRef = _a[1];
367
+ if (this.computedDisabled ||
368
+ !this.focusable ||
369
+ !sliderLeftRef ||
370
+ !sliderRightRef) {
371
+ return null;
372
+ }
373
+ var isLeftThumbLocked = this.right === 100;
374
+ return isLeftThumbLocked
375
+ ? sliderRightRef.nativeElement
376
+ : sliderLeftRef.nativeElement;
377
+ },
378
+ enumerable: false,
379
+ configurable: true
380
+ });
381
+ Object.defineProperty(TuiRangeComponent.prototype, "focused", {
382
+ get: function () {
383
+ return i3.tuiIsNativeFocusedIn(this.el.nativeElement);
384
+ },
385
+ enumerable: false,
386
+ configurable: true
387
+ });
388
+ Object.defineProperty(TuiRangeComponent.prototype, "fractionStep", {
389
+ get: function () {
390
+ return this.step / (this.max - this.min);
391
+ },
392
+ enumerable: false,
393
+ configurable: true
394
+ });
395
+ Object.defineProperty(TuiRangeComponent.prototype, "computedKeySteps", {
396
+ get: function () {
397
+ return this.computePureKeySteps(this.keySteps, this.min, this.max);
398
+ },
399
+ enumerable: false,
400
+ configurable: true
401
+ });
402
+ Object.defineProperty(TuiRangeComponent.prototype, "segmentWidthRatio", {
403
+ get: function () {
404
+ return 1 / this.segments;
405
+ },
406
+ enumerable: false,
407
+ configurable: true
408
+ });
409
+ Object.defineProperty(TuiRangeComponent.prototype, "left", {
410
+ get: function () {
411
+ return this.getPercentageFromValue(this.value[0]);
412
+ },
413
+ enumerable: false,
414
+ configurable: true
415
+ });
416
+ Object.defineProperty(TuiRangeComponent.prototype, "right", {
417
+ get: function () {
418
+ return 100 - this.getPercentageFromValue(this.value[1]);
419
+ },
420
+ enumerable: false,
421
+ configurable: true
422
+ });
423
+ TuiRangeComponent.prototype.onFocused = function (focused) {
424
+ this.updateFocused(focused);
425
+ };
426
+ TuiRangeComponent.prototype.changeByStep = function (coefficient, target) {
427
+ var _a = __read(this.slidersRefs, 2), sliderLeftRef = _a[0], sliderRightRef = _a[1];
428
+ var leftThumbElement = sliderLeftRef.nativeElement;
429
+ var rightThumbElement = sliderRightRef.nativeElement;
430
+ var isRightThumb = target === this.el.nativeElement
431
+ ? this.lastActiveThumb === 'right'
432
+ : target === rightThumbElement;
433
+ var activeThumbElement = isRightThumb ? rightThumbElement : leftThumbElement;
434
+ var previousValue = isRightThumb ? this.value[1] : this.value[0];
435
+ /** @bad TODO think about a solution without twice conversion */
436
+ var previousFraction = this.getPercentageFromValue(previousValue) / 100;
437
+ var newFractionValue = previousFraction + coefficient * this.fractionStep;
438
+ this.processValue(this.getValueFromFraction(newFractionValue), isRightThumb);
439
+ if (activeThumbElement) {
440
+ activeThumbElement.focus();
441
+ }
442
+ };
443
+ TuiRangeComponent.prototype.processValue = function (value, right) {
444
+ if (right) {
445
+ this.updateEnd(value);
446
+ }
447
+ else {
448
+ this.updateStart(value);
449
+ }
450
+ this.lastActiveThumb = right ? 'right' : 'left';
451
+ };
452
+ TuiRangeComponent.prototype.getValueFromFraction = function (fraction) {
453
+ var guardedFraction = i3.tuiClamp(i3.tuiQuantize(fraction, this.fractionStep), 0, 1);
454
+ return utils.tuiPercentageToKeyStepValue(guardedFraction * 100, this.computedKeySteps);
455
+ };
456
+ TuiRangeComponent.prototype.getPercentageFromValue = function (value) {
457
+ return utils.tuiKeyStepValueToPercentage(value, this.computedKeySteps);
458
+ };
459
+ TuiRangeComponent.prototype.getFallbackValue = function () {
460
+ return [0, 0];
461
+ };
462
+ TuiRangeComponent.prototype.computePureKeySteps = function (keySteps, min, max) {
463
+ return (keySteps || [
464
+ [0, min],
465
+ [100, max],
466
+ ]);
467
+ };
468
+ TuiRangeComponent.prototype.updateStart = function (value) {
469
+ this.value = [Math.min(value, this.value[1]), this.value[1]];
470
+ };
471
+ TuiRangeComponent.prototype.updateEnd = function (value) {
472
+ this.value = [this.value[0], Math.max(value, this.value[0])];
473
+ };
474
+ return TuiRangeComponent;
475
+ }(i3.AbstractTuiControl));
476
+ TuiRangeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeComponent, deps: [{ token: i2.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
477
+ TuiRangeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiRangeComponent, selector: "tui-range", inputs: { min: "min", max: "max", step: "step", size: "size", segments: "segments", keySteps: "keySteps" }, host: { listeners: { "focusin": "onFocused(true)", "focusout": "onFocused(false)", "keydown.arrowUp.prevent": "changeByStep(1,$event.target)", "keydown.arrowRight.prevent": "changeByStep(1,$event.target)", "keydown.arrowLeft.prevent": "changeByStep(-1,$event.target)", "keydown.arrowDown.prevent": "changeByStep(-1,$event.target)" }, properties: { "attr.tabindex": "-1", "attr.aria-disabled": "computedDisabled", "attr.data-size": "this.size", "style.--left.%": "this.left", "style.--right.%": "this.right" } }, viewQueries: [{ propertyName: "slidersRefs", predicate: i1.TuiSliderComponent, descendants: true, read: i0.ElementRef }], usesInheritance: true, ngImport: i0__namespace, template: "<div\n class=\"t-track\"\n [style.--bg-size-ratio]=\"1 - segmentWidthRatio\"\n [style.--segment-width.%]=\"segmentWidthRatio * 100\"\n>\n <input\n automation-id=\"tui-range__left\"\n readonly\n step=\"any\"\n tuiSlider\n type=\"range\"\n class=\"t-thumb\"\n [disabled]=\"computedDisabled\"\n [keySteps]=\"computedKeySteps\"\n [max]=\"max\"\n [min]=\"min\"\n [ngModel]=\"value[0]\"\n [size]=\"size\"\n [tuiFocusable]=\"focusable\"\n />\n <input\n automation-id=\"tui-range__right\"\n readonly\n step=\"any\"\n tuiSlider\n type=\"range\"\n class=\"t-thumb\"\n [disabled]=\"computedDisabled\"\n [keySteps]=\"computedKeySteps\"\n [max]=\"max\"\n [min]=\"min\"\n [ngModel]=\"value[1]\"\n [size]=\"size\"\n [tuiFocusable]=\"focusable\"\n />\n</div>\n", styles: [":host{position:relative;display:block;height:.125rem;border-radius:var(--tui-radius-m);background:var(--tui-base-03);cursor:pointer;outline:none;margin:.4375rem 0;touch-action:pan-x}:host:active{cursor:ew-resize}:host:after{content:\"\";position:absolute;top:-.4375rem;bottom:-.4375rem;width:100%}:host._disabled{opacity:var(--tui-disabled-opacity);cursor:auto}:host[data-size=s] .t-track{position:relative;margin:0 .25rem;height:100%}:host[data-size=s] .t-track:before{content:\"\";position:absolute;top:0;left:var(--left);right:var(--right);height:100%;background:var(--tui-primary);margin:0 calc(-.5rem / 2 - 1px)}:host[data-size=s] .t-track:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";left:.125rem;right:.375rem;background-image:repeating-linear-gradient(to right,var(--tui-base-06) 0 .25rem,transparent 0 calc(var(--segment-width) / var(--bg-size-ratio)));background-position-x:right;background-repeat:no-repeat;background-size:calc(100% * var(--bg-size-ratio))}:host[data-size=m] .t-track{position:relative;margin:0 .375rem;height:100%}:host[data-size=m] .t-track:before{content:\"\";position:absolute;top:0;left:var(--left);right:var(--right);height:100%;background:var(--tui-primary);margin:0 calc(-.75rem / 2 - 1px)}:host[data-size=m] .t-track:after{position:absolute;top:0;left:0;bottom:0;right:0;content:\"\";left:.25rem;right:.5rem;background-image:repeating-linear-gradient(to right,var(--tui-base-06) 0 .25rem,transparent 0 calc(var(--segment-width) / var(--bg-size-ratio)));background-position-x:right;background-repeat:no-repeat;background-size:calc(100% * var(--bg-size-ratio))}.t-thumb{pointer-events:none;position:absolute;top:.0625rem;left:0;right:0;z-index:1;transform:translateY(-50%);margin:0}.t-thumb::-webkit-slider-thumb{pointer-events:all}.t-thumb::-moz-range-thumb{pointer-events:all}input[type=range].t-thumb::-webkit-slider-runnable-track{background:transparent}input[type=range].t-thumb::-moz-range-track{background:transparent}input[type=range].t-thumb::-moz-range-progress{background:transparent}input[type=range].t-thumb::-ms-track{background:transparent}input[type=range].t-thumb::-ms-fill-lower{background:transparent}.t-thumb:last-of-type{--tui-slider-thumb-transform: translateX(50%) translateX(1px)}.t-thumb:first-of-type{--tui-slider-thumb-transform: translateX(-50%) translateX(-1px)}:host._disabled .t-thumb{opacity:1}\n"], components: [{ type: i1__namespace.TuiSliderComponent, selector: "input[type=range][tuiSlider]", inputs: ["size", "segments"] }], directives: [{ type: i1__namespace.TuiSliderReadonlyDirective, selector: "input[tuiSlider][readonly]", inputs: ["readonly"] }, { type: i1__namespace.TuiSliderKeyStepsDirective, selector: "input[tuiSlider][keySteps]", inputs: ["keySteps"] }, { type: i2__namespace.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { type: i2__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3__namespace.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
478
+ __decorate([
479
+ i3.tuiPure
480
+ ], TuiRangeComponent.prototype, "computePureKeySteps", null);
481
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeComponent, decorators: [{
482
+ type: i0.Component,
483
+ args: [{
484
+ selector: 'tui-range',
485
+ templateUrl: './range.template.html',
486
+ styleUrls: ['./range.style.less'],
487
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
488
+ host: {
489
+ '[attr.tabindex]': '-1',
490
+ '[attr.aria-disabled]': 'computedDisabled',
491
+ },
492
+ }]
493
+ }], ctorParameters: function () {
494
+ return [{ type: i2__namespace.NgControl, decorators: [{
495
+ type: i0.Optional
496
+ }, {
497
+ type: i0.Self
498
+ }, {
499
+ type: i0.Inject,
500
+ args: [i2.NgControl]
501
+ }] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
502
+ type: i0.Inject,
503
+ args: [i0.ChangeDetectorRef]
504
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
505
+ type: i0.Inject,
506
+ args: [i0.ElementRef]
507
+ }] }];
508
+ }, propDecorators: { min: [{
509
+ type: i0.Input
510
+ }], max: [{
511
+ type: i0.Input
512
+ }], step: [{
513
+ type: i0.Input
514
+ }], size: [{
515
+ type: i0.Input
516
+ }, {
517
+ type: i0.HostBinding,
518
+ args: ['attr.data-size']
519
+ }], segments: [{
520
+ type: i0.Input
521
+ }], keySteps: [{
522
+ type: i0.Input
523
+ }], slidersRefs: [{
524
+ type: i0.ViewChildren,
525
+ args: [i1.TuiSliderComponent, { read: i0.ElementRef }]
526
+ }], left: [{
527
+ type: i0.HostBinding,
528
+ args: ['style.--left.%']
529
+ }], right: [{
530
+ type: i0.HostBinding,
531
+ args: ['style.--right.%']
532
+ }], onFocused: [{
533
+ type: i0.HostListener,
534
+ args: ['focusin', ['true']]
535
+ }, {
536
+ type: i0.HostListener,
537
+ args: ['focusout', ['false']]
538
+ }], changeByStep: [{
539
+ type: i0.HostListener,
540
+ args: ['keydown.arrowUp.prevent', ['1', '$event.target']]
541
+ }, {
542
+ type: i0.HostListener,
543
+ args: ['keydown.arrowRight.prevent', ['1', '$event.target']]
544
+ }, {
545
+ type: i0.HostListener,
546
+ args: ['keydown.arrowLeft.prevent', ['-1', '$event.target']]
547
+ }, {
548
+ type: i0.HostListener,
549
+ args: ['keydown.arrowDown.prevent', ['-1', '$event.target']]
550
+ }], computePureKeySteps: [] } });
697
551
 
698
- var TuiRangeChangeDirective = /** @class */ (function () {
699
- function TuiRangeChangeDirective(doc, el, range, destroy$) {
700
- var _this = this;
701
- this.doc = doc;
702
- this.el = el;
703
- this.range = range;
704
- /**
705
- * TODO replace with pointer events (when all supported browsers can handle them).
706
- * Don't forget to use setPointerCapture instead of listening all doc events
707
- */
708
- this.pointerDown$ = i2$1.merge(i3.tuiTypedFromEvent(this.el.nativeElement, 'touchstart', {
709
- passive: true,
710
- }).pipe(operators.filter(function (_a) {
711
- var touches = _a.touches;
712
- return touches.length === 1;
713
- }), operators.map(function (_a) {
714
- var touches = _a.touches;
715
- return touches[0];
716
- })), i3.tuiTypedFromEvent(this.el.nativeElement, 'mousedown', { passive: true }));
717
- this.pointerMove$ = i2$1.merge(i3.tuiTypedFromEvent(this.doc, 'touchmove').pipe(operators.filter(function (_a) {
718
- var touches = _a.touches;
719
- return touches.length === 1;
720
- }), operators.map(function (_a) {
721
- var touches = _a.touches;
722
- return touches[0];
723
- })), i3.tuiTypedFromEvent(this.doc, 'mousemove'));
724
- this.pointerUp$ = i2$1.merge(i3.tuiTypedFromEvent(this.doc, 'touchend', { passive: true }), i3.tuiTypedFromEvent(this.doc, 'mouseup', { passive: true }));
725
- this.activeThumbChange = new i0.EventEmitter();
726
- var activeThumb;
727
- this.pointerDown$
728
- .pipe(operators.tap(function (_a) {
729
- var clientX = _a.clientX, target = _a.target;
730
- activeThumb = _this.detectActiveThumb(clientX, target);
731
- _this.activeThumbChange.emit(activeThumb);
732
- if (_this.range.focusable) {
733
- el.nativeElement.focus();
734
- }
735
- }), operators.switchMap(function (event) { return _this.pointerMove$.pipe(operators.startWith(event)); }), operators.map(function (_a) {
736
- var clientX = _a.clientX;
737
- return _this.getFractionFromEvents(clientX);
738
- }), operators.takeUntil(this.pointerUp$), operators.repeat(), operators.takeUntil(destroy$))
739
- .subscribe(function (fraction) {
740
- var value = _this.range.getValueFromFraction(fraction);
741
- _this.range.processValue(value, activeThumb === 'right');
742
- });
743
- }
744
- TuiRangeChangeDirective.prototype.getFractionFromEvents = function (clickClientX) {
745
- var hostRect = this.el.nativeElement.getBoundingClientRect();
746
- var value = clickClientX - hostRect.left;
747
- var total = hostRect.width;
748
- return i3.tuiClamp(i3.tuiRound(value / total, constants.TUI_FLOATING_PRECISION), 0, 1);
749
- };
750
- TuiRangeChangeDirective.prototype.detectActiveThumb = function (clientX, target) {
751
- var _a = __read(this.range.slidersRefs, 2), leftSliderRef = _a[0], rightSliderRef = _a[1];
752
- switch (target) {
753
- case leftSliderRef.nativeElement:
754
- return 'left';
755
- case rightSliderRef.nativeElement:
756
- return 'right';
757
- default:
758
- return this.findNearestActiveThumb(clientX);
759
- }
760
- };
761
- TuiRangeChangeDirective.prototype.findNearestActiveThumb = function (clientX) {
762
- var fraction = this.getFractionFromEvents(clientX);
763
- var deltaLeft = fraction * 100 - this.range.left;
764
- var deltaRight = fraction * 100 - 100 + this.range.right;
765
- return Math.abs(deltaLeft) > Math.abs(deltaRight) ||
766
- deltaRight > 0 ||
767
- (this.range.left === 0 && this.range.right === 100)
768
- ? 'right'
769
- : 'left';
770
- };
771
- return TuiRangeChangeDirective;
772
- }());
773
- TuiRangeChangeDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeChangeDirective, deps: [{ token: common.DOCUMENT }, { token: i0.ElementRef }, { token: TuiRangeComponent }, { token: i3.TuiDestroyService, self: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
774
- TuiRangeChangeDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiRangeChangeDirective, selector: "tui-range", outputs: { activeThumbChange: "activeThumbChange" }, providers: [i3.TuiDestroyService], ngImport: i0__namespace });
775
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeChangeDirective, decorators: [{
776
- type: i0.Directive,
777
- args: [{
778
- selector: 'tui-range',
779
- providers: [i3.TuiDestroyService],
780
- }]
781
- }], ctorParameters: function () {
782
- return [{ type: Document, decorators: [{
783
- type: i0.Inject,
784
- args: [common.DOCUMENT]
785
- }] }, { type: i0__namespace.ElementRef, decorators: [{
786
- type: i0.Inject,
787
- args: [i0.ElementRef]
788
- }] }, { type: TuiRangeComponent, decorators: [{
789
- type: i0.Inject,
790
- args: [TuiRangeComponent]
791
- }] }, { type: i2__namespace$1.Observable, decorators: [{
792
- type: i0.Self
793
- }, {
794
- type: i0.Inject,
795
- args: [i3.TuiDestroyService]
796
- }] }];
797
- }, propDecorators: { activeThumbChange: [{
798
- type: i0.Output
799
- }] } });
552
+ var TuiRangeChangeDirective = /** @class */ (function () {
553
+ function TuiRangeChangeDirective(doc, el, range, destroy$) {
554
+ var _this = this;
555
+ this.doc = doc;
556
+ this.el = el;
557
+ this.range = range;
558
+ /**
559
+ * TODO replace with pointer events (when all supported browsers can handle them).
560
+ * Don't forget to use setPointerCapture instead of listening all doc events
561
+ */
562
+ this.pointerDown$ = i2$1.merge(i3.tuiTypedFromEvent(this.el.nativeElement, 'touchstart', {
563
+ passive: true,
564
+ }).pipe(operators.filter(function (_a) {
565
+ var touches = _a.touches;
566
+ return touches.length === 1;
567
+ }), operators.map(function (_a) {
568
+ var touches = _a.touches;
569
+ return touches[0];
570
+ })), i3.tuiTypedFromEvent(this.el.nativeElement, 'mousedown', { passive: true }));
571
+ this.pointerMove$ = i2$1.merge(i3.tuiTypedFromEvent(this.doc, 'touchmove').pipe(operators.filter(function (_a) {
572
+ var touches = _a.touches;
573
+ return touches.length === 1;
574
+ }), operators.map(function (_a) {
575
+ var touches = _a.touches;
576
+ return touches[0];
577
+ })), i3.tuiTypedFromEvent(this.doc, 'mousemove'));
578
+ this.pointerUp$ = i2$1.merge(i3.tuiTypedFromEvent(this.doc, 'touchend', { passive: true }), i3.tuiTypedFromEvent(this.doc, 'mouseup', { passive: true }));
579
+ this.activeThumbChange = new i0.EventEmitter();
580
+ var activeThumb;
581
+ this.pointerDown$
582
+ .pipe(operators.tap(function (_a) {
583
+ var clientX = _a.clientX, target = _a.target;
584
+ activeThumb = _this.detectActiveThumb(clientX, target);
585
+ _this.activeThumbChange.emit(activeThumb);
586
+ if (_this.range.focusable) {
587
+ el.nativeElement.focus();
588
+ }
589
+ }), operators.switchMap(function (event) { return _this.pointerMove$.pipe(operators.startWith(event)); }), operators.map(function (_a) {
590
+ var clientX = _a.clientX;
591
+ return _this.getFractionFromEvents(clientX);
592
+ }), operators.takeUntil(this.pointerUp$), operators.repeat(), operators.takeUntil(destroy$))
593
+ .subscribe(function (fraction) {
594
+ var value = _this.range.getValueFromFraction(fraction);
595
+ _this.range.processValue(value, activeThumb === 'right');
596
+ });
597
+ }
598
+ TuiRangeChangeDirective.prototype.getFractionFromEvents = function (clickClientX) {
599
+ var hostRect = this.el.nativeElement.getBoundingClientRect();
600
+ var value = clickClientX - hostRect.left;
601
+ var total = hostRect.width;
602
+ return i3.tuiClamp(i3.tuiRound(value / total, constants.TUI_FLOATING_PRECISION), 0, 1);
603
+ };
604
+ TuiRangeChangeDirective.prototype.detectActiveThumb = function (clientX, target) {
605
+ var _a = __read(this.range.slidersRefs, 2), leftSliderRef = _a[0], rightSliderRef = _a[1];
606
+ switch (target) {
607
+ case leftSliderRef.nativeElement:
608
+ return 'left';
609
+ case rightSliderRef.nativeElement:
610
+ return 'right';
611
+ default:
612
+ return this.findNearestActiveThumb(clientX);
613
+ }
614
+ };
615
+ TuiRangeChangeDirective.prototype.findNearestActiveThumb = function (clientX) {
616
+ var fraction = this.getFractionFromEvents(clientX);
617
+ var deltaLeft = fraction * 100 - this.range.left;
618
+ var deltaRight = fraction * 100 - 100 + this.range.right;
619
+ return Math.abs(deltaLeft) > Math.abs(deltaRight) ||
620
+ deltaRight > 0 ||
621
+ (this.range.left === 0 && this.range.right === 100)
622
+ ? 'right'
623
+ : 'left';
624
+ };
625
+ return TuiRangeChangeDirective;
626
+ }());
627
+ TuiRangeChangeDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeChangeDirective, deps: [{ token: common.DOCUMENT }, { token: i0.ElementRef }, { token: TuiRangeComponent }, { token: i3.TuiDestroyService, self: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
628
+ TuiRangeChangeDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiRangeChangeDirective, selector: "tui-range", outputs: { activeThumbChange: "activeThumbChange" }, providers: [i3.TuiDestroyService], ngImport: i0__namespace });
629
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeChangeDirective, decorators: [{
630
+ type: i0.Directive,
631
+ args: [{
632
+ selector: 'tui-range',
633
+ providers: [i3.TuiDestroyService],
634
+ }]
635
+ }], ctorParameters: function () {
636
+ return [{ type: Document, decorators: [{
637
+ type: i0.Inject,
638
+ args: [common.DOCUMENT]
639
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
640
+ type: i0.Inject,
641
+ args: [i0.ElementRef]
642
+ }] }, { type: TuiRangeComponent, decorators: [{
643
+ type: i0.Inject,
644
+ args: [TuiRangeComponent]
645
+ }] }, { type: i2__namespace$1.Observable, decorators: [{
646
+ type: i0.Self
647
+ }, {
648
+ type: i0.Inject,
649
+ args: [i3.TuiDestroyService]
650
+ }] }];
651
+ }, propDecorators: { activeThumbChange: [{
652
+ type: i0.Output
653
+ }] } });
800
654
 
801
- var TuiRangeModule = /** @class */ (function () {
802
- function TuiRangeModule() {
803
- }
804
- return TuiRangeModule;
805
- }());
806
- TuiRangeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
807
- TuiRangeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeModule, declarations: [TuiRangeComponent, TuiRangeChangeDirective], imports: [common.CommonModule, i3.TuiFocusableModule, i1.TuiSliderModule, i2.FormsModule], exports: [TuiRangeComponent, TuiRangeChangeDirective] });
808
- TuiRangeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeModule, imports: [[common.CommonModule, i3.TuiFocusableModule, i1.TuiSliderModule, i2.FormsModule]] });
809
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeModule, decorators: [{
810
- type: i0.NgModule,
811
- args: [{
812
- imports: [common.CommonModule, i3.TuiFocusableModule, i1.TuiSliderModule, i2.FormsModule],
813
- declarations: [TuiRangeComponent, TuiRangeChangeDirective],
814
- exports: [TuiRangeComponent, TuiRangeChangeDirective],
815
- }]
816
- }] });
655
+ var TuiRangeModule = /** @class */ (function () {
656
+ function TuiRangeModule() {
657
+ }
658
+ return TuiRangeModule;
659
+ }());
660
+ TuiRangeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
661
+ TuiRangeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeModule, declarations: [TuiRangeComponent, TuiRangeChangeDirective], imports: [common.CommonModule, i3.TuiFocusableModule, i1.TuiSliderModule, i2.FormsModule], exports: [TuiRangeComponent, TuiRangeChangeDirective] });
662
+ TuiRangeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeModule, imports: [[common.CommonModule, i3.TuiFocusableModule, i1.TuiSliderModule, i2.FormsModule]] });
663
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiRangeModule, decorators: [{
664
+ type: i0.NgModule,
665
+ args: [{
666
+ imports: [common.CommonModule, i3.TuiFocusableModule, i1.TuiSliderModule, i2.FormsModule],
667
+ declarations: [TuiRangeComponent, TuiRangeChangeDirective],
668
+ exports: [TuiRangeComponent, TuiRangeChangeDirective],
669
+ }]
670
+ }] });
817
671
 
818
- /**
819
- * Generated bundle index. Do not edit.
820
- */
672
+ /**
673
+ * Generated bundle index. Do not edit.
674
+ */
821
675
 
822
- exports.TuiRangeChangeDirective = TuiRangeChangeDirective;
823
- exports.TuiRangeComponent = TuiRangeComponent;
824
- exports.TuiRangeModule = TuiRangeModule;
676
+ exports.TuiRangeChangeDirective = TuiRangeChangeDirective;
677
+ exports.TuiRangeComponent = TuiRangeComponent;
678
+ exports.TuiRangeModule = TuiRangeModule;
825
679
 
826
- Object.defineProperty(exports, '__esModule', { value: true });
680
+ Object.defineProperty(exports, '__esModule', { value: true });
827
681
 
828
682
  }));
829
683
  //# sourceMappingURL=taiga-ui-kit-components-range.umd.js.map