@taiga-ui/addon-doc 2.61.0 → 3.0.0-rc.2

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 (183) hide show
  1. package/README.md +2 -2
  2. package/addon-doc.module.d.ts +9 -0
  3. package/bundles/taiga-ui-addon-doc.umd.js +1679 -1355
  4. package/bundles/taiga-ui-addon-doc.umd.js.map +1 -1
  5. package/components/code/code.component.d.ts +3 -0
  6. package/components/code/code.module.d.ts +7 -0
  7. package/components/code/parse-code-block.d.ts +1 -5
  8. package/components/copy/copy.component.d.ts +3 -0
  9. package/components/copy/copy.module.d.ts +7 -0
  10. package/components/demo/demo.component.d.ts +3 -0
  11. package/components/demo/demo.module.d.ts +11 -0
  12. package/components/documentation/documentation-property-connector.directive.d.ts +3 -0
  13. package/components/documentation/documentation.component.d.ts +3 -0
  14. package/components/documentation/documentation.module.d.ts +12 -0
  15. package/components/example/example-capitalize.pipe.d.ts +3 -0
  16. package/components/example/example-get-tabs.pipe.d.ts +3 -0
  17. package/components/example/example.component.d.ts +8 -5
  18. package/components/example/example.module.d.ts +14 -0
  19. package/components/language-switcher/language-switcher.component.d.ts +3 -0
  20. package/components/language-switcher/language-switcher.module.d.ts +9 -0
  21. package/components/main/main.component.d.ts +3 -0
  22. package/components/main/main.module.d.ts +12 -0
  23. package/components/navigation/navigation.component.d.ts +8 -5
  24. package/components/navigation/navigation.module.d.ts +13 -0
  25. package/components/navigation/navigation.providers.d.ts +0 -4
  26. package/components/page/page-tab.directive.d.ts +3 -0
  27. package/components/page/page.component.d.ts +3 -0
  28. package/components/page/page.module.d.ts +11 -0
  29. package/components/page/page.providers.d.ts +1 -2
  30. package/directives/scroll-into-view/scroll-into-view.directive.d.ts +5 -8
  31. package/directives/scroll-into-view/scroll-into-view.module.d.ts +5 -6
  32. package/esm2015/addon-doc.module.js +27 -16
  33. package/esm2015/components/code/code.component.js +26 -24
  34. package/esm2015/components/code/code.module.js +15 -12
  35. package/esm2015/components/code/parse-code-block.js +2 -7
  36. package/esm2015/components/copy/copy.component.js +24 -20
  37. package/esm2015/components/copy/copy.module.js +15 -12
  38. package/esm2015/components/demo/demo.component.js +75 -59
  39. package/esm2015/components/demo/demo.module.js +54 -13
  40. package/esm2015/components/documentation/documentation-property-connector.directive.js +45 -46
  41. package/esm2015/components/documentation/documentation.component.js +54 -48
  42. package/esm2015/components/documentation/documentation.module.js +64 -21
  43. package/esm2015/components/example/example-capitalize.pipe.js +13 -10
  44. package/esm2015/components/example/example-get-tabs.pipe.js +10 -8
  45. package/esm2015/components/example/example.component.js +86 -66
  46. package/esm2015/components/example/example.module.js +42 -21
  47. package/esm2015/components/language-switcher/language-switcher.component.js +27 -20
  48. package/esm2015/components/language-switcher/language-switcher.module.js +15 -12
  49. package/esm2015/components/main/main.component.js +44 -31
  50. package/esm2015/components/main/main.module.js +36 -13
  51. package/esm2015/components/navigation/navigation.component.js +86 -69
  52. package/esm2015/components/navigation/navigation.module.js +65 -21
  53. package/esm2015/components/navigation/navigation.providers.js +14 -19
  54. package/esm2015/components/page/page-tab.directive.js +18 -15
  55. package/esm2015/components/page/page.component.js +42 -39
  56. package/esm2015/components/page/page.module.js +28 -13
  57. package/esm2015/components/page/page.providers.js +10 -12
  58. package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +30 -43
  59. package/esm2015/directives/scroll-into-view/scroll-into-view.module.js +15 -28
  60. package/esm2015/interfaces/code-editor.js +2 -1
  61. package/esm2015/interfaces/page.js +1 -1
  62. package/esm2015/interfaces/source-code-path-options.js +2 -1
  63. package/esm2015/internal/header/header.component.js +34 -23
  64. package/esm2015/internal/header/header.module.js +28 -13
  65. package/esm2015/internal/input-opacity/input-opacity.directive.js +20 -19
  66. package/esm2015/internal/input-opacity/input-opacity.module.js +14 -11
  67. package/esm2015/internal/see-also/see-also.component.js +26 -23
  68. package/esm2015/internal/see-also/see-also.module.js +15 -12
  69. package/esm2015/internal/source-code/source-code.component.js +31 -30
  70. package/esm2015/internal/source-code/source-code.module.js +15 -12
  71. package/esm2015/languages/russian.js +10 -14
  72. package/esm2015/public-api.js +8 -1
  73. package/esm2015/taiga-ui-addon-doc.js +1 -13
  74. package/esm2015/tokens/code-actions.js +1 -1
  75. package/esm2015/tokens/code-editor.js +1 -1
  76. package/esm2015/tokens/default-tabs.js +1 -1
  77. package/esm2015/tokens/example-content-processor.js +1 -1
  78. package/esm2015/tokens/i18n.js +1 -1
  79. package/esm2015/tokens/logo.js +1 -1
  80. package/esm2015/tokens/page-loaded.js +1 -1
  81. package/esm2015/tokens/pages.js +1 -1
  82. package/esm2015/tokens/scroll-behavior.js +1 -1
  83. package/esm2015/tokens/see-also.js +1 -1
  84. package/esm2015/tokens/source-code.js +2 -2
  85. package/esm2015/tokens/title.js +1 -1
  86. package/esm2015/types/pages.js +2 -1
  87. package/esm2015/utils/coerce-value.js +2 -7
  88. package/esm2015/utils/generate-routes.js +2 -8
  89. package/esm2015/utils/inspect.js +4 -7
  90. package/esm2015/utils/raw-load-record.js +4 -9
  91. package/esm2015/utils/raw-load.js +14 -8
  92. package/esm2015/utils/transliterate-keyboard-layout.js +2 -5
  93. package/fesm2015/taiga-ui-addon-doc.js +1134 -904
  94. package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
  95. package/interfaces/code-editor.d.ts +0 -10
  96. package/internal/header/header.component.d.ts +3 -0
  97. package/internal/header/header.module.d.ts +11 -0
  98. package/internal/input-opacity/input-opacity.directive.d.ts +3 -0
  99. package/internal/input-opacity/input-opacity.module.d.ts +5 -0
  100. package/internal/see-also/see-also.component.d.ts +3 -0
  101. package/internal/see-also/see-also.module.d.ts +8 -0
  102. package/internal/source-code/source-code.component.d.ts +3 -0
  103. package/internal/source-code/source-code.module.d.ts +8 -0
  104. package/languages/russian.d.ts +0 -3
  105. package/package.json +11 -14
  106. package/public-api.d.ts +2 -0
  107. package/taiga-ui-addon-doc.d.ts +1 -12
  108. package/tokens/logo.d.ts +1 -1
  109. package/utils/coerce-value.d.ts +1 -5
  110. package/utils/generate-routes.d.ts +1 -6
  111. package/utils/inspect.d.ts +1 -3
  112. package/utils/raw-load-record.d.ts +1 -5
  113. package/utils/raw-load.d.ts +1 -5
  114. package/utils/transliterate-keyboard-layout.d.ts +1 -3
  115. package/bundles/taiga-ui-addon-doc.umd.min.js +0 -2
  116. package/bundles/taiga-ui-addon-doc.umd.min.js.map +0 -1
  117. package/esm2015/utils/color-conversion.js +0 -27
  118. package/esm5/addon-doc.module.js +0 -25
  119. package/esm5/components/code/code.component.js +0 -46
  120. package/esm5/components/code/code.module.js +0 -19
  121. package/esm5/components/code/parse-code-block.js +0 -21
  122. package/esm5/components/copy/copy.component.js +0 -43
  123. package/esm5/components/copy/copy.module.js +0 -19
  124. package/esm5/components/demo/demo.component.js +0 -153
  125. package/esm5/components/demo/demo.module.js +0 -43
  126. package/esm5/components/documentation/documentation-property-connector.directive.js +0 -133
  127. package/esm5/components/documentation/documentation.component.js +0 -145
  128. package/esm5/components/documentation/documentation.module.js +0 -50
  129. package/esm5/components/example/example-capitalize.pipe.js +0 -16
  130. package/esm5/components/example/example-get-tabs.pipe.js +0 -15
  131. package/esm5/components/example/example.component.js +0 -135
  132. package/esm5/components/example/example.module.js +0 -42
  133. package/esm5/components/language-switcher/language-switcher.component.js +0 -49
  134. package/esm5/components/language-switcher/language-switcher.module.js +0 -21
  135. package/esm5/components/main/main.component.js +0 -58
  136. package/esm5/components/main/main.module.js +0 -35
  137. package/esm5/components/navigation/navigation.component.js +0 -203
  138. package/esm5/components/navigation/navigation.module.js +0 -45
  139. package/esm5/components/navigation/navigation.providers.js +0 -59
  140. package/esm5/components/page/page-tab.directive.js +0 -24
  141. package/esm5/components/page/page.component.js +0 -67
  142. package/esm5/components/page/page.module.js +0 -30
  143. package/esm5/components/page/page.providers.js +0 -22
  144. package/esm5/directives/scroll-into-view/scroll-into-view.directive.js +0 -65
  145. package/esm5/directives/scroll-into-view/scroll-into-view.module.js +0 -34
  146. package/esm5/interfaces/code-editor.js +0 -1
  147. package/esm5/interfaces/page.js +0 -6
  148. package/esm5/interfaces/source-code-path-options.js +0 -1
  149. package/esm5/internal/header/header.component.js +0 -47
  150. package/esm5/internal/header/header.module.js +0 -30
  151. package/esm5/internal/input-opacity/input-opacity.directive.js +0 -36
  152. package/esm5/internal/input-opacity/input-opacity.module.js +0 -16
  153. package/esm5/internal/see-also/see-also.component.js +0 -44
  154. package/esm5/internal/see-also/see-also.module.js +0 -20
  155. package/esm5/internal/source-code/source-code.component.js +0 -61
  156. package/esm5/internal/source-code/source-code.module.js +0 -20
  157. package/esm5/languages/russian.js +0 -42
  158. package/esm5/public-api.js +0 -51
  159. package/esm5/taiga-ui-addon-doc.js +0 -17
  160. package/esm5/tokens/code-actions.js +0 -5
  161. package/esm5/tokens/code-editor.js +0 -3
  162. package/esm5/tokens/default-tabs.js +0 -5
  163. package/esm5/tokens/example-content-processor.js +0 -4
  164. package/esm5/tokens/i18n.js +0 -54
  165. package/esm5/tokens/logo.js +0 -5
  166. package/esm5/tokens/page-loaded.js +0 -5
  167. package/esm5/tokens/pages.js +0 -5
  168. package/esm5/tokens/scroll-behavior.js +0 -3
  169. package/esm5/tokens/see-also.js +0 -5
  170. package/esm5/tokens/source-code.js +0 -5
  171. package/esm5/tokens/title.js +0 -5
  172. package/esm5/types/pages.js +0 -1
  173. package/esm5/utils/coerce-value.js +0 -44
  174. package/esm5/utils/color-conversion.js +0 -27
  175. package/esm5/utils/generate-routes.js +0 -21
  176. package/esm5/utils/inspect.js +0 -68
  177. package/esm5/utils/raw-load-record.js +0 -50
  178. package/esm5/utils/raw-load.js +0 -26
  179. package/esm5/utils/transliterate-keyboard-layout.js +0 -50
  180. package/fesm5/taiga-ui-addon-doc.js +0 -2064
  181. package/fesm5/taiga-ui-addon-doc.js.map +0 -1
  182. package/taiga-ui-addon-doc.metadata.json +0 -1
  183. package/utils/color-conversion.d.ts +0 -12
@@ -1,52 +1,67 @@
1
- import { __awaiter, __decorate, __param } from 'tslib';
2
- import { Input, HostBinding, Component, NgModule, Inject, ChangeDetectionStrategy, InjectionToken, Renderer2, PLATFORM_ID, ViewChild, ContentChild, TemplateRef, HostListener, forwardRef, EventEmitter, Output, Directive, ChangeDetectorRef, ContentChildren, Attribute, Optional, Pipe, ViewEncapsulation, ElementRef } from '@angular/core';
3
- import { BehaviorSubject, Subject, timer, Observable, merge, identity, defer, of, ReplaySubject } from 'rxjs';
4
- import { switchMap, map, switchMapTo, mapTo, startWith, takeUntil, filter, debounceTime, mergeMap, take, distinctUntilChanged } from 'rxjs/operators';
1
+ import * as i0 from '@angular/core';
2
+ import { Component, Input, HostBinding, NgModule, ChangeDetectionStrategy, Inject, InjectionToken, Renderer2, PLATFORM_ID, forwardRef, TemplateRef, ViewChild, ContentChild, HostListener, EventEmitter, Directive, Output, ChangeDetectorRef, ContentChildren, Pipe, Attribute, Optional, ElementRef, ViewEncapsulation } from '@angular/core';
3
+ import * as i9 from 'rxjs';
4
+ import { BehaviorSubject, Subject, timer, merge, identity, defer, of, ReplaySubject } from 'rxjs';
5
+ import { switchMap, map, switchMapTo, mapTo, startWith, takeUntil, filter, mergeMap, debounceTime, take, distinctUntilChanged } from 'rxjs/operators';
6
+ import { __awaiter, __decorate } from 'tslib';
5
7
  import MarkdownIt from 'markdown-it';
8
+ import * as i5 from '@angular/common';
6
9
  import { CommonModule, isPlatformBrowser, Location as Location$1, DOCUMENT } from '@angular/common';
10
+ import * as i2 from 'ngx-highlightjs';
7
11
  import { HighlightModule } from 'ngx-highlightjs';
8
- import { tuiPure, TuiDestroyService, px, TUI_IS_MOBILE, TuiDragModule, EMPTY_QUERY, itemsQueryListObservable, watch, TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_CYPRESS, TuiSwipeService, getElementObscurers, isPresent, uniqBy, TuiActiveZoneModule, TuiLetModule, TuiAutoFocusModule, tuiDefaultProp } from '@taiga-ui/cdk';
9
- import { TUI_COPY_TEXTS, TuiSelectModule, TuiRadioBlockModule, TuiCheckboxLabeledModule, TuiDataListWrapperModule, TuiBadgeModule, TuiToggleModule, TuiInputCountModule, TuiTabsModule, TuiAccordionModule, TuiTagModule } from '@taiga-ui/kit';
10
- import { TuiButtonModule, TuiModeDirective, TuiLinkModule, TuiExpandModule, TuiGroupModule, TuiTooltipModule, TuiModeModule, TuiSvgModule, TuiDataListModule, TuiTextfieldControllerModule, TuiHintControllerModule, TuiPrimitiveTextfieldModule, TuiDropdownControllerModule, TuiNotificationModule, TuiNotificationsService, capitalizeFirstLetter, tuiCapitalizeFirstLetter, TUI_ICONS_PATH, TuiHostedDropdownModule, TuiScrollbarModule, TuiThemeNightModule, TuiRootModule, TuiDialogModule, TuiAlertModule } from '@taiga-ui/core';
12
+ import * as i6$1 from '@taiga-ui/cdk';
13
+ import { TuiDestroyService, tuiPure, tuiPx, TUI_IS_MOBILE, TuiDragModule, TUI_FOCUSABLE_ITEM_ACCESSOR, EMPTY_QUERY, tuiItemsQueryListObservable, tuiWatch, tuiRgbToHex, tuiHexToRgb, tuiIsString, tuiIsNumber, TUI_IS_CYPRESS, tuiIsPresent, tuiGetElementObscures, tuiControlValue, tuiUniqBy, TuiSwipeService, TuiActiveZoneModule, TuiLetModule, TuiAutoFocusModule, tuiDefaultProp } from '@taiga-ui/cdk';
14
+ import * as i1 from '@taiga-ui/kit';
15
+ import { TUI_COPY_TEXTS, TuiSelectModule, TuiRadioBlockModule, TuiCheckboxLabeledModule, TuiDataListWrapperModule, TuiBadgeModule, TuiToggleModule, TuiInputCountModule, TuiTabsModule, TuiInputModule, TuiAccordionModule, TuiTagModule } from '@taiga-ui/kit';
16
+ import * as i2$1 from '@taiga-ui/core';
17
+ import { TuiButtonModule, TuiModeDirective, TuiLinkModule, TuiExpandModule, TuiGroupModule, TuiTooltipModule, TuiModeModule, TuiSvgModule, TuiDataListModule, TuiTextfieldControllerModule, TuiHintControllerModule, TuiPrimitiveTextfieldModule, TuiDropdownModule, TuiNotificationModule, tuiCapitalizeFirstLetter, TuiAlertService, TUI_ICONS_PATH, TuiHostedDropdownModule, TuiScrollbarModule, TuiThemeNightModule, TuiRootModule, TuiDialogModule, TuiAlertModule } from '@taiga-ui/core';
18
+ import * as i5$1 from '@angular/forms';
11
19
  import { FormControl, FormGroup, ReactiveFormsModule, FormsModule } from '@angular/forms';
20
+ import * as i6 from '@angular/router';
12
21
  import { UrlSerializer, RouterModule, ActivatedRoute, Router, NavigationEnd } from '@angular/router';
13
22
  import { trigger, transition, style, animate } from '@angular/animations';
23
+ import * as i8 from '@angular/cdk/clipboard';
14
24
  import { Clipboard, ClipboardModule } from '@angular/cdk/clipboard';
15
25
  import { LOCATION, LOCAL_STORAGE, WINDOW } from '@ng-web-apis/common';
26
+ import * as i6$2 from '@tinkoff/ng-polymorpheus';
16
27
  import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
28
+ import * as i5$2 from '@taiga-ui/i18n';
17
29
  import { TuiCountryIsoCode, TuiLanguageSwitcher } from '@taiga-ui/i18n';
18
- import { TuiSidebarDirective, TuiSidebarModule } from '@taiga-ui/addon-mobile';
30
+ import * as i8$1 from '@angular/platform-browser';
19
31
  import { Title } from '@angular/platform-browser';
32
+ import * as i4 from '@taiga-ui/addon-mobile';
33
+ import { TuiSidebarDirective, TuiSidebarModule } from '@taiga-ui/addon-mobile';
20
34
 
