@taiga-ui/addon-doc 3.16.0 → 3.17.0-dev.main-1be6586
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 +54 -45
- package/bundles/taiga-ui-addon-doc.umd.js.map +1 -1
- package/components/code/code.component.d.ts +3 -0
- package/components/example/example.component.d.ts +4 -4
- package/components/page/page.component.d.ts +4 -4
- package/esm2015/components/code/code.component.js +13 -8
- package/esm2015/components/example/example.component.js +11 -12
- package/esm2015/components/main/main.component.js +6 -3
- package/esm2015/components/navigation/navigation.component.js +3 -3
- package/esm2015/components/page/page.component.js +8 -9
- package/esm2015/tokens/example-content-processor.js +3 -1
- package/esm2015/utils/coerce-value.js +2 -4
- package/fesm2015/taiga-ui-addon-doc.js +45 -40
- package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
- package/package.json +5 -5
- package/tokens/example-content-processor.d.ts +1 -0
|
@@ -40,6 +40,24 @@
|
|
|
40
40
|
var i8__namespace$1 = /*#__PURE__*/_interopNamespace(i8$1);
|
|
41
41
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
42
42
|
|
|
43
|
+
function tuiTryParseMarkdownCodeBlock(text) {
|
|
44
|
+
if (text === void 0) { text = ""; }
|
|
45
|
+
var tokens = new MarkdownIt__default["default"]().parse(text, {});
|
|
46
|
+
var result = tokens
|
|
47
|
+
.filter(function (_a) {
|
|
48
|
+
var tag = _a.tag, type = _a.type;
|
|
49
|
+
return tag === "code" && type === "fence";
|
|
50
|
+
})
|
|
51
|
+
.map(function (_a) {
|
|
52
|
+
var content = _a.content;
|
|
53
|
+
return content;
|
|
54
|
+
});
|
|
55
|
+
return result.length ? result : [text];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
var TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new i0.InjectionToken("[TUI_DOC_EXAMPLE_CONTENT_PROCESSOR]: Processes content in example", { factory: function () { return i9.identity; } });
|
|
59
|
+
var TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR = new i0.InjectionToken("[TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR]: Processes markdown in code block", { factory: function () { return tuiTryParseMarkdownCodeBlock; } });
|
|
60
|
+
|
|
43
61
|
/******************************************************************************
|
|
44
62
|
Copyright (c) Microsoft Corporation.
|
|
45
63
|
|
|
@@ -387,26 +405,13 @@
|
|
|
387
405
|
});
|
|
388
406
|
}
|
|
389
407
|
|
|
390
|
-
function tuiTryParseMarkdownCodeBlock(text) {
|
|
391
|
-
if (text === void 0) { text = ""; }
|
|
392
|
-
var tokens = new MarkdownIt__default["default"]().parse(text, {});
|
|
393
|
-
var result = tokens
|
|
394
|
-
.filter(function (_a) {
|
|
395
|
-
var tag = _a.tag, type = _a.type;
|
|
396
|
-
return tag === "code" && type === "fence";
|
|
397
|
-
})
|
|
398
|
-
.map(function (_a) {
|
|
399
|
-
var content = _a.content;
|
|
400
|
-
return content;
|
|
401
|
-
});
|
|
402
|
-
return result.length ? result : [text];
|
|
403
|
-
}
|
|
404
|
-
|
|
405
408
|
var TuiDocCodeComponent = /** @class */ (function () {
|
|
406
|
-
function TuiDocCodeComponent() {
|
|
409
|
+
function TuiDocCodeComponent(markdownCodeProcessor) {
|
|
410
|
+
var _this = this;
|
|
411
|
+
this.markdownCodeProcessor = markdownCodeProcessor;
|
|
407
412
|
this.rawLoader$$ = new i9.BehaviorSubject('');
|
|
408
413
|
this.filename = '';
|
|
409
|
-
this.processor$ = this.rawLoader$$.pipe(operators.switchMap(tuiRawLoad), operators.map(
|
|
414
|
+
this.processor$ = this.rawLoader$$.pipe(operators.switchMap(tuiRawLoad), operators.map(function (value) { return _this.markdownCodeProcessor(value); }));
|
|
410
415
|
}
|
|
411
416
|
Object.defineProperty(TuiDocCodeComponent.prototype, "code", {
|
|
412
417
|
set: function (code) {
|
|
@@ -424,16 +429,22 @@
|
|
|
424
429
|
});
|
|
425
430
|
return TuiDocCodeComponent;
|
|
426
431
|
}());
|
|
427
|
-
TuiDocCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocCodeComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
428
|
-
TuiDocCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocCodeComponent, selector: "tui-doc-code", inputs: { filename: "filename", code: "code" }, host: { properties: { "class._has-filename": "this.hasFilename" } }, ngImport: i0__namespace, template: "<!-- eslint-disable @html-eslint/element-newline -->\n<p\n *ngIf=\"filename\"\n class=\"t-header\"\n>\n {{ filename }}\n</p>\n<pre\n *ngFor=\"let content of processor$ | async\"\n class=\"t-code\"\n><code [lineNumbers]=\"true\" [highlight]=\"content\"></code></pre>\n", styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:bold}.t-code{margin:0}.t-code+.t-code{margin-top:1rem}.hljs:not(:empty){font:var(--tui-font-text-m);padding:1.5rem 2rem;font-family:monospace;background:var(--tui-clear);word-wrap:break-word;white-space:pre-wrap}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.hljs:not(:empty)::-webkit-scrollbar,.hljs:not(:empty)::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:2.667rem solid transparent}.hljs:not(:empty)::-webkit-scrollbar{background-color:transparent}.hljs:not(:empty)::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}.hljs:not(:empty)::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}.hljs:not(:empty)::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}:host._has-filename .hljs:not(:empty){border-radius:.75rem}:host-context(tui-root._mobile) .hljs:not(:empty){padding:1rem}\n"], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.Highlight, selector: "[highlight]", inputs: ["highlight", "languages", "lineNumbers"], outputs: ["highlighted"] }], pipes: { "async": i5__namespace.AsyncPipe } });
|
|
432
|
+
TuiDocCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocCodeComponent, deps: [{ token: TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
433
|
+
TuiDocCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocCodeComponent, selector: "tui-doc-code", inputs: { filename: "filename", code: "code" }, host: { properties: { "class._has-filename": "this.hasFilename" } }, ngImport: i0__namespace, template: "<!-- eslint-disable @html-eslint/element-newline -->\n<p\n *ngIf=\"filename\"\n class=\"t-header\"\n>\n {{ filename }}\n</p>\n<pre\n *ngFor=\"let content of processor$ | async\"\n class=\"t-code\"\n><code [lineNumbers]=\"true\" [highlight]=\"content\"></code></pre>\n", styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:bold}.t-code{margin:0}.t-code+.t-code{margin-top:1rem}.hljs:not(:empty){font:var(--tui-font-text-m);padding:1.5rem 2rem;font-family:monospace;background:var(--tui-clear);word-wrap:break-word;white-space:pre-wrap}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.hljs:not(:empty)::-webkit-scrollbar,.hljs:not(:empty)::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:2.667rem solid transparent}.hljs:not(:empty)::-webkit-scrollbar{background-color:transparent}.hljs:not(:empty)::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}.hljs:not(:empty)::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}.hljs:not(:empty)::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}:host._has-filename .hljs:not(:empty){border-radius:.75rem}:host-context(tui-root._mobile) .hljs:not(:empty){padding:1rem}\n"], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.Highlight, selector: "[highlight]", inputs: ["highlight", "languages", "lineNumbers"], outputs: ["highlighted"] }], pipes: { "async": i5__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
429
434
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocCodeComponent, decorators: [{
|
|
430
435
|
type: i0.Component,
|
|
431
436
|
args: [{
|
|
432
437
|
selector: 'tui-doc-code',
|
|
433
438
|
templateUrl: './code.template.html',
|
|
434
439
|
styleUrls: ['./code.style.less'],
|
|
440
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
435
441
|
}]
|
|
436
|
-
}],
|
|
442
|
+
}], ctorParameters: function () {
|
|
443
|
+
return [{ type: undefined, decorators: [{
|
|
444
|
+
type: i0.Inject,
|
|
445
|
+
args: [TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR]
|
|
446
|
+
}] }];
|
|
447
|
+
}, propDecorators: { filename: [{
|
|
437
448
|
type: i0.Input
|
|
438
449
|
}], code: [{
|
|
439
450
|
type: i0.Input
|
|
@@ -827,9 +838,7 @@
|
|
|
827
838
|
return value === "true" || value === "false";
|
|
828
839
|
}
|
|
829
840
|
function isNumberParamValue(value) {
|
|
830
|
-
|
|
831
|
-
// eslint-disable-next-line unicorn/no-unsafe-regex
|
|
832
|
-
return /^-?[\d.]+(?:e-?\d+)?$/.test(value);
|
|
841
|
+
return !!value.trim() && !Number.isNaN(Number(value)) && !value.startsWith("+");
|
|
833
842
|
}
|
|
834
843
|
function isPossibleArray(value) {
|
|
835
844
|
return value.startsWith("[") && value.endsWith("]");
|
|
@@ -1467,8 +1476,6 @@
|
|
|
1467
1476
|
|
|
1468
1477
|
var TUI_DOC_CODE_EDITOR = new i0.InjectionToken("[TUI_DOC_CODE_EDITOR]: Contains service for opening online IDE e.g. Stackblitz");
|
|
1469
1478
|
|
|
1470
|
-
var TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = new i0.InjectionToken("[TUI_DOC_EXAMPLE_CONTENT_PROCESSOR]: Processes content in example", { factory: function () { return i9.identity; } });
|
|
1471
|
-
|
|
1472
1479
|
function tuiRawLoadRecord(example) {
|
|
1473
1480
|
return __awaiter(this, void 0, void 0, function () {
|
|
1474
1481
|
var processedContent, _a, _b, _c, key, content, _d, _e, e_1_1;
|
|
@@ -1543,9 +1550,8 @@
|
|
|
1543
1550
|
}] });
|
|
1544
1551
|
|
|
1545
1552
|
var TuiDocExampleComponent = /** @class */ (function () {
|
|
1546
|
-
function TuiDocExampleComponent(
|
|
1553
|
+
function TuiDocExampleComponent(clipboard, alertService, location, copyTexts$, texts, codeEditor, processContent, isCypress, codeActions, router, route, ngLocation) {
|
|
1547
1554
|
var _this = this;
|
|
1548
|
-
this.id = id;
|
|
1549
1555
|
this.clipboard = clipboard;
|
|
1550
1556
|
this.alertService = alertService;
|
|
1551
1557
|
this.location = location;
|
|
@@ -1559,6 +1565,7 @@
|
|
|
1559
1565
|
this.route = route;
|
|
1560
1566
|
this.ngLocation = ngLocation;
|
|
1561
1567
|
this.rawLoader$$ = new i9.BehaviorSubject({});
|
|
1568
|
+
this.id = null;
|
|
1562
1569
|
this.heading = '';
|
|
1563
1570
|
this.description = '';
|
|
1564
1571
|
this.componentName = this.location.pathname.slice(1);
|
|
@@ -1601,7 +1608,7 @@
|
|
|
1601
1608
|
var _this = this;
|
|
1602
1609
|
var _a;
|
|
1603
1610
|
this.loading$.next(true);
|
|
1604
|
-
(_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName, this.id || '', files).
|
|
1611
|
+
(_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName, this.id || '', files).then(function () { return _this.loading$.next(false); }).catch(function () { return _this.loading$.next(false); });
|
|
1605
1612
|
};
|
|
1606
1613
|
TuiDocExampleComponent.prototype.setFragmentWithoutRedirect = function (id) {
|
|
1607
1614
|
var url = this.router
|
|
@@ -1611,8 +1618,8 @@
|
|
|
1611
1618
|
};
|
|
1612
1619
|
return TuiDocExampleComponent;
|
|
1613
1620
|
}());
|
|
1614
|
-
TuiDocExampleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocExampleComponent, deps: [{ token:
|
|
1615
|
-
TuiDocExampleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocExampleComponent, selector: "tui-doc-example", inputs: { heading: "heading", description: "description", content: "content", componentName: "componentName" }, ngImport: i0__namespace, template: "<h3\n *ngIf=\"heading\"\n class=\"t-title\"\n>\n <span\n *polymorpheusOutlet=\"heading | tuiDocExampleCapitalize as text\"\n [textContent]=\"text\"\n ></span>\n <button\n *ngIf=\"id\"\n tuiIconButton\n type=\"button\"\n size=\"xs\"\n icon=\"tuiIconLinkLarge\"\n appearance=\"icon\"\n class=\"t-link-icon\"\n [title]=\"copy$ | async\"\n (click)=\"copyExampleLink()\"\n ></button>\n</h3>\n<h4\n *ngIf=\"description\"\n class=\"t-description\"\n>\n <ng-container *polymorpheusOutlet=\"description | tuiDocExampleCapitalize as text\">\n {{ text }}\n </ng-container>\n</h4>\n\n<div\n *ngIf=\"processor$ | async as files\"\n class=\"t-example\"\n>\n <ng-container *ngIf=\"files | tuiDocExampleGetTabs : defaultTab as tabs\">\n <div class=\"t-tabs-wrapper\">\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabs\">\n <button\n *tuiItem\n tuiTab\n >\n {{ tab }}\n </button>\n </ng-container>\n </tui-tabs-with-more>\n\n <button\n *ngIf=\"files | tuiMapper : visible\"\n tuiButton\n appearance=\"flat\"\n size=\"s\"\n type=\"button\"\n [showLoader]=\"!!(loading$ | async)\"\n (click)=\"edit(files)\"\n >\n Edit on {{ codeEditor!.name }}\n </button>\n </div>\n\n <div\n *ngFor=\"let tab of tabs; let index = index\"\n class=\"t-content\"\n [class.t-content_animated]=\"!isCypress\"\n [class.t-content_visible]=\"activeItemIndex === index\"\n >\n <ng-container\n *ngIf=\"index === defaultTabIndex; else anotherTab\"\n [ngTemplateOutlet]=\"preview\"\n ></ng-container>\n <ng-template #anotherTab>\n <ng-container\n [ngTemplateOutlet]=\"codeSection\"\n [ngTemplateOutletContext]=\"{$implicit: files[tabs[activeItemIndex]] || ''}\"\n ></ng-container>\n </ng-template>\n </div>\n </ng-container>\n</div>\n\n<ng-template #preview>\n <div\n automation-id=\"tui-doc-example\"\n class=\"t-demo\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template\n #codeSection\n let-code\n>\n <section class=\"t-code-actions\">\n <ng-container *ngFor=\"let action of codeActions\">\n <ng-container *polymorpheusOutlet=\"action as text; context: {$implicit: code}\">\n {{ text }}\n </ng-container>\n </ng-container>\n <tui-doc-copy [cdkCopyToClipboard]=\"code\"></tui-doc-copy>\n </section>\n <tui-doc-code [code]=\"code\"></tui-doc-code>\n</ng-template>\n", styles: [":host{position:relative;display:block;padding-top:3.5rem;clear:right}:host :host-context(tui-root._mobile){padding-top:2rem}.t-title{font:var(--tui-font-heading-5);margin:0 0 .5rem}:host-context(tui-root._mobile) .t-title{font:var(--tui-font-heading-6)}.t-description{font:var(--tui-font-text-m);font-weight:normal;margin:0}.t-example{position:relative;margin-top:1.5rem;border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m);box-shadow:0 .125rem .1875rem rgba(0,0,0,.1)}:host-context(tui-root._mobile) .t-example{margin-top:.75rem}.t-tabs-wrapper{display:flex;padding:0 2rem;box-shadow:inset 0 -1px var(--tui-base-03);justify-content:space-between;align-items:center}:host-context(tui-root._mobile) .t-tabs-wrapper{padding:0 1rem}.t-tabs{flex-grow:1}.t-demo{padding:2rem;overflow-x:auto}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.t-demo::-webkit-scrollbar,.t-demo::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:2.667rem solid transparent}.t-demo::-webkit-scrollbar{background-color:transparent}.t-demo::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}.t-demo::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}.t-demo::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}:host-context(tui-root._mobile) .t-demo{padding:1rem}.t-code-actions{position:absolute;top:4.375rem;right:1rem;display:flex;justify-content:flex-end;align-items:center}.t-code-actions>*{margin-left:.5rem}.t-link-icon{margin-left:.3rem;vertical-align:baseline}.t-content{will-change:opacity;height:0;visibility:hidden;opacity:0}.t-content_animated{transition:opacity .3s ease-in-out}.t-content_visible{height:auto;visibility:visible;opacity:1}\n"], components: [{ type: i2__namespace$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i1__namespace.TuiTabsWithMoreComponent, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["moreContent", "dropdownContent", "underline", "activeItemIndex", "itemsLimit"], outputs: ["activeItemIndexChange"] }, { type: i1__namespace.TuiTabComponent, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { type: TuiDocCopyComponent, selector: "tui-doc-copy" }, { type: TuiDocCodeComponent, selector: "tui-doc-code", inputs: ["filename", "code"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace$2.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace$1.TuiItemDirective, selector: "[tuiItem]" }, { type: i5__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i8__namespace.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }], pipes: { "tuiDocExampleCapitalize": TuiDocExampleCapitalizePipe, "async": i5__namespace.AsyncPipe, "tuiDocExampleGetTabs": TuiDocExampleGetTabsPipe, "tuiMapper": i6__namespace$1.TuiMapperPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1621
|
+
TuiDocExampleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocExampleComponent, deps: [{ token: i8.Clipboard }, { token: i2$1.TuiAlertService }, { token: common.LOCATION }, { token: i1.TUI_COPY_TEXTS }, { token: TUI_DOC_EXAMPLE_TEXTS }, { token: TUI_DOC_CODE_EDITOR, optional: true }, { token: TUI_DOC_EXAMPLE_CONTENT_PROCESSOR }, { token: i6.TUI_IS_CYPRESS }, { token: TUI_DOC_CODE_ACTIONS }, { token: i6$1.Router }, { token: i6$1.ActivatedRoute }, { token: i5.Location }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1622
|
+
TuiDocExampleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocExampleComponent, selector: "tui-doc-example", inputs: { id: "id", heading: "heading", description: "description", content: "content", componentName: "componentName" }, ngImport: i0__namespace, template: "<h3\n *ngIf=\"heading\"\n class=\"t-title\"\n>\n <span\n *polymorpheusOutlet=\"heading | tuiDocExampleCapitalize as text\"\n [textContent]=\"text\"\n ></span>\n <button\n *ngIf=\"id\"\n tuiIconButton\n type=\"button\"\n size=\"xs\"\n icon=\"tuiIconLinkLarge\"\n appearance=\"icon\"\n class=\"t-link-icon\"\n [title]=\"copy$ | async\"\n (click)=\"copyExampleLink()\"\n ></button>\n</h3>\n<h4\n *ngIf=\"description\"\n class=\"t-description\"\n>\n <ng-container *polymorpheusOutlet=\"description | tuiDocExampleCapitalize as text\">\n {{ text }}\n </ng-container>\n</h4>\n\n<div\n *ngIf=\"processor$ | async as files\"\n class=\"t-example\"\n>\n <ng-container *ngIf=\"files | tuiDocExampleGetTabs : defaultTab as tabs\">\n <div class=\"t-tabs-wrapper\">\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabs\">\n <button\n *tuiItem\n tuiTab\n >\n {{ tab }}\n </button>\n </ng-container>\n </tui-tabs-with-more>\n\n <button\n *ngIf=\"files | tuiMapper : visible\"\n tuiButton\n appearance=\"flat\"\n size=\"s\"\n type=\"button\"\n [showLoader]=\"!!(loading$ | async)\"\n (click)=\"edit(files)\"\n >\n Edit on {{ codeEditor!.name }}\n </button>\n </div>\n\n <div\n *ngFor=\"let tab of tabs; let index = index\"\n class=\"t-content\"\n [class.t-content_animated]=\"!isCypress\"\n [class.t-content_visible]=\"activeItemIndex === index\"\n >\n <ng-container\n *ngIf=\"index === defaultTabIndex; else anotherTab\"\n [ngTemplateOutlet]=\"preview\"\n ></ng-container>\n <ng-template #anotherTab>\n <ng-container\n [ngTemplateOutlet]=\"codeSection\"\n [ngTemplateOutletContext]=\"{$implicit: files[tabs[activeItemIndex]] || ''}\"\n ></ng-container>\n </ng-template>\n </div>\n </ng-container>\n</div>\n\n<ng-template #preview>\n <div\n automation-id=\"tui-doc-example\"\n class=\"t-demo\"\n >\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template\n #codeSection\n let-code\n>\n <section class=\"t-code-actions\">\n <ng-container *ngFor=\"let action of codeActions\">\n <ng-container *polymorpheusOutlet=\"action as text; context: {$implicit: code}\">\n {{ text }}\n </ng-container>\n </ng-container>\n <tui-doc-copy [cdkCopyToClipboard]=\"code\"></tui-doc-copy>\n </section>\n <tui-doc-code [code]=\"code\"></tui-doc-code>\n</ng-template>\n", styles: [":host{position:relative;display:block;padding-top:3.5rem;clear:right}:host :host-context(tui-root._mobile){padding-top:2rem}.t-title{font:var(--tui-font-heading-5);margin:0 0 .5rem}:host-context(tui-root._mobile) .t-title{font:var(--tui-font-heading-6)}.t-description{font:var(--tui-font-text-m);font-weight:normal;margin:0}.t-example{position:relative;margin-top:1.5rem;border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m);box-shadow:0 .125rem .1875rem rgba(0,0,0,.1)}:host-context(tui-root._mobile) .t-example{margin-top:.75rem}.t-tabs-wrapper{display:flex;padding:0 2rem;box-shadow:inset 0 -1px var(--tui-base-03);justify-content:space-between;align-items:center}:host-context(tui-root._mobile) .t-tabs-wrapper{padding:0 1rem}.t-tabs{flex-grow:1}.t-demo{padding:2rem;overflow-x:auto}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.t-demo::-webkit-scrollbar,.t-demo::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:2.667rem solid transparent}.t-demo::-webkit-scrollbar{background-color:transparent}.t-demo::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}.t-demo::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}.t-demo::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}:host-context(tui-root._mobile) .t-demo{padding:1rem}.t-code-actions{position:absolute;top:4.375rem;right:1rem;display:flex;justify-content:flex-end;align-items:center}.t-code-actions>*{margin-left:.5rem}.t-link-icon{margin-left:.3rem;vertical-align:baseline}.t-content{will-change:opacity;height:0;visibility:hidden;opacity:0}.t-content_animated{transition:opacity .3s ease-in-out}.t-content_visible{height:auto;visibility:visible;opacity:1}\n"], components: [{ type: i2__namespace$1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i1__namespace.TuiTabsWithMoreComponent, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["moreContent", "dropdownContent", "underline", "activeItemIndex", "itemsLimit"], outputs: ["activeItemIndexChange"] }, { type: i1__namespace.TuiTabComponent, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { type: TuiDocCopyComponent, selector: "tui-doc-copy" }, { type: TuiDocCodeComponent, selector: "tui-doc-code", inputs: ["filename", "code"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace$2.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace$1.TuiItemDirective, selector: "[tuiItem]" }, { type: i5__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i8__namespace.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }], pipes: { "tuiDocExampleCapitalize": TuiDocExampleCapitalizePipe, "async": i5__namespace.AsyncPipe, "tuiDocExampleGetTabs": TuiDocExampleGetTabsPipe, "tuiMapper": i6__namespace$1.TuiMapperPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1616
1623
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocExampleComponent, decorators: [{
|
|
1617
1624
|
type: i0.Component,
|
|
1618
1625
|
args: [{
|
|
@@ -1622,10 +1629,7 @@
|
|
|
1622
1629
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1623
1630
|
}]
|
|
1624
1631
|
}], ctorParameters: function () {
|
|
1625
|
-
return [{ type:
|
|
1626
|
-
type: i0.Attribute,
|
|
1627
|
-
args: ['id']
|
|
1628
|
-
}] }, { type: i8__namespace.Clipboard, decorators: [{
|
|
1632
|
+
return [{ type: i8__namespace.Clipboard, decorators: [{
|
|
1629
1633
|
type: i0.Inject,
|
|
1630
1634
|
args: [i8.Clipboard]
|
|
1631
1635
|
}] }, { type: i2__namespace$1.TuiAlertService, decorators: [{
|
|
@@ -1664,7 +1668,9 @@
|
|
|
1664
1668
|
type: i0.Inject,
|
|
1665
1669
|
args: [i5.Location]
|
|
1666
1670
|
}] }];
|
|
1667
|
-
}, propDecorators: {
|
|
1671
|
+
}, propDecorators: { id: [{
|
|
1672
|
+
type: i0.Input
|
|
1673
|
+
}], heading: [{
|
|
1668
1674
|
type: i0.Input
|
|
1669
1675
|
}], description: [{
|
|
1670
1676
|
type: i0.Input
|
|
@@ -2085,8 +2091,8 @@
|
|
|
2085
2091
|
type: i0.Component,
|
|
2086
2092
|
args: [{
|
|
2087
2093
|
selector: 'tui-doc-navigation',
|
|
2088
|
-
templateUrl: 'navigation.template.html',
|
|
2089
|
-
styleUrls: ['navigation.style.less'],
|
|
2094
|
+
templateUrl: './navigation.template.html',
|
|
2095
|
+
styleUrls: ['./navigation.style.less'],
|
|
2090
2096
|
providers: NAVIGATION_PROVIDERS,
|
|
2091
2097
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2092
2098
|
}]
|
|
@@ -2222,7 +2228,7 @@
|
|
|
2222
2228
|
useExisting: i0.forwardRef(function () { return TuiDocMainComponent; }),
|
|
2223
2229
|
},
|
|
2224
2230
|
i6.TuiSwipeService,
|
|
2225
|
-
], ngImport: i0__namespace, 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 <ng-container ngProjectAs=\"tuiOverPortals\">\n <ng-content select=\"tuiOverPortals\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverHints\">\n <ng-content select=\"tuiOverHints\"></ng-content>\n </ng-container>\n</tui-root>\n", styles: ["html{scroll-padding-top:4rem;height:auto}tui-root>tui-scroll-controls>.t-bar_vertical{top:4rem!important}@keyframes tuiShaking{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-.3125rem)}20%,40%,60%,80%{transform:translate(.3125rem)}}body{background:var(--tui-base-01);height:auto}tui-doc-main{display:block}code:not(.hljs):not([class*=\"language-\"]):not(.exception){transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;background:var(--tui-base-02);color:var(--tui-text-02);vertical-align:middle;box-shadow:inset 0 -2px var(--tui-secondary);padding:.375rem .5rem;font-size:.875rem;border-radius:.5rem}button:focus code,a:focus code{background:var(--tui-base-01)}.tui-doc-page{position:relative;z-index:0;padding-top:4rem}tui-doc-navigation.tui-doc-navigation{position:fixed;top:4rem;bottom:0;width:16.25rem;border-right:1px solid var(--tui-base-03)}@media screen and (max-width: 47.9625em){tui-doc-navigation.tui-doc-navigation{display:none}}.tui-doc-content{margin-left:16.25rem}@media screen and (max-width: 47.9625em){.tui-doc-content{margin-left:0}}.tui-doc-outlet+*{display:block}.tui-doc-animated-example{animation:1s .3s tuiShaking}label.night-mode{cursor:pointer}label.night-mode .tui-toggle{margin-left:.5rem}.hljs-tag{background:none}.hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-01);background-color:var(--tui-clear)}.hljs.hljs-line-numbers{background:transparent}.hljs-subst,.hljs-title{font-weight:normal;color:var(--tui-text-01)}.hljs-comment,.hljs-quote{color:var(--tui-text-03);font-style:italic}.hljs-meta{color:#e38162}.hljs-section,.hljs-name,.hljs-literal,.hljs-keyword,.hljs-selector-tag,.hljs-type,.hljs-selector-id,.hljs-selector-class{font-weight:bold;color:var(--tui-link)}.hljs-attribute,.hljs-number,.hljs-regexp,.hljs-link{font-weight:bold;color:var(--tui-support-06)}.hljs-number,.hljs-regexp,.hljs-link{font-weight:normal}.hljs-string{color:var(--tui-positive);font-weight:bold}.hljs-symbol,.hljs-bullet,.hljs-formula{color:var(--tui-text-01);background:var(--tui-base-02);font-style:italic}.hljs-doctag{text-decoration:underline}.hljs-variable,.hljs-template-variable{color:var(--tui-link-hover)}[data-mode=onDark] .hljs-variable,[data-mode=onDark] .hljs-template-variable{color:var(--tui-warning-fill)}.hljs-addition{background:var(--tui-success-bg)}.hljs-deletion{background:var(--tui-error-bg)}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}.hljs .hljs-line-numbers{padding:0}.hljs-ln-numbers{vertical-align:top;opacity:.3;text-align:right;padding-right:1em!important}\n"], components: [{ type: i2__namespace$1.TuiThemeNightComponent, selector: "tui-theme-night" }, { type: i2__namespace$1.TuiRootComponent, selector: "tui-root" }, { type: TuiDocNavigationComponent, selector: "tui-doc-navigation" }, { type: TuiDocHeaderComponent, selector: "header[tuiDocHeader]" }, { type: i1__namespace.TuiToggleComponent, selector: "tui-toggle", inputs: ["singleColor", "showIcons", "showLoader", "size"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }, { type: i5__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
2231
|
+
], ngImport: i0__namespace, 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 <ng-container ngProjectAs=\"tuiOverPortals\">\n <ng-content select=\"tuiOverPortals\"></ng-content>\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverHints\">\n <ng-content select=\"tuiOverHints\"></ng-content>\n </ng-container>\n</tui-root>\n", styles: ["html{scroll-padding-top:4rem;height:auto}tui-root>tui-scroll-controls>.t-bar_vertical{top:4rem!important}@keyframes tuiShaking{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-.3125rem)}20%,40%,60%,80%{transform:translate(.3125rem)}}body{background:var(--tui-base-01);height:auto}tui-doc-main{display:block}code:not(.hljs):not([class*=\"language-\"]):not(.exception){transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;background:var(--tui-base-02);color:var(--tui-text-02);vertical-align:middle;box-shadow:inset 0 -2px var(--tui-secondary);padding:.375rem .5rem;font-size:.875rem;border-radius:.5rem}button:focus code,a:focus code{background:var(--tui-base-01)}.tui-doc-page{position:relative;z-index:0;padding-top:4rem}tui-doc-navigation.tui-doc-navigation{position:fixed;top:4rem;bottom:0;width:16.25rem;border-right:1px solid var(--tui-base-03)}@media screen and (max-width: 47.9625em){tui-doc-navigation.tui-doc-navigation{display:none}}.tui-doc-content{margin-left:16.25rem}@media screen and (max-width: 47.9625em){.tui-doc-content{margin-left:0}}.tui-doc-outlet+*{display:block}.tui-doc-animated-example{animation:1s .3s tuiShaking}label.night-mode{cursor:pointer}label.night-mode .tui-toggle{margin-left:.5rem}.hljs-tag{background:none}.hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-01);background-color:var(--tui-clear)}.hljs.hljs-line-numbers{background:transparent}.hljs-subst,.hljs-title{font-weight:normal;color:var(--tui-text-01)}.hljs-comment,.hljs-quote{color:var(--tui-text-03);font-style:italic}.hljs-meta{color:#e38162}.hljs-section,.hljs-name,.hljs-literal,.hljs-keyword,.hljs-selector-tag,.hljs-type,.hljs-selector-id,.hljs-selector-class{font-weight:bold;color:var(--tui-link)}.hljs-attribute,.hljs-number,.hljs-regexp,.hljs-link{font-weight:bold;color:var(--tui-support-06)}.hljs-number,.hljs-regexp,.hljs-link{font-weight:normal}.hljs-string{color:var(--tui-positive);font-weight:bold}.hljs-symbol,.hljs-bullet,.hljs-formula{color:var(--tui-text-01);background:var(--tui-base-02);font-style:italic}.hljs-doctag{text-decoration:underline}.hljs-variable,.hljs-template-variable{color:var(--tui-link-hover)}[data-mode=onDark] .hljs-variable,[data-mode=onDark] .hljs-template-variable{color:var(--tui-warning-fill)}.hljs-addition{background:var(--tui-success-bg)}.hljs-deletion{background:var(--tui-error-bg)}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}.hljs .hljs-line-numbers{padding:0}.hljs-ln-numbers{vertical-align:top;opacity:.3;text-align:right;padding-right:1em!important}\n"], components: [{ type: i2__namespace$1.TuiThemeNightComponent, selector: "tui-theme-night" }, { type: i2__namespace$1.TuiRootComponent, selector: "tui-root" }, { type: TuiDocNavigationComponent, selector: "tui-doc-navigation" }, { type: TuiDocHeaderComponent, selector: "header[tuiDocHeader]" }, { type: i1__namespace.TuiToggleComponent, selector: "tui-toggle", inputs: ["singleColor", "showIcons", "showLoader", "size"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }, { type: i5__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.Default, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
2226
2232
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocMainComponent, decorators: [{
|
|
2227
2233
|
type: i0.Component,
|
|
2228
2234
|
args: [{
|
|
@@ -2230,6 +2236,9 @@
|
|
|
2230
2236
|
templateUrl: './main.template.html',
|
|
2231
2237
|
styleUrls: ['./main.style.less'],
|
|
2232
2238
|
encapsulation: i0.ViewEncapsulation.None,
|
|
2239
|
+
// @note: This one was default on purpose so we can test demo in default mode.
|
|
2240
|
+
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
|
2241
|
+
changeDetection: i0.ChangeDetectionStrategy.Default,
|
|
2233
2242
|
providers: [
|
|
2234
2243
|
{
|
|
2235
2244
|
provide: i2$1.TuiModeDirective,
|
|
@@ -2583,14 +2592,14 @@
|
|
|
2583
2592
|
}] } });
|
|
2584
2593
|
|
|
2585
2594
|
var TuiDocPageComponent = /** @class */ (function () {
|
|
2586
|
-
function TuiDocPageComponent(
|
|
2587
|
-
this.deprecated = deprecated;
|
|
2595
|
+
function TuiDocPageComponent(defaultTabs, seeAlso) {
|
|
2588
2596
|
this.defaultTabs = defaultTabs;
|
|
2589
2597
|
this.seeAlso = seeAlso;
|
|
2590
2598
|
this.header = '';
|
|
2591
2599
|
this.package = '';
|
|
2592
2600
|
this.type = '';
|
|
2593
2601
|
this.path = '';
|
|
2602
|
+
this.deprecated = false;
|
|
2594
2603
|
this.tabConnectors = i6.EMPTY_QUERY;
|
|
2595
2604
|
this.activeItemIndex = NaN;
|
|
2596
2605
|
}
|
|
@@ -2607,8 +2616,8 @@
|
|
|
2607
2616
|
};
|
|
2608
2617
|
return TuiDocPageComponent;
|
|
2609
2618
|
}());
|
|
2610
|
-
TuiDocPageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocPageComponent, deps: [{ token:
|
|
2611
|
-
TuiDocPageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocPageComponent, selector: "tui-doc-page", inputs: { header: "header", package: "package", type: "type", path: "path" }, providers: PAGE_PROVIDERS, queries: [{ propertyName: "tabConnectors", predicate: TuiDocPageTabConnectorDirective }], ngImport: i0__namespace, template: "<header class=\"t-header\">\n <h1 class=\"t-title\">\n {{ header }}\n <tui-tag\n *ngIf=\"deprecated
|
|
2619
|
+
TuiDocPageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocPageComponent, deps: [{ token: TUI_DOC_DEFAULT_TABS }, { token: PAGE_SEE_ALSO }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2620
|
+
TuiDocPageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocPageComponent, selector: "tui-doc-page", inputs: { header: "header", package: "package", type: "type", path: "path", deprecated: "deprecated" }, providers: PAGE_PROVIDERS, queries: [{ propertyName: "tabConnectors", predicate: TuiDocPageTabConnectorDirective }], ngImport: i0__namespace, template: "<header class=\"t-header\">\n <h1 class=\"t-title\">\n {{ header }}\n <tui-tag\n *ngIf=\"!!deprecated || deprecated === ''\"\n value=\"deprecated\"\n status=\"custom\"\n class=\"t-tag t-tag_deprecated\"\n ></tui-tag>\n <tui-tag\n *ngIf=\"package\"\n status=\"custom\"\n class=\"t-tag t-tag_package\"\n [value]=\"package\"\n [autoColor]=\"true\"\n ></tui-tag>\n </h1>\n <tui-tabs-with-more\n *ngIf=\"tabConnectors.length\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabConnectors; first as first; index as index\">\n <ng-container *ngIf=\"first; else dynamicTab\">\n <a\n *tuiItem\n tuiTab\n routerLink=\"./\"\n routerLinkActive\n [routerLinkActiveOptions]=\"{exact: true}\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-container>\n <ng-template #dynamicTab>\n <a\n *tuiItem\n tuiTab\n routerLinkActive\n [routerLink]=\"getRouterLink(tab.pageTab || defaultTabs[index])\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-template>\n </ng-container>\n </tui-tabs-with-more>\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header\"\n [package]=\"package\"\n [type]=\"type\"\n [path]=\"path\"\n ></tui-doc-source-code>\n</header>\n<div class=\"t-content\">\n <ng-content></ng-content>\n <tui-doc-see-also\n *ngIf=\"showSeeAlso\"\n class=\"t-see-also\"\n [seeAlso]=\"seeAlso\"\n ></tui-doc-see-also>\n <ng-container *ngFor=\"let tab of tabConnectors; index as index\">\n <ng-container\n *ngIf=\"index === activeItemIndex\"\n [ngTemplateOutlet]=\"tab.template\"\n ></ng-container>\n </ng-container>\n</div>\n", styles: [":host{display:flex;flex-direction:column;min-height:0;flex-basis:0;flex-grow:1}.t-header{display:flex;font:var(--tui-font-heading-3);flex-wrap:wrap;min-height:7.25rem;color:var(--tui-text-01);box-shadow:inset 0 -1px 0 0 var(--tui-base-03);padding:3.75rem 0 0;box-sizing:border-box;flex-shrink:0;margin:0 min(10vw,8.75rem)}:host-context(tui-root._mobile) .t-header{font:var(--tui-font-heading-4);min-height:4.5rem;padding:1.25rem 1.25rem 0;margin:0}.t-title{min-width:100%;font-size:inherit;margin:0}.t-tag{vertical-align:middle;text-transform:uppercase;margin-right:.5rem}.t-tag_deprecated{background-color:var(--tui-error-fill)}.t-tag.t-tag_package{color:#000}.t-tabs{flex:1;margin:1.125rem .3125rem 0 0}:host-context(tui-root._mobile) .t-tabs{margin-top:.25rem}.t-content{padding:2rem 0;margin:0 min(10vw,8.75rem)}:host-context(tui-root._mobile) .t-content{padding:2rem 1.25rem;margin:0}.t-see-also{min-width:18.75rem;width:30%;float:right;margin-left:1.5rem}:host-context(tui-root._mobile) .t-see-also{float:none;width:100%;margin:0 0 1.5rem}.t-source-code{align-self:flex-end;line-height:2.75rem}\n"], components: [{ type: i1__namespace.TuiTagComponent, selector: "tui-tag, a[tuiTag]", inputs: ["value", "editable", "separator", "maxLength", "size", "showLoader", "status", "hoverable", "removable", "disabled", "autoColor", "leftContent"], outputs: ["edited"] }, { type: i1__namespace.TuiTabsWithMoreComponent, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["moreContent", "dropdownContent", "underline", "activeItemIndex", "itemsLimit"], outputs: ["activeItemIndexChange"] }, { type: i1__namespace.TuiTabComponent, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { type: TuiDocSourceCodeComponent, selector: "tui-doc-source-code", inputs: ["header", "package", "type", "path"] }, { type: TuiDocSeeAlsoComponent, selector: "tui-doc-see-also", inputs: ["seeAlso"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace$1.TuiItemDirective, selector: "[tuiItem]" }, { type: i6__namespace.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i6__namespace.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }, { type: i5__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2612
2621
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocPageComponent, decorators: [{
|
|
2613
2622
|
type: i0.Component,
|
|
2614
2623
|
args: [{
|
|
@@ -2620,9 +2629,6 @@
|
|
|
2620
2629
|
}]
|
|
2621
2630
|
}], ctorParameters: function () {
|
|
2622
2631
|
return [{ type: undefined, decorators: [{
|
|
2623
|
-
type: i0.Attribute,
|
|
2624
|
-
args: ['deprecated']
|
|
2625
|
-
}] }, { type: undefined, decorators: [{
|
|
2626
2632
|
type: i0.Inject,
|
|
2627
2633
|
args: [TUI_DOC_DEFAULT_TABS]
|
|
2628
2634
|
}] }, { type: undefined, decorators: [{
|
|
@@ -2637,6 +2643,8 @@
|
|
|
2637
2643
|
type: i0.Input
|
|
2638
2644
|
}], path: [{
|
|
2639
2645
|
type: i0.Input
|
|
2646
|
+
}], deprecated: [{
|
|
2647
|
+
type: i0.Input
|
|
2640
2648
|
}], tabConnectors: [{
|
|
2641
2649
|
type: i0.ContentChildren,
|
|
2642
2650
|
args: [TuiDocPageTabConnectorDirective]
|
|
@@ -2807,6 +2815,7 @@
|
|
|
2807
2815
|
exports.TUI_DOC_DEMO_TEXTS = TUI_DOC_DEMO_TEXTS;
|
|
2808
2816
|
exports.TUI_DOC_DOCUMENTATION_TEXTS = TUI_DOC_DOCUMENTATION_TEXTS;
|
|
2809
2817
|
exports.TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = TUI_DOC_EXAMPLE_CONTENT_PROCESSOR;
|
|
2818
|
+
exports.TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR = TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR;
|
|
2810
2819
|
exports.TUI_DOC_EXAMPLE_TEXTS = TUI_DOC_EXAMPLE_TEXTS;
|
|
2811
2820
|
exports.TUI_DOC_EXCLUDED_PROPERTIES = TUI_DOC_EXCLUDED_PROPERTIES;
|
|
2812
2821
|
exports.TUI_DOC_LOGO = TUI_DOC_LOGO;
|