@taiga-ui/addon-doc 3.57.0 → 3.59.0-canary.10da730

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 (245) hide show
  1. package/components/code/code.component.d.ts +1 -1
  2. package/components/copy/copy.component.d.ts +1 -1
  3. package/components/demo/demo.component.d.ts +3 -3
  4. package/components/doc-tab/doc-tab.component.d.ts +6 -0
  5. package/components/doc-tab/doc-tab.module.d.ts +8 -0
  6. package/components/documentation/documentation-property-connector.directive.d.ts +6 -4
  7. package/components/documentation/documentation.component.d.ts +1 -1
  8. package/components/documentation/documentation.module.d.ts +1 -1
  9. package/components/documentation/pipes/cleaner.pipe.d.ts +1 -1
  10. package/components/documentation/pipes/color.pipe.d.ts +1 -1
  11. package/components/documentation/pipes/inspect.pipe.d.ts +1 -1
  12. package/components/documentation/pipes/opacity.pipe.d.ts +1 -1
  13. package/components/documentation/pipes/optional.pipe.d.ts +1 -1
  14. package/components/documentation/pipes/primitive-polymorpheus-content.pipe.d.ts +1 -1
  15. package/components/documentation/pipes/strip-optional.pipe.d.ts +1 -1
  16. package/components/documentation/pipes/type-reference.pipe.d.ts +1 -1
  17. package/components/example/example-get-tabs.pipe.d.ts +1 -1
  18. package/components/example/example.component.d.ts +1 -1
  19. package/components/index.d.ts +2 -0
  20. package/components/internal/header/header.component.d.ts +1 -1
  21. package/components/internal/input-opacity/input-opacity.directive.d.ts +1 -1
  22. package/components/internal/see-also/see-also.component.d.ts +1 -1
  23. package/components/internal/source-code/source-code.component.d.ts +1 -1
  24. package/components/language-switcher/language-switcher.component.d.ts +3 -3
  25. package/components/main/main.component.d.ts +1 -1
  26. package/components/navigation/navigation.component.d.ts +8 -9
  27. package/components/page/page-tab.directive.d.ts +1 -1
  28. package/components/page/page.component.d.ts +1 -1
  29. package/directives/scroll-into-view/scroll-into-view.directive.d.ts +1 -1
  30. package/directives/text-code/text-code.directive.d.ts +1 -1
  31. package/{esm2015/addon-doc.module.js → esm2020/addon-doc.module.mjs} +4 -4
  32. package/esm2020/components/code/code.component.mjs +42 -0
  33. package/{esm2015/components/code/code.module.js → esm2020/components/code/code.module.mjs} +9 -11
  34. package/esm2020/components/copy/copy.component.mjs +35 -0
  35. package/{esm2015/components/copy/copy.module.js → esm2020/components/copy/copy.module.mjs} +5 -5
  36. package/esm2020/components/demo/demo.component.mjs +179 -0
  37. package/{esm2015/components/demo/demo.module.js → esm2020/components/demo/demo.module.mjs} +23 -25
  38. package/esm2020/components/doc-tab/doc-tab.component.mjs +17 -0
  39. package/esm2020/components/doc-tab/doc-tab.module.mjs +18 -0
  40. package/esm2020/components/documentation/documentation-property-connector.directive.mjs +141 -0
  41. package/esm2020/components/documentation/documentation.component.mjs +109 -0
  42. package/{esm2015/components/documentation/documentation.module.js → esm2020/components/documentation/documentation.module.mjs} +25 -25
  43. package/{esm2015/components/documentation/pipes/cleaner.pipe.js → esm2020/components/documentation/pipes/cleaner.pipe.mjs} +3 -3
  44. package/{esm2015/components/documentation/pipes/color.pipe.js → esm2020/components/documentation/pipes/color.pipe.mjs} +3 -3
  45. package/{esm2015/components/documentation/pipes/inspect.pipe.js → esm2020/components/documentation/pipes/inspect.pipe.mjs} +3 -3
  46. package/{esm2015/components/documentation/pipes/opacity.pipe.js → esm2020/components/documentation/pipes/opacity.pipe.mjs} +3 -3
  47. package/{esm2015/components/documentation/pipes/optional.pipe.js → esm2020/components/documentation/pipes/optional.pipe.mjs} +3 -3
  48. package/{esm2015/components/documentation/pipes/primitive-polymorpheus-content.pipe.js → esm2020/components/documentation/pipes/primitive-polymorpheus-content.pipe.mjs} +3 -3
  49. package/{esm2015/components/documentation/pipes/strip-optional.pipe.js → esm2020/components/documentation/pipes/strip-optional.pipe.mjs} +3 -3
  50. package/esm2020/components/documentation/pipes/type-reference.pipe.mjs +31 -0
  51. package/{esm2015/components/example/example-get-tabs.pipe.js → esm2020/components/example/example-get-tabs.pipe.mjs} +3 -3
  52. package/esm2020/components/example/example.component.mjs +150 -0
  53. package/{esm2015/components/example/example.module.js → esm2020/components/example/example.module.mjs} +13 -15
  54. package/esm2020/components/index.mjs +42 -0
  55. package/esm2020/components/internal/header/header.component.mjs +54 -0
  56. package/{esm2015/components/internal/header/header.module.js → esm2020/components/internal/header/header.module.mjs} +10 -12
  57. package/{esm2015/components/internal/input-opacity/input-opacity.directive.js → esm2020/components/internal/input-opacity/input-opacity.directive.mjs} +8 -8
  58. package/{esm2015/components/internal/input-opacity/input-opacity.module.js → esm2020/components/internal/input-opacity/input-opacity.module.mjs} +4 -4
  59. package/esm2020/components/internal/see-also/see-also.component.mjs +31 -0
  60. package/{esm2015/components/internal/see-also/see-also.module.js → esm2020/components/internal/see-also/see-also.module.mjs} +5 -5
  61. package/{esm2015/components/internal/source-code/source-code.component.js → esm2020/components/internal/source-code/source-code.component.mjs} +7 -11
  62. package/{esm2015/components/internal/source-code/source-code.module.js → esm2020/components/internal/source-code/source-code.module.mjs} +5 -5
  63. package/esm2020/components/language-switcher/language-switcher.component.mjs +61 -0
  64. package/{esm2015/components/language-switcher/language-switcher.module.js → esm2020/components/language-switcher/language-switcher.module.mjs} +9 -11
  65. package/esm2020/components/main/main.component.mjs +59 -0
  66. package/{esm2015/components/main/main.module.js → esm2020/components/main/main.module.mjs} +14 -16
  67. package/esm2020/components/navigation/navigation.component.mjs +213 -0
  68. package/{esm2015/components/navigation/navigation.module.js → esm2020/components/navigation/navigation.module.mjs} +24 -26
  69. package/esm2020/components/navigation/navigation.providers.mjs +48 -0
  70. package/{esm2015/components/page/page-tab.directive.js → esm2020/components/page/page-tab.directive.mjs} +3 -3
  71. package/esm2020/components/page/page.component.mjs +56 -0
  72. package/{esm2015/components/page/page.module.js → esm2020/components/page/page.module.mjs} +11 -13
  73. package/esm2020/directives/scroll-into-view/scroll-into-view.directive.mjs +44 -0
  74. package/{esm2015/directives/scroll-into-view/scroll-into-view.module.js → esm2020/directives/scroll-into-view/scroll-into-view.module.mjs} +4 -4
  75. package/{esm2015/directives/text-code/text-code.directive.js → esm2020/directives/text-code/text-code.directive.mjs} +3 -3
  76. package/{esm2015/directives/text-code/text-code.module.js → esm2020/directives/text-code/text-code.module.mjs} +4 -4
  77. package/{esm2015/services/theme-night.service.js → esm2020/services/theme-night.service.mjs} +4 -4
  78. package/{esm2015/services/theme.service.js → esm2020/services/theme.service.mjs} +4 -4
  79. package/esm2020/tokens/page-loaded.mjs +7 -0
  80. package/esm2020/tokens/pages.mjs +9 -0
  81. package/esm2020/utils/coerce-boolean.mjs +4 -0
  82. package/{esm2015/utils/coerce-value.js → esm2020/utils/coerce-value.mjs} +2 -2
  83. package/esm2020/utils/raw-load-record.mjs +11 -0
  84. package/esm2020/utils/raw-load.mjs +4 -0
  85. package/esm2020/utils/sort-pages.mjs +26 -0
  86. package/esm2020/utils/to-flat-map-pages.mjs +22 -0
  87. package/esm2020/utils/type-reference-parser.mjs +24 -0
  88. package/fesm2015/taiga-ui-addon-doc-components.mjs +1909 -0
  89. package/fesm2015/taiga-ui-addon-doc-components.mjs.map +1 -0
  90. package/fesm2015/taiga-ui-addon-doc-directives.mjs +99 -0
  91. package/fesm2015/taiga-ui-addon-doc-directives.mjs.map +1 -0
  92. package/fesm2015/{taiga-ui-addon-doc-interfaces.js → taiga-ui-addon-doc-interfaces.mjs} +1 -1
  93. package/fesm2015/taiga-ui-addon-doc-interfaces.mjs.map +1 -0
  94. package/fesm2015/{taiga-ui-addon-doc-languages.js → taiga-ui-addon-doc-languages.mjs} +1 -1
  95. package/fesm2015/taiga-ui-addon-doc-languages.mjs.map +1 -0
  96. package/fesm2015/taiga-ui-addon-doc-services.mjs +97 -0
  97. package/fesm2015/taiga-ui-addon-doc-services.mjs.map +1 -0
  98. package/fesm2015/{taiga-ui-addon-doc-tokens.js → taiga-ui-addon-doc-tokens.mjs} +2 -3
  99. package/fesm2015/taiga-ui-addon-doc-tokens.mjs.map +1 -0
  100. package/fesm2015/taiga-ui-addon-doc-types.mjs +4 -0
  101. package/fesm2015/taiga-ui-addon-doc-types.mjs.map +1 -0
  102. package/fesm2015/{taiga-ui-addon-doc-utils.js → taiga-ui-addon-doc-utils.mjs} +7 -6
  103. package/fesm2015/taiga-ui-addon-doc-utils.mjs.map +1 -0
  104. package/fesm2015/{taiga-ui-addon-doc.js → taiga-ui-addon-doc.mjs} +5 -5
  105. package/fesm2015/taiga-ui-addon-doc.mjs.map +1 -0
  106. package/fesm2020/taiga-ui-addon-doc-components.mjs +1879 -0
  107. package/fesm2020/taiga-ui-addon-doc-components.mjs.map +1 -0
  108. package/{fesm2015/taiga-ui-addon-doc-directives.js → fesm2020/taiga-ui-addon-doc-directives.mjs} +19 -20
  109. package/fesm2020/taiga-ui-addon-doc-directives.mjs.map +1 -0
  110. package/fesm2020/taiga-ui-addon-doc-interfaces.mjs +12 -0
  111. package/fesm2020/taiga-ui-addon-doc-interfaces.mjs.map +1 -0
  112. package/fesm2020/taiga-ui-addon-doc-languages.mjs +46 -0
  113. package/fesm2020/taiga-ui-addon-doc-languages.mjs.map +1 -0
  114. package/{fesm2015/taiga-ui-addon-doc-services.js → fesm2020/taiga-ui-addon-doc-services.mjs} +7 -7
  115. package/fesm2020/taiga-ui-addon-doc-services.mjs.map +1 -0
  116. package/fesm2020/taiga-ui-addon-doc-tokens.mjs +148 -0
  117. package/fesm2020/taiga-ui-addon-doc-tokens.mjs.map +1 -0
  118. package/fesm2020/taiga-ui-addon-doc-types.mjs +4 -0
  119. package/fesm2020/taiga-ui-addon-doc-types.mjs.map +1 -0
  120. package/fesm2020/taiga-ui-addon-doc-utils.mjs +275 -0
  121. package/fesm2020/taiga-ui-addon-doc-utils.mjs.map +1 -0
  122. package/fesm2020/taiga-ui-addon-doc.mjs +49 -0
  123. package/fesm2020/taiga-ui-addon-doc.mjs.map +1 -0
  124. package/interfaces/page.d.ts +3 -3
  125. package/package.json +115 -38
  126. package/styles/markdown.less +118 -0
  127. package/tokens/pages.d.ts +4 -2
  128. package/types/pages.d.ts +1 -1
  129. package/utils/type-reference-parser.d.ts +1 -1
  130. package/bundles/taiga-ui-addon-doc-components.umd.js +0 -2500
  131. package/bundles/taiga-ui-addon-doc-components.umd.js.map +0 -1
  132. package/bundles/taiga-ui-addon-doc-directives.umd.js +0 -140
  133. package/bundles/taiga-ui-addon-doc-directives.umd.js.map +0 -1
  134. package/bundles/taiga-ui-addon-doc-interfaces.umd.js +0 -22
  135. package/bundles/taiga-ui-addon-doc-interfaces.umd.js.map +0 -1
  136. package/bundles/taiga-ui-addon-doc-languages.umd.js +0 -54
  137. package/bundles/taiga-ui-addon-doc-languages.umd.js.map +0 -1
  138. package/bundles/taiga-ui-addon-doc-services.umd.js +0 -457
  139. package/bundles/taiga-ui-addon-doc-services.umd.js.map +0 -1
  140. package/bundles/taiga-ui-addon-doc-tokens.umd.js +0 -179
  141. package/bundles/taiga-ui-addon-doc-tokens.umd.js.map +0 -1
  142. package/bundles/taiga-ui-addon-doc-types.umd.js +0 -11
  143. package/bundles/taiga-ui-addon-doc-types.umd.js.map +0 -1
  144. package/bundles/taiga-ui-addon-doc-utils.umd.js +0 -671
  145. package/bundles/taiga-ui-addon-doc-utils.umd.js.map +0 -1
  146. package/bundles/taiga-ui-addon-doc.umd.js +0 -117
  147. package/bundles/taiga-ui-addon-doc.umd.js.map +0 -1
  148. package/components/package.json +0 -10
  149. package/components/taiga-ui-addon-doc-components.d.ts +0 -5
  150. package/directives/package.json +0 -10
  151. package/directives/taiga-ui-addon-doc-directives.d.ts +0 -5
  152. package/esm2015/components/code/code.component.js +0 -48
  153. package/esm2015/components/copy/copy.component.js +0 -42
  154. package/esm2015/components/demo/demo.component.js +0 -183
  155. package/esm2015/components/documentation/documentation-property-connector.directive.js +0 -127
  156. package/esm2015/components/documentation/documentation.component.js +0 -117
  157. package/esm2015/components/documentation/pipes/type-reference.pipe.js +0 -34
  158. package/esm2015/components/example/example.component.js +0 -152
  159. package/esm2015/components/index.js +0 -40
  160. package/esm2015/components/internal/header/header.component.js +0 -60
  161. package/esm2015/components/internal/see-also/see-also.component.js +0 -37
  162. package/esm2015/components/language-switcher/language-switcher.component.js +0 -67
  163. package/esm2015/components/main/main.component.js +0 -68
  164. package/esm2015/components/navigation/navigation.component.js +0 -223
  165. package/esm2015/components/navigation/navigation.providers.js +0 -48
  166. package/esm2015/components/page/page.component.js +0 -62
  167. package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +0 -45
  168. package/esm2015/tokens/page-loaded.js +0 -8
  169. package/esm2015/tokens/pages.js +0 -9
  170. package/esm2015/utils/coerce-boolean.js +0 -4
  171. package/esm2015/utils/raw-load-record.js +0 -14
  172. package/esm2015/utils/raw-load.js +0 -7
  173. package/esm2015/utils/sort-pages.js +0 -23
  174. package/esm2015/utils/to-flat-map-pages.js +0 -23
  175. package/esm2015/utils/type-reference-parser.js +0 -24
  176. package/fesm2015/taiga-ui-addon-doc-components.js +0 -1928
  177. package/fesm2015/taiga-ui-addon-doc-components.js.map +0 -1
  178. package/fesm2015/taiga-ui-addon-doc-directives.js.map +0 -1
  179. package/fesm2015/taiga-ui-addon-doc-interfaces.js.map +0 -1
  180. package/fesm2015/taiga-ui-addon-doc-languages.js.map +0 -1
  181. package/fesm2015/taiga-ui-addon-doc-services.js.map +0 -1
  182. package/fesm2015/taiga-ui-addon-doc-tokens.js.map +0 -1
  183. package/fesm2015/taiga-ui-addon-doc-types.js +0 -4
  184. package/fesm2015/taiga-ui-addon-doc-types.js.map +0 -1
  185. package/fesm2015/taiga-ui-addon-doc-utils.js.map +0 -1
  186. package/fesm2015/taiga-ui-addon-doc.js.map +0 -1
  187. package/interfaces/package.json +0 -10
  188. package/interfaces/taiga-ui-addon-doc-interfaces.d.ts +0 -5
  189. package/languages/package.json +0 -10
  190. package/languages/taiga-ui-addon-doc-languages.d.ts +0 -5
  191. package/services/package.json +0 -10
  192. package/services/taiga-ui-addon-doc-services.d.ts +0 -5
  193. package/taiga-ui-addon-doc.d.ts +0 -5
  194. package/tokens/package.json +0 -10
  195. package/tokens/taiga-ui-addon-doc-tokens.d.ts +0 -5
  196. package/types/package.json +0 -10
  197. package/types/taiga-ui-addon-doc-types.d.ts +0 -5
  198. package/utils/package.json +0 -10
  199. package/utils/taiga-ui-addon-doc-utils.d.ts +0 -5
  200. /package/{esm2015/components/example/example.options.js → esm2020/components/example/example.options.mjs} +0 -0
  201. /package/{esm2015/components/page/page.providers.js → esm2020/components/page/page.providers.mjs} +0 -0
  202. /package/{esm2015/components/taiga-ui-addon-doc-components.js → esm2020/components/taiga-ui-addon-doc-components.mjs} +0 -0
  203. /package/{esm2015/directives/index.js → esm2020/directives/index.mjs} +0 -0
  204. /package/{esm2015/directives/taiga-ui-addon-doc-directives.js → esm2020/directives/taiga-ui-addon-doc-directives.mjs} +0 -0
  205. /package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  206. /package/{esm2015/interfaces/code-editor.js → esm2020/interfaces/code-editor.mjs} +0 -0
  207. /package/{esm2015/interfaces/demo-params.js → esm2020/interfaces/demo-params.mjs} +0 -0
  208. /package/{esm2015/interfaces/index.js → esm2020/interfaces/index.mjs} +0 -0
  209. /package/{esm2015/interfaces/page.js → esm2020/interfaces/page.mjs} +0 -0
  210. /package/{esm2015/interfaces/source-code-path-options.js → esm2020/interfaces/source-code-path-options.mjs} +0 -0
  211. /package/{esm2015/interfaces/taiga-ui-addon-doc-interfaces.js → esm2020/interfaces/taiga-ui-addon-doc-interfaces.mjs} +0 -0
  212. /package/{esm2015/languages/index.js → esm2020/languages/index.mjs} +0 -0
  213. /package/{esm2015/languages/russian.js → esm2020/languages/russian.mjs} +0 -0
  214. /package/{esm2015/languages/taiga-ui-addon-doc-languages.js → esm2020/languages/taiga-ui-addon-doc-languages.mjs} +0 -0
  215. /package/{esm2015/services/index.js → esm2020/services/index.mjs} +0 -0
  216. /package/{esm2015/services/taiga-ui-addon-doc-services.js → esm2020/services/taiga-ui-addon-doc-services.mjs} +0 -0
  217. /package/{esm2015/services/theme-night.options.js → esm2020/services/theme-night.options.mjs} +0 -0
  218. /package/{esm2015/services/theme.options.js → esm2020/services/theme.options.mjs} +0 -0
  219. /package/{esm2015/taiga-ui-addon-doc.js → esm2020/taiga-ui-addon-doc.mjs} +0 -0
  220. /package/{esm2015/tokens/code-actions.js → esm2020/tokens/code-actions.mjs} +0 -0
  221. /package/{esm2015/tokens/code-editor.js → esm2020/tokens/code-editor.mjs} +0 -0
  222. /package/{esm2015/tokens/default-tabs.js → esm2020/tokens/default-tabs.mjs} +0 -0
  223. /package/{esm2015/tokens/doc-icons.js → esm2020/tokens/doc-icons.mjs} +0 -0
  224. /package/{esm2015/tokens/example-content-processor.js → esm2020/tokens/example-content-processor.mjs} +0 -0
  225. /package/{esm2015/tokens/excluded-properties.js → esm2020/tokens/excluded-properties.mjs} +0 -0
  226. /package/{esm2015/tokens/i18n.js → esm2020/tokens/i18n.mjs} +0 -0
  227. /package/{esm2015/tokens/index.js → esm2020/tokens/index.mjs} +0 -0
  228. /package/{esm2015/tokens/logo.js → esm2020/tokens/logo.mjs} +0 -0
  229. /package/{esm2015/tokens/scroll-behavior.js → esm2020/tokens/scroll-behavior.mjs} +0 -0
  230. /package/{esm2015/tokens/see-also.js → esm2020/tokens/see-also.mjs} +0 -0
  231. /package/{esm2015/tokens/source-code.js → esm2020/tokens/source-code.mjs} +0 -0
  232. /package/{esm2015/tokens/taiga-ui-addon-doc-tokens.js → esm2020/tokens/taiga-ui-addon-doc-tokens.mjs} +0 -0
  233. /package/{esm2015/tokens/title.js → esm2020/tokens/title.mjs} +0 -0
  234. /package/{esm2015/tokens/type-reference-handler.js → esm2020/tokens/type-reference-handler.mjs} +0 -0
  235. /package/{esm2015/tokens/url-state-handler.js → esm2020/tokens/url-state-handler.mjs} +0 -0
  236. /package/{esm2015/types/index.js → esm2020/types/index.mjs} +0 -0
  237. /package/{esm2015/types/pages.js → esm2020/types/pages.mjs} +0 -0
  238. /package/{esm2015/types/taiga-ui-addon-doc-types.js → esm2020/types/taiga-ui-addon-doc-types.mjs} +0 -0
  239. /package/{esm2015/utils/generate-routes.js → esm2020/utils/generate-routes.mjs} +0 -0
  240. /package/{esm2015/utils/index.js → esm2020/utils/index.mjs} +0 -0
  241. /package/{esm2015/utils/inspect.js → esm2020/utils/inspect.mjs} +0 -0
  242. /package/{esm2015/utils/is-page-group.js → esm2020/utils/is-page-group.mjs} +0 -0
  243. /package/{esm2015/utils/parse-code-block.js → esm2020/utils/parse-code-block.mjs} +0 -0
  244. /package/{esm2015/utils/taiga-ui-addon-doc-utils.js → esm2020/utils/taiga-ui-addon-doc-utils.mjs} +0 -0
  245. /package/{esm2015/utils/transliterate-keyboard-layout.js → esm2020/utils/transliterate-keyboard-layout.mjs} +0 -0