21
- /**
22
- * @deprecated: use {@link tuiRawLoad} instead
23
- */
24
- // eslint-disable-next-line @typescript-eslint/naming-convention
25
- function rawLoad(content) {
35
+ // TODO: delete it when all `!!raw-loader!` will be replaced by webpack `asset/source`.
36
+ function trimExportDefault(fileContent) {
37
+ return fileContent.startsWith(`export default "`)
38
+ ? fileContent
39
+ .replace(/^export\sdefault\s["']/gi, ``)
40
+ .replace(/['"];$/gi, ``)
41
+ .replaceAll(`\\n`, `\n`)
42
+ .replaceAll(`\\"`, `"`)
43
+ : fileContent;
44
+ }
45
+ function tuiRawLoad(content) {
26
46
  return __awaiter(this, void 0, void 0, function* () {
27
- return content instanceof Promise ? (yield content).default : content;
47
+ const unpacked = content instanceof Promise ? (yield content).default : content;
48
+ return trimExportDefault(unpacked);
28
49
  });
29
50
  }
30
- const tuiRawLoad = rawLoad;
31
51
 
32
- /**
33
- * @deprecated: use {@link tuiTryParseMarkdownCodeBlock} instead
34
- */
35
- // eslint-disable-next-line @typescript-eslint/naming-convention
36
- function tryParseMarkdownCodeBlock(text = ``) {
52
+ function tuiTryParseMarkdownCodeBlock(text = ``) {
37
53
  const tokens = new MarkdownIt().parse(text, {});
38
54
  const result = tokens
39
55
  .filter(({ tag, type }) => tag === `code` && type === `fence`)
40
56
  .map(({ content }) => content);
41
57
  return result.length ? result : [text];
42
58
  }
43
- const tuiTryParseMarkdownCodeBlock = tryParseMarkdownCodeBlock;
44
59
 
45
- let TuiDocCodeComponent = class TuiDocCodeComponent {
60
+ class TuiDocCodeComponent {
46
61
  constructor() {
47
62
  this.rawLoader$$ = new BehaviorSubject(``);
48
63
  this.filename = ``;
49
- this.processor$ = this.rawLoader$$.pipe(switchMap(rawLoad), map(tryParseMarkdownCodeBlock));
64
+ this.processor$ = this.rawLoader$$.pipe(switchMap(tuiRawLoad), map(tuiTryParseMarkdownCodeBlock));
50
65
  }
51
66
  set code(code) {
52
67
  this.rawLoader$$.next(code);
@@ -54,37 +69,41 @@ let TuiDocCodeComponent = class TuiDocCodeComponent {
54
69
  get hasFilename() {
55
70
  return !!this.filename;
56
71
  }
57
- };
58
- __decorate([
59
- Input()
60
- ], TuiDocCodeComponent.prototype, "filename", void 0);
61
- __decorate([
62
- Input()
63
- ], TuiDocCodeComponent.prototype, "code", null);
64
- __decorate([
65
- HostBinding(`class._has-filename`)
66
- ], TuiDocCodeComponent.prototype, "hasFilename", null);
67
- TuiDocCodeComponent = __decorate([
68
- Component({
69
- selector: `tui-doc-code`,
70
- template: "<p\n *ngIf=\"filename\"\n class=\"t-header\"\n>\n {{ filename }}\n</p>\n<pre\n *ngFor=\"let content of processor$ | async\"\n class=\"t-code\"\n><code [lineNumbers]=\"true\" [highlight]=\"content\"></code></pre>\n",
71
- styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:700}.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-disabled);word-wrap:break-word;white-space:pre-wrap}@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution:0.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}"]
72
- })
73
- ], TuiDocCodeComponent);
72
+ }
73
+ TuiDocCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
74
+ TuiDocCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocCodeComponent, selector: "tui-doc-code", inputs: { filename: "filename", code: "code" }, host: { properties: { "class._has-filename": "this.hasFilename" } }, ngImport: i0, template: "<p\n *ngIf=\"filename\"\n class=\"t-header\"\n>\n {{ filename }}\n</p>\n<pre\n *ngFor=\"let content of processor$ | async\"\n class=\"t-code\"\n><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-disabled);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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.Highlight, selector: "[highlight]", inputs: ["highlight", "languages", "lineNumbers"], outputs: ["highlighted"] }], pipes: { "async": i5.AsyncPipe } });
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCodeComponent, decorators: [{
76
+ type: Component,
77
+ args: [{
78
+ selector: `tui-doc-code`,
79
+ templateUrl: `./code.template.html`,
80
+ styleUrls: [`./code.style.less`],
81
+ }]
82
+ }], propDecorators: { filename: [{
83
+ type: Input
84
+ }], code: [{
85
+ type: Input
86
+ }], hasFilename: [{
87
+ type: HostBinding,
88
+ args: [`class._has-filename`]
89
+ }] } });
74
90
 
75
- let TuiDocCodeModule = class TuiDocCodeModule {
76
- };
77
- TuiDocCodeModule = __decorate([
78
- NgModule({
79
- imports: [CommonModule, HighlightModule],
80
- declarations: [TuiDocCodeComponent],
81
- exports: [TuiDocCodeComponent],
82
- })
83
- ], TuiDocCodeModule);
91
+ class TuiDocCodeModule {
92
+ }
93
+ TuiDocCodeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCodeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
94
+ TuiDocCodeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCodeModule, declarations: [TuiDocCodeComponent], imports: [CommonModule, HighlightModule], exports: [TuiDocCodeComponent] });
95
+ TuiDocCodeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCodeModule, imports: [[CommonModule, HighlightModule]] });
96
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCodeModule, decorators: [{
97
+ type: NgModule,
98
+ args: [{
99
+ imports: [CommonModule, HighlightModule],
100
+ declarations: [TuiDocCodeComponent],
101
+ exports: [TuiDocCodeComponent],
102
+ }]
103
+ }] });
84
104
 
85
105
  const COPIED_TIMEOUT = 1500;
86
- // @dynamic
87
- let TuiDocCopyComponent = class TuiDocCopyComponent {
106
+ class TuiDocCopyComponent {
88
107
  constructor(texts$) {
89
108
  this.texts$ = texts$;
90
109
  this.copy$ = new Subject();
@@ -95,33 +114,39 @@ let TuiDocCopyComponent = class TuiDocCopyComponent {
95
114
  onClick() {
96
115
  this.copy$.next();
97
116
  }
98
- };
99
- TuiDocCopyComponent.ctorParameters = () => [
100
- { type: Observable, decorators: [{ type: Inject, args: [TUI_COPY_TEXTS,] }] }
101
- ];
117
+ }
118
+ TuiDocCopyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCopyComponent, deps: [{ token: TUI_COPY_TEXTS }], target: i0.ɵɵFactoryTarget.Component });
119
+ TuiDocCopyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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:.3s;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:.3s;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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
102
120
  __decorate([
103
121
  tuiPure
104
122
  ], TuiDocCopyComponent.prototype, "copied$", null);
105
- TuiDocCopyComponent = __decorate([
106
- Component({
107
- selector: `tui-doc-copy`,
108
- 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",
109
- changeDetection: ChangeDetectionStrategy.OnPush,
110
- providers: [TuiDestroyService],
111
- styles: [":host{position:relative;display:inline-block;vertical-align:middle}.t-copy{transition-property:background;transition-duration:var(--tui-duration,300ms);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,300ms);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)}"]
112
- }),
113
- __param(0, Inject(TUI_COPY_TEXTS))
114
- ], TuiDocCopyComponent);
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCopyComponent, decorators: [{
124
+ type: Component,
125
+ args: [{
126
+ selector: `tui-doc-copy`,
127
+ templateUrl: `./copy.template.html`,
128
+ styleUrls: [`./copy.style.less`],
129
+ changeDetection: ChangeDetectionStrategy.OnPush,
130
+ providers: [TuiDestroyService],
131
+ }]
132
+ }], ctorParameters: function () { return [{ type: i9.Observable, decorators: [{
133
+ type: Inject,
134
+ args: [TUI_COPY_TEXTS]
135
+ }] }]; }, propDecorators: { copied$: [] } });
115
136
 
116
- let TuiDocCopyModule = class TuiDocCopyModule {
117
- };
118
- TuiDocCopyModule = __decorate([
119
- NgModule({
120
- imports: [CommonModule, TuiButtonModule],
121
- declarations: [TuiDocCopyComponent],
122
- exports: [TuiDocCopyComponent],
123
- })
124
- ], TuiDocCopyModule);
137
+ class TuiDocCopyModule {
138
+ }
139
+ TuiDocCopyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCopyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
140
+ TuiDocCopyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCopyModule, declarations: [TuiDocCopyComponent], imports: [CommonModule, TuiButtonModule], exports: [TuiDocCopyComponent] });
141
+ TuiDocCopyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCopyModule, imports: [[CommonModule, TuiButtonModule]] });
142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCopyModule, decorators: [{
143
+ type: NgModule,
144
+ args: [{
145
+ imports: [CommonModule, TuiButtonModule],
146
+ declarations: [TuiDocCopyComponent],
147
+ exports: [TuiDocCopyComponent],
148
+ }]
149
+ }] });
125
150
 
126
151
  /**
127
152
  * TODO: think about reorganization in @taiga-ui/i18n way
@@ -176,10 +201,8 @@ const TUI_DOC_SOURCE_CODE_TEXT = new InjectionToken(`tui-doc-source-code i18n te
176
201
  factory: () => `Source code`,
177
202
  });
178
203
 
179
- var TuiDocDemoComponent_1;
180
204
  const MIN_COMPONENT_WIDTH = 104;
181
- // @dynamic
182
- let TuiDocDemoComponent = TuiDocDemoComponent_1 = class TuiDocDemoComponent {
205
+ class TuiDocDemoComponent {
183
206
  constructor(isMobile, destroy$, renderer, platformId, locationRef, urlSerializer, texts) {
184
207
  this.isMobile = isMobile;
185
208
  this.destroy$ = destroy$;
@@ -262,64 +285,95 @@ let TuiDocDemoComponent = TuiDocDemoComponent_1 = class TuiDocDemoComponent {
262
285
  if (!this.wrapper) {
263
286
  return;
264
287
  }
265
- this.renderer.setStyle(this.wrapper.nativeElement, `width`, px(Math.max(this.wrapperWidth - delta, MIN_COMPONENT_WIDTH)));
288
+ this.renderer.setStyle(this.wrapper.nativeElement, `width`, tuiPx(Math.max(this.wrapperWidth - delta, MIN_COMPONENT_WIDTH)));
266
289
  }
267
- };
268
- TuiDocDemoComponent.ctorParameters = () => [
269
- { type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_MOBILE,] }] },
270
- { type: TuiDestroyService, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
271
- { type: Renderer2, decorators: [{ type: Inject, args: [Renderer2,] }] },
272
- { type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },
273
- { type: Location$1, decorators: [{ type: Inject, args: [Location$1,] }] },
274
- { type: UrlSerializer, decorators: [{ type: Inject, args: [UrlSerializer,] }] },
275
- { type: Array, decorators: [{ type: Inject, args: [TUI_DOC_DEMO_TEXTS,] }] }
276
- ];
277
- __decorate([
278
- ViewChild(`content`)
279
- ], TuiDocDemoComponent.prototype, "content", void 0);
280
- __decorate([
281
- ViewChild(`wrapper`)
282
- ], TuiDocDemoComponent.prototype, "wrapper", void 0);
283
- __decorate([
284
- ViewChild(`resizerText`)
285
- ], TuiDocDemoComponent.prototype, "resizerText", void 0);
286
- __decorate([
287
- Input()
288
- ], TuiDocDemoComponent.prototype, "control", void 0);
289
- __decorate([
290
- ContentChild(TemplateRef)
291
- ], TuiDocDemoComponent.prototype, "template", void 0);
292
- __decorate([
293
- HostListener(`window:resize`)
294
- ], TuiDocDemoComponent.prototype, "onResize", null);
295
- TuiDocDemoComponent = TuiDocDemoComponent_1 = __decorate([
296
- Component({
297
- selector: `tui-doc-demo`,
298
- 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 [formControl]=\"modeControl\"\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 [formControl]=\"modeControl\"\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 [formControl]=\"modeControl\"\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 [formControl]=\"modeControl\"\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 >\n {{ texts[1] }}\n </tui-checkbox-labeled>\n</div>\n<div\n #wrapper\n class=\"t-wrapper\"\n [class.t-wrapper_dark]=\"modeControl.value === 'onDark'\"\n [class.t-wrapper_gray]=\"modeControl.value === 'onLight'\"\n [class.t-wrapper_transparent]=\"!opaque\"\n>\n <div\n #content\n id=\"demoContent\"\n class=\"t-content\"\n >\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 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 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 class=\"tui-group__auto-width-item\"\n >\n Reset\n </button>\n <button\n tuiButton\n type=\"submit\"\n size=\"s\"\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 <button\n tabindex=\"-1\"\n class=\"t-resizer\"\n (tuiDragStart)=\"onDragStart($event)\"\n (tuiDragContinues)=\"onDragContinues($event)\"\n (tuiDragEnd)=\"onDragEnd()\"\n >\n <span\n #resizerText\n class=\"t-resizer-text\"\n ></span>\n </button>\n</div>\n",
299
- changeDetection: ChangeDetectionStrategy.OnPush,
300
- providers: [
301
- TuiDestroyService,
302
- {
303
- provide: TuiModeDirective,
304
- useExisting: forwardRef(() => TuiDocDemoComponent_1),
305
- },
306
- ],
307
- 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 .5rem 1rem rgba(0,0,0,.16);display:flex;border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m);max-width:100%;min-height:6rem;width:100%;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,300ms);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{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;box-shadow:0 .5rem 1rem rgba(0,0,0,.16);position:relative;width:3.5rem;min-height:inherit;flex-shrink:0;border-left:1px solid var(--tui-base-03);cursor:col-resize;outline:0;background:var(--tui-base-01);color:var(--tui-text-01)}.t-resizer:after,.t-resizer:before{content:'';position:absolute;top:.75rem;left:50%;bottom:.75rem;width:1px;background:var(--tui-base-05)}.t-resizer:before{transform:translateX(.125rem)}.t-resizer:after{transform:translateX(-.1875rem)}: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-checkbox,.t-group{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}}}"]
308
- }),
309
- __param(0, Inject(TUI_IS_MOBILE)),
310
- __param(1, Inject(TuiDestroyService)),
311
- __param(2, Inject(Renderer2)),
312
- __param(3, Inject(PLATFORM_ID)),
313
- __param(4, Inject(Location$1)),
314
- __param(5, Inject(UrlSerializer)),
315
- __param(6, Inject(TUI_DOC_DEMO_TEXTS))
316
- ], TuiDocDemoComponent);
290
+ }
291
+ TuiDocDemoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDemoComponent, deps: [{ token: TUI_IS_MOBILE }, { token: TuiDestroyService }, { token: Renderer2 }, { token: PLATFORM_ID }, { token: Location$1 }, { token: UrlSerializer }, { token: TUI_DOC_DEMO_TEXTS }], target: i0.ɵɵFactoryTarget.Component });
292
+ TuiDocDemoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocDemoComponent, selector: "tui-doc-demo", inputs: { control: "control" }, host: { listeners: { "window:resize": "onResize()" } }, providers: [
293
+ TuiDestroyService,
294
+ {
295
+ provide: TuiModeDirective,
296
+ useExisting: forwardRef(() => TuiDocDemoComponent),
297
+ },
298
+ ], queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }, { propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true }, { propertyName: "resizerText", first: true, predicate: ["resizerText"], descendants: 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 [formControl]=\"modeControl\"\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 [formControl]=\"modeControl\"\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 [formControl]=\"modeControl\"\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 [formControl]=\"modeControl\"\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 >\n {{ texts[1] }}\n </tui-checkbox-labeled>\n</div>\n<div\n #wrapper\n class=\"t-wrapper\"\n [class.t-wrapper_dark]=\"modeControl.value === 'onDark'\"\n [class.t-wrapper_gray]=\"modeControl.value === 'onLight'\"\n [class.t-wrapper_transparent]=\"!opaque\"\n>\n <div\n #content\n id=\"demoContent\"\n class=\"t-content\"\n >\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 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 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 class=\"tui-group__auto-width-item\"\n >\n Reset\n </button>\n <button\n tuiButton\n type=\"submit\"\n size=\"s\"\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 <button\n tabindex=\"-1\"\n class=\"t-resizer\"\n (tuiDragStart)=\"onDragStart($event)\"\n (tuiDragContinues)=\"onDragContinues($event)\"\n (tuiDragEnd)=\"onDragEnd()\"\n >\n <span\n #resizerText\n class=\"t-resizer-text\"\n ></span>\n </button>\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 .5rem 1rem rgba(0,0,0,.16);display:flex;border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m);max-width:100%;min-height:6rem;width:100%;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:.3s;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{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;box-shadow:0 .5rem 1rem rgba(0,0,0,.16);position:relative;width:3.5rem;min-height:inherit;flex-shrink:0;border-left:1px solid var(--tui-base-03);cursor:col-resize;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:.75rem;width:1px;background:var(--tui-base-05)}.t-resizer:before{transform:translate(.125rem)}.t-resizer:after{transform:translate(-.1875rem)}: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: i5.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.TuiHintControllerDirective, selector: "[tuiHintContent]", inputs: ["tuiHintContent", "tuiHintDirection", "tuiHintAppearance", "tuiHintShowDelay", "tuiHintHideDelay"] }, { type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i2$1.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i5$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i5$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.TuiExpandContentDirective, selector: "[tuiExpandContent]" }, { type: i6$1.TuiDragDirective, selector: "[tuiDragStart], [tuiDragContinues], [tuiDragEnd]", outputs: ["tuiDragStart", "tuiDragContinues", "tuiDragEnd"] }], pipes: { "json": i5.JsonPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
299
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDemoComponent, decorators: [{
300
+ type: Component,
301
+ args: [{
302
+ selector: `tui-doc-demo`,
303
+ templateUrl: `./demo.template.html`,
304
+ styleUrls: [`./demo.style.less`],
305
+ changeDetection: ChangeDetectionStrategy.OnPush,
306
+ providers: [
307
+ TuiDestroyService,
308
+ {
309
+ provide: TuiModeDirective,
310
+ useExisting: forwardRef(() => TuiDocDemoComponent),
311
+ },
312
+ ],
313
+ }]
314
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
315
+ type: Inject,
316
+ args: [TUI_IS_MOBILE]
317
+ }] }, { type: i6$1.TuiDestroyService, decorators: [{
318
+ type: Inject,
319
+ args: [TuiDestroyService]
320
+ }] }, { type: i0.Renderer2, decorators: [{
321
+ type: Inject,
322
+ args: [Renderer2]
323
+ }] }, { type: undefined, decorators: [{
324
+ type: Inject,
325
+ args: [PLATFORM_ID]
326
+ }] }, { type: i5.Location, decorators: [{
327
+ type: Inject,
328
+ args: [Location$1]
329
+ }] }, { type: i6.UrlSerializer, decorators: [{
330
+ type: Inject,
331
+ args: [UrlSerializer]
332
+ }] }, { type: undefined, decorators: [{
333
+ type: Inject,
334
+ args: [TUI_DOC_DEMO_TEXTS]
335
+ }] }]; }, propDecorators: { content: [{
336
+ type: ViewChild,
337
+ args: [`content`]
338
+ }], wrapper: [{
339
+ type: ViewChild,
340
+ args: [`wrapper`]
341
+ }], resizerText: [{
342
+ type: ViewChild,
343
+ args: [`resizerText`]
344
+ }], control: [{
345
+ type: Input
346
+ }], template: [{
347
+ type: ContentChild,
348
+ args: [TemplateRef]
349
+ }], onResize: [{
350
+ type: HostListener,
351
+ args: [`window:resize`]
352
+ }] } });
317
353
 
318
- let TuiDocDemoModule = class TuiDocDemoModule {
319
- };
320
- TuiDocDemoModule = __decorate([
321
- NgModule({
322
- imports: [
354
+ class TuiDocDemoModule {
355
+ }
356
+ TuiDocDemoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDemoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
357
+ TuiDocDemoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDemoModule, declarations: [TuiDocDemoComponent], imports: [CommonModule,
358
+ ReactiveFormsModule,
359
+ FormsModule,
360
+ RouterModule,
361
+ TuiLinkModule,
362
+ TuiDragModule,
363
+ TuiButtonModule,
364
+ TuiSelectModule,
365
+ TuiExpandModule,
366
+ TuiGroupModule,
367
+ TuiTooltipModule,
368
+ TuiModeModule,
369
+ TuiRadioBlockModule,
370
+ TuiCheckboxLabeledModule,
371
+ TuiSvgModule,
372
+ TuiDataListWrapperModule,
373
+ TuiDataListModule,
374
+ TuiTextfieldControllerModule,
375
+ TuiHintControllerModule], exports: [TuiDocDemoComponent] });
376
+ TuiDocDemoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDemoModule, imports: [[
323
377
  CommonModule,
324
378
  ReactiveFormsModule,
325
379
  FormsModule,
@@ -339,38 +393,35 @@ TuiDocDemoModule = __decorate([
339
393
  TuiDataListModule,
340
394
  TuiTextfieldControllerModule,
341
395
  TuiHintControllerModule,
342
- ],
343
- declarations: [TuiDocDemoComponent],
344
- exports: [TuiDocDemoComponent],
345
- })
346
- ], TuiDocDemoModule);
347
-
348
- /**
349
- * TODO: duplicate, need fix it before v3
350
- * TODO: move another package for reuse between addon-editor and addon-doc
351
- * @deprecated: use {@link tuiRgbToHex} instead
352
- */
353
- // eslint-disable-next-line @typescript-eslint/naming-convention
354
- function rgbToHex(r, g, b) {
355
- return `#${[r, g, b].map(x => x.toString(16).padStart(2, `0`)).join(``)}`;
356
- }
357
- const tuiRgbToHex = rgbToHex;
358
- /**
359
- * @deprecated: use {@link tuiHexToRgb} instead
360
- */
361
- // eslint-disable-next-line @typescript-eslint/naming-convention
362
- function hexToRgb(hex) {
363
- const matches = hex
364
- .replace(`#`, ``)
365
- .split(``)
366
- .map((char, _, array) => (array.length === 3 ? char + char : char))
367
- .join(``)
368
- .match(/.{2}/g);
369
- return matches
370
- ? matches.map(x => Number.parseInt(x, 16))
371
- : [0, 0, 0];
372
- }
373
- const tuiHexToRgb = hexToRgb;
396
+ ]] });
397
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDemoModule, decorators: [{
398
+ type: NgModule,
399
+ args: [{
400
+ imports: [
401
+ CommonModule,
402
+ ReactiveFormsModule,
403
+ FormsModule,
404
+ RouterModule,
405
+ TuiLinkModule,
406
+ TuiDragModule,
407
+ TuiButtonModule,
408
+ TuiSelectModule,
409
+ TuiExpandModule,
410
+ TuiGroupModule,
411
+ TuiTooltipModule,
412
+ TuiModeModule,
413
+ TuiRadioBlockModule,
414
+ TuiCheckboxLabeledModule,
415
+ TuiSvgModule,
416
+ TuiDataListWrapperModule,
417
+ TuiDataListModule,
418
+ TuiTextfieldControllerModule,
419
+ TuiHintControllerModule,
420
+ ],
421
+ declarations: [TuiDocDemoComponent],
422
+ exports: [TuiDocDemoComponent],
423
+ }]
424
+ }] });
374
425
 
