@taiga-ui/core 3.17.0 → 3.18.0-dev.main-05a0bf8

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 (312) hide show
  1. package/bundles/taiga-ui-core-abstract.umd.js +11 -19
  2. package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
  3. package/bundles/taiga-ui-core-components-alert.umd.js +14 -23
  4. package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
  5. package/bundles/taiga-ui-core-components-button.umd.js +11 -20
  6. package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
  7. package/bundles/taiga-ui-core-components-calendar.umd.js +11 -20
  8. package/bundles/taiga-ui-core-components-calendar.umd.js.map +1 -1
  9. package/bundles/taiga-ui-core-components-data-list.umd.js +20 -29
  10. package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
  11. package/bundles/taiga-ui-core-components-dialog.umd.js +203 -190
  12. package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
  13. package/bundles/taiga-ui-core-components-error.umd.js +11 -20
  14. package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
  15. package/bundles/taiga-ui-core-components-expand.umd.js +14 -23
  16. package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
  17. package/bundles/taiga-ui-core-components-group.umd.js +14 -23
  18. package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
  19. package/bundles/taiga-ui-core-components-hints-host.umd.js +7 -7
  20. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +14 -23
  21. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
  22. package/bundles/taiga-ui-core-components-label.umd.js +11 -20
  23. package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
  24. package/bundles/taiga-ui-core-components-link.umd.js +12 -21
  25. package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
  26. package/bundles/taiga-ui-core-components-loader.umd.js +11 -20
  27. package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
  28. package/bundles/taiga-ui-core-components-notification.umd.js +13 -22
  29. package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
  30. package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +11 -20
  31. package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
  32. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +11 -20
  33. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
  34. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +11 -20
  35. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
  36. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +21 -30
  37. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  38. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js +11 -20
  39. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js.map +1 -1
  40. package/bundles/taiga-ui-core-components-root.umd.js +11 -20
  41. package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
  42. package/bundles/taiga-ui-core-components-scroll-controls.umd.js +17 -26
  43. package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
  44. package/bundles/taiga-ui-core-components-scrollbar.umd.js +17 -26
  45. package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
  46. package/bundles/taiga-ui-core-components-svg.umd.js +109 -38
  47. package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
  48. package/bundles/taiga-ui-core-components-theme-night.umd.js +11 -20
  49. package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
  50. package/bundles/taiga-ui-core-components-tooltip.umd.js +39 -30
  51. package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
  52. package/bundles/taiga-ui-core-directives-dropdown.umd.js +83 -72
  53. package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
  54. package/bundles/taiga-ui-core-directives-hint.umd.js +95 -100
  55. package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
  56. package/bundles/taiga-ui-core-directives-mask-accessor.umd.js +7 -7
  57. package/bundles/taiga-ui-core-directives-mode.umd.js +11 -20
  58. package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
  59. package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js +11 -20
  60. package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js.map +1 -1
  61. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +35 -44
  62. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
  63. package/bundles/taiga-ui-core-directives-wrapper.umd.js +7 -7
  64. package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js +11 -20
  65. package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js.map +1 -1
  66. package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js +7 -7
  67. package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js +7 -7
  68. package/bundles/taiga-ui-core-pipes-format-date.umd.js +7 -7
  69. package/bundles/taiga-ui-core-pipes-format-number.umd.js +7 -7
  70. package/bundles/taiga-ui-core-pipes-format-phone.umd.js +7 -7
  71. package/bundles/taiga-ui-core-pipes-month.umd.js +7 -7
  72. package/bundles/taiga-ui-core-pipes-order-week-days.umd.js +11 -20
  73. package/bundles/taiga-ui-core-pipes-order-week-days.umd.js.map +1 -1
  74. package/bundles/taiga-ui-core-services.umd.js +22 -31
  75. package/bundles/taiga-ui-core-services.umd.js.map +1 -1
  76. package/bundles/taiga-ui-core-tokens.umd.js +43 -14
  77. package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
  78. package/bundles/taiga-ui-core-utils-format.umd.js +4 -13
  79. package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
  80. package/bundles/taiga-ui-core-utils-mask.umd.js +4 -13
  81. package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
  82. package/components/dialog/dialog-close.service.d.ts +15 -0
  83. package/components/dialog/dialog.component.d.ts +5 -4
  84. package/components/dialog/dialog.tokens.d.ts +2 -0
  85. package/components/dialog/index.d.ts +1 -1
  86. package/components/notification/notification.component.d.ts +2 -2
  87. package/components/svg/deprecated-icons.d.ts +1 -0
  88. package/components/svg/index.d.ts +2 -0
  89. package/components/svg/svg-options.d.ts +14 -0
  90. package/components/svg/svg.component.d.ts +5 -7
  91. package/components/tooltip/tooltip.component.d.ts +2 -2
  92. package/components/tooltip/tooltip.module.d.ts +5 -4
  93. package/directives/dropdown/dropdown-hover-options.directive.d.ts +9 -0
  94. package/directives/dropdown/dropdown-hover.directive.d.ts +3 -1
  95. package/directives/dropdown/dropdown-position-sided.directive.d.ts +2 -2
  96. package/directives/dropdown/dropdown-position.directive.d.ts +2 -2
  97. package/directives/dropdown/index.d.ts +1 -0
  98. package/directives/hint/hint-hover.directive.d.ts +4 -2
  99. package/directives/hint/hint-position.directive.d.ts +2 -2
  100. package/esm2015/abstract/abstract-driver.directive.js +3 -3
  101. package/esm2015/abstract/abstract-textfield-host.js +3 -3
  102. package/esm2015/abstract/rect-accessor.js +2 -1
  103. package/esm2015/components/alert/alert.component.js +3 -3
  104. package/esm2015/components/alert/alert.module.js +4 -4
  105. package/esm2015/components/alert/alert.service.js +3 -3
  106. package/esm2015/components/button/button.component.js +3 -3
  107. package/esm2015/components/button/button.module.js +4 -4
  108. package/esm2015/components/calendar/calendar.component.js +3 -3
  109. package/esm2015/components/calendar/calendar.module.js +4 -4
  110. package/esm2015/components/data-list/data-list.component.js +3 -3
  111. package/esm2015/components/data-list/data-list.directive.js +3 -3
  112. package/esm2015/components/data-list/data-list.module.js +4 -4
  113. package/esm2015/components/data-list/opt-group.directive.js +3 -3
  114. package/esm2015/components/data-list/option/option.component.js +3 -3
  115. package/esm2015/components/dialog/dialog-close.service.js +51 -0
  116. package/esm2015/components/dialog/dialog.component.js +27 -11
  117. package/esm2015/components/dialog/dialog.directive.js +3 -3
  118. package/esm2015/components/dialog/dialog.module.js +4 -4
  119. package/esm2015/components/dialog/dialog.service.js +3 -3
  120. package/esm2015/components/dialog/dialog.tokens.js +5 -1
  121. package/esm2015/components/dialog/index.js +2 -2
  122. package/esm2015/components/error/error.component.js +3 -3
  123. package/esm2015/components/error/error.module.js +4 -4
  124. package/esm2015/components/expand/expand-content.directive.js +3 -3
  125. package/esm2015/components/expand/expand.component.js +3 -3
  126. package/esm2015/components/expand/expand.module.js +4 -4
  127. package/esm2015/components/group/group-styles.component.js +3 -3
  128. package/esm2015/components/group/group.directive.js +3 -3
  129. package/esm2015/components/group/group.module.js +4 -4
  130. package/esm2015/components/hints-host/hints-host.component.js +3 -3
  131. package/esm2015/components/hints-host/hints-host.module.js +4 -4
  132. package/esm2015/components/hosted-dropdown/hosted-dropdown-connector.directive.js +3 -3
  133. package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +3 -3
  134. package/esm2015/components/hosted-dropdown/hosted-dropdown.module.js +4 -4
  135. package/esm2015/components/label/label.component.js +3 -3
  136. package/esm2015/components/label/label.module.js +4 -4
  137. package/esm2015/components/link/link.component.js +4 -4
  138. package/esm2015/components/link/link.module.js +4 -4
  139. package/esm2015/components/loader/loader.component.js +3 -3
  140. package/esm2015/components/loader/loader.module.js +4 -4
  141. package/esm2015/components/notification/notification.component.js +6 -6
  142. package/esm2015/components/notification/notification.module.js +4 -4
  143. package/esm2015/components/primitive-calendar/primitive-calendar.component.js +3 -3
  144. package/esm2015/components/primitive-calendar/primitive-calendar.module.js +4 -4
  145. package/esm2015/components/primitive-checkbox/primitive-checkbox.component.js +3 -3
  146. package/esm2015/components/primitive-checkbox/primitive-checkbox.module.js +4 -4
  147. package/esm2015/components/primitive-spin-button/primitive-spin-button.component.js +3 -3
  148. package/esm2015/components/primitive-spin-button/primitive-spin-button.module.js +4 -4
  149. package/esm2015/components/primitive-textfield/primitive-textfield.component.js +5 -5
  150. package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +3 -3
  151. package/esm2015/components/primitive-textfield/primitive-textfield.module.js +4 -4
  152. package/esm2015/components/primitive-textfield/textfield/textfield.component.js +3 -3
  153. package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +3 -3
  154. package/esm2015/components/primitive-year-picker/primitive-year-picker.component.js +3 -3
  155. package/esm2015/components/primitive-year-picker/primitive-year-picker.module.js +4 -4
  156. package/esm2015/components/root/root.component.js +3 -3
  157. package/esm2015/components/root/root.module.js +4 -4
  158. package/esm2015/components/scroll-controls/scroll-controls.component.js +3 -3
  159. package/esm2015/components/scroll-controls/scroll-controls.module.js +4 -4
  160. package/esm2015/components/scroll-controls/scrollbar-wrapper.directive.js +3 -3
  161. package/esm2015/components/scroll-controls/scrollbar.directive.js +3 -3
  162. package/esm2015/components/scrollbar/scroll-ref.directive.js +3 -3
  163. package/esm2015/components/scrollbar/scrollable.directive.js +3 -3
  164. package/esm2015/components/scrollbar/scrollbar.component.js +3 -3
  165. package/esm2015/components/scrollbar/scrollbar.module.js +4 -4
  166. package/esm2015/components/svg/deprecated-icons.js +59 -0
  167. package/esm2015/components/svg/index.js +3 -1
  168. package/esm2015/components/svg/svg-options.js +29 -0
  169. package/esm2015/components/svg/svg.component.js +14 -19
  170. package/esm2015/components/svg/svg.module.js +4 -4
  171. package/esm2015/components/theme-night/theme-night.component.js +3 -3
  172. package/esm2015/components/theme-night/theme-night.module.js +4 -4
  173. package/esm2015/components/tooltip/tooltip.component.js +15 -15
  174. package/esm2015/components/tooltip/tooltip.module.js +23 -6
  175. package/esm2015/directives/dropdown/dropdown-context.directive.js +3 -3
  176. package/esm2015/directives/dropdown/dropdown-driver.directive.js +3 -3
  177. package/esm2015/directives/dropdown/dropdown-host.directive.js +3 -3
  178. package/esm2015/directives/dropdown/dropdown-hover-options.directive.js +14 -0
  179. package/esm2015/directives/dropdown/dropdown-hover.directive.js +12 -7
  180. package/esm2015/directives/dropdown/dropdown-manual.directive.js +3 -3
  181. package/esm2015/directives/dropdown/dropdown-options.directive.js +3 -3
  182. package/esm2015/directives/dropdown/dropdown-position-sided.directive.js +14 -14
  183. package/esm2015/directives/dropdown/dropdown-position.directive.js +13 -13
  184. package/esm2015/directives/dropdown/dropdown-selection.directive.js +3 -3
  185. package/esm2015/directives/dropdown/dropdown.component.js +3 -3
  186. package/esm2015/directives/dropdown/dropdown.directive.js +3 -3
  187. package/esm2015/directives/dropdown/dropdown.module.js +4 -4
  188. package/esm2015/directives/dropdown/index.js +2 -1
  189. package/esm2015/directives/hint/hint-describe.directive.js +3 -3
  190. package/esm2015/directives/hint/hint-driver.directive.js +3 -3
  191. package/esm2015/directives/hint/hint-host.directive.js +3 -3
  192. package/esm2015/directives/hint/hint-hover.directive.js +14 -11
  193. package/esm2015/directives/hint/hint-manual.directive.js +3 -3
  194. package/esm2015/directives/hint/hint-options.directive.js +5 -5
  195. package/esm2015/directives/hint/hint-pointer.directive.js +3 -3
  196. package/esm2015/directives/hint/hint-position.directive.js +14 -13
  197. package/esm2015/directives/hint/hint.component.js +6 -5
  198. package/esm2015/directives/hint/hint.directive.js +3 -3
  199. package/esm2015/directives/hint/hint.module.js +4 -4
  200. package/esm2015/directives/mask-accessor/mask-accessor.directive.js +3 -3
  201. package/esm2015/directives/mask-accessor/mask-accessor.module.js +4 -4
  202. package/esm2015/directives/mode/mode.directive.js +3 -3
  203. package/esm2015/directives/mode/mode.module.js +4 -4
  204. package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +3 -3
  205. package/esm2015/directives/scroll-into-view/scroll-into-view.module.js +4 -4
  206. package/esm2015/directives/textfield-controller/textfield-cleaner.directive.js +3 -3
  207. package/esm2015/directives/textfield-controller/textfield-controller.module.js +4 -4
  208. package/esm2015/directives/textfield-controller/textfield-custom-content.directive.js +3 -3
  209. package/esm2015/directives/textfield-controller/textfield-filler.directive.js +3 -3
  210. package/esm2015/directives/textfield-controller/textfield-icon-left.directive.js +3 -3
  211. package/esm2015/directives/textfield-controller/textfield-icon.directive.js +3 -3
  212. package/esm2015/directives/textfield-controller/textfield-label-outside.directive.js +3 -3
  213. package/esm2015/directives/textfield-controller/textfield-postfix.directive.js +3 -3
  214. package/esm2015/directives/textfield-controller/textfield-prefix.directive.js +3 -3
  215. package/esm2015/directives/textfield-controller/textfield-size.directive.js +3 -3
  216. package/esm2015/directives/wrapper/wrapper.directive.js +3 -3
  217. package/esm2015/directives/wrapper/wrapper.module.js +4 -4
  218. package/esm2015/interfaces/dialog-options.js +1 -1
  219. package/esm2015/internal/primitive-year-month-pagination/primitive-year-month-pagination.component.js +3 -3
  220. package/esm2015/internal/primitive-year-month-pagination/primitive-year-month-pagination.module.js +4 -4
  221. package/esm2015/internal/svg-defs-host/svg-defs-host.component.js +3 -3
  222. package/esm2015/internal/svg-defs-host/svg-defs-host.module.js +4 -4
  223. package/esm2015/pipes/calendar-sheet/calendar-sheet.module.js +4 -4
  224. package/esm2015/pipes/calendar-sheet/calendar-sheet.pipe.js +3 -3
  225. package/esm2015/pipes/format-date/format-date.module.js +4 -4
  226. package/esm2015/pipes/format-date/format-date.pipe.js +3 -3
  227. package/esm2015/pipes/format-number/format-number.module.js +4 -4
  228. package/esm2015/pipes/format-number/format-number.pipe.js +3 -3
  229. package/esm2015/pipes/format-phone/format-phone.module.js +4 -4
  230. package/esm2015/pipes/format-phone/format-phone.pipe.js +3 -3
  231. package/esm2015/pipes/month/month.module.js +4 -4
  232. package/esm2015/pipes/month/month.pipe.js +3 -3
  233. package/esm2015/pipes/order-week-days/order-week-days.module.js +4 -4
  234. package/esm2015/pipes/order-week-days/order-week-days.pipe.js +3 -3
  235. package/esm2015/services/format-date.service.js +3 -3
  236. package/esm2015/services/hint.service.js +3 -3
  237. package/esm2015/services/night-theme.service.js +3 -3
  238. package/esm2015/services/position.service.js +3 -3
  239. package/esm2015/services/router-link-active.service.js +3 -3
  240. package/esm2015/services/svg.service.js +3 -3
  241. package/esm2015/tokens/icon-place.js +5 -2
  242. package/esm2015/tokens/icons-path.js +4 -1
  243. package/esm2015/tokens/index.js +2 -1
  244. package/esm2015/tokens/svg-content-processor.js +4 -1
  245. package/esm2015/tokens/svg-src-processor.js +4 -1
  246. package/esm2015/tokens/viewport.js +26 -0
  247. package/fesm2015/taiga-ui-core-abstract.js +7 -6
  248. package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
  249. package/fesm2015/taiga-ui-core-components-alert.js +10 -10
  250. package/fesm2015/taiga-ui-core-components-button.js +7 -7
  251. package/fesm2015/taiga-ui-core-components-calendar.js +7 -7
  252. package/fesm2015/taiga-ui-core-components-data-list.js +16 -16
  253. package/fesm2015/taiga-ui-core-components-dialog.js +96 -80
  254. package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
  255. package/fesm2015/taiga-ui-core-components-error.js +7 -7
  256. package/fesm2015/taiga-ui-core-components-expand.js +10 -10
  257. package/fesm2015/taiga-ui-core-components-group.js +10 -10
  258. package/fesm2015/taiga-ui-core-components-hints-host.js +7 -7
  259. package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +10 -10
  260. package/fesm2015/taiga-ui-core-components-label.js +7 -7
  261. package/fesm2015/taiga-ui-core-components-link.js +8 -8
  262. package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
  263. package/fesm2015/taiga-ui-core-components-loader.js +7 -7
  264. package/fesm2015/taiga-ui-core-components-notification.js +9 -9
  265. package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
  266. package/fesm2015/taiga-ui-core-components-primitive-calendar.js +7 -7
  267. package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +7 -7
  268. package/fesm2015/taiga-ui-core-components-primitive-spin-button.js +7 -7
  269. package/fesm2015/taiga-ui-core-components-primitive-textfield.js +17 -17
  270. package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  271. package/fesm2015/taiga-ui-core-components-primitive-year-picker.js +7 -7
  272. package/fesm2015/taiga-ui-core-components-root.js +7 -7
  273. package/fesm2015/taiga-ui-core-components-scroll-controls.js +13 -13
  274. package/fesm2015/taiga-ui-core-components-scrollbar.js +13 -13
  275. package/fesm2015/taiga-ui-core-components-svg.js +103 -26
  276. package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
  277. package/fesm2015/taiga-ui-core-components-theme-night.js +7 -7
  278. package/fesm2015/taiga-ui-core-components-tooltip.js +36 -19
  279. package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
  280. package/fesm2015/taiga-ui-core-directives-dropdown.js +76 -59
  281. package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
  282. package/fesm2015/taiga-ui-core-directives-hint.js +61 -58
  283. package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
  284. package/fesm2015/taiga-ui-core-directives-mask-accessor.js +7 -7
  285. package/fesm2015/taiga-ui-core-directives-mode.js +7 -7
  286. package/fesm2015/taiga-ui-core-directives-scroll-into-view.js +7 -7
  287. package/fesm2015/taiga-ui-core-directives-textfield-controller.js +31 -31
  288. package/fesm2015/taiga-ui-core-directives-wrapper.js +7 -7
  289. package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js +7 -7
  290. package/fesm2015/taiga-ui-core-internal-svg-defs-host.js +7 -7
  291. package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js +7 -7
  292. package/fesm2015/taiga-ui-core-pipes-format-date.js +7 -7
  293. package/fesm2015/taiga-ui-core-pipes-format-number.js +7 -7
  294. package/fesm2015/taiga-ui-core-pipes-format-phone.js +7 -7
  295. package/fesm2015/taiga-ui-core-pipes-month.js +7 -7
  296. package/fesm2015/taiga-ui-core-pipes-order-week-days.js +7 -7
  297. package/fesm2015/taiga-ui-core-services.js +18 -18
  298. package/fesm2015/taiga-ui-core-tokens.js +38 -2
  299. package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
  300. package/interfaces/dialog-options.d.ts +4 -3
  301. package/package.json +4 -4
  302. package/styles/mixins/textfield.less +4 -22
  303. package/styles/mixins/textfield.scss +3 -22
  304. package/styles/theme/wrapper/icon.less +17 -27
  305. package/tokens/icon-place.d.ts +3 -0
  306. package/tokens/icons-path.d.ts +3 -0
  307. package/tokens/index.d.ts +1 -0
  308. package/tokens/svg-content-processor.d.ts +3 -0
  309. package/tokens/svg-src-processor.d.ts +3 -0
  310. package/tokens/viewport.d.ts +4 -0
  311. package/components/dialog/dialog.providers.d.ts +0 -5
  312. package/esm2015/components/dialog/dialog.providers.js +0 -51
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/core/animations'), require('@taiga-ui/core/tokens'), require('@tinkoff/ng-polymorpheus'), require('@angular/common'), require('@ng-web-apis/common'), require('@taiga-ui/core/utils/dom'), require('rxjs'), require('rxjs/operators'), require('@taiga-ui/core/components/button')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/core/components/dialog', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core/animations', '@taiga-ui/core/tokens', '@tinkoff/ng-polymorpheus', '@angular/common', '@ng-web-apis/common', '@taiga-ui/core/utils/dom', 'rxjs', 'rxjs/operators', '@taiga-ui/core/components/button'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].core = global["taiga-ui"].core || {}, global["taiga-ui"].core.components = global["taiga-ui"].core.components || {}, global["taiga-ui"].core.components.dialog = {}), global.ng.core, global.i4, global["taiga-ui"].core.animations, global["taiga-ui"].core.tokens, global.i3, global.ng.common, global.common, global["taiga-ui"].core.utils.dom, global.rxjs, global.rxjs.operators, global["taiga-ui"].core.components.button));
5
- })(this, (function (exports, i0, i4, animations, tokens, i3, i2, common, dom, i5, operators, i1) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/core/animations'), require('@taiga-ui/core/tokens'), require('@tinkoff/ng-polymorpheus'), require('rxjs'), require('rxjs/operators'), require('@angular/common'), require('@ng-web-apis/common'), require('@taiga-ui/core/utils'), require('@taiga-ui/core/components/button')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/core/components/dialog', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core/animations', '@taiga-ui/core/tokens', '@tinkoff/ng-polymorpheus', 'rxjs', 'rxjs/operators', '@angular/common', '@ng-web-apis/common', '@taiga-ui/core/utils', '@taiga-ui/core/components/button'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].core = global["taiga-ui"].core || {}, global["taiga-ui"].core.components = global["taiga-ui"].core.components || {}, global["taiga-ui"].core.components.dialog = {}), global.ng.core, global.i4, global["taiga-ui"].core.animations, global["taiga-ui"].core.tokens, global.i3, global.rxjs, global.rxjs.operators, global.ng.common, global.common, global["taiga-ui"].core.utils, global["taiga-ui"].core.components.button));
5
+ })(this, (function (exports, i0, i4, animations, tokens, i3, i5, operators, i2, common, utils, i1) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -25,160 +25,32 @@
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
26
  var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
27
27
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
28
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
29
28
  var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
29
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
30
30
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
31
31
 
32
+ var TUI_DIALOG_DEFAULT_OPTIONS = {
33
+ size: "m",
34
+ required: false,
35
+ closeable: true,
36
+ dismissible: true,
37
+ label: "",
38
+ header: "",
39
+ };
32
40
  var TUI_DIALOGS_CLOSE = new i0.InjectionToken("[TUI_DIALOGS_CLOSE]: A stream to close dialogs", {
33
41
  factory: function () { return i5.EMPTY; },
34
42
  });
35
- var SCROLLBAR_PLACEHOLDER = 17;
36
- var TUI_DIALOG_CLOSE_STREAM = new i0.InjectionToken("[TUI_DIALOG_CLOSE_STREAM]: Dialogs closing stream");
37
- var TUI_DIALOG_PROVIDERS = [
38
- i4.TuiDestroyService,
39
- {
40
- provide: TUI_DIALOG_CLOSE_STREAM,
41
- deps: [
42
- i2.DOCUMENT,
43
- common.WINDOW,
44
- i0.ElementRef,
45
- TUI_DIALOGS_CLOSE,
46
- i4.TuiDestroyService,
47
- i3.POLYMORPHEUS_CONTEXT,
48
- ],
49
- useFactory: function (documentRef, windowRef, _a, close$, destroy$, _b) {
50
- var nativeElement = _a.nativeElement;
51
- var dismissible = _b.dismissible;
52
- return dismissible
53
- ? i5.merge(i4.tuiTypedFromEvent(nativeElement, "click").pipe(operators.filter(i4.tuiIsCurrentTarget)), i4.tuiTypedFromEvent(documentRef, "keydown").pipe(operators.filter(function (event) {
54
- var key = event.key;
55
- var target = i4.tuiGetActualTarget(event);
56
- return (key === "Escape" &&
57
- i4.tuiIsElement(target) &&
58
- (!i4.tuiContainsOrAfter(nativeElement, target) ||
59
- nativeElement.contains(target)));
60
- })), i4.tuiTypedFromEvent(documentRef, "mousedown").pipe(operators.filter(function (event) {
61
- var target = i4.tuiGetActualTarget(event);
62
- var clientX = event.clientX;
63
- return (i4.tuiIsElement(target) &&
64
- dom.tuiGetViewportWidth(windowRef) - clientX >
65
- SCROLLBAR_PLACEHOLDER &&
66
- !i4.tuiContainsOrAfter(nativeElement, target));
67
- }), operators.switchMap(function () { return i4.tuiTypedFromEvent(documentRef, "mouseup").pipe(operators.take(1), operators.filter(function (event) {
68
- var target = i4.tuiGetActualTarget(event);
69
- return (i4.tuiIsElement(target) &&
70
- !i4.tuiContainsOrAfter(nativeElement, target));
71
- })); })), close$).pipe(operators.takeUntil(destroy$))
72
- : close$;
73
- },
74
- },
75
- ];
76
-
77
- var REQUIRED_ERROR = new Error('Required dialog was dismissed');
78
- var TuiDialogComponent = /** @class */ (function () {
79
- function TuiDialogComponent(duration, isMobile, context, close$, closeWord$) {
80
- var _this = this;
81
- this.duration = duration;
82
- this.isMobile = isMobile;
83
- this.context = context;
84
- this.closeWord$ = closeWord$;
85
- this.animation = {
86
- value: '',
87
- params: {
88
- start: '40px',
89
- duration: this.duration,
90
- },
91
- };
92
- this.fullscreenAnimation = {
93
- value: '',
94
- params: {
95
- start: '100vh',
96
- duration: this.duration,
97
- },
98
- };
99
- close$.subscribe(function () {
100
- _this.close();
101
- });
102
- }
103
- Object.defineProperty(TuiDialogComponent.prototype, "size", {
104
- get: function () {
105
- return this.context.size;
106
- },
107
- enumerable: false,
108
- configurable: true
109
- });
110
- Object.defineProperty(TuiDialogComponent.prototype, "header", {
111
- get: function () {
112
- return this.context.header;
113
- },
114
- enumerable: false,
115
- configurable: true
116
- });
117
- Object.defineProperty(TuiDialogComponent.prototype, "slideInTop", {
118
- get: function () {
119
- return this.size === 'fullscreen' || this.size === 'page' || this.isMobile
120
- ? this.fullscreenAnimation
121
- : this.animation;
122
- },
123
- enumerable: false,
124
- configurable: true
125
- });
126
- TuiDialogComponent.prototype.close = function () {
127
- if (this.context.required) {
128
- this.context.$implicit.error(REQUIRED_ERROR);
129
- }
130
- else {
131
- this.context.$implicit.complete();
132
- }
43
+ var TUI_DIALOG_OPTIONS = new i0.InjectionToken("[TUI_DIALOG_OPTIONS]: Default parameters for dialog component", {
44
+ factory: function () { return TUI_DIALOG_DEFAULT_OPTIONS; },
45
+ });
46
+ function tuiDialogOptionsProvider(options) {
47
+ return {
48
+ provide: TUI_DIALOG_OPTIONS,
49
+ useValue: Object.assign(Object.assign({}, TUI_DIALOG_DEFAULT_OPTIONS), options),
133
50
  };
134
- return TuiDialogComponent;
135
- }());
136
- TuiDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDialogComponent, deps: [{ token: tokens.TUI_ANIMATIONS_DURATION }, { token: i4.TUI_IS_MOBILE }, { token: i3.POLYMORPHEUS_CONTEXT }, { token: TUI_DIALOG_CLOSE_STREAM }, { token: tokens.TUI_CLOSE_WORD }], target: i0__namespace.ɵɵFactoryTarget.Component });
137
- TuiDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDialogComponent, selector: "tui-dialog", host: { properties: { "attr.data-size": "this.size", "class._centered": "this.header", "@tuiSlideInTop": "this.slideInTop", "@tuiFadeIn": "this.slideInTop" } }, providers: TUI_DIALOG_PROVIDERS, ngImport: i0__namespace, template: "<header\n *ngIf=\"header\"\n class=\"t-header\"\n>\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n</header>\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(context.content) as text; context: context\">\n {{ text }}\n <div class=\"t-buttons\">\n <button\n type=\"button\"\n tuiButton\n size=\"m\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ $any(context.data)?.button || 'OK' }}\n </button>\n </div>\n </ng-container>\n </section>\n</div>\n<div\n *ngIf=\"context.closeable\"\n class=\"t-wrapper\"\n>\n <button\n type=\"button\"\n tuiIconButton\n tuiPreventDefault=\"mousedown\"\n automation-id=\"tui-dialog__close\"\n size=\"s\"\n appearance=\"\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close()\"\n ></button>\n</div>\n", styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);flex-direction:column;box-sizing:border-box;margin:auto;border-radius:1rem;border:2.5rem solid transparent}:host:after{position:absolute;top:0;left:0;width:100%;height:100%;box-shadow:0 1.125rem 1.875rem rgba(0,0,0,.48);content:\"\";border-radius:inherit;pointer-events:none}:host[data-size=auto]{width:auto}:host[data-size=s]{width:30rem}:host[data-size=s] .t-content{padding:1.5rem}:host[data-size=s] .t-heading{margin-bottom:.5rem;font:var(--tui-font-heading-5)}:host[data-size=m]{width:42.5rem}:host[data-size=m] .t-heading{margin-bottom:.75rem;font:var(--tui-font-heading-4)}:host[data-size=l]{width:55rem}:host[data-size=l] .t-heading{margin-bottom:1rem}:host[data-size=fullscreen],:host[data-size=page]{width:100%;min-height:100%;border-radius:0;border:none;background:var(--tui-elevation-01);box-shadow:0 4rem var(--tui-elevation-01)}:host[data-size=fullscreen] .t-content,:host[data-size=page] .t-content{padding:3rem calc(50vw - (45rem / 2))}:host[data-size=fullscreen] .t-heading,:host[data-size=page] .t-heading{margin-bottom:1rem}:host[data-size=page] .t-content{padding:0}:host._centered{text-align:center}:host :host-context(tui-root._mobile)[data-size]{min-width:100%;width:100%;max-width:100%;border-radius:0;border:none;margin:auto 0 0}:host :host-context(tui-root._mobile)[data-size] .t-content{padding:1.5rem}:host :host-context(tui-root._mobile)[data-size] .t-heading{margin-bottom:.5rem;font:var(--tui-font-heading-5)}.t-heading{margin:0;word-wrap:break-word;font:var(--tui-font-heading-3)}.t-heading:empty{display:none}.t-header{display:flex;border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden}:host[data-size=fullscreen] :host-context(tui-root._mobile) .t-header{flex:1}.t-content{border-radius:inherit;padding:2rem;background:var(--tui-base-01)}.t-content:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.t-wrapper{position:-webkit-sticky;position:sticky;top:0;order:-1}.t-close{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:fixed;top:1.5rem;right:1.5rem;color:var(--tui-base-01);background:rgba(104,104,104,.96)}.t-close:hover{background:rgba(159,159,159,.86)}:host:not([data-size=\"fullscreen\"]) .t-close{animation:tuiFadeIn var(--tui-duration)}:host:not([data-size=\"fullscreen\"]).ng-animating .t-close{display:none}:host-context(tui-root._mobile) .t-close{position:absolute;top:0;right:0;background:transparent;color:var(--tui-base-06)}:host-context(tui-root._mobile) .t-close:hover{color:var(--tui-base-07)}.t-buttons{margin-top:1.25rem;text-align:right}\n"], components: [{ type: i1__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4__namespace.TuiPreventDefaultDirective, selector: "[tuiPreventDefault]", inputs: ["tuiPreventDefault"] }], pipes: { "async": i2__namespace.AsyncPipe }, animations: [animations.tuiSlideInTop, animations.tuiFadeIn], changeDetection: i0__namespace.ChangeDetectionStrategy.Default });
138
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDialogComponent, decorators: [{
139
- type: i0.Component,
140
- args: [{
141
- selector: 'tui-dialog',
142
- templateUrl: './dialog.template.html',
143
- styleUrls: ['./dialog.style.less'],
144
- // So we don't force OnPush on dialog content
145
- // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
146
- changeDetection: i0.ChangeDetectionStrategy.Default,
147
- providers: TUI_DIALOG_PROVIDERS,
148
- animations: [animations.tuiSlideInTop, animations.tuiFadeIn],
149
- }]
150
- }], ctorParameters: function () {
151
- return [{ type: undefined, decorators: [{
152
- type: i0.Inject,
153
- args: [tokens.TUI_ANIMATIONS_DURATION]
154
- }] }, { type: undefined, decorators: [{
155
- type: i0.Inject,
156
- args: [i4.TUI_IS_MOBILE]
157
- }] }, { type: undefined, decorators: [{
158
- type: i0.Inject,
159
- args: [i3.POLYMORPHEUS_CONTEXT]
160
- }] }, { type: i5__namespace.Observable, decorators: [{
161
- type: i0.Inject,
162
- args: [TUI_DIALOG_CLOSE_STREAM]
163
- }] }, { type: i5__namespace.Observable, decorators: [{
164
- type: i0.Inject,
165
- args: [tokens.TUI_CLOSE_WORD]
166
- }] }];
167
- }, propDecorators: { size: [{
168
- type: i0.HostBinding,
169
- args: ['attr.data-size']
170
- }], header: [{
171
- type: i0.HostBinding,
172
- args: ['class._centered']
173
- }], slideInTop: [{
174
- type: i0.HostBinding,
175
- args: ['@tuiSlideInTop']
176
- }, {
177
- type: i0.HostBinding,
178
- args: ['@tuiFadeIn']
179
- }] } });
51
+ }
180
52
 
