@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,25 +1,54 @@
|
|
|
1
|
-
import { __decorate, __param, __assign, __spread, __read } 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, __generator, __decorate, __param, __assign, __spread, __read, __values } 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
|
+
var _a;
|
|
22
|
+
return __generator(this, function (_b) {
|
|
23
|
+
switch (_b.label) {
|
|
24
|
+
case 0:
|
|
25
|
+
if (!(content instanceof Promise)) return [3 /*break*/, 2];
|
|
26
|
+
return [4 /*yield*/, content];
|
|
27
|
+
case 1:
|
|
28
|
+
_a = (_b.sent()).default;
|
|
29
|
+
return [3 /*break*/, 3];
|
|
30
|
+
case 2:
|
|
31
|
+
_a = content;
|
|
32
|
+
_b.label = 3;
|
|
33
|
+
case 3: return [2 /*return*/, _a];
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
18
39
|
var TuiDocCodeComponent = /** @class */ (function () {
|
|
19
40
|
function TuiDocCodeComponent() {
|
|
41
|
+
this.rawLoader$$ = new BehaviorSubject('');
|
|
42
|
+
this.processor$ = this.rawLoader$$.pipe(switchMap(rawLoad));
|
|
20
43
|
this.filename = '';
|
|
21
|
-
this.code = '';
|
|
22
44
|
}
|
|
45
|
+
Object.defineProperty(TuiDocCodeComponent.prototype, "code", {
|
|
46
|
+
set: function (code) {
|
|
47
|
+
this.rawLoader$$.next(code);
|
|
48
|
+
},
|
|
49
|
+
enumerable: true,
|
|
50
|
+
configurable: true
|
|
51
|
+
});
|
|
23
52
|
Object.defineProperty(TuiDocCodeComponent.prototype, "hasFilename", {
|
|
24
53
|
get: function () {
|
|
25
54
|
return !!this.filename;
|
|
@@ -32,14 +61,14 @@ var TuiDocCodeComponent = /** @class */ (function () {
|
|
|
32
61
|
], TuiDocCodeComponent.prototype, "filename", void 0);
|
|
33
62
|
__decorate([
|
|
34
63
|
Input()
|
|
35
|
-
], TuiDocCodeComponent.prototype, "code",
|
|
64
|
+
], TuiDocCodeComponent.prototype, "code", null);
|
|
36
65
|
__decorate([
|
|
37
66
|
HostBinding('class._has-filename')
|
|
38
67
|
], TuiDocCodeComponent.prototype, "hasFilename", null);
|
|
39
68
|
TuiDocCodeComponent = __decorate([
|
|
40
69
|
Component({
|
|
41
70
|
selector: 'tui-doc-code',
|
|
42
|
-
template: "<p *ngIf=\"filename\" class=\"t-header\">{{filename}}</p>\n<pre
|
|
71
|
+
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",
|
|
43
72
|
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}}"]
|
|
44
73
|
})
|
|
45
74
|
], TuiDocCodeComponent);
|
|
@@ -85,7 +114,7 @@ var TuiDocCopyComponent = /** @class */ (function () {
|
|
|
85
114
|
TuiDocCopyComponent = __decorate([
|
|
86
115
|
Component({
|
|
87
116
|
selector: 'tui-doc-copy',
|
|
88
|
-
template: "<button\n *ngIf=\"texts$ | async as texts\"\n tuiButton\n type=\"button\"\n
|
|
117
|
+
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",
|
|
89
118
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
90
119
|
providers: [TuiDestroyService],
|
|
91
120
|
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)}"]
|
|
@@ -115,7 +144,9 @@ var TuiDocCopyModule = /** @class */ (function () {
|
|
|
115
144
|
* Works with a tuple
|
|
116
145
|
* [@string tuiMode tooltip content, @string word 'background', @string 'form value']
|
|
117
146
|
*/
|
|
118
|
-
var TUI_DOC_DEMO_TEXTS = new InjectionToken('tui-doc-demo i18n texts', {
|
|
147
|
+
var TUI_DOC_DEMO_TEXTS = new InjectionToken('tui-doc-demo i18n texts', {
|
|
148
|
+
factory: function () { return ['Read more more about modes: ', 'Background', 'Form value']; },
|
|
149
|
+
});
|
|
119
150
|
/**
|
|
120
151
|
* Works with a tuple
|
|
121
152
|
* [
|
|
@@ -143,15 +174,21 @@ var TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken('tui-doc-documentation i18n
|
|
|
143
174
|
* @string link to a sample copied message label
|
|
144
175
|
* ]
|
|
145
176
|
*/
|
|
146
|
-
var TUI_DOC_EXAMPLE_TEXTS = new InjectionToken('tui-doc-example i18n texts', {
|
|
177
|
+
var TUI_DOC_EXAMPLE_TEXTS = new InjectionToken('tui-doc-example i18n texts', {
|
|
178
|
+
factory: function () { return ['Preview', 'Link to a sample was successfully copied', 'Done']; },
|
|
179
|
+
});
|
|
147
180
|
var TUI_DOC_MENU_TEXT = new InjectionToken('menu i18n text', {
|
|
148
181
|
factory: function () { return 'Menu'; },
|
|
149
182
|
});
|
|
150
183
|
var TUI_DOC_SEARCH_TEXT = new InjectionToken('search i18n text', {
|
|
151
184
|
factory: function () { return 'Search'; },
|
|
152
185
|
});
|
|
153
|
-
var TUI_DOC_SEE_ALSO_TEXT = new InjectionToken('tui-doc-see-also i18n text', {
|
|
154
|
-
|
|
186
|
+
var TUI_DOC_SEE_ALSO_TEXT = new InjectionToken('tui-doc-see-also i18n text', {
|
|
187
|
+
factory: function () { return 'See also'; },
|
|
188
|
+
});
|
|
189
|
+
var TUI_DOC_SOURCE_CODE_TEXT = new InjectionToken('tui-doc-source-code i18n text', {
|
|
190
|
+
factory: function () { return 'Source code'; },
|
|
191
|
+
});
|
|
155
192
|
|
|
156
193
|
var MIN_COMPONENT_WIDTH = 104;
|
|
157
194
|
// @dynamic
|
|
@@ -272,7 +309,7 @@ var TuiDocDemoComponent = /** @class */ (function () {
|
|
|
272
309
|
TuiDocDemoComponent = TuiDocDemoComponent_1 = __decorate([
|
|
273
310
|
Component({
|
|
274
311
|
selector: 'tui-doc-demo',
|
|
275
|
-
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
|
|
312
|
+
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",
|
|
276
313
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
277
314
|
providers: [
|
|
278
315
|
TuiDestroyService,
|
|
@@ -281,7 +318,7 @@ var TuiDocDemoComponent = /** @class */ (function () {
|
|
|
281
318
|
useExisting: forwardRef(function () { return TuiDocDemoComponent_1; }),
|
|
282
319
|
},
|
|
283
320
|
],
|
|
284
|
-
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 (
|
|
321
|
+
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}}}"]
|
|
285
322
|
}),
|
|
286
323
|
__param(0, Inject(TUI_IS_MOBILE)),
|
|
287
324
|
__param(1, Inject(TuiDestroyService)),
|
|
@@ -434,7 +471,7 @@ function itemsProviderFactory(pages) {
|
|
|
434
471
|
var SCROLL_INTO_VIEW_DELAY = 200;
|
|
435
472
|
// @dynamic
|
|
436
473
|
var TuiDocNavigationComponent = /** @class */ (function () {
|
|
437
|
-
function TuiDocNavigationComponent(titleService, title$, documentRef, mode, sidebar, labels, items, searchText, router, activatedRoute) {
|
|
474
|
+
function TuiDocNavigationComponent(changeDetectorRef, titleService, title$, documentRef, mode, sidebar, labels, items, searchText, router, activatedRoute) {
|
|
438
475
|
var _this = this;
|
|
439
476
|
this.documentRef = documentRef;
|
|
440
477
|
this.mode = mode;
|
|
@@ -454,6 +491,7 @@ var TuiDocNavigationComponent = /** @class */ (function () {
|
|
|
454
491
|
// Angular can't navigate no anchor links
|
|
455
492
|
// https://stackoverflow.com/questions/36101756/angular2-routing-with-hashtag-to-page-anchor
|
|
456
493
|
title$.subscribe(function (title) {
|
|
494
|
+
changeDetectorRef.markForCheck();
|
|
457
495
|
titleService.setTitle(title);
|
|
458
496
|
_this.openActivePageGroup();
|
|
459
497
|
_this.handleAnchorLink(_this.activatedRoute.snapshot.fragment);
|
|
@@ -543,7 +581,7 @@ var TuiDocNavigationComponent = /** @class */ (function () {
|
|
|
543
581
|
page.subPages.forEach(function (subPage) {
|
|
544
582
|
if (_this.isActiveRoute(subPage.route)) {
|
|
545
583
|
_this.openPagesArr[pagesIndex] = true;
|
|
546
|
-
_this.openPagesGroupsArr[pagesIndex + pageIndex] = true;
|
|
584
|
+
_this.openPagesGroupsArr[pagesIndex * 100 + pageIndex] = true;
|
|
547
585
|
_this.active = subPage.route;
|
|
548
586
|
}
|
|
549
587
|
});
|
|
@@ -564,6 +602,7 @@ var TuiDocNavigationComponent = /** @class */ (function () {
|
|
|
564
602
|
});
|
|
565
603
|
};
|
|
566
604
|
TuiDocNavigationComponent.ctorParameters = function () { return [
|
|
605
|
+
{ type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
|
|
567
606
|
{ type: Title, decorators: [{ type: Inject, args: [Title,] }] },
|
|
568
607
|
{ type: Observable, decorators: [{ type: Inject, args: [NAVIGATION_TITLE,] }] },
|
|
569
608
|
{ type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
@@ -587,22 +626,23 @@ var TuiDocNavigationComponent = /** @class */ (function () {
|
|
|
587
626
|
TuiDocNavigationComponent = __decorate([
|
|
588
627
|
Component({
|
|
589
628
|
selector: 'tui-doc-navigation',
|
|
590
|
-
template: "<tui-hosted-dropdown\n *tuiLet=\"filteredItems as filtered\"\n
|
|
629
|
+
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",
|
|
591
630
|
providers: NAVIGATION_PROVIDERS,
|
|
592
631
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
593
|
-
styles: [":host{display:flex;flex-direction:column;text-align:center;background:var(--tui-base-01)
|
|
632
|
+
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)}"]
|
|
594
633
|
}),
|
|
595
|
-
__param(0, Inject(
|
|
596
|
-
__param(1, Inject(
|
|
597
|
-
__param(2, Inject(
|
|
598
|
-
__param(3, Inject(
|
|
599
|
-
__param(4,
|
|
600
|
-
__param(
|
|
601
|
-
__param(5, Inject(
|
|
602
|
-
__param(6, Inject(
|
|
603
|
-
__param(7, Inject(
|
|
604
|
-
__param(8, Inject(
|
|
605
|
-
__param(9, Inject(
|
|
634
|
+
__param(0, Inject(ChangeDetectorRef)),
|
|
635
|
+
__param(1, Inject(Title)),
|
|
636
|
+
__param(2, Inject(NAVIGATION_TITLE)),
|
|
637
|
+
__param(3, Inject(DOCUMENT)),
|
|
638
|
+
__param(4, Inject(TuiModeDirective)),
|
|
639
|
+
__param(5, Optional()),
|
|
640
|
+
__param(5, Inject(TuiSidebarDirective)),
|
|
641
|
+
__param(6, Inject(NAVIGATION_LABELS)),
|
|
642
|
+
__param(7, Inject(NAVIGATION_ITEMS)),
|
|
643
|
+
__param(8, Inject(TUI_DOC_SEARCH_TEXT)),
|
|
644
|
+
__param(9, Inject(Router)),
|
|
645
|
+
__param(10, Inject(ActivatedRoute))
|
|
606
646
|
], TuiDocNavigationComponent);
|
|
607
647
|
return TuiDocNavigationComponent;
|
|
608
648
|
}());
|
|
@@ -790,6 +830,7 @@ var TuiDocDocumentationPropertyConnectorDirective = /** @class */ (function () {
|
|
|
790
830
|
this.documentationPropertyValues = null;
|
|
791
831
|
this.documentationPropertyValueChange = new EventEmitter();
|
|
792
832
|
this.changed$ = new Subject();
|
|
833
|
+
this.emits$ = new BehaviorSubject(1);
|
|
793
834
|
}
|
|
794
835
|
TuiDocDocumentationPropertyConnectorDirective.prototype.ngOnInit = function () {
|
|
795
836
|
this.parseParams(this.activatedRoute.snapshot.queryParams);
|
|
@@ -858,6 +899,11 @@ var TuiDocDocumentationPropertyConnectorDirective = /** @class */ (function () {
|
|
|
858
899
|
tree.queryParams = __assign(__assign({}, tree.queryParams), (_a = {}, _a[propName] = computedValue, _a));
|
|
859
900
|
this.locationRef.go(String(tree));
|
|
860
901
|
};
|
|
902
|
+
TuiDocDocumentationPropertyConnectorDirective.prototype.emitEvent = function (event) {
|
|
903
|
+
// For more convenient debugging
|
|
904
|
+
console.log(this.attrName, event);
|
|
905
|
+
this.emits$.next(this.emits$.value + 1);
|
|
906
|
+
};
|
|
861
907
|
TuiDocDocumentationPropertyConnectorDirective.ctorParameters = function () { return [
|
|
862
908
|
{ type: TemplateRef, decorators: [{ type: Inject, args: [TemplateRef,] }] },
|
|
863
909
|
{ type: Location$1, decorators: [{ type: Inject, args: [Location$1,] }] },
|
|
@@ -888,6 +934,7 @@ var TuiDocDocumentationPropertyConnectorDirective = /** @class */ (function () {
|
|
|
888
934
|
TuiDocDocumentationPropertyConnectorDirective = __decorate([
|
|
889
935
|
Directive({
|
|
890
936
|
selector: 'ng-template[documentationPropertyName]',
|
|
937
|
+
exportAs: 'documentationProperty',
|
|
891
938
|
}),
|
|
892
939
|
__param(0, Inject(TemplateRef)),
|
|
893
940
|
__param(1, Inject(Location$1)),
|
|
@@ -1013,9 +1060,14 @@ var TuiDocDocumentationComponent = /** @class */ (function () {
|
|
|
1013
1060
|
TuiDocDocumentationComponent = __decorate([
|
|
1014
1061
|
Component({
|
|
1015
1062
|
selector: 'tui-doc-documentation',
|
|
1016
|
-
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
|
|
1063
|
+
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",
|
|
1017
1064
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1018
|
-
|
|
1065
|
+
animations: [
|
|
1066
|
+
trigger('emitEvent', [
|
|
1067
|
+
transition(':increment', [style({ opacity: 1 }), animate('500ms ease-in')]),
|
|
1068
|
+
]),
|
|
1069
|
+
],
|
|
1070
|
+
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}"]
|
|
1019
1071
|
}),
|
|
1020
1072
|
__param(0, Inject(ChangeDetectorRef)),
|
|
1021
1073
|
__param(1, Inject(TUI_DOC_DOCUMENTATION_TEXTS))
|
|
@@ -1091,6 +1143,7 @@ var TuiDocDocumentationModule = /** @class */ (function () {
|
|
|
1091
1143
|
TuiDropdownControllerModule,
|
|
1092
1144
|
TuiDataListModule,
|
|
1093
1145
|
TuiDataListWrapperModule,
|
|
1146
|
+
TuiNotificationModule,
|
|
1094
1147
|
],
|
|
1095
1148
|
declarations: [
|
|
1096
1149
|
TuiDocDocumentationComponent,
|
|
@@ -1107,9 +1160,49 @@ var TuiDocDocumentationModule = /** @class */ (function () {
|
|
|
1107
1160
|
|
|
1108
1161
|
var TUI_DOC_CODE_EDITOR = new InjectionToken('Contains service for opening online IDE e.g. Stackblitz');
|
|
1109
1162
|
|
|
1110
|
-
var TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new InjectionToken('Processes content in example', {
|
|
1111
|
-
|
|
1112
|
-
|
|
1163
|
+
var TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new InjectionToken('Processes content in example', { factory: function () { return identity; } });
|
|
1164
|
+
|
|
1165
|
+
function rawLoadRecord(example) {
|
|
1166
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1167
|
+
var processedContent, _a, _b, _c, key, content, _d, _e, e_1_1;
|
|
1168
|
+
var e_1, _f;
|
|
1169
|
+
return __generator(this, function (_g) {
|
|
1170
|
+
switch (_g.label) {
|
|
1171
|
+
case 0:
|
|
1172
|
+
processedContent = {};
|
|
1173
|
+
_g.label = 1;
|
|
1174
|
+
case 1:
|
|
1175
|
+
_g.trys.push([1, 6, 7, 8]);
|
|
1176
|
+
_a = __values(Object.entries(example)), _b = _a.next();
|
|
1177
|
+
_g.label = 2;
|
|
1178
|
+
case 2:
|
|
1179
|
+
if (!!_b.done) return [3 /*break*/, 5];
|
|
1180
|
+
_c = __read(_b.value, 2), key = _c[0], content = _c[1];
|
|
1181
|
+
_d = processedContent;
|
|
1182
|
+
_e = key;
|
|
1183
|
+
return [4 /*yield*/, rawLoad(content)];
|
|
1184
|
+
case 3:
|
|
1185
|
+
_d[_e] = _g.sent();
|
|
1186
|
+
_g.label = 4;
|
|
1187
|
+
case 4:
|
|
1188
|
+
_b = _a.next();
|
|
1189
|
+
return [3 /*break*/, 2];
|
|
1190
|
+
case 5: return [3 /*break*/, 8];
|
|
1191
|
+
case 6:
|
|
1192
|
+
e_1_1 = _g.sent();
|
|
1193
|
+
e_1 = { error: e_1_1 };
|
|
1194
|
+
return [3 /*break*/, 8];
|
|
1195
|
+
case 7:
|
|
1196
|
+
try {
|
|
1197
|
+
if (_b && !_b.done && (_f = _a.return)) _f.call(_a);
|
|
1198
|
+
}
|
|
1199
|
+
finally { if (e_1) throw e_1.error; }
|
|
1200
|
+
return [7 /*endfinally*/];
|
|
1201
|
+
case 8: return [2 /*return*/, processedContent];
|
|
1202
|
+
}
|
|
1203
|
+
});
|
|
1204
|
+
});
|
|
1205
|
+
}
|
|
1113
1206
|
|
|
1114
1207
|
// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
|
|
1115
1208
|
// @dynamic
|
|
@@ -1123,49 +1216,21 @@ var TuiDocExampleComponent = /** @class */ (function () {
|
|
|
1123
1216
|
this.texts = texts;
|
|
1124
1217
|
this.codeEditor = codeEditor;
|
|
1125
1218
|
this.processContent = processContent;
|
|
1219
|
+
this.rawLoader$$ = new BehaviorSubject({});
|
|
1126
1220
|
this.heading = '';
|
|
1127
1221
|
this.description = '';
|
|
1128
1222
|
this.componentName = this.location.pathname.slice(1);
|
|
1129
1223
|
this.activeItemIndex = 0;
|
|
1130
|
-
this.processedContent = {};
|
|
1131
1224
|
this.defaultTab = this.texts[0];
|
|
1132
1225
|
this.copy$ = this.copyTexts$.pipe(map(function (_a) {
|
|
1133
1226
|
var _b = __read(_a, 1), copy = _b[0];
|
|
1134
1227
|
return copy;
|
|
1135
1228
|
}));
|
|
1229
|
+
this.processor$ = this.rawLoader$$.pipe(switchMap(rawLoadRecord), map(this.processContent));
|
|
1136
1230
|
}
|
|
1137
1231
|
Object.defineProperty(TuiDocExampleComponent.prototype, "content", {
|
|
1138
1232
|
set: function (content) {
|
|
1139
|
-
this.
|
|
1140
|
-
},
|
|
1141
|
-
enumerable: true,
|
|
1142
|
-
configurable: true
|
|
1143
|
-
});
|
|
1144
|
-
Object.defineProperty(TuiDocExampleComponent.prototype, "activeItem", {
|
|
1145
|
-
get: function () {
|
|
1146
|
-
return this.tabs[this.activeItemIndex];
|
|
1147
|
-
},
|
|
1148
|
-
enumerable: true,
|
|
1149
|
-
configurable: true
|
|
1150
|
-
});
|
|
1151
|
-
Object.defineProperty(TuiDocExampleComponent.prototype, "tabs", {
|
|
1152
|
-
get: function () {
|
|
1153
|
-
return this.getTabs(this.processedContent);
|
|
1154
|
-
},
|
|
1155
|
-
enumerable: true,
|
|
1156
|
-
configurable: true
|
|
1157
|
-
});
|
|
1158
|
-
Object.defineProperty(TuiDocExampleComponent.prototype, "code", {
|
|
1159
|
-
get: function () {
|
|
1160
|
-
var code = this.processedContent[this.activeItem];
|
|
1161
|
-
return code ? code.trim() : '';
|
|
1162
|
-
},
|
|
1163
|
-
enumerable: true,
|
|
1164
|
-
configurable: true
|
|
1165
|
-
});
|
|
1166
|
-
Object.defineProperty(TuiDocExampleComponent.prototype, "isDefaultItem", {
|
|
1167
|
-
get: function () {
|
|
1168
|
-
return this.activeItem === this.defaultTab;
|
|
1233
|
+
this.rawLoader$$.next(content);
|
|
1169
1234
|
},
|
|
1170
1235
|
enumerable: true,
|
|
1171
1236
|
configurable: true
|
|
@@ -1184,9 +1249,6 @@ var TuiDocExampleComponent = /** @class */ (function () {
|
|
|
1184
1249
|
})
|
|
1185
1250
|
.subscribe();
|
|
1186
1251
|
};
|
|
1187
|
-
TuiDocExampleComponent.prototype.getTabs = function (content) {
|
|
1188
|
-
return __spread([this.defaultTab], Object.keys(content));
|
|
1189
|
-
};
|
|
1190
1252
|
TuiDocExampleComponent.ctorParameters = function () { return [
|
|
1191
1253
|
{ type: String, decorators: [{ type: Attribute, args: ['id',] }] },
|
|
1192
1254
|
{ type: Clipboard, decorators: [{ type: Inject, args: [Clipboard,] }] },
|
|
@@ -1209,15 +1271,12 @@ var TuiDocExampleComponent = /** @class */ (function () {
|
|
|
1209
1271
|
__decorate([
|
|
1210
1272
|
Input()
|
|
1211
1273
|
], TuiDocExampleComponent.prototype, "componentName", void 0);
|
|
1212
|
-
__decorate([
|
|
1213
|
-
tuiPure
|
|
1214
|
-
], TuiDocExampleComponent.prototype, "getTabs", null);
|
|
1215
1274
|
TuiDocExampleComponent = __decorate([
|
|
1216
1275
|
Component({
|
|
1217
1276
|
selector: 'tui-doc-example',
|
|
1218
|
-
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
|
|
1277
|
+
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",
|
|
1219
1278
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1220
|
-
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);
|
|
1279
|
+
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}"]
|
|
1221
1280
|
}),
|
|
1222
1281
|
__param(0, Attribute('id')),
|
|
1223
1282
|
__param(1, Inject(Clipboard)),
|
|
@@ -1232,6 +1291,18 @@ var TuiDocExampleComponent = /** @class */ (function () {
|
|
|
1232
1291
|
return TuiDocExampleComponent;
|
|
1233
1292
|
}());
|
|
1234
1293
|
|
|
1294
|
+
var TuiDocExampleGetTabsPipe = /** @class */ (function () {
|
|
1295
|
+
function TuiDocExampleGetTabsPipe() {
|
|
1296
|
+
}
|
|
1297
|
+
TuiDocExampleGetTabsPipe.prototype.transform = function (content, defaultTab) {
|
|
1298
|
+
return __spread([defaultTab], Object.keys(content));
|
|
1299
|
+
};
|
|
1300
|
+
TuiDocExampleGetTabsPipe = __decorate([
|
|
1301
|
+
Pipe({ name: 'tuiDocExampleGetTabs' })
|
|
1302
|
+
], TuiDocExampleGetTabsPipe);
|
|
1303
|
+
return TuiDocExampleGetTabsPipe;
|
|
1304
|
+
}());
|
|
1305
|
+
|
|
1235
1306
|
var TuiDocExampleModule = /** @class */ (function () {
|
|
1236
1307
|
function TuiDocExampleModule() {
|
|
1237
1308
|
}
|
|
@@ -1246,8 +1317,8 @@ var TuiDocExampleModule = /** @class */ (function () {
|
|
|
1246
1317
|
TuiDocCodeModule,
|
|
1247
1318
|
PolymorpheusModule,
|
|
1248
1319
|
],
|
|
1249
|
-
declarations: [TuiDocExampleComponent],
|
|
1250
|
-
exports: [TuiDocExampleComponent],
|
|
1320
|
+
declarations: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe],
|
|
1321
|
+
exports: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe],
|
|
1251
1322
|
})
|
|
1252
1323
|
], TuiDocExampleModule);
|
|
1253
1324
|
return TuiDocExampleModule;
|
|
@@ -1291,8 +1362,9 @@ var TuiDocMainComponent = /** @class */ (function () {
|
|
|
1291
1362
|
provide: TuiModeDirective,
|
|
1292
1363
|
useExisting: forwardRef(function () { return TuiDocMainComponent_1; }),
|
|
1293
1364
|
},
|
|
1365
|
+
TuiSwipeService,
|
|
1294
1366
|
],
|
|
1295
|
-
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}"]
|
|
1367
|
+
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}"]
|
|
1296
1368
|
}),
|
|
1297
1369
|
__param(0, Inject(LOCAL_STORAGE)),
|
|
1298
1370
|
__param(1, Inject(WINDOW))
|
|
@@ -1305,12 +1377,13 @@ var TUI_DOC_LOGO = new InjectionToken('Main logo', {
|
|
|
1305
1377
|
});
|
|
1306
1378
|
|
|
1307
1379
|
var TuiDocHeaderComponent = /** @class */ (function () {
|
|
1308
|
-
function TuiDocHeaderComponent(logo, menu, router) {
|
|
1380
|
+
function TuiDocHeaderComponent(logo, menu, router, swipes$) {
|
|
1309
1381
|
this.logo = logo;
|
|
1310
1382
|
this.menu = menu;
|
|
1311
1383
|
this.router = router;
|
|
1384
|
+
this.swipes$ = swipes$;
|
|
1312
1385
|
this.stream$ = new Subject();
|
|
1313
|
-
this.open$ = merge(this.router.events.pipe(mapTo(false)), this.stream
|
|
1386
|
+
this.open$ = merge(this.router.events.pipe(mapTo(false)), this.stream$, this.swipes$.pipe(filter(function (swipe) { return swipe.direction === 'left' || swipe.direction === 'right'; }), map(function (swipe) { return swipe.direction === 'right'; }))).pipe(startWith(false), distinctUntilChanged());
|
|
1314
1387
|
}
|
|
1315
1388
|
TuiDocHeaderComponent.prototype.onClick = function () {
|
|
1316
1389
|
this.stream$.next(true);
|
|
@@ -1323,18 +1396,20 @@ var TuiDocHeaderComponent = /** @class */ (function () {
|
|
|
1323
1396
|
TuiDocHeaderComponent.ctorParameters = function () { return [
|
|
1324
1397
|
{ type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_LOGO,] }] },
|
|
1325
1398
|
{ type: String, decorators: [{ type: Inject, args: [TUI_DOC_MENU_TEXT,] }] },
|
|
1326
|
-
{ type: Router, decorators: [{ type: Inject, args: [Router,] }] }
|
|
1399
|
+
{ type: Router, decorators: [{ type: Inject, args: [Router,] }] },
|
|
1400
|
+
{ type: TuiSwipeService, decorators: [{ type: Inject, args: [TuiSwipeService,] }] }
|
|
1327
1401
|
]; };
|
|
1328
1402
|
TuiDocHeaderComponent = __decorate([
|
|
1329
1403
|
Component({
|
|
1330
1404
|
selector: 'header[tuiDocHeader]',
|
|
1331
|
-
template: "<button\n tuiIconButton\n
|
|
1405
|
+
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",
|
|
1332
1406
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1333
|
-
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)
|
|
1407
|
+
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%}"]
|
|
1334
1408
|
}),
|
|
1335
1409
|
__param(0, Inject(TUI_DOC_LOGO)),
|
|
1336
1410
|
__param(1, Inject(TUI_DOC_MENU_TEXT)),
|
|
1337
|
-
__param(2, Inject(Router))
|
|
1411
|
+
__param(2, Inject(Router)),
|
|
1412
|
+
__param(3, Inject(TuiSwipeService))
|
|
1338
1413
|
], TuiDocHeaderComponent);
|
|
1339
1414
|
return TuiDocHeaderComponent;
|
|
1340
1415
|
}());
|
|
@@ -1477,10 +1552,10 @@ var TuiDocPageComponent = /** @class */ (function () {
|
|
|
1477
1552
|
TuiDocPageComponent = __decorate([
|
|
1478
1553
|
Component({
|
|
1479
1554
|
selector: 'tui-doc-page',
|
|
1480
|
-
template: "<header class=\"t-header\">\n <h1 class=\"t-title\">\n {{header}}\n <tui-tag\n *ngIf=\"deprecated !== null\"\n
|
|
1555
|
+
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",
|
|
1481
1556
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1482
1557
|
providers: PAGE_PROVIDERS,
|
|
1483
|
-
styles: [":host{display:flex;flex-direction:column;min-height:0;flex-basis:0;flex-grow:1}.t-header{font:var(--tui-font-heading-3);
|
|
1558
|
+
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}"]
|
|
1484
1559
|
}),
|
|
1485
1560
|
__param(0, Attribute('deprecated')),
|
|
1486
1561
|
__param(1, Inject(TUI_DOC_DEFAULT_TABS)),
|
|
@@ -1518,7 +1593,7 @@ var TuiDocSeeAlsoComponent = /** @class */ (function () {
|
|
|
1518
1593
|
TuiDocSeeAlsoComponent = __decorate([
|
|
1519
1594
|
Component({
|
|
1520
1595
|
selector: 'tui-doc-see-also',
|
|
1521
|
-
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\"
|
|
1596
|
+
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",
|
|
1522
1597
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1523
1598
|
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}"]
|
|
1524
1599
|
}),
|
|
@@ -1591,7 +1666,7 @@ var TuiDocSourceCodeComponent = /** @class */ (function () {
|
|
|
1591
1666
|
TuiDocSourceCodeComponent = __decorate([
|
|
1592
1667
|
Component({
|
|
1593
1668
|
selector: 'tui-doc-source-code',
|
|
1594
|
-
template: "<div\n
|
|
1669
|
+
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",
|
|
1595
1670
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1596
1671
|
}),
|
|
1597
1672
|
__param(0, Inject(TUI_DOC_SOURCE_CODE)),
|
|
@@ -1717,5 +1792,5 @@ var TuiAddonDocModule = /** @class */ (function () {
|
|
|
1717
1792
|
* Generated bundle index. Do not edit.
|
|
1718
1793
|
*/
|
|
1719
1794
|
|
|
1720
|
-
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,
|
|
1795
|
+
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 };
|
|
1721
1796
|
//# sourceMappingURL=taiga-ui-addon-doc.js.map
|