@taiga-ui/addon-doc 2.55.0 → 2.58.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/bundles/taiga-ui-addon-doc.umd.js +288 -230
- package/bundles/taiga-ui-addon-doc.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-doc.umd.min.js +1 -1
- package/bundles/taiga-ui-addon-doc.umd.min.js.map +1 -1
- package/components/language-switcher/language-switcher.component.d.ts +13 -0
- package/components/language-switcher/language-switcher.module.d.ts +2 -0
- package/esm2015/components/code/code.component.js +5 -5
- package/esm2015/components/code/parse-code-block.js +3 -3
- package/esm2015/components/copy/copy.component.js +2 -2
- package/esm2015/components/demo/demo.component.js +12 -12
- package/esm2015/components/documentation/documentation-property-connector.directive.js +11 -11
- package/esm2015/components/documentation/documentation.component.js +30 -30
- package/esm2015/components/example/example-capitalize.pipe.js +3 -3
- package/esm2015/components/example/example-get-tabs.pipe.js +2 -2
- package/esm2015/components/example/example.component.js +9 -9
- package/esm2015/components/language-switcher/language-switcher.component.js +48 -0
- package/esm2015/components/language-switcher/language-switcher.module.js +18 -0
- package/esm2015/components/main/main.component.js +9 -9
- package/esm2015/components/navigation/navigation.component.js +16 -16
- package/esm2015/components/navigation/navigation.providers.js +4 -4
- package/esm2015/components/page/page-tab.directive.js +2 -2
- package/esm2015/components/page/page.component.js +10 -10
- package/esm2015/components/page/page.providers.js +4 -4
- package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +3 -3
- package/esm2015/interfaces/page.js +4 -4
- package/esm2015/internal/header/header.component.js +3 -3
- package/esm2015/internal/input-opacity/input-opacity.directive.js +3 -3
- package/esm2015/internal/see-also/see-also.component.js +6 -6
- package/esm2015/internal/source-code/source-code.component.js +6 -6
- package/esm2015/languages/russian.js +12 -12
- package/esm2015/public-api.js +3 -1
- package/esm2015/tokens/code-actions.js +3 -3
- package/esm2015/tokens/code-editor.js +2 -2
- package/esm2015/tokens/default-tabs.js +2 -2
- package/esm2015/tokens/example-content-processor.js +2 -2
- package/esm2015/tokens/i18n.js +19 -19
- package/esm2015/tokens/logo.js +3 -3
- package/esm2015/tokens/page-loaded.js +2 -2
- package/esm2015/tokens/pages.js +2 -2
- package/esm2015/tokens/scroll-behavior.js +2 -2
- package/esm2015/tokens/see-also.js +2 -2
- package/esm2015/tokens/source-code.js +3 -3
- package/esm2015/tokens/title.js +3 -3
- package/esm2015/utils/coerce-value.js +6 -6
- package/esm2015/utils/color-conversion.js +5 -5
- package/esm2015/utils/generate-routes.js +3 -3
- package/esm2015/utils/inspect.js +13 -13
- package/esm2015/utils/transliterate-keyboard-layout.js +34 -34
- package/esm5/components/code/code.component.js +5 -5
- package/esm5/components/code/parse-code-block.js +3 -3
- package/esm5/components/copy/copy.component.js +2 -2
- package/esm5/components/demo/demo.component.js +12 -12
- package/esm5/components/documentation/documentation-property-connector.directive.js +11 -11
- package/esm5/components/documentation/documentation.component.js +30 -30
- package/esm5/components/example/example-capitalize.pipe.js +3 -3
- package/esm5/components/example/example-get-tabs.pipe.js +2 -2
- package/esm5/components/example/example.component.js +9 -9
- package/esm5/components/language-switcher/language-switcher.component.js +49 -0
- package/esm5/components/language-switcher/language-switcher.module.js +21 -0
- package/esm5/components/main/main.component.js +9 -9
- package/esm5/components/navigation/navigation.component.js +16 -16
- package/esm5/components/navigation/navigation.providers.js +4 -4
- package/esm5/components/page/page-tab.directive.js +2 -2
- package/esm5/components/page/page.component.js +10 -10
- package/esm5/components/page/page.providers.js +4 -4
- package/esm5/directives/scroll-into-view/scroll-into-view.directive.js +3 -3
- package/esm5/interfaces/page.js +4 -4
- package/esm5/internal/header/header.component.js +3 -3
- package/esm5/internal/input-opacity/input-opacity.directive.js +3 -3
- package/esm5/internal/see-also/see-also.component.js +6 -6
- package/esm5/internal/source-code/source-code.component.js +6 -6
- package/esm5/languages/russian.js +12 -12
- package/esm5/public-api.js +3 -1
- package/esm5/tokens/code-actions.js +3 -3
- package/esm5/tokens/code-editor.js +2 -2
- package/esm5/tokens/default-tabs.js +2 -2
- package/esm5/tokens/example-content-processor.js +2 -2
- package/esm5/tokens/i18n.js +19 -19
- package/esm5/tokens/logo.js +3 -3
- package/esm5/tokens/page-loaded.js +2 -2
- package/esm5/tokens/pages.js +2 -2
- package/esm5/tokens/scroll-behavior.js +2 -2
- package/esm5/tokens/see-also.js +2 -2
- package/esm5/tokens/source-code.js +3 -3
- package/esm5/tokens/title.js +3 -3
- package/esm5/utils/coerce-value.js +6 -6
- package/esm5/utils/color-conversion.js +5 -5
- package/esm5/utils/generate-routes.js +3 -3
- package/esm5/utils/inspect.js +13 -13
- package/esm5/utils/transliterate-keyboard-layout.js +34 -34
- package/fesm2015/taiga-ui-addon-doc.js +281 -228
- package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
- package/fesm5/taiga-ui-addon-doc.js +285 -228
- package/fesm5/taiga-ui-addon-doc.js.map +1 -1
- package/package.json +5 -5
- package/public-api.d.ts +2 -0
- package/taiga-ui-addon-doc.metadata.json +1 -1
|
@@ -7,13 +7,14 @@ import { CommonModule, isPlatformBrowser, Location as Location$1, DOCUMENT } fro
|
|
|
7
7
|
import { HighlightModule } from 'ngx-highlightjs';
|
|
8
8
|
import { tuiPure, TuiDestroyService, px, TUI_IS_MOBILE, TuiDragModule, EMPTY_QUERY, itemsQueryListObservable, watch, TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_CYPRESS, TuiSwipeService, getElementObscurers, isPresent, uniqBy, TuiActiveZoneModule, TuiLetModule, TuiAutoFocusModule, tuiDefaultProp } from '@taiga-ui/cdk';
|
|
9
9
|
import { TUI_COPY_TEXTS, TuiSelectModule, TuiRadioBlockModule, TuiCheckboxLabeledModule, TuiDataListWrapperModule, TuiBadgeModule, TuiToggleModule, TuiInputCountModule, TuiTabsModule, TuiAccordionModule, TuiTagModule } from '@taiga-ui/kit';
|
|
10
|
-
import { TuiButtonModule, TuiModeDirective, TuiLinkModule, TuiExpandModule, TuiGroupModule, TuiTooltipModule, TuiModeModule, TuiSvgModule, TuiDataListModule, TuiTextfieldControllerModule, TuiHintControllerModule, TuiPrimitiveTextfieldModule, TuiDropdownControllerModule, TuiNotificationModule, TuiNotificationsService, capitalizeFirstLetter, TuiHostedDropdownModule, TuiScrollbarModule, TuiThemeNightModule, TuiRootModule, TuiDialogModule, TuiAlertModule } from '@taiga-ui/core';
|
|
10
|
+
import { TuiButtonModule, TuiModeDirective, TuiLinkModule, TuiExpandModule, TuiGroupModule, TuiTooltipModule, TuiModeModule, TuiSvgModule, TuiDataListModule, TuiTextfieldControllerModule, TuiHintControllerModule, TuiPrimitiveTextfieldModule, TuiDropdownControllerModule, TuiNotificationModule, TuiNotificationsService, capitalizeFirstLetter, tuiCapitalizeFirstLetter, TUI_ICONS_PATH, TuiHostedDropdownModule, TuiScrollbarModule, TuiThemeNightModule, TuiRootModule, TuiDialogModule, TuiAlertModule } from '@taiga-ui/core';
|
|
11
11
|
import { FormControl, FormGroup, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
12
12
|
import { UrlSerializer, RouterModule, ActivatedRoute, Router, NavigationEnd } from '@angular/router';
|
|
13
13
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
14
14
|
import { Clipboard, ClipboardModule } from '@angular/cdk/clipboard';
|
|
15
15
|
import { LOCATION, LOCAL_STORAGE, WINDOW } from '@ng-web-apis/common';
|
|
16
16
|
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
17
|
+
import { TuiCountryIsoCode, TuiLanguageSwitcher } from '@taiga-ui/i18n';
|
|
17
18
|
import { TuiSidebarDirective, TuiSidebarModule } from '@taiga-ui/addon-mobile';
|
|
18
19
|
import { Title } from '@angular/platform-browser';
|
|
19
20
|
|
|
@@ -47,12 +48,12 @@ var tuiRawLoad = rawLoad;
|
|
|
47
48
|
*/
|
|
48
49
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
49
50
|
function tryParseMarkdownCodeBlock(text) {
|
|
50
|
-
if (text === void 0) { text =
|
|
51
|
+
if (text === void 0) { text = ""; }
|
|
51
52
|
var tokens = new MarkdownIt().parse(text, {});
|
|
52
53
|
var result = tokens
|
|
53
54
|
.filter(function (_a) {
|
|
54
55
|
var tag = _a.tag, type = _a.type;
|
|
55
|
-
return tag ===
|
|
56
|
+
return tag === "code" && type === "fence";
|
|
56
57
|
})
|
|
57
58
|
.map(function (_a) {
|
|
58
59
|
var content = _a.content;
|
|
@@ -64,8 +65,8 @@ var tuiTryParseMarkdownCodeBlock = tryParseMarkdownCodeBlock;
|
|
|
64
65
|
|
|
65
66
|
var TuiDocCodeComponent = /** @class */ (function () {
|
|
66
67
|
function TuiDocCodeComponent() {
|
|
67
|
-
this.rawLoader$$ = new BehaviorSubject(
|
|
68
|
-
this.filename =
|
|
68
|
+
this.rawLoader$$ = new BehaviorSubject("");
|
|
69
|
+
this.filename = "";
|
|
69
70
|
this.processor$ = this.rawLoader$$.pipe(switchMap(rawLoad), map(tryParseMarkdownCodeBlock));
|
|
70
71
|
}
|
|
71
72
|
Object.defineProperty(TuiDocCodeComponent.prototype, "code", {
|
|
@@ -89,11 +90,11 @@ var TuiDocCodeComponent = /** @class */ (function () {
|
|
|
89
90
|
Input()
|
|
90
91
|
], TuiDocCodeComponent.prototype, "code", null);
|
|
91
92
|
__decorate([
|
|
92
|
-
HostBinding(
|
|
93
|
+
HostBinding("class._has-filename")
|
|
93
94
|
], TuiDocCodeComponent.prototype, "hasFilename", null);
|
|
94
95
|
TuiDocCodeComponent = __decorate([
|
|
95
96
|
Component({
|
|
96
|
-
selector:
|
|
97
|
+
selector: "tui-doc-code",
|
|
97
98
|
template: "<p\n *ngIf=\"filename\"\n class=\"t-header\"\n>\n {{ filename }}\n</p>\n<pre\n *ngFor=\"let content of processor$ | async\"\n class=\"t-code\"\n><code [lineNumbers]=\"true\" [highlight]=\"content\"></code></pre>\n",
|
|
98
99
|
styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:700}.t-code{margin:0}.t-code+.t-code{margin-top:1rem}.hljs:not(:empty){font:var(--tui-font-text-m);padding:1.5rem 2rem;font-family:monospace;background:var(--tui-clear-disabled);word-wrap:break-word;white-space:pre-wrap}@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution:0.001dpcm){.hljs:not(:empty)::-webkit-scrollbar,.hljs:not(:empty)::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:2.667rem solid transparent}.hljs:not(:empty)::-webkit-scrollbar{background-color:transparent}.hljs:not(:empty)::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}.hljs:not(:empty)::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}.hljs:not(:empty)::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}:host._has-filename .hljs:not(:empty){border-radius:.75rem}:host-context(tui-root._mobile) .hljs:not(:empty){padding:1rem}"]
|
|
99
100
|
})
|
|
@@ -139,7 +140,7 @@ var TuiDocCopyComponent = /** @class */ (function () {
|
|
|
139
140
|
], TuiDocCopyComponent.prototype, "copied$", null);
|
|
140
141
|
TuiDocCopyComponent = __decorate([
|
|
141
142
|
Component({
|
|
142
|
-
selector:
|
|
143
|
+
selector: "tui-doc-copy",
|
|
143
144
|
template: "<button\n *ngIf=\"texts$ | async as texts\"\n tuiButton\n type=\"button\"\n appearance=\"\"\n size=\"s\"\n class=\"t-copy\"\n [title]=\"texts[0]\"\n (click)=\"onClick()\"\n>\n <span\n class=\"t-content\"\n [class.t-content_moved]=\"copied$ | async\"\n >\n <span\n class=\"t-initial\"\n [attr.data-text]=\"texts[0]\"\n >\n <ng-content></ng-content>\n </span>\n {{ texts[1] }}\n </span>\n</button>\n",
|
|
144
145
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
145
146
|
providers: [TuiDestroyService],
|
|
@@ -170,8 +171,8 @@ var TuiDocCopyModule = /** @class */ (function () {
|
|
|
170
171
|
* Works with a tuple
|
|
171
172
|
* [@string tuiMode tooltip content, @string word 'background', @string 'form value']
|
|
172
173
|
*/
|
|
173
|
-
var TUI_DOC_DEMO_TEXTS = new InjectionToken(
|
|
174
|
-
factory: function () { return [
|
|
174
|
+
var TUI_DOC_DEMO_TEXTS = new InjectionToken("tui-doc-demo i18n texts", {
|
|
175
|
+
factory: function () { return ["Read more more about modes: ", "Background", "Form value"]; },
|
|
175
176
|
});
|
|
176
177
|
/**
|
|
177
178
|
* Works with a tuple
|
|
@@ -183,13 +184,13 @@ var TUI_DOC_DEMO_TEXTS = new InjectionToken('tui-doc-demo i18n texts', {
|
|
|
183
184
|
* @string message for tooltip about ng-polymorpheus
|
|
184
185
|
* ]
|
|
185
186
|
*/
|
|
186
|
-
var TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken(
|
|
187
|
+
var TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken("tui-doc-documentation i18n texts", {
|
|
187
188
|
factory: function () { return [
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
189
|
+
"Argument",
|
|
190
|
+
"Type",
|
|
191
|
+
"Name and description",
|
|
192
|
+
"Value",
|
|
193
|
+
"Learn about our dynamic templates from ",
|
|
193
194
|
]; },
|
|
194
195
|
});
|
|
195
196
|
/**
|
|
@@ -200,20 +201,20 @@ var TUI_DOC_DOCUMENTATION_TEXTS = new InjectionToken('tui-doc-documentation i18n
|
|
|
200
201
|
* @string link to a sample copied message label
|
|
201
202
|
* ]
|
|
202
203
|
*/
|
|
203
|
-
var TUI_DOC_EXAMPLE_TEXTS = new InjectionToken(
|
|
204
|
-
factory: function () { return [
|
|
204
|
+
var TUI_DOC_EXAMPLE_TEXTS = new InjectionToken("tui-doc-example i18n texts", {
|
|
205
|
+
factory: function () { return ["Preview", "Link to a sample was successfully copied", "Done"]; },
|
|
205
206
|
});
|
|
206
|
-
var TUI_DOC_MENU_TEXT = new InjectionToken(
|
|
207
|
-
factory: function () { return
|
|
207
|
+
var TUI_DOC_MENU_TEXT = new InjectionToken("menu i18n text", {
|
|
208
|
+
factory: function () { return "Menu"; },
|
|
208
209
|
});
|
|
209
|
-
var TUI_DOC_SEARCH_TEXT = new InjectionToken(
|
|
210
|
-
factory: function () { return
|
|
210
|
+
var TUI_DOC_SEARCH_TEXT = new InjectionToken("search i18n text", {
|
|
211
|
+
factory: function () { return "Search"; },
|
|
211
212
|
});
|
|
212
|
-
var TUI_DOC_SEE_ALSO_TEXT = new InjectionToken(
|
|
213
|
-
factory: function () { return
|
|
213
|
+
var TUI_DOC_SEE_ALSO_TEXT = new InjectionToken("tui-doc-see-also i18n text", {
|
|
214
|
+
factory: function () { return "See also"; },
|
|
214
215
|
});
|
|
215
|
-
var TUI_DOC_SOURCE_CODE_TEXT = new InjectionToken(
|
|
216
|
-
factory: function () { return
|
|
216
|
+
var TUI_DOC_SOURCE_CODE_TEXT = new InjectionToken("tui-doc-source-code i18n text", {
|
|
217
|
+
factory: function () { return "Source code"; },
|
|
217
218
|
});
|
|
218
219
|
|
|
219
220
|
var MIN_COMPONENT_WIDTH = 104;
|
|
@@ -229,14 +230,14 @@ var TuiDocDemoComponent = /** @class */ (function () {
|
|
|
229
230
|
this.wrapperWidth = 0;
|
|
230
231
|
this.control = null;
|
|
231
232
|
this.template = null;
|
|
232
|
-
this.updateOnVariants = [
|
|
233
|
-
this.updateOn =
|
|
233
|
+
this.updateOnVariants = ["change", "blur", "submit"];
|
|
234
|
+
this.updateOn = "change";
|
|
234
235
|
this.expanded = false;
|
|
235
236
|
this.opaque = true;
|
|
236
237
|
this.modeControl = new FormControl();
|
|
237
238
|
this.mode = null;
|
|
238
239
|
this.change$ = new Subject();
|
|
239
|
-
this.items = [
|
|
240
|
+
this.items = ["onLight", "onDark"];
|
|
240
241
|
this.isBrowser = isPlatformBrowser(platformId);
|
|
241
242
|
var parsedMode = locationRef.path().match(/tuiMode=(onDark|onLight)/);
|
|
242
243
|
if (parsedMode !== null && parsedMode.length > 0) {
|
|
@@ -268,9 +269,9 @@ var TuiDocDemoComponent = /** @class */ (function () {
|
|
|
268
269
|
}
|
|
269
270
|
var paddingLeft = this.isBrowser
|
|
270
271
|
? getComputedStyle(this.content.nativeElement).paddingLeft
|
|
271
|
-
:
|
|
272
|
+
: "0";
|
|
272
273
|
var offsetWidth = this.content.nativeElement.offsetWidth;
|
|
273
|
-
this.resizerText.nativeElement.textContent = String(offsetWidth - parseInt(paddingLeft ||
|
|
274
|
+
this.resizerText.nativeElement.textContent = String(offsetWidth - parseInt(paddingLeft || "0", 10) * 2);
|
|
274
275
|
};
|
|
275
276
|
TuiDocDemoComponent.prototype.onDragStart = function (event) {
|
|
276
277
|
event.preventDefault();
|
|
@@ -303,7 +304,7 @@ var TuiDocDemoComponent = /** @class */ (function () {
|
|
|
303
304
|
if (!this.wrapper) {
|
|
304
305
|
return;
|
|
305
306
|
}
|
|
306
|
-
this.renderer.setStyle(this.wrapper.nativeElement,
|
|
307
|
+
this.renderer.setStyle(this.wrapper.nativeElement, "width", px(Math.max(this.wrapperWidth - delta, MIN_COMPONENT_WIDTH)));
|
|
307
308
|
};
|
|
308
309
|
var TuiDocDemoComponent_1;
|
|
309
310
|
TuiDocDemoComponent.ctorParameters = function () { return [
|
|
@@ -316,13 +317,13 @@ var TuiDocDemoComponent = /** @class */ (function () {
|
|
|
316
317
|
{ type: Array, decorators: [{ type: Inject, args: [TUI_DOC_DEMO_TEXTS,] }] }
|
|
317
318
|
]; };
|
|
318
319
|
__decorate([
|
|
319
|
-
ViewChild(
|
|
320
|
+
ViewChild("content")
|
|
320
321
|
], TuiDocDemoComponent.prototype, "content", void 0);
|
|
321
322
|
__decorate([
|
|
322
|
-
ViewChild(
|
|
323
|
+
ViewChild("wrapper")
|
|
323
324
|
], TuiDocDemoComponent.prototype, "wrapper", void 0);
|
|
324
325
|
__decorate([
|
|
325
|
-
ViewChild(
|
|
326
|
+
ViewChild("resizerText")
|
|
326
327
|
], TuiDocDemoComponent.prototype, "resizerText", void 0);
|
|
327
328
|
__decorate([
|
|
328
329
|
Input()
|
|
@@ -331,11 +332,11 @@ var TuiDocDemoComponent = /** @class */ (function () {
|
|
|
331
332
|
ContentChild(TemplateRef)
|
|
332
333
|
], TuiDocDemoComponent.prototype, "template", void 0);
|
|
333
334
|
__decorate([
|
|
334
|
-
HostListener(
|
|
335
|
+
HostListener("window:resize")
|
|
335
336
|
], TuiDocDemoComponent.prototype, "onResize", null);
|
|
336
337
|
TuiDocDemoComponent = TuiDocDemoComponent_1 = __decorate([
|
|
337
338
|
Component({
|
|
338
|
-
selector:
|
|
339
|
+
selector: "tui-doc-demo",
|
|
339
340
|
template: "<div\n class=\"t-bg-toggle\"\n [tuiMode]=\"null\"\n>\n <ng-template #tooltip>\n {{ texts[0] }}\n <a\n tuiLink\n tuiMode=\"onDark\"\n routerLink=\"/directives/mode\"\n >\n <code>tuiMode</code>\n </a>\n </ng-template>\n <ng-container *ngIf=\"isMobile; else desktop\">\n <tui-select\n tuiTextfieldSize=\"s\"\n class=\"t-mode\"\n [tuiTextfieldCleaner]=\"true\"\n [tuiHintContent]=\"tooltip\"\n [formControl]=\"modeControl\"\n >\n tuiMode\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"items\"\n ></tui-data-list-wrapper>\n </tui-select>\n </ng-container>\n <ng-template #desktop>\n tuiMode:\n <tui-tooltip\n describeId=\"form\"\n [content]=\"tooltip\"\n ></tui-tooltip>\n <div\n tuiGroup\n class=\"t-group\"\n [collapsed]=\"true\"\n >\n <tui-radio-block\n size=\"s\"\n nativeId=\"form\"\n class=\"tui-group__auto-width-item\"\n [item]=\"null\"\n [hideRadio]=\"true\"\n [formControl]=\"modeControl\"\n >\n null\n </tui-radio-block>\n <tui-radio-block\n item=\"onDark\"\n size=\"s\"\n nativeId=\"form\"\n class=\"tui-group__auto-width-item\"\n [hideRadio]=\"true\"\n [formControl]=\"modeControl\"\n >\n onDark\n </tui-radio-block>\n <tui-radio-block\n item=\"onLight\"\n size=\"s\"\n nativeId=\"form\"\n class=\"tui-group__auto-width-item\"\n [hideRadio]=\"true\"\n [formControl]=\"modeControl\"\n >\n onLight\n </tui-radio-block>\n </div>\n </ng-template>\n <tui-checkbox-labeled\n size=\"m\"\n class=\"t-checkbox\"\n [(ngModel)]=\"opaque\"\n >\n {{ texts[1] }}\n </tui-checkbox-labeled>\n</div>\n<div\n #wrapper\n class=\"t-wrapper\"\n [class.t-wrapper_dark]=\"modeControl.value === 'onDark'\"\n [class.t-wrapper_gray]=\"modeControl.value === 'onLight'\"\n [class.t-wrapper_transparent]=\"!opaque\"\n>\n <div\n #content\n id=\"demoContent\"\n class=\"t-content\"\n >\n <form\n *ngIf=\"testForm\"\n class=\"t-form\"\n [formGroup]=\"testForm\"\n >\n <div class=\"t-input-wrapper\">\n <ng-container [ngTemplateOutlet]=\"template\"></ng-container>\n </div>\n <button\n tuiButton\n type=\"button\"\n size=\"s\"\n class=\"t-button\"\n [iconRight]=\"icon\"\n (click)=\"toggleDetails()\"\n >\n {{ texts[2] }}\n </button>\n <ng-template #icon>\n <tui-svg\n src=\"tuiIconChevronDown\"\n class=\"t-icon\"\n [class.t-icon_rotated]=\"expanded\"\n ></tui-svg>\n </ng-template>\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"expanded\"\n >\n <ng-template tuiExpandContent>\n <pre class=\"t-value\">Form data: {{ testForm.value | json }}</pre>\n <div\n tuiGroup\n class=\"t-form-controls\"\n >\n <tui-select\n tuiTextfieldSize=\"s\"\n class=\"t-select\"\n [ngModel]=\"updateOn\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateOnChange($event)\"\n >\n updateOn\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"updateOnVariants\"\n ></tui-data-list-wrapper>\n </tui-select>\n <button\n tuiButton\n type=\"reset\"\n size=\"s\"\n class=\"tui-group__auto-width-item\"\n >\n Reset\n </button>\n <button\n tuiButton\n type=\"submit\"\n size=\"s\"\n class=\"tui-group__auto-width-item\"\n >\n Submit\n </button>\n </div>\n </ng-template>\n </tui-expand>\n </form>\n <ng-content></ng-content>\n </div>\n <button\n tabindex=\"-1\"\n class=\"t-resizer\"\n (tuiDragStart)=\"onDragStart($event)\"\n (tuiDragContinues)=\"onDragContinues($event)\"\n (tuiDragEnd)=\"onDragEnd()\"\n >\n <span\n #resizerText\n class=\"t-resizer-text\"\n ></span>\n </button>\n</div>\n",
|
|
340
341
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
341
342
|
providers: [
|
|
@@ -398,7 +399,7 @@ var TuiDocDemoModule = /** @class */ (function () {
|
|
|
398
399
|
*/
|
|
399
400
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
400
401
|
function rgbToHex(r, g, b) {
|
|
401
|
-
return "#" + [r, g, b].map(function (x) { return x.toString(16).padStart(2,
|
|
402
|
+
return "#" + [r, g, b].map(function (x) { return x.toString(16).padStart(2, "0"); }).join("");
|
|
402
403
|
}
|
|
403
404
|
var tuiRgbToHex = rgbToHex;
|
|
404
405
|
/**
|
|
@@ -407,10 +408,10 @@ var tuiRgbToHex = rgbToHex;
|
|
|
407
408
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
408
409
|
function hexToRgb(hex) {
|
|
409
410
|
var matches = hex
|
|
410
|
-
.replace(
|
|
411
|
-
.split(
|
|
411
|
+
.replace("#", "")
|
|
412
|
+
.split("")
|
|
412
413
|
.map(function (char, _, array) { return (array.length === 3 ? char + char : char); })
|
|
413
|
-
.join(
|
|
414
|
+
.join("")
|
|
414
415
|
.match(/.{2}/g);
|
|
415
416
|
return matches
|
|
416
417
|
? matches.map(function (x) { return Number.parseInt(x, 16); })
|
|
@@ -420,18 +421,18 @@ var tuiHexToRgb = hexToRgb;
|
|
|
420
421
|
|
|
421
422
|
function inspectArray(array, depth) {
|
|
422
423
|
if (depth === 0) {
|
|
423
|
-
return
|
|
424
|
+
return "[\u2026]";
|
|
424
425
|
}
|
|
425
|
-
var result =
|
|
426
|
+
var result = "";
|
|
426
427
|
var first = true;
|
|
427
428
|
for (var index = 0; index < array.length; index++) {
|
|
428
429
|
if (first) {
|
|
429
430
|
first = false;
|
|
430
431
|
}
|
|
431
432
|
else {
|
|
432
|
-
result +=
|
|
433
|
+
result += ", ";
|
|
433
434
|
}
|
|
434
|
-
result += index in array ? inspectAny(array[index], depth - 1) :
|
|
435
|
+
result += index in array ? inspectAny(array[index], depth - 1) : "empty";
|
|
435
436
|
}
|
|
436
437
|
return "[" + result + "]";
|
|
437
438
|
}
|
|
@@ -439,7 +440,7 @@ function inspectObject(object, depth) {
|
|
|
439
440
|
if (depth === 0) {
|
|
440
441
|
return "{\u2026}";
|
|
441
442
|
}
|
|
442
|
-
var result =
|
|
443
|
+
var result = "";
|
|
443
444
|
var first = true;
|
|
444
445
|
for (var key in object) {
|
|
445
446
|
if (!object.hasOwnProperty(key)) {
|
|
@@ -449,7 +450,7 @@ function inspectObject(object, depth) {
|
|
|
449
450
|
first = false;
|
|
450
451
|
}
|
|
451
452
|
else {
|
|
452
|
-
result +=
|
|
453
|
+
result += ", ";
|
|
453
454
|
}
|
|
454
455
|
result += key + ": " + inspectAny(object[key], depth - 1);
|
|
455
456
|
}
|
|
@@ -465,15 +466,15 @@ function inspectObject(object, depth) {
|
|
|
465
466
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
466
467
|
function inspectAny(data, depth) {
|
|
467
468
|
if (data === null) {
|
|
468
|
-
return
|
|
469
|
+
return "null";
|
|
469
470
|
}
|
|
470
471
|
switch (typeof data) {
|
|
471
|
-
case
|
|
472
|
+
case "string":
|
|
472
473
|
return "'" + data + "'";
|
|
473
|
-
case
|
|
474
|
-
case
|
|
475
|
-
case
|
|
476
|
-
case
|
|
474
|
+
case "undefined":
|
|
475
|
+
case "number":
|
|
476
|
+
case "boolean":
|
|
477
|
+
case "function":
|
|
477
478
|
return String(data);
|
|
478
479
|
}
|
|
479
480
|
if (data instanceof RegExp) {
|
|
@@ -496,7 +497,7 @@ function coerceValue(value) {
|
|
|
496
497
|
return null;
|
|
497
498
|
}
|
|
498
499
|
else if (isBooleanParamValue(prepared)) {
|
|
499
|
-
return String(prepared) ===
|
|
500
|
+
return String(prepared) === "true";
|
|
500
501
|
}
|
|
501
502
|
else if (isNumberParamValue(prepared)) {
|
|
502
503
|
return Number(prepared);
|
|
@@ -513,10 +514,10 @@ function coerceValue(value) {
|
|
|
513
514
|
}
|
|
514
515
|
var tuiCoerceValue = coerceValue;
|
|
515
516
|
function isEmptyParamValue(value) {
|
|
516
|
-
return [
|
|
517
|
+
return ["undefined", "null", "NaN", "Infinity"].includes(value);
|
|
517
518
|
}
|
|
518
519
|
function isBooleanParamValue(value) {
|
|
519
|
-
return value ===
|
|
520
|
+
return value === "true" || value === "false";
|
|
520
521
|
}
|
|
521
522
|
function isNumberParamValue(value) {
|
|
522
523
|
// TODO: investigate to disallow potentially catastrophic exponential-time regular expressions.
|
|
@@ -524,13 +525,13 @@ function isNumberParamValue(value) {
|
|
|
524
525
|
return /^-?[\d.]+(?:e-?\d+)?$/.test(value);
|
|
525
526
|
}
|
|
526
527
|
function isPossibleArray(value) {
|
|
527
|
-
return value.startsWith(
|
|
528
|
+
return value.startsWith("[") && value.endsWith("]");
|
|
528
529
|
}
|
|
529
530
|
function isPossibleObject(value) {
|
|
530
|
-
return value.startsWith(
|
|
531
|
+
return value.startsWith("{") && value.endsWith("}");
|
|
531
532
|
}
|
|
532
533
|
|
|
533
|
-
var SERIALIZED_SUFFIX =
|
|
534
|
+
var SERIALIZED_SUFFIX = "$";
|
|
534
535
|
// @bad TODO: refactor output and value sync
|
|
535
536
|
var TuiDocDocumentationPropertyConnectorDirective = /** @class */ (function () {
|
|
536
537
|
function TuiDocDocumentationPropertyConnectorDirective(template, locationRef, activatedRoute, urlSerializer) {
|
|
@@ -538,9 +539,9 @@ var TuiDocDocumentationPropertyConnectorDirective = /** @class */ (function () {
|
|
|
538
539
|
this.locationRef = locationRef;
|
|
539
540
|
this.activatedRoute = activatedRoute;
|
|
540
541
|
this.urlSerializer = urlSerializer;
|
|
541
|
-
this.documentationPropertyName =
|
|
542
|
+
this.documentationPropertyName = "";
|
|
542
543
|
this.documentationPropertyMode = null;
|
|
543
|
-
this.documentationPropertyType =
|
|
544
|
+
this.documentationPropertyType = "";
|
|
544
545
|
this.documentationPropertyDeprecated = false;
|
|
545
546
|
this.documentationPropertyValues = null;
|
|
546
547
|
this.documentationPropertyValueChange = new EventEmitter();
|
|
@@ -553,11 +554,11 @@ var TuiDocDocumentationPropertyConnectorDirective = /** @class */ (function () {
|
|
|
553
554
|
Object.defineProperty(TuiDocDocumentationPropertyConnectorDirective.prototype, "attrName", {
|
|
554
555
|
get: function () {
|
|
555
556
|
switch (this.documentationPropertyMode) {
|
|
556
|
-
case
|
|
557
|
+
case "input":
|
|
557
558
|
return "[" + this.documentationPropertyName + "]";
|
|
558
|
-
case
|
|
559
|
+
case "output":
|
|
559
560
|
return "(" + this.documentationPropertyName + ")";
|
|
560
|
-
case
|
|
561
|
+
case "input-output":
|
|
561
562
|
return "[(" + this.documentationPropertyName + ")]";
|
|
562
563
|
default:
|
|
563
564
|
return this.documentationPropertyName;
|
|
@@ -575,7 +576,7 @@ var TuiDocDocumentationPropertyConnectorDirective = /** @class */ (function () {
|
|
|
575
576
|
});
|
|
576
577
|
Object.defineProperty(TuiDocDocumentationPropertyConnectorDirective.prototype, "shouldShowValues", {
|
|
577
578
|
get: function () {
|
|
578
|
-
return this.documentationPropertyMode !==
|
|
579
|
+
return this.documentationPropertyMode !== "output";
|
|
579
580
|
},
|
|
580
581
|
enumerable: true,
|
|
581
582
|
configurable: true
|
|
@@ -611,7 +612,7 @@ var TuiDocDocumentationPropertyConnectorDirective = /** @class */ (function () {
|
|
|
611
612
|
var computedValue = isValueAvailableByKey && this.documentationPropertyValues
|
|
612
613
|
? this.documentationPropertyValues.indexOf(value)
|
|
613
614
|
: value;
|
|
614
|
-
var suffix = isValueAvailableByKey ? SERIALIZED_SUFFIX :
|
|
615
|
+
var suffix = isValueAvailableByKey ? SERIALIZED_SUFFIX : "";
|
|
615
616
|
var propName = this.documentationPropertyName + suffix;
|
|
616
617
|
tree.queryParams = __assign(__assign({}, tree.queryParams), (_a = {}, _a[propName] = computedValue, _a));
|
|
617
618
|
this.locationRef.go(String(tree));
|
|
@@ -645,8 +646,8 @@ var TuiDocDocumentationPropertyConnectorDirective = /** @class */ (function () {
|
|
|
645
646
|
], TuiDocDocumentationPropertyConnectorDirective.prototype, "documentationPropertyValueChange", void 0);
|
|
646
647
|
TuiDocDocumentationPropertyConnectorDirective = __decorate([
|
|
647
648
|
Directive({
|
|
648
|
-
selector:
|
|
649
|
-
exportAs:
|
|
649
|
+
selector: "ng-template[documentationPropertyName]",
|
|
650
|
+
exportAs: "documentationProperty",
|
|
650
651
|
}),
|
|
651
652
|
__param(0, Inject(TemplateRef)),
|
|
652
653
|
__param(1, Inject(Location$1)),
|
|
@@ -663,7 +664,7 @@ var TuiDocDocumentationComponent = /** @class */ (function () {
|
|
|
663
664
|
function TuiDocDocumentationComponent(changeDetectorRef, texts) {
|
|
664
665
|
this.changeDetectorRef = changeDetectorRef;
|
|
665
666
|
this.texts = texts;
|
|
666
|
-
this.heading =
|
|
667
|
+
this.heading = "";
|
|
667
668
|
this.showValues = true;
|
|
668
669
|
this.isAPI = false;
|
|
669
670
|
this.propertiesConnectors = EMPTY_QUERY;
|
|
@@ -687,71 +688,71 @@ var TuiDocDocumentationComponent = /** @class */ (function () {
|
|
|
687
688
|
TuiDocDocumentationComponent.prototype.getColor = function (color) {
|
|
688
689
|
if (color.length === 4) {
|
|
689
690
|
return color
|
|
690
|
-
.split(
|
|
691
|
+
.split("")
|
|
691
692
|
.reduce(function (result, current) { return __spread(result, [current, current]); }, [])
|
|
692
|
-
.join(
|
|
693
|
-
.replace(
|
|
693
|
+
.join("")
|
|
694
|
+
.replace("#", "");
|
|
694
695
|
}
|
|
695
|
-
if (color.startsWith(
|
|
696
|
+
if (color.startsWith("#")) {
|
|
696
697
|
return color;
|
|
697
698
|
}
|
|
698
|
-
if (color ===
|
|
699
|
-
return
|
|
699
|
+
if (color === "transparent") {
|
|
700
|
+
return "#000000";
|
|
700
701
|
}
|
|
701
702
|
var parsed = color
|
|
702
|
-
.replace(
|
|
703
|
-
.replace(
|
|
704
|
-
.replace(
|
|
705
|
-
.replace(
|
|
706
|
-
.split(
|
|
703
|
+
.replace("rgb(", "")
|
|
704
|
+
.replace("rgba(", "")
|
|
705
|
+
.replace(")", "")
|
|
706
|
+
.replace(" ", "")
|
|
707
|
+
.split(",")
|
|
707
708
|
.map(function (v) { return Number.parseInt(v, 10); });
|
|
708
709
|
return rgbToHex.apply(void 0, __spread(parsed));
|
|
709
710
|
};
|
|
710
711
|
TuiDocDocumentationComponent.prototype.getOpacity = function (color) {
|
|
711
|
-
if (color.startsWith(
|
|
712
|
+
if (color.startsWith("#") || color.startsWith("rgb(")) {
|
|
712
713
|
return 100;
|
|
713
714
|
}
|
|
714
|
-
if (color ===
|
|
715
|
+
if (color === "transparent") {
|
|
715
716
|
return 0;
|
|
716
717
|
}
|
|
717
|
-
var lastComma = color.lastIndexOf(
|
|
718
|
+
var lastComma = color.lastIndexOf(",");
|
|
718
719
|
var parsed = color
|
|
719
720
|
.slice(lastComma)
|
|
720
|
-
.replace(
|
|
721
|
-
.replace(
|
|
722
|
-
.replace(
|
|
721
|
+
.replace(")", "")
|
|
722
|
+
.replace(" ", "")
|
|
723
|
+
.replace(",", "");
|
|
723
724
|
return Math.round(Number.parseFloat(parsed) * 100);
|
|
724
725
|
};
|
|
725
726
|
TuiDocDocumentationComponent.prototype.onColorChange = function (connector, color) {
|
|
726
|
-
var opacity = this.getOpacity(connector.documentationPropertyValue ||
|
|
727
|
+
var opacity = this.getOpacity(connector.documentationPropertyValue || "");
|
|
727
728
|
if (opacity === 100) {
|
|
728
729
|
connector.onValueChange(color);
|
|
729
730
|
return;
|
|
730
731
|
}
|
|
731
|
-
var rgb = hexToRgb(color).join(
|
|
732
|
+
var rgb = hexToRgb(color).join(", ");
|
|
732
733
|
var result = "rgba(" + rgb + ", " + opacity / 100 + ")";
|
|
733
734
|
connector.onValueChange(result);
|
|
734
735
|
};
|
|
735
736
|
TuiDocDocumentationComponent.prototype.onOpacityChange = function (connector, opacity) {
|
|
736
|
-
var hex = this.getColor(connector.documentationPropertyValue ||
|
|
737
|
+
var hex = this.getColor(connector.documentationPropertyValue || "");
|
|
737
738
|
var rgb = hexToRgb(hex);
|
|
738
739
|
var result = "rgba(" + rgb + ", " + opacity / 100 + ")";
|
|
739
740
|
connector.onValueChange(result);
|
|
740
741
|
};
|
|
741
742
|
TuiDocDocumentationComponent.prototype.stripOptional = function (name) {
|
|
742
|
-
return name.replace(
|
|
743
|
+
return name.replace("?", "");
|
|
743
744
|
};
|
|
744
745
|
TuiDocDocumentationComponent.prototype.isOptional = function (name) {
|
|
745
|
-
return name.includes(
|
|
746
|
+
return name.includes("?");
|
|
746
747
|
};
|
|
747
748
|
TuiDocDocumentationComponent.prototype.isPrimitivePolymorpheusContent = function (value) {
|
|
748
|
-
return typeof value ===
|
|
749
|
+
return typeof value === "string" || typeof value === "number";
|
|
749
750
|
};
|
|
750
751
|
TuiDocDocumentationComponent.prototype.showCleaner = function (type) {
|
|
751
|
-
return type.includes(
|
|
752
|
+
return type.includes("null");
|
|
752
753
|
};
|
|
753
754
|
TuiDocDocumentationComponent.prototype.showContentTooltip = function (type) {
|
|
754
|
-
return type.includes(
|
|
755
|
+
return type.includes("PolymorpheusContent");
|
|
755
756
|
};
|
|
756
757
|
TuiDocDocumentationComponent.prototype.inspectAny = function (data) {
|
|
757
758
|
return inspectAny(data, 2);
|
|
@@ -774,12 +775,12 @@ var TuiDocDocumentationComponent = /** @class */ (function () {
|
|
|
774
775
|
], TuiDocDocumentationComponent.prototype, "propertiesConnectors", void 0);
|
|
775
776
|
TuiDocDocumentationComponent = __decorate([
|
|
776
777
|
Component({
|
|
777
|
-
selector:
|
|
778
|
+
selector: "tui-doc-documentation",
|
|
778
779
|
template: "<h1\n *ngIf=\"heading\"\n class=\"t-heading\"\n>\n {{ heading }}\n</h1>\n<ng-content></ng-content>\n<table class=\"t-table\">\n <tr class=\"t-row t-row_header\">\n <th class=\"t-th t-cell t-cell_prop\">{{ texts[2] }}</th>\n <th class=\"t-th\">{{ type }}</th>\n <th\n *ngIf=\"showValues && !isAPI\"\n class=\"t-th t-cell t-cell_value\"\n >\n {{ texts[3] }}\n </th>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of propertiesConnectors\"\n class=\"t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated\"\n >\n <td class=\"t-cell\">\n <div\n automation-id=\"tui-documentation__property-name\"\n class=\"t-property\"\n >\n {{ stripOptional(propertyConnector.attrName) }}\n <tui-badge\n *ngIf=\"isOptional(propertyConnector.attrName)\"\n size=\"s\"\n value=\"Optional\"\n ></tui-badge>\n </div>\n <span\n *ngIf=\"propertyConnector.documentationPropertyDeprecated\"\n class=\"t-deprecated-label\"\n >\n deprecated\n </span>\n <ng-container [ngTemplateOutlet]=\"propertyConnector.template\"></ng-container>\n </td>\n <td class=\"t-cell\">\n <span class=\"type\">\n {{ propertyConnector.documentationPropertyType }}\n <tui-tooltip\n *ngIf=\"showContentTooltip(propertyConnector.documentationPropertyType)\"\n [describeId]=\"propertyConnector.attrName\"\n [content]=\"content\"\n >\n <ng-template #content>\n {{ texts[4] }}\n <a\n tuiLink\n tuiMode=\"onDark\"\n target=\"_blank\"\n href=\"https://github.com/tinkoff/ng-polymorpheus\"\n >\n <code>ng-polymorpheus</code>\n </a>\n </ng-template>\n </tui-tooltip>\n </span>\n </td>\n <td\n *ngIf=\"showValues\"\n class=\"t-cell\"\n >\n <ng-container *ngIf=\"propertyConnector.shouldShowValues; else elseEmitter\">\n <tui-select\n *ngIf=\"propertyConnector.hasItems; else noItems\"\n tuiTextfieldSize=\"m\"\n tuiDropdownLimitWidth=\"min\"\n [tuiTextfieldCleaner]=\"showCleaner(propertyConnector.documentationPropertyType)\"\n [tuiTextfieldLabelOutside]=\"true\"\n [nativeId]=\"propertyConnector.attrName\"\n [valueContent]=\"selectContent\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n >\n <code class=\"t-exception\">null</code>\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"propertyConnector.documentationPropertyValues\"\n [itemContent]=\"selectContent\"\n ></tui-data-list-wrapper>\n </tui-select>\n <ng-template\n #selectContent\n let-data\n >\n <code>{{ inspectAny(data) }}</code>\n </ng-template>\n\n <ng-template #noItems>\n <ng-container [ngSwitch]=\"propertyConnector.documentationPropertyType\">\n <tui-toggle\n *ngSwitchCase=\"'boolean'\"\n size=\"l\"\n [nativeId]=\"propertyConnector.attrName\"\n [showIcons]=\"true\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-toggle>\n\n <tui-primitive-textfield\n *ngSwitchCase=\"'string'\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiTextfieldCleaner]=\"true\"\n [value]=\"propertyConnector.documentationPropertyValue || ''\"\n (valueChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-primitive-textfield>\n\n <div\n *ngSwitchCase=\"'color'\"\n tuiGroup\n >\n <tui-primitive-textfield\n tuiTextfieldType=\"text\"\n tuiTextfieldSize=\"m\"\n [attr.id]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiInputOpacity]=\"getOpacity(propertyConnector.documentationPropertyValue)\"\n [value]=\"getColor(propertyConnector.documentationPropertyValue)\"\n (valueChange)=\"onColorChange(propertyConnector, $event)\"\n ></tui-primitive-textfield>\n <tui-input-count\n tuiTextfieldSize=\"m\"\n [max]=\"100\"\n [ngModel]=\"getOpacity(propertyConnector.documentationPropertyValue)\"\n (ngModelChange)=\"onOpacityChange(propertyConnector, $event)\"\n >\n Opacity\n </tui-input-count>\n </div>\n\n <tui-input-count\n *ngSwitchCase=\"'number'\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-input-count>\n\n <ng-container *ngSwitchCase=\"'PolymorpheusContent'\">\n <tui-primitive-textfield\n *ngIf=\"isPrimitivePolymorpheusContent(propertyConnector.documentationPropertyValue)\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiTextfieldCleaner]=\"true\"\n [value]=\"propertyConnector.documentationPropertyValue.toString()\"\n (valueChange)=\"propertyConnector.onValueChange($event)\"\n >\n Default content\n </tui-primitive-textfield>\n </ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-template #elseEmitter>\n <tui-notification\n class=\"t-output\"\n [@emitEvent]=\"propertyConnector.emits$ | async\"\n >\n Emit!\n </tui-notification>\n </ng-template>\n </td>\n </tr>\n</table>\n",
|
|
779
780
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
780
781
|
animations: [
|
|
781
|
-
trigger(
|
|
782
|
-
transition(
|
|
782
|
+
trigger("emitEvent", [
|
|
783
|
+
transition(":increment", [style({ opacity: 1 }), animate("500ms ease-in")]),
|
|
783
784
|
]),
|
|
784
785
|
],
|
|
785
786
|
styles: [":host{display:block;min-width:100%}.t-table{width:100%;table-layout:fixed}.t-row:not(:last-child){border-bottom:1px solid var(--tui-base-03)}:host-context(tui-root._mobile) .t-row{display:flex;flex-wrap:wrap}:host-context(tui-root._mobile) .t-row_header{display:none}.t-cell{padding:1rem 1rem .875rem}.t-cell:first-child{padding-left:0}.t-cell:last-child{padding-right:0;text-align:right}.t-cell_prop{width:40%}.t-cell_value{max-width:20rem}:host-context(tui-root._mobile) .t-cell_value{width:9.375rem}:host-context(tui-root._mobile) .t-cell{width:100%;height:auto;padding:.5rem 0;text-align:left}.t-th{padding:.5rem 1rem;color:var(--tui-text-02);font-weight:400;text-align:left}.t-property{font:var(--tui-font-text-m);margin-bottom:.25rem;font-family:monospace;color:#8f75d1}:host-context(tui-root._mobile) .t-property{padding:.5rem 0}.t-type{font-family:monospace}.t-deprecated{background-color:var(--tui-error-bg);box-shadow:-1rem 0 var(--tui-error-bg),1rem 0 var(--tui-error-bg)}.t-deprecated-label{margin-right:.125rem;color:var(--tui-error-fill)}.t-exception{display:block;width:-webkit-max-content;width:-moz-max-content;width:max-content}.t-output{text-align:left;opacity:0}.t-heading{font:var(--tui-font-heading-4)}"]
|
|
@@ -799,7 +800,7 @@ var TuiInputOpacityDirective = /** @class */ (function () {
|
|
|
799
800
|
set: function (opacity) {
|
|
800
801
|
var nativeFocusableElement = this.tuiFocusableComponent.nativeFocusableElement;
|
|
801
802
|
if (nativeFocusableElement) {
|
|
802
|
-
this.renderer.setStyle(nativeFocusableElement,
|
|
803
|
+
this.renderer.setStyle(nativeFocusableElement, "opacity", opacity / 100);
|
|
803
804
|
}
|
|
804
805
|
},
|
|
805
806
|
enumerable: true,
|
|
@@ -814,7 +815,7 @@ var TuiInputOpacityDirective = /** @class */ (function () {
|
|
|
814
815
|
], TuiInputOpacityDirective.prototype, "tuiInputOpacity", null);
|
|
815
816
|
TuiInputOpacityDirective = __decorate([
|
|
816
817
|
Directive({
|
|
817
|
-
selector:
|
|
818
|
+
selector: "[tuiInputOpacity]",
|
|
818
819
|
}),
|
|
819
820
|
__param(0, Inject(Renderer2)),
|
|
820
821
|
__param(1, Inject(TUI_FOCUSABLE_ITEM_ACCESSOR))
|
|
@@ -873,13 +874,13 @@ var TuiDocDocumentationModule = /** @class */ (function () {
|
|
|
873
874
|
return TuiDocDocumentationModule;
|
|
874
875
|
}());
|
|
875
876
|
|
|
876
|
-
var TUI_DOC_CODE_ACTIONS = new InjectionToken(
|
|
877
|
-
factory: function () { return
|
|
877
|
+
var TUI_DOC_CODE_ACTIONS = new InjectionToken("Code actions for the opened tab with code example", {
|
|
878
|
+
factory: function () { return ""; },
|
|
878
879
|
});
|
|
879
880
|
|
|
880
|
-
var TUI_DOC_CODE_EDITOR = new InjectionToken(
|
|
881
|
+
var TUI_DOC_CODE_EDITOR = new InjectionToken("Contains service for opening online IDE e.g. Stackblitz");
|
|
881
882
|
|
|
882
|
-
var TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new InjectionToken(
|
|
883
|
+
var TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new InjectionToken("Processes content in example", { factory: function () { return identity; } });
|
|
883
884
|
|
|
884
885
|
/**
|
|
885
886
|
* @deprecated: use {@link tuiRawLoadRecord} instead
|
|
@@ -948,8 +949,8 @@ var TuiDocExampleComponent = /** @class */ (function () {
|
|
|
948
949
|
this.route = route;
|
|
949
950
|
this.ngLocation = ngLocation;
|
|
950
951
|
this.rawLoader$$ = new BehaviorSubject({});
|
|
951
|
-
this.heading =
|
|
952
|
-
this.description =
|
|
952
|
+
this.heading = "";
|
|
953
|
+
this.description = "";
|
|
953
954
|
this.componentName = this.location.pathname.slice(1);
|
|
954
955
|
this.defaultTabIndex = 0;
|
|
955
956
|
this.defaultTab = this.texts[this.defaultTabIndex];
|
|
@@ -969,7 +970,7 @@ var TuiDocExampleComponent = /** @class */ (function () {
|
|
|
969
970
|
configurable: true
|
|
970
971
|
});
|
|
971
972
|
TuiDocExampleComponent.prototype.copyExampleLink = function () {
|
|
972
|
-
var hashPosition = this.location.href.indexOf(
|
|
973
|
+
var hashPosition = this.location.href.indexOf("#");
|
|
973
974
|
var currentUrl = hashPosition > -1
|
|
974
975
|
? this.location.href.slice(0, Math.max(0, hashPosition))
|
|
975
976
|
: this.location.href;
|
|
@@ -987,16 +988,16 @@ var TuiDocExampleComponent = /** @class */ (function () {
|
|
|
987
988
|
var _this = this;
|
|
988
989
|
var _a, _b;
|
|
989
990
|
this.loading$.next(true);
|
|
990
|
-
(_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName, (_b = this.id) !== null && _b !== void 0 ? _b :
|
|
991
|
+
(_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName, (_b = this.id) !== null && _b !== void 0 ? _b : "", files).finally(function () { return _this.loading$.next(false); });
|
|
991
992
|
};
|
|
992
993
|
TuiDocExampleComponent.prototype.setFragmentWithoutRedirect = function (id) {
|
|
993
994
|
var url = this.router
|
|
994
|
-
.createUrlTree([], { relativeTo: this.route, fragment: id ||
|
|
995
|
+
.createUrlTree([], { relativeTo: this.route, fragment: id || "" })
|
|
995
996
|
.toString();
|
|
996
997
|
this.ngLocation.go(url);
|
|
997
998
|
};
|
|
998
999
|
TuiDocExampleComponent.ctorParameters = function () { return [
|
|
999
|
-
{ type: String, decorators: [{ type: Attribute, args: [
|
|
1000
|
+
{ type: String, decorators: [{ type: Attribute, args: ["id",] }] },
|
|
1000
1001
|
{ type: Clipboard, decorators: [{ type: Inject, args: [Clipboard,] }] },
|
|
1001
1002
|
{ type: TuiNotificationsService, decorators: [{ type: Inject, args: [TuiNotificationsService,] }] },
|
|
1002
1003
|
{ type: Location, decorators: [{ type: Inject, args: [LOCATION,] }] },
|
|
@@ -1024,12 +1025,12 @@ var TuiDocExampleComponent = /** @class */ (function () {
|
|
|
1024
1025
|
], TuiDocExampleComponent.prototype, "componentName", void 0);
|
|
1025
1026
|
TuiDocExampleComponent = __decorate([
|
|
1026
1027
|
Component({
|
|
1027
|
-
selector:
|
|
1028
|
+
selector: "tui-doc-example",
|
|
1028
1029
|
template: "<h3\n *ngIf=\"heading\"\n class=\"t-title\"\n>\n <span\n polymorpheus-outlet\n [content]=\"heading | tuiDocExampleCapitalize\"\n ></span>\n <button\n *ngIf=\"id\"\n tuiIconButton\n type=\"button\"\n size=\"xs\"\n icon=\"tuiIconLinkLarge\"\n appearance=\"icon\"\n class=\"t-link-icon\"\n [title]=\"copy$ | async\"\n (click)=\"copyExampleLink()\"\n ></button>\n</h3>\n<h4\n *ngIf=\"description\"\n polymorpheus-outlet\n class=\"t-description\"\n [content]=\"description | tuiDocExampleCapitalize\"\n></h4>\n\n<div\n *ngIf=\"processor$ | async as files\"\n class=\"t-example\"\n>\n <ng-container *ngIf=\"files | tuiDocExampleGetTabs: defaultTab as tabs\">\n <div class=\"t-tabs-wrapper\">\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabs\">\n <button\n *tuiTab\n tuiTab\n >\n {{ tab }}\n </button>\n </ng-container>\n </tui-tabs-with-more>\n\n <button\n *ngIf=\"codeEditor\"\n tuiButton\n appearance=\"flat\"\n size=\"s\"\n [showLoader]=\"!!(loading$ | async)\"\n (click)=\"edit(files)\"\n >\n Edit on {{ codeEditor.name }}\n </button>\n </div>\n\n <div\n *ngFor=\"let tab of tabs; let index = index\"\n class=\"t-content\"\n [class.t-content_animated]=\"!isCypress\"\n [class.t-content_visible]=\"activeItemIndex === index\"\n >\n <ng-container\n *ngIf=\"index === defaultTabIndex; else anotherTab\"\n [ngTemplateOutlet]=\"preview\"\n ></ng-container>\n <ng-template #anotherTab>\n <ng-container\n [ngTemplateOutlet]=\"codeSection\"\n [ngTemplateOutletContext]=\"{$implicit: files[tabs[activeItemIndex]] || ''}\"\n ></ng-container>\n </ng-template>\n </div>\n </ng-container>\n</div>\n\n<ng-template #preview>\n <div\n automation-id=\"tui-doc-example\"\n class=\"t-demo\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template\n #codeSection\n let-code\n>\n <section class=\"t-code-actions\">\n <ng-container *ngFor=\"let action of codeActions\">\n <div\n polymorpheus-outlet\n [content]=\"action\"\n [context]=\"{$implicit: code}\"\n ></div>\n </ng-container>\n <tui-doc-copy [cdkCopyToClipboard]=\"code\"></tui-doc-copy>\n </section>\n <tui-doc-code [code]=\"code\"></tui-doc-code>\n</ng-template>\n",
|
|
1029
1030
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1030
1031
|
styles: [":host{position:relative;display:block;padding-top:3.5rem;clear:right}:host :host-context(tui-root._mobile){padding-top:2rem}.t-title{font:var(--tui-font-heading-5);margin:0 0 .5rem}:host-context(tui-root._mobile) .t-title{font:var(--tui-font-heading-6)}.t-description{font:var(--tui-font-text-m);font-weight:400;margin:0}.t-example{position:relative;margin-top:1.5rem;border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m);box-shadow:0 .125rem .1875rem rgba(0,0,0,.1)}:host-context(tui-root._mobile) .t-example{margin-top:.75rem}.t-tabs-wrapper{display:flex;padding:0 2rem;box-shadow:inset 0 -1px var(--tui-base-03);justify-content:space-between;align-items:center}:host-context(tui-root._mobile) .t-tabs-wrapper{padding:0 1rem}.t-tabs{flex-grow:1}.t-demo{padding:2rem;overflow-x:auto}@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution:0.001dpcm){.t-demo::-webkit-scrollbar,.t-demo::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:2.667rem solid transparent}.t-demo::-webkit-scrollbar{background-color:transparent}.t-demo::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}.t-demo::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}.t-demo::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}:host-context(tui-root._mobile) .t-demo{padding:1rem}.t-code-actions{position:absolute;top:4.375rem;right:1rem;display:flex;justify-content:flex-end;align-items:center}.t-code-actions>*{margin-left:.5rem}.t-link-icon{margin-left:.3rem;vertical-align:baseline}.t-content{will-change:opacity;height:0;visibility:hidden;opacity:0}.t-content_animated{transition:opacity .3s ease-in-out}.t-content_visible{height:auto;visibility:visible;opacity:1}"]
|
|
1031
1032
|
}),
|
|
1032
|
-
__param(0, Attribute(
|
|
1033
|
+
__param(0, Attribute("id")),
|
|
1033
1034
|
__param(1, Inject(Clipboard)),
|
|
1034
1035
|
__param(2, Inject(TuiNotificationsService)),
|
|
1035
1036
|
__param(3, Inject(LOCATION)),
|
|
@@ -1051,10 +1052,10 @@ var TuiDocExampleCapitalizePipe = /** @class */ (function () {
|
|
|
1051
1052
|
function TuiDocExampleCapitalizePipe() {
|
|
1052
1053
|
}
|
|
1053
1054
|
TuiDocExampleCapitalizePipe.prototype.transform = function (content) {
|
|
1054
|
-
return typeof content ===
|
|
1055
|
+
return typeof content === "string" ? capitalizeFirstLetter(content) : content;
|
|
1055
1056
|
};
|
|
1056
1057
|
TuiDocExampleCapitalizePipe = __decorate([
|
|
1057
|
-
Pipe({ name:
|
|
1058
|
+
Pipe({ name: "tuiDocExampleCapitalize" })
|
|
1058
1059
|
], TuiDocExampleCapitalizePipe);
|
|
1059
1060
|
return TuiDocExampleCapitalizePipe;
|
|
1060
1061
|
}());
|
|
@@ -1066,7 +1067,7 @@ var TuiDocExampleGetTabsPipe = /** @class */ (function () {
|
|
|
1066
1067
|
return __spread([defaultTab], Object.keys(content));
|
|
1067
1068
|
};
|
|
1068
1069
|
TuiDocExampleGetTabsPipe = __decorate([
|
|
1069
|
-
Pipe({ name:
|
|
1070
|
+
Pipe({ name: "tuiDocExampleGetTabs" })
|
|
1070
1071
|
], TuiDocExampleGetTabsPipe);
|
|
1071
1072
|
return TuiDocExampleGetTabsPipe;
|
|
1072
1073
|
}());
|
|
@@ -1100,20 +1101,76 @@ var TuiDocExampleModule = /** @class */ (function () {
|
|
|
1100
1101
|
return TuiDocExampleModule;
|
|
1101
1102
|
}());
|
|
1102
1103
|
|
|
1104
|
+
var TuiLanguageSwitcherComponent = /** @class */ (function () {
|
|
1105
|
+
function TuiLanguageSwitcherComponent(switcher, iconsPath) {
|
|
1106
|
+
this.switcher = switcher;
|
|
1107
|
+
this.iconsPath = iconsPath;
|
|
1108
|
+
this.path = this.iconsPath("tuiIcon").replace("tuiIcon.svg#tuiIcon", "");
|
|
1109
|
+
this.language = new FormControl(tuiCapitalizeFirstLetter(this.switcher.language));
|
|
1110
|
+
this.flags = new Map([
|
|
1111
|
+
["chinese", TuiCountryIsoCode.CN],
|
|
1112
|
+
["dutch", TuiCountryIsoCode.NL],
|
|
1113
|
+
["english", TuiCountryIsoCode.GB],
|
|
1114
|
+
["french", TuiCountryIsoCode.FR],
|
|
1115
|
+
["german", TuiCountryIsoCode.DE],
|
|
1116
|
+
["italian", TuiCountryIsoCode.IT],
|
|
1117
|
+
["polish", TuiCountryIsoCode.PL],
|
|
1118
|
+
["portuguese", TuiCountryIsoCode.PT],
|
|
1119
|
+
["russian", TuiCountryIsoCode.RU],
|
|
1120
|
+
["spanish", TuiCountryIsoCode.ES],
|
|
1121
|
+
["turkish", TuiCountryIsoCode.TR],
|
|
1122
|
+
["ukrainian", TuiCountryIsoCode.UA],
|
|
1123
|
+
["vietnamese", TuiCountryIsoCode.VN],
|
|
1124
|
+
]);
|
|
1125
|
+
this.names = Array.from(this.flags.keys());
|
|
1126
|
+
}
|
|
1127
|
+
TuiLanguageSwitcherComponent.prototype.getFlagPath = function (code) {
|
|
1128
|
+
return code ? "" + this.path + code + ".png" : null;
|
|
1129
|
+
};
|
|
1130
|
+
TuiLanguageSwitcherComponent.ctorParameters = function () { return [
|
|
1131
|
+
{ type: TuiLanguageSwitcher, decorators: [{ type: Inject, args: [TuiLanguageSwitcher,] }] },
|
|
1132
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_ICONS_PATH,] }] }
|
|
1133
|
+
]; };
|
|
1134
|
+
TuiLanguageSwitcherComponent = __decorate([
|
|
1135
|
+
Component({
|
|
1136
|
+
selector: "tui-language-switcher",
|
|
1137
|
+
template: "<tui-select [formControl]=\"language\">\n <ng-content></ng-content>\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let name of names\"\n tuiOption\n [value]=\"name | titlecase\"\n (click)=\"switcher.setLanguage(name)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"getFlagPath(flags.get(name))\"\n />\n {{ name | titlecase }}\n </button>\n </tui-data-list>\n</tui-select>\n",
|
|
1138
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1139
|
+
styles: [".t-flag{width:1.75rem;height:1.25rem;margin-right:.5rem}"]
|
|
1140
|
+
}),
|
|
1141
|
+
__param(0, Inject(TuiLanguageSwitcher)),
|
|
1142
|
+
__param(1, Inject(TUI_ICONS_PATH))
|
|
1143
|
+
], TuiLanguageSwitcherComponent);
|
|
1144
|
+
return TuiLanguageSwitcherComponent;
|
|
1145
|
+
}());
|
|
1146
|
+
|
|
1147
|
+
var TuiLanguageSwitcherModule = /** @class */ (function () {
|
|
1148
|
+
function TuiLanguageSwitcherModule() {
|
|
1149
|
+
}
|
|
1150
|
+
TuiLanguageSwitcherModule = __decorate([
|
|
1151
|
+
NgModule({
|
|
1152
|
+
exports: [TuiLanguageSwitcherComponent],
|
|
1153
|
+
declarations: [TuiLanguageSwitcherComponent],
|
|
1154
|
+
imports: [CommonModule, TuiSelectModule, TuiDataListModule, ReactiveFormsModule],
|
|
1155
|
+
})
|
|
1156
|
+
], TuiLanguageSwitcherModule);
|
|
1157
|
+
return TuiLanguageSwitcherModule;
|
|
1158
|
+
}());
|
|
1159
|
+
|
|
1103
1160
|
// @dynamic
|
|
1104
1161
|
var TuiDocMainComponent = /** @class */ (function () {
|
|
1105
1162
|
function TuiDocMainComponent(storage, windowRef) {
|
|
1106
1163
|
this.storage = storage;
|
|
1107
1164
|
this.windowRef = windowRef;
|
|
1108
|
-
this.night = this.storage.getItem(
|
|
1109
|
-
(this.storage.getItem(
|
|
1110
|
-
this.windowRef.matchMedia(
|
|
1165
|
+
this.night = this.storage.getItem("night") === "true" ||
|
|
1166
|
+
(this.storage.getItem("night") === null &&
|
|
1167
|
+
this.windowRef.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
1111
1168
|
this.change$ = new Subject();
|
|
1112
1169
|
}
|
|
1113
1170
|
TuiDocMainComponent_1 = TuiDocMainComponent;
|
|
1114
1171
|
Object.defineProperty(TuiDocMainComponent.prototype, "mode", {
|
|
1115
1172
|
get: function () {
|
|
1116
|
-
return this.night ?
|
|
1173
|
+
return this.night ? "onDark" : null;
|
|
1117
1174
|
},
|
|
1118
1175
|
enumerable: true,
|
|
1119
1176
|
configurable: true
|
|
@@ -1121,7 +1178,7 @@ var TuiDocMainComponent = /** @class */ (function () {
|
|
|
1121
1178
|
TuiDocMainComponent.prototype.onMode = function (night) {
|
|
1122
1179
|
this.night = night;
|
|
1123
1180
|
this.change$.next();
|
|
1124
|
-
this.storage.setItem(
|
|
1181
|
+
this.storage.setItem("night", String(night));
|
|
1125
1182
|
};
|
|
1126
1183
|
var TuiDocMainComponent_1;
|
|
1127
1184
|
TuiDocMainComponent.ctorParameters = function () { return [
|
|
@@ -1129,11 +1186,11 @@ var TuiDocMainComponent = /** @class */ (function () {
|
|
|
1129
1186
|
{ type: Window, decorators: [{ type: Inject, args: [WINDOW,] }] }
|
|
1130
1187
|
]; };
|
|
1131
1188
|
__decorate([
|
|
1132
|
-
HostBinding(
|
|
1189
|
+
HostBinding("attr.data-mode")
|
|
1133
1190
|
], TuiDocMainComponent.prototype, "mode", null);
|
|
1134
1191
|
TuiDocMainComponent = TuiDocMainComponent_1 = __decorate([
|
|
1135
1192
|
Component({
|
|
1136
|
-
selector:
|
|
1193
|
+
selector: "tui-doc-main",
|
|
1137
1194
|
template: "<tui-theme-night *ngIf=\"night\"></tui-theme-night>\n<tui-root>\n <div class=\"tui-doc-page\">\n <tui-doc-navigation class=\"tui-doc-navigation\">\n <ng-content select=\"tuiDocNavigation\"></ng-content>\n </tui-doc-navigation>\n <div class=\"tui-doc-content\">\n <router-outlet class=\"tui-doc-outlet\"></router-outlet>\n </div>\n </div>\n <header tuiDocHeader>\n <label class=\"night-mode\">\n Night mode\n <tui-toggle\n class=\"tui-toggle\"\n [ngModel]=\"night\"\n (ngModelChange)=\"onMode($event)\"\n ></tui-toggle>\n </label>\n <ng-content select=\"tuiDocHeader\"></ng-content>\n </header>\n <ng-container ngProjectAs=\"tuiOverContent\">\n <ng-content select=\"tuiOverContent\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverDialogs\">\n <ng-content select=\"tuiOverDialogs\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverAlerts\">\n <ng-content select=\"tuiOverAlerts\"></ng-content>\n </ng-container>\n <!-- TODO: 3.0 Remove-->\n <ng-container ngProjectAs=\"tuiOverNotifications\">\n <ng-content select=\"tuiOverNotifications\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverPortals\">\n <ng-content select=\"tuiOverPortals\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverHints\">\n <ng-content select=\"tuiOverHints\"></ng-content>\n </ng-container>\n</tui-root>\n",
|
|
1138
1195
|
encapsulation: ViewEncapsulation.None,
|
|
1139
1196
|
providers: [
|
|
@@ -1143,7 +1200,7 @@ var TuiDocMainComponent = /** @class */ (function () {
|
|
|
1143
1200
|
},
|
|
1144
1201
|
TuiSwipeService,
|
|
1145
1202
|
],
|
|
1146
|
-
styles: ["html{scroll-padding-top:4rem;height:auto}tui-root>tui-scroll-controls>.bar_vertical{top:4rem!important}@-webkit-keyframes tuiShaking{from,to{transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{transform:translate3d(-.3125rem,0,0)}20%,40%,60%,80%{transform:translate3d(.3125rem,0,0)}}@keyframes tuiShaking{from,to{transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{transform:translate3d(-.3125rem,0,0)}20%,40%,60%,80%{transform:translate3d(.3125rem,0,0)}}body{background:var(--tui-base-01);height:auto}tui-doc-main{display:block}code:not(.hljs):not([class*=language-]):not(.exception){transition-property:background;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;background:var(--tui-base-02);color:var(--tui-text-02);vertical-align:middle;box-shadow:inset 0 -2px var(--tui-secondary);padding:.375rem .5rem;font-size:.875rem;border-radius:.5rem}a:focus code,button:focus code{background:var(--tui-base-01)}.tui-doc-page{position:relative;z-index:0;padding-top:4rem}tui-doc-navigation.tui-doc-navigation{position:fixed;top:4rem;bottom:0;width:16.25rem;border-right:1px solid var(--tui-base-03)}.tui-doc-content{margin-left:16.25rem}@media screen and (max-width:47.9375em){tui-doc-navigation.tui-doc-navigation{display:none}.tui-doc-content{margin-left:0}}.tui-doc-outlet+*{display:block}.tui-doc-animated-example{-webkit-animation:1s .3s tuiShaking;animation:1s .3s tuiShaking}label.night-mode{cursor:pointer}label.night-mode .tui-toggle{margin-left:.5rem}.hljs-tag{background:0 0}.hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-01);background-color:var(--tui-clear-disabled)}.hljs.hljs-line-numbers{background:0 0}.hljs-subst,.hljs-title{font-weight:400;color:var(--tui-text-01)}.hljs-comment,.hljs-quote{color:var(--tui-text-03);font-style:italic}.hljs-meta{color:#e38162}.hljs-keyword,.hljs-literal,.hljs-name,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-selector-tag,.hljs-type{font-weight:700;color:var(--tui-link)}.hljs-attribute,.hljs-link,.hljs-number,.hljs-regexp{font-weight:700;color:var(--tui-support-06)}.hljs-link,.hljs-number,.hljs-regexp{font-weight:400}.hljs-string{color:var(--tui-positive);font-weight:700}.hljs-bullet,.hljs-formula,.hljs-symbol{color:var(--tui-text-01);background:var(--tui-base-02);font-style:italic}.hljs-doctag{text-decoration:underline}.hljs-template-variable,.hljs-variable{color:var(--tui-link-hover)}[data-mode=onDark] .hljs-template-variable,[data-mode=onDark] .hljs-variable{color:var(--tui-warning-fill)}.hljs-addition{background:var(--tui-success-bg)}.hljs-deletion{background:var(--tui-error-bg)}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs .hljs-line-numbers{padding:0}.hljs-ln-numbers{vertical-align:top;opacity:.3;text-align:right;padding-right:1em!important}"]
|
|
1203
|
+
styles: ["html{scroll-padding-top:4rem;height:auto}tui-root>tui-scroll-controls>.t-bar_vertical{top:4rem!important}@-webkit-keyframes tuiShaking{from,to{transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{transform:translate3d(-.3125rem,0,0)}20%,40%,60%,80%{transform:translate3d(.3125rem,0,0)}}@keyframes tuiShaking{from,to{transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{transform:translate3d(-.3125rem,0,0)}20%,40%,60%,80%{transform:translate3d(.3125rem,0,0)}}body{background:var(--tui-base-01);height:auto}tui-doc-main{display:block}code:not(.hljs):not([class*=language-]):not(.exception){transition-property:background;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;background:var(--tui-base-02);color:var(--tui-text-02);vertical-align:middle;box-shadow:inset 0 -2px var(--tui-secondary);padding:.375rem .5rem;font-size:.875rem;border-radius:.5rem}a:focus code,button:focus code{background:var(--tui-base-01)}.tui-doc-page{position:relative;z-index:0;padding-top:4rem}tui-doc-navigation.tui-doc-navigation{position:fixed;top:4rem;bottom:0;width:16.25rem;border-right:1px solid var(--tui-base-03)}.tui-doc-content{margin-left:16.25rem}@media screen and (max-width:47.9375em){tui-doc-navigation.tui-doc-navigation{display:none}.tui-doc-content{margin-left:0}}.tui-doc-outlet+*{display:block}.tui-doc-animated-example{-webkit-animation:1s .3s tuiShaking;animation:1s .3s tuiShaking}label.night-mode{cursor:pointer}label.night-mode .tui-toggle{margin-left:.5rem}.hljs-tag{background:0 0}.hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-01);background-color:var(--tui-clear-disabled)}.hljs.hljs-line-numbers{background:0 0}.hljs-subst,.hljs-title{font-weight:400;color:var(--tui-text-01)}.hljs-comment,.hljs-quote{color:var(--tui-text-03);font-style:italic}.hljs-meta{color:#e38162}.hljs-keyword,.hljs-literal,.hljs-name,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-selector-tag,.hljs-type{font-weight:700;color:var(--tui-link)}.hljs-attribute,.hljs-link,.hljs-number,.hljs-regexp{font-weight:700;color:var(--tui-support-06)}.hljs-link,.hljs-number,.hljs-regexp{font-weight:400}.hljs-string{color:var(--tui-positive);font-weight:700}.hljs-bullet,.hljs-formula,.hljs-symbol{color:var(--tui-text-01);background:var(--tui-base-02);font-style:italic}.hljs-doctag{text-decoration:underline}.hljs-template-variable,.hljs-variable{color:var(--tui-link-hover)}[data-mode=onDark] .hljs-template-variable,[data-mode=onDark] .hljs-variable{color:var(--tui-warning-fill)}.hljs-addition{background:var(--tui-success-bg)}.hljs-deletion{background:var(--tui-error-bg)}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs .hljs-line-numbers{padding:0}.hljs-ln-numbers{vertical-align:top;opacity:.3;text-align:right;padding-right:1em!important}"]
|
|
1147
1204
|
}),
|
|
1148
1205
|
__param(0, Inject(LOCAL_STORAGE)),
|
|
1149
1206
|
__param(1, Inject(WINDOW))
|
|
@@ -1151,7 +1208,7 @@ var TuiDocMainComponent = /** @class */ (function () {
|
|
|
1151
1208
|
return TuiDocMainComponent;
|
|
1152
1209
|
}());
|
|
1153
1210
|
|
|
1154
|
-
var TUI_DOC_PAGE_LOADED = new InjectionToken(
|
|
1211
|
+
var TUI_DOC_PAGE_LOADED = new InjectionToken("[TUI_DOC_PAGE_LOADED] Stream that emits if loading of page is over (for example, to begin scrollIntoView)", { factory: function () { return defer(function () { return timer(200).pipe(switchMapTo(of(true))); }); } });
|
|
1155
1212
|
|
|
1156
1213
|
/**
|
|
1157
1214
|
* @deprecated: use {@link TuiScrollIntoViewLinkDirective}
|
|
@@ -1185,7 +1242,7 @@ var ScrollIntoViewDirective = /** @class */ (function () {
|
|
|
1185
1242
|
], ScrollIntoViewDirective.prototype, "scrollIntoView", null);
|
|
1186
1243
|
ScrollIntoViewDirective = __decorate([
|
|
1187
1244
|
Directive({
|
|
1188
|
-
selector:
|
|
1245
|
+
selector: "[scrollIntoView]",
|
|
1189
1246
|
providers: [TuiDestroyService],
|
|
1190
1247
|
})
|
|
1191
1248
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
@@ -1203,7 +1260,7 @@ var TuiScrollIntoViewLinkDirective = /** @class */ (function (_super) {
|
|
|
1203
1260
|
}
|
|
1204
1261
|
TuiScrollIntoViewLinkDirective = __decorate([
|
|
1205
1262
|
Directive({
|
|
1206
|
-
selector:
|
|
1263
|
+
selector: "[tuiScrollIntoViewLink]",
|
|
1207
1264
|
providers: [TuiDestroyService],
|
|
1208
1265
|
})
|
|
1209
1266
|
], TuiScrollIntoViewLinkDirective);
|
|
@@ -1239,41 +1296,41 @@ var TuiScrollIntoViewLinkModule = /** @class */ (function () {
|
|
|
1239
1296
|
return TuiScrollIntoViewLinkModule;
|
|
1240
1297
|
}());
|
|
1241
1298
|
|
|
1242
|
-
var TUI_DOC_SCROLL_BEHAVIOR = new InjectionToken(
|
|
1299
|
+
var TUI_DOC_SCROLL_BEHAVIOR = new InjectionToken("[TUI_DOC_SCROLL_BEHAVIOR] Defines the transition animation for scroll", { factory: function () { return "smooth"; } });
|
|
1243
1300
|
|
|
1244
1301
|
var MAP = {
|
|
1245
|
-
а:
|
|
1246
|
-
б:
|
|
1247
|
-
в:
|
|
1248
|
-
г:
|
|
1249
|
-
д:
|
|
1250
|
-
е:
|
|
1251
|
-
ё:
|
|
1252
|
-
ж:
|
|
1253
|
-
з:
|
|
1254
|
-
и:
|
|
1255
|
-
й:
|
|
1256
|
-
к:
|
|
1257
|
-
л:
|
|
1258
|
-
м:
|
|
1259
|
-
н:
|
|
1260
|
-
о:
|
|
1261
|
-
п:
|
|
1262
|
-
р:
|
|
1263
|
-
с:
|
|
1264
|
-
т:
|
|
1265
|
-
у:
|
|
1266
|
-
ф:
|
|
1267
|
-
х:
|
|
1268
|
-
ц:
|
|
1269
|
-
ч:
|
|
1270
|
-
ш:
|
|
1271
|
-
щ:
|
|
1272
|
-
ъ:
|
|
1273
|
-
ы:
|
|
1274
|
-
ь:
|
|
1275
|
-
ю:
|
|
1276
|
-
я:
|
|
1302
|
+
а: "f",
|
|
1303
|
+
б: ",",
|
|
1304
|
+
в: "d",
|
|
1305
|
+
г: "u",
|
|
1306
|
+
д: "l",
|
|
1307
|
+
е: "t",
|
|
1308
|
+
ё: "`",
|
|
1309
|
+
ж: ";",
|
|
1310
|
+
з: "p",
|
|
1311
|
+
и: "b",
|
|
1312
|
+
й: "q",
|
|
1313
|
+
к: "r",
|
|
1314
|
+
л: "k",
|
|
1315
|
+
м: "v",
|
|
1316
|
+
н: "y",
|
|
1317
|
+
о: "j",
|
|
1318
|
+
п: "g",
|
|
1319
|
+
р: "h",
|
|
1320
|
+
с: "c",
|
|
1321
|
+
т: "n",
|
|
1322
|
+
у: "e",
|
|
1323
|
+
ф: "a",
|
|
1324
|
+
х: "[",
|
|
1325
|
+
ц: "w",
|
|
1326
|
+
ч: "x",
|
|
1327
|
+
ш: "i",
|
|
1328
|
+
щ: "o",
|
|
1329
|
+
ъ: "]",
|
|
1330
|
+
ы: "s",
|
|
1331
|
+
ь: "m",
|
|
1332
|
+
ю: ".",
|
|
1333
|
+
я: "z",
|
|
1277
1334
|
};
|
|
1278
1335
|
/**
|
|
1279
1336
|
* @deprecated: use {@link tuiTransliterateKeyboardLayout} instead
|
|
@@ -1283,7 +1340,7 @@ var MAP = {
|
|
|
1283
1340
|
*/
|
|
1284
1341
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1285
1342
|
function transliterateKeyboardLayout(string) {
|
|
1286
|
-
var newStr =
|
|
1343
|
+
var newStr = "";
|
|
1287
1344
|
for (var i = 0; i < string.length; i++) {
|
|
1288
1345
|
newStr += string.charAt(i) in MAP ? MAP[string.charAt(i)] : string.charAt(i);
|
|
1289
1346
|
}
|
|
@@ -1291,17 +1348,17 @@ function transliterateKeyboardLayout(string) {
|
|
|
1291
1348
|
}
|
|
1292
1349
|
var tuiTransliterateKeyboardLayout = transliterateKeyboardLayout;
|
|
1293
1350
|
|
|
1294
|
-
var TUI_DOC_PAGES = new InjectionToken(
|
|
1351
|
+
var TUI_DOC_PAGES = new InjectionToken("Documentation pages", {
|
|
1295
1352
|
factory: function () { return []; },
|
|
1296
1353
|
});
|
|
1297
1354
|
|
|
1298
|
-
var TUI_DOC_TITLE = new InjectionToken(
|
|
1299
|
-
factory: function () { return
|
|
1355
|
+
var TUI_DOC_TITLE = new InjectionToken("Page title", {
|
|
1356
|
+
factory: function () { return ""; },
|
|
1300
1357
|
});
|
|
1301
1358
|
|
|
1302
|
-
var NAVIGATION_TITLE = new InjectionToken(
|
|
1303
|
-
var NAVIGATION_LABELS = new InjectionToken(
|
|
1304
|
-
var NAVIGATION_ITEMS = new InjectionToken(
|
|
1359
|
+
var NAVIGATION_TITLE = new InjectionToken("Page title");
|
|
1360
|
+
var NAVIGATION_LABELS = new InjectionToken("Navigation sections labels for search");
|
|
1361
|
+
var NAVIGATION_ITEMS = new InjectionToken("Navigation pages");
|
|
1305
1362
|
var NAVIGATION_PROVIDERS = [
|
|
1306
1363
|
TuiDestroyService,
|
|
1307
1364
|
{
|
|
@@ -1367,12 +1424,12 @@ var TuiDocNavigationComponent = /** @class */ (function () {
|
|
|
1367
1424
|
this.readyToScroll$ = readyToScroll$;
|
|
1368
1425
|
this.scrollBehavior = scrollBehavior;
|
|
1369
1426
|
this.menuOpen = false;
|
|
1370
|
-
this.search =
|
|
1427
|
+
this.search = "";
|
|
1371
1428
|
this.open = false;
|
|
1372
1429
|
this.openPagesArr = [];
|
|
1373
1430
|
this.openPagesGroupsArr = [];
|
|
1374
|
-
this.active =
|
|
1375
|
-
this.mode$ = this.mode.change$.pipe(startWith(null), map(function () { return _this.mode.mode ||
|
|
1431
|
+
this.active = "";
|
|
1432
|
+
this.mode$ = this.mode.change$.pipe(startWith(null), map(function () { return _this.mode.mode || "onLight"; }));
|
|
1376
1433
|
// Angular can't navigate no anchor links
|
|
1377
1434
|
// https://stackoverflow.com/questions/36101756/angular2-routing-with-hashtag-to-page-anchor
|
|
1378
1435
|
title$.subscribe(function (title) {
|
|
@@ -1419,13 +1476,13 @@ var TuiDocNavigationComponent = /** @class */ (function () {
|
|
|
1419
1476
|
TuiDocNavigationComponent.prototype.onClick = function () {
|
|
1420
1477
|
this.open = false;
|
|
1421
1478
|
this.menuOpen = false;
|
|
1422
|
-
this.search =
|
|
1479
|
+
this.search = "";
|
|
1423
1480
|
this.openActivePageGroup();
|
|
1424
1481
|
};
|
|
1425
1482
|
TuiDocNavigationComponent.prototype.filterItems = function (items, search) {
|
|
1426
1483
|
return items.map(function (section) {
|
|
1427
1484
|
return uniqBy(section.filter(function (_a) {
|
|
1428
|
-
var title = _a.title, _b = _a.keywords, keywords = _b === void 0 ?
|
|
1485
|
+
var title = _a.title, _b = _a.keywords, keywords = _b === void 0 ? "" : _b;
|
|
1429
1486
|
title = title.toLowerCase();
|
|
1430
1487
|
search = search.toLowerCase();
|
|
1431
1488
|
keywords = keywords.toLowerCase();
|
|
@@ -1433,14 +1490,14 @@ var TuiDocNavigationComponent = /** @class */ (function () {
|
|
|
1433
1490
|
keywords.includes(search) ||
|
|
1434
1491
|
title.includes(transliterateKeyboardLayout(search)) ||
|
|
1435
1492
|
keywords.includes(transliterateKeyboardLayout(search)) ||
|
|
1436
|
-
search.replace(/-/gi,
|
|
1437
|
-
}),
|
|
1493
|
+
search.replace(/-/gi, "").includes(title));
|
|
1494
|
+
}), "title");
|
|
1438
1495
|
});
|
|
1439
1496
|
};
|
|
1440
1497
|
TuiDocNavigationComponent.prototype.flattenSubPages = function (items) {
|
|
1441
1498
|
return items.reduce(function (array, item) { return __spread(array, [
|
|
1442
1499
|
item.reduce(function (pages, page) {
|
|
1443
|
-
return
|
|
1500
|
+
return "subPages" in page
|
|
1444
1501
|
? __spread(pages, page.subPages) : __spread(pages, [page]);
|
|
1445
1502
|
}, []),
|
|
1446
1503
|
]); }, []);
|
|
@@ -1458,11 +1515,11 @@ var TuiDocNavigationComponent = /** @class */ (function () {
|
|
|
1458
1515
|
var _this = this;
|
|
1459
1516
|
this.items.forEach(function (pages, pagesIndex) {
|
|
1460
1517
|
pages.forEach(function (page, pageIndex) {
|
|
1461
|
-
if (
|
|
1518
|
+
if ("route" in page && _this.isActiveRoute(page.route)) {
|
|
1462
1519
|
_this.openPagesArr[pagesIndex] = true;
|
|
1463
1520
|
_this.active = page.route;
|
|
1464
1521
|
}
|
|
1465
|
-
if (
|
|
1522
|
+
if ("subPages" in page) {
|
|
1466
1523
|
page.subPages.forEach(function (subPage) {
|
|
1467
1524
|
if (_this.isActiveRoute(subPage.route)) {
|
|
1468
1525
|
_this.openPagesArr[pagesIndex] = true;
|
|
@@ -1479,10 +1536,10 @@ var TuiDocNavigationComponent = /** @class */ (function () {
|
|
|
1479
1536
|
if (!element) {
|
|
1480
1537
|
return;
|
|
1481
1538
|
}
|
|
1482
|
-
element.classList.add(
|
|
1539
|
+
element.classList.add("tui-doc-animated-example");
|
|
1483
1540
|
element.scrollIntoView({
|
|
1484
|
-
block:
|
|
1485
|
-
inline:
|
|
1541
|
+
block: "start",
|
|
1542
|
+
inline: "nearest",
|
|
1486
1543
|
behavior: this.scrollBehavior,
|
|
1487
1544
|
});
|
|
1488
1545
|
};
|
|
@@ -1503,7 +1560,7 @@ var TuiDocNavigationComponent = /** @class */ (function () {
|
|
|
1503
1560
|
{ type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_SCROLL_BEHAVIOR,] }] }
|
|
1504
1561
|
]; };
|
|
1505
1562
|
__decorate([
|
|
1506
|
-
HostBinding(
|
|
1563
|
+
HostBinding("class._open")
|
|
1507
1564
|
], TuiDocNavigationComponent.prototype, "menuOpen", void 0);
|
|
1508
1565
|
__decorate([
|
|
1509
1566
|
tuiPure
|
|
@@ -1513,7 +1570,7 @@ var TuiDocNavigationComponent = /** @class */ (function () {
|
|
|
1513
1570
|
], TuiDocNavigationComponent.prototype, "flattenSubPages", null);
|
|
1514
1571
|
TuiDocNavigationComponent = __decorate([
|
|
1515
1572
|
Component({
|
|
1516
|
-
selector:
|
|
1573
|
+
selector: "tui-doc-navigation",
|
|
1517
1574
|
template: "<tui-hosted-dropdown\n *tuiLet=\"filteredItems as filtered\"\n tuiAutoFocus\n tuiDropdownLimitWidth=\"fixed\"\n class=\"t-input\"\n [autoFocus]=\"!!sidebar\"\n [content]=\"dropdown\"\n [canOpen]=\"canOpen\"\n [(open)]=\"open\"\n>\n <tui-primitive-textfield\n iconAlign=\"left\"\n tuiTextfieldSize=\"m\"\n iconContent=\"tuiIconSearch\"\n [pseudoFocused]=\"open || null\"\n [tuiTextfieldCleaner]=\"true\"\n [tuiTextfieldLabelOutside]=\"true\"\n [value]=\"search\"\n (valueChange)=\"onSearchChange($event)\"\n >\n {{ searchText }}\n </tui-primitive-textfield>\n <ng-template\n #dropdown\n let-activeZone\n >\n <tui-data-list>\n <tui-opt-group\n *ngFor=\"let group of filtered; let index = index\"\n [label]=\"labels[index] || ''\"\n >\n <a\n *ngFor=\"let item of group\"\n tuiOption\n [routerLink]=\"item.route\"\n (click)=\"onClick()\"\n >\n {{ item.title }}\n </a>\n </tui-opt-group>\n </tui-data-list>\n </ng-template>\n</tui-hosted-dropdown>\n\n<nav class=\"t-navigation\">\n <tui-scrollbar\n class=\"t-scrollbar\"\n [tuiMode]=\"mode$ | async\"\n >\n <tui-accordion\n [closeOthers]=\"false\"\n [rounded]=\"false\"\n >\n <tui-accordion-item\n *ngFor=\"let label of labels; index as index\"\n size=\"s\"\n [borders]=\"null\"\n [(open)]=\"!!openPagesArr[index]\"\n >\n <span class=\"t-label\">\n <strong>{{ label }}</strong>\n </span>\n <ng-template tuiAccordionItemContent>\n <div class=\"t-section\">\n <ng-container\n *ngFor=\"let item of items[index]; index as subIndex\"\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: index * 100 + subIndex}\"\n ></ng-container>\n </div>\n </ng-template>\n </tui-accordion-item>\n </tui-accordion>\n <div class=\"t-items-container\">\n <ng-container\n *ngFor=\"let item of itemsWithoutSections; let index = index\"\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: items.length - 1 + index}\"\n ></ng-container>\n </div>\n\n <ng-template\n #pages\n let-item=\"item\"\n let-index=\"index\"\n >\n <a\n *ngIf=\"!item.subPages; else subPages\"\n tuiLink\n routerLinkActive=\"t-sublink_active\"\n class=\"t-sublink\"\n [routerLink]=\"item.route\"\n [scrollIntoView]=\"isActive(item.route)\"\n (click)=\"closeMenu()\"\n >\n {{ item.title }}\n </a>\n <ng-template #subPages>\n <div\n routerLinkActive\n class=\"t-subsection\"\n [routerLinkActiveOptions]=\"{exact: false}\"\n >\n <button\n *ngIf=\"item.subPages\"\n tuiLink\n type=\"button\"\n class=\"t-sublink t-sublink_subsection\"\n (click)=\"onGroupClick(index)\"\n >\n <tui-svg\n src=\"tuiIconChevronRight\"\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesGroupsArr[index]\"\n ></tui-svg>\n {{ item.title }}\n </button>\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"!!openPagesGroupsArr[index]\"\n >\n <div class=\"t-section t-section_bordered\">\n <a\n *ngFor=\"let subPage of item.subPages\"\n tuiLink\n routerLinkActive=\"t-sublink_active\"\n class=\"t-sublink t-sublink_small\"\n [routerLink]=\"subPage.route\"\n [scrollIntoView]=\"isActive(subPage.route)\"\n (click)=\"closeMenu()\"\n >\n {{ subPage.title }}\n </a>\n </div>\n </tui-expand>\n </div>\n </ng-template>\n </ng-template>\n </tui-scrollbar>\n</nav>\n\n<ng-content></ng-content>\n",
|
|
1518
1575
|
providers: NAVIGATION_PROVIDERS,
|
|
1519
1576
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1572,8 +1629,8 @@ var TuiDocNavigationModule = /** @class */ (function () {
|
|
|
1572
1629
|
return TuiDocNavigationModule;
|
|
1573
1630
|
}());
|
|
1574
1631
|
|
|
1575
|
-
var TUI_DOC_LOGO = new InjectionToken(
|
|
1576
|
-
factory: function () { return
|
|
1632
|
+
var TUI_DOC_LOGO = new InjectionToken("Main logo", {
|
|
1633
|
+
factory: function () { return ""; },
|
|
1577
1634
|
});
|
|
1578
1635
|
|
|
1579
1636
|
var TuiDocHeaderComponent = /** @class */ (function () {
|
|
@@ -1583,7 +1640,7 @@ var TuiDocHeaderComponent = /** @class */ (function () {
|
|
|
1583
1640
|
this.router = router;
|
|
1584
1641
|
this.swipes$ = swipes$;
|
|
1585
1642
|
this.stream$ = new Subject();
|
|
1586
|
-
this.open$ = merge(this.router.events.pipe(mapTo(false)), this.stream$, this.swipes$.pipe(filter(function (swipe) { return swipe.direction ===
|
|
1643
|
+
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());
|
|
1587
1644
|
}
|
|
1588
1645
|
TuiDocHeaderComponent.prototype.onClick = function () {
|
|
1589
1646
|
this.stream$.next(true);
|
|
@@ -1601,7 +1658,7 @@ var TuiDocHeaderComponent = /** @class */ (function () {
|
|
|
1601
1658
|
]; };
|
|
1602
1659
|
TuiDocHeaderComponent = __decorate([
|
|
1603
1660
|
Component({
|
|
1604
|
-
selector:
|
|
1661
|
+
selector: "header[tuiDocHeader]",
|
|
1605
1662
|
template: "<button\n tuiIconButton\n icon=\"tuiIconMenuLarge\"\n appearance=\"icon\"\n class=\"t-menu\"\n [title]=\"menu\"\n (click)=\"onClick()\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-doc-navigation\n *tuiSidebar=\"!!(open$ | async)\"\n class=\"t-navigation\"\n ></tui-doc-navigation>\n</button>\n<div\n polymorpheus-outlet\n class=\"t-logo\"\n [content]=\"logo\"\n>\n <ng-template let-src>\n <img\n alt=\"Logo\"\n class=\"t-img\"\n [src]=\"src\"\n />\n </ng-template>\n</div>\n<ng-content></ng-content>\n",
|
|
1606
1663
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1607
1664
|
styles: [":host{box-shadow:0 .125rem 1rem rgba(0,0,0,.08);position:fixed;top:0;left:0;right:0;z-index:1;display:flex;height:3.9375rem;align-items:center;padding:0 1.25rem;background:var(--tui-base-01);border-bottom:1px solid var(--tui-base-03)}.t-logo{margin-right:auto;font:var(--tui-font-heading-5)}.t-img{display:block}.t-menu{margin-left:-1.25rem}@media screen and (min-width:48em){.t-menu{display:none}}.t-navigation{min-height:100%}"]
|
|
@@ -1658,15 +1715,15 @@ var TuiDocMainModule = /** @class */ (function () {
|
|
|
1658
1715
|
return TuiDocMainModule;
|
|
1659
1716
|
}());
|
|
1660
1717
|
|
|
1661
|
-
var TUI_DOC_DEFAULT_TABS = new InjectionToken(
|
|
1718
|
+
var TUI_DOC_DEFAULT_TABS = new InjectionToken("Array of default tab names", {
|
|
1662
1719
|
factory: function () { return []; },
|
|
1663
1720
|
});
|
|
1664
1721
|
|
|
1665
|
-
var TUI_DOC_SEE_ALSO = new InjectionToken(
|
|
1722
|
+
var TUI_DOC_SEE_ALSO = new InjectionToken("Array of arrays of related pages", {
|
|
1666
1723
|
factory: function () { return []; },
|
|
1667
1724
|
});
|
|
1668
1725
|
|
|
1669
|
-
var PAGE_SEE_ALSO = new InjectionToken(
|
|
1726
|
+
var PAGE_SEE_ALSO = new InjectionToken("Page see also");
|
|
1670
1727
|
var PAGE_PROVIDERS = [
|
|
1671
1728
|
{
|
|
1672
1729
|
provide: PAGE_SEE_ALSO,
|
|
@@ -1677,11 +1734,11 @@ var PAGE_PROVIDERS = [
|
|
|
1677
1734
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1678
1735
|
function seeAlsoProviderFactory(_a, seeAlsoGroups) {
|
|
1679
1736
|
var nativeElement = _a.nativeElement;
|
|
1680
|
-
var currentHeader = nativeElement.getAttribute(
|
|
1737
|
+
var currentHeader = nativeElement.getAttribute("header");
|
|
1681
1738
|
var groups = seeAlsoGroups.filter(function (group) { return group.includes(currentHeader); }) || [];
|
|
1682
1739
|
var seeAlsoSet = new Set(groups
|
|
1683
1740
|
.join()
|
|
1684
|
-
.split(
|
|
1741
|
+
.split(",")
|
|
1685
1742
|
.filter(function (component) { return component && component !== currentHeader; }));
|
|
1686
1743
|
return Array.from(seeAlsoSet);
|
|
1687
1744
|
}
|
|
@@ -1699,7 +1756,7 @@ var TuiDocPageTabConnectorDirective = /** @class */ (function () {
|
|
|
1699
1756
|
], TuiDocPageTabConnectorDirective.prototype, "pageTab", void 0);
|
|
1700
1757
|
TuiDocPageTabConnectorDirective = __decorate([
|
|
1701
1758
|
Directive({
|
|
1702
|
-
selector:
|
|
1759
|
+
selector: "[pageTab]",
|
|
1703
1760
|
}),
|
|
1704
1761
|
__param(0, Inject(TemplateRef))
|
|
1705
1762
|
], TuiDocPageTabConnectorDirective);
|
|
@@ -1713,10 +1770,10 @@ var TuiDocPageComponent = /** @class */ (function () {
|
|
|
1713
1770
|
this.deprecated = deprecated;
|
|
1714
1771
|
this.defaultTabs = defaultTabs;
|
|
1715
1772
|
this.seeAlso = seeAlso;
|
|
1716
|
-
this.header =
|
|
1717
|
-
this.package =
|
|
1718
|
-
this.type =
|
|
1719
|
-
this.path =
|
|
1773
|
+
this.header = "";
|
|
1774
|
+
this.package = "";
|
|
1775
|
+
this.type = "";
|
|
1776
|
+
this.path = "";
|
|
1720
1777
|
this.tabConnectors = EMPTY_QUERY;
|
|
1721
1778
|
this.activeItemIndex = NaN;
|
|
1722
1779
|
}
|
|
@@ -1728,11 +1785,11 @@ var TuiDocPageComponent = /** @class */ (function () {
|
|
|
1728
1785
|
configurable: true
|
|
1729
1786
|
});
|
|
1730
1787
|
TuiDocPageComponent.prototype.getRouterLink = function (tab) {
|
|
1731
|
-
if (tab === void 0) { tab =
|
|
1732
|
-
return "./" + tab.replace(/ /g,
|
|
1788
|
+
if (tab === void 0) { tab = ""; }
|
|
1789
|
+
return "./" + tab.replace(/ /g, "_");
|
|
1733
1790
|
};
|
|
1734
1791
|
TuiDocPageComponent.ctorParameters = function () { return [
|
|
1735
|
-
{ type: String, decorators: [{ type: Attribute, args: [
|
|
1792
|
+
{ type: String, decorators: [{ type: Attribute, args: ["deprecated",] }] },
|
|
1736
1793
|
{ type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_DEFAULT_TABS,] }] },
|
|
1737
1794
|
{ type: undefined, decorators: [{ type: Inject, args: [PAGE_SEE_ALSO,] }] }
|
|
1738
1795
|
]; };
|
|
@@ -1753,13 +1810,13 @@ var TuiDocPageComponent = /** @class */ (function () {
|
|
|
1753
1810
|
], TuiDocPageComponent.prototype, "tabConnectors", void 0);
|
|
1754
1811
|
TuiDocPageComponent = __decorate([
|
|
1755
1812
|
Component({
|
|
1756
|
-
selector:
|
|
1813
|
+
selector: "tui-doc-page",
|
|
1757
1814
|
template: "<header class=\"t-header\">\n <h1 class=\"t-title\">\n {{ header }}\n <tui-tag\n *ngIf=\"deprecated !== null\"\n value=\"deprecated\"\n status=\"custom\"\n class=\"t-tag t-tag_deprecated\"\n ></tui-tag>\n <tui-tag\n *ngIf=\"package\"\n status=\"custom\"\n class=\"t-tag t-tag_package\"\n [value]=\"package\"\n [autoColor]=\"true\"\n ></tui-tag>\n </h1>\n <tui-tabs-with-more\n *ngIf=\"tabConnectors.length\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabConnectors; first as first; index as index\">\n <ng-container *ngIf=\"first; else dynamicTab\">\n <a\n *tuiTab\n tuiTab\n routerLink=\"./\"\n routerLinkActive\n [routerLinkActiveOptions]=\"{exact: true}\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-container>\n <ng-template #dynamicTab>\n <a\n *tuiTab\n tuiTab\n routerLinkActive\n [routerLink]=\"getRouterLink(tab.pageTab || defaultTabs[index])\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-template>\n </ng-container>\n </tui-tabs-with-more>\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header\"\n [package]=\"package\"\n [type]=\"type\"\n [path]=\"path\"\n ></tui-doc-source-code>\n</header>\n<div class=\"t-content\">\n <ng-content></ng-content>\n <tui-doc-see-also\n *ngIf=\"showSeeAlso\"\n class=\"t-see-also\"\n [seeAlso]=\"seeAlso\"\n ></tui-doc-see-also>\n <ng-container *ngFor=\"let tab of tabConnectors; index as index\">\n <ng-container\n *ngIf=\"index === activeItemIndex\"\n [ngTemplateOutlet]=\"tab.template\"\n ></ng-container>\n </ng-container>\n</div>\n",
|
|
1758
1815
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1759
1816
|
providers: PAGE_PROVIDERS,
|
|
1760
1817
|
styles: [":host{display:flex;flex-direction:column;min-height:0;flex-basis:0;flex-grow:1}.t-header{display:flex;font:var(--tui-font-heading-3);flex-wrap:wrap;min-height:7.25rem;color:var(--tui-text-01);box-shadow:inset 0 -1px 0 0 var(--tui-base-03);padding:3.75rem 0 0;box-sizing:border-box;flex-shrink:0;margin:0 min(10vw,8.75rem)}:host-context(tui-root._mobile) .t-header{font:var(--tui-font-heading-4);min-height:4.5rem;padding:1.25rem 1.25rem 0;margin:0}.t-title{min-width:100%;font-size:inherit;margin:0}.t-tag{vertical-align:middle;text-transform:uppercase;margin-right:.5rem}.t-tag_deprecated{background-color:var(--tui-error-fill)}.t-tag.t-tag_package{color:#000}.t-tabs{flex:1;margin:1.125rem .3125rem 0 0}:host-context(tui-root._mobile) .t-tabs{margin-top:.25rem}.t-content{padding:2rem 0;margin:0 min(10vw,8.75rem)}:host-context(tui-root._mobile) .t-content{padding:2rem 1.25rem;margin:0}.t-see-also{min-width:18.75rem;width:30%;float:right;margin-left:1.5rem}:host-context(tui-root._mobile) .t-see-also{float:none;width:100%;margin:0 0 1.5rem}.t-source-code{align-self:flex-end;line-height:2.75rem}"]
|
|
1761
1818
|
}),
|
|
1762
|
-
__param(0, Attribute(
|
|
1819
|
+
__param(0, Attribute("deprecated")),
|
|
1763
1820
|
__param(1, Inject(TUI_DOC_DEFAULT_TABS)),
|
|
1764
1821
|
__param(2, Inject(PAGE_SEE_ALSO))
|
|
1765
1822
|
], TuiDocPageComponent);
|
|
@@ -1776,14 +1833,14 @@ var TuiDocSeeAlsoComponent = /** @class */ (function () {
|
|
|
1776
1833
|
TuiDocSeeAlsoComponent.prototype.getRouterLink = function (pageTitle) {
|
|
1777
1834
|
for (var i = 0; i < this.pages.length; i++) {
|
|
1778
1835
|
var page = this.pages
|
|
1779
|
-
.map(function (page) { return (
|
|
1836
|
+
.map(function (page) { return ("subPages" in page ? page.subPages : [page]); })
|
|
1780
1837
|
.reduce(function (pages, subPages) { return __spread(pages, subPages); }, [])
|
|
1781
1838
|
.find(function (page) { return page.title === pageTitle; });
|
|
1782
1839
|
if (page === null || page === void 0 ? void 0 : page.route) {
|
|
1783
1840
|
return page.route;
|
|
1784
1841
|
}
|
|
1785
1842
|
}
|
|
1786
|
-
return
|
|
1843
|
+
return "";
|
|
1787
1844
|
};
|
|
1788
1845
|
TuiDocSeeAlsoComponent.ctorParameters = function () { return [
|
|
1789
1846
|
{ type: String, decorators: [{ type: Inject, args: [TUI_DOC_SEE_ALSO_TEXT,] }] },
|
|
@@ -1794,10 +1851,10 @@ var TuiDocSeeAlsoComponent = /** @class */ (function () {
|
|
|
1794
1851
|
], TuiDocSeeAlsoComponent.prototype, "seeAlso", void 0);
|
|
1795
1852
|
TuiDocSeeAlsoComponent = __decorate([
|
|
1796
1853
|
Component({
|
|
1797
|
-
selector:
|
|
1798
|
-
template: "<h5 class=\"header\">{{ text }}</h5>\n<ng-container *ngFor=\"let item of seeAlso; last as last\">\n <a\n tuiLink\n [routerLink]=\"getRouterLink(item)\"\n >\n {{ item }}\n </a>\n <ng-container *ngIf=\"!last\">{{ ', ' }}</ng-container>\n</ng-container>\n",
|
|
1854
|
+
selector: "tui-doc-see-also",
|
|
1855
|
+
template: "<h5 class=\"t-header\">{{ text }}</h5>\n<ng-container *ngFor=\"let item of seeAlso; last as last\">\n <a\n tuiLink\n [routerLink]=\"getRouterLink(item)\"\n >\n {{ item }}\n </a>\n <ng-container *ngIf=\"!last\">{{ ', ' }}</ng-container>\n</ng-container>\n",
|
|
1799
1856
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1800
|
-
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}"]
|
|
1857
|
+
styles: [":host{display:block}.t-header{font-size:.6875rem;line-height:1rem;text-transform:uppercase;letter-spacing:.075em;color:var(--tui-text-02);margin:0 0 .5rem;white-space:nowrap}"]
|
|
1801
1858
|
}),
|
|
1802
1859
|
__param(0, Inject(TUI_DOC_SEE_ALSO_TEXT)),
|
|
1803
1860
|
__param(1, Inject(TUI_DOC_PAGES))
|
|
@@ -1818,18 +1875,18 @@ var TuiDocSeeAlsoModule = /** @class */ (function () {
|
|
|
1818
1875
|
return TuiDocSeeAlsoModule;
|
|
1819
1876
|
}());
|
|
1820
1877
|
|
|
1821
|
-
var TUI_DOC_SOURCE_CODE = new InjectionToken(
|
|
1822
|
-
factory: function () { return
|
|
1878
|
+
var TUI_DOC_SOURCE_CODE = new InjectionToken("Source code link", {
|
|
1879
|
+
factory: function () { return ""; },
|
|
1823
1880
|
});
|
|
1824
1881
|
|
|
1825
1882
|
var TuiDocSourceCodeComponent = /** @class */ (function () {
|
|
1826
1883
|
function TuiDocSourceCodeComponent(sourceCode, text) {
|
|
1827
1884
|
this.sourceCode = sourceCode;
|
|
1828
1885
|
this.text = text;
|
|
1829
|
-
this.header =
|
|
1830
|
-
this.package =
|
|
1831
|
-
this.type =
|
|
1832
|
-
this.path =
|
|
1886
|
+
this.header = "";
|
|
1887
|
+
this.package = "";
|
|
1888
|
+
this.type = "";
|
|
1889
|
+
this.path = "";
|
|
1833
1890
|
}
|
|
1834
1891
|
Object.defineProperty(TuiDocSourceCodeComponent.prototype, "pathOptions", {
|
|
1835
1892
|
get: function () {
|
|
@@ -1867,7 +1924,7 @@ var TuiDocSourceCodeComponent = /** @class */ (function () {
|
|
|
1867
1924
|
], TuiDocSourceCodeComponent.prototype, "getPathOptions", null);
|
|
1868
1925
|
TuiDocSourceCodeComponent = __decorate([
|
|
1869
1926
|
Component({
|
|
1870
|
-
selector:
|
|
1927
|
+
selector: "tui-doc-source-code",
|
|
1871
1928
|
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",
|
|
1872
1929
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1873
1930
|
}),
|
|
@@ -1911,21 +1968,21 @@ var TuiDocPageModule = /** @class */ (function () {
|
|
|
1911
1968
|
}());
|
|
1912
1969
|
|
|
1913
1970
|
var TUI_EXAMPLE_PRIMARY_FILE_NAME = {
|
|
1914
|
-
TS:
|
|
1915
|
-
LESS:
|
|
1916
|
-
HTML:
|
|
1971
|
+
TS: "TypeScript",
|
|
1972
|
+
LESS: "LESS",
|
|
1973
|
+
HTML: "HTML",
|
|
1917
1974
|
};
|
|
1918
1975
|
|
|
1919
1976
|
// TODO: 3.0 remove in ivy compilation
|
|
1920
|
-
var DEMO_TEXTS = [
|
|
1977
|
+
var DEMO_TEXTS = ["\u0421\u0434\u0435\u043B\u0430\u043D\u043E \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0434\u0438\u0440\u0435\u043A\u0442\u0438\u0432\u044B: ", "\u0424\u043E\u043D", "\u0414\u0435\u0442\u0430\u043B\u0438 \u0444\u043E\u0440\u043C\u044B"];
|
|
1921
1978
|
var DOC_TEXTS = [
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1979
|
+
"\u0410\u0440\u0433\u0443\u043C\u0435\u043D\u0442",
|
|
1980
|
+
"\u0422\u0438\u043F",
|
|
1981
|
+
"\u0418\u043C\u044F \u0438 \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435",
|
|
1982
|
+
"\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435",
|
|
1983
|
+
"\u0414\u043B\u044F \u0440\u0430\u0431\u043E\u0442\u044B \u0441 \u0434\u0438\u043D\u0430\u043C\u0438\u0447\u0435\u0441\u043A\u0438\u043C\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0430\u043C\u0438 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F",
|
|
1927
1984
|
];
|
|
1928
|
-
var EXAMPLE_TEXTS = [
|
|
1985
|
+
var EXAMPLE_TEXTS = ["\u041F\u0440\u0435\u0432\u044C\u044E", "\u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u043F\u0440\u0438\u043C\u0435\u0440 \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u0430", "\u0413\u043E\u0442\u043E\u0432\u043E"];
|
|
1929
1986
|
var TUI_DOC_RUSSIAN = [
|
|
1930
1987
|
{
|
|
1931
1988
|
provide: TUI_DOC_DEMO_TEXTS,
|
|
@@ -1941,19 +1998,19 @@ var TUI_DOC_RUSSIAN = [
|
|
|
1941
1998
|
},
|
|
1942
1999
|
{
|
|
1943
2000
|
provide: TUI_DOC_MENU_TEXT,
|
|
1944
|
-
useValue:
|
|
2001
|
+
useValue: "\u041C\u0435\u043D\u044E",
|
|
1945
2002
|
},
|
|
1946
2003
|
{
|
|
1947
2004
|
provide: TUI_DOC_SEARCH_TEXT,
|
|
1948
|
-
useValue:
|
|
2005
|
+
useValue: "\u041F\u043E\u0438\u0441\u043A",
|
|
1949
2006
|
},
|
|
1950
2007
|
{
|
|
1951
2008
|
provide: TUI_DOC_SEE_ALSO_TEXT,
|
|
1952
|
-
useValue:
|
|
2009
|
+
useValue: "\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435 \u0442\u0430\u043A\u0436\u0435",
|
|
1953
2010
|
},
|
|
1954
2011
|
{
|
|
1955
2012
|
provide: TUI_DOC_SOURCE_CODE_TEXT,
|
|
1956
|
-
useValue:
|
|
2013
|
+
useValue: "\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u043A\u043E\u0434",
|
|
1957
2014
|
},
|
|
1958
2015
|
];
|
|
1959
2016
|
|
|
@@ -1982,11 +2039,11 @@ var TuiAddonDocModule = /** @class */ (function () {
|
|
|
1982
2039
|
function generateRoutes(type) {
|
|
1983
2040
|
return [
|
|
1984
2041
|
{
|
|
1985
|
-
path:
|
|
2042
|
+
path: "",
|
|
1986
2043
|
component: type,
|
|
1987
2044
|
children: [
|
|
1988
2045
|
{
|
|
1989
|
-
path:
|
|
2046
|
+
path: ":tab",
|
|
1990
2047
|
component: type,
|
|
1991
2048
|
},
|
|
1992
2049
|
],
|
|
@@ -2003,5 +2060,5 @@ var tuiGenerateRoutes = generateRoutes;
|
|
|
2003
2060
|
* Generated bundle index. Do not edit.
|
|
2004
2061
|
*/
|
|
2005
2062
|
|
|
2006
|
-
export { DEMO_TEXTS, DOC_TEXTS, EXAMPLE_TEXTS, ScrollIntoViewDirective, ScrollIntoViewModule, TUI_DOC_CODE_ACTIONS, TUI_DOC_CODE_EDITOR, TUI_DOC_DEFAULT_TABS, TUI_DOC_DEMO_TEXTS, TUI_DOC_DOCUMENTATION_TEXTS, TUI_DOC_EXAMPLE_CONTENT_PROCESSOR, TUI_DOC_EXAMPLE_TEXTS, TUI_DOC_LOGO, TUI_DOC_MENU_TEXT, TUI_DOC_PAGES, TUI_DOC_PAGE_LOADED, TUI_DOC_RUSSIAN, TUI_DOC_SCROLL_BEHAVIOR, TUI_DOC_SEARCH_TEXT, TUI_DOC_SEE_ALSO, TUI_DOC_SEE_ALSO_TEXT, TUI_DOC_SOURCE_CODE, TUI_DOC_SOURCE_CODE_TEXT, TUI_DOC_TITLE, TUI_EXAMPLE_PRIMARY_FILE_NAME, TuiAddonDocModule, TuiDocCodeComponent, TuiDocCodeModule, TuiDocCopyComponent, TuiDocCopyModule, TuiDocDemoComponent, TuiDocDemoModule, TuiDocDocumentationComponent, TuiDocDocumentationModule, TuiDocDocumentationPropertyConnectorDirective, TuiDocExampleComponent, TuiDocExampleModule, TuiDocMainComponent, TuiDocMainModule, TuiDocNavigationComponent, TuiDocNavigationModule, TuiDocPageComponent, TuiDocPageModule, TuiDocPageTabConnectorDirective, TuiScrollIntoViewLinkDirective, TuiScrollIntoViewLinkModule, coerceValue, generateRoutes, rawLoad, rawLoadRecord, tryParseMarkdownCodeBlock, tuiCoerceValue, tuiGenerateRoutes, tuiRawLoad, tuiRawLoadRecord, tuiTryParseMarkdownCodeBlock, TuiInputOpacityModule as ɵa, TuiInputOpacityDirective as ɵb, TuiDocExampleGetTabsPipe as ɵc, TuiDocExampleCapitalizePipe as ɵd, TuiDocHeaderModule as ɵe, NAVIGATION_TITLE as ɵf, NAVIGATION_LABELS as ɵg, NAVIGATION_ITEMS as ɵh, NAVIGATION_PROVIDERS as ɵi, titleProviderFactory as ɵj, labelsProviderFactory as ɵk, itemsProviderFactory as ɵl, TuiDocHeaderComponent as ɵm, PAGE_SEE_ALSO as ɵn, PAGE_PROVIDERS as ɵo, seeAlsoProviderFactory as ɵp, TuiDocSeeAlsoModule as ɵq, TuiDocSeeAlsoComponent as ɵr, TuiDocSourceCodeModule as ɵs, TuiDocSourceCodeComponent as ɵt };
|
|
2063
|
+
export { DEMO_TEXTS, DOC_TEXTS, EXAMPLE_TEXTS, ScrollIntoViewDirective, ScrollIntoViewModule, TUI_DOC_CODE_ACTIONS, TUI_DOC_CODE_EDITOR, TUI_DOC_DEFAULT_TABS, TUI_DOC_DEMO_TEXTS, TUI_DOC_DOCUMENTATION_TEXTS, TUI_DOC_EXAMPLE_CONTENT_PROCESSOR, TUI_DOC_EXAMPLE_TEXTS, TUI_DOC_LOGO, TUI_DOC_MENU_TEXT, TUI_DOC_PAGES, TUI_DOC_PAGE_LOADED, TUI_DOC_RUSSIAN, TUI_DOC_SCROLL_BEHAVIOR, TUI_DOC_SEARCH_TEXT, TUI_DOC_SEE_ALSO, TUI_DOC_SEE_ALSO_TEXT, TUI_DOC_SOURCE_CODE, TUI_DOC_SOURCE_CODE_TEXT, TUI_DOC_TITLE, TUI_EXAMPLE_PRIMARY_FILE_NAME, TuiAddonDocModule, TuiDocCodeComponent, TuiDocCodeModule, TuiDocCopyComponent, TuiDocCopyModule, TuiDocDemoComponent, TuiDocDemoModule, TuiDocDocumentationComponent, TuiDocDocumentationModule, TuiDocDocumentationPropertyConnectorDirective, TuiDocExampleComponent, TuiDocExampleModule, TuiDocMainComponent, TuiDocMainModule, TuiDocNavigationComponent, TuiDocNavigationModule, TuiDocPageComponent, TuiDocPageModule, TuiDocPageTabConnectorDirective, TuiLanguageSwitcherComponent, TuiLanguageSwitcherModule, TuiScrollIntoViewLinkDirective, TuiScrollIntoViewLinkModule, coerceValue, generateRoutes, rawLoad, rawLoadRecord, tryParseMarkdownCodeBlock, tuiCoerceValue, tuiGenerateRoutes, tuiRawLoad, tuiRawLoadRecord, tuiTryParseMarkdownCodeBlock, TuiInputOpacityModule as ɵa, TuiInputOpacityDirective as ɵb, TuiDocExampleGetTabsPipe as ɵc, TuiDocExampleCapitalizePipe as ɵd, TuiDocHeaderModule as ɵe, NAVIGATION_TITLE as ɵf, NAVIGATION_LABELS as ɵg, NAVIGATION_ITEMS as ɵh, NAVIGATION_PROVIDERS as ɵi, titleProviderFactory as ɵj, labelsProviderFactory as ɵk, itemsProviderFactory as ɵl, TuiDocHeaderComponent as ɵm, PAGE_SEE_ALSO as ɵn, PAGE_PROVIDERS as ɵo, seeAlsoProviderFactory as ɵp, TuiDocSeeAlsoModule as ɵq, TuiDocSeeAlsoComponent as ɵr, TuiDocSourceCodeModule as ɵs, TuiDocSourceCodeComponent as ɵt };
|
|
2007
2064
|
//# sourceMappingURL=taiga-ui-addon-doc.js.map
|