@taiga-ui/addon-doc 2.28.0 → 2.32.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 +77 -32
- package/bundles/taiga-ui-addon-doc.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-doc.umd.min.js +1 -15
- package/bundles/taiga-ui-addon-doc.umd.min.js.map +1 -1
- package/components/code/code.component.d.ts +1 -1
- package/components/code/parse-code-block.d.ts +1 -0
- package/components/documentation/documentation-property-connector.directive.d.ts +2 -2
- package/components/example/example.component.d.ts +4 -2
- package/esm2015/components/code/code.component.js +6 -5
- package/esm2015/components/code/parse-code-block.js +9 -0
- package/esm2015/components/demo/demo.component.js +3 -3
- package/esm2015/components/documentation/documentation-property-connector.directive.js +10 -12
- package/esm2015/components/documentation/documentation.component.js +3 -3
- package/esm2015/components/example/example.component.js +13 -8
- package/esm2015/components/main/main.component.js +6 -3
- package/esm2015/components/navigation/navigation.component.js +1 -1
- package/esm2015/components/page/page.component.js +1 -1
- package/esm2015/public-api.js +2 -1
- package/esm2015/utils/coerce-value.js +23 -0
- package/esm5/components/code/code.component.js +6 -5
- package/esm5/components/code/parse-code-block.js +16 -0
- package/esm5/components/demo/demo.component.js +3 -3
- package/esm5/components/documentation/documentation-property-connector.directive.js +10 -12
- package/esm5/components/documentation/documentation.component.js +3 -3
- package/esm5/components/example/example.component.js +13 -8
- package/esm5/components/main/main.component.js +6 -3
- package/esm5/components/navigation/navigation.component.js +1 -1
- package/esm5/components/page/page.component.js +1 -1
- package/esm5/public-api.js +2 -1
- package/esm5/utils/coerce-value.js +23 -0
- package/fesm2015/taiga-ui-addon-doc.js +67 -31
- package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
- package/fesm5/taiga-ui-addon-doc.js +74 -31
- package/fesm5/taiga-ui-addon-doc.js.map +1 -1
- package/package.json +18 -17
- package/public-api.d.ts +1 -0
- package/taiga-ui-addon-doc.metadata.json +1 -1
- package/utils/coerce-value.d.ts +1 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@angular/common'), require('ngx-highlightjs'), require('@taiga-ui/cdk'), require('@taiga-ui/kit'), require('@taiga-ui/core'), require('@angular/forms'), require('@angular/router'), require('@angular/animations'), require('@angular/cdk/clipboard'), require('@ng-web-apis/common'), require('@tinkoff/ng-polymorpheus'), require('@taiga-ui/addon-mobile'), require('@angular/platform-browser')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@taiga-ui/addon-doc', ['exports', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/common', 'ngx-highlightjs', '@taiga-ui/cdk', '@taiga-ui/kit', '@taiga-ui/core', '@angular/forms', '@angular/router', '@angular/animations', '@angular/cdk/clipboard', '@ng-web-apis/common', '@tinkoff/ng-polymorpheus', '@taiga-ui/addon-mobile', '@angular/platform-browser'], factory) :
|
|
4
|
-
(global = global || self, factory((global['taiga-ui'] = global['taiga-ui'] || {}, global['taiga-ui']['addon-doc'] = {}), global.ng.core, global.rxjs, global.rxjs.operators, global.ng.common, global.ngxHighlightjs, global.cdk, global.kit, global.core$1, global.ng.forms, global.ng.router, global.ng.animations, global.ng.cdk.clipboard, global.common$1, global.ngPolymorpheus, global.addonMobile, global.ng.platformBrowser));
|
|
5
|
-
}(this, (function (exports, core, rxjs, operators, common, ngxHighlightjs, cdk, kit, core$1, forms, router, animations, clipboard, common$1, ngPolymorpheus, addonMobile, platformBrowser) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('markdown-it'), require('@angular/common'), require('ngx-highlightjs'), require('@taiga-ui/cdk'), require('@taiga-ui/kit'), require('@taiga-ui/core'), require('@angular/forms'), require('@angular/router'), require('@angular/animations'), require('@angular/cdk/clipboard'), require('@ng-web-apis/common'), require('@tinkoff/ng-polymorpheus'), require('@taiga-ui/addon-mobile'), require('@angular/platform-browser')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/addon-doc', ['exports', '@angular/core', 'rxjs', 'rxjs/operators', 'markdown-it', '@angular/common', 'ngx-highlightjs', '@taiga-ui/cdk', '@taiga-ui/kit', '@taiga-ui/core', '@angular/forms', '@angular/router', '@angular/animations', '@angular/cdk/clipboard', '@ng-web-apis/common', '@tinkoff/ng-polymorpheus', '@taiga-ui/addon-mobile', '@angular/platform-browser'], factory) :
|
|
4
|
+
(global = global || self, factory((global['taiga-ui'] = global['taiga-ui'] || {}, global['taiga-ui']['addon-doc'] = {}), global.ng.core, global.rxjs, global.rxjs.operators, global.MarkdownIt, global.ng.common, global.ngxHighlightjs, global.cdk, global.kit, global.core$1, global.ng.forms, global.ng.router, global.ng.animations, global.ng.cdk.clipboard, global.common$1, global.ngPolymorpheus, global.addonMobile, global.ng.platformBrowser));
|
|
5
|
+
}(this, (function (exports, core, rxjs, operators, MarkdownIt, common, ngxHighlightjs, cdk, kit, core$1, forms, router, animations, clipboard, common$1, ngPolymorpheus, addonMobile, platformBrowser) { 'use strict';
|
|
6
|
+
|
|
7
|
+
MarkdownIt = MarkdownIt && Object.prototype.hasOwnProperty.call(MarkdownIt, 'default') ? MarkdownIt['default'] : MarkdownIt;
|
|
6
8
|
|
|
7
9
|
/*! *****************************************************************************
|
|
8
10
|
Copyright (c) Microsoft Corporation.
|
|
@@ -243,11 +245,26 @@
|
|
|
243
245
|
});
|
|
244
246
|
}
|
|
245
247
|
|
|
248
|
+
function tryParseMarkdownCodeBlock(text) {
|
|
249
|
+
if (text === void 0) { text = ''; }
|
|
250
|
+
var tokens = new MarkdownIt().parse(text, {});
|
|
251
|
+
var result = tokens
|
|
252
|
+
.filter(function (_a) {
|
|
253
|
+
var tag = _a.tag, type = _a.type;
|
|
254
|
+
return tag === 'code' && type === 'fence';
|
|
255
|
+
})
|
|
256
|
+
.map(function (_a) {
|
|
257
|
+
var content = _a.content;
|
|
258
|
+
return content;
|
|
259
|
+
});
|
|
260
|
+
return result.length ? result : [text];
|
|
261
|
+
}
|
|
262
|
+
|
|
246
263
|
var TuiDocCodeComponent = /** @class */ (function () {
|
|
247
264
|
function TuiDocCodeComponent() {
|
|
248
265
|
this.rawLoader$$ = new rxjs.BehaviorSubject('');
|
|
249
266
|
this.filename = '';
|
|
250
|
-
this.processor$ = this.rawLoader$$.pipe(operators.switchMap(rawLoad));
|
|
267
|
+
this.processor$ = this.rawLoader$$.pipe(operators.switchMap(rawLoad), operators.map(tryParseMarkdownCodeBlock));
|
|
251
268
|
}
|
|
252
269
|
Object.defineProperty(TuiDocCodeComponent.prototype, "code", {
|
|
253
270
|
set: function (code) {
|
|
@@ -275,8 +292,8 @@
|
|
|
275
292
|
TuiDocCodeComponent = __decorate([
|
|
276
293
|
core.Component({
|
|
277
294
|
selector: 'tui-doc-code',
|
|
278
|
-
template: "<p *ngIf=\"filename\" class=\"t-header\">{{filename}}</p>\n<pre\n class=\"t-code\"\n><code [lineNumbers]=\"true\" [highlight]=\"
|
|
279
|
-
styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:700}.t-code{margin:0}.hljs:not(:empty){font:var(--tui-font-text-m);padding:1.5rem 2rem;font-family:monospace;background:var(--tui-clear-disabled);word-wrap:break-word;white-space:pre-wrap}@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution:0.001dpcm){.hljs:not(:empty)::-webkit-scrollbar,.hljs:not(:empty)::-webkit-scrollbar-thumb{width:1rem;height:1rem;border-radius:6.25rem;background-clip:padding-box;border:6px solid transparent}.hljs:not(:empty)::-webkit-scrollbar{background-color:transparent}.hljs:not(:empty)::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}.hljs:not(:empty)::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}.hljs:not(:empty)::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}:host._has-filename .hljs:not(:empty){border-radius:.75rem}
|
|
295
|
+
template: "<p *ngIf=\"filename\" class=\"t-header\">{{filename}}</p>\n<pre\n *ngFor=\"let content of processor$ | async\"\n class=\"t-code\"\n><code [lineNumbers]=\"true\" [highlight]=\"content\"></code></pre>\n",
|
|
296
|
+
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:6px solid transparent}.hljs:not(:empty)::-webkit-scrollbar{background-color:transparent}.hljs:not(:empty)::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}.hljs:not(:empty)::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}.hljs:not(:empty)::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}:host._has-filename .hljs:not(:empty){border-radius:.75rem}:host-context(tui-root._mobile) .hljs:not(:empty){padding:1rem}"]
|
|
280
297
|
})
|
|
281
298
|
], TuiDocCodeComponent);
|
|
282
299
|
return TuiDocCodeComponent;
|
|
@@ -418,7 +435,7 @@
|
|
|
418
435
|
this.change$ = new rxjs.Subject();
|
|
419
436
|
this.items = ['onLight', 'onDark'];
|
|
420
437
|
this.isBrowser = common.isPlatformBrowser(platformId);
|
|
421
|
-
var parsedMode = locationRef.path().match(/
|
|
438
|
+
var parsedMode = locationRef.path().match(/tuiMode=(onDark|onLight)/);
|
|
422
439
|
if (parsedMode !== null && parsedMode.length > 0) {
|
|
423
440
|
this.modeControl.setValue(parsedMode[1]);
|
|
424
441
|
}
|
|
@@ -525,7 +542,7 @@
|
|
|
525
542
|
useExisting: core.forwardRef(function () { return TuiDocDemoComponent_1; }),
|
|
526
543
|
},
|
|
527
544
|
],
|
|
528
|
-
styles: [":host{position:relative;display:block;min-width:100%;margin:1.5rem 0}.t-bg-toggle{position:absolute;bottom:calc(100% + .75rem);display:flex;align-items:center;justify-content:flex-end;pointer-events:none;width:100%}.t-bg-toggle>*{pointer-events:auto}.t-wrapper{box-shadow:0 .5rem 1rem rgba(0,0,0,.16);display:flex;border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m);max-width:100%;min-height:6rem;width:100%;background-color:var(--tui-base-01);overflow:hidden}.t-wrapper.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-base-02) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-base-02) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-base-02) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-base-02) 75%);background-size:1.25rem 1.25rem;background-position:0 0,0 .625rem,.625rem -.625rem,-.625rem 0}.t-wrapper.t-wrapper_dark{background-color:#454e58;color:var(--tui-base-01)}.t-wrapper.t-wrapper_gray{background-color:#e5e7ea}.t-wrapper.t-wrapper_dark.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-focus) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-focus) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-focus) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-focus) 75%)}.t-wrapper.t-wrapper_gray.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-base-05) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-base-05) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-base-05) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-base-05) 75%)}.t-content{flex:1 1 0;min-width:0;padding:1.5rem;box-sizing:border-box;overflow:hidden}
|
|
545
|
+
styles: [":host{position:relative;display:block;min-width:100%;margin:1.5rem 0}.t-bg-toggle{position:absolute;bottom:calc(100% + .75rem);display:flex;align-items:center;justify-content:flex-end;pointer-events:none;width:100%}.t-bg-toggle>*{pointer-events:auto}.t-wrapper{box-shadow:0 .5rem 1rem rgba(0,0,0,.16);display:flex;border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m);max-width:100%;min-height:6rem;width:100%;background-color:var(--tui-base-01);overflow:hidden}.t-wrapper.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-base-02) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-base-02) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-base-02) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-base-02) 75%);background-size:1.25rem 1.25rem;background-position:0 0,0 .625rem,.625rem -.625rem,-.625rem 0}.t-wrapper.t-wrapper_dark{background-color:#454e58;color:var(--tui-base-01)}.t-wrapper.t-wrapper_gray{background-color:#e5e7ea}.t-wrapper.t-wrapper_dark.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-focus) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-focus) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-focus) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-focus) 75%)}.t-wrapper.t-wrapper_gray.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-base-05) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-base-05) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-base-05) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-base-05) 75%)}:host-context(tui-root._mobile) .t-wrapper{min-height:auto}.t-content{flex:1 1 0;min-width:0;padding:1.5rem;box-sizing:border-box;overflow:hidden}:host-context(tui-root._mobile) .t-content{padding:1rem}.t-form{display:flex;flex-wrap:wrap;align-items:flex-start}.t-input-wrapper{width:100%;margin-bottom:.5rem}.t-expand{width:100%}.t-icon{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out}.t-icon_rotated{transform:rotate(180deg)}.t-value{flex:1;background:var(--tui-clear-inverse);padding:.75rem;border-radius:.25rem}.t-mode{width:12.5rem}.t-select{max-width:15rem}.t-resizer{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;box-shadow:0 .5rem 1rem rgba(0,0,0,.16);position:relative;width:3.5rem;min-height:inherit;flex-shrink:0;border-left:1px solid var(--tui-base-03);cursor:col-resize;outline:0;background:var(--tui-base-01);color:var(--tui-text-01)}.t-resizer:after,.t-resizer:before{content:'';position:absolute;top:.75rem;left:50%;bottom:.75rem;width:1px;background:var(--tui-base-05)}.t-resizer:before{transform:translateX(.125rem)}.t-resizer:after{transform:translateX(-.1875rem)}:host-context(tui-root._mobile) .t-resizer{display:none}.t-resizer-text{font:var(--tui-font-text-s);position:relative;z-index:1;padding:.75rem;background:var(--tui-base-01)}.wrapper_light .t-resizer-text{background:#3e464e}@supports ((position:-webkit-sticky) or (position:sticky)){@media screen and (min-height:37.5rem){:host{position:-webkit-sticky;position:sticky;top:4.625rem;z-index:2}}}"]
|
|
529
546
|
}),
|
|
530
547
|
__param(0, core.Inject(cdk.TUI_IS_MOBILE)),
|
|
531
548
|
__param(1, core.Inject(cdk.TuiDestroyService)),
|
|
@@ -658,6 +675,29 @@
|
|
|
658
675
|
return inspectObject(data, depth);
|
|
659
676
|
}
|
|
660
677
|
|
|
678
|
+
function coerceValue(value) {
|
|
679
|
+
var prepared = String(value).trim();
|
|
680
|
+
if (isEmptyParamValue(prepared)) {
|
|
681
|
+
return null;
|
|
682
|
+
}
|
|
683
|
+
else if (isBooleanParamValue(prepared)) {
|
|
684
|
+
return String(prepared) === 'true';
|
|
685
|
+
}
|
|
686
|
+
else if (isNumberParamValue(prepared)) {
|
|
687
|
+
return Number(prepared);
|
|
688
|
+
}
|
|
689
|
+
return decodeURIComponent(prepared);
|
|
690
|
+
}
|
|
691
|
+
function isEmptyParamValue(value) {
|
|
692
|
+
return ['undefined', 'null', 'NaN', 'Infinity'].includes(value);
|
|
693
|
+
}
|
|
694
|
+
function isBooleanParamValue(value) {
|
|
695
|
+
return value === 'true' || value === 'false';
|
|
696
|
+
}
|
|
697
|
+
function isNumberParamValue(value) {
|
|
698
|
+
return /^-?[\d.]+(?:e-?\d+)?$/.test(value);
|
|
699
|
+
}
|
|
700
|
+
|
|
661
701
|
var SERIALIZED_SUFFIX = '$';
|
|
662
702
|
// @bad TODO: refactor output and value sync
|
|
663
703
|
var TuiDocDocumentationPropertyConnectorDirective = /** @class */ (function () {
|
|
@@ -719,22 +759,19 @@
|
|
|
719
759
|
};
|
|
720
760
|
TuiDocDocumentationPropertyConnectorDirective.prototype.emitEvent = function (event) {
|
|
721
761
|
// For more convenient debugging
|
|
722
|
-
console.
|
|
762
|
+
console.info(this.attrName, event);
|
|
723
763
|
this.emits$.next(this.emits$.value + 1);
|
|
724
764
|
};
|
|
725
765
|
TuiDocDocumentationPropertyConnectorDirective.prototype.parseParams = function (params) {
|
|
726
|
-
|
|
727
|
-
|
|
766
|
+
var propertyValue = params[this.documentationPropertyName];
|
|
767
|
+
var propertyValueWithSuffix = params["" + this.documentationPropertyName + SERIALIZED_SUFFIX];
|
|
768
|
+
if (!propertyValue && !propertyValueWithSuffix) {
|
|
728
769
|
return;
|
|
729
770
|
}
|
|
730
|
-
var
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
}
|
|
735
|
-
this.onValueChange(!isNaN(Number(params[this.documentationPropertyName]))
|
|
736
|
-
? Number(params[this.documentationPropertyName])
|
|
737
|
-
: params[this.documentationPropertyName]);
|
|
771
|
+
var value = !!propertyValueWithSuffix && this.documentationPropertyValues
|
|
772
|
+
? this.documentationPropertyValues[propertyValueWithSuffix]
|
|
773
|
+
: coerceValue(propertyValue);
|
|
774
|
+
this.onValueChange(value);
|
|
738
775
|
};
|
|
739
776
|
TuiDocDocumentationPropertyConnectorDirective.prototype.setQueryParam = function (value) {
|
|
740
777
|
var _a;
|
|
@@ -904,14 +941,14 @@
|
|
|
904
941
|
TuiDocDocumentationComponent = __decorate([
|
|
905
942
|
core.Component({
|
|
906
943
|
selector: 'tui-doc-documentation',
|
|
907
|
-
template: "<h1 *ngIf=\"heading\" class=\"tui-text_h4\">{{ heading }}</h1>\n<ng-content></ng-content>\n<table class=\"tui-table tui-table_layout_fixed tui-table_font-size_s\">\n <tr class=\"tui-table__tr tui-table__tr_hover_disabled t-row t-row_header\">\n <th class=\"tui-table__th tui-table__th_first t-cell t-cell_prop\">\n {{ texts[2] }}\n </th>\n <td class=\"tui-table__th\">{{ type }}</td>\n <td\n *ngIf=\"showValues && !isAPI\"\n class=\"tui-table__th tui-table__th_last tui-table__th_text_right t-cell t-cell_value\"\n >\n {{ texts[3] }}\n </td>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of propertiesConnectors; last as lastItem\"\n class=\"tui-table__tr tui-table__tr_hover_disabled t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated\"\n [class.tui-table__tr_border_none]=\"lastItem\"\n >\n <td\n class=\"tui-table__td tui-table__td_first tui-table__td_align_center t-cell\"\n >\n <div\n automation-id=\"tui-documentation__property-name\"\n class=\"t-property t-cell\"\n >\n {{ stripOptional(propertyConnector.attrName) }}\n <tui-badge\n *ngIf=\"isOptional(propertyConnector.attrName)\"\n size=\"s\"\n value=\"Optional\"\n ></tui-badge>\n </div>\n <span\n *ngIf=\"propertyConnector.documentationPropertyDeprecated\"\n class=\"t-deprecated-label\"\n >\n deprecated\n </span>\n <ng-container\n *ngTemplateOutlet=\"propertyConnector.template\"\n ></ng-container>\n </td>\n <td class=\"tui-table__td tui-table__td_align_center t-cell\">\n <span class=\"type\">\n {{ propertyConnector.documentationPropertyType }}\n <tui-tooltip\n *ngIf=\"showContentTooltip(propertyConnector.documentationPropertyType)\"\n [describeId]=\"propertyConnector.attrName\"\n [content]=\"content\"\n >\n <ng-template #content>\n {{ texts[4] }}\n <a\n tuiLink\n tuiMode=\"onDark\"\n target=\"_blank\"\n href=\"https://github.com/
|
|
944
|
+
template: "<h1 *ngIf=\"heading\" class=\"tui-text_h4\">{{ heading }}</h1>\n<ng-content></ng-content>\n<table class=\"tui-table tui-table_layout_fixed tui-table_font-size_s\">\n <tr class=\"tui-table__tr tui-table__tr_hover_disabled t-row t-row_header\">\n <th class=\"tui-table__th tui-table__th_first t-cell t-cell_prop\">\n {{ texts[2] }}\n </th>\n <td class=\"tui-table__th\">{{ type }}</td>\n <td\n *ngIf=\"showValues && !isAPI\"\n class=\"tui-table__th tui-table__th_last tui-table__th_text_right t-cell t-cell_value\"\n >\n {{ texts[3] }}\n </td>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of propertiesConnectors; last as lastItem\"\n class=\"tui-table__tr tui-table__tr_hover_disabled t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated\"\n [class.tui-table__tr_border_none]=\"lastItem\"\n >\n <td\n class=\"tui-table__td tui-table__td_first tui-table__td_align_center t-cell\"\n >\n <div\n automation-id=\"tui-documentation__property-name\"\n class=\"t-property t-cell\"\n >\n {{ stripOptional(propertyConnector.attrName) }}\n <tui-badge\n *ngIf=\"isOptional(propertyConnector.attrName)\"\n size=\"s\"\n value=\"Optional\"\n ></tui-badge>\n </div>\n <span\n *ngIf=\"propertyConnector.documentationPropertyDeprecated\"\n class=\"t-deprecated-label\"\n >\n deprecated\n </span>\n <ng-container\n *ngTemplateOutlet=\"propertyConnector.template\"\n ></ng-container>\n </td>\n <td class=\"tui-table__td tui-table__td_align_center t-cell\">\n <span class=\"type\">\n {{ propertyConnector.documentationPropertyType }}\n <tui-tooltip\n *ngIf=\"showContentTooltip(propertyConnector.documentationPropertyType)\"\n [describeId]=\"propertyConnector.attrName\"\n [content]=\"content\"\n >\n <ng-template #content>\n {{ texts[4] }}\n <a\n tuiLink\n tuiMode=\"onDark\"\n target=\"_blank\"\n href=\"https://github.com/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=\"tui-table__td tui-table__td_align_center tui-table__td_last tui-table__td_text_right t-cell\"\n >\n <ng-container\n *ngIf=\"propertyConnector.shouldShowValues; else elseEmitter\"\n >\n <tui-select\n *ngIf=\"propertyConnector.hasItems; else noItems\"\n tuiTextfieldSize=\"m\"\n tuiDropdownLimitWidth=\"min\"\n [tuiTextfieldCleaner]=\"showCleaner(propertyConnector.documentationPropertyType)\"\n [tuiTextfieldLabelOutside]=\"true\"\n [nativeId]=\"propertyConnector.attrName\"\n [valueContent]=\"selectContent\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n >\n <code class=\"t-exception\">null</code>\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"propertyConnector.documentationPropertyValues\"\n [itemContent]=\"selectContent\"\n ></tui-data-list-wrapper>\n </tui-select>\n <ng-template #selectContent let-data>\n <code>{{ inspectAny(data) }}</code>\n </ng-template>\n\n <ng-template #noItems>\n <ng-container\n [ngSwitch]=\"propertyConnector.documentationPropertyType\"\n >\n <tui-toggle\n *ngSwitchCase=\"'boolean'\"\n size=\"l\"\n [nativeId]=\"propertyConnector.attrName\"\n [showIcons]=\"true\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-toggle>\n\n <tui-primitive-textfield\n *ngSwitchCase=\"'string'\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiTextfieldCleaner]=\"true\"\n [value]=\"propertyConnector.documentationPropertyValue || ''\"\n (valueChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-primitive-textfield>\n\n <div *ngSwitchCase=\"'color'\" tuiGroup>\n <tui-primitive-textfield\n tuiTextfieldType=\"color\"\n tuiTextfieldSize=\"m\"\n [attr.id]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiInputOpacity]=\"getOpacity(propertyConnector.documentationPropertyValue)\"\n [value]=\"getColor(propertyConnector.documentationPropertyValue)\"\n (valueChange)=\"onColorChange(propertyConnector, $event)\"\n ></tui-primitive-textfield>\n <tui-input-count\n tuiTextfieldSize=\"m\"\n [max]=\"100\"\n [ngModel]=\"getOpacity(propertyConnector.documentationPropertyValue)\"\n (ngModelChange)=\"onOpacityChange(propertyConnector, $event)\"\n >\n Opacity\n </tui-input-count>\n </div>\n\n <tui-input-count\n *ngSwitchCase=\"'number'\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-input-count>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-template #elseEmitter>\n <tui-notification\n class=\"t-output\"\n [@emitEvent]=\"propertyConnector.emits$ | async\"\n >\n Emit!\n </tui-notification>\n </ng-template>\n </td>\n </tr>\n</table>\n",
|
|
908
945
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
909
946
|
animations: [
|
|
910
947
|
animations.trigger('emitEvent', [
|
|
911
948
|
animations.transition(':increment', [animations.style({ opacity: 1 }), animations.animate('500ms ease-in')]),
|
|
912
949
|
]),
|
|
913
950
|
],
|
|
914
|
-
styles: [":host{display:block;min-width:100%}
|
|
951
|
+
styles: [":host{display:block;min-width:100%}:host-context(tui-root._mobile) .t-row{display:flex;flex-wrap:wrap}:host-context(tui-root._mobile) .t-row_header{display:none}.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-property{font:var(--tui-font-text-m);margin-bottom:.25rem;font-family:monospace;color:#8f75d1}.t-type{font-family:monospace}.t-deprecated{background-color:var(--tui-error-bg)}.t-deprecated-label{margin-right:.125rem;color:var(--tui-error-fill)}.t-exception{display:block;width:-webkit-max-content;width:-moz-max-content;width:max-content}.t-output{text-align:left;opacity:0}"]
|
|
915
952
|
}),
|
|
916
953
|
__param(0, core.Inject(core.ChangeDetectorRef)),
|
|
917
954
|
__param(1, core.Inject(TUI_DOC_DOCUMENTATION_TEXTS))
|
|
@@ -1051,7 +1088,7 @@
|
|
|
1051
1088
|
// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
|
|
1052
1089
|
// @dynamic
|
|
1053
1090
|
var TuiDocExampleComponent = /** @class */ (function () {
|
|
1054
|
-
function TuiDocExampleComponent(id, clipboard, notifications, location, copyTexts$, texts, codeEditor, processContent) {
|
|
1091
|
+
function TuiDocExampleComponent(id, clipboard, notifications, location, copyTexts$, texts, codeEditor, processContent, isCypress) {
|
|
1055
1092
|
this.id = id;
|
|
1056
1093
|
this.clipboard = clipboard;
|
|
1057
1094
|
this.notifications = notifications;
|
|
@@ -1060,12 +1097,14 @@
|
|
|
1060
1097
|
this.texts = texts;
|
|
1061
1098
|
this.codeEditor = codeEditor;
|
|
1062
1099
|
this.processContent = processContent;
|
|
1100
|
+
this.isCypress = isCypress;
|
|
1063
1101
|
this.rawLoader$$ = new rxjs.BehaviorSubject({});
|
|
1064
1102
|
this.heading = '';
|
|
1065
1103
|
this.description = '';
|
|
1066
1104
|
this.componentName = this.location.pathname.slice(1);
|
|
1067
|
-
this.
|
|
1068
|
-
this.defaultTab = this.texts[
|
|
1105
|
+
this.defaultTabIndex = 0;
|
|
1106
|
+
this.defaultTab = this.texts[this.defaultTabIndex];
|
|
1107
|
+
this.activeItemIndex = this.defaultTabIndex;
|
|
1069
1108
|
this.copy$ = this.copyTexts$.pipe(operators.map(function (_a) {
|
|
1070
1109
|
var _b = __read(_a, 1), copy = _b[0];
|
|
1071
1110
|
return copy;
|
|
@@ -1101,7 +1140,8 @@
|
|
|
1101
1140
|
{ type: rxjs.Observable, decorators: [{ type: core.Inject, args: [kit.TUI_COPY_TEXTS,] }] },
|
|
1102
1141
|
{ type: Array, decorators: [{ type: core.Inject, args: [TUI_DOC_EXAMPLE_TEXTS,] }] },
|
|
1103
1142
|
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [TUI_DOC_CODE_EDITOR,] }] },
|
|
1104
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [TUI_DOC_EXAMPLE_CONTENT_PROCESSOR,] }] }
|
|
1143
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [TUI_DOC_EXAMPLE_CONTENT_PROCESSOR,] }] },
|
|
1144
|
+
{ type: Boolean, decorators: [{ type: core.Inject, args: [cdk.TUI_IS_CYPRESS,] }] }
|
|
1105
1145
|
]; };
|
|
1106
1146
|
__decorate([
|
|
1107
1147
|
core.Input()
|
|
@@ -1118,9 +1158,9 @@
|
|
|
1118
1158
|
TuiDocExampleComponent = __decorate([
|
|
1119
1159
|
core.Component({
|
|
1120
1160
|
selector: 'tui-doc-example',
|
|
1121
|
-
template: "<h3 *ngIf=\"heading\" class=\"t-title\">\n <span polymorpheus-outlet [content]=\"heading\"></span>\n <button\n *ngIf=\"id\"\n tuiIconButton\n type=\"button\"\n size=\"xs\"\n icon=\"tuiIconLinkLarge\"\n appearance=\"icon\"\n class=\"t-link-icon\"\n [title]=\"copy$ | async\"\n (click)=\"copyExampleLink()\"\n ></button>\n</h3>\n<h4\n *ngIf=\"description\"\n polymorpheus-outlet\n class=\"t-description\"\n [content]=\"description\"\n></h4>\n\n<div *ngIf=\"processor$ | async as content\" class=\"t-example\">\n <ng-container *ngIf=\"content | tuiDocExampleGetTabs: defaultTab as tabs\">\n <div class=\"t-tabs-wrapper\">\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabs\">\n <button *tuiTab tuiTab>{{tab}}</button>\n </ng-container>\n </tui-tabs-with-more>\n\n <button\n *ngIf=\"codeEditor\"\n tuiButton\n appearance=\"flat\"\n size=\"s\"\n (click)=\"codeEditor.open(componentName, id || '', content)\"\n >\n Edit on {{codeEditor.name}}\n </button>\n </div>\n\n <
|
|
1161
|
+
template: "<h3 *ngIf=\"heading\" class=\"t-title\">\n <span polymorpheus-outlet [content]=\"heading\"></span>\n <button\n *ngIf=\"id\"\n tuiIconButton\n type=\"button\"\n size=\"xs\"\n icon=\"tuiIconLinkLarge\"\n appearance=\"icon\"\n class=\"t-link-icon\"\n [title]=\"copy$ | async\"\n (click)=\"copyExampleLink()\"\n ></button>\n</h3>\n<h4\n *ngIf=\"description\"\n polymorpheus-outlet\n class=\"t-description\"\n [content]=\"description\"\n></h4>\n\n<div *ngIf=\"processor$ | async as content\" class=\"t-example\">\n <ng-container *ngIf=\"content | tuiDocExampleGetTabs: defaultTab as tabs\">\n <div class=\"t-tabs-wrapper\">\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabs\">\n <button *tuiTab tuiTab>{{tab}}</button>\n </ng-container>\n </tui-tabs-with-more>\n\n <button\n *ngIf=\"codeEditor\"\n tuiButton\n appearance=\"flat\"\n size=\"s\"\n (click)=\"codeEditor.open(componentName, id || '', content)\"\n >\n Edit on {{codeEditor.name}}\n </button>\n </div>\n\n <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 *ngIf=\"index === defaultTabIndex; else anotherTab\">\n <ng-container *ngTemplateOutlet=\"preview\"></ng-container>\n </ng-container>\n <ng-template #anotherTab>\n <ng-container\n *ngTemplateOutlet=\"codeSection; context: { $implicit: content[tabs[activeItemIndex]] || '' }\"\n ></ng-container>\n </ng-template>\n </div>\n </ng-container>\n</div>\n\n<ng-template #preview>\n <div automation-id=\"tui-doc-example\" class=\"t-demo\">\n <ng-content></ng-content>\n </div>\n</ng-template>\n\n<ng-template #codeSection let-code>\n <tui-doc-copy\n class=\"t-copy-code\"\n [cdkCopyToClipboard]=\"code\"\n ></tui-doc-copy>\n <tui-doc-code [code]=\"code\"></tui-doc-code>\n</ng-template>\n",
|
|
1122
1162
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1123
|
-
styles: [":host{position:relative;display:block;padding-top:3.5rem;clear:right}.t-title{font:var(--tui-font-heading-5);margin:0 0 .5rem}
|
|
1163
|
+
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-description:first-letter,.t-title:first-letter{text-transform:capitalize}.t-example{position:relative;margin-top:1.5rem;border:1px solid var(--tui-base-03);border-radius:var(--tui-radius-m);box-shadow:0 .125rem .1875rem rgba(0,0,0,.1)}: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:6px solid transparent}.t-demo::-webkit-scrollbar{background-color:transparent}.t-demo::-webkit-scrollbar-thumb{background-color:var(--tui-clear-hover)}.t-demo::-webkit-scrollbar-thumb:hover{background-color:var(--tui-clear-active)}.t-demo::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-03)}}:host-context(tui-root._mobile) .t-demo{padding:1rem}.t-copy-code{position:absolute;top:4.375rem;right:1rem}.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}"]
|
|
1124
1164
|
}),
|
|
1125
1165
|
__param(0, core.Attribute('id')),
|
|
1126
1166
|
__param(1, core.Inject(clipboard.Clipboard)),
|
|
@@ -1130,7 +1170,8 @@
|
|
|
1130
1170
|
__param(5, core.Inject(TUI_DOC_EXAMPLE_TEXTS)),
|
|
1131
1171
|
__param(6, core.Optional()),
|
|
1132
1172
|
__param(6, core.Inject(TUI_DOC_CODE_EDITOR)),
|
|
1133
|
-
__param(7, core.Inject(TUI_DOC_EXAMPLE_CONTENT_PROCESSOR))
|
|
1173
|
+
__param(7, core.Inject(TUI_DOC_EXAMPLE_CONTENT_PROCESSOR)),
|
|
1174
|
+
__param(8, core.Inject(cdk.TUI_IS_CYPRESS))
|
|
1134
1175
|
], TuiDocExampleComponent);
|
|
1135
1176
|
return TuiDocExampleComponent;
|
|
1136
1177
|
}());
|
|
@@ -1196,6 +1237,9 @@
|
|
|
1196
1237
|
{ type: Storage, decorators: [{ type: core.Inject, args: [common$1.LOCAL_STORAGE,] }] },
|
|
1197
1238
|
{ type: Window, decorators: [{ type: core.Inject, args: [common$1.WINDOW,] }] }
|
|
1198
1239
|
]; };
|
|
1240
|
+
__decorate([
|
|
1241
|
+
core.HostBinding('attr.data-mode')
|
|
1242
|
+
], TuiDocMainComponent.prototype, "mode", null);
|
|
1199
1243
|
TuiDocMainComponent = TuiDocMainComponent_1 = __decorate([
|
|
1200
1244
|
core.Component({
|
|
1201
1245
|
selector: 'tui-doc-main',
|
|
@@ -1208,7 +1252,7 @@
|
|
|
1208
1252
|
},
|
|
1209
1253
|
cdk.TuiSwipeService,
|
|
1210
1254
|
],
|
|
1211
|
-
styles: ["html{scroll-padding-top:4rem;height:auto}tui-root>tui-scroll-controls{top:4rem!important}@-webkit-keyframes tuiShaking{from,to{transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{transform:translate3d(-.3125rem,0,0)}20%,40%,60%,80%{transform:translate3d(.3125rem,0,0)}}@keyframes tuiShaking{from,to{transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{transform:translate3d(-.3125rem,0,0)}20%,40%,60%,80%{transform:translate3d(.3125rem,0,0)}}body{background:var(--tui-base-01);height:auto}tui-doc-main{display:block}code:not(.hljs):not([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}:focus code:not(.exception):not([class*=language-]){background:var(--tui-base-01)}.tui-doc-page{position:relative;z-index:0;padding-top:4rem}tui-doc-navigation.tui-doc-navigation{position:fixed;top:4rem;bottom:0;width:16.25rem;border-right:1px solid var(--tui-base-03)}.tui-doc-content{margin-left:16.25rem}@media screen and (max-width:47.9375em){tui-doc-navigation.tui-doc-navigation{display:none}.tui-doc-content{margin-left:0}}.tui-doc-outlet+*{display:block}.tui-doc-animated-example{-webkit-animation:1s .3s tuiShaking;animation:1s .3s tuiShaking}label.night-mode{cursor:pointer}.hljs-tag{background:0 0}.hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-01);background-color:var(--tui-clear-disabled)}.hljs-subst,.hljs-title{font-weight:400;color:var(--tui-text-01)}.hljs-comment,.hljs-quote{color:var(--tui-text-03);font-style:italic}.hljs-meta{color:#e38162}.hljs-keyword,.hljs-literal,.hljs-name,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-selector-tag,.hljs-type{font-weight:700;color:var(--tui-link)}.hljs-attribute,.hljs-link,.hljs-number,.hljs-regexp{font-weight:700;color:var(--tui-support-06)}.hljs-link,.hljs-number,.hljs-regexp{font-weight:400}.hljs-string{color:var(--tui-positive);font-weight:700}.hljs-bullet,.hljs-formula,.hljs-symbol{color:var(--tui-text-01);background:var(--tui-base-02);font-style:italic}.hljs-doctag{text-decoration:underline}.hljs-template-variable,.hljs-variable{color:var(--tui-warning-fill)}.hljs-addition{background:var(--tui-success-bg)}.hljs-deletion{background:var(--tui-error-bg)}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs .hljs-line-numbers{padding:0}.hljs-ln-numbers{vertical-align:top;opacity:.3;text-align:right;padding-right:1em!important}"]
|
|
1255
|
+
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}:focus code:not(.exception):not([class*=language-]){background:var(--tui-base-01)}.tui-doc-page{position:relative;z-index:0;padding-top:4rem}tui-doc-navigation.tui-doc-navigation{position:fixed;top:4rem;bottom:0;width:16.25rem;border-right:1px solid var(--tui-base-03)}.tui-doc-content{margin-left:16.25rem}@media screen and (max-width:47.9375em){tui-doc-navigation.tui-doc-navigation{display:none}.tui-doc-content{margin-left:0}}.tui-doc-outlet+*{display:block}.tui-doc-animated-example{-webkit-animation:1s .3s tuiShaking;animation:1s .3s tuiShaking}label.night-mode{cursor:pointer}.hljs-tag{background:0 0}.hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-01);background-color:var(--tui-clear-disabled)}.hljs.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}"]
|
|
1212
1256
|
}),
|
|
1213
1257
|
__param(0, core.Inject(common$1.LOCAL_STORAGE)),
|
|
1214
1258
|
__param(1, core.Inject(common$1.WINDOW))
|
|
@@ -1528,7 +1572,7 @@
|
|
|
1528
1572
|
template: "<tui-hosted-dropdown\n *tuiLet=\"filteredItems as filtered\"\n tuiAutoFocus\n tuiDropdownLimitWidth=\"fixed\"\n class=\"input\"\n [autoFocus]=\"!!sidebar\"\n [content]=\"dropdown\"\n [canOpen]=\"canOpen\"\n [(open)]=\"open\"\n>\n <tui-primitive-textfield\n iconAlign=\"left\"\n tuiTextfieldSize=\"m\"\n iconContent=\"tuiIconSearch\"\n [pseudoFocused]=\"open || null\"\n [tuiTextfieldCleaner]=\"true\"\n [tuiTextfieldLabelOutside]=\"true\"\n [value]=\"search\"\n (valueChange)=\"onSearchChange($event)\"\n >\n {{ searchText }}\n </tui-primitive-textfield>\n <ng-template #dropdown let-activeZone>\n <tui-data-list>\n <tui-opt-group\n *ngFor=\"let group of filtered; let index = index\"\n [label]=\"labels[index] || ''\"\n >\n <a\n *ngFor=\"let item of group\"\n tuiOption\n [routerLink]=\"item.route\"\n (click)=\"onClick()\"\n >\n {{ item.title }}\n </a>\n </tui-opt-group>\n </tui-data-list>\n </ng-template>\n</tui-hosted-dropdown>\n\n<nav class=\"navigation\">\n <tui-scrollbar class=\"scrollbar\" [tuiMode]=\"mode$ | async\">\n <tui-accordion [closeOthers]=\"false\" [rounded]=\"false\">\n <tui-accordion-item\n *ngFor=\"let label of labels; index as index\"\n size=\"s\"\n [borders]=\"null\"\n [(open)]=\"!!openPagesArr[index]\"\n >\n <span class=\"tui-space_left-2\">\n <strong>{{ label }}</strong>\n </span>\n <ng-template tuiAccordionItemContent>\n <div class=\"section\">\n <ng-container\n *ngFor=\"let item of items[index]; index as subIndex\"\n >\n <ng-container\n *ngTemplateOutlet=\"pages; context: {item: item, index: index * 100 + subIndex}\"\n ></ng-container>\n </ng-container>\n </div>\n </ng-template>\n </tui-accordion-item>\n </tui-accordion>\n <div class=\"items-container\">\n <ng-container\n *ngFor=\"let item of itemsWithoutSections; let index = index\"\n >\n <ng-container\n *ngTemplateOutlet=\"pages; context: {item: item, index: items.length - 1 + index}\"\n ></ng-container>\n </ng-container>\n </div>\n\n <ng-template #pages let-item=\"item\" let-index=\"index\">\n <a\n *ngIf=\"!item.subPages; else subPages\"\n tuiLink\n routerLinkActive=\"sublink_active\"\n class=\"sublink\"\n [routerLink]=\"item.route\"\n [scrollIntoView]=\"isActive(item.route)\"\n (click)=\"closeMenu()\"\n >\n {{ item.title }}\n </a>\n <ng-template #subPages>\n <div\n routerLinkActive\n class=\"subsection\"\n [routerLinkActiveOptions]=\"{exact: false}\"\n >\n <button\n *ngIf=\"item.subPages\"\n tuiLink\n type=\"button\"\n class=\"sublink sublink_subsection\"\n (click)=\"onGroupClick(index)\"\n >\n <tui-svg\n src=\"tuiIconChevronRight\"\n class=\"chevron\"\n [class.chevron_active]=\"!!openPagesGroupsArr[index]\"\n ></tui-svg>\n {{ item.title }}\n </button>\n <tui-expand\n class=\"tui-space_left-1\"\n [expanded]=\"!!openPagesGroupsArr[index]\"\n >\n <div class=\"section section_bordered\">\n <a\n *ngFor=\"let subPage of item.subPages\"\n tuiLink\n routerLinkActive=\"sublink_active\"\n class=\"sublink sublink_small\"\n [routerLink]=\"subPage.route\"\n [scrollIntoView]=\"isActive(subPage.route)\"\n (click)=\"closeMenu()\"\n >\n {{ subPage.title }}\n </a>\n </div>\n </tui-expand>\n </div>\n </ng-template>\n </ng-template>\n </tui-scrollbar>\n</nav>\n\n<ng-content></ng-content>\n",
|
|
1529
1573
|
providers: NAVIGATION_PROVIDERS,
|
|
1530
1574
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1531
|
-
styles: [":host{z-index:1;display:flex;flex-direction:column;text-align:center;background:var(--tui-base-01)}.input{display:block;margin:1.25rem}.navigation{display:flex;max-height:100%;min-height:0;flex:1 1 0;text-align:left}.scrollbar{width:100%;scroll-behavior:smooth}.items-container{display:flex;flex-direction:column;padding:0 16px}.section{display:flex;flex-direction:column;align-items:flex-start;margin:-1rem 0 -.5rem}.section_bordered{margin:.5rem 0;border-left:1px solid var(--tui-base-03)}.subsection{margin-left:.5rem}.sublink{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;font:var(--tui-font-text-m);margin-left:.5rem
|
|
1575
|
+
styles: [":host{z-index:1;display:flex;flex-direction:column;text-align:center;background:var(--tui-base-01)}.input{display:block;margin:1.25rem}.navigation{display:flex;max-height:100%;min-height:0;flex:1 1 0;text-align:left}.scrollbar{width:100%;scroll-behavior:smooth}.items-container{display:flex;flex-direction:column;padding:0 16px}.section{display:flex;flex-direction:column;align-items:flex-start;margin:-1rem 0 -.5rem}.section_bordered{margin:.5rem 0;border-left:1px solid var(--tui-base-03)}.subsection{margin-left:.5rem}.sublink{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:1rem 0 0;border:0;background:0 0;font-size:inherit;line-height:inherit;font:var(--tui-font-text-m);margin-left:.5rem}.sublink_small{margin-left:1rem;line-height:1.5rem;padding-top:.5rem}.sublink_subsection{margin-left:0;line-height:1.6rem}.sublink_active{color:var(--tui-text-01)}.chevron{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;width:1rem;height:1rem;margin:-.25rem .25rem 0 -.1875rem}.chevron_active{transform:rotate(90deg)}"]
|
|
1532
1576
|
}),
|
|
1533
1577
|
__param(0, core.Inject(core.ChangeDetectorRef)),
|
|
1534
1578
|
__param(1, core.Inject(platformBrowser.Title)),
|
|
@@ -1762,7 +1806,7 @@
|
|
|
1762
1806
|
template: "<header class=\"t-header\">\n <h1 class=\"t-title\">\n {{ header }}\n <tui-tag\n *ngIf=\"deprecated !== null\"\n value=\"deprecated\"\n status=\"custom\"\n class=\"t-tag t-tag_deprecated\"\n ></tui-tag>\n <tui-tag\n *ngIf=\"package\"\n status=\"custom\"\n class=\"t-tag t-tag_package\"\n [value]=\"package\"\n [autoColor]=\"true\"\n ></tui-tag>\n </h1>\n <tui-tabs-with-more\n *ngIf=\"tabConnectors.length\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container\n *ngFor=\"let tab of tabConnectors; first as first; index as index\"\n >\n <ng-container *ngIf=\"first; else dynamicTab\">\n <a\n *tuiTab\n tuiTab\n routerLink=\"./\"\n routerLinkActive\n [routerLinkActiveOptions]=\"{exact: true}\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-container>\n <ng-template #dynamicTab>\n <a\n *tuiTab\n tuiTab\n routerLinkActive\n [routerLink]=\"getRouterLink(tab.pageTab || defaultTabs[index])\"\n >\n {{ tab.pageTab || defaultTabs[index] }}\n </a>\n </ng-template>\n </ng-container>\n </tui-tabs-with-more>\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header\"\n [package]=\"package\"\n [type]=\"type\"\n [path]=\"path\"\n ></tui-doc-source-code>\n</header>\n<div class=\"t-content\">\n <ng-content></ng-content>\n <tui-doc-see-also\n *ngIf=\"showSeeAlso\"\n class=\"t-see-also\"\n [seeAlso]=\"seeAlso\"\n ></tui-doc-see-also>\n <ng-container *ngFor=\"let tab of tabConnectors; index as index\">\n <ng-container *ngIf=\"index === activeItemIndex\">\n <ng-container *ngTemplateOutlet=\"tab.template\"></ng-container>\n </ng-container>\n </ng-container>\n</div>\n",
|
|
1763
1807
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1764
1808
|
providers: PAGE_PROVIDERS,
|
|
1765
|
-
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)}
|
|
1809
|
+
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}"]
|
|
1766
1810
|
}),
|
|
1767
1811
|
__param(0, core.Attribute('deprecated')),
|
|
1768
1812
|
__param(1, core.Inject(TUI_DOC_DEFAULT_TABS)),
|
|
@@ -2031,6 +2075,7 @@
|
|
|
2031
2075
|
exports.TuiDocPageComponent = TuiDocPageComponent;
|
|
2032
2076
|
exports.TuiDocPageModule = TuiDocPageModule;
|
|
2033
2077
|
exports.TuiDocPageTabConnectorDirective = TuiDocPageTabConnectorDirective;
|
|
2078
|
+
exports.coerceValue = coerceValue;
|
|
2034
2079
|
exports.generateRoutes = generateRoutes;
|
|
2035
2080
|
exports.ɵa = TuiInputOpacityModule;
|
|
2036
2081
|
exports.ɵb = TuiInputOpacityDirective;
|