375
426
  function inspectArray(array, depth) {
376
427
  if (depth === 0) {
@@ -385,7 +436,7 @@ function inspectArray(array, depth) {
385
436
  else {
386
437
  result += `, `;
387
438
  }
388
- result += index in array ? inspectAny(array[index], depth - 1) : `empty`;
439
+ result += index in array ? tuiInspectAny(array[index], depth - 1) : `empty`;
389
440
  }
390
441
  return `[${result}]`;
391
442
  }
@@ -405,19 +456,17 @@ function inspectObject(object, depth) {
405
456
  else {
406
457
  result += `, `;
407
458
  }
408
- result += `${key}: ${inspectAny(object[key], depth - 1)}`;
459
+ result += `${key}: ${tuiInspectAny(object[key], depth - 1)}`;
409
460
  }
410
461
  return `{${result}}`;
411
462
  }
412
463
  /**
413
- * @deprecated: use {@link tuiInspectAny} instead
414
464
  * Returns readable JS entity
415
465
  * @param data
416
466
  * @param depth
417
467
  * @return readable JS entity
418
468
  */
419
- // eslint-disable-next-line @typescript-eslint/naming-convention
420
- function inspectAny(data, depth) {
469
+ function tuiInspectAny(data, depth) {
421
470
  if (data === null) {
422
471
  return `null`;
423
472
  }
@@ -438,13 +487,8 @@ function inspectAny(data, depth) {
438
487
  }
439
488
  return inspectObject(data, depth);
440
489
  }
441
- const tuiInspectAny = inspectAny;
442
490
 
443
- /**
444
- * @deprecated: use {@link tuiCoerceValue} instead
445
- */
446
- // eslint-disable-next-line @typescript-eslint/naming-convention
447
- function coerceValue(value) {
491
+ function tuiCoerceValue(value) {
448
492
  const prepared = String(value).trim();
449
493
  if (isEmptyParamValue(prepared)) {
450
494
  return null;
@@ -465,7 +509,6 @@ function coerceValue(value) {
465
509
  return decodedValue;
466
510
  }
467
511
  }
468
- const tuiCoerceValue = coerceValue;
469
512
  function isEmptyParamValue(value) {
470
513
  return [`undefined`, `null`, `NaN`, `Infinity`].includes(value);
471
514
  }
@@ -486,7 +529,7 @@ function isPossibleObject(value) {
486
529
 
487
530
  const SERIALIZED_SUFFIX = `$`;
488
531
  // @bad TODO: refactor output and value sync
489
- let TuiDocDocumentationPropertyConnectorDirective = class TuiDocDocumentationPropertyConnectorDirective {
532
+ class TuiDocDocumentationPropertyConnectorDirective {
490
533
  constructor(template, locationRef, activatedRoute, urlSerializer) {
491
534
  this.template = template;
492
535
  this.locationRef = locationRef;
@@ -543,7 +586,7 @@ let TuiDocDocumentationPropertyConnectorDirective = class TuiDocDocumentationPro
543
586
  }
544
587
  const value = !!propertyValueWithSuffix && this.documentationPropertyValues
545
588
  ? this.documentationPropertyValues[propertyValueWithSuffix]
546
- : coerceValue(propertyValue);
589
+ : tuiCoerceValue(propertyValue);
547
590
  this.onValueChange(value);
548
591
  }
549
592
  setQueryParam(value) {
@@ -557,49 +600,75 @@ let TuiDocDocumentationPropertyConnectorDirective = class TuiDocDocumentationPro
557
600
  tree.queryParams = Object.assign(Object.assign({}, tree.queryParams), { [propName]: computedValue });
558
601
  this.locationRef.go(String(tree));
559
602
  }
560
- };
561
- TuiDocDocumentationPropertyConnectorDirective.ctorParameters = () => [
562
- { type: TemplateRef, decorators: [{ type: Inject, args: [TemplateRef,] }] },
563
- { type: Location$1, decorators: [{ type: Inject, args: [Location$1,] }] },
564
- { type: ActivatedRoute, decorators: [{ type: Inject, args: [ActivatedRoute,] }] },
565
- { type: UrlSerializer, decorators: [{ type: Inject, args: [UrlSerializer,] }] }
566
- ];
567
- __decorate([
568
- Input()
569
- ], TuiDocDocumentationPropertyConnectorDirective.prototype, "documentationPropertyName", void 0);
570
- __decorate([
571
- Input()
572
- ], TuiDocDocumentationPropertyConnectorDirective.prototype, "documentationPropertyMode", void 0);
573
- __decorate([
574
- Input()
575
- ], TuiDocDocumentationPropertyConnectorDirective.prototype, "documentationPropertyType", void 0);
576
- __decorate([
577
- Input()
578
- ], TuiDocDocumentationPropertyConnectorDirective.prototype, "documentationPropertyValue", void 0);
579
- __decorate([
580
- Input()
581
- ], TuiDocDocumentationPropertyConnectorDirective.prototype, "documentationPropertyDeprecated", void 0);
582
- __decorate([
583
- Input()
584
- ], TuiDocDocumentationPropertyConnectorDirective.prototype, "documentationPropertyValues", void 0);
585
- __decorate([
586
- Output()
587
- ], TuiDocDocumentationPropertyConnectorDirective.prototype, "documentationPropertyValueChange", void 0);
588
- TuiDocDocumentationPropertyConnectorDirective = __decorate([
589
- Directive({
590
- selector: `ng-template[documentationPropertyName]`,
591
- exportAs: `documentationProperty`,
592
- }),
593
- __param(0, Inject(TemplateRef)),
594
- __param(1, Inject(Location$1)),
595
- __param(2, Inject(ActivatedRoute)),
596
- __param(3, Inject(UrlSerializer))
597
- ], TuiDocDocumentationPropertyConnectorDirective);
603
+ }
604
+ TuiDocDocumentationPropertyConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDocumentationPropertyConnectorDirective, deps: [{ token: TemplateRef }, { token: Location$1 }, { token: ActivatedRoute }, { token: UrlSerializer }], target: i0.ɵɵFactoryTarget.Directive });
605
+ TuiDocDocumentationPropertyConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", 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 });
606
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDocumentationPropertyConnectorDirective, decorators: [{
607
+ type: Directive,
608
+ args: [{
609
+ selector: `ng-template[documentationPropertyName]`,
610
+ exportAs: `documentationProperty`,
611
+ }]
612
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
613
+ type: Inject,
614
+ args: [TemplateRef]
615
+ }] }, { type: i5.Location, decorators: [{
616
+ type: Inject,
617
+ args: [Location$1]
618
+ }] }, { type: i6.ActivatedRoute, decorators: [{
619
+ type: Inject,
620
+ args: [ActivatedRoute]
621
+ }] }, { type: i6.UrlSerializer, decorators: [{
622
+ type: Inject,
623
+ args: [UrlSerializer]
624
+ }] }]; }, propDecorators: { documentationPropertyName: [{
625
+ type: Input
626
+ }], documentationPropertyMode: [{
627
+ type: Input
628
+ }], documentationPropertyType: [{
629
+ type: Input
630
+ }], documentationPropertyValue: [{
631
+ type: Input
632
+ }], documentationPropertyDeprecated: [{
633
+ type: Input
634
+ }], documentationPropertyValues: [{
635
+ type: Input
636
+ }], documentationPropertyValueChange: [{
637
+ type: Output
638
+ }] } });
639
+
640
+ class TuiInputOpacityDirective {
641
+ constructor(renderer, tuiFocusableComponent) {
642
+ this.renderer = renderer;
643
+ this.tuiFocusableComponent = tuiFocusableComponent;
644
+ }
645
+ set tuiInputOpacity(opacity) {
646
+ const { nativeFocusableElement } = this.tuiFocusableComponent;
647
+ if (nativeFocusableElement) {
648
+ this.renderer.setStyle(nativeFocusableElement, `opacity`, opacity / 100);
649
+ }
650
+ }
651
+ }
652
+ TuiInputOpacityDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputOpacityDirective, deps: [{ token: Renderer2 }, { token: TUI_FOCUSABLE_ITEM_ACCESSOR }], target: i0.ɵɵFactoryTarget.Directive });
653
+ TuiInputOpacityDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiInputOpacityDirective, selector: "[tuiInputOpacity]", inputs: { tuiInputOpacity: "tuiInputOpacity" }, ngImport: i0 });
654
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputOpacityDirective, decorators: [{
655
+ type: Directive,
656
+ args: [{
657
+ selector: `[tuiInputOpacity]`,
658
+ }]
659
+ }], ctorParameters: function () { return [{ type: i0.Renderer2, decorators: [{
660
+ type: Inject,
661
+ args: [Renderer2]
662
+ }] }, { type: undefined, decorators: [{
663
+ type: Inject,
664
+ args: [TUI_FOCUSABLE_ITEM_ACCESSOR]
665
+ }] }]; }, propDecorators: { tuiInputOpacity: [{
666
+ type: Input
667
+ }] } });
598
668
 
599
669
  // @bad TODO subscribe propertiesConnectors changes
600
670
  // @bad TODO refactor to make more flexible
601
- // @dynamic
602
- let TuiDocDocumentationComponent = class TuiDocDocumentationComponent {
671
+ class TuiDocDocumentationComponent {
603
672
  constructor(changeDetectorRef, texts) {
604
673
  this.changeDetectorRef = changeDetectorRef;
605
674
  this.texts = texts;
@@ -610,8 +679,8 @@ let TuiDocDocumentationComponent = class TuiDocDocumentationComponent {
610
679
  this.activeItemIndex = 0;
611
680
  }
612
681
  ngAfterContentInit() {
613
- itemsQueryListObservable(this.propertiesConnectors)
614
- .pipe(switchMap(items => merge(...items.map(({ changed$ }) => changed$))), watch(this.changeDetectorRef))
682
+ tuiItemsQueryListObservable(this.propertiesConnectors)
683
+ .pipe(switchMap(items => merge(...items.map(({ changed$ }) => changed$))), tuiWatch(this.changeDetectorRef))
615
684
  .subscribe();
616
685
  }
617
686
  get type() {
@@ -638,7 +707,7 @@ let TuiDocDocumentationComponent = class TuiDocDocumentationComponent {
638
707
  .replace(` `, ``)
639
708
  .split(`,`)
640
709
  .map(v => Number.parseInt(v, 10));
641
- return rgbToHex(...parsed);
710
+ return tuiRgbToHex(...parsed);
642
711
  }
643
712
  getOpacity(color) {
644
713
  if (color.startsWith(`#`) || color.startsWith(`rgb(`)) {
@@ -661,13 +730,13 @@ let TuiDocDocumentationComponent = class TuiDocDocumentationComponent {
661
730
  connector.onValueChange(color);
662
731
  return;
663
732
  }
664
- const rgb = hexToRgb(color).join(`, `);
733
+ const rgb = tuiHexToRgb(color).join(`, `);
665
734
  const result = `rgba(${rgb}, ${opacity / 100})`;
666
735
  connector.onValueChange(result);
667
736
  }
668
737
  onOpacityChange(connector, opacity) {
669
738
  const hex = this.getColor(connector.documentationPropertyValue || ``);
670
- const rgb = hexToRgb(hex);
739
+ const rgb = tuiHexToRgb(hex);
671
740
  const result = `rgba(${rgb}, ${opacity / 100})`;
672
741
  connector.onValueChange(result);
673
742
  }
@@ -678,7 +747,7 @@ let TuiDocDocumentationComponent = class TuiDocDocumentationComponent {
678
747
  return name.includes(`?`);
679
748
  }
680
749
  isPrimitivePolymorpheusContent(value) {
681
- return typeof value === `string` || typeof value === `number`;
750
+ return tuiIsString(value) || tuiIsNumber(value);
682
751
  }
683
752
  showCleaner(type) {
684
753
  return type.includes(`null`);
@@ -687,82 +756,83 @@ let TuiDocDocumentationComponent = class TuiDocDocumentationComponent {
687
756
  return type.includes(`PolymorpheusContent`);
688
757
  }
689
758
  inspectAny(data) {
690
- return inspectAny(data, 2);
691
- }
692
- };
693
- TuiDocDocumentationComponent.ctorParameters = () => [
694
- { type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
695
- { type: Array, decorators: [{ type: Inject, args: [TUI_DOC_DOCUMENTATION_TEXTS,] }] }
696
- ];
697
- __decorate([
698
- Input()
699
- ], TuiDocDocumentationComponent.prototype, "heading", void 0);
700
- __decorate([
701
- Input()
702
- ], TuiDocDocumentationComponent.prototype, "showValues", void 0);
703
- __decorate([
704
- Input()
705
- ], TuiDocDocumentationComponent.prototype, "isAPI", void 0);
706
- __decorate([
707
- ContentChildren(TuiDocDocumentationPropertyConnectorDirective)
708
- ], TuiDocDocumentationComponent.prototype, "propertiesConnectors", void 0);
709
- TuiDocDocumentationComponent = __decorate([
710
- Component({
711
- selector: `tui-doc-documentation`,
712
- template: "<h1\n *ngIf=\"heading\"\n class=\"t-heading\"\n>\n {{ heading }}\n</h1>\n<ng-content></ng-content>\n<table class=\"t-table\">\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-cell_value\"\n >\n {{ texts[3] }}\n </th>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of propertiesConnectors\"\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 {{ stripOptional(propertyConnector.attrName) }}\n <tui-badge\n *ngIf=\"isOptional(propertyConnector.attrName)\"\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=\"showContentTooltip(propertyConnector.documentationPropertyType)\"\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 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\"\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]=\"showCleaner(propertyConnector.documentationPropertyType)\"\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>{{ inspectAny(data) }}</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 tuiTextfieldType=\"text\"\n tuiTextfieldSize=\"m\"\n [attr.id]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiInputOpacity]=\"getOpacity(propertyConnector.documentationPropertyValue)\"\n [value]=\"getColor(propertyConnector.documentationPropertyValue)\"\n (valueChange)=\"onColorChange(propertyConnector, $event)\"\n ></tui-primitive-textfield>\n <tui-input-count\n tuiTextfieldSize=\"m\"\n [max]=\"100\"\n [ngModel]=\"getOpacity(propertyConnector.documentationPropertyValue)\"\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=\"isPrimitivePolymorpheusContent(propertyConnector.documentationPropertyValue)\"\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",
713
- changeDetection: ChangeDetectionStrategy.OnPush,
714
- animations: [
715
- trigger(`emitEvent`, [
716
- transition(`:increment`, [style({ opacity: 1 }), animate(`500ms ease-in`)]),
717
- ]),
718
- ],
719
- 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;text-align:right}.t-cell_prop{width:40%}.t-cell_value{max-width:20rem}:host-context(tui-root._mobile) .t-cell_value{width:9.375rem}: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:400;text-align:left}.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:-moz-max-content;width:max-content}.t-output{text-align:left;opacity:0}.t-heading{font:var(--tui-font-heading-4)}"]
720
- }),
721
- __param(0, Inject(ChangeDetectorRef)),
722
- __param(1, Inject(TUI_DOC_DOCUMENTATION_TEXTS))
723
- ], TuiDocDocumentationComponent);
724
-
725
- let TuiInputOpacityDirective = class TuiInputOpacityDirective {
726
- constructor(renderer, tuiFocusableComponent) {
727
- this.renderer = renderer;
728
- this.tuiFocusableComponent = tuiFocusableComponent;
759
+ return tuiInspectAny(data, 2);
729
760
  }
730
- set tuiInputOpacity(opacity) {
731
- const { nativeFocusableElement } = this.tuiFocusableComponent;
732
- if (nativeFocusableElement) {
733
- this.renderer.setStyle(nativeFocusableElement, `opacity`, opacity / 100);
734
- }
735
- }
736
- };
737
- TuiInputOpacityDirective.ctorParameters = () => [
738
- { type: Renderer2, decorators: [{ type: Inject, args: [Renderer2,] }] },
739
- { type: undefined, decorators: [{ type: Inject, args: [TUI_FOCUSABLE_ITEM_ACCESSOR,] }] }
740
- ];
741
- __decorate([
742
- Input()
743
- ], TuiInputOpacityDirective.prototype, "tuiInputOpacity", null);
744
- TuiInputOpacityDirective = __decorate([
745
- Directive({
746
- selector: `[tuiInputOpacity]`,
747
- }),
748
- __param(0, Inject(Renderer2)),
749
- __param(1, Inject(TUI_FOCUSABLE_ITEM_ACCESSOR))
750
- ], TuiInputOpacityDirective);
761
+ }
762
+ TuiDocDocumentationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDocumentationComponent, deps: [{ token: ChangeDetectorRef }, { token: TUI_DOC_DOCUMENTATION_TEXTS }], target: i0.ɵɵFactoryTarget.Component });
763
+ TuiDocDocumentationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocDocumentationComponent, selector: "tui-doc-documentation", inputs: { heading: "heading", showValues: "showValues", isAPI: "isAPI" }, 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<table class=\"t-table\">\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-cell_value\"\n >\n {{ texts[3] }}\n </th>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of propertiesConnectors\"\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 {{ stripOptional(propertyConnector.attrName) }}\n <tui-badge\n *ngIf=\"isOptional(propertyConnector.attrName)\"\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=\"showContentTooltip(propertyConnector.documentationPropertyType)\"\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 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\"\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]=\"showCleaner(propertyConnector.documentationPropertyType)\"\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>{{ inspectAny(data) }}</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 tuiTextfieldType=\"text\"\n tuiTextfieldSize=\"m\"\n [attr.id]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiInputOpacity]=\"getOpacity(propertyConnector.documentationPropertyValue)\"\n [value]=\"getColor(propertyConnector.documentationPropertyValue)\"\n (valueChange)=\"onColorChange(propertyConnector, $event)\"\n ></tui-primitive-textfield>\n <tui-input-count\n tuiTextfieldSize=\"m\"\n [max]=\"100\"\n [ngModel]=\"getOpacity(propertyConnector.documentationPropertyValue)\"\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=\"isPrimitivePolymorpheusContent(propertyConnector.documentationPropertyValue)\"\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", 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;text-align:right}.t-cell_prop{width:40%}.t-cell_value{max-width:20rem}:host-context(tui-root._mobile) .t-cell_value{width:9.375rem}: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-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:-moz-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: i1.TuiInputCountComponent, selector: "tui-input-count", inputs: ["step", "min", "max", "hideButtons", "prefix", "postfix"] }, { type: i2$1.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "status"], outputs: ["close"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.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]", inputs: ["tuiDropdownAlign", "tuiDropdownDirection", "tuiDropdownLimitWidth", "tuiDropdownMinHeight", "tuiDropdownMaxHeight"] }, { type: i2$1.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { type: i2$1.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5$1.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: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5.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: i2$1.TuiTextfieldTypeDirective, selector: "[tuiTextfieldType]", inputs: ["tuiTextfieldType"] }, { type: TuiInputOpacityDirective, selector: "[tuiInputOpacity]", inputs: ["tuiInputOpacity"] }, { type: i1.TuiInputCountDirective, selector: "tui-input-count" }], pipes: { "async": i5.AsyncPipe }, animations: [
764
+ trigger(`emitEvent`, [
765
+ transition(`:increment`, [style({ opacity: 1 }), animate(`500ms ease-in`)]),
766
+ ]),
767
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
768
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDocumentationComponent, decorators: [{
769
+ type: Component,
770
+ args: [{
771
+ selector: `tui-doc-documentation`,
772
+ templateUrl: `./documentation.template.html`,
773
+ styleUrls: [`./documentation.style.less`],
774
+ changeDetection: ChangeDetectionStrategy.OnPush,
775
+ animations: [
776
+ trigger(`emitEvent`, [
777
+ transition(`:increment`, [style({ opacity: 1 }), animate(`500ms ease-in`)]),
778
+ ]),
779
+ ],
780
+ }]
781
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef, decorators: [{
782
+ type: Inject,
783
+ args: [ChangeDetectorRef]
784
+ }] }, { type: undefined, decorators: [{
785
+ type: Inject,
786
+ args: [TUI_DOC_DOCUMENTATION_TEXTS]
787
+ }] }]; }, propDecorators: { heading: [{
788
+ type: Input
789
+ }], showValues: [{
790
+ type: Input
791
+ }], isAPI: [{
792
+ type: Input
793
+ }], propertiesConnectors: [{
794
+ type: ContentChildren,
795
+ args: [TuiDocDocumentationPropertyConnectorDirective]
796
+ }] } });
751
797
 
