@taiga-ui/addon-doc 2.55.0 → 3.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/addon-doc.module.d.ts +9 -0
- package/bundles/taiga-ui-addon-doc.umd.js +1777 -1335
- package/bundles/taiga-ui-addon-doc.umd.js.map +1 -1
- package/components/code/code.component.d.ts +3 -0
- package/components/code/code.module.d.ts +7 -0
- package/components/copy/copy.component.d.ts +3 -0
- package/components/copy/copy.module.d.ts +7 -0
- package/components/demo/demo.component.d.ts +3 -0
- package/components/demo/demo.module.d.ts +11 -0
- package/components/documentation/documentation-property-connector.directive.d.ts +3 -0
- package/components/documentation/documentation.component.d.ts +3 -0
- package/components/documentation/documentation.module.d.ts +12 -0
- package/components/example/example-capitalize.pipe.d.ts +3 -0
- package/components/example/example-get-tabs.pipe.d.ts +3 -0
- package/components/example/example.component.d.ts +8 -5
- package/components/example/example.module.d.ts +14 -0
- package/components/main/main.component.d.ts +3 -0
- package/components/main/main.module.d.ts +12 -0
- package/components/navigation/navigation.component.d.ts +3 -0
- package/components/navigation/navigation.module.d.ts +12 -0
- package/components/page/page-tab.directive.d.ts +3 -0
- package/components/page/page.component.d.ts +3 -0
- package/components/page/page.module.d.ts +11 -0
- package/directives/scroll-into-view/scroll-into-view.directive.d.ts +5 -0
- package/directives/scroll-into-view/scroll-into-view.module.d.ts +8 -0
- package/esm2015/addon-doc.module.js +27 -16
- package/esm2015/components/code/code.component.js +25 -23
- package/esm2015/components/code/code.module.js +15 -12
- package/esm2015/components/code/parse-code-block.js +3 -3
- package/esm2015/components/copy/copy.component.js +24 -19
- package/esm2015/components/copy/copy.module.js +15 -12
- package/esm2015/components/demo/demo.component.js +80 -63
- package/esm2015/components/demo/demo.module.js +54 -13
- package/esm2015/components/documentation/documentation-property-connector.directive.js +51 -52
- package/esm2015/components/documentation/documentation.component.js +72 -64
- package/esm2015/components/documentation/documentation.module.js +62 -19
- package/esm2015/components/example/example-capitalize.pipe.js +13 -10
- package/esm2015/components/example/example-get-tabs.pipe.js +10 -8
- package/esm2015/components/example/example.component.js +88 -66
- package/esm2015/components/example/example.module.js +42 -21
- package/esm2015/components/main/main.component.js +49 -35
- package/esm2015/components/main/main.module.js +36 -13
- package/esm2015/components/navigation/navigation.component.js +86 -63
- package/esm2015/components/navigation/navigation.module.js +56 -13
- package/esm2015/components/navigation/navigation.providers.js +4 -4
- package/esm2015/components/page/page-tab.directive.js +18 -15
- package/esm2015/components/page/page.component.js +48 -43
- package/esm2015/components/page/page.module.js +28 -13
- package/esm2015/components/page/page.providers.js +4 -4
- package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +38 -35
- package/esm2015/directives/scroll-into-view/scroll-into-view.module.js +26 -22
- package/esm2015/interfaces/code-editor.js +2 -1
- package/esm2015/interfaces/page.js +4 -4
- package/esm2015/interfaces/source-code-path-options.js +2 -1
- package/esm2015/internal/header/header.component.js +35 -24
- package/esm2015/internal/header/header.module.js +28 -13
- package/esm2015/internal/input-opacity/input-opacity.directive.js +21 -20
- package/esm2015/internal/input-opacity/input-opacity.module.js +14 -11
- package/esm2015/internal/see-also/see-also.component.js +28 -24
- package/esm2015/internal/see-also/see-also.module.js +15 -12
- package/esm2015/internal/source-code/source-code.component.js +35 -34
- package/esm2015/internal/source-code/source-code.module.js +15 -12
- package/esm2015/languages/russian.js +14 -18
- package/esm2015/public-api.js +8 -1
- package/esm2015/taiga-ui-addon-doc.js +1 -13
- package/esm2015/tokens/code-actions.js +3 -3
- package/esm2015/tokens/code-editor.js +2 -2
- package/esm2015/tokens/default-tabs.js +2 -2
- package/esm2015/tokens/example-content-processor.js +2 -2
- package/esm2015/tokens/i18n.js +19 -19
- package/esm2015/tokens/logo.js +3 -3
- package/esm2015/tokens/page-loaded.js +2 -2
- package/esm2015/tokens/pages.js +2 -2
- package/esm2015/tokens/scroll-behavior.js +2 -2
- package/esm2015/tokens/see-also.js +2 -2
- package/esm2015/tokens/source-code.js +3 -3
- package/esm2015/tokens/title.js +3 -3
- package/esm2015/types/pages.js +2 -1
- package/esm2015/utils/coerce-value.js +6 -6
- package/esm2015/utils/color-conversion.js +5 -5
- package/esm2015/utils/generate-routes.js +4 -10
- package/esm2015/utils/inspect.js +13 -13
- package/esm2015/utils/raw-load-record.js +1 -1
- package/esm2015/utils/raw-load.js +13 -2
- package/esm2015/utils/transliterate-keyboard-layout.js +34 -34
- package/fesm2015/taiga-ui-addon-doc.js +1256 -924
- package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
- package/interfaces/code-editor.d.ts +0 -10
- package/internal/header/header.component.d.ts +3 -0
- package/internal/header/header.module.d.ts +11 -0
- package/internal/input-opacity/input-opacity.directive.d.ts +3 -0
- package/internal/input-opacity/input-opacity.module.d.ts +5 -0
- package/internal/see-also/see-also.component.d.ts +3 -0
- package/internal/see-also/see-also.module.d.ts +8 -0
- package/internal/source-code/source-code.component.d.ts +3 -0
- package/internal/source-code/source-code.module.d.ts +8 -0
- package/languages/russian.d.ts +0 -3
- package/package.json +11 -14
- package/public-api.d.ts +2 -0
- package/taiga-ui-addon-doc.d.ts +1 -12
- package/utils/generate-routes.d.ts +1 -6
- package/bundles/taiga-ui-addon-doc.umd.min.js +0 -2
- package/bundles/taiga-ui-addon-doc.umd.min.js.map +0 -1
- package/esm5/addon-doc.module.js +0 -25
- package/esm5/components/code/code.component.js +0 -46
- package/esm5/components/code/code.module.js +0 -19
- package/esm5/components/code/parse-code-block.js +0 -21
- package/esm5/components/copy/copy.component.js +0 -43
- package/esm5/components/copy/copy.module.js +0 -19
- package/esm5/components/demo/demo.component.js +0 -153
- package/esm5/components/demo/demo.module.js +0 -43
- package/esm5/components/documentation/documentation-property-connector.directive.js +0 -133
- package/esm5/components/documentation/documentation.component.js +0 -145
- package/esm5/components/documentation/documentation.module.js +0 -50
- package/esm5/components/example/example-capitalize.pipe.js +0 -16
- package/esm5/components/example/example-get-tabs.pipe.js +0 -15
- package/esm5/components/example/example.component.js +0 -135
- package/esm5/components/example/example.module.js +0 -42
- package/esm5/components/main/main.component.js +0 -58
- package/esm5/components/main/main.module.js +0 -35
- package/esm5/components/navigation/navigation.component.js +0 -203
- package/esm5/components/navigation/navigation.module.js +0 -45
- package/esm5/components/navigation/navigation.providers.js +0 -59
- package/esm5/components/page/page-tab.directive.js +0 -24
- package/esm5/components/page/page.component.js +0 -67
- package/esm5/components/page/page.module.js +0 -30
- package/esm5/components/page/page.providers.js +0 -22
- package/esm5/directives/scroll-into-view/scroll-into-view.directive.js +0 -65
- package/esm5/directives/scroll-into-view/scroll-into-view.module.js +0 -34
- package/esm5/interfaces/code-editor.js +0 -1
- package/esm5/interfaces/page.js +0 -6
- package/esm5/interfaces/source-code-path-options.js +0 -1
- package/esm5/internal/header/header.component.js +0 -47
- package/esm5/internal/header/header.module.js +0 -30
- package/esm5/internal/input-opacity/input-opacity.directive.js +0 -36
- package/esm5/internal/input-opacity/input-opacity.module.js +0 -16
- package/esm5/internal/see-also/see-also.component.js +0 -44
- package/esm5/internal/see-also/see-also.module.js +0 -20
- package/esm5/internal/source-code/source-code.component.js +0 -61
- package/esm5/internal/source-code/source-code.module.js +0 -20
- package/esm5/languages/russian.js +0 -42
- package/esm5/public-api.js +0 -49
- package/esm5/taiga-ui-addon-doc.js +0 -17
- package/esm5/tokens/code-actions.js +0 -5
- package/esm5/tokens/code-editor.js +0 -3
- package/esm5/tokens/default-tabs.js +0 -5
- package/esm5/tokens/example-content-processor.js +0 -4
- package/esm5/tokens/i18n.js +0 -54
- package/esm5/tokens/logo.js +0 -5
- package/esm5/tokens/page-loaded.js +0 -5
- package/esm5/tokens/pages.js +0 -5
- package/esm5/tokens/scroll-behavior.js +0 -3
- package/esm5/tokens/see-also.js +0 -5
- package/esm5/tokens/source-code.js +0 -5
- package/esm5/tokens/title.js +0 -5
- package/esm5/types/pages.js +0 -1
- package/esm5/utils/coerce-value.js +0 -44
- package/esm5/utils/color-conversion.js +0 -27
- package/esm5/utils/generate-routes.js +0 -21
- package/esm5/utils/inspect.js +0 -68
- package/esm5/utils/raw-load-record.js +0 -50
- package/esm5/utils/raw-load.js +0 -26
- package/esm5/utils/transliterate-keyboard-layout.js +0 -50
- package/fesm5/taiga-ui-addon-doc.js +0 -2007
- package/fesm5/taiga-ui-addon-doc.js.map +0 -1
- package/taiga-ui-addon-doc.metadata.json +0 -1
|
@@ -1,29 +1,53 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Input, HostBinding,
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
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 i8 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 i4 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
|
|
12
|
+
import * as i3 from '@taiga-ui/cdk';
|
|
13
|
+
import { TuiDestroyService, tuiPure, tuiPx, TUI_IS_MOBILE, TuiDragModule, TUI_FOCUSABLE_ITEM_ACCESSOR, EMPTY_QUERY, itemsQueryListObservable, watch, tuiIsString, tuiIsNumber, TUI_IS_CYPRESS, isPresent, getElementObscurers, uniqBy, TuiSwipeService, TuiActiveZoneModule, TuiLetModule, TuiAutoFocusModule, tuiDefaultProp } from '@taiga-ui/cdk';
|
|
14
|
+
import * as i2$1 from '@taiga-ui/kit';
|
|
9
15
|
import { TUI_COPY_TEXTS, TuiSelectModule, TuiRadioBlockModule, TuiCheckboxLabeledModule, TuiDataListWrapperModule, TuiBadgeModule, TuiToggleModule, TuiInputCountModule, TuiTabsModule, TuiAccordionModule, TuiTagModule } from '@taiga-ui/kit';
|
|
10
|
-
import
|
|
16
|
+
import * as i1 from '@taiga-ui/core';
|
|
17
|
+
import { TuiButtonModule, TuiModeDirective, TuiLinkModule, TuiExpandModule, TuiGroupModule, TuiTooltipModule, TuiModeModule, TuiSvgModule, TuiDataListModule, TuiTextfieldControllerModule, TuiHintControllerModule, TuiPrimitiveTextfieldModule, TuiDropdownControllerModule, TuiNotificationModule, tuiCapitalizeFirstLetter, TuiAlertService, 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 i5 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$1 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 from '@tinkoff/ng-polymorpheus';
|
|
16
27
|
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
17
|
-
import
|
|
28
|
+
import * as i7 from '@angular/platform-browser';
|
|
18
29
|
import { Title } from '@angular/platform-browser';
|
|
30
|
+
import * as i4$1 from '@taiga-ui/addon-mobile';
|
|
31
|
+
import { TuiSidebarDirective, TuiSidebarModule } from '@taiga-ui/addon-mobile';
|
|
19
32
|
|
|
33
|
+
// TODO: delete it when all `!!raw-loader!` will be replaced by webpack `asset/source`.
|
|
34
|
+
function trimExportDefault(fileContent) {
|
|
35
|
+
return fileContent.startsWith(`export default "`)
|
|
36
|
+
? fileContent
|
|
37
|
+
.replace(/^export\sdefault\s["']/gi, ``)
|
|
38
|
+
.replace(/['"];$/gi, ``)
|
|
39
|
+
.replaceAll(`\\n`, `\n`)
|
|
40
|
+
.replaceAll(`\\"`, `"`)
|
|
41
|
+
: fileContent;
|
|
42
|
+
}
|
|
20
43
|
/**
|
|
21
44
|
* @deprecated: use {@link tuiRawLoad} instead
|
|
22
45
|
*/
|
|
23
46
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
24
47
|
function rawLoad(content) {
|
|
25
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
|
|
49
|
+
const unpacked = content instanceof Promise ? (yield content).default : content;
|
|
50
|
+
return trimExportDefault(unpacked);
|
|
27
51
|
});
|
|
28
52
|
}
|
|
29
53
|
const tuiRawLoad = rawLoad;
|
|
@@ -32,19 +56,19 @@ const tuiRawLoad = rawLoad;
|
|
|
32
56
|
* @deprecated: use {@link tuiTryParseMarkdownCodeBlock} instead
|
|
33
57
|
*/
|
|
34
58
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
35
|
-
function tryParseMarkdownCodeBlock(text =
|
|
59
|
+
function tryParseMarkdownCodeBlock(text = ``) {
|
|
36
60
|
const tokens = new MarkdownIt().parse(text, {});
|
|
37
61
|
const result = tokens
|
|
38
|
-
.filter(({ tag, type }) => tag ===
|
|
62
|
+
.filter(({ tag, type }) => tag === `code` && type === `fence`)
|
|
39
63
|
.map(({ content }) => content);
|
|
40
64
|
return result.length ? result : [text];
|
|
41
65
|
}
|
|
42
66
|
const tuiTryParseMarkdownCodeBlock = tryParseMarkdownCodeBlock;
|
|
43
67
|
|
|
44
|
-
|
|
68
|
+
class TuiDocCodeComponent {
|
|
45
69
|
constructor() {
|
|
46
|
-
this.rawLoader$$ = new BehaviorSubject(
|
|
47
|
-
this.filename =
|
|
70
|
+
this.rawLoader$$ = new BehaviorSubject(``);
|
|
71
|
+
this.filename = ``;
|
|
48
72
|
this.processor$ = this.rawLoader$$.pipe(switchMap(rawLoad), map(tryParseMarkdownCodeBlock));
|
|
49
73
|
}
|
|
50
74
|
set code(code) {
|
|
@@ -53,37 +77,42 @@ let TuiDocCodeComponent = class TuiDocCodeComponent {
|
|
|
53
77
|
get hasFilename() {
|
|
54
78
|
return !!this.filename;
|
|
55
79
|
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
]
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
]
|
|
80
|
+
}
|
|
81
|
+
TuiDocCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
82
|
+
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: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.Highlight, selector: "[highlight]", inputs: ["highlight", "languages", "lineNumbers"], outputs: ["highlighted"] }], pipes: { "async": i4.AsyncPipe } });
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCodeComponent, decorators: [{
|
|
84
|
+
type: Component,
|
|
85
|
+
args: [{
|
|
86
|
+
selector: `tui-doc-code`,
|
|
87
|
+
templateUrl: `./code.template.html`,
|
|
88
|
+
styleUrls: [`./code.style.less`],
|
|
89
|
+
}]
|
|
90
|
+
}], propDecorators: { filename: [{
|
|
91
|
+
type: Input
|
|
92
|
+
}], code: [{
|
|
93
|
+
type: Input
|
|
94
|
+
}], hasFilename: [{
|
|
95
|
+
type: HostBinding,
|
|
96
|
+
args: [`class._has-filename`]
|
|
97
|
+
}] } });
|
|
73
98
|
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
TuiDocCodeModule =
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
],
|
|
99
|
+
class TuiDocCodeModule {
|
|
100
|
+
}
|
|
101
|
+
TuiDocCodeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCodeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
102
|
+
TuiDocCodeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCodeModule, declarations: [TuiDocCodeComponent], imports: [CommonModule, HighlightModule], exports: [TuiDocCodeComponent] });
|
|
103
|
+
TuiDocCodeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCodeModule, imports: [[CommonModule, HighlightModule]] });
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCodeModule, decorators: [{
|
|
105
|
+
type: NgModule,
|
|
106
|
+
args: [{
|
|
107
|
+
imports: [CommonModule, HighlightModule],
|
|
108
|
+
declarations: [TuiDocCodeComponent],
|
|
109
|
+
exports: [TuiDocCodeComponent],
|
|
110
|
+
}]
|
|
111
|
+
}] });
|
|
83
112
|
|
|
84
113
|
const COPIED_TIMEOUT = 1500;
|
|
85
114
|
// @dynamic
|
|
86
|
-
|
|
115
|
+
class TuiDocCopyComponent {
|
|
87
116
|
constructor(texts$) {
|
|
88
117
|
this.texts$ = texts$;
|
|
89
118
|
this.copy$ = new Subject();
|
|
@@ -94,33 +123,39 @@ let TuiDocCopyComponent = class TuiDocCopyComponent {
|
|
|
94
123
|
onClick() {
|
|
95
124
|
this.copy$.next();
|
|
96
125
|
}
|
|
97
|
-
}
|
|
98
|
-
TuiDocCopyComponent
|
|
99
|
-
{ type:
|
|
100
|
-
];
|
|
126
|
+
}
|
|
127
|
+
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 });
|
|
128
|
+
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: i1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
101
129
|
__decorate([
|
|
102
130
|
tuiPure
|
|
103
131
|
], TuiDocCopyComponent.prototype, "copied$", null);
|
|
104
|
-
TuiDocCopyComponent
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
],
|
|
132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCopyComponent, decorators: [{
|
|
133
|
+
type: Component,
|
|
134
|
+
args: [{
|
|
135
|
+
selector: `tui-doc-copy`,
|
|
136
|
+
templateUrl: `./copy.template.html`,
|
|
137
|
+
styleUrls: [`./copy.style.less`],
|
|
138
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
139
|
+
providers: [TuiDestroyService],
|
|
140
|
+
}]
|
|
141
|
+
}], ctorParameters: function () { return [{ type: i8.Observable, decorators: [{
|
|
142
|
+
type: Inject,
|
|
143
|
+
args: [TUI_COPY_TEXTS]
|
|
144
|
+
}] }]; }, propDecorators: { copied$: [] } });
|
|
114
145
|
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
TuiDocCopyModule =
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
],
|
|
146
|
+
class TuiDocCopyModule {
|
|
147
|
+
}
|
|
148
|
+
TuiDocCopyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCopyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
149
|
+
TuiDocCopyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCopyModule, declarations: [TuiDocCopyComponent], imports: [CommonModule, TuiButtonModule], exports: [TuiDocCopyComponent] });
|
|
150
|
+
TuiDocCopyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCopyModule, imports: [[CommonModule, TuiButtonModule]] });
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocCopyModule, decorators: [{
|
|
152
|
+
type: NgModule,
|
|
153
|
+
args: [{
|
|
154
|
+
imports: [CommonModule, TuiButtonModule],
|
|
155
|
+
declarations: [TuiDocCopyComponent],
|
|
156
|
+
exports: [TuiDocCopyComponent],
|
|
157
|
+
}]
|
|
158
|
+
}] });
|
|
124
159
|
|
|
125
160
|
/**
|
|
126
161
|
* TODO: think about reorganization in @taiga-ui/i18n way
|
|
@@ -129,8 +164,8 @@ TuiDocCopyModule = __decorate([
|
|
|
129
164
|
* Works with a tuple
|
|
130
165
|
* [@string tuiMode tooltip content, @string word 'background', @string 'form value']
|
|
131
166
|
*/
|
|
132
|
-
const TUI_DOC_DEMO_TEXTS = new InjectionToken(
|
|
133
|
-
factory: () => [
|
|
167
|
+
const TUI_DOC_DEMO_TEXTS = new InjectionToken(`tui-doc-demo i18n texts`, {
|
|
168
|
+
factory: () => [`Read more more about modes: `, `Background`, `Form value`],
|
|
134
169
|
});
|
|
135
170
|
/**
|
|
136
171
|
* Works with a tuple
|
|
@@ -142,13 +177,13 @@ const TUI_DOC_DEMO_TEXTS = new InjectionToken('tui-doc-demo i18n texts', {
|
|
|
142
177
|
* @string message for tooltip about ng-polymorpheus
|
|
143
178
|
* ]
|
|
144
179
|
*/
|
|
145
|
-
const TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken(
|
|
180
|
+
const TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken(`tui-doc-documentation i18n texts`, {
|
|
146
181
|
factory: () => [
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
182
|
+
`Argument`,
|
|
183
|
+
`Type`,
|
|
184
|
+
`Name and description`,
|
|
185
|
+
`Value`,
|
|
186
|
+
`Learn about our dynamic templates from `,
|
|
152
187
|
],
|
|
153
188
|
});
|
|
154
189
|
/**
|
|
@@ -159,26 +194,25 @@ const TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken('tui-doc-documentation i1
|
|
|
159
194
|
* @string link to a sample copied message label
|
|
160
195
|
* ]
|
|
161
196
|
*/
|
|
162
|
-
const TUI_DOC_EXAMPLE_TEXTS = new InjectionToken(
|
|
163
|
-
factory: () => [
|
|
197
|
+
const TUI_DOC_EXAMPLE_TEXTS = new InjectionToken(`tui-doc-example i18n texts`, {
|
|
198
|
+
factory: () => [`Preview`, `Link to a sample was successfully copied`, `Done`],
|
|
164
199
|
});
|
|
165
|
-
const TUI_DOC_MENU_TEXT = new InjectionToken(
|
|
166
|
-
factory: () =>
|
|
200
|
+
const TUI_DOC_MENU_TEXT = new InjectionToken(`menu i18n text`, {
|
|
201
|
+
factory: () => `Menu`,
|
|
167
202
|
});
|
|
168
|
-
const TUI_DOC_SEARCH_TEXT = new InjectionToken(
|
|
169
|
-
factory: () =>
|
|
203
|
+
const TUI_DOC_SEARCH_TEXT = new InjectionToken(`search i18n text`, {
|
|
204
|
+
factory: () => `Search`,
|
|
170
205
|
});
|
|
171
|
-
const TUI_DOC_SEE_ALSO_TEXT = new InjectionToken(
|
|
172
|
-
factory: () =>
|
|
206
|
+
const TUI_DOC_SEE_ALSO_TEXT = new InjectionToken(`tui-doc-see-also i18n text`, {
|
|
207
|
+
factory: () => `See also`,
|
|
173
208
|
});
|
|
174
|
-
const TUI_DOC_SOURCE_CODE_TEXT = new InjectionToken(
|
|
175
|
-
factory: () =>
|
|
209
|
+
const TUI_DOC_SOURCE_CODE_TEXT = new InjectionToken(`tui-doc-source-code i18n text`, {
|
|
210
|
+
factory: () => `Source code`,
|
|
176
211
|
});
|
|
177
212
|
|
|
178
|
-
var TuiDocDemoComponent_1;
|
|
179
213
|
const MIN_COMPONENT_WIDTH = 104;
|
|
180
214
|
// @dynamic
|
|
181
|
-
|
|
215
|
+
class TuiDocDemoComponent {
|
|
182
216
|
constructor(isMobile, destroy$, renderer, platformId, locationRef, urlSerializer, texts) {
|
|
183
217
|
this.isMobile = isMobile;
|
|
184
218
|
this.destroy$ = destroy$;
|
|
@@ -188,14 +222,14 @@ let TuiDocDemoComponent = TuiDocDemoComponent_1 = class TuiDocDemoComponent {
|
|
|
188
222
|
this.wrapperWidth = 0;
|
|
189
223
|
this.control = null;
|
|
190
224
|
this.template = null;
|
|
191
|
-
this.updateOnVariants = [
|
|
192
|
-
this.updateOn =
|
|
225
|
+
this.updateOnVariants = [`change`, `blur`, `submit`];
|
|
226
|
+
this.updateOn = `change`;
|
|
193
227
|
this.expanded = false;
|
|
194
228
|
this.opaque = true;
|
|
195
229
|
this.modeControl = new FormControl();
|
|
196
230
|
this.mode = null;
|
|
197
231
|
this.change$ = new Subject();
|
|
198
|
-
this.items = [
|
|
232
|
+
this.items = [`onLight`, `onDark`];
|
|
199
233
|
this.isBrowser = isPlatformBrowser(platformId);
|
|
200
234
|
const parsedMode = locationRef.path().match(/tuiMode=(onDark|onLight)/);
|
|
201
235
|
if (parsedMode !== null && parsedMode.length > 0) {
|
|
@@ -226,9 +260,9 @@ let TuiDocDemoComponent = TuiDocDemoComponent_1 = class TuiDocDemoComponent {
|
|
|
226
260
|
}
|
|
227
261
|
const paddingLeft = this.isBrowser
|
|
228
262
|
? getComputedStyle(this.content.nativeElement).paddingLeft
|
|
229
|
-
:
|
|
263
|
+
: `0`;
|
|
230
264
|
const { offsetWidth } = this.content.nativeElement;
|
|
231
|
-
this.resizerText.nativeElement.textContent = String(offsetWidth - parseInt(paddingLeft ||
|
|
265
|
+
this.resizerText.nativeElement.textContent = String(offsetWidth - parseInt(paddingLeft || `0`, 10) * 2);
|
|
232
266
|
}
|
|
233
267
|
onDragStart(event) {
|
|
234
268
|
event.preventDefault();
|
|
@@ -261,64 +295,95 @@ let TuiDocDemoComponent = TuiDocDemoComponent_1 = class TuiDocDemoComponent {
|
|
|
261
295
|
if (!this.wrapper) {
|
|
262
296
|
return;
|
|
263
297
|
}
|
|
264
|
-
this.renderer.setStyle(this.wrapper.nativeElement,
|
|
298
|
+
this.renderer.setStyle(this.wrapper.nativeElement, `width`, tuiPx(Math.max(this.wrapperWidth - delta, MIN_COMPONENT_WIDTH)));
|
|
265
299
|
}
|
|
266
|
-
}
|
|
267
|
-
TuiDocDemoComponent
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
{ type: Array, decorators: [{ type: Inject, args: [TUI_DOC_DEMO_TEXTS,] }] }
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
],
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
],
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
300
|
+
}
|
|
301
|
+
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 });
|
|
302
|
+
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: [
|
|
303
|
+
TuiDestroyService,
|
|
304
|
+
{
|
|
305
|
+
provide: TuiModeDirective,
|
|
306
|
+
useExisting: forwardRef(() => TuiDocDemoComponent),
|
|
307
|
+
},
|
|
308
|
+
], 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: i1.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { type: i2$1.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { type: i2$1.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items"] }, { type: i1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "mode", "direction", "showDelay", "hideDelay", "describeId"] }, { type: i2$1.TuiRadioBlockComponent, selector: "tui-radio-block", inputs: ["item", "identityMatcher", "contentAlign", "size", "hideRadio", "pseudoDisabled"] }, { type: i2$1.TuiCheckboxLabeledComponent, selector: "tui-checkbox-labeled", inputs: ["size"] }, { type: i1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1.TuiExpandComponent, selector: "tui-expand", inputs: ["async", "expanded"] }], directives: [{ type: i1.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i5.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.TuiSelectDirective, selector: "tui-select" }, { type: i1.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { type: i1.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { type: i1.TuiHintControllerDirective, selector: "[tuiHintContent]", inputs: ["tuiHintContent", "tuiHintDirection", "tuiHintMode", "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: i1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i1.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: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.TuiExpandContentDirective, selector: "[tuiExpandContent]" }, { type: i3.TuiDragDirective, selector: "[tuiDragStart], [tuiDragContinues], [tuiDragEnd]", outputs: ["tuiDragStart", "tuiDragContinues", "tuiDragEnd"] }], pipes: { "json": i4.JsonPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDemoComponent, decorators: [{
|
|
310
|
+
type: Component,
|
|
311
|
+
args: [{
|
|
312
|
+
selector: `tui-doc-demo`,
|
|
313
|
+
templateUrl: `./demo.template.html`,
|
|
314
|
+
styleUrls: [`./demo.style.less`],
|
|
315
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
316
|
+
providers: [
|
|
317
|
+
TuiDestroyService,
|
|
318
|
+
{
|
|
319
|
+
provide: TuiModeDirective,
|
|
320
|
+
useExisting: forwardRef(() => TuiDocDemoComponent),
|
|
321
|
+
},
|
|
322
|
+
],
|
|
323
|
+
}]
|
|
324
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
325
|
+
type: Inject,
|
|
326
|
+
args: [TUI_IS_MOBILE]
|
|
327
|
+
}] }, { type: i3.TuiDestroyService, decorators: [{
|
|
328
|
+
type: Inject,
|
|
329
|
+
args: [TuiDestroyService]
|
|
330
|
+
}] }, { type: i0.Renderer2, decorators: [{
|
|
331
|
+
type: Inject,
|
|
332
|
+
args: [Renderer2]
|
|
333
|
+
}] }, { type: undefined, decorators: [{
|
|
334
|
+
type: Inject,
|
|
335
|
+
args: [PLATFORM_ID]
|
|
336
|
+
}] }, { type: i4.Location, decorators: [{
|
|
337
|
+
type: Inject,
|
|
338
|
+
args: [Location$1]
|
|
339
|
+
}] }, { type: i5.UrlSerializer, decorators: [{
|
|
340
|
+
type: Inject,
|
|
341
|
+
args: [UrlSerializer]
|
|
342
|
+
}] }, { type: undefined, decorators: [{
|
|
343
|
+
type: Inject,
|
|
344
|
+
args: [TUI_DOC_DEMO_TEXTS]
|
|
345
|
+
}] }]; }, propDecorators: { content: [{
|
|
346
|
+
type: ViewChild,
|
|
347
|
+
args: [`content`]
|
|
348
|
+
}], wrapper: [{
|
|
349
|
+
type: ViewChild,
|
|
350
|
+
args: [`wrapper`]
|
|
351
|
+
}], resizerText: [{
|
|
352
|
+
type: ViewChild,
|
|
353
|
+
args: [`resizerText`]
|
|
354
|
+
}], control: [{
|
|
355
|
+
type: Input
|
|
356
|
+
}], template: [{
|
|
357
|
+
type: ContentChild,
|
|
358
|
+
args: [TemplateRef]
|
|
359
|
+
}], onResize: [{
|
|
360
|
+
type: HostListener,
|
|
361
|
+
args: [`window:resize`]
|
|
362
|
+
}] } });
|
|
316
363
|
|
|
317
|
-
|
|
318
|
-
}
|
|
319
|
-
TuiDocDemoModule =
|
|
320
|
-
|
|
321
|
-
|
|
364
|
+
class TuiDocDemoModule {
|
|
365
|
+
}
|
|
366
|
+
TuiDocDemoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDemoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
367
|
+
TuiDocDemoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDemoModule, declarations: [TuiDocDemoComponent], imports: [CommonModule,
|
|
368
|
+
ReactiveFormsModule,
|
|
369
|
+
FormsModule,
|
|
370
|
+
RouterModule,
|
|
371
|
+
TuiLinkModule,
|
|
372
|
+
TuiDragModule,
|
|
373
|
+
TuiButtonModule,
|
|
374
|
+
TuiSelectModule,
|
|
375
|
+
TuiExpandModule,
|
|
376
|
+
TuiGroupModule,
|
|
377
|
+
TuiTooltipModule,
|
|
378
|
+
TuiModeModule,
|
|
379
|
+
TuiRadioBlockModule,
|
|
380
|
+
TuiCheckboxLabeledModule,
|
|
381
|
+
TuiSvgModule,
|
|
382
|
+
TuiDataListWrapperModule,
|
|
383
|
+
TuiDataListModule,
|
|
384
|
+
TuiTextfieldControllerModule,
|
|
385
|
+
TuiHintControllerModule], exports: [TuiDocDemoComponent] });
|
|
386
|
+
TuiDocDemoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDemoModule, imports: [[
|
|
322
387
|
CommonModule,
|
|
323
388
|
ReactiveFormsModule,
|
|
324
389
|
FormsModule,
|
|
@@ -338,11 +403,35 @@ TuiDocDemoModule = __decorate([
|
|
|
338
403
|
TuiDataListModule,
|
|
339
404
|
TuiTextfieldControllerModule,
|
|
340
405
|
TuiHintControllerModule,
|
|
341
|
-
]
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
406
|
+
]] });
|
|
407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDemoModule, decorators: [{
|
|
408
|
+
type: NgModule,
|
|
409
|
+
args: [{
|
|
410
|
+
imports: [
|
|
411
|
+
CommonModule,
|
|
412
|
+
ReactiveFormsModule,
|
|
413
|
+
FormsModule,
|
|
414
|
+
RouterModule,
|
|
415
|
+
TuiLinkModule,
|
|
416
|
+
TuiDragModule,
|
|
417
|
+
TuiButtonModule,
|
|
418
|
+
TuiSelectModule,
|
|
419
|
+
TuiExpandModule,
|
|
420
|
+
TuiGroupModule,
|
|
421
|
+
TuiTooltipModule,
|
|
422
|
+
TuiModeModule,
|
|
423
|
+
TuiRadioBlockModule,
|
|
424
|
+
TuiCheckboxLabeledModule,
|
|
425
|
+
TuiSvgModule,
|
|
426
|
+
TuiDataListWrapperModule,
|
|
427
|
+
TuiDataListModule,
|
|
428
|
+
TuiTextfieldControllerModule,
|
|
429
|
+
TuiHintControllerModule,
|
|
430
|
+
],
|
|
431
|
+
declarations: [TuiDocDemoComponent],
|
|
432
|
+
exports: [TuiDocDemoComponent],
|
|
433
|
+
}]
|
|
434
|
+
}] });
|
|
346
435
|
|
|
347
436
|
/**
|
|
348
437
|
* TODO: duplicate, need fix it before v3
|
|
@@ -351,7 +440,7 @@ TuiDocDemoModule = __decorate([
|
|
|
351
440
|
*/
|
|
352
441
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
353
442
|
function rgbToHex(r, g, b) {
|
|
354
|
-
return `#${[r, g, b].map(x => x.toString(16).padStart(2,
|
|
443
|
+
return `#${[r, g, b].map(x => x.toString(16).padStart(2, `0`)).join(``)}`;
|
|
355
444
|
}
|
|
356
445
|
const tuiRgbToHex = rgbToHex;
|
|
357
446
|
/**
|
|
@@ -360,10 +449,10 @@ const tuiRgbToHex = rgbToHex;
|
|
|
360
449
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
361
450
|
function hexToRgb(hex) {
|
|
362
451
|
const matches = hex
|
|
363
|
-
.replace(
|
|
364
|
-
.split(
|
|
452
|
+
.replace(`#`, ``)
|
|
453
|
+
.split(``)
|
|
365
454
|
.map((char, _, array) => (array.length === 3 ? char + char : char))
|
|
366
|
-
.join(
|
|
455
|
+
.join(``)
|
|
367
456
|
.match(/.{2}/g);
|
|
368
457
|
return matches
|
|
369
458
|
? matches.map(x => Number.parseInt(x, 16))
|
|
@@ -373,18 +462,18 @@ const tuiHexToRgb = hexToRgb;
|
|
|
373
462
|
|
|
374
463
|
function inspectArray(array, depth) {
|
|
375
464
|
if (depth === 0) {
|
|
376
|
-
return
|
|
465
|
+
return `[…]`;
|
|
377
466
|
}
|
|
378
|
-
let result =
|
|
467
|
+
let result = ``;
|
|
379
468
|
let first = true;
|
|
380
469
|
for (let index = 0; index < array.length; index++) {
|
|
381
470
|
if (first) {
|
|
382
471
|
first = false;
|
|
383
472
|
}
|
|
384
473
|
else {
|
|
385
|
-
result +=
|
|
474
|
+
result += `, `;
|
|
386
475
|
}
|
|
387
|
-
result += index in array ? inspectAny(array[index], depth - 1) :
|
|
476
|
+
result += index in array ? inspectAny(array[index], depth - 1) : `empty`;
|
|
388
477
|
}
|
|
389
478
|
return `[${result}]`;
|
|
390
479
|
}
|
|
@@ -392,7 +481,7 @@ function inspectObject(object, depth) {
|
|
|
392
481
|
if (depth === 0) {
|
|
393
482
|
return `{…}`;
|
|
394
483
|
}
|
|
395
|
-
let result =
|
|
484
|
+
let result = ``;
|
|
396
485
|
let first = true;
|
|
397
486
|
for (const key in object) {
|
|
398
487
|
if (!object.hasOwnProperty(key)) {
|
|
@@ -402,7 +491,7 @@ function inspectObject(object, depth) {
|
|
|
402
491
|
first = false;
|
|
403
492
|
}
|
|
404
493
|
else {
|
|
405
|
-
result +=
|
|
494
|
+
result += `, `;
|
|
406
495
|
}
|
|
407
496
|
result += `${key}: ${inspectAny(object[key], depth - 1)}`;
|
|
408
497
|
}
|
|
@@ -418,15 +507,15 @@ function inspectObject(object, depth) {
|
|
|
418
507
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
419
508
|
function inspectAny(data, depth) {
|
|
420
509
|
if (data === null) {
|
|
421
|
-
return
|
|
510
|
+
return `null`;
|
|
422
511
|
}
|
|
423
512
|
switch (typeof data) {
|
|
424
|
-
case
|
|
513
|
+
case `string`:
|
|
425
514
|
return `'${data}'`;
|
|
426
|
-
case
|
|
427
|
-
case
|
|
428
|
-
case
|
|
429
|
-
case
|
|
515
|
+
case `undefined`:
|
|
516
|
+
case `number`:
|
|
517
|
+
case `boolean`:
|
|
518
|
+
case `function`:
|
|
430
519
|
return String(data);
|
|
431
520
|
}
|
|
432
521
|
if (data instanceof RegExp) {
|
|
@@ -449,7 +538,7 @@ function coerceValue(value) {
|
|
|
449
538
|
return null;
|
|
450
539
|
}
|
|
451
540
|
else if (isBooleanParamValue(prepared)) {
|
|
452
|
-
return String(prepared) ===
|
|
541
|
+
return String(prepared) === `true`;
|
|
453
542
|
}
|
|
454
543
|
else if (isNumberParamValue(prepared)) {
|
|
455
544
|
return Number(prepared);
|
|
@@ -466,10 +555,10 @@ function coerceValue(value) {
|
|
|
466
555
|
}
|
|
467
556
|
const tuiCoerceValue = coerceValue;
|
|
468
557
|
function isEmptyParamValue(value) {
|
|
469
|
-
return [
|
|
558
|
+
return [`undefined`, `null`, `NaN`, `Infinity`].includes(value);
|
|
470
559
|
}
|
|
471
560
|
function isBooleanParamValue(value) {
|
|
472
|
-
return value ===
|
|
561
|
+
return value === `true` || value === `false`;
|
|
473
562
|
}
|
|
474
563
|
function isNumberParamValue(value) {
|
|
475
564
|
// TODO: investigate to disallow potentially catastrophic exponential-time regular expressions.
|
|
@@ -477,23 +566,23 @@ function isNumberParamValue(value) {
|
|
|
477
566
|
return /^-?[\d.]+(?:e-?\d+)?$/.test(value);
|
|
478
567
|
}
|
|
479
568
|
function isPossibleArray(value) {
|
|
480
|
-
return value.startsWith(
|
|
569
|
+
return value.startsWith(`[`) && value.endsWith(`]`);
|
|
481
570
|
}
|
|
482
571
|
function isPossibleObject(value) {
|
|
483
|
-
return value.startsWith(
|
|
572
|
+
return value.startsWith(`{`) && value.endsWith(`}`);
|
|
484
573
|
}
|
|
485
574
|
|
|
486
|
-
const SERIALIZED_SUFFIX =
|
|
575
|
+
const SERIALIZED_SUFFIX = `$`;
|
|
487
576
|
// @bad TODO: refactor output and value sync
|
|
488
|
-
|
|
577
|
+
class TuiDocDocumentationPropertyConnectorDirective {
|
|
489
578
|
constructor(template, locationRef, activatedRoute, urlSerializer) {
|
|
490
579
|
this.template = template;
|
|
491
580
|
this.locationRef = locationRef;
|
|
492
581
|
this.activatedRoute = activatedRoute;
|
|
493
582
|
this.urlSerializer = urlSerializer;
|
|
494
|
-
this.documentationPropertyName =
|
|
583
|
+
this.documentationPropertyName = ``;
|
|
495
584
|
this.documentationPropertyMode = null;
|
|
496
|
-
this.documentationPropertyType =
|
|
585
|
+
this.documentationPropertyType = ``;
|
|
497
586
|
this.documentationPropertyDeprecated = false;
|
|
498
587
|
this.documentationPropertyValues = null;
|
|
499
588
|
this.documentationPropertyValueChange = new EventEmitter();
|
|
@@ -505,11 +594,11 @@ let TuiDocDocumentationPropertyConnectorDirective = class TuiDocDocumentationPro
|
|
|
505
594
|
}
|
|
506
595
|
get attrName() {
|
|
507
596
|
switch (this.documentationPropertyMode) {
|
|
508
|
-
case
|
|
597
|
+
case `input`:
|
|
509
598
|
return `[${this.documentationPropertyName}]`;
|
|
510
|
-
case
|
|
599
|
+
case `output`:
|
|
511
600
|
return `(${this.documentationPropertyName})`;
|
|
512
|
-
case
|
|
601
|
+
case `input-output`:
|
|
513
602
|
return `[(${this.documentationPropertyName})]`;
|
|
514
603
|
default:
|
|
515
604
|
return this.documentationPropertyName;
|
|
@@ -519,7 +608,7 @@ let TuiDocDocumentationPropertyConnectorDirective = class TuiDocDocumentationPro
|
|
|
519
608
|
return !!this.documentationPropertyValues;
|
|
520
609
|
}
|
|
521
610
|
get shouldShowValues() {
|
|
522
|
-
return this.documentationPropertyMode !==
|
|
611
|
+
return this.documentationPropertyMode !== `output`;
|
|
523
612
|
}
|
|
524
613
|
ngOnChanges() {
|
|
525
614
|
this.changed$.next();
|
|
@@ -551,58 +640,85 @@ let TuiDocDocumentationPropertyConnectorDirective = class TuiDocDocumentationPro
|
|
|
551
640
|
const computedValue = isValueAvailableByKey && this.documentationPropertyValues
|
|
552
641
|
? this.documentationPropertyValues.indexOf(value)
|
|
553
642
|
: value;
|
|
554
|
-
const suffix = isValueAvailableByKey ? SERIALIZED_SUFFIX :
|
|
643
|
+
const suffix = isValueAvailableByKey ? SERIALIZED_SUFFIX : ``;
|
|
555
644
|
const propName = this.documentationPropertyName + suffix;
|
|
556
645
|
tree.queryParams = Object.assign(Object.assign({}, tree.queryParams), { [propName]: computedValue });
|
|
557
646
|
this.locationRef.go(String(tree));
|
|
558
647
|
}
|
|
559
|
-
}
|
|
560
|
-
TuiDocDocumentationPropertyConnectorDirective
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
]
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
],
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
],
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
],
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
],
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
]
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
],
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
648
|
+
}
|
|
649
|
+
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 });
|
|
650
|
+
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 });
|
|
651
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDocumentationPropertyConnectorDirective, decorators: [{
|
|
652
|
+
type: Directive,
|
|
653
|
+
args: [{
|
|
654
|
+
selector: `ng-template[documentationPropertyName]`,
|
|
655
|
+
exportAs: `documentationProperty`,
|
|
656
|
+
}]
|
|
657
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
658
|
+
type: Inject,
|
|
659
|
+
args: [TemplateRef]
|
|
660
|
+
}] }, { type: i4.Location, decorators: [{
|
|
661
|
+
type: Inject,
|
|
662
|
+
args: [Location$1]
|
|
663
|
+
}] }, { type: i5.ActivatedRoute, decorators: [{
|
|
664
|
+
type: Inject,
|
|
665
|
+
args: [ActivatedRoute]
|
|
666
|
+
}] }, { type: i5.UrlSerializer, decorators: [{
|
|
667
|
+
type: Inject,
|
|
668
|
+
args: [UrlSerializer]
|
|
669
|
+
}] }]; }, propDecorators: { documentationPropertyName: [{
|
|
670
|
+
type: Input
|
|
671
|
+
}], documentationPropertyMode: [{
|
|
672
|
+
type: Input
|
|
673
|
+
}], documentationPropertyType: [{
|
|
674
|
+
type: Input
|
|
675
|
+
}], documentationPropertyValue: [{
|
|
676
|
+
type: Input
|
|
677
|
+
}], documentationPropertyDeprecated: [{
|
|
678
|
+
type: Input
|
|
679
|
+
}], documentationPropertyValues: [{
|
|
680
|
+
type: Input
|
|
681
|
+
}], documentationPropertyValueChange: [{
|
|
682
|
+
type: Output
|
|
683
|
+
}] } });
|
|
684
|
+
|
|
685
|
+
class TuiInputOpacityDirective {
|
|
686
|
+
constructor(renderer, tuiFocusableComponent) {
|
|
687
|
+
this.renderer = renderer;
|
|
688
|
+
this.tuiFocusableComponent = tuiFocusableComponent;
|
|
689
|
+
}
|
|
690
|
+
set tuiInputOpacity(opacity) {
|
|
691
|
+
const { nativeFocusableElement } = this.tuiFocusableComponent;
|
|
692
|
+
if (nativeFocusableElement) {
|
|
693
|
+
this.renderer.setStyle(nativeFocusableElement, `opacity`, opacity / 100);
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
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 });
|
|
698
|
+
TuiInputOpacityDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiInputOpacityDirective, selector: "[tuiInputOpacity]", inputs: { tuiInputOpacity: "tuiInputOpacity" }, ngImport: i0 });
|
|
699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputOpacityDirective, decorators: [{
|
|
700
|
+
type: Directive,
|
|
701
|
+
args: [{
|
|
702
|
+
selector: `[tuiInputOpacity]`,
|
|
703
|
+
}]
|
|
704
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2, decorators: [{
|
|
705
|
+
type: Inject,
|
|
706
|
+
args: [Renderer2]
|
|
707
|
+
}] }, { type: undefined, decorators: [{
|
|
708
|
+
type: Inject,
|
|
709
|
+
args: [TUI_FOCUSABLE_ITEM_ACCESSOR]
|
|
710
|
+
}] }]; }, propDecorators: { tuiInputOpacity: [{
|
|
711
|
+
type: Input
|
|
712
|
+
}] } });
|
|
597
713
|
|
|
598
714
|
// @bad TODO subscribe propertiesConnectors changes
|
|
599
715
|
// @bad TODO refactor to make more flexible
|
|
600
716
|
// @dynamic
|
|
601
|
-
|
|
717
|
+
class TuiDocDocumentationComponent {
|
|
602
718
|
constructor(changeDetectorRef, texts) {
|
|
603
719
|
this.changeDetectorRef = changeDetectorRef;
|
|
604
720
|
this.texts = texts;
|
|
605
|
-
this.heading =
|
|
721
|
+
this.heading = ``;
|
|
606
722
|
this.showValues = true;
|
|
607
723
|
this.isAPI = false;
|
|
608
724
|
this.propertiesConnectors = EMPTY_QUERY;
|
|
@@ -619,149 +735,150 @@ let TuiDocDocumentationComponent = class TuiDocDocumentationComponent {
|
|
|
619
735
|
getColor(color) {
|
|
620
736
|
if (color.length === 4) {
|
|
621
737
|
return color
|
|
622
|
-
.split(
|
|
738
|
+
.split(``)
|
|
623
739
|
.reduce((result, current) => [...result, current, current], [])
|
|
624
|
-
.join(
|
|
625
|
-
.replace(
|
|
740
|
+
.join(``)
|
|
741
|
+
.replace(`#`, ``);
|
|
626
742
|
}
|
|
627
|
-
if (color.startsWith(
|
|
743
|
+
if (color.startsWith(`#`)) {
|
|
628
744
|
return color;
|
|
629
745
|
}
|
|
630
|
-
if (color ===
|
|
631
|
-
return
|
|
746
|
+
if (color === `transparent`) {
|
|
747
|
+
return `#000000`;
|
|
632
748
|
}
|
|
633
749
|
const parsed = color
|
|
634
|
-
.replace(
|
|
635
|
-
.replace(
|
|
636
|
-
.replace(
|
|
637
|
-
.replace(
|
|
638
|
-
.split(
|
|
750
|
+
.replace(`rgb(`, ``)
|
|
751
|
+
.replace(`rgba(`, ``)
|
|
752
|
+
.replace(`)`, ``)
|
|
753
|
+
.replace(` `, ``)
|
|
754
|
+
.split(`,`)
|
|
639
755
|
.map(v => Number.parseInt(v, 10));
|
|
640
756
|
return rgbToHex(...parsed);
|
|
641
757
|
}
|
|
642
758
|
getOpacity(color) {
|
|
643
|
-
if (color.startsWith(
|
|
759
|
+
if (color.startsWith(`#`) || color.startsWith(`rgb(`)) {
|
|
644
760
|
return 100;
|
|
645
761
|
}
|
|
646
|
-
if (color ===
|
|
762
|
+
if (color === `transparent`) {
|
|
647
763
|
return 0;
|
|
648
764
|
}
|
|
649
|
-
const lastComma = color.lastIndexOf(
|
|
765
|
+
const lastComma = color.lastIndexOf(`,`);
|
|
650
766
|
const parsed = color
|
|
651
767
|
.slice(lastComma)
|
|
652
|
-
.replace(
|
|
653
|
-
.replace(
|
|
654
|
-
.replace(
|
|
768
|
+
.replace(`)`, ``)
|
|
769
|
+
.replace(` `, ``)
|
|
770
|
+
.replace(`,`, ``);
|
|
655
771
|
return Math.round(Number.parseFloat(parsed) * 100);
|
|
656
772
|
}
|
|
657
773
|
onColorChange(connector, color) {
|
|
658
|
-
const opacity = this.getOpacity(connector.documentationPropertyValue ||
|
|
774
|
+
const opacity = this.getOpacity(connector.documentationPropertyValue || ``);
|
|
659
775
|
if (opacity === 100) {
|
|
660
776
|
connector.onValueChange(color);
|
|
661
777
|
return;
|
|
662
778
|
}
|
|
663
|
-
const rgb = hexToRgb(color).join(
|
|
779
|
+
const rgb = hexToRgb(color).join(`, `);
|
|
664
780
|
const result = `rgba(${rgb}, ${opacity / 100})`;
|
|
665
781
|
connector.onValueChange(result);
|
|
666
782
|
}
|
|
667
783
|
onOpacityChange(connector, opacity) {
|
|
668
|
-
const hex = this.getColor(connector.documentationPropertyValue ||
|
|
784
|
+
const hex = this.getColor(connector.documentationPropertyValue || ``);
|
|
669
785
|
const rgb = hexToRgb(hex);
|
|
670
786
|
const result = `rgba(${rgb}, ${opacity / 100})`;
|
|
671
787
|
connector.onValueChange(result);
|
|
672
788
|
}
|
|
673
789
|
stripOptional(name) {
|
|
674
|
-
return name.replace(
|
|
790
|
+
return name.replace(`?`, ``);
|
|
675
791
|
}
|
|
676
792
|
isOptional(name) {
|
|
677
|
-
return name.includes(
|
|
793
|
+
return name.includes(`?`);
|
|
678
794
|
}
|
|
679
795
|
isPrimitivePolymorpheusContent(value) {
|
|
680
|
-
return
|
|
796
|
+
return tuiIsString(value) || tuiIsNumber(value);
|
|
681
797
|
}
|
|
682
798
|
showCleaner(type) {
|
|
683
|
-
return type.includes(
|
|
799
|
+
return type.includes(`null`);
|
|
684
800
|
}
|
|
685
801
|
showContentTooltip(type) {
|
|
686
|
-
return type.includes(
|
|
802
|
+
return type.includes(`PolymorpheusContent`);
|
|
687
803
|
}
|
|
688
804
|
inspectAny(data) {
|
|
689
805
|
return inspectAny(data, 2);
|
|
690
806
|
}
|
|
691
|
-
}
|
|
692
|
-
TuiDocDocumentationComponent
|
|
693
|
-
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
694
|
-
|
|
695
|
-
]
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
this.tuiFocusableComponent = tuiFocusableComponent;
|
|
728
|
-
}
|
|
729
|
-
set tuiInputOpacity(opacity) {
|
|
730
|
-
const { nativeFocusableElement } = this.tuiFocusableComponent;
|
|
731
|
-
if (nativeFocusableElement) {
|
|
732
|
-
this.renderer.setStyle(nativeFocusableElement, 'opacity', opacity / 100);
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
};
|
|
736
|
-
TuiInputOpacityDirective.ctorParameters = () => [
|
|
737
|
-
{ type: Renderer2, decorators: [{ type: Inject, args: [Renderer2,] }] },
|
|
738
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_FOCUSABLE_ITEM_ACCESSOR,] }] }
|
|
739
|
-
];
|
|
740
|
-
__decorate([
|
|
741
|
-
Input()
|
|
742
|
-
], TuiInputOpacityDirective.prototype, "tuiInputOpacity", null);
|
|
743
|
-
TuiInputOpacityDirective = __decorate([
|
|
744
|
-
Directive({
|
|
745
|
-
selector: '[tuiInputOpacity]',
|
|
746
|
-
}),
|
|
747
|
-
__param(0, Inject(Renderer2)),
|
|
748
|
-
__param(1, Inject(TUI_FOCUSABLE_ITEM_ACCESSOR))
|
|
749
|
-
], TuiInputOpacityDirective);
|
|
807
|
+
}
|
|
808
|
+
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 });
|
|
809
|
+
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: i2$1.TuiBadgeComponent, selector: "tui-badge", inputs: ["value", "size", "status", "hoverable"] }, { type: i1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "mode", "direction", "showDelay", "hideDelay", "describeId"] }, { type: i1.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { type: i2$1.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { type: i2$1.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items"] }, { type: i2$1.TuiToggleComponent, selector: "tui-toggle", inputs: ["singleColor", "showIcons", "showLoader", "size"] }, { type: i1.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i2$1.TuiInputCountComponent, selector: "tui-input-count", inputs: ["step", "min", "max", "hideButtons", "prefix", "postfix"] }, { type: i1.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "status"], outputs: ["close"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i2$1.TuiSelectDirective, selector: "tui-select" }, { type: i1.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { type: i1.TuiDropdownControllerDirective, selector: "[tuiDropdownAlign], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownSided]", inputs: ["tuiDropdownAlign", "tuiDropdownDirection", "tuiDropdownLimitWidth", "tuiDropdownMinHeight", "tuiDropdownMaxHeight", "tuiDropdownSided"] }, { type: i1.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { type: i1.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: i1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i1.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: i1.TuiTextfieldTypeDirective, selector: "[tuiTextfieldType]", inputs: ["tuiTextfieldType"] }, { type: TuiInputOpacityDirective, selector: "[tuiInputOpacity]", inputs: ["tuiInputOpacity"] }, { type: i2$1.TuiInputCountDirective, selector: "tui-input-count" }], pipes: { "async": i4.AsyncPipe }, animations: [
|
|
810
|
+
trigger(`emitEvent`, [
|
|
811
|
+
transition(`:increment`, [style({ opacity: 1 }), animate(`500ms ease-in`)]),
|
|
812
|
+
]),
|
|
813
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
814
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDocumentationComponent, decorators: [{
|
|
815
|
+
type: Component,
|
|
816
|
+
args: [{
|
|
817
|
+
selector: `tui-doc-documentation`,
|
|
818
|
+
templateUrl: `./documentation.template.html`,
|
|
819
|
+
styleUrls: [`./documentation.style.less`],
|
|
820
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
821
|
+
animations: [
|
|
822
|
+
trigger(`emitEvent`, [
|
|
823
|
+
transition(`:increment`, [style({ opacity: 1 }), animate(`500ms ease-in`)]),
|
|
824
|
+
]),
|
|
825
|
+
],
|
|
826
|
+
}]
|
|
827
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef, decorators: [{
|
|
828
|
+
type: Inject,
|
|
829
|
+
args: [ChangeDetectorRef]
|
|
830
|
+
}] }, { type: undefined, decorators: [{
|
|
831
|
+
type: Inject,
|
|
832
|
+
args: [TUI_DOC_DOCUMENTATION_TEXTS]
|
|
833
|
+
}] }]; }, propDecorators: { heading: [{
|
|
834
|
+
type: Input
|
|
835
|
+
}], showValues: [{
|
|
836
|
+
type: Input
|
|
837
|
+
}], isAPI: [{
|
|
838
|
+
type: Input
|
|
839
|
+
}], propertiesConnectors: [{
|
|
840
|
+
type: ContentChildren,
|
|
841
|
+
args: [TuiDocDocumentationPropertyConnectorDirective]
|
|
842
|
+
}] } });
|
|
750
843
|
|
|
751
|
-
|
|
752
|
-
}
|
|
753
|
-
TuiInputOpacityModule =
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
844
|
+
class TuiInputOpacityModule {
|
|
845
|
+
}
|
|
846
|
+
TuiInputOpacityModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputOpacityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
847
|
+
TuiInputOpacityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputOpacityModule, declarations: [TuiInputOpacityDirective], exports: [TuiInputOpacityDirective] });
|
|
848
|
+
TuiInputOpacityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputOpacityModule });
|
|
849
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputOpacityModule, decorators: [{
|
|
850
|
+
type: NgModule,
|
|
851
|
+
args: [{
|
|
852
|
+
declarations: [TuiInputOpacityDirective],
|
|
853
|
+
exports: [TuiInputOpacityDirective],
|
|
854
|
+
}]
|
|
855
|
+
}] });
|
|
759
856
|
|
|
760
|
-
|
|
761
|
-
}
|
|
762
|
-
TuiDocDocumentationModule =
|
|
763
|
-
|
|
764
|
-
imports: [
|
|
857
|
+
class TuiDocDocumentationModule {
|
|
858
|
+
}
|
|
859
|
+
TuiDocDocumentationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDocumentationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
860
|
+
TuiDocDocumentationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDocumentationModule, declarations: [TuiDocDocumentationComponent,
|
|
861
|
+
TuiDocDocumentationPropertyConnectorDirective], imports: [CommonModule,
|
|
862
|
+
FormsModule,
|
|
863
|
+
RouterModule,
|
|
864
|
+
TuiBadgeModule,
|
|
865
|
+
TuiSelectModule,
|
|
866
|
+
TuiToggleModule,
|
|
867
|
+
TuiTooltipModule,
|
|
868
|
+
TuiLinkModule,
|
|
869
|
+
TuiInputCountModule,
|
|
870
|
+
TuiModeModule,
|
|
871
|
+
TuiGroupModule,
|
|
872
|
+
TuiInputOpacityModule,
|
|
873
|
+
TuiPrimitiveTextfieldModule,
|
|
874
|
+
TuiTextfieldControllerModule,
|
|
875
|
+
TuiHintControllerModule,
|
|
876
|
+
TuiDropdownControllerModule,
|
|
877
|
+
TuiDataListModule,
|
|
878
|
+
TuiDataListWrapperModule,
|
|
879
|
+
TuiNotificationModule], exports: [TuiDocDocumentationComponent,
|
|
880
|
+
TuiDocDocumentationPropertyConnectorDirective] });
|
|
881
|
+
TuiDocDocumentationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDocumentationModule, imports: [[
|
|
765
882
|
CommonModule,
|
|
766
883
|
FormsModule,
|
|
767
884
|
RouterModule,
|
|
@@ -781,25 +898,49 @@ TuiDocDocumentationModule = __decorate([
|
|
|
781
898
|
TuiDataListModule,
|
|
782
899
|
TuiDataListWrapperModule,
|
|
783
900
|
TuiNotificationModule,
|
|
784
|
-
]
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
901
|
+
]] });
|
|
902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocDocumentationModule, decorators: [{
|
|
903
|
+
type: NgModule,
|
|
904
|
+
args: [{
|
|
905
|
+
imports: [
|
|
906
|
+
CommonModule,
|
|
907
|
+
FormsModule,
|
|
908
|
+
RouterModule,
|
|
909
|
+
TuiBadgeModule,
|
|
910
|
+
TuiSelectModule,
|
|
911
|
+
TuiToggleModule,
|
|
912
|
+
TuiTooltipModule,
|
|
913
|
+
TuiLinkModule,
|
|
914
|
+
TuiInputCountModule,
|
|
915
|
+
TuiModeModule,
|
|
916
|
+
TuiGroupModule,
|
|
917
|
+
TuiInputOpacityModule,
|
|
918
|
+
TuiPrimitiveTextfieldModule,
|
|
919
|
+
TuiTextfieldControllerModule,
|
|
920
|
+
TuiHintControllerModule,
|
|
921
|
+
TuiDropdownControllerModule,
|
|
922
|
+
TuiDataListModule,
|
|
923
|
+
TuiDataListWrapperModule,
|
|
924
|
+
TuiNotificationModule,
|
|
925
|
+
],
|
|
926
|
+
declarations: [
|
|
927
|
+
TuiDocDocumentationComponent,
|
|
928
|
+
TuiDocDocumentationPropertyConnectorDirective,
|
|
929
|
+
],
|
|
930
|
+
exports: [
|
|
931
|
+
TuiDocDocumentationComponent,
|
|
932
|
+
TuiDocDocumentationPropertyConnectorDirective,
|
|
933
|
+
],
|
|
934
|
+
}]
|
|
935
|
+
}] });
|
|
795
936
|
|
|
796
|
-
const TUI_DOC_CODE_ACTIONS = new InjectionToken(
|
|
797
|
-
factory: () =>
|
|
937
|
+
const TUI_DOC_CODE_ACTIONS = new InjectionToken(`Code actions for the opened tab with code example`, {
|
|
938
|
+
factory: () => ``,
|
|
798
939
|
});
|
|
799
940
|
|
|
800
|
-
const TUI_DOC_CODE_EDITOR = new InjectionToken(
|
|
941
|
+
const TUI_DOC_CODE_EDITOR = new InjectionToken(`Contains service for opening online IDE e.g. Stackblitz`);
|
|
801
942
|
|
|
802
|
-
const TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new InjectionToken(
|
|
943
|
+
const TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new InjectionToken(`Processes content in example`, { factory: () => identity });
|
|
803
944
|
|
|
804
945
|
/**
|
|
805
946
|
* @deprecated: use {@link tuiRawLoadRecord} instead
|
|
@@ -818,13 +959,37 @@ function rawLoadRecord(example) {
|
|
|
818
959
|
}
|
|
819
960
|
const tuiRawLoadRecord = rawLoadRecord;
|
|
820
961
|
|
|
962
|
+
class TuiDocExampleCapitalizePipe {
|
|
963
|
+
transform(content) {
|
|
964
|
+
return tuiIsString(content) ? tuiCapitalizeFirstLetter(content) : content;
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
TuiDocExampleCapitalizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleCapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
968
|
+
TuiDocExampleCapitalizePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleCapitalizePipe, name: "tuiDocExampleCapitalize" });
|
|
969
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleCapitalizePipe, decorators: [{
|
|
970
|
+
type: Pipe,
|
|
971
|
+
args: [{ name: `tuiDocExampleCapitalize` }]
|
|
972
|
+
}] });
|
|
973
|
+
|
|
974
|
+
class TuiDocExampleGetTabsPipe {
|
|
975
|
+
transform(content, defaultTab) {
|
|
976
|
+
return [defaultTab, ...Object.keys(content)];
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
TuiDocExampleGetTabsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleGetTabsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
980
|
+
TuiDocExampleGetTabsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleGetTabsPipe, name: "tuiDocExampleGetTabs" });
|
|
981
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleGetTabsPipe, decorators: [{
|
|
982
|
+
type: Pipe,
|
|
983
|
+
args: [{ name: `tuiDocExampleGetTabs` }]
|
|
984
|
+
}] });
|
|
985
|
+
|
|
821
986
|
// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
|
|
822
987
|
// @dynamic
|
|
823
|
-
|
|
824
|
-
constructor(id, clipboard,
|
|
988
|
+
class TuiDocExampleComponent {
|
|
989
|
+
constructor(id, clipboard, alertService, location, copyTexts$, texts, codeEditor, processContent, isCypress, codeActions, router, route, ngLocation) {
|
|
825
990
|
this.id = id;
|
|
826
991
|
this.clipboard = clipboard;
|
|
827
|
-
this.
|
|
992
|
+
this.alertService = alertService;
|
|
828
993
|
this.location = location;
|
|
829
994
|
this.copyTexts$ = copyTexts$;
|
|
830
995
|
this.texts = texts;
|
|
@@ -836,8 +1001,8 @@ let TuiDocExampleComponent = class TuiDocExampleComponent {
|
|
|
836
1001
|
this.route = route;
|
|
837
1002
|
this.ngLocation = ngLocation;
|
|
838
1003
|
this.rawLoader$$ = new BehaviorSubject({});
|
|
839
|
-
this.heading =
|
|
840
|
-
this.description =
|
|
1004
|
+
this.heading = ``;
|
|
1005
|
+
this.description = ``;
|
|
841
1006
|
this.componentName = this.location.pathname.slice(1);
|
|
842
1007
|
this.defaultTabIndex = 0;
|
|
843
1008
|
this.defaultTab = this.texts[this.defaultTabIndex];
|
|
@@ -850,105 +1015,108 @@ let TuiDocExampleComponent = class TuiDocExampleComponent {
|
|
|
850
1015
|
this.rawLoader$$.next(content);
|
|
851
1016
|
}
|
|
852
1017
|
copyExampleLink() {
|
|
853
|
-
const hashPosition = this.location.href.indexOf(
|
|
1018
|
+
const hashPosition = this.location.href.indexOf(`#`);
|
|
854
1019
|
const currentUrl = hashPosition > -1
|
|
855
1020
|
? this.location.href.slice(0, Math.max(0, hashPosition))
|
|
856
1021
|
: this.location.href;
|
|
857
1022
|
const url = `${currentUrl}#${this.id}`;
|
|
858
1023
|
this.setFragmentWithoutRedirect(this.id);
|
|
859
1024
|
this.clipboard.copy(url);
|
|
860
|
-
this.
|
|
861
|
-
.
|
|
1025
|
+
this.alertService
|
|
1026
|
+
.open(this.texts[1], {
|
|
862
1027
|
label: this.texts[2],
|
|
863
1028
|
status: "success" /* Success */,
|
|
864
1029
|
})
|
|
865
1030
|
.subscribe();
|
|
866
1031
|
}
|
|
867
1032
|
edit(files) {
|
|
868
|
-
var _a
|
|
1033
|
+
var _a;
|
|
869
1034
|
this.loading$.next(true);
|
|
870
|
-
(_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName,
|
|
1035
|
+
(_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName, this.id || ``, files).finally(() => this.loading$.next(false));
|
|
871
1036
|
}
|
|
872
1037
|
setFragmentWithoutRedirect(id) {
|
|
873
1038
|
const url = this.router
|
|
874
|
-
.createUrlTree([], { relativeTo: this.route, fragment: id ||
|
|
1039
|
+
.createUrlTree([], { relativeTo: this.route, fragment: id || `` })
|
|
875
1040
|
.toString();
|
|
876
1041
|
this.ngLocation.go(url);
|
|
877
1042
|
}
|
|
878
|
-
}
|
|
879
|
-
TuiDocExampleComponent
|
|
880
|
-
{ type:
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
],
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
],
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
transform(content, defaultTab) {
|
|
940
|
-
return [defaultTab, ...Object.keys(content)];
|
|
941
|
-
}
|
|
942
|
-
};
|
|
943
|
-
TuiDocExampleGetTabsPipe = __decorate([
|
|
944
|
-
Pipe({ name: 'tuiDocExampleGetTabs' })
|
|
945
|
-
], TuiDocExampleGetTabsPipe);
|
|
1043
|
+
}
|
|
1044
|
+
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 });
|
|
1045
|
+
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: i1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i2$1.TuiTabsWithMoreComponent, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["moreContent", "dropdownContent", "underline", "activeItemIndex", "itemsLimit"], outputs: ["activeItemIndexChange"] }, { type: i2$1.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: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.TuiItemDirective, selector: "[tuiItem]" }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i8$1.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }], pipes: { "tuiDocExampleCapitalize": TuiDocExampleCapitalizePipe, "async": i4.AsyncPipe, "tuiDocExampleGetTabs": TuiDocExampleGetTabsPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1046
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleComponent, decorators: [{
|
|
1047
|
+
type: Component,
|
|
1048
|
+
args: [{
|
|
1049
|
+
selector: `tui-doc-example`,
|
|
1050
|
+
templateUrl: `./example.template.html`,
|
|
1051
|
+
styleUrls: [`./example.style.less`],
|
|
1052
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1053
|
+
}]
|
|
1054
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1055
|
+
type: Attribute,
|
|
1056
|
+
args: [`id`]
|
|
1057
|
+
}] }, { type: i8$1.Clipboard, decorators: [{
|
|
1058
|
+
type: Inject,
|
|
1059
|
+
args: [Clipboard]
|
|
1060
|
+
}] }, { type: i1.TuiAlertService, decorators: [{
|
|
1061
|
+
type: Inject,
|
|
1062
|
+
args: [TuiAlertService]
|
|
1063
|
+
}] }, { type: Location, decorators: [{
|
|
1064
|
+
type: Inject,
|
|
1065
|
+
args: [LOCATION]
|
|
1066
|
+
}] }, { type: i8.Observable, decorators: [{
|
|
1067
|
+
type: Inject,
|
|
1068
|
+
args: [TUI_COPY_TEXTS]
|
|
1069
|
+
}] }, { type: undefined, decorators: [{
|
|
1070
|
+
type: Inject,
|
|
1071
|
+
args: [TUI_DOC_EXAMPLE_TEXTS]
|
|
1072
|
+
}] }, { type: undefined, decorators: [{
|
|
1073
|
+
type: Optional
|
|
1074
|
+
}, {
|
|
1075
|
+
type: Inject,
|
|
1076
|
+
args: [TUI_DOC_CODE_EDITOR]
|
|
1077
|
+
}] }, { type: undefined, decorators: [{
|
|
1078
|
+
type: Inject,
|
|
1079
|
+
args: [TUI_DOC_EXAMPLE_CONTENT_PROCESSOR]
|
|
1080
|
+
}] }, { type: undefined, decorators: [{
|
|
1081
|
+
type: Inject,
|
|
1082
|
+
args: [TUI_IS_CYPRESS]
|
|
1083
|
+
}] }, { type: Array, decorators: [{
|
|
1084
|
+
type: Inject,
|
|
1085
|
+
args: [TUI_DOC_CODE_ACTIONS]
|
|
1086
|
+
}] }, { type: i5.Router, decorators: [{
|
|
1087
|
+
type: Inject,
|
|
1088
|
+
args: [Router]
|
|
1089
|
+
}] }, { type: i5.ActivatedRoute, decorators: [{
|
|
1090
|
+
type: Inject,
|
|
1091
|
+
args: [ActivatedRoute]
|
|
1092
|
+
}] }, { type: i4.Location, decorators: [{
|
|
1093
|
+
type: Inject,
|
|
1094
|
+
args: [Location$1]
|
|
1095
|
+
}] }]; }, propDecorators: { heading: [{
|
|
1096
|
+
type: Input
|
|
1097
|
+
}], description: [{
|
|
1098
|
+
type: Input
|
|
1099
|
+
}], content: [{
|
|
1100
|
+
type: Input
|
|
1101
|
+
}], componentName: [{
|
|
1102
|
+
type: Input
|
|
1103
|
+
}] } });
|
|
946
1104
|
|
|
947
|
-
|
|
948
|
-
}
|
|
949
|
-
TuiDocExampleModule =
|
|
950
|
-
|
|
951
|
-
|
|
1105
|
+
class TuiDocExampleModule {
|
|
1106
|
+
}
|
|
1107
|
+
TuiDocExampleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1108
|
+
TuiDocExampleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleModule, declarations: [TuiDocExampleComponent,
|
|
1109
|
+
TuiDocExampleGetTabsPipe,
|
|
1110
|
+
TuiDocExampleCapitalizePipe], imports: [CommonModule,
|
|
1111
|
+
ClipboardModule,
|
|
1112
|
+
TuiTabsModule,
|
|
1113
|
+
TuiButtonModule,
|
|
1114
|
+
TuiDocCopyModule,
|
|
1115
|
+
TuiDocCodeModule,
|
|
1116
|
+
PolymorpheusModule], exports: [TuiDocExampleComponent,
|
|
1117
|
+
TuiDocExampleGetTabsPipe,
|
|
1118
|
+
TuiDocExampleCapitalizePipe] });
|
|
1119
|
+
TuiDocExampleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleModule, imports: [[
|
|
952
1120
|
CommonModule,
|
|
953
1121
|
ClipboardModule,
|
|
954
1122
|
TuiTabsModule,
|
|
@@ -956,174 +1124,69 @@ TuiDocExampleModule = __decorate([
|
|
|
956
1124
|
TuiDocCopyModule,
|
|
957
1125
|
TuiDocCodeModule,
|
|
958
1126
|
PolymorpheusModule,
|
|
959
|
-
]
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
],
|
|
1127
|
+
]] });
|
|
1128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocExampleModule, decorators: [{
|
|
1129
|
+
type: NgModule,
|
|
1130
|
+
args: [{
|
|
1131
|
+
imports: [
|
|
1132
|
+
CommonModule,
|
|
1133
|
+
ClipboardModule,
|
|
1134
|
+
TuiTabsModule,
|
|
1135
|
+
TuiButtonModule,
|
|
1136
|
+
TuiDocCopyModule,
|
|
1137
|
+
TuiDocCodeModule,
|
|
1138
|
+
PolymorpheusModule,
|
|
1139
|
+
],
|
|
1140
|
+
declarations: [
|
|
1141
|
+
TuiDocExampleComponent,
|
|
1142
|
+
TuiDocExampleGetTabsPipe,
|
|
1143
|
+
TuiDocExampleCapitalizePipe,
|
|
1144
|
+
],
|
|
1145
|
+
exports: [
|
|
1146
|
+
TuiDocExampleComponent,
|
|
1147
|
+
TuiDocExampleGetTabsPipe,
|
|
1148
|
+
TuiDocExampleCapitalizePipe,
|
|
1149
|
+
],
|
|
1150
|
+
}]
|
|
1151
|
+
}] });
|
|
972
1152
|
|
|
973
|
-
|
|
974
|
-
// @dynamic
|
|
975
|
-
let TuiDocMainComponent = TuiDocMainComponent_1 = class TuiDocMainComponent {
|
|
976
|
-
constructor(storage, windowRef) {
|
|
977
|
-
this.storage = storage;
|
|
978
|
-
this.windowRef = windowRef;
|
|
979
|
-
this.night = this.storage.getItem('night') === 'true' ||
|
|
980
|
-
(this.storage.getItem('night') === null &&
|
|
981
|
-
this.windowRef.matchMedia('(prefers-color-scheme: dark)').matches);
|
|
982
|
-
this.change$ = new Subject();
|
|
983
|
-
}
|
|
984
|
-
get mode() {
|
|
985
|
-
return this.night ? 'onDark' : null;
|
|
986
|
-
}
|
|
987
|
-
onMode(night) {
|
|
988
|
-
this.night = night;
|
|
989
|
-
this.change$.next();
|
|
990
|
-
this.storage.setItem('night', String(night));
|
|
991
|
-
}
|
|
992
|
-
};
|
|
993
|
-
TuiDocMainComponent.ctorParameters = () => [
|
|
994
|
-
{ type: Storage, decorators: [{ type: Inject, args: [LOCAL_STORAGE,] }] },
|
|
995
|
-
{ type: Window, decorators: [{ type: Inject, args: [WINDOW,] }] }
|
|
996
|
-
];
|
|
997
|
-
__decorate([
|
|
998
|
-
HostBinding('attr.data-mode')
|
|
999
|
-
], TuiDocMainComponent.prototype, "mode", null);
|
|
1000
|
-
TuiDocMainComponent = TuiDocMainComponent_1 = __decorate([
|
|
1001
|
-
Component({
|
|
1002
|
-
selector: 'tui-doc-main',
|
|
1003
|
-
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",
|
|
1004
|
-
encapsulation: ViewEncapsulation.None,
|
|
1005
|
-
providers: [
|
|
1006
|
-
{
|
|
1007
|
-
provide: TuiModeDirective,
|
|
1008
|
-
useExisting: forwardRef(() => TuiDocMainComponent_1),
|
|
1009
|
-
},
|
|
1010
|
-
TuiSwipeService,
|
|
1011
|
-
],
|
|
1012
|
-
styles: ["html{scroll-padding-top:4rem;height:auto}tui-root>tui-scroll-controls>.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.9375em){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}"]
|
|
1013
|
-
}),
|
|
1014
|
-
__param(0, Inject(LOCAL_STORAGE)),
|
|
1015
|
-
__param(1, Inject(WINDOW))
|
|
1016
|
-
], TuiDocMainComponent);
|
|
1153
|
+
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)))) });
|
|
1017
1154
|
|
|
1018
|
-
const
|
|
1019
|
-
|
|
1020
|
-
/**
|
|
1021
|
-
* @deprecated: use {@link TuiScrollIntoViewLinkDirective}
|
|
1022
|
-
* TODO: remove in v3.0
|
|
1023
|
-
*/
|
|
1024
|
-
let ScrollIntoViewDirective =
|
|
1025
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1026
|
-
class ScrollIntoViewDirective {
|
|
1027
|
-
constructor(destroy$, { nativeElement }, readyToScroll$) {
|
|
1028
|
-
this.readyToScroll$ = readyToScroll$;
|
|
1029
|
-
this.scroll$ = new ReplaySubject(1);
|
|
1030
|
-
this.readyToScroll$
|
|
1031
|
-
.pipe(filter(Boolean), switchMapTo(this.scroll$), debounceTime(750), filter(shallWe => shallWe && !!getElementObscurers(nativeElement)), takeUntil(destroy$))
|
|
1032
|
-
.subscribe(() => {
|
|
1033
|
-
nativeElement.scrollIntoView();
|
|
1034
|
-
});
|
|
1035
|
-
}
|
|
1036
|
-
set scrollIntoView(shallWe) {
|
|
1037
|
-
this.scroll$.next(shallWe);
|
|
1038
|
-
}
|
|
1039
|
-
};
|
|
1040
|
-
ScrollIntoViewDirective.ctorParameters = () => [
|
|
1041
|
-
{ type: TuiDestroyService, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
|
|
1042
|
-
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
1043
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TUI_DOC_PAGE_LOADED,] }] }
|
|
1044
|
-
];
|
|
1045
|
-
__decorate([
|
|
1046
|
-
Input()
|
|
1047
|
-
], ScrollIntoViewDirective.prototype, "scrollIntoView", null);
|
|
1048
|
-
ScrollIntoViewDirective = __decorate([
|
|
1049
|
-
Directive({
|
|
1050
|
-
selector: '[scrollIntoView]',
|
|
1051
|
-
providers: [TuiDestroyService],
|
|
1052
|
-
})
|
|
1053
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1054
|
-
,
|
|
1055
|
-
__param(0, Inject(TuiDestroyService)),
|
|
1056
|
-
__param(1, Inject(ElementRef)),
|
|
1057
|
-
__param(2, Inject(TUI_DOC_PAGE_LOADED))
|
|
1058
|
-
], ScrollIntoViewDirective);
|
|
1059
|
-
let TuiScrollIntoViewLinkDirective = class TuiScrollIntoViewLinkDirective extends ScrollIntoViewDirective {
|
|
1060
|
-
};
|
|
1061
|
-
TuiScrollIntoViewLinkDirective = __decorate([
|
|
1062
|
-
Directive({
|
|
1063
|
-
selector: '[tuiScrollIntoViewLink]',
|
|
1064
|
-
providers: [TuiDestroyService],
|
|
1065
|
-
})
|
|
1066
|
-
], TuiScrollIntoViewLinkDirective);
|
|
1067
|
-
|
|
1068
|
-
/**
|
|
1069
|
-
* @deprecated: use {@link TuiScrollIntoViewLinkModule}
|
|
1070
|
-
* TODO: remove in v3.0
|
|
1071
|
-
*/
|
|
1072
|
-
let ScrollIntoViewModule =
|
|
1073
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1074
|
-
class ScrollIntoViewModule {
|
|
1075
|
-
};
|
|
1076
|
-
ScrollIntoViewModule = __decorate([
|
|
1077
|
-
NgModule({
|
|
1078
|
-
declarations: [ScrollIntoViewDirective],
|
|
1079
|
-
exports: [ScrollIntoViewDirective],
|
|
1080
|
-
})
|
|
1081
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1082
|
-
], ScrollIntoViewModule);
|
|
1083
|
-
let TuiScrollIntoViewLinkModule = class TuiScrollIntoViewLinkModule {
|
|
1084
|
-
};
|
|
1085
|
-
TuiScrollIntoViewLinkModule = __decorate([
|
|
1086
|
-
NgModule({
|
|
1087
|
-
declarations: [TuiScrollIntoViewLinkDirective],
|
|
1088
|
-
exports: [TuiScrollIntoViewLinkDirective],
|
|
1089
|
-
})
|
|
1090
|
-
], TuiScrollIntoViewLinkModule);
|
|
1091
|
-
|
|
1092
|
-
const TUI_DOC_SCROLL_BEHAVIOR = new InjectionToken('[TUI_DOC_SCROLL_BEHAVIOR] Defines the transition animation for scroll', { factory: () => 'smooth' });
|
|
1155
|
+
const TUI_DOC_SCROLL_BEHAVIOR = new InjectionToken(`[TUI_DOC_SCROLL_BEHAVIOR] Defines the transition animation for scroll`, { factory: () => `smooth` });
|
|
1093
1156
|
|
|
1094
1157
|
const MAP = {
|
|
1095
|
-
а:
|
|
1096
|
-
б:
|
|
1097
|
-
в:
|
|
1098
|
-
г:
|
|
1099
|
-
д:
|
|
1100
|
-
е:
|
|
1101
|
-
ё:
|
|
1102
|
-
ж:
|
|
1103
|
-
з:
|
|
1104
|
-
и:
|
|
1105
|
-
й:
|
|
1106
|
-
к:
|
|
1107
|
-
л:
|
|
1108
|
-
м:
|
|
1109
|
-
н:
|
|
1110
|
-
о:
|
|
1111
|
-
п:
|
|
1112
|
-
р:
|
|
1113
|
-
с:
|
|
1114
|
-
т:
|
|
1115
|
-
у:
|
|
1116
|
-
ф:
|
|
1117
|
-
х:
|
|
1118
|
-
ц:
|
|
1119
|
-
ч:
|
|
1120
|
-
ш:
|
|
1121
|
-
щ:
|
|
1122
|
-
ъ:
|
|
1123
|
-
ы:
|
|
1124
|
-
ь:
|
|
1125
|
-
ю:
|
|
1126
|
-
я:
|
|
1158
|
+
а: `f`,
|
|
1159
|
+
б: `,`,
|
|
1160
|
+
в: `d`,
|
|
1161
|
+
г: `u`,
|
|
1162
|
+
д: `l`,
|
|
1163
|
+
е: `t`,
|
|
1164
|
+
ё: `\``,
|
|
1165
|
+
ж: `;`,
|
|
1166
|
+
з: `p`,
|
|
1167
|
+
и: `b`,
|
|
1168
|
+
й: `q`,
|
|
1169
|
+
к: `r`,
|
|
1170
|
+
л: `k`,
|
|
1171
|
+
м: `v`,
|
|
1172
|
+
н: `y`,
|
|
1173
|
+
о: `j`,
|
|
1174
|
+
п: `g`,
|
|
1175
|
+
р: `h`,
|
|
1176
|
+
с: `c`,
|
|
1177
|
+
т: `n`,
|
|
1178
|
+
у: `e`,
|
|
1179
|
+
ф: `a`,
|
|
1180
|
+
х: `[`,
|
|
1181
|
+
ц: `w`,
|
|
1182
|
+
ч: `x`,
|
|
1183
|
+
ш: `i`,
|
|
1184
|
+
щ: `o`,
|
|
1185
|
+
ъ: `]`,
|
|
1186
|
+
ы: `s`,
|
|
1187
|
+
ь: `m`,
|
|
1188
|
+
ю: `.`,
|
|
1189
|
+
я: `z`,
|
|
1127
1190
|
};
|
|
1128
1191
|
/**
|
|
1129
1192
|
* @deprecated: use {@link tuiTransliterateKeyboardLayout} instead
|
|
@@ -1133,7 +1196,7 @@ const MAP = {
|
|
|
1133
1196
|
*/
|
|
1134
1197
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1135
1198
|
function transliterateKeyboardLayout(string) {
|
|
1136
|
-
let newStr =
|
|
1199
|
+
let newStr = ``;
|
|
1137
1200
|
for (let i = 0; i < string.length; i++) {
|
|
1138
1201
|
newStr += string.charAt(i) in MAP ? MAP[string.charAt(i)] : string.charAt(i);
|
|
1139
1202
|
}
|
|
@@ -1141,17 +1204,17 @@ function transliterateKeyboardLayout(string) {
|
|
|
1141
1204
|
}
|
|
1142
1205
|
const tuiTransliterateKeyboardLayout = transliterateKeyboardLayout;
|
|
1143
1206
|
|
|
1144
|
-
const TUI_DOC_PAGES = new InjectionToken(
|
|
1207
|
+
const TUI_DOC_PAGES = new InjectionToken(`Documentation pages`, {
|
|
1145
1208
|
factory: () => [],
|
|
1146
1209
|
});
|
|
1147
1210
|
|
|
1148
|
-
const TUI_DOC_TITLE = new InjectionToken(
|
|
1149
|
-
factory: () =>
|
|
1211
|
+
const TUI_DOC_TITLE = new InjectionToken(`Page title`, {
|
|
1212
|
+
factory: () => ``,
|
|
1150
1213
|
});
|
|
1151
1214
|
|
|
1152
|
-
const NAVIGATION_TITLE = new InjectionToken(
|
|
1153
|
-
const NAVIGATION_LABELS = new InjectionToken(
|
|
1154
|
-
const NAVIGATION_ITEMS = new InjectionToken(
|
|
1215
|
+
const NAVIGATION_TITLE = new InjectionToken(`Page title`);
|
|
1216
|
+
const NAVIGATION_LABELS = new InjectionToken(`Navigation sections labels for search`);
|
|
1217
|
+
const NAVIGATION_ITEMS = new InjectionToken(`Navigation pages`);
|
|
1155
1218
|
const NAVIGATION_PROVIDERS = [
|
|
1156
1219
|
TuiDestroyService,
|
|
1157
1220
|
{
|
|
@@ -1190,8 +1253,59 @@ function itemsProviderFactory(pages) {
|
|
|
1190
1253
|
];
|
|
1191
1254
|
}
|
|
1192
1255
|
|
|
1256
|
+
/**
|
|
1257
|
+
* @deprecated: use {@link TuiScrollIntoViewLinkDirective}
|
|
1258
|
+
* TODO: remove in v3.0
|
|
1259
|
+
*/
|
|
1260
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1261
|
+
class ScrollIntoViewDirective {
|
|
1262
|
+
constructor(destroy$, { nativeElement }, readyToScroll$) {
|
|
1263
|
+
this.readyToScroll$ = readyToScroll$;
|
|
1264
|
+
this.scroll$ = new ReplaySubject(1);
|
|
1265
|
+
this.readyToScroll$
|
|
1266
|
+
.pipe(filter(Boolean), switchMapTo(this.scroll$), debounceTime(750), filter(shallWe => shallWe && !!getElementObscurers(nativeElement)), takeUntil(destroy$))
|
|
1267
|
+
.subscribe(() => {
|
|
1268
|
+
nativeElement.scrollIntoView();
|
|
1269
|
+
});
|
|
1270
|
+
}
|
|
1271
|
+
set scrollIntoView(shallWe) {
|
|
1272
|
+
this.scroll$.next(shallWe);
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
ScrollIntoViewDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScrollIntoViewDirective, deps: [{ token: TuiDestroyService }, { token: ElementRef }, { token: TUI_DOC_PAGE_LOADED }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1276
|
+
ScrollIntoViewDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ScrollIntoViewDirective, selector: "[scrollIntoView]", inputs: { scrollIntoView: "scrollIntoView" }, providers: [TuiDestroyService], ngImport: i0 });
|
|
1277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScrollIntoViewDirective, decorators: [{
|
|
1278
|
+
type: Directive,
|
|
1279
|
+
args: [{
|
|
1280
|
+
selector: `[scrollIntoView]`,
|
|
1281
|
+
providers: [TuiDestroyService],
|
|
1282
|
+
}]
|
|
1283
|
+
}], ctorParameters: function () { return [{ type: i3.TuiDestroyService, decorators: [{
|
|
1284
|
+
type: Inject,
|
|
1285
|
+
args: [TuiDestroyService]
|
|
1286
|
+
}] }, { type: i0.ElementRef, decorators: [{
|
|
1287
|
+
type: Inject,
|
|
1288
|
+
args: [ElementRef]
|
|
1289
|
+
}] }, { type: i8.Observable, decorators: [{
|
|
1290
|
+
type: Inject,
|
|
1291
|
+
args: [TUI_DOC_PAGE_LOADED]
|
|
1292
|
+
}] }]; }, propDecorators: { scrollIntoView: [{
|
|
1293
|
+
type: Input
|
|
1294
|
+
}] } });
|
|
1295
|
+
class TuiScrollIntoViewLinkDirective extends ScrollIntoViewDirective {
|
|
1296
|
+
}
|
|
1297
|
+
TuiScrollIntoViewLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiScrollIntoViewLinkDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1298
|
+
TuiScrollIntoViewLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiScrollIntoViewLinkDirective, selector: "[tuiScrollIntoViewLink]", providers: [TuiDestroyService], usesInheritance: true, ngImport: i0 });
|
|
1299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiScrollIntoViewLinkDirective, decorators: [{
|
|
1300
|
+
type: Directive,
|
|
1301
|
+
args: [{
|
|
1302
|
+
selector: `[tuiScrollIntoViewLink]`,
|
|
1303
|
+
providers: [TuiDestroyService],
|
|
1304
|
+
}]
|
|
1305
|
+
}] });
|
|
1306
|
+
|
|
1193
1307
|
// @dynamic
|
|
1194
|
-
|
|
1308
|
+
class TuiDocNavigationComponent {
|
|
1195
1309
|
constructor(changeDetectorRef, titleService, title$, documentRef, mode, sidebar, labels, items, searchText, router, activatedRoute, destroy$, readyToScroll$, scrollBehavior) {
|
|
1196
1310
|
this.documentRef = documentRef;
|
|
1197
1311
|
this.mode = mode;
|
|
@@ -1205,12 +1319,12 @@ let TuiDocNavigationComponent = class TuiDocNavigationComponent {
|
|
|
1205
1319
|
this.readyToScroll$ = readyToScroll$;
|
|
1206
1320
|
this.scrollBehavior = scrollBehavior;
|
|
1207
1321
|
this.menuOpen = false;
|
|
1208
|
-
this.search =
|
|
1322
|
+
this.search = ``;
|
|
1209
1323
|
this.open = false;
|
|
1210
1324
|
this.openPagesArr = [];
|
|
1211
1325
|
this.openPagesGroupsArr = [];
|
|
1212
|
-
this.active =
|
|
1213
|
-
this.mode$ = this.mode.change$.pipe(startWith(null), map(() => this.mode.mode ||
|
|
1326
|
+
this.active = ``;
|
|
1327
|
+
this.mode$ = this.mode.change$.pipe(startWith(null), map(() => this.mode.mode || `onLight`));
|
|
1214
1328
|
// Angular can't navigate no anchor links
|
|
1215
1329
|
// https://stackoverflow.com/questions/36101756/angular2-routing-with-hashtag-to-page-anchor
|
|
1216
1330
|
title$.subscribe(title => {
|
|
@@ -1245,11 +1359,11 @@ let TuiDocNavigationComponent = class TuiDocNavigationComponent {
|
|
|
1245
1359
|
onClick() {
|
|
1246
1360
|
this.open = false;
|
|
1247
1361
|
this.menuOpen = false;
|
|
1248
|
-
this.search =
|
|
1362
|
+
this.search = ``;
|
|
1249
1363
|
this.openActivePageGroup();
|
|
1250
1364
|
}
|
|
1251
1365
|
filterItems(items, search) {
|
|
1252
|
-
return items.map(section => uniqBy(section.filter(({ title, keywords =
|
|
1366
|
+
return items.map(section => uniqBy(section.filter(({ title, keywords = `` }) => {
|
|
1253
1367
|
title = title.toLowerCase();
|
|
1254
1368
|
search = search.toLowerCase();
|
|
1255
1369
|
keywords = keywords.toLowerCase();
|
|
@@ -1257,13 +1371,13 @@ let TuiDocNavigationComponent = class TuiDocNavigationComponent {
|
|
|
1257
1371
|
keywords.includes(search) ||
|
|
1258
1372
|
title.includes(transliterateKeyboardLayout(search)) ||
|
|
1259
1373
|
keywords.includes(transliterateKeyboardLayout(search)) ||
|
|
1260
|
-
search.replace(/-/gi,
|
|
1261
|
-
}),
|
|
1374
|
+
search.replace(/-/gi, ``).includes(title));
|
|
1375
|
+
}), `title`));
|
|
1262
1376
|
}
|
|
1263
1377
|
flattenSubPages(items) {
|
|
1264
1378
|
return items.reduce((array, item) => [
|
|
1265
1379
|
...array,
|
|
1266
|
-
item.reduce((pages, page) =>
|
|
1380
|
+
item.reduce((pages, page) => `subPages` in page
|
|
1267
1381
|
? [...pages, ...page.subPages]
|
|
1268
1382
|
: [...pages, page], []),
|
|
1269
1383
|
], []);
|
|
@@ -1279,11 +1393,11 @@ let TuiDocNavigationComponent = class TuiDocNavigationComponent {
|
|
|
1279
1393
|
openActivePageGroup() {
|
|
1280
1394
|
this.items.forEach((pages, pagesIndex) => {
|
|
1281
1395
|
pages.forEach((page, pageIndex) => {
|
|
1282
|
-
if (
|
|
1396
|
+
if (`route` in page && this.isActiveRoute(page.route)) {
|
|
1283
1397
|
this.openPagesArr[pagesIndex] = true;
|
|
1284
1398
|
this.active = page.route;
|
|
1285
1399
|
}
|
|
1286
|
-
if (
|
|
1400
|
+
if (`subPages` in page) {
|
|
1287
1401
|
page.subPages.forEach(subPage => {
|
|
1288
1402
|
if (this.isActiveRoute(subPage.route)) {
|
|
1289
1403
|
this.openPagesArr[pagesIndex] = true;
|
|
@@ -1300,69 +1414,233 @@ let TuiDocNavigationComponent = class TuiDocNavigationComponent {
|
|
|
1300
1414
|
if (!element) {
|
|
1301
1415
|
return;
|
|
1302
1416
|
}
|
|
1303
|
-
element.classList.add(
|
|
1417
|
+
element.classList.add(`tui-doc-animated-example`);
|
|
1304
1418
|
element.scrollIntoView({
|
|
1305
|
-
block:
|
|
1306
|
-
inline:
|
|
1419
|
+
block: `start`,
|
|
1420
|
+
inline: `nearest`,
|
|
1307
1421
|
behavior: this.scrollBehavior,
|
|
1308
1422
|
});
|
|
1309
1423
|
}
|
|
1310
|
-
}
|
|
1311
|
-
TuiDocNavigationComponent
|
|
1312
|
-
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
1313
|
-
{ type: Title, decorators: [{ type: Inject, args: [Title,] }] },
|
|
1314
|
-
{ type: Observable, decorators: [{ type: Inject, args: [NAVIGATION_TITLE,] }] },
|
|
1315
|
-
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
1316
|
-
{ type: TuiModeDirective, decorators: [{ type: Inject, args: [TuiModeDirective,] }] },
|
|
1317
|
-
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [TuiSidebarDirective,] }] },
|
|
1318
|
-
{ type: Array, decorators: [{ type: Inject, args: [NAVIGATION_LABELS,] }] },
|
|
1319
|
-
{ type: undefined, decorators: [{ type: Inject, args: [NAVIGATION_ITEMS,] }] },
|
|
1320
|
-
{ type: String, decorators: [{ type: Inject, args: [TUI_DOC_SEARCH_TEXT,] }] },
|
|
1321
|
-
{ type: Router, decorators: [{ type: Inject, args: [Router,] }] },
|
|
1322
|
-
{ type: ActivatedRoute, decorators: [{ type: Inject, args: [ActivatedRoute,] }] },
|
|
1323
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
|
|
1324
|
-
{ type: Observable, decorators: [{ type: Inject, args: [TUI_DOC_PAGE_LOADED,] }] },
|
|
1325
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_SCROLL_BEHAVIOR,] }] }
|
|
1326
|
-
];
|
|
1327
|
-
__decorate([
|
|
1328
|
-
HostBinding('class._open')
|
|
1329
|
-
], TuiDocNavigationComponent.prototype, "menuOpen", void 0);
|
|
1424
|
+
}
|
|
1425
|
+
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 });
|
|
1426
|
+
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-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 tuiTextfieldSize=\"m\"\n tuiTextfieldIconLeft=\"tuiIconSearch\"\n [pseudoFocus]=\"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", 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: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.TuiHostedDropdownComponent, selector: "tui-hosted-dropdown", inputs: ["content", "canOpen", "open"], outputs: ["openChange", "focusedChange"] }, { type: i1.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i1.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent"] }, { type: i1.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }, { type: i1.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i2$1.TuiAccordionComponent, selector: "tui-accordion", inputs: ["closeOthers", "rounded"] }, { type: i2$1.TuiAccordionItemComponent, selector: "tui-accordion-item", inputs: ["noPadding", "showArrow", "borders", "size", "disabled", "disableHover", "open", "async"], outputs: ["openChange"] }, { type: i1.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1.TuiExpandComponent, selector: "tui-expand", inputs: ["async", "expanded"] }], directives: [{ type: i3.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { type: i3.TuiAutoFocusDirective, selector: "[tuiAutoFocus]", inputs: ["autoFocus"] }, { type: i1.TuiDropdownControllerDirective, selector: "[tuiDropdownAlign], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownSided]", inputs: ["tuiDropdownAlign", "tuiDropdownDirection", "tuiDropdownLimitWidth", "tuiDropdownMinHeight", "tuiDropdownMaxHeight", "tuiDropdownSided"] }, { type: i1.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i1.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { type: i1.TuiTextfieldIconLeftDirective, selector: "[tuiTextfieldIconLeft]", inputs: ["tuiTextfieldIconLeft"] }, { type: i1.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { type: i1.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.TuiOptGroupDirective, selector: "tui-opt-group", inputs: ["label"] }, { type: i5.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i1.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i2$1.TuiAccordionItemContentDirective, selector: "ng-template[tuiAccordionItemContent]" }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }, { type: ScrollIntoViewDirective, selector: "[scrollIntoView]", inputs: ["scrollIntoView"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1330
1427
|
__decorate([
|
|
1331
1428
|
tuiPure
|
|
1332
1429
|
], TuiDocNavigationComponent.prototype, "filterItems", null);
|
|
1333
1430
|
__decorate([
|
|
1334
1431
|
tuiPure
|
|
1335
1432
|
], TuiDocNavigationComponent.prototype, "flattenSubPages", null);
|
|
1336
|
-
TuiDocNavigationComponent
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
]
|
|
1433
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocNavigationComponent, decorators: [{
|
|
1434
|
+
type: Component,
|
|
1435
|
+
args: [{
|
|
1436
|
+
selector: `tui-doc-navigation`,
|
|
1437
|
+
templateUrl: `navigation.template.html`,
|
|
1438
|
+
styleUrls: [`navigation.style.less`],
|
|
1439
|
+
providers: NAVIGATION_PROVIDERS,
|
|
1440
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1441
|
+
}]
|
|
1442
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef, decorators: [{
|
|
1443
|
+
type: Inject,
|
|
1444
|
+
args: [ChangeDetectorRef]
|
|
1445
|
+
}] }, { type: i7.Title, decorators: [{
|
|
1446
|
+
type: Inject,
|
|
1447
|
+
args: [Title]
|
|
1448
|
+
}] }, { type: i8.Observable, decorators: [{
|
|
1449
|
+
type: Inject,
|
|
1450
|
+
args: [NAVIGATION_TITLE]
|
|
1451
|
+
}] }, { type: Document, decorators: [{
|
|
1452
|
+
type: Inject,
|
|
1453
|
+
args: [DOCUMENT]
|
|
1454
|
+
}] }, { type: i1.TuiModeDirective, decorators: [{
|
|
1455
|
+
type: Inject,
|
|
1456
|
+
args: [TuiModeDirective]
|
|
1457
|
+
}] }, { type: undefined, decorators: [{
|
|
1458
|
+
type: Optional
|
|
1459
|
+
}, {
|
|
1460
|
+
type: Inject,
|
|
1461
|
+
args: [TuiSidebarDirective]
|
|
1462
|
+
}] }, { type: undefined, decorators: [{
|
|
1463
|
+
type: Inject,
|
|
1464
|
+
args: [NAVIGATION_LABELS]
|
|
1465
|
+
}] }, { type: undefined, decorators: [{
|
|
1466
|
+
type: Inject,
|
|
1467
|
+
args: [NAVIGATION_ITEMS]
|
|
1468
|
+
}] }, { type: undefined, decorators: [{
|
|
1469
|
+
type: Inject,
|
|
1470
|
+
args: [TUI_DOC_SEARCH_TEXT]
|
|
1471
|
+
}] }, { type: i5.Router, decorators: [{
|
|
1472
|
+
type: Inject,
|
|
1473
|
+
args: [Router]
|
|
1474
|
+
}] }, { type: i5.ActivatedRoute, decorators: [{
|
|
1475
|
+
type: Inject,
|
|
1476
|
+
args: [ActivatedRoute]
|
|
1477
|
+
}] }, { type: i8.Observable, decorators: [{
|
|
1478
|
+
type: Inject,
|
|
1479
|
+
args: [TuiDestroyService]
|
|
1480
|
+
}] }, { type: i8.Observable, decorators: [{
|
|
1481
|
+
type: Inject,
|
|
1482
|
+
args: [TUI_DOC_PAGE_LOADED]
|
|
1483
|
+
}] }, { type: undefined, decorators: [{
|
|
1484
|
+
type: Inject,
|
|
1485
|
+
args: [TUI_DOC_SCROLL_BEHAVIOR]
|
|
1486
|
+
}] }]; }, propDecorators: { menuOpen: [{
|
|
1487
|
+
type: HostBinding,
|
|
1488
|
+
args: [`class._open`]
|
|
1489
|
+
}], filterItems: [], flattenSubPages: [] } });
|
|
1360
1490
|
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1491
|
+
const TUI_DOC_LOGO = new InjectionToken(`Main logo`, {
|
|
1492
|
+
factory: () => ``,
|
|
1493
|
+
});
|
|
1494
|
+
|
|
1495
|
+
class TuiDocHeaderComponent {
|
|
1496
|
+
constructor(logo, menu, router, swipes$) {
|
|
1497
|
+
this.logo = logo;
|
|
1498
|
+
this.menu = menu;
|
|
1499
|
+
this.router = router;
|
|
1500
|
+
this.swipes$ = swipes$;
|
|
1501
|
+
this.stream$ = new Subject();
|
|
1502
|
+
this.open$ = merge(this.router.events.pipe(mapTo(false)), this.stream$, this.swipes$.pipe(filter(swipe => swipe.direction === `left` || swipe.direction === `right`), map(swipe => swipe.direction === `right`))).pipe(startWith(false), distinctUntilChanged());
|
|
1503
|
+
}
|
|
1504
|
+
onClick() {
|
|
1505
|
+
this.stream$.next(true);
|
|
1506
|
+
}
|
|
1507
|
+
onActiveZone(active) {
|
|
1508
|
+
if (!active) {
|
|
1509
|
+
this.stream$.next(false);
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
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 });
|
|
1514
|
+
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: i1.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: i3.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i4$1.TuiSidebarDirective, selector: "[tuiSidebar]", inputs: ["tuiSidebarDirection", "tuiSidebarAutoWidth", "tuiSidebar"] }, { type: i6.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocHeaderComponent, decorators: [{
|
|
1516
|
+
type: Component,
|
|
1517
|
+
args: [{
|
|
1518
|
+
selector: `header[tuiDocHeader]`,
|
|
1519
|
+
templateUrl: `./header.template.html`,
|
|
1520
|
+
styleUrls: [`./header.style.less`],
|
|
1521
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1522
|
+
}]
|
|
1523
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1524
|
+
type: Inject,
|
|
1525
|
+
args: [TUI_DOC_LOGO]
|
|
1526
|
+
}] }, { type: undefined, decorators: [{
|
|
1527
|
+
type: Inject,
|
|
1528
|
+
args: [TUI_DOC_MENU_TEXT]
|
|
1529
|
+
}] }, { type: i5.Router, decorators: [{
|
|
1530
|
+
type: Inject,
|
|
1531
|
+
args: [Router]
|
|
1532
|
+
}] }, { type: i3.TuiSwipeService, decorators: [{
|
|
1533
|
+
type: Inject,
|
|
1534
|
+
args: [TuiSwipeService]
|
|
1535
|
+
}] }]; } });
|
|
1536
|
+
|
|
1537
|
+
// @dynamic
|
|
1538
|
+
class TuiDocMainComponent {
|
|
1539
|
+
constructor(storage, windowRef) {
|
|
1540
|
+
this.storage = storage;
|
|
1541
|
+
this.windowRef = windowRef;
|
|
1542
|
+
this.night = this.storage.getItem(`night`) === `true` ||
|
|
1543
|
+
(this.storage.getItem(`night`) === null &&
|
|
1544
|
+
this.windowRef.matchMedia(`(prefers-color-scheme: dark)`).matches);
|
|
1545
|
+
this.change$ = new Subject();
|
|
1546
|
+
}
|
|
1547
|
+
get mode() {
|
|
1548
|
+
return this.night ? `onDark` : null;
|
|
1549
|
+
}
|
|
1550
|
+
onMode(night) {
|
|
1551
|
+
this.night = night;
|
|
1552
|
+
this.change$.next();
|
|
1553
|
+
this.storage.setItem(`night`, String(night));
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
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 });
|
|
1557
|
+
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: [
|
|
1558
|
+
{
|
|
1559
|
+
provide: TuiModeDirective,
|
|
1560
|
+
useExisting: forwardRef(() => TuiDocMainComponent),
|
|
1561
|
+
},
|
|
1562
|
+
TuiSwipeService,
|
|
1563
|
+
], 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 <!-- 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", styles: ["html{scroll-padding-top:4rem;height:auto}tui-root>tui-scroll-controls>.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.9375em){tui-doc-navigation.tui-doc-navigation{display:none}}.tui-doc-content{margin-left:16.25rem}@media screen and (max-width: 47.9375em){.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: i1.TuiThemeNightComponent, selector: "tui-theme-night" }, { type: i1.TuiRootComponent, selector: "tui-root" }, { type: TuiDocNavigationComponent, selector: "tui-doc-navigation" }, { type: TuiDocHeaderComponent, selector: "header[tuiDocHeader]" }, { type: i2$1.TuiToggleComponent, selector: "tui-toggle", inputs: ["singleColor", "showIcons", "showLoader", "size"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.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 });
|
|
1564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocMainComponent, decorators: [{
|
|
1565
|
+
type: Component,
|
|
1566
|
+
args: [{
|
|
1567
|
+
selector: `tui-doc-main`,
|
|
1568
|
+
templateUrl: `./main.template.html`,
|
|
1569
|
+
styleUrls: [`./main.style.less`],
|
|
1570
|
+
encapsulation: ViewEncapsulation.None,
|
|
1571
|
+
providers: [
|
|
1572
|
+
{
|
|
1573
|
+
provide: TuiModeDirective,
|
|
1574
|
+
useExisting: forwardRef(() => TuiDocMainComponent),
|
|
1575
|
+
},
|
|
1576
|
+
TuiSwipeService,
|
|
1577
|
+
],
|
|
1578
|
+
}]
|
|
1579
|
+
}], ctorParameters: function () { return [{ type: Storage, decorators: [{
|
|
1580
|
+
type: Inject,
|
|
1581
|
+
args: [LOCAL_STORAGE]
|
|
1582
|
+
}] }, { type: Window, decorators: [{
|
|
1583
|
+
type: Inject,
|
|
1584
|
+
args: [WINDOW]
|
|
1585
|
+
}] }]; }, propDecorators: { mode: [{
|
|
1586
|
+
type: HostBinding,
|
|
1587
|
+
args: [`attr.data-mode`]
|
|
1588
|
+
}] } });
|
|
1589
|
+
|
|
1590
|
+
/**
|
|
1591
|
+
* @deprecated: use {@link TuiScrollIntoViewLinkModule}
|
|
1592
|
+
* TODO: remove in v3.0
|
|
1593
|
+
*/
|
|
1594
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1595
|
+
class ScrollIntoViewModule {
|
|
1596
|
+
}
|
|
1597
|
+
ScrollIntoViewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScrollIntoViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1598
|
+
ScrollIntoViewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScrollIntoViewModule, declarations: [ScrollIntoViewDirective], exports: [ScrollIntoViewDirective] });
|
|
1599
|
+
ScrollIntoViewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScrollIntoViewModule });
|
|
1600
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScrollIntoViewModule, decorators: [{
|
|
1601
|
+
type: NgModule,
|
|
1602
|
+
args: [{
|
|
1603
|
+
declarations: [ScrollIntoViewDirective],
|
|
1604
|
+
exports: [ScrollIntoViewDirective],
|
|
1605
|
+
}]
|
|
1606
|
+
}] });
|
|
1607
|
+
class TuiScrollIntoViewLinkModule {
|
|
1608
|
+
}
|
|
1609
|
+
TuiScrollIntoViewLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiScrollIntoViewLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1610
|
+
TuiScrollIntoViewLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiScrollIntoViewLinkModule, declarations: [TuiScrollIntoViewLinkDirective], exports: [TuiScrollIntoViewLinkDirective] });
|
|
1611
|
+
TuiScrollIntoViewLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiScrollIntoViewLinkModule });
|
|
1612
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiScrollIntoViewLinkModule, decorators: [{
|
|
1613
|
+
type: NgModule,
|
|
1614
|
+
args: [{
|
|
1615
|
+
declarations: [TuiScrollIntoViewLinkDirective],
|
|
1616
|
+
exports: [TuiScrollIntoViewLinkDirective],
|
|
1617
|
+
}]
|
|
1618
|
+
}] });
|
|
1619
|
+
|
|
1620
|
+
class TuiDocNavigationModule {
|
|
1621
|
+
}
|
|
1622
|
+
TuiDocNavigationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocNavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1623
|
+
TuiDocNavigationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocNavigationModule, declarations: [TuiDocNavigationComponent], imports: [CommonModule,
|
|
1624
|
+
FormsModule,
|
|
1625
|
+
RouterModule,
|
|
1626
|
+
ScrollIntoViewModule,
|
|
1627
|
+
TuiScrollIntoViewLinkModule,
|
|
1628
|
+
TuiButtonModule,
|
|
1629
|
+
TuiPrimitiveTextfieldModule,
|
|
1630
|
+
TuiTextfieldControllerModule,
|
|
1631
|
+
TuiActiveZoneModule,
|
|
1632
|
+
TuiLetModule,
|
|
1633
|
+
TuiModeModule,
|
|
1634
|
+
TuiLinkModule,
|
|
1635
|
+
TuiExpandModule,
|
|
1636
|
+
TuiHostedDropdownModule,
|
|
1637
|
+
TuiDropdownControllerModule,
|
|
1638
|
+
TuiAccordionModule,
|
|
1639
|
+
TuiScrollbarModule,
|
|
1640
|
+
TuiSvgModule,
|
|
1641
|
+
TuiDataListModule,
|
|
1642
|
+
TuiAutoFocusModule], exports: [TuiDocNavigationComponent] });
|
|
1643
|
+
TuiDocNavigationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocNavigationModule, imports: [[
|
|
1366
1644
|
CommonModule,
|
|
1367
1645
|
FormsModule,
|
|
1368
1646
|
RouterModule,
|
|
@@ -1383,75 +1661,84 @@ TuiDocNavigationModule = __decorate([
|
|
|
1383
1661
|
TuiSvgModule,
|
|
1384
1662
|
TuiDataListModule,
|
|
1385
1663
|
TuiAutoFocusModule,
|
|
1386
|
-
]
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1664
|
+
]] });
|
|
1665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocNavigationModule, decorators: [{
|
|
1666
|
+
type: NgModule,
|
|
1667
|
+
args: [{
|
|
1668
|
+
imports: [
|
|
1669
|
+
CommonModule,
|
|
1670
|
+
FormsModule,
|
|
1671
|
+
RouterModule,
|
|
1672
|
+
ScrollIntoViewModule,
|
|
1673
|
+
TuiScrollIntoViewLinkModule,
|
|
1674
|
+
TuiButtonModule,
|
|
1675
|
+
TuiPrimitiveTextfieldModule,
|
|
1676
|
+
TuiTextfieldControllerModule,
|
|
1677
|
+
TuiActiveZoneModule,
|
|
1678
|
+
TuiLetModule,
|
|
1679
|
+
TuiModeModule,
|
|
1680
|
+
TuiLinkModule,
|
|
1681
|
+
TuiExpandModule,
|
|
1682
|
+
TuiHostedDropdownModule,
|
|
1683
|
+
TuiDropdownControllerModule,
|
|
1684
|
+
TuiAccordionModule,
|
|
1685
|
+
TuiScrollbarModule,
|
|
1686
|
+
TuiSvgModule,
|
|
1687
|
+
TuiDataListModule,
|
|
1688
|
+
TuiAutoFocusModule,
|
|
1689
|
+
],
|
|
1690
|
+
declarations: [TuiDocNavigationComponent],
|
|
1691
|
+
exports: [TuiDocNavigationComponent],
|
|
1692
|
+
}]
|
|
1693
|
+
}] });
|
|
1395
1694
|
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
this.stream$.next(true);
|
|
1407
|
-
}
|
|
1408
|
-
onActiveZone(active) {
|
|
1409
|
-
if (!active) {
|
|
1410
|
-
this.stream$.next(false);
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
};
|
|
1414
|
-
TuiDocHeaderComponent.ctorParameters = () => [
|
|
1415
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_LOGO,] }] },
|
|
1416
|
-
{ type: String, decorators: [{ type: Inject, args: [TUI_DOC_MENU_TEXT,] }] },
|
|
1417
|
-
{ type: Router, decorators: [{ type: Inject, args: [Router,] }] },
|
|
1418
|
-
{ type: TuiSwipeService, decorators: [{ type: Inject, args: [TuiSwipeService,] }] }
|
|
1419
|
-
];
|
|
1420
|
-
TuiDocHeaderComponent = __decorate([
|
|
1421
|
-
Component({
|
|
1422
|
-
selector: 'header[tuiDocHeader]',
|
|
1423
|
-
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",
|
|
1424
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1425
|
-
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%}"]
|
|
1426
|
-
}),
|
|
1427
|
-
__param(0, Inject(TUI_DOC_LOGO)),
|
|
1428
|
-
__param(1, Inject(TUI_DOC_MENU_TEXT)),
|
|
1429
|
-
__param(2, Inject(Router)),
|
|
1430
|
-
__param(3, Inject(TuiSwipeService))
|
|
1431
|
-
], TuiDocHeaderComponent);
|
|
1432
|
-
|
|
1433
|
-
let TuiDocHeaderModule = class TuiDocHeaderModule {
|
|
1434
|
-
};
|
|
1435
|
-
TuiDocHeaderModule = __decorate([
|
|
1436
|
-
NgModule({
|
|
1437
|
-
imports: [
|
|
1695
|
+
class TuiDocHeaderModule {
|
|
1696
|
+
}
|
|
1697
|
+
TuiDocHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1698
|
+
TuiDocHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocHeaderModule, declarations: [TuiDocHeaderComponent], imports: [CommonModule,
|
|
1699
|
+
PolymorpheusModule,
|
|
1700
|
+
TuiButtonModule,
|
|
1701
|
+
TuiSidebarModule,
|
|
1702
|
+
TuiActiveZoneModule,
|
|
1703
|
+
TuiDocNavigationModule], exports: [TuiDocHeaderComponent] });
|
|
1704
|
+
TuiDocHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocHeaderModule, imports: [[
|
|
1438
1705
|
CommonModule,
|
|
1439
1706
|
PolymorpheusModule,
|
|
1440
1707
|
TuiButtonModule,
|
|
1441
1708
|
TuiSidebarModule,
|
|
1442
1709
|
TuiActiveZoneModule,
|
|
1443
1710
|
TuiDocNavigationModule,
|
|
1444
|
-
]
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1711
|
+
]] });
|
|
1712
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocHeaderModule, decorators: [{
|
|
1713
|
+
type: NgModule,
|
|
1714
|
+
args: [{
|
|
1715
|
+
imports: [
|
|
1716
|
+
CommonModule,
|
|
1717
|
+
PolymorpheusModule,
|
|
1718
|
+
TuiButtonModule,
|
|
1719
|
+
TuiSidebarModule,
|
|
1720
|
+
TuiActiveZoneModule,
|
|
1721
|
+
TuiDocNavigationModule,
|
|
1722
|
+
],
|
|
1723
|
+
declarations: [TuiDocHeaderComponent],
|
|
1724
|
+
exports: [TuiDocHeaderComponent],
|
|
1725
|
+
}]
|
|
1726
|
+
}] });
|
|
1449
1727
|
|
|
1450
|
-
|
|
1451
|
-
}
|
|
1452
|
-
TuiDocMainModule =
|
|
1453
|
-
|
|
1454
|
-
|
|
1728
|
+
class TuiDocMainModule {
|
|
1729
|
+
}
|
|
1730
|
+
TuiDocMainModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocMainModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1731
|
+
TuiDocMainModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocMainModule, declarations: [TuiDocMainComponent], imports: [CommonModule,
|
|
1732
|
+
RouterModule,
|
|
1733
|
+
FormsModule,
|
|
1734
|
+
TuiToggleModule,
|
|
1735
|
+
TuiThemeNightModule,
|
|
1736
|
+
TuiDocHeaderModule,
|
|
1737
|
+
TuiRootModule,
|
|
1738
|
+
TuiDialogModule,
|
|
1739
|
+
TuiAlertModule,
|
|
1740
|
+
TuiDocNavigationModule], exports: [TuiDocMainComponent] });
|
|
1741
|
+
TuiDocMainModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocMainModule, imports: [[
|
|
1455
1742
|
CommonModule,
|
|
1456
1743
|
RouterModule,
|
|
1457
1744
|
FormsModule,
|
|
@@ -1462,21 +1749,36 @@ TuiDocMainModule = __decorate([
|
|
|
1462
1749
|
TuiDialogModule,
|
|
1463
1750
|
TuiAlertModule,
|
|
1464
1751
|
TuiDocNavigationModule,
|
|
1465
|
-
]
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1752
|
+
]] });
|
|
1753
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocMainModule, decorators: [{
|
|
1754
|
+
type: NgModule,
|
|
1755
|
+
args: [{
|
|
1756
|
+
imports: [
|
|
1757
|
+
CommonModule,
|
|
1758
|
+
RouterModule,
|
|
1759
|
+
FormsModule,
|
|
1760
|
+
TuiToggleModule,
|
|
1761
|
+
TuiThemeNightModule,
|
|
1762
|
+
TuiDocHeaderModule,
|
|
1763
|
+
TuiRootModule,
|
|
1764
|
+
TuiDialogModule,
|
|
1765
|
+
TuiAlertModule,
|
|
1766
|
+
TuiDocNavigationModule,
|
|
1767
|
+
],
|
|
1768
|
+
declarations: [TuiDocMainComponent],
|
|
1769
|
+
exports: [TuiDocMainComponent],
|
|
1770
|
+
}]
|
|
1771
|
+
}] });
|
|
1470
1772
|
|
|
1471
|
-
const TUI_DOC_DEFAULT_TABS = new InjectionToken(
|
|
1773
|
+
const TUI_DOC_DEFAULT_TABS = new InjectionToken(`Array of default tab names`, {
|
|
1472
1774
|
factory: () => [],
|
|
1473
1775
|
});
|
|
1474
1776
|
|
|
1475
|
-
const TUI_DOC_SEE_ALSO = new InjectionToken(
|
|
1777
|
+
const TUI_DOC_SEE_ALSO = new InjectionToken(`Array of arrays of related pages`, {
|
|
1476
1778
|
factory: () => [],
|
|
1477
1779
|
});
|
|
1478
1780
|
|
|
1479
|
-
const PAGE_SEE_ALSO = new InjectionToken(
|
|
1781
|
+
const PAGE_SEE_ALSO = new InjectionToken(`Page see also`);
|
|
1480
1782
|
const PAGE_PROVIDERS = [
|
|
1481
1783
|
{
|
|
1482
1784
|
provide: PAGE_SEE_ALSO,
|
|
@@ -1486,90 +1788,92 @@ const PAGE_PROVIDERS = [
|
|
|
1486
1788
|
];
|
|
1487
1789
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1488
1790
|
function seeAlsoProviderFactory({ nativeElement }, seeAlsoGroups) {
|
|
1489
|
-
const currentHeader = nativeElement.getAttribute(
|
|
1791
|
+
const currentHeader = nativeElement.getAttribute(`header`);
|
|
1490
1792
|
const groups = seeAlsoGroups.filter(group => group.includes(currentHeader)) || [];
|
|
1491
1793
|
const seeAlsoSet = new Set(groups
|
|
1492
1794
|
.join()
|
|
1493
|
-
.split(
|
|
1795
|
+
.split(`,`)
|
|
1494
1796
|
.filter(component => component && component !== currentHeader));
|
|
1495
1797
|
return Array.from(seeAlsoSet);
|
|
1496
1798
|
}
|
|
1497
1799
|
|
|
1498
|
-
|
|
1800
|
+
class TuiDocPageTabConnectorDirective {
|
|
1499
1801
|
constructor(template) {
|
|
1500
1802
|
this.template = template;
|
|
1501
1803
|
}
|
|
1502
|
-
}
|
|
1503
|
-
TuiDocPageTabConnectorDirective
|
|
1504
|
-
|
|
1505
|
-
];
|
|
1804
|
+
}
|
|
1805
|
+
TuiDocPageTabConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocPageTabConnectorDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1806
|
+
TuiDocPageTabConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocPageTabConnectorDirective, selector: "[pageTab]", inputs: { pageTab: "pageTab" }, ngImport: i0 });
|
|
1506
1807
|
__decorate([
|
|
1507
|
-
Input(),
|
|
1508
1808
|
tuiDefaultProp()
|
|
1509
1809
|
], TuiDocPageTabConnectorDirective.prototype, "pageTab", void 0);
|
|
1510
|
-
TuiDocPageTabConnectorDirective
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
],
|
|
1810
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocPageTabConnectorDirective, decorators: [{
|
|
1811
|
+
type: Directive,
|
|
1812
|
+
args: [{
|
|
1813
|
+
selector: `[pageTab]`,
|
|
1814
|
+
}]
|
|
1815
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
1816
|
+
type: Inject,
|
|
1817
|
+
args: [TemplateRef]
|
|
1818
|
+
}] }]; }, propDecorators: { pageTab: [{
|
|
1819
|
+
type: Input
|
|
1820
|
+
}] } });
|
|
1516
1821
|
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
this.
|
|
1524
|
-
this.
|
|
1525
|
-
this.
|
|
1526
|
-
this.
|
|
1527
|
-
this.
|
|
1528
|
-
this.
|
|
1529
|
-
this.activeItemIndex = NaN;
|
|
1822
|
+
const TUI_DOC_SOURCE_CODE = new InjectionToken(`Source code link`, {
|
|
1823
|
+
factory: () => null,
|
|
1824
|
+
});
|
|
1825
|
+
|
|
1826
|
+
class TuiDocSourceCodeComponent {
|
|
1827
|
+
constructor(sourceCode, text) {
|
|
1828
|
+
this.sourceCode = sourceCode;
|
|
1829
|
+
this.text = text;
|
|
1830
|
+
this.header = ``;
|
|
1831
|
+
this.package = ``;
|
|
1832
|
+
this.type = ``;
|
|
1833
|
+
this.path = ``;
|
|
1530
1834
|
}
|
|
1531
|
-
get
|
|
1532
|
-
return
|
|
1835
|
+
get pathOptions() {
|
|
1836
|
+
return this.getPathOptions(this.header, this.package, this.type, this.path);
|
|
1533
1837
|
}
|
|
1534
|
-
|
|
1535
|
-
return
|
|
1838
|
+
getPathOptions(header, packageName, type, path) {
|
|
1839
|
+
return {
|
|
1840
|
+
header,
|
|
1841
|
+
package: packageName,
|
|
1842
|
+
type,
|
|
1843
|
+
path,
|
|
1844
|
+
};
|
|
1536
1845
|
}
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
{ type:
|
|
1540
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_DEFAULT_TABS,] }] },
|
|
1541
|
-
{ type: undefined, decorators: [{ type: Inject, args: [PAGE_SEE_ALSO,] }] }
|
|
1542
|
-
];
|
|
1543
|
-
__decorate([
|
|
1544
|
-
Input()
|
|
1545
|
-
], TuiDocPageComponent.prototype, "header", void 0);
|
|
1546
|
-
__decorate([
|
|
1547
|
-
Input()
|
|
1548
|
-
], TuiDocPageComponent.prototype, "package", void 0);
|
|
1549
|
-
__decorate([
|
|
1550
|
-
Input()
|
|
1551
|
-
], TuiDocPageComponent.prototype, "type", void 0);
|
|
1552
|
-
__decorate([
|
|
1553
|
-
Input()
|
|
1554
|
-
], TuiDocPageComponent.prototype, "path", void 0);
|
|
1846
|
+
}
|
|
1847
|
+
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 });
|
|
1848
|
+
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: i1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i6.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1555
1849
|
__decorate([
|
|
1556
|
-
|
|
1557
|
-
],
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1850
|
+
tuiPure
|
|
1851
|
+
], TuiDocSourceCodeComponent.prototype, "getPathOptions", null);
|
|
1852
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSourceCodeComponent, decorators: [{
|
|
1853
|
+
type: Component,
|
|
1854
|
+
args: [{
|
|
1855
|
+
selector: `tui-doc-source-code`,
|
|
1856
|
+
templateUrl: `./source-code.template.html`,
|
|
1857
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1858
|
+
}]
|
|
1859
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1860
|
+
type: Inject,
|
|
1861
|
+
args: [TUI_DOC_SOURCE_CODE]
|
|
1862
|
+
}] }, { type: undefined, decorators: [{
|
|
1863
|
+
type: Inject,
|
|
1864
|
+
args: [TUI_DOC_SOURCE_CODE_TEXT]
|
|
1865
|
+
}] }]; }, propDecorators: { header: [{
|
|
1866
|
+
type: Input
|
|
1867
|
+
}], package: [{
|
|
1868
|
+
type: Input
|
|
1869
|
+
}], type: [{
|
|
1870
|
+
type: Input
|
|
1871
|
+
}], path: [{
|
|
1872
|
+
type: Input
|
|
1873
|
+
}], getPathOptions: [] } });
|
|
1570
1874
|
|
|
1571
1875
|
// @dynamic
|
|
1572
|
-
|
|
1876
|
+
class TuiDocSeeAlsoComponent {
|
|
1573
1877
|
constructor(text, pages) {
|
|
1574
1878
|
this.text = text;
|
|
1575
1879
|
this.pages = pages;
|
|
@@ -1578,206 +1882,234 @@ let TuiDocSeeAlsoComponent = class TuiDocSeeAlsoComponent {
|
|
|
1578
1882
|
getRouterLink(pageTitle) {
|
|
1579
1883
|
for (let i = 0; i < this.pages.length; i++) {
|
|
1580
1884
|
const page = this.pages
|
|
1581
|
-
.map(page => (
|
|
1885
|
+
.map(page => (`subPages` in page ? page.subPages : [page]))
|
|
1582
1886
|
.reduce((pages, subPages) => [...pages, ...subPages], [])
|
|
1583
1887
|
.find((page) => page.title === pageTitle);
|
|
1584
1888
|
if (page === null || page === void 0 ? void 0 : page.route) {
|
|
1585
1889
|
return page.route;
|
|
1586
1890
|
}
|
|
1587
1891
|
}
|
|
1588
|
-
return
|
|
1892
|
+
return ``;
|
|
1589
1893
|
}
|
|
1590
|
-
}
|
|
1591
|
-
TuiDocSeeAlsoComponent
|
|
1592
|
-
{ type:
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
],
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
};
|
|
1611
|
-
TuiDocSeeAlsoModule = __decorate([
|
|
1612
|
-
NgModule({
|
|
1613
|
-
imports: [CommonModule, RouterModule, TuiLinkModule],
|
|
1614
|
-
declarations: [TuiDocSeeAlsoComponent],
|
|
1615
|
-
exports: [TuiDocSeeAlsoComponent],
|
|
1616
|
-
})
|
|
1617
|
-
], TuiDocSeeAlsoModule);
|
|
1618
|
-
|
|
1619
|
-
const TUI_DOC_SOURCE_CODE = new InjectionToken('Source code link', {
|
|
1620
|
-
factory: () => '',
|
|
1621
|
-
});
|
|
1894
|
+
}
|
|
1895
|
+
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 });
|
|
1896
|
+
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=\"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}.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: i1.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1897
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSeeAlsoComponent, decorators: [{
|
|
1898
|
+
type: Component,
|
|
1899
|
+
args: [{
|
|
1900
|
+
selector: `tui-doc-see-also`,
|
|
1901
|
+
templateUrl: `./see-also.template.html`,
|
|
1902
|
+
styleUrls: [`./see-also.style.less`],
|
|
1903
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1904
|
+
}]
|
|
1905
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1906
|
+
type: Inject,
|
|
1907
|
+
args: [TUI_DOC_SEE_ALSO_TEXT]
|
|
1908
|
+
}] }, { type: undefined, decorators: [{
|
|
1909
|
+
type: Inject,
|
|
1910
|
+
args: [TUI_DOC_PAGES]
|
|
1911
|
+
}] }]; }, propDecorators: { seeAlso: [{
|
|
1912
|
+
type: Input
|
|
1913
|
+
}] } });
|
|
1622
1914
|
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
this.
|
|
1628
|
-
this.
|
|
1629
|
-
this.
|
|
1630
|
-
this.
|
|
1915
|
+
// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
|
|
1916
|
+
// @dynamic
|
|
1917
|
+
class TuiDocPageComponent {
|
|
1918
|
+
constructor(deprecated, defaultTabs, seeAlso) {
|
|
1919
|
+
this.deprecated = deprecated;
|
|
1920
|
+
this.defaultTabs = defaultTabs;
|
|
1921
|
+
this.seeAlso = seeAlso;
|
|
1922
|
+
this.header = ``;
|
|
1923
|
+
this.package = ``;
|
|
1924
|
+
this.type = ``;
|
|
1925
|
+
this.path = ``;
|
|
1926
|
+
this.tabConnectors = EMPTY_QUERY;
|
|
1927
|
+
this.activeItemIndex = NaN;
|
|
1631
1928
|
}
|
|
1632
|
-
get
|
|
1633
|
-
return this.
|
|
1929
|
+
get showSeeAlso() {
|
|
1930
|
+
return !!this.seeAlso.length && this.activeItemIndex === 0;
|
|
1634
1931
|
}
|
|
1635
|
-
|
|
1636
|
-
return {
|
|
1637
|
-
header,
|
|
1638
|
-
package: packageName,
|
|
1639
|
-
type,
|
|
1640
|
-
path,
|
|
1641
|
-
};
|
|
1932
|
+
getRouterLink(tab = ``) {
|
|
1933
|
+
return `./${tab.replace(/ /g, `_`)}`;
|
|
1642
1934
|
}
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1645
|
-
{ type:
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1935
|
+
}
|
|
1936
|
+
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 });
|
|
1937
|
+
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: i2$1.TuiTagComponent, selector: "tui-tag, a[tuiTag]", inputs: ["value", "editable", "allowSpaces", "separator", "maxLength", "size", "showLoader", "status", "hoverable", "removable", "disabled", "autoColor", "leftContent"], outputs: ["edited"] }, { type: i2$1.TuiTabsWithMoreComponent, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["moreContent", "dropdownContent", "underline", "activeItemIndex", "itemsLimit"], outputs: ["activeItemIndexChange"] }, { type: i2$1.TuiTabComponent, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { type: TuiDocSourceCodeComponent, selector: "tui-doc-source-code", inputs: ["header", "package", "type", "path"] }, { type: TuiDocSeeAlsoComponent, selector: "tui-doc-see-also", inputs: ["seeAlso"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.TuiItemDirective, selector: "[tuiItem]" }, { type: i5.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i5.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1938
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocPageComponent, decorators: [{
|
|
1939
|
+
type: Component,
|
|
1940
|
+
args: [{
|
|
1941
|
+
selector: `tui-doc-page`,
|
|
1942
|
+
templateUrl: `./page.template.html`,
|
|
1943
|
+
styleUrls: [`./page.style.less`],
|
|
1944
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1945
|
+
providers: PAGE_PROVIDERS,
|
|
1946
|
+
}]
|
|
1947
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1948
|
+
type: Attribute,
|
|
1949
|
+
args: [`deprecated`]
|
|
1950
|
+
}] }, { type: undefined, decorators: [{
|
|
1951
|
+
type: Inject,
|
|
1952
|
+
args: [TUI_DOC_DEFAULT_TABS]
|
|
1953
|
+
}] }, { type: undefined, decorators: [{
|
|
1954
|
+
type: Inject,
|
|
1955
|
+
args: [PAGE_SEE_ALSO]
|
|
1956
|
+
}] }]; }, propDecorators: { header: [{
|
|
1957
|
+
type: Input
|
|
1958
|
+
}], package: [{
|
|
1959
|
+
type: Input
|
|
1960
|
+
}], type: [{
|
|
1961
|
+
type: Input
|
|
1962
|
+
}], path: [{
|
|
1963
|
+
type: Input
|
|
1964
|
+
}], tabConnectors: [{
|
|
1965
|
+
type: ContentChildren,
|
|
1966
|
+
args: [TuiDocPageTabConnectorDirective]
|
|
1967
|
+
}] } });
|
|
1672
1968
|
|
|
1673
|
-
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
],
|
|
1969
|
+
class TuiDocSeeAlsoModule {
|
|
1970
|
+
}
|
|
1971
|
+
TuiDocSeeAlsoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSeeAlsoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1972
|
+
TuiDocSeeAlsoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSeeAlsoModule, declarations: [TuiDocSeeAlsoComponent], imports: [CommonModule, RouterModule, TuiLinkModule], exports: [TuiDocSeeAlsoComponent] });
|
|
1973
|
+
TuiDocSeeAlsoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSeeAlsoModule, imports: [[CommonModule, RouterModule, TuiLinkModule]] });
|
|
1974
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSeeAlsoModule, decorators: [{
|
|
1975
|
+
type: NgModule,
|
|
1976
|
+
args: [{
|
|
1977
|
+
imports: [CommonModule, RouterModule, TuiLinkModule],
|
|
1978
|
+
declarations: [TuiDocSeeAlsoComponent],
|
|
1979
|
+
exports: [TuiDocSeeAlsoComponent],
|
|
1980
|
+
}]
|
|
1981
|
+
}] });
|
|
1682
1982
|
|
|
1683
|
-
|
|
1684
|
-
}
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1983
|
+
class TuiDocSourceCodeModule {
|
|
1984
|
+
}
|
|
1985
|
+
TuiDocSourceCodeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSourceCodeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1986
|
+
TuiDocSourceCodeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSourceCodeModule, declarations: [TuiDocSourceCodeComponent], imports: [CommonModule, PolymorpheusModule, TuiButtonModule], exports: [TuiDocSourceCodeComponent] });
|
|
1987
|
+
TuiDocSourceCodeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSourceCodeModule, imports: [[CommonModule, PolymorpheusModule, TuiButtonModule]] });
|
|
1988
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocSourceCodeModule, decorators: [{
|
|
1989
|
+
type: NgModule,
|
|
1990
|
+
args: [{
|
|
1991
|
+
declarations: [TuiDocSourceCodeComponent],
|
|
1992
|
+
imports: [CommonModule, PolymorpheusModule, TuiButtonModule],
|
|
1993
|
+
exports: [TuiDocSourceCodeComponent],
|
|
1994
|
+
}]
|
|
1995
|
+
}] });
|
|
1996
|
+
|
|
1997
|
+
class TuiDocPageModule {
|
|
1998
|
+
}
|
|
1999
|
+
TuiDocPageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocPageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2000
|
+
TuiDocPageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocPageModule, declarations: [TuiDocPageComponent, TuiDocPageTabConnectorDirective], imports: [CommonModule,
|
|
2001
|
+
RouterModule,
|
|
2002
|
+
TuiDocSeeAlsoModule,
|
|
2003
|
+
TuiTabsModule,
|
|
2004
|
+
TuiTagModule,
|
|
2005
|
+
TuiDocSourceCodeModule], exports: [TuiDocPageComponent, TuiDocPageTabConnectorDirective] });
|
|
2006
|
+
TuiDocPageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocPageModule, imports: [[
|
|
1688
2007
|
CommonModule,
|
|
1689
2008
|
RouterModule,
|
|
1690
2009
|
TuiDocSeeAlsoModule,
|
|
1691
2010
|
TuiTabsModule,
|
|
1692
2011
|
TuiTagModule,
|
|
1693
2012
|
TuiDocSourceCodeModule,
|
|
1694
|
-
]
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
2013
|
+
]] });
|
|
2014
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDocPageModule, decorators: [{
|
|
2015
|
+
type: NgModule,
|
|
2016
|
+
args: [{
|
|
2017
|
+
imports: [
|
|
2018
|
+
CommonModule,
|
|
2019
|
+
RouterModule,
|
|
2020
|
+
TuiDocSeeAlsoModule,
|
|
2021
|
+
TuiTabsModule,
|
|
2022
|
+
TuiTagModule,
|
|
2023
|
+
TuiDocSourceCodeModule,
|
|
2024
|
+
],
|
|
2025
|
+
declarations: [TuiDocPageComponent, TuiDocPageTabConnectorDirective],
|
|
2026
|
+
exports: [TuiDocPageComponent, TuiDocPageTabConnectorDirective],
|
|
2027
|
+
}]
|
|
2028
|
+
}] });
|
|
1699
2029
|
|
|
1700
2030
|
const TUI_EXAMPLE_PRIMARY_FILE_NAME = {
|
|
1701
|
-
TS:
|
|
1702
|
-
LESS:
|
|
1703
|
-
HTML:
|
|
2031
|
+
TS: `TypeScript`,
|
|
2032
|
+
LESS: `LESS`,
|
|
2033
|
+
HTML: `HTML`,
|
|
1704
2034
|
};
|
|
1705
2035
|
|
|
1706
|
-
// TODO: 3.0 remove in ivy compilation
|
|
1707
|
-
const DEMO_TEXTS = ['Сделано с помощью директивы: ', 'Фон', 'Детали формы'];
|
|
1708
|
-
const DOC_TEXTS = [
|
|
1709
|
-
'Аргумент',
|
|
1710
|
-
'Тип',
|
|
1711
|
-
'Имя и описание',
|
|
1712
|
-
'Значение',
|
|
1713
|
-
'Для работы с динамическими шаблонами используется',
|
|
1714
|
-
];
|
|
1715
|
-
const EXAMPLE_TEXTS = ['Превью', 'Ссылка на пример скопирована', 'Готово'];
|
|
1716
2036
|
const TUI_DOC_RUSSIAN = [
|
|
1717
2037
|
{
|
|
1718
2038
|
provide: TUI_DOC_DEMO_TEXTS,
|
|
1719
|
-
useValue:
|
|
2039
|
+
useValue: [`Сделано с помощью директивы: `, `Фон`, `Детали формы`],
|
|
1720
2040
|
},
|
|
1721
2041
|
{
|
|
1722
2042
|
provide: TUI_DOC_DOCUMENTATION_TEXTS,
|
|
1723
|
-
useValue:
|
|
2043
|
+
useValue: [
|
|
2044
|
+
`Аргумент`,
|
|
2045
|
+
`Тип`,
|
|
2046
|
+
`Имя и описание`,
|
|
2047
|
+
`Значение`,
|
|
2048
|
+
`Для работы с динамическими шаблонами используется`,
|
|
2049
|
+
],
|
|
1724
2050
|
},
|
|
1725
2051
|
{
|
|
1726
2052
|
provide: TUI_DOC_EXAMPLE_TEXTS,
|
|
1727
|
-
useValue:
|
|
2053
|
+
useValue: [`Превью`, `Ссылка на пример скопирована`, `Готово`],
|
|
1728
2054
|
},
|
|
1729
2055
|
{
|
|
1730
2056
|
provide: TUI_DOC_MENU_TEXT,
|
|
1731
|
-
useValue:
|
|
2057
|
+
useValue: `Меню`,
|
|
1732
2058
|
},
|
|
1733
2059
|
{
|
|
1734
2060
|
provide: TUI_DOC_SEARCH_TEXT,
|
|
1735
|
-
useValue:
|
|
2061
|
+
useValue: `Поиск`,
|
|
1736
2062
|
},
|
|
1737
2063
|
{
|
|
1738
2064
|
provide: TUI_DOC_SEE_ALSO_TEXT,
|
|
1739
|
-
useValue:
|
|
2065
|
+
useValue: `Смотрите также`,
|
|
1740
2066
|
},
|
|
1741
2067
|
{
|
|
1742
2068
|
provide: TUI_DOC_SOURCE_CODE_TEXT,
|
|
1743
|
-
useValue:
|
|
2069
|
+
useValue: `Исходный код`,
|
|
1744
2070
|
},
|
|
1745
2071
|
];
|
|
1746
2072
|
|
|
1747
|
-
|
|
1748
|
-
}
|
|
1749
|
-
TuiAddonDocModule =
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
]
|
|
2073
|
+
class TuiAddonDocModule {
|
|
2074
|
+
}
|
|
2075
|
+
TuiAddonDocModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiAddonDocModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2076
|
+
TuiAddonDocModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiAddonDocModule, exports: [TuiDocCodeModule,
|
|
2077
|
+
TuiDocDemoModule,
|
|
2078
|
+
TuiDocDocumentationModule,
|
|
2079
|
+
TuiDocPageModule,
|
|
2080
|
+
TuiDocExampleModule] });
|
|
2081
|
+
TuiAddonDocModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiAddonDocModule, imports: [TuiDocCodeModule,
|
|
2082
|
+
TuiDocDemoModule,
|
|
2083
|
+
TuiDocDocumentationModule,
|
|
2084
|
+
TuiDocPageModule,
|
|
2085
|
+
TuiDocExampleModule] });
|
|
2086
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiAddonDocModule, decorators: [{
|
|
2087
|
+
type: NgModule,
|
|
2088
|
+
args: [{
|
|
2089
|
+
exports: [
|
|
2090
|
+
TuiDocCodeModule,
|
|
2091
|
+
TuiDocDemoModule,
|
|
2092
|
+
TuiDocDocumentationModule,
|
|
2093
|
+
TuiDocPageModule,
|
|
2094
|
+
TuiDocExampleModule,
|
|
2095
|
+
],
|
|
2096
|
+
}]
|
|
2097
|
+
}] });
|
|
1760
2098
|
|
|
1761
|
-
|
|
1762
|
-
* @deprecated: use {@link tuiGenerateRoutes} instead
|
|
1763
|
-
* Generates typical page routing structure
|
|
1764
|
-
*/
|
|
1765
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1766
|
-
function generateRoutes(type) {
|
|
2099
|
+
function tuiGenerateRoutes(type) {
|
|
1767
2100
|
return [
|
|
1768
2101
|
{
|
|
1769
|
-
path:
|
|
2102
|
+
path: ``,
|
|
1770
2103
|
component: type,
|
|
1771
2104
|
children: [
|
|
1772
2105
|
{
|
|
1773
|
-
path:
|
|
2106
|
+
path: `:tab`,
|
|
1774
2107
|
component: type,
|
|
1775
2108
|
},
|
|
1776
2109
|
],
|
|
1777
2110
|
},
|
|
1778
2111
|
];
|
|
1779
2112
|
}
|
|
1780
|
-
const tuiGenerateRoutes = generateRoutes;
|
|
1781
2113
|
|
|
1782
2114
|
/**
|
|
1783
2115
|
* Public API Surface of @taiga-ui/addon-doc
|
|
@@ -1787,5 +2119,5 @@ const tuiGenerateRoutes = generateRoutes;
|
|
|
1787
2119
|
* Generated bundle index. Do not edit.
|
|
1788
2120
|
*/
|
|
1789
2121
|
|
|
1790
|
-
export {
|
|
2122
|
+
export { 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, TuiDocExampleCapitalizePipe, TuiDocExampleComponent, TuiDocExampleGetTabsPipe, TuiDocExampleModule, TuiDocMainComponent, TuiDocMainModule, TuiDocNavigationComponent, TuiDocNavigationModule, TuiDocPageComponent, TuiDocPageModule, TuiDocPageTabConnectorDirective, TuiScrollIntoViewLinkDirective, TuiScrollIntoViewLinkModule, coerceValue, rawLoad, rawLoadRecord, tryParseMarkdownCodeBlock, tuiCoerceValue, tuiGenerateRoutes, tuiRawLoad, tuiRawLoadRecord, tuiTryParseMarkdownCodeBlock };
|
|
1791
2123
|
//# sourceMappingURL=taiga-ui-addon-doc.js.map
|