@taiga-ui/addon-doc 3.54.0-canary.79fb39d → 3.54.0-canary.c32771f
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-components.umd.js +90 -72
- package/bundles/taiga-ui-addon-doc-components.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-doc-utils.umd.js +10 -31
- package/bundles/taiga-ui-addon-doc-utils.umd.js.map +1 -1
- package/components/code/code.component.d.ts +3 -0
- package/components/code/code.module.d.ts +3 -3
- package/esm2015/components/code/code.component.js +7 -5
- package/esm2015/components/code/code.module.js +21 -5
- package/esm2015/components/example/example.component.js +1 -1
- package/esm2015/utils/to-flat-map-pages.js +5 -5
- package/fesm2015/taiga-ui-addon-doc-components.js +73 -55
- package/fesm2015/taiga-ui-addon-doc-components.js.map +1 -1
- package/fesm2015/taiga-ui-addon-doc-utils.js +4 -4
- package/fesm2015/taiga-ui-addon-doc-utils.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/addon-doc/tokens'), require('@taiga-ui/addon-doc/utils'), require('rxjs'), require('rxjs/operators'), require('@taiga-ui/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@taiga-ui/addon-doc/components', ['exports', '@angular/core', '@taiga-ui/addon-doc/tokens', '@taiga-ui/addon-doc/utils', 'rxjs', 'rxjs/operators', '@taiga-ui/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"]["addon-doc"] = global["taiga-ui"]["addon-doc"] || {}, global["taiga-ui"]["addon-doc"].components = {}), global.ng.core, global["taiga-ui"]["addon-doc"].tokens, global["taiga-ui"]["addon-doc"].utils, global.rxjs, global.rxjs.operators, global.
|
|
5
|
-
})(this, (function (exports, i0, tokens, utils, i10, operators,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/addon-doc/tokens'), require('@taiga-ui/addon-doc/utils'), require('rxjs'), require('rxjs/operators'), require('@taiga-ui/core'), require('@angular/common'), require('ngx-highlightjs'), require('@angular/cdk/clipboard'), require('@taiga-ui/cdk'), require('@taiga-ui/kit'), require('@angular/forms'), require('@angular/router'), require('@angular/animations'), require('@ng-web-apis/common'), require('@taiga-ui/addon-doc/interfaces'), require('@tinkoff/ng-polymorpheus'), require('@angular/platform-browser'), require('@taiga-ui/addon-mobile'), require('@taiga-ui/addon-doc/directives'), require('@taiga-ui/i18n'), require('@taiga-ui/addon-doc/services')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/addon-doc/components', ['exports', '@angular/core', '@taiga-ui/addon-doc/tokens', '@taiga-ui/addon-doc/utils', 'rxjs', 'rxjs/operators', '@taiga-ui/core', '@angular/common', 'ngx-highlightjs', '@angular/cdk/clipboard', '@taiga-ui/cdk', '@taiga-ui/kit', '@angular/forms', '@angular/router', '@angular/animations', '@ng-web-apis/common', '@taiga-ui/addon-doc/interfaces', '@tinkoff/ng-polymorpheus', '@angular/platform-browser', '@taiga-ui/addon-mobile', '@taiga-ui/addon-doc/directives', '@taiga-ui/i18n', '@taiga-ui/addon-doc/services'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"]["addon-doc"] = global["taiga-ui"]["addon-doc"] || {}, global["taiga-ui"]["addon-doc"].components = {}), global.ng.core, global["taiga-ui"]["addon-doc"].tokens, global["taiga-ui"]["addon-doc"].utils, global.rxjs, global.rxjs.operators, global.i2, global.ng.common, global.i3, global.ng.cdk.clipboard, global.i6, global.i1, global.ng.forms, global.ng.router, global.ng.animations, global.common, global["taiga-ui"]["addon-doc"].interfaces, global.i5$1, global.ng.platformBrowser, global.i4$2, global["taiga-ui"]["addon-doc"].directives, global.i5$2, global["taiga-ui"]["addon-doc"].services));
|
|
5
|
+
})(this, (function (exports, i0, tokens, utils, i10, operators, i2, i4, i3, i4$1, i6, i1, i5, i6$1, animations, common, interfaces, i5$1, i9, i4$2, i8, i5$2, i6$2) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
26
|
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
27
|
-
var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6);
|
|
28
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
29
27
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
30
28
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
31
29
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
32
30
|
var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
|
|
31
|
+
var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6);
|
|
32
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
33
33
|
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
34
34
|
var i6__namespace = /*#__PURE__*/_interopNamespace(i6$1);
|
|
35
35
|
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
@@ -39,6 +39,89 @@
|
|
|
39
39
|
var i5__namespace$2 = /*#__PURE__*/_interopNamespace(i5$2);
|
|
40
40
|
var i6__namespace$2 = /*#__PURE__*/_interopNamespace(i6$2);
|
|
41
41
|
|
|
42
|
+
var TuiDocCodeComponent = /** @class */ (function () {
|
|
43
|
+
function TuiDocCodeComponent(markdownCodeProcessor) {
|
|
44
|
+
var _this = this;
|
|
45
|
+
this.markdownCodeProcessor = markdownCodeProcessor;
|
|
46
|
+
this.rawLoader$$ = new i10.BehaviorSubject('');
|
|
47
|
+
this.filename = '';
|
|
48
|
+
this.copy$ = new i10.Subject();
|
|
49
|
+
this.icon$ = this.copy$.pipe(operators.switchMap(function () { return i10.timer(2000).pipe(operators.map(function () { return 'tuiIconCopyLarge'; }), operators.startWith('tuiIconCheckLarge')); }));
|
|
50
|
+
this.processor$ = this.rawLoader$$.pipe(operators.switchMap(utils.tuiRawLoad), operators.map(function (value) { return _this.markdownCodeProcessor(value); }));
|
|
51
|
+
}
|
|
52
|
+
Object.defineProperty(TuiDocCodeComponent.prototype, "code", {
|
|
53
|
+
set: function (code) {
|
|
54
|
+
this.rawLoader$$.next(code);
|
|
55
|
+
},
|
|
56
|
+
enumerable: false,
|
|
57
|
+
configurable: true
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(TuiDocCodeComponent.prototype, "hasFilename", {
|
|
60
|
+
get: function () {
|
|
61
|
+
return !!this.filename;
|
|
62
|
+
},
|
|
63
|
+
enumerable: false,
|
|
64
|
+
configurable: true
|
|
65
|
+
});
|
|
66
|
+
return TuiDocCodeComponent;
|
|
67
|
+
}());
|
|
68
|
+
TuiDocCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeComponent, deps: [{ token: tokens.TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
69
|
+
TuiDocCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocCodeComponent, selector: "tui-doc-code", inputs: { filename: "filename", code: "code" }, host: { properties: { "class._has-filename": "this.hasFilename" } }, ngImport: i0__namespace, 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>\n <code [lineNumbers]=\"true\" [highlight]=\"content\"></code>\n <div class=\"t-code-actions\">\n <ng-content></ng-content>\n <button\n tuiIconButton\n appearance=\"icon\"\n size=\"xs\"\n [icon]=\"(icon$ | async) || 'tuiIconCopyLarge'\"\n [cdkCopyToClipboard]=\"content\"\n (click)=\"copy$.next()\"\n >\n </button>\n </div>\n</pre>\n", styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:bold}.t-code{position:relative;margin:0;white-space:normal}.t-code+.t-code{margin-top:1rem}.t-code-actions{position:absolute;top:.75rem;right:.75rem;display:flex;grid-gap:.375rem;gap:.375rem;justify-content:center;align-items:center}.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:.375rem 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"], components: [{ type: i2__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.Highlight, selector: "[highlight]", inputs: ["highlight", "languages", "lineNumbers"], outputs: ["highlighted"] }, { type: i4__namespace$1.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
70
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeComponent, decorators: [{
|
|
71
|
+
type: i0.Component,
|
|
72
|
+
args: [{
|
|
73
|
+
selector: 'tui-doc-code',
|
|
74
|
+
templateUrl: './code.template.html',
|
|
75
|
+
styleUrls: ['./code.style.less'],
|
|
76
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
77
|
+
}]
|
|
78
|
+
}], ctorParameters: function () {
|
|
79
|
+
return [{ type: undefined, decorators: [{
|
|
80
|
+
type: i0.Inject,
|
|
81
|
+
args: [tokens.TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR]
|
|
82
|
+
}] }];
|
|
83
|
+
}, propDecorators: { filename: [{
|
|
84
|
+
type: i0.Input
|
|
85
|
+
}], code: [{
|
|
86
|
+
type: i0.Input
|
|
87
|
+
}], hasFilename: [{
|
|
88
|
+
type: i0.HostBinding,
|
|
89
|
+
args: ['class._has-filename']
|
|
90
|
+
}] } });
|
|
91
|
+
|
|
92
|
+
var TuiDocCodeModule = /** @class */ (function () {
|
|
93
|
+
function TuiDocCodeModule() {
|
|
94
|
+
}
|
|
95
|
+
return TuiDocCodeModule;
|
|
96
|
+
}());
|
|
97
|
+
TuiDocCodeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
98
|
+
TuiDocCodeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, declarations: [TuiDocCodeComponent], imports: [i4.CommonModule,
|
|
99
|
+
i2.TuiSvgModule,
|
|
100
|
+
i3.HighlightModule,
|
|
101
|
+
i2.TuiButtonModule,
|
|
102
|
+
i4$1.ClipboardModule], exports: [TuiDocCodeComponent] });
|
|
103
|
+
TuiDocCodeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, imports: [[
|
|
104
|
+
i4.CommonModule,
|
|
105
|
+
i2.TuiSvgModule,
|
|
106
|
+
i3.HighlightModule,
|
|
107
|
+
i2.TuiButtonModule,
|
|
108
|
+
i4$1.ClipboardModule,
|
|
109
|
+
]] });
|
|
110
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, decorators: [{
|
|
111
|
+
type: i0.NgModule,
|
|
112
|
+
args: [{
|
|
113
|
+
imports: [
|
|
114
|
+
i4.CommonModule,
|
|
115
|
+
i2.TuiSvgModule,
|
|
116
|
+
i3.HighlightModule,
|
|
117
|
+
i2.TuiButtonModule,
|
|
118
|
+
i4$1.ClipboardModule,
|
|
119
|
+
],
|
|
120
|
+
declarations: [TuiDocCodeComponent],
|
|
121
|
+
exports: [TuiDocCodeComponent],
|
|
122
|
+
}]
|
|
123
|
+
}] });
|
|
124
|
+
|
|
42
125
|
/*! *****************************************************************************
|
|
43
126
|
Copyright (c) Microsoft Corporation.
|
|
44
127
|
|
|
@@ -396,54 +479,6 @@
|
|
|
396
479
|
}] }];
|
|
397
480
|
}, propDecorators: { copied$: [] } });
|
|
398
481
|
|
|
399
|
-
var TuiDocCodeComponent = /** @class */ (function () {
|
|
400
|
-
function TuiDocCodeComponent(markdownCodeProcessor) {
|
|
401
|
-
var _this = this;
|
|
402
|
-
this.markdownCodeProcessor = markdownCodeProcessor;
|
|
403
|
-
this.rawLoader$$ = new i10.BehaviorSubject('');
|
|
404
|
-
this.filename = '';
|
|
405
|
-
this.processor$ = this.rawLoader$$.pipe(operators.switchMap(utils.tuiRawLoad), operators.map(function (value) { return _this.markdownCodeProcessor(value); }));
|
|
406
|
-
}
|
|
407
|
-
Object.defineProperty(TuiDocCodeComponent.prototype, "code", {
|
|
408
|
-
set: function (code) {
|
|
409
|
-
this.rawLoader$$.next(code);
|
|
410
|
-
},
|
|
411
|
-
enumerable: false,
|
|
412
|
-
configurable: true
|
|
413
|
-
});
|
|
414
|
-
Object.defineProperty(TuiDocCodeComponent.prototype, "hasFilename", {
|
|
415
|
-
get: function () {
|
|
416
|
-
return !!this.filename;
|
|
417
|
-
},
|
|
418
|
-
enumerable: false,
|
|
419
|
-
configurable: true
|
|
420
|
-
});
|
|
421
|
-
return TuiDocCodeComponent;
|
|
422
|
-
}());
|
|
423
|
-
TuiDocCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeComponent, deps: [{ token: tokens.TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
424
|
-
TuiDocCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocCodeComponent, selector: "tui-doc-code", inputs: { filename: "filename", code: "code" }, host: { properties: { "class._has-filename": "this.hasFilename" } }, ngImport: i0__namespace, 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>\n <code [lineNumbers]=\"true\" [highlight]=\"content\"></code>\n <div class=\"t-code-actions\">\n <tui-doc-copy class=\"t-copy\" [cdkCopyToClipboard]=\"content\"></tui-doc-copy>\n <ng-content></ng-content>\n </div>\n</pre>\n", styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:bold}.t-code{position:relative;margin:0;white-space:normal}.t-code:hover .t-code-actions,.t-code:focus-visible .t-code-actions{opacity:1}.t-code+.t-code{margin-top:1rem}.t-code-actions{position:absolute;top:.875rem;right:2rem;display:flex;opacity:0;grid-gap:.5rem;gap:.5rem;flex-direction:row-reverse}.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:.375rem 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"], components: [{ type: TuiDocCopyComponent, selector: "tui-doc-copy" }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.Highlight, selector: "[highlight]", inputs: ["highlight", "languages", "lineNumbers"], outputs: ["highlighted"] }, { type: i4__namespace$1.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
425
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeComponent, decorators: [{
|
|
426
|
-
type: i0.Component,
|
|
427
|
-
args: [{
|
|
428
|
-
selector: 'tui-doc-code',
|
|
429
|
-
templateUrl: './code.template.html',
|
|
430
|
-
styleUrls: ['./code.style.less'],
|
|
431
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
432
|
-
}]
|
|
433
|
-
}], ctorParameters: function () {
|
|
434
|
-
return [{ type: undefined, decorators: [{
|
|
435
|
-
type: i0.Inject,
|
|
436
|
-
args: [tokens.TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR]
|
|
437
|
-
}] }];
|
|
438
|
-
}, propDecorators: { filename: [{
|
|
439
|
-
type: i0.Input
|
|
440
|
-
}], code: [{
|
|
441
|
-
type: i0.Input
|
|
442
|
-
}], hasFilename: [{
|
|
443
|
-
type: i0.HostBinding,
|
|
444
|
-
args: ['class._has-filename']
|
|
445
|
-
}] } });
|
|
446
|
-
|
|
447
482
|
var TuiDocCopyModule = /** @class */ (function () {
|
|
448
483
|
function TuiDocCopyModule() {
|
|
449
484
|
}
|
|
@@ -461,23 +496,6 @@
|
|
|
461
496
|
}]
|
|
462
497
|
}] });
|
|
463
498
|
|
|
464
|
-
var TuiDocCodeModule = /** @class */ (function () {
|
|
465
|
-
function TuiDocCodeModule() {
|
|
466
|
-
}
|
|
467
|
-
return TuiDocCodeModule;
|
|
468
|
-
}());
|
|
469
|
-
TuiDocCodeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
470
|
-
TuiDocCodeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, declarations: [TuiDocCodeComponent], imports: [i4.CommonModule, i3.HighlightModule, TuiDocCopyModule, i4$1.ClipboardModule], exports: [TuiDocCodeComponent] });
|
|
471
|
-
TuiDocCodeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, imports: [[i4.CommonModule, i3.HighlightModule, TuiDocCopyModule, i4$1.ClipboardModule]] });
|
|
472
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocCodeModule, decorators: [{
|
|
473
|
-
type: i0.NgModule,
|
|
474
|
-
args: [{
|
|
475
|
-
imports: [i4.CommonModule, i3.HighlightModule, TuiDocCopyModule, i4$1.ClipboardModule],
|
|
476
|
-
declarations: [TuiDocCodeComponent],
|
|
477
|
-
exports: [TuiDocCodeComponent],
|
|
478
|
-
}]
|
|
479
|
-
}] });
|
|
480
|
-
|
|
481
499
|
var MIN_WIDTH = 160;
|
|
482
500
|
var TuiDocDemoComponent = /** @class */ (function () {
|
|
483
501
|
function TuiDocDemoComponent(options, isMobile, el, locationRef, urlSerializer, texts, urlStateHandler) {
|
|
@@ -1402,7 +1420,7 @@
|
|
|
1402
1420
|
return TuiDocExampleComponent;
|
|
1403
1421
|
}());
|
|
1404
1422
|
TuiDocExampleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleComponent, deps: [{ token: i4$1.Clipboard }, { token: i2.TuiAlertService }, { token: common.LOCATION }, { token: i1.TUI_COPY_TEXTS }, { token: tokens.TUI_DOC_EXAMPLE_TEXTS }, { token: tokens.TUI_DOC_CODE_EDITOR, optional: true }, { token: tokens.TUI_DOC_EXAMPLE_CONTENT_PROCESSOR }, { token: i6.TUI_IS_E2E }, { token: tokens.TUI_DOC_CODE_ACTIONS }, { token: i6$1.Router }, { token: i6$1.ActivatedRoute }, { token: i4.Location }, { token: TUI_DOC_EXAMPLE_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1405
|
-
TuiDocExampleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocExampleComponent, selector: "tui-doc-example", inputs: { id: "id", heading: "heading", description: "description", content: "content", fullsize: "fullsize", componentName: "componentName" }, host: { properties: { "class._fullsize": "this.fullsize" } }, 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 appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-link-icon\"\n [icon]=\"options.linkIcon\"\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\n *ngIf=\"tabs.length > 1\"\n class=\"t-tabs-wrapper\"\n >\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 <ng-container *polymorpheusOutlet=\"getTabTitle(tab) as text\">\n {{ text }}\n </ng-container>\n </button>\n </ng-container>\n </tui-tabs-with-more>\n\n <tui-loader\n *ngIf=\"files | tuiMapper: visible\"\n size=\"xs\"\n [overlay]=\"true\"\n [showLoader]=\"!!(loading$ | async)\"\n (click)=\"edit(files)\"\n >\n <ng-container *ngIf=\"codeEditor?.content as content; else defaultEditContent\">\n <ng-container *polymorpheusOutlet=\"content as editContent\">\n {{ editContent }}\n </ng-container>\n </ng-container>\n\n <ng-template #defaultEditContent>\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n type=\"button\"\n >\n Edit on {{ codeEditor!.name }}\n </button>\n </ng-template>\n </tui-loader>\n </div>\n\n <div\n *ngFor=\"let tab of tabs; let index = index\"\n class=\"t-content\"\n [class.t-content_animated]=\"!isE2E\"\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 <tui-doc-code [code]=\"code\">\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-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 #0000001a;overflow:hidden}: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;max-width:100%;box-sizing:border-box;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:.375rem 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}:host:not(._fullsize) .t-demo{width:-webkit-min-content;width:min-content;min-width:20rem}.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.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: i2__namespace.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { type: TuiDocCodeComponent, selector: "tui-doc-code", inputs: ["filename", "code"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace$1.TuiItemDirective, selector: "[tuiItem]" }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "tuiDocExampleCapitalize": TuiDocExampleCapitalizePipe, "async": i4__namespace.AsyncPipe, "tuiDocExampleGetTabs": TuiDocExampleGetTabsPipe, "tuiMapper": i6__namespace$1.TuiMapperPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1423
|
+
TuiDocExampleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDocExampleComponent, selector: "tui-doc-example", inputs: { id: "id", heading: "heading", description: "description", content: "content", fullsize: "fullsize", componentName: "componentName" }, host: { properties: { "class._fullsize": "this.fullsize" } }, 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 appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-link-icon\"\n [icon]=\"options.linkIcon\"\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\n *ngIf=\"tabs.length > 1\"\n class=\"t-tabs-wrapper\"\n >\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 <ng-container *polymorpheusOutlet=\"getTabTitle(tab) as text\">\n {{ text }}\n </ng-container>\n </button>\n </ng-container>\n </tui-tabs-with-more>\n\n <tui-loader\n *ngIf=\"files | tuiMapper: visible\"\n size=\"xs\"\n [overlay]=\"true\"\n [showLoader]=\"!!(loading$ | async)\"\n (click)=\"edit(files)\"\n >\n <ng-container *ngIf=\"codeEditor?.content as content; else defaultEditContent\">\n <ng-container *polymorpheusOutlet=\"content as editContent\">\n {{ editContent }}\n </ng-container>\n </ng-container>\n\n <ng-template #defaultEditContent>\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n type=\"button\"\n >\n Edit on {{ codeEditor!.name }}\n </button>\n </ng-template>\n </tui-loader>\n </div>\n\n <div\n *ngFor=\"let tab of tabs; let index = index\"\n class=\"t-content\"\n [class.t-content_animated]=\"!isE2E\"\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 <tui-doc-code [code]=\"code\">\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-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 #0000001a;overflow:hidden}:host-context(tui-root._mobile) .t-example{margin-top:.75rem}.t-tabs-wrapper{display:flex;padding:0 .125rem 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;max-width:100%;box-sizing:border-box;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:.375rem 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}:host:not(._fullsize) .t-demo{width:-webkit-min-content;width:min-content;min-width:20rem}.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.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: i2__namespace.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { type: TuiDocCodeComponent, selector: "tui-doc-code", inputs: ["filename", "code"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace$1.TuiItemDirective, selector: "[tuiItem]" }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "tuiDocExampleCapitalize": TuiDocExampleCapitalizePipe, "async": i4__namespace.AsyncPipe, "tuiDocExampleGetTabs": TuiDocExampleGetTabsPipe, "tuiMapper": i6__namespace$1.TuiMapperPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1406
1424
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDocExampleComponent, decorators: [{
|
|
1407
1425
|
type: i0.Component,
|
|
1408
1426
|
args: [{
|