@@ -1,1928 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Inject, Input, HostBinding, NgModule, ElementRef, forwardRef, TemplateRef, ViewChild, ContentChild, HostListener, EventEmitter, Directive, Output, Pipe, Renderer2, ChangeDetectorRef, Self, ContentChildren, Optional, InjectionToken, ViewEncapsulation } from '@angular/core';
3
- import { TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR, TUI_DOC_DEMO_TEXTS, TUI_DOC_URL_STATE_HANDLER, TUI_DOC_TYPE_REFERENCE_PARSER, TUI_DOC_TYPE_REFERENCE_HANDLER, TUI_DOC_DOCUMENTATION_TEXTS, TUI_DOC_EXCLUDED_PROPERTIES, TUI_DOC_EXAMPLE_TEXTS, TUI_DOC_CODE_EDITOR, TUI_DOC_EXAMPLE_CONTENT_PROCESSOR, TUI_DOC_CODE_ACTIONS, TUI_DOC_TITLE, TUI_DOC_PAGES, TUI_DOC_SEARCH_TEXT, TUI_DOC_PAGE_LOADED, TUI_DOC_SCROLL_BEHAVIOR, TUI_DOC_ICONS, TUI_DOC_LOGO, TUI_DOC_MENU_TEXT, TUI_DOC_SEE_ALSO_TEXT, TUI_DOC_MAP_PAGES, TUI_DOC_SOURCE_CODE, TUI_DOC_SOURCE_CODE_TEXT, TUI_DOC_SEE_ALSO, TUI_DOC_DEFAULT_TABS } from '@taiga-ui/addon-doc/tokens';
4
- import { tuiRawLoad, tuiCoerceValueIsTrue, tuiCoerceValue, tuiInspectAny, tuiRawLoadRecord, tuiTransliterateKeyboardLayout } from '@taiga-ui/addon-doc/utils';
5
- import * as i10 from 'rxjs';
6
- import { BehaviorSubject, Subject, timer, merge } from 'rxjs';
7
- import { switchMap, map, startWith, takeUntil, filter, mergeMap, take, distinctUntilChanged, share } from 'rxjs/operators';
8
- import * as i2 from '@taiga-ui/core';
9
- import { TuiSvgModule, TuiButtonModule, TuiModeDirective, TuiLinkModule, TuiExpandModule, TuiGroupModule, TuiTooltipModule, TuiModeModule, TuiDataListModule, TuiTextfieldControllerModule, TuiHintModule, TuiPrimitiveTextfieldModule, TuiDropdownModule, TuiNotificationModule, TuiAlertService, TuiLoaderModule, TUI_COMMON_ICONS, TuiHostedDropdownModule, TuiScrollbarModule, tuiCapitalizeFirstLetter, TuiFlagPipe, TuiFlagPipeModule, TuiThemeNightModule, TuiRootModule, TuiDialogModule, TuiAlertModule } from '@taiga-ui/core';
10
- import * as i4 from '@angular/common';
11
- import { CommonModule, Location as Location$1, DOCUMENT } from '@angular/common';
12
- import * as i3 from 'ngx-highlightjs';
13
- import { HighlightModule } from 'ngx-highlightjs';
14
- import * as i4$1 from '@angular/cdk/clipboard';
15
- import { ClipboardModule, Clipboard } from '@angular/cdk/clipboard';
16
- import { __decorate } from 'tslib';
17
- import * as i6$1 from '@taiga-ui/cdk';
18
- import { ALWAYS_FALSE_HANDLER, TuiDestroyService, tuiPure, tuiToInteger, tuiClamp, tuiPx, tuiCleanObject, TUI_IS_MOBILE, TuiResizeableDirective, TuiResizerModule, tuiIsNumber, tuiRgbToHex, TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_E2E, tuiIsString, EMPTY_QUERY, tuiQueryListChanges, tuiWatch, tuiHexToRgb, TuiFilterPipeModule, tuiCreateToken, tuiProvideOptions, TuiMapperPipeModule, tuiIsPresent, tuiControlValue, tuiUniqBy, TuiSwipeService, TuiActiveZoneModule, TuiLetModule, TuiAutoFocusModule, TuiReplacePipeModule } from '@taiga-ui/cdk';
19
- import * as i1 from '@taiga-ui/kit';
20
- import { TUI_COPY_TEXTS, TUI_ARROW_OPTIONS, TuiSelectModule, TuiRadioBlockModule, TuiCheckboxLabeledModule, TuiDataListWrapperModule, TuiBadgeModule, TuiToggleModule, TuiInputNumberModule, TuiTabsModule, TuiInputModule, TuiAccordionModule, TuiTagModule } from '@taiga-ui/kit';
21
- import * as i5 from '@angular/forms';
22
- import { FormGroup, ReactiveFormsModule, FormsModule, FormControl } from '@angular/forms';
23
- import * as i6 from '@angular/router';
24
- import { UrlSerializer, RouterModule, ActivatedRoute, Router, NavigationEnd } from '@angular/router';
25
- import { trigger, transition, style, animate } from '@angular/animations';
26
- import { LOCATION } from '@ng-web-apis/common';
27
- import { TUI_EXAMPLE_PRIMARY_FILE_NAME } from '@taiga-ui/addon-doc/interfaces';
28
- import * as i5$1 from '@tinkoff/ng-polymorpheus';
29
- import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
30
- import * as i9 from '@angular/platform-browser';
31
- import { Title } from '@angular/platform-browser';
32
- import * as i4$2 from '@taiga-ui/addon-mobile';
33
- import { TuiSidebarDirective, TuiSidebarModule } from '@taiga-ui/addon-mobile';
34
- import * as i8 from '@taiga-ui/addon-doc/directives';
35
- import { TuiScrollIntoViewLinkModule } from '@taiga-ui/addon-doc/directives';
36
- import * as i5$2 from '@taiga-ui/i18n';
37
- import { TuiCountryIsoCode, TuiLanguageSwitcher } from '@taiga-ui/i18n';
38
- import * as i6$2 from '@taiga-ui/addon-doc/services';
39
- import { TuiThemeService, TuiThemeNightService } from '@taiga-ui/addon-doc/services';
40
-
41
- class TuiDocCodeComponent {
42
- constructor(markdownCodeProcessor) {
43
- this.markdownCodeProcessor = markdownCodeProcessor;
44
- this.rawLoader$$ = new BehaviorSubject('');
45
- this.filename = '';
46
- this.copy$ = new Subject();
47
- this.icon$ = this.copy$.pipe(switchMap(() => timer(2000).pipe(map(() => 'tuiIconCopyLarge'), startWith('tuiIconCheckLarge'))));
48
- this.processor$ = this.rawLoader$$.pipe(switchMap(tuiRawLoad), map((value) => this.markdownCodeProcessor(value)));
49
- }
50
- set code(code) {
51
- this.rawLoader$$.next(code);
52
- }
53
- get hasFilename() {
54
- return !!this.filename;
55
- }
56
- }
57
- TuiDocCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocCodeComponent, deps: [{ token: TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR }], target: i0.ɵɵFactoryTarget.Component });
58
- TuiDocCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocCodeComponent, selector: "tui-doc-code", inputs: { filename: "filename", code: "code" }, host: { properties: { "class._has-filename": "this.hasFilename" } }, ngImport: i0, template: "<p\n *ngIf=\"filename\"\n class=\"t-header\"\n>\n {{ filename }}\n</p>\n<pre\n *ngFor=\"let content of processor$ | async\"\n class=\"t-code\"\n>\n <code [lineNumbers]=\"true\" [highlight]=\"content\"></code>\n <div class=\"t-code-actions\">\n <button\n tuiIconButton\n appearance=\"icon\"\n size=\"xs\"\n class=\"t-copy-button\"\n [icon]=\"(icon$ | async) || 'tuiIconCopyLarge'\"\n [cdkCopyToClipboard]=\"content\"\n (click)=\"copy$.next()\"\n >\n </button>\n <ng-content></ng-content>\n </div>\n</pre>\n", styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:bold}.t-header+.t-code{border-radius:.25rem}.t-code{position:relative;margin:0;white-space:normal;outline:1px solid var(--tui-base-03)}.t-code ::ng-deep .hljs-ln{width:-webkit-max-content;width:max-content}.t-code+.t-code{margin-top:1rem}.t-code-actions{position:absolute;top:.75rem;right:.75rem;display:flex;justify-content:center;align-items:center;flex-direction:row-reverse}:host-context(tui-root._mobile) .t-code-actions{padding:.3125rem;border-radius:.25rem;border:1px solid var(--tui-base-04)}.t-copy-button::ng-deep+*:not(:empty){margin-right:.375rem}.hljs:not(:empty){font:var(--tui-font-text-m);font-size:.875rem;padding:1.5rem 2rem;font-family:monospace;word-wrap:break-word;white-space:pre-wrap}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.hljs:not(:empty)::-webkit-scrollbar,.hljs:not(:empty)::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:.375rem solid transparent}.hljs:not(:empty)::-webkit-scrollbar{background-color:transparent}.hljs:not(:empty)::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}.hljs:not(:empty)::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}.hljs:not(:empty)::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}:host-context(tui-root._mobile) .hljs:not(:empty){padding:1rem}.t-code-actions,.hljs:not(:empty){background:var(--tui-base-01)}@supports (background: color-mix(in srgb,var(--tui-base-01),#222 2%)){.t-code-actions,.hljs:not(:empty){background:color-mix(in srgb,var(--tui-base-01),#222 2%)}}\n"], components: [{ type: i2.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.Highlight, selector: "[highlight]", inputs: ["highlight", "languages", "lineNumbers"], outputs: ["highlighted"] }, { type: i4$1.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
59
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocCodeComponent, decorators: [{
60
- type: Component,
61
- args: [{
62
- selector: 'tui-doc-code',
63
- templateUrl: './code.template.html',
64
- styleUrls: ['./code.style.less'],
65
- changeDetection: ChangeDetectionStrategy.OnPush,
66
- }]
67
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
68
- type: Inject,
69
- args: [TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR]
70
- }] }]; }, propDecorators: { filename: [{
71
- type: Input
72
- }], code: [{
73
- type: Input
74
- }], hasFilename: [{
75
- type: HostBinding,
76
- args: ['class._has-filename']
77
- }] } });
78
-
79
- class TuiDocCodeModule {
80
- }
81
- TuiDocCodeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocCodeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
82
- TuiDocCodeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocCodeModule, declarations: [TuiDocCodeComponent], imports: [CommonModule,
83
- TuiSvgModule,
84
- HighlightModule,
85
- TuiButtonModule,
86
- ClipboardModule], exports: [TuiDocCodeComponent] });
87
- TuiDocCodeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocCodeModule, imports: [[
88
- CommonModule,
89
- TuiSvgModule,
90
- HighlightModule,
91
- TuiButtonModule,
92
- ClipboardModule,
93
- ]] });
94
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocCodeModule, decorators: [{
95
- type: NgModule,
96
- args: [{
97
- imports: [
98
- CommonModule,
99
- TuiSvgModule,
100
- HighlightModule,
101
- TuiButtonModule,
102
- ClipboardModule,
103
- ],
104
- declarations: [TuiDocCodeComponent],
105
- exports: [TuiDocCodeComponent],
106
- }]
107
- }] });
108
-
109
- const COPIED_TIMEOUT = 1500;
110
- class TuiDocCopyComponent {
111
- constructor(texts$) {
112
- this.texts$ = texts$;
113
- this.copy$ = new Subject();
114
- }
115
- get copied$() {
116
- return this.copy$.pipe(switchMap(() => timer(COPIED_TIMEOUT).pipe(map(ALWAYS_FALSE_HANDLER), startWith(true))));
117
- }
118
- onClick() {
119
- this.copy$.next();
120
- }
121
- }
122
- TuiDocCopyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocCopyComponent, deps: [{ token: TUI_COPY_TEXTS }], target: i0.ɵɵFactoryTarget.Component });
123
- TuiDocCopyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocCopyComponent, selector: "tui-doc-copy", providers: [TuiDestroyService], ngImport: i0, template: "<button\n *ngIf=\"texts$ | async as texts\"\n appearance=\"\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-copy\"\n [title]=\"texts[0]\"\n (click)=\"onClick()\"\n>\n <span\n class=\"t-content\"\n [class.t-content_moved]=\"copied$ | async\"\n >\n <span\n class=\"t-initial\"\n [attr.data-text]=\"texts[0]\"\n >\n <ng-content></ng-content>\n </span>\n {{ texts[1] }}\n </span>\n</button>\n", styles: [":host{position:relative;display:inline-block;vertical-align:middle;border-radius:var(--tui-radius-m)}.t-copy{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;width:100%;color:var(--tui-text-01);background:var(--tui-base-01);overflow:hidden}.t-copy:hover{background:var(--tui-base-02)}.t-initial{white-space:nowrap}.t-initial:empty:before{content:attr(data-text)}.t-content{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;flex-direction:column;transform:translateY(1rem);text-align:center;line-height:2rem}.t-content_moved{transform:translateY(-1rem)}\n"], components: [{ type: i2.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
124
- __decorate([
125
- tuiPure
126
- ], TuiDocCopyComponent.prototype, "copied$", null);
127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocCopyComponent, decorators: [{
128
- type: Component,
129
- args: [{
130
- selector: 'tui-doc-copy',
131
- templateUrl: './copy.template.html',
132
- styleUrls: ['./copy.style.less'],
133
- changeDetection: ChangeDetectionStrategy.OnPush,
134
- providers: [TuiDestroyService],
135
- }]
136
- }], ctorParameters: function () { return [{ type: i10.Observable, decorators: [{
137
- type: Inject,
138
- args: [TUI_COPY_TEXTS]
139
- }] }]; }, propDecorators: { copied$: [] } });
140
-
141
- class TuiDocCopyModule {
142
- }
143
- TuiDocCopyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocCopyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
144
- TuiDocCopyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocCopyModule, declarations: [TuiDocCopyComponent], imports: [CommonModule, TuiButtonModule], exports: [TuiDocCopyComponent] });
145
- TuiDocCopyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocCopyModule, imports: [[CommonModule, TuiButtonModule]] });
146
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocCopyModule, decorators: [{
147
- type: NgModule,
148
- args: [{
149
- imports: [CommonModule, TuiButtonModule],
150
- declarations: [TuiDocCopyComponent],
151
- exports: [TuiDocCopyComponent],
152
- }]
153
- }] });
154
-
155
- const MIN_WIDTH = 160;
156
- class TuiDocDemoComponent {
157
- constructor(options, isMobile, el, locationRef, urlSerializer, texts, urlStateHandler) {
158
- var _a, _b;
159
- this.options = options;
160
- this.isMobile = isMobile;
161
- this.el = el;
162
- this.locationRef = locationRef;
163
- this.urlSerializer = urlSerializer;
164
- this.texts = texts;
165
- this.urlStateHandler = urlStateHandler;
166
- this.control = null;
167
- this.sticky = true;
168
- this.template = null;
169
- this.updateOnVariants = ['change', 'blur', 'submit'];
170
- this.updateOn = this.params.updateOn || this.updateOnVariants[0];
171
- this.opaque = tuiCoerceValueIsTrue((_a = this.params.sandboxOpaque) !== null && _a !== void 0 ? _a : true);
172
- this.expanded = tuiCoerceValueIsTrue((_b = this.params.sandboxExpanded) !== null && _b !== void 0 ? _b : false);
173
- this.mode = this.params.tuiMode || null;
174
- this.sandboxWidth = tuiToInteger(this.params.sandboxWidth);
175
- this.change$ = new Subject();
176
- this.items = ['onLight', 'onDark'];
177
- }
178
- onResize() {
179
- this.updateWidth();
180
- this.onMouseUp();
181
- }
182
- onMouseUp() {
183
- this.updateUrl({ sandboxWidth: this.sandboxWidth });
184
- }
185
- ngOnInit() {
186
- this.createForm();
187
- this.updateWidth(this.sandboxWidth + this.delta);
188
- }
189
- onModeChange(mode) {
190
- this.mode = mode;
191
- this.updateUrl({ sandboxWidth: this.sandboxWidth });
192
- this.change$.next();
193
- }
194
- toggleDetails() {
195
- this.expanded = !this.expanded;
196
- this.updateUrl({ sandboxExpanded: this.expanded });
197
- }
198
- changeOpaque(opaque) {
199
- this.opaque = opaque;
200
- this.updateUrl({ sandboxOpaque: this.opaque });
201
- }
202
- updateOnChange(updateOn) {
203
- this.updateOn = updateOn;
204
- this.updateUrl({ updateOn });
205
- this.createForm();
206
- }
207
- updateWidth(width = NaN) {
208
- if (!this.resizer || !this.resizeable || !this.content) {
209
- return;
210
- }
211
- const safe = width || this.resizeable.nativeElement.clientWidth;
212
- const total = this.el.nativeElement.clientWidth;
213
- const clamped = Math.round(tuiClamp(safe, MIN_WIDTH, total)) - this.delta;
214
- const validated = safe < total ? clamped : NaN;
215
- this.resizer.nativeElement.textContent = String(clamped || '-');
216
- this.resizeable.nativeElement.style.width = validated ? tuiPx(safe) : '';
217
- this.sandboxWidth = validated;
218
- }
219
- get delta() {
220
- return this.resizeable && this.content
221
- ? this.resizeable.nativeElement.clientWidth -
222
- this.content.nativeElement.clientWidth
223
- : 0;
224
- }
225
- updateUrl(params) {
226
- const tree = this.getUrlTree();
227
- const { queryParams } = tree;
228
- delete queryParams.sandboxWidth;
229
- delete queryParams.tuiMode;
230
- tree.queryParams = Object.assign(Object.assign({}, queryParams), tuiCleanObject(Object.assign({ tuiMode: this.mode }, params)));
231
- this.locationRef.go(this.urlStateHandler(tree));
232
- }
233
- createForm() {
234
- const { control, updateOn } = this;
235
- if (control) {
236
- this.testForm = new FormGroup({ testValue: control }, { updateOn });
237
- }
238
- }
239
- getUrlTree() {
240
- return this.urlSerializer.parse(this.locationRef.path());
241
- }
242
- get params() {
243
- return this.getUrlTree().queryParams;
244
- }
245
- }
246
- TuiDocDemoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocDemoComponent, deps: [{ token: TUI_ARROW_OPTIONS }, { token: TUI_IS_MOBILE }, { token: ElementRef }, { token: Location$1 }, { token: UrlSerializer }, { token: TUI_DOC_DEMO_TEXTS }, { token: TUI_DOC_URL_STATE_HANDLER }], target: i0.ɵɵFactoryTarget.Component });
247
- TuiDocDemoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocDemoComponent, selector: "tui-doc-demo", inputs: { control: "control", sticky: "sticky" }, host: { listeners: { "window:resize": "onResize()", "document:mouseup.silent": "onMouseUp()" }, properties: { "class._sticky": "this.sticky" } }, providers: [
248
- TuiDestroyService,
249
- {
250
- provide: TuiModeDirective,
251
- useExisting: forwardRef(() => TuiDocDemoComponent),
252
- },
253
- ], queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "resizeable", first: true, predicate: TuiResizeableDirective, descendants: true, static: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, static: true }, { propertyName: "resizer", first: true, predicate: ["resizer"], descendants: true, static: true }], ngImport: i0, template: "<div\n class=\"t-bg-toggle\"\n [tuiMode]=\"null\"\n>\n <ng-template #tooltip>\n {{ texts[0] }}\n <a\n routerLink=\"/directives/mode\"\n tuiLink\n tuiMode=\"onDark\"\n >\n <code>tuiMode</code>\n </a>\n </ng-template>\n <ng-container *ngIf=\"isMobile; else desktop\">\n <tui-select\n tuiTextfieldSize=\"s\"\n class=\"t-mode\"\n [ngModel]=\"mode\"\n [tuiHintContent]=\"tooltip\"\n [tuiTextfieldCleaner]=\"true\"\n (ngModelChange)=\"onModeChange($event)\"\n >\n tuiMode\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"items\"\n ></tui-data-list-wrapper>\n </tui-select>\n </ng-container>\n <ng-template #desktop>\n tuiMode:\n <tui-tooltip\n describeId=\"form\"\n [content]=\"tooltip\"\n ></tui-tooltip>\n <div\n tuiGroup\n class=\"t-group\"\n [collapsed]=\"true\"\n >\n <tui-radio-block\n nativeId=\"form\"\n size=\"s\"\n class=\"tui-group__auto-width-item\"\n [hideRadio]=\"true\"\n [item]=\"null\"\n [ngModel]=\"mode\"\n (ngModelChange)=\"onModeChange($event)\"\n >\n null\n </tui-radio-block>\n <tui-radio-block\n item=\"onDark\"\n nativeId=\"form\"\n size=\"s\"\n class=\"tui-group__auto-width-item\"\n [hideRadio]=\"true\"\n [ngModel]=\"mode\"\n (ngModelChange)=\"onModeChange($event)\"\n >\n onDark\n </tui-radio-block>\n <tui-radio-block\n item=\"onLight\"\n nativeId=\"form\"\n size=\"s\"\n class=\"tui-group__auto-width-item\"\n [hideRadio]=\"true\"\n [ngModel]=\"mode\"\n (ngModelChange)=\"onModeChange($event)\"\n >\n onLight\n </tui-radio-block>\n </div>\n </ng-template>\n <tui-checkbox-labeled\n size=\"m\"\n class=\"t-checkbox\"\n [ngModel]=\"opaque\"\n (ngModelChange)=\"changeOpaque($event)\"\n >\n {{ texts[1] }}\n </tui-checkbox-labeled>\n</div>\n<div\n tuiResizeable\n class=\"t-wrapper\"\n [class.t-wrapper_dark]=\"mode === 'onDark'\"\n [class.t-wrapper_gray]=\"mode === 'onLight'\"\n [class.t-wrapper_transparent]=\"!opaque\"\n>\n <div\n id=\"demo-content\"\n class=\"t-content\"\n >\n <div #content>\n <form\n *ngIf=\"testForm\"\n class=\"t-form\"\n [formGroup]=\"testForm\"\n >\n <div class=\"t-input-wrapper\">\n <ng-container [ngTemplateOutlet]=\"template\"></ng-container>\n </div>\n <button\n automation-id=\"tui-demo-button__toggle-details\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [iconRight]=\"icon\"\n (click)=\"toggleDetails()\"\n >\n {{ texts[2] }}\n </button>\n <ng-template #icon>\n <tui-svg\n class=\"t-icon\"\n [class.t-icon_rotated]=\"expanded\"\n [src]=\"options.iconSmall\"\n ></tui-svg>\n </ng-template>\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"expanded\"\n >\n <ng-template tuiExpandContent>\n <pre class=\"t-value\">Form data: {{ testForm.value | json }}</pre>\n <div\n tuiGroup\n class=\"t-form-controls\"\n >\n <tui-select\n automation-id=\"tui-demo-select__expand-update-on\"\n tuiTextfieldSize=\"s\"\n class=\"t-select\"\n [ngModel]=\"updateOn\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateOnChange($event)\"\n >\n updateOn\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"updateOnVariants\"\n ></tui-data-list-wrapper>\n </tui-select>\n <button\n automation-id=\"tui-demo-button__reset-state\"\n size=\"s\"\n tuiButton\n type=\"reset\"\n class=\"tui-group__auto-width-item\"\n >\n Reset\n </button>\n <button\n automation-id=\"tui-demo-button__submit-state\"\n size=\"s\"\n tuiButton\n type=\"submit\"\n class=\"tui-group__auto-width-item\"\n >\n Submit\n </button>\n </div>\n </ng-template>\n </tui-expand>\n </form>\n <ng-content></ng-content>\n </div>\n </div>\n <div\n #resizer\n class=\"t-resizer\"\n [tuiResizer]=\"[1, 0]\"\n (tuiSizeChange)=\"updateWidth($event[0])\"\n ></div>\n</div>\n", styles: [":host{position:relative;display:block;min-width:100%;margin:1.5rem 0}.t-bg-toggle{position:absolute;bottom:calc(100% + .75rem);display:flex;align-items:center;justify-content:flex-end;pointer-events:none;width:100%}.t-bg-toggle>*{pointer-events:auto}.t-wrapper{box-shadow:var(--tui-shadow-dropdown);display:flex;border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m);max-width:100%;min-height:6rem;width:100%;min-width:10rem;background-color:var(--tui-base-01);overflow:hidden}.t-wrapper.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-base-02) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-base-02) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-base-02) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-base-02) 75%);background-size:1.25rem 1.25rem;background-position:0 0,0 .625rem,.625rem -.625rem,-.625rem 0}.t-wrapper.t-wrapper_dark{background-color:#454e58;color:var(--tui-base-01)}.t-wrapper.t-wrapper_gray{background-color:#e5e7ea}.t-wrapper.t-wrapper_dark.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-focus) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-focus) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-focus) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-focus) 75%)}.t-wrapper.t-wrapper_gray.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-base-05) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-base-05) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-base-05) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-base-05) 75%)}:host-context(tui-root._mobile) .t-wrapper{min-height:auto}.t-content{flex:1 1 0;min-width:0;padding:1.5rem;box-sizing:border-box;overflow:hidden}:host-context(tui-root._mobile) .t-content{padding:1rem}.t-form{display:flex;flex-wrap:wrap;align-items:flex-start}.t-input-wrapper{width:100%;margin-bottom:.5rem}.t-expand{width:100%}.t-icon{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-icon_rotated{transform:rotate(180deg)}.t-value{flex:1;background:var(--tui-clear-inverse);padding:.75rem;border-radius:.25rem}.t-mode{width:12.5rem}.t-select{max-width:15rem}.t-resizer{box-shadow:var(--tui-shadow-dropdown);position:relative;width:3.5rem;min-height:inherit;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-left:1px solid var(--tui-base-03);outline:none;background:var(--tui-base-01);color:var(--tui-text-01)}.t-resizer:before,.t-resizer:after{content:\"\";position:absolute;top:.75rem;left:50%;bottom:calc(50% + 1rem);width:1px;background:var(--tui-base-04);box-shadow:-.25rem 0 var(--tui-base-04);transform:translate(0)}.t-resizer:after{bottom:.75rem;top:calc(50% + 1rem)}:host-context(tui-root._mobile) .t-resizer{display:none}.t-resizer-text{font:var(--tui-font-text-s);position:relative;z-index:1;padding:.75rem;background:var(--tui-base-01)}.wrapper_light .t-resizer-text{background:#3e464e}.t-group,.t-checkbox{margin-left:.75rem}.t-button,.t-form-controls{margin-top:.75rem}@supports ((position: -webkit-sticky) or (position: sticky)){@media screen and (min-height: 37.5rem){:host._sticky{position:-webkit-sticky;position:sticky;top:4.625rem;z-index:2}}}\n"], components: [{ type: i2.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { type: i1.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { type: i1.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items"] }, { type: i2.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }, { type: i1.TuiRadioBlockComponent, selector: "tui-radio-block", inputs: ["item", "identityMatcher", "contentAlign", "size", "hideRadio", "pseudoDisabled"] }, { type: i1.TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: ["size"] }, { type: i2.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i2.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i2.TuiExpandComponent, selector: "tui-expand", inputs: ["async", "expanded"] }], directives: [{ type: i2.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i6.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.TuiSelectDirective, selector: "tui-select" }, { type: i2.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2.TuiHintOptionsDirective, selector: "[tuiHintContent]", inputs: ["tuiHintContent", "tuiHintDirection", "tuiHintAppearance", "tuiHintShowDelay", "tuiHintHideDelay"] }, { type: i2.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { type: i2.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i2.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: i6$1.TuiResizeableDirective, selector: "[tuiResizeable]" }, { type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2.TuiExpandContentDirective, selector: "[tuiExpandContent]" }, { type: i6$1.TuiResizerDirective, selector: "[tuiResizer]", inputs: ["tuiResizer"], outputs: ["tuiSizeChange"] }], pipes: { "json": i4.JsonPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
254
- __decorate([
255
- tuiPure
256
- ], TuiDocDemoComponent.prototype, "updateUrl", null);
257
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocDemoComponent, decorators: [{
258
- type: Component,
259
- args: [{
260
- selector: 'tui-doc-demo',
261
- templateUrl: './demo.template.html',
262
- styleUrls: ['./demo.style.less'],
263
- changeDetection: ChangeDetectionStrategy.OnPush,
264
- providers: [
265
- TuiDestroyService,
266
- {
267
- provide: TuiModeDirective,
268
- useExisting: forwardRef(() => TuiDocDemoComponent),
269
- },
270
- ],
271
- }]
272
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
273
- type: Inject,
274
- args: [TUI_ARROW_OPTIONS]
275
- }] }, { type: undefined, decorators: [{
276
- type: Inject,
277
- args: [TUI_IS_MOBILE]
278
- }] }, { type: i0.ElementRef, decorators: [{
279
- type: Inject,
280
- args: [ElementRef]
281
- }] }, { type: i4.Location, decorators: [{
282
- type: Inject,
283
- args: [Location$1]
284
- }] }, { type: i6.UrlSerializer, decorators: [{
285
- type: Inject,
286
- args: [UrlSerializer]
287
- }] }, { type: undefined, decorators: [{
288
- type: Inject,
289
- args: [TUI_DOC_DEMO_TEXTS]
290
- }] }, { type: undefined, decorators: [{
291
- type: Inject,
292
- args: [TUI_DOC_URL_STATE_HANDLER]
293
- }] }]; }, propDecorators: { resizeable: [{
294
- type: ViewChild,
295
- args: [TuiResizeableDirective, { static: true }]
296
- }], content: [{
297
- type: ViewChild,
298
- args: ['content', { static: true }]
299
- }], resizer: [{
300
- type: ViewChild,
301
- args: ['resizer', { static: true }]
302
- }], control: [{
303
- type: Input
304
- }], sticky: [{
305
- type: Input
306
- }, {
307
- type: HostBinding,
308
- args: ['class._sticky']
309
- }], template: [{
310
- type: ContentChild,
311
- args: [TemplateRef]
312
- }], onResize: [{
313
- type: HostListener,
314
- args: ['window:resize']
315
- }], onMouseUp: [{
316
- type: HostListener,
317
- args: ['document:mouseup.silent']
318
- }], updateUrl: [] } });
319
-
320
- class TuiDocDemoModule {
321
- }
322
- TuiDocDemoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocDemoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
323
- TuiDocDemoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocDemoModule, declarations: [TuiDocDemoComponent], imports: [CommonModule,
324
- ReactiveFormsModule,
325
- FormsModule,
326
- RouterModule,
327
- TuiLinkModule,
328
- TuiButtonModule,
329
- TuiSelectModule,
330
- TuiExpandModule,
331
- TuiGroupModule,
332
- TuiTooltipModule,
333
- TuiModeModule,
334
- TuiRadioBlockModule,
335
- TuiCheckboxLabeledModule,
336
- TuiSvgModule,
337
- TuiDataListWrapperModule,
338
- TuiDataListModule,
339
- TuiTextfieldControllerModule,
340
- TuiHintModule,
341
- TuiResizerModule], exports: [TuiDocDemoComponent] });
342
- TuiDocDemoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocDemoModule, imports: [[
343
- CommonModule,
344
- ReactiveFormsModule,
345
- FormsModule,
346
- RouterModule,
347
- TuiLinkModule,
348
- TuiButtonModule,
349
- TuiSelectModule,
350
- TuiExpandModule,
351
- TuiGroupModule,
352
- TuiTooltipModule,
353
- TuiModeModule,
354
- TuiRadioBlockModule,
355
- TuiCheckboxLabeledModule,
356
- TuiSvgModule,
357
- TuiDataListWrapperModule,
358
- TuiDataListModule,
359
- TuiTextfieldControllerModule,
360
- TuiHintModule,
361
- TuiResizerModule,
362
- ]] });
363
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocDemoModule, decorators: [{
364
- type: NgModule,
365
- args: [{
366
- imports: [
367
- CommonModule,
368
- ReactiveFormsModule,
369
- FormsModule,
370
- RouterModule,
371
- TuiLinkModule,
372
- TuiButtonModule,
373
- TuiSelectModule,
374
- TuiExpandModule,
375
- TuiGroupModule,
376
- TuiTooltipModule,
377
- TuiModeModule,
378
- TuiRadioBlockModule,
379
- TuiCheckboxLabeledModule,
380
- TuiSvgModule,
381
- TuiDataListWrapperModule,
382
- TuiDataListModule,
383
- TuiTextfieldControllerModule,
384
- TuiHintModule,
385
- TuiResizerModule,
386
- ],
387
- declarations: [TuiDocDemoComponent],
388
- exports: [TuiDocDemoComponent],
389
- }]
390
- }] });
391
-
392
- const SERIALIZED_SUFFIX = '$';
393
- // @bad TODO: refactor output and value sync
394
- class TuiDocDocumentationPropertyConnectorDirective {
395
- constructor(template, locationRef, activatedRoute, urlSerializer, urlStateHandler) {
396
- this.template = template;
397
- this.locationRef = locationRef;
398
- this.activatedRoute = activatedRoute;
399
- this.urlSerializer = urlSerializer;
400
- this.urlStateHandler = urlStateHandler;
401
- this.documentationPropertyName = '';
402
- this.documentationPropertyMode = null;
403
- this.documentationPropertyType = '';
404
- this.documentationPropertyDeprecated = false;
405
- this.documentationPropertyValues = null;
406
- this.documentationPropertyValueChange = new EventEmitter();
407
- this.changed$ = new Subject();
408
- this.emits$ = new BehaviorSubject(1);
409
- }
410
- ngOnInit() {
411
- this.parseParams(this.activatedRoute.snapshot.queryParams);
412
- }
413
- get attrName() {
414
- switch (this.documentationPropertyMode) {
415
- case 'input':
416
- return `[${this.documentationPropertyName}]`;
417
- case 'output':
418
- return `(${this.documentationPropertyName})`;
419
- case 'input-output':
420
- return `[(${this.documentationPropertyName})]`;
421
- default:
422
- return this.documentationPropertyName;
423
- }
424
- }
425
- get hasItems() {
426
- return !!this.documentationPropertyValues;
427
- }
428
- get shouldShowValues() {
429
- return this.documentationPropertyMode !== 'output';
430
- }
431
- ngOnChanges() {
432
- this.changed$.next();
433
- }
434
- onValueChange(value) {
435
- this.documentationPropertyValue = value;
436
- this.documentationPropertyValueChange.emit(value);
437
- this.setQueryParam(value);
438
- }
439
- emitEvent(event) {
440
- // For more convenient debugging
441
- console.info(this.attrName, event);
442
- this.emits$.next(this.emits$.value + 1);
443
- }
444
- parseParams(params) {
445
- const propertyValue = params[this.documentationPropertyName];
446
- const propertyValueWithSuffix = params[`${this.documentationPropertyName}${SERIALIZED_SUFFIX}`];
447
- if (!propertyValue && !propertyValueWithSuffix) {
448
- return;
449
- }
450
- let value = !!propertyValueWithSuffix && this.documentationPropertyValues
451
- ? this.documentationPropertyValues[propertyValueWithSuffix]
452
- : tuiCoerceValue(propertyValue);
453
- if (this.documentationPropertyType === 'string' && tuiIsNumber(value)) {
454
- value = value.toString();
455
- }
456
- this.onValueChange(value);
457
- }
458
- setQueryParam(value) {
459
- const tree = this.urlSerializer.parse(this.locationRef.path());
460
- const isValueAvailableByKey = value instanceof Object;
461
- const computedValue = isValueAvailableByKey && this.documentationPropertyValues
462
- ? this.documentationPropertyValues.indexOf(value)
463
- : value;
464
- const suffix = isValueAvailableByKey ? SERIALIZED_SUFFIX : '';
465
- const propName = this.documentationPropertyName + suffix;
466
- tree.queryParams = Object.assign(Object.assign({}, tree.queryParams), { [propName]: computedValue });
467
- this.locationRef.go(this.urlStateHandler(tree));
468
- }
469
- }
470
- TuiDocDocumentationPropertyConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocDocumentationPropertyConnectorDirective, deps: [{ token: TemplateRef }, { token: Location$1 }, { token: ActivatedRoute }, { token: UrlSerializer }, { token: TUI_DOC_URL_STATE_HANDLER }], target: i0.ɵɵFactoryTarget.Directive });
471
- TuiDocDocumentationPropertyConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocDocumentationPropertyConnectorDirective, selector: "ng-template[documentationPropertyName]", inputs: { documentationPropertyName: "documentationPropertyName", documentationPropertyMode: "documentationPropertyMode", documentationPropertyType: "documentationPropertyType", documentationPropertyValue: "documentationPropertyValue", documentationPropertyDeprecated: "documentationPropertyDeprecated", documentationPropertyValues: "documentationPropertyValues" }, outputs: { documentationPropertyValueChange: "documentationPropertyValueChange" }, exportAs: ["documentationProperty"], usesOnChanges: true, ngImport: i0 });
472
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocDocumentationPropertyConnectorDirective, decorators: [{
473
- type: Directive,
474
- args: [{
475
- selector: 'ng-template[documentationPropertyName]',
476
- exportAs: 'documentationProperty',
477
- }]
478
- }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
479
- type: Inject,
480
- args: [TemplateRef]
481
- }] }, { type: i4.Location, decorators: [{
482
- type: Inject,
483
- args: [Location$1]
484
- }] }, { type: i6.ActivatedRoute, decorators: [{
485
- type: Inject,
486
- args: [ActivatedRoute]
487
- }] }, { type: i6.UrlSerializer, decorators: [{
488
- type: Inject,
489
- args: [UrlSerializer]
490
- }] }, { type: undefined, decorators: [{
491
- type: Inject,
492
- args: [TUI_DOC_URL_STATE_HANDLER]
493
- }] }]; }, propDecorators: { documentationPropertyName: [{
494
- type: Input
495
- }], documentationPropertyMode: [{
496
- type: Input
497
- }], documentationPropertyType: [{
498
- type: Input
499
- }], documentationPropertyValue: [{
500
- type: Input
501
- }], documentationPropertyDeprecated: [{
502
- type: Input
503
- }], documentationPropertyValues: [{
504
- type: Input
505
- }], documentationPropertyValueChange: [{
506
- type: Output
507
- }] } });
508
-
509
- class TuiGetColorPipe {
510
- transform(color) {
511
- if (color.length === 4) {
512
- return color
513
- .split(``)
514
- .reduce((result, current) => [...result, current, current], [])
515
- .join(``)
516
- .replace(`#`, ``);
517
- }
518
- if (color.startsWith(`#`)) {
519
- return color;
520
- }
521
- if (color === `transparent`) {
522
- return `#000000`;
523
- }
524
- const parsed = color
525
- .replace(`rgb(`, ``)
526
- .replace(`rgba(`, ``)
527
- .replace(`)`, ``)
528
- .replace(` `, ``)
529
- .split(`,`)
530
- .map(v => Number.parseInt(v, 10));
531
- return tuiRgbToHex(...parsed);
532
- }
533
- }
534
- TuiGetColorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiGetColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
535
- TuiGetColorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiGetColorPipe, name: "tuiGetColorPipe" });
536
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiGetColorPipe, decorators: [{
537
- type: Pipe,
538
- args: [{ name: `tuiGetColorPipe` }]
539
- }] });
540
-
541
- class TuiGetOpacityPipe {
542
- transform(color) {
543
- if (color.startsWith(`#`) || color.startsWith(`rgb(`)) {
544
- return 100;
545
- }
546
- if (color === `transparent`) {
547
- return 0;
548
- }
549
- const lastComma = color.lastIndexOf(`,`);
550
- const parsed = color
551
- .slice(lastComma)
552
- .replace(`)`, ``)
553
- .replace(` `, ``)
554
- .replace(`,`, ``);
555
- return Math.round(Number.parseFloat(parsed) * 100);
556
- }
557
- }
558
- TuiGetOpacityPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiGetOpacityPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
559
- TuiGetOpacityPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiGetOpacityPipe, name: "tuiGetOpacity" });
560
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiGetOpacityPipe, decorators: [{
561
- type: Pipe,
562
- args: [{ name: `tuiGetOpacity` }]
563
- }] });
564
-
565
- class TuiInputOpacityDirective {
566
- constructor(renderer, focusable) {
567
- this.renderer = renderer;
568
- this.focusable = focusable;
569
- }
570
- set tuiInputOpacity(opacity) {
571
- const { nativeFocusableElement } = this.focusable;
572
- if (nativeFocusableElement) {
573
- this.renderer.setStyle(nativeFocusableElement, 'opacity', opacity / 100);
574
- }
575
- }
576
- }
577
- TuiInputOpacityDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiInputOpacityDirective, deps: [{ token: Renderer2 }, { token: TUI_FOCUSABLE_ITEM_ACCESSOR }], target: i0.ɵɵFactoryTarget.Directive });
578
- TuiInputOpacityDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputOpacityDirective, selector: "[tuiInputOpacity]", inputs: { tuiInputOpacity: "tuiInputOpacity" }, ngImport: i0 });
579
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiInputOpacityDirective, decorators: [{
580
- type: Directive,
581
- args: [{
582
- selector: '[tuiInputOpacity]',
583
- }]
584
- }], ctorParameters: function () { return [{ type: i0.Renderer2, decorators: [{
585
- type: Inject,
586
- args: [Renderer2]
587
- }] }, { type: undefined, decorators: [{
588
- type: Inject,
589
- args: [TUI_FOCUSABLE_ITEM_ACCESSOR]
590
- }] }]; }, propDecorators: { tuiInputOpacity: [{
591
- type: Input
592
- }] } });
593
-
594
- class TuiStripOptionalPipe {
595
- transform(name) {
596
- return name.replace(`?`, ``);
597
- }
598
- }
599
- TuiStripOptionalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiStripOptionalPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
600
- TuiStripOptionalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiStripOptionalPipe, name: "tuiStripOptionalPipe" });
601
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiStripOptionalPipe, decorators: [{
602
- type: Pipe,
603
- args: [{ name: `tuiStripOptionalPipe` }]
604
- }] });
605
-
606
- class TuiIsOptionalPipe {
607
- transform(name) {
608
- return name.includes(`?`);
609
- }
610
- }
611
- TuiIsOptionalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIsOptionalPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
612
- TuiIsOptionalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIsOptionalPipe, name: "tuiIsOptionalPipe" });
613
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIsOptionalPipe, decorators: [{
614
- type: Pipe,
615
- args: [{ name: `tuiIsOptionalPipe` }]
616
- }] });
617
-
618
- class TuiDocTypeReferencePipe {
619
- constructor(parser, linkHandler) {
620
- this.parser = parser;
621
- this.linkHandler = linkHandler;
622
- }
623
- transform(original) {
624
- return this.parser(original)
625
- .map(({ type, extracted }) => {
626
- var _a, _b;
627
- return ({
628
- type,
629
- extracted,
630
- reference: (_b = (_a = this.linkHandler) === null || _a === void 0 ? void 0 : _a.call(this, extracted)) !== null && _b !== void 0 ? _b : null,
631
- });
632
- })
633
- .sort((a, b) => { var _a, _b, _c; return (_c = (_a = b.reference) === null || _a === void 0 ? void 0 : _a.localeCompare((_b = a.reference) !== null && _b !== void 0 ? _b : ``)) !== null && _c !== void 0 ? _c : -1; });
634
- }
635
- }
636
- TuiDocTypeReferencePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocTypeReferencePipe, deps: [{ token: TUI_DOC_TYPE_REFERENCE_PARSER }, { token: TUI_DOC_TYPE_REFERENCE_HANDLER }], target: i0.ɵɵFactoryTarget.Pipe });
637
- TuiDocTypeReferencePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocTypeReferencePipe, name: "tuiDocTypeReference" });
638
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocTypeReferencePipe, decorators: [{
639
- type: Pipe,
640
- args: [{ name: `tuiDocTypeReference` }]
641
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
642
- type: Inject,
643
- args: [TUI_DOC_TYPE_REFERENCE_PARSER]
644
- }] }, { type: undefined, decorators: [{
645
- type: Inject,
646
- args: [TUI_DOC_TYPE_REFERENCE_HANDLER]
647
- }] }]; } });
648
-
649
- class TuiShowCleanerPipe {
650
- transform(type) {
651
- return type.includes(`null`);
652
- }
653
- }
654
- TuiShowCleanerPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiShowCleanerPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
655
- TuiShowCleanerPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiShowCleanerPipe, name: "tuiShowCleanerPipe" });
656
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiShowCleanerPipe, decorators: [{
657
- type: Pipe,
658
- args: [{ name: `tuiShowCleanerPipe` }]
659
- }] });
660
-
661
- class TuiInspectPipe {
662
- constructor(isE2E) {
663
- this.isE2E = isE2E;
664
- }
665
- transform(value, depth = 2) {
666
- if (this.isE2E && typeof value === `function`) {
667
- /**
668
- * @description:
669
- * When developing in production mode the webpack bundler minify
670
- * functions in different ways, then due to which the string content
671
- * of the function may differ from build to build, which can be to
672
- * various problems when screenshot testing on e2e.
673
- */
674
- return `λ(x) => y`;
675
- }
676
- return tuiInspectAny(value, depth);
677
- }
678
- }
679
- TuiInspectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiInspectPipe, deps: [{ token: TUI_IS_E2E }], target: i0.ɵɵFactoryTarget.Pipe });
680
- TuiInspectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiInspectPipe, name: "tuiInspectAny" });
681
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiInspectPipe, decorators: [{
682
- type: Pipe,
683
- args: [{ name: `tuiInspectAny` }]
684
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
685
- type: Inject,
686
- args: [TUI_IS_E2E]
687
- }] }]; } });
688
-
689
- class TuiIsPrimitivePolymorpheusContentPipe {
690
- transform(value) {
691
- return tuiIsString(value) || tuiIsNumber(value);
692
- }
693
- }
694
- TuiIsPrimitivePolymorpheusContentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIsPrimitivePolymorpheusContentPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
695
- TuiIsPrimitivePolymorpheusContentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIsPrimitivePolymorpheusContentPipe, name: "tuiIsPrimitivePolymorpheusContentPipe" });
696
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiIsPrimitivePolymorpheusContentPipe, decorators: [{
697
- type: Pipe,
698
- args: [{ name: `tuiIsPrimitivePolymorpheusContentPipe` }]
699
- }] });
700
-
701
- // @bad TODO subscribe propertiesConnectors changes
702
- // @bad TODO refactor to make more flexible
703
- class TuiDocDocumentationComponent {
704
- constructor(cdr, texts, excludedProperties, destroy$, getColor, getOpacity) {
705
- this.cdr = cdr;
706
- this.texts = texts;
707
- this.excludedProperties = excludedProperties;
708
- this.destroy$ = destroy$;
709
- this.getColor = getColor;
710
- this.getOpacity = getOpacity;
711
- this.heading = '';
712
- this.showValues = true;
713
- this.isAPI = false;
714
- this.propertiesConnectors = EMPTY_QUERY;
715
- this.activeItemIndex = 0;
716
- this.matcher = (item, exclusions) => !exclusions.has(item.documentationPropertyName);
717
- }
718
- ngAfterContentInit() {
719
- tuiQueryListChanges(this.propertiesConnectors)
720
- .pipe(switchMap(items => merge(...items.map(({ changed$ }) => changed$))), tuiWatch(this.cdr), takeUntil(this.destroy$))
721
- .subscribe();
722
- }
723
- get type() {
724
- return this.isAPI ? this.texts[0] : this.texts[1];
725
- }
726
- onColorChange(connector, color) {
727
- const opacity = this.getOpacity.transform(connector.documentationPropertyValue || '');
728
- if (opacity === 100) {
729
- connector.onValueChange(color);
730
- return;
731
- }
732
- const rgb = tuiHexToRgb(color).join(', ');
733
- const result = `rgba(${rgb}, ${opacity / 100})`;
734
- connector.onValueChange(result);
735
- }
736
- onOpacityChange(connector, opacity) {
737
- const hex = this.getColor.transform(connector.documentationPropertyValue || '');
738
- const rgb = tuiHexToRgb(hex);
739
- const result = `rgba(${rgb}, ${(opacity || 0) / 100})`;
740
- connector.onValueChange(result);
741
- }
742
- }
743
- TuiDocDocumentationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocDocumentationComponent, deps: [{ token: ChangeDetectorRef }, { token: TUI_DOC_DOCUMENTATION_TEXTS }, { token: TUI_DOC_EXCLUDED_PROPERTIES }, { token: TuiDestroyService, self: true }, { token: TuiGetColorPipe }, { token: TuiGetOpacityPipe }], target: i0.ɵɵFactoryTarget.Component });
744
- TuiDocDocumentationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocDocumentationComponent, selector: "tui-doc-documentation", inputs: { heading: "heading", showValues: "showValues", isAPI: "isAPI" }, providers: [TuiGetColorPipe, TuiGetOpacityPipe, TuiDestroyService], queries: [{ propertyName: "propertiesConnectors", predicate: TuiDocDocumentationPropertyConnectorDirective }], ngImport: i0, template: "<h1\n *ngIf=\"heading\"\n class=\"t-heading\"\n>\n {{ heading }}\n</h1>\n<ng-content></ng-content>\n<ng-container *ngIf=\"$any(propertiesConnectors) | tuiFilter: matcher : excludedProperties as properties\">\n <table\n *ngIf=\"properties.length\"\n class=\"t-table\"\n >\n <tr class=\"t-row t-row_header\">\n <th class=\"t-th t-cell t-cell_prop\">{{ texts[2] }}</th>\n <th class=\"t-th\">{{ type }}</th>\n <th\n *ngIf=\"showValues && !isAPI\"\n class=\"t-th t-cell t-th_value\"\n >\n {{ texts[3] }}\n </th>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of properties\"\n class=\"t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated\"\n >\n <td class=\"t-cell\">\n <div\n automation-id=\"tui-documentation__property-name\"\n class=\"t-property\"\n >\n <code [style.color]=\"'var(--tui-accent-active)'\">\n {{ propertyConnector.attrName | tuiStripOptionalPipe }}\n </code>\n <tui-badge\n *ngIf=\"propertyConnector.attrName | tuiIsOptionalPipe\"\n size=\"s\"\n value=\"Optional\"\n ></tui-badge>\n </div>\n <span\n *ngIf=\"propertyConnector.documentationPropertyDeprecated\"\n class=\"t-deprecated-label\"\n >\n deprecated\n </span>\n <ng-container [ngTemplateOutlet]=\"propertyConnector.template\"></ng-container>\n </td>\n <td class=\"t-cell\">\n <span class=\"type\">\n <code class=\"t-code-type\">\n <ng-container\n *ngFor=\"\n let item of propertyConnector.documentationPropertyType | tuiDocTypeReference;\n let last = last\n \"\n >\n <a\n *ngIf=\"item.reference; else default\"\n target=\"_blank\"\n class=\"t-code-reference\"\n [attr.href]=\"item.reference\"\n >\n {{ item.type }}\n </a>\n <ng-template #default>\n {{ item.type }}\n </ng-template>\n <span *ngIf=\"!last\">&nbsp;|&nbsp;</span>\n </ng-container>\n </code>\n </span>\n </td>\n <td\n *ngIf=\"showValues\"\n class=\"t-cell t-cell_value\"\n >\n <ng-container *ngIf=\"propertyConnector.shouldShowValues; else elseEmitter\">\n <tui-select\n *ngIf=\"propertyConnector.hasItems; else noItems\"\n tuiDropdownLimitWidth=\"min\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [tuiTextfieldCleaner]=\"propertyConnector.documentationPropertyType | tuiShowCleanerPipe\"\n [tuiTextfieldLabelOutside]=\"true\"\n [valueContent]=\"selectContent\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n >\n <code class=\"t-exception\">null</code>\n <tui-data-list-wrapper\n *tuiDataList\n [itemContent]=\"selectContent\"\n [items]=\"propertyConnector.documentationPropertyValues\"\n ></tui-data-list-wrapper>\n </tui-select>\n <ng-template\n #selectContent\n let-data\n >\n <code>{{ data | tuiInspectAny }}</code>\n </ng-template>\n\n <ng-template #noItems>\n <ng-container [ngSwitch]=\"propertyConnector.documentationPropertyType\">\n <tui-toggle\n *ngSwitchCase=\"'boolean'\"\n size=\"l\"\n [nativeId]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [showIcons]=\"true\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-toggle>\n\n <tui-primitive-textfield\n *ngSwitchCase=\"'string'\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldCleaner]=\"true\"\n [tuiTextfieldLabelOutside]=\"true\"\n [value]=\"propertyConnector.documentationPropertyValue || ''\"\n (valueChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-primitive-textfield>\n\n <div\n *ngSwitchCase=\"'color'\"\n tuiGroup\n >\n <tui-primitive-textfield\n tuiTextfieldSize=\"m\"\n [attr.id]=\"propertyConnector.attrName\"\n [tuiInputOpacity]=\"propertyConnector.documentationPropertyValue | tuiGetOpacity\"\n [tuiTextfieldLabelOutside]=\"true\"\n [value]=\"propertyConnector.documentationPropertyValue | tuiGetColorPipe\"\n (valueChange)=\"onColorChange(propertyConnector, $event)\"\n >\n <input\n tuiTextfield\n type=\"text\"\n />\n </tui-primitive-textfield>\n <tui-input-number\n tuiTextfieldSize=\"m\"\n [max]=\"100\"\n [min]=\"0\"\n [ngModel]=\"propertyConnector.documentationPropertyValue | tuiGetOpacity\"\n [step]=\"1\"\n (ngModelChange)=\"onOpacityChange(propertyConnector, $event)\"\n >\n Opacity\n </tui-input-number>\n </div>\n\n <tui-input-number\n *ngSwitchCase=\"'number'\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [step]=\"1\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"propertyConnector.onValueChange($event || 0)\"\n ></tui-input-number>\n\n <ng-container *ngSwitchCase=\"'PolymorpheusContent'\">\n <tui-primitive-textfield\n *ngIf=\"\n propertyConnector.documentationPropertyValue\n | tuiIsPrimitivePolymorpheusContentPipe\n \"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldCleaner]=\"true\"\n [tuiTextfieldLabelOutside]=\"true\"\n [value]=\"propertyConnector.documentationPropertyValue.toString()\"\n (valueChange)=\"propertyConnector.onValueChange($event)\"\n >\n Default content\n </tui-primitive-textfield>\n </ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-template #elseEmitter>\n <tui-notification\n class=\"t-output\"\n [@emitEvent]=\"propertyConnector.emits$ | async\"\n >\n Emit!\n </tui-notification>\n </ng-template>\n </td>\n </tr>\n </table>\n</ng-container>\n", styles: [":host{display:block;min-width:100%}.t-table{width:100%;table-layout:fixed}.t-row:not(:last-child){border-bottom:1px solid var(--tui-base-03)}:host-context(tui-root._mobile) .t-row{display:flex;flex-wrap:wrap}:host-context(tui-root._mobile) .t-row_header{display:none}.t-cell{padding:1rem 1rem .875rem}.t-cell:first-child{padding-left:0}.t-cell:last-child{padding-right:0}.t-cell_prop{width:40%}.t-cell_value{text-align:right}:host-context(tui-root._mobile) .t-cell{width:100%;height:auto;padding:.5rem 0;text-align:left}.t-th{padding:.5rem 1rem;color:var(--tui-text-02);font-weight:normal;text-align:left}.t-th_value{max-width:20rem;text-align:right}:host-context(tui-root._mobile) .t-th_value{width:9.375rem}.t-property{font:var(--tui-font-text-m);margin-bottom:.25rem;font-family:monospace;color:#8f75d1}:host-context(tui-root._mobile) .t-property{padding:.5rem 0}.t-type{font-family:monospace}.t-deprecated{background-color:var(--tui-error-bg);box-shadow:-1rem 0 var(--tui-error-bg),1rem 0 var(--tui-error-bg)}.t-deprecated-label{margin-right:.125rem;color:var(--tui-error-fill)}.t-exception{display:block;width:-webkit-max-content;width:max-content}.t-output{text-align:left;opacity:0}.t-heading{font:var(--tui-font-heading-4)}.t-code-type{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start}.t-code-reference{display:inline-flex;color:var(--tui-link);text-decoration:none;align-items:center;justify-content:center;grid-gap:3px;gap:3px}.t-code-reference:after{content:\"\";font-size:1rem;width:1rem;height:1rem;background:currentColor;-webkit-mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1rem\" height=\"1rem\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"></path><polyline points=\"15 3 21 3 21 9\"></polyline><line x1=\"10\" y1=\"14\" x2=\"21\" y2=\"3\"></line></svg>') center / 100%;mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1rem\" height=\"1rem\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"></path><polyline points=\"15 3 21 3 21 9\"></polyline><line x1=\"10\" y1=\"14\" x2=\"21\" y2=\"3\"></line></svg>') center / 100%}\n"], components: [{ type: i1.TuiBadgeComponent, selector: "tui-badge", inputs: ["value", "size", "status", "hoverable"] }, { type: i1.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { type: i1.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items"] }, { type: i1.TuiToggleComponent, selector: "tui-toggle", inputs: ["singleColor", "showIcons", "showLoader", "size"] }, { type: i2.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i2.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { type: i1.TuiInputNumberComponent, selector: "tui-input-number", inputs: ["min", "max", "decimal", "precision", "step", "prefix", "postfix"] }, { type: i2.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "size", "hideClose"], outputs: ["close"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.TuiSelectDirective, selector: "tui-select" }, { type: i2.TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownAppearance], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: ["tuiDropdownAlign", "tuiDropdownAppearance", "tuiDropdownDirection", "tuiDropdownLimitWidth", "tuiDropdownMinHeight", "tuiDropdownMaxHeight", "tuiDropdownOffset"] }, { type: i2.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { type: i2.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { type: i2.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i2.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: TuiInputOpacityDirective, selector: "[tuiInputOpacity]", inputs: ["tuiInputOpacity"] }, { type: i1.TuiInputNumberDirective, selector: "tui-input-number" }], pipes: { "tuiFilter": i6$1.TuiFilterPipe, "tuiStripOptionalPipe": TuiStripOptionalPipe, "tuiIsOptionalPipe": TuiIsOptionalPipe, "tuiDocTypeReference": TuiDocTypeReferencePipe, "tuiShowCleanerPipe": TuiShowCleanerPipe, "tuiInspectAny": TuiInspectPipe, "tuiGetOpacity": TuiGetOpacityPipe, "tuiGetColorPipe": TuiGetColorPipe, "tuiIsPrimitivePolymorpheusContentPipe": TuiIsPrimitivePolymorpheusContentPipe, "async": i4.AsyncPipe }, animations: [
745
- trigger('emitEvent', [
746
- transition(':increment', [style({ opacity: 1 }), animate('500ms ease-in')]),
747
- ]),
748
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
749
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocDocumentationComponent, decorators: [{
750
- type: Component,
751
- args: [{
752
- selector: 'tui-doc-documentation',
753
- templateUrl: './documentation.template.html',
754
- styleUrls: ['./documentation.style.less'],
755
- changeDetection: ChangeDetectionStrategy.OnPush,
756
- providers: [TuiGetColorPipe, TuiGetOpacityPipe, TuiDestroyService],
757
- animations: [
758
- trigger('emitEvent', [
759
- transition(':increment', [style({ opacity: 1 }), animate('500ms ease-in')]),
760
- ]),
761
- ],
762
- }]
763
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef, decorators: [{
764
- type: Inject,
765
- args: [ChangeDetectorRef]
766
- }] }, { type: undefined, decorators: [{
767
- type: Inject,
768
- args: [TUI_DOC_DOCUMENTATION_TEXTS]
769
- }] }, { type: Set, decorators: [{
770
- type: Inject,
771
- args: [TUI_DOC_EXCLUDED_PROPERTIES]
772
- }] }, { type: i6$1.TuiDestroyService, decorators: [{
773
- type: Self
774
- }, {
775
- type: Inject,
776
- args: [TuiDestroyService]
777
- }] }, { type: TuiGetColorPipe, decorators: [{
778
- type: Inject,
779
- args: [TuiGetColorPipe]
780
- }] }, { type: TuiGetOpacityPipe, decorators: [{
781
- type: Inject,
782
- args: [TuiGetOpacityPipe]
783
- }] }]; }, propDecorators: { heading: [{
784
- type: Input
785
- }], showValues: [{
786
- type: Input
787
- }], isAPI: [{
788
- type: Input
789
- }], propertiesConnectors: [{
790
- type: ContentChildren,
791
- args: [TuiDocDocumentationPropertyConnectorDirective]
792
- }] } });
793
-
794
- class TuiInputOpacityModule {
795
- }
796
- TuiInputOpacityModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiInputOpacityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
797
- TuiInputOpacityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiInputOpacityModule, declarations: [TuiInputOpacityDirective], exports: [TuiInputOpacityDirective] });
798
- TuiInputOpacityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiInputOpacityModule });
799
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiInputOpacityModule, decorators: [{
800
- type: NgModule,
801
- args: [{
802
- declarations: [TuiInputOpacityDirective],
803
- exports: [TuiInputOpacityDirective],
804
- }]
805
- }] });
806
-
807
- class TuiDocDocumentationModule {
808
- }
809
- TuiDocDocumentationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocDocumentationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
810
- TuiDocDocumentationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocDocumentationModule, declarations: [TuiInspectPipe,
811
- TuiGetColorPipe,
812
- TuiGetOpacityPipe,
813
- TuiIsOptionalPipe,
814
- TuiShowCleanerPipe,
815
- TuiStripOptionalPipe,
816
- TuiDocTypeReferencePipe,
817
- TuiDocDocumentationComponent,
818
- TuiIsPrimitivePolymorpheusContentPipe,
819
- TuiDocDocumentationPropertyConnectorDirective], imports: [CommonModule,
820
- FormsModule,
821
- RouterModule,
822
- TuiBadgeModule,
823
- TuiSelectModule,
824
- TuiToggleModule,
825
- TuiLinkModule,
826
- TuiInputNumberModule,
827
- TuiModeModule,
828
- TuiGroupModule,
829
- TuiInputOpacityModule,
830
- TuiPrimitiveTextfieldModule,
831
- TuiTextfieldControllerModule,
832
- TuiDropdownModule,
833
- TuiDataListModule,
834
- TuiDataListWrapperModule,
835
- TuiNotificationModule,
836
- TuiFilterPipeModule], exports: [TuiDocDocumentationComponent,
837
- TuiDocDocumentationPropertyConnectorDirective] });
838
- TuiDocDocumentationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocDocumentationModule, imports: [[
839
- CommonModule,
840
- FormsModule,
841
- RouterModule,
842
- TuiBadgeModule,
843
- TuiSelectModule,
844
- TuiToggleModule,
845
- TuiLinkModule,
846
- TuiInputNumberModule,
847
- TuiModeModule,
848
- TuiGroupModule,
849
- TuiInputOpacityModule,
850
- TuiPrimitiveTextfieldModule,
851
- TuiTextfieldControllerModule,
852
- TuiDropdownModule,
853
- TuiDataListModule,
854
- TuiDataListWrapperModule,
855
- TuiNotificationModule,
856
- TuiFilterPipeModule,
857
- ]] });
858
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocDocumentationModule, decorators: [{
859
- type: NgModule,
860
- args: [{
861
- imports: [
862
- CommonModule,
863
- FormsModule,
864
- RouterModule,
865
- TuiBadgeModule,
866
- TuiSelectModule,
867
- TuiToggleModule,
868
- TuiLinkModule,
869
- TuiInputNumberModule,
870
- TuiModeModule,
871
- TuiGroupModule,
872
- TuiInputOpacityModule,
873
- TuiPrimitiveTextfieldModule,
874
- TuiTextfieldControllerModule,
875
- TuiDropdownModule,
876
- TuiDataListModule,
877
- TuiDataListWrapperModule,
878
- TuiNotificationModule,
879
- TuiFilterPipeModule,
880
- ],
881
- declarations: [
882
- TuiInspectPipe,
883
- TuiGetColorPipe,
884
- TuiGetOpacityPipe,
885
- TuiIsOptionalPipe,
886
- TuiShowCleanerPipe,
887
- TuiStripOptionalPipe,
888
- TuiDocTypeReferencePipe,
889
- TuiDocDocumentationComponent,
890
- TuiIsPrimitivePolymorpheusContentPipe,
891
- TuiDocDocumentationPropertyConnectorDirective,
892
- ],
893
- exports: [
894
- TuiDocDocumentationComponent,
895
- TuiDocDocumentationPropertyConnectorDirective,
896
- ],
897
- }]
898
- }] });
899
-
900
- const TUI_DOC_EXAMPLE_DEFAULT_OPTIONS = {
901
- codeEditorVisibilityHandler: files => Boolean(files[TUI_EXAMPLE_PRIMARY_FILE_NAME.TS] &&
902
- files[TUI_EXAMPLE_PRIMARY_FILE_NAME.HTML]),
903
- tabTitles: new Map(),
904
- fullsize: true,
905
- linkIcon: `tuiIconLink`,
906
- };
907
- /**
908
- * Default parameters for DocExample component
909
- */
910
- const TUI_DOC_EXAMPLE_OPTIONS = tuiCreateToken(TUI_DOC_EXAMPLE_DEFAULT_OPTIONS);
911
- function tuiDocExampleOptionsProvider(options) {
912
- return tuiProvideOptions(TUI_DOC_EXAMPLE_OPTIONS, options, TUI_DOC_EXAMPLE_DEFAULT_OPTIONS);
913
- }
914
-
915
- class TuiDocExampleGetTabsPipe {
916
- transform(content, defaultTab) {
917
- return [defaultTab, ...Object.keys(content)];
918
- }
919
- }
920
- TuiDocExampleGetTabsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocExampleGetTabsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
921
- TuiDocExampleGetTabsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocExampleGetTabsPipe, name: "tuiDocExampleGetTabs" });
922
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocExampleGetTabsPipe, decorators: [{
923
- type: Pipe,
924
- args: [{ name: `tuiDocExampleGetTabs` }]
925
- }] });
926
-
927
- class TuiDocExampleComponent {
928
- constructor(clipboard, alerts, location, copyTexts$, texts, codeEditor, processContent, isE2E, codeActions, router, route, ngLocation, options) {
929
- this.clipboard = clipboard;
930
- this.alerts = alerts;
931
- this.location = location;
932
- this.copyTexts$ = copyTexts$;
933
- this.texts = texts;
934
- this.codeEditor = codeEditor;
935
- this.processContent = processContent;
936
- this.isE2E = isE2E;
937
- this.codeActions = codeActions;
938
- this.router = router;
939
- this.route = route;
940
- this.ngLocation = ngLocation;
941
- this.options = options;
942
- this.rawLoader$$ = new BehaviorSubject({});
943
- this.id = null;
944
- this.fullsize = this.options.fullsize;
945
- this.componentName = this.location.pathname.slice(1);
946
- this.defaultTabIndex = 0;
947
- this.defaultTab = this.texts[this.defaultTabIndex];
948
- this.activeItemIndex = this.defaultTabIndex;
949
- this.copy$ = this.copyTexts$.pipe(map(([copy]) => copy));
950
- this.processor$ = this.rawLoader$$.pipe(switchMap(tuiRawLoadRecord), map(value => this.processContent(value)));
951
- this.loading$ = new Subject();
952
- this.visible = (files) => Boolean(this.codeEditor && this.options.codeEditorVisibilityHandler(files));
953
- }
954
- set content(content) {
955
- this.rawLoader$$.next(content);
956
- }
957
- getTabTitle(fileName) {
958
- return this.options.tabTitles.get(fileName) || fileName;
959
- }
960
- copyExampleLink() {
961
- const hashPosition = this.location.href.indexOf('#');
962
- const currentUrl = hashPosition > -1
963
- ? this.location.href.slice(0, Math.max(0, hashPosition))
964
- : this.location.href;
965
- const url = `${currentUrl}#${this.id}`;
966
- this.setFragmentWithoutRedirect(this.id);
967
- this.clipboard.copy(url);
968
- this.alerts
969
- .open(this.texts[1], {
970
- label: this.texts[2],
971
- status: 'success',
972
- })
973
- .subscribe();
974
- }
975
- edit(files) {
976
- var _a;
977
- this.loading$.next(true);
978
- (_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName, this.id || '', files).then(() => this.loading$.next(false)).catch(() => this.loading$.next(false));
979
- }
980
- setFragmentWithoutRedirect(id) {
981
- const url = this.router
982
- .createUrlTree([], { relativeTo: this.route, fragment: id || '' })
983
- .toString();
984
- this.ngLocation.go(url);
985
- }
986
- }
987
- TuiDocExampleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocExampleComponent, deps: [{ token: Clipboard }, { token: TuiAlertService }, { token: LOCATION }, { token: TUI_COPY_TEXTS }, { token: TUI_DOC_EXAMPLE_TEXTS }, { token: TUI_DOC_CODE_EDITOR, optional: true }, { token: TUI_DOC_EXAMPLE_CONTENT_PROCESSOR }, { token: TUI_IS_E2E }, { token: TUI_DOC_CODE_ACTIONS }, { token: Router }, { token: ActivatedRoute }, { token: Location$1 }, { token: TUI_DOC_EXAMPLE_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
988
- TuiDocExampleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocExampleComponent, selector: "tui-doc-example", inputs: { id: "id", heading: "heading", description: "description", content: "content", fullsize: "fullsize", componentName: "componentName" }, host: { properties: { "class._fullsize": "this.fullsize" } }, ngImport: i0, template: "<h3\n *ngIf=\"heading\"\n class=\"t-title\"\n>\n <span\n *polymorpheusOutlet=\"heading as text\"\n [textContent]=\"text\"\n ></span>\n <button\n *ngIf=\"id\"\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-link-icon\"\n [icon]=\"options.linkIcon\"\n [title]=\"copy$ | async\"\n (click)=\"copyExampleLink()\"\n ></button>\n</h3>\n<h4\n *ngIf=\"description\"\n class=\"t-description\"\n>\n <ng-container *polymorpheusOutlet=\"description as text\">\n {{ text }}\n </ng-container>\n</h4>\n\n<div\n *ngIf=\"processor$ | async as files\"\n class=\"t-example\"\n>\n <ng-container *ngIf=\"files | tuiDocExampleGetTabs: defaultTab as tabs\">\n <div\n *ngIf=\"tabs.length > 1\"\n class=\"t-tabs-wrapper\"\n >\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabs\">\n <button\n *tuiItem\n tuiTab\n >\n <ng-container *polymorpheusOutlet=\"getTabTitle(tab) as text\">\n {{ text }}\n </ng-container>\n </button>\n </ng-container>\n </tui-tabs-with-more>\n\n <tui-loader\n *ngIf=\"files | tuiMapper: visible\"\n size=\"xs\"\n [overlay]=\"true\"\n [showLoader]=\"!!(loading$ | async)\"\n (click)=\"edit(files)\"\n >\n <ng-container *ngIf=\"codeEditor?.content as content; else defaultEditContent\">\n <ng-container *polymorpheusOutlet=\"content as editContent\">\n {{ editContent }}\n </ng-container>\n </ng-container>\n\n <ng-template #defaultEditContent>\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n type=\"button\"\n >\n Edit on {{ codeEditor!.name }}\n </button>\n </ng-template>\n </tui-loader>\n </div>\n\n <div\n *ngFor=\"let tab of tabs; let index = index\"\n class=\"t-content\"\n [class.t-content_animated]=\"!isE2E\"\n [class.t-content_visible]=\"activeItemIndex === index\"\n >\n <ng-container\n *ngIf=\"index === defaultTabIndex; else anotherTab\"\n [ngTemplateOutlet]=\"preview\"\n ></ng-container>\n <ng-template #anotherTab>\n <ng-container\n [ngTemplateOutlet]=\"codeSection\"\n [ngTemplateOutletContext]=\"{$implicit: files?.[tabs[activeItemIndex]] || ''}\"\n ></ng-container>\n </ng-template>\n </div>\n </ng-container>\n</div>\n\n<ng-template #preview>\n <div\n automation-id=\"tui-doc-example\"\n class=\"t-demo\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template\n #codeSection\n let-code\n>\n <tui-doc-code [code]=\"code\">\n <ng-container *ngFor=\"let action of codeActions\">\n <ng-container *polymorpheusOutlet=\"action as text; context: {$implicit: code}\">\n {{ text }}\n </ng-container>\n </ng-container>\n </tui-doc-code>\n</ng-template>\n", styles: [":host{position:relative;display:block;padding-top:3.5rem;clear:right}:host :host-context(tui-root._mobile){padding-top:2rem}.t-title{font:var(--tui-font-heading-5);margin:0 0 .5rem}:host-context(tui-root._mobile) .t-title{font:var(--tui-font-heading-6)}.t-description{font:var(--tui-font-text-m);font-weight:normal;margin:0}.t-title:first-letter,.t-description:first-letter{text-transform:capitalize}.t-example{position:relative;margin-top:1.5rem;border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m);box-shadow:0 .125rem .1875rem #0000001a;overflow:hidden}:host-context(tui-root._mobile) .t-example{margin-top:.75rem}.t-tabs-wrapper{display:flex;padding:0 .875rem 0 2rem;box-shadow:inset 0 -1px var(--tui-base-03);justify-content:space-between;align-items:center}:host-context(tui-root._mobile) .t-tabs-wrapper{padding:0 .875rem 0 1rem}.t-tabs{flex-grow:1}.t-demo{padding:2rem;max-width:100%;box-sizing:border-box;overflow-x:auto}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.t-demo::-webkit-scrollbar,.t-demo::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:.375rem solid transparent}.t-demo::-webkit-scrollbar{background-color:transparent}.t-demo::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}.t-demo::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}.t-demo::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}:host-context(tui-root._mobile) .t-demo{padding:1rem}:host:not(._fullsize) .t-demo{width:-webkit-min-content;width:min-content;min-width:20rem}.t-link-icon{margin-left:.3rem;vertical-align:baseline}.t-content{will-change:opacity;height:0;visibility:hidden;opacity:0}.t-content_animated{transition:opacity .3s ease-in-out}.t-content_visible{height:auto;visibility:visible;opacity:1}\n"], components: [{ type: i2.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i1.TuiTabsWithMoreComponent, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["moreContent", "dropdownContent", "underline", "activeItemIndex", "itemsLimit"], outputs: ["activeItemIndexChange"] }, { type: i1.TuiTabComponent, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { type: i2.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { type: TuiDocCodeComponent, selector: "tui-doc-code", inputs: ["filename", "code"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6$1.TuiItemDirective, selector: "[tuiItem]" }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i4.AsyncPipe, "tuiDocExampleGetTabs": TuiDocExampleGetTabsPipe, "tuiMapper": i6$1.TuiMapperPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
989
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocExampleComponent, decorators: [{
990
- type: Component,
991
- args: [{
992
- selector: 'tui-doc-example',
993
- templateUrl: './example.template.html',
994
- styleUrls: ['./example.style.less'],
995
- changeDetection: ChangeDetectionStrategy.OnPush,
996
- }]
997
- }], ctorParameters: function () { return [{ type: i4$1.Clipboard, decorators: [{
998
- type: Inject,
999
- args: [Clipboard]
1000
- }] }, { type: i2.TuiAlertService, decorators: [{
1001
- type: Inject,
1002
- args: [TuiAlertService]
1003
- }] }, { type: Location, decorators: [{
1004
- type: Inject,
1005
- args: [LOCATION]
1006
- }] }, { type: i10.Observable, decorators: [{
1007
- type: Inject,
1008
- args: [TUI_COPY_TEXTS]
1009
- }] }, { type: undefined, decorators: [{
1010
- type: Inject,
1011
- args: [TUI_DOC_EXAMPLE_TEXTS]
1012
- }] }, { type: undefined, decorators: [{
1013
- type: Optional
1014
- }, {
1015
- type: Inject,
1016
- args: [TUI_DOC_CODE_EDITOR]
1017
- }] }, { type: undefined, decorators: [{
1018
- type: Inject,
1019
- args: [TUI_DOC_EXAMPLE_CONTENT_PROCESSOR]
1020
- }] }, { type: undefined, decorators: [{
1021
- type: Inject,
1022
- args: [TUI_IS_E2E]
1023
- }] }, { type: Array, decorators: [{
1024
- type: Inject,
1025
- args: [TUI_DOC_CODE_ACTIONS]
1026
- }] }, { type: i6.Router, decorators: [{
1027
- type: Inject,
1028
- args: [Router]
1029
- }] }, { type: i6.ActivatedRoute, decorators: [{
1030
- type: Inject,
1031
- args: [ActivatedRoute]
1032
- }] }, { type: i4.Location, decorators: [{
1033
- type: Inject,
1034
- args: [Location$1]
1035
- }] }, { type: undefined, decorators: [{
1036
- type: Inject,
1037
- args: [TUI_DOC_EXAMPLE_OPTIONS]
1038
- }] }]; }, propDecorators: { id: [{
1039
- type: Input
1040
- }], heading: [{
1041
- type: Input
1042
- }], description: [{
1043
- type: Input
1044
- }], content: [{
1045
- type: Input
1046
- }], fullsize: [{
1047
- type: Input
1048
- }, {
1049
- type: HostBinding,
1050
- args: ['class._fullsize']
1051
- }], componentName: [{
1052
- type: Input
1053
- }] } });
1054
-
1055
- class TuiDocExampleModule {
1056
- }
1057
- TuiDocExampleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocExampleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1058
- TuiDocExampleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocExampleModule, declarations: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe], imports: [CommonModule,
1059
- ClipboardModule,
1060
- TuiTabsModule,
1061
- TuiButtonModule,
1062
- TuiDocCopyModule,
1063
- TuiDocCodeModule,
1064
- PolymorpheusModule,
1065
- TuiMapperPipeModule,
1066
- TuiLoaderModule], exports: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe] });
1067
- TuiDocExampleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocExampleModule, imports: [[
1068
- CommonModule,
1069
- ClipboardModule,
1070
- TuiTabsModule,
1071
- TuiButtonModule,
1072
- TuiDocCopyModule,
1073
- TuiDocCodeModule,
1074
- PolymorpheusModule,
1075
- TuiMapperPipeModule,
1076
- TuiLoaderModule,
1077
- ]] });
1078
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocExampleModule, decorators: [{
1079
- type: NgModule,
1080
- args: [{
1081
- imports: [
1082
- CommonModule,
1083
- ClipboardModule,
1084
- TuiTabsModule,
1085
- TuiButtonModule,
1086
- TuiDocCopyModule,
1087
- TuiDocCodeModule,
1088
- PolymorpheusModule,
1089
- TuiMapperPipeModule,
1090
- TuiLoaderModule,
1091
- ],
1092
- declarations: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe],
1093
- exports: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe],
1094
- }]
1095
- }] });
1096
-
1097
- function labelsProviderFactory(pages) {
1098
- return pages
1099
- .map(({ section }) => section)
1100
- .filter(tuiIsPresent)
1101
- .filter((item, index, array) => array.indexOf(item) === index);
1102
- }
1103
- /**
1104
- * Page title
1105
- */
1106
- const NAVIGATION_TITLE = new InjectionToken(`[NAVIGATION_TITLE]`);
1107
- /**
1108
- * Navigation sections labels for search
1109
- */
1110
- const NAVIGATION_LABELS = new InjectionToken(`[NAVIGATION_LABELS]`);
1111
- /**
1112
- * Navigation pages
1113
- */
1114
- const NAVIGATION_ITEMS = new InjectionToken(`[NAVIGATION_ITEMS]`);
1115
- const NAVIGATION_PROVIDERS = [
1116
- TuiDestroyService,
1117
- {
1118
- provide: NAVIGATION_TITLE,
1119
- deps: [Router, ActivatedRoute, TUI_DOC_TITLE, TuiDestroyService],
1120
- useFactory: (router, activatedRoute, titlePrefix, destroy$) => router.events.pipe(filter(event => event instanceof NavigationEnd), map(() => activatedRoute.firstChild), filter(tuiIsPresent), mergeMap(({ data }) => data), map(({ title }) => `${titlePrefix}${title}`), takeUntil(destroy$)),
1121
- },
1122
- {
1123
- provide: NAVIGATION_LABELS,
1124
- deps: [TUI_DOC_PAGES],
1125
- useFactory: labelsProviderFactory,
1126
- },
1127
- {
1128
- provide: NAVIGATION_ITEMS,
1129
- deps: [TUI_DOC_PAGES],
1130
- useFactory: (pages) => {
1131
- const labels = labelsProviderFactory(pages);
1132
- return [
1133
- ...labels.map(label => pages.filter(({ section }) => section === label)),
1134
- pages.filter(page => !page.section),
1135
- ];
1136
- },
1137
- },
1138
- ];
1139
-
1140
- class TuiDocNavigationComponent {
1141
- constructor(cdr, titleService, title$, doc, mode, sidebar, labels, items, searchText, router, activatedRoute, destroy$, readyToScroll$, scrollBehavior, docIcons, icons) {
1142
- this.doc = doc;
1143
- this.mode = mode;
1144
- this.sidebar = sidebar;
1145
- this.labels = labels;
1146
- this.items = items;
1147
- this.searchText = searchText;
1148
- this.router = router;
1149
- this.activatedRoute = activatedRoute;
1150
- this.destroy$ = destroy$;
1151
- this.readyToScroll$ = readyToScroll$;
1152
- this.scrollBehavior = scrollBehavior;
1153
- this.docIcons = docIcons;
1154
- this.icons = icons;
1155
- this.menuOpen = false;
1156
- this.openPagesArr = [];
1157
- this.openPagesGroupsArr = [];
1158
- this.active = '';
1159
- this.search = new FormControl('');
1160
- this.filtered$ = tuiControlValue(this.search).pipe(filter(search => search.trim().length > 2), map(search => this.filterItems(this.flattenSubPages(this.items), search)));
1161
- this.mode$ = this.mode.change$.pipe(startWith(null), map(() => this.mode.mode || 'onLight'));
1162
- // Angular can't navigate no anchor links
1163
- // https://stackoverflow.com/questions/36101756/angular2-routing-with-hashtag-to-page-anchor
1164
- title$.subscribe(title => {
1165
- cdr.markForCheck();
1166
- titleService.setTitle(title);
1167
- this.openActivePageGroup();
1168
- this.handleAnchorLink(this.activatedRoute.snapshot.fragment || '');
1169
- });
1170
- }
1171
- get canOpen() {
1172
- var _a, _b;
1173
- return ((_b = (_a = this.search.value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 2;
1174
- }
1175
- get itemsWithoutSections() {
1176
- return this.items[this.items.length - 1];
1177
- }
1178
- $pages(pages) {
1179
- return pages;
1180
- }
1181
- isActive(route) {
1182
- return route === this.active;
1183
- }
1184
- onGroupClick(index) {
1185
- this.openPagesGroupsArr[index] = !this.openPagesGroupsArr[index];
1186
- }
1187
- closeMenu() {
1188
- this.menuOpen = false;
1189
- }
1190
- onClick(input) {
1191
- input.open = false;
1192
- this.menuOpen = false;
1193
- this.search.setValue('');
1194
- this.openActivePageGroup();
1195
- }
1196
- filterItems(items, search) {
1197
- return items.map(section => tuiUniqBy(section.filter(({ title, keywords = '' }) => {
1198
- search = search.toLowerCase().trim();
1199
- keywords = keywords.toLowerCase();
1200
- title = title.toLowerCase();
1201
- return (title.includes(search) ||
1202
- keywords.includes(search) ||
1203
- title.includes(tuiTransliterateKeyboardLayout(search)) ||
1204
- keywords.includes(tuiTransliterateKeyboardLayout(search)) ||
1205
- search.replace(/-/gi, '').includes(title) ||
1206
- title.includes(search.replace(/\s|tui/g, '')) ||
1207
- keywords.includes(search.replace(/\s|tui/g, '')) ||
1208
- search.split(/\s/).find(word => title.includes(word)));
1209
- }), 'title'));
1210
- }
1211
- flattenSubPages(items) {
1212
- return items.reduce((array, item) => [
1213
- ...array,
1214
- item.reduce((pages, page) => 'subPages' in page
1215
- ? [...pages, ...page.subPages]
1216
- : [...pages, page], []),
1217
- ], []);
1218
- }
1219
- isActiveRoute(route) {
1220
- return this.router.isActive(route, {
1221
- paths: 'subset',
1222
- queryParams: 'subset',
1223
- fragment: 'ignored',
1224
- matrixParams: 'ignored',
1225
- });
1226
- }
1227
- handleAnchorLink(hash) {
1228
- this.readyToScroll$
1229
- .pipe(filter(Boolean), take(1), takeUntil(this.destroy$))
1230
- .subscribe(() => this.navigateToAnchorLink(hash));
1231
- }
1232
- openActivePageGroup() {
1233
- this.items.forEach((pages, pagesIndex) => {
1234
- pages.forEach((page, pageIndex) => {
1235
- if ('route' in page && this.isActiveRoute(page.route)) {
1236
- this.openPagesArr[pagesIndex] = true;
1237
- this.active = page.route;
1238
- }
1239
- if ('subPages' in page) {
1240
- page.subPages.forEach(subPage => {
1241
- if (this.isActiveRoute(subPage.route)) {
1242
- this.openPagesArr[pagesIndex] = true;
1243
- this.openPagesGroupsArr[pagesIndex * 100 + pageIndex] = true;
1244
- this.active = subPage.route;
1245
- }
1246
- });
1247
- }
1248
- });
1249
- });
1250
- }
1251
- navigateToAnchorLink(fragment) {
1252
- const nodes = fragment ? this.doc.querySelectorAll(`#${fragment}`) : [];
1253
- const element = nodes.length && nodes[nodes.length - 1];
1254
- if (!element) {
1255
- return;
1256
- }
1257
- element.classList.add('tui-doc-animated-example');
1258
- element.scrollIntoView({
1259
- block: 'start',
1260
- inline: 'nearest',
1261
- behavior: this.scrollBehavior,
1262
- });
1263
- }
1264
- }
1265
- TuiDocNavigationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocNavigationComponent, deps: [{ token: ChangeDetectorRef }, { token: Title }, { token: NAVIGATION_TITLE }, { token: DOCUMENT }, { token: TuiModeDirective }, { token: TuiSidebarDirective, optional: true }, { token: NAVIGATION_LABELS }, { token: NAVIGATION_ITEMS }, { token: TUI_DOC_SEARCH_TEXT }, { token: Router }, { token: ActivatedRoute }, { token: TuiDestroyService, self: true }, { token: TUI_DOC_PAGE_LOADED }, { token: TUI_DOC_SCROLL_BEHAVIOR }, { token: TUI_DOC_ICONS }, { token: TUI_COMMON_ICONS }], target: i0.ɵɵFactoryTarget.Component });
1266
- TuiDocNavigationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocNavigationComponent, selector: "tui-doc-navigation", host: { properties: { "class._open": "this.menuOpen" } }, providers: NAVIGATION_PROVIDERS, ngImport: i0, template: "<tui-input\n #input\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n [formControl]=\"search\"\n [tuiAutoFocus]=\"!!sidebar\"\n [tuiTextfieldCleaner]=\"true\"\n [tuiTextfieldIconLeft]=\"docIcons.search\"\n [tuiTextfieldLabelOutside]=\"true\"\n>\n {{ searchText }}\n <ng-container *ngIf=\"canOpen\">\n <tui-data-list *tuiDataList>\n <tui-opt-group\n *ngFor=\"let group of filtered$ | async; let index = index\"\n [label]=\"labels[index] || ''\"\n >\n <a\n *ngFor=\"let item of group\"\n tuiOption\n [fragment]=\"item.fragment\"\n [routerLink]=\"item.route\"\n (click)=\"onClick(input)\"\n >\n {{ item.title }}\n <tui-svg\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [src]=\"icon\"\n ></tui-svg>\n </a>\n </tui-opt-group>\n </tui-data-list>\n </ng-container>\n</tui-input>\n\n<nav class=\"t-navigation\">\n <tui-scrollbar\n class=\"t-scrollbar\"\n [tuiMode]=\"mode$ | async\"\n >\n <tui-accordion\n [closeOthers]=\"false\"\n [rounded]=\"false\"\n >\n <tui-accordion-item\n *ngFor=\"let label of labels; index as index\"\n size=\"s\"\n [borders]=\"null\"\n [(open)]=\"!!openPagesArr[index]\"\n >\n <span class=\"t-label\">\n <strong>{{ label }}</strong>\n </span>\n <ng-template tuiAccordionItemContent>\n <div class=\"t-section\">\n <ng-container\n *ngFor=\"let item of items[index]; index as subIndex\"\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: index * 100 + subIndex}\"\n ></ng-container>\n </div>\n </ng-template>\n </tui-accordion-item>\n </tui-accordion>\n <div class=\"t-items-container\">\n <ng-container\n *ngFor=\"let item of itemsWithoutSections; let index = index\"\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: items.length - 1 + index}\"\n ></ng-container>\n </div>\n\n <ng-template\n #pages\n let-index=\"index\"\n let-item=\"item\"\n >\n <a\n *ngIf=\"!item.subPages; else subPagesTemplate\"\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink\"\n [routerLink]=\"item.route\"\n [tuiScrollIntoViewLink]=\"isActive(item.route)\"\n (click)=\"closeMenu()\"\n >\n {{ item.title }}\n <tui-svg\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [src]=\"icon\"\n ></tui-svg>\n </a>\n\n <ng-template #subPagesTemplate>\n <div\n routerLinkActive\n class=\"t-subsection\"\n [routerLinkActiveOptions]=\"{exact: false}\"\n >\n <button\n *ngIf=\"item.subPages\"\n tuiLink\n type=\"button\"\n class=\"t-sublink t-sublink_subsection\"\n (click)=\"onGroupClick(index)\"\n >\n <tui-svg\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesGroupsArr[index]\"\n [src]=\"icons.more\"\n ></tui-svg>\n {{ item.title }}\n <tui-svg\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [src]=\"icon\"\n ></tui-svg>\n </button>\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"!!openPagesGroupsArr[index]\"\n >\n <div class=\"t-section t-section_bordered\">\n <a\n *ngFor=\"let subPage of $pages(item.subPages)\"\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink t-sublink_small\"\n [fragment]=\"subPage.fragment\"\n [routerLink]=\"subPage.route\"\n [tuiScrollIntoViewLink]=\"isActive(subPage.route)\"\n (click)=\"closeMenu()\"\n >\n {{ subPage.title }}\n <tui-svg\n *polymorpheusOutlet=\"subPage.icon as icon\"\n class=\"t-icon\"\n [src]=\"icon\"\n ></tui-svg>\n </a>\n </div>\n </tui-expand>\n </div>\n </ng-template>\n </ng-template>\n </tui-scrollbar>\n</nav>\n\n<ng-content></ng-content>\n", styles: [":host{z-index:1;display:flex;flex-direction:column;text-align:center;background:var(--tui-base-01)}.t-input{margin:1.25rem}.t-navigation{display:flex;max-height:100%;min-height:0;flex:1 1 0;text-align:left}.t-scrollbar{scroll-behavior:smooth;width:100%}:host-context(tui-root._reduced-motion) .t-scrollbar{scroll-behavior:auto}.t-items-container{display:flex;flex-direction:column;padding:0 1rem}.t-label{margin-left:.5rem}.t-expand{margin-left:.25rem}.t-section{display:flex;flex-direction:column;align-items:flex-start;margin:-1rem 0 -.5rem}.t-section_bordered{margin:.5rem 0;border-left:1px solid var(--tui-base-03)}.t-subsection{margin-left:.5rem}.t-sublink{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:1rem 0 0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;font:var(--tui-font-text-m);margin-left:.5rem}.t-sublink_small{margin-left:1rem;line-height:1.5rem;padding-top:.5rem}.t-sublink_subsection{margin-left:0;line-height:1.6rem}.t-sublink.t-sublink.t-sublink_active{color:var(--tui-text-01)}.t-icon{margin-left:.5rem}.t-chevron{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;width:1rem;height:1rem;margin:-.25rem .25rem 0 -.1875rem}.t-chevron_active{transform:rotate(90deg)}\n"], components: [{ type: i1.TuiInputComponent, selector: "tui-input" }, { type: i2.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent", "size"] }, { type: i2.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }, { type: i2.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i2.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1.TuiAccordionComponent, selector: "tui-accordion", inputs: ["closeOthers", "rounded"] }, { type: i1.TuiAccordionItemComponent, selector: "tui-accordion-item", inputs: ["noPadding", "showArrow", "borders", "size", "disabled", "disableHover", "open", "async"], outputs: ["openChange"] }, { type: i2.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { type: i2.TuiExpandComponent, selector: "tui-expand", inputs: ["async", "expanded"] }], directives: [{ type: i1.TuiInputDirective, selector: "tui-input" }, { type: i2.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i6$1.TuiAutoFocusDirective, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { type: i2.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { type: i2.TuiTextfieldIconLeftDirective, selector: "[tuiTextfieldIconLeft]", inputs: ["tuiTextfieldIconLeft"] }, { type: i2.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.TuiOptGroupDirective, selector: "tui-opt-group", inputs: ["label"] }, { type: i6.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i5$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i2.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i1.TuiAccordionItemContentDirective, selector: "ng-template[tuiAccordionItemContent]" }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }, { type: i8.TuiScrollIntoViewLinkDirective, selector: "[tuiScrollIntoViewLink]", inputs: ["tuiScrollIntoViewLink"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1267
- __decorate([
1268
- tuiPure
1269
- ], TuiDocNavigationComponent.prototype, "filterItems", null);
1270
- __decorate([
1271
- tuiPure
1272
- ], TuiDocNavigationComponent.prototype, "flattenSubPages", null);
1273
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocNavigationComponent, decorators: [{
1274
- type: Component,
1275
- args: [{
1276
- selector: 'tui-doc-navigation',
1277
- templateUrl: './navigation.template.html',
1278
- styleUrls: ['./navigation.style.less'],
1279
- changeDetection: ChangeDetectionStrategy.OnPush,
1280
- providers: NAVIGATION_PROVIDERS,
1281
- }]
1282
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef, decorators: [{
1283
- type: Inject,
1284
- args: [ChangeDetectorRef]
1285
- }] }, { type: i9.Title, decorators: [{
1286
- type: Inject,
1287
- args: [Title]
1288
- }] }, { type: i10.Observable, decorators: [{
1289
- type: Inject,
1290
- args: [NAVIGATION_TITLE]
1291
- }] }, { type: Document, decorators: [{
1292
- type: Inject,
1293
- args: [DOCUMENT]
1294
- }] }, { type: i2.TuiModeDirective, decorators: [{
1295
- type: Inject,
1296
- args: [TuiModeDirective]
1297
- }] }, { type: undefined, decorators: [{
1298
- type: Optional
1299
- }, {
1300
- type: Inject,
1301
- args: [TuiSidebarDirective]
1302
- }] }, { type: undefined, decorators: [{
1303
- type: Inject,
1304
- args: [NAVIGATION_LABELS]
1305
- }] }, { type: undefined, decorators: [{
1306
- type: Inject,
1307
- args: [NAVIGATION_ITEMS]
1308
- }] }, { type: undefined, decorators: [{
1309
- type: Inject,
1310
- args: [TUI_DOC_SEARCH_TEXT]
1311
- }] }, { type: i6.Router, decorators: [{
1312
- type: Inject,
1313
- args: [Router]
1314
- }] }, { type: i6.ActivatedRoute, decorators: [{
1315
- type: Inject,
1316
- args: [ActivatedRoute]
1317
- }] }, { type: i10.Observable, decorators: [{
1318
- type: Self
1319
- }, {
1320
- type: Inject,
1321
- args: [TuiDestroyService]
1322
- }] }, { type: i10.Observable, decorators: [{
1323
- type: Inject,
1324
- args: [TUI_DOC_PAGE_LOADED]
1325
- }] }, { type: undefined, decorators: [{
1326
- type: Inject,
1327
- args: [TUI_DOC_SCROLL_BEHAVIOR]
1328
- }] }, { type: undefined, decorators: [{
1329
- type: Inject,
1330
- args: [TUI_DOC_ICONS]
1331
- }] }, { type: undefined, decorators: [{
1332
- type: Inject,
1333
- args: [TUI_COMMON_ICONS]
1334
- }] }]; }, propDecorators: { menuOpen: [{
1335
- type: HostBinding,
1336
- args: ['class._open']
1337
- }], filterItems: [], flattenSubPages: [] } });
1338
-
1339
- class TuiDocHeaderComponent {
1340
- constructor(icons, logo, menu, router, swipes$) {
1341
- this.icons = icons;
1342
- this.logo = logo;
1343
- this.menu = menu;
1344
- this.router = router;
1345
- this.swipes$ = swipes$;
1346
- this.stream$ = new Subject();
1347
- this.open$ = merge(this.router.events.pipe(map(ALWAYS_FALSE_HANDLER)), this.stream$, this.swipes$.pipe(filter(swipe => swipe.direction === 'left' || swipe.direction === 'right'), map(swipe => swipe.direction === 'right'))).pipe(startWith(false), distinctUntilChanged());
1348
- }
1349
- onClick() {
1350
- this.stream$.next(true);
1351
- }
1352
- onActiveZone(active) {
1353
- if (!active) {
1354
- this.stream$.next(false);
1355
- }
1356
- }
1357
- }
1358
- TuiDocHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocHeaderComponent, deps: [{ token: TUI_DOC_ICONS }, { token: TUI_DOC_LOGO }, { token: TUI_DOC_MENU_TEXT }, { token: Router }, { token: TuiSwipeService }], target: i0.ɵɵFactoryTarget.Component });
1359
- TuiDocHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocHeaderComponent, selector: "header[tuiDocHeader]", ngImport: i0, template: "<button\n appearance=\"icon\"\n tuiIconButton\n type=\"button\"\n class=\"t-menu\"\n [icon]=\"icons.menu\"\n [title]=\"menu\"\n (click)=\"onClick()\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-doc-navigation\n *tuiSidebar=\"!!(open$ | async)\"\n class=\"t-navigation\"\n ></tui-doc-navigation>\n</button>\n<div class=\"t-logo\">\n <img\n *polymorpheusOutlet=\"logo as src\"\n alt=\"Logo\"\n class=\"t-img\"\n [src]=\"src\"\n />\n</div>\n<ng-content></ng-content>\n", styles: [":host{position:fixed;top:0;left:0;right:0;z-index:1;display:flex;box-shadow:var(--tui-shadow-navigation);height:3.9375rem;align-items:center;padding:0 1.25rem;background:var(--tui-base-01);border-bottom:1px solid var(--tui-base-03)}@supports (background: color-mix(in srgb,var(--tui-base-01),transparent 50%)){:host{background:color-mix(in srgb,var(--tui-base-01),transparent 50%);-webkit-backdrop-filter:blur(1.25rem);backdrop-filter:blur(1.25rem)}}.t-logo{margin-right:auto;font:var(--tui-font-heading-5)}.t-img{display:block}.t-menu{margin-left:-1.25rem}@media screen and (min-width: 48em){.t-menu{display:none}}.t-navigation{min-height:100%}\n"], components: [{ type: i2.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: TuiDocNavigationComponent, selector: "tui-doc-navigation" }], directives: [{ type: i6$1.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i4$2.TuiSidebarDirective, selector: "[tuiSidebar]", inputs: ["tuiSidebarDirection", "tuiSidebarAutoWidth", "tuiSidebar"] }, { type: i5$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1360
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocHeaderComponent, decorators: [{
1361
- type: Component,
1362
- args: [{
1363
- selector: 'header[tuiDocHeader]',
1364
- templateUrl: './header.template.html',
1365
- styleUrls: ['./header.style.less'],
1366
- changeDetection: ChangeDetectionStrategy.OnPush,
1367
- }]
1368
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1369
- type: Inject,
1370
- args: [TUI_DOC_ICONS]
1371
- }] }, { type: undefined, decorators: [{
1372
- type: Inject,
1373
- args: [TUI_DOC_LOGO]
1374
- }] }, { type: undefined, decorators: [{
1375
- type: Inject,
1376
- args: [TUI_DOC_MENU_TEXT]
1377
- }] }, { type: i6.Router, decorators: [{
1378
- type: Inject,
1379
- args: [Router]
1380
- }] }, { type: i6$1.TuiSwipeService, decorators: [{
1381
- type: Inject,
1382
- args: [TuiSwipeService]
1383
- }] }]; } });
1384
-
1385
- class TuiDocNavigationModule {
1386
- }
1387
- TuiDocNavigationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocNavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1388
- TuiDocNavigationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocNavigationModule, declarations: [TuiDocNavigationComponent], imports: [CommonModule,
1389
- ReactiveFormsModule,
1390
- RouterModule,
1391
- PolymorpheusModule,
1392
- TuiScrollIntoViewLinkModule,
1393
- TuiButtonModule,
1394
- TuiInputModule,
1395
- TuiTextfieldControllerModule,
1396
- TuiActiveZoneModule,
1397
- TuiLetModule,
1398
- TuiModeModule,
1399
- TuiLinkModule,
1400
- TuiExpandModule,
1401
- TuiHostedDropdownModule,
1402
- TuiDropdownModule,
1403
- TuiAccordionModule,
1404
- TuiScrollbarModule,
1405
- TuiSvgModule,
1406
- TuiDataListModule,
1407
- TuiAutoFocusModule], exports: [TuiDocNavigationComponent] });
1408
- TuiDocNavigationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocNavigationModule, imports: [[
1409
- CommonModule,
1410
- ReactiveFormsModule,
1411
- RouterModule,
1412
- PolymorpheusModule,
1413
- TuiScrollIntoViewLinkModule,
1414
- TuiButtonModule,
1415
- TuiInputModule,
1416
- TuiTextfieldControllerModule,
1417
- TuiActiveZoneModule,
1418
- TuiLetModule,
1419
- TuiModeModule,
1420
- TuiLinkModule,
1421
- TuiExpandModule,
1422
- TuiHostedDropdownModule,
1423
- TuiDropdownModule,
1424
- TuiAccordionModule,
1425
- TuiScrollbarModule,
1426
- TuiSvgModule,
1427
- TuiDataListModule,
1428
- TuiAutoFocusModule,
1429
- ]] });
1430
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocNavigationModule, decorators: [{
1431
- type: NgModule,
1432
- args: [{
1433
- imports: [
1434
- CommonModule,
1435
- ReactiveFormsModule,
1436
- RouterModule,
1437
- PolymorpheusModule,
1438
- TuiScrollIntoViewLinkModule,
1439
- TuiButtonModule,
1440
- TuiInputModule,
1441
- TuiTextfieldControllerModule,
1442
- TuiActiveZoneModule,
1443
- TuiLetModule,
1444
- TuiModeModule,
1445
- TuiLinkModule,
1446
- TuiExpandModule,
1447
- TuiHostedDropdownModule,
1448
- TuiDropdownModule,
1449
- TuiAccordionModule,
1450
- TuiScrollbarModule,
1451
- TuiSvgModule,
1452
- TuiDataListModule,
1453
- TuiAutoFocusModule,
1454
- ],
1455
- declarations: [TuiDocNavigationComponent],
1456
- exports: [TuiDocNavigationComponent],
1457
- }]
1458
- }] });
1459
-
1460
- class TuiDocHeaderModule {
1461
- }
1462
- TuiDocHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1463
- TuiDocHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocHeaderModule, declarations: [TuiDocHeaderComponent], imports: [CommonModule,
1464
- PolymorpheusModule,
1465
- TuiButtonModule,
1466
- TuiSidebarModule,
1467
- TuiActiveZoneModule,
1468
- TuiDocNavigationModule], exports: [TuiDocHeaderComponent] });
1469
- TuiDocHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocHeaderModule, imports: [[
1470
- CommonModule,
1471
- PolymorpheusModule,
1472
- TuiButtonModule,
1473
- TuiSidebarModule,
1474
- TuiActiveZoneModule,
1475
- TuiDocNavigationModule,
1476
- ]] });
1477
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocHeaderModule, decorators: [{
1478
- type: NgModule,
1479
- args: [{
1480
- imports: [
1481
- CommonModule,
1482
- PolymorpheusModule,
1483
- TuiButtonModule,
1484
- TuiSidebarModule,
1485
- TuiActiveZoneModule,
1486
- TuiDocNavigationModule,
1487
- ],
1488
- declarations: [TuiDocHeaderComponent],
1489
- exports: [TuiDocHeaderComponent],
1490
- }]
1491
- }] });
1492
-
1493
- class TuiDocSeeAlsoComponent {
1494
- constructor(text, pages) {
1495
- this.text = text;
1496
- this.pages = pages;
1497
- this.seeAlso = [];
1498
- }
1499
- getRouterLink(pageTitle) {
1500
- var _a, _b;
1501
- return (_b = (_a = this.pages.get(pageTitle)) === null || _a === void 0 ? void 0 : _a.route) !== null && _b !== void 0 ? _b : '';
1502
- }
1503
- }
1504
- TuiDocSeeAlsoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocSeeAlsoComponent, deps: [{ token: TUI_DOC_SEE_ALSO_TEXT }, { token: TUI_DOC_MAP_PAGES }], target: i0.ɵɵFactoryTarget.Component });
1505
- TuiDocSeeAlsoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocSeeAlsoComponent, selector: "tui-doc-see-also", inputs: { seeAlso: "seeAlso" }, ngImport: i0, template: "<h5 class=\"t-header\">{{ text }}</h5>\n<ng-container *ngFor=\"let item of seeAlso; last as last\">\n <a\n tuiLink\n [innerText]=\"item\"\n [routerLink]=\"getRouterLink(item)\"\n ></a>\n <ng-container *ngIf=\"!last\">{{ ', ' }}</ng-container>\n</ng-container>\n", styles: [":host{display:block}.t-header{font-size:.6875rem;line-height:1rem;text-transform:uppercase;letter-spacing:.075em;color:var(--tui-text-02);margin:0 0 .5rem;white-space:nowrap}\n"], components: [{ type: i2.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1506
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocSeeAlsoComponent, decorators: [{
1507
- type: Component,
1508
- args: [{
1509
- selector: 'tui-doc-see-also',
1510
- templateUrl: './see-also.template.html',
1511
- styleUrls: ['./see-also.style.less'],
1512
- changeDetection: ChangeDetectionStrategy.OnPush,
1513
- }]
1514
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1515
- type: Inject,
1516
- args: [TUI_DOC_SEE_ALSO_TEXT]
1517
- }] }, { type: Map, decorators: [{
1518
- type: Inject,
1519
- args: [TUI_DOC_MAP_PAGES]
1520
- }] }]; }, propDecorators: { seeAlso: [{
1521
- type: Input
1522
- }] } });
1523
-
1524
- class TuiDocSeeAlsoModule {
1525
- }
1526
- TuiDocSeeAlsoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocSeeAlsoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1527
- TuiDocSeeAlsoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocSeeAlsoModule, declarations: [TuiDocSeeAlsoComponent], imports: [CommonModule, RouterModule, TuiLinkModule], exports: [TuiDocSeeAlsoComponent] });
1528
- TuiDocSeeAlsoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocSeeAlsoModule, imports: [[CommonModule, RouterModule, TuiLinkModule]] });
1529
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocSeeAlsoModule, decorators: [{
1530
- type: NgModule,
1531
- args: [{
1532
- imports: [CommonModule, RouterModule, TuiLinkModule],
1533
- declarations: [TuiDocSeeAlsoComponent],
1534
- exports: [TuiDocSeeAlsoComponent],
1535
- }]
1536
- }] });
1537
-
1538
- class TuiDocSourceCodeComponent {
1539
- constructor(icons, sourceCode, text) {
1540
- this.icons = icons;
1541
- this.sourceCode = sourceCode;
1542
- this.text = text;
1543
- this.header = '';
1544
- this.package = '';
1545
- this.type = '';
1546
- this.path = '';
1547
- }
1548
- get pathOptions() {
1549
- return this.getPathOptions(this.header, this.package, this.type, this.path);
1550
- }
1551
- pathIsUrl(path) {
1552
- return path.startsWith('http');
1553
- }
1554
- getPathOptions(header, packageName, type, path) {
1555
- return {
1556
- header,
1557
- package: packageName,
1558
- type,
1559
- path,
1560
- };
1561
- }
1562
- }
1563
- TuiDocSourceCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocSourceCodeComponent, deps: [{ token: TUI_DOC_ICONS }, { token: TUI_DOC_SOURCE_CODE }, { token: TUI_DOC_SOURCE_CODE_TEXT }], target: i0.ɵɵFactoryTarget.Component });
1564
- TuiDocSourceCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocSourceCodeComponent, selector: "tui-doc-source-code", inputs: { header: "header", package: "package", type: "type", path: "path" }, ngImport: i0, template: "<a\n *polymorpheusOutlet=\"pathIsUrl(path) ? path : sourceCode as link; context: pathOptions\"\n appearance=\"icon\"\n size=\"s\"\n target=\"_blank\"\n tuiIconButton\n type=\"button\"\n [href]=\"link\"\n [icon]=\"icons.code\"\n [title]=\"text\"\n></a>\n", components: [{ type: i2.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i5$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1565
- __decorate([
1566
- tuiPure
1567
- ], TuiDocSourceCodeComponent.prototype, "pathIsUrl", null);
1568
- __decorate([
1569
- tuiPure
1570
- ], TuiDocSourceCodeComponent.prototype, "getPathOptions", null);
1571
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocSourceCodeComponent, decorators: [{
1572
- type: Component,
1573
- args: [{
1574
- selector: 'tui-doc-source-code',
1575
- templateUrl: './source-code.template.html',
1576
- changeDetection: ChangeDetectionStrategy.OnPush,
1577
- }]
1578
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1579
- type: Inject,
1580
- args: [TUI_DOC_ICONS]
1581
- }] }, { type: undefined, decorators: [{
1582
- type: Inject,
1583
- args: [TUI_DOC_SOURCE_CODE]
1584
- }] }, { type: undefined, decorators: [{
1585
- type: Inject,
1586
- args: [TUI_DOC_SOURCE_CODE_TEXT]
1587
- }] }]; }, propDecorators: { header: [{
1588
- type: Input
1589
- }], package: [{
1590
- type: Input
1591
- }], type: [{
1592
- type: Input
1593
- }], path: [{
1594
- type: Input
1595
- }], pathIsUrl: [], getPathOptions: [] } });
1596
-
1597
- class TuiDocSourceCodeModule {
1598
- }
1599
- TuiDocSourceCodeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocSourceCodeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1600
- TuiDocSourceCodeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocSourceCodeModule, declarations: [TuiDocSourceCodeComponent], imports: [CommonModule, PolymorpheusModule, TuiButtonModule], exports: [TuiDocSourceCodeComponent] });
1601
- TuiDocSourceCodeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocSourceCodeModule, imports: [[CommonModule, PolymorpheusModule, TuiButtonModule]] });
1602
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocSourceCodeModule, decorators: [{
1603
- type: NgModule,
1604
- args: [{
1605
- imports: [CommonModule, PolymorpheusModule, TuiButtonModule],
1606
- declarations: [TuiDocSourceCodeComponent],
1607
- exports: [TuiDocSourceCodeComponent],
1608
- }]
1609
- }] });
1610
-
1611
- class TuiLanguageSwitcherComponent {
1612
- constructor(switcher, flagPipe) {
1613
- this.switcher = switcher;
1614
- this.flagPipe = flagPipe;
1615
- this.language = new FormControl(tuiCapitalizeFirstLetter(this.switcher.language));
1616
- this.flags = new Map([
1617
- ['chinese', TuiCountryIsoCode.CN],
1618
- ['dutch', TuiCountryIsoCode.NL],
1619
- ['english', TuiCountryIsoCode.GB],
1620
- ['french', TuiCountryIsoCode.FR],
1621
- ['german', TuiCountryIsoCode.DE],
1622
- ['italian', TuiCountryIsoCode.IT],
1623
- ['polish', TuiCountryIsoCode.PL],
1624
- ['portuguese', TuiCountryIsoCode.PT],
1625
- ['russian', TuiCountryIsoCode.RU],
1626
- ['spanish', TuiCountryIsoCode.ES],
1627
- ['turkish', TuiCountryIsoCode.TR],
1628
- ['ukrainian', TuiCountryIsoCode.UA],
1629
- ['kazakh', TuiCountryIsoCode.KZ],
1630
- ['malay', TuiCountryIsoCode.MS],
1631
- ['vietnamese', TuiCountryIsoCode.VN],
1632
- ]);
1633
- this.names = Array.from(this.flags.keys());
1634
- }
1635
- /**
1636
- * @deprecated use `<img [src]="countryIsoCode | tuiFlagPipe" />`
1637
- * TODO drop in v4.0
1638
- */
1639
- getFlagPath(code) {
1640
- return this.flagPipe.transform(code);
1641
- }
1642
- }
1643
- TuiLanguageSwitcherComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiLanguageSwitcherComponent, deps: [{ token: TuiLanguageSwitcher }, { token: TuiFlagPipe }], target: i0.ɵɵFactoryTarget.Component });
1644
- TuiLanguageSwitcherComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiLanguageSwitcherComponent, selector: "tui-language-switcher", providers: [
1645
- // TODO: for backward compatibility only. Drop in v4.0
1646
- TuiFlagPipe,
1647
- ], ngImport: i0, template: "<tui-select [formControl]=\"language\">\n <ng-content></ng-content>\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let name of names\"\n tuiOption\n [value]=\"name | titlecase\"\n (click)=\"switcher.setLanguage(name)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"flags.get(name) | tuiFlag\"\n />\n {{ name | titlecase }}\n </button>\n </tui-data-list>\n</tui-select>\n", styles: [".t-flag{width:1.75rem;height:1.25rem;margin-right:.5rem}\n"], components: [{ type: i1.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { type: i2.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent", "size"] }, { type: i2.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }], directives: [{ type: i1.TuiSelectDirective, selector: "tui-select" }, { type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "titlecase": i4.TitleCasePipe, "tuiFlag": i2.TuiFlagPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1648
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiLanguageSwitcherComponent, decorators: [{
1649
- type: Component,
1650
- args: [{
1651
- selector: 'tui-language-switcher',
1652
- templateUrl: './language-switcher.component.html',
1653
- styleUrls: ['./language-switcher.component.less'],
1654
- changeDetection: ChangeDetectionStrategy.OnPush,
1655
- providers: [
1656
- // TODO: for backward compatibility only. Drop in v4.0
1657
- TuiFlagPipe,
1658
- ],
1659
- }]
1660
- }], ctorParameters: function () { return [{ type: i5$2.TuiLanguageSwitcher, decorators: [{
1661
- type: Inject,
1662
- args: [TuiLanguageSwitcher]
1663
- }] }, { type: i2.TuiFlagPipe, decorators: [{
1664
- type: Inject,
1665
- args: [TuiFlagPipe]
1666
- }] }]; } });
1667
-
1668
- class TuiLanguageSwitcherModule {
1669
- }
1670
- TuiLanguageSwitcherModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiLanguageSwitcherModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1671
- TuiLanguageSwitcherModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiLanguageSwitcherModule, declarations: [TuiLanguageSwitcherComponent], imports: [CommonModule,
1672
- TuiFlagPipeModule,
1673
- TuiSelectModule,
1674
- TuiDataListModule,
1675
- ReactiveFormsModule], exports: [TuiLanguageSwitcherComponent] });
1676
- TuiLanguageSwitcherModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiLanguageSwitcherModule, imports: [[
1677
- CommonModule,
1678
- TuiFlagPipeModule,
1679
- TuiSelectModule,
1680
- TuiDataListModule,
1681
- ReactiveFormsModule,
1682
- ]] });
1683
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiLanguageSwitcherModule, decorators: [{
1684
- type: NgModule,
1685
- args: [{
1686
- imports: [
1687
- CommonModule,
1688
- TuiFlagPipeModule,
1689
- TuiSelectModule,
1690
- TuiDataListModule,
1691
- ReactiveFormsModule,
1692
- ],
1693
- declarations: [TuiLanguageSwitcherComponent],
1694
- exports: [TuiLanguageSwitcherComponent],
1695
- }]
1696
- }] });
1697
-
1698
- class TuiDocMainComponent {
1699
- constructor(icons, theme, night) {
1700
- this.icons = icons;
1701
- this.theme = theme;
1702
- this.night = night;
1703
- this.change$ = this.night;
1704
- this.night$ = this.change$.pipe(startWith(null), map(() => this.night.value), distinctUntilChanged(), share());
1705
- }
1706
- get mode() {
1707
- return this.night.value ? 'onDark' : null;
1708
- }
1709
- get icon() {
1710
- return this.night.value ? this.icons.day : this.icons.night;
1711
- }
1712
- }
1713
- TuiDocMainComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocMainComponent, deps: [{ token: TUI_DOC_ICONS }, { token: TuiThemeService }, { token: TuiThemeNightService }], target: i0.ɵɵFactoryTarget.Component });
1714
- TuiDocMainComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocMainComponent, selector: "tui-doc-main", host: { properties: { "attr.data-mode": "this.mode" } }, providers: [
1715
- {
1716
- provide: TuiModeDirective,
1717
- useExisting: forwardRef(() => TuiDocMainComponent),
1718
- },
1719
- TuiSwipeService,
1720
- ], ngImport: i0, template: "<tui-theme-night *ngIf=\"theme.isDefaultTheme && night.useDefaultNightTheme && (night$ | async)\"></tui-theme-night>\n<tui-root>\n <div class=\"tui-doc-page\">\n <tui-doc-navigation class=\"tui-doc-navigation\">\n <ng-content select=\"tuiDocNavigation\"></ng-content>\n </tui-doc-navigation>\n <div class=\"tui-doc-content\">\n <router-outlet class=\"tui-doc-outlet\"></router-outlet>\n </div>\n </div>\n <header tuiDocHeader>\n <ng-content select=\"tuiDocHeader\"></ng-content>\n <button\n appearance=\"secondary\"\n shape=\"rounded\"\n size=\"s\"\n tuiIconButton\n tuiMode=\"onLight\"\n type=\"button\"\n class=\"tui-doc-night-mode-switch\"\n [icon]=\"icon\"\n (click)=\"night.toggle()\"\n ></button>\n </header>\n <ng-container ngProjectAs=\"tuiOverContent\">\n <ng-content select=\"tuiOverContent\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverDialogs\">\n <ng-content select=\"tuiOverDialogs\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverAlerts\">\n <ng-content select=\"tuiOverAlerts\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverPortals\">\n <ng-content select=\"tuiOverPortals\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverHints\">\n <ng-content select=\"tuiOverHints\"></ng-content>\n </ng-container>\n</tui-root>\n", styles: ["html{scroll-padding-top:4rem;height:auto}tui-root>tui-scroll-controls>.t-bar_vertical{top:4rem!important}@keyframes tuiShaking{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-.3125rem)}20%,40%,60%,80%{transform:translate(.3125rem)}}body{background:var(--tui-base-01);height:auto}tui-doc-main{display:block}code:not(pre code):not(.hljs):not([class*=\"language-\"]){transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:inline-flex;background:var(--tui-base-02);color:var(--tui-text-02);vertical-align:middle;align-items:center;border-radius:.25rem;font-weight:500;outline:1px solid var(--tui-base-04);font-size:.75rem;padding:0 .3125rem;margin:.125rem 0;text-wrap:wrap}tui-notification code:not(pre code):not(.hljs):not([class*=\"language-\"]){background:var(--tui-clear);box-shadow:none}a code:not(pre code):not(.hljs):not([class*=\"language-\"]){color:var(--tui-link)}button:focus code,a:focus code{background:var(--tui-base-01)}.tui-doc-page{isolation:isolate;padding-top:4rem}tui-doc-navigation.tui-doc-navigation{position:fixed;top:4rem;bottom:0;width:16.25rem;border-right:1px solid var(--tui-base-03)}@media screen and (max-width: 47.9625em){tui-doc-navigation.tui-doc-navigation{display:none}}.tui-doc-content{margin-left:16.25rem}@media screen and (max-width: 47.9625em){.tui-doc-content{margin-left:0}}.tui-doc-outlet+*{display:block}.tui-doc-animated-example{animation:1s .3s tuiShaking}.tui-doc-night-mode-switch{margin-left:1rem}.tui-doc-night-mode-switch tui-svg{color:var(--tui-text-02)}tui-doc-code .hljs-tag{background:none}tui-doc-code .hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-01);background-color:var(--tui-clear)}tui-doc-code .hljs.hljs-line-numbers{background:transparent}tui-doc-code .hljs-subst,tui-doc-code .hljs-title{font-weight:normal;color:var(--tui-text-01)}tui-doc-code .hljs-property{color:var(--tui-support-14)}tui-doc-code .hljs-comment,tui-doc-code .hljs-quote{color:var(--tui-text-02);font-style:italic}tui-doc-code .hljs-meta{color:#e38162}tui-doc-code .hljs-section,tui-doc-code .hljs-name,tui-doc-code .hljs-literal,tui-doc-code .hljs-keyword,tui-doc-code .hljs-selector-tag,tui-doc-code .hljs-type,tui-doc-code .hljs-selector-id,tui-doc-code .hljs-selector-class{font-weight:bold;color:var(--tui-link)}tui-doc-code .hljs-attr{color:var(--tui-link)}tui-doc-code .hljs-attribute,tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link,tui-doc-code .hljs-built_in{font-weight:bold;color:var(--tui-support-06)}tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link{font-weight:normal}tui-doc-code .hljs-string{color:var(--tui-positive);font-weight:bold}tui-doc-code .hljs-symbol,tui-doc-code .hljs-bullet,tui-doc-code .hljs-formula{color:var(--tui-text-01);background:var(--tui-base-02);font-style:italic}tui-doc-code .hljs-doctag{text-decoration:underline}tui-doc-code .hljs-variable,tui-doc-code .hljs-template-variable{color:var(--tui-link-hover)}tui-doc-code [data-mode=onDark] .hljs-variable,tui-doc-code [data-mode=onDark] .hljs-template-variable{color:var(--tui-warning-fill)}tui-doc-code .hljs-addition{background:var(--tui-success-bg)}tui-doc-code .hljs-deletion{background:var(--tui-error-bg)}tui-doc-code .hljs-emphasis{font-style:italic}tui-doc-code .hljs-strong{font-weight:bold}tui-doc-code .hljs .hljs-line-numbers{padding:0}tui-doc-code .hljs-ln-numbers{vertical-align:top;opacity:.3;text-align:right;padding-right:1em!important}\n"], components: [{ type: i2.TuiThemeNightComponent, selector: "tui-theme-night" }, { type: i2.TuiRootComponent, selector: "tui-root" }, { type: TuiDocNavigationComponent, selector: "tui-doc-navigation" }, { type: TuiDocHeaderComponent, selector: "header[tuiDocHeader]" }, { type: i2.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }, { type: i2.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
1721
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocMainComponent, decorators: [{
1722
- type: Component,
1723
- args: [{
1724
- selector: 'tui-doc-main',
1725
- templateUrl: './main.template.html',
1726
- styleUrls: ['./main.style.less'],
1727
- encapsulation: ViewEncapsulation.None,
1728
- // @note: This one was default on purpose so we can test demo in default mode.
1729
- // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
1730
- changeDetection: ChangeDetectionStrategy.Default,
1731
- providers: [
1732
- {
1733
- provide: TuiModeDirective,
1734
- useExisting: forwardRef(() => TuiDocMainComponent),
1735
- },
1736
- TuiSwipeService,
1737
- ],
1738
- }]
1739
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1740
- type: Inject,
1741
- args: [TUI_DOC_ICONS]
1742
- }] }, { type: i6$2.TuiThemeService, decorators: [{
1743
- type: Inject,
1744
- args: [TuiThemeService]
1745
- }] }, { type: i6$2.TuiThemeNightService, decorators: [{
1746
- type: Inject,
1747
- args: [TuiThemeNightService]
1748
- }] }]; }, propDecorators: { mode: [{
1749
- type: HostBinding,
1750
- args: ['attr.data-mode']
1751
- }] } });
1752
-
1753
- class TuiDocMainModule {
1754
- }
1755
- TuiDocMainModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocMainModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1756
- TuiDocMainModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocMainModule, declarations: [TuiDocMainComponent], imports: [CommonModule,
1757
- RouterModule,
1758
- TuiThemeNightModule,
1759
- TuiDocHeaderModule,
1760
- TuiRootModule,
1761
- TuiDialogModule,
1762
- TuiAlertModule,
1763
- TuiButtonModule,
1764
- TuiModeModule,
1765
- TuiDocNavigationModule], exports: [TuiDocMainComponent] });
1766
- TuiDocMainModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocMainModule, imports: [[
1767
- CommonModule,
1768
- RouterModule,
1769
- TuiThemeNightModule,
1770
- TuiDocHeaderModule,
1771
- TuiRootModule,
1772
- TuiDialogModule,
1773
- TuiAlertModule,
1774
- TuiButtonModule,
1775
- TuiModeModule,
1776
- TuiDocNavigationModule,
1777
- ]] });
1778
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocMainModule, decorators: [{
1779
- type: NgModule,
1780
- args: [{
1781
- imports: [
1782
- CommonModule,
1783
- RouterModule,
1784
- TuiThemeNightModule,
1785
- TuiDocHeaderModule,
1786
- TuiRootModule,
1787
- TuiDialogModule,
1788
- TuiAlertModule,
1789
- TuiButtonModule,
1790
- TuiModeModule,
1791
- TuiDocNavigationModule,
1792
- ],
1793
- declarations: [TuiDocMainComponent],
1794
- exports: [TuiDocMainComponent],
1795
- }]
1796
- }] });
1797
-
1798
- /**
1799
- * Array if related page titles
1800
- */
1801
- const PAGE_SEE_ALSO = new InjectionToken(`[PAGE_SEE_ALSO]`);
1802
- const PAGE_PROVIDERS = [
1803
- {
1804
- provide: PAGE_SEE_ALSO,
1805
- deps: [ElementRef, TUI_DOC_SEE_ALSO],
1806
- useFactory: ({ nativeElement }, seeAlsoGroups) => {
1807
- const currentHeader = nativeElement.getAttribute(`header`);
1808
- const groups = seeAlsoGroups.filter(group => group.includes(currentHeader)) || [];
1809
- const seeAlsoSet = new Set(groups
1810
- .join()
1811
- .split(`,`)
1812
- .filter(component => component && component !== currentHeader));
1813
- return Array.from(seeAlsoSet);
1814
- },
1815
- },
1816
- ];
1817
-
1818
- class TuiDocPageTabConnectorDirective {
1819
- constructor(template) {
1820
- this.template = template;
1821
- }
1822
- }
1823
- TuiDocPageTabConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocPageTabConnectorDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
1824
- TuiDocPageTabConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocPageTabConnectorDirective, selector: "[pageTab]", inputs: { pageTab: "pageTab" }, ngImport: i0 });
1825
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocPageTabConnectorDirective, decorators: [{
1826
- type: Directive,
1827
- args: [{
1828
- selector: '[pageTab]',
1829
- }]
1830
- }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
1831
- type: Inject,
1832
- args: [TemplateRef]
1833
- }] }]; }, propDecorators: { pageTab: [{
1834
- type: Input
1835
- }] } });
1836
-
1837
- class TuiDocPageComponent {
1838
- constructor(defaultTabs, seeAlso) {
1839
- this.defaultTabs = defaultTabs;
1840
- this.seeAlso = seeAlso;
1841
- this.header = '';
1842
- this.package = '';
1843
- this.type = '';
1844
- this.path = '';
1845
- this.deprecated = false;
1846
- this.tabConnectors = EMPTY_QUERY;
1847
- this.activeItemIndex = 0;
1848
- this.from = / /g;
1849
- this.to = '_';
1850
- }
1851
- get showSeeAlso() {
1852
- return !!this.seeAlso.length && this.activeItemIndex === 0;
1853
- }
1854
- }
1855
- TuiDocPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocPageComponent, deps: [{ token: TUI_DOC_DEFAULT_TABS }, { token: PAGE_SEE_ALSO }], target: i0.ɵɵFactoryTarget.Component });
1856
- TuiDocPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocPageComponent, selector: "tui-doc-page", inputs: { header: "header", package: "package", type: "type", path: "path", deprecated: "deprecated" }, providers: PAGE_PROVIDERS, queries: [{ propertyName: "tabConnectors", predicate: TuiDocPageTabConnectorDirective }], ngImport: i0, template: "<header class=\"t-header\">\n <h1 class=\"t-title\">\n {{ header }}\n <tui-tag\n *ngIf=\"!!deprecated || deprecated === ''\"\n status=\"custom\"\n value=\"deprecated\"\n class=\"t-tag t-tag_deprecated\"\n ></tui-tag>\n <tui-tag\n *ngIf=\"package\"\n status=\"custom\"\n class=\"t-tag t-tag_package\"\n [autoColor]=\"true\"\n [value]=\"package\"\n ></tui-tag>\n </h1>\n <tui-tabs-with-more\n *ngIf=\"tabConnectors.length\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabConnectors; first as first; index as index\">\n <ng-container *ngIf=\"tab.pageTab || defaultTabs[index] as tabName\">\n <a\n *tuiItem\n routerLinkActive\n tuiTab\n [routerLink]=\"first ? './' : (tabName | tuiReplace: from : to)\"\n [routerLinkActiveOptions]=\"{exact: first}\"\n >\n {{ tabName }}\n </a>\n </ng-container>\n </ng-container>\n </tui-tabs-with-more>\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header\"\n [package]=\"package\"\n [path]=\"path\"\n [type]=\"type\"\n ></tui-doc-source-code>\n</header>\n<div class=\"t-content\">\n <ng-content></ng-content>\n <tui-doc-see-also\n *ngIf=\"showSeeAlso\"\n class=\"t-see-also\"\n [seeAlso]=\"seeAlso\"\n ></tui-doc-see-also>\n <ng-container *ngFor=\"let tab of tabConnectors; index as index\">\n <ng-container\n *ngIf=\"index === activeItemIndex\"\n [ngTemplateOutlet]=\"tab.template\"\n ></ng-container>\n </ng-container>\n</div>\n", styles: [":host{display:flex;flex-direction:column;min-height:0;flex-basis:0;flex-grow:1}.t-header{display:flex;font:var(--tui-font-heading-3);flex-wrap:wrap;min-height:7.25rem;color:var(--tui-text-01);box-shadow:inset 0 -1px 0 0 var(--tui-base-03);padding:3.75rem 0 0;box-sizing:border-box;flex-shrink:0;margin:0 min(10vw,8.75rem)}:host-context(tui-root._mobile) .t-header{font:var(--tui-font-heading-4);min-height:4.5rem;padding:1.25rem 1.25rem 0;margin:0}.t-title{min-width:100%;font-size:inherit;margin:0}.t-tag{vertical-align:middle;text-transform:uppercase;margin-right:.5rem}.t-tag_deprecated{background-color:var(--tui-error-fill)}.t-tag.t-tag_package{color:#000}.t-tabs{flex:1;margin:1.125rem .3125rem 0 0}:host-context(tui-root._mobile) .t-tabs{margin-top:.25rem}.t-content{padding:2rem 0;margin:0 min(10vw,8.75rem)}:host-context(tui-root._mobile) .t-content{padding:2rem 1.25rem;margin:0}.t-see-also{min-width:18.75rem;width:30%;float:right;margin-left:1.5rem}:host-context(tui-root._mobile) .t-see-also{float:none;width:100%;margin:0 0 1.5rem}.t-source-code{align-self:flex-end;line-height:2.75rem;margin-left:auto}\n"], components: [{ type: i1.TuiTagComponent, selector: "tui-tag, a[tuiTag], button[tuiTag]", inputs: ["value", "editable", "separator", "maxLength", "size", "showLoader", "status", "hoverable", "removable", "disabled", "autoColor", "leftContent"], outputs: ["edited"] }, { type: i1.TuiTabsWithMoreComponent, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["moreContent", "dropdownContent", "underline", "activeItemIndex", "itemsLimit"], outputs: ["activeItemIndexChange"] }, { type: i1.TuiTabComponent, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { type: TuiDocSourceCodeComponent, selector: "tui-doc-source-code", inputs: ["header", "package", "type", "path"] }, { type: TuiDocSeeAlsoComponent, selector: "tui-doc-see-also", inputs: ["seeAlso"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6$1.TuiItemDirective, selector: "[tuiItem]" }, { type: i6.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i6.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "tuiReplace": i6$1.TuiReplacePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1857
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocPageComponent, decorators: [{
1858
- type: Component,
1859
- args: [{
1860
- selector: 'tui-doc-page',
1861
- templateUrl: './page.template.html',
1862
- styleUrls: ['./page.style.less'],
1863
- changeDetection: ChangeDetectionStrategy.OnPush,
1864
- providers: PAGE_PROVIDERS,
1865
- }]
1866
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1867
- type: Inject,
1868
- args: [TUI_DOC_DEFAULT_TABS]
1869
- }] }, { type: undefined, decorators: [{
1870
- type: Inject,
1871
- args: [PAGE_SEE_ALSO]
1872
- }] }]; }, propDecorators: { header: [{
1873
- type: Input
1874
- }], package: [{
1875
- type: Input
1876
- }], type: [{
1877
- type: Input
1878
- }], path: [{
1879
- type: Input
1880
- }], deprecated: [{
1881
- type: Input
1882
- }], tabConnectors: [{
1883
- type: ContentChildren,
1884
- args: [TuiDocPageTabConnectorDirective]
1885
- }] } });
1886
-
1887
- class TuiDocPageModule {
1888
- }
1889
- TuiDocPageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocPageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1890
- TuiDocPageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocPageModule, declarations: [TuiDocPageComponent, TuiDocPageTabConnectorDirective], imports: [CommonModule,
1891
- RouterModule,
1892
- TuiDocSeeAlsoModule,
1893
- TuiTabsModule,
1894
- TuiTagModule,
1895
- TuiDocSourceCodeModule,
1896
- TuiReplacePipeModule], exports: [TuiDocPageComponent, TuiDocPageTabConnectorDirective] });
1897
- TuiDocPageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocPageModule, imports: [[
1898
- CommonModule,
1899
- RouterModule,
1900
- TuiDocSeeAlsoModule,
1901
- TuiTabsModule,
1902
- TuiTagModule,
1903
- TuiDocSourceCodeModule,
1904
- TuiReplacePipeModule,
1905
- ]] });
1906
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDocPageModule, decorators: [{
1907
- type: NgModule,
1908
- args: [{
1909
- imports: [
1910
- CommonModule,
1911
- RouterModule,
1912
- TuiDocSeeAlsoModule,
1913
- TuiTabsModule,
1914
- TuiTagModule,
1915
- TuiDocSourceCodeModule,
1916
- TuiReplacePipeModule,
1917
- ],
1918
- declarations: [TuiDocPageComponent, TuiDocPageTabConnectorDirective],
1919
- exports: [TuiDocPageComponent, TuiDocPageTabConnectorDirective],
1920
- }]
1921
- }] });
1922
-
1923
- /**
1924
- * Generated bundle index. Do not edit.
1925
- */
1926
-
1927
- export { PAGE_PROVIDERS, PAGE_SEE_ALSO, TUI_DOC_EXAMPLE_DEFAULT_OPTIONS, TUI_DOC_EXAMPLE_OPTIONS, TuiDocCodeComponent, TuiDocCodeModule, TuiDocCopyComponent, TuiDocCopyModule, TuiDocDemoComponent, TuiDocDemoModule, TuiDocDocumentationComponent, TuiDocDocumentationModule, TuiDocDocumentationPropertyConnectorDirective, TuiDocExampleComponent, TuiDocExampleGetTabsPipe, TuiDocExampleModule, TuiDocHeaderComponent, TuiDocHeaderModule, TuiDocMainComponent, TuiDocMainModule, TuiDocNavigationComponent, TuiDocNavigationModule, TuiDocPageComponent, TuiDocPageModule, TuiDocPageTabConnectorDirective, TuiDocSeeAlsoComponent, TuiDocSeeAlsoModule, TuiDocSourceCodeComponent, TuiDocSourceCodeModule, TuiDocTypeReferencePipe, TuiGetColorPipe, TuiGetOpacityPipe, TuiInputOpacityDirective, TuiInputOpacityModule, TuiInspectPipe, TuiIsOptionalPipe, TuiIsPrimitivePolymorpheusContentPipe, TuiLanguageSwitcherComponent, TuiLanguageSwitcherModule, TuiShowCleanerPipe, TuiStripOptionalPipe, tuiDocExampleOptionsProvider };
1928
- //# sourceMappingURL=taiga-ui-addon-doc-components.js.map