@taiga-ui/addon-doc 3.25.0-dev.main-856bc57 → 3.25.0-dev.main-c3bbfaa

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