752
- let TuiInputOpacityModule = class TuiInputOpacityModule {
753
- };
754
- TuiInputOpacityModule = __decorate([
755
- NgModule({
756
- declarations: [TuiInputOpacityDirective],
757
- exports: [TuiInputOpacityDirective],
758
- })
759
- ], TuiInputOpacityModule);
798
+ class TuiInputOpacityModule {
799
+ }
800
+ TuiInputOpacityModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputOpacityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
801
+ TuiInputOpacityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputOpacityModule, declarations: [TuiInputOpacityDirective], exports: [TuiInputOpacityDirective] });
802
+ TuiInputOpacityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputOpacityModule });
803
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputOpacityModule, decorators: [{
804
+ type: NgModule,
805
+ args: [{
806
+ declarations: [TuiInputOpacityDirective],
807
+ exports: [TuiInputOpacityDirective],
808
+ }]
809
+ }] });
760
810
 
761
- let TuiDocDocumentationModule = class TuiDocDocumentationModule {
762
- };
763
- TuiDocDocumentationModule = __decorate([
764
- NgModule({
765
- imports: [
811
+ class TuiDocDocumentationModule {
812
+ }
813
+ TuiDocDocumentationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDocumentationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
814
+ TuiDocDocumentationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDocumentationModule, declarations: [TuiDocDocumentationComponent,
815
+ TuiDocDocumentationPropertyConnectorDirective], imports: [CommonModule,
816
+ FormsModule,
817
+ RouterModule,
818
+ TuiBadgeModule,
819
+ TuiSelectModule,
820
+ TuiToggleModule,
821
+ TuiTooltipModule,
822
+ TuiLinkModule,
823
+ TuiInputCountModule,
824
+ TuiModeModule,
825
+ TuiGroupModule,
826
+ TuiInputOpacityModule,
827
+ TuiPrimitiveTextfieldModule,
828
+ TuiTextfieldControllerModule,
829
+ TuiHintControllerModule,
830
+ TuiDropdownModule,
831
+ TuiDataListModule,
832
+ TuiDataListWrapperModule,
833
+ TuiNotificationModule], exports: [TuiDocDocumentationComponent,
834
+ TuiDocDocumentationPropertyConnectorDirective] });
835
+ TuiDocDocumentationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDocumentationModule, imports: [[
766
836
  CommonModule,
767
837
  FormsModule,
768
838
  RouterModule,
@@ -778,21 +848,45 @@ TuiDocDocumentationModule = __decorate([
778
848
  TuiPrimitiveTextfieldModule,
779
849
  TuiTextfieldControllerModule,
780
850
  TuiHintControllerModule,
781
- TuiDropdownControllerModule,
851
+ TuiDropdownModule,
782
852
  TuiDataListModule,
783
853
  TuiDataListWrapperModule,
784
854
  TuiNotificationModule,
785
- ],
786
- declarations: [
787
- TuiDocDocumentationComponent,
788
- TuiDocDocumentationPropertyConnectorDirective,
789
- ],
790
- exports: [
791
- TuiDocDocumentationComponent,
792
- TuiDocDocumentationPropertyConnectorDirective,
793
- ],
794
- })
795
- ], TuiDocDocumentationModule);
855
+ ]] });
856
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDocumentationModule, decorators: [{
857
+ type: NgModule,
858
+ args: [{
859
+ imports: [
860
+ CommonModule,
861
+ FormsModule,
862
+ RouterModule,
863
+ TuiBadgeModule,
864
+ TuiSelectModule,
865
+ TuiToggleModule,
866
+ TuiTooltipModule,
867
+ TuiLinkModule,
868
+ TuiInputCountModule,
869
+ TuiModeModule,
870
+ TuiGroupModule,
871
+ TuiInputOpacityModule,
872
+ TuiPrimitiveTextfieldModule,
873
+ TuiTextfieldControllerModule,
874
+ TuiHintControllerModule,
875
+ TuiDropdownModule,
876
+ TuiDataListModule,
877
+ TuiDataListWrapperModule,
878
+ TuiNotificationModule,
879
+ ],
880
+ declarations: [
881
+ TuiDocDocumentationComponent,
882
+ TuiDocDocumentationPropertyConnectorDirective,
883
+ ],
884
+ exports: [
885
+ TuiDocDocumentationComponent,
886
+ TuiDocDocumentationPropertyConnectorDirective,
887
+ ],
888
+ }]
889
+ }] });
796
890
 
797
891
  const TUI_DOC_CODE_ACTIONS = new InjectionToken(`Code actions for the opened tab with code example`, {
798
892
  factory: () => ``,
@@ -802,30 +896,47 @@ const TUI_DOC_CODE_EDITOR = new InjectionToken(`Contains service for opening onl
802
896
 
803
897
  const TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new InjectionToken(`Processes content in example`, { factory: () => identity });
804
898
 
805
- /**
806
- * @deprecated: use {@link tuiRawLoadRecord} instead
807
- */
808
- // eslint-disable-next-line @typescript-eslint/naming-convention
809
- function rawLoadRecord(example) {
899
+ function tuiRawLoadRecord(example) {
810
900
  return __awaiter(this, void 0, void 0, function* () {
811
901
  const processedContent = {};
812
902
  for (const [key, content] of Object.entries(example)) {
813
903
  if (content) {
814
- processedContent[key] = yield rawLoad(content);
904
+ processedContent[key] = yield tuiRawLoad(content);
815
905
  }
816
906
  }
817
907
  return processedContent;
818
908
  });
819
909
  }
820
- const tuiRawLoadRecord = rawLoadRecord;
821
910
 
822
- // Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
823
- // @dynamic
824
- let TuiDocExampleComponent = class TuiDocExampleComponent {
825
- constructor(id, clipboard, notifications, location, copyTexts$, texts, codeEditor, processContent, isCypress, codeActions, router, route, ngLocation) {
911
+ class TuiDocExampleCapitalizePipe {
912
+ transform(content) {
913
+ return tuiIsString(content) ? tuiCapitalizeFirstLetter(content) : content;
914
+ }
915
+ }
916
+ TuiDocExampleCapitalizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleCapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
917
+ TuiDocExampleCapitalizePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleCapitalizePipe, name: "tuiDocExampleCapitalize" });
918
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleCapitalizePipe, decorators: [{
919
+ type: Pipe,
920
+ args: [{ name: `tuiDocExampleCapitalize` }]
921
+ }] });
922
+
923
+ class TuiDocExampleGetTabsPipe {
924
+ transform(content, defaultTab) {
925
+ return [defaultTab, ...Object.keys(content)];
926
+ }
927
+ }
928
+ TuiDocExampleGetTabsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleGetTabsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
929
+ TuiDocExampleGetTabsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleGetTabsPipe, name: "tuiDocExampleGetTabs" });
930
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleGetTabsPipe, decorators: [{
931
+ type: Pipe,
932
+ args: [{ name: `tuiDocExampleGetTabs` }]
933
+ }] });
934
+
935
+ class TuiDocExampleComponent {
936
+ constructor(id, clipboard, alertService, location, copyTexts$, texts, codeEditor, processContent, isCypress, codeActions, router, route, ngLocation) {
826
937
  this.id = id;
827
938
  this.clipboard = clipboard;
828
- this.notifications = notifications;
939
+ this.alertService = alertService;
829
940
  this.location = location;
830
941
  this.copyTexts$ = copyTexts$;
831
942
  this.texts = texts;
@@ -844,7 +955,7 @@ let TuiDocExampleComponent = class TuiDocExampleComponent {
844
955
  this.defaultTab = this.texts[this.defaultTabIndex];
845
956
  this.activeItemIndex = this.defaultTabIndex;
846
957
  this.copy$ = this.copyTexts$.pipe(map(([copy]) => copy));
847
- this.processor$ = this.rawLoader$$.pipe(switchMap(rawLoadRecord), map(value => this.processContent(value)));
958
+ this.processor$ = this.rawLoader$$.pipe(switchMap(tuiRawLoadRecord), map(value => this.processContent(value)));
848
959
  this.loading$ = new Subject();
849
960
  }
850
961
  set content(content) {
@@ -858,17 +969,17 @@ let TuiDocExampleComponent = class TuiDocExampleComponent {
858
969
  const url = `${currentUrl}#${this.id}`;
859
970
  this.setFragmentWithoutRedirect(this.id);
860
971
  this.clipboard.copy(url);
861
- this.notifications
862
- .show(this.texts[1], {
972
+ this.alertService
973
+ .open(this.texts[1], {
863
974
  label: this.texts[2],
864
975
  status: "success" /* Success */,
865
976
  })
866
977
  .subscribe();
867
978
  }
868
979
  edit(files) {
869
- var _a, _b;
980
+ var _a;
870
981
  this.loading$.next(true);
871
- (_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName, (_b = this.id) !== null && _b !== void 0 ? _b : ``, files).finally(() => this.loading$.next(false));
982
+ (_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName, this.id || ``, files).finally(() => this.loading$.next(false));
872
983
  }
873
984
  setFragmentWithoutRedirect(id) {
874
985
  const url = this.router
@@ -876,80 +987,83 @@ let TuiDocExampleComponent = class TuiDocExampleComponent {
876
987
  .toString();
877
988
  this.ngLocation.go(url);
878
989
  }
879
- };
880
- TuiDocExampleComponent.ctorParameters = () => [
881
- { type: String, decorators: [{ type: Attribute, args: [`id`,] }] },
882
- { type: Clipboard, decorators: [{ type: Inject, args: [Clipboard,] }] },
883
- { type: TuiNotificationsService, decorators: [{ type: Inject, args: [TuiNotificationsService,] }] },
884
- { type: Location, decorators: [{ type: Inject, args: [LOCATION,] }] },
885
- { type: Observable, decorators: [{ type: Inject, args: [TUI_COPY_TEXTS,] }] },
886
- { type: Array, decorators: [{ type: Inject, args: [TUI_DOC_EXAMPLE_TEXTS,] }] },
887
- { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [TUI_DOC_CODE_EDITOR,] }] },
888
- { type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_EXAMPLE_CONTENT_PROCESSOR,] }] },
889
- { type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_CYPRESS,] }] },
890
- { type: Array, decorators: [{ type: Inject, args: [TUI_DOC_CODE_ACTIONS,] }] },
891
- { type: Router, decorators: [{ type: Inject, args: [Router,] }] },
892
- { type: ActivatedRoute, decorators: [{ type: Inject, args: [ActivatedRoute,] }] },
893
- { type: Location$1, decorators: [{ type: Inject, args: [Location$1,] }] }
894
- ];
895
- __decorate([
896
- Input()
897
- ], TuiDocExampleComponent.prototype, "heading", void 0);
898
- __decorate([
899
- Input()
900
- ], TuiDocExampleComponent.prototype, "description", void 0);
901
- __decorate([
902
- Input()
903
- ], TuiDocExampleComponent.prototype, "content", null);
904
- __decorate([
905
- Input()
906
- ], TuiDocExampleComponent.prototype, "componentName", void 0);
907
- TuiDocExampleComponent = __decorate([
908
- Component({
909
- selector: `tui-doc-example`,
910
- template: "<h3\n *ngIf=\"heading\"\n class=\"t-title\"\n>\n <span\n polymorpheus-outlet\n [content]=\"heading | tuiDocExampleCapitalize\"\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 polymorpheus-outlet\n class=\"t-description\"\n [content]=\"description | tuiDocExampleCapitalize\"\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 *tuiTab\n tuiTab\n >\n {{ tab }}\n </button>\n </ng-container>\n </tui-tabs-with-more>\n\n <button\n *ngIf=\"codeEditor\"\n tuiButton\n appearance=\"flat\"\n size=\"s\"\n [showLoader]=\"!!(loading$ | async)\"\n (click)=\"edit(files)\"\n >\n Edit on {{ codeEditor.name }}\n </button>\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 <div\n polymorpheus-outlet\n [content]=\"action\"\n [context]=\"{$implicit: code}\"\n ></div>\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",
911
- changeDetection: ChangeDetectionStrategy.OnPush,
912
- 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:400;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 rgba(0,0,0,.1)}: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:0.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}"]
913
- }),
914
- __param(0, Attribute(`id`)),
915
- __param(1, Inject(Clipboard)),
916
- __param(2, Inject(TuiNotificationsService)),
917
- __param(3, Inject(LOCATION)),
918
- __param(4, Inject(TUI_COPY_TEXTS)),
919
- __param(5, Inject(TUI_DOC_EXAMPLE_TEXTS)),
920
- __param(6, Optional()),
921
- __param(6, Inject(TUI_DOC_CODE_EDITOR)),
922
- __param(7, Inject(TUI_DOC_EXAMPLE_CONTENT_PROCESSOR)),
923
- __param(8, Inject(TUI_IS_CYPRESS)),
924
- __param(9, Inject(TUI_DOC_CODE_ACTIONS)),
925
- __param(10, Inject(Router)),
926
- __param(11, Inject(ActivatedRoute)),
927
- __param(12, Inject(Location$1))
928
- ], TuiDocExampleComponent);
929
-
930
- let TuiDocExampleCapitalizePipe = class TuiDocExampleCapitalizePipe {
931
- transform(content) {
932
- return typeof content === `string` ? capitalizeFirstLetter(content) : content;
933
- }
934
- };
935
- TuiDocExampleCapitalizePipe = __decorate([
936
- Pipe({ name: `tuiDocExampleCapitalize` })
937
- ], TuiDocExampleCapitalizePipe);
938
-
939
- let TuiDocExampleGetTabsPipe = class TuiDocExampleGetTabsPipe {
940
- transform(content, defaultTab) {
941
- return [defaultTab, ...Object.keys(content)];
942
- }
943
- };
944
- TuiDocExampleGetTabsPipe = __decorate([
945
- Pipe({ name: `tuiDocExampleGetTabs` })
946
- ], TuiDocExampleGetTabsPipe);
990
+ }
991
+ TuiDocExampleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleComponent, deps: [{ token: `id`, attribute: true }, { 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 }], target: i0.ɵɵFactoryTarget.Component });
992
+ TuiDocExampleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocExampleComponent, selector: "tui-doc-example", inputs: { 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 <button\n *ngIf=\"codeEditor\"\n tuiButton\n appearance=\"flat\"\n size=\"s\"\n [showLoader]=\"!!(loading$ | async)\"\n (click)=\"edit(files)\"\n >\n Edit on {{ codeEditor.name }}\n </button>\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 rgba(0,0,0,.1)}: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: TuiDocCopyComponent, selector: "tui-doc-copy" }, { type: TuiDocCodeComponent, selector: "tui-doc-code", inputs: ["filename", "code"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6$2.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6$1.TuiItemDirective, selector: "[tuiItem]" }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i8.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }], pipes: { "tuiDocExampleCapitalize": TuiDocExampleCapitalizePipe, "async": i5.AsyncPipe, "tuiDocExampleGetTabs": TuiDocExampleGetTabsPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
993
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleComponent, decorators: [{
994
+ type: Component,
995
+ args: [{
996
+ selector: `tui-doc-example`,
997
+ templateUrl: `./example.template.html`,
998
+ styleUrls: [`./example.style.less`],
999
+ changeDetection: ChangeDetectionStrategy.OnPush,
1000
+ }]
1001
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1002
+ type: Attribute,
1003
+ args: [`id`]
1004
+ }] }, { type: i8.Clipboard, decorators: [{
1005
+ type: Inject,
1006
+ args: [Clipboard]
1007
+ }] }, { type: i2$1.TuiAlertService, decorators: [{
1008
+ type: Inject,
1009
+ args: [TuiAlertService]
1010
+ }] }, { type: Location, decorators: [{
1011
+ type: Inject,
1012
+ args: [LOCATION]
1013
+ }] }, { type: i9.Observable, decorators: [{
1014
+ type: Inject,
1015
+ args: [TUI_COPY_TEXTS]
1016
+ }] }, { type: undefined, decorators: [{
1017
+ type: Inject,
1018
+ args: [TUI_DOC_EXAMPLE_TEXTS]
1019
+ }] }, { type: undefined, decorators: [{
1020
+ type: Optional
1021
+ }, {
1022
+ type: Inject,
1023
+ args: [TUI_DOC_CODE_EDITOR]
1024
+ }] }, { type: undefined, decorators: [{
1025
+ type: Inject,
1026
+ args: [TUI_DOC_EXAMPLE_CONTENT_PROCESSOR]
1027
+ }] }, { type: undefined, decorators: [{
1028
+ type: Inject,
1029
+ args: [TUI_IS_CYPRESS]
1030
+ }] }, { type: Array, decorators: [{
1031
+ type: Inject,
1032
+ args: [TUI_DOC_CODE_ACTIONS]
1033
+ }] }, { type: i6.Router, decorators: [{
1034
+ type: Inject,
1035
+ args: [Router]
1036
+ }] }, { type: i6.ActivatedRoute, decorators: [{
1037
+ type: Inject,
1038
+ args: [ActivatedRoute]
1039
+ }] }, { type: i5.Location, decorators: [{
1040
+ type: Inject,
1041
+ args: [Location$1]
1042
+ }] }]; }, propDecorators: { heading: [{
1043
+ type: Input
1044
+ }], description: [{
1045
+ type: Input
1046
+ }], content: [{
1047
+ type: Input
1048
+ }], componentName: [{
1049
+ type: Input
1050
+ }] } });
947
1051
 
