@taiga-ui/addon-doc 3.25.0 → 3.26.0

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