@taiga-ui/addon-doc 2.20.0 → 2.24.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 +170 -95
- 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/components/code/code.component.js +11 -4
- package/esm2015/components/copy/copy.component.js +2 -2
- package/esm2015/components/demo/demo.component.js +3 -3
- 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 +3 -2
- 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 +4 -2
- package/esm2015/components/navigation/navigation.component.js +20 -17
- package/esm2015/components/page/page.component.js +3 -3
- package/esm2015/interfaces/page.js +1 -1
- package/esm2015/internal/header/header.component.js +12 -8
- package/esm2015/internal/see-also/see-also.component.js +2 -2
- package/esm2015/internal/source-code/source-code.component.js +1 -1
- package/esm2015/taiga-ui-addon-doc.js +9 -8
- package/esm2015/tokens/example-content-processor.js +2 -4
- package/esm2015/tokens/i18n.js +13 -5
- package/esm2015/utils/raw-load-record.js +12 -0
- package/esm2015/utils/raw-load.js +7 -0
- package/esm5/components/code/code.component.js +15 -4
- package/esm5/components/copy/copy.component.js +2 -2
- package/esm5/components/demo/demo.component.js +3 -3
- 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 +3 -2
- 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 +4 -2
- package/esm5/components/navigation/navigation.component.js +20 -17
- package/esm5/components/page/page.component.js +3 -3
- package/esm5/interfaces/page.js +1 -1
- package/esm5/internal/header/header.component.js +12 -8
- package/esm5/internal/see-also/see-also.component.js +2 -2
- package/esm5/internal/source-code/source-code.component.js +1 -1
- package/esm5/taiga-ui-addon-doc.js +9 -8
- package/esm5/tokens/example-content-processor.js +2 -4
- package/esm5/tokens/i18n.js +13 -5
- package/esm5/utils/raw-load-record.js +44 -0
- package/esm5/utils/raw-load.js +21 -0
- package/fesm2015/taiga-ui-addon-doc.js +111 -73
- package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
- package/fesm5/taiga-ui-addon-doc.js +164 -89
- package/fesm5/taiga-ui-addon-doc.js.map +1 -1
- package/interfaces/page.d.ts +4 -0
- package/internal/header/header.component.d.ts +3 -1
- package/package.json +6 -6
- package/taiga-ui-addon-doc.d.ts +8 -7
- 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, Optional, ElementRef, Directive, EventEmitter, Output,
|
|
1
|
+
import { __awaiter, __decorate, __param } from 'tslib';
|
|
2
|
+
import { Input, HostBinding, Component, NgModule, Inject, ChangeDetectionStrategy, InjectionToken, Renderer2, PLATFORM_ID, ContentChild, TemplateRef, ViewChild, HostListener, forwardRef, ChangeDetectorRef, Optional, ElementRef, Directive, EventEmitter, Output, ContentChildren, Attribute, Pipe, ViewEncapsulation } from '@angular/core';
|
|
3
|
+
import { BehaviorSubject, Subject, timer, Observable, merge } from 'rxjs';
|
|
4
|
+
import { switchMap, switchMapTo, mapTo, startWith, takeUntil, filter, map, mergeMap, debounceTime, 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, isPresent, uniqBy, getElementObscurers, TuiActiveZoneModule, TuiLetModule, TuiAutoFocusModule, EMPTY_QUERY, itemsQueryListObservable, watch, TUI_FOCUSABLE_ITEM_ACCESSOR, identity, tuiDefaultProp } from '@taiga-ui/cdk';
|
|
7
|
+
import { tuiPure, TuiDestroyService, TUI_IS_MOBILE, TuiDragModule, isPresent, uniqBy, getElementObscurers, TuiActiveZoneModule, TuiLetModule, TuiAutoFocusModule, EMPTY_QUERY, itemsQueryListObservable, watch, TUI_FOCUSABLE_ITEM_ACCESSOR, identity, TuiSwipeService, tuiDefaultProp } from '@taiga-ui/cdk';
|
|
6
8
|
import { TUI_COPY_TEXTS, TuiSelectModule, TuiRadioBlockModule, TuiCheckboxLabeledModule, TuiDataListWrapperModule, TuiAccordionModule, TuiBadgeModule, TuiToggleModule, TuiInputCountModule, TuiTabsModule, TuiTagModule } from '@taiga-ui/kit';
|
|
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';
|
|
9
|
+
import { TuiButtonModule, TuiModeDirective, TuiLinkModule, TuiExpandModule, TuiGroupModule, TuiTooltipModule, TuiModeModule, TuiSvgModule, TuiDataListModule, TuiTextfieldControllerModule, TuiHintControllerModule, TuiPrimitiveTextfieldModule, TuiHostedDropdownModule, TuiDropdownControllerModule, TuiScrollbarModule, TuiNotificationModule, TuiNotificationsService, TuiThemeNightModule, TuiRootModule, TuiDialogModule, TuiNotificationsModule } from '@taiga-ui/core';
|
|
10
10
|
import { FormControl, FormGroup, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
11
11
|
import { UrlSerializer, RouterModule, Router, ActivatedRoute, NavigationEnd } from '@angular/router';
|
|
12
12
|
import { Title } from '@angular/platform-browser';
|
|
13
13
|
import { TuiSidebarDirective, TuiSidebarModule } from '@taiga-ui/addon-mobile';
|
|
14
|
+
import { trigger, transition, style, animate } from '@angular/animations';
|
|
14
15
|
import { Clipboard, ClipboardModule } from '@angular/cdk/clipboard';
|
|
15
16
|
import { LOCATION, LOCAL_STORAGE, WINDOW } from '@ng-web-apis/common';
|
|
16
17
|
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
17
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
|
+
}
|
|
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 (
|
|
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)),
|
|
@@ -401,7 +420,7 @@ function itemsProviderFactory(pages) {
|
|
|
401
420
|
const SCROLL_INTO_VIEW_DELAY = 200;
|
|
402
421
|
// @dynamic
|
|
403
422
|
let TuiDocNavigationComponent = class TuiDocNavigationComponent {
|
|
404
|
-
constructor(titleService, title$, documentRef, mode, sidebar, labels, items, searchText, router, activatedRoute) {
|
|
423
|
+
constructor(changeDetectorRef, titleService, title$, documentRef, mode, sidebar, labels, items, searchText, router, activatedRoute) {
|
|
405
424
|
this.documentRef = documentRef;
|
|
406
425
|
this.mode = mode;
|
|
407
426
|
this.sidebar = sidebar;
|
|
@@ -420,6 +439,7 @@ let TuiDocNavigationComponent = class TuiDocNavigationComponent {
|
|
|
420
439
|
// Angular can't navigate no anchor links
|
|
421
440
|
// https://stackoverflow.com/questions/36101756/angular2-routing-with-hashtag-to-page-anchor
|
|
422
441
|
title$.subscribe(title => {
|
|
442
|
+
changeDetectorRef.markForCheck();
|
|
423
443
|
titleService.setTitle(title);
|
|
424
444
|
this.openActivePageGroup();
|
|
425
445
|
this.handleAnchorLink(this.activatedRoute.snapshot.fragment);
|
|
@@ -492,7 +512,7 @@ let TuiDocNavigationComponent = class TuiDocNavigationComponent {
|
|
|
492
512
|
page.subPages.forEach(subPage => {
|
|
493
513
|
if (this.isActiveRoute(subPage.route)) {
|
|
494
514
|
this.openPagesArr[pagesIndex] = true;
|
|
495
|
-
this.openPagesGroupsArr[pagesIndex + pageIndex] = true;
|
|
515
|
+
this.openPagesGroupsArr[pagesIndex * 100 + pageIndex] = true;
|
|
496
516
|
this.active = subPage.route;
|
|
497
517
|
}
|
|
498
518
|
});
|
|
@@ -514,6 +534,7 @@ let TuiDocNavigationComponent = class TuiDocNavigationComponent {
|
|
|
514
534
|
}
|
|
515
535
|
};
|
|
516
536
|
TuiDocNavigationComponent.ctorParameters = () => [
|
|
537
|
+
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
517
538
|
{ type: Title, decorators: [{ type: Inject, args: [Title,] }] },
|
|
518
539
|
{ type: Observable, decorators: [{ type: Inject, args: [NAVIGATION_TITLE,] }] },
|
|
519
540
|
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
@@ -537,22 +558,23 @@ __decorate([
|
|
|
537
558
|
TuiDocNavigationComponent = __decorate([
|
|
538
559
|
Component({
|
|
539
560
|
selector: 'tui-doc-navigation',
|
|
540
|
-
template: "<tui-hosted-dropdown\n *tuiLet=\"filteredItems as filtered\"\n
|
|
561
|
+
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",
|
|
541
562
|
providers: NAVIGATION_PROVIDERS,
|
|
542
563
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
543
|
-
styles: [":host{display:flex;flex-direction:column;text-align:center;background:var(--tui-base-01)
|
|
564
|
+
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)}"]
|
|
544
565
|
}),
|
|
545
|
-
__param(0, Inject(
|
|
546
|
-
__param(1, Inject(
|
|
547
|
-
__param(2, Inject(
|
|
548
|
-
__param(3, Inject(
|
|
549
|
-
__param(4,
|
|
550
|
-
__param(
|
|
551
|
-
__param(5, Inject(
|
|
552
|
-
__param(6, Inject(
|
|
553
|
-
__param(7, Inject(
|
|
554
|
-
__param(8, Inject(
|
|
555
|
-
__param(9, Inject(
|
|
566
|
+
__param(0, Inject(ChangeDetectorRef)),
|
|
567
|
+
__param(1, Inject(Title)),
|
|
568
|
+
__param(2, Inject(NAVIGATION_TITLE)),
|
|
569
|
+
__param(3, Inject(DOCUMENT)),
|
|
570
|
+
__param(4, Inject(TuiModeDirective)),
|
|
571
|
+
__param(5, Optional()),
|
|
572
|
+
__param(5, Inject(TuiSidebarDirective)),
|
|
573
|
+
__param(6, Inject(NAVIGATION_LABELS)),
|
|
574
|
+
__param(7, Inject(NAVIGATION_ITEMS)),
|
|
575
|
+
__param(8, Inject(TUI_DOC_SEARCH_TEXT)),
|
|
576
|
+
__param(9, Inject(Router)),
|
|
577
|
+
__param(10, Inject(ActivatedRoute))
|
|
556
578
|
], TuiDocNavigationComponent);
|
|
557
579
|
|
|
558
580
|
let ScrollIntoViewDirective = class ScrollIntoViewDirective {
|
|
@@ -726,6 +748,7 @@ let TuiDocDocumentationPropertyConnectorDirective = class TuiDocDocumentationPro
|
|
|
726
748
|
this.documentationPropertyValues = null;
|
|
727
749
|
this.documentationPropertyValueChange = new EventEmitter();
|
|
728
750
|
this.changed$ = new Subject();
|
|
751
|
+
this.emits$ = new BehaviorSubject(1);
|
|
729
752
|
}
|
|
730
753
|
ngOnInit() {
|
|
731
754
|
this.parseParams(this.activatedRoute.snapshot.queryParams);
|
|
@@ -781,6 +804,11 @@ let TuiDocDocumentationPropertyConnectorDirective = class TuiDocDocumentationPro
|
|
|
781
804
|
tree.queryParams = Object.assign(Object.assign({}, tree.queryParams), { [propName]: computedValue });
|
|
782
805
|
this.locationRef.go(String(tree));
|
|
783
806
|
}
|
|
807
|
+
emitEvent(event) {
|
|
808
|
+
// For more convenient debugging
|
|
809
|
+
console.log(this.attrName, event);
|
|
810
|
+
this.emits$.next(this.emits$.value + 1);
|
|
811
|
+
}
|
|
784
812
|
};
|
|
785
813
|
TuiDocDocumentationPropertyConnectorDirective.ctorParameters = () => [
|
|
786
814
|
{ type: TemplateRef, decorators: [{ type: Inject, args: [TemplateRef,] }] },
|
|
@@ -812,6 +840,7 @@ __decorate([
|
|
|
812
840
|
TuiDocDocumentationPropertyConnectorDirective = __decorate([
|
|
813
841
|
Directive({
|
|
814
842
|
selector: 'ng-template[documentationPropertyName]',
|
|
843
|
+
exportAs: 'documentationProperty',
|
|
815
844
|
}),
|
|
816
845
|
__param(0, Inject(TemplateRef)),
|
|
817
846
|
__param(1, Inject(Location$1)),
|
|
@@ -929,9 +958,14 @@ __decorate([
|
|
|
929
958
|
TuiDocDocumentationComponent = __decorate([
|
|
930
959
|
Component({
|
|
931
960
|
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
|
|
961
|
+
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
962
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
934
|
-
|
|
963
|
+
animations: [
|
|
964
|
+
trigger('emitEvent', [
|
|
965
|
+
transition(':increment', [style({ opacity: 1 }), animate('500ms ease-in')]),
|
|
966
|
+
]),
|
|
967
|
+
],
|
|
968
|
+
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}"]
|
|
935
969
|
}),
|
|
936
970
|
__param(0, Inject(ChangeDetectorRef)),
|
|
937
971
|
__param(1, Inject(TUI_DOC_DOCUMENTATION_TEXTS))
|
|
@@ -996,6 +1030,7 @@ TuiDocDocumentationModule = __decorate([
|
|
|
996
1030
|
TuiDropdownControllerModule,
|
|
997
1031
|
TuiDataListModule,
|
|
998
1032
|
TuiDataListWrapperModule,
|
|
1033
|
+
TuiNotificationModule,
|
|
999
1034
|
],
|
|
1000
1035
|
declarations: [
|
|
1001
1036
|
TuiDocDocumentationComponent,
|
|
@@ -1010,9 +1045,17 @@ TuiDocDocumentationModule = __decorate([
|
|
|
1010
1045
|
|
|
1011
1046
|
const TUI_DOC_CODE_EDITOR = new InjectionToken('Contains service for opening online IDE e.g. Stackblitz');
|
|
1012
1047
|
|
|
1013
|
-
const TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new InjectionToken('Processes content in example', {
|
|
1014
|
-
|
|
1015
|
-
|
|
1048
|
+
const TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new InjectionToken('Processes content in example', { factory: () => identity });
|
|
1049
|
+
|
|
1050
|
+
function rawLoadRecord(example) {
|
|
1051
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1052
|
+
const processedContent = {};
|
|
1053
|
+
for (const [key, content] of Object.entries(example)) {
|
|
1054
|
+
processedContent[key] = yield rawLoad(content);
|
|
1055
|
+
}
|
|
1056
|
+
return processedContent;
|
|
1057
|
+
});
|
|
1058
|
+
}
|
|
1016
1059
|
|
|
1017
1060
|
// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
|
|
1018
1061
|
// @dynamic
|
|
@@ -1026,29 +1069,17 @@ let TuiDocExampleComponent = class TuiDocExampleComponent {
|
|
|
1026
1069
|
this.texts = texts;
|
|
1027
1070
|
this.codeEditor = codeEditor;
|
|
1028
1071
|
this.processContent = processContent;
|
|
1072
|
+
this.rawLoader$$ = new BehaviorSubject({});
|
|
1029
1073
|
this.heading = '';
|
|
1030
1074
|
this.description = '';
|
|
1031
1075
|
this.componentName = this.location.pathname.slice(1);
|
|
1032
1076
|
this.activeItemIndex = 0;
|
|
1033
|
-
this.processedContent = {};
|
|
1034
1077
|
this.defaultTab = this.texts[0];
|
|
1035
1078
|
this.copy$ = this.copyTexts$.pipe(map(([copy]) => copy));
|
|
1079
|
+
this.processor$ = this.rawLoader$$.pipe(switchMap(rawLoadRecord), map(this.processContent));
|
|
1036
1080
|
}
|
|
1037
1081
|
set content(content) {
|
|
1038
|
-
this.
|
|
1039
|
-
}
|
|
1040
|
-
get activeItem() {
|
|
1041
|
-
return this.tabs[this.activeItemIndex];
|
|
1042
|
-
}
|
|
1043
|
-
get tabs() {
|
|
1044
|
-
return this.getTabs(this.processedContent);
|
|
1045
|
-
}
|
|
1046
|
-
get code() {
|
|
1047
|
-
const code = this.processedContent[this.activeItem];
|
|
1048
|
-
return code ? code.trim() : '';
|
|
1049
|
-
}
|
|
1050
|
-
get isDefaultItem() {
|
|
1051
|
-
return this.activeItem === this.defaultTab;
|
|
1082
|
+
this.rawLoader$$.next(content);
|
|
1052
1083
|
}
|
|
1053
1084
|
copyExampleLink() {
|
|
1054
1085
|
const hashPosition = this.location.href.indexOf('#');
|
|
@@ -1064,9 +1095,6 @@ let TuiDocExampleComponent = class TuiDocExampleComponent {
|
|
|
1064
1095
|
})
|
|
1065
1096
|
.subscribe();
|
|
1066
1097
|
}
|
|
1067
|
-
getTabs(content) {
|
|
1068
|
-
return [this.defaultTab, ...Object.keys(content)];
|
|
1069
|
-
}
|
|
1070
1098
|
};
|
|
1071
1099
|
TuiDocExampleComponent.ctorParameters = () => [
|
|
1072
1100
|
{ type: String, decorators: [{ type: Attribute, args: ['id',] }] },
|
|
@@ -1090,15 +1118,12 @@ __decorate([
|
|
|
1090
1118
|
__decorate([
|
|
1091
1119
|
Input()
|
|
1092
1120
|
], TuiDocExampleComponent.prototype, "componentName", void 0);
|
|
1093
|
-
__decorate([
|
|
1094
|
-
tuiPure
|
|
1095
|
-
], TuiDocExampleComponent.prototype, "getTabs", null);
|
|
1096
1121
|
TuiDocExampleComponent = __decorate([
|
|
1097
1122
|
Component({
|
|
1098
1123
|
selector: 'tui-doc-example',
|
|
1099
|
-
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
|
|
1124
|
+
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",
|
|
1100
1125
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1101
|
-
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{padding:0 2rem;box-shadow:inset 0 -1px var(--tui-base-03);
|
|
1126
|
+
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}"]
|
|
1102
1127
|
}),
|
|
1103
1128
|
__param(0, Attribute('id')),
|
|
1104
1129
|
__param(1, Inject(Clipboard)),
|
|
@@ -1111,6 +1136,15 @@ TuiDocExampleComponent = __decorate([
|
|
|
1111
1136
|
__param(7, Inject(TUI_DOC_EXAMPLE_CONTENT_PROCESSOR))
|
|
1112
1137
|
], TuiDocExampleComponent);
|
|
1113
1138
|
|
|
1139
|
+
let TuiDocExampleGetTabsPipe = class TuiDocExampleGetTabsPipe {
|
|
1140
|
+
transform(content, defaultTab) {
|
|
1141
|
+
return [defaultTab, ...Object.keys(content)];
|
|
1142
|
+
}
|
|
1143
|
+
};
|
|
1144
|
+
TuiDocExampleGetTabsPipe = __decorate([
|
|
1145
|
+
Pipe({ name: 'tuiDocExampleGetTabs' })
|
|
1146
|
+
], TuiDocExampleGetTabsPipe);
|
|
1147
|
+
|
|
1114
1148
|
let TuiDocExampleModule = class TuiDocExampleModule {
|
|
1115
1149
|
};
|
|
1116
1150
|
TuiDocExampleModule = __decorate([
|
|
@@ -1124,8 +1158,8 @@ TuiDocExampleModule = __decorate([
|
|
|
1124
1158
|
TuiDocCodeModule,
|
|
1125
1159
|
PolymorpheusModule,
|
|
1126
1160
|
],
|
|
1127
|
-
declarations: [TuiDocExampleComponent],
|
|
1128
|
-
exports: [TuiDocExampleComponent],
|
|
1161
|
+
declarations: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe],
|
|
1162
|
+
exports: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe],
|
|
1129
1163
|
})
|
|
1130
1164
|
], TuiDocExampleModule);
|
|
1131
1165
|
|
|
@@ -1163,8 +1197,9 @@ TuiDocMainComponent = TuiDocMainComponent_1 = __decorate([
|
|
|
1163
1197
|
provide: TuiModeDirective,
|
|
1164
1198
|
useExisting: forwardRef(() => TuiDocMainComponent_1),
|
|
1165
1199
|
},
|
|
1200
|
+
TuiSwipeService,
|
|
1166
1201
|
],
|
|
1167
|
-
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}"]
|
|
1202
|
+
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}"]
|
|
1168
1203
|
}),
|
|
1169
1204
|
__param(0, Inject(LOCAL_STORAGE)),
|
|
1170
1205
|
__param(1, Inject(WINDOW))
|
|
@@ -1175,12 +1210,13 @@ const TUI_DOC_LOGO = new InjectionToken('Main logo', {
|
|
|
1175
1210
|
});
|
|
1176
1211
|
|
|
1177
1212
|
let TuiDocHeaderComponent = class TuiDocHeaderComponent {
|
|
1178
|
-
constructor(logo, menu, router) {
|
|
1213
|
+
constructor(logo, menu, router, swipes$) {
|
|
1179
1214
|
this.logo = logo;
|
|
1180
1215
|
this.menu = menu;
|
|
1181
1216
|
this.router = router;
|
|
1217
|
+
this.swipes$ = swipes$;
|
|
1182
1218
|
this.stream$ = new Subject();
|
|
1183
|
-
this.open$ = merge(this.router.events.pipe(mapTo(false)), this.stream
|
|
1219
|
+
this.open$ = merge(this.router.events.pipe(mapTo(false)), this.stream$, this.swipes$.pipe(filter(swipe => swipe.direction === 'left' || swipe.direction === 'right'), map(swipe => swipe.direction === 'right'))).pipe(startWith(false), distinctUntilChanged());
|
|
1184
1220
|
}
|
|
1185
1221
|
onClick() {
|
|
1186
1222
|
this.stream$.next(true);
|
|
@@ -1194,18 +1230,20 @@ let TuiDocHeaderComponent = class TuiDocHeaderComponent {
|
|
|
1194
1230
|
TuiDocHeaderComponent.ctorParameters = () => [
|
|
1195
1231
|
{ type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_LOGO,] }] },
|
|
1196
1232
|
{ type: String, decorators: [{ type: Inject, args: [TUI_DOC_MENU_TEXT,] }] },
|
|
1197
|
-
{ type: Router, decorators: [{ type: Inject, args: [Router,] }] }
|
|
1233
|
+
{ type: Router, decorators: [{ type: Inject, args: [Router,] }] },
|
|
1234
|
+
{ type: TuiSwipeService, decorators: [{ type: Inject, args: [TuiSwipeService,] }] }
|
|
1198
1235
|
];
|
|
1199
1236
|
TuiDocHeaderComponent = __decorate([
|
|
1200
1237
|
Component({
|
|
1201
1238
|
selector: 'header[tuiDocHeader]',
|
|
1202
|
-
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",
|
|
1203
1240
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1204
|
-
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%}"]
|
|
1205
1242
|
}),
|
|
1206
1243
|
__param(0, Inject(TUI_DOC_LOGO)),
|
|
1207
1244
|
__param(1, Inject(TUI_DOC_MENU_TEXT)),
|
|
1208
|
-
__param(2, Inject(Router))
|
|
1245
|
+
__param(2, Inject(Router)),
|
|
1246
|
+
__param(3, Inject(TuiSwipeService))
|
|
1209
1247
|
], TuiDocHeaderComponent);
|
|
1210
1248
|
|
|
1211
1249
|
let TuiDocHeaderModule = class TuiDocHeaderModule {
|
|
@@ -1334,10 +1372,10 @@ __decorate([
|
|
|
1334
1372
|
TuiDocPageComponent = __decorate([
|
|
1335
1373
|
Component({
|
|
1336
1374
|
selector: 'tui-doc-page',
|
|
1337
|
-
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",
|
|
1338
1376
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1339
1377
|
providers: PAGE_PROVIDERS,
|
|
1340
|
-
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}"]
|
|
1341
1379
|
}),
|
|
1342
1380
|
__param(0, Attribute('deprecated')),
|
|
1343
1381
|
__param(1, Inject(TUI_DOC_DEFAULT_TABS)),
|
|
@@ -1374,7 +1412,7 @@ __decorate([
|
|
|
1374
1412
|
TuiDocSeeAlsoComponent = __decorate([
|
|
1375
1413
|
Component({
|
|
1376
1414
|
selector: 'tui-doc-see-also',
|
|
1377
|
-
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",
|
|
1378
1416
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1379
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}"]
|
|
1380
1418
|
}),
|
|
@@ -1439,7 +1477,7 @@ __decorate([
|
|
|
1439
1477
|
TuiDocSourceCodeComponent = __decorate([
|
|
1440
1478
|
Component({
|
|
1441
1479
|
selector: 'tui-doc-source-code',
|
|
1442
|
-
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",
|
|
1443
1481
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1444
1482
|
}),
|
|
1445
1483
|
__param(0, Inject(TUI_DOC_SOURCE_CODE)),
|
|
@@ -1554,5 +1592,5 @@ TuiAddonDocModule = __decorate([
|
|
|
1554
1592
|
* Generated bundle index. Do not edit.
|
|
1555
1593
|
*/
|
|
1556
1594
|
|
|
1557
|
-
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, NAVIGATION_TITLE as ɵa, NAVIGATION_LABELS as ɵb, NAVIGATION_ITEMS as ɵc, NAVIGATION_PROVIDERS as ɵd, titleProviderFactory as ɵe, labelsProviderFactory as ɵf, itemsProviderFactory as ɵg, TuiInputOpacityModule as ɵh, TuiInputOpacityDirective as ɵi,
|
|
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, NAVIGATION_TITLE as ɵa, NAVIGATION_LABELS as ɵb, NAVIGATION_ITEMS as ɵc, NAVIGATION_PROVIDERS as ɵd, titleProviderFactory as ɵe, labelsProviderFactory as ɵf, itemsProviderFactory as ɵg, TuiInputOpacityModule as ɵh, TuiInputOpacityDirective as ɵi, TuiDocExampleGetTabsPipe as ɵj, TuiDocHeaderModule 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 };
|
|
1558
1596
|
//# sourceMappingURL=taiga-ui-addon-doc.js.map
|