948
- let TuiDocExampleModule = class TuiDocExampleModule {
949
- };
950
- TuiDocExampleModule = __decorate([
951
- NgModule({
952
- imports: [
1052
+ class TuiDocExampleModule {
1053
+ }
1054
+ TuiDocExampleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1055
+ TuiDocExampleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleModule, declarations: [TuiDocExampleComponent,
1056
+ TuiDocExampleGetTabsPipe,
1057
+ TuiDocExampleCapitalizePipe], imports: [CommonModule,
1058
+ ClipboardModule,
1059
+ TuiTabsModule,
1060
+ TuiButtonModule,
1061
+ TuiDocCopyModule,
1062
+ TuiDocCodeModule,
1063
+ PolymorpheusModule], exports: [TuiDocExampleComponent,
1064
+ TuiDocExampleGetTabsPipe,
1065
+ TuiDocExampleCapitalizePipe] });
1066
+ TuiDocExampleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleModule, imports: [[
953
1067
  CommonModule,
954
1068
  ClipboardModule,
955
1069
  TuiTabsModule,
@@ -957,21 +1071,33 @@ TuiDocExampleModule = __decorate([
957
1071
  TuiDocCopyModule,
958
1072
  TuiDocCodeModule,
959
1073
  PolymorpheusModule,
960
- ],
961
- declarations: [
962
- TuiDocExampleComponent,
963
- TuiDocExampleGetTabsPipe,
964
- TuiDocExampleCapitalizePipe,
965
- ],
966
- exports: [
967
- TuiDocExampleComponent,
968
- TuiDocExampleGetTabsPipe,
969
- TuiDocExampleCapitalizePipe,
970
- ],
971
- })
972
- ], TuiDocExampleModule);
1074
+ ]] });
1075
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleModule, decorators: [{
1076
+ type: NgModule,
1077
+ args: [{
1078
+ imports: [
1079
+ CommonModule,
1080
+ ClipboardModule,
1081
+ TuiTabsModule,
1082
+ TuiButtonModule,
1083
+ TuiDocCopyModule,
1084
+ TuiDocCodeModule,
1085
+ PolymorpheusModule,
1086
+ ],
1087
+ declarations: [
1088
+ TuiDocExampleComponent,
1089
+ TuiDocExampleGetTabsPipe,
1090
+ TuiDocExampleCapitalizePipe,
1091
+ ],
1092
+ exports: [
1093
+ TuiDocExampleComponent,
1094
+ TuiDocExampleGetTabsPipe,
1095
+ TuiDocExampleCapitalizePipe,
1096
+ ],
1097
+ }]
1098
+ }] });
973
1099
 
974
- let TuiLanguageSwitcherComponent = class TuiLanguageSwitcherComponent {
1100
+ class TuiLanguageSwitcherComponent {
975
1101
  constructor(switcher, iconsPath) {
976
1102
  this.switcher = switcher;
977
1103
  this.iconsPath = iconsPath;
@@ -997,151 +1123,41 @@ let TuiLanguageSwitcherComponent = class TuiLanguageSwitcherComponent {
997
1123
  getFlagPath(code) {
998
1124
  return code ? `${this.path}${code}.png` : null;
999
1125
  }
1000
- };
1001
- TuiLanguageSwitcherComponent.ctorParameters = () => [
1002
- { type: TuiLanguageSwitcher, decorators: [{ type: Inject, args: [TuiLanguageSwitcher,] }] },
1003
- { type: undefined, decorators: [{ type: Inject, args: [TUI_ICONS_PATH,] }] }
1004
- ];
1005
- TuiLanguageSwitcherComponent = __decorate([
1006
- Component({
1007
- selector: `tui-language-switcher`,
1008
- 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]=\"getFlagPath(flags.get(name))\"\n />\n {{ name | titlecase }}\n </button>\n </tui-data-list>\n</tui-select>\n",
1009
- changeDetection: ChangeDetectionStrategy.OnPush,
1010
- styles: [".t-flag{width:1.75rem;height:1.25rem;margin-right:.5rem}"]
1011
- }),
1012
- __param(0, Inject(TuiLanguageSwitcher)),
1013
- __param(1, Inject(TUI_ICONS_PATH))
1014
- ], TuiLanguageSwitcherComponent);
1015
-
1016
- let TuiLanguageSwitcherModule = class TuiLanguageSwitcherModule {
1017
- };
1018
- TuiLanguageSwitcherModule = __decorate([
1019
- NgModule({
1020
- exports: [TuiLanguageSwitcherComponent],
1021
- declarations: [TuiLanguageSwitcherComponent],
1022
- imports: [CommonModule, TuiSelectModule, TuiDataListModule, ReactiveFormsModule],
1023
- })
1024
- ], TuiLanguageSwitcherModule);
1126
+ }
1127
+ TuiLanguageSwitcherComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiLanguageSwitcherComponent, deps: [{ token: TuiLanguageSwitcher }, { token: TUI_ICONS_PATH }], target: i0.ɵɵFactoryTarget.Component });
1128
+ TuiLanguageSwitcherComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiLanguageSwitcherComponent, selector: "tui-language-switcher", 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]=\"getFlagPath(flags.get(name))\"\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"] }, { type: i2$1.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }], directives: [{ type: i1.TuiSelectDirective, selector: "tui-select" }, { type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "titlecase": i5.TitleCasePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiLanguageSwitcherComponent, decorators: [{
1130
+ type: Component,
1131
+ args: [{
1132
+ selector: `tui-language-switcher`,
1133
+ templateUrl: `./language-switcher.component.html`,
1134
+ styleUrls: [`./language-switcher.component.less`],
1135
+ changeDetection: ChangeDetectionStrategy.OnPush,
1136
+ }]
1137
+ }], ctorParameters: function () { return [{ type: i5$2.TuiLanguageSwitcher, decorators: [{
1138
+ type: Inject,
1139
+ args: [TuiLanguageSwitcher]
1140
+ }] }, { type: undefined, decorators: [{
1141
+ type: Inject,
1142
+ args: [TUI_ICONS_PATH]
1143
+ }] }]; } });
1025
1144
 
1026
- var TuiDocMainComponent_1;
1027
- // @dynamic
1028
- let TuiDocMainComponent = TuiDocMainComponent_1 = class TuiDocMainComponent {
1029
- constructor(storage, windowRef) {
1030
- this.storage = storage;
1031
- this.windowRef = windowRef;
1032
- this.night = this.storage.getItem(`night`) === `true` ||
1033
- (this.storage.getItem(`night`) === null &&
1034
- this.windowRef.matchMedia(`(prefers-color-scheme: dark)`).matches);
1035
- this.change$ = new Subject();
1036
- }
1037
- get mode() {
1038
- return this.night ? `onDark` : null;
1039
- }
1040
- onMode(night) {
1041
- this.night = night;
1042
- this.change$.next();
1043
- this.storage.setItem(`night`, String(night));
1044
- }
1045
- };
1046
- TuiDocMainComponent.ctorParameters = () => [
1047
- { type: Storage, decorators: [{ type: Inject, args: [LOCAL_STORAGE,] }] },
1048
- { type: Window, decorators: [{ type: Inject, args: [WINDOW,] }] }
1049
- ];
1050
- __decorate([
1051
- HostBinding(`attr.data-mode`)
1052
- ], TuiDocMainComponent.prototype, "mode", null);
1053
- TuiDocMainComponent = TuiDocMainComponent_1 = __decorate([
1054
- Component({
1055
- selector: `tui-doc-main`,
1056
- template: "<tui-theme-night *ngIf=\"night\"></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 <label class=\"night-mode\">\n Night mode\n <tui-toggle\n class=\"tui-toggle\"\n [ngModel]=\"night\"\n (ngModelChange)=\"onMode($event)\"\n ></tui-toggle>\n </label>\n <ng-content select=\"tuiDocHeader\"></ng-content>\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 <!-- TODO: 3.0 Remove-->\n <ng-container ngProjectAs=\"tuiOverNotifications\">\n <ng-content select=\"tuiOverNotifications\"></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",
1057
- encapsulation: ViewEncapsulation.None,
1058
- providers: [
1059
- {
1060
- provide: TuiModeDirective,
1061
- useExisting: forwardRef(() => TuiDocMainComponent_1),
1062
- },
1063
- TuiSwipeService,
1064
- ],
1065
- styles: ["html{scroll-padding-top:4rem;height:auto}tui-root>tui-scroll-controls>.t-bar_vertical{top:4rem!important}@-webkit-keyframes tuiShaking{from,to{transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{transform:translate3d(-.3125rem,0,0)}20%,40%,60%,80%{transform:translate3d(.3125rem,0,0)}}@keyframes tuiShaking{from,to{transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{transform:translate3d(-.3125rem,0,0)}20%,40%,60%,80%{transform:translate3d(.3125rem,0,0)}}body{background:var(--tui-base-01);height:auto}tui-doc-main{display:block}code:not(.hljs):not([class*=language-]):not(.exception){transition-property:background;transition-duration:var(--tui-duration,300ms);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}a:focus code,button: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)}.tui-doc-content{margin-left:16.25rem}@media screen and (max-width:47.9625em){tui-doc-navigation.tui-doc-navigation{display:none}.tui-doc-content{margin-left:0}}.tui-doc-outlet+*{display:block}.tui-doc-animated-example{-webkit-animation:1s .3s tuiShaking;animation:1s .3s tuiShaking}label.night-mode{cursor:pointer}label.night-mode .tui-toggle{margin-left:.5rem}.hljs-tag{background:0 0}.hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-01);background-color:var(--tui-clear-disabled)}.hljs.hljs-line-numbers{background:0 0}.hljs-subst,.hljs-title{font-weight:400;color:var(--tui-text-01)}.hljs-comment,.hljs-quote{color:var(--tui-text-03);font-style:italic}.hljs-meta{color:#e38162}.hljs-keyword,.hljs-literal,.hljs-name,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-selector-tag,.hljs-type{font-weight:700;color:var(--tui-link)}.hljs-attribute,.hljs-link,.hljs-number,.hljs-regexp{font-weight:700;color:var(--tui-support-06)}.hljs-link,.hljs-number,.hljs-regexp{font-weight:400}.hljs-string{color:var(--tui-positive);font-weight:700}.hljs-bullet,.hljs-formula,.hljs-symbol{color:var(--tui-text-01);background:var(--tui-base-02);font-style:italic}.hljs-doctag{text-decoration:underline}.hljs-template-variable,.hljs-variable{color:var(--tui-link-hover)}[data-mode=onDark] .hljs-template-variable,[data-mode=onDark] .hljs-variable{color:var(--tui-warning-fill)}.hljs-addition{background:var(--tui-success-bg)}.hljs-deletion{background:var(--tui-error-bg)}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs .hljs-line-numbers{padding:0}.hljs-ln-numbers{vertical-align:top;opacity:.3;text-align:right;padding-right:1em!important}"]
1066
- }),
1067
- __param(0, Inject(LOCAL_STORAGE)),
1068
- __param(1, Inject(WINDOW))
1069
- ], TuiDocMainComponent);
1145
+ class TuiLanguageSwitcherModule {
1146
+ }
1147
+ TuiLanguageSwitcherModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiLanguageSwitcherModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1148
+ TuiLanguageSwitcherModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiLanguageSwitcherModule, declarations: [TuiLanguageSwitcherComponent], imports: [CommonModule, TuiSelectModule, TuiDataListModule, ReactiveFormsModule], exports: [TuiLanguageSwitcherComponent] });
1149
+ TuiLanguageSwitcherModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiLanguageSwitcherModule, imports: [[CommonModule, TuiSelectModule, TuiDataListModule, ReactiveFormsModule]] });
1150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiLanguageSwitcherModule, decorators: [{
1151
+ type: NgModule,
1152
+ args: [{
1153
+ exports: [TuiLanguageSwitcherComponent],
1154
+ declarations: [TuiLanguageSwitcherComponent],
1155
+ imports: [CommonModule, TuiSelectModule, TuiDataListModule, ReactiveFormsModule],
1156
+ }]
1157
+ }] });
1070
1158
 
1071
1159
  const TUI_DOC_PAGE_LOADED = new InjectionToken(`[TUI_DOC_PAGE_LOADED] Stream that emits if loading of page is over (for example, to begin scrollIntoView)`, { factory: () => defer(() => timer(200).pipe(switchMapTo(of(true)))) });
1072
1160
 
