@taiga-ui/addon-doc 3.14.0 → 3.15.0-dev.main-35c5c0b
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 +143 -128
- package/bundles/taiga-ui-addon-doc.umd.js.map +1 -1
- package/components/documentation/documentation.component.d.ts +5 -3
- package/components/documentation/documentation.module.d.ts +2 -1
- package/esm2015/components/code/code.component.js +7 -7
- package/esm2015/components/copy/copy.component.js +4 -4
- package/esm2015/components/demo/demo.component.js +11 -11
- package/esm2015/components/documentation/documentation-property-connector.directive.js +11 -11
- package/esm2015/components/documentation/documentation.component.js +33 -27
- package/esm2015/components/documentation/documentation.module.js +6 -2
- package/esm2015/components/example/example.component.js +11 -11
- package/esm2015/components/language-switcher/language-switcher.component.js +18 -18
- package/esm2015/components/main/main.component.js +10 -10
- package/esm2015/components/navigation/navigation.component.js +19 -19
- package/esm2015/components/page/page-tab.directive.js +2 -2
- package/esm2015/components/page/page.component.js +12 -12
- package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +2 -2
- package/esm2015/internal/header/header.component.js +5 -5
- package/esm2015/internal/input-opacity/input-opacity.directive.js +3 -3
- package/esm2015/internal/see-also/see-also.component.js +6 -6
- package/esm2015/internal/source-code/source-code.component.js +7 -7
- package/esm2015/public-api.js +2 -1
- package/esm2015/tokens/excluded-properties.js +6 -0
- package/fesm2015/taiga-ui-addon-doc.js +143 -130
- package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
- package/package.json +6 -6
- package/public-api.d.ts +1 -0
- package/tokens/excluded-properties.d.ts +3 -0
|
@@ -404,8 +404,8 @@
|
|
|
404
404
|
|
|
405
405
|
var TuiDocCodeComponent = /** @class */ (function () {
|
|
406
406
|
function TuiDocCodeComponent() {
|
|
407
|
-
this.rawLoader$$ = new i9.BehaviorSubject(
|
|
408
|
-
this.filename =
|
|
407
|
+
this.rawLoader$$ = new i9.BehaviorSubject('');
|
|
408
|
+
this.filename = '';
|
|
409
409
|
this.processor$ = this.rawLoader$$.pipe(operators.switchMap(tuiRawLoad), operators.map(tuiTryParseMarkdownCodeBlock));
|
|
410
410
|
}
|
|
411
411
|
Object.defineProperty(TuiDocCodeComponent.prototype, "code", {
|
|
@@ -429,9 +429,9 @@
|
|
|
429
429
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocCodeComponent, decorators: [{
|
|
430
430
|
type: i0.Component,
|
|
431
431
|
args: [{
|
|
432
|
-
selector:
|
|
433
|
-
templateUrl:
|
|
434
|
-
styleUrls: [
|
|
432
|
+
selector: 'tui-doc-code',
|
|
433
|
+
templateUrl: './code.template.html',
|
|
434
|
+
styleUrls: ['./code.style.less'],
|
|
435
435
|
}]
|
|
436
436
|
}], propDecorators: { filename: [{
|
|
437
437
|
type: i0.Input
|
|
@@ -439,7 +439,7 @@
|
|
|
439
439
|
type: i0.Input
|
|
440
440
|
}], hasFilename: [{
|
|
441
441
|
type: i0.HostBinding,
|
|
442
|
-
args: [
|
|
442
|
+
args: ['class._has-filename']
|
|
443
443
|
}] } });
|
|
444
444
|
|
|
445
445
|
var TuiDocCodeModule = /** @class */ (function () {
|
|
@@ -485,9 +485,9 @@
|
|
|
485
485
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocCopyComponent, decorators: [{
|
|
486
486
|
type: i0.Component,
|
|
487
487
|
args: [{
|
|
488
|
-
selector:
|
|
489
|
-
templateUrl:
|
|
490
|
-
styleUrls: [
|
|
488
|
+
selector: 'tui-doc-copy',
|
|
489
|
+
templateUrl: './copy.template.html',
|
|
490
|
+
styleUrls: ['./copy.style.less'],
|
|
491
491
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
492
492
|
providers: [i6.TuiDestroyService],
|
|
493
493
|
}]
|
|
@@ -578,14 +578,14 @@
|
|
|
578
578
|
this.texts = texts;
|
|
579
579
|
this.control = null;
|
|
580
580
|
this.template = null;
|
|
581
|
-
this.updateOnVariants = [
|
|
581
|
+
this.updateOnVariants = ['change', 'blur', 'submit'];
|
|
582
582
|
this.updateOn = this.updateOnVariants[0];
|
|
583
583
|
this.expanded = false;
|
|
584
584
|
this.opaque = true;
|
|
585
585
|
this.mode = this.getUrlTree().queryParams.tuiMode || null;
|
|
586
586
|
this.sandboxWidth = parseInt(this.getUrlTree().queryParams.sandboxWidth, 10);
|
|
587
587
|
this.change$ = new i9.Subject();
|
|
588
|
-
this.items = [
|
|
588
|
+
this.items = ['onLight', 'onDark'];
|
|
589
589
|
}
|
|
590
590
|
TuiDocDemoComponent.prototype.onResize = function () {
|
|
591
591
|
this.updateWidth();
|
|
@@ -620,7 +620,7 @@
|
|
|
620
620
|
var clamped = Math.round(i6.tuiClamp(safe, MIN_WIDTH, total)) - this.delta;
|
|
621
621
|
var validated = safe < total ? clamped : NaN;
|
|
622
622
|
this.resizer.nativeElement.textContent = String(clamped);
|
|
623
|
-
this.resizeable.nativeElement.style.width = validated ? i6.tuiPx(safe) :
|
|
623
|
+
this.resizeable.nativeElement.style.width = validated ? i6.tuiPx(safe) : '';
|
|
624
624
|
this.sandboxWidth = validated;
|
|
625
625
|
};
|
|
626
626
|
Object.defineProperty(TuiDocDemoComponent.prototype, "delta", {
|
|
@@ -668,9 +668,9 @@
|
|
|
668
668
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocDemoComponent, decorators: [{
|
|
669
669
|
type: i0.Component,
|
|
670
670
|
args: [{
|
|
671
|
-
selector:
|
|
672
|
-
templateUrl:
|
|
673
|
-
styleUrls: [
|
|
671
|
+
selector: 'tui-doc-demo',
|
|
672
|
+
templateUrl: './demo.template.html',
|
|
673
|
+
styleUrls: ['./demo.style.less'],
|
|
674
674
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
675
675
|
providers: [
|
|
676
676
|
i6.TuiDestroyService,
|
|
@@ -702,10 +702,10 @@
|
|
|
702
702
|
args: [i6.TuiResizeableDirective, { static: true }]
|
|
703
703
|
}], content: [{
|
|
704
704
|
type: i0.ViewChild,
|
|
705
|
-
args: [
|
|
705
|
+
args: ['content', { static: true }]
|
|
706
706
|
}], resizer: [{
|
|
707
707
|
type: i0.ViewChild,
|
|
708
|
-
args: [
|
|
708
|
+
args: ['resizer', { static: true }]
|
|
709
709
|
}], control: [{
|
|
710
710
|
type: i0.Input
|
|
711
711
|
}], template: [{
|
|
@@ -713,10 +713,10 @@
|
|
|
713
713
|
args: [i0.TemplateRef]
|
|
714
714
|
}], onResize: [{
|
|
715
715
|
type: i0.HostListener,
|
|
716
|
-
args: [
|
|
716
|
+
args: ['window:resize']
|
|
717
717
|
}], onMouseUp: [{
|
|
718
718
|
type: i0.HostListener,
|
|
719
|
-
args: [
|
|
719
|
+
args: ['document:mouseup.silent']
|
|
720
720
|
}], updateUrl: [] } });
|
|
721
721
|
|
|
722
722
|
var TuiDocDemoModule = /** @class */ (function () {
|
|
@@ -794,6 +794,11 @@
|
|
|
794
794
|
}]
|
|
795
795
|
}] });
|
|
796
796
|
|
|
797
|
+
var TUI_DOC_EXCLUDED_PROPERTIES = new i0.InjectionToken("[TUI_DOC_EXCLUDED_PROPERTIES]: Token to exclude inherited documentation properties", { factory: function () { return new Set([]); } });
|
|
798
|
+
function tuiDocExcludeProperties(properties) {
|
|
799
|
+
return { provide: TUI_DOC_EXCLUDED_PROPERTIES, useValue: new Set(properties) };
|
|
800
|
+
}
|
|
801
|
+
|
|
797
802
|
function tuiCoerceValue(value) {
|
|
798
803
|
var prepared = String(value).trim();
|
|
799
804
|
if (isEmptyParamValue(prepared)) {
|
|
@@ -833,7 +838,7 @@
|
|
|
833
838
|
return value.startsWith("{") && value.endsWith("}");
|
|
834
839
|
}
|
|
835
840
|
|
|
836
|
-
var SERIALIZED_SUFFIX =
|
|
841
|
+
var SERIALIZED_SUFFIX = '$';
|
|
837
842
|
// @bad TODO: refactor output and value sync
|
|
838
843
|
var TuiDocDocumentationPropertyConnectorDirective = /** @class */ (function () {
|
|
839
844
|
function TuiDocDocumentationPropertyConnectorDirective(template, locationRef, activatedRoute, urlSerializer) {
|
|
@@ -841,9 +846,9 @@
|
|
|
841
846
|
this.locationRef = locationRef;
|
|
842
847
|
this.activatedRoute = activatedRoute;
|
|
843
848
|
this.urlSerializer = urlSerializer;
|
|
844
|
-
this.documentationPropertyName =
|
|
849
|
+
this.documentationPropertyName = '';
|
|
845
850
|
this.documentationPropertyMode = null;
|
|
846
|
-
this.documentationPropertyType =
|
|
851
|
+
this.documentationPropertyType = '';
|
|
847
852
|
this.documentationPropertyDeprecated = false;
|
|
848
853
|
this.documentationPropertyValues = null;
|
|
849
854
|
this.documentationPropertyValueChange = new i0.EventEmitter();
|
|
@@ -856,11 +861,11 @@
|
|
|
856
861
|
Object.defineProperty(TuiDocDocumentationPropertyConnectorDirective.prototype, "attrName", {
|
|
857
862
|
get: function () {
|
|
858
863
|
switch (this.documentationPropertyMode) {
|
|
859
|
-
case
|
|
864
|
+
case 'input':
|
|
860
865
|
return "[" + this.documentationPropertyName + "]";
|
|
861
|
-
case
|
|
866
|
+
case 'output':
|
|
862
867
|
return "(" + this.documentationPropertyName + ")";
|
|
863
|
-
case
|
|
868
|
+
case 'input-output':
|
|
864
869
|
return "[(" + this.documentationPropertyName + ")]";
|
|
865
870
|
default:
|
|
866
871
|
return this.documentationPropertyName;
|
|
@@ -878,7 +883,7 @@
|
|
|
878
883
|
});
|
|
879
884
|
Object.defineProperty(TuiDocDocumentationPropertyConnectorDirective.prototype, "shouldShowValues", {
|
|
880
885
|
get: function () {
|
|
881
|
-
return this.documentationPropertyMode !==
|
|
886
|
+
return this.documentationPropertyMode !== 'output';
|
|
882
887
|
},
|
|
883
888
|
enumerable: false,
|
|
884
889
|
configurable: true
|
|
@@ -914,7 +919,7 @@
|
|
|
914
919
|
var computedValue = isValueAvailableByKey && this.documentationPropertyValues
|
|
915
920
|
? this.documentationPropertyValues.indexOf(value)
|
|
916
921
|
: value;
|
|
917
|
-
var suffix = isValueAvailableByKey ? SERIALIZED_SUFFIX :
|
|
922
|
+
var suffix = isValueAvailableByKey ? SERIALIZED_SUFFIX : '';
|
|
918
923
|
var propName = this.documentationPropertyName + suffix;
|
|
919
924
|
tree.queryParams = Object.assign(Object.assign({}, tree.queryParams), (_a = {}, _a[propName] = computedValue, _a));
|
|
920
925
|
this.locationRef.go(String(tree));
|
|
@@ -926,8 +931,8 @@
|
|
|
926
931
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocDocumentationPropertyConnectorDirective, decorators: [{
|
|
927
932
|
type: i0.Directive,
|
|
928
933
|
args: [{
|
|
929
|
-
selector:
|
|
930
|
-
exportAs:
|
|
934
|
+
selector: 'ng-template[documentationPropertyName]',
|
|
935
|
+
exportAs: 'documentationProperty',
|
|
931
936
|
}]
|
|
932
937
|
}], ctorParameters: function () {
|
|
933
938
|
return [{ type: i0__namespace.TemplateRef, decorators: [{
|
|
@@ -1030,7 +1035,7 @@
|
|
|
1030
1035
|
set: function (opacity) {
|
|
1031
1036
|
var nativeFocusableElement = this.tuiFocusableComponent.nativeFocusableElement;
|
|
1032
1037
|
if (nativeFocusableElement) {
|
|
1033
|
-
this.renderer.setStyle(nativeFocusableElement,
|
|
1038
|
+
this.renderer.setStyle(nativeFocusableElement, 'opacity', opacity / 100);
|
|
1034
1039
|
}
|
|
1035
1040
|
},
|
|
1036
1041
|
enumerable: false,
|
|
@@ -1043,7 +1048,7 @@
|
|
|
1043
1048
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiInputOpacityDirective, decorators: [{
|
|
1044
1049
|
type: i0.Directive,
|
|
1045
1050
|
args: [{
|
|
1046
|
-
selector:
|
|
1051
|
+
selector: '[tuiInputOpacity]',
|
|
1047
1052
|
}]
|
|
1048
1053
|
}], ctorParameters: function () {
|
|
1049
1054
|
return [{ type: i0__namespace.Renderer2, decorators: [{
|
|
@@ -1232,17 +1237,19 @@
|
|
|
1232
1237
|
// @bad TODO subscribe propertiesConnectors changes
|
|
1233
1238
|
// @bad TODO refactor to make more flexible
|
|
1234
1239
|
var TuiDocDocumentationComponent = /** @class */ (function () {
|
|
1235
|
-
function TuiDocDocumentationComponent(changeDetectorRef, texts, destroy$, getColor, getOpacity) {
|
|
1240
|
+
function TuiDocDocumentationComponent(changeDetectorRef, texts, excludedProperties, destroy$, getColor, getOpacity) {
|
|
1236
1241
|
this.changeDetectorRef = changeDetectorRef;
|
|
1237
1242
|
this.texts = texts;
|
|
1243
|
+
this.excludedProperties = excludedProperties;
|
|
1238
1244
|
this.destroy$ = destroy$;
|
|
1239
1245
|
this.getColor = getColor;
|
|
1240
1246
|
this.getOpacity = getOpacity;
|
|
1241
|
-
this.heading =
|
|
1247
|
+
this.heading = '';
|
|
1242
1248
|
this.showValues = true;
|
|
1243
1249
|
this.isAPI = false;
|
|
1244
1250
|
this.propertiesConnectors = i6.EMPTY_QUERY;
|
|
1245
1251
|
this.activeItemIndex = 0;
|
|
1252
|
+
this.matcher = function (item, exclusions) { return !exclusions.has(item.documentationPropertyName); };
|
|
1246
1253
|
}
|
|
1247
1254
|
TuiDocDocumentationComponent.prototype.ngAfterContentInit = function () {
|
|
1248
1255
|
i6.tuiItemsQueryListObservable(this.propertiesConnectors)
|
|
@@ -1260,39 +1267,39 @@
|
|
|
1260
1267
|
configurable: true
|
|
1261
1268
|
});
|
|
1262
1269
|
TuiDocDocumentationComponent.prototype.onColorChange = function (connector, color) {
|
|
1263
|
-
var opacity = this.getOpacity.transform(connector.documentationPropertyValue ||
|
|
1270
|
+
var opacity = this.getOpacity.transform(connector.documentationPropertyValue || '');
|
|
1264
1271
|
if (opacity === 100) {
|
|
1265
1272
|
connector.onValueChange(color);
|
|
1266
1273
|
return;
|
|
1267
1274
|
}
|
|
1268
|
-
var rgb = i6.tuiHexToRgb(color).join(
|
|
1275
|
+
var rgb = i6.tuiHexToRgb(color).join(', ');
|
|
1269
1276
|
var result = "rgba(" + rgb + ", " + opacity / 100 + ")";
|
|
1270
1277
|
connector.onValueChange(result);
|
|
1271
1278
|
};
|
|
1272
1279
|
TuiDocDocumentationComponent.prototype.onOpacityChange = function (connector, opacity) {
|
|
1273
|
-
var hex = this.getColor.transform(connector.documentationPropertyValue ||
|
|
1280
|
+
var hex = this.getColor.transform(connector.documentationPropertyValue || '');
|
|
1274
1281
|
var rgb = i6.tuiHexToRgb(hex);
|
|
1275
1282
|
var result = "rgba(" + rgb + ", " + opacity / 100 + ")";
|
|
1276
1283
|
connector.onValueChange(result);
|
|
1277
1284
|
};
|
|
1278
1285
|
return TuiDocDocumentationComponent;
|
|
1279
1286
|
}());
|
|
1280
|
-
TuiDocDocumentationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocDocumentationComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TUI_DOC_DOCUMENTATION_TEXTS }, { token: i6.TuiDestroyService, self: true }, { token: TuiGetColorPipe }, { token: TuiGetOpacityPipe }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1281
|
-
TuiDocDocumentationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocDocumentationComponent, selector: "tui-doc-documentation", inputs: { heading: "heading", showValues: "showValues", isAPI: "isAPI" }, providers: [TuiGetColorPipe, TuiGetOpacityPipe, i6.TuiDestroyService], queries: [{ propertyName: "propertiesConnectors", predicate: TuiDocDocumentationPropertyConnectorDirective }], ngImport: i0__namespace, template: "<h1\n *ngIf=\"heading\"\n class=\"t-heading\"\n>\n {{ heading }}\n</h1>\n<ng-content></ng-content>\n<table class=\"t-table\">\n <tr class=\"t-row t-row_header\">\n <th class=\"t-th t-cell t-cell_prop\">{{ texts[2] }}</th>\n <th class=\"t-th\">{{ type }}</th>\n <th\n *ngIf=\"showValues && !isAPI\"\n class=\"t-th t-cell t-th_value\"\n >\n {{ texts[3] }}\n </th>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of propertiesConnectors\"\n class=\"t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated\"\n >\n <td class=\"t-cell\">\n <div\n automation-id=\"tui-documentation__property-name\"\n class=\"t-property\"\n >\n {{ propertyConnector.attrName | tuiStripOptionalPipe }}\n <tui-badge\n *ngIf=\"propertyConnector.attrName | tuiIsOptionalPipe\"\n size=\"s\"\n value=\"Optional\"\n ></tui-badge>\n </div>\n <span\n *ngIf=\"propertyConnector.documentationPropertyDeprecated\"\n class=\"t-deprecated-label\"\n >\n deprecated\n </span>\n <ng-container [ngTemplateOutlet]=\"propertyConnector.template\"></ng-container>\n </td>\n <td class=\"t-cell\">\n <span class=\"type\">\n {{ propertyConnector.documentationPropertyType }}\n <tui-tooltip\n *ngIf=\"propertyConnector.documentationPropertyType | tuiShowContentTooltip\"\n [describeId]=\"propertyConnector.attrName\"\n [content]=\"content\"\n >\n <ng-template #content>\n {{ texts[4] }}\n <a\n tuiLink\n tuiMode=\"onDark\"\n target=\"_blank\"\n href=\"https://github.com/tinkoff/ng-polymorpheus\"\n >\n <code>ng-polymorpheus</code>\n </a>\n </ng-template>\n </tui-tooltip>\n </span>\n </td>\n <td\n *ngIf=\"showValues\"\n class=\"t-cell t-cell_value\"\n >\n <ng-container *ngIf=\"propertyConnector.shouldShowValues; else elseEmitter\">\n <tui-select\n *ngIf=\"propertyConnector.hasItems; else noItems\"\n tuiTextfieldSize=\"m\"\n tuiDropdownLimitWidth=\"min\"\n [tuiTextfieldCleaner]=\"propertyConnector.documentationPropertyType | tuiShowCleanerPipe\"\n [tuiTextfieldLabelOutside]=\"true\"\n [nativeId]=\"propertyConnector.attrName\"\n [valueContent]=\"selectContent\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n >\n <code class=\"t-exception\">null</code>\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"propertyConnector.documentationPropertyValues\"\n [itemContent]=\"selectContent\"\n ></tui-data-list-wrapper>\n </tui-select>\n <ng-template\n #selectContent\n let-data\n >\n <code>{{ data | tuiInspectAny }}</code>\n </ng-template>\n\n <ng-template #noItems>\n <ng-container [ngSwitch]=\"propertyConnector.documentationPropertyType\">\n <tui-toggle\n *ngSwitchCase=\"'boolean'\"\n size=\"l\"\n [nativeId]=\"propertyConnector.attrName\"\n [showIcons]=\"true\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-toggle>\n\n <tui-primitive-textfield\n *ngSwitchCase=\"'string'\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiTextfieldCleaner]=\"true\"\n [value]=\"propertyConnector.documentationPropertyValue || ''\"\n (valueChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-primitive-textfield>\n\n <div\n *ngSwitchCase=\"'color'\"\n tuiGroup\n >\n <tui-primitive-textfield\n tuiTextfieldSize=\"m\"\n [attr.id]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiInputOpacity]=\"propertyConnector.documentationPropertyValue | tuiGetOpacity\"\n [value]=\"propertyConnector.documentationPropertyValue | tuiGetColorPipe\"\n (valueChange)=\"onColorChange(propertyConnector, $event)\"\n >\n <input\n tuiTextfield\n type=\"text\"\n />\n </tui-primitive-textfield>\n <tui-input-count\n tuiTextfieldSize=\"m\"\n [max]=\"100\"\n [ngModel]=\"propertyConnector.documentationPropertyValue | tuiGetOpacity\"\n (ngModelChange)=\"onOpacityChange(propertyConnector, $event)\"\n >\n Opacity\n </tui-input-count>\n </div>\n\n <tui-input-count\n *ngSwitchCase=\"'number'\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-input-count>\n\n <ng-container *ngSwitchCase=\"'PolymorpheusContent'\">\n <tui-primitive-textfield\n *ngIf=\"\n propertyConnector.documentationPropertyValue | tuiIsPrimitivePolymorpheusContentPipe\n \"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiTextfieldCleaner]=\"true\"\n [value]=\"propertyConnector.documentationPropertyValue.toString()\"\n (valueChange)=\"propertyConnector.onValueChange($event)\"\n >\n Default content\n </tui-primitive-textfield>\n </ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-template #elseEmitter>\n <tui-notification\n class=\"t-output\"\n [@emitEvent]=\"propertyConnector.emits$ | async\"\n >\n Emit!\n </tui-notification>\n </ng-template>\n </td>\n </tr>\n</table>\n", styles: [":host{display:block;min-width:100%}.t-table{width:100%;table-layout:fixed}.t-row:not(:last-child){border-bottom:1px solid var(--tui-base-03)}:host-context(tui-root._mobile) .t-row{display:flex;flex-wrap:wrap}:host-context(tui-root._mobile) .t-row_header{display:none}.t-cell{padding:1rem 1rem .875rem}.t-cell:first-child{padding-left:0}.t-cell:last-child{padding-right:0}.t-cell_prop{width:40%}.t-cell_value{text-align:right}:host-context(tui-root._mobile) .t-cell{width:100%;height:auto;padding:.5rem 0;text-align:left}.t-th{padding:.5rem 1rem;color:var(--tui-text-02);font-weight:normal;text-align:left}.t-th_value{max-width:20rem;text-align:right}:host-context(tui-root._mobile) .t-th_value{width:9.375rem}.t-property{font:var(--tui-font-text-m);margin-bottom:.25rem;font-family:monospace;color:#8f75d1}:host-context(tui-root._mobile) .t-property{padding:.5rem 0}.t-type{font-family:monospace}.t-deprecated{background-color:var(--tui-error-bg);box-shadow:-1rem 0 var(--tui-error-bg),1rem 0 var(--tui-error-bg)}.t-deprecated-label{margin-right:.125rem;color:var(--tui-error-fill)}.t-exception{display:block;width:-webkit-max-content;width:-moz-max-content;width:max-content}.t-output{text-align:left;opacity:0}.t-heading{font:var(--tui-font-heading-4)}\n"], components: [{ type: i1__namespace.TuiBadgeComponent, selector: "tui-badge", inputs: ["value", "size", "status", "hoverable"] }, { type: i2__namespace$1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId"] }, { type: i2__namespace$1.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { type: i1__namespace.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { type: i1__namespace.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items"] }, { type: i1__namespace.TuiToggleComponent, selector: "tui-toggle", inputs: ["singleColor", "showIcons", "showLoader", "size"] }, { type: i2__namespace$1.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i2__namespace$1.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { type: i1__namespace.TuiInputCountComponent, selector: "tui-input-count", inputs: ["step", "min", "max", "hideButtons", "prefix", "postfix"] }, { type: i2__namespace$1.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "status"], outputs: ["close"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace$1.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i1__namespace.TuiSelectDirective, selector: "tui-select" }, { type: i2__namespace$1.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { type: i2__namespace$1.TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight]", inputs: ["tuiDropdownAlign", "tuiDropdownDirection", "tuiDropdownLimitWidth", "tuiDropdownMinHeight", "tuiDropdownMaxHeight"] }, { type: i2__namespace$1.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { type: i2__namespace$1.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { 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"] }, { type: i2__namespace$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i5__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace$1.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i2__namespace$1.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: TuiInputOpacityDirective, selector: "[tuiInputOpacity]", inputs: ["tuiInputOpacity"] }, { type: i1__namespace.TuiInputCountDirective, selector: "tui-input-count" }], pipes: { "tuiStripOptionalPipe": TuiStripOptionalPipe, "tuiIsOptionalPipe": TuiIsOptionalPipe, "tuiShowContentTooltip": TuiShowContentTooltip, "tuiShowCleanerPipe": TuiShowCleanerPipe, "tuiInspectAny": TuiInspectPipe, "tuiGetOpacity": TuiGetOpacityPipe, "tuiGetColorPipe": TuiGetColorPipe, "tuiIsPrimitivePolymorpheusContentPipe": TuiIsPrimitivePolymorpheusContentPipe, "async": i5__namespace.AsyncPipe }, animations: [
|
|
1282
|
-
animations.trigger(
|
|
1283
|
-
animations.transition(
|
|
1287
|
+
TuiDocDocumentationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocDocumentationComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TUI_DOC_DOCUMENTATION_TEXTS }, { token: TUI_DOC_EXCLUDED_PROPERTIES }, { token: i6.TuiDestroyService, self: true }, { token: TuiGetColorPipe }, { token: TuiGetOpacityPipe }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1288
|
+
TuiDocDocumentationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDocDocumentationComponent, selector: "tui-doc-documentation", inputs: { heading: "heading", showValues: "showValues", isAPI: "isAPI" }, providers: [TuiGetColorPipe, TuiGetOpacityPipe, i6.TuiDestroyService], queries: [{ propertyName: "propertiesConnectors", predicate: TuiDocDocumentationPropertyConnectorDirective }], ngImport: i0__namespace, template: "<h1\n *ngIf=\"heading\"\n class=\"t-heading\"\n>\n {{ heading }}\n</h1>\n<ng-content></ng-content>\n<table class=\"t-table\">\n <tr class=\"t-row t-row_header\">\n <th class=\"t-th t-cell t-cell_prop\">{{ texts[2] }}</th>\n <th class=\"t-th\">{{ type }}</th>\n <th\n *ngIf=\"showValues && !isAPI\"\n class=\"t-th t-cell t-th_value\"\n >\n {{ texts[3] }}\n </th>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of $any(propertiesConnectors) | tuiFilter : matcher : excludedProperties\"\n class=\"t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated\"\n >\n <td class=\"t-cell\">\n <div\n automation-id=\"tui-documentation__property-name\"\n class=\"t-property\"\n >\n {{ propertyConnector.attrName | tuiStripOptionalPipe }}\n <tui-badge\n *ngIf=\"propertyConnector.attrName | tuiIsOptionalPipe\"\n size=\"s\"\n value=\"Optional\"\n ></tui-badge>\n </div>\n <span\n *ngIf=\"propertyConnector.documentationPropertyDeprecated\"\n class=\"t-deprecated-label\"\n >\n deprecated\n </span>\n <ng-container [ngTemplateOutlet]=\"propertyConnector.template\"></ng-container>\n </td>\n <td class=\"t-cell\">\n <span class=\"type\">\n {{ propertyConnector.documentationPropertyType }}\n <tui-tooltip\n *ngIf=\"propertyConnector.documentationPropertyType | tuiShowContentTooltip\"\n [describeId]=\"propertyConnector.attrName\"\n [content]=\"content\"\n >\n <ng-template #content>\n {{ texts[4] }}\n <a\n tuiLink\n tuiMode=\"onDark\"\n target=\"_blank\"\n href=\"https://github.com/tinkoff/ng-polymorpheus\"\n >\n <code>ng-polymorpheus</code>\n </a>\n </ng-template>\n </tui-tooltip>\n </span>\n </td>\n <td\n *ngIf=\"showValues\"\n class=\"t-cell t-cell_value\"\n >\n <ng-container *ngIf=\"propertyConnector.shouldShowValues; else elseEmitter\">\n <tui-select\n *ngIf=\"propertyConnector.hasItems; else noItems\"\n tuiTextfieldSize=\"m\"\n tuiDropdownLimitWidth=\"min\"\n [tuiTextfieldCleaner]=\"propertyConnector.documentationPropertyType | tuiShowCleanerPipe\"\n [tuiTextfieldLabelOutside]=\"true\"\n [nativeId]=\"propertyConnector.attrName\"\n [valueContent]=\"selectContent\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n >\n <code class=\"t-exception\">null</code>\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"propertyConnector.documentationPropertyValues\"\n [itemContent]=\"selectContent\"\n ></tui-data-list-wrapper>\n </tui-select>\n <ng-template\n #selectContent\n let-data\n >\n <code>{{ data | tuiInspectAny }}</code>\n </ng-template>\n\n <ng-template #noItems>\n <ng-container [ngSwitch]=\"propertyConnector.documentationPropertyType\">\n <tui-toggle\n *ngSwitchCase=\"'boolean'\"\n size=\"l\"\n [nativeId]=\"propertyConnector.attrName\"\n [showIcons]=\"true\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-toggle>\n\n <tui-primitive-textfield\n *ngSwitchCase=\"'string'\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiTextfieldCleaner]=\"true\"\n [value]=\"propertyConnector.documentationPropertyValue || ''\"\n (valueChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-primitive-textfield>\n\n <div\n *ngSwitchCase=\"'color'\"\n tuiGroup\n >\n <tui-primitive-textfield\n tuiTextfieldSize=\"m\"\n [attr.id]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiInputOpacity]=\"propertyConnector.documentationPropertyValue | tuiGetOpacity\"\n [value]=\"propertyConnector.documentationPropertyValue | tuiGetColorPipe\"\n (valueChange)=\"onColorChange(propertyConnector, $event)\"\n >\n <input\n tuiTextfield\n type=\"text\"\n />\n </tui-primitive-textfield>\n <tui-input-count\n tuiTextfieldSize=\"m\"\n [max]=\"100\"\n [ngModel]=\"propertyConnector.documentationPropertyValue | tuiGetOpacity\"\n (ngModelChange)=\"onOpacityChange(propertyConnector, $event)\"\n >\n Opacity\n </tui-input-count>\n </div>\n\n <tui-input-count\n *ngSwitchCase=\"'number'\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n ></tui-input-count>\n\n <ng-container *ngSwitchCase=\"'PolymorpheusContent'\">\n <tui-primitive-textfield\n *ngIf=\"\n propertyConnector.documentationPropertyValue | tuiIsPrimitivePolymorpheusContentPipe\n \"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiTextfieldCleaner]=\"true\"\n [value]=\"propertyConnector.documentationPropertyValue.toString()\"\n (valueChange)=\"propertyConnector.onValueChange($event)\"\n >\n Default content\n </tui-primitive-textfield>\n </ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-template #elseEmitter>\n <tui-notification\n class=\"t-output\"\n [@emitEvent]=\"propertyConnector.emits$ | async\"\n >\n Emit!\n </tui-notification>\n </ng-template>\n </td>\n </tr>\n</table>\n", styles: [":host{display:block;min-width:100%}.t-table{width:100%;table-layout:fixed}.t-row:not(:last-child){border-bottom:1px solid var(--tui-base-03)}:host-context(tui-root._mobile) .t-row{display:flex;flex-wrap:wrap}:host-context(tui-root._mobile) .t-row_header{display:none}.t-cell{padding:1rem 1rem .875rem}.t-cell:first-child{padding-left:0}.t-cell:last-child{padding-right:0}.t-cell_prop{width:40%}.t-cell_value{text-align:right}:host-context(tui-root._mobile) .t-cell{width:100%;height:auto;padding:.5rem 0;text-align:left}.t-th{padding:.5rem 1rem;color:var(--tui-text-02);font-weight:normal;text-align:left}.t-th_value{max-width:20rem;text-align:right}:host-context(tui-root._mobile) .t-th_value{width:9.375rem}.t-property{font:var(--tui-font-text-m);margin-bottom:.25rem;font-family:monospace;color:#8f75d1}:host-context(tui-root._mobile) .t-property{padding:.5rem 0}.t-type{font-family:monospace}.t-deprecated{background-color:var(--tui-error-bg);box-shadow:-1rem 0 var(--tui-error-bg),1rem 0 var(--tui-error-bg)}.t-deprecated-label{margin-right:.125rem;color:var(--tui-error-fill)}.t-exception{display:block;width:-webkit-max-content;width:-moz-max-content;width:max-content}.t-output{text-align:left;opacity:0}.t-heading{font:var(--tui-font-heading-4)}\n"], components: [{ type: i1__namespace.TuiBadgeComponent, selector: "tui-badge", inputs: ["value", "size", "status", "hoverable"] }, { type: i2__namespace$1.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId"] }, { type: i2__namespace$1.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { type: i1__namespace.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { type: i1__namespace.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items"] }, { type: i1__namespace.TuiToggleComponent, selector: "tui-toggle", inputs: ["singleColor", "showIcons", "showLoader", "size"] }, { type: i2__namespace$1.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i2__namespace$1.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { type: i1__namespace.TuiInputCountComponent, selector: "tui-input-count", inputs: ["step", "min", "max", "hideButtons", "prefix", "postfix"] }, { type: i2__namespace$1.TuiNotificationComponent, selector: "tui-notification", inputs: ["hasIcon", "status"], outputs: ["close"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace$1.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i1__namespace.TuiSelectDirective, selector: "tui-select" }, { type: i2__namespace$1.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { type: i2__namespace$1.TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: ["tuiDropdownAlign", "tuiDropdownDirection", "tuiDropdownLimitWidth", "tuiDropdownMinHeight", "tuiDropdownMaxHeight", "tuiDropdownOffset"] }, { type: i2__namespace$1.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { type: i2__namespace$1.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { 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"] }, { type: i2__namespace$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { type: i5__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace$1.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i2__namespace$1.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: TuiInputOpacityDirective, selector: "[tuiInputOpacity]", inputs: ["tuiInputOpacity"] }, { type: i1__namespace.TuiInputCountDirective, selector: "tui-input-count" }], pipes: { "tuiFilter": i6__namespace$1.TuiFilterPipe, "tuiStripOptionalPipe": TuiStripOptionalPipe, "tuiIsOptionalPipe": TuiIsOptionalPipe, "tuiShowContentTooltip": TuiShowContentTooltip, "tuiShowCleanerPipe": TuiShowCleanerPipe, "tuiInspectAny": TuiInspectPipe, "tuiGetOpacity": TuiGetOpacityPipe, "tuiGetColorPipe": TuiGetColorPipe, "tuiIsPrimitivePolymorpheusContentPipe": TuiIsPrimitivePolymorpheusContentPipe, "async": i5__namespace.AsyncPipe }, animations: [
|
|
1289
|
+
animations.trigger('emitEvent', [
|
|
1290
|
+
animations.transition(':increment', [animations.style({ opacity: 1 }), animations.animate('500ms ease-in')]),
|
|
1284
1291
|
]),
|
|
1285
1292
|
], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1286
1293
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocDocumentationComponent, decorators: [{
|
|
1287
1294
|
type: i0.Component,
|
|
1288
1295
|
args: [{
|
|
1289
|
-
selector:
|
|
1290
|
-
templateUrl:
|
|
1291
|
-
styleUrls: [
|
|
1296
|
+
selector: 'tui-doc-documentation',
|
|
1297
|
+
templateUrl: './documentation.template.html',
|
|
1298
|
+
styleUrls: ['./documentation.style.less'],
|
|
1292
1299
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1293
1300
|
animations: [
|
|
1294
|
-
animations.trigger(
|
|
1295
|
-
animations.transition(
|
|
1301
|
+
animations.trigger('emitEvent', [
|
|
1302
|
+
animations.transition(':increment', [animations.style({ opacity: 1 }), animations.animate('500ms ease-in')]),
|
|
1296
1303
|
]),
|
|
1297
1304
|
],
|
|
1298
1305
|
providers: [TuiGetColorPipe, TuiGetOpacityPipe, i6.TuiDestroyService],
|
|
@@ -1304,6 +1311,9 @@
|
|
|
1304
1311
|
}] }, { type: undefined, decorators: [{
|
|
1305
1312
|
type: i0.Inject,
|
|
1306
1313
|
args: [TUI_DOC_DOCUMENTATION_TEXTS]
|
|
1314
|
+
}] }, { type: Set, decorators: [{
|
|
1315
|
+
type: i0.Inject,
|
|
1316
|
+
args: [TUI_DOC_EXCLUDED_PROPERTIES]
|
|
1307
1317
|
}] }, { type: i6__namespace$1.TuiDestroyService, decorators: [{
|
|
1308
1318
|
type: i0.Self
|
|
1309
1319
|
}, {
|
|
@@ -1375,7 +1385,8 @@
|
|
|
1375
1385
|
i2$1.TuiDropdownModule,
|
|
1376
1386
|
i2$1.TuiDataListModule,
|
|
1377
1387
|
i1.TuiDataListWrapperModule,
|
|
1378
|
-
i2$1.TuiNotificationModule
|
|
1388
|
+
i2$1.TuiNotificationModule,
|
|
1389
|
+
i6.TuiFilterPipeModule], exports: [TuiDocDocumentationComponent,
|
|
1379
1390
|
TuiDocDocumentationPropertyConnectorDirective] });
|
|
1380
1391
|
TuiDocDocumentationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocDocumentationModule, imports: [[
|
|
1381
1392
|
i5.CommonModule,
|
|
@@ -1396,6 +1407,7 @@
|
|
|
1396
1407
|
i2$1.TuiDataListModule,
|
|
1397
1408
|
i1.TuiDataListWrapperModule,
|
|
1398
1409
|
i2$1.TuiNotificationModule,
|
|
1410
|
+
i6.TuiFilterPipeModule,
|
|
1399
1411
|
]] });
|
|
1400
1412
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocDocumentationModule, decorators: [{
|
|
1401
1413
|
type: i0.NgModule,
|
|
@@ -1419,6 +1431,7 @@
|
|
|
1419
1431
|
i2$1.TuiDataListModule,
|
|
1420
1432
|
i1.TuiDataListWrapperModule,
|
|
1421
1433
|
i2$1.TuiNotificationModule,
|
|
1434
|
+
i6.TuiFilterPipeModule,
|
|
1422
1435
|
],
|
|
1423
1436
|
declarations: [
|
|
1424
1437
|
TuiInspectPipe,
|
|
@@ -1543,8 +1556,8 @@
|
|
|
1543
1556
|
this.route = route;
|
|
1544
1557
|
this.ngLocation = ngLocation;
|
|
1545
1558
|
this.rawLoader$$ = new i9.BehaviorSubject({});
|
|
1546
|
-
this.heading =
|
|
1547
|
-
this.description =
|
|
1559
|
+
this.heading = '';
|
|
1560
|
+
this.description = '';
|
|
1548
1561
|
this.componentName = this.location.pathname.slice(1);
|
|
1549
1562
|
this.defaultTabIndex = 0;
|
|
1550
1563
|
this.defaultTab = this.texts[this.defaultTabIndex];
|
|
@@ -1567,7 +1580,7 @@
|
|
|
1567
1580
|
configurable: true
|
|
1568
1581
|
});
|
|
1569
1582
|
TuiDocExampleComponent.prototype.copyExampleLink = function () {
|
|
1570
|
-
var hashPosition = this.location.href.indexOf(
|
|
1583
|
+
var hashPosition = this.location.href.indexOf('#');
|
|
1571
1584
|
var currentUrl = hashPosition > -1
|
|
1572
1585
|
? this.location.href.slice(0, Math.max(0, hashPosition))
|
|
1573
1586
|
: this.location.href;
|
|
@@ -1585,30 +1598,30 @@
|
|
|
1585
1598
|
var _this = this;
|
|
1586
1599
|
var _a;
|
|
1587
1600
|
this.loading$.next(true);
|
|
1588
|
-
(_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName, this.id ||
|
|
1601
|
+
(_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName, this.id || '', files).finally(function () { return _this.loading$.next(false); });
|
|
1589
1602
|
};
|
|
1590
1603
|
TuiDocExampleComponent.prototype.setFragmentWithoutRedirect = function (id) {
|
|
1591
1604
|
var url = this.router
|
|
1592
|
-
.createUrlTree([], { relativeTo: this.route, fragment: id ||
|
|
1605
|
+
.createUrlTree([], { relativeTo: this.route, fragment: id || '' })
|
|
1593
1606
|
.toString();
|
|
1594
1607
|
this.ngLocation.go(url);
|
|
1595
1608
|
};
|
|
1596
1609
|
return TuiDocExampleComponent;
|
|
1597
1610
|
}());
|
|
1598
|
-
TuiDocExampleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocExampleComponent, deps: [{ token:
|
|
1611
|
+
TuiDocExampleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocExampleComponent, deps: [{ token: 'id', attribute: true }, { 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 });
|
|
1599
1612
|
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 [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 });
|
|
1600
1613
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocExampleComponent, decorators: [{
|
|
1601
1614
|
type: i0.Component,
|
|
1602
1615
|
args: [{
|
|
1603
|
-
selector:
|
|
1604
|
-
templateUrl:
|
|
1605
|
-
styleUrls: [
|
|
1616
|
+
selector: 'tui-doc-example',
|
|
1617
|
+
templateUrl: './example.template.html',
|
|
1618
|
+
styleUrls: ['./example.style.less'],
|
|
1606
1619
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1607
1620
|
}]
|
|
1608
1621
|
}], ctorParameters: function () {
|
|
1609
1622
|
return [{ type: undefined, decorators: [{
|
|
1610
1623
|
type: i0.Attribute,
|
|
1611
|
-
args: [
|
|
1624
|
+
args: ['id']
|
|
1612
1625
|
}] }, { type: i8__namespace.Clipboard, decorators: [{
|
|
1613
1626
|
type: i0.Inject,
|
|
1614
1627
|
args: [i8.Clipboard]
|
|
@@ -1716,22 +1729,22 @@
|
|
|
1716
1729
|
function TuiLanguageSwitcherComponent(switcher, iconsPath) {
|
|
1717
1730
|
this.switcher = switcher;
|
|
1718
1731
|
this.iconsPath = iconsPath;
|
|
1719
|
-
this.path = this.iconsPath(
|
|
1732
|
+
this.path = this.iconsPath('tuiIcon').replace('tuiIcon.svg#tuiIcon', '');
|
|
1720
1733
|
this.language = new i5$1.FormControl(i2$1.tuiCapitalizeFirstLetter(this.switcher.language));
|
|
1721
1734
|
this.flags = new Map([
|
|
1722
|
-
[
|
|
1723
|
-
[
|
|
1724
|
-
[
|
|
1725
|
-
[
|
|
1726
|
-
[
|
|
1727
|
-
[
|
|
1728
|
-
[
|
|
1729
|
-
[
|
|
1730
|
-
[
|
|
1731
|
-
[
|
|
1732
|
-
[
|
|
1733
|
-
[
|
|
1734
|
-
[
|
|
1735
|
+
['chinese', i5$2.TuiCountryIsoCode.CN],
|
|
1736
|
+
['dutch', i5$2.TuiCountryIsoCode.NL],
|
|
1737
|
+
['english', i5$2.TuiCountryIsoCode.GB],
|
|
1738
|
+
['french', i5$2.TuiCountryIsoCode.FR],
|
|
1739
|
+
['german', i5$2.TuiCountryIsoCode.DE],
|
|
1740
|
+
['italian', i5$2.TuiCountryIsoCode.IT],
|
|
1741
|
+
['polish', i5$2.TuiCountryIsoCode.PL],
|
|
1742
|
+
['portuguese', i5$2.TuiCountryIsoCode.PT],
|
|
1743
|
+
['russian', i5$2.TuiCountryIsoCode.RU],
|
|
1744
|
+
['spanish', i5$2.TuiCountryIsoCode.ES],
|
|
1745
|
+
['turkish', i5$2.TuiCountryIsoCode.TR],
|
|
1746
|
+
['ukrainian', i5$2.TuiCountryIsoCode.UA],
|
|
1747
|
+
['vietnamese', i5$2.TuiCountryIsoCode.VN],
|
|
1735
1748
|
]);
|
|
1736
1749
|
this.names = Array.from(this.flags.keys());
|
|
1737
1750
|
}
|
|
@@ -1745,9 +1758,9 @@
|
|
|
1745
1758
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiLanguageSwitcherComponent, decorators: [{
|
|
1746
1759
|
type: i0.Component,
|
|
1747
1760
|
args: [{
|
|
1748
|
-
selector:
|
|
1749
|
-
templateUrl:
|
|
1750
|
-
styleUrls: [
|
|
1761
|
+
selector: 'tui-language-switcher',
|
|
1762
|
+
templateUrl: './language-switcher.component.html',
|
|
1763
|
+
styleUrls: ['./language-switcher.component.less'],
|
|
1751
1764
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1752
1765
|
}]
|
|
1753
1766
|
}], ctorParameters: function () {
|
|
@@ -1908,7 +1921,7 @@
|
|
|
1908
1921
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiScrollIntoViewLinkDirective, decorators: [{
|
|
1909
1922
|
type: i0.Directive,
|
|
1910
1923
|
args: [{
|
|
1911
|
-
selector:
|
|
1924
|
+
selector: '[tuiScrollIntoViewLink]',
|
|
1912
1925
|
providers: [i6.TuiDestroyService],
|
|
1913
1926
|
}]
|
|
1914
1927
|
}], ctorParameters: function () {
|
|
@@ -1945,17 +1958,17 @@
|
|
|
1945
1958
|
this.menuOpen = false;
|
|
1946
1959
|
this.openPagesArr = [];
|
|
1947
1960
|
this.openPagesGroupsArr = [];
|
|
1948
|
-
this.active =
|
|
1949
|
-
this.search = new i5$1.FormControl(
|
|
1961
|
+
this.active = '';
|
|
1962
|
+
this.search = new i5$1.FormControl('');
|
|
1950
1963
|
this.filtered$ = i6.tuiControlValue(this.search).pipe(operators.filter(function (search) { return search.length > 2; }), operators.map(function (search) { return _this.filterItems(_this.flattenSubPages(_this.items), search); }));
|
|
1951
|
-
this.mode$ = this.mode.change$.pipe(operators.startWith(null), operators.map(function () { return _this.mode.mode ||
|
|
1964
|
+
this.mode$ = this.mode.change$.pipe(operators.startWith(null), operators.map(function () { return _this.mode.mode || 'onLight'; }));
|
|
1952
1965
|
// Angular can't navigate no anchor links
|
|
1953
1966
|
// https://stackoverflow.com/questions/36101756/angular2-routing-with-hashtag-to-page-anchor
|
|
1954
1967
|
title$.subscribe(function (title) {
|
|
1955
1968
|
changeDetectorRef.markForCheck();
|
|
1956
1969
|
titleService.setTitle(title);
|
|
1957
1970
|
_this.openActivePageGroup();
|
|
1958
|
-
_this.handleAnchorLink(_this.activatedRoute.snapshot.fragment ||
|
|
1971
|
+
_this.handleAnchorLink(_this.activatedRoute.snapshot.fragment || '');
|
|
1959
1972
|
});
|
|
1960
1973
|
}
|
|
1961
1974
|
Object.defineProperty(TuiDocNavigationComponent.prototype, "canOpen", {
|
|
@@ -1985,12 +1998,12 @@
|
|
|
1985
1998
|
TuiDocNavigationComponent.prototype.onClick = function (input) {
|
|
1986
1999
|
input.open = false;
|
|
1987
2000
|
this.menuOpen = false;
|
|
1988
|
-
this.search.setValue(
|
|
2001
|
+
this.search.setValue('');
|
|
1989
2002
|
this.openActivePageGroup();
|
|
1990
2003
|
};
|
|
1991
2004
|
TuiDocNavigationComponent.prototype.filterItems = function (items, search) {
|
|
1992
2005
|
return items.map(function (section) { return i6.tuiUniqBy(section.filter(function (_c) {
|
|
1993
|
-
var title = _c.title, _d = _c.keywords, keywords = _d === void 0 ?
|
|
2006
|
+
var title = _c.title, _d = _c.keywords, keywords = _d === void 0 ? '' : _d;
|
|
1994
2007
|
title = title.toLowerCase();
|
|
1995
2008
|
search = search.toLowerCase();
|
|
1996
2009
|
keywords = keywords.toLowerCase();
|
|
@@ -1998,12 +2011,12 @@
|
|
|
1998
2011
|
keywords.includes(search) ||
|
|
1999
2012
|
title.includes(tuiTransliterateKeyboardLayout(search)) ||
|
|
2000
2013
|
keywords.includes(tuiTransliterateKeyboardLayout(search)) ||
|
|
2001
|
-
search.replace(/-/gi,
|
|
2002
|
-
}),
|
|
2014
|
+
search.replace(/-/gi, '').includes(title));
|
|
2015
|
+
}), 'title'); });
|
|
2003
2016
|
};
|
|
2004
2017
|
TuiDocNavigationComponent.prototype.flattenSubPages = function (items) {
|
|
2005
2018
|
return items.reduce(function (array, item) { return __spreadArray(__spreadArray([], __read(array)), [
|
|
2006
|
-
item.reduce(function (pages, page) { return
|
|
2019
|
+
item.reduce(function (pages, page) { return 'subPages' in page
|
|
2007
2020
|
? __spreadArray(__spreadArray([], __read(pages)), __read(page.subPages)) : __spreadArray(__spreadArray([], __read(pages)), [page]); }, []),
|
|
2008
2021
|
]); }, []);
|
|
2009
2022
|
};
|
|
@@ -2020,11 +2033,11 @@
|
|
|
2020
2033
|
var _this = this;
|
|
2021
2034
|
this.items.forEach(function (pages, pagesIndex) {
|
|
2022
2035
|
pages.forEach(function (page, pageIndex) {
|
|
2023
|
-
if (
|
|
2036
|
+
if ('route' in page && _this.isActiveRoute(page.route)) {
|
|
2024
2037
|
_this.openPagesArr[pagesIndex] = true;
|
|
2025
2038
|
_this.active = page.route;
|
|
2026
2039
|
}
|
|
2027
|
-
if (
|
|
2040
|
+
if ('subPages' in page) {
|
|
2028
2041
|
page.subPages.forEach(function (subPage) {
|
|
2029
2042
|
if (_this.isActiveRoute(subPage.route)) {
|
|
2030
2043
|
_this.openPagesArr[pagesIndex] = true;
|
|
@@ -2042,10 +2055,10 @@
|
|
|
2042
2055
|
if (!element) {
|
|
2043
2056
|
return;
|
|
2044
2057
|
}
|
|
2045
|
-
element.classList.add(
|
|
2058
|
+
element.classList.add('tui-doc-animated-example');
|
|
2046
2059
|
element.scrollIntoView({
|
|
2047
|
-
block:
|
|
2048
|
-
inline:
|
|
2060
|
+
block: 'start',
|
|
2061
|
+
inline: 'nearest',
|
|
2049
2062
|
behavior: this.scrollBehavior,
|
|
2050
2063
|
});
|
|
2051
2064
|
};
|
|
@@ -2062,9 +2075,9 @@
|
|
|
2062
2075
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocNavigationComponent, decorators: [{
|
|
2063
2076
|
type: i0.Component,
|
|
2064
2077
|
args: [{
|
|
2065
|
-
selector:
|
|
2066
|
-
templateUrl:
|
|
2067
|
-
styleUrls: [
|
|
2078
|
+
selector: 'tui-doc-navigation',
|
|
2079
|
+
templateUrl: 'navigation.template.html',
|
|
2080
|
+
styleUrls: ['navigation.style.less'],
|
|
2068
2081
|
providers: NAVIGATION_PROVIDERS,
|
|
2069
2082
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2070
2083
|
}]
|
|
@@ -2118,7 +2131,7 @@
|
|
|
2118
2131
|
}] }];
|
|
2119
2132
|
}, propDecorators: { menuOpen: [{
|
|
2120
2133
|
type: i0.HostBinding,
|
|
2121
|
-
args: [
|
|
2134
|
+
args: ['class._open']
|
|
2122
2135
|
}], filterItems: [], flattenSubPages: [] } });
|
|
2123
2136
|
|
|
2124
2137
|
var TUI_DOC_LOGO = new i0.InjectionToken("[TUI_DOC_LOGO]: Main logo", {
|
|
@@ -2132,7 +2145,7 @@
|
|
|
2132
2145
|
this.router = router;
|
|
2133
2146
|
this.swipes$ = swipes$;
|
|
2134
2147
|
this.stream$ = new i9.Subject();
|
|
2135
|
-
this.open$ = i9.merge(this.router.events.pipe(operators.mapTo(false)), this.stream$, this.swipes$.pipe(operators.filter(function (swipe) { return swipe.direction ===
|
|
2148
|
+
this.open$ = i9.merge(this.router.events.pipe(operators.mapTo(false)), this.stream$, this.swipes$.pipe(operators.filter(function (swipe) { return swipe.direction === 'left' || swipe.direction === 'right'; }), operators.map(function (swipe) { return swipe.direction === 'right'; }))).pipe(operators.startWith(false), operators.distinctUntilChanged());
|
|
2136
2149
|
}
|
|
2137
2150
|
TuiDocHeaderComponent.prototype.onClick = function () {
|
|
2138
2151
|
this.stream$.next(true);
|
|
@@ -2149,9 +2162,9 @@
|
|
|
2149
2162
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocHeaderComponent, decorators: [{
|
|
2150
2163
|
type: i0.Component,
|
|
2151
2164
|
args: [{
|
|
2152
|
-
selector:
|
|
2153
|
-
templateUrl:
|
|
2154
|
-
styleUrls: [
|
|
2165
|
+
selector: 'header[tuiDocHeader]',
|
|
2166
|
+
templateUrl: './header.template.html',
|
|
2167
|
+
styleUrls: ['./header.style.less'],
|
|
2155
2168
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2156
2169
|
}]
|
|
2157
2170
|
}], ctorParameters: function () {
|
|
@@ -2174,14 +2187,14 @@
|
|
|
2174
2187
|
function TuiDocMainComponent(storage, windowRef) {
|
|
2175
2188
|
this.storage = storage;
|
|
2176
2189
|
this.windowRef = windowRef;
|
|
2177
|
-
this.night = this.storage.getItem(
|
|
2178
|
-
(this.storage.getItem(
|
|
2179
|
-
this.windowRef.matchMedia(
|
|
2190
|
+
this.night = this.storage.getItem('night') === 'true' ||
|
|
2191
|
+
(this.storage.getItem('night') === null &&
|
|
2192
|
+
this.windowRef.matchMedia('(prefers-color-scheme: dark)').matches);
|
|
2180
2193
|
this.change$ = new i9.Subject();
|
|
2181
2194
|
}
|
|
2182
2195
|
Object.defineProperty(TuiDocMainComponent.prototype, "mode", {
|
|
2183
2196
|
get: function () {
|
|
2184
|
-
return this.night ?
|
|
2197
|
+
return this.night ? 'onDark' : null;
|
|
2185
2198
|
},
|
|
2186
2199
|
enumerable: false,
|
|
2187
2200
|
configurable: true
|
|
@@ -2189,7 +2202,7 @@
|
|
|
2189
2202
|
TuiDocMainComponent.prototype.onMode = function (night) {
|
|
2190
2203
|
this.night = night;
|
|
2191
2204
|
this.change$.next();
|
|
2192
|
-
this.storage.setItem(
|
|
2205
|
+
this.storage.setItem('night', String(night));
|
|
2193
2206
|
};
|
|
2194
2207
|
return TuiDocMainComponent;
|
|
2195
2208
|
}());
|
|
@@ -2204,9 +2217,9 @@
|
|
|
2204
2217
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocMainComponent, decorators: [{
|
|
2205
2218
|
type: i0.Component,
|
|
2206
2219
|
args: [{
|
|
2207
|
-
selector:
|
|
2208
|
-
templateUrl:
|
|
2209
|
-
styleUrls: [
|
|
2220
|
+
selector: 'tui-doc-main',
|
|
2221
|
+
templateUrl: './main.template.html',
|
|
2222
|
+
styleUrls: ['./main.style.less'],
|
|
2210
2223
|
encapsulation: i0.ViewEncapsulation.None,
|
|
2211
2224
|
providers: [
|
|
2212
2225
|
{
|
|
@@ -2226,7 +2239,7 @@
|
|
|
2226
2239
|
}] }];
|
|
2227
2240
|
}, propDecorators: { mode: [{
|
|
2228
2241
|
type: i0.HostBinding,
|
|
2229
|
-
args: [
|
|
2242
|
+
args: ['attr.data-mode']
|
|
2230
2243
|
}] } });
|
|
2231
2244
|
|
|
2232
2245
|
var TuiScrollIntoViewLinkModule = /** @class */ (function () {
|
|
@@ -2447,7 +2460,7 @@
|
|
|
2447
2460
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocPageTabConnectorDirective, decorators: [{
|
|
2448
2461
|
type: i0.Directive,
|
|
2449
2462
|
args: [{
|
|
2450
|
-
selector:
|
|
2463
|
+
selector: '[pageTab]',
|
|
2451
2464
|
}]
|
|
2452
2465
|
}], ctorParameters: function () {
|
|
2453
2466
|
return [{ type: i0__namespace.TemplateRef, decorators: [{
|
|
@@ -2466,10 +2479,10 @@
|
|
|
2466
2479
|
function TuiDocSourceCodeComponent(sourceCode, text) {
|
|
2467
2480
|
this.sourceCode = sourceCode;
|
|
2468
2481
|
this.text = text;
|
|
2469
|
-
this.header =
|
|
2470
|
-
this.package =
|
|
2471
|
-
this.type =
|
|
2472
|
-
this.path =
|
|
2482
|
+
this.header = '';
|
|
2483
|
+
this.package = '';
|
|
2484
|
+
this.type = '';
|
|
2485
|
+
this.path = '';
|
|
2473
2486
|
}
|
|
2474
2487
|
Object.defineProperty(TuiDocSourceCodeComponent.prototype, "pathOptions", {
|
|
2475
2488
|
get: function () {
|
|
@@ -2496,8 +2509,8 @@
|
|
|
2496
2509
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocSourceCodeComponent, decorators: [{
|
|
2497
2510
|
type: i0.Component,
|
|
2498
2511
|
args: [{
|
|
2499
|
-
selector:
|
|
2500
|
-
templateUrl:
|
|
2512
|
+
selector: 'tui-doc-source-code',
|
|
2513
|
+
templateUrl: './source-code.template.html',
|
|
2501
2514
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2502
2515
|
}]
|
|
2503
2516
|
}], ctorParameters: function () {
|
|
@@ -2527,14 +2540,14 @@
|
|
|
2527
2540
|
TuiDocSeeAlsoComponent.prototype.getRouterLink = function (pageTitle) {
|
|
2528
2541
|
for (var i = 0; i < this.pages.length; i++) {
|
|
2529
2542
|
var page = this.pages
|
|
2530
|
-
.map(function (page) { return (
|
|
2543
|
+
.map(function (page) { return ('subPages' in page ? page.subPages : [page]); })
|
|
2531
2544
|
.reduce(function (pages, subPages) { return __spreadArray(__spreadArray([], __read(pages)), __read(subPages)); }, [])
|
|
2532
2545
|
.find(function (page) { return page.title === pageTitle; });
|
|
2533
2546
|
if (page === null || page === void 0 ? void 0 : page.route) {
|
|
2534
2547
|
return page.route;
|
|
2535
2548
|
}
|
|
2536
2549
|
}
|
|
2537
|
-
return
|
|
2550
|
+
return '';
|
|
2538
2551
|
};
|
|
2539
2552
|
return TuiDocSeeAlsoComponent;
|
|
2540
2553
|
}());
|
|
@@ -2543,9 +2556,9 @@
|
|
|
2543
2556
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocSeeAlsoComponent, decorators: [{
|
|
2544
2557
|
type: i0.Component,
|
|
2545
2558
|
args: [{
|
|
2546
|
-
selector:
|
|
2547
|
-
templateUrl:
|
|
2548
|
-
styleUrls: [
|
|
2559
|
+
selector: 'tui-doc-see-also',
|
|
2560
|
+
templateUrl: './see-also.template.html',
|
|
2561
|
+
styleUrls: ['./see-also.style.less'],
|
|
2549
2562
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2550
2563
|
}]
|
|
2551
2564
|
}], ctorParameters: function () {
|
|
@@ -2565,10 +2578,10 @@
|
|
|
2565
2578
|
this.deprecated = deprecated;
|
|
2566
2579
|
this.defaultTabs = defaultTabs;
|
|
2567
2580
|
this.seeAlso = seeAlso;
|
|
2568
|
-
this.header =
|
|
2569
|
-
this.package =
|
|
2570
|
-
this.type =
|
|
2571
|
-
this.path =
|
|
2581
|
+
this.header = '';
|
|
2582
|
+
this.package = '';
|
|
2583
|
+
this.type = '';
|
|
2584
|
+
this.path = '';
|
|
2572
2585
|
this.tabConnectors = i6.EMPTY_QUERY;
|
|
2573
2586
|
this.activeItemIndex = NaN;
|
|
2574
2587
|
}
|
|
@@ -2580,26 +2593,26 @@
|
|
|
2580
2593
|
configurable: true
|
|
2581
2594
|
});
|
|
2582
2595
|
TuiDocPageComponent.prototype.getRouterLink = function (tab) {
|
|
2583
|
-
if (tab === void 0) { tab =
|
|
2584
|
-
return "./" + tab.replace(/ /g,
|
|
2596
|
+
if (tab === void 0) { tab = ''; }
|
|
2597
|
+
return "./" + tab.replace(/ /g, '_');
|
|
2585
2598
|
};
|
|
2586
2599
|
return TuiDocPageComponent;
|
|
2587
2600
|
}());
|
|
2588
|
-
TuiDocPageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocPageComponent, deps: [{ token:
|
|
2601
|
+
TuiDocPageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocPageComponent, deps: [{ token: 'deprecated', attribute: true }, { token: TUI_DOC_DEFAULT_TABS }, { token: PAGE_SEE_ALSO }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2589
2602
|
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 !== null\"\n value=\"deprecated\"\n status=\"custom\"\n class=\"t-tag t-tag_deprecated\"\n ></tui-tag>\n <tui-tag\n *ngIf=\"package\"\n status=\"custom\"\n class=\"t-tag t-tag_package\"\n [value]=\"package\"\n [autoColor]=\"true\"\n ></tui-tag>\n </h1>\n <tui-tabs-with-more\n *ngIf=\"tabConnectors.length\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabConnectors; first as first; index as index\">\n <ng-container *ngIf=\"first; else dynamicTab\">\n <a\n *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 });
|
|
2590
2603
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDocPageComponent, decorators: [{
|
|
2591
2604
|
type: i0.Component,
|
|
2592
2605
|
args: [{
|
|
2593
|
-
selector:
|
|
2594
|
-
templateUrl:
|
|
2595
|
-
styleUrls: [
|
|
2606
|
+
selector: 'tui-doc-page',
|
|
2607
|
+
templateUrl: './page.template.html',
|
|
2608
|
+
styleUrls: ['./page.style.less'],
|
|
2596
2609
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2597
2610
|
providers: PAGE_PROVIDERS,
|
|
2598
2611
|
}]
|
|
2599
2612
|
}], ctorParameters: function () {
|
|
2600
2613
|
return [{ type: undefined, decorators: [{
|
|
2601
2614
|
type: i0.Attribute,
|
|
2602
|
-
args: [
|
|
2615
|
+
args: ['deprecated']
|
|
2603
2616
|
}] }, { type: undefined, decorators: [{
|
|
2604
2617
|
type: i0.Inject,
|
|
2605
2618
|
args: [TUI_DOC_DEFAULT_TABS]
|
|
@@ -2786,6 +2799,7 @@
|
|
|
2786
2799
|
exports.TUI_DOC_DOCUMENTATION_TEXTS = TUI_DOC_DOCUMENTATION_TEXTS;
|
|
2787
2800
|
exports.TUI_DOC_EXAMPLE_CONTENT_PROCESSOR = TUI_DOC_EXAMPLE_CONTENT_PROCESSOR;
|
|
2788
2801
|
exports.TUI_DOC_EXAMPLE_TEXTS = TUI_DOC_EXAMPLE_TEXTS;
|
|
2802
|
+
exports.TUI_DOC_EXCLUDED_PROPERTIES = TUI_DOC_EXCLUDED_PROPERTIES;
|
|
2789
2803
|
exports.TUI_DOC_LOGO = TUI_DOC_LOGO;
|
|
2790
2804
|
exports.TUI_DOC_MENU_TEXT = TUI_DOC_MENU_TEXT;
|
|
2791
2805
|
exports.TUI_DOC_PAGES = TUI_DOC_PAGES;
|
|
@@ -2826,6 +2840,7 @@
|
|
|
2826
2840
|
exports.TuiScrollIntoViewLinkDirective = TuiScrollIntoViewLinkDirective;
|
|
2827
2841
|
exports.TuiScrollIntoViewLinkModule = TuiScrollIntoViewLinkModule;
|
|
2828
2842
|
exports.tuiCoerceValue = tuiCoerceValue;
|
|
2843
|
+
exports.tuiDocExcludeProperties = tuiDocExcludeProperties;
|
|
2829
2844
|
exports.tuiGenerateRoutes = tuiGenerateRoutes;
|
|
2830
2845
|
exports.tuiRawLoad = tuiRawLoad;
|
|
2831
2846
|
exports.tuiRawLoadRecord = tuiRawLoadRecord;
|