@taiga-ui/core 4.52.0-canary.6043e8f → 4.52.0-canary.61fea47

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 (289) hide show
  1. package/README.md +1 -1
  2. package/classes/accessors.d.ts +1 -1
  3. package/components/button/button.directive.d.ts +2 -2
  4. package/components/calendar/calendar-sheet.options.d.ts +1 -3
  5. package/{pipes/calendar-sheet → components/calendar}/calendar-sheet.pipe.d.ts +1 -1
  6. package/components/calendar/calendar-spin.component.d.ts +1 -0
  7. package/components/calendar/calendar-year.component.d.ts +1 -1
  8. package/components/calendar/index.d.ts +2 -0
  9. package/components/cell/cell.directive.d.ts +9 -0
  10. package/components/cell/cell.options.d.ts +6 -0
  11. package/components/cell/index.d.ts +2 -0
  12. package/components/data-list/data-list.component.d.ts +8 -12
  13. package/components/data-list/data-list.d.ts +2 -4
  14. package/components/data-list/data-list.tokens.d.ts +1 -5
  15. package/components/data-list/index.d.ts +0 -2
  16. package/components/data-list/opt-group.directive.d.ts +2 -2
  17. package/components/data-list/option/option-content.d.ts +6 -8
  18. package/components/data-list/option/option.directive.d.ts +7 -8
  19. package/components/error/error.component.d.ts +1 -1
  20. package/components/expand/expand.component.d.ts +9 -28
  21. package/components/expand/index.d.ts +0 -2
  22. package/components/index.d.ts +2 -3
  23. package/components/link/link.directive.d.ts +2 -2
  24. package/components/link/link.options.d.ts +1 -3
  25. package/components/loader/loader.component.d.ts +7 -7
  26. package/components/loader/loader.options.d.ts +1 -3
  27. package/components/notification/index.d.ts +3 -0
  28. package/components/notification/notification.component.d.ts +14 -0
  29. package/components/notification/notification.d.ts +3 -0
  30. package/components/notification/notification.directive.d.ts +7 -12
  31. package/components/notification/notification.options.d.ts +10 -7
  32. package/components/notification/notification.service.d.ts +17 -0
  33. package/components/root/root.component.d.ts +2 -3
  34. package/components/scrollbar/scroll-into-view.directive.d.ts +3 -2
  35. package/components/scrollbar/scrollbar.component.d.ts +2 -2
  36. package/components/scrollbar/scrollbar.directive.d.ts +2 -2
  37. package/components/spin-button/spin-button.component.d.ts +8 -9
  38. package/components/textfield/index.d.ts +1 -3
  39. package/components/textfield/textfield-multi/textfield-item.component.d.ts +3 -2
  40. package/components/textfield/textfield-multi/textfield-multi.component.d.ts +9 -14
  41. package/components/textfield/textfield.component.d.ts +23 -37
  42. package/components/textfield/textfield.d.ts +2 -3
  43. package/components/textfield/textfield.directive.d.ts +13 -20
  44. package/components/textfield/textfield.options.d.ts +8 -11
  45. package/{directives → components}/title/title.directive.d.ts +2 -3
  46. package/directives/appearance/appearance.directive.d.ts +1 -1
  47. package/directives/appearance/appearance.options.d.ts +1 -1
  48. package/directives/date-format/date-format.directive.d.ts +3 -7
  49. package/directives/group/group.directive.d.ts +7 -7
  50. package/directives/group/group.options.d.ts +1 -3
  51. package/directives/index.d.ts +0 -5
  52. package/directives/number-format/number-format.directive.d.ts +3 -7
  53. package/fesm2022/taiga-ui-core-classes.mjs +6 -8
  54. package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
  55. package/fesm2022/taiga-ui-core-components-button.mjs +11 -18
  56. package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
  57. package/fesm2022/taiga-ui-core-components-calendar.mjs +124 -26
  58. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  59. package/fesm2022/taiga-ui-core-components-cell.mjs +45 -0
  60. package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -0
  61. package/fesm2022/taiga-ui-core-components-data-list.mjs +46 -206
  62. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  63. package/fesm2022/taiga-ui-core-components-error.mjs +4 -3
  64. package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
  65. package/fesm2022/taiga-ui-core-components-expand.mjs +33 -131
  66. package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
  67. package/fesm2022/taiga-ui-core-components-icon.mjs +1 -2
  68. package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
  69. package/fesm2022/taiga-ui-core-components-label.mjs +6 -9
  70. package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
  71. package/fesm2022/taiga-ui-core-components-link.mjs +14 -23
  72. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  73. package/fesm2022/taiga-ui-core-components-loader.mjs +14 -32
  74. package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
  75. package/fesm2022/taiga-ui-core-components-notification.mjs +108 -66
  76. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  77. package/fesm2022/taiga-ui-core-components-root.mjs +6 -20
  78. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  79. package/fesm2022/taiga-ui-core-components-scrollbar.mjs +36 -45
  80. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  81. package/fesm2022/taiga-ui-core-components-spin-button.mjs +14 -27
  82. package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
  83. package/fesm2022/taiga-ui-core-components-textfield.mjs +171 -388
  84. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  85. package/fesm2022/taiga-ui-core-components-title.mjs +37 -0
  86. package/fesm2022/taiga-ui-core-components-title.mjs.map +1 -0
  87. package/fesm2022/taiga-ui-core-components.mjs +2 -3
  88. package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
  89. package/fesm2022/taiga-ui-core-directives-appearance.mjs +12 -15
  90. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  91. package/fesm2022/taiga-ui-core-directives-date-format.mjs +24 -18
  92. package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
  93. package/fesm2022/taiga-ui-core-directives-group.mjs +23 -38
  94. package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
  95. package/fesm2022/taiga-ui-core-directives-icons.mjs +8 -11
  96. package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
  97. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +3 -6
  98. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
  99. package/fesm2022/taiga-ui-core-directives-number-format.mjs +30 -18
  100. package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
  101. package/fesm2022/taiga-ui-core-directives.mjs +0 -5
  102. package/fesm2022/taiga-ui-core-directives.mjs.map +1 -1
  103. package/fesm2022/taiga-ui-core-pipes-format-number.mjs +19 -13
  104. package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
  105. package/fesm2022/taiga-ui-core-pipes.mjs +0 -7
  106. package/fesm2022/taiga-ui-core-pipes.mjs.map +1 -1
  107. package/fesm2022/taiga-ui-core-portals-alert.mjs +73 -0
  108. package/fesm2022/taiga-ui-core-portals-alert.mjs.map +1 -0
  109. package/fesm2022/taiga-ui-core-portals-dialog.mjs +158 -0
  110. package/fesm2022/taiga-ui-core-portals-dialog.mjs.map +1 -0
  111. package/fesm2022/{taiga-ui-core-directives-dropdown.mjs → taiga-ui-core-portals-dropdown.mjs} +135 -287
  112. package/fesm2022/taiga-ui-core-portals-dropdown.mjs.map +1 -0
  113. package/fesm2022/{taiga-ui-core-directives-hint.mjs → taiga-ui-core-portals-hint.mjs} +118 -218
  114. package/fesm2022/taiga-ui-core-portals-hint.mjs.map +1 -0
  115. package/fesm2022/taiga-ui-core-portals-modal.mjs +89 -0
  116. package/fesm2022/taiga-ui-core-portals-modal.mjs.map +1 -0
  117. package/fesm2022/taiga-ui-core-portals-popup.mjs +56 -0
  118. package/fesm2022/taiga-ui-core-portals-popup.mjs.map +1 -0
  119. package/fesm2022/taiga-ui-core-portals.mjs +11 -0
  120. package/fesm2022/taiga-ui-core-portals.mjs.map +1 -0
  121. package/fesm2022/taiga-ui-core-services.mjs +3 -23
  122. package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
  123. package/fesm2022/taiga-ui-core-tokens.mjs +22 -25
  124. package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
  125. package/fesm2022/taiga-ui-core-utils-format.mjs +1 -22
  126. package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
  127. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +8 -17
  128. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
  129. package/fesm2022/taiga-ui-core.mjs +1 -0
  130. package/fesm2022/taiga-ui-core.mjs.map +1 -1
  131. package/index.d.ts +1 -0
  132. package/package.json +77 -98
  133. package/pipes/format-number/format-number.pipe.d.ts +6 -4
  134. package/pipes/index.d.ts +0 -7
  135. package/portals/alert/alert.directive.d.ts +11 -0
  136. package/portals/alert/alert.service.d.ts +12 -0
  137. package/portals/alert/index.d.ts +2 -0
  138. package/portals/dialog/dialog.component.d.ts +14 -0
  139. package/portals/dialog/dialog.directive.d.ts +8 -0
  140. package/{components → portals}/dialog/dialog.factory.d.ts +1 -1
  141. package/portals/dialog/dialog.options.d.ts +25 -0
  142. package/{components/dialog/dialog-close.service.d.ts → portals/dialog/dialog.providers.d.ts} +2 -0
  143. package/portals/dialog/dialog.service.d.ts +10 -0
  144. package/portals/dialog/index.d.ts +6 -0
  145. package/portals/dropdown/dropdown-content.directive.d.ts +9 -0
  146. package/{directives → portals}/dropdown/dropdown-hover.directive.d.ts +5 -10
  147. package/{directives → portals}/dropdown/dropdown-hover.options.d.ts +1 -3
  148. package/{directives → portals}/dropdown/dropdown-manual.directive.d.ts +2 -2
  149. package/portals/dropdown/dropdown-open.directive.d.ts +30 -0
  150. package/{directives → portals}/dropdown/dropdown-position-sided.directive.d.ts +3 -3
  151. package/{directives → portals}/dropdown/dropdown-position.directive.d.ts +5 -5
  152. package/{directives → portals}/dropdown/dropdown-selection.directive.d.ts +4 -5
  153. package/{directives → portals}/dropdown/dropdown.bindings.d.ts +0 -1
  154. package/{directives → portals}/dropdown/dropdown.d.ts +2 -3
  155. package/{directives → portals}/dropdown/dropdown.directive.d.ts +6 -8
  156. package/{directives → portals}/dropdown/index.d.ts +1 -4
  157. package/{directives → portals}/hint/hint-describe.directive.d.ts +4 -6
  158. package/{directives → portals}/hint/hint-host.directive.d.ts +2 -2
  159. package/{directives → portals}/hint/hint-hover.directive.d.ts +3 -4
  160. package/{directives → portals}/hint/hint-manual.directive.d.ts +2 -2
  161. package/{directives → portals}/hint/hint-options.directive.d.ts +3 -3
  162. package/{directives → portals}/hint/hint-overflow.directive.d.ts +2 -2
  163. package/{directives → portals}/hint/hint-position.directive.d.ts +4 -5
  164. package/{directives → portals}/hint/hint-unstyled.component.d.ts +2 -7
  165. package/portals/hint/hint.component.d.ts +29 -0
  166. package/portals/hint/hint.directive.d.ts +24 -0
  167. package/{directives → portals}/hint/index.d.ts +0 -2
  168. package/portals/index.d.ts +6 -0
  169. package/portals/modal/index.d.ts +2 -0
  170. package/portals/modal/modal.component.d.ts +17 -0
  171. package/portals/modal/modal.service.d.ts +13 -0
  172. package/portals/popup/popup.directive.d.ts +12 -0
  173. package/{directives → portals}/popup/popup.service.d.ts +1 -1
  174. package/{directives → portals}/popup/popups.component.d.ts +2 -2
  175. package/services/index.d.ts +0 -1
  176. package/styles/components/link.less +1 -0
  177. package/styles/mixins/appearance.less +1 -1
  178. package/styles/mixins/mixins.less +0 -5
  179. package/styles/mixins/mixins.scss +0 -5
  180. package/styles/mixins/slider.less +21 -16
  181. package/styles/mixins/slider.scss +1 -2
  182. package/styles/theme/variables.less +2 -4
  183. package/tokens/common-icons.d.ts +1 -3
  184. package/tokens/date-format.d.ts +2 -3
  185. package/tokens/i18n.d.ts +7 -7
  186. package/tokens/icon-resolver.d.ts +0 -4
  187. package/tokens/icons.d.ts +0 -4
  188. package/tokens/number-format.d.ts +2 -3
  189. package/types/index.d.ts +0 -3
  190. package/types/size.d.ts +0 -11
  191. package/utils/format/index.d.ts +0 -1
  192. package/utils/miscellaneous/get-duration.d.ts +2 -0
  193. package/utils/miscellaneous/index.d.ts +1 -1
  194. package/components/alert/alert.component.d.ts +0 -15
  195. package/components/alert/alert.directive.d.ts +0 -7
  196. package/components/alert/alert.interfaces.d.ts +0 -12
  197. package/components/alert/alert.service.d.ts +0 -7
  198. package/components/alert/alert.tokens.d.ts +0 -12
  199. package/components/alert/alerts.component.d.ts +0 -12
  200. package/components/alert/index.d.ts +0 -6
  201. package/components/data-list/data-list.directive.d.ts +0 -7
  202. package/components/data-list/option/option-legacy.component.d.ts +0 -24
  203. package/components/dialog/active-zone-adapter.directive.d.ts +0 -11
  204. package/components/dialog/dialog.component.d.ts +0 -20
  205. package/components/dialog/dialog.directive.d.ts +0 -7
  206. package/components/dialog/dialog.interfaces.d.ts +0 -34
  207. package/components/dialog/dialog.service.d.ts +0 -7
  208. package/components/dialog/dialog.tokens.d.ts +0 -15
  209. package/components/dialog/dialogs.component.d.ts +0 -8
  210. package/components/dialog/index.d.ts +0 -8
  211. package/components/expand/expand-content.directive.d.ts +0 -8
  212. package/components/expand/expand.d.ts +0 -6
  213. package/components/fullscreen/fullscreen.component.d.ts +0 -14
  214. package/components/fullscreen/index.d.ts +0 -1
  215. package/components/textfield/select.directive.d.ts +0 -19
  216. package/components/textfield/textfield-dropdown.directive.d.ts +0 -16
  217. package/directives/dropdown/dropdown-open-legacy.directive.d.ts +0 -12
  218. package/directives/dropdown/dropdown-open.directive.d.ts +0 -33
  219. package/directives/dropdown/dropdown-portal.directive.d.ts +0 -14
  220. package/directives/dropdown/dropdown.service.d.ts +0 -6
  221. package/directives/dropdown/dropdowns.component.d.ts +0 -9
  222. package/directives/hint/hint.component.d.ts +0 -30
  223. package/directives/hint/hint.directive.d.ts +0 -26
  224. package/directives/hint/hint.service.d.ts +0 -13
  225. package/directives/hint/hints.component.d.ts +0 -12
  226. package/directives/popup/popup.directive.d.ts +0 -11
  227. package/directives/surface/index.d.ts +0 -1
  228. package/directives/surface/surface.directive.d.ts +0 -8
  229. package/fesm2022/taiga-ui-core-components-alert.mjs +0 -149
  230. package/fesm2022/taiga-ui-core-components-alert.mjs.map +0 -1
  231. package/fesm2022/taiga-ui-core-components-dialog.mjs +0 -229
  232. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +0 -1
  233. package/fesm2022/taiga-ui-core-components-fullscreen.mjs +0 -77
  234. package/fesm2022/taiga-ui-core-components-fullscreen.mjs.map +0 -1
  235. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +0 -1
  236. package/fesm2022/taiga-ui-core-directives-hint.mjs.map +0 -1
  237. package/fesm2022/taiga-ui-core-directives-popup.mjs +0 -63
  238. package/fesm2022/taiga-ui-core-directives-popup.mjs.map +0 -1
  239. package/fesm2022/taiga-ui-core-directives-surface.mjs +0 -50
  240. package/fesm2022/taiga-ui-core-directives-surface.mjs.map +0 -1
  241. package/fesm2022/taiga-ui-core-directives-title.mjs +0 -43
  242. package/fesm2022/taiga-ui-core-directives-title.mjs.map +0 -1
  243. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +0 -25
  244. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +0 -1
  245. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +0 -94
  246. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +0 -1
  247. package/fesm2022/taiga-ui-core-pipes-flag.mjs +0 -32
  248. package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +0 -1
  249. package/fesm2022/taiga-ui-core-pipes-format-date.mjs +0 -28
  250. package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +0 -1
  251. package/fesm2022/taiga-ui-core-pipes-initials.mjs +0 -29
  252. package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +0 -1
  253. package/fesm2022/taiga-ui-core-pipes-month.mjs +0 -29
  254. package/fesm2022/taiga-ui-core-pipes-month.mjs.map +0 -1
  255. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +0 -36
  256. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +0 -1
  257. package/pipes/auto-color/auto-color.pipe.d.ts +0 -7
  258. package/pipes/auto-color/index.d.ts +0 -1
  259. package/pipes/calendar-sheet/index.d.ts +0 -1
  260. package/pipes/calendar-sheet/utils.d.ts +0 -20
  261. package/pipes/flag/flag.pipe.d.ts +0 -14
  262. package/pipes/flag/index.d.ts +0 -1
  263. package/pipes/format-date/format-date.pipe.d.ts +0 -9
  264. package/pipes/format-date/index.d.ts +0 -1
  265. package/pipes/initials/index.d.ts +0 -1
  266. package/pipes/initials/initials.pipe.d.ts +0 -7
  267. package/pipes/month/index.d.ts +0 -1
  268. package/pipes/month/month.pipe.d.ts +0 -10
  269. package/pipes/order-week-days/index.d.ts +0 -1
  270. package/services/format-date.service.d.ts +0 -8
  271. package/types/portal-item.d.ts +0 -9
  272. package/types/range-state.d.ts +0 -4
  273. package/types/value-content-context.d.ts +0 -4
  274. package/utils/format/string-hash-to-hsl.d.ts +0 -6
  275. package/utils/miscellaneous/to-animation-options.d.ts +0 -4
  276. /package/{pipes/order-week-days → components/calendar}/order-week-days.pipe.d.ts +0 -0
  277. /package/{directives → components}/title/index.d.ts +0 -0
  278. /package/{directives → portals}/dropdown/dropdown-context.directive.d.ts +0 -0
  279. /package/{directives → portals}/dropdown/dropdown-limit-width.d.ts +0 -0
  280. /package/{directives → portals}/dropdown/dropdown-options.directive.d.ts +0 -0
  281. /package/{directives → portals}/dropdown/dropdown.component.d.ts +0 -0
  282. /package/{directives → portals}/dropdown/dropdown.driver.d.ts +0 -0
  283. /package/{directives → portals}/dropdown/dropdown.providers.d.ts +0 -0
  284. /package/{directives → portals}/dropdown/with-dropdown-open.directive.d.ts +0 -0
  285. /package/{directives → portals}/hint/hint-driver.directive.d.ts +0 -0
  286. /package/{directives → portals}/hint/hint-pointer.directive.d.ts +0 -0
  287. /package/{directives → portals}/hint/hint.d.ts +0 -0
  288. /package/{directives → portals}/hint/hint.providers.d.ts +0 -0
  289. /package/{directives → portals}/popup/index.d.ts +0 -0