1073
- /**
1074
- * @deprecated: use {@link TuiScrollIntoViewLinkDirective}
1075
- * TODO: remove in v3.0
1076
- */
1077
- let ScrollIntoViewDirective =
1078
- // eslint-disable-next-line @typescript-eslint/naming-convention
1079
- class ScrollIntoViewDirective {
1080
- constructor(destroy$, { nativeElement }, readyToScroll$) {
1081
- this.readyToScroll$ = readyToScroll$;
1082
- this.scroll$ = new ReplaySubject(1);
1083
- this.readyToScroll$
1084
- .pipe(filter(Boolean), switchMapTo(this.scroll$), debounceTime(750), filter(shallWe => shallWe && !!getElementObscurers(nativeElement)), takeUntil(destroy$))
1085
- .subscribe(() => {
1086
- nativeElement.scrollIntoView();
1087
- });
1088
- }
1089
- set scrollIntoView(shallWe) {
1090
- this.scroll$.next(shallWe);
1091
- }
1092
- };
1093
- ScrollIntoViewDirective.ctorParameters = () => [
1094
- { type: TuiDestroyService, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
1095
- { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
1096
- { type: Observable, decorators: [{ type: Inject, args: [TUI_DOC_PAGE_LOADED,] }] }
1097
- ];
1098
- __decorate([
1099
- Input()
1100
- ], ScrollIntoViewDirective.prototype, "scrollIntoView", null);
1101
- ScrollIntoViewDirective = __decorate([
1102
- Directive({
1103
- selector: `[scrollIntoView]`,
1104
- providers: [TuiDestroyService],
1105
- })
1106
- // eslint-disable-next-line @typescript-eslint/naming-convention
1107
- ,
1108
- __param(0, Inject(TuiDestroyService)),
1109
- __param(1, Inject(ElementRef)),
1110
- __param(2, Inject(TUI_DOC_PAGE_LOADED))
1111
- ], ScrollIntoViewDirective);
1112
- let TuiScrollIntoViewLinkDirective = class TuiScrollIntoViewLinkDirective extends ScrollIntoViewDirective {
1113
- };
1114
- TuiScrollIntoViewLinkDirective = __decorate([
1115
- Directive({
1116
- selector: `[tuiScrollIntoViewLink]`,
1117
- providers: [TuiDestroyService],
1118
- })
1119
- ], TuiScrollIntoViewLinkDirective);
1120
-
1121
- /**
1122
- * @deprecated: use {@link TuiScrollIntoViewLinkModule}
1123
- * TODO: remove in v3.0
1124
- */
1125
- let ScrollIntoViewModule =
1126
- // eslint-disable-next-line @typescript-eslint/naming-convention
1127
- class ScrollIntoViewModule {
1128
- };
1129
- ScrollIntoViewModule = __decorate([
1130
- NgModule({
1131
- declarations: [ScrollIntoViewDirective],
1132
- exports: [ScrollIntoViewDirective],
1133
- })
1134
- // eslint-disable-next-line @typescript-eslint/naming-convention
1135
- ], ScrollIntoViewModule);
1136
- let TuiScrollIntoViewLinkModule = class TuiScrollIntoViewLinkModule {
1137
- };
1138
- TuiScrollIntoViewLinkModule = __decorate([
1139
- NgModule({
1140
- declarations: [TuiScrollIntoViewLinkDirective],
1141
- exports: [TuiScrollIntoViewLinkDirective],
1142
- })
1143
- ], TuiScrollIntoViewLinkModule);
1144
-
1145
1161
  const TUI_DOC_SCROLL_BEHAVIOR = new InjectionToken(`[TUI_DOC_SCROLL_BEHAVIOR] Defines the transition animation for scroll`, { factory: () => `smooth` });
1146
1162
 
1147
1163
  const MAP = {
@@ -1179,20 +1195,17 @@ const MAP = {
1179
1195
  я: `z`,
1180
1196
  };
1181
1197
  /**
1182
- * @deprecated: use {@link tuiTransliterateKeyboardLayout} instead
1183
1198
  * Translates text mistakenly typed in the Russian layout into English
1184
1199
  * @param string string with Russian layout characters
1185
1200
  * @return string with English layout characters
1186
1201
  */
1187
- // eslint-disable-next-line @typescript-eslint/naming-convention
1188
- function transliterateKeyboardLayout(string) {
1202
+ function tuiTransliterateKeyboardLayout(string) {
1189
1203
  let newStr = ``;
1190
1204
  for (let i = 0; i < string.length; i++) {
1191
1205
  newStr += string.charAt(i) in MAP ? MAP[string.charAt(i)] : string.charAt(i);
1192
1206
  }
1193
1207
  return newStr;
1194
1208
  }
1195
- const tuiTransliterateKeyboardLayout = transliterateKeyboardLayout;
1196
1209
 
1197
1210
  const TUI_DOC_PAGES = new InjectionToken(`Documentation pages`, {
1198
1211
  factory: () => [],
@@ -1210,7 +1223,9 @@ const NAVIGATION_PROVIDERS = [
1210
1223
  {
1211
1224
  provide: NAVIGATION_TITLE,
1212
1225
  deps: [Router, ActivatedRoute, TUI_DOC_TITLE, TuiDestroyService],
1213
- useFactory: titleProviderFactory,
1226
+ useFactory: (router, activatedRoute, titlePrefix, destroy$) => {
1227
+ return router.events.pipe(filter(event => event instanceof NavigationEnd), map(() => activatedRoute.firstChild), filter(tuiIsPresent), mergeMap(({ data }) => data), map(({ title }) => titlePrefix + title), takeUntil(destroy$));
1228
+ },
1214
1229
  },
1215
1230
  {
1216
1231
  provide: NAVIGATION_LABELS,
@@ -1220,31 +1235,58 @@ const NAVIGATION_PROVIDERS = [
1220
1235
  {
1221
1236
  provide: NAVIGATION_ITEMS,
1222
1237
  deps: [TUI_DOC_PAGES],
1223
- useFactory: itemsProviderFactory,
1238
+ useFactory: (pages) => {
1239
+ const labels = labelsProviderFactory(pages);
1240
+ return [
1241
+ ...labels.map(label => pages.filter(({ section }) => section === label)),
1242
+ pages.filter(page => !page.section),
1243
+ ];
1244
+ },
1224
1245
  },
1225
1246
  ];
1226
- // eslint-disable-next-line @typescript-eslint/naming-convention
1227
- function titleProviderFactory(router, activatedRoute, titlePrefix, destroy$) {
1228
- return router.events.pipe(filter(event => event instanceof NavigationEnd), map(() => activatedRoute.firstChild), filter(isPresent), mergeMap(({ data }) => data), map(({ title }) => titlePrefix + title), takeUntil(destroy$));
1229
- }
1230
- // eslint-disable-next-line @typescript-eslint/naming-convention
1231
1247
  function labelsProviderFactory(pages) {
1232
1248
  return pages
1233
1249
  .map(({ section }) => section)
1234
- .filter(isPresent)
1250
+ .filter(tuiIsPresent)
1235
1251
  .filter((item, index, array) => array.indexOf(item) === index);
1236
1252
  }
1237
- // eslint-disable-next-line @typescript-eslint/naming-convention
1238
- function itemsProviderFactory(pages) {
1239
- const labels = labelsProviderFactory(pages);
1240
- return [
1241
- ...labels.map(label => pages.filter(({ section }) => section === label)),
1242
- pages.filter(page => !page.section),
1243
- ];
1253
+
1254
+ class TuiScrollIntoViewLinkDirective {
1255
+ constructor(destroy$, { nativeElement }, readyToScroll$) {
1256
+ this.readyToScroll$ = readyToScroll$;
1257
+ this.scroll$ = new ReplaySubject(1);
1258
+ this.readyToScroll$
1259
+ .pipe(filter(Boolean), switchMapTo(this.scroll$), debounceTime(750), filter(shallWe => shallWe && !!tuiGetElementObscures(nativeElement)), takeUntil(destroy$))
1260
+ .subscribe(() => {
1261
+ nativeElement.scrollIntoView();
1262
+ });
1263
+ }
1264
+ set tuiScrollIntoViewLink(shallWe) {
1265
+ this.scroll$.next(shallWe);
1266
+ }
1244
1267
  }
1268
+ TuiScrollIntoViewLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiScrollIntoViewLinkDirective, deps: [{ token: TuiDestroyService }, { token: ElementRef }, { token: TUI_DOC_PAGE_LOADED }], target: i0.ɵɵFactoryTarget.Directive });
1269
+ TuiScrollIntoViewLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiScrollIntoViewLinkDirective, selector: "[tuiScrollIntoViewLink]", inputs: { tuiScrollIntoViewLink: "tuiScrollIntoViewLink" }, providers: [TuiDestroyService], ngImport: i0 });
1270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiScrollIntoViewLinkDirective, decorators: [{
1271
+ type: Directive,
1272
+ args: [{
1273
+ selector: `[tuiScrollIntoViewLink]`,
1274
+ providers: [TuiDestroyService],
1275
+ }]
1276
+ }], ctorParameters: function () { return [{ type: i6$1.TuiDestroyService, decorators: [{
1277
+ type: Inject,
1278
+ args: [TuiDestroyService]
1279
+ }] }, { type: i0.ElementRef, decorators: [{
1280
+ type: Inject,
1281
+ args: [ElementRef]
1282
+ }] }, { type: i9.Observable, decorators: [{
1283
+ type: Inject,
1284
+ args: [TUI_DOC_PAGE_LOADED]
1285
+ }] }]; }, propDecorators: { tuiScrollIntoViewLink: [{
1286
+ type: Input
1287
+ }] } });
1245
1288
 
1246
- // @dynamic
1247
- let TuiDocNavigationComponent = class TuiDocNavigationComponent {
1289
+ class TuiDocNavigationComponent {
1248
1290
  constructor(changeDetectorRef, titleService, title$, documentRef, mode, sidebar, labels, items, searchText, router, activatedRoute, destroy$, readyToScroll$, scrollBehavior) {
1249
1291
  this.documentRef = documentRef;
1250
1292
  this.mode = mode;
@@ -1258,11 +1300,11 @@ let TuiDocNavigationComponent = class TuiDocNavigationComponent {
1258
1300
  this.readyToScroll$ = readyToScroll$;
1259
1301
  this.scrollBehavior = scrollBehavior;
1260
1302
  this.menuOpen = false;
1261
- this.search = ``;
1262
- this.open = false;
1263
1303
  this.openPagesArr = [];
1264
1304
  this.openPagesGroupsArr = [];
1265
1305
  this.active = ``;
1306
+ this.search = new FormControl(``);
1307
+ this.filtered$ = tuiControlValue(this.search).pipe(filter(search => search.length > 2), map(search => this.filterItems(this.flattenSubPages(this.items), search)));
1266
1308
  this.mode$ = this.mode.change$.pipe(startWith(null), map(() => this.mode.mode || `onLight`));
1267
1309
  // Angular can't navigate no anchor links
1268
1310
  // https://stackoverflow.com/questions/36101756/angular2-routing-with-hashtag-to-page-anchor
@@ -1274,10 +1316,7 @@ let TuiDocNavigationComponent = class TuiDocNavigationComponent {
1274
1316
  });
1275
1317
  }
1276
1318
  get canOpen() {
1277
- return this.search.length > 2;
1278
- }
1279
- get filteredItems() {
1280
- return this.filterItems(this.flattenSubPages(this.items), this.search);
1319
+ return this.search.value.length > 2;
1281
1320
  }
1282
1321
  get itemsWithoutSections() {
1283
1322
  return this.items[this.items.length - 1];
@@ -1291,25 +1330,21 @@ let TuiDocNavigationComponent = class TuiDocNavigationComponent {
1291
1330
  closeMenu() {
1292
1331
  this.menuOpen = false;
1293
1332
  }
1294
- onSearchChange(search) {
1295
- this.search = search;
1296
- this.open = this.canOpen;
1297
- }
1298
- onClick() {
1299
- this.open = false;
1333
+ onClick(input) {
1334
+ input.open = false;
1300
1335
  this.menuOpen = false;
1301
- this.search = ``;
1336
+ this.search.setValue(``);
1302
1337
  this.openActivePageGroup();
1303
1338
  }
1304
1339
  filterItems(items, search) {
1305
- return items.map(section => uniqBy(section.filter(({ title, keywords = `` }) => {
1340
+ return items.map(section => tuiUniqBy(section.filter(({ title, keywords = `` }) => {
1306
1341
  title = title.toLowerCase();
1307
1342
  search = search.toLowerCase();
1308
1343
  keywords = keywords.toLowerCase();
1309
1344
  return (title.includes(search) ||
1310
1345
  keywords.includes(search) ||
1311
- title.includes(transliterateKeyboardLayout(search)) ||
1312
- keywords.includes(transliterateKeyboardLayout(search)) ||
1346
+ title.includes(tuiTransliterateKeyboardLayout(search)) ||
1347
+ keywords.includes(tuiTransliterateKeyboardLayout(search)) ||
1313
1348
  search.replace(/-/gi, ``).includes(title));
1314
1349
  }), `title`));
1315
1350
  }
@@ -1360,93 +1395,78 @@ let TuiDocNavigationComponent = class TuiDocNavigationComponent {
1360
1395
  behavior: this.scrollBehavior,
1361
1396
  });
1362
1397
  }
1363
- };
1364
- TuiDocNavigationComponent.ctorParameters = () => [
1365
- { type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
1366
- { type: Title, decorators: [{ type: Inject, args: [Title,] }] },
1367
- { type: Observable, decorators: [{ type: Inject, args: [NAVIGATION_TITLE,] }] },
1368
- { type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
1369
- { type: TuiModeDirective, decorators: [{ type: Inject, args: [TuiModeDirective,] }] },
1370
- { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [TuiSidebarDirective,] }] },
1371
- { type: Array, decorators: [{ type: Inject, args: [NAVIGATION_LABELS,] }] },
1372
- { type: undefined, decorators: [{ type: Inject, args: [NAVIGATION_ITEMS,] }] },
1373
- { type: String, decorators: [{ type: Inject, args: [TUI_DOC_SEARCH_TEXT,] }] },
1374
- { type: Router, decorators: [{ type: Inject, args: [Router,] }] },
1375
- { type: ActivatedRoute, decorators: [{ type: Inject, args: [ActivatedRoute,] }] },
1376
- { type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
1377
- { type: Observable, decorators: [{ type: Inject, args: [TUI_DOC_PAGE_LOADED,] }] },
1378
- { type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_SCROLL_BEHAVIOR,] }] }
1379
- ];
1380
- __decorate([
1381
- HostBinding(`class._open`)
1382
- ], TuiDocNavigationComponent.prototype, "menuOpen", void 0);
1398
+ }
1399
+ TuiDocNavigationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", 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 }, { token: TUI_DOC_PAGE_LOADED }, { token: TUI_DOC_SCROLL_BEHAVIOR }], target: i0.ɵɵFactoryTarget.Component });
1400
+ TuiDocNavigationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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{width:100%;scroll-behavior:smooth}.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:.3s;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"] }, { 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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5$1.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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i5.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: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }, { type: TuiScrollIntoViewLinkDirective, selector: "[tuiScrollIntoViewLink]", inputs: ["tuiScrollIntoViewLink"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1383
1401
  __decorate([
1384
1402
  tuiPure
1385
1403
  ], TuiDocNavigationComponent.prototype, "filterItems", null);
1386
1404
  __decorate([
1387
1405
  tuiPure
1388
1406
  ], TuiDocNavigationComponent.prototype, "flattenSubPages", null);
1389
- TuiDocNavigationComponent = __decorate([
1390
- Component({
1391
- selector: `tui-doc-navigation`,
1392
- template: "<tui-hosted-dropdown\n *tuiLet=\"filteredItems as filtered\"\n tuiAutoFocus\n tuiDropdownLimitWidth=\"fixed\"\n class=\"t-input\"\n [autoFocus]=\"!!sidebar\"\n [content]=\"dropdown\"\n [canOpen]=\"canOpen\"\n [(open)]=\"open\"\n>\n <tui-primitive-textfield\n iconAlign=\"left\"\n tuiTextfieldSize=\"m\"\n iconContent=\"tuiIconSearch\"\n [pseudoFocused]=\"open || null\"\n [tuiTextfieldCleaner]=\"true\"\n [tuiTextfieldLabelOutside]=\"true\"\n [value]=\"search\"\n (valueChange)=\"onSearchChange($event)\"\n >\n {{ searchText }}\n </tui-primitive-textfield>\n <ng-template\n #dropdown\n let-activeZone\n >\n <tui-data-list>\n <tui-opt-group\n *ngFor=\"let group of filtered; 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()\"\n >\n {{ item.title }}\n </a>\n </tui-opt-group>\n </tui-data-list>\n </ng-template>\n</tui-hosted-dropdown>\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 [scrollIntoView]=\"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 [scrollIntoView]=\"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",
1393
- providers: NAVIGATION_PROVIDERS,
1394
- changeDetection: ChangeDetectionStrategy.OnPush,
1395
- styles: [":host{z-index:1;display:flex;flex-direction:column;text-align:center;background:var(--tui-base-01)}.t-input{display:block;margin:1.25rem}.t-navigation{display:flex;max-height:100%;min-height:0;flex:1 1 0;text-align:left}.t-scrollbar{width:100%;scroll-behavior:smooth}.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:0 0;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,300ms);transition-timing-function:ease-in-out;width:1rem;height:1rem;margin:-.25rem .25rem 0 -.1875rem}.t-chevron_active{transform:rotate(90deg)}"]
1396
- }),
1397
- __param(0, Inject(ChangeDetectorRef)),
1398
- __param(1, Inject(Title)),
1399
- __param(2, Inject(NAVIGATION_TITLE)),
1400
- __param(3, Inject(DOCUMENT)),
1401
- __param(4, Inject(TuiModeDirective)),
1402
- __param(5, Optional()),
1403
- __param(5, Inject(TuiSidebarDirective)),
1404
- __param(6, Inject(NAVIGATION_LABELS)),
1405
- __param(7, Inject(NAVIGATION_ITEMS)),
1406
- __param(8, Inject(TUI_DOC_SEARCH_TEXT)),
1407
- __param(9, Inject(Router)),
1408
- __param(10, Inject(ActivatedRoute)),
1409
- __param(11, Inject(TuiDestroyService)),
1410
- __param(12, Inject(TUI_DOC_PAGE_LOADED)),
1411
- __param(13, Inject(TUI_DOC_SCROLL_BEHAVIOR))
1412
- ], TuiDocNavigationComponent);
1413
-
1414
- let TuiDocNavigationModule = class TuiDocNavigationModule {
1415
- };
1416
- TuiDocNavigationModule = __decorate([
1417
- NgModule({
1418
- imports: [
1419
- CommonModule,
1420
- FormsModule,
1421
- RouterModule,
1422
- ScrollIntoViewModule,
1423
- TuiScrollIntoViewLinkModule,
1424
- TuiButtonModule,
1425
- TuiPrimitiveTextfieldModule,
1426
- TuiTextfieldControllerModule,
1427
- TuiActiveZoneModule,
1428
- TuiLetModule,
1429
- TuiModeModule,
1430
- TuiLinkModule,
1431
- TuiExpandModule,
1432
- TuiHostedDropdownModule,
1433
- TuiDropdownControllerModule,
1434
- TuiAccordionModule,
1435
- TuiScrollbarModule,
1436
- TuiSvgModule,
1437
- TuiDataListModule,
1438
- TuiAutoFocusModule,
1439
- ],
1440
- declarations: [TuiDocNavigationComponent],
1441
- exports: [TuiDocNavigationComponent],
1442
- })
1443
- ], TuiDocNavigationModule);
1407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocNavigationComponent, decorators: [{
1408
+ type: Component,
1409
+ args: [{
1410
+ selector: `tui-doc-navigation`,
1411
+ templateUrl: `navigation.template.html`,
1412
+ styleUrls: [`navigation.style.less`],
1413
+ providers: NAVIGATION_PROVIDERS,
1414
+ changeDetection: ChangeDetectionStrategy.OnPush,
1415
+ }]
1416
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef, decorators: [{
1417
+ type: Inject,
1418
+ args: [ChangeDetectorRef]
1419
+ }] }, { type: i8$1.Title, decorators: [{
1420
+ type: Inject,
1421
+ args: [Title]
1422
+ }] }, { type: i9.Observable, decorators: [{
1423
+ type: Inject,
1424
+ args: [NAVIGATION_TITLE]
1425
+ }] }, { type: Document, decorators: [{
1426
+ type: Inject,
1427
+ args: [DOCUMENT]
1428
+ }] }, { type: i2$1.TuiModeDirective, decorators: [{
1429
+ type: Inject,
1430
+ args: [TuiModeDirective]
1431
+ }] }, { type: undefined, decorators: [{
1432
+ type: Optional
1433
+ }, {
1434
+ type: Inject,
1435
+ args: [TuiSidebarDirective]
1436
+ }] }, { type: undefined, decorators: [{
1437
+ type: Inject,
1438
+ args: [NAVIGATION_LABELS]
1439
+ }] }, { type: undefined, decorators: [{
1440
+ type: Inject,
1441
+ args: [NAVIGATION_ITEMS]
1442
+ }] }, { type: undefined, decorators: [{
1443
+ type: Inject,
1444
+ args: [TUI_DOC_SEARCH_TEXT]
1445
+ }] }, { type: i6.Router, decorators: [{
1446
+ type: Inject,
1447
+ args: [Router]
1448
+ }] }, { type: i6.ActivatedRoute, decorators: [{
1449
+ type: Inject,
1450
+ args: [ActivatedRoute]
1451
+ }] }, { type: i9.Observable, decorators: [{
1452
+ type: Inject,
1453
+ args: [TuiDestroyService]
1454
+ }] }, { type: i9.Observable, decorators: [{
1455
+ type: Inject,
1456
+ args: [TUI_DOC_PAGE_LOADED]
1457
+ }] }, { type: undefined, decorators: [{
1458
+ type: Inject,
1459
+ args: [TUI_DOC_SCROLL_BEHAVIOR]
1460
+ }] }]; }, propDecorators: { menuOpen: [{
1461
+ type: HostBinding,
1462
+ args: [`class._open`]
1463
+ }], filterItems: [], flattenSubPages: [] } });
1444
1464
 
1445
1465
  const TUI_DOC_LOGO = new InjectionToken(`Main logo`, {
1446
1466
  factory: () => ``,
1447
1467
  });
1448
1468
 
1449
- let TuiDocHeaderComponent = class TuiDocHeaderComponent {
1469
+ class TuiDocHeaderComponent {
1450
1470
  constructor(logo, menu, router, swipes$) {
1451
1471
  this.logo = logo;
1452
1472
  this.menu = menu;
@@ -1463,48 +1483,218 @@ let TuiDocHeaderComponent = class TuiDocHeaderComponent {
1463
1483
  this.stream$.next(false);
1464
1484
  }
1465
1485
  }
1466
- };
1467
- TuiDocHeaderComponent.ctorParameters = () => [
1468
- { type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_LOGO,] }] },
1469
- { type: String, decorators: [{ type: Inject, args: [TUI_DOC_MENU_TEXT,] }] },
1470
- { type: Router, decorators: [{ type: Inject, args: [Router,] }] },
1471
- { type: TuiSwipeService, decorators: [{ type: Inject, args: [TuiSwipeService,] }] }
1472
- ];
1473
- TuiDocHeaderComponent = __decorate([
1474
- Component({
1475
- selector: `header[tuiDocHeader]`,
1476
- template: "<button\n tuiIconButton\n icon=\"tuiIconMenuLarge\"\n appearance=\"icon\"\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\n polymorpheus-outlet\n class=\"t-logo\"\n [content]=\"logo\"\n>\n <ng-template let-src>\n <img\n alt=\"Logo\"\n class=\"t-img\"\n [src]=\"src\"\n />\n </ng-template>\n</div>\n<ng-content></ng-content>\n",
1477
- changeDetection: ChangeDetectionStrategy.OnPush,
1478
- styles: [":host{box-shadow:0 .125rem 1rem rgba(0,0,0,.08);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%}"]
1479
- }),
1480
- __param(0, Inject(TUI_DOC_LOGO)),
1481
- __param(1, Inject(TUI_DOC_MENU_TEXT)),
1482
- __param(2, Inject(Router)),
1483
- __param(3, Inject(TuiSwipeService))
1484
- ], TuiDocHeaderComponent);
1486
+ }
1487
+ TuiDocHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocHeaderComponent, deps: [{ token: TUI_DOC_LOGO }, { token: TUI_DOC_MENU_TEXT }, { token: Router }, { token: TuiSwipeService }], target: i0.ɵɵFactoryTarget.Component });
1488
+ TuiDocHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocHeaderComponent, selector: "header[tuiDocHeader]", ngImport: i0, template: "<button\n tuiIconButton\n icon=\"tuiIconMenuLarge\"\n appearance=\"icon\"\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 rgba(0,0,0,.08);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.TuiSidebarDirective, selector: "[tuiSidebar]", inputs: ["tuiSidebarDirection", "tuiSidebarAutoWidth", "tuiSidebar"] }, { type: i6$2.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1489
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocHeaderComponent, decorators: [{
1490
+ type: Component,
1491
+ args: [{
1492
+ selector: `header[tuiDocHeader]`,
1493
+ templateUrl: `./header.template.html`,
1494
+ styleUrls: [`./header.style.less`],
1495
+ changeDetection: ChangeDetectionStrategy.OnPush,
1496
+ }]
1497
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1498
+ type: Inject,
1499
+ args: [TUI_DOC_LOGO]
1500
+ }] }, { type: undefined, decorators: [{
1501
+ type: Inject,
1502
+ args: [TUI_DOC_MENU_TEXT]
1503
+ }] }, { type: i6.Router, decorators: [{
1504
+ type: Inject,
1505
+ args: [Router]
1506
+ }] }, { type: i6$1.TuiSwipeService, decorators: [{
1507
+ type: Inject,
1508
+ args: [TuiSwipeService]
1509
+ }] }]; } });
1485
1510
 
