@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,2500 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/addon-doc/tokens'), require('@taiga-ui/addon-doc/utils'), require('rxjs'), require('rxjs/operators'), require('@taiga-ui/core'), require('@angular/common'), require('ngx-highlightjs'), require('@angular/cdk/clipboard'), require('@taiga-ui/cdk'), require('@taiga-ui/kit'), require('@angular/forms'), require('@angular/router'), require('@angular/animations'), require('@ng-web-apis/common'), require('@taiga-ui/addon-doc/interfaces'), require('@tinkoff/ng-polymorpheus'), require('@angular/platform-browser'), require('@taiga-ui/addon-mobile'), require('@taiga-ui/addon-doc/directives'), require('@taiga-ui/i18n'), require('@taiga-ui/addon-doc/services')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/addon-doc/components', ['exports', '@angular/core', '@taiga-ui/addon-doc/tokens', '@taiga-ui/addon-doc/utils', 'rxjs', 'rxjs/operators', '@taiga-ui/core', '@angular/common', 'ngx-highlightjs', '@angular/cdk/clipboard', '@taiga-ui/cdk', '@taiga-ui/kit', '@angular/forms', '@angular/router', '@angular/animations', '@ng-web-apis/common', '@taiga-ui/addon-doc/interfaces', '@tinkoff/ng-polymorpheus', '@angular/platform-browser', '@taiga-ui/addon-mobile', '@taiga-ui/addon-doc/directives', '@taiga-ui/i18n', '@taiga-ui/addon-doc/services'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"]["addon-doc"] = global["taiga-ui"]["addon-doc"] || {}, global["taiga-ui"]["addon-doc"].components = {}), global.ng.core, global["taiga-ui"]["addon-doc"].tokens, global["taiga-ui"]["addon-doc"].utils, global.rxjs, global.rxjs.operators, global.i2, global.ng.common, global.i3, global.ng.cdk.clipboard, global.i6, global.i1, global.ng.forms, global.ng.router, global.ng.animations, global.common, global["taiga-ui"]["addon-doc"].interfaces, global.i5$1, global.ng.platformBrowser, global.i4$2, global["taiga-ui"]["addon-doc"].directives, global.i5$2, global["taiga-ui"]["addon-doc"].services));
5
- })(this, (function (exports, i0, tokens, utils, i10, operators, i2, i4, i3, i4$1, i6, i1, i5, i6$1, animations, common, interfaces, i5$1, i9, i4$2, i8, i5$2, i6$2) { 'use strict';
6
-
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () { return e[k]; }
17
- });
18
- }
19
- });
20
- }
21
- n["default"] = e;
22
- return Object.freeze(n);
23
- }
24
-
25
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
27
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
28
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
29
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
30
- var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
31
- var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6);
32
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
33
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
34
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6$1);
35
- var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
36
- var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
37
- var i4__namespace$2 = /*#__PURE__*/_interopNamespace(i4$2);
38
- var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
39
- var i5__namespace$2 = /*#__PURE__*/_interopNamespace(i5$2);
40
- var i6__namespace$2 = /*#__PURE__*/_interopNamespace(i6$2);
41
-
42
- var TuiDocCodeComponent = /** @class */ (function () {
43
- function TuiDocCodeComponent(markdownCodeProcessor) {
44
- var _this = this;
45
- this.markdownCodeProcessor = markdownCodeProcessor;
46
- this.rawLoader$$ = new i10.BehaviorSubject('');
47
- this.filename = '';
48
- this.copy$ = new i10.Subject();
49
- this.icon$ = this.copy$.pipe(operators.switchMap(function () { return i10.timer(2000).pipe(operators.map(function () { return 'tuiIconCopyLarge'; }), operators.startWith('tuiIconCheckLarge')); }));
50
- this.processor$ = this.rawLoader$$.pipe(operators.switchMap(utils.tuiRawLoad), operators.map(function (value) { return _this.markdownCodeProcessor(value); }));
51
- }
52
- Object.defineProperty(TuiDocCodeComponent.prototype, "code", {
53
- set: function (code) {
54
- this.rawLoader$$.next(code);
55
- },
56
- enumerable: false,
57
- configurable: true
58
- });
59
- Object.defineProperty(TuiDocCodeComponent.prototype, "hasFilename", {
60
- get: function () {
61
- return !!this.filename;
62
- },
63
- enumerable: false,
64
- configurable: true
65
- });
66
- return TuiDocCodeComponent;
67
- }());
68
- TuiDocCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeComponent, deps: [{ token: tokens.TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR }], target: i0__namespace.ɵɵFactoryTarget.Component });
69
- TuiDocCodeComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.Highlight, selector: "[highlight]", inputs: ["highlight", "languages", "lineNumbers"], outputs: ["highlighted"] }, { type: i4__namespace$1.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
70
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeComponent, decorators: [{
71
- type: i0.Component,
72
- args: [{
73
- selector: 'tui-doc-code',
74
- templateUrl: './code.template.html',
75
- styleUrls: ['./code.style.less'],
76
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
77
- }]
78
- }], ctorParameters: function () {
79
- return [{ type: undefined, decorators: [{
80
- type: i0.Inject,
81
- args: [tokens.TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR]
82
- }] }];
83
- }, propDecorators: { filename: [{
84
- type: i0.Input
85
- }], code: [{
86
- type: i0.Input
87
- }], hasFilename: [{
88
- type: i0.HostBinding,
89
- args: ['class._has-filename']
90
- }] } });
91
-
92
- var TuiDocCodeModule = /** @class */ (function () {
93
- function TuiDocCodeModule() {
94
- }
95
- return TuiDocCodeModule;
96
- }());
97
- TuiDocCodeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
98
- TuiDocCodeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, declarations: [TuiDocCodeComponent], imports: [i4.CommonModule,
99
- i2.TuiSvgModule,
100
- i3.HighlightModule,
101
- i2.TuiButtonModule,
102
- i4$1.ClipboardModule], exports: [TuiDocCodeComponent] });
103
- TuiDocCodeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, imports: [[
104
- i4.CommonModule,
105
- i2.TuiSvgModule,
106
- i3.HighlightModule,
107
- i2.TuiButtonModule,
108
- i4$1.ClipboardModule,
109
- ]] });
110
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, decorators: [{
111
- type: i0.NgModule,
112
- args: [{
113
- imports: [
114
- i4.CommonModule,
115
- i2.TuiSvgModule,
116
- i3.HighlightModule,
117
- i2.TuiButtonModule,
118
- i4$1.ClipboardModule,
119
- ],
120
- declarations: [TuiDocCodeComponent],
121
- exports: [TuiDocCodeComponent],
122
- }]
123
- }] });
124
-
125
- /*! *****************************************************************************
126
- Copyright (c) Microsoft Corporation.
127
-
128
- Permission to use, copy, modify, and/or distribute this software for any
129
- purpose with or without fee is hereby granted.
130
-
131
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
132
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
133
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
134
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
135
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
136
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
137
- PERFORMANCE OF THIS SOFTWARE.
138
- ***************************************************************************** */
139
- /* global Reflect, Promise */
140
- var extendStatics = function (d, b) {
141
- extendStatics = Object.setPrototypeOf ||
142
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
143
- function (d, b) { for (var p in b)
144
- if (Object.prototype.hasOwnProperty.call(b, p))
145
- d[p] = b[p]; };
146
- return extendStatics(d, b);
147
- };
148
- function __extends(d, b) {
149
- if (typeof b !== "function" && b !== null)
150
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
151
- extendStatics(d, b);
152
- function __() { this.constructor = d; }
153
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
154
- }
155
- var __assign = function () {
156
- __assign = Object.assign || function __assign(t) {
157
- for (var s, i = 1, n = arguments.length; i < n; i++) {
158
- s = arguments[i];
159
- for (var p in s)
160
- if (Object.prototype.hasOwnProperty.call(s, p))
161
- t[p] = s[p];
162
- }
163
- return t;
164
- };
165
- return __assign.apply(this, arguments);
166
- };
167
- function __rest(s, e) {
168
- var t = {};
169
- for (var p in s)
170
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
171
- t[p] = s[p];
172
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
173
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
174
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
175
- t[p[i]] = s[p[i]];
176
- }
177
- return t;
178
- }
179
- function __decorate(decorators, target, key, desc) {
180
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
181
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
182
- r = Reflect.decorate(decorators, target, key, desc);
183
- else
184
- for (var i = decorators.length - 1; i >= 0; i--)
185
- if (d = decorators[i])
186
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
187
- return c > 3 && r && Object.defineProperty(target, key, r), r;
188
- }
189
- function __param(paramIndex, decorator) {
190
- return function (target, key) { decorator(target, key, paramIndex); };
191
- }
192
- function __metadata(metadataKey, metadataValue) {
193
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
194
- return Reflect.metadata(metadataKey, metadataValue);
195
- }
196
- function __awaiter(thisArg, _arguments, P, generator) {
197
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
198
- return new (P || (P = Promise))(function (resolve, reject) {
199
- function fulfilled(value) { try {
200
- step(generator.next(value));
201
- }
202
- catch (e) {
203
- reject(e);
204
- } }
205
- function rejected(value) { try {
206
- step(generator["throw"](value));
207
- }
208
- catch (e) {
209
- reject(e);
210
- } }
211
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
212
- step((generator = generator.apply(thisArg, _arguments || [])).next());
213
- });
214
- }
215
- function __generator(thisArg, body) {
216
- var _ = { label: 0, sent: function () { if (t[0] & 1)
217
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
218
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
219
- function verb(n) { return function (v) { return step([n, v]); }; }
220
- function step(op) {
221
- if (f)
222
- throw new TypeError("Generator is already executing.");
223
- while (_)
224
- try {
225
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
226
- return t;
227
- if (y = 0, t)
228
- op = [op[0] & 2, t.value];
229
- switch (op[0]) {
230
- case 0:
231
- case 1:
232
- t = op;
233
- break;
234
- case 4:
235
- _.label++;
236
- return { value: op[1], done: false };
237
- case 5:
238
- _.label++;
239
- y = op[1];
240
- op = [0];
241
- continue;
242
- case 7:
243
- op = _.ops.pop();
244
- _.trys.pop();
245
- continue;
246
- default:
247
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
248
- _ = 0;
249
- continue;
250
- }
251
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
252
- _.label = op[1];
253
- break;
254
- }
255
- if (op[0] === 6 && _.label < t[1]) {
256
- _.label = t[1];
257
- t = op;
258
- break;
259
- }
260
- if (t && _.label < t[2]) {
261
- _.label = t[2];
262
- _.ops.push(op);
263
- break;
264
- }
265
- if (t[2])
266
- _.ops.pop();
267
- _.trys.pop();
268
- continue;
269
- }
270
- op = body.call(thisArg, _);
271
- }
272
- catch (e) {
273
- op = [6, e];
274
- y = 0;
275
- }
276
- finally {
277
- f = t = 0;
278
- }
279
- if (op[0] & 5)
280
- throw op[1];
281
- return { value: op[0] ? op[1] : void 0, done: true };
282
- }
283
- }
284
- var __createBinding = Object.create ? (function (o, m, k, k2) {
285
- if (k2 === undefined)
286
- k2 = k;
287
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
288
- }) : (function (o, m, k, k2) {
289
- if (k2 === undefined)
290
- k2 = k;
291
- o[k2] = m[k];
292
- });
293
- function __exportStar(m, o) {
294
- for (var p in m)
295
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
296
- __createBinding(o, m, p);
297
- }
298
- function __values(o) {
299
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
300
- if (m)
301
- return m.call(o);
302
- if (o && typeof o.length === "number")
303
- return {
304
- next: function () {
305
- if (o && i >= o.length)
306
- o = void 0;
307
- return { value: o && o[i++], done: !o };
308
- }
309
- };
310
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
311
- }
312
- function __read(o, n) {
313
- var m = typeof Symbol === "function" && o[Symbol.iterator];
314
- if (!m)
315
- return o;
316
- var i = m.call(o), r, ar = [], e;
317
- try {
318
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
319
- ar.push(r.value);
320
- }
321
- catch (error) {
322
- e = { error: error };
323
- }
324
- finally {
325
- try {
326
- if (r && !r.done && (m = i["return"]))
327
- m.call(i);
328
- }
329
- finally {
330
- if (e)
331
- throw e.error;
332
- }
333
- }
334
- return ar;
335
- }
336
- /** @deprecated */
337
- function __spread() {
338
- for (var ar = [], i = 0; i < arguments.length; i++)
339
- ar = ar.concat(__read(arguments[i]));
340
- return ar;
341
- }
342
- /** @deprecated */
343
- function __spreadArrays() {
344
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
345
- s += arguments[i].length;
346
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
347
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
348
- r[k] = a[j];
349
- return r;
350
- }
351
- function __spreadArray(to, from, pack) {
352
- if (pack || arguments.length === 2)
353
- for (var i = 0, l = from.length, ar; i < l; i++) {
354
- if (ar || !(i in from)) {
355
- if (!ar)
356
- ar = Array.prototype.slice.call(from, 0, i);
357
- ar[i] = from[i];
358
- }
359
- }
360
- return to.concat(ar || from);
361
- }
362
- function __await(v) {
363
- return this instanceof __await ? (this.v = v, this) : new __await(v);
364
- }
365
- function __asyncGenerator(thisArg, _arguments, generator) {
366
- if (!Symbol.asyncIterator)
367
- throw new TypeError("Symbol.asyncIterator is not defined.");
368
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
369
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
370
- function verb(n) { if (g[n])
371
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
372
- function resume(n, v) { try {
373
- step(g[n](v));
374
- }
375
- catch (e) {
376
- settle(q[0][3], e);
377
- } }
378
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
379
- function fulfill(value) { resume("next", value); }
380
- function reject(value) { resume("throw", value); }
381
- function settle(f, v) { if (f(v), q.shift(), q.length)
382
- resume(q[0][0], q[0][1]); }
383
- }
384
- function __asyncDelegator(o) {
385
- var i, p;
386
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
387
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
388
- }
389
- function __asyncValues(o) {
390
- if (!Symbol.asyncIterator)
391
- throw new TypeError("Symbol.asyncIterator is not defined.");
392
- var m = o[Symbol.asyncIterator], i;
393
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
394
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
395
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
396
- }
397
- function __makeTemplateObject(cooked, raw) {
398
- if (Object.defineProperty) {
399
- Object.defineProperty(cooked, "raw", { value: raw });
400
- }
401
- else {
402
- cooked.raw = raw;
403
- }
404
- return cooked;
405
- }
406
- ;
407
- var __setModuleDefault = Object.create ? (function (o, v) {
408
- Object.defineProperty(o, "default", { enumerable: true, value: v });
409
- }) : function (o, v) {
410
- o["default"] = v;
411
- };
412
- function __importStar(mod) {
413
- if (mod && mod.__esModule)
414
- return mod;
415
- var result = {};
416
- if (mod != null)
417
- for (var k in mod)
418
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
419
- __createBinding(result, mod, k);
420
- __setModuleDefault(result, mod);
421
- return result;
422
- }
423
- function __importDefault(mod) {
424
- return (mod && mod.__esModule) ? mod : { default: mod };
425
- }
426
- function __classPrivateFieldGet(receiver, state, kind, f) {
427
- if (kind === "a" && !f)
428
- throw new TypeError("Private accessor was defined without a getter");
429
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
430
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
431
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
432
- }
433
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
434
- if (kind === "m")
435
- throw new TypeError("Private method is not writable");
436
- if (kind === "a" && !f)
437
- throw new TypeError("Private accessor was defined without a setter");
438
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
439
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
440
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
441
- }
442
-
443
- var COPIED_TIMEOUT = 1500;
444
- var TuiDocCopyComponent = /** @class */ (function () {
445
- function TuiDocCopyComponent(texts$) {
446
- this.texts$ = texts$;
447
- this.copy$ = new i10.Subject();
448
- }
449
- Object.defineProperty(TuiDocCopyComponent.prototype, "copied$", {
450
- get: function () {
451
- return this.copy$.pipe(operators.switchMap(function () { return i10.timer(COPIED_TIMEOUT).pipe(operators.map(i6.ALWAYS_FALSE_HANDLER), operators.startWith(true)); }));
452
- },
453
- enumerable: false,
454
- configurable: true
455
- });
456
- TuiDocCopyComponent.prototype.onClick = function () {
457
- this.copy$.next();
458
- };
459
- return TuiDocCopyComponent;
460
- }());
461
- TuiDocCopyComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCopyComponent, deps: [{ token: i1.TUI_COPY_TEXTS }], target: i0__namespace.ɵɵFactoryTarget.Component });
462
- TuiDocCopyComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocCopyComponent, selector: "tui-doc-copy", providers: [i6.TuiDestroyService], ngImport: i0__namespace, 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__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
463
- __decorate([
464
- i6.tuiPure
465
- ], TuiDocCopyComponent.prototype, "copied$", null);
466
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCopyComponent, decorators: [{
467
- type: i0.Component,
468
- args: [{
469
- selector: 'tui-doc-copy',
470
- templateUrl: './copy.template.html',
471
- styleUrls: ['./copy.style.less'],
472
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
473
- providers: [i6.TuiDestroyService],
474
- }]
475
- }], ctorParameters: function () {
476
- return [{ type: i10__namespace.Observable, decorators: [{
477
- type: i0.Inject,
478
- args: [i1.TUI_COPY_TEXTS]
479
- }] }];
480
- }, propDecorators: { copied$: [] } });
481
-
482
- var TuiDocCopyModule = /** @class */ (function () {
483
- function TuiDocCopyModule() {
484
- }
485
- return TuiDocCopyModule;
486
- }());
487
- TuiDocCopyModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCopyModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
488
- TuiDocCopyModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCopyModule, declarations: [TuiDocCopyComponent], imports: [i4.CommonModule, i2.TuiButtonModule], exports: [TuiDocCopyComponent] });
489
- TuiDocCopyModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCopyModule, imports: [[i4.CommonModule, i2.TuiButtonModule]] });
490
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCopyModule, decorators: [{
491
- type: i0.NgModule,
492
- args: [{
493
- imports: [i4.CommonModule, i2.TuiButtonModule],
494
- declarations: [TuiDocCopyComponent],
495
- exports: [TuiDocCopyComponent],
496
- }]
497
- }] });
498
-
499
- var MIN_WIDTH = 160;
500
- var TuiDocDemoComponent = /** @class */ (function () {
501
- function TuiDocDemoComponent(options, isMobile, el, locationRef, urlSerializer, texts, urlStateHandler) {
502
- var _a, _b;
503
- this.options = options;
504
- this.isMobile = isMobile;
505
- this.el = el;
506
- this.locationRef = locationRef;
507
- this.urlSerializer = urlSerializer;
508
- this.texts = texts;
509
- this.urlStateHandler = urlStateHandler;
510
- this.control = null;
511
- this.sticky = true;
512
- this.template = null;
513
- this.updateOnVariants = ['change', 'blur', 'submit'];
514
- this.updateOn = this.params.updateOn || this.updateOnVariants[0];
515
- this.opaque = utils.tuiCoerceValueIsTrue((_a = this.params.sandboxOpaque) !== null && _a !== void 0 ? _a : true);
516
- this.expanded = utils.tuiCoerceValueIsTrue((_b = this.params.sandboxExpanded) !== null && _b !== void 0 ? _b : false);
517
- this.mode = this.params.tuiMode || null;
518
- this.sandboxWidth = i6.tuiToInteger(this.params.sandboxWidth);
519
- this.change$ = new i10.Subject();
520
- this.items = ['onLight', 'onDark'];
521
- }
522
- TuiDocDemoComponent.prototype.onResize = function () {
523
- this.updateWidth();
524
- this.onMouseUp();
525
- };
526
- TuiDocDemoComponent.prototype.onMouseUp = function () {
527
- this.updateUrl({ sandboxWidth: this.sandboxWidth });
528
- };
529
- TuiDocDemoComponent.prototype.ngOnInit = function () {
530
- this.createForm();
531
- this.updateWidth(this.sandboxWidth + this.delta);
532
- };
533
- TuiDocDemoComponent.prototype.onModeChange = function (mode) {
534
- this.mode = mode;
535
- this.updateUrl({ sandboxWidth: this.sandboxWidth });
536
- this.change$.next();
537
- };
538
- TuiDocDemoComponent.prototype.toggleDetails = function () {
539
- this.expanded = !this.expanded;
540
- this.updateUrl({ sandboxExpanded: this.expanded });
541
- };
542
- TuiDocDemoComponent.prototype.changeOpaque = function (opaque) {
543
- this.opaque = opaque;
544
- this.updateUrl({ sandboxOpaque: this.opaque });
545
- };
546
- TuiDocDemoComponent.prototype.updateOnChange = function (updateOn) {
547
- this.updateOn = updateOn;
548
- this.updateUrl({ updateOn: updateOn });
549
- this.createForm();
550
- };
551
- TuiDocDemoComponent.prototype.updateWidth = function (width) {
552
- if (width === void 0) { width = NaN; }
553
- if (!this.resizer || !this.resizeable || !this.content) {
554
- return;
555
- }
556
- var safe = width || this.resizeable.nativeElement.clientWidth;
557
- var total = this.el.nativeElement.clientWidth;
558
- var clamped = Math.round(i6.tuiClamp(safe, MIN_WIDTH, total)) - this.delta;
559
- var validated = safe < total ? clamped : NaN;
560
- this.resizer.nativeElement.textContent = String(clamped || '-');
561
- this.resizeable.nativeElement.style.width = validated ? i6.tuiPx(safe) : '';
562
- this.sandboxWidth = validated;
563
- };
564
- Object.defineProperty(TuiDocDemoComponent.prototype, "delta", {
565
- get: function () {
566
- return this.resizeable && this.content
567
- ? this.resizeable.nativeElement.clientWidth -
568
- this.content.nativeElement.clientWidth
569
- : 0;
570
- },
571
- enumerable: false,
572
- configurable: true
573
- });
574
- TuiDocDemoComponent.prototype.updateUrl = function (params) {
575
- var tree = this.getUrlTree();
576
- var queryParams = tree.queryParams;
577
- delete queryParams.sandboxWidth;
578
- delete queryParams.tuiMode;
579
- tree.queryParams = Object.assign(Object.assign({}, queryParams), i6.tuiCleanObject(Object.assign({ tuiMode: this.mode }, params)));
580
- this.locationRef.go(this.urlStateHandler(tree));
581
- };
582
- TuiDocDemoComponent.prototype.createForm = function () {
583
- var _c = this, control = _c.control, updateOn = _c.updateOn;
584
- if (control) {
585
- this.testForm = new i5.FormGroup({ testValue: control }, { updateOn: updateOn });
586
- }
587
- };
588
- TuiDocDemoComponent.prototype.getUrlTree = function () {
589
- return this.urlSerializer.parse(this.locationRef.path());
590
- };
591
- Object.defineProperty(TuiDocDemoComponent.prototype, "params", {
592
- get: function () {
593
- return this.getUrlTree().queryParams;
594
- },
595
- enumerable: false,
596
- configurable: true
597
- });
598
- return TuiDocDemoComponent;
599
- }());
600
- TuiDocDemoComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDemoComponent, deps: [{ token: i1.TUI_ARROW_OPTIONS }, { token: i6.TUI_IS_MOBILE }, { token: i0.ElementRef }, { token: i4.Location }, { token: i6$1.UrlSerializer }, { token: tokens.TUI_DOC_DEMO_TEXTS }, { token: tokens.TUI_DOC_URL_STATE_HANDLER }], target: i0__namespace.ɵɵFactoryTarget.Component });
601
- TuiDocDemoComponent.ɵcmp = i0__namespace.ɵɵ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: [
602
- i6.TuiDestroyService,
603
- {
604
- provide: i2.TuiModeDirective,
605
- useExisting: i0.forwardRef(function () { return TuiDocDemoComponent; }),
606
- },
607
- ], queries: [{ propertyName: "template", first: true, predicate: i0.TemplateRef, descendants: true }], viewQueries: [{ propertyName: "resizeable", first: true, predicate: i6.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__namespace, 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__namespace.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { type: i1__namespace.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { type: i1__namespace.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items"] }, { type: i2__namespace.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }, { type: i1__namespace.TuiRadioBlockComponent, selector: "tui-radio-block", inputs: ["item", "identityMatcher", "contentAlign", "size", "hideRadio", "pseudoDisabled"] }, { type: i1__namespace.TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: ["size"] }, { type: i2__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i2__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i2__namespace.TuiExpandComponent, selector: "tui-expand", inputs: ["async", "expanded"] }], directives: [{ type: i2__namespace.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i6__namespace.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.TuiSelectDirective, selector: "tui-select" }, { type: i2__namespace.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { type: i5__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace.TuiHintOptionsDirective, selector: "[tuiHintContent]", inputs: ["tuiHintContent", "tuiHintDirection", "tuiHintAppearance", "tuiHintShowDelay", "tuiHintHideDelay"] }, { type: i2__namespace.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { type: i2__namespace.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i2__namespace.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: i6__namespace$1.TuiResizeableDirective, selector: "[tuiResizeable]" }, { type: i5__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i5__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i5__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace.TuiExpandContentDirective, selector: "[tuiExpandContent]" }, { type: i6__namespace$1.TuiResizerDirective, selector: "[tuiResizer]", inputs: ["tuiResizer"], outputs: ["tuiSizeChange"] }], pipes: { "json": i4__namespace.JsonPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
608
- __decorate([
609
- i6.tuiPure
610
- ], TuiDocDemoComponent.prototype, "updateUrl", null);
611
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDemoComponent, decorators: [{
612
- type: i0.Component,
613
- args: [{
614
- selector: 'tui-doc-demo',
615
- templateUrl: './demo.template.html',
616
- styleUrls: ['./demo.style.less'],
617
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
618
- providers: [
619
- i6.TuiDestroyService,
620
- {
621
- provide: i2.TuiModeDirective,
622
- useExisting: i0.forwardRef(function () { return TuiDocDemoComponent; }),
623
- },
624
- ],
625
- }]
626
- }], ctorParameters: function () {
627
- return [{ type: undefined, decorators: [{
628
- type: i0.Inject,
629
- args: [i1.TUI_ARROW_OPTIONS]
630
- }] }, { type: undefined, decorators: [{
631
- type: i0.Inject,
632
- args: [i6.TUI_IS_MOBILE]
633
- }] }, { type: i0__namespace.ElementRef, decorators: [{
634
- type: i0.Inject,
635
- args: [i0.ElementRef]
636
- }] }, { type: i4__namespace.Location, decorators: [{
637
- type: i0.Inject,
638
- args: [i4.Location]
639
- }] }, { type: i6__namespace.UrlSerializer, decorators: [{
640
- type: i0.Inject,
641
- args: [i6$1.UrlSerializer]
642
- }] }, { type: undefined, decorators: [{
643
- type: i0.Inject,
644
- args: [tokens.TUI_DOC_DEMO_TEXTS]
645
- }] }, { type: undefined, decorators: [{
646
- type: i0.Inject,
647
- args: [tokens.TUI_DOC_URL_STATE_HANDLER]
648
- }] }];
649
- }, propDecorators: { resizeable: [{
650
- type: i0.ViewChild,
651
- args: [i6.TuiResizeableDirective, { static: true }]
652
- }], content: [{
653
- type: i0.ViewChild,
654
- args: ['content', { static: true }]
655
- }], resizer: [{
656
- type: i0.ViewChild,
657
- args: ['resizer', { static: true }]
658
- }], control: [{
659
- type: i0.Input
660
- }], sticky: [{
661
- type: i0.Input
662
- }, {
663
- type: i0.HostBinding,
664
- args: ['class._sticky']
665
- }], template: [{
666
- type: i0.ContentChild,
667
- args: [i0.TemplateRef]
668
- }], onResize: [{
669
- type: i0.HostListener,
670
- args: ['window:resize']
671
- }], onMouseUp: [{
672
- type: i0.HostListener,
673
- args: ['document:mouseup.silent']
674
- }], updateUrl: [] } });
675
-
676
- var TuiDocDemoModule = /** @class */ (function () {
677
- function TuiDocDemoModule() {
678
- }
679
- return TuiDocDemoModule;
680
- }());
681
- TuiDocDemoModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDemoModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
682
- TuiDocDemoModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDemoModule, declarations: [TuiDocDemoComponent], imports: [i4.CommonModule,
683
- i5.ReactiveFormsModule,
684
- i5.FormsModule,
685
- i6$1.RouterModule,
686
- i2.TuiLinkModule,
687
- i2.TuiButtonModule,
688
- i1.TuiSelectModule,
689
- i2.TuiExpandModule,
690
- i2.TuiGroupModule,
691
- i2.TuiTooltipModule,
692
- i2.TuiModeModule,
693
- i1.TuiRadioBlockModule,
694
- i1.TuiCheckboxLabeledModule,
695
- i2.TuiSvgModule,
696
- i1.TuiDataListWrapperModule,
697
- i2.TuiDataListModule,
698
- i2.TuiTextfieldControllerModule,
699
- i2.TuiHintModule,
700
- i6.TuiResizerModule], exports: [TuiDocDemoComponent] });
701
- TuiDocDemoModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDemoModule, imports: [[
702
- i4.CommonModule,
703
- i5.ReactiveFormsModule,
704
- i5.FormsModule,
705
- i6$1.RouterModule,
706
- i2.TuiLinkModule,
707
- i2.TuiButtonModule,
708
- i1.TuiSelectModule,
709
- i2.TuiExpandModule,
710
- i2.TuiGroupModule,
711
- i2.TuiTooltipModule,
712
- i2.TuiModeModule,
713
- i1.TuiRadioBlockModule,
714
- i1.TuiCheckboxLabeledModule,
715
- i2.TuiSvgModule,
716
- i1.TuiDataListWrapperModule,
717
- i2.TuiDataListModule,
718
- i2.TuiTextfieldControllerModule,
719
- i2.TuiHintModule,
720
- i6.TuiResizerModule,
721
- ]] });
722
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDemoModule, decorators: [{
723
- type: i0.NgModule,
724
- args: [{
725
- imports: [
726
- i4.CommonModule,
727
- i5.ReactiveFormsModule,
728
- i5.FormsModule,
729
- i6$1.RouterModule,
730
- i2.TuiLinkModule,
731
- i2.TuiButtonModule,
732
- i1.TuiSelectModule,
733
- i2.TuiExpandModule,
734
- i2.TuiGroupModule,
735
- i2.TuiTooltipModule,
736
- i2.TuiModeModule,
737
- i1.TuiRadioBlockModule,
738
- i1.TuiCheckboxLabeledModule,
739
- i2.TuiSvgModule,
740
- i1.TuiDataListWrapperModule,
741
- i2.TuiDataListModule,
742
- i2.TuiTextfieldControllerModule,
743
- i2.TuiHintModule,
744
- i6.TuiResizerModule,
745
- ],
746
- declarations: [TuiDocDemoComponent],
747
- exports: [TuiDocDemoComponent],
748
- }]
749
- }] });
750
-
751
- var SERIALIZED_SUFFIX = '$';
752
- // @bad TODO: refactor output and value sync
753
- var TuiDocDocumentationPropertyConnectorDirective = /** @class */ (function () {
754
- function TuiDocDocumentationPropertyConnectorDirective(template, locationRef, activatedRoute, urlSerializer, urlStateHandler) {
755
- this.template = template;
756
- this.locationRef = locationRef;
757
- this.activatedRoute = activatedRoute;
758
- this.urlSerializer = urlSerializer;
759
- this.urlStateHandler = urlStateHandler;
760
- this.documentationPropertyName = '';
761
- this.documentationPropertyMode = null;
762
- this.documentationPropertyType = '';
763
- this.documentationPropertyDeprecated = false;
764
- this.documentationPropertyValues = null;
765
- this.documentationPropertyValueChange = new i0.EventEmitter();
766
- this.changed$ = new i10.Subject();
767
- this.emits$ = new i10.BehaviorSubject(1);
768
- }
769
- TuiDocDocumentationPropertyConnectorDirective.prototype.ngOnInit = function () {
770
- this.parseParams(this.activatedRoute.snapshot.queryParams);
771
- };
772
- Object.defineProperty(TuiDocDocumentationPropertyConnectorDirective.prototype, "attrName", {
773
- get: function () {
774
- switch (this.documentationPropertyMode) {
775
- case 'input':
776
- return "[" + this.documentationPropertyName + "]";
777
- case 'output':
778
- return "(" + this.documentationPropertyName + ")";
779
- case 'input-output':
780
- return "[(" + this.documentationPropertyName + ")]";
781
- default:
782
- return this.documentationPropertyName;
783
- }
784
- },
785
- enumerable: false,
786
- configurable: true
787
- });
788
- Object.defineProperty(TuiDocDocumentationPropertyConnectorDirective.prototype, "hasItems", {
789
- get: function () {
790
- return !!this.documentationPropertyValues;
791
- },
792
- enumerable: false,
793
- configurable: true
794
- });
795
- Object.defineProperty(TuiDocDocumentationPropertyConnectorDirective.prototype, "shouldShowValues", {
796
- get: function () {
797
- return this.documentationPropertyMode !== 'output';
798
- },
799
- enumerable: false,
800
- configurable: true
801
- });
802
- TuiDocDocumentationPropertyConnectorDirective.prototype.ngOnChanges = function () {
803
- this.changed$.next();
804
- };
805
- TuiDocDocumentationPropertyConnectorDirective.prototype.onValueChange = function (value) {
806
- this.documentationPropertyValue = value;
807
- this.documentationPropertyValueChange.emit(value);
808
- this.setQueryParam(value);
809
- };
810
- TuiDocDocumentationPropertyConnectorDirective.prototype.emitEvent = function (event) {
811
- // For more convenient debugging
812
- console.info(this.attrName, event);
813
- this.emits$.next(this.emits$.value + 1);
814
- };
815
- TuiDocDocumentationPropertyConnectorDirective.prototype.parseParams = function (params) {
816
- var propertyValue = params[this.documentationPropertyName];
817
- var propertyValueWithSuffix = params["" + this.documentationPropertyName + SERIALIZED_SUFFIX];
818
- if (!propertyValue && !propertyValueWithSuffix) {
819
- return;
820
- }
821
- var value = !!propertyValueWithSuffix && this.documentationPropertyValues
822
- ? this.documentationPropertyValues[propertyValueWithSuffix]
823
- : utils.tuiCoerceValue(propertyValue);
824
- if (this.documentationPropertyType === 'string' && i6.tuiIsNumber(value)) {
825
- value = value.toString();
826
- }
827
- this.onValueChange(value);
828
- };
829
- TuiDocDocumentationPropertyConnectorDirective.prototype.setQueryParam = function (value) {
830
- var _a;
831
- var tree = this.urlSerializer.parse(this.locationRef.path());
832
- var isValueAvailableByKey = value instanceof Object;
833
- var computedValue = isValueAvailableByKey && this.documentationPropertyValues
834
- ? this.documentationPropertyValues.indexOf(value)
835
- : value;
836
- var suffix = isValueAvailableByKey ? SERIALIZED_SUFFIX : '';
837
- var propName = this.documentationPropertyName + suffix;
838
- tree.queryParams = Object.assign(Object.assign({}, tree.queryParams), (_a = {}, _a[propName] = computedValue, _a));
839
- this.locationRef.go(this.urlStateHandler(tree));
840
- };
841
- return TuiDocDocumentationPropertyConnectorDirective;
842
- }());
843
- TuiDocDocumentationPropertyConnectorDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationPropertyConnectorDirective, deps: [{ token: i0.TemplateRef }, { token: i4.Location }, { token: i6$1.ActivatedRoute }, { token: i6$1.UrlSerializer }, { token: tokens.TUI_DOC_URL_STATE_HANDLER }], target: i0__namespace.ɵɵFactoryTarget.Directive });
844
- TuiDocDocumentationPropertyConnectorDirective.ɵdir = i0__namespace.ɵɵ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__namespace });
845
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationPropertyConnectorDirective, decorators: [{
846
- type: i0.Directive,
847
- args: [{
848
- selector: 'ng-template[documentationPropertyName]',
849
- exportAs: 'documentationProperty',
850
- }]
851
- }], ctorParameters: function () {
852
- return [{ type: i0__namespace.TemplateRef, decorators: [{
853
- type: i0.Inject,
854
- args: [i0.TemplateRef]
855
- }] }, { type: i4__namespace.Location, decorators: [{
856
- type: i0.Inject,
857
- args: [i4.Location]
858
- }] }, { type: i6__namespace.ActivatedRoute, decorators: [{
859
- type: i0.Inject,
860
- args: [i6$1.ActivatedRoute]
861
- }] }, { type: i6__namespace.UrlSerializer, decorators: [{
862
- type: i0.Inject,
863
- args: [i6$1.UrlSerializer]
864
- }] }, { type: undefined, decorators: [{
865
- type: i0.Inject,
866
- args: [tokens.TUI_DOC_URL_STATE_HANDLER]
867
- }] }];
868
- }, propDecorators: { documentationPropertyName: [{
869
- type: i0.Input
870
- }], documentationPropertyMode: [{
871
- type: i0.Input
872
- }], documentationPropertyType: [{
873
- type: i0.Input
874
- }], documentationPropertyValue: [{
875
- type: i0.Input
876
- }], documentationPropertyDeprecated: [{
877
- type: i0.Input
878
- }], documentationPropertyValues: [{
879
- type: i0.Input
880
- }], documentationPropertyValueChange: [{
881
- type: i0.Output
882
- }] } });
883
-
884
- var TuiGetColorPipe = /** @class */ (function () {
885
- function TuiGetColorPipe() {
886
- }
887
- TuiGetColorPipe.prototype.transform = function (color) {
888
- if (color.length === 4) {
889
- return color
890
- .split("")
891
- .reduce(function (result, current) { return __spreadArray(__spreadArray([], __read(result)), [current, current]); }, [])
892
- .join("")
893
- .replace("#", "");
894
- }
895
- if (color.startsWith("#")) {
896
- return color;
897
- }
898
- if (color === "transparent") {
899
- return "#000000";
900
- }
901
- var parsed = color
902
- .replace("rgb(", "")
903
- .replace("rgba(", "")
904
- .replace(")", "")
905
- .replace(" ", "")
906
- .split(",")
907
- .map(function (v) { return Number.parseInt(v, 10); });
908
- return i6.tuiRgbToHex.apply(void 0, __spreadArray([], __read(parsed)));
909
- };
910
- return TuiGetColorPipe;
911
- }());
912
- TuiGetColorPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiGetColorPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
913
- TuiGetColorPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiGetColorPipe, name: "tuiGetColorPipe" });
914
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiGetColorPipe, decorators: [{
915
- type: i0.Pipe,
916
- args: [{ name: "tuiGetColorPipe" }]
917
- }] });
918
-
919
- var TuiGetOpacityPipe = /** @class */ (function () {
920
- function TuiGetOpacityPipe() {
921
- }
922
- TuiGetOpacityPipe.prototype.transform = function (color) {
923
- if (color.startsWith("#") || color.startsWith("rgb(")) {
924
- return 100;
925
- }
926
- if (color === "transparent") {
927
- return 0;
928
- }
929
- var lastComma = color.lastIndexOf(",");
930
- var parsed = color
931
- .slice(lastComma)
932
- .replace(")", "")
933
- .replace(" ", "")
934
- .replace(",", "");
935
- return Math.round(Number.parseFloat(parsed) * 100);
936
- };
937
- return TuiGetOpacityPipe;
938
- }());
939
- TuiGetOpacityPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiGetOpacityPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
940
- TuiGetOpacityPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiGetOpacityPipe, name: "tuiGetOpacity" });
941
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiGetOpacityPipe, decorators: [{
942
- type: i0.Pipe,
943
- args: [{ name: "tuiGetOpacity" }]
944
- }] });
945
-
946
- var TuiInputOpacityDirective = /** @class */ (function () {
947
- function TuiInputOpacityDirective(renderer, focusable) {
948
- this.renderer = renderer;
949
- this.focusable = focusable;
950
- }
951
- Object.defineProperty(TuiInputOpacityDirective.prototype, "tuiInputOpacity", {
952
- set: function (opacity) {
953
- var nativeFocusableElement = this.focusable.nativeFocusableElement;
954
- if (nativeFocusableElement) {
955
- this.renderer.setStyle(nativeFocusableElement, 'opacity', opacity / 100);
956
- }
957
- },
958
- enumerable: false,
959
- configurable: true
960
- });
961
- return TuiInputOpacityDirective;
962
- }());
963
- TuiInputOpacityDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputOpacityDirective, deps: [{ token: i0.Renderer2 }, { token: i6.TUI_FOCUSABLE_ITEM_ACCESSOR }], target: i0__namespace.ɵɵFactoryTarget.Directive });
964
- TuiInputOpacityDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputOpacityDirective, selector: "[tuiInputOpacity]", inputs: { tuiInputOpacity: "tuiInputOpacity" }, ngImport: i0__namespace });
965
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputOpacityDirective, decorators: [{
966
- type: i0.Directive,
967
- args: [{
968
- selector: '[tuiInputOpacity]',
969
- }]
970
- }], ctorParameters: function () {
971
- return [{ type: i0__namespace.Renderer2, decorators: [{
972
- type: i0.Inject,
973
- args: [i0.Renderer2]
974
- }] }, { type: undefined, decorators: [{
975
- type: i0.Inject,
976
- args: [i6.TUI_FOCUSABLE_ITEM_ACCESSOR]
977
- }] }];
978
- }, propDecorators: { tuiInputOpacity: [{
979
- type: i0.Input
980
- }] } });
981
-
982
- var TuiStripOptionalPipe = /** @class */ (function () {
983
- function TuiStripOptionalPipe() {
984
- }
985
- TuiStripOptionalPipe.prototype.transform = function (name) {
986
- return name.replace("?", "");
987
- };
988
- return TuiStripOptionalPipe;
989
- }());
990
- TuiStripOptionalPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiStripOptionalPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
991
- TuiStripOptionalPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiStripOptionalPipe, name: "tuiStripOptionalPipe" });
992
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiStripOptionalPipe, decorators: [{
993
- type: i0.Pipe,
994
- args: [{ name: "tuiStripOptionalPipe" }]
995
- }] });
996
-
997
- var TuiIsOptionalPipe = /** @class */ (function () {
998
- function TuiIsOptionalPipe() {
999
- }
1000
- TuiIsOptionalPipe.prototype.transform = function (name) {
1001
- return name.includes("?");
1002
- };
1003
- return TuiIsOptionalPipe;
1004
- }());
1005
- TuiIsOptionalPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIsOptionalPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1006
- TuiIsOptionalPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIsOptionalPipe, name: "tuiIsOptionalPipe" });
1007
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIsOptionalPipe, decorators: [{
1008
- type: i0.Pipe,
1009
- args: [{ name: "tuiIsOptionalPipe" }]
1010
- }] });
1011
-
1012
- var TuiDocTypeReferencePipe = /** @class */ (function () {
1013
- function TuiDocTypeReferencePipe(parser, linkHandler) {
1014
- this.parser = parser;
1015
- this.linkHandler = linkHandler;
1016
- }
1017
- TuiDocTypeReferencePipe.prototype.transform = function (original) {
1018
- var _this = this;
1019
- return this.parser(original)
1020
- .map(function (_d) {
1021
- var type = _d.type, extracted = _d.extracted;
1022
- var _a, _b;
1023
- return ({
1024
- type: type,
1025
- extracted: extracted,
1026
- reference: (_b = (_a = _this.linkHandler) === null || _a === void 0 ? void 0 : _a.call(_this, extracted)) !== null && _b !== void 0 ? _b : null,
1027
- });
1028
- })
1029
- .sort(function (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; });
1030
- };
1031
- return TuiDocTypeReferencePipe;
1032
- }());
1033
- TuiDocTypeReferencePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocTypeReferencePipe, deps: [{ token: tokens.TUI_DOC_TYPE_REFERENCE_PARSER }, { token: tokens.TUI_DOC_TYPE_REFERENCE_HANDLER }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1034
- TuiDocTypeReferencePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocTypeReferencePipe, name: "tuiDocTypeReference" });
1035
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocTypeReferencePipe, decorators: [{
1036
- type: i0.Pipe,
1037
- args: [{ name: "tuiDocTypeReference" }]
1038
- }], ctorParameters: function () {
1039
- return [{ type: undefined, decorators: [{
1040
- type: i0.Inject,
1041
- args: [tokens.TUI_DOC_TYPE_REFERENCE_PARSER]
1042
- }] }, { type: undefined, decorators: [{
1043
- type: i0.Inject,
1044
- args: [tokens.TUI_DOC_TYPE_REFERENCE_HANDLER]
1045
- }] }];
1046
- } });
1047
-
1048
- var TuiShowCleanerPipe = /** @class */ (function () {
1049
- function TuiShowCleanerPipe() {
1050
- }
1051
- TuiShowCleanerPipe.prototype.transform = function (type) {
1052
- return type.includes("null");
1053
- };
1054
- return TuiShowCleanerPipe;
1055
- }());
1056
- TuiShowCleanerPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiShowCleanerPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1057
- TuiShowCleanerPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiShowCleanerPipe, name: "tuiShowCleanerPipe" });
1058
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiShowCleanerPipe, decorators: [{
1059
- type: i0.Pipe,
1060
- args: [{ name: "tuiShowCleanerPipe" }]
1061
- }] });
1062
-
1063
- var TuiInspectPipe = /** @class */ (function () {
1064
- function TuiInspectPipe(isE2E) {
1065
- this.isE2E = isE2E;
1066
- }
1067
- TuiInspectPipe.prototype.transform = function (value, depth) {
1068
- if (depth === void 0) { depth = 2; }
1069
- if (this.isE2E && typeof value === "function") {
1070
- /**
1071
- * @description:
1072
- * When developing in production mode the webpack bundler minify
1073
- * functions in different ways, then due to which the string content
1074
- * of the function may differ from build to build, which can be to
1075
- * various problems when screenshot testing on e2e.
1076
- */
1077
- return "\u03BB(x) => y";
1078
- }
1079
- return utils.tuiInspectAny(value, depth);
1080
- };
1081
- return TuiInspectPipe;
1082
- }());
1083
- TuiInspectPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInspectPipe, deps: [{ token: i6.TUI_IS_E2E }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1084
- TuiInspectPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInspectPipe, name: "tuiInspectAny" });
1085
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInspectPipe, decorators: [{
1086
- type: i0.Pipe,
1087
- args: [{ name: "tuiInspectAny" }]
1088
- }], ctorParameters: function () {
1089
- return [{ type: undefined, decorators: [{
1090
- type: i0.Inject,
1091
- args: [i6.TUI_IS_E2E]
1092
- }] }];
1093
- } });
1094
-
1095
- var TuiIsPrimitivePolymorpheusContentPipe = /** @class */ (function () {
1096
- function TuiIsPrimitivePolymorpheusContentPipe() {
1097
- }
1098
- TuiIsPrimitivePolymorpheusContentPipe.prototype.transform = function (value) {
1099
- return i6.tuiIsString(value) || i6.tuiIsNumber(value);
1100
- };
1101
- return TuiIsPrimitivePolymorpheusContentPipe;
1102
- }());
1103
- TuiIsPrimitivePolymorpheusContentPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIsPrimitivePolymorpheusContentPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1104
- TuiIsPrimitivePolymorpheusContentPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIsPrimitivePolymorpheusContentPipe, name: "tuiIsPrimitivePolymorpheusContentPipe" });
1105
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiIsPrimitivePolymorpheusContentPipe, decorators: [{
1106
- type: i0.Pipe,
1107
- args: [{ name: "tuiIsPrimitivePolymorpheusContentPipe" }]
1108
- }] });
1109
-
1110
- // @bad TODO subscribe propertiesConnectors changes
1111
- // @bad TODO refactor to make more flexible
1112
- var TuiDocDocumentationComponent = /** @class */ (function () {
1113
- function TuiDocDocumentationComponent(cdr, texts, excludedProperties, destroy$, getColor, getOpacity) {
1114
- this.cdr = cdr;
1115
- this.texts = texts;
1116
- this.excludedProperties = excludedProperties;
1117
- this.destroy$ = destroy$;
1118
- this.getColor = getColor;
1119
- this.getOpacity = getOpacity;
1120
- this.heading = '';
1121
- this.showValues = true;
1122
- this.isAPI = false;
1123
- this.propertiesConnectors = i6.EMPTY_QUERY;
1124
- this.activeItemIndex = 0;
1125
- this.matcher = function (item, exclusions) { return !exclusions.has(item.documentationPropertyName); };
1126
- }
1127
- TuiDocDocumentationComponent.prototype.ngAfterContentInit = function () {
1128
- i6.tuiQueryListChanges(this.propertiesConnectors)
1129
- .pipe(operators.switchMap(function (items) { return i10.merge.apply(void 0, __spreadArray([], __read(items.map(function (_a) {
1130
- var changed$ = _a.changed$;
1131
- return changed$;
1132
- })))); }), i6.tuiWatch(this.cdr), operators.takeUntil(this.destroy$))
1133
- .subscribe();
1134
- };
1135
- Object.defineProperty(TuiDocDocumentationComponent.prototype, "type", {
1136
- get: function () {
1137
- return this.isAPI ? this.texts[0] : this.texts[1];
1138
- },
1139
- enumerable: false,
1140
- configurable: true
1141
- });
1142
- TuiDocDocumentationComponent.prototype.onColorChange = function (connector, color) {
1143
- var opacity = this.getOpacity.transform(connector.documentationPropertyValue || '');
1144
- if (opacity === 100) {
1145
- connector.onValueChange(color);
1146
- return;
1147
- }
1148
- var rgb = i6.tuiHexToRgb(color).join(', ');
1149
- var result = "rgba(" + rgb + ", " + opacity / 100 + ")";
1150
- connector.onValueChange(result);
1151
- };
1152
- TuiDocDocumentationComponent.prototype.onOpacityChange = function (connector, opacity) {
1153
- var hex = this.getColor.transform(connector.documentationPropertyValue || '');
1154
- var rgb = i6.tuiHexToRgb(hex);
1155
- var result = "rgba(" + rgb + ", " + (opacity || 0) / 100 + ")";
1156
- connector.onValueChange(result);
1157
- };
1158
- return TuiDocDocumentationComponent;
1159
- }());
1160
- TuiDocDocumentationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: tokens.TUI_DOC_DOCUMENTATION_TEXTS }, { token: tokens.TUI_DOC_EXCLUDED_PROPERTIES }, { token: i6.TuiDestroyService, self: true }, { token: TuiGetColorPipe }, { token: TuiGetOpacityPipe }], target: i0__namespace.ɵɵFactoryTarget.Component });
1161
- TuiDocDocumentationComponent.ɵcmp = i0__namespace.ɵɵ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, i6.TuiDestroyService], queries: [{ propertyName: "propertiesConnectors", predicate: TuiDocDocumentationPropertyConnectorDirective }], ngImport: i0__namespace, 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__namespace.TuiBadgeComponent, selector: "tui-badge", inputs: ["value", "size", "status", "hoverable"] }, { type: i1__namespace.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { type: i1__namespace.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items"] }, { type: i1__namespace.TuiToggleComponent, selector: "tui-toggle", inputs: ["singleColor", "showIcons", "showLoader", "size"] }, { type: i2__namespace.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i2__namespace.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { type: i1__namespace.TuiInputNumberComponent, selector: "tui-input-number", inputs: ["min", "max", "decimal", "precision", "step", "prefix", "postfix"] }, { type: i2__namespace.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "icon", "status", "size", "hideClose"], outputs: ["close"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1__namespace.TuiSelectDirective, selector: "tui-select" }, { type: i2__namespace.TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownAppearance], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: ["tuiDropdownAlign", "tuiDropdownAppearance", "tuiDropdownDirection", "tuiDropdownLimitWidth", "tuiDropdownMinHeight", "tuiDropdownMaxHeight", "tuiDropdownOffset"] }, { type: i2__namespace.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { type: i5__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { type: i2__namespace.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { type: i2__namespace.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i4__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i2__namespace.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: TuiInputOpacityDirective, selector: "[tuiInputOpacity]", inputs: ["tuiInputOpacity"] }, { type: i1__namespace.TuiInputNumberDirective, selector: "tui-input-number" }], pipes: { "tuiFilter": i6__namespace$1.TuiFilterPipe, "tuiStripOptionalPipe": TuiStripOptionalPipe, "tuiIsOptionalPipe": TuiIsOptionalPipe, "tuiDocTypeReference": TuiDocTypeReferencePipe, "tuiShowCleanerPipe": TuiShowCleanerPipe, "tuiInspectAny": TuiInspectPipe, "tuiGetOpacity": TuiGetOpacityPipe, "tuiGetColorPipe": TuiGetColorPipe, "tuiIsPrimitivePolymorpheusContentPipe": TuiIsPrimitivePolymorpheusContentPipe, "async": i4__namespace.AsyncPipe }, animations: [
1162
- animations.trigger('emitEvent', [
1163
- animations.transition(':increment', [animations.style({ opacity: 1 }), animations.animate('500ms ease-in')]),
1164
- ]),
1165
- ], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1166
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationComponent, decorators: [{
1167
- type: i0.Component,
1168
- args: [{
1169
- selector: 'tui-doc-documentation',
1170
- templateUrl: './documentation.template.html',
1171
- styleUrls: ['./documentation.style.less'],
1172
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1173
- providers: [TuiGetColorPipe, TuiGetOpacityPipe, i6.TuiDestroyService],
1174
- animations: [
1175
- animations.trigger('emitEvent', [
1176
- animations.transition(':increment', [animations.style({ opacity: 1 }), animations.animate('500ms ease-in')]),
1177
- ]),
1178
- ],
1179
- }]
1180
- }], ctorParameters: function () {
1181
- return [{ type: i0__namespace.ChangeDetectorRef, decorators: [{
1182
- type: i0.Inject,
1183
- args: [i0.ChangeDetectorRef]
1184
- }] }, { type: undefined, decorators: [{
1185
- type: i0.Inject,
1186
- args: [tokens.TUI_DOC_DOCUMENTATION_TEXTS]
1187
- }] }, { type: Set, decorators: [{
1188
- type: i0.Inject,
1189
- args: [tokens.TUI_DOC_EXCLUDED_PROPERTIES]
1190
- }] }, { type: i6__namespace$1.TuiDestroyService, decorators: [{
1191
- type: i0.Self
1192
- }, {
1193
- type: i0.Inject,
1194
- args: [i6.TuiDestroyService]
1195
- }] }, { type: TuiGetColorPipe, decorators: [{
1196
- type: i0.Inject,
1197
- args: [TuiGetColorPipe]
1198
- }] }, { type: TuiGetOpacityPipe, decorators: [{
1199
- type: i0.Inject,
1200
- args: [TuiGetOpacityPipe]
1201
- }] }];
1202
- }, propDecorators: { heading: [{
1203
- type: i0.Input
1204
- }], showValues: [{
1205
- type: i0.Input
1206
- }], isAPI: [{
1207
- type: i0.Input
1208
- }], propertiesConnectors: [{
1209
- type: i0.ContentChildren,
1210
- args: [TuiDocDocumentationPropertyConnectorDirective]
1211
- }] } });
1212
-
1213
- var TuiInputOpacityModule = /** @class */ (function () {
1214
- function TuiInputOpacityModule() {
1215
- }
1216
- return TuiInputOpacityModule;
1217
- }());
1218
- TuiInputOpacityModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputOpacityModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1219
- TuiInputOpacityModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputOpacityModule, declarations: [TuiInputOpacityDirective], exports: [TuiInputOpacityDirective] });
1220
- TuiInputOpacityModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputOpacityModule });
1221
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputOpacityModule, decorators: [{
1222
- type: i0.NgModule,
1223
- args: [{
1224
- declarations: [TuiInputOpacityDirective],
1225
- exports: [TuiInputOpacityDirective],
1226
- }]
1227
- }] });
1228
-
1229
- var TuiDocDocumentationModule = /** @class */ (function () {
1230
- function TuiDocDocumentationModule() {
1231
- }
1232
- return TuiDocDocumentationModule;
1233
- }());
1234
- TuiDocDocumentationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1235
- TuiDocDocumentationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationModule, declarations: [TuiInspectPipe,
1236
- TuiGetColorPipe,
1237
- TuiGetOpacityPipe,
1238
- TuiIsOptionalPipe,
1239
- TuiShowCleanerPipe,
1240
- TuiStripOptionalPipe,
1241
- TuiDocTypeReferencePipe,
1242
- TuiDocDocumentationComponent,
1243
- TuiIsPrimitivePolymorpheusContentPipe,
1244
- TuiDocDocumentationPropertyConnectorDirective], imports: [i4.CommonModule,
1245
- i5.FormsModule,
1246
- i6$1.RouterModule,
1247
- i1.TuiBadgeModule,
1248
- i1.TuiSelectModule,
1249
- i1.TuiToggleModule,
1250
- i2.TuiLinkModule,
1251
- i1.TuiInputNumberModule,
1252
- i2.TuiModeModule,
1253
- i2.TuiGroupModule,
1254
- TuiInputOpacityModule,
1255
- i2.TuiPrimitiveTextfieldModule,
1256
- i2.TuiTextfieldControllerModule,
1257
- i2.TuiDropdownModule,
1258
- i2.TuiDataListModule,
1259
- i1.TuiDataListWrapperModule,
1260
- i2.TuiNotificationModule,
1261
- i6.TuiFilterPipeModule], exports: [TuiDocDocumentationComponent,
1262
- TuiDocDocumentationPropertyConnectorDirective] });
1263
- TuiDocDocumentationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationModule, imports: [[
1264
- i4.CommonModule,
1265
- i5.FormsModule,
1266
- i6$1.RouterModule,
1267
- i1.TuiBadgeModule,
1268
- i1.TuiSelectModule,
1269
- i1.TuiToggleModule,
1270
- i2.TuiLinkModule,
1271
- i1.TuiInputNumberModule,
1272
- i2.TuiModeModule,
1273
- i2.TuiGroupModule,
1274
- TuiInputOpacityModule,
1275
- i2.TuiPrimitiveTextfieldModule,
1276
- i2.TuiTextfieldControllerModule,
1277
- i2.TuiDropdownModule,
1278
- i2.TuiDataListModule,
1279
- i1.TuiDataListWrapperModule,
1280
- i2.TuiNotificationModule,
1281
- i6.TuiFilterPipeModule,
1282
- ]] });
1283
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocDocumentationModule, decorators: [{
1284
- type: i0.NgModule,
1285
- args: [{
1286
- imports: [
1287
- i4.CommonModule,
1288
- i5.FormsModule,
1289
- i6$1.RouterModule,
1290
- i1.TuiBadgeModule,
1291
- i1.TuiSelectModule,
1292
- i1.TuiToggleModule,
1293
- i2.TuiLinkModule,
1294
- i1.TuiInputNumberModule,
1295
- i2.TuiModeModule,
1296
- i2.TuiGroupModule,
1297
- TuiInputOpacityModule,
1298
- i2.TuiPrimitiveTextfieldModule,
1299
- i2.TuiTextfieldControllerModule,
1300
- i2.TuiDropdownModule,
1301
- i2.TuiDataListModule,
1302
- i1.TuiDataListWrapperModule,
1303
- i2.TuiNotificationModule,
1304
- i6.TuiFilterPipeModule,
1305
- ],
1306
- declarations: [
1307
- TuiInspectPipe,
1308
- TuiGetColorPipe,
1309
- TuiGetOpacityPipe,
1310
- TuiIsOptionalPipe,
1311
- TuiShowCleanerPipe,
1312
- TuiStripOptionalPipe,
1313
- TuiDocTypeReferencePipe,
1314
- TuiDocDocumentationComponent,
1315
- TuiIsPrimitivePolymorpheusContentPipe,
1316
- TuiDocDocumentationPropertyConnectorDirective,
1317
- ],
1318
- exports: [
1319
- TuiDocDocumentationComponent,
1320
- TuiDocDocumentationPropertyConnectorDirective,
1321
- ],
1322
- }]
1323
- }] });
1324
-
1325
- var TUI_DOC_EXAMPLE_DEFAULT_OPTIONS = {
1326
- codeEditorVisibilityHandler: function (files) { return Boolean(files[interfaces.TUI_EXAMPLE_PRIMARY_FILE_NAME.TS] &&
1327
- files[interfaces.TUI_EXAMPLE_PRIMARY_FILE_NAME.HTML]); },
1328
- tabTitles: new Map(),
1329
- fullsize: true,
1330
- linkIcon: "tuiIconLink",
1331
- };
1332
- /**
1333
- * Default parameters for DocExample component
1334
- */
1335
- var TUI_DOC_EXAMPLE_OPTIONS = i6.tuiCreateToken(TUI_DOC_EXAMPLE_DEFAULT_OPTIONS);
1336
- function tuiDocExampleOptionsProvider(options) {
1337
- return i6.tuiProvideOptions(TUI_DOC_EXAMPLE_OPTIONS, options, TUI_DOC_EXAMPLE_DEFAULT_OPTIONS);
1338
- }
1339
-
1340
- var TuiDocExampleGetTabsPipe = /** @class */ (function () {
1341
- function TuiDocExampleGetTabsPipe() {
1342
- }
1343
- TuiDocExampleGetTabsPipe.prototype.transform = function (content, defaultTab) {
1344
- return __spreadArray([defaultTab], __read(Object.keys(content)));
1345
- };
1346
- return TuiDocExampleGetTabsPipe;
1347
- }());
1348
- TuiDocExampleGetTabsPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleGetTabsPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1349
- TuiDocExampleGetTabsPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleGetTabsPipe, name: "tuiDocExampleGetTabs" });
1350
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleGetTabsPipe, decorators: [{
1351
- type: i0.Pipe,
1352
- args: [{ name: "tuiDocExampleGetTabs" }]
1353
- }] });
1354
-
1355
- var TuiDocExampleComponent = /** @class */ (function () {
1356
- function TuiDocExampleComponent(clipboard, alerts, location, copyTexts$, texts, codeEditor, processContent, isE2E, codeActions, router, route, ngLocation, options) {
1357
- var _this = this;
1358
- this.clipboard = clipboard;
1359
- this.alerts = alerts;
1360
- this.location = location;
1361
- this.copyTexts$ = copyTexts$;
1362
- this.texts = texts;
1363
- this.codeEditor = codeEditor;
1364
- this.processContent = processContent;
1365
- this.isE2E = isE2E;
1366
- this.codeActions = codeActions;
1367
- this.router = router;
1368
- this.route = route;
1369
- this.ngLocation = ngLocation;
1370
- this.options = options;
1371
- this.rawLoader$$ = new i10.BehaviorSubject({});
1372
- this.id = null;
1373
- this.fullsize = this.options.fullsize;
1374
- this.componentName = this.location.pathname.slice(1);
1375
- this.defaultTabIndex = 0;
1376
- this.defaultTab = this.texts[this.defaultTabIndex];
1377
- this.activeItemIndex = this.defaultTabIndex;
1378
- this.copy$ = this.copyTexts$.pipe(operators.map(function (_b) {
1379
- var _c = __read(_b, 1), copy = _c[0];
1380
- return copy;
1381
- }));
1382
- this.processor$ = this.rawLoader$$.pipe(operators.switchMap(utils.tuiRawLoadRecord), operators.map(function (value) { return _this.processContent(value); }));
1383
- this.loading$ = new i10.Subject();
1384
- this.visible = function (files) { return Boolean(_this.codeEditor && _this.options.codeEditorVisibilityHandler(files)); };
1385
- }
1386
- Object.defineProperty(TuiDocExampleComponent.prototype, "content", {
1387
- set: function (content) {
1388
- this.rawLoader$$.next(content);
1389
- },
1390
- enumerable: false,
1391
- configurable: true
1392
- });
1393
- TuiDocExampleComponent.prototype.getTabTitle = function (fileName) {
1394
- return this.options.tabTitles.get(fileName) || fileName;
1395
- };
1396
- TuiDocExampleComponent.prototype.copyExampleLink = function () {
1397
- var hashPosition = this.location.href.indexOf('#');
1398
- var currentUrl = hashPosition > -1
1399
- ? this.location.href.slice(0, Math.max(0, hashPosition))
1400
- : this.location.href;
1401
- var url = currentUrl + "#" + this.id;
1402
- this.setFragmentWithoutRedirect(this.id);
1403
- this.clipboard.copy(url);
1404
- this.alerts
1405
- .open(this.texts[1], {
1406
- label: this.texts[2],
1407
- status: 'success',
1408
- })
1409
- .subscribe();
1410
- };
1411
- TuiDocExampleComponent.prototype.edit = function (files) {
1412
- var _this = this;
1413
- var _a;
1414
- this.loading$.next(true);
1415
- (_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName, this.id || '', files).then(function () { return _this.loading$.next(false); }).catch(function () { return _this.loading$.next(false); });
1416
- };
1417
- TuiDocExampleComponent.prototype.setFragmentWithoutRedirect = function (id) {
1418
- var url = this.router
1419
- .createUrlTree([], { relativeTo: this.route, fragment: id || '' })
1420
- .toString();
1421
- this.ngLocation.go(url);
1422
- };
1423
- return TuiDocExampleComponent;
1424
- }());
1425
- TuiDocExampleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleComponent, deps: [{ token: i4$1.Clipboard }, { token: i2.TuiAlertService }, { token: common.LOCATION }, { token: i1.TUI_COPY_TEXTS }, { token: tokens.TUI_DOC_EXAMPLE_TEXTS }, { token: tokens.TUI_DOC_CODE_EDITOR, optional: true }, { token: tokens.TUI_DOC_EXAMPLE_CONTENT_PROCESSOR }, { token: i6.TUI_IS_E2E }, { token: tokens.TUI_DOC_CODE_ACTIONS }, { token: i6$1.Router }, { token: i6$1.ActivatedRoute }, { token: i4.Location }, { token: TUI_DOC_EXAMPLE_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Component });
1426
- TuiDocExampleComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i1__namespace.TuiTabsWithMoreComponent, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["moreContent", "dropdownContent", "underline", "activeItemIndex", "itemsLimit"], outputs: ["activeItemIndexChange"] }, { type: i1__namespace.TuiTabComponent, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { type: i2__namespace.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { type: TuiDocCodeComponent, selector: "tui-doc-code", inputs: ["filename", "code"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace$1.TuiItemDirective, selector: "[tuiItem]" }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i4__namespace.AsyncPipe, "tuiDocExampleGetTabs": TuiDocExampleGetTabsPipe, "tuiMapper": i6__namespace$1.TuiMapperPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1427
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleComponent, decorators: [{
1428
- type: i0.Component,
1429
- args: [{
1430
- selector: 'tui-doc-example',
1431
- templateUrl: './example.template.html',
1432
- styleUrls: ['./example.style.less'],
1433
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1434
- }]
1435
- }], ctorParameters: function () {
1436
- return [{ type: i4__namespace$1.Clipboard, decorators: [{
1437
- type: i0.Inject,
1438
- args: [i4$1.Clipboard]
1439
- }] }, { type: i2__namespace.TuiAlertService, decorators: [{
1440
- type: i0.Inject,
1441
- args: [i2.TuiAlertService]
1442
- }] }, { type: Location, decorators: [{
1443
- type: i0.Inject,
1444
- args: [common.LOCATION]
1445
- }] }, { type: i10__namespace.Observable, decorators: [{
1446
- type: i0.Inject,
1447
- args: [i1.TUI_COPY_TEXTS]
1448
- }] }, { type: undefined, decorators: [{
1449
- type: i0.Inject,
1450
- args: [tokens.TUI_DOC_EXAMPLE_TEXTS]
1451
- }] }, { type: undefined, decorators: [{
1452
- type: i0.Optional
1453
- }, {
1454
- type: i0.Inject,
1455
- args: [tokens.TUI_DOC_CODE_EDITOR]
1456
- }] }, { type: undefined, decorators: [{
1457
- type: i0.Inject,
1458
- args: [tokens.TUI_DOC_EXAMPLE_CONTENT_PROCESSOR]
1459
- }] }, { type: undefined, decorators: [{
1460
- type: i0.Inject,
1461
- args: [i6.TUI_IS_E2E]
1462
- }] }, { type: Array, decorators: [{
1463
- type: i0.Inject,
1464
- args: [tokens.TUI_DOC_CODE_ACTIONS]
1465
- }] }, { type: i6__namespace.Router, decorators: [{
1466
- type: i0.Inject,
1467
- args: [i6$1.Router]
1468
- }] }, { type: i6__namespace.ActivatedRoute, decorators: [{
1469
- type: i0.Inject,
1470
- args: [i6$1.ActivatedRoute]
1471
- }] }, { type: i4__namespace.Location, decorators: [{
1472
- type: i0.Inject,
1473
- args: [i4.Location]
1474
- }] }, { type: undefined, decorators: [{
1475
- type: i0.Inject,
1476
- args: [TUI_DOC_EXAMPLE_OPTIONS]
1477
- }] }];
1478
- }, propDecorators: { id: [{
1479
- type: i0.Input
1480
- }], heading: [{
1481
- type: i0.Input
1482
- }], description: [{
1483
- type: i0.Input
1484
- }], content: [{
1485
- type: i0.Input
1486
- }], fullsize: [{
1487
- type: i0.Input
1488
- }, {
1489
- type: i0.HostBinding,
1490
- args: ['class._fullsize']
1491
- }], componentName: [{
1492
- type: i0.Input
1493
- }] } });
1494
-
1495
- var TuiDocExampleModule = /** @class */ (function () {
1496
- function TuiDocExampleModule() {
1497
- }
1498
- return TuiDocExampleModule;
1499
- }());
1500
- TuiDocExampleModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1501
- TuiDocExampleModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleModule, declarations: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe], imports: [i4.CommonModule,
1502
- i4$1.ClipboardModule,
1503
- i1.TuiTabsModule,
1504
- i2.TuiButtonModule,
1505
- TuiDocCopyModule,
1506
- TuiDocCodeModule,
1507
- i5$1.PolymorpheusModule,
1508
- i6.TuiMapperPipeModule,
1509
- i2.TuiLoaderModule], exports: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe] });
1510
- TuiDocExampleModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleModule, imports: [[
1511
- i4.CommonModule,
1512
- i4$1.ClipboardModule,
1513
- i1.TuiTabsModule,
1514
- i2.TuiButtonModule,
1515
- TuiDocCopyModule,
1516
- TuiDocCodeModule,
1517
- i5$1.PolymorpheusModule,
1518
- i6.TuiMapperPipeModule,
1519
- i2.TuiLoaderModule,
1520
- ]] });
1521
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleModule, decorators: [{
1522
- type: i0.NgModule,
1523
- args: [{
1524
- imports: [
1525
- i4.CommonModule,
1526
- i4$1.ClipboardModule,
1527
- i1.TuiTabsModule,
1528
- i2.TuiButtonModule,
1529
- TuiDocCopyModule,
1530
- TuiDocCodeModule,
1531
- i5$1.PolymorpheusModule,
1532
- i6.TuiMapperPipeModule,
1533
- i2.TuiLoaderModule,
1534
- ],
1535
- declarations: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe],
1536
- exports: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe],
1537
- }]
1538
- }] });
1539
-
1540
- function labelsProviderFactory(pages) {
1541
- return pages
1542
- .map(function (_a) {
1543
- var section = _a.section;
1544
- return section;
1545
- })
1546
- .filter(i6.tuiIsPresent)
1547
- .filter(function (item, index, array) { return array.indexOf(item) === index; });
1548
- }
1549
- /**
1550
- * Page title
1551
- */
1552
- var NAVIGATION_TITLE = new i0.InjectionToken("[NAVIGATION_TITLE]");
1553
- /**
1554
- * Navigation sections labels for search
1555
- */
1556
- var NAVIGATION_LABELS = new i0.InjectionToken("[NAVIGATION_LABELS]");
1557
- /**
1558
- * Navigation pages
1559
- */
1560
- var NAVIGATION_ITEMS = new i0.InjectionToken("[NAVIGATION_ITEMS]");
1561
- var NAVIGATION_PROVIDERS = [
1562
- i6.TuiDestroyService,
1563
- {
1564
- provide: NAVIGATION_TITLE,
1565
- deps: [i6$1.Router, i6$1.ActivatedRoute, tokens.TUI_DOC_TITLE, i6.TuiDestroyService],
1566
- useFactory: function (router, activatedRoute, titlePrefix, destroy$) { return router.events.pipe(operators.filter(function (event) { return event instanceof i6$1.NavigationEnd; }), operators.map(function () { return activatedRoute.firstChild; }), operators.filter(i6.tuiIsPresent), operators.mergeMap(function (_a) {
1567
- var data = _a.data;
1568
- return data;
1569
- }), operators.map(function (_a) {
1570
- var title = _a.title;
1571
- return "" + titlePrefix + title;
1572
- }), operators.takeUntil(destroy$)); },
1573
- },
1574
- {
1575
- provide: NAVIGATION_LABELS,
1576
- deps: [tokens.TUI_DOC_PAGES],
1577
- useFactory: labelsProviderFactory,
1578
- },
1579
- {
1580
- provide: NAVIGATION_ITEMS,
1581
- deps: [tokens.TUI_DOC_PAGES],
1582
- useFactory: function (pages) {
1583
- var labels = labelsProviderFactory(pages);
1584
- return __spreadArray(__spreadArray([], __read(labels.map(function (label) { return pages.filter(function (_a) {
1585
- var section = _a.section;
1586
- return section === label;
1587
- }); }))), [
1588
- pages.filter(function (page) { return !page.section; }),
1589
- ]);
1590
- },
1591
- },
1592
- ];
1593
-
1594
- var TuiDocNavigationComponent = /** @class */ (function () {
1595
- function TuiDocNavigationComponent(cdr, titleService, title$, doc, mode, sidebar, labels, items, searchText, router, activatedRoute, destroy$, readyToScroll$, scrollBehavior, docIcons, icons) {
1596
- var _this = this;
1597
- this.doc = doc;
1598
- this.mode = mode;
1599
- this.sidebar = sidebar;
1600
- this.labels = labels;
1601
- this.items = items;
1602
- this.searchText = searchText;
1603
- this.router = router;
1604
- this.activatedRoute = activatedRoute;
1605
- this.destroy$ = destroy$;
1606
- this.readyToScroll$ = readyToScroll$;
1607
- this.scrollBehavior = scrollBehavior;
1608
- this.docIcons = docIcons;
1609
- this.icons = icons;
1610
- this.menuOpen = false;
1611
- this.openPagesArr = [];
1612
- this.openPagesGroupsArr = [];
1613
- this.active = '';
1614
- this.search = new i5.FormControl('');
1615
- this.filtered$ = i6.tuiControlValue(this.search).pipe(operators.filter(function (search) { return search.trim().length > 2; }), operators.map(function (search) { return _this.filterItems(_this.flattenSubPages(_this.items), search); }));
1616
- this.mode$ = this.mode.change$.pipe(operators.startWith(null), operators.map(function () { return _this.mode.mode || 'onLight'; }));
1617
- // Angular can't navigate no anchor links
1618
- // https://stackoverflow.com/questions/36101756/angular2-routing-with-hashtag-to-page-anchor
1619
- title$.subscribe(function (title) {
1620
- cdr.markForCheck();
1621
- titleService.setTitle(title);
1622
- _this.openActivePageGroup();
1623
- _this.handleAnchorLink(_this.activatedRoute.snapshot.fragment || '');
1624
- });
1625
- }
1626
- Object.defineProperty(TuiDocNavigationComponent.prototype, "canOpen", {
1627
- get: function () {
1628
- var _a, _b;
1629
- return ((_b = (_a = this.search.value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 2;
1630
- },
1631
- enumerable: false,
1632
- configurable: true
1633
- });
1634
- Object.defineProperty(TuiDocNavigationComponent.prototype, "itemsWithoutSections", {
1635
- get: function () {
1636
- return this.items[this.items.length - 1];
1637
- },
1638
- enumerable: false,
1639
- configurable: true
1640
- });
1641
- TuiDocNavigationComponent.prototype.$pages = function (pages) {
1642
- return pages;
1643
- };
1644
- TuiDocNavigationComponent.prototype.isActive = function (route) {
1645
- return route === this.active;
1646
- };
1647
- TuiDocNavigationComponent.prototype.onGroupClick = function (index) {
1648
- this.openPagesGroupsArr[index] = !this.openPagesGroupsArr[index];
1649
- };
1650
- TuiDocNavigationComponent.prototype.closeMenu = function () {
1651
- this.menuOpen = false;
1652
- };
1653
- TuiDocNavigationComponent.prototype.onClick = function (input) {
1654
- input.open = false;
1655
- this.menuOpen = false;
1656
- this.search.setValue('');
1657
- this.openActivePageGroup();
1658
- };
1659
- TuiDocNavigationComponent.prototype.filterItems = function (items, search) {
1660
- return items.map(function (section) { return i6.tuiUniqBy(section.filter(function (_c) {
1661
- var title = _c.title, _d = _c.keywords, keywords = _d === void 0 ? '' : _d;
1662
- search = search.toLowerCase().trim();
1663
- keywords = keywords.toLowerCase();
1664
- title = title.toLowerCase();
1665
- return (title.includes(search) ||
1666
- keywords.includes(search) ||
1667
- title.includes(utils.tuiTransliterateKeyboardLayout(search)) ||
1668
- keywords.includes(utils.tuiTransliterateKeyboardLayout(search)) ||
1669
- search.replace(/-/gi, '').includes(title) ||
1670
- title.includes(search.replace(/\s|tui/g, '')) ||
1671
- keywords.includes(search.replace(/\s|tui/g, '')) ||
1672
- search.split(/\s/).find(function (word) { return title.includes(word); }));
1673
- }), 'title'); });
1674
- };
1675
- TuiDocNavigationComponent.prototype.flattenSubPages = function (items) {
1676
- return items.reduce(function (array, item) { return __spreadArray(__spreadArray([], __read(array)), [
1677
- item.reduce(function (pages, page) { return 'subPages' in page
1678
- ? __spreadArray(__spreadArray([], __read(pages)), __read(page.subPages)) : __spreadArray(__spreadArray([], __read(pages)), [page]); }, []),
1679
- ]); }, []);
1680
- };
1681
- TuiDocNavigationComponent.prototype.isActiveRoute = function (route) {
1682
- return this.router.isActive(route, {
1683
- paths: 'subset',
1684
- queryParams: 'subset',
1685
- fragment: 'ignored',
1686
- matrixParams: 'ignored',
1687
- });
1688
- };
1689
- TuiDocNavigationComponent.prototype.handleAnchorLink = function (hash) {
1690
- var _this = this;
1691
- this.readyToScroll$
1692
- .pipe(operators.filter(Boolean), operators.take(1), operators.takeUntil(this.destroy$))
1693
- .subscribe(function () { return _this.navigateToAnchorLink(hash); });
1694
- };
1695
- TuiDocNavigationComponent.prototype.openActivePageGroup = function () {
1696
- var _this = this;
1697
- this.items.forEach(function (pages, pagesIndex) {
1698
- pages.forEach(function (page, pageIndex) {
1699
- if ('route' in page && _this.isActiveRoute(page.route)) {
1700
- _this.openPagesArr[pagesIndex] = true;
1701
- _this.active = page.route;
1702
- }
1703
- if ('subPages' in page) {
1704
- page.subPages.forEach(function (subPage) {
1705
- if (_this.isActiveRoute(subPage.route)) {
1706
- _this.openPagesArr[pagesIndex] = true;
1707
- _this.openPagesGroupsArr[pagesIndex * 100 + pageIndex] = true;
1708
- _this.active = subPage.route;
1709
- }
1710
- });
1711
- }
1712
- });
1713
- });
1714
- };
1715
- TuiDocNavigationComponent.prototype.navigateToAnchorLink = function (fragment) {
1716
- var nodes = fragment ? this.doc.querySelectorAll("#" + fragment) : [];
1717
- var element = nodes.length && nodes[nodes.length - 1];
1718
- if (!element) {
1719
- return;
1720
- }
1721
- element.classList.add('tui-doc-animated-example');
1722
- element.scrollIntoView({
1723
- block: 'start',
1724
- inline: 'nearest',
1725
- behavior: this.scrollBehavior,
1726
- });
1727
- };
1728
- return TuiDocNavigationComponent;
1729
- }());
1730
- TuiDocNavigationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocNavigationComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i9.Title }, { token: NAVIGATION_TITLE }, { token: i4.DOCUMENT }, { token: i2.TuiModeDirective }, { token: i4$2.TuiSidebarDirective, optional: true }, { token: NAVIGATION_LABELS }, { token: NAVIGATION_ITEMS }, { token: tokens.TUI_DOC_SEARCH_TEXT }, { token: i6$1.Router }, { token: i6$1.ActivatedRoute }, { token: i6.TuiDestroyService, self: true }, { token: tokens.TUI_DOC_PAGE_LOADED }, { token: tokens.TUI_DOC_SCROLL_BEHAVIOR }, { token: tokens.TUI_DOC_ICONS }, { token: i2.TUI_COMMON_ICONS }], target: i0__namespace.ɵɵFactoryTarget.Component });
1731
- TuiDocNavigationComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.TuiInputComponent, selector: "tui-input" }, { type: i2__namespace.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent", "size"] }, { type: i2__namespace.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }, { type: i2__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i2__namespace.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1__namespace.TuiAccordionComponent, selector: "tui-accordion", inputs: ["closeOthers", "rounded"] }, { type: i1__namespace.TuiAccordionItemComponent, selector: "tui-accordion-item", inputs: ["noPadding", "showArrow", "borders", "size", "disabled", "disableHover", "open", "async"], outputs: ["openChange"] }, { type: i2__namespace.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { type: i2__namespace.TuiExpandComponent, selector: "tui-expand", inputs: ["async", "expanded"] }], directives: [{ type: i1__namespace.TuiInputDirective, selector: "tui-input" }, { type: i2__namespace.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { type: i5__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i6__namespace$1.TuiAutoFocusDirective, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { type: i2__namespace.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { type: i2__namespace.TuiTextfieldIconLeftDirective, selector: "[tuiTextfieldIconLeft]", inputs: ["tuiTextfieldIconLeft"] }, { type: i2__namespace.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.TuiOptGroupDirective, selector: "tui-opt-group", inputs: ["label"] }, { type: i6__namespace.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i5__namespace$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i2__namespace.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i1__namespace.TuiAccordionItemContentDirective, selector: "ng-template[tuiAccordionItemContent]" }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6__namespace.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }, { type: i8__namespace.TuiScrollIntoViewLinkDirective, selector: "[tuiScrollIntoViewLink]", inputs: ["tuiScrollIntoViewLink"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1732
- __decorate([
1733
- i6.tuiPure
1734
- ], TuiDocNavigationComponent.prototype, "filterItems", null);
1735
- __decorate([
1736
- i6.tuiPure
1737
- ], TuiDocNavigationComponent.prototype, "flattenSubPages", null);
1738
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocNavigationComponent, decorators: [{
1739
- type: i0.Component,
1740
- args: [{
1741
- selector: 'tui-doc-navigation',
1742
- templateUrl: './navigation.template.html',
1743
- styleUrls: ['./navigation.style.less'],
1744
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1745
- providers: NAVIGATION_PROVIDERS,
1746
- }]
1747
- }], ctorParameters: function () {
1748
- return [{ type: i0__namespace.ChangeDetectorRef, decorators: [{
1749
- type: i0.Inject,
1750
- args: [i0.ChangeDetectorRef]
1751
- }] }, { type: i9__namespace.Title, decorators: [{
1752
- type: i0.Inject,
1753
- args: [i9.Title]
1754
- }] }, { type: i10__namespace.Observable, decorators: [{
1755
- type: i0.Inject,
1756
- args: [NAVIGATION_TITLE]
1757
- }] }, { type: Document, decorators: [{
1758
- type: i0.Inject,
1759
- args: [i4.DOCUMENT]
1760
- }] }, { type: i2__namespace.TuiModeDirective, decorators: [{
1761
- type: i0.Inject,
1762
- args: [i2.TuiModeDirective]
1763
- }] }, { type: undefined, decorators: [{
1764
- type: i0.Optional
1765
- }, {
1766
- type: i0.Inject,
1767
- args: [i4$2.TuiSidebarDirective]
1768
- }] }, { type: undefined, decorators: [{
1769
- type: i0.Inject,
1770
- args: [NAVIGATION_LABELS]
1771
- }] }, { type: undefined, decorators: [{
1772
- type: i0.Inject,
1773
- args: [NAVIGATION_ITEMS]
1774
- }] }, { type: undefined, decorators: [{
1775
- type: i0.Inject,
1776
- args: [tokens.TUI_DOC_SEARCH_TEXT]
1777
- }] }, { type: i6__namespace.Router, decorators: [{
1778
- type: i0.Inject,
1779
- args: [i6$1.Router]
1780
- }] }, { type: i6__namespace.ActivatedRoute, decorators: [{
1781
- type: i0.Inject,
1782
- args: [i6$1.ActivatedRoute]
1783
- }] }, { type: i10__namespace.Observable, decorators: [{
1784
- type: i0.Self
1785
- }, {
1786
- type: i0.Inject,
1787
- args: [i6.TuiDestroyService]
1788
- }] }, { type: i10__namespace.Observable, decorators: [{
1789
- type: i0.Inject,
1790
- args: [tokens.TUI_DOC_PAGE_LOADED]
1791
- }] }, { type: undefined, decorators: [{
1792
- type: i0.Inject,
1793
- args: [tokens.TUI_DOC_SCROLL_BEHAVIOR]
1794
- }] }, { type: undefined, decorators: [{
1795
- type: i0.Inject,
1796
- args: [tokens.TUI_DOC_ICONS]
1797
- }] }, { type: undefined, decorators: [{
1798
- type: i0.Inject,
1799
- args: [i2.TUI_COMMON_ICONS]
1800
- }] }];
1801
- }, propDecorators: { menuOpen: [{
1802
- type: i0.HostBinding,
1803
- args: ['class._open']
1804
- }], filterItems: [], flattenSubPages: [] } });
1805
-
1806
- var TuiDocHeaderComponent = /** @class */ (function () {
1807
- function TuiDocHeaderComponent(icons, logo, menu, router, swipes$) {
1808
- this.icons = icons;
1809
- this.logo = logo;
1810
- this.menu = menu;
1811
- this.router = router;
1812
- this.swipes$ = swipes$;
1813
- this.stream$ = new i10.Subject();
1814
- this.open$ = i10.merge(this.router.events.pipe(operators.map(i6.ALWAYS_FALSE_HANDLER)), this.stream$, this.swipes$.pipe(operators.filter(function (swipe) { return swipe.direction === 'left' || swipe.direction === 'right'; }), operators.map(function (swipe) { return swipe.direction === 'right'; }))).pipe(operators.startWith(false), operators.distinctUntilChanged());
1815
- }
1816
- TuiDocHeaderComponent.prototype.onClick = function () {
1817
- this.stream$.next(true);
1818
- };
1819
- TuiDocHeaderComponent.prototype.onActiveZone = function (active) {
1820
- if (!active) {
1821
- this.stream$.next(false);
1822
- }
1823
- };
1824
- return TuiDocHeaderComponent;
1825
- }());
1826
- TuiDocHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocHeaderComponent, deps: [{ token: tokens.TUI_DOC_ICONS }, { token: tokens.TUI_DOC_LOGO }, { token: tokens.TUI_DOC_MENU_TEXT }, { token: i6$1.Router }, { token: i6.TuiSwipeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1827
- TuiDocHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocHeaderComponent, selector: "header[tuiDocHeader]", ngImport: i0__namespace, 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__namespace.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__namespace$1.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i4__namespace$2.TuiSidebarDirective, selector: "[tuiSidebar]", inputs: ["tuiSidebarDirection", "tuiSidebarAutoWidth", "tuiSidebar"] }, { type: i5__namespace$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1828
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocHeaderComponent, decorators: [{
1829
- type: i0.Component,
1830
- args: [{
1831
- selector: 'header[tuiDocHeader]',
1832
- templateUrl: './header.template.html',
1833
- styleUrls: ['./header.style.less'],
1834
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1835
- }]
1836
- }], ctorParameters: function () {
1837
- return [{ type: undefined, decorators: [{
1838
- type: i0.Inject,
1839
- args: [tokens.TUI_DOC_ICONS]
1840
- }] }, { type: undefined, decorators: [{
1841
- type: i0.Inject,
1842
- args: [tokens.TUI_DOC_LOGO]
1843
- }] }, { type: undefined, decorators: [{
1844
- type: i0.Inject,
1845
- args: [tokens.TUI_DOC_MENU_TEXT]
1846
- }] }, { type: i6__namespace.Router, decorators: [{
1847
- type: i0.Inject,
1848
- args: [i6$1.Router]
1849
- }] }, { type: i6__namespace$1.TuiSwipeService, decorators: [{
1850
- type: i0.Inject,
1851
- args: [i6.TuiSwipeService]
1852
- }] }];
1853
- } });
1854
-
1855
- var TuiDocNavigationModule = /** @class */ (function () {
1856
- function TuiDocNavigationModule() {
1857
- }
1858
- return TuiDocNavigationModule;
1859
- }());
1860
- TuiDocNavigationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocNavigationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1861
- TuiDocNavigationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocNavigationModule, declarations: [TuiDocNavigationComponent], imports: [i4.CommonModule,
1862
- i5.ReactiveFormsModule,
1863
- i6$1.RouterModule,
1864
- i5$1.PolymorpheusModule,
1865
- i8.TuiScrollIntoViewLinkModule,
1866
- i2.TuiButtonModule,
1867
- i1.TuiInputModule,
1868
- i2.TuiTextfieldControllerModule,
1869
- i6.TuiActiveZoneModule,
1870
- i6.TuiLetModule,
1871
- i2.TuiModeModule,
1872
- i2.TuiLinkModule,
1873
- i2.TuiExpandModule,
1874
- i2.TuiHostedDropdownModule,
1875
- i2.TuiDropdownModule,
1876
- i1.TuiAccordionModule,
1877
- i2.TuiScrollbarModule,
1878
- i2.TuiSvgModule,
1879
- i2.TuiDataListModule,
1880
- i6.TuiAutoFocusModule], exports: [TuiDocNavigationComponent] });
1881
- TuiDocNavigationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocNavigationModule, imports: [[
1882
- i4.CommonModule,
1883
- i5.ReactiveFormsModule,
1884
- i6$1.RouterModule,
1885
- i5$1.PolymorpheusModule,
1886
- i8.TuiScrollIntoViewLinkModule,
1887
- i2.TuiButtonModule,
1888
- i1.TuiInputModule,
1889
- i2.TuiTextfieldControllerModule,
1890
- i6.TuiActiveZoneModule,
1891
- i6.TuiLetModule,
1892
- i2.TuiModeModule,
1893
- i2.TuiLinkModule,
1894
- i2.TuiExpandModule,
1895
- i2.TuiHostedDropdownModule,
1896
- i2.TuiDropdownModule,
1897
- i1.TuiAccordionModule,
1898
- i2.TuiScrollbarModule,
1899
- i2.TuiSvgModule,
1900
- i2.TuiDataListModule,
1901
- i6.TuiAutoFocusModule,
1902
- ]] });
1903
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocNavigationModule, decorators: [{
1904
- type: i0.NgModule,
1905
- args: [{
1906
- imports: [
1907
- i4.CommonModule,
1908
- i5.ReactiveFormsModule,
1909
- i6$1.RouterModule,
1910
- i5$1.PolymorpheusModule,
1911
- i8.TuiScrollIntoViewLinkModule,
1912
- i2.TuiButtonModule,
1913
- i1.TuiInputModule,
1914
- i2.TuiTextfieldControllerModule,
1915
- i6.TuiActiveZoneModule,
1916
- i6.TuiLetModule,
1917
- i2.TuiModeModule,
1918
- i2.TuiLinkModule,
1919
- i2.TuiExpandModule,
1920
- i2.TuiHostedDropdownModule,
1921
- i2.TuiDropdownModule,
1922
- i1.TuiAccordionModule,
1923
- i2.TuiScrollbarModule,
1924
- i2.TuiSvgModule,
1925
- i2.TuiDataListModule,
1926
- i6.TuiAutoFocusModule,
1927
- ],
1928
- declarations: [TuiDocNavigationComponent],
1929
- exports: [TuiDocNavigationComponent],
1930
- }]
1931
- }] });
1932
-
1933
- var TuiDocHeaderModule = /** @class */ (function () {
1934
- function TuiDocHeaderModule() {
1935
- }
1936
- return TuiDocHeaderModule;
1937
- }());
1938
- TuiDocHeaderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocHeaderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1939
- TuiDocHeaderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocHeaderModule, declarations: [TuiDocHeaderComponent], imports: [i4.CommonModule,
1940
- i5$1.PolymorpheusModule,
1941
- i2.TuiButtonModule,
1942
- i4$2.TuiSidebarModule,
1943
- i6.TuiActiveZoneModule,
1944
- TuiDocNavigationModule], exports: [TuiDocHeaderComponent] });
1945
- TuiDocHeaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocHeaderModule, imports: [[
1946
- i4.CommonModule,
1947
- i5$1.PolymorpheusModule,
1948
- i2.TuiButtonModule,
1949
- i4$2.TuiSidebarModule,
1950
- i6.TuiActiveZoneModule,
1951
- TuiDocNavigationModule,
1952
- ]] });
1953
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocHeaderModule, decorators: [{
1954
- type: i0.NgModule,
1955
- args: [{
1956
- imports: [
1957
- i4.CommonModule,
1958
- i5$1.PolymorpheusModule,
1959
- i2.TuiButtonModule,
1960
- i4$2.TuiSidebarModule,
1961
- i6.TuiActiveZoneModule,
1962
- TuiDocNavigationModule,
1963
- ],
1964
- declarations: [TuiDocHeaderComponent],
1965
- exports: [TuiDocHeaderComponent],
1966
- }]
1967
- }] });
1968
-
1969
- var TuiDocSeeAlsoComponent = /** @class */ (function () {
1970
- function TuiDocSeeAlsoComponent(text, pages) {
1971
- this.text = text;
1972
- this.pages = pages;
1973
- this.seeAlso = [];
1974
- }
1975
- TuiDocSeeAlsoComponent.prototype.getRouterLink = function (pageTitle) {
1976
- var _a, _b;
1977
- return (_b = (_a = this.pages.get(pageTitle)) === null || _a === void 0 ? void 0 : _a.route) !== null && _b !== void 0 ? _b : '';
1978
- };
1979
- return TuiDocSeeAlsoComponent;
1980
- }());
1981
- TuiDocSeeAlsoComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSeeAlsoComponent, deps: [{ token: tokens.TUI_DOC_SEE_ALSO_TEXT }, { token: tokens.TUI_DOC_MAP_PAGES }], target: i0__namespace.ɵɵFactoryTarget.Component });
1982
- TuiDocSeeAlsoComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocSeeAlsoComponent, selector: "tui-doc-see-also", inputs: { seeAlso: "seeAlso" }, ngImport: i0__namespace, 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__namespace.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }], directives: [{ type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1983
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSeeAlsoComponent, decorators: [{
1984
- type: i0.Component,
1985
- args: [{
1986
- selector: 'tui-doc-see-also',
1987
- templateUrl: './see-also.template.html',
1988
- styleUrls: ['./see-also.style.less'],
1989
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1990
- }]
1991
- }], ctorParameters: function () {
1992
- return [{ type: undefined, decorators: [{
1993
- type: i0.Inject,
1994
- args: [tokens.TUI_DOC_SEE_ALSO_TEXT]
1995
- }] }, { type: Map, decorators: [{
1996
- type: i0.Inject,
1997
- args: [tokens.TUI_DOC_MAP_PAGES]
1998
- }] }];
1999
- }, propDecorators: { seeAlso: [{
2000
- type: i0.Input
2001
- }] } });
2002
-
2003
- var TuiDocSeeAlsoModule = /** @class */ (function () {
2004
- function TuiDocSeeAlsoModule() {
2005
- }
2006
- return TuiDocSeeAlsoModule;
2007
- }());
2008
- TuiDocSeeAlsoModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSeeAlsoModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2009
- TuiDocSeeAlsoModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSeeAlsoModule, declarations: [TuiDocSeeAlsoComponent], imports: [i4.CommonModule, i6$1.RouterModule, i2.TuiLinkModule], exports: [TuiDocSeeAlsoComponent] });
2010
- TuiDocSeeAlsoModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSeeAlsoModule, imports: [[i4.CommonModule, i6$1.RouterModule, i2.TuiLinkModule]] });
2011
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSeeAlsoModule, decorators: [{
2012
- type: i0.NgModule,
2013
- args: [{
2014
- imports: [i4.CommonModule, i6$1.RouterModule, i2.TuiLinkModule],
2015
- declarations: [TuiDocSeeAlsoComponent],
2016
- exports: [TuiDocSeeAlsoComponent],
2017
- }]
2018
- }] });
2019
-
2020
- var TuiDocSourceCodeComponent = /** @class */ (function () {
2021
- function TuiDocSourceCodeComponent(icons, sourceCode, text) {
2022
- this.icons = icons;
2023
- this.sourceCode = sourceCode;
2024
- this.text = text;
2025
- this.header = '';
2026
- this.package = '';
2027
- this.type = '';
2028
- this.path = '';
2029
- }
2030
- Object.defineProperty(TuiDocSourceCodeComponent.prototype, "pathOptions", {
2031
- get: function () {
2032
- return this.getPathOptions(this.header, this.package, this.type, this.path);
2033
- },
2034
- enumerable: false,
2035
- configurable: true
2036
- });
2037
- TuiDocSourceCodeComponent.prototype.pathIsUrl = function (path) {
2038
- return path.startsWith('http');
2039
- };
2040
- TuiDocSourceCodeComponent.prototype.getPathOptions = function (header, packageName, type, path) {
2041
- return {
2042
- header: header,
2043
- package: packageName,
2044
- type: type,
2045
- path: path,
2046
- };
2047
- };
2048
- return TuiDocSourceCodeComponent;
2049
- }());
2050
- TuiDocSourceCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSourceCodeComponent, deps: [{ token: tokens.TUI_DOC_ICONS }, { token: tokens.TUI_DOC_SOURCE_CODE }, { token: tokens.TUI_DOC_SOURCE_CODE_TEXT }], target: i0__namespace.ɵɵFactoryTarget.Component });
2051
- TuiDocSourceCodeComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i5__namespace$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2052
- __decorate([
2053
- i6.tuiPure
2054
- ], TuiDocSourceCodeComponent.prototype, "pathIsUrl", null);
2055
- __decorate([
2056
- i6.tuiPure
2057
- ], TuiDocSourceCodeComponent.prototype, "getPathOptions", null);
2058
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSourceCodeComponent, decorators: [{
2059
- type: i0.Component,
2060
- args: [{
2061
- selector: 'tui-doc-source-code',
2062
- templateUrl: './source-code.template.html',
2063
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2064
- }]
2065
- }], ctorParameters: function () {
2066
- return [{ type: undefined, decorators: [{
2067
- type: i0.Inject,
2068
- args: [tokens.TUI_DOC_ICONS]
2069
- }] }, { type: undefined, decorators: [{
2070
- type: i0.Inject,
2071
- args: [tokens.TUI_DOC_SOURCE_CODE]
2072
- }] }, { type: undefined, decorators: [{
2073
- type: i0.Inject,
2074
- args: [tokens.TUI_DOC_SOURCE_CODE_TEXT]
2075
- }] }];
2076
- }, propDecorators: { header: [{
2077
- type: i0.Input
2078
- }], package: [{
2079
- type: i0.Input
2080
- }], type: [{
2081
- type: i0.Input
2082
- }], path: [{
2083
- type: i0.Input
2084
- }], pathIsUrl: [], getPathOptions: [] } });
2085
-
2086
- var TuiDocSourceCodeModule = /** @class */ (function () {
2087
- function TuiDocSourceCodeModule() {
2088
- }
2089
- return TuiDocSourceCodeModule;
2090
- }());
2091
- TuiDocSourceCodeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSourceCodeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2092
- TuiDocSourceCodeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSourceCodeModule, declarations: [TuiDocSourceCodeComponent], imports: [i4.CommonModule, i5$1.PolymorpheusModule, i2.TuiButtonModule], exports: [TuiDocSourceCodeComponent] });
2093
- TuiDocSourceCodeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSourceCodeModule, imports: [[i4.CommonModule, i5$1.PolymorpheusModule, i2.TuiButtonModule]] });
2094
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocSourceCodeModule, decorators: [{
2095
- type: i0.NgModule,
2096
- args: [{
2097
- imports: [i4.CommonModule, i5$1.PolymorpheusModule, i2.TuiButtonModule],
2098
- declarations: [TuiDocSourceCodeComponent],
2099
- exports: [TuiDocSourceCodeComponent],
2100
- }]
2101
- }] });
2102
-
2103
- var TuiLanguageSwitcherComponent = /** @class */ (function () {
2104
- function TuiLanguageSwitcherComponent(switcher, flagPipe) {
2105
- this.switcher = switcher;
2106
- this.flagPipe = flagPipe;
2107
- this.language = new i5.FormControl(i2.tuiCapitalizeFirstLetter(this.switcher.language));
2108
- this.flags = new Map([
2109
- ['chinese', i5$2.TuiCountryIsoCode.CN],
2110
- ['dutch', i5$2.TuiCountryIsoCode.NL],
2111
- ['english', i5$2.TuiCountryIsoCode.GB],
2112
- ['french', i5$2.TuiCountryIsoCode.FR],
2113
- ['german', i5$2.TuiCountryIsoCode.DE],
2114
- ['italian', i5$2.TuiCountryIsoCode.IT],
2115
- ['polish', i5$2.TuiCountryIsoCode.PL],
2116
- ['portuguese', i5$2.TuiCountryIsoCode.PT],
2117
- ['russian', i5$2.TuiCountryIsoCode.RU],
2118
- ['spanish', i5$2.TuiCountryIsoCode.ES],
2119
- ['turkish', i5$2.TuiCountryIsoCode.TR],
2120
- ['ukrainian', i5$2.TuiCountryIsoCode.UA],
2121
- ['kazakh', i5$2.TuiCountryIsoCode.KZ],
2122
- ['malay', i5$2.TuiCountryIsoCode.MS],
2123
- ['vietnamese', i5$2.TuiCountryIsoCode.VN],
2124
- ]);
2125
- this.names = Array.from(this.flags.keys());
2126
- }
2127
- /**
2128
- * @deprecated use `<img [src]="countryIsoCode | tuiFlagPipe" />`
2129
- * TODO drop in v4.0
2130
- */
2131
- TuiLanguageSwitcherComponent.prototype.getFlagPath = function (code) {
2132
- return this.flagPipe.transform(code);
2133
- };
2134
- return TuiLanguageSwitcherComponent;
2135
- }());
2136
- TuiLanguageSwitcherComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiLanguageSwitcherComponent, deps: [{ token: i5$2.TuiLanguageSwitcher }, { token: i2.TuiFlagPipe }], target: i0__namespace.ɵɵFactoryTarget.Component });
2137
- TuiLanguageSwitcherComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiLanguageSwitcherComponent, selector: "tui-language-switcher", providers: [
2138
- // TODO: for backward compatibility only. Drop in v4.0
2139
- i2.TuiFlagPipe,
2140
- ], ngImport: i0__namespace, 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__namespace.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { type: i2__namespace.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent", "size"] }, { type: i2__namespace.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }], directives: [{ type: i1__namespace.TuiSelectDirective, selector: "tui-select" }, { type: i5__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2__namespace.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "titlecase": i4__namespace.TitleCasePipe, "tuiFlag": i2__namespace.TuiFlagPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2141
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiLanguageSwitcherComponent, decorators: [{
2142
- type: i0.Component,
2143
- args: [{
2144
- selector: 'tui-language-switcher',
2145
- templateUrl: './language-switcher.component.html',
2146
- styleUrls: ['./language-switcher.component.less'],
2147
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2148
- providers: [
2149
- // TODO: for backward compatibility only. Drop in v4.0
2150
- i2.TuiFlagPipe,
2151
- ],
2152
- }]
2153
- }], ctorParameters: function () {
2154
- return [{ type: i5__namespace$2.TuiLanguageSwitcher, decorators: [{
2155
- type: i0.Inject,
2156
- args: [i5$2.TuiLanguageSwitcher]
2157
- }] }, { type: i2__namespace.TuiFlagPipe, decorators: [{
2158
- type: i0.Inject,
2159
- args: [i2.TuiFlagPipe]
2160
- }] }];
2161
- } });
2162
-
2163
- var TuiLanguageSwitcherModule = /** @class */ (function () {
2164
- function TuiLanguageSwitcherModule() {
2165
- }
2166
- return TuiLanguageSwitcherModule;
2167
- }());
2168
- TuiLanguageSwitcherModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiLanguageSwitcherModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2169
- TuiLanguageSwitcherModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiLanguageSwitcherModule, declarations: [TuiLanguageSwitcherComponent], imports: [i4.CommonModule,
2170
- i2.TuiFlagPipeModule,
2171
- i1.TuiSelectModule,
2172
- i2.TuiDataListModule,
2173
- i5.ReactiveFormsModule], exports: [TuiLanguageSwitcherComponent] });
2174
- TuiLanguageSwitcherModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiLanguageSwitcherModule, imports: [[
2175
- i4.CommonModule,
2176
- i2.TuiFlagPipeModule,
2177
- i1.TuiSelectModule,
2178
- i2.TuiDataListModule,
2179
- i5.ReactiveFormsModule,
2180
- ]] });
2181
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiLanguageSwitcherModule, decorators: [{
2182
- type: i0.NgModule,
2183
- args: [{
2184
- imports: [
2185
- i4.CommonModule,
2186
- i2.TuiFlagPipeModule,
2187
- i1.TuiSelectModule,
2188
- i2.TuiDataListModule,
2189
- i5.ReactiveFormsModule,
2190
- ],
2191
- declarations: [TuiLanguageSwitcherComponent],
2192
- exports: [TuiLanguageSwitcherComponent],
2193
- }]
2194
- }] });
2195
-
2196
- var TuiDocMainComponent = /** @class */ (function () {
2197
- function TuiDocMainComponent(icons, theme, night) {
2198
- var _this = this;
2199
- this.icons = icons;
2200
- this.theme = theme;
2201
- this.night = night;
2202
- this.change$ = this.night;
2203
- this.night$ = this.change$.pipe(operators.startWith(null), operators.map(function () { return _this.night.value; }), operators.distinctUntilChanged(), operators.share());
2204
- }
2205
- Object.defineProperty(TuiDocMainComponent.prototype, "mode", {
2206
- get: function () {
2207
- return this.night.value ? 'onDark' : null;
2208
- },
2209
- enumerable: false,
2210
- configurable: true
2211
- });
2212
- Object.defineProperty(TuiDocMainComponent.prototype, "icon", {
2213
- get: function () {
2214
- return this.night.value ? this.icons.day : this.icons.night;
2215
- },
2216
- enumerable: false,
2217
- configurable: true
2218
- });
2219
- return TuiDocMainComponent;
2220
- }());
2221
- TuiDocMainComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocMainComponent, deps: [{ token: tokens.TUI_DOC_ICONS }, { token: i6$2.TuiThemeService }, { token: i6$2.TuiThemeNightService }], target: i0__namespace.ɵɵFactoryTarget.Component });
2222
- TuiDocMainComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocMainComponent, selector: "tui-doc-main", host: { properties: { "attr.data-mode": "this.mode" } }, providers: [
2223
- {
2224
- provide: i2.TuiModeDirective,
2225
- useExisting: i0.forwardRef(function () { return TuiDocMainComponent; }),
2226
- },
2227
- i6.TuiSwipeService,
2228
- ], ngImport: i0__namespace, 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__namespace.TuiThemeNightComponent, selector: "tui-theme-night" }, { type: i2__namespace.TuiRootComponent, selector: "tui-root" }, { type: TuiDocNavigationComponent, selector: "tui-doc-navigation" }, { type: TuiDocHeaderComponent, selector: "header[tuiDocHeader]" }, { type: i2__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }, { type: i2__namespace.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.Default, encapsulation: i0__namespace.ViewEncapsulation.None });
2229
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocMainComponent, decorators: [{
2230
- type: i0.Component,
2231
- args: [{
2232
- selector: 'tui-doc-main',
2233
- templateUrl: './main.template.html',
2234
- styleUrls: ['./main.style.less'],
2235
- encapsulation: i0.ViewEncapsulation.None,
2236
- // @note: This one was default on purpose so we can test demo in default mode.
2237
- // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
2238
- changeDetection: i0.ChangeDetectionStrategy.Default,
2239
- providers: [
2240
- {
2241
- provide: i2.TuiModeDirective,
2242
- useExisting: i0.forwardRef(function () { return TuiDocMainComponent; }),
2243
- },
2244
- i6.TuiSwipeService,
2245
- ],
2246
- }]
2247
- }], ctorParameters: function () {
2248
- return [{ type: undefined, decorators: [{
2249
- type: i0.Inject,
2250
- args: [tokens.TUI_DOC_ICONS]
2251
- }] }, { type: i6__namespace$2.TuiThemeService, decorators: [{
2252
- type: i0.Inject,
2253
- args: [i6$2.TuiThemeService]
2254
- }] }, { type: i6__namespace$2.TuiThemeNightService, decorators: [{
2255
- type: i0.Inject,
2256
- args: [i6$2.TuiThemeNightService]
2257
- }] }];
2258
- }, propDecorators: { mode: [{
2259
- type: i0.HostBinding,
2260
- args: ['attr.data-mode']
2261
- }] } });
2262
-
2263
- var TuiDocMainModule = /** @class */ (function () {
2264
- function TuiDocMainModule() {
2265
- }
2266
- return TuiDocMainModule;
2267
- }());
2268
- TuiDocMainModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocMainModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2269
- TuiDocMainModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocMainModule, declarations: [TuiDocMainComponent], imports: [i4.CommonModule,
2270
- i6$1.RouterModule,
2271
- i2.TuiThemeNightModule,
2272
- TuiDocHeaderModule,
2273
- i2.TuiRootModule,
2274
- i2.TuiDialogModule,
2275
- i2.TuiAlertModule,
2276
- i2.TuiButtonModule,
2277
- i2.TuiModeModule,
2278
- TuiDocNavigationModule], exports: [TuiDocMainComponent] });
2279
- TuiDocMainModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocMainModule, imports: [[
2280
- i4.CommonModule,
2281
- i6$1.RouterModule,
2282
- i2.TuiThemeNightModule,
2283
- TuiDocHeaderModule,
2284
- i2.TuiRootModule,
2285
- i2.TuiDialogModule,
2286
- i2.TuiAlertModule,
2287
- i2.TuiButtonModule,
2288
- i2.TuiModeModule,
2289
- TuiDocNavigationModule,
2290
- ]] });
2291
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocMainModule, decorators: [{
2292
- type: i0.NgModule,
2293
- args: [{
2294
- imports: [
2295
- i4.CommonModule,
2296
- i6$1.RouterModule,
2297
- i2.TuiThemeNightModule,
2298
- TuiDocHeaderModule,
2299
- i2.TuiRootModule,
2300
- i2.TuiDialogModule,
2301
- i2.TuiAlertModule,
2302
- i2.TuiButtonModule,
2303
- i2.TuiModeModule,
2304
- TuiDocNavigationModule,
2305
- ],
2306
- declarations: [TuiDocMainComponent],
2307
- exports: [TuiDocMainComponent],
2308
- }]
2309
- }] });
2310
-
2311
- /**
2312
- * Array if related page titles
2313
- */
2314
- var PAGE_SEE_ALSO = new i0.InjectionToken("[PAGE_SEE_ALSO]");
2315
- var PAGE_PROVIDERS = [
2316
- {
2317
- provide: PAGE_SEE_ALSO,
2318
- deps: [i0.ElementRef, tokens.TUI_DOC_SEE_ALSO],
2319
- useFactory: function (_a, seeAlsoGroups) {
2320
- var nativeElement = _a.nativeElement;
2321
- var currentHeader = nativeElement.getAttribute("header");
2322
- var groups = seeAlsoGroups.filter(function (group) { return group.includes(currentHeader); }) || [];
2323
- var seeAlsoSet = new Set(groups
2324
- .join()
2325
- .split(",")
2326
- .filter(function (component) { return component && component !== currentHeader; }));
2327
- return Array.from(seeAlsoSet);
2328
- },
2329
- },
2330
- ];
2331
-
2332
- var TuiDocPageTabConnectorDirective = /** @class */ (function () {
2333
- function TuiDocPageTabConnectorDirective(template) {
2334
- this.template = template;
2335
- }
2336
- return TuiDocPageTabConnectorDirective;
2337
- }());
2338
- TuiDocPageTabConnectorDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageTabConnectorDirective, deps: [{ token: i0.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2339
- TuiDocPageTabConnectorDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocPageTabConnectorDirective, selector: "[pageTab]", inputs: { pageTab: "pageTab" }, ngImport: i0__namespace });
2340
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageTabConnectorDirective, decorators: [{
2341
- type: i0.Directive,
2342
- args: [{
2343
- selector: '[pageTab]',
2344
- }]
2345
- }], ctorParameters: function () {
2346
- return [{ type: i0__namespace.TemplateRef, decorators: [{
2347
- type: i0.Inject,
2348
- args: [i0.TemplateRef]
2349
- }] }];
2350
- }, propDecorators: { pageTab: [{
2351
- type: i0.Input
2352
- }] } });
2353
-
2354
- var TuiDocPageComponent = /** @class */ (function () {
2355
- function TuiDocPageComponent(defaultTabs, seeAlso) {
2356
- this.defaultTabs = defaultTabs;
2357
- this.seeAlso = seeAlso;
2358
- this.header = '';
2359
- this.package = '';
2360
- this.type = '';
2361
- this.path = '';
2362
- this.deprecated = false;
2363
- this.tabConnectors = i6.EMPTY_QUERY;
2364
- this.activeItemIndex = 0;
2365
- this.from = / /g;
2366
- this.to = '_';
2367
- }
2368
- Object.defineProperty(TuiDocPageComponent.prototype, "showSeeAlso", {
2369
- get: function () {
2370
- return !!this.seeAlso.length && this.activeItemIndex === 0;
2371
- },
2372
- enumerable: false,
2373
- configurable: true
2374
- });
2375
- return TuiDocPageComponent;
2376
- }());
2377
- TuiDocPageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageComponent, deps: [{ token: tokens.TUI_DOC_DEFAULT_TABS }, { token: PAGE_SEE_ALSO }], target: i0__namespace.ɵɵFactoryTarget.Component });
2378
- TuiDocPageComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.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__namespace.TuiTabsWithMoreComponent, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["moreContent", "dropdownContent", "underline", "activeItemIndex", "itemsLimit"], outputs: ["activeItemIndexChange"] }, { type: i1__namespace.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__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace$1.TuiItemDirective, selector: "[tuiItem]" }, { type: i6__namespace.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i6__namespace.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "tuiReplace": i6__namespace$1.TuiReplacePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2379
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageComponent, decorators: [{
2380
- type: i0.Component,
2381
- args: [{
2382
- selector: 'tui-doc-page',
2383
- templateUrl: './page.template.html',
2384
- styleUrls: ['./page.style.less'],
2385
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2386
- providers: PAGE_PROVIDERS,
2387
- }]
2388
- }], ctorParameters: function () {
2389
- return [{ type: undefined, decorators: [{
2390
- type: i0.Inject,
2391
- args: [tokens.TUI_DOC_DEFAULT_TABS]
2392
- }] }, { type: undefined, decorators: [{
2393
- type: i0.Inject,
2394
- args: [PAGE_SEE_ALSO]
2395
- }] }];
2396
- }, propDecorators: { header: [{
2397
- type: i0.Input
2398
- }], package: [{
2399
- type: i0.Input
2400
- }], type: [{
2401
- type: i0.Input
2402
- }], path: [{
2403
- type: i0.Input
2404
- }], deprecated: [{
2405
- type: i0.Input
2406
- }], tabConnectors: [{
2407
- type: i0.ContentChildren,
2408
- args: [TuiDocPageTabConnectorDirective]
2409
- }] } });
2410
-
2411
- var TuiDocPageModule = /** @class */ (function () {
2412
- function TuiDocPageModule() {
2413
- }
2414
- return TuiDocPageModule;
2415
- }());
2416
- TuiDocPageModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2417
- TuiDocPageModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageModule, declarations: [TuiDocPageComponent, TuiDocPageTabConnectorDirective], imports: [i4.CommonModule,
2418
- i6$1.RouterModule,
2419
- TuiDocSeeAlsoModule,
2420
- i1.TuiTabsModule,
2421
- i1.TuiTagModule,
2422
- TuiDocSourceCodeModule,
2423
- i6.TuiReplacePipeModule], exports: [TuiDocPageComponent, TuiDocPageTabConnectorDirective] });
2424
- TuiDocPageModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageModule, imports: [[
2425
- i4.CommonModule,
2426
- i6$1.RouterModule,
2427
- TuiDocSeeAlsoModule,
2428
- i1.TuiTabsModule,
2429
- i1.TuiTagModule,
2430
- TuiDocSourceCodeModule,
2431
- i6.TuiReplacePipeModule,
2432
- ]] });
2433
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocPageModule, decorators: [{
2434
- type: i0.NgModule,
2435
- args: [{
2436
- imports: [
2437
- i4.CommonModule,
2438
- i6$1.RouterModule,
2439
- TuiDocSeeAlsoModule,
2440
- i1.TuiTabsModule,
2441
- i1.TuiTagModule,
2442
- TuiDocSourceCodeModule,
2443
- i6.TuiReplacePipeModule,
2444
- ],
2445
- declarations: [TuiDocPageComponent, TuiDocPageTabConnectorDirective],
2446
- exports: [TuiDocPageComponent, TuiDocPageTabConnectorDirective],
2447
- }]
2448
- }] });
2449
-
2450
- /**
2451
- * Generated bundle index. Do not edit.
2452
- */
2453
-
2454
- exports.PAGE_PROVIDERS = PAGE_PROVIDERS;
2455
- exports.PAGE_SEE_ALSO = PAGE_SEE_ALSO;
2456
- exports.TUI_DOC_EXAMPLE_DEFAULT_OPTIONS = TUI_DOC_EXAMPLE_DEFAULT_OPTIONS;
2457
- exports.TUI_DOC_EXAMPLE_OPTIONS = TUI_DOC_EXAMPLE_OPTIONS;
2458
- exports.TuiDocCodeComponent = TuiDocCodeComponent;
2459
- exports.TuiDocCodeModule = TuiDocCodeModule;
2460
- exports.TuiDocCopyComponent = TuiDocCopyComponent;
2461
- exports.TuiDocCopyModule = TuiDocCopyModule;
2462
- exports.TuiDocDemoComponent = TuiDocDemoComponent;
2463
- exports.TuiDocDemoModule = TuiDocDemoModule;
2464
- exports.TuiDocDocumentationComponent = TuiDocDocumentationComponent;
2465
- exports.TuiDocDocumentationModule = TuiDocDocumentationModule;
2466
- exports.TuiDocDocumentationPropertyConnectorDirective = TuiDocDocumentationPropertyConnectorDirective;
2467
- exports.TuiDocExampleComponent = TuiDocExampleComponent;
2468
- exports.TuiDocExampleGetTabsPipe = TuiDocExampleGetTabsPipe;
2469
- exports.TuiDocExampleModule = TuiDocExampleModule;
2470
- exports.TuiDocHeaderComponent = TuiDocHeaderComponent;
2471
- exports.TuiDocHeaderModule = TuiDocHeaderModule;
2472
- exports.TuiDocMainComponent = TuiDocMainComponent;
2473
- exports.TuiDocMainModule = TuiDocMainModule;
2474
- exports.TuiDocNavigationComponent = TuiDocNavigationComponent;
2475
- exports.TuiDocNavigationModule = TuiDocNavigationModule;
2476
- exports.TuiDocPageComponent = TuiDocPageComponent;
2477
- exports.TuiDocPageModule = TuiDocPageModule;
2478
- exports.TuiDocPageTabConnectorDirective = TuiDocPageTabConnectorDirective;
2479
- exports.TuiDocSeeAlsoComponent = TuiDocSeeAlsoComponent;
2480
- exports.TuiDocSeeAlsoModule = TuiDocSeeAlsoModule;
2481
- exports.TuiDocSourceCodeComponent = TuiDocSourceCodeComponent;
2482
- exports.TuiDocSourceCodeModule = TuiDocSourceCodeModule;
2483
- exports.TuiDocTypeReferencePipe = TuiDocTypeReferencePipe;
2484
- exports.TuiGetColorPipe = TuiGetColorPipe;
2485
- exports.TuiGetOpacityPipe = TuiGetOpacityPipe;
2486
- exports.TuiInputOpacityDirective = TuiInputOpacityDirective;
2487
- exports.TuiInputOpacityModule = TuiInputOpacityModule;
2488
- exports.TuiInspectPipe = TuiInspectPipe;
2489
- exports.TuiIsOptionalPipe = TuiIsOptionalPipe;
2490
- exports.TuiIsPrimitivePolymorpheusContentPipe = TuiIsPrimitivePolymorpheusContentPipe;
2491
- exports.TuiLanguageSwitcherComponent = TuiLanguageSwitcherComponent;
2492
- exports.TuiLanguageSwitcherModule = TuiLanguageSwitcherModule;
2493
- exports.TuiShowCleanerPipe = TuiShowCleanerPipe;
2494
- exports.TuiStripOptionalPipe = TuiStripOptionalPipe;
2495
- exports.tuiDocExampleOptionsProvider = tuiDocExampleOptionsProvider;
2496
-
2497
- Object.defineProperty(exports, '__esModule', { value: true });
2498
-
2499
- }));
2500
- //# sourceMappingURL=taiga-ui-addon-doc-components.umd.js.map