181
- /******************************************************************************
53
+ /*! *****************************************************************************
182
54
  Copyright (c) Microsoft Corporation.
183
55
 
184
56
  Permission to use, copy, modify, and/or distribute this software for any
@@ -276,7 +148,7 @@
276
148
  function step(op) {
277
149
  if (f)
278
150
  throw new TypeError("Generator is already executing.");
279
- while (g && (g = 0, op[0] && (_ = 0)), _)
151
+ while (_)
280
152
  try {
281
153
  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)
282
154
  return t;
@@ -340,11 +212,7 @@
340
212
  var __createBinding = Object.create ? (function (o, m, k, k2) {
341
213
  if (k2 === undefined)
342
214
  k2 = k;
343
- var desc = Object.getOwnPropertyDescriptor(m, k);
344
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
345
- desc = { enumerable: true, get: function () { return m[k]; } };
346
- }
347
- Object.defineProperty(o, k2, desc);
215
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
348
216
  }) : (function (o, m, k, k2) {
349
217
  if (k2 === undefined)
350
218
  k2 = k;
@@ -417,7 +285,7 @@
417
285
  ar[i] = from[i];
418
286
  }
419
287
  }
420
- return to.concat(ar || Array.prototype.slice.call(from));
288
+ return to.concat(ar || from);
421
289
  }
422
290
  function __await(v) {
423
291
  return this instanceof __await ? (this.v = v, this) : new __await(v);
@@ -499,29 +367,175 @@
499
367
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
500
368
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
501
369
  }
502
- function __classPrivateFieldIn(state, receiver) {
503
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
504
- throw new TypeError("Cannot use 'in' operator on non-object");
505
- return typeof state === "function" ? receiver === state : state.has(receiver);
506
- }
507
370
 
508
- var TUI_DIALOG_DEFAULT_OPTIONS = {
509
- size: "m",
510
- required: false,
511
- closeable: true,
512
- dismissible: true,
513
- label: "",
514
- header: "",
515
- };
516
- var TUI_DIALOG_OPTIONS = new i0.InjectionToken("[TUI_DIALOG_OPTIONS]: Default parameters for dialog component", {
517
- factory: function () { return TUI_DIALOG_DEFAULT_OPTIONS; },
518
- });
519
- function tuiDialogOptionsProvider(options) {
520
- return {
521
- provide: TUI_DIALOG_OPTIONS,
522
- useValue: Object.assign(Object.assign({}, TUI_DIALOG_DEFAULT_OPTIONS), options),
371
+ var SCROLLBAR_PLACEHOLDER = 17;
372
+ var TuiDialogCloseService = /** @class */ (function (_super) {
373
+ __extends(TuiDialogCloseService, _super);
374
+ function TuiDialogCloseService(windowRef, documentRef, elementRef) {
375
+ var _this = _super.call(this, function (subscriber) { return i5.merge(_this.click$, _this.esc$, _this.mousedown$).subscribe(subscriber); }) || this;
376
+ _this.windowRef = windowRef;
377
+ _this.documentRef = documentRef;
378
+ _this.elementRef = elementRef;
379
+ _this.click$ = i4.tuiTypedFromEvent(_this.element, "click").pipe(operators.filter(i4.tuiIsCurrentTarget));
380
+ _this.esc$ = i4.tuiTypedFromEvent(_this.documentRef, "keydown").pipe(operators.filter(function (event) {
381
+ var key = event.key;
382
+ var target = i4.tuiGetActualTarget(event);
383
+ return (key === "Escape" &&
384
+ i4.tuiIsElement(target) &&
385
+ (_this.element.contains(target) ||
386
+ !i4.tuiContainsOrAfter(_this.element, target)));
387
+ }));
388
+ _this.mousedown$ = i4.tuiTypedFromEvent(_this.documentRef, "mousedown").pipe(operators.filter(function (event) {
389
+ var target = i4.tuiGetActualTarget(event);
390
+ var clientX = event.clientX;
391
+ return (i4.tuiIsElement(target) &&
392
+ utils.tuiGetViewportWidth(_this.windowRef) - clientX > SCROLLBAR_PLACEHOLDER &&
393
+ !i4.tuiContainsOrAfter(_this.element, target));
394
+ }), operators.switchMap(function () { return i4.tuiTypedFromEvent(_this.documentRef, "mouseup").pipe(operators.take(1), operators.map(i4.tuiGetActualTarget), operators.filter(function (target) { return i4.tuiIsElement(target) && !i4.tuiContainsOrAfter(_this.element, target); })); }));
395
+ return _this;
396
+ }
397
+ Object.defineProperty(TuiDialogCloseService.prototype, "element", {
398
+ get: function () {
399
+ return this.elementRef.nativeElement;
400
+ },
401
+ enumerable: false,
402
+ configurable: true
403
+ });
404
+ return TuiDialogCloseService;
405
+ }(i5.Observable));
406
+ TuiDialogCloseService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDialogCloseService, deps: [{ token: common.WINDOW }, { token: i2.DOCUMENT }, { token: i0.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
407
+ TuiDialogCloseService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDialogCloseService });
408
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDialogCloseService, decorators: [{
409
+ type: i0.Injectable
410
+ }], ctorParameters: function () {
411
+ return [{ type: Window, decorators: [{
412
+ type: i0.Inject,
413
+ args: [common.WINDOW]
414
+ }] }, { type: Document, decorators: [{
415
+ type: i0.Inject,
416
+ args: [i2.DOCUMENT]
417
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
418
+ type: i0.Inject,
419
+ args: [i0.ElementRef]
420
+ }] }];
421
+ } });
422
+
423
+ var REQUIRED_ERROR = new Error('Required dialog was dismissed');
424
+ var TuiDialogComponent = /** @class */ (function () {
425
+ function TuiDialogComponent(duration, isMobile, context, destroy$, dialogClose$, close$, closeWord$) {
426
+ var _this = this;
427
+ this.duration = duration;
428
+ this.isMobile = isMobile;
429
+ this.context = context;
430
+ this.closeWord$ = closeWord$;
431
+ this.animation = {
432
+ value: '',
433
+ params: {
434
+ start: '40px',
435
+ duration: this.duration,
436
+ },
437
+ };
438
+ this.fullscreenAnimation = {
439
+ value: '',
440
+ params: {
441
+ start: '100vh',
442
+ duration: this.duration,
443
+ },
444
+ };
445
+ this.close$ = new i5.Subject();
446
+ i5.merge(i5.merge(dialogClose$, this.close$).pipe(operators.switchMap(function () { return i5.isObservable(context.closeable)
447
+ ? context.closeable
448
+ : i5.of(context.closeable); }), operators.filter(Boolean)), close$)
449
+ .pipe(operators.takeUntil(destroy$))
450
+ .subscribe(function () {
451
+ _this.close();
452
+ });
453
+ }
454
+ Object.defineProperty(TuiDialogComponent.prototype, "size", {
455
+ get: function () {
456
+ return this.context.size;
457
+ },
458
+ enumerable: false,
459
+ configurable: true
460
+ });
461
+ Object.defineProperty(TuiDialogComponent.prototype, "header", {
462
+ get: function () {
463
+ return this.context.header;
464
+ },
465
+ enumerable: false,
466
+ configurable: true
467
+ });
468
+ Object.defineProperty(TuiDialogComponent.prototype, "slideInTop", {
469
+ get: function () {
470
+ return this.size === 'fullscreen' || this.size === 'page' || this.isMobile
471
+ ? this.fullscreenAnimation
472
+ : this.animation;
473
+ },
474
+ enumerable: false,
475
+ configurable: true
476
+ });
477
+ TuiDialogComponent.prototype.close = function () {
478
+ if (this.context.required) {
479
+ this.context.$implicit.error(REQUIRED_ERROR);
480
+ }
481
+ else {
482
+ this.context.$implicit.complete();
483
+ }
523
484
  };
524
- }
485
+ return TuiDialogComponent;
486
+ }());
487
+ TuiDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDialogComponent, deps: [{ token: tokens.TUI_ANIMATIONS_DURATION }, { token: i4.TUI_IS_MOBILE }, { token: i3.POLYMORPHEUS_CONTEXT }, { token: i4.TuiDestroyService, self: true }, { token: TuiDialogCloseService }, { token: TUI_DIALOGS_CLOSE }, { token: tokens.TUI_CLOSE_WORD }], target: i0__namespace.ɵɵFactoryTarget.Component });
488
+ TuiDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDialogComponent, selector: "tui-dialog", host: { properties: { "attr.data-size": "this.size", "class._centered": "this.header", "@tuiSlideInTop": "this.slideInTop", "@tuiFadeIn": "this.slideInTop" } }, providers: [i4.TuiDestroyService, TuiDialogCloseService], ngImport: i0__namespace, template: "<header\n *ngIf=\"header\"\n class=\"t-header\"\n>\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n</header>\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(context.content) as text; context: context\">\n {{ text }}\n <div class=\"t-buttons\">\n <button\n type=\"button\"\n tuiButton\n size=\"m\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ $any(context.data)?.button || 'OK' }}\n </button>\n </div>\n </ng-container>\n </section>\n</div>\n<div\n *ngIf=\"context.closeable\"\n class=\"t-wrapper\"\n>\n <button\n type=\"button\"\n tuiIconButton\n tuiPreventDefault=\"mousedown\"\n automation-id=\"tui-dialog__close\"\n size=\"s\"\n appearance=\"\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close$.next()\"\n ></button>\n</div>\n", styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);flex-direction:column;box-sizing:border-box;margin:auto;border-radius:1rem;border:2.5rem solid transparent}:host:after{position:absolute;top:0;left:0;width:100%;height:100%;box-shadow:0 1.125rem 1.875rem rgba(0,0,0,.48);content:\"\";border-radius:inherit;pointer-events:none}:host[data-size=auto]{width:auto}:host[data-size=s]{width:30rem}:host[data-size=s] .t-content{padding:1.5rem}:host[data-size=s] .t-heading{margin-bottom:.5rem;font:var(--tui-font-heading-5)}:host[data-size=m]{width:42.5rem}:host[data-size=m] .t-heading{margin-bottom:.75rem;font:var(--tui-font-heading-4)}:host[data-size=l]{width:55rem}:host[data-size=l] .t-heading{margin-bottom:1rem}:host[data-size=fullscreen],:host[data-size=page]{width:100%;min-height:100%;border-radius:0;border:none;background:var(--tui-elevation-01);box-shadow:0 4rem var(--tui-elevation-01)}:host[data-size=fullscreen] .t-content,:host[data-size=page] .t-content{padding:3rem calc(50vw - (45rem / 2))}:host[data-size=fullscreen] .t-heading,:host[data-size=page] .t-heading{margin-bottom:1rem}:host[data-size=page] .t-content{padding:0}:host._centered{text-align:center}:host :host-context(tui-root._mobile)[data-size]{min-width:100%;width:100%;max-width:100%;border-radius:0;border:none;margin:auto 0 0}:host :host-context(tui-root._mobile)[data-size] .t-content{padding:1.5rem}:host :host-context(tui-root._mobile)[data-size] .t-heading{margin-bottom:.5rem;font:var(--tui-font-heading-5)}.t-heading{margin:0;word-wrap:break-word;font:var(--tui-font-heading-3)}.t-heading:empty{display:none}.t-header{display:flex;border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden}:host[data-size=fullscreen] :host-context(tui-root._mobile) .t-header{flex:1}.t-content{border-radius:inherit;padding:2rem;background:var(--tui-base-01)}.t-content:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.t-wrapper{position:-webkit-sticky;position:sticky;top:0;order:-1}.t-close{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:fixed;top:1.5rem;right:1.5rem;color:var(--tui-base-01);background:rgba(104,104,104,.96)}.t-close:hover{background:rgba(159,159,159,.86)}:host:not([data-size=\"fullscreen\"]) .t-close{animation:tuiFadeIn var(--tui-duration)}:host:not([data-size=\"fullscreen\"]).ng-animating .t-close{display:none}:host-context(tui-root._mobile) .t-close{position:absolute;top:0;right:0;background:transparent;color:var(--tui-base-06)}:host-context(tui-root._mobile) .t-close:hover{color:var(--tui-base-07)}.t-buttons{margin-top:1.25rem;text-align:right}\n"], components: [{ type: i1__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4__namespace.TuiPreventDefaultDirective, selector: "[tuiPreventDefault]", inputs: ["tuiPreventDefault"] }], pipes: { "async": i2__namespace.AsyncPipe }, animations: [animations.tuiSlideInTop, animations.tuiFadeIn], changeDetection: i0__namespace.ChangeDetectionStrategy.Default });
489
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDialogComponent, decorators: [{
490
+ type: i0.Component,
491
+ args: [{
492
+ selector: 'tui-dialog',
493
+ templateUrl: './dialog.template.html',
494
+ styleUrls: ['./dialog.style.less'],
495
+ // So we don't force OnPush on dialog content
496
+ // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
497
+ changeDetection: i0.ChangeDetectionStrategy.Default,
498
+ providers: [i4.TuiDestroyService, TuiDialogCloseService],
499
+ animations: [animations.tuiSlideInTop, animations.tuiFadeIn],
500
+ }]
501
+ }], ctorParameters: function () {
502
+ return [{ type: undefined, decorators: [{
503
+ type: i0.Inject,
504
+ args: [tokens.TUI_ANIMATIONS_DURATION]
505
+ }] }, { type: undefined, decorators: [{
506
+ type: i0.Inject,
507
+ args: [i4.TUI_IS_MOBILE]
508
+ }] }, { type: undefined, decorators: [{
509
+ type: i0.Inject,
510
+ args: [i3.POLYMORPHEUS_CONTEXT]
511
+ }] }, { type: i5__namespace.Observable, decorators: [{
512
+ type: i0.Inject,
513
+ args: [i4.TuiDestroyService]
514
+ }, {
515
+ type: i0.Self
516
+ }] }, { type: i5__namespace.Observable, decorators: [{
517
+ type: i0.Inject,
518
+ args: [TuiDialogCloseService]
519
+ }] }, { type: i5__namespace.Observable, decorators: [{
520
+ type: i0.Inject,
521
+ args: [TUI_DIALOGS_CLOSE]
522
+ }] }, { type: i5__namespace.Observable, decorators: [{
523
+ type: i0.Inject,
524
+ args: [tokens.TUI_CLOSE_WORD]
525
+ }] }];
526
+ }, propDecorators: { size: [{
527
+ type: i0.HostBinding,
528
+ args: ['attr.data-size']
529
+ }], header: [{
530
+ type: i0.HostBinding,
531
+ args: ['class._centered']
532
+ }], slideInTop: [{
533
+ type: i0.HostBinding,
534
+ args: ['@tuiSlideInTop']
535
+ }, {
536
+ type: i0.HostBinding,
537
+ args: ['@tuiFadeIn']
538
+ }] } });
525
539
 