1486
- let TuiDocHeaderModule = class TuiDocHeaderModule {
1487
- };
1488
- TuiDocHeaderModule = __decorate([
1489
- NgModule({
1490
- imports: [
1511
+ class TuiDocMainComponent {
1512
+ constructor(storage, windowRef) {
1513
+ this.storage = storage;
1514
+ this.windowRef = windowRef;
1515
+ this.night = this.storage.getItem(`night`) === `true` ||
1516
+ (this.storage.getItem(`night`) === null &&
1517
+ this.windowRef.matchMedia(`(prefers-color-scheme: dark)`).matches);
1518
+ this.change$ = new Subject();
1519
+ }
1520
+ get mode() {
1521
+ return this.night ? `onDark` : null;
1522
+ }
1523
+ onMode(night) {
1524
+ this.night = night;
1525
+ this.change$.next();
1526
+ this.storage.setItem(`night`, String(night));
1527
+ }
1528
+ }
1529
+ TuiDocMainComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocMainComponent, deps: [{ token: LOCAL_STORAGE }, { token: WINDOW }], target: i0.ɵɵFactoryTarget.Component });
1530
+ TuiDocMainComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocMainComponent, selector: "tui-doc-main", host: { properties: { "attr.data-mode": "this.mode" } }, providers: [
1531
+ {
1532
+ provide: TuiModeDirective,
1533
+ useExisting: forwardRef(() => TuiDocMainComponent),
1534
+ },
1535
+ TuiSwipeService,
1536
+ ], ngImport: i0, template: "<tui-theme-night *ngIf=\"night\"></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 <label class=\"night-mode\">\n Night mode\n <tui-toggle\n class=\"tui-toggle\"\n [ngModel]=\"night\"\n (ngModelChange)=\"onMode($event)\"\n ></tui-toggle>\n </label>\n <ng-content select=\"tuiDocHeader\"></ng-content>\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}@-webkit-keyframes tuiShaking{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-.3125rem)}20%,40%,60%,80%{transform:translate(.3125rem)}}@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(.hljs):not([class*=\"language-\"]):not(.exception){transition-property:background;transition-duration:.3s;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{-webkit-animation:1s .3s tuiShaking;animation:1s .3s tuiShaking}label.night-mode{cursor:pointer}label.night-mode .tui-toggle{margin-left:.5rem}.hljs-tag{background:none}.hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-01);background-color:var(--tui-clear-disabled)}.hljs.hljs-line-numbers{background:transparent}.hljs-subst,.hljs-title{font-weight:normal;color:var(--tui-text-01)}.hljs-comment,.hljs-quote{color:var(--tui-text-03);font-style:italic}.hljs-meta{color:#e38162}.hljs-section,.hljs-name,.hljs-literal,.hljs-keyword,.hljs-selector-tag,.hljs-type,.hljs-selector-id,.hljs-selector-class{font-weight:bold;color:var(--tui-link)}.hljs-attribute,.hljs-number,.hljs-regexp,.hljs-link{font-weight:bold;color:var(--tui-support-06)}.hljs-number,.hljs-regexp,.hljs-link{font-weight:normal}.hljs-string{color:var(--tui-positive);font-weight:bold}.hljs-symbol,.hljs-bullet,.hljs-formula{color:var(--tui-text-01);background:var(--tui-base-02);font-style:italic}.hljs-doctag{text-decoration:underline}.hljs-variable,.hljs-template-variable{color:var(--tui-link-hover)}[data-mode=onDark] .hljs-variable,[data-mode=onDark] .hljs-template-variable{color:var(--tui-warning-fill)}.hljs-addition{background:var(--tui-success-bg)}.hljs-deletion{background:var(--tui-error-bg)}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}.hljs .hljs-line-numbers{padding:0}.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: i1.TuiToggleComponent, selector: "tui-toggle", inputs: ["singleColor", "showIcons", "showLoader", "size"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }, { type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], encapsulation: i0.ViewEncapsulation.None });
1537
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocMainComponent, decorators: [{
1538
+ type: Component,
1539
+ args: [{
1540
+ selector: `tui-doc-main`,
1541
+ templateUrl: `./main.template.html`,
1542
+ styleUrls: [`./main.style.less`],
1543
+ encapsulation: ViewEncapsulation.None,
1544
+ providers: [
1545
+ {
1546
+ provide: TuiModeDirective,
1547
+ useExisting: forwardRef(() => TuiDocMainComponent),
1548
+ },
1549
+ TuiSwipeService,
1550
+ ],
1551
+ }]
1552
+ }], ctorParameters: function () { return [{ type: Storage, decorators: [{
1553
+ type: Inject,
1554
+ args: [LOCAL_STORAGE]
1555
+ }] }, { type: Window, decorators: [{
1556
+ type: Inject,
1557
+ args: [WINDOW]
1558
+ }] }]; }, propDecorators: { mode: [{
1559
+ type: HostBinding,
1560
+ args: [`attr.data-mode`]
1561
+ }] } });
1562
+
1563
+ class TuiScrollIntoViewLinkModule {
1564
+ }
1565
+ TuiScrollIntoViewLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiScrollIntoViewLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1566
+ TuiScrollIntoViewLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiScrollIntoViewLinkModule, declarations: [TuiScrollIntoViewLinkDirective], exports: [TuiScrollIntoViewLinkDirective] });
1567
+ TuiScrollIntoViewLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiScrollIntoViewLinkModule });
1568
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiScrollIntoViewLinkModule, decorators: [{
1569
+ type: NgModule,
1570
+ args: [{
1571
+ declarations: [TuiScrollIntoViewLinkDirective],
1572
+ exports: [TuiScrollIntoViewLinkDirective],
1573
+ }]
1574
+ }] });
1575
+
1576
+ class TuiDocNavigationModule {
1577
+ }
1578
+ TuiDocNavigationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocNavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1579
+ TuiDocNavigationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocNavigationModule, declarations: [TuiDocNavigationComponent], imports: [CommonModule,
1580
+ ReactiveFormsModule,
1581
+ RouterModule,
1582
+ PolymorpheusModule,
1583
+ TuiScrollIntoViewLinkModule,
1584
+ TuiButtonModule,
1585
+ TuiInputModule,
1586
+ TuiTextfieldControllerModule,
1587
+ TuiActiveZoneModule,
1588
+ TuiLetModule,
1589
+ TuiModeModule,
1590
+ TuiLinkModule,
1591
+ TuiExpandModule,
1592
+ TuiHostedDropdownModule,
1593
+ TuiDropdownModule,
1594
+ TuiAccordionModule,
1595
+ TuiScrollbarModule,
1596
+ TuiSvgModule,
1597
+ TuiDataListModule,
1598
+ TuiAutoFocusModule], exports: [TuiDocNavigationComponent] });
1599
+ TuiDocNavigationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocNavigationModule, imports: [[
1600
+ CommonModule,
1601
+ ReactiveFormsModule,
1602
+ RouterModule,
1603
+ PolymorpheusModule,
1604
+ TuiScrollIntoViewLinkModule,
1605
+ TuiButtonModule,
1606
+ TuiInputModule,
1607
+ TuiTextfieldControllerModule,
1608
+ TuiActiveZoneModule,
1609
+ TuiLetModule,
1610
+ TuiModeModule,
1611
+ TuiLinkModule,
1612
+ TuiExpandModule,
1613
+ TuiHostedDropdownModule,
1614
+ TuiDropdownModule,
1615
+ TuiAccordionModule,
1616
+ TuiScrollbarModule,
1617
+ TuiSvgModule,
1618
+ TuiDataListModule,
1619
+ TuiAutoFocusModule,
1620
+ ]] });
1621
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocNavigationModule, decorators: [{
1622
+ type: NgModule,
1623
+ args: [{
1624
+ imports: [
1625
+ CommonModule,
1626
+ ReactiveFormsModule,
1627
+ RouterModule,
1628
+ PolymorpheusModule,
1629
+ TuiScrollIntoViewLinkModule,
1630
+ TuiButtonModule,
1631
+ TuiInputModule,
1632
+ TuiTextfieldControllerModule,
1633
+ TuiActiveZoneModule,
1634
+ TuiLetModule,
1635
+ TuiModeModule,
1636
+ TuiLinkModule,
1637
+ TuiExpandModule,
1638
+ TuiHostedDropdownModule,
1639
+ TuiDropdownModule,
1640
+ TuiAccordionModule,
1641
+ TuiScrollbarModule,
1642
+ TuiSvgModule,
1643
+ TuiDataListModule,
1644
+ TuiAutoFocusModule,
1645
+ ],
1646
+ declarations: [TuiDocNavigationComponent],
1647
+ exports: [TuiDocNavigationComponent],
1648
+ }]
1649
+ }] });
1650
+
1651
+ class TuiDocHeaderModule {
1652
+ }
1653
+ TuiDocHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1654
+ TuiDocHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocHeaderModule, declarations: [TuiDocHeaderComponent], imports: [CommonModule,
1655
+ PolymorpheusModule,
1656
+ TuiButtonModule,
1657
+ TuiSidebarModule,
1658
+ TuiActiveZoneModule,
1659
+ TuiDocNavigationModule], exports: [TuiDocHeaderComponent] });
1660
+ TuiDocHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocHeaderModule, imports: [[
1491
1661
  CommonModule,
1492
1662
  PolymorpheusModule,
1493
1663
  TuiButtonModule,
1494
1664
  TuiSidebarModule,
1495
1665
  TuiActiveZoneModule,
1496
1666
  TuiDocNavigationModule,
1497
- ],
1498
- declarations: [TuiDocHeaderComponent],
1499
- exports: [TuiDocHeaderComponent],
1500
- })
1501
- ], TuiDocHeaderModule);
1667
+ ]] });
1668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocHeaderModule, decorators: [{
1669
+ type: NgModule,
1670
+ args: [{
1671
+ imports: [
1672
+ CommonModule,
1673
+ PolymorpheusModule,
1674
+ TuiButtonModule,
1675
+ TuiSidebarModule,
1676
+ TuiActiveZoneModule,
1677
+ TuiDocNavigationModule,
1678
+ ],
1679
+ declarations: [TuiDocHeaderComponent],
1680
+ exports: [TuiDocHeaderComponent],
1681
+ }]
1682
+ }] });
1502
1683
 
1503
- let TuiDocMainModule = class TuiDocMainModule {
1504
- };
1505
- TuiDocMainModule = __decorate([
1506
- NgModule({
1507
- imports: [
1684
+ class TuiDocMainModule {
1685
+ }
1686
+ TuiDocMainModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocMainModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1687
+ TuiDocMainModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocMainModule, declarations: [TuiDocMainComponent], imports: [CommonModule,
1688
+ RouterModule,
1689
+ FormsModule,
1690
+ TuiToggleModule,
1691
+ TuiThemeNightModule,
1692
+ TuiDocHeaderModule,
1693
+ TuiRootModule,
1694
+ TuiDialogModule,
1695
+ TuiAlertModule,
1696
+ TuiDocNavigationModule], exports: [TuiDocMainComponent] });
1697
+ TuiDocMainModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocMainModule, imports: [[
1508
1698
  CommonModule,
1509
1699
  RouterModule,
1510
1700
  FormsModule,
@@ -1515,11 +1705,26 @@ TuiDocMainModule = __decorate([
1515
1705
  TuiDialogModule,
1516
1706
  TuiAlertModule,
1517
1707
  TuiDocNavigationModule,
1518
- ],
1519
- declarations: [TuiDocMainComponent],
1520
- exports: [TuiDocMainComponent],
1521
- })
1522
- ], TuiDocMainModule);
1708
+ ]] });
1709
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocMainModule, decorators: [{
1710
+ type: NgModule,
1711
+ args: [{
1712
+ imports: [
1713
+ CommonModule,
1714
+ RouterModule,
1715
+ FormsModule,
1716
+ TuiToggleModule,
1717
+ TuiThemeNightModule,
1718
+ TuiDocHeaderModule,
1719
+ TuiRootModule,
1720
+ TuiDialogModule,
1721
+ TuiAlertModule,
1722
+ TuiDocNavigationModule,
1723
+ ],
1724
+ declarations: [TuiDocMainComponent],
1725
+ exports: [TuiDocMainComponent],
1726
+ }]
1727
+ }] });
1523
1728
 
1524
1729
  const TUI_DOC_DEFAULT_TABS = new InjectionToken(`Array of default tab names`, {
1525
1730
  factory: () => [],
@@ -1534,95 +1739,94 @@ const PAGE_PROVIDERS = [
1534
1739
  {
1535
1740
  provide: PAGE_SEE_ALSO,
1536
1741
  deps: [ElementRef, TUI_DOC_SEE_ALSO],
1537
- useFactory: seeAlsoProviderFactory,
1742
+ useFactory: ({ nativeElement }, seeAlsoGroups) => {
1743
+ const currentHeader = nativeElement.getAttribute(`header`);
1744
+ const groups = seeAlsoGroups.filter(group => group.includes(currentHeader)) || [];
1745
+ const seeAlsoSet = new Set(groups
1746
+ .join()
1747
+ .split(`,`)
1748
+ .filter(component => component && component !== currentHeader));
1749
+ return Array.from(seeAlsoSet);
1750
+ },
1538
1751
  },
1539
1752
  ];
1540
- // eslint-disable-next-line @typescript-eslint/naming-convention
1541
- function seeAlsoProviderFactory({ nativeElement }, seeAlsoGroups) {
1542
- const currentHeader = nativeElement.getAttribute(`header`);
1543
- const groups = seeAlsoGroups.filter(group => group.includes(currentHeader)) || [];
1544
- const seeAlsoSet = new Set(groups
1545
- .join()
1546
- .split(`,`)
1547
- .filter(component => component && component !== currentHeader));
1548
- return Array.from(seeAlsoSet);
1549
- }
1550
1753
 
1551
- let TuiDocPageTabConnectorDirective = class TuiDocPageTabConnectorDirective {
1754
+ class TuiDocPageTabConnectorDirective {
1552
1755
  constructor(template) {
1553
1756
  this.template = template;
1554
1757
  }
1555
- };
1556
- TuiDocPageTabConnectorDirective.ctorParameters = () => [
1557
- { type: TemplateRef, decorators: [{ type: Inject, args: [TemplateRef,] }] }
1558
- ];
1758
+ }
1759
+ TuiDocPageTabConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocPageTabConnectorDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
1760
+ TuiDocPageTabConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocPageTabConnectorDirective, selector: "[pageTab]", inputs: { pageTab: "pageTab" }, ngImport: i0 });
1559
1761
  __decorate([
1560
- Input(),
1561
1762
  tuiDefaultProp()
1562
1763
  ], TuiDocPageTabConnectorDirective.prototype, "pageTab", void 0);
1563
- TuiDocPageTabConnectorDirective = __decorate([
1564
- Directive({
1565
- selector: `[pageTab]`,
1566
- }),
1567
- __param(0, Inject(TemplateRef))
1568
- ], TuiDocPageTabConnectorDirective);
1764
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocPageTabConnectorDirective, decorators: [{
1765
+ type: Directive,
1766
+ args: [{
1767
+ selector: `[pageTab]`,
1768
+ }]
1769
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
1770
+ type: Inject,
1771
+ args: [TemplateRef]
1772
+ }] }]; }, propDecorators: { pageTab: [{
1773
+ type: Input
1774
+ }] } });
1569
1775
 
1570
- // Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
1571
- // @dynamic
1572
- let TuiDocPageComponent = class TuiDocPageComponent {
1573
- constructor(deprecated, defaultTabs, seeAlso) {
1574
- this.deprecated = deprecated;
1575
- this.defaultTabs = defaultTabs;
1576
- this.seeAlso = seeAlso;
1776
+ const TUI_DOC_SOURCE_CODE = new InjectionToken(`Source code link`, {
1777
+ factory: () => null,
1778
+ });
1779
+
1780
+ class TuiDocSourceCodeComponent {
1781
+ constructor(sourceCode, text) {
1782
+ this.sourceCode = sourceCode;
1783
+ this.text = text;
1577
1784
  this.header = ``;
1578
1785
  this.package = ``;
1579
1786
  this.type = ``;
1580
1787
  this.path = ``;
1581
- this.tabConnectors = EMPTY_QUERY;
1582
- this.activeItemIndex = NaN;
1583
1788
  }
1584
- get showSeeAlso() {
1585
- return !!this.seeAlso.length && this.activeItemIndex === 0;
1789
+ get pathOptions() {
1790
+ return this.getPathOptions(this.header, this.package, this.type, this.path);
1586
1791
  }
1587
- getRouterLink(tab = ``) {
1588
- return `./${tab.replace(/ /g, `_`)}`;
1792
+ getPathOptions(header, packageName, type, path) {
1793
+ return {
1794
+ header,
1795
+ package: packageName,
1796
+ type,
1797
+ path,
1798
+ };
1589
1799
  }
1590
- };
1591
- TuiDocPageComponent.ctorParameters = () => [
1592
- { type: String, decorators: [{ type: Attribute, args: [`deprecated`,] }] },
1593
- { type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_DEFAULT_TABS,] }] },
1594
- { type: undefined, decorators: [{ type: Inject, args: [PAGE_SEE_ALSO,] }] }
1595
- ];
1596
- __decorate([
1597
- Input()
1598
- ], TuiDocPageComponent.prototype, "header", void 0);
1599
- __decorate([
1600
- Input()
1601
- ], TuiDocPageComponent.prototype, "package", void 0);
1602
- __decorate([
1603
- Input()
1604
- ], TuiDocPageComponent.prototype, "type", void 0);
1605
- __decorate([
1606
- Input()
1607
- ], TuiDocPageComponent.prototype, "path", void 0);
1800
+ }
1801
+ TuiDocSourceCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSourceCodeComponent, deps: [{ token: TUI_DOC_SOURCE_CODE }, { token: TUI_DOC_SOURCE_CODE_TEXT }], target: i0.ɵɵFactoryTarget.Component });
1802
+ TuiDocSourceCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 });
1608
1803
  __decorate([
1609
- ContentChildren(TuiDocPageTabConnectorDirective)
1610
- ], TuiDocPageComponent.prototype, "tabConnectors", void 0);
1611
- TuiDocPageComponent = __decorate([
1612
- Component({
1613
- selector: `tui-doc-page`,
1614
- template: "<header class=\"t-header\">\n <h1 class=\"t-title\">\n {{ header }}\n <tui-tag\n *ngIf=\"deprecated !== null\"\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=\"first; else dynamicTab\">\n <a\n *tuiTab\n tuiTab\n routerLink=\"./\"\n routerLinkActive\n [routerLinkActiveOptions]=\"{exact: true}\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-container>\n <ng-template #dynamicTab>\n <a\n *tuiTab\n tuiTab\n routerLinkActive\n [routerLink]=\"getRouterLink(tab.pageTab || defaultTabs[index])\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-template>\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",
1615
- changeDetection: ChangeDetectionStrategy.OnPush,
1616
- providers: PAGE_PROVIDERS,
1617
- 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}"]
1618
- }),
1619
- __param(0, Attribute(`deprecated`)),
1620
- __param(1, Inject(TUI_DOC_DEFAULT_TABS)),
1621
- __param(2, Inject(PAGE_SEE_ALSO))
1622
- ], TuiDocPageComponent);
1804
+ tuiPure
1805
+ ], TuiDocSourceCodeComponent.prototype, "getPathOptions", null);
1806
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSourceCodeComponent, decorators: [{
1807
+ type: Component,
1808
+ args: [{
1809
+ selector: `tui-doc-source-code`,
1810
+ templateUrl: `./source-code.template.html`,
1811
+ changeDetection: ChangeDetectionStrategy.OnPush,
1812
+ }]
1813
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1814
+ type: Inject,
1815
+ args: [TUI_DOC_SOURCE_CODE]
1816
+ }] }, { type: undefined, decorators: [{
1817
+ type: Inject,
1818
+ args: [TUI_DOC_SOURCE_CODE_TEXT]
1819
+ }] }]; }, propDecorators: { header: [{
1820
+ type: Input
1821
+ }], package: [{
1822
+ type: Input
1823
+ }], type: [{
1824
+ type: Input
1825
+ }], path: [{
1826
+ type: Input
1827
+ }], getPathOptions: [] } });
1623
1828
 
1624
- // @dynamic
1625
- let TuiDocSeeAlsoComponent = class TuiDocSeeAlsoComponent {
1829
+ class TuiDocSeeAlsoComponent {
1626
1830
  constructor(text, pages) {
1627
1831
  this.text = text;
1628
1832
  this.pages = pages;
@@ -1640,115 +1844,139 @@ let TuiDocSeeAlsoComponent = class TuiDocSeeAlsoComponent {
1640
1844
  }
1641
1845
  return ``;
1642
1846
  }
1643
- };
1644
- TuiDocSeeAlsoComponent.ctorParameters = () => [
1645
- { type: String, decorators: [{ type: Inject, args: [TUI_DOC_SEE_ALSO_TEXT,] }] },
1646
- { type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_PAGES,] }] }
1647
- ];
1648
- __decorate([
1649
- Input()
1650
- ], TuiDocSeeAlsoComponent.prototype, "seeAlso", void 0);
1651
- TuiDocSeeAlsoComponent = __decorate([
1652
- Component({
1653
- selector: `tui-doc-see-also`,
1654
- 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 >\n {{ item }}\n </a>\n <ng-container *ngIf=\"!last\">{{ ', ' }}</ng-container>\n</ng-container>\n",
1655
- changeDetection: ChangeDetectionStrategy.OnPush,
1656
- 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}"]
1657
- }),
1658
- __param(0, Inject(TUI_DOC_SEE_ALSO_TEXT)),
1659
- __param(1, Inject(TUI_DOC_PAGES))
1660
- ], TuiDocSeeAlsoComponent);
1661
-
1662
- let TuiDocSeeAlsoModule = class TuiDocSeeAlsoModule {
1663
- };
1664
- TuiDocSeeAlsoModule = __decorate([
1665
- NgModule({
1666
- imports: [CommonModule, RouterModule, TuiLinkModule],
1667
- declarations: [TuiDocSeeAlsoComponent],
1668
- exports: [TuiDocSeeAlsoComponent],
1669
- })
1670
- ], TuiDocSeeAlsoModule);
1671
-
1672
- const TUI_DOC_SOURCE_CODE = new InjectionToken(`Source code link`, {
1673
- factory: () => ``,
1674
- });
1847
+ }
1848
+ TuiDocSeeAlsoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSeeAlsoComponent, deps: [{ token: TUI_DOC_SEE_ALSO_TEXT }, { token: TUI_DOC_PAGES }], target: i0.ɵɵFactoryTarget.Component });
1849
+ TuiDocSeeAlsoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 >\n {{ 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: i5.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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1850
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSeeAlsoComponent, decorators: [{
1851
+ type: Component,
1852
+ args: [{
1853
+ selector: `tui-doc-see-also`,
1854
+ templateUrl: `./see-also.template.html`,
1855
+ styleUrls: [`./see-also.style.less`],
1856
+ changeDetection: ChangeDetectionStrategy.OnPush,
1857
+ }]
1858
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1859
+ type: Inject,
1860
+ args: [TUI_DOC_SEE_ALSO_TEXT]
1861
+ }] }, { type: undefined, decorators: [{
1862
+ type: Inject,
1863
+ args: [TUI_DOC_PAGES]
1864
+ }] }]; }, propDecorators: { seeAlso: [{
1865
+ type: Input
1866
+ }] } });
1675
1867
 