@@ -1,229 +0,0 @@
1
- import { DOCUMENT, AsyncPipe } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { InjectionToken, inject, Injectable, computed, ChangeDetectionStrategy, Component, Directive, assertInInjectionContext, INJECTOR } from '@angular/core';
4
- import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import { TUI_TRUE_HANDLER } from '@taiga-ui/cdk/constants';
6
- import * as i1 from '@taiga-ui/cdk/directives/animated';
7
- import { TuiAnimated, TuiAnimatedParent } from '@taiga-ui/cdk/directives/animated';
8
- import { TuiAutoFocus } from '@taiga-ui/cdk/directives/auto-focus';
9
- import { TuiButton } from '@taiga-ui/core/components/button';
10
- import { TuiBreakpointService } from '@taiga-ui/core/services';
11
- import { TUI_CLOSE_WORD, TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
12
- import { injectContext, PolymorpheusOutlet, PolymorpheusComponent } from '@taiga-ui/polymorpheus';
13
- import { BehaviorSubject, EMPTY, Observable, merge, filter, switchMap, take, map, of, isObservable, Subject, exhaustMap } from 'rxjs';
14
- import { tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
15
- import { WA_WINDOW } from '@ng-web-apis/common';
16
- import { tuiCloseWatcher, tuiZonefull, tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
17
- import { tuiInjectElement, tuiGetActualTarget, tuiIsElement, tuiContainsOrAfter } from '@taiga-ui/cdk/utils/dom';
18
- import { tuiGetViewportWidth } from '@taiga-ui/core/utils';
19
- import { TuiPopoverDirective } from '@taiga-ui/cdk/directives/popover';
20
- import { TuiPopoverService, tuiAsPopover } from '@taiga-ui/cdk/services';
21
- import { TuiFocusTrap } from '@taiga-ui/cdk/directives/focus-trap';
22
- import { TuiScrollControls, TuiScrollRef } from '@taiga-ui/core/components/scrollbar';
23
- import * as i1$1 from '@taiga-ui/cdk/directives/active-zone';
24
- import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
25
- import { tuiGetFocused } from '@taiga-ui/cdk/utils/focus';
26
-
27
- const TUI_DIALOGS = new InjectionToken(ngDevMode ? 'TUI_DIALOGS' : '', {
28
- factory: () => new BehaviorSubject([]),
29
- });
30
- const TUI_DIALOG_DEFAULT_OPTIONS = {
31
- appearance: '',
32
- size: 'm',
33
- required: false,
34
- closeable: true,
35
- dismissible: true,
36
- label: '',
37
- header: '',
38
- data: undefined,
39
- };
40
- /**
41
- * A stream to close dialogs
42
- * TODO: use router.events in v5
43
- */
44
- const TUI_DIALOGS_CLOSE = new InjectionToken(ngDevMode ? 'TUI_DIALOGS_CLOSE' : '', {
45
- factory: () => EMPTY,
46
- });
47
- /**
48
- * Default parameters for dialog component
49
- */
50
- const TUI_DIALOG_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_DIALOG_OPTIONS' : '', {
51
- factory: () => TUI_DIALOG_DEFAULT_OPTIONS,
52
- });
53
- function tuiDialogOptionsProvider(options) {
54
- return tuiProvideOptions(TUI_DIALOG_OPTIONS, options, TUI_DIALOG_DEFAULT_OPTIONS);
55
- }
56
-
57
- const SCROLLBAR_PLACEHOLDER = 17;
58
- class TuiDialogCloseService extends Observable {
59
- constructor() {
60
- super((subscriber) => merge(this.esc$, this.mousedown$, tuiCloseWatcher().pipe(tuiZonefull())).subscribe(subscriber));
61
- this.win = inject(WA_WINDOW);
62
- this.doc = inject(DOCUMENT);
63
- this.el = tuiInjectElement();
64
- this.esc$ = tuiTypedFromEvent(this.doc, 'keydown').pipe(filter((event) => {
65
- const target = tuiGetActualTarget(event);
66
- return (
67
- // @ts-ignore
68
- typeof CloseWatcher === 'undefined' &&
69
- event.key?.toLowerCase() === 'escape' &&
70
- !event.defaultPrevented &&
71
- (this.el.contains(target) || this.isOutside(target)));
72
- }));
73
- this.mousedown$ = tuiTypedFromEvent(this.doc, 'mousedown').pipe(filter((event) => tuiGetViewportWidth(this.win) - event.clientX > SCROLLBAR_PLACEHOLDER &&
74
- this.isOutside(tuiGetActualTarget(event))), switchMap(() => tuiTypedFromEvent(this.doc, 'mouseup').pipe(take(1), map(tuiGetActualTarget), filter((target) => this.isOutside(target)))));
75
- }
76
- isOutside(target) {
77
- return (tuiIsElement(target) &&
78
- (!tuiContainsOrAfter(this.el, target) ||
79
- // TODO: Drop 'new' attribute in v5
80
- (target === this.el && !this.el.hasAttribute('new'))));
81
- }
82
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogCloseService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
83
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogCloseService }); }
84
- }
85
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogCloseService, decorators: [{
86
- type: Injectable
87
- }], ctorParameters: () => [] });
88
-
89
- const REQUIRED_ERROR = new Error('Required dialog was dismissed');
90
- function toObservable(valueOrStream) {
91
- return isObservable(valueOrStream) ? valueOrStream : of(valueOrStream);
92
- }
93
- class TuiDialogComponent {
94
- constructor() {
95
- this.close$ = new Subject();
96
- this.context = injectContext();
97
- this.closeWord$ = inject(TUI_CLOSE_WORD);
98
- this.icons = inject(TUI_COMMON_ICONS);
99
- this.from = computed(() => this.size === 'fullscreen' || this.size === 'page' || this.isMobile()
100
- ? 'translateY(100vh)'
101
- : 'translateY(2.5rem)');
102
- this.isMobile = toSignal(inject(TuiBreakpointService).pipe(map((breakpoint) => breakpoint === 'mobile')));
103
- merge(this.close$.pipe(switchMap(() => toObservable(this.context.closeable))), inject(TuiDialogCloseService).pipe(exhaustMap(() => toObservable(this.context.dismissible).pipe(take(1)))), inject(TUI_DIALOGS_CLOSE).pipe(map(TUI_TRUE_HANDLER)))
104
- .pipe(filter(Boolean), takeUntilDestroyed())
105
- .subscribe(() => {
106
- this.close();
107
- });
108
- }
109
- get size() {
110
- return this.context.size;
111
- }
112
- get header() {
113
- return this.context.header;
114
- }
115
- close() {
116
- if (this.context.required) {
117
- this.context.$implicit.error(REQUIRED_ERROR);
118
- }
119
- else {
120
- this.context.$implicit.complete();
121
- }
122
- }
123
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
124
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDialogComponent, isStandalone: true, selector: "tui-dialog", host: { properties: { "attr.data-appearance": "context.appearance", "attr.data-size": "size", "class._centered": "header", "style.--tui-from": "from()" } }, providers: [TuiDialogCloseService], hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "@if (header) {\n <header class=\"t-header\">\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n </header>\n}\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [class.t-heading_closable]=\"context.closeable && !header\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closeable || context.dismissible) {\n <div class=\"t-buttons\">\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data?.button || 'OK' }}\n </button>\n </div>\n }\n </ng-container>\n </section>\n</div>\n<div class=\"t-filler\"></div>\n\n<!-- Close button is insensitive to `context.closeable === Observable<false>` by design -->\n@if (context.closeable) {\n <button\n automation-id=\"tui-dialog__close\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"isMobile() ? 'icon' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [size]=\"isMobile() ? 'xs' : 's'\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ closeWord$ | async }}\n </button>\n}\n", styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);flex-direction:column;box-sizing:border-box;margin:auto;border-radius:1.5rem;border:2.5rem solid transparent}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";border-radius:inherit;pointer-events:none;box-shadow:var(--tui-shadow-popup)}:host[data-size=auto]{inline-size:auto}:host[data-size=s]{inline-size:30rem}:host[data-size=s] .t-content{padding:1.5rem}:host[data-size=s] .t-heading{font:var(--tui-font-heading-5)}:host[data-size=m]{inline-size:42.5rem}:host[data-size=l]{inline-size:55rem}:host[data-size=fullscreen],:host[data-size=page]{min-inline-size:100vw;min-block-size:100%;border-radius:0;border:none;background:var(--tui-background-elevation-1);box-shadow:0 4rem var(--tui-background-elevation-1)}:host[data-size=fullscreen] .t-content,:host[data-size=page] .t-content{padding:3rem calc(50vw - 22.5rem)}:host[data-size=fullscreen] .t-heading,:host[data-size=page] .t-heading{font:var(--tui-font-heading-3)}:host._centered{text-align:center}:host :host-context(tui-root._mobile)[data-size]{min-inline-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0;border:none;margin:auto 0 0;background:var(--tui-background-elevation-1);padding-block-end:env(safe-area-inset-bottom)}:host :host-context(tui-root._mobile)[data-size] .t-content{padding:1rem}:host :host-context(tui-root._mobile)[data-size] .t-heading{font:var(--tui-font-heading-5)}:host :host-context(tui-root._mobile)[data-size=fullscreen],:host :host-context(tui-root._mobile)[data-size=page]{padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}:host :host-context(tui-root._mobile)[data-size=fullscreen] .t-close,:host :host-context(tui-root._mobile)[data-size=page] .t-close{top:max(1rem,env(safe-area-inset-top))}:host[data-size=page] .t-content,:host-context(tui-root._mobile) :host[data-size=page] .t-content{padding:0}.t-heading{margin:0 0 .5rem;overflow-wrap:break-word;font:var(--tui-font-heading-4)}.t-heading_closable{padding-inline-end:2rem}.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:1.75rem;background:var(--tui-background-elevation-1)}.t-content:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.t-content>section{border-radius:inherit}.t-filler{flex-grow:1}.t-close{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:1rem;right:1rem}@supports (inset-inline-end: 0){.t-close{right:unset;inset-inline-end:1rem}}.t-buttons{margin-block-start:1.25rem;text-align:end}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
125
- }
126
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogComponent, decorators: [{
127
- type: Component,
128
- args: [{ selector: 'tui-dialog', imports: [AsyncPipe, PolymorpheusOutlet, TuiAutoFocus, TuiButton], changeDetection: ChangeDetectionStrategy.Default, providers: [TuiDialogCloseService], hostDirectives: [TuiAnimated], host: {
129
- '[attr.data-appearance]': 'context.appearance',
130
- '[attr.data-size]': 'size',
131
- '[class._centered]': 'header',
132
- '[style.--tui-from]': 'from()',
133
- }, template: "@if (header) {\n <header class=\"t-header\">\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n </header>\n}\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [class.t-heading_closable]=\"context.closeable && !header\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closeable || context.dismissible) {\n <div class=\"t-buttons\">\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data?.button || 'OK' }}\n </button>\n </div>\n }\n </ng-container>\n </section>\n</div>\n<div class=\"t-filler\"></div>\n\n<!-- Close button is insensitive to `context.closeable === Observable<false>` by design -->\n@if (context.closeable) {\n <button\n automation-id=\"tui-dialog__close\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"isMobile() ? 'icon' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [size]=\"isMobile() ? 'xs' : 's'\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ closeWord$ | async }}\n </button>\n}\n", styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);flex-direction:column;box-sizing:border-box;margin:auto;border-radius:1.5rem;border:2.5rem solid transparent}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";border-radius:inherit;pointer-events:none;box-shadow:var(--tui-shadow-popup)}:host[data-size=auto]{inline-size:auto}:host[data-size=s]{inline-size:30rem}:host[data-size=s] .t-content{padding:1.5rem}:host[data-size=s] .t-heading{font:var(--tui-font-heading-5)}:host[data-size=m]{inline-size:42.5rem}:host[data-size=l]{inline-size:55rem}:host[data-size=fullscreen],:host[data-size=page]{min-inline-size:100vw;min-block-size:100%;border-radius:0;border:none;background:var(--tui-background-elevation-1);box-shadow:0 4rem var(--tui-background-elevation-1)}:host[data-size=fullscreen] .t-content,:host[data-size=page] .t-content{padding:3rem calc(50vw - 22.5rem)}:host[data-size=fullscreen] .t-heading,:host[data-size=page] .t-heading{font:var(--tui-font-heading-3)}:host._centered{text-align:center}:host :host-context(tui-root._mobile)[data-size]{min-inline-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0;border:none;margin:auto 0 0;background:var(--tui-background-elevation-1);padding-block-end:env(safe-area-inset-bottom)}:host :host-context(tui-root._mobile)[data-size] .t-content{padding:1rem}:host :host-context(tui-root._mobile)[data-size] .t-heading{font:var(--tui-font-heading-5)}:host :host-context(tui-root._mobile)[data-size=fullscreen],:host :host-context(tui-root._mobile)[data-size=page]{padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}:host :host-context(tui-root._mobile)[data-size=fullscreen] .t-close,:host :host-context(tui-root._mobile)[data-size=page] .t-close{top:max(1rem,env(safe-area-inset-top))}:host[data-size=page] .t-content,:host-context(tui-root._mobile) :host[data-size=page] .t-content{padding:0}.t-heading{margin:0 0 .5rem;overflow-wrap:break-word;font:var(--tui-font-heading-4)}.t-heading_closable{padding-inline-end:2rem}.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:1.75rem;background:var(--tui-background-elevation-1)}.t-content:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.t-content>section{border-radius:inherit}.t-filler{flex-grow:1}.t-close{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:1rem;right:1rem}@supports (inset-inline-end: 0){.t-close{right:unset;inset-inline-end:1rem}}.t-buttons{margin-block-start:1.25rem;text-align:end}\n"] }]
134
- }], ctorParameters: () => [] });
135
-
136
- class TuiDialogService extends TuiPopoverService {
137
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
138
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogService, providedIn: 'root', useFactory: () => new TuiDialogService(TUI_DIALOGS, TuiDialogComponent, inject(TUI_DIALOG_OPTIONS)) }); }
139
- }
140
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogService, decorators: [{
141
- type: Injectable,
142
- args: [{
143
- providedIn: 'root',
144
- useFactory: () => new TuiDialogService(TUI_DIALOGS, TuiDialogComponent, inject(TUI_DIALOG_OPTIONS)),
145
- }]
146
- }] });
147
-
148
- class TuiDialog extends TuiPopoverDirective {
149
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialog, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
150
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiDialog, isStandalone: true, selector: "ng-template[tuiDialog]", inputs: { options: ["tuiDialogOptions", "options"], open: ["tuiDialog", "open"] }, outputs: { openChange: "tuiDialogChange" }, providers: [tuiAsPopover(TuiDialogService)], usesInheritance: true, ngImport: i0 }); }
151
- }
152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialog, decorators: [{
153
- type: Directive,
154
- args: [{
155
- standalone: true,
156
- selector: 'ng-template[tuiDialog]',
157
- inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],
158
- outputs: ['openChange: tuiDialogChange'],
159
- providers: [tuiAsPopover(TuiDialogService)],
160
- }]
161
- }] });
162
-
163
- function tuiDialog(component, { injector, ...options } = {}) {
164
- if (!injector) {
165
- assertInInjectionContext(tuiDialog);
166
- injector = inject(INJECTOR);
167
- }
168
- const dialogService = injector.get(TuiDialogService);
169
- return (data) => dialogService.open(new PolymorpheusComponent(component, injector), {
170
- ...options,
171
- data,
172
- });
173
- }
174
-
175
- class TuiActiveZoneAdapter {
176
- constructor() {
177
- this.current = inject(TuiActiveZone);
178
- this.parent = findActive(inject(TuiActiveZone, { skipSelf: true }), tuiGetFocused(inject(DOCUMENT)));
179
- }
180
- ngOnInit() {
181
- this.current.tuiActiveZoneParentSetter = this.parent;
182
- }
183
- ngOnDestroy() {
184
- this.current.tuiActiveZoneParentSetter = null;
185
- }
186
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiActiveZoneAdapter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
187
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiActiveZoneAdapter, isStandalone: true, selector: "[tuiActiveZoneAdapter]", hostDirectives: [{ directive: i1$1.TuiActiveZone }], ngImport: i0 }); }
188
- }
189
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiActiveZoneAdapter, decorators: [{
190
- type: Directive,
191
- args: [{
192
- standalone: true,
193
- selector: '[tuiActiveZoneAdapter]',
194
- hostDirectives: [TuiActiveZone],
195
- }]
196
- }] });
197
- function findActive(zone, element) {
198
- if (!element || !zone.contains(element)) {
199
- return null;
200
- }
201
- const active = zone.children.find((child) => child.contains(element));
202
- return active ? findActive(active, element) : zone;
203
- }
204
-
205
- class TuiDialogs {
206
- constructor() {
207
- this.dialogs = toSignal(inject(TUI_DIALOGS), { initialValue: [] });
208
- }
209
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogs, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
210
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDialogs, isStandalone: true, selector: "tui-dialogs", ngImport: i0, template: "<div\n class=\"t-overlay\"\n [class.t-overlay_visible]=\"dialogs().length\"\n></div>\n<!--TODO: Rename to <article> in v5-->\n@for (item of dialogs(); track item) {\n <section\n aria-modal=\"true\"\n role=\"dialog\"\n tuiActiveZoneAdapter\n tuiAnimatedParent\n tuiFocusTrap\n tuiScrollRef\n class=\"t-dialog\"\n [attr.aria-labelledby]=\"item.id\"\n >\n <ng-container *polymorpheusOutlet=\"item.component; context: item\" />\n <tui-scroll-controls class=\"t-scrollbars\" />\n </section>\n}\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;scrollbar-width:none;-ms-overflow-style:none;pointer-events:none;overflow:hidden;overscroll-behavior:none;overflow-wrap:break-word;margin-block-start:var(--t-root-top)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:has(section){pointer-events:auto;overflow:auto}:host:has(section:only-of-type ::ng-deep tui-dialog[new][data-appearance~=fullscreen])>.t-overlay,:host:has(section:only-of-type ::ng-deep tui-notification-middle)>.t-overlay{opacity:0}:host:before{content:\"\";display:block;block-size:200%}.t-overlay,.t-dialog{transition-property:filter;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;bottom:0;right:0;display:flex;block-size:100%;align-items:flex-start;outline:none;overflow:auto}.t-overlay::-webkit-scrollbar,.t-dialog::-webkit-scrollbar,.t-overlay::-webkit-scrollbar-thumb,.t-dialog::-webkit-scrollbar-thumb{display:none}.t-dialog{position:sticky;overscroll-behavior:none;filter:brightness(.25)}.t-dialog:has(tui-dialog[new]){display:grid;place-items:center}.t-dialog ::ng-deep>.tui-enter+.t-scrollbars .t-bar_vertical,.t-dialog ::ng-deep>.tui-leave+.t-scrollbars .t-bar_vertical{display:none}.t-overlay{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;background:var(--tui-service-backdrop);-webkit-backdrop-filter:var(--tui-backdrop, none);backdrop-filter:var(--tui-backdrop, none);opacity:0;transition-timing-function:ease-in}.t-overlay_visible{opacity:1;transition-timing-function:ease-out}.t-dialog:last-child{pointer-events:auto;filter:none}:host-context(tui-root:has(tui-dropdown-mobile._sheet)) .t-dialog:last-child{filter:brightness(.5)}.t-scrollbars{position:fixed;top:0;left:0;bottom:0;right:0;margin:0;color:#747474}.t-scrollbars ::ng-deep .t-bar_horizontal,.t-scrollbars ::ng-deep .t-bar_vertical .t-thumb[style*=\"height: 100%\"]{display:none}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiActiveZoneAdapter, selector: "[tuiActiveZoneAdapter]" }, { kind: "directive", type: TuiAnimatedParent, selector: "[tuiAnimatedParent]" }, { kind: "directive", type: TuiFocusTrap, selector: "[tuiFocusTrap]" }, { kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }, { kind: "directive", type: TuiScrollRef, selector: "[tuiScrollRef]" }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
211
- }
212
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogs, decorators: [{
213
- type: Component,
214
- args: [{ selector: 'tui-dialogs', imports: [
215
- PolymorpheusOutlet,
216
- TuiActiveZoneAdapter,
217
- TuiAnimatedParent,
218
- TuiFocusTrap,
219
- TuiScrollControls,
220
- TuiScrollRef,
221
- ], changeDetection: ChangeDetectionStrategy.Default, template: "<div\n class=\"t-overlay\"\n [class.t-overlay_visible]=\"dialogs().length\"\n></div>\n<!--TODO: Rename to <article> in v5-->\n@for (item of dialogs(); track item) {\n <section\n aria-modal=\"true\"\n role=\"dialog\"\n tuiActiveZoneAdapter\n tuiAnimatedParent\n tuiFocusTrap\n tuiScrollRef\n class=\"t-dialog\"\n [attr.aria-labelledby]=\"item.id\"\n >\n <ng-container *polymorpheusOutlet=\"item.component; context: item\" />\n <tui-scroll-controls class=\"t-scrollbars\" />\n </section>\n}\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;scrollbar-width:none;-ms-overflow-style:none;pointer-events:none;overflow:hidden;overscroll-behavior:none;overflow-wrap:break-word;margin-block-start:var(--t-root-top)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:has(section){pointer-events:auto;overflow:auto}:host:has(section:only-of-type ::ng-deep tui-dialog[new][data-appearance~=fullscreen])>.t-overlay,:host:has(section:only-of-type ::ng-deep tui-notification-middle)>.t-overlay{opacity:0}:host:before{content:\"\";display:block;block-size:200%}.t-overlay,.t-dialog{transition-property:filter;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;bottom:0;right:0;display:flex;block-size:100%;align-items:flex-start;outline:none;overflow:auto}.t-overlay::-webkit-scrollbar,.t-dialog::-webkit-scrollbar,.t-overlay::-webkit-scrollbar-thumb,.t-dialog::-webkit-scrollbar-thumb{display:none}.t-dialog{position:sticky;overscroll-behavior:none;filter:brightness(.25)}.t-dialog:has(tui-dialog[new]){display:grid;place-items:center}.t-dialog ::ng-deep>.tui-enter+.t-scrollbars .t-bar_vertical,.t-dialog ::ng-deep>.tui-leave+.t-scrollbars .t-bar_vertical{display:none}.t-overlay{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;background:var(--tui-service-backdrop);-webkit-backdrop-filter:var(--tui-backdrop, none);backdrop-filter:var(--tui-backdrop, none);opacity:0;transition-timing-function:ease-in}.t-overlay_visible{opacity:1;transition-timing-function:ease-out}.t-dialog:last-child{pointer-events:auto;filter:none}:host-context(tui-root:has(tui-dropdown-mobile._sheet)) .t-dialog:last-child{filter:brightness(.5)}.t-scrollbars{position:fixed;top:0;left:0;bottom:0;right:0;margin:0;color:#747474}.t-scrollbars ::ng-deep .t-bar_horizontal,.t-scrollbars ::ng-deep .t-bar_vertical .t-thumb[style*=\"height: 100%\"]{display:none}\n"] }]
222
- }] });
223
-
224
- /**
225
- * Generated bundle index. Do not edit.
226
- */
227
-
228
- export { TUI_DIALOGS, TUI_DIALOGS_CLOSE, TUI_DIALOG_DEFAULT_OPTIONS, TUI_DIALOG_OPTIONS, TuiDialog, TuiDialogCloseService, TuiDialogComponent, TuiDialogService, TuiDialogs, tuiDialog, tuiDialogOptionsProvider };
229
- //# sourceMappingURL=taiga-ui-core-components-dialog.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-core-components-dialog.mjs","sources":["../../../projects/core/components/dialog/dialog.tokens.ts","../../../projects/core/components/dialog/dialog-close.service.ts","../../../projects/core/components/dialog/dialog.component.ts","../../../projects/core/components/dialog/dialog.template.html","../../../projects/core/components/dialog/dialog.service.ts","../../../projects/core/components/dialog/dialog.directive.ts","../../../projects/core/components/dialog/dialog.factory.ts","../../../projects/core/components/dialog/active-zone-adapter.directive.ts","../../../projects/core/components/dialog/dialogs.component.ts","../../../projects/core/components/dialog/dialogs.template.html","../../../projects/core/components/dialog/taiga-ui-core-components-dialog.ts"],"sourcesContent":["import {InjectionToken, type Provider} from '@angular/core';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {BehaviorSubject, EMPTY, type Observable} from 'rxjs';\n\nimport {type TuiDialogOptions} from './dialog.interfaces';\n\nexport const TUI_DIALOGS = new InjectionToken(ngDevMode ? 'TUI_DIALOGS' : '', {\n factory: () => new BehaviorSubject<ReadonlyArray<TuiPopover<any, any>>>([]),\n});\n\nexport const TUI_DIALOG_DEFAULT_OPTIONS: TuiDialogOptions<void> = {\n appearance: '',\n size: 'm',\n required: false,\n closeable: true,\n dismissible: true,\n label: '',\n header: '',\n data: undefined,\n};\n\n/**\n * A stream to close dialogs\n * TODO: use router.events in v5\n */\nexport const TUI_DIALOGS_CLOSE = new InjectionToken<Observable<unknown>>(\n ngDevMode ? 'TUI_DIALOGS_CLOSE' : '',\n {\n factory: () => EMPTY,\n },\n);\n\n/**\n * Default parameters for dialog component\n */\nexport const TUI_DIALOG_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_DIALOG_OPTIONS' : '',\n {\n factory: () => TUI_DIALOG_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiDialogOptionsProvider(\n options: Partial<TuiDialogOptions<unknown>>,\n): Provider {\n return tuiProvideOptions(TUI_DIALOG_OPTIONS, options, TUI_DIALOG_DEFAULT_OPTIONS);\n}\n","import {DOCUMENT} from '@angular/common';\nimport {inject, Injectable} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {tuiCloseWatcher, tuiTypedFromEvent, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport {\n tuiContainsOrAfter,\n tuiGetActualTarget,\n tuiInjectElement,\n tuiIsElement,\n} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetViewportWidth} from '@taiga-ui/core/utils';\nimport {filter, map, merge, Observable, switchMap, take} from 'rxjs';\n\nconst SCROLLBAR_PLACEHOLDER = 17;\n\n@Injectable()\nexport class TuiDialogCloseService extends Observable<unknown> {\n private readonly win = inject(WA_WINDOW);\n private readonly doc = inject(DOCUMENT);\n private readonly el = tuiInjectElement();\n\n private readonly esc$ = tuiTypedFromEvent(this.doc, 'keydown').pipe(\n filter((event) => {\n const target = tuiGetActualTarget(event);\n\n return (\n // @ts-ignore\n typeof CloseWatcher === 'undefined' &&\n event.key?.toLowerCase() === 'escape' &&\n !event.defaultPrevented &&\n (this.el.contains(target) || this.isOutside(target))\n );\n }),\n );\n\n private readonly mousedown$ = tuiTypedFromEvent(this.doc, 'mousedown').pipe(\n filter(\n (event) =>\n tuiGetViewportWidth(this.win) - event.clientX > SCROLLBAR_PLACEHOLDER &&\n this.isOutside(tuiGetActualTarget(event)),\n ),\n switchMap(() =>\n tuiTypedFromEvent(this.doc, 'mouseup').pipe(\n take(1),\n map(tuiGetActualTarget),\n filter((target) => this.isOutside(target)),\n ),\n ),\n );\n\n constructor() {\n super((subscriber) =>\n merge(\n this.esc$,\n this.mousedown$,\n tuiCloseWatcher().pipe(tuiZonefull()),\n ).subscribe(subscriber),\n );\n }\n\n private isOutside(target: EventTarget): boolean {\n return (\n tuiIsElement(target) &&\n (!tuiContainsOrAfter(this.el, target) ||\n // TODO: Drop 'new' attribute in v5\n (target === this.el && !this.el.hasAttribute('new')))\n );\n }\n}\n","import {AsyncPipe} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, computed, inject} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport {TUI_TRUE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {TuiAutoFocus} from '@taiga-ui/cdk/directives/auto-focus';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiBreakpointService} from '@taiga-ui/core/services';\nimport {TUI_CLOSE_WORD, TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {\n injectContext,\n type PolymorpheusContent,\n PolymorpheusOutlet,\n} from '@taiga-ui/polymorpheus';\nimport {\n exhaustMap,\n filter,\n isObservable,\n map,\n merge,\n type Observable,\n of,\n Subject,\n switchMap,\n take,\n} from 'rxjs';\n\nimport {type TuiDialogOptions, type TuiDialogSize} from './dialog.interfaces';\nimport {TUI_DIALOGS_CLOSE} from './dialog.tokens';\nimport {TuiDialogCloseService} from './dialog-close.service';\n\nconst REQUIRED_ERROR = new Error('Required dialog was dismissed');\n\nfunction toObservable<T>(valueOrStream: Observable<T> | T): Observable<T> {\n return isObservable(valueOrStream) ? valueOrStream : of(valueOrStream);\n}\n\n@Component({\n selector: 'tui-dialog',\n imports: [AsyncPipe, PolymorpheusOutlet, TuiAutoFocus, TuiButton],\n templateUrl: './dialog.template.html',\n styleUrls: ['./dialog.style.less'],\n // So we don't force OnPush on dialog content\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [TuiDialogCloseService],\n hostDirectives: [TuiAnimated],\n host: {\n '[attr.data-appearance]': 'context.appearance',\n '[attr.data-size]': 'size',\n '[class._centered]': 'header',\n '[style.--tui-from]': 'from()',\n },\n})\nexport class TuiDialogComponent<O, I> {\n protected readonly close$ = new Subject<void>();\n protected readonly context = injectContext<TuiPopover<TuiDialogOptions<I>, O>>();\n protected readonly closeWord$ = inject(TUI_CLOSE_WORD);\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly from = computed(() =>\n this.size === 'fullscreen' || this.size === 'page' || this.isMobile()\n ? 'translateY(100vh)'\n : 'translateY(2.5rem)',\n );\n\n protected readonly isMobile = toSignal(\n inject(TuiBreakpointService).pipe(map((breakpoint) => breakpoint === 'mobile')),\n );\n\n constructor() {\n merge(\n this.close$.pipe(switchMap(() => toObservable(this.context.closeable))),\n inject(TuiDialogCloseService).pipe(\n exhaustMap(() => toObservable(this.context.dismissible).pipe(take(1))),\n ),\n inject(TUI_DIALOGS_CLOSE).pipe(map(TUI_TRUE_HANDLER)),\n )\n .pipe(filter(Boolean), takeUntilDestroyed())\n .subscribe(() => {\n this.close();\n });\n }\n\n protected get size(): TuiDialogSize {\n return this.context.size;\n }\n\n protected get header(): PolymorpheusContent<TuiPopover<TuiDialogOptions<I>, O>> {\n return this.context.header;\n }\n\n private close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","@if (header) {\n <header class=\"t-header\">\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n </header>\n}\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [class.t-heading_closable]=\"context.closeable && !header\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closeable || context.dismissible) {\n <div class=\"t-buttons\">\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data?.button || 'OK' }}\n </button>\n </div>\n }\n </ng-container>\n </section>\n</div>\n<div class=\"t-filler\"></div>\n\n<!-- Close button is insensitive to `context.closeable === Observable<false>` by design -->\n@if (context.closeable) {\n <button\n automation-id=\"tui-dialog__close\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"isMobile() ? 'icon' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [size]=\"isMobile() ? 'xs' : 's'\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ closeWord$ | async }}\n </button>\n}\n","import {inject, Injectable} from '@angular/core';\nimport {TuiPopoverService} from '@taiga-ui/cdk/services';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {type TuiDialogOptions} from './dialog.interfaces';\nimport {TUI_DIALOG_OPTIONS, TUI_DIALOGS} from './dialog.tokens';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiDialogService(TUI_DIALOGS, TuiDialogComponent, inject(TUI_DIALOG_OPTIONS)),\n})\nexport class TuiDialogService extends TuiPopoverService<TuiDialogOptions<any>> {}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport {type TuiDialogOptions} from './dialog.interfaces';\nimport {TuiDialogService} from './dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiDialog]',\n inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],\n outputs: ['openChange: tuiDialogChange'],\n providers: [tuiAsPopover(TuiDialogService)],\n})\nexport class TuiDialog<T> extends TuiPopoverDirective<TuiDialogOptions<T>> {}\n","import {assertInInjectionContext, inject, INJECTOR, type Injector} from '@angular/core';\nimport {PolymorpheusComponent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nimport {type TuiDialogContext, type TuiDialogOptions} from './dialog.interfaces';\nimport {TuiDialogService} from './dialog.service';\n\ntype SingleUnionOrNever<T, U = T> = [T] extends [never]\n ? never\n : T extends U\n ? [U] extends [T]\n ? T\n : never\n : never;\n\ntype ReplaceAny<T> = 0 extends T & 1 ? void : T;\n\ntype ContextKeys<T> = {\n [K in keyof T]: ReplaceAny<T[K]> extends TuiDialogContext<any, any> | null\n ? K\n : never;\n}[keyof T];\n\ntype AssertNotMultipleContexts<T, K extends keyof T> = [K] extends [never]\n ? new (...args: any[]) => T\n : [SingleUnionOrNever<K>] extends [never]\n ? 'Component has multiple context. Cannot determine the type...'\n : new (...args: any[]) => T;\n\ntype ExtractDialogData<T, K extends keyof T = ContextKeys<T>> = [K] extends [never]\n ? void\n : [SingleUnionOrNever<K>] extends [never]\n ? never\n : T[K] extends TuiDialogContext<any, infer D> | null\n ? D\n : void;\n\ntype ExtractDialogResult<T, K extends keyof T = ContextKeys<T>> = [K] extends [never]\n ? void\n : [SingleUnionOrNever<K>] extends [never]\n ? never\n : T[K] extends TuiDialogContext<infer R, any> | null\n ? R\n : void;\n\ntype Options<T> = Omit<TuiDialogOptions<T>, 'data'> & {injector: Injector};\n\nexport function tuiDialog<\n T,\n K extends ContextKeys<T>,\n D extends ExtractDialogData<T, K>,\n R extends ExtractDialogResult<T, K>,\n>(\n component: AssertNotMultipleContexts<T, K>,\n {injector, ...options}: Partial<Options<D>> = {},\n): (data: D) => Observable<R> {\n if (!injector) {\n assertInInjectionContext(tuiDialog);\n injector = inject(INJECTOR);\n }\n\n const dialogService = injector.get(TuiDialogService);\n\n return (data) =>\n dialogService.open(\n new PolymorpheusComponent(component as new () => T, injector),\n {\n ...options,\n data,\n },\n );\n}\n","import {DOCUMENT} from '@angular/common';\nimport {Directive, inject, type OnDestroy, type OnInit} from '@angular/core';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {tuiGetFocused} from '@taiga-ui/cdk/utils/focus';\n\n@Directive({\n standalone: true,\n selector: '[tuiActiveZoneAdapter]',\n hostDirectives: [TuiActiveZone],\n})\nexport class TuiActiveZoneAdapter implements OnDestroy, OnInit {\n private readonly current = inject(TuiActiveZone);\n private readonly parent = findActive(\n inject(TuiActiveZone, {skipSelf: true}),\n tuiGetFocused(inject(DOCUMENT)),\n );\n\n public ngOnInit(): void {\n this.current.tuiActiveZoneParentSetter = this.parent;\n }\n\n public ngOnDestroy(): void {\n this.current.tuiActiveZoneParentSetter = null;\n }\n}\n\nfunction findActive(zone: TuiActiveZone, element: Element | null): TuiActiveZone | null {\n if (!element || !zone.contains(element)) {\n return null;\n }\n\n const active = zone.children.find((child) => child.contains(element));\n\n return active ? findActive(active, element) : zone;\n}\n","import {ChangeDetectionStrategy, Component, inject, type Signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TuiAnimatedParent} from '@taiga-ui/cdk/directives/animated';\nimport {TuiFocusTrap} from '@taiga-ui/cdk/directives/focus-trap';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {TuiScrollControls, TuiScrollRef} from '@taiga-ui/core/components/scrollbar';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiActiveZoneAdapter} from './active-zone-adapter.directive';\nimport {TUI_DIALOGS} from './dialog.tokens';\n\n@Component({\n selector: 'tui-dialogs',\n imports: [\n PolymorpheusOutlet,\n TuiActiveZoneAdapter,\n TuiAnimatedParent,\n TuiFocusTrap,\n TuiScrollControls,\n TuiScrollRef,\n ],\n templateUrl: './dialogs.template.html',\n styleUrls: ['./dialogs.style.less'],\n // So that we do not force OnPush on custom dialogs\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class TuiDialogs {\n protected readonly dialogs: Signal<ReadonlyArray<TuiPopover<any, any>>> = toSignal(\n inject(TUI_DIALOGS),\n {initialValue: []},\n );\n}\n","<div\n class=\"t-overlay\"\n [class.t-overlay_visible]=\"dialogs().length\"\n></div>\n<!--TODO: Rename to <article> in v5-->\n@for (item of dialogs(); track item) {\n <section\n aria-modal=\"true\"\n role=\"dialog\"\n tuiActiveZoneAdapter\n tuiAnimatedParent\n tuiFocusTrap\n tuiScrollRef\n class=\"t-dialog\"\n [attr.aria-labelledby]=\"item.id\"\n >\n <ng-container *polymorpheusOutlet=\"item.component; context: item\" />\n <tui-scroll-controls class=\"t-scrollbars\" />\n </section>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAOa,MAAA,WAAW,GAAG,IAAI,cAAc,CAAC,SAAS,GAAG,aAAa,GAAG,EAAE,EAAE;IAC1E,OAAO,EAAE,MAAM,IAAI,eAAe,CAAsC,EAAE,CAAC;AAC9E,CAAA;AAEY,MAAA,0BAA0B,GAA2B;AAC9D,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,IAAI,EAAE,SAAS;;AAGnB;;;AAGG;AACU,MAAA,iBAAiB,GAAG,IAAI,cAAc,CAC/C,SAAS,GAAG,mBAAmB,GAAG,EAAE,EACpC;AACI,IAAA,OAAO,EAAE,MAAM,KAAK;AACvB,CAAA;AAGL;;AAEG;AACU,MAAA,kBAAkB,GAAG,IAAI,cAAc,CAChD,SAAS,GAAG,oBAAoB,GAAG,EAAE,EACrC;AACI,IAAA,OAAO,EAAE,MAAM,0BAA0B;AAC5C,CAAA;AAGC,SAAU,wBAAwB,CACpC,OAA2C,EAAA;IAE3C,OAAO,iBAAiB,CAAC,kBAAkB,EAAE,OAAO,EAAE,0BAA0B,CAAC;AACrF;;AClCA,MAAM,qBAAqB,GAAG,EAAE;AAG1B,MAAO,qBAAsB,SAAQ,UAAmB,CAAA;AAkC1D,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,CAAC,CAAC,UAAU,KACb,KAAK,CACD,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,UAAU,EACf,eAAe,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CACxC,CAAC,SAAS,C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AA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,kBAAkB,EAClB,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,2BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,oBAAoB,EACpB,QAAA,EAAA,wBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,iBAAiB,EACjB,QAAA,EAAA,qBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,YAAY,EACZ,QAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,iBAAiB,gEACjB,YAAY,EAAA,QAAA,EAAA,gBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,OAAA,EAAA,CAAA,CAAA;;4FAQP,UAAU,EAAA,UAAA,EAAA,CAAA;kBAhBtB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EACd,OAAA,EAAA;wBACL,kBAAkB;wBAClB,oBAAoB;wBACpB,iBAAiB;wBACjB,YAAY;wBACZ,iBAAiB;wBACjB,YAAY;qBACf,EAKgB,eAAA,EAAA,uBAAuB,CAAC,OAAO,EAAA,QAAA,EAAA,ikBAAA,EAAA,MAAA,EAAA,CAAA,6/DAAA,CAAA,EAAA;;;AEzBpD;;AAEG;;;;"}
@@ -1,77 +0,0 @@
1
- import { DOCUMENT } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { inject, signal, EventEmitter, ElementRef, Input, Output, ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
5
- import { TuiRoot } from '@taiga-ui/core/components/root';
6
-
7
- class TuiFullscreen {
8
- constructor() {
9
- this.doc = inject(DOCUMENT);
10
- this.open = signal(false);
11
- this.opened = new EventEmitter();
12
- this.options = { navigationUI: 'auto' };
13
- }
14
- set fullscreen(open) {
15
- if (this.open() === open) {
16
- return;
17
- }
18
- if (open) {
19
- this.root?.nativeElement
20
- .requestFullscreen(this.options)
21
- .then(() => this.fullscreenState(open));
22
- }
23
- else {
24
- this.doc
25
- .exitFullscreen()
26
- .then(() => this.fullscreenState(open))
27
- .catch((error) => console.error('Failed to exit fullscreen:', error));
28
- }
29
- }
30
- closedByEscape(event) {
31
- const escaped = !this.doc.fullscreenElement && event.target === this.root?.nativeElement;
32
- if (escaped) {
33
- this.fullscreenState(false);
34
- }
35
- }
36
- fullscreenState(open) {
37
- this.open.set(open);
38
- this.opened.emit(open);
39
- }
40
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFullscreen, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
41
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiFullscreen, isStandalone: true, selector: "[tuiFullscreen]", inputs: { options: ["tuiFullscreenOptions", "options"], fullscreen: ["tuiFullscreen", "fullscreen"] }, outputs: { opened: "tuiFullscreenChange" }, host: { listeners: { "document:fullscreenchange": "closedByEscape($event)" } }, viewQueries: [{ propertyName: "root", first: true, predicate: TuiRoot, descendants: true, read: ElementRef }], ngImport: i0, template: '<tui-root><ng-content /></tui-root>', isInline: true, styles: ["tui-root{scrollbar-width:none;-ms-overflow-style:none;overflow:auto}tui-root::-webkit-scrollbar,tui-root::-webkit-scrollbar-thumb{display:none}\n"], dependencies: [{ kind: "component", type: TuiRoot, selector: "tui-root" }], viewProviders: [
42
- {
43
- provide: TuiActiveZone,
44
- useValue: null,
45
- },
46
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
47
- }
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFullscreen, decorators: [{
49
- type: Component,
50
- args: [{ selector: '[tuiFullscreen]', imports: [TuiRoot], template: '<tui-root><ng-content /></tui-root>', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
51
- {
52
- provide: TuiActiveZone,
53
- useValue: null,
54
- },
55
- ], host: {
56
- '(document:fullscreenchange)': 'closedByEscape($event)',
57
- }, styles: ["tui-root{scrollbar-width:none;-ms-overflow-style:none;overflow:auto}tui-root::-webkit-scrollbar,tui-root::-webkit-scrollbar-thumb{display:none}\n"] }]
58
- }], propDecorators: { root: [{
59
- type: ViewChild,
60
- args: [TuiRoot, { read: ElementRef }]
61
- }], opened: [{
62
- type: Output,
63
- args: ['tuiFullscreenChange']
64
- }], options: [{
65
- type: Input,
66
- args: ['tuiFullscreenOptions']
67
- }], fullscreen: [{
68
- type: Input,
69
- args: ['tuiFullscreen']
70
- }] } });
71
-
72
- /**
73
- * Generated bundle index. Do not edit.
74
- */
75
-
76
- export { TuiFullscreen };
77
- //# sourceMappingURL=taiga-ui-core-components-fullscreen.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-core-components-fullscreen.mjs","sources":["../../../projects/core/components/fullscreen/fullscreen.component.ts","../../../projects/core/components/fullscreen/taiga-ui-core-components-fullscreen.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n Output,\n signal,\n ViewChild,\n} from '@angular/core';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiRoot} from '@taiga-ui/core/components/root';\n\n@Component({\n selector: '[tuiFullscreen]',\n imports: [TuiRoot],\n template: '<tui-root><ng-content /></tui-root>',\n styleUrls: ['./fullscreen.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [\n {\n provide: TuiActiveZone,\n useValue: null,\n },\n ],\n host: {\n '(document:fullscreenchange)': 'closedByEscape($event)',\n },\n})\nexport class TuiFullscreen {\n @ViewChild(TuiRoot, {read: ElementRef})\n private readonly root?: ElementRef<HTMLElement>;\n\n private readonly doc = inject(DOCUMENT);\n protected readonly open = signal(false);\n\n @Output('tuiFullscreenChange')\n public readonly opened = new EventEmitter<boolean>();\n\n @Input('tuiFullscreenOptions')\n public options?: FullscreenOptions = {navigationUI: 'auto'};\n\n @Input('tuiFullscreen')\n public set fullscreen(open: boolean) {\n if (this.open() === open) {\n return;\n }\n\n if (open) {\n this.root?.nativeElement\n .requestFullscreen(this.options)\n .then(() => this.fullscreenState(open));\n } else {\n this.doc\n .exitFullscreen()\n .then(() => this.fullscreenState(open))\n .catch((error: unknown) =>\n console.error('Failed to exit fullscreen:', error),\n );\n }\n }\n\n protected closedByEscape(event: Event): void {\n const escaped =\n !this.doc.fullscreenElement && event.target === this.root?.nativeElement;\n\n if (escaped) {\n this.fullscreenState(false);\n }\n }\n\n private fullscreenState(open: boolean): void {\n this.open.set(open);\n this.opened.emit(open);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MA+Ba,aAAa,CAAA;AAhB1B,IAAA,WAAA,GAAA;AAoBqB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AACpB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC;AAGvB,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAAW;AAG7C,QAAA,IAAA,CAAA,OAAO,GAAuB,EAAC,YAAY,EAAE,MAAM,EAAC;AAmC9D;IAjCG,IACW,UAAU,CAAC,IAAa,EAAA;AAC/B,QAAA,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE;YACtB;;QAGJ,IAAI,IAAI,EAAE;YACN,IAAI,CAAC,IAAI,EAAE;AACN,iBAAA,iBAAiB,CAAC,IAAI,CAAC,OAAO;iBAC9B,IAAI,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;;aACxC;AACH,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