526
540
  var DIALOG = new i3.PolymorpheusComponent(TuiDialogComponent);
527
541
  var TuiDialogService = /** @class */ (function (_super) {
@@ -534,9 +548,9 @@
534
548
  }
535
549
  return TuiDialogService;
536
550
  }(i4.AbstractTuiDialogService));
537
- TuiDialogService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDialogService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
538
- TuiDialogService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDialogService, providedIn: "root" });
539
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDialogService, decorators: [{
551
+ TuiDialogService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDialogService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
552
+ TuiDialogService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDialogService, providedIn: "root" });
553
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDialogService, decorators: [{
540
554
  type: i0.Injectable,
541
555
  args: [{
542
556
  providedIn: "root",
@@ -550,14 +564,14 @@
550
564
  }
551
565
  return TuiDialogDirective;
552
566
  }(i4.AbstractTuiDialogDirective));
553
- TuiDialogDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDialogDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
554
- TuiDialogDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiDialogDirective, selector: "ng-template[tuiDialog]", inputs: { options: ["tuiDialogOptions", "options"], open: ["tuiDialog", "open"] }, outputs: { openChange: "tuiDialogChange" }, providers: [
567
+ TuiDialogDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDialogDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
568
+ TuiDialogDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDialogDirective, selector: "ng-template[tuiDialog]", inputs: { options: ["tuiDialogOptions", "options"], open: ["tuiDialog", "open"] }, outputs: { openChange: "tuiDialogChange" }, providers: [
555
569
  {
556
570
  provide: i4.AbstractTuiDialogService,
557
571
  useExisting: TuiDialogService,
558
572
  },
559
573
  ], usesInheritance: true, ngImport: i0__namespace });