1676
- let TuiDocSourceCodeComponent = class TuiDocSourceCodeComponent {
1677
- constructor(sourceCode, text) {
1678
- this.sourceCode = sourceCode;
1679
- this.text = text;
1868
+ class TuiDocPageComponent {
1869
+ constructor(deprecated, defaultTabs, seeAlso) {
1870
+ this.deprecated = deprecated;
1871
+ this.defaultTabs = defaultTabs;
1872
+ this.seeAlso = seeAlso;
1680
1873
  this.header = ``;
1681
1874
  this.package = ``;
1682
1875
  this.type = ``;
1683
1876
  this.path = ``;
1877
+ this.tabConnectors = EMPTY_QUERY;
1878
+ this.activeItemIndex = NaN;
1684
1879
  }
1685
- get pathOptions() {
1686
- return this.getPathOptions(this.header, this.package, this.type, this.path);
1880
+ get showSeeAlso() {
1881
+ return !!this.seeAlso.length && this.activeItemIndex === 0;
1687
1882
  }
1688
- getPathOptions(header, packageName, type, path) {
1689
- return {
1690
- header,
1691
- package: packageName,
1692
- type,
1693
- path,
1694
- };
1883
+ getRouterLink(tab = ``) {
1884
+ return `./${tab.replace(/ /g, `_`)}`;
1695
1885
  }
1696
- };
1697
- TuiDocSourceCodeComponent.ctorParameters = () => [
1698
- { type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_SOURCE_CODE,] }] },
1699
- { type: String, decorators: [{ type: Inject, args: [TUI_DOC_SOURCE_CODE_TEXT,] }] }
1700
- ];
1701
- __decorate([
1702
- Input()
1703
- ], TuiDocSourceCodeComponent.prototype, "header", void 0);
1704
- __decorate([
1705
- Input()
1706
- ], TuiDocSourceCodeComponent.prototype, "package", void 0);
1707
- __decorate([
1708
- Input()
1709
- ], TuiDocSourceCodeComponent.prototype, "type", void 0);
1710
- __decorate([
1711
- Input()
1712
- ], TuiDocSourceCodeComponent.prototype, "path", void 0);
1713
- __decorate([
1714
- tuiPure
1715
- ], TuiDocSourceCodeComponent.prototype, "getPathOptions", null);
1716
- TuiDocSourceCodeComponent = __decorate([
1717
- Component({
1718
- selector: `tui-doc-source-code`,
1719
- template: "<div\n *ngIf=\"!!sourceCode\"\n polymorpheus-outlet\n [content]=\"sourceCode\"\n [context]=\"pathOptions\"\n>\n <ng-template let-link>\n <a\n *ngIf=\"link\"\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 </ng-template>\n</div>\n",
1720
- changeDetection: ChangeDetectionStrategy.OnPush
1721
- }),
1722
- __param(0, Inject(TUI_DOC_SOURCE_CODE)),
1723
- __param(1, Inject(TUI_DOC_SOURCE_CODE_TEXT))
1724
- ], TuiDocSourceCodeComponent);
1886
+ }
1887
+ TuiDocPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocPageComponent, deps: [{ token: `deprecated`, attribute: true }, { token: TUI_DOC_DEFAULT_TABS }, { token: PAGE_SEE_ALSO }], target: i0.ɵɵFactoryTarget.Component });
1888
+ TuiDocPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocPageComponent, selector: "tui-doc-page", inputs: { header: "header", package: "package", type: "type", path: "path" }, 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 !== null\"\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=\"first; else dynamicTab\">\n <a\n *tuiItem\n tuiTab\n routerLink=\"./\"\n routerLinkActive\n [routerLinkActiveOptions]=\"{exact: true}\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-container>\n <ng-template #dynamicTab>\n <a\n *tuiItem\n tuiTab\n routerLinkActive\n [routerLink]=\"getRouterLink(tab.pageTab || defaultTabs[index])\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-template>\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}\n"], components: [{ type: i1.TuiTagComponent, selector: "tui-tag, a[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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.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: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1889
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocPageComponent, decorators: [{
1890
+ type: Component,
1891
+ args: [{
1892
+ selector: `tui-doc-page`,
1893
+ templateUrl: `./page.template.html`,
1894
+ styleUrls: [`./page.style.less`],
1895
+ changeDetection: ChangeDetectionStrategy.OnPush,
1896
+ providers: PAGE_PROVIDERS,
1897
+ }]
1898
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1899
+ type: Attribute,
1900
+ args: [`deprecated`]
1901
+ }] }, { type: undefined, decorators: [{
1902
+ type: Inject,
1903
+ args: [TUI_DOC_DEFAULT_TABS]
1904
+ }] }, { type: undefined, decorators: [{
1905
+ type: Inject,
1906
+ args: [PAGE_SEE_ALSO]
1907
+ }] }]; }, propDecorators: { header: [{
1908
+ type: Input
1909
+ }], package: [{
1910
+ type: Input
1911
+ }], type: [{
1912
+ type: Input
1913
+ }], path: [{
1914
+ type: Input
1915
+ }], tabConnectors: [{
1916
+ type: ContentChildren,
1917
+ args: [TuiDocPageTabConnectorDirective]
1918
+ }] } });
1725
1919
 
1726
- let TuiDocSourceCodeModule = class TuiDocSourceCodeModule {
1727
- };
1728
- TuiDocSourceCodeModule = __decorate([
1729
- NgModule({
1730
- declarations: [TuiDocSourceCodeComponent],
1731
- imports: [CommonModule, PolymorpheusModule, TuiButtonModule],
1732
- exports: [TuiDocSourceCodeComponent],
1733
- })
1734
- ], TuiDocSourceCodeModule);
1920
+ class TuiDocSeeAlsoModule {
1921
+ }
1922
+ TuiDocSeeAlsoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSeeAlsoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1923
+ TuiDocSeeAlsoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSeeAlsoModule, declarations: [TuiDocSeeAlsoComponent], imports: [CommonModule, RouterModule, TuiLinkModule], exports: [TuiDocSeeAlsoComponent] });
1924
+ TuiDocSeeAlsoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSeeAlsoModule, imports: [[CommonModule, RouterModule, TuiLinkModule]] });
1925
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSeeAlsoModule, decorators: [{
1926
+ type: NgModule,
1927
+ args: [{
1928
+ imports: [CommonModule, RouterModule, TuiLinkModule],
1929
+ declarations: [TuiDocSeeAlsoComponent],
1930
+ exports: [TuiDocSeeAlsoComponent],
1931
+ }]
1932
+ }] });
1735
1933
 
1736
- let TuiDocPageModule = class TuiDocPageModule {
1737
- };
1738
- TuiDocPageModule = __decorate([
1739
- NgModule({
1740
- imports: [
1934
+ class TuiDocSourceCodeModule {
1935
+ }
1936
+ TuiDocSourceCodeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSourceCodeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1937
+ TuiDocSourceCodeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSourceCodeModule, declarations: [TuiDocSourceCodeComponent], imports: [CommonModule, PolymorpheusModule, TuiButtonModule], exports: [TuiDocSourceCodeComponent] });
1938
+ TuiDocSourceCodeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSourceCodeModule, imports: [[CommonModule, PolymorpheusModule, TuiButtonModule]] });
1939
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSourceCodeModule, decorators: [{
1940
+ type: NgModule,
1941
+ args: [{
1942
+ declarations: [TuiDocSourceCodeComponent],
1943
+ imports: [CommonModule, PolymorpheusModule, TuiButtonModule],
1944
+ exports: [TuiDocSourceCodeComponent],
1945
+ }]
1946
+ }] });
1947
+
1948
+ class TuiDocPageModule {
1949
+ }
1950
+ TuiDocPageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocPageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1951
+ TuiDocPageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocPageModule, declarations: [TuiDocPageComponent, TuiDocPageTabConnectorDirective], imports: [CommonModule,
1952
+ RouterModule,
1953
+ TuiDocSeeAlsoModule,
1954
+ TuiTabsModule,
1955
+ TuiTagModule,
1956
+ TuiDocSourceCodeModule], exports: [TuiDocPageComponent, TuiDocPageTabConnectorDirective] });
1957
+ TuiDocPageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocPageModule, imports: [[
1741
1958
  CommonModule,
1742
1959
  RouterModule,
1743
1960
  TuiDocSeeAlsoModule,
1744
1961
  TuiTabsModule,
1745
1962
  TuiTagModule,
1746
1963
  TuiDocSourceCodeModule,
1747
- ],
1748
- declarations: [TuiDocPageComponent, TuiDocPageTabConnectorDirective],
1749
- exports: [TuiDocPageComponent, TuiDocPageTabConnectorDirective],
1750
- })
1751
- ], TuiDocPageModule);
1964
+ ]] });
1965
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocPageModule, decorators: [{
1966
+ type: NgModule,
1967
+ args: [{
1968
+ imports: [
1969
+ CommonModule,
1970
+ RouterModule,
1971
+ TuiDocSeeAlsoModule,
1972
+ TuiTabsModule,
1973
+ TuiTagModule,
1974
+ TuiDocSourceCodeModule,
1975
+ ],
1976
+ declarations: [TuiDocPageComponent, TuiDocPageTabConnectorDirective],
1977
+ exports: [TuiDocPageComponent, TuiDocPageTabConnectorDirective],
1978
+ }]
1979
+ }] });
1752
1980
 
1753
1981
  const TUI_EXAMPLE_PRIMARY_FILE_NAME = {
1754
1982
  TS: `TypeScript`,
@@ -1756,28 +1984,24 @@ const TUI_EXAMPLE_PRIMARY_FILE_NAME = {
1756
1984
  HTML: `HTML`,
1757
1985
  };
1758
1986
 
1759
- // TODO: 3.0 remove in ivy compilation
1760
- const DEMO_TEXTS = [`Сделано с помощью директивы: `, `Фон`, `Детали формы`];
1761
- const DOC_TEXTS = [
1762
- `Аргумент`,
1763
- `Тип`,
1764
- `Имя и описание`,
1765
- `Значение`,
1766
- `Для работы с динамическими шаблонами используется`,
1767
- ];
1768
- const EXAMPLE_TEXTS = [`Превью`, `Ссылка на пример скопирована`, `Готово`];
1769
1987
  const TUI_DOC_RUSSIAN = [
1770
1988
  {
1771
1989
  provide: TUI_DOC_DEMO_TEXTS,
1772
- useValue: DEMO_TEXTS,
1990
+ useValue: [`Сделано с помощью директивы: `, `Фон`, `Детали формы`],
1773
1991
  },
1774
1992
  {
1775
1993
  provide: TUI_DOC_DOCUMENTATION_TEXTS,
1776
- useValue: DOC_TEXTS,
1994
+ useValue: [
1995
+ `Аргумент`,
1996
+ `Тип`,
1997
+ `Имя и описание`,
1998
+ `Значение`,
1999
+ `Для работы с динамическими шаблонами используется`,
2000
+ ],
1777
2001
  },
1778
2002
  {
1779
2003
  provide: TUI_DOC_EXAMPLE_TEXTS,
1780
- useValue: EXAMPLE_TEXTS,
2004
+ useValue: [`Превью`, `Ссылка на пример скопирована`, `Готово`],
1781
2005
  },
1782
2006
  {
1783
2007
  provide: TUI_DOC_MENU_TEXT,
@@ -1797,26 +2021,33 @@ const TUI_DOC_RUSSIAN = [
1797
2021
  },
1798
2022
  ];
1799
2023
 
1800
- let TuiAddonDocModule = class TuiAddonDocModule {
1801
- };
1802
- TuiAddonDocModule = __decorate([
1803
- NgModule({
1804
- exports: [
1805
- TuiDocCodeModule,
1806
- TuiDocDemoModule,
1807
- TuiDocDocumentationModule,
1808
- TuiDocPageModule,
1809
- TuiDocExampleModule,
1810
- ],
1811
- })
1812
- ], TuiAddonDocModule);
2024
+ class TuiAddonDocModule {
2025
+ }
2026
+ TuiAddonDocModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiAddonDocModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2027
+ TuiAddonDocModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiAddonDocModule, exports: [TuiDocCodeModule,
2028
+ TuiDocDemoModule,
2029
+ TuiDocDocumentationModule,
2030
+ TuiDocPageModule,
2031
+ TuiDocExampleModule] });
2032
+ TuiAddonDocModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiAddonDocModule, imports: [TuiDocCodeModule,
2033
+ TuiDocDemoModule,
2034
+ TuiDocDocumentationModule,
2035
+ TuiDocPageModule,
2036
+ TuiDocExampleModule] });
2037
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiAddonDocModule, decorators: [{
2038
+ type: NgModule,
2039
+ args: [{
2040
+ exports: [
2041
+ TuiDocCodeModule,
2042
+ TuiDocDemoModule,
2043
+ TuiDocDocumentationModule,
2044
+ TuiDocPageModule,
2045
+ TuiDocExampleModule,
2046
+ ],
2047
+ }]
2048
+ }] });
1813
2049
 
1814
- /**
1815
- * @deprecated: use {@link tuiGenerateRoutes} instead
1816
- * Generates typical page routing structure
1817
- */
1818
- // eslint-disable-next-line @typescript-eslint/naming-convention
1819
- function generateRoutes(type) {
2050
+ function tuiGenerateRoutes(type) {
1820
2051
  return [
1821
2052
  {
1822
2053
  path: ``,
@@ -1830,7 +2061,6 @@ function generateRoutes(type) {
1830
2061
  },
1831
2062
  ];
1832
2063
  }
1833
- const tuiGenerateRoutes = generateRoutes;
1834
2064
 
1835
2065
  /**
1836
2066
  * Public API Surface of @taiga-ui/addon-doc
@@ -1840,5 +2070,5 @@ const tuiGenerateRoutes = generateRoutes;
1840
2070
  * Generated bundle index. Do not edit.
1841
2071
  */
1842
2072
 
1843
- export { DEMO_TEXTS, DOC_TEXTS, EXAMPLE_TEXTS, ScrollIntoViewDirective, ScrollIntoViewModule, TUI_DOC_CODE_ACTIONS, TUI_DOC_CODE_EDITOR, TUI_DOC_DEFAULT_TABS, TUI_DOC_DEMO_TEXTS, TUI_DOC_DOCUMENTATION_TEXTS, TUI_DOC_EXAMPLE_CONTENT_PROCESSOR, TUI_DOC_EXAMPLE_TEXTS, TUI_DOC_LOGO, TUI_DOC_MENU_TEXT, TUI_DOC_PAGES, TUI_DOC_PAGE_LOADED, TUI_DOC_RUSSIAN, TUI_DOC_SCROLL_BEHAVIOR, TUI_DOC_SEARCH_TEXT, TUI_DOC_SEE_ALSO, TUI_DOC_SEE_ALSO_TEXT, TUI_DOC_SOURCE_CODE, TUI_DOC_SOURCE_CODE_TEXT, TUI_DOC_TITLE, TUI_EXAMPLE_PRIMARY_FILE_NAME, TuiAddonDocModule, TuiDocCodeComponent, TuiDocCodeModule, TuiDocCopyComponent, TuiDocCopyModule, TuiDocDemoComponent, TuiDocDemoModule, TuiDocDocumentationComponent, TuiDocDocumentationModule, TuiDocDocumentationPropertyConnectorDirective, TuiDocExampleComponent, TuiDocExampleModule, TuiDocMainComponent, TuiDocMainModule, TuiDocNavigationComponent, TuiDocNavigationModule, TuiDocPageComponent, TuiDocPageModule, TuiDocPageTabConnectorDirective, TuiLanguageSwitcherComponent, TuiLanguageSwitcherModule, TuiScrollIntoViewLinkDirective, TuiScrollIntoViewLinkModule, coerceValue, generateRoutes, rawLoad, rawLoadRecord, tryParseMarkdownCodeBlock, tuiCoerceValue, tuiGenerateRoutes, tuiRawLoad, tuiRawLoadRecord, tuiTryParseMarkdownCodeBlock, TuiInputOpacityModule as ɵa, TuiInputOpacityDirective as ɵb, TuiDocExampleGetTabsPipe as ɵc, TuiDocExampleCapitalizePipe as ɵd, TuiDocHeaderModule as ɵe, NAVIGATION_TITLE as ɵf, NAVIGATION_LABELS as ɵg, NAVIGATION_ITEMS as ɵh, NAVIGATION_PROVIDERS as ɵi, titleProviderFactory as ɵj, labelsProviderFactory as ɵk, itemsProviderFactory as ɵl, TuiDocHeaderComponent as ɵm, PAGE_SEE_ALSO as ɵn, PAGE_PROVIDERS as ɵo, seeAlsoProviderFactory as ɵp, TuiDocSeeAlsoModule as ɵq, TuiDocSeeAlsoComponent as ɵr, TuiDocSourceCodeModule as ɵs, TuiDocSourceCodeComponent as ɵt };
2073
+ export { TUI_DOC_CODE_ACTIONS, TUI_DOC_CODE_EDITOR, TUI_DOC_DEFAULT_TABS, TUI_DOC_DEMO_TEXTS, TUI_DOC_DOCUMENTATION_TEXTS, TUI_DOC_EXAMPLE_CONTENT_PROCESSOR, TUI_DOC_EXAMPLE_TEXTS, TUI_DOC_LOGO, TUI_DOC_MENU_TEXT, TUI_DOC_PAGES, TUI_DOC_PAGE_LOADED, TUI_DOC_RUSSIAN, TUI_DOC_SCROLL_BEHAVIOR, TUI_DOC_SEARCH_TEXT, TUI_DOC_SEE_ALSO, TUI_DOC_SEE_ALSO_TEXT, TUI_DOC_SOURCE_CODE, TUI_DOC_SOURCE_CODE_TEXT, TUI_DOC_TITLE, TUI_EXAMPLE_PRIMARY_FILE_NAME, TuiAddonDocModule, TuiDocCodeComponent, TuiDocCodeModule, TuiDocCopyComponent, TuiDocCopyModule, TuiDocDemoComponent, TuiDocDemoModule, TuiDocDocumentationComponent, TuiDocDocumentationModule, TuiDocDocumentationPropertyConnectorDirective, TuiDocExampleCapitalizePipe, TuiDocExampleComponent, TuiDocExampleGetTabsPipe, TuiDocExampleModule, TuiDocMainComponent, TuiDocMainModule, TuiDocNavigationComponent, TuiDocNavigationModule, TuiDocPageComponent, TuiDocPageModule, TuiDocPageTabConnectorDirective, TuiLanguageSwitcherComponent, TuiLanguageSwitcherModule, TuiScrollIntoViewLinkDirective, TuiScrollIntoViewLinkModule, tuiCoerceValue, tuiGenerateRoutes, tuiRawLoad, tuiRawLoadRecord, tuiTryParseMarkdownCodeBlock };
1844
2074
  //# sourceMappingURL=taiga-ui-addon-doc.js.map