@taiga-ui/addon-doc 2.22.0 → 2.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -19
- package/bundles/taiga-ui-addon-doc.umd.js +809 -738
- package/bundles/taiga-ui-addon-doc.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-doc.umd.min.js +2 -2
- package/bundles/taiga-ui-addon-doc.umd.min.js.map +1 -1
- package/components/code/code.component.d.ts +4 -1
- package/components/documentation/documentation-property-connector.directive.d.ts +3 -1
- package/components/example/example-get-tabs.pipe.d.ts +4 -0
- package/components/example/example.component.d.ts +4 -7
- package/components/navigation/navigation.component.d.ts +2 -1
- package/esm2015/addon-doc.module.js +1 -1
- package/esm2015/components/code/code.component.js +11 -4
- package/esm2015/components/code/code.module.js +1 -1
- package/esm2015/components/copy/copy.component.js +2 -2
- package/esm2015/components/copy/copy.module.js +1 -1
- package/esm2015/components/demo/demo.component.js +3 -3
- package/esm2015/components/demo/demo.module.js +1 -1
- package/esm2015/components/documentation/documentation-property-connector.directive.js +9 -2
- package/esm2015/components/documentation/documentation.component.js +9 -3
- package/esm2015/components/documentation/documentation.module.js +4 -3
- package/esm2015/components/example/example-get-tabs.pipe.js +12 -0
- package/esm2015/components/example/example.component.js +9 -27
- package/esm2015/components/example/example.module.js +4 -3
- package/esm2015/components/main/main.component.js +1 -1
- package/esm2015/components/main/main.module.js +1 -1
- package/esm2015/components/navigation/navigation.component.js +19 -16
- package/esm2015/components/navigation/navigation.module.js +1 -1
- package/esm2015/components/navigation/navigation.providers.js +1 -1
- package/esm2015/components/page/page.component.js +4 -4
- package/esm2015/components/page/page.module.js +2 -2
- package/esm2015/components/page/page.providers.js +1 -1
- package/esm2015/directives/scroll-into-view/scroll-into-view.module.js +1 -1
- package/esm2015/interfaces/page.js +1 -1
- package/esm2015/internal/header/header.component.js +3 -3
- package/esm2015/internal/header/header.module.js +1 -1
- package/esm2015/internal/input-opacity/input-opacity.module.js +1 -1
- package/esm2015/internal/see-also/see-also.component.js +2 -2
- package/esm2015/internal/see-also/see-also.module.js +1 -1
- package/esm2015/internal/source-code/source-code.component.js +2 -2
- package/esm2015/internal/source-code/source-code.module.js +1 -1
- package/esm2015/languages/russian.js +1 -1
- package/esm2015/public-api.js +5 -5
- package/esm2015/taiga-ui-addon-doc.js +12 -11
- package/esm2015/tokens/code-editor.js +1 -1
- package/esm2015/tokens/example-content-processor.js +2 -4
- package/esm2015/tokens/i18n.js +13 -5
- package/esm2015/tokens/pages.js +1 -1
- package/esm2015/tokens/source-code.js +1 -1
- package/esm2015/utils/raw-load-record.js +12 -0
- package/esm2015/utils/raw-load.js +7 -0
- package/esm5/addon-doc.module.js +1 -1
- package/esm5/components/code/code.component.js +15 -4
- package/esm5/components/code/code.module.js +1 -1
- package/esm5/components/copy/copy.component.js +2 -2
- package/esm5/components/copy/copy.module.js +1 -1
- package/esm5/components/demo/demo.component.js +3 -3
- package/esm5/components/demo/demo.module.js +1 -1
- package/esm5/components/documentation/documentation-property-connector.directive.js +9 -2
- package/esm5/components/documentation/documentation.component.js +9 -3
- package/esm5/components/documentation/documentation.module.js +4 -3
- package/esm5/components/example/example-get-tabs.pipe.js +15 -0
- package/esm5/components/example/example.component.js +10 -44
- package/esm5/components/example/example.module.js +4 -3
- package/esm5/components/main/main.component.js +1 -1
- package/esm5/components/main/main.module.js +1 -1
- package/esm5/components/navigation/navigation.component.js +19 -16
- package/esm5/components/navigation/navigation.module.js +1 -1
- package/esm5/components/navigation/navigation.providers.js +1 -1
- package/esm5/components/page/page.component.js +4 -4
- package/esm5/components/page/page.module.js +2 -2
- package/esm5/components/page/page.providers.js +1 -1
- package/esm5/directives/scroll-into-view/scroll-into-view.module.js +1 -1
- package/esm5/interfaces/page.js +1 -1
- package/esm5/internal/header/header.component.js +3 -3
- package/esm5/internal/header/header.module.js +1 -1
- package/esm5/internal/input-opacity/input-opacity.module.js +1 -1
- package/esm5/internal/see-also/see-also.component.js +2 -2
- package/esm5/internal/see-also/see-also.module.js +1 -1
- package/esm5/internal/source-code/source-code.component.js +2 -2
- package/esm5/internal/source-code/source-code.module.js +1 -1
- package/esm5/languages/russian.js +1 -1
- package/esm5/public-api.js +5 -5
- package/esm5/taiga-ui-addon-doc.js +12 -11
- package/esm5/tokens/code-editor.js +1 -1
- package/esm5/tokens/example-content-processor.js +2 -4
- package/esm5/tokens/i18n.js +13 -5
- package/esm5/tokens/pages.js +1 -1
- package/esm5/tokens/source-code.js +1 -1
- package/esm5/utils/raw-load-record.js +44 -0
- package/esm5/utils/raw-load.js +21 -0
- package/fesm2015/taiga-ui-addon-doc.js +725 -691
- package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
- package/fesm5/taiga-ui-addon-doc.js +796 -725
- package/fesm5/taiga-ui-addon-doc.js.map +1 -1
- package/interfaces/page.d.ts +4 -0
- package/package.json +7 -6
- package/public-api.d.ts +4 -4
- package/taiga-ui-addon-doc.d.ts +11 -10
- package/taiga-ui-addon-doc.metadata.json +1 -1
- package/utils/raw-load-record.d.ts +2 -0
- package/utils/raw-load.d.ts +2 -0
|
@@ -1,24 +1,35 @@
|
|
|
1
|
-
import { __decorate, __param } from 'tslib';
|
|
2
|
-
import { Input, HostBinding, Component, NgModule, Inject, ChangeDetectionStrategy, InjectionToken, Renderer2, PLATFORM_ID, ContentChild, TemplateRef, ViewChild, HostListener, forwardRef,
|
|
1
|
+
import { __awaiter, __decorate, __param } from 'tslib';
|
|
2
|
+
import { Input, HostBinding, Component, NgModule, Inject, ChangeDetectionStrategy, InjectionToken, Renderer2, PLATFORM_ID, ContentChild, TemplateRef, ViewChild, HostListener, forwardRef, EventEmitter, Output, Directive, ChangeDetectorRef, ContentChildren, Attribute, Optional, Pipe, ViewEncapsulation, ElementRef } from '@angular/core';
|
|
3
|
+
import { BehaviorSubject, Subject, timer, Observable, merge } from 'rxjs';
|
|
4
|
+
import { switchMap, switchMapTo, mapTo, startWith, takeUntil, map, debounceTime, filter, mergeMap, distinctUntilChanged } from 'rxjs/operators';
|
|
3
5
|
import { CommonModule, isPlatformBrowser, Location as Location$1, DOCUMENT } from '@angular/common';
|
|
4
6
|
import { HighlightModule } from 'ngx-highlightjs';
|
|
5
|
-
import { tuiPure, TuiDestroyService, TUI_IS_MOBILE, TuiDragModule,
|
|
6
|
-
import { TUI_COPY_TEXTS, TuiSelectModule, TuiRadioBlockModule, TuiCheckboxLabeledModule, TuiDataListWrapperModule,
|
|
7
|
-
import {
|
|
8
|
-
import { switchMapTo, mapTo, startWith, takeUntil, filter, map, mergeMap, debounceTime, switchMap, distinctUntilChanged } from 'rxjs/operators';
|
|
9
|
-
import { TuiButtonModule, TuiModeDirective, TuiLinkModule, TuiExpandModule, TuiGroupModule, TuiTooltipModule, TuiModeModule, TuiSvgModule, TuiDataListModule, TuiTextfieldControllerModule, TuiHintControllerModule, TuiPrimitiveTextfieldModule, TuiHostedDropdownModule, TuiDropdownControllerModule, TuiScrollbarModule, TuiNotificationsService, TuiThemeNightModule, TuiRootModule, TuiDialogModule, TuiNotificationsModule } from '@taiga-ui/core';
|
|
7
|
+
import { tuiPure, TuiDestroyService, TUI_IS_MOBILE, TuiDragModule, EMPTY_QUERY, itemsQueryListObservable, watch, TUI_FOCUSABLE_ITEM_ACCESSOR, identity, TuiSwipeService, getElementObscurers, isPresent, uniqBy, TuiActiveZoneModule, TuiLetModule, TuiAutoFocusModule, tuiDefaultProp } from '@taiga-ui/cdk';
|
|
8
|
+
import { TUI_COPY_TEXTS, TuiSelectModule, TuiRadioBlockModule, TuiCheckboxLabeledModule, TuiDataListWrapperModule, TuiBadgeModule, TuiToggleModule, TuiInputCountModule, TuiTabsModule, TuiAccordionModule, TuiTagModule } from '@taiga-ui/kit';
|
|
9
|
+
import { TuiButtonModule, TuiModeDirective, TuiLinkModule, TuiExpandModule, TuiGroupModule, TuiTooltipModule, TuiModeModule, TuiSvgModule, TuiDataListModule, TuiTextfieldControllerModule, TuiHintControllerModule, TuiPrimitiveTextfieldModule, TuiDropdownControllerModule, TuiNotificationModule, TuiNotificationsService, TuiHostedDropdownModule, TuiScrollbarModule, TuiThemeNightModule, TuiRootModule, TuiDialogModule, TuiNotificationsModule } from '@taiga-ui/core';
|
|
10
10
|
import { FormControl, FormGroup, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
11
|
-
import { UrlSerializer, RouterModule,
|
|
12
|
-
import {
|
|
13
|
-
import { TuiSidebarDirective, TuiSidebarModule } from '@taiga-ui/addon-mobile';
|
|
11
|
+
import { UrlSerializer, RouterModule, ActivatedRoute, Router, NavigationEnd } from '@angular/router';
|
|
12
|
+
import { trigger, transition, style, animate } from '@angular/animations';
|
|
14
13
|
import { Clipboard, ClipboardModule } from '@angular/cdk/clipboard';
|
|
15
14
|
import { LOCATION, LOCAL_STORAGE, WINDOW } from '@ng-web-apis/common';
|
|
16
15
|
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
16
|
+
import { TuiSidebarDirective, TuiSidebarModule } from '@taiga-ui/addon-mobile';
|
|
17
|
+
import { Title } from '@angular/platform-browser';
|
|
18
|
+
|
|
19
|
+
function rawLoad(content) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
return content instanceof Promise ? (yield content).default : content;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
17
24
|
|
|
18
25
|
let TuiDocCodeComponent = class TuiDocCodeComponent {
|
|
19
26
|
constructor() {
|
|
27
|
+
this.rawLoader$$ = new BehaviorSubject('');
|
|
28
|
+
this.processor$ = this.rawLoader$$.pipe(switchMap(rawLoad));
|
|
20
29
|
this.filename = '';
|
|
21
|
-
|
|
30
|
+
}
|
|
31
|
+
set code(code) {
|
|
32
|
+
this.rawLoader$$.next(code);
|
|
22
33
|
}
|
|
23
34
|
get hasFilename() {
|
|
24
35
|
return !!this.filename;
|
|
@@ -29,14 +40,14 @@ __decorate([
|
|
|
29
40
|
], TuiDocCodeComponent.prototype, "filename", void 0);
|
|
30
41
|
__decorate([
|
|
31
42
|
Input()
|
|
32
|
-
], TuiDocCodeComponent.prototype, "code",
|
|
43
|
+
], TuiDocCodeComponent.prototype, "code", null);
|
|
33
44
|
__decorate([
|
|
34
45
|
HostBinding('class._has-filename')
|
|
35
46
|
], TuiDocCodeComponent.prototype, "hasFilename", null);
|
|
36
47
|
TuiDocCodeComponent = __decorate([
|
|
37
48
|
Component({
|
|
38
49
|
selector: 'tui-doc-code',
|
|
39
|
-
template: "<p *ngIf=\"filename\" class=\"t-header\">{{filename}}</p>\n<pre
|
|
50
|
+
template: "<p *ngIf=\"filename\" class=\"t-header\">{{filename}}</p>\n<pre\n class=\"t-code\"\n><code [lineNumbers]=\"true\" [highlight]=\"processor$ | async\"></code></pre>\n",
|
|
40
51
|
styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:700}.t-code{margin:0}.hljs:not(:empty){font:var(--tui-font-text-m);padding:1.5rem 2rem;font-family:monospace;background:var(--tui-clear-disabled);word-wrap:break-word;white-space:pre-wrap}@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution:0.001dpcm){.hljs:not(:empty)::-webkit-scrollbar,.hljs:not(:empty)::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:6px 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}@media screen and (max-width:47.9375em){.hljs:not(:empty){padding:1rem}}"]
|
|
41
52
|
})
|
|
42
53
|
], TuiDocCodeComponent);
|
|
@@ -74,7 +85,7 @@ __decorate([
|
|
|
74
85
|
TuiDocCopyComponent = __decorate([
|
|
75
86
|
Component({
|
|
76
87
|
selector: 'tui-doc-copy',
|
|
77
|
-
template: "<button\n *ngIf=\"texts$ | async as texts\"\n tuiButton\n type=\"button\"\n
|
|
88
|
+
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 class=\"t-content\" [class.t-content_moved]=\"copied$ | async\">\n <span class=\"t-initial\" [attr.data-text]=\"texts[0]\">\n <ng-content></ng-content>\n </span>\n {{ texts[1] }}\n </span>\n</button>\n",
|
|
78
89
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
79
90
|
providers: [TuiDestroyService],
|
|
80
91
|
styles: [":host{position:relative;display:inline-block;vertical-align:middle}.t-copy{transition-property:background;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;width:100%;color:var(--tui-text-01);background:var(--tui-base-01);overflow:hidden}.t-copy:hover{background:var(--tui-base-02)}.t-initial{white-space:nowrap}.t-initial:empty:before{content:attr(data-text)}.t-content{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;flex-direction:column;transform:translateY(1rem);text-align:center;line-height:2rem}.t-content_moved{transform:translateY(-1rem)}"]
|
|
@@ -99,7 +110,9 @@ TuiDocCopyModule = __decorate([
|
|
|
99
110
|
* Works with a tuple
|
|
100
111
|
* [@string tuiMode tooltip content, @string word 'background', @string 'form value']
|
|
101
112
|
*/
|
|
102
|
-
const TUI_DOC_DEMO_TEXTS = new InjectionToken('tui-doc-demo i18n texts', {
|
|
113
|
+
const TUI_DOC_DEMO_TEXTS = new InjectionToken('tui-doc-demo i18n texts', {
|
|
114
|
+
factory: () => ['Read more more about modes: ', 'Background', 'Form value'],
|
|
115
|
+
});
|
|
103
116
|
/**
|
|
104
117
|
* Works with a tuple
|
|
105
118
|
* [
|
|
@@ -127,15 +140,21 @@ const TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken('tui-doc-documentation i1
|
|
|
127
140
|
* @string link to a sample copied message label
|
|
128
141
|
* ]
|
|
129
142
|
*/
|
|
130
|
-
const TUI_DOC_EXAMPLE_TEXTS = new InjectionToken('tui-doc-example i18n texts', {
|
|
143
|
+
const TUI_DOC_EXAMPLE_TEXTS = new InjectionToken('tui-doc-example i18n texts', {
|
|
144
|
+
factory: () => ['Preview', 'Link to a sample was successfully copied', 'Done'],
|
|
145
|
+
});
|
|
131
146
|
const TUI_DOC_MENU_TEXT = new InjectionToken('menu i18n text', {
|
|
132
147
|
factory: () => 'Menu',
|
|
133
148
|
});
|
|
134
149
|
const TUI_DOC_SEARCH_TEXT = new InjectionToken('search i18n text', {
|
|
135
150
|
factory: () => 'Search',
|
|
136
151
|
});
|
|
137
|
-
const TUI_DOC_SEE_ALSO_TEXT = new InjectionToken('tui-doc-see-also i18n text', {
|
|
138
|
-
|
|
152
|
+
const TUI_DOC_SEE_ALSO_TEXT = new InjectionToken('tui-doc-see-also i18n text', {
|
|
153
|
+
factory: () => 'See also',
|
|
154
|
+
});
|
|
155
|
+
const TUI_DOC_SOURCE_CODE_TEXT = new InjectionToken('tui-doc-source-code i18n text', {
|
|
156
|
+
factory: () => 'Source code',
|
|
157
|
+
});
|
|
139
158
|
|
|
140
159
|
var TuiDocDemoComponent_1;
|
|
141
160
|
const MIN_COMPONENT_WIDTH = 104;
|
|
@@ -255,7 +274,7 @@ __decorate([
|
|
|
255
274
|
TuiDocDemoComponent = TuiDocDemoComponent_1 = __decorate([
|
|
256
275
|
Component({
|
|
257
276
|
selector: 'tui-doc-demo',
|
|
258
|
-
template: "<div class=\"t-bg-toggle\" [tuiMode]=\"null\">\n <ng-template #tooltip>\n {{texts[0]}}\n <a tuiLink tuiMode=\"onDark\" routerLink=\"/directives/mode\">\n <code>tuiMode</code>\n </a>\n </ng-template>\n <ng-container *ngIf=\"isMobile else desktop\">\n <tui-select\n
|
|
277
|
+
template: "<div class=\"t-bg-toggle\" [tuiMode]=\"null\">\n <ng-template #tooltip>\n {{ texts[0] }}\n <a tuiLink tuiMode=\"onDark\" routerLink=\"/directives/mode\">\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 describeId=\"form\" [content]=\"tooltip\"></tui-tooltip>\n <div tuiGroup class=\"tui-space_left-3\" [collapsed]=\"true\">\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=\"tui-space_left-3\"\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 #content id=\"demoContent\" class=\"t-content\">\n <form *ngIf=\"testForm\" class=\"t-form\" [formGroup]=\"testForm\">\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=\"tui-space_top-3\"\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 class=\"t-expand\" [expanded]=\"expanded\">\n <ng-template tuiExpandContent>\n <pre class=\"t-value\">\nForm data: {{ testForm.value | json }}</pre\n >\n <div tuiGroup class=\"tui-space_top-3\">\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 #resizerText class=\"t-resizer-text\"></span>\n </button>\n</div>\n",
|
|
259
278
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
260
279
|
providers: [
|
|
261
280
|
TuiDestroyService,
|
|
@@ -264,7 +283,7 @@ TuiDocDemoComponent = TuiDocDemoComponent_1 = __decorate([
|
|
|
264
283
|
useExisting: forwardRef(() => TuiDocDemoComponent_1),
|
|
265
284
|
},
|
|
266
285
|
],
|
|
267
|
-
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.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.wrapper_dark{background-color:#454e58;color:var(--tui-base-01)}.t-wrapper.wrapper_gray{background-color:#e5e7ea}.t-wrapper.wrapper_dark.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.wrapper_gray.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%)}.t-content{flex:1 1 0;min-width:0;padding:1.5rem;box-sizing:border-box;overflow:hidden}@media screen and (max-width:47.9375em){.t-wrapper{min-height:auto}.t-content{padding:1rem}}.t-form{display:flex;flex-wrap:wrap;align-items:flex-start}.t-input-wrapper{width:100%;margin-bottom:.5rem}.t-expand{width:100%}.t-icon{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out}.t-icon_rotated{transform:rotate(180deg)}.t-value{flex:1;background:var(--tui-clear-inverse);padding:.75rem;border-radius:.25rem}.t-mode{width:12.5rem}.t-select{max-width:15rem}.t-resizer{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;box-shadow:0 .5rem 1rem rgba(0,0,0,.16);position:relative;width:3.5rem;min-height:inherit;flex-shrink:0;border-left:1px solid var(--tui-base-03);cursor:col-resize;outline:0;background:var(--tui-base-01);color:var(--tui-text-01)}.t-resizer:after,.t-resizer:before{content:'';position:absolute;top:.75rem;left:50%;bottom:.75rem;width:1px;background:var(--tui-base-05)}.t-resizer:before{transform:translateX(.125rem)}.t-resizer:after{transform:translateX(-.1875rem)}@media screen and (max-width:47.9375em){.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}@supports (position:sticky){@media screen and (min-height:37.5rem){:host{position:sticky;top:4.625rem;z-index:2}}}"]
|
|
286
|
+
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%)}.t-content{flex:1 1 0;min-width:0;padding:1.5rem;box-sizing:border-box;overflow:hidden}@media screen and (max-width:47.9375em){.t-wrapper{min-height:auto}.t-content{padding:1rem}}.t-form{display:flex;flex-wrap:wrap;align-items:flex-start}.t-input-wrapper{width:100%;margin-bottom:.5rem}.t-expand{width:100%}.t-icon{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out}.t-icon_rotated{transform:rotate(180deg)}.t-value{flex:1;background:var(--tui-clear-inverse);padding:.75rem;border-radius:.25rem}.t-mode{width:12.5rem}.t-select{max-width:15rem}.t-resizer{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;box-shadow:0 .5rem 1rem rgba(0,0,0,.16);position:relative;width:3.5rem;min-height:inherit;flex-shrink:0;border-left:1px solid var(--tui-base-03);cursor:col-resize;outline:0;background:var(--tui-base-01);color:var(--tui-text-01)}.t-resizer:after,.t-resizer:before{content:'';position:absolute;top:.75rem;left:50%;bottom:.75rem;width:1px;background:var(--tui-base-05)}.t-resizer:before{transform:translateX(.125rem)}.t-resizer:after{transform:translateX(-.1875rem)}@media screen and (max-width:47.9375em){.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}@supports (position:sticky){@media screen and (min-height:37.5rem){:host{position:sticky;top:4.625rem;z-index:2}}}"]
|
|
268
287
|
}),
|
|
269
288
|
__param(0, Inject(TUI_IS_MOBILE)),
|
|
270
289
|
__param(1, Inject(TuiDestroyService)),
|
|
@@ -305,456 +324,139 @@ TuiDocDemoModule = __decorate([
|
|
|
305
324
|
})
|
|
306
325
|
], TuiDocDemoModule);
|
|
307
326
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
с: 'c',
|
|
328
|
-
т: 'n',
|
|
329
|
-
у: 'e',
|
|
330
|
-
ф: 'a',
|
|
331
|
-
х: '[',
|
|
332
|
-
ц: 'w',
|
|
333
|
-
ч: 'x',
|
|
334
|
-
ш: 'i',
|
|
335
|
-
щ: 'o',
|
|
336
|
-
ъ: ']',
|
|
337
|
-
ы: 's',
|
|
338
|
-
ь: 'm',
|
|
339
|
-
ю: '.',
|
|
340
|
-
я: 'z',
|
|
341
|
-
};
|
|
342
|
-
/**
|
|
343
|
-
* Translates text mistakenly typed in the Russian layout into English
|
|
344
|
-
* @param string string with Russian layout characters
|
|
345
|
-
* @return string with English layout characters
|
|
346
|
-
*/
|
|
347
|
-
function transliterateKeyboardLayout(string) {
|
|
348
|
-
let newStr = '';
|
|
349
|
-
for (let i = 0; i < string.length; i++) {
|
|
350
|
-
newStr += string.charAt(i) in MAP ? MAP[string.charAt(i)] : string.charAt(i);
|
|
351
|
-
}
|
|
352
|
-
return newStr;
|
|
327
|
+
function rgbToHex(r, g, b) {
|
|
328
|
+
return ('#' +
|
|
329
|
+
[r, g, b]
|
|
330
|
+
.map(x => {
|
|
331
|
+
const hex = x.toString(16);
|
|
332
|
+
return hex.length === 1 ? '0' + hex : hex;
|
|
333
|
+
})
|
|
334
|
+
.join(''));
|
|
335
|
+
}
|
|
336
|
+
function hexToRgb(hex) {
|
|
337
|
+
const matches = hex
|
|
338
|
+
.replace('#', '')
|
|
339
|
+
.split('')
|
|
340
|
+
.map((char, _, array) => (array.length === 3 ? char + char : char))
|
|
341
|
+
.join('')
|
|
342
|
+
.match(/.{2}/g);
|
|
343
|
+
return matches
|
|
344
|
+
? matches.map(x => Number.parseInt(x, 16))
|
|
345
|
+
: [0, 0, 0];
|
|
353
346
|
}
|
|
354
347
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
useFactory: titleProviderFactory,
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
provide: NAVIGATION_LABELS,
|
|
375
|
-
deps: [TUI_DOC_PAGES],
|
|
376
|
-
useFactory: labelsProviderFactory,
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
provide: NAVIGATION_ITEMS,
|
|
380
|
-
deps: [TUI_DOC_PAGES],
|
|
381
|
-
useFactory: itemsProviderFactory,
|
|
382
|
-
},
|
|
383
|
-
];
|
|
384
|
-
function titleProviderFactory(router, activatedRoute, titlePrefix, destroy$) {
|
|
385
|
-
return router.events.pipe(filter(event => event instanceof NavigationEnd), map(() => activatedRoute.firstChild), filter(isPresent), mergeMap(({ data }) => data), map(({ title }) => titlePrefix + title), takeUntil(destroy$));
|
|
348
|
+
function inspectArray(array, depth) {
|
|
349
|
+
if (depth === 0) {
|
|
350
|
+
return '[…]';
|
|
351
|
+
}
|
|
352
|
+
let result = '';
|
|
353
|
+
let first = true;
|
|
354
|
+
for (let index = 0; index < array.length; index++) {
|
|
355
|
+
if (first) {
|
|
356
|
+
first = false;
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
result += ', ';
|
|
360
|
+
}
|
|
361
|
+
result += index in array ? inspectAny(array[index], depth - 1) : 'empty';
|
|
362
|
+
}
|
|
363
|
+
return `[${result}]`;
|
|
386
364
|
}
|
|
387
|
-
function
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
365
|
+
function inspectObject(object, depth) {
|
|
366
|
+
if (depth === 0) {
|
|
367
|
+
return `{…}`;
|
|
368
|
+
}
|
|
369
|
+
let result = '';
|
|
370
|
+
let first = true;
|
|
371
|
+
for (const key in object) {
|
|
372
|
+
if (!object.hasOwnProperty(key)) {
|
|
373
|
+
continue;
|
|
374
|
+
}
|
|
375
|
+
if (first) {
|
|
376
|
+
first = false;
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
result += ', ';
|
|
380
|
+
}
|
|
381
|
+
result += `${key}: ${inspectAny(object[key], depth - 1)}`;
|
|
382
|
+
}
|
|
383
|
+
return `{${result}}`;
|
|
392
384
|
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
385
|
+
// @bad TODO add more types
|
|
386
|
+
/**
|
|
387
|
+
* Returns readable JS entity
|
|
388
|
+
* @param data
|
|
389
|
+
* @param depth
|
|
390
|
+
* @return readable JS entity
|
|
391
|
+
*/
|
|
392
|
+
function inspectAny(data, depth) {
|
|
393
|
+
if (data === null) {
|
|
394
|
+
return 'null';
|
|
395
|
+
}
|
|
396
|
+
switch (typeof data) {
|
|
397
|
+
case 'string':
|
|
398
|
+
return `'${data}'`;
|
|
399
|
+
case 'undefined':
|
|
400
|
+
case 'number':
|
|
401
|
+
case 'boolean':
|
|
402
|
+
case 'function':
|
|
403
|
+
return String(data);
|
|
404
|
+
}
|
|
405
|
+
if (data instanceof RegExp) {
|
|
406
|
+
return data.toString();
|
|
407
|
+
}
|
|
408
|
+
if (Array.isArray(data)) {
|
|
409
|
+
return inspectArray(data, depth);
|
|
410
|
+
}
|
|
411
|
+
return inspectObject(data, depth);
|
|
399
412
|
}
|
|
400
413
|
|
|
401
|
-
const
|
|
402
|
-
// @
|
|
403
|
-
let
|
|
404
|
-
constructor(
|
|
405
|
-
this.
|
|
406
|
-
this.
|
|
407
|
-
this.sidebar = sidebar;
|
|
408
|
-
this.labels = labels;
|
|
409
|
-
this.items = items;
|
|
410
|
-
this.searchText = searchText;
|
|
411
|
-
this.router = router;
|
|
414
|
+
const SERIALIZED_SUFFIX = '$';
|
|
415
|
+
// @bad TODO: refactor output and value sync
|
|
416
|
+
let TuiDocDocumentationPropertyConnectorDirective = class TuiDocDocumentationPropertyConnectorDirective {
|
|
417
|
+
constructor(template, locationRef, activatedRoute, urlSerializer) {
|
|
418
|
+
this.template = template;
|
|
419
|
+
this.locationRef = locationRef;
|
|
412
420
|
this.activatedRoute = activatedRoute;
|
|
413
|
-
this.
|
|
414
|
-
this.
|
|
415
|
-
this.
|
|
416
|
-
this.
|
|
417
|
-
this.
|
|
418
|
-
this.
|
|
419
|
-
this.
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
titleService.setTitle(title);
|
|
424
|
-
this.openActivePageGroup();
|
|
425
|
-
this.handleAnchorLink(this.activatedRoute.snapshot.fragment);
|
|
426
|
-
});
|
|
421
|
+
this.urlSerializer = urlSerializer;
|
|
422
|
+
this.documentationPropertyName = '';
|
|
423
|
+
this.documentationPropertyMode = null;
|
|
424
|
+
this.documentationPropertyType = '';
|
|
425
|
+
this.documentationPropertyValue = null;
|
|
426
|
+
this.documentationPropertyDeprecated = false;
|
|
427
|
+
this.documentationPropertyValues = null;
|
|
428
|
+
this.documentationPropertyValueChange = new EventEmitter();
|
|
429
|
+
this.changed$ = new Subject();
|
|
430
|
+
this.emits$ = new BehaviorSubject(1);
|
|
427
431
|
}
|
|
428
|
-
|
|
429
|
-
|
|
432
|
+
ngOnInit() {
|
|
433
|
+
this.parseParams(this.activatedRoute.snapshot.queryParams);
|
|
430
434
|
}
|
|
431
|
-
get
|
|
432
|
-
|
|
435
|
+
get attrName() {
|
|
436
|
+
switch (this.documentationPropertyMode) {
|
|
437
|
+
case 'input':
|
|
438
|
+
return `[${this.documentationPropertyName}]`;
|
|
439
|
+
case 'output':
|
|
440
|
+
return `(${this.documentationPropertyName})`;
|
|
441
|
+
case 'input-output':
|
|
442
|
+
return `[(${this.documentationPropertyName})]`;
|
|
443
|
+
default:
|
|
444
|
+
return this.documentationPropertyName;
|
|
445
|
+
}
|
|
433
446
|
}
|
|
434
|
-
get
|
|
435
|
-
return this.
|
|
447
|
+
get hasItems() {
|
|
448
|
+
return !!this.documentationPropertyValues;
|
|
436
449
|
}
|
|
437
|
-
|
|
438
|
-
return
|
|
450
|
+
get shouldShowValues() {
|
|
451
|
+
return this.documentationPropertyMode !== 'output';
|
|
439
452
|
}
|
|
440
|
-
|
|
441
|
-
this.
|
|
453
|
+
ngOnChanges() {
|
|
454
|
+
this.changed$.next();
|
|
442
455
|
}
|
|
443
|
-
|
|
444
|
-
this.
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
this.search = search;
|
|
448
|
-
this.open = this.canOpen;
|
|
449
|
-
}
|
|
450
|
-
onClick() {
|
|
451
|
-
this.open = false;
|
|
452
|
-
this.menuOpen = false;
|
|
453
|
-
this.search = '';
|
|
454
|
-
this.openActivePageGroup();
|
|
455
|
-
}
|
|
456
|
-
filterItems(items, search) {
|
|
457
|
-
return items.map(section => uniqBy(section.filter(({ title, keywords = '' }) => {
|
|
458
|
-
title = title.toLowerCase();
|
|
459
|
-
search = search.toLowerCase();
|
|
460
|
-
keywords = keywords.toLowerCase();
|
|
461
|
-
return (title.includes(search) ||
|
|
462
|
-
keywords.includes(search) ||
|
|
463
|
-
title.includes(transliterateKeyboardLayout(search)) ||
|
|
464
|
-
keywords.includes(transliterateKeyboardLayout(search)) ||
|
|
465
|
-
search.replace(/-/gi, '').includes(title));
|
|
466
|
-
}), 'title'));
|
|
467
|
-
}
|
|
468
|
-
flattenSubPages(items) {
|
|
469
|
-
return items.reduce((array, item) => [
|
|
470
|
-
...array,
|
|
471
|
-
item.reduce((pages, page) => 'subPages' in page
|
|
472
|
-
? [...pages, ...page.subPages]
|
|
473
|
-
: [...pages, page], []),
|
|
474
|
-
], []);
|
|
475
|
-
}
|
|
476
|
-
isActiveRoute(route) {
|
|
477
|
-
return this.router.isActive(route, false);
|
|
478
|
-
}
|
|
479
|
-
handleAnchorLink(hash) {
|
|
480
|
-
setTimeout(() => {
|
|
481
|
-
this.navigateToAnchorLink(hash);
|
|
482
|
-
}, SCROLL_INTO_VIEW_DELAY);
|
|
483
|
-
}
|
|
484
|
-
openActivePageGroup() {
|
|
485
|
-
this.items.forEach((pages, pagesIndex) => {
|
|
486
|
-
pages.forEach((page, pageIndex) => {
|
|
487
|
-
if ('route' in page && this.isActiveRoute(page.route)) {
|
|
488
|
-
this.openPagesArr[pagesIndex] = true;
|
|
489
|
-
this.active = page.route;
|
|
490
|
-
}
|
|
491
|
-
if ('subPages' in page) {
|
|
492
|
-
page.subPages.forEach(subPage => {
|
|
493
|
-
if (this.isActiveRoute(subPage.route)) {
|
|
494
|
-
this.openPagesArr[pagesIndex] = true;
|
|
495
|
-
this.openPagesGroupsArr[pagesIndex * 100 + pageIndex] = true;
|
|
496
|
-
this.active = subPage.route;
|
|
497
|
-
}
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
});
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
navigateToAnchorLink(fragment) {
|
|
504
|
-
const element = fragment && this.documentRef.querySelector(`#${fragment}`);
|
|
505
|
-
if (!element) {
|
|
506
|
-
return;
|
|
507
|
-
}
|
|
508
|
-
element.classList.add('tui-doc-animated-example');
|
|
509
|
-
element.scrollIntoView({
|
|
510
|
-
block: 'start',
|
|
511
|
-
inline: 'nearest',
|
|
512
|
-
behavior: 'smooth',
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
};
|
|
516
|
-
TuiDocNavigationComponent.ctorParameters = () => [
|
|
517
|
-
{ type: Title, decorators: [{ type: Inject, args: [Title,] }] },
|
|
518
|
-
{ type: Observable, decorators: [{ type: Inject, args: [NAVIGATION_TITLE,] }] },
|
|
519
|
-
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
520
|
-
{ type: TuiModeDirective, decorators: [{ type: Inject, args: [TuiModeDirective,] }] },
|
|
521
|
-
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [TuiSidebarDirective,] }] },
|
|
522
|
-
{ type: Array, decorators: [{ type: Inject, args: [NAVIGATION_LABELS,] }] },
|
|
523
|
-
{ type: undefined, decorators: [{ type: Inject, args: [NAVIGATION_ITEMS,] }] },
|
|
524
|
-
{ type: String, decorators: [{ type: Inject, args: [TUI_DOC_SEARCH_TEXT,] }] },
|
|
525
|
-
{ type: Router, decorators: [{ type: Inject, args: [Router,] }] },
|
|
526
|
-
{ type: ActivatedRoute, decorators: [{ type: Inject, args: [ActivatedRoute,] }] }
|
|
527
|
-
];
|
|
528
|
-
__decorate([
|
|
529
|
-
HostBinding('class._open')
|
|
530
|
-
], TuiDocNavigationComponent.prototype, "menuOpen", void 0);
|
|
531
|
-
__decorate([
|
|
532
|
-
tuiPure
|
|
533
|
-
], TuiDocNavigationComponent.prototype, "filterItems", null);
|
|
534
|
-
__decorate([
|
|
535
|
-
tuiPure
|
|
536
|
-
], TuiDocNavigationComponent.prototype, "flattenSubPages", null);
|
|
537
|
-
TuiDocNavigationComponent = __decorate([
|
|
538
|
-
Component({
|
|
539
|
-
selector: 'tui-doc-navigation',
|
|
540
|
-
template: "<tui-hosted-dropdown\n *tuiLet=\"filteredItems as filtered\"\n class=\"input\"\n tuiAutoFocus\n tuiDropdownLimitWidth=\"fixed\"\n [autoFocus]=\"!!sidebar\"\n [content]=\"dropdown\"\n [canOpen]=\"canOpen\"\n [(open)]=\"open\"\n>\n <tui-primitive-textfield\n iconAlign=\"left\"\n tuiTextfieldSize=\"m\"\n iconContent=\"tuiIconSearch\"\n [pseudoFocused]=\"open || null\"\n [tuiTextfieldCleaner]=\"true\"\n [tuiTextfieldLabelOutside]=\"true\"\n [value]=\"search\"\n (valueChange)=\"onSearchChange($event)\"\n >\n {{searchText}}\n </tui-primitive-textfield>\n <ng-template #dropdown let-activeZone>\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=\"navigation\">\n <tui-scrollbar [tuiMode]=\"mode$ | async\" class=\"scrollbar\">\n <tui-accordion [closeOthers]=\"false\" [rounded]=\"false\">\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=\"tui-space_left-2\">\n <strong>{{label}}</strong>\n </span>\n <ng-template tuiAccordionItemContent>\n <div class=\"section\">\n <ng-container\n *ngFor=\"let item of items[index]; index as subIndex\"\n >\n <ng-container\n *ngTemplateOutlet=\"pages; context: {item: item, index: (index * 100) + subIndex}\"\n >\n </ng-container>\n </ng-container>\n </div>\n </ng-template>\n </tui-accordion-item>\n </tui-accordion>\n <div class=\"items-container\">\n <ng-container\n *ngFor=\"let item of itemsWithoutSections; let index = index\"\n >\n <ng-container\n *ngTemplateOutlet=\"pages; context: {item: item, index: (items.length - 1) + index}\"\n >\n </ng-container>\n </ng-container>\n </div>\n\n <ng-template #pages let-item=\"item\" let-index=\"index\">\n <a\n *ngIf=\"!item.subPages; else subPages\"\n tuiLink\n class=\"sublink\"\n routerLinkActive=\"sublink_active\"\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=\"subsection\"\n [routerLinkActiveOptions]=\"{exact: false}\"\n >\n <button\n *ngIf=\"item.subPages\"\n tuiLink\n type=\"button\"\n class=\"sublink sublink_subsection\"\n (click)=\"onGroupClick(index)\"\n >\n <tui-svg\n src=\"tuiIconChevronRight\"\n class=\"chevron\"\n [class.chevron_active]=\"!!openPagesGroupsArr[index]\"\n ></tui-svg>\n {{item.title}}\n </button>\n <tui-expand\n class=\"tui-space_left-1\"\n [expanded]=\"!!openPagesGroupsArr[index]\"\n >\n <div class=\"section section_bordered\">\n <a\n *ngFor=\"let subPage of item.subPages\"\n tuiLink\n class=\"sublink sublink_small\"\n routerLinkActive=\"sublink_active\"\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",
|
|
541
|
-
providers: NAVIGATION_PROVIDERS,
|
|
542
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
543
|
-
styles: [":host{display:flex;flex-direction:column;text-align:center;background:var(--tui-base-01);z-index:1}.input{display:block;margin:1.25rem}.navigation{display:flex;max-height:100%;min-height:0;flex:1 1 0;text-align:left}.scrollbar{width:100%;scroll-behavior:smooth}.items-container{display:flex;flex-direction:column;padding:0 16px}.section{display:flex;flex-direction:column;align-items:flex-start;margin:-1rem 0 -.5rem}.section_bordered{margin:.5rem 0;border-left:1px solid var(--tui-base-03)}.subsection{margin-left:.5rem}.sublink{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;font:var(--tui-font-text-m);margin-left:.5rem;line-height:2.75rem}.sublink_small{margin-left:1rem;line-height:1.5rem}.sublink_small:not(:first-child){margin-top:1rem}.sublink_subsection{margin-left:0;line-height:2.75rem}.sublink_active{color:var(--tui-text-01)}.chevron{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;width:1rem;height:1rem;margin:-.25rem .25rem 0 -.1875rem}.chevron_active{transform:rotate(90deg)}"]
|
|
544
|
-
}),
|
|
545
|
-
__param(0, Inject(Title)),
|
|
546
|
-
__param(1, Inject(NAVIGATION_TITLE)),
|
|
547
|
-
__param(2, Inject(DOCUMENT)),
|
|
548
|
-
__param(3, Inject(TuiModeDirective)),
|
|
549
|
-
__param(4, Optional()),
|
|
550
|
-
__param(4, Inject(TuiSidebarDirective)),
|
|
551
|
-
__param(5, Inject(NAVIGATION_LABELS)),
|
|
552
|
-
__param(6, Inject(NAVIGATION_ITEMS)),
|
|
553
|
-
__param(7, Inject(TUI_DOC_SEARCH_TEXT)),
|
|
554
|
-
__param(8, Inject(Router)),
|
|
555
|
-
__param(9, Inject(ActivatedRoute))
|
|
556
|
-
], TuiDocNavigationComponent);
|
|
557
|
-
|
|
558
|
-
let ScrollIntoViewDirective = class ScrollIntoViewDirective {
|
|
559
|
-
constructor(destroy$, { nativeElement }) {
|
|
560
|
-
this.scroll$ = new Subject();
|
|
561
|
-
this.scroll$
|
|
562
|
-
.pipe(debounceTime(750), filter(shallWe => shallWe && !!getElementObscurers(nativeElement)), takeUntil(destroy$))
|
|
563
|
-
.subscribe(() => {
|
|
564
|
-
nativeElement.scrollIntoView();
|
|
565
|
-
});
|
|
566
|
-
}
|
|
567
|
-
set scrollIntoView(shallWe) {
|
|
568
|
-
this.scroll$.next(shallWe);
|
|
569
|
-
}
|
|
570
|
-
};
|
|
571
|
-
ScrollIntoViewDirective.ctorParameters = () => [
|
|
572
|
-
{ type: TuiDestroyService, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
|
|
573
|
-
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
|
|
574
|
-
];
|
|
575
|
-
__decorate([
|
|
576
|
-
Input()
|
|
577
|
-
], ScrollIntoViewDirective.prototype, "scrollIntoView", null);
|
|
578
|
-
ScrollIntoViewDirective = __decorate([
|
|
579
|
-
Directive({
|
|
580
|
-
selector: '[scrollIntoView]',
|
|
581
|
-
providers: [TuiDestroyService],
|
|
582
|
-
}),
|
|
583
|
-
__param(0, Inject(TuiDestroyService)),
|
|
584
|
-
__param(1, Inject(ElementRef))
|
|
585
|
-
], ScrollIntoViewDirective);
|
|
586
|
-
|
|
587
|
-
let ScrollIntoViewModule = class ScrollIntoViewModule {
|
|
588
|
-
};
|
|
589
|
-
ScrollIntoViewModule = __decorate([
|
|
590
|
-
NgModule({
|
|
591
|
-
declarations: [ScrollIntoViewDirective],
|
|
592
|
-
exports: [ScrollIntoViewDirective],
|
|
593
|
-
})
|
|
594
|
-
], ScrollIntoViewModule);
|
|
595
|
-
|
|
596
|
-
let TuiDocNavigationModule = class TuiDocNavigationModule {
|
|
597
|
-
};
|
|
598
|
-
TuiDocNavigationModule = __decorate([
|
|
599
|
-
NgModule({
|
|
600
|
-
imports: [
|
|
601
|
-
CommonModule,
|
|
602
|
-
FormsModule,
|
|
603
|
-
RouterModule,
|
|
604
|
-
ScrollIntoViewModule,
|
|
605
|
-
TuiButtonModule,
|
|
606
|
-
TuiPrimitiveTextfieldModule,
|
|
607
|
-
TuiTextfieldControllerModule,
|
|
608
|
-
TuiActiveZoneModule,
|
|
609
|
-
TuiLetModule,
|
|
610
|
-
TuiModeModule,
|
|
611
|
-
TuiLinkModule,
|
|
612
|
-
TuiExpandModule,
|
|
613
|
-
TuiHostedDropdownModule,
|
|
614
|
-
TuiDropdownControllerModule,
|
|
615
|
-
TuiAccordionModule,
|
|
616
|
-
TuiScrollbarModule,
|
|
617
|
-
TuiSvgModule,
|
|
618
|
-
TuiDataListModule,
|
|
619
|
-
TuiAutoFocusModule,
|
|
620
|
-
],
|
|
621
|
-
declarations: [TuiDocNavigationComponent],
|
|
622
|
-
exports: [TuiDocNavigationComponent],
|
|
623
|
-
})
|
|
624
|
-
], TuiDocNavigationModule);
|
|
625
|
-
|
|
626
|
-
function rgbToHex(r, g, b) {
|
|
627
|
-
return ('#' +
|
|
628
|
-
[r, g, b]
|
|
629
|
-
.map(x => {
|
|
630
|
-
const hex = x.toString(16);
|
|
631
|
-
return hex.length === 1 ? '0' + hex : hex;
|
|
632
|
-
})
|
|
633
|
-
.join(''));
|
|
634
|
-
}
|
|
635
|
-
function hexToRgb(hex) {
|
|
636
|
-
const matches = hex
|
|
637
|
-
.replace('#', '')
|
|
638
|
-
.split('')
|
|
639
|
-
.map((char, _, array) => (array.length === 3 ? char + char : char))
|
|
640
|
-
.join('')
|
|
641
|
-
.match(/.{2}/g);
|
|
642
|
-
return matches
|
|
643
|
-
? matches.map(x => Number.parseInt(x, 16))
|
|
644
|
-
: [0, 0, 0];
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
function inspectArray(array, depth) {
|
|
648
|
-
if (depth === 0) {
|
|
649
|
-
return '[…]';
|
|
650
|
-
}
|
|
651
|
-
let result = '';
|
|
652
|
-
let first = true;
|
|
653
|
-
for (let index = 0; index < array.length; index++) {
|
|
654
|
-
if (first) {
|
|
655
|
-
first = false;
|
|
656
|
-
}
|
|
657
|
-
else {
|
|
658
|
-
result += ', ';
|
|
659
|
-
}
|
|
660
|
-
result += index in array ? inspectAny(array[index], depth - 1) : 'empty';
|
|
661
|
-
}
|
|
662
|
-
return `[${result}]`;
|
|
663
|
-
}
|
|
664
|
-
function inspectObject(object, depth) {
|
|
665
|
-
if (depth === 0) {
|
|
666
|
-
return `{…}`;
|
|
667
|
-
}
|
|
668
|
-
let result = '';
|
|
669
|
-
let first = true;
|
|
670
|
-
for (const key in object) {
|
|
671
|
-
if (!object.hasOwnProperty(key)) {
|
|
672
|
-
continue;
|
|
673
|
-
}
|
|
674
|
-
if (first) {
|
|
675
|
-
first = false;
|
|
676
|
-
}
|
|
677
|
-
else {
|
|
678
|
-
result += ', ';
|
|
679
|
-
}
|
|
680
|
-
result += `${key}: ${inspectAny(object[key], depth - 1)}`;
|
|
681
|
-
}
|
|
682
|
-
return `{${result}}`;
|
|
683
|
-
}
|
|
684
|
-
// @bad TODO add more types
|
|
685
|
-
/**
|
|
686
|
-
* Returns readable JS entity
|
|
687
|
-
* @param data
|
|
688
|
-
* @param depth
|
|
689
|
-
* @return readable JS entity
|
|
690
|
-
*/
|
|
691
|
-
function inspectAny(data, depth) {
|
|
692
|
-
if (data === null) {
|
|
693
|
-
return 'null';
|
|
694
|
-
}
|
|
695
|
-
switch (typeof data) {
|
|
696
|
-
case 'string':
|
|
697
|
-
return `'${data}'`;
|
|
698
|
-
case 'undefined':
|
|
699
|
-
case 'number':
|
|
700
|
-
case 'boolean':
|
|
701
|
-
case 'function':
|
|
702
|
-
return String(data);
|
|
703
|
-
}
|
|
704
|
-
if (data instanceof RegExp) {
|
|
705
|
-
return data.toString();
|
|
706
|
-
}
|
|
707
|
-
if (Array.isArray(data)) {
|
|
708
|
-
return inspectArray(data, depth);
|
|
709
|
-
}
|
|
710
|
-
return inspectObject(data, depth);
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
const SERIALIZED_SUFFIX = '$';
|
|
714
|
-
// @bad TODO: refactor output and value sync
|
|
715
|
-
let TuiDocDocumentationPropertyConnectorDirective = class TuiDocDocumentationPropertyConnectorDirective {
|
|
716
|
-
constructor(template, locationRef, activatedRoute, urlSerializer) {
|
|
717
|
-
this.template = template;
|
|
718
|
-
this.locationRef = locationRef;
|
|
719
|
-
this.activatedRoute = activatedRoute;
|
|
720
|
-
this.urlSerializer = urlSerializer;
|
|
721
|
-
this.documentationPropertyName = '';
|
|
722
|
-
this.documentationPropertyMode = null;
|
|
723
|
-
this.documentationPropertyType = '';
|
|
724
|
-
this.documentationPropertyValue = null;
|
|
725
|
-
this.documentationPropertyDeprecated = false;
|
|
726
|
-
this.documentationPropertyValues = null;
|
|
727
|
-
this.documentationPropertyValueChange = new EventEmitter();
|
|
728
|
-
this.changed$ = new Subject();
|
|
729
|
-
}
|
|
730
|
-
ngOnInit() {
|
|
731
|
-
this.parseParams(this.activatedRoute.snapshot.queryParams);
|
|
732
|
-
}
|
|
733
|
-
get attrName() {
|
|
734
|
-
switch (this.documentationPropertyMode) {
|
|
735
|
-
case 'input':
|
|
736
|
-
return `[${this.documentationPropertyName}]`;
|
|
737
|
-
case 'output':
|
|
738
|
-
return `(${this.documentationPropertyName})`;
|
|
739
|
-
case 'input-output':
|
|
740
|
-
return `[(${this.documentationPropertyName})]`;
|
|
741
|
-
default:
|
|
742
|
-
return this.documentationPropertyName;
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
get hasItems() {
|
|
746
|
-
return !!this.documentationPropertyValues;
|
|
747
|
-
}
|
|
748
|
-
get shouldShowValues() {
|
|
749
|
-
return this.documentationPropertyMode !== 'output';
|
|
750
|
-
}
|
|
751
|
-
ngOnChanges() {
|
|
752
|
-
this.changed$.next();
|
|
753
|
-
}
|
|
754
|
-
onValueChange(value) {
|
|
755
|
-
this.documentationPropertyValue = value;
|
|
756
|
-
this.documentationPropertyValueChange.emit(value);
|
|
757
|
-
this.setQueryParam(value);
|
|
456
|
+
onValueChange(value) {
|
|
457
|
+
this.documentationPropertyValue = value;
|
|
458
|
+
this.documentationPropertyValueChange.emit(value);
|
|
459
|
+
this.setQueryParam(value);
|
|
758
460
|
}
|
|
759
461
|
parseParams(params) {
|
|
760
462
|
if (!params[this.documentationPropertyName] &&
|
|
@@ -781,6 +483,11 @@ let TuiDocDocumentationPropertyConnectorDirective = class TuiDocDocumentationPro
|
|
|
781
483
|
tree.queryParams = Object.assign(Object.assign({}, tree.queryParams), { [propName]: computedValue });
|
|
782
484
|
this.locationRef.go(String(tree));
|
|
783
485
|
}
|
|
486
|
+
emitEvent(event) {
|
|
487
|
+
// For more convenient debugging
|
|
488
|
+
console.log(this.attrName, event);
|
|
489
|
+
this.emits$.next(this.emits$.value + 1);
|
|
490
|
+
}
|
|
784
491
|
};
|
|
785
492
|
TuiDocDocumentationPropertyConnectorDirective.ctorParameters = () => [
|
|
786
493
|
{ type: TemplateRef, decorators: [{ type: Inject, args: [TemplateRef,] }] },
|
|
@@ -812,6 +519,7 @@ __decorate([
|
|
|
812
519
|
TuiDocDocumentationPropertyConnectorDirective = __decorate([
|
|
813
520
|
Directive({
|
|
814
521
|
selector: 'ng-template[documentationPropertyName]',
|
|
522
|
+
exportAs: 'documentationProperty',
|
|
815
523
|
}),
|
|
816
524
|
__param(0, Inject(TemplateRef)),
|
|
817
525
|
__param(1, Inject(Location$1)),
|
|
@@ -929,247 +637,573 @@ __decorate([
|
|
|
929
637
|
TuiDocDocumentationComponent = __decorate([
|
|
930
638
|
Component({
|
|
931
639
|
selector: 'tui-doc-documentation',
|
|
932
|
-
template: "<h1 *ngIf=\"heading\" class=\"tui-text_h4\">{{heading}}</h1>\n<ng-content></ng-content>\n<table class=\"tui-table tui-table_layout_fixed tui-table_font-size_s\">\n <tr class=\"tui-table__tr tui-table__tr_hover_disabled t-row t-row_header\">\n <th class=\"tui-table__th tui-table__th_first t-cell t-cell_prop\">\n {{texts[2]}}\n </th>\n <td class=\"tui-table__th\">{{type}}</td>\n <td\n *ngIf=\"showValues && !isAPI\"\n class=\"\n tui-table__th tui-table__th_last tui-table__th_text_right\n t-cell t-cell_value\n \"\n >\n {{texts[3]}}\n </td>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of propertiesConnectors; last as lastItem\"\n class=\"tui-table__tr tui-table__tr_hover_disabled t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated\"\n [class.tui-table__tr_border_none]=\"lastItem\"\n >\n <td\n class=\"\n tui-table__td tui-table__td_first tui-table__td_align_center\n t-cell\n \"\n >\n <div\n
|
|
640
|
+
template: "<h1 *ngIf=\"heading\" class=\"tui-text_h4\">{{ heading }}</h1>\n<ng-content></ng-content>\n<table class=\"tui-table tui-table_layout_fixed tui-table_font-size_s\">\n <tr class=\"tui-table__tr tui-table__tr_hover_disabled t-row t-row_header\">\n <th class=\"tui-table__th tui-table__th_first t-cell t-cell_prop\">\n {{ texts[2] }}\n </th>\n <td class=\"tui-table__th\">{{ type }}</td>\n <td\n *ngIf=\"showValues && !isAPI\"\n class=\"\n tui-table__th tui-table__th_last tui-table__th_text_right\n t-cell t-cell_value\n \"\n >\n {{ texts[3] }}\n </td>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of propertiesConnectors; last as lastItem\"\n class=\"tui-table__tr tui-table__tr_hover_disabled t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated\"\n [class.tui-table__tr_border_none]=\"lastItem\"\n >\n <td\n class=\"\n tui-table__td tui-table__td_first tui-table__td_align_center\n t-cell\n \"\n >\n <div\n automation-id=\"tui-documentation__property-name\"\n class=\"t-property t-cell\"\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\n *ngTemplateOutlet=\"propertyConnector.template\"\n ></ng-container>\n </td>\n <td class=\"tui-table__td tui-table__td_align_center 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/TinkoffCreditSystems/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=\"\n tui-table__td\n tui-table__td_align_center\n tui-table__td_last\n tui-table__td_text_right\n t-cell\n \"\n >\n <ng-container\n *ngIf=\"propertyConnector.shouldShowValues; else elseEmitter\"\n >\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 #selectContent let-data>\n <code>{{ inspectAny(data) }}</code>\n </ng-template>\n\n <ng-template #noItems>\n <ng-container\n [ngSwitch]=\"propertyConnector.documentationPropertyType\"\n >\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 *ngSwitchCase=\"'color'\" tuiGroup>\n <tui-primitive-textfield\n tuiTextfieldType=\"color\"\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 </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",
|
|
933
641
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
934
|
-
|
|
642
|
+
animations: [
|
|
643
|
+
trigger('emitEvent', [
|
|
644
|
+
transition(':increment', [style({ opacity: 1 }), animate('500ms ease-in')]),
|
|
645
|
+
]),
|
|
646
|
+
],
|
|
647
|
+
styles: [":host{display:block;min-width:100%}.t-cell_prop{width:40%}.t-cell_value{max-width:20rem}@media screen and (max-width:47.9375em){.t-row{display:flex;flex-wrap:wrap}.t-row_header{display:none}.t-cell_value{width:9.375rem}.t-cell{width:100%;height:auto;padding:.5rem 0;text-align:left}}.t-property{font:var(--tui-font-text-m);margin-bottom:.25rem;font-family:monospace;color:#8f75d1}.t-type{font-family:monospace}.t-deprecated{background-color: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}"]
|
|
648
|
+
}),
|
|
649
|
+
__param(0, Inject(ChangeDetectorRef)),
|
|
650
|
+
__param(1, Inject(TUI_DOC_DOCUMENTATION_TEXTS))
|
|
651
|
+
], TuiDocDocumentationComponent);
|
|
652
|
+
|
|
653
|
+
let TuiInputOpacityDirective = class TuiInputOpacityDirective {
|
|
654
|
+
constructor(renderer, tuiFocusableComponent) {
|
|
655
|
+
this.renderer = renderer;
|
|
656
|
+
this.tuiFocusableComponent = tuiFocusableComponent;
|
|
657
|
+
}
|
|
658
|
+
set tuiInputOpacity(opacity) {
|
|
659
|
+
const { nativeFocusableElement } = this.tuiFocusableComponent;
|
|
660
|
+
if (nativeFocusableElement) {
|
|
661
|
+
this.renderer.setStyle(nativeFocusableElement, 'opacity', opacity / 100);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
};
|
|
665
|
+
TuiInputOpacityDirective.ctorParameters = () => [
|
|
666
|
+
{ type: Renderer2, decorators: [{ type: Inject, args: [Renderer2,] }] },
|
|
667
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_FOCUSABLE_ITEM_ACCESSOR,] }] }
|
|
668
|
+
];
|
|
669
|
+
__decorate([
|
|
670
|
+
Input()
|
|
671
|
+
], TuiInputOpacityDirective.prototype, "tuiInputOpacity", null);
|
|
672
|
+
TuiInputOpacityDirective = __decorate([
|
|
673
|
+
Directive({
|
|
674
|
+
selector: '[tuiInputOpacity]',
|
|
675
|
+
}),
|
|
676
|
+
__param(0, Inject(Renderer2)),
|
|
677
|
+
__param(1, Inject(TUI_FOCUSABLE_ITEM_ACCESSOR))
|
|
678
|
+
], TuiInputOpacityDirective);
|
|
679
|
+
|
|
680
|
+
let TuiInputOpacityModule = class TuiInputOpacityModule {
|
|
681
|
+
};
|
|
682
|
+
TuiInputOpacityModule = __decorate([
|
|
683
|
+
NgModule({
|
|
684
|
+
declarations: [TuiInputOpacityDirective],
|
|
685
|
+
exports: [TuiInputOpacityDirective],
|
|
686
|
+
})
|
|
687
|
+
], TuiInputOpacityModule);
|
|
688
|
+
|
|
689
|
+
let TuiDocDocumentationModule = class TuiDocDocumentationModule {
|
|
690
|
+
};
|
|
691
|
+
TuiDocDocumentationModule = __decorate([
|
|
692
|
+
NgModule({
|
|
693
|
+
imports: [
|
|
694
|
+
CommonModule,
|
|
695
|
+
FormsModule,
|
|
696
|
+
RouterModule,
|
|
697
|
+
TuiBadgeModule,
|
|
698
|
+
TuiSelectModule,
|
|
699
|
+
TuiToggleModule,
|
|
700
|
+
TuiTooltipModule,
|
|
701
|
+
TuiLinkModule,
|
|
702
|
+
TuiInputCountModule,
|
|
703
|
+
TuiModeModule,
|
|
704
|
+
TuiGroupModule,
|
|
705
|
+
TuiInputOpacityModule,
|
|
706
|
+
TuiPrimitiveTextfieldModule,
|
|
707
|
+
TuiTextfieldControllerModule,
|
|
708
|
+
TuiHintControllerModule,
|
|
709
|
+
TuiDropdownControllerModule,
|
|
710
|
+
TuiDataListModule,
|
|
711
|
+
TuiDataListWrapperModule,
|
|
712
|
+
TuiNotificationModule,
|
|
713
|
+
],
|
|
714
|
+
declarations: [
|
|
715
|
+
TuiDocDocumentationComponent,
|
|
716
|
+
TuiDocDocumentationPropertyConnectorDirective,
|
|
717
|
+
],
|
|
718
|
+
exports: [
|
|
719
|
+
TuiDocDocumentationComponent,
|
|
720
|
+
TuiDocDocumentationPropertyConnectorDirective,
|
|
721
|
+
],
|
|
722
|
+
})
|
|
723
|
+
], TuiDocDocumentationModule);
|
|
724
|
+
|
|
725
|
+
const TUI_DOC_CODE_EDITOR = new InjectionToken('Contains service for opening online IDE e.g. Stackblitz');
|
|
726
|
+
|
|
727
|
+
const TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new InjectionToken('Processes content in example', { factory: () => identity });
|
|
728
|
+
|
|
729
|
+
function rawLoadRecord(example) {
|
|
730
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
731
|
+
const processedContent = {};
|
|
732
|
+
for (const [key, content] of Object.entries(example)) {
|
|
733
|
+
processedContent[key] = yield rawLoad(content);
|
|
734
|
+
}
|
|
735
|
+
return processedContent;
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
|
|
740
|
+
// @dynamic
|
|
741
|
+
let TuiDocExampleComponent = class TuiDocExampleComponent {
|
|
742
|
+
constructor(id, clipboard, notifications, location, copyTexts$, texts, codeEditor, processContent) {
|
|
743
|
+
this.id = id;
|
|
744
|
+
this.clipboard = clipboard;
|
|
745
|
+
this.notifications = notifications;
|
|
746
|
+
this.location = location;
|
|
747
|
+
this.copyTexts$ = copyTexts$;
|
|
748
|
+
this.texts = texts;
|
|
749
|
+
this.codeEditor = codeEditor;
|
|
750
|
+
this.processContent = processContent;
|
|
751
|
+
this.rawLoader$$ = new BehaviorSubject({});
|
|
752
|
+
this.heading = '';
|
|
753
|
+
this.description = '';
|
|
754
|
+
this.componentName = this.location.pathname.slice(1);
|
|
755
|
+
this.activeItemIndex = 0;
|
|
756
|
+
this.defaultTab = this.texts[0];
|
|
757
|
+
this.copy$ = this.copyTexts$.pipe(map(([copy]) => copy));
|
|
758
|
+
this.processor$ = this.rawLoader$$.pipe(switchMap(rawLoadRecord), map(this.processContent));
|
|
759
|
+
}
|
|
760
|
+
set content(content) {
|
|
761
|
+
this.rawLoader$$.next(content);
|
|
762
|
+
}
|
|
763
|
+
copyExampleLink() {
|
|
764
|
+
const hashPosition = this.location.href.indexOf('#');
|
|
765
|
+
const currentUrl = hashPosition > -1
|
|
766
|
+
? this.location.href.substr(0, hashPosition)
|
|
767
|
+
: this.location.href;
|
|
768
|
+
const url = `${currentUrl}#${this.id}`;
|
|
769
|
+
this.clipboard.copy(url);
|
|
770
|
+
this.notifications
|
|
771
|
+
.show(this.texts[1], {
|
|
772
|
+
label: this.texts[2],
|
|
773
|
+
status: "success" /* Success */,
|
|
774
|
+
})
|
|
775
|
+
.subscribe();
|
|
776
|
+
}
|
|
777
|
+
};
|
|
778
|
+
TuiDocExampleComponent.ctorParameters = () => [
|
|
779
|
+
{ type: String, decorators: [{ type: Attribute, args: ['id',] }] },
|
|
780
|
+
{ type: Clipboard, decorators: [{ type: Inject, args: [Clipboard,] }] },
|
|
781
|
+
{ type: TuiNotificationsService, decorators: [{ type: Inject, args: [TuiNotificationsService,] }] },
|
|
782
|
+
{ type: Location, decorators: [{ type: Inject, args: [LOCATION,] }] },
|
|
783
|
+
{ type: Observable, decorators: [{ type: Inject, args: [TUI_COPY_TEXTS,] }] },
|
|
784
|
+
{ type: Array, decorators: [{ type: Inject, args: [TUI_DOC_EXAMPLE_TEXTS,] }] },
|
|
785
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [TUI_DOC_CODE_EDITOR,] }] },
|
|
786
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_EXAMPLE_CONTENT_PROCESSOR,] }] }
|
|
787
|
+
];
|
|
788
|
+
__decorate([
|
|
789
|
+
Input()
|
|
790
|
+
], TuiDocExampleComponent.prototype, "heading", void 0);
|
|
791
|
+
__decorate([
|
|
792
|
+
Input()
|
|
793
|
+
], TuiDocExampleComponent.prototype, "description", void 0);
|
|
794
|
+
__decorate([
|
|
795
|
+
Input()
|
|
796
|
+
], TuiDocExampleComponent.prototype, "content", null);
|
|
797
|
+
__decorate([
|
|
798
|
+
Input()
|
|
799
|
+
], TuiDocExampleComponent.prototype, "componentName", void 0);
|
|
800
|
+
TuiDocExampleComponent = __decorate([
|
|
801
|
+
Component({
|
|
802
|
+
selector: 'tui-doc-example',
|
|
803
|
+
template: "<h3 *ngIf=\"heading\" class=\"t-title\">\n <span polymorpheus-outlet [content]=\"heading\"></span>\n <button\n *ngIf=\"id\"\n tuiIconButton\n type=\"button\"\n size=\"xs\"\n icon=\"tuiIconLinkLarge\"\n appearance=\"icon\"\n class=\"t-link-icon\"\n [title]=\"copy$ | async\"\n (click)=\"copyExampleLink()\"\n ></button>\n</h3>\n<h4\n *ngIf=\"description\"\n polymorpheus-outlet\n class=\"t-description\"\n [content]=\"description\"\n></h4>\n\n<div *ngIf=\"processor$ | async as content\" class=\"t-example\">\n <ng-container *ngIf=\"content | 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 *tuiTab tuiTab>{{tab}}</button>\n </ng-container>\n </tui-tabs-with-more>\n\n <button\n *ngIf=\"codeEditor\"\n tuiButton\n appearance=\"flat\"\n size=\"s\"\n (click)=\"codeEditor.open(componentName, id || '', content)\"\n >\n Edit on {{codeEditor.name}}\n </button>\n </div>\n\n <ng-container\n *ngIf=\"{\n activeTab: tabs[activeItemIndex],\n code: content[tabs[activeItemIndex]] || ''\n } as state\"\n >\n <div\n *ngIf=\"state.activeTab == defaultTab; else codeSection\"\n automation-id=\"tui-doc-example\"\n class=\"t-demo\"\n >\n <ng-content></ng-content>\n </div>\n\n <ng-template #codeSection>\n <tui-doc-copy\n class=\"t-copy-code\"\n [cdkCopyToClipboard]=\"state.code\"\n ></tui-doc-copy>\n <tui-doc-code [code]=\"state.code\"></tui-doc-code>\n </ng-template>\n </ng-container>\n </ng-container>\n</div>\n",
|
|
804
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
805
|
+
styles: [":host{position:relative;display:block;padding-top:3.5rem;clear:right}.t-title{font:var(--tui-font-heading-5);margin:0 0 .5rem}@media screen and (max-width:47.9375em){:host{padding-top:2rem}.t-title{font:var(--tui-font-heading-6)}}.t-description{font:var(--tui-font-text-m);font-weight:400;margin:0}.t-description:first-letter,.t-title:first-letter{text-transform:capitalize}.t-example{position:relative;margin-top:1.5rem;border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m);box-shadow:0 .125rem .1875rem rgba(0,0,0,.1)}.t-tabs-wrapper{display:flex;padding:0 2rem;box-shadow:inset 0 -1px var(--tui-base-03);justify-content:space-between;align-items:center}@media screen and (max-width:47.9375em){.t-example{margin-top:.75rem}.t-tabs-wrapper{padding:0 1rem}}.t-tabs{flex-grow:1}.t-demo{padding:2rem;overflow-x:auto}@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution:0.001dpcm){.t-demo::-webkit-scrollbar,.t-demo::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:6px 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)}}@media screen and (max-width:47.9375em){.t-demo{padding:1rem}}.t-copy-code{position:absolute;top:4.375rem;right:1rem}.t-link-icon{margin-left:.3rem;vertical-align:baseline}"]
|
|
806
|
+
}),
|
|
807
|
+
__param(0, Attribute('id')),
|
|
808
|
+
__param(1, Inject(Clipboard)),
|
|
809
|
+
__param(2, Inject(TuiNotificationsService)),
|
|
810
|
+
__param(3, Inject(LOCATION)),
|
|
811
|
+
__param(4, Inject(TUI_COPY_TEXTS)),
|
|
812
|
+
__param(5, Inject(TUI_DOC_EXAMPLE_TEXTS)),
|
|
813
|
+
__param(6, Optional()),
|
|
814
|
+
__param(6, Inject(TUI_DOC_CODE_EDITOR)),
|
|
815
|
+
__param(7, Inject(TUI_DOC_EXAMPLE_CONTENT_PROCESSOR))
|
|
816
|
+
], TuiDocExampleComponent);
|
|
817
|
+
|
|
818
|
+
let TuiDocExampleGetTabsPipe = class TuiDocExampleGetTabsPipe {
|
|
819
|
+
transform(content, defaultTab) {
|
|
820
|
+
return [defaultTab, ...Object.keys(content)];
|
|
821
|
+
}
|
|
822
|
+
};
|
|
823
|
+
TuiDocExampleGetTabsPipe = __decorate([
|
|
824
|
+
Pipe({ name: 'tuiDocExampleGetTabs' })
|
|
825
|
+
], TuiDocExampleGetTabsPipe);
|
|
826
|
+
|
|
827
|
+
let TuiDocExampleModule = class TuiDocExampleModule {
|
|
828
|
+
};
|
|
829
|
+
TuiDocExampleModule = __decorate([
|
|
830
|
+
NgModule({
|
|
831
|
+
imports: [
|
|
832
|
+
CommonModule,
|
|
833
|
+
ClipboardModule,
|
|
834
|
+
TuiTabsModule,
|
|
835
|
+
TuiButtonModule,
|
|
836
|
+
TuiDocCopyModule,
|
|
837
|
+
TuiDocCodeModule,
|
|
838
|
+
PolymorpheusModule,
|
|
839
|
+
],
|
|
840
|
+
declarations: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe],
|
|
841
|
+
exports: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe],
|
|
842
|
+
})
|
|
843
|
+
], TuiDocExampleModule);
|
|
844
|
+
|
|
845
|
+
var TuiDocMainComponent_1;
|
|
846
|
+
// @dynamic
|
|
847
|
+
let TuiDocMainComponent = TuiDocMainComponent_1 = class TuiDocMainComponent {
|
|
848
|
+
constructor(storage, windowRef) {
|
|
849
|
+
this.storage = storage;
|
|
850
|
+
this.windowRef = windowRef;
|
|
851
|
+
this.night = this.storage.getItem('night') === 'true' ||
|
|
852
|
+
(this.storage.getItem('night') === null &&
|
|
853
|
+
this.windowRef.matchMedia('(prefers-color-scheme: dark)').matches);
|
|
854
|
+
this.change$ = new Subject();
|
|
855
|
+
}
|
|
856
|
+
get mode() {
|
|
857
|
+
return this.night ? 'onDark' : null;
|
|
858
|
+
}
|
|
859
|
+
onMode(night) {
|
|
860
|
+
this.night = night;
|
|
861
|
+
this.change$.next();
|
|
862
|
+
this.storage.setItem('night', String(night));
|
|
863
|
+
}
|
|
864
|
+
};
|
|
865
|
+
TuiDocMainComponent.ctorParameters = () => [
|
|
866
|
+
{ type: Storage, decorators: [{ type: Inject, args: [LOCAL_STORAGE,] }] },
|
|
867
|
+
{ type: Window, decorators: [{ type: Inject, args: [WINDOW,] }] }
|
|
868
|
+
];
|
|
869
|
+
TuiDocMainComponent = TuiDocMainComponent_1 = __decorate([
|
|
870
|
+
Component({
|
|
871
|
+
selector: 'tui-doc-main',
|
|
872
|
+
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-space_left-2\"\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=\"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",
|
|
873
|
+
encapsulation: ViewEncapsulation.None,
|
|
874
|
+
providers: [
|
|
875
|
+
{
|
|
876
|
+
provide: TuiModeDirective,
|
|
877
|
+
useExisting: forwardRef(() => TuiDocMainComponent_1),
|
|
878
|
+
},
|
|
879
|
+
TuiSwipeService,
|
|
880
|
+
],
|
|
881
|
+
styles: ["html{scroll-padding-top:4rem;height:auto}tui-root>tui-scroll-controls{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(.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}:focus code:not(.exception){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}.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-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-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}"]
|
|
935
882
|
}),
|
|
936
|
-
__param(0, Inject(
|
|
937
|
-
__param(1, Inject(
|
|
938
|
-
],
|
|
883
|
+
__param(0, Inject(LOCAL_STORAGE)),
|
|
884
|
+
__param(1, Inject(WINDOW))
|
|
885
|
+
], TuiDocMainComponent);
|
|
939
886
|
|
|
940
|
-
let
|
|
941
|
-
constructor(
|
|
942
|
-
this.
|
|
943
|
-
this.
|
|
887
|
+
let ScrollIntoViewDirective = class ScrollIntoViewDirective {
|
|
888
|
+
constructor(destroy$, { nativeElement }) {
|
|
889
|
+
this.scroll$ = new Subject();
|
|
890
|
+
this.scroll$
|
|
891
|
+
.pipe(debounceTime(750), filter(shallWe => shallWe && !!getElementObscurers(nativeElement)), takeUntil(destroy$))
|
|
892
|
+
.subscribe(() => {
|
|
893
|
+
nativeElement.scrollIntoView();
|
|
894
|
+
});
|
|
944
895
|
}
|
|
945
|
-
set
|
|
946
|
-
|
|
947
|
-
if (nativeFocusableElement) {
|
|
948
|
-
this.renderer.setStyle(nativeFocusableElement, 'opacity', opacity / 100);
|
|
949
|
-
}
|
|
896
|
+
set scrollIntoView(shallWe) {
|
|
897
|
+
this.scroll$.next(shallWe);
|
|
950
898
|
}
|
|
951
899
|
};
|
|
952
|
-
|
|
953
|
-
{ type:
|
|
954
|
-
{ type:
|
|
900
|
+
ScrollIntoViewDirective.ctorParameters = () => [
|
|
901
|
+
{ type: TuiDestroyService, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
|
|
902
|
+
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
|
|
955
903
|
];
|
|
956
904
|
__decorate([
|
|
957
905
|
Input()
|
|
958
|
-
],
|
|
959
|
-
|
|
906
|
+
], ScrollIntoViewDirective.prototype, "scrollIntoView", null);
|
|
907
|
+
ScrollIntoViewDirective = __decorate([
|
|
960
908
|
Directive({
|
|
961
|
-
selector: '[
|
|
909
|
+
selector: '[scrollIntoView]',
|
|
910
|
+
providers: [TuiDestroyService],
|
|
962
911
|
}),
|
|
963
|
-
__param(0, Inject(
|
|
964
|
-
__param(1, Inject(
|
|
965
|
-
],
|
|
912
|
+
__param(0, Inject(TuiDestroyService)),
|
|
913
|
+
__param(1, Inject(ElementRef))
|
|
914
|
+
], ScrollIntoViewDirective);
|
|
966
915
|
|
|
967
|
-
let
|
|
916
|
+
let ScrollIntoViewModule = class ScrollIntoViewModule {
|
|
968
917
|
};
|
|
969
|
-
|
|
918
|
+
ScrollIntoViewModule = __decorate([
|
|
970
919
|
NgModule({
|
|
971
|
-
declarations: [
|
|
972
|
-
exports: [
|
|
920
|
+
declarations: [ScrollIntoViewDirective],
|
|
921
|
+
exports: [ScrollIntoViewDirective],
|
|
973
922
|
})
|
|
974
|
-
],
|
|
923
|
+
], ScrollIntoViewModule);
|
|
975
924
|
|
|
976
|
-
|
|
925
|
+
const MAP = {
|
|
926
|
+
а: 'f',
|
|
927
|
+
б: ',',
|
|
928
|
+
в: 'd',
|
|
929
|
+
г: 'u',
|
|
930
|
+
д: 'l',
|
|
931
|
+
е: 't',
|
|
932
|
+
ё: '`',
|
|
933
|
+
ж: ';',
|
|
934
|
+
з: 'p',
|
|
935
|
+
и: 'b',
|
|
936
|
+
й: 'q',
|
|
937
|
+
к: 'r',
|
|
938
|
+
л: 'k',
|
|
939
|
+
м: 'v',
|
|
940
|
+
н: 'y',
|
|
941
|
+
о: 'j',
|
|
942
|
+
п: 'g',
|
|
943
|
+
р: 'h',
|
|
944
|
+
с: 'c',
|
|
945
|
+
т: 'n',
|
|
946
|
+
у: 'e',
|
|
947
|
+
ф: 'a',
|
|
948
|
+
х: '[',
|
|
949
|
+
ц: 'w',
|
|
950
|
+
ч: 'x',
|
|
951
|
+
ш: 'i',
|
|
952
|
+
щ: 'o',
|
|
953
|
+
ъ: ']',
|
|
954
|
+
ы: 's',
|
|
955
|
+
ь: 'm',
|
|
956
|
+
ю: '.',
|
|
957
|
+
я: 'z',
|
|
977
958
|
};
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
TuiModeModule,
|
|
991
|
-
TuiGroupModule,
|
|
992
|
-
TuiInputOpacityModule,
|
|
993
|
-
TuiPrimitiveTextfieldModule,
|
|
994
|
-
TuiTextfieldControllerModule,
|
|
995
|
-
TuiHintControllerModule,
|
|
996
|
-
TuiDropdownControllerModule,
|
|
997
|
-
TuiDataListModule,
|
|
998
|
-
TuiDataListWrapperModule,
|
|
999
|
-
],
|
|
1000
|
-
declarations: [
|
|
1001
|
-
TuiDocDocumentationComponent,
|
|
1002
|
-
TuiDocDocumentationPropertyConnectorDirective,
|
|
1003
|
-
],
|
|
1004
|
-
exports: [
|
|
1005
|
-
TuiDocDocumentationComponent,
|
|
1006
|
-
TuiDocDocumentationPropertyConnectorDirective,
|
|
1007
|
-
],
|
|
1008
|
-
})
|
|
1009
|
-
], TuiDocDocumentationModule);
|
|
959
|
+
/**
|
|
960
|
+
* Translates text mistakenly typed in the Russian layout into English
|
|
961
|
+
* @param string string with Russian layout characters
|
|
962
|
+
* @return string with English layout characters
|
|
963
|
+
*/
|
|
964
|
+
function transliterateKeyboardLayout(string) {
|
|
965
|
+
let newStr = '';
|
|
966
|
+
for (let i = 0; i < string.length; i++) {
|
|
967
|
+
newStr += string.charAt(i) in MAP ? MAP[string.charAt(i)] : string.charAt(i);
|
|
968
|
+
}
|
|
969
|
+
return newStr;
|
|
970
|
+
}
|
|
1010
971
|
|
|
1011
|
-
const
|
|
972
|
+
const TUI_DOC_PAGES = new InjectionToken('Documentation pages', {
|
|
973
|
+
factory: () => [],
|
|
974
|
+
});
|
|
1012
975
|
|
|
1013
|
-
const
|
|
1014
|
-
factory: () =>
|
|
976
|
+
const TUI_DOC_TITLE = new InjectionToken('Page title', {
|
|
977
|
+
factory: () => '',
|
|
1015
978
|
});
|
|
1016
979
|
|
|
1017
|
-
|
|
980
|
+
const NAVIGATION_TITLE = new InjectionToken('Page title');
|
|
981
|
+
const NAVIGATION_LABELS = new InjectionToken('Navigation sections labels for search');
|
|
982
|
+
const NAVIGATION_ITEMS = new InjectionToken('Navigation pages');
|
|
983
|
+
const NAVIGATION_PROVIDERS = [
|
|
984
|
+
TuiDestroyService,
|
|
985
|
+
{
|
|
986
|
+
provide: NAVIGATION_TITLE,
|
|
987
|
+
deps: [Router, ActivatedRoute, TUI_DOC_TITLE, TuiDestroyService],
|
|
988
|
+
useFactory: titleProviderFactory,
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
provide: NAVIGATION_LABELS,
|
|
992
|
+
deps: [TUI_DOC_PAGES],
|
|
993
|
+
useFactory: labelsProviderFactory,
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
provide: NAVIGATION_ITEMS,
|
|
997
|
+
deps: [TUI_DOC_PAGES],
|
|
998
|
+
useFactory: itemsProviderFactory,
|
|
999
|
+
},
|
|
1000
|
+
];
|
|
1001
|
+
function titleProviderFactory(router, activatedRoute, titlePrefix, destroy$) {
|
|
1002
|
+
return router.events.pipe(filter(event => event instanceof NavigationEnd), map(() => activatedRoute.firstChild), filter(isPresent), mergeMap(({ data }) => data), map(({ title }) => titlePrefix + title), takeUntil(destroy$));
|
|
1003
|
+
}
|
|
1004
|
+
function labelsProviderFactory(pages) {
|
|
1005
|
+
return pages
|
|
1006
|
+
.map(({ section }) => section)
|
|
1007
|
+
.filter(isPresent)
|
|
1008
|
+
.filter((item, index, array) => array.indexOf(item) === index);
|
|
1009
|
+
}
|
|
1010
|
+
function itemsProviderFactory(pages) {
|
|
1011
|
+
const labels = labelsProviderFactory(pages);
|
|
1012
|
+
return [
|
|
1013
|
+
...labels.map(label => pages.filter(({ section }) => section === label)),
|
|
1014
|
+
pages.filter(page => !page.section),
|
|
1015
|
+
];
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
const SCROLL_INTO_VIEW_DELAY = 200;
|
|
1018
1019
|
// @dynamic
|
|
1019
|
-
let
|
|
1020
|
-
constructor(
|
|
1021
|
-
this.
|
|
1022
|
-
this.
|
|
1023
|
-
this.
|
|
1024
|
-
this.
|
|
1025
|
-
this.
|
|
1026
|
-
this.
|
|
1027
|
-
this.
|
|
1028
|
-
this.
|
|
1029
|
-
this.
|
|
1030
|
-
this.
|
|
1031
|
-
this.
|
|
1032
|
-
this.
|
|
1033
|
-
this.
|
|
1034
|
-
this.
|
|
1035
|
-
this.
|
|
1020
|
+
let TuiDocNavigationComponent = class TuiDocNavigationComponent {
|
|
1021
|
+
constructor(changeDetectorRef, titleService, title$, documentRef, mode, sidebar, labels, items, searchText, router, activatedRoute) {
|
|
1022
|
+
this.documentRef = documentRef;
|
|
1023
|
+
this.mode = mode;
|
|
1024
|
+
this.sidebar = sidebar;
|
|
1025
|
+
this.labels = labels;
|
|
1026
|
+
this.items = items;
|
|
1027
|
+
this.searchText = searchText;
|
|
1028
|
+
this.router = router;
|
|
1029
|
+
this.activatedRoute = activatedRoute;
|
|
1030
|
+
this.search = '';
|
|
1031
|
+
this.open = false;
|
|
1032
|
+
this.openPagesArr = [];
|
|
1033
|
+
this.openPagesGroupsArr = [];
|
|
1034
|
+
this.active = '';
|
|
1035
|
+
this.menuOpen = false;
|
|
1036
|
+
this.mode$ = this.mode.change$.pipe(startWith(null), map(() => this.mode.mode || 'onLight'));
|
|
1037
|
+
// Angular can't navigate no anchor links
|
|
1038
|
+
// https://stackoverflow.com/questions/36101756/angular2-routing-with-hashtag-to-page-anchor
|
|
1039
|
+
title$.subscribe(title => {
|
|
1040
|
+
changeDetectorRef.markForCheck();
|
|
1041
|
+
titleService.setTitle(title);
|
|
1042
|
+
this.openActivePageGroup();
|
|
1043
|
+
this.handleAnchorLink(this.activatedRoute.snapshot.fragment);
|
|
1044
|
+
});
|
|
1036
1045
|
}
|
|
1037
|
-
|
|
1038
|
-
this.
|
|
1046
|
+
get canOpen() {
|
|
1047
|
+
return this.search.length > 2;
|
|
1048
|
+
}
|
|
1049
|
+
get filteredItems() {
|
|
1050
|
+
return this.filterItems(this.flattenSubPages(this.items), this.search);
|
|
1051
|
+
}
|
|
1052
|
+
get itemsWithoutSections() {
|
|
1053
|
+
return this.items[this.items.length - 1];
|
|
1054
|
+
}
|
|
1055
|
+
isActive(route) {
|
|
1056
|
+
return route === this.active;
|
|
1057
|
+
}
|
|
1058
|
+
onGroupClick(index) {
|
|
1059
|
+
this.openPagesGroupsArr[index] = !this.openPagesGroupsArr[index];
|
|
1060
|
+
}
|
|
1061
|
+
closeMenu() {
|
|
1062
|
+
this.menuOpen = false;
|
|
1063
|
+
}
|
|
1064
|
+
onSearchChange(search) {
|
|
1065
|
+
this.search = search;
|
|
1066
|
+
this.open = this.canOpen;
|
|
1067
|
+
}
|
|
1068
|
+
onClick() {
|
|
1069
|
+
this.open = false;
|
|
1070
|
+
this.menuOpen = false;
|
|
1071
|
+
this.search = '';
|
|
1072
|
+
this.openActivePageGroup();
|
|
1039
1073
|
}
|
|
1040
|
-
|
|
1041
|
-
return
|
|
1074
|
+
filterItems(items, search) {
|
|
1075
|
+
return items.map(section => uniqBy(section.filter(({ title, keywords = '' }) => {
|
|
1076
|
+
title = title.toLowerCase();
|
|
1077
|
+
search = search.toLowerCase();
|
|
1078
|
+
keywords = keywords.toLowerCase();
|
|
1079
|
+
return (title.includes(search) ||
|
|
1080
|
+
keywords.includes(search) ||
|
|
1081
|
+
title.includes(transliterateKeyboardLayout(search)) ||
|
|
1082
|
+
keywords.includes(transliterateKeyboardLayout(search)) ||
|
|
1083
|
+
search.replace(/-/gi, '').includes(title));
|
|
1084
|
+
}), 'title'));
|
|
1042
1085
|
}
|
|
1043
|
-
|
|
1044
|
-
return
|
|
1086
|
+
flattenSubPages(items) {
|
|
1087
|
+
return items.reduce((array, item) => [
|
|
1088
|
+
...array,
|
|
1089
|
+
item.reduce((pages, page) => 'subPages' in page
|
|
1090
|
+
? [...pages, ...page.subPages]
|
|
1091
|
+
: [...pages, page], []),
|
|
1092
|
+
], []);
|
|
1045
1093
|
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
return code ? code.trim() : '';
|
|
1094
|
+
isActiveRoute(route) {
|
|
1095
|
+
return this.router.isActive(route, false);
|
|
1049
1096
|
}
|
|
1050
|
-
|
|
1051
|
-
|
|
1097
|
+
handleAnchorLink(hash) {
|
|
1098
|
+
setTimeout(() => {
|
|
1099
|
+
this.navigateToAnchorLink(hash);
|
|
1100
|
+
}, SCROLL_INTO_VIEW_DELAY);
|
|
1052
1101
|
}
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1102
|
+
openActivePageGroup() {
|
|
1103
|
+
this.items.forEach((pages, pagesIndex) => {
|
|
1104
|
+
pages.forEach((page, pageIndex) => {
|
|
1105
|
+
if ('route' in page && this.isActiveRoute(page.route)) {
|
|
1106
|
+
this.openPagesArr[pagesIndex] = true;
|
|
1107
|
+
this.active = page.route;
|
|
1108
|
+
}
|
|
1109
|
+
if ('subPages' in page) {
|
|
1110
|
+
page.subPages.forEach(subPage => {
|
|
1111
|
+
if (this.isActiveRoute(subPage.route)) {
|
|
1112
|
+
this.openPagesArr[pagesIndex] = true;
|
|
1113
|
+
this.openPagesGroupsArr[pagesIndex * 100 + pageIndex] = true;
|
|
1114
|
+
this.active = subPage.route;
|
|
1115
|
+
}
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1118
|
+
});
|
|
1119
|
+
});
|
|
1066
1120
|
}
|
|
1067
|
-
|
|
1068
|
-
|
|
1121
|
+
navigateToAnchorLink(fragment) {
|
|
1122
|
+
const element = fragment && this.documentRef.querySelector(`#${fragment}`);
|
|
1123
|
+
if (!element) {
|
|
1124
|
+
return;
|
|
1125
|
+
}
|
|
1126
|
+
element.classList.add('tui-doc-animated-example');
|
|
1127
|
+
element.scrollIntoView({
|
|
1128
|
+
block: 'start',
|
|
1129
|
+
inline: 'nearest',
|
|
1130
|
+
behavior: 'smooth',
|
|
1131
|
+
});
|
|
1069
1132
|
}
|
|
1070
1133
|
};
|
|
1071
|
-
|
|
1072
|
-
{ type:
|
|
1073
|
-
{ type:
|
|
1074
|
-
{ type:
|
|
1075
|
-
{ type:
|
|
1076
|
-
{ type:
|
|
1077
|
-
{ type:
|
|
1078
|
-
{ type:
|
|
1079
|
-
{ type: undefined, decorators: [{ type: Inject, args: [
|
|
1134
|
+
TuiDocNavigationComponent.ctorParameters = () => [
|
|
1135
|
+
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
1136
|
+
{ type: Title, decorators: [{ type: Inject, args: [Title,] }] },
|
|
1137
|
+
{ type: Observable, decorators: [{ type: Inject, args: [NAVIGATION_TITLE,] }] },
|
|
1138
|
+
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
1139
|
+
{ type: TuiModeDirective, decorators: [{ type: Inject, args: [TuiModeDirective,] }] },
|
|
1140
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [TuiSidebarDirective,] }] },
|
|
1141
|
+
{ type: Array, decorators: [{ type: Inject, args: [NAVIGATION_LABELS,] }] },
|
|
1142
|
+
{ type: undefined, decorators: [{ type: Inject, args: [NAVIGATION_ITEMS,] }] },
|
|
1143
|
+
{ type: String, decorators: [{ type: Inject, args: [TUI_DOC_SEARCH_TEXT,] }] },
|
|
1144
|
+
{ type: Router, decorators: [{ type: Inject, args: [Router,] }] },
|
|
1145
|
+
{ type: ActivatedRoute, decorators: [{ type: Inject, args: [ActivatedRoute,] }] }
|
|
1080
1146
|
];
|
|
1081
1147
|
__decorate([
|
|
1082
|
-
|
|
1083
|
-
],
|
|
1084
|
-
__decorate([
|
|
1085
|
-
Input()
|
|
1086
|
-
], TuiDocExampleComponent.prototype, "description", void 0);
|
|
1087
|
-
__decorate([
|
|
1088
|
-
Input()
|
|
1089
|
-
], TuiDocExampleComponent.prototype, "content", null);
|
|
1148
|
+
HostBinding('class._open')
|
|
1149
|
+
], TuiDocNavigationComponent.prototype, "menuOpen", void 0);
|
|
1090
1150
|
__decorate([
|
|
1091
|
-
|
|
1092
|
-
],
|
|
1151
|
+
tuiPure
|
|
1152
|
+
], TuiDocNavigationComponent.prototype, "filterItems", null);
|
|
1093
1153
|
__decorate([
|
|
1094
1154
|
tuiPure
|
|
1095
|
-
],
|
|
1096
|
-
|
|
1155
|
+
], TuiDocNavigationComponent.prototype, "flattenSubPages", null);
|
|
1156
|
+
TuiDocNavigationComponent = __decorate([
|
|
1097
1157
|
Component({
|
|
1098
|
-
selector: 'tui-doc-
|
|
1099
|
-
template: "<
|
|
1158
|
+
selector: 'tui-doc-navigation',
|
|
1159
|
+
template: "<tui-hosted-dropdown\n *tuiLet=\"filteredItems as filtered\"\n tuiAutoFocus\n tuiDropdownLimitWidth=\"fixed\"\n class=\"input\"\n [autoFocus]=\"!!sidebar\"\n [content]=\"dropdown\"\n [canOpen]=\"canOpen\"\n [(open)]=\"open\"\n>\n <tui-primitive-textfield\n iconAlign=\"left\"\n tuiTextfieldSize=\"m\"\n iconContent=\"tuiIconSearch\"\n [pseudoFocused]=\"open || null\"\n [tuiTextfieldCleaner]=\"true\"\n [tuiTextfieldLabelOutside]=\"true\"\n [value]=\"search\"\n (valueChange)=\"onSearchChange($event)\"\n >\n {{ searchText }}\n </tui-primitive-textfield>\n <ng-template #dropdown let-activeZone>\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=\"navigation\">\n <tui-scrollbar class=\"scrollbar\" [tuiMode]=\"mode$ | async\">\n <tui-accordion [closeOthers]=\"false\" [rounded]=\"false\">\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=\"tui-space_left-2\">\n <strong>{{ label }}</strong>\n </span>\n <ng-template tuiAccordionItemContent>\n <div class=\"section\">\n <ng-container\n *ngFor=\"let item of items[index]; index as subIndex\"\n >\n <ng-container\n *ngTemplateOutlet=\"pages; context: {item: item, index: index * 100 + subIndex}\"\n ></ng-container>\n </ng-container>\n </div>\n </ng-template>\n </tui-accordion-item>\n </tui-accordion>\n <div class=\"items-container\">\n <ng-container\n *ngFor=\"let item of itemsWithoutSections; let index = index\"\n >\n <ng-container\n *ngTemplateOutlet=\"pages; context: {item: item, index: items.length - 1 + index}\"\n ></ng-container>\n </ng-container>\n </div>\n\n <ng-template #pages let-item=\"item\" let-index=\"index\">\n <a\n *ngIf=\"!item.subPages; else subPages\"\n tuiLink\n routerLinkActive=\"sublink_active\"\n class=\"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=\"subsection\"\n [routerLinkActiveOptions]=\"{exact: false}\"\n >\n <button\n *ngIf=\"item.subPages\"\n tuiLink\n type=\"button\"\n class=\"sublink sublink_subsection\"\n (click)=\"onGroupClick(index)\"\n >\n <tui-svg\n src=\"tuiIconChevronRight\"\n class=\"chevron\"\n [class.chevron_active]=\"!!openPagesGroupsArr[index]\"\n ></tui-svg>\n {{ item.title }}\n </button>\n <tui-expand\n class=\"tui-space_left-1\"\n [expanded]=\"!!openPagesGroupsArr[index]\"\n >\n <div class=\"section section_bordered\">\n <a\n *ngFor=\"let subPage of item.subPages\"\n tuiLink\n routerLinkActive=\"sublink_active\"\n class=\"sublink 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",
|
|
1160
|
+
providers: NAVIGATION_PROVIDERS,
|
|
1100
1161
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1101
|
-
styles: [":host{
|
|
1162
|
+
styles: [":host{z-index:1;display:flex;flex-direction:column;text-align:center;background:var(--tui-base-01)}.input{display:block;margin:1.25rem}.navigation{display:flex;max-height:100%;min-height:0;flex:1 1 0;text-align:left}.scrollbar{width:100%;scroll-behavior:smooth}.items-container{display:flex;flex-direction:column;padding:0 16px}.section{display:flex;flex-direction:column;align-items:flex-start;margin:-1rem 0 -.5rem}.section_bordered{margin:.5rem 0;border-left:1px solid var(--tui-base-03)}.subsection{margin-left:.5rem}.sublink{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;font:var(--tui-font-text-m);margin-left:.5rem;line-height:2.75rem}.sublink_small{margin-left:1rem;line-height:1.5rem}.sublink_small:not(:first-child){margin-top:1rem}.sublink_subsection{margin-left:0;line-height:2.75rem}.sublink_active{color:var(--tui-text-01)}.chevron{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;width:1rem;height:1rem;margin:-.25rem .25rem 0 -.1875rem}.chevron_active{transform:rotate(90deg)}"]
|
|
1102
1163
|
}),
|
|
1103
|
-
__param(0,
|
|
1104
|
-
__param(1, Inject(
|
|
1105
|
-
__param(2, Inject(
|
|
1106
|
-
__param(3, Inject(
|
|
1107
|
-
__param(4, Inject(
|
|
1108
|
-
__param(5,
|
|
1109
|
-
__param(
|
|
1110
|
-
__param(6, Inject(
|
|
1111
|
-
__param(7, Inject(
|
|
1112
|
-
|
|
1164
|
+
__param(0, Inject(ChangeDetectorRef)),
|
|
1165
|
+
__param(1, Inject(Title)),
|
|
1166
|
+
__param(2, Inject(NAVIGATION_TITLE)),
|
|
1167
|
+
__param(3, Inject(DOCUMENT)),
|
|
1168
|
+
__param(4, Inject(TuiModeDirective)),
|
|
1169
|
+
__param(5, Optional()),
|
|
1170
|
+
__param(5, Inject(TuiSidebarDirective)),
|
|
1171
|
+
__param(6, Inject(NAVIGATION_LABELS)),
|
|
1172
|
+
__param(7, Inject(NAVIGATION_ITEMS)),
|
|
1173
|
+
__param(8, Inject(TUI_DOC_SEARCH_TEXT)),
|
|
1174
|
+
__param(9, Inject(Router)),
|
|
1175
|
+
__param(10, Inject(ActivatedRoute))
|
|
1176
|
+
], TuiDocNavigationComponent);
|
|
1113
1177
|
|
|
1114
|
-
let
|
|
1178
|
+
let TuiDocNavigationModule = class TuiDocNavigationModule {
|
|
1115
1179
|
};
|
|
1116
|
-
|
|
1180
|
+
TuiDocNavigationModule = __decorate([
|
|
1117
1181
|
NgModule({
|
|
1118
1182
|
imports: [
|
|
1119
1183
|
CommonModule,
|
|
1120
|
-
|
|
1121
|
-
|
|
1184
|
+
FormsModule,
|
|
1185
|
+
RouterModule,
|
|
1186
|
+
ScrollIntoViewModule,
|
|
1122
1187
|
TuiButtonModule,
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1188
|
+
TuiPrimitiveTextfieldModule,
|
|
1189
|
+
TuiTextfieldControllerModule,
|
|
1190
|
+
TuiActiveZoneModule,
|
|
1191
|
+
TuiLetModule,
|
|
1192
|
+
TuiModeModule,
|
|
1193
|
+
TuiLinkModule,
|
|
1194
|
+
TuiExpandModule,
|
|
1195
|
+
TuiHostedDropdownModule,
|
|
1196
|
+
TuiDropdownControllerModule,
|
|
1197
|
+
TuiAccordionModule,
|
|
1198
|
+
TuiScrollbarModule,
|
|
1199
|
+
TuiSvgModule,
|
|
1200
|
+
TuiDataListModule,
|
|
1201
|
+
TuiAutoFocusModule,
|
|
1126
1202
|
],
|
|
1127
|
-
declarations: [
|
|
1128
|
-
exports: [
|
|
1203
|
+
declarations: [TuiDocNavigationComponent],
|
|
1204
|
+
exports: [TuiDocNavigationComponent],
|
|
1129
1205
|
})
|
|
1130
|
-
],
|
|
1131
|
-
|
|
1132
|
-
var TuiDocMainComponent_1;
|
|
1133
|
-
// @dynamic
|
|
1134
|
-
let TuiDocMainComponent = TuiDocMainComponent_1 = class TuiDocMainComponent {
|
|
1135
|
-
constructor(storage, windowRef) {
|
|
1136
|
-
this.storage = storage;
|
|
1137
|
-
this.windowRef = windowRef;
|
|
1138
|
-
this.night = this.storage.getItem('night') === 'true' ||
|
|
1139
|
-
(this.storage.getItem('night') === null &&
|
|
1140
|
-
this.windowRef.matchMedia('(prefers-color-scheme: dark)').matches);
|
|
1141
|
-
this.change$ = new Subject();
|
|
1142
|
-
}
|
|
1143
|
-
get mode() {
|
|
1144
|
-
return this.night ? 'onDark' : null;
|
|
1145
|
-
}
|
|
1146
|
-
onMode(night) {
|
|
1147
|
-
this.night = night;
|
|
1148
|
-
this.change$.next();
|
|
1149
|
-
this.storage.setItem('night', String(night));
|
|
1150
|
-
}
|
|
1151
|
-
};
|
|
1152
|
-
TuiDocMainComponent.ctorParameters = () => [
|
|
1153
|
-
{ type: Storage, decorators: [{ type: Inject, args: [LOCAL_STORAGE,] }] },
|
|
1154
|
-
{ type: Window, decorators: [{ type: Inject, args: [WINDOW,] }] }
|
|
1155
|
-
];
|
|
1156
|
-
TuiDocMainComponent = TuiDocMainComponent_1 = __decorate([
|
|
1157
|
-
Component({
|
|
1158
|
-
selector: 'tui-doc-main',
|
|
1159
|
-
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-space_left-2\"\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=\"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",
|
|
1160
|
-
encapsulation: ViewEncapsulation.None,
|
|
1161
|
-
providers: [
|
|
1162
|
-
{
|
|
1163
|
-
provide: TuiModeDirective,
|
|
1164
|
-
useExisting: forwardRef(() => TuiDocMainComponent_1),
|
|
1165
|
-
},
|
|
1166
|
-
TuiSwipeService,
|
|
1167
|
-
],
|
|
1168
|
-
styles: ["html{scroll-padding-top:4rem;height:auto}@-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(.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}:focus code:not(.exception){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}.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-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-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}"]
|
|
1169
|
-
}),
|
|
1170
|
-
__param(0, Inject(LOCAL_STORAGE)),
|
|
1171
|
-
__param(1, Inject(WINDOW))
|
|
1172
|
-
], TuiDocMainComponent);
|
|
1206
|
+
], TuiDocNavigationModule);
|
|
1173
1207
|
|
|
1174
1208
|
const TUI_DOC_LOGO = new InjectionToken('Main logo', {
|
|
1175
1209
|
factory: () => '',
|
|
@@ -1202,9 +1236,9 @@ TuiDocHeaderComponent.ctorParameters = () => [
|
|
|
1202
1236
|
TuiDocHeaderComponent = __decorate([
|
|
1203
1237
|
Component({
|
|
1204
1238
|
selector: 'header[tuiDocHeader]',
|
|
1205
|
-
template: "<button\n tuiIconButton\n
|
|
1239
|
+
template: "<button\n tuiIconButton\n icon=\"tuiIconMenuLarge\"\n appearance=\"icon\"\n class=\"menu\"\n [title]=\"menu\"\n (click)=\"onClick()\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-doc-navigation\n *tuiSidebar=\"open$ | async\"\n class=\"navigation\"\n ></tui-doc-navigation>\n</button>\n<div polymorpheus-outlet class=\"logo tui-text_h5\" [content]=\"logo\">\n <ng-template let-src>\n <img alt=\"Logo\" class=\"img\" [src]=\"src\" />\n </ng-template>\n</div>\n<ng-content></ng-content>\n",
|
|
1206
1240
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1207
|
-
styles: [":host{box-shadow:0 .125rem 1rem rgba(0,0,0,.08);position:fixed;top:0;left:0;right:0;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)
|
|
1241
|
+
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)}.logo{margin-right:auto}.img{display:block}.menu{margin-left:-1.25rem}@media screen and (min-width:48em){.menu{display:none}}.navigation{min-height:100%}"]
|
|
1208
1242
|
}),
|
|
1209
1243
|
__param(0, Inject(TUI_DOC_LOGO)),
|
|
1210
1244
|
__param(1, Inject(TUI_DOC_MENU_TEXT)),
|
|
@@ -1254,25 +1288,6 @@ const TUI_DOC_DEFAULT_TABS = new InjectionToken('Array of default tab names', {
|
|
|
1254
1288
|
factory: () => [],
|
|
1255
1289
|
});
|
|
1256
1290
|
|
|
1257
|
-
let TuiDocPageTabConnectorDirective = class TuiDocPageTabConnectorDirective {
|
|
1258
|
-
constructor(template) {
|
|
1259
|
-
this.template = template;
|
|
1260
|
-
}
|
|
1261
|
-
};
|
|
1262
|
-
TuiDocPageTabConnectorDirective.ctorParameters = () => [
|
|
1263
|
-
{ type: TemplateRef, decorators: [{ type: Inject, args: [TemplateRef,] }] }
|
|
1264
|
-
];
|
|
1265
|
-
__decorate([
|
|
1266
|
-
Input(),
|
|
1267
|
-
tuiDefaultProp()
|
|
1268
|
-
], TuiDocPageTabConnectorDirective.prototype, "pageTab", void 0);
|
|
1269
|
-
TuiDocPageTabConnectorDirective = __decorate([
|
|
1270
|
-
Directive({
|
|
1271
|
-
selector: '[pageTab]',
|
|
1272
|
-
}),
|
|
1273
|
-
__param(0, Inject(TemplateRef))
|
|
1274
|
-
], TuiDocPageTabConnectorDirective);
|
|
1275
|
-
|
|
1276
1291
|
const TUI_DOC_SEE_ALSO = new InjectionToken('Array of arrays of related pages', {
|
|
1277
1292
|
factory: () => [],
|
|
1278
1293
|
});
|
|
@@ -1294,6 +1309,25 @@ function seeAlsoProviderFactory({ nativeElement }, seeAlsoGroups) {
|
|
|
1294
1309
|
return Array.from(seeAlsoSet);
|
|
1295
1310
|
}
|
|
1296
1311
|
|
|
1312
|
+
let TuiDocPageTabConnectorDirective = class TuiDocPageTabConnectorDirective {
|
|
1313
|
+
constructor(template) {
|
|
1314
|
+
this.template = template;
|
|
1315
|
+
}
|
|
1316
|
+
};
|
|
1317
|
+
TuiDocPageTabConnectorDirective.ctorParameters = () => [
|
|
1318
|
+
{ type: TemplateRef, decorators: [{ type: Inject, args: [TemplateRef,] }] }
|
|
1319
|
+
];
|
|
1320
|
+
__decorate([
|
|
1321
|
+
Input(),
|
|
1322
|
+
tuiDefaultProp()
|
|
1323
|
+
], TuiDocPageTabConnectorDirective.prototype, "pageTab", void 0);
|
|
1324
|
+
TuiDocPageTabConnectorDirective = __decorate([
|
|
1325
|
+
Directive({
|
|
1326
|
+
selector: '[pageTab]',
|
|
1327
|
+
}),
|
|
1328
|
+
__param(0, Inject(TemplateRef))
|
|
1329
|
+
], TuiDocPageTabConnectorDirective);
|
|
1330
|
+
|
|
1297
1331
|
// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
|
|
1298
1332
|
// @dynamic
|
|
1299
1333
|
let TuiDocPageComponent = class TuiDocPageComponent {
|
|
@@ -1338,10 +1372,10 @@ __decorate([
|
|
|
1338
1372
|
TuiDocPageComponent = __decorate([
|
|
1339
1373
|
Component({
|
|
1340
1374
|
selector: 'tui-doc-page',
|
|
1341
|
-
template: "<header class=\"t-header\">\n <h1 class=\"t-title\">\n {{header}}\n <tui-tag\n *ngIf=\"deprecated !== null\"\n
|
|
1375
|
+
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\n *ngFor=\"let tab of tabConnectors; first as first; index as index\"\n >\n <ng-container *ngIf=\"first; else dynamicTab\">\n <a\n *tuiTab\n tuiTab\n routerLink=\"./\"\n routerLinkActive\n [routerLinkActiveOptions]=\"{exact: true}\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-container>\n <ng-template #dynamicTab>\n <a\n *tuiTab\n tuiTab\n routerLinkActive\n [routerLink]=\"getRouterLink(tab.pageTab || defaultTabs[index])\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-template>\n </ng-container>\n </tui-tabs-with-more>\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header\"\n [package]=\"package\"\n [type]=\"type\"\n [path]=\"path\"\n ></tui-doc-source-code>\n</header>\n<div class=\"t-content\">\n <ng-content></ng-content>\n <tui-doc-see-also\n *ngIf=\"showSeeAlso\"\n class=\"t-see-also\"\n [seeAlso]=\"seeAlso\"\n ></tui-doc-see-also>\n <ng-container *ngFor=\"let tab of tabConnectors; index as index\">\n <ng-container *ngIf=\"index === activeItemIndex\">\n <ng-container *ngTemplateOutlet=\"tab.template\"></ng-container>\n </ng-container>\n </ng-container>\n</div>\n",
|
|
1342
1376
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1343
1377
|
providers: PAGE_PROVIDERS,
|
|
1344
|
-
styles: [":host{display:flex;flex-direction:column;min-height:0;flex-basis:0;flex-grow:1}.t-header{font:var(--tui-font-heading-3);
|
|
1378
|
+
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)}@media screen and (max-width:47.9375em){.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}@media screen and (max-width:47.9375em){.t-tabs{margin-top:.25rem}}.t-content{padding:2rem 0;margin:0 min(10vw,8.75rem)}@media screen and (max-width:47.9375em){.t-content{padding:2rem 1.25rem;margin:0}}.t-see-also{min-width:18.75rem;width:30%;float:right;margin-left:1.5rem}@media screen and (max-width:47.9375em){.t-see-also{float:none;width:100%;margin:0 0 1.5rem}}.t-source-code{align-self:flex-end;line-height:2.75rem}"]
|
|
1345
1379
|
}),
|
|
1346
1380
|
__param(0, Attribute('deprecated')),
|
|
1347
1381
|
__param(1, Inject(TUI_DOC_DEFAULT_TABS)),
|
|
@@ -1378,7 +1412,7 @@ __decorate([
|
|
|
1378
1412
|
TuiDocSeeAlsoComponent = __decorate([
|
|
1379
1413
|
Component({
|
|
1380
1414
|
selector: 'tui-doc-see-also',
|
|
1381
|
-
template: "<h5 class=\"header\">{{text}}</h5>\n<ng-container *ngFor=\"let item of seeAlso; last as last\">\n <a tuiLink [routerLink]=\"getRouterLink(item)\">{{item}}</a>\n <ng-container *ngIf=\"!last\"
|
|
1415
|
+
template: "<h5 class=\"header\">{{ text }}</h5>\n<ng-container *ngFor=\"let item of seeAlso; last as last\">\n <a tuiLink [routerLink]=\"getRouterLink(item)\">{{ item }}</a>\n <ng-container *ngIf=\"!last\">,</ng-container>\n</ng-container>\n",
|
|
1382
1416
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1383
1417
|
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}"]
|
|
1384
1418
|
}),
|
|
@@ -1443,7 +1477,7 @@ __decorate([
|
|
|
1443
1477
|
TuiDocSourceCodeComponent = __decorate([
|
|
1444
1478
|
Component({
|
|
1445
1479
|
selector: 'tui-doc-source-code',
|
|
1446
|
-
template: "<div\n
|
|
1480
|
+
template: "<div\n *ngIf=\"!!sourceCode\"\n polymorpheus-outlet\n [content]=\"sourceCode\"\n [context]=\"pathOptions\"\n>\n <ng-template let-link>\n <a\n *ngIf=\"link\"\n tuiIconButton\n type=\"button\"\n icon=\"tuiIconCodeLarge\"\n appearance=\"icon\"\n target=\"_blank\"\n size=\"s\"\n [title]=\"text\"\n [href]=\"link\"\n ></a>\n </ng-template>\n</div>\n",
|
|
1447
1481
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1448
1482
|
}),
|
|
1449
1483
|
__param(0, Inject(TUI_DOC_SOURCE_CODE)),
|
|
@@ -1518,6 +1552,20 @@ const TUI_DOC_RUSSIAN = [
|
|
|
1518
1552
|
},
|
|
1519
1553
|
];
|
|
1520
1554
|
|
|
1555
|
+
let TuiAddonDocModule = class TuiAddonDocModule {
|
|
1556
|
+
};
|
|
1557
|
+
TuiAddonDocModule = __decorate([
|
|
1558
|
+
NgModule({
|
|
1559
|
+
exports: [
|
|
1560
|
+
TuiDocCodeModule,
|
|
1561
|
+
TuiDocDemoModule,
|
|
1562
|
+
TuiDocDocumentationModule,
|
|
1563
|
+
TuiDocPageModule,
|
|
1564
|
+
TuiDocExampleModule,
|
|
1565
|
+
],
|
|
1566
|
+
})
|
|
1567
|
+
], TuiAddonDocModule);
|
|
1568
|
+
|
|
1521
1569
|
/**
|
|
1522
1570
|
* Generates typical page routing structure
|
|
1523
1571
|
*/
|
|
@@ -1536,20 +1584,6 @@ function generateRoutes(type) {
|
|
|
1536
1584
|
];
|
|
1537
1585
|
}
|
|
1538
1586
|
|
|
1539
|
-
let TuiAddonDocModule = class TuiAddonDocModule {
|
|
1540
|
-
};
|
|
1541
|
-
TuiAddonDocModule = __decorate([
|
|
1542
|
-
NgModule({
|
|
1543
|
-
exports: [
|
|
1544
|
-
TuiDocCodeModule,
|
|
1545
|
-
TuiDocDemoModule,
|
|
1546
|
-
TuiDocDocumentationModule,
|
|
1547
|
-
TuiDocPageModule,
|
|
1548
|
-
TuiDocExampleModule,
|
|
1549
|
-
],
|
|
1550
|
-
})
|
|
1551
|
-
], TuiAddonDocModule);
|
|
1552
|
-
|
|
1553
1587
|
/**
|
|
1554
1588
|
* Public API Surface of @taiga-ui/addon-doc
|
|
1555
1589
|
*/
|
|
@@ -1558,5 +1592,5 @@ TuiAddonDocModule = __decorate([
|
|
|
1558
1592
|
* Generated bundle index. Do not edit.
|
|
1559
1593
|
*/
|
|
1560
1594
|
|
|
1561
|
-
export { DEMO_TEXTS, DOC_TEXTS, EXAMPLE_TEXTS, ScrollIntoViewDirective, ScrollIntoViewModule, 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_RUSSIAN, 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, TuiAddonDocModule, TuiDocCodeComponent, TuiDocCodeModule, TuiDocCopyComponent, TuiDocCopyModule, TuiDocDemoComponent, TuiDocDemoModule, TuiDocDocumentationComponent, TuiDocDocumentationModule, TuiDocDocumentationPropertyConnectorDirective, TuiDocExampleComponent, TuiDocExampleModule, TuiDocMainComponent, TuiDocMainModule, TuiDocNavigationComponent, TuiDocNavigationModule, TuiDocPageComponent, TuiDocPageModule, TuiDocPageTabConnectorDirective, generateRoutes,
|
|
1595
|
+
export { DEMO_TEXTS, DOC_TEXTS, EXAMPLE_TEXTS, ScrollIntoViewDirective, ScrollIntoViewModule, 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_RUSSIAN, 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, TuiAddonDocModule, TuiDocCodeComponent, TuiDocCodeModule, TuiDocCopyComponent, TuiDocCopyModule, TuiDocDemoComponent, TuiDocDemoModule, TuiDocDocumentationComponent, TuiDocDocumentationModule, TuiDocDocumentationPropertyConnectorDirective, TuiDocExampleComponent, TuiDocExampleModule, TuiDocMainComponent, TuiDocMainModule, TuiDocNavigationComponent, TuiDocNavigationModule, TuiDocPageComponent, TuiDocPageModule, TuiDocPageTabConnectorDirective, generateRoutes, TuiInputOpacityModule as ɵa, TuiInputOpacityDirective as ɵb, TuiDocExampleGetTabsPipe as ɵc, TuiDocHeaderModule as ɵd, NAVIGATION_TITLE as ɵe, NAVIGATION_LABELS as ɵf, NAVIGATION_ITEMS as ɵg, NAVIGATION_PROVIDERS as ɵh, titleProviderFactory as ɵi, labelsProviderFactory as ɵj, itemsProviderFactory as ɵk, TuiDocHeaderComponent as ɵl, PAGE_SEE_ALSO as ɵm, PAGE_PROVIDERS as ɵn, seeAlsoProviderFactory as ɵo, TuiDocSeeAlsoModule as ɵp, TuiDocSeeAlsoComponent as ɵq, TuiDocSourceCodeModule as ɵr, TuiDocSourceCodeComponent as ɵs };
|
|
1562
1596
|
//# sourceMappingURL=taiga-ui-addon-doc.js.map
|