560
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDialogDirective, decorators: [{
574
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDialogDirective, decorators: [{
561
575
  type: i0.Directive,
562
576
  args: [{
563
577
  selector: 'ng-template[tuiDialog]',
@@ -577,10 +591,10 @@
577
591
  }
578
592
  return TuiDialogModule;
579
593
  }());
580
- TuiDialogModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDialogModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
581
- TuiDialogModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDialogModule, declarations: [TuiDialogComponent, TuiDialogDirective], imports: [i3.PolymorpheusModule, i1.TuiButtonModule, i2.CommonModule, i4.TuiPreventDefaultModule], exports: [TuiDialogComponent, TuiDialogDirective] });
582
- TuiDialogModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDialogModule, providers: [i4.tuiAsDialog(TuiDialogService)], imports: [[i3.PolymorpheusModule, i1.TuiButtonModule, i2.CommonModule, i4.TuiPreventDefaultModule]] });
583
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDialogModule, decorators: [{
594
+ TuiDialogModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDialogModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
595
+ TuiDialogModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDialogModule, declarations: [TuiDialogComponent, TuiDialogDirective], imports: [i3.PolymorpheusModule, i1.TuiButtonModule, i2.CommonModule, i4.TuiPreventDefaultModule], exports: [TuiDialogComponent, TuiDialogDirective] });
596
+ TuiDialogModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDialogModule, providers: [i4.tuiAsDialog(TuiDialogService)], imports: [[i3.PolymorpheusModule, i1.TuiButtonModule, i2.CommonModule, i4.TuiPreventDefaultModule]] });
597
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDialogModule, decorators: [{
584
598
  type: i0.NgModule,
585
599
  args: [{
586
600
  imports: [i3.PolymorpheusModule, i1.TuiButtonModule, i2.CommonModule, i4.TuiPreventDefaultModule],
@@ -595,10 +609,9 @@
595
609
  */
596
610
 
597
611
  exports.TUI_DIALOGS_CLOSE = TUI_DIALOGS_CLOSE;
598
- exports.TUI_DIALOG_CLOSE_STREAM = TUI_DIALOG_CLOSE_STREAM;
599
612
  exports.TUI_DIALOG_DEFAULT_OPTIONS = TUI_DIALOG_DEFAULT_OPTIONS;
600
613
  exports.TUI_DIALOG_OPTIONS = TUI_DIALOG_OPTIONS;
601
- exports.TUI_DIALOG_PROVIDERS = TUI_DIALOG_PROVIDERS;
614
+ exports.TuiDialogCloseService = TuiDialogCloseService;
602
615
  exports.TuiDialogComponent = TuiDialogComponent;
603
616
  exports.TuiDialogDirective = TuiDialogDirective;
604
617
  exports.TuiDialogModule = TuiDialogModule;