@taiga-ui/addon-doc 4.52.0-canary.eb5ffe3 → 4.52.0-canary.ec0802b
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/README.md +33 -43
- package/components/api/api-item-number.directive.d.ts +3 -3
- package/components/api/api-item.component.d.ts +10 -7
- package/components/code/index.d.ts +2 -2
- package/components/demo/index.d.ts +3 -3
- package/components/doc-tab/index.d.ts +2 -2
- package/components/documentation/documentation-property-connector.directive.d.ts +9 -10
- package/components/documentation/documentation.component.d.ts +5 -5
- package/components/example/example.component.d.ts +7 -7
- package/components/example/example.options.d.ts +1 -3
- package/components/internal/see-also/index.d.ts +2 -2
- package/components/internal/source-code/source-code.component.d.ts +7 -8
- package/components/page/page-tab.directive.d.ts +2 -2
- package/components/page/page.component.d.ts +10 -10
- package/components/page/page.providers.d.ts +2 -2
- package/directives/text-code/text-code.directive.d.ts +2 -2
- package/fesm2022/taiga-ui-addon-doc-components.mjs +156 -258
- package/fesm2022/taiga-ui-addon-doc-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-doc-directives.mjs +5 -9
- package/fesm2022/taiga-ui-addon-doc-directives.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-doc-tokens.mjs +2 -7
- package/fesm2022/taiga-ui-addon-doc-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-doc-utils.mjs.map +1 -1
- package/package.json +5 -3
- package/tokens/doc-icons.d.ts +2 -3
- package/utils/provide-route-page-tab.d.ts +1 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectionStrategy, ViewEncapsulation, Component, TemplateRef, Pipe,
|
|
2
|
+
import { inject, ChangeDetectionStrategy, ViewEncapsulation, Component, TemplateRef, Pipe, input, Directive, computed, model, PLATFORM_ID, Input, signal, ContentChild, ViewChild, ChangeDetectorRef, DestroyRef, ContentChildren, InjectionToken, ElementRef, effect } from '@angular/core';
|
|
3
3
|
import { TUI_DOC_DOCUMENTATION_TEXTS, TUI_DOC_TYPE_REFERENCE_PARSER, TUI_DOC_TYPE_REFERENCE_HANDLER, TUI_DOC_URL_STATE_HANDLER, TUI_DOC_ICONS, TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR, TUI_DOC_DEMO_TEXTS, TUI_DOC_EXCLUDED_PROPERTIES, TUI_DOC_EXAMPLE_CONTENT_PROCESSOR, TUI_DOC_EXAMPLE_TEXTS, TUI_DOC_CODE_EDITOR, TUI_DOC_CODE_ACTIONS, TUI_DOC_TITLE, TUI_DOC_PAGES, TUI_DOC_PAGE_LOADED, TUI_DOC_SEARCH_TEXT, TUI_DOC_SEARCH_ENABLED, TUI_DOC_LOGO, TUI_DOC_MENU_TEXT, TUI_DOC_MAP_PAGES, TUI_DOC_SEE_ALSO_TEXT, TUI_DOC_SOURCE_CODE, TUI_DOC_SOURCE_CODE_TEXT, TUI_DOC_DIRECTION_ENABLED, TUI_DOC_SEE_ALSO, TUI_DOC_SUPPORT_LANGUAGE, TUI_DOC_DEFAULT_TABS } from '@taiga-ui/addon-doc/tokens';
|
|
4
4
|
import { Location, isPlatformServer, JsonPipe, NgTemplateOutlet, DOCUMENT, AsyncPipe, NgComponentOutlet, TitleCasePipe, KeyValuePipe } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { FormsModule, FormGroup, ReactiveFormsModule, FormControl } from '@angular/forms';
|
|
7
7
|
import { ActivatedRoute, UrlSerializer, RouterLink, RouterLinkActive, Router, NavigationEnd, Scroll, RouterOutlet } from '@angular/router';
|
|
8
8
|
import { tuiInspectAny, tuiCoerceValue, tuiRawLoad, tuiCoerceValueIsTrue, tuiCleanObject, tuiRawLoadRecord, tuiTransliterateKeyboardLayout } from '@taiga-ui/addon-doc/utils';
|
|
9
|
-
import { tuiIsNumber, tuiPx, tuiPure, tuiIsString,
|
|
10
|
-
import { TuiAlertService } from '@taiga-ui/core/components/alert';
|
|
9
|
+
import { tuiIsNumber, tuiPx, tuiPure, tuiIsString, tuiIsPresent, tuiUniqBy } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
11
10
|
import { TuiIcon } from '@taiga-ui/core/components/icon';
|
|
12
|
-
import * as
|
|
11
|
+
import * as i6$1 from '@taiga-ui/core/components/notification';
|
|
12
|
+
import { TuiNotificationService, TuiNotification } from '@taiga-ui/core/components/notification';
|
|
13
|
+
import * as i5 from '@taiga-ui/core/components/textfield';
|
|
13
14
|
import { TuiTextfield, TuiTextfieldDirective } from '@taiga-ui/core/components/textfield';
|
|
14
15
|
import * as i2 from '@taiga-ui/kit/components/data-list-wrapper';
|
|
15
16
|
import { TuiDataListWrapper } from '@taiga-ui/kit/components/data-list-wrapper';
|
|
16
17
|
import * as i3 from '@taiga-ui/kit/components/input-number';
|
|
17
18
|
import { TuiInputNumber } from '@taiga-ui/kit/components/input-number';
|
|
18
|
-
import * as
|
|
19
|
+
import * as i3$1 from '@taiga-ui/kit/components/select';
|
|
19
20
|
import { TuiSelect } from '@taiga-ui/kit/components/select';
|
|
20
21
|
import { TuiSwitch } from '@taiga-ui/kit/components/switch';
|
|
21
22
|
import { TuiChevron } from '@taiga-ui/kit/directives/chevron';
|
|
@@ -31,31 +32,29 @@ import { Highlight } from 'ngx-highlightjs';
|
|
|
31
32
|
import { BehaviorSubject, Subject, switchMap, timer, map, startWith, skip, merge, filter, mergeMap, ReplaySubject, take, debounceTime, combineLatest, fromEvent, of } from 'rxjs';
|
|
32
33
|
import { TUI_FALSE_HANDLER, EMPTY_QUERY } from '@taiga-ui/cdk/constants';
|
|
33
34
|
import { __decorate } from 'tslib';
|
|
34
|
-
import * as
|
|
35
|
+
import * as i1$2 from '@taiga-ui/cdk/directives/item';
|
|
35
36
|
import { TuiItem } from '@taiga-ui/cdk/directives/item';
|
|
36
37
|
import { TuiResizable, TuiResizer } from '@taiga-ui/cdk/directives/resizer';
|
|
37
38
|
import { tuiInjectElement, tuiGetElementObscures } from '@taiga-ui/cdk/utils/dom';
|
|
38
39
|
import { tuiToInteger, tuiClamp } from '@taiga-ui/cdk/utils/math';
|
|
39
|
-
import * as i3$
|
|
40
|
+
import * as i3$3 from '@taiga-ui/core/components/expand';
|
|
40
41
|
import { TuiExpand } from '@taiga-ui/core/components/expand';
|
|
41
42
|
import { TuiGroup } from '@taiga-ui/core/directives/group';
|
|
42
43
|
import { TUI_DARK_MODE, TUI_COMMON_ICONS, TUI_THEME } from '@taiga-ui/core/tokens';
|
|
43
|
-
import * as
|
|
44
|
+
import * as i9 from '@taiga-ui/legacy/directives/textfield-controller';
|
|
44
45
|
import { TuiTextfieldControllerModule } from '@taiga-ui/legacy/directives/textfield-controller';
|
|
45
46
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
46
47
|
import { tuiQueryListChanges, tuiWatch, tuiZonefreeScheduler, tuiControlValue } from '@taiga-ui/cdk/observables';
|
|
47
48
|
import { TuiFilterPipe } from '@taiga-ui/cdk/pipes/filter';
|
|
48
49
|
import { TuiToArrayPipe } from '@taiga-ui/cdk/pipes/to-array';
|
|
49
|
-
import { TuiNotification } from '@taiga-ui/core/components/notification';
|
|
50
50
|
import { tuiScrollbarOptionsProvider, TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
|
|
51
51
|
import { TuiBadge } from '@taiga-ui/kit/components/badge';
|
|
52
|
-
import * as
|
|
52
|
+
import * as i7 from '@taiga-ui/legacy/components/select';
|
|
53
53
|
import { TuiSelectModule } from '@taiga-ui/legacy/components/select';
|
|
54
|
-
import * as i3$
|
|
54
|
+
import * as i3$2 from '@taiga-ui/core/components/data-list';
|
|
55
55
|
import { TuiDataList } from '@taiga-ui/core/components/data-list';
|
|
56
56
|
import { tuiRgbToHex } from '@taiga-ui/cdk/utils/color';
|
|
57
57
|
import { WA_LOCATION, WA_LOCAL_STORAGE } from '@ng-web-apis/common';
|
|
58
|
-
import { TuiLet } from '@taiga-ui/cdk/directives/let';
|
|
59
58
|
import { TuiMapperPipe } from '@taiga-ui/cdk/pipes/mapper';
|
|
60
59
|
import { TuiLink, tuiLinkOptionsProvider } from '@taiga-ui/core/components/link';
|
|
61
60
|
import { TuiLoader } from '@taiga-ui/core/components/loader';
|
|
@@ -64,6 +63,7 @@ import * as i2$1 from '@taiga-ui/kit/components/tabs';
|
|
|
64
63
|
import { TuiTabs } from '@taiga-ui/kit/components/tabs';
|
|
65
64
|
import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
66
65
|
import { TUI_EXAMPLE_PRIMARY_FILE_NAME } from '@taiga-ui/addon-doc/types';
|
|
66
|
+
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
67
67
|
import { TuiPopup } from '@taiga-ui/core/directives/popup';
|
|
68
68
|
import { TuiDrawer } from '@taiga-ui/kit/components/drawer';
|
|
69
69
|
import { Title } from '@angular/platform-browser';
|
|
@@ -80,18 +80,18 @@ import { TuiRoot } from '@taiga-ui/core/components/root';
|
|
|
80
80
|
import { TuiReplacePipe } from '@taiga-ui/cdk/pipes/replace';
|
|
81
81
|
import { TuiAutoColorPipe } from '@taiga-ui/core/pipes/auto-color';
|
|
82
82
|
import { TuiChip } from '@taiga-ui/kit/components/chip';
|
|
83
|
-
import * as i4
|
|
83
|
+
import * as i4 from '@taiga-ui/core/components/label';
|
|
84
84
|
|
|
85
85
|
class TuiDocAPI {
|
|
86
86
|
constructor() {
|
|
87
87
|
this.texts = inject(TUI_DOC_DOCUMENTATION_TEXTS);
|
|
88
88
|
}
|
|
89
89
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocAPI, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
90
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiDocAPI, isStandalone: true, selector: "table[tuiDocAPI]", ngImport: i0, template: "<thead>\n <tr>\n <th>{{ texts[2] }}</th>\n <th>{{ texts[1] }}</th>\n <th>{{ texts[3] }}</th>\n </tr>\n</thead>\n<ng-content />\n", styles: ["[tuiDocAPI]{inline-size:100%}[tuiDocAPI] tbody [tuiTitle]{align-items:flex-start;
|
|
90
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiDocAPI, isStandalone: true, selector: "table[tuiDocAPI]", ngImport: i0, template: "<thead>\n <tr>\n <th>{{ texts[2] }}</th>\n <th>{{ texts[1] }}</th>\n <th>{{ texts[3] }}</th>\n </tr>\n</thead>\n<ng-content />\n", styles: ["[tuiDocAPI]{inline-size:100%}[tuiDocAPI] tbody [tuiTitle]{align-items:flex-start;padding:1rem;box-shadow:0 1px var(--tui-border-normal);background:var(--tui-background-base-alt)}[tuiDocAPI] tbody [tuiTitle] [tuiSubtitle]{color:var(--tui-text-secondary)}[tuiDocAPI] th{padding:.5rem 0;color:var(--tui-text-secondary);font-weight:400;text-align:start;box-shadow:inset 0 -1px var(--tui-border-normal)}[tuiDocAPI] th:last-child{text-align:end}@media screen and (max-width: 47.9625em){[tuiDocAPI],[tuiDocAPI] tbody,[tuiDocAPI] tr{display:flex;flex-direction:column}[tuiDocAPI] th,[tuiDocAPI] tbody th,[tuiDocAPI] tr th{display:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
91
91
|
}
|
|
92
92
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocAPI, decorators: [{
|
|
93
93
|
type: Component,
|
|
94
|
-
args: [{
|
|
94
|
+
args: [{ selector: 'table[tuiDocAPI]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<thead>\n <tr>\n <th>{{ texts[2] }}</th>\n <th>{{ texts[1] }}</th>\n <th>{{ texts[3] }}</th>\n </tr>\n</thead>\n<ng-content />\n", styles: ["[tuiDocAPI]{inline-size:100%}[tuiDocAPI] tbody [tuiTitle]{align-items:flex-start;padding:1rem;box-shadow:0 1px var(--tui-border-normal);background:var(--tui-background-base-alt)}[tuiDocAPI] tbody [tuiTitle] [tuiSubtitle]{color:var(--tui-text-secondary)}[tuiDocAPI] th{padding:.5rem 0;color:var(--tui-text-secondary);font-weight:400;text-align:start;box-shadow:inset 0 -1px var(--tui-border-normal)}[tuiDocAPI] th:last-child{text-align:end}@media screen and (max-width: 47.9625em){[tuiDocAPI],[tuiDocAPI] tbody,[tuiDocAPI] tr{display:flex;flex-direction:column}[tuiDocAPI] th,[tuiDocAPI] tbody th,[tuiDocAPI] tr th{display:none}}\n"] }]
|
|
95
95
|
}] });
|
|
96
96
|
|
|
97
97
|
class TuiInspectPipe {
|
|
@@ -117,7 +117,6 @@ class TuiInspectPipe {
|
|
|
117
117
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInspectPipe, decorators: [{
|
|
118
118
|
type: Pipe,
|
|
119
119
|
args: [{
|
|
120
|
-
standalone: true,
|
|
121
120
|
name: 'tuiInspectAny',
|
|
122
121
|
}]
|
|
123
122
|
}] });
|
|
@@ -142,30 +141,24 @@ class TuiDocTypeReferencePipe {
|
|
|
142
141
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocTypeReferencePipe, decorators: [{
|
|
143
142
|
type: Pipe,
|
|
144
143
|
args: [{
|
|
145
|
-
standalone: true,
|
|
146
144
|
name: 'tuiDocTypeReference',
|
|
147
145
|
}]
|
|
148
146
|
}] });
|
|
149
147
|
|
|
150
148
|
class TuiDocAPINumberItem {
|
|
151
149
|
constructor() {
|
|
152
|
-
this.min = null;
|
|
153
|
-
this.max = null;
|
|
150
|
+
this.min = input(null);
|
|
151
|
+
this.max = input(null);
|
|
154
152
|
}
|
|
155
153
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocAPINumberItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
156
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
154
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiDocAPINumberItem, isStandalone: true, selector: "tr[tuiDocAPIItem][type=number]", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
157
155
|
}
|
|
158
156
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocAPINumberItem, decorators: [{
|
|
159
157
|
type: Directive,
|
|
160
158
|
args: [{
|
|
161
|
-
standalone: true,
|
|
162
159
|
selector: 'tr[tuiDocAPIItem][type=number]',
|
|
163
160
|
}]
|
|
164
|
-
}]
|
|
165
|
-
type: Input
|
|
166
|
-
}], max: [{
|
|
167
|
-
type: Input
|
|
168
|
-
}] } });
|
|
161
|
+
}] });
|
|
169
162
|
|
|
170
163
|
const SERIALIZED_SUFFIX$1 = '$';
|
|
171
164
|
class TuiDocAPIItem {
|
|
@@ -174,23 +167,26 @@ class TuiDocAPIItem {
|
|
|
174
167
|
this.activatedRoute = inject(ActivatedRoute);
|
|
175
168
|
this.urlSerializer = inject(UrlSerializer);
|
|
176
169
|
this.urlStateHandler = inject(TUI_DOC_URL_STATE_HANDLER);
|
|
177
|
-
this.alerts = inject(
|
|
170
|
+
this.alerts = inject(TuiNotificationService);
|
|
178
171
|
this.icons = inject(TUI_DOC_ICONS);
|
|
179
172
|
this.numberItem = inject(TuiDocAPINumberItem, {
|
|
180
173
|
self: true,
|
|
181
174
|
optional: true,
|
|
182
175
|
});
|
|
183
|
-
this.
|
|
184
|
-
this.
|
|
185
|
-
this.
|
|
186
|
-
this.
|
|
176
|
+
this.isBananaBox = computed(() => this.name().startsWith('[('));
|
|
177
|
+
this.isInput = computed(() => this.name().startsWith('['));
|
|
178
|
+
this.isOutput = computed(() => this.name().startsWith('('));
|
|
179
|
+
this.name = input('');
|
|
180
|
+
this.type = input('');
|
|
181
|
+
this.value = model();
|
|
182
|
+
this.items = input([]);
|
|
183
|
+
this.hasCleaner = computed(() => this.type().includes('null') || this.type().includes('PolymorpheusContent'));
|
|
187
184
|
}
|
|
188
185
|
ngOnInit() {
|
|
189
186
|
this.parseParams(this.activatedRoute.snapshot.queryParams);
|
|
190
187
|
}
|
|
191
188
|
onValueChange(value) {
|
|
192
|
-
this.value
|
|
193
|
-
this.valueChange.emit(value);
|
|
189
|
+
this.value.set(value);
|
|
194
190
|
this.setQueryParam(value);
|
|
195
191
|
}
|
|
196
192
|
emitEvent(event) {
|
|
@@ -198,22 +194,23 @@ class TuiDocAPIItem {
|
|
|
198
194
|
const alert = !event || event?.toString() === '[object Object]'
|
|
199
195
|
? tuiInspectAny(event, 2)
|
|
200
196
|
: event;
|
|
201
|
-
this.alerts.open(alert, { label: this.name }).subscribe();
|
|
197
|
+
this.alerts.open(alert, { label: this.name() }).subscribe();
|
|
202
198
|
}
|
|
203
199
|
clearBrackets(value) {
|
|
204
200
|
return value.replaceAll(/[()[\]]/g, '');
|
|
205
201
|
}
|
|
206
202
|
parseParams(params) {
|
|
207
|
-
const name = this.clearBrackets(this.name);
|
|
203
|
+
const name = this.clearBrackets(this.name());
|
|
208
204
|
const propertyValue = params[name];
|
|
209
205
|
const propertyValueWithSuffix = params[`${name}${SERIALIZED_SUFFIX$1}`];
|
|
210
206
|
if (!propertyValue && !propertyValueWithSuffix) {
|
|
211
207
|
return;
|
|
212
208
|
}
|
|
213
|
-
|
|
214
|
-
|
|
209
|
+
const items = this.items();
|
|
210
|
+
let value = !!propertyValueWithSuffix && items
|
|
211
|
+
? items[propertyValueWithSuffix]
|
|
215
212
|
: tuiCoerceValue(propertyValue);
|
|
216
|
-
if (this.type === 'string' && tuiIsNumber(value)) {
|
|
213
|
+
if (this.type() === 'string' && tuiIsNumber(value)) {
|
|
217
214
|
value = value.toString();
|
|
218
215
|
}
|
|
219
216
|
this.onValueChange(value);
|
|
@@ -221,9 +218,10 @@ class TuiDocAPIItem {
|
|
|
221
218
|
setQueryParam(value) {
|
|
222
219
|
const tree = this.urlSerializer.parse(this.locationRef.path());
|
|
223
220
|
const isValueAvailableByKey = value instanceof Object;
|
|
224
|
-
const
|
|
221
|
+
const items = this.items();
|
|
222
|
+
const computedValue = isValueAvailableByKey && items ? items.indexOf(value) : value;
|
|
225
223
|
const suffix = isValueAvailableByKey ? SERIALIZED_SUFFIX$1 : '';
|
|
226
|
-
const propName = this.clearBrackets(this.name) + suffix;
|
|
224
|
+
const propName = this.clearBrackets(this.name()) + suffix;
|
|
227
225
|
tree.queryParams = {
|
|
228
226
|
...tree.queryParams,
|
|
229
227
|
[propName]: computedValue,
|
|
@@ -231,7 +229,7 @@ class TuiDocAPIItem {
|
|
|
231
229
|
this.locationRef.go(this.urlStateHandler(tree));
|
|
232
230
|
}
|
|
233
231
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocAPIItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
234
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocAPIItem, isStandalone: true, selector: "tr[tuiDocAPIItem]", inputs: { name: "name", type: "type", value: "value", items: "items" }, outputs: {
|
|
232
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocAPIItem, isStandalone: true, selector: "tr[tuiDocAPIItem]", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: "<td class=\"t-td\">\n <code\n class=\"t-name\"\n [class.t-name_banana]=\"isBananaBox()\"\n [class.t-name_input]=\"isInput()\"\n [class.t-name_output]=\"isOutput()\"\n >\n {{ name() }}\n </code>\n <ng-content />\n</td>\n<td class=\"t-td\">\n <code class=\"t-type\">\n @for (item of type() | tuiDocTypeReference; track item) {\n @if (item.reference) {\n <a\n target=\"_blank\"\n class=\"t-reference\"\n [attr.href]=\"item.reference\"\n >\n {{ item.type }}\n @if (icons.externalLink) {\n <tui-icon\n [icon]=\"icons.externalLink\"\n [style.font-size.rem]=\"1\"\n />\n }\n </a>\n } @else {\n {{ item.type }}\n }\n @if (!$last) {\n <span> | </span>\n }\n }\n </code>\n</td>\n<td class=\"t-td\">\n @if (items().length) {\n <tui-textfield\n tuiChevron\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n [content]=\"content\"\n [tuiTextfieldCleaner]=\"hasCleaner()\"\n >\n <input\n tuiSelect\n [ngModel]=\"value() ?? null\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n <tui-data-list-wrapper\n *tuiDropdown\n new\n [itemContent]=\"content\"\n [items]=\"items()\"\n />\n </tui-textfield>\n } @else {\n @if (value() !== undefined) {\n @switch (type()) {\n @case ('boolean') {\n <input\n tuiSwitch\n type=\"checkbox\"\n [id]=\"name()\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n }\n @case ('string') {\n <tui-textfield\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n >\n <input\n tuiTextfield\n [id]=\"name()\"\n [ngModel]=\"value() || ''\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n </tui-textfield>\n }\n @case ('number') {\n <tui-textfield tuiTextfieldSize=\"m\">\n <input\n tuiInputNumber\n [id]=\"name()\"\n [max]=\"numberItem?.max() ?? null\"\n [min]=\"numberItem?.min() ?? null\"\n [ngModel]=\"value()\"\n [step]=\"1\"\n (ngModelChange)=\"onValueChange($event || 0)\"\n />\n </tui-textfield>\n }\n }\n }\n }\n <ng-template\n #content\n let-data\n >\n <code [style.margin]=\"0\">{{ data | tuiInspectAny }}</code>\n </ng-template>\n</td>\n", styles: [":host{box-shadow:inset 0 -1px var(--tui-border-normal)}.t-td{padding:1.5rem 2rem 1.5rem 0;vertical-align:top}.t-td:last-child{padding-inline-end:0;text-align:end;min-inline-size:10rem}.t-name{display:flex!important;min-block-size:1.5rem;inline-size:fit-content;margin:0 0 .5rem!important;-webkit-text-fill-color:var(--tui-background-accent-2-pressed)}.t-name_input{-webkit-text-fill-color:var(--tui-text-negative)}.t-name_banana{-webkit-text-fill-color:var(--tui-text-action)}.t-name_output{-webkit-text-fill-color:var(--tui-status-info)}.t-type{flex-wrap:wrap;align-items:center;justify-content:flex-start;min-block-size:1.5rem;margin:0!important}.t-reference{display:inline-flex;color:var(--tui-text-action);text-decoration:none;align-items:center;justify-content:center;gap:.1875rem}.t-input{min-inline-size:10rem;margin-block-start:-.625rem}.t-input code{overflow:hidden;white-space:nowrap}@media screen and (max-width: 47.9625em){:host{gap:1rem;padding:1rem 0}.t-td{padding:0}.t-td:last-child{text-align:start}.t-input{margin:0}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i2.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels]), tui-data-list-wrapper:not([labels])[new]", inputs: ["items", "disabledItemHandler", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "pipe", type: TuiDocTypeReferencePipe, name: "tuiDocTypeReference" }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "directive", type: i3.TuiInputNumberDirective, selector: "input[tuiInputNumber]", inputs: ["prefix", "postfix", "min", "max"] }, { kind: "component", type: i3.TuiInputNumberStep, selector: "input[tuiInputNumber][step]", inputs: ["step"] }, { kind: "pipe", type: TuiInspectPipe, name: "tuiInspectAny" }, { kind: "directive", type: i3$1.TuiSelectDirective, selector: "input[tuiSelect]" }, { kind: "component", type: TuiSwitch, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: ["showIcons"] }, { kind: "component", type: i5.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i5.TuiTextfieldDirective, selector: "input[tuiTextfield]" }, { kind: "directive", type: i5.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i6.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
235
233
|
}
|
|
236
234
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocAPIItem, decorators: [{
|
|
237
235
|
type: Component,
|
|
@@ -243,21 +241,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
243
241
|
TuiIcon,
|
|
244
242
|
TuiInputNumber,
|
|
245
243
|
TuiInspectPipe,
|
|
244
|
+
TuiSelect,
|
|
246
245
|
TuiSwitch,
|
|
247
246
|
TuiTextfield,
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}], propDecorators: { name: [{
|
|
251
|
-
type: Input
|
|
252
|
-
}], type: [{
|
|
253
|
-
type: Input
|
|
254
|
-
}], value: [{
|
|
255
|
-
type: Input
|
|
256
|
-
}], items: [{
|
|
257
|
-
type: Input
|
|
258
|
-
}], valueChange: [{
|
|
259
|
-
type: Output
|
|
260
|
-
}] } });
|
|
247
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<td class=\"t-td\">\n <code\n class=\"t-name\"\n [class.t-name_banana]=\"isBananaBox()\"\n [class.t-name_input]=\"isInput()\"\n [class.t-name_output]=\"isOutput()\"\n >\n {{ name() }}\n </code>\n <ng-content />\n</td>\n<td class=\"t-td\">\n <code class=\"t-type\">\n @for (item of type() | tuiDocTypeReference; track item) {\n @if (item.reference) {\n <a\n target=\"_blank\"\n class=\"t-reference\"\n [attr.href]=\"item.reference\"\n >\n {{ item.type }}\n @if (icons.externalLink) {\n <tui-icon\n [icon]=\"icons.externalLink\"\n [style.font-size.rem]=\"1\"\n />\n }\n </a>\n } @else {\n {{ item.type }}\n }\n @if (!$last) {\n <span> | </span>\n }\n }\n </code>\n</td>\n<td class=\"t-td\">\n @if (items().length) {\n <tui-textfield\n tuiChevron\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n [content]=\"content\"\n [tuiTextfieldCleaner]=\"hasCleaner()\"\n >\n <input\n tuiSelect\n [ngModel]=\"value() ?? null\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n <tui-data-list-wrapper\n *tuiDropdown\n new\n [itemContent]=\"content\"\n [items]=\"items()\"\n />\n </tui-textfield>\n } @else {\n @if (value() !== undefined) {\n @switch (type()) {\n @case ('boolean') {\n <input\n tuiSwitch\n type=\"checkbox\"\n [id]=\"name()\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n }\n @case ('string') {\n <tui-textfield\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n >\n <input\n tuiTextfield\n [id]=\"name()\"\n [ngModel]=\"value() || ''\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n </tui-textfield>\n }\n @case ('number') {\n <tui-textfield tuiTextfieldSize=\"m\">\n <input\n tuiInputNumber\n [id]=\"name()\"\n [max]=\"numberItem?.max() ?? null\"\n [min]=\"numberItem?.min() ?? null\"\n [ngModel]=\"value()\"\n [step]=\"1\"\n (ngModelChange)=\"onValueChange($event || 0)\"\n />\n </tui-textfield>\n }\n }\n }\n }\n <ng-template\n #content\n let-data\n >\n <code [style.margin]=\"0\">{{ data | tuiInspectAny }}</code>\n </ng-template>\n</td>\n", styles: [":host{box-shadow:inset 0 -1px var(--tui-border-normal)}.t-td{padding:1.5rem 2rem 1.5rem 0;vertical-align:top}.t-td:last-child{padding-inline-end:0;text-align:end;min-inline-size:10rem}.t-name{display:flex!important;min-block-size:1.5rem;inline-size:fit-content;margin:0 0 .5rem!important;-webkit-text-fill-color:var(--tui-background-accent-2-pressed)}.t-name_input{-webkit-text-fill-color:var(--tui-text-negative)}.t-name_banana{-webkit-text-fill-color:var(--tui-text-action)}.t-name_output{-webkit-text-fill-color:var(--tui-status-info)}.t-type{flex-wrap:wrap;align-items:center;justify-content:flex-start;min-block-size:1.5rem;margin:0!important}.t-reference{display:inline-flex;color:var(--tui-text-action);text-decoration:none;align-items:center;justify-content:center;gap:.1875rem}.t-input{min-inline-size:10rem;margin-block-start:-.625rem}.t-input code{overflow:hidden;white-space:nowrap}@media screen and (max-width: 47.9625em){:host{gap:1rem;padding:1rem 0}.t-td{padding:0}.t-td:last-child{text-align:start}.t-input{margin:0}}\n"] }]
|
|
248
|
+
}] });
|
|
261
249
|
|
|
262
250
|
class TuiDocCode {
|
|
263
251
|
constructor() {
|
|
@@ -270,26 +258,24 @@ class TuiDocCode {
|
|
|
270
258
|
this.copyText = computed(() => this.texts()[0]);
|
|
271
259
|
this.icon = toSignal(this.copy$.pipe(switchMap(() => timer(2000).pipe(map(() => this.icons.copy), startWith(this.icons.check)))), { initialValue: this.icons.copy });
|
|
272
260
|
this.processor = toSignal(this.rawLoader$$.pipe(switchMap(tuiRawLoad), map((value) => this.markdownCodeProcessor(value))), { initialValue: [] });
|
|
273
|
-
this.filename = '';
|
|
261
|
+
this.filename = input('');
|
|
274
262
|
}
|
|
275
263
|
set code(code) {
|
|
276
264
|
this.rawLoader$$.next(code);
|
|
277
265
|
}
|
|
278
266
|
get hasFilename() {
|
|
279
|
-
return !!this.filename;
|
|
267
|
+
return !!this.filename();
|
|
280
268
|
}
|
|
281
269
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocCode, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
282
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocCode, isStandalone: true, selector: "tui-doc-code", inputs: { filename: "filename", code: "code" }, host: { properties: { "style.visibility": "isServer ? \"hidden\" : \"visible\"", "class._has-filename": "hasFilename" } }, ngImport: i0, template: "@if (filename) {\n <p class=\"t-header\">\n {{ filename }}\n </p>\n}\n@for (content of processor(); track content) {\n <pre class=\"t-code\">\n <code [lineNumbers]=\"true\" [highlight]=\"content\"></code>\n <div class=\"t-code-actions\">\n <button\n tuiIconButton\n type=\"button\"\n appearance=\"outline-grayscale\"\n size=\"s\"\n class=\"t-copy-button\"\n [iconStart]=\"icon()\"\n [cdkCopyToClipboard]=\"content\"\n (click)=\"copy$.next()\"\n >\n {{ copyText() }}\n </button>\n <ng-content />\n </div>\n </pre>\n}\n", styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:700}.t-header+.t-code{border-radius:.25rem}.t-code{position:relative;margin:0;white-space:normal;outline:1px solid var(--tui-border-normal)}.t-code ::ng-deep .hljs-ln{inline-size:100%}.t-code ::ng-deep .hljs-ln .hljs-ln-numbers{inline-size:1rem}.t-code ::ng-deep .hljs-ln td{white-space:pre}.t-code ::ng-deep .hljs-ln td:not(.hljs-ln-numbers):hover{outline:1px solid var(--tui-border-normal);border-radius:.25rem}.t-code+.t-code{margin-block-start:1rem}.t-code-actions{position:absolute;top:.75rem;right:.75rem;display:flex;justify-content:center;align-items:center;flex-direction:row-reverse}.t-copy-button::ng-deep+*:not(:empty){margin-inline-end:.375rem}.hljs:not(:empty){font:var(--tui-font-text-m);font-size:.875rem;padding:1.5rem 2rem;font-family:monospace;overflow-wrap:break-word;white-space:pre-wrap}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.hljs:not(:empty)::-webkit-scrollbar,.hljs:not(:empty)::-webkit-scrollbar-thumb{inline-size:1rem;block-size:1rem;border-radius:6.25rem;background-clip:padding-box;border:.375rem solid transparent}.hljs:not(:empty)::-webkit-scrollbar{background-color:transparent}.hljs:not(:empty)::-webkit-scrollbar-thumb{background-color:var(--tui-background-neutral-1-hover)}.hljs:not(:empty)::-webkit-scrollbar-thumb:hover{background-color:var(--tui-background-neutral-1-pressed)}.hljs:not(:empty)::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-tertiary)}}@media screen and (max-width: 47.9625em){.hljs:not(:empty){padding:1rem}}.t-code-actions,.hljs:not(:empty){background:var(--tui-background-base)}@supports (background: color-mix(in srgb,var(--tui-background-base),#222 2%)){.t-code-actions,.hljs:not(:empty){background:color-mix(in srgb,var(--tui-background-base),#222 2%)}}\n"], dependencies: [{ kind: "ngmodule", type: ClipboardModule }, { kind: "directive", type: i1$1.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "directive", type: Highlight, selector: "[highlight]", inputs: ["highlight", "languages", "lineNumbers"], outputs: ["highlighted"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
270
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocCode, isStandalone: true, selector: "tui-doc-code", inputs: { filename: { classPropertyName: "filename", publicName: "filename", isSignal: true, isRequired: false, transformFunction: null }, code: { classPropertyName: "code", publicName: "code", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "style.visibility": "isServer ? \"hidden\" : \"visible\"", "class._has-filename": "hasFilename" } }, ngImport: i0, template: "@if (filename()) {\n <p class=\"t-header\">\n {{ filename() }}\n </p>\n}\n@for (content of processor(); track content) {\n <pre class=\"t-code\">\n <code [lineNumbers]=\"true\" [highlight]=\"content\"></code>\n <div class=\"t-code-actions\">\n <button\n tuiIconButton\n type=\"button\"\n appearance=\"outline-grayscale\"\n size=\"s\"\n class=\"t-copy-button\"\n [iconStart]=\"icon()\"\n [cdkCopyToClipboard]=\"content\"\n (click)=\"copy$.next()\"\n >\n {{ copyText() }}\n </button>\n <ng-content />\n </div>\n </pre>\n}\n", styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:700}.t-header+.t-code{border-radius:.25rem}.t-code{position:relative;margin:0;white-space:normal;outline:1px solid var(--tui-border-normal)}.t-code ::ng-deep .hljs-ln{inline-size:100%}.t-code ::ng-deep .hljs-ln .hljs-ln-numbers{inline-size:1rem}.t-code ::ng-deep .hljs-ln td{white-space:pre}.t-code ::ng-deep .hljs-ln td:not(.hljs-ln-numbers):hover{outline:1px solid var(--tui-border-normal);border-radius:.25rem}.t-code+.t-code{margin-block-start:1rem}.t-code-actions{position:absolute;top:.75rem;right:.75rem;display:flex;justify-content:center;align-items:center;flex-direction:row-reverse}.t-copy-button::ng-deep+*:not(:empty){margin-inline-end:.375rem}.hljs:not(:empty){font:var(--tui-font-text-m);font-size:.875rem;padding:1.5rem 2rem;font-family:monospace;overflow-wrap:break-word;white-space:pre-wrap}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.hljs:not(:empty)::-webkit-scrollbar,.hljs:not(:empty)::-webkit-scrollbar-thumb{inline-size:1rem;block-size:1rem;border-radius:6.25rem;background-clip:padding-box;border:.375rem solid transparent}.hljs:not(:empty)::-webkit-scrollbar{background-color:transparent}.hljs:not(:empty)::-webkit-scrollbar-thumb{background-color:var(--tui-background-neutral-1-hover)}.hljs:not(:empty)::-webkit-scrollbar-thumb:hover{background-color:var(--tui-background-neutral-1-pressed)}.hljs:not(:empty)::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-tertiary)}}@media screen and (max-width: 47.9625em){.hljs:not(:empty){padding:1rem}}.t-code-actions,.hljs:not(:empty){background:var(--tui-background-base)}@supports (background: color-mix(in srgb,var(--tui-background-base),#222 2%)){.t-code-actions,.hljs:not(:empty){background:color-mix(in srgb,var(--tui-background-base),#222 2%)}}\n"], dependencies: [{ kind: "ngmodule", type: ClipboardModule }, { kind: "directive", type: i1$1.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "directive", type: Highlight, selector: "[highlight]", inputs: ["highlight", "languages", "lineNumbers"], outputs: ["highlighted"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
283
271
|
}
|
|
284
272
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocCode, decorators: [{
|
|
285
273
|
type: Component,
|
|
286
274
|
args: [{ selector: 'tui-doc-code', imports: [ClipboardModule, Highlight, TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
287
275
|
'[style.visibility]': 'isServer ? "hidden" : "visible"',
|
|
288
276
|
'[class._has-filename]': 'hasFilename',
|
|
289
|
-
}, template: "@if (filename) {\n <p class=\"t-header\">\n {{ filename }}\n </p>\n}\n@for (content of processor(); track content) {\n <pre class=\"t-code\">\n <code [lineNumbers]=\"true\" [highlight]=\"content\"></code>\n <div class=\"t-code-actions\">\n <button\n tuiIconButton\n type=\"button\"\n appearance=\"outline-grayscale\"\n size=\"s\"\n class=\"t-copy-button\"\n [iconStart]=\"icon()\"\n [cdkCopyToClipboard]=\"content\"\n (click)=\"copy$.next()\"\n >\n {{ copyText() }}\n </button>\n <ng-content />\n </div>\n </pre>\n}\n", styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:700}.t-header+.t-code{border-radius:.25rem}.t-code{position:relative;margin:0;white-space:normal;outline:1px solid var(--tui-border-normal)}.t-code ::ng-deep .hljs-ln{inline-size:100%}.t-code ::ng-deep .hljs-ln .hljs-ln-numbers{inline-size:1rem}.t-code ::ng-deep .hljs-ln td{white-space:pre}.t-code ::ng-deep .hljs-ln td:not(.hljs-ln-numbers):hover{outline:1px solid var(--tui-border-normal);border-radius:.25rem}.t-code+.t-code{margin-block-start:1rem}.t-code-actions{position:absolute;top:.75rem;right:.75rem;display:flex;justify-content:center;align-items:center;flex-direction:row-reverse}.t-copy-button::ng-deep+*:not(:empty){margin-inline-end:.375rem}.hljs:not(:empty){font:var(--tui-font-text-m);font-size:.875rem;padding:1.5rem 2rem;font-family:monospace;overflow-wrap:break-word;white-space:pre-wrap}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.hljs:not(:empty)::-webkit-scrollbar,.hljs:not(:empty)::-webkit-scrollbar-thumb{inline-size:1rem;block-size:1rem;border-radius:6.25rem;background-clip:padding-box;border:.375rem solid transparent}.hljs:not(:empty)::-webkit-scrollbar{background-color:transparent}.hljs:not(:empty)::-webkit-scrollbar-thumb{background-color:var(--tui-background-neutral-1-hover)}.hljs:not(:empty)::-webkit-scrollbar-thumb:hover{background-color:var(--tui-background-neutral-1-pressed)}.hljs:not(:empty)::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-tertiary)}}@media screen and (max-width: 47.9625em){.hljs:not(:empty){padding:1rem}}.t-code-actions,.hljs:not(:empty){background:var(--tui-background-base)}@supports (background: color-mix(in srgb,var(--tui-background-base),#222 2%)){.t-code-actions,.hljs:not(:empty){background:color-mix(in srgb,var(--tui-background-base),#222 2%)}}\n"] }]
|
|
290
|
-
}], propDecorators: {
|
|
291
|
-
type: Input
|
|
292
|
-
}], code: [{
|
|
277
|
+
}, template: "@if (filename()) {\n <p class=\"t-header\">\n {{ filename() }}\n </p>\n}\n@for (content of processor(); track content) {\n <pre class=\"t-code\">\n <code [lineNumbers]=\"true\" [highlight]=\"content\"></code>\n <div class=\"t-code-actions\">\n <button\n tuiIconButton\n type=\"button\"\n appearance=\"outline-grayscale\"\n size=\"s\"\n class=\"t-copy-button\"\n [iconStart]=\"icon()\"\n [cdkCopyToClipboard]=\"content\"\n (click)=\"copy$.next()\"\n >\n {{ copyText() }}\n </button>\n <ng-content />\n </div>\n </pre>\n}\n", styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:700}.t-header+.t-code{border-radius:.25rem}.t-code{position:relative;margin:0;white-space:normal;outline:1px solid var(--tui-border-normal)}.t-code ::ng-deep .hljs-ln{inline-size:100%}.t-code ::ng-deep .hljs-ln .hljs-ln-numbers{inline-size:1rem}.t-code ::ng-deep .hljs-ln td{white-space:pre}.t-code ::ng-deep .hljs-ln td:not(.hljs-ln-numbers):hover{outline:1px solid var(--tui-border-normal);border-radius:.25rem}.t-code+.t-code{margin-block-start:1rem}.t-code-actions{position:absolute;top:.75rem;right:.75rem;display:flex;justify-content:center;align-items:center;flex-direction:row-reverse}.t-copy-button::ng-deep+*:not(:empty){margin-inline-end:.375rem}.hljs:not(:empty){font:var(--tui-font-text-m);font-size:.875rem;padding:1.5rem 2rem;font-family:monospace;overflow-wrap:break-word;white-space:pre-wrap}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.hljs:not(:empty)::-webkit-scrollbar,.hljs:not(:empty)::-webkit-scrollbar-thumb{inline-size:1rem;block-size:1rem;border-radius:6.25rem;background-clip:padding-box;border:.375rem solid transparent}.hljs:not(:empty)::-webkit-scrollbar{background-color:transparent}.hljs:not(:empty)::-webkit-scrollbar-thumb{background-color:var(--tui-background-neutral-1-hover)}.hljs:not(:empty)::-webkit-scrollbar-thumb:hover{background-color:var(--tui-background-neutral-1-pressed)}.hljs:not(:empty)::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-tertiary)}}@media screen and (max-width: 47.9625em){.hljs:not(:empty){padding:1rem}}.t-code-actions,.hljs:not(:empty){background:var(--tui-background-base)}@supports (background: color-mix(in srgb,var(--tui-background-base),#222 2%)){.t-code-actions,.hljs:not(:empty){background:color-mix(in srgb,var(--tui-background-base),#222 2%)}}\n"] }]
|
|
278
|
+
}], propDecorators: { code: [{
|
|
293
279
|
type: Input
|
|
294
280
|
}] } });
|
|
295
281
|
|
|
@@ -332,8 +318,8 @@ class TuiDocDemo {
|
|
|
332
318
|
this.expanded = tuiCoerceValueIsTrue(this.params.sandboxExpanded ?? false);
|
|
333
319
|
this.sandboxWidth = tuiToInteger(this.params.sandboxWidth);
|
|
334
320
|
this.texts = inject(TUI_DOC_DEMO_TEXTS);
|
|
335
|
-
this.control = null;
|
|
336
|
-
this.sticky = true;
|
|
321
|
+
this.control = input(null);
|
|
322
|
+
this.sticky = input(true);
|
|
337
323
|
}
|
|
338
324
|
ngAfterViewInit() {
|
|
339
325
|
this.createForm();
|
|
@@ -396,16 +382,16 @@ class TuiDocDemo {
|
|
|
396
382
|
this.locationRef.go(this.urlStateHandler(tree));
|
|
397
383
|
}
|
|
398
384
|
createForm() {
|
|
399
|
-
const
|
|
385
|
+
const control = this.control();
|
|
400
386
|
if (control) {
|
|
401
|
-
this.testForm = new FormGroup({ testValue: control }, { updateOn });
|
|
387
|
+
this.testForm = new FormGroup({ testValue: control }, { updateOn: this.updateOn });
|
|
402
388
|
}
|
|
403
389
|
}
|
|
404
390
|
getUrlTree() {
|
|
405
391
|
return this.urlSerializer.parse(this.locationRef.path());
|
|
406
392
|
}
|
|
407
393
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocDemo, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
408
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocDemo, isStandalone: true, selector: "tui-doc-demo", inputs: { control: "control", sticky: "sticky" }, host: { listeners: { "window:resize": "onResize()", "document:mouseup.zoneless": "onMouseUp()" }, properties: { "class._sticky": "sticky" } }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "resizable", first: true, predicate: TuiResizable, descendants: true, static: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, static: true }, { propertyName: "resizer", first: true, predicate: ["resizer"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"t-settings\">\n <label class=\"t-label\">\n <input\n size=\"s\"\n tuiSwitch\n type=\"checkbox\"\n [ngModel]=\"dark()\"\n (ngModelChange)=\"onModeChange($event)\"\n />\n {{ texts[0] }}\n </label>\n <label class=\"t-label\">\n <input\n size=\"s\"\n tuiSwitch\n type=\"checkbox\"\n [ngModel]=\"opaque\"\n (ngModelChange)=\"changeOpaque($event)\"\n />\n {{ texts[1] }}\n </label>\n</div>\n<div\n tuiResizable\n class=\"t-wrapper\"\n [attr.tuiTheme]=\"theme()\"\n [class.t-wrapper_transparent]=\"!opaque\"\n [style.visibility]=\"rendered() ? 'visible' : 'hidden'\"\n>\n <div class=\"t-content\">\n <div\n #content\n id=\"demo-content\"\n >\n @if (testForm) {\n <form\n class=\"t-form\"\n [formGroup]=\"testForm\"\n >\n <div class=\"t-input-wrapper\">\n <ng-container [ngTemplateOutlet]=\"template\" />\n </div>\n <button\n automation-id=\"tui-demo-button__toggle-details\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [tuiChevron]=\"expanded\"\n (click)=\"toggleDetails()\"\n >\n {{ texts[2] }}\n </button>\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"expanded\"\n >\n <ng-template tuiItem>\n <pre class=\"t-value\">Form data: {{ testForm.value | json }}</pre>\n <div\n tuiGroup\n class=\"t-form-controls\"\n >\n <tui-textfield\n tuiChevron\n tuiTextfieldSize=\"s\"\n class=\"t-select\"\n [tuiTextfieldCleaner]=\"false\"\n >\n <input\n automation-id=\"tui-demo-select__expand-update-on\"\n tuiSelect\n [ngModel]=\"updateOn\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateOnChange($event)\"\n />\n\n <tui-data-list-wrapper\n *tuiDropdown\n new\n [items]=\"updateOnVariants\"\n />\n </tui-textfield>\n <button\n automation-id=\"tui-demo-button__reset-state\"\n size=\"s\"\n tuiButton\n type=\"reset\"\n [style.flex]=\"'0 0 auto'\"\n >\n Reset\n </button>\n <button\n automation-id=\"tui-demo-button__submit-state\"\n size=\"s\"\n tuiButton\n type=\"submit\"\n [style.flex]=\"'0 0 auto'\"\n >\n Submit\n </button>\n </div>\n </ng-template>\n </tui-expand>\n </form>\n }\n <ng-content />\n </div>\n </div>\n <div\n #resizer\n class=\"t-resizer\"\n [tuiResizer]=\"[1, 0]\"\n (tuiSizeChange)=\"updateWidth($event[0])\"\n ></div>\n</div>\n", styles: [":host{position:relative;display:block;min-inline-size:100%;margin:1.5rem 0;pointer-events:none;font:var(--tui-font-text-s)}.t-settings{position:absolute;bottom:calc(100% + .75rem);display:flex;gap:1rem;align-items:center;justify-content:flex-end;pointer-events:none;inline-size:100%}.t-settings>*{pointer-events:auto}.t-label{display:flex;align-items:center;gap:.5rem}.t-wrapper{display:flex;box-shadow:var(--tui-shadow-medium);border:1px solid var(--tui-border-normal);border-radius:var(--tui-radius-m);max-inline-size:100%;min-block-size:6rem;inline-size:100%;min-inline-size:10rem;color:var(--tui-text-primary);background-color:var(--tui-background-base);overflow:hidden;pointer-events:auto}.t-wrapper.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-background-base-alt) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-background-base-alt) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-background-base-alt) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-background-base-alt) 75%);background-size:1.25rem 1.25rem;background-position:0 0,0 .625rem,.625rem -.625rem,-.625rem 0}@media screen and (max-width: 47.9625em){.t-wrapper{min-block-size:auto}}.t-content{flex:1 1 0;min-inline-size:0;padding:1.5rem;box-sizing:border-box;overflow:hidden}@media screen and (max-width: 47.9625em){.t-content{padding:1rem}}.t-form{display:flex;flex-wrap:wrap;align-items:flex-start}.t-input-wrapper{inline-size:100%;margin-block-end:.5rem}.t-expand{inline-size:100%}.t-value{flex:1;background:var(--tui-background-neutral-1);padding:.75rem;border-radius:.25rem}.t-mode{inline-size:12.5rem}.t-select{max-inline-size:15rem}.t-resizer{position:relative;display:flex;box-shadow:var(--tui-shadow-medium);inline-size:3.5rem;min-block-size:inherit;align-items:center;justify-content:center;flex-shrink:0;border-inline-start:1px solid var(--tui-border-normal);outline:none;background:var(--tui-background-base);color:var(--tui-text-primary)}.t-resizer:before,.t-resizer:after{content:\"\";position:absolute;top:.75rem;left:50%;bottom:calc(50% + 1rem);inline-size:1px;background:var(--tui-border-normal);box-shadow:-.25rem 0 var(--tui-border-normal);transform:translateZ(0)}.t-resizer:after{bottom:.75rem;top:calc(50% + 1rem)}@media screen and (max-width: 47.9625em){.t-resizer{display:none}}.t-resizer-text{position:relative;z-index:1;font:var(--tui-font-text-s);padding:.75rem;background:var(--tui-background-base)}.wrapper_light .t-resizer-text{background:#3e464e}.t-group,.t-checkbox{display:flex;align-items:center;margin-inline-start:.75rem}.t-button,.t-form-controls{margin-block-start:.75rem}@supports (position: sticky){@media screen and (min-height: 37.5rem){:host._sticky{position:sticky;top:4.625rem;z-index:2}}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: JsonPipe, name: "json" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i2.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels]), tui-data-list-wrapper:not([labels])[new]", inputs: ["items", "disabledItemHandler", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "component", type: TuiExpand, selector: "tui-expand", inputs: ["expanded"] }, { kind: "directive", type: TuiGroup, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "collapsed", "rounded", "size"] }, { kind: "directive", type: TuiResizable, selector: "[tuiResizable]" }, { kind: "directive", type: TuiResizer, selector: "[tuiResizer]", inputs: ["tuiResizer"], outputs: ["tuiSizeChange"] }, { kind: "component", type: TuiSwitch, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: ["showIcons"] }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "directive", type: i8.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { kind: "directive", type: i8.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { kind: "directive", type: i4.TuiItem, selector: "[tuiItem]" }, { kind: "component", type: i7.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i7.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i6.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "directive", type: i6$1.TuiSelectDirective, selector: "input[tuiSelect]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
394
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocDemo, isStandalone: true, selector: "tui-doc-demo", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, sticky: { classPropertyName: "sticky", publicName: "sticky", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:resize": "onResize()", "document:mouseup.zoneless": "onMouseUp()" }, properties: { "class._sticky": "sticky()" } }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "resizable", first: true, predicate: TuiResizable, descendants: true, static: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, static: true }, { propertyName: "resizer", first: true, predicate: ["resizer"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"t-settings\">\n <label class=\"t-label\">\n <input\n size=\"s\"\n tuiSwitch\n type=\"checkbox\"\n [ngModel]=\"dark()\"\n (ngModelChange)=\"onModeChange($event)\"\n />\n {{ texts[0] }}\n </label>\n <label class=\"t-label\">\n <input\n size=\"s\"\n tuiSwitch\n type=\"checkbox\"\n [ngModel]=\"opaque\"\n (ngModelChange)=\"changeOpaque($event)\"\n />\n {{ texts[1] }}\n </label>\n</div>\n<div\n tuiResizable\n class=\"t-wrapper\"\n [attr.tuiTheme]=\"theme()\"\n [class.t-wrapper_transparent]=\"!opaque\"\n [style.visibility]=\"rendered() ? 'visible' : 'hidden'\"\n>\n <div class=\"t-content\">\n <div\n #content\n id=\"demo-content\"\n >\n @if (testForm) {\n <form\n class=\"t-form\"\n [formGroup]=\"testForm\"\n >\n <div class=\"t-input-wrapper\">\n <ng-container [ngTemplateOutlet]=\"template\" />\n </div>\n <button\n automation-id=\"tui-demo-button__toggle-details\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [tuiChevron]=\"expanded\"\n (click)=\"toggleDetails()\"\n >\n {{ texts[2] }}\n </button>\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"expanded\"\n >\n <ng-template tuiItem>\n <pre class=\"t-value\">Form data: {{ testForm.value | json }}</pre>\n <div\n tuiGroup\n class=\"t-form-controls\"\n >\n <tui-textfield\n tuiChevron\n tuiTextfieldSize=\"s\"\n class=\"t-select\"\n [tuiTextfieldCleaner]=\"false\"\n >\n <input\n automation-id=\"tui-demo-select__expand-update-on\"\n tuiSelect\n [ngModel]=\"updateOn\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateOnChange($event)\"\n />\n\n <tui-data-list-wrapper\n *tuiDropdown\n new\n [items]=\"updateOnVariants\"\n />\n </tui-textfield>\n <button\n automation-id=\"tui-demo-button__reset-state\"\n size=\"s\"\n tuiButton\n type=\"reset\"\n [style.flex]=\"'0 0 auto'\"\n >\n Reset\n </button>\n <button\n automation-id=\"tui-demo-button__submit-state\"\n size=\"s\"\n tuiButton\n type=\"submit\"\n [style.flex]=\"'0 0 auto'\"\n >\n Submit\n </button>\n </div>\n </ng-template>\n </tui-expand>\n </form>\n }\n <ng-content />\n </div>\n </div>\n <div\n #resizer\n class=\"t-resizer\"\n [tuiResizer]=\"[1, 0]\"\n (tuiSizeChange)=\"updateWidth($event[0])\"\n ></div>\n</div>\n", styles: [":host{position:relative;display:block;min-inline-size:100%;margin:1.5rem 0;pointer-events:none;font:var(--tui-font-text-s)}.t-settings{position:absolute;bottom:calc(100% + .75rem);display:flex;gap:1rem;align-items:center;justify-content:flex-end;pointer-events:none;inline-size:100%}.t-settings>*{pointer-events:auto}.t-label{display:flex;align-items:center;gap:.5rem}.t-wrapper{display:flex;box-shadow:var(--tui-shadow-medium);border:1px solid var(--tui-border-normal);border-radius:var(--tui-radius-m);max-inline-size:100%;min-block-size:6rem;inline-size:100%;min-inline-size:10rem;color:var(--tui-text-primary);background-color:var(--tui-background-base);overflow:hidden;pointer-events:auto}.t-wrapper.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-background-base-alt) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-background-base-alt) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-background-base-alt) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-background-base-alt) 75%);background-size:1.25rem 1.25rem;background-position:0 0,0 .625rem,.625rem -.625rem,-.625rem 0}@media screen and (max-width: 47.9625em){.t-wrapper{min-block-size:auto}}.t-content{flex:1 1 0;min-inline-size:0;padding:1.5rem;box-sizing:border-box;overflow:hidden}@media screen and (max-width: 47.9625em){.t-content{padding:1rem}}.t-form{display:flex;flex-wrap:wrap;align-items:flex-start}.t-input-wrapper{inline-size:100%;margin-block-end:.5rem}.t-expand{inline-size:100%}.t-value{flex:1;background:var(--tui-background-neutral-1);padding:.75rem;border-radius:.25rem}.t-mode{inline-size:12.5rem}.t-select{max-inline-size:15rem}.t-resizer{position:relative;display:flex;box-shadow:var(--tui-shadow-medium);inline-size:3.5rem;min-block-size:inherit;align-items:center;justify-content:center;flex-shrink:0;border-inline-start:1px solid var(--tui-border-normal);outline:none;background:var(--tui-background-base);color:var(--tui-text-primary)}.t-resizer:before,.t-resizer:after{content:\"\";position:absolute;top:.75rem;left:50%;bottom:calc(50% + 1rem);inline-size:1px;background:var(--tui-border-normal);box-shadow:-.25rem 0 var(--tui-border-normal);transform:translateZ(0)}.t-resizer:after{bottom:.75rem;top:calc(50% + 1rem)}@media screen and (max-width: 47.9625em){.t-resizer{display:none}}.t-resizer-text{position:relative;z-index:1;font:var(--tui-font-text-s);padding:.75rem;background:var(--tui-background-base)}.wrapper_light .t-resizer-text{background:#3e464e}.t-group,.t-checkbox{display:flex;align-items:center;margin-inline-start:.75rem}.t-button,.t-form-controls{margin-block-start:.75rem}@supports (position: sticky){@media screen and (min-height: 37.5rem){:host._sticky{position:sticky;top:4.625rem;z-index:2}}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: JsonPipe, name: "json" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i2.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels]), tui-data-list-wrapper:not([labels])[new]", inputs: ["items", "disabledItemHandler", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "component", type: TuiExpand, selector: "tui-expand", inputs: ["expanded"] }, { kind: "directive", type: TuiGroup, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "collapsed", "rounded", "size"] }, { kind: "directive", type: TuiItem, selector: "[tuiItem]" }, { kind: "directive", type: TuiResizable, selector: "[tuiResizable]" }, { kind: "directive", type: TuiResizer, selector: "[tuiResizer]", inputs: ["tuiResizer"], outputs: ["tuiSizeChange"] }, { kind: "directive", type: i3$1.TuiSelectDirective, selector: "input[tuiSelect]" }, { kind: "component", type: TuiSwitch, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: ["showIcons"] }, { kind: "component", type: i5.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i5.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i6.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "directive", type: i9.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { kind: "directive", type: i9.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
409
395
|
}
|
|
410
396
|
__decorate([
|
|
411
397
|
tuiPure
|
|
@@ -422,15 +408,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
422
408
|
TuiDataListWrapper,
|
|
423
409
|
TuiExpand,
|
|
424
410
|
TuiGroup,
|
|
411
|
+
TuiItem,
|
|
425
412
|
TuiResizable,
|
|
426
413
|
TuiResizer,
|
|
414
|
+
TuiSelect,
|
|
427
415
|
TuiSwitch,
|
|
428
|
-
TuiTextfieldControllerModule,
|
|
429
416
|
TuiTextfield,
|
|
430
|
-
|
|
431
|
-
TuiItem,
|
|
417
|
+
TuiTextfieldControllerModule,
|
|
432
418
|
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
433
|
-
'[class._sticky]': 'sticky',
|
|
419
|
+
'[class._sticky]': 'sticky()',
|
|
434
420
|
'(window:resize)': 'onResize()',
|
|
435
421
|
'(document:mouseup.zoneless)': 'onMouseUp()',
|
|
436
422
|
}, template: "<div class=\"t-settings\">\n <label class=\"t-label\">\n <input\n size=\"s\"\n tuiSwitch\n type=\"checkbox\"\n [ngModel]=\"dark()\"\n (ngModelChange)=\"onModeChange($event)\"\n />\n {{ texts[0] }}\n </label>\n <label class=\"t-label\">\n <input\n size=\"s\"\n tuiSwitch\n type=\"checkbox\"\n [ngModel]=\"opaque\"\n (ngModelChange)=\"changeOpaque($event)\"\n />\n {{ texts[1] }}\n </label>\n</div>\n<div\n tuiResizable\n class=\"t-wrapper\"\n [attr.tuiTheme]=\"theme()\"\n [class.t-wrapper_transparent]=\"!opaque\"\n [style.visibility]=\"rendered() ? 'visible' : 'hidden'\"\n>\n <div class=\"t-content\">\n <div\n #content\n id=\"demo-content\"\n >\n @if (testForm) {\n <form\n class=\"t-form\"\n [formGroup]=\"testForm\"\n >\n <div class=\"t-input-wrapper\">\n <ng-container [ngTemplateOutlet]=\"template\" />\n </div>\n <button\n automation-id=\"tui-demo-button__toggle-details\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [tuiChevron]=\"expanded\"\n (click)=\"toggleDetails()\"\n >\n {{ texts[2] }}\n </button>\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"expanded\"\n >\n <ng-template tuiItem>\n <pre class=\"t-value\">Form data: {{ testForm.value | json }}</pre>\n <div\n tuiGroup\n class=\"t-form-controls\"\n >\n <tui-textfield\n tuiChevron\n tuiTextfieldSize=\"s\"\n class=\"t-select\"\n [tuiTextfieldCleaner]=\"false\"\n >\n <input\n automation-id=\"tui-demo-select__expand-update-on\"\n tuiSelect\n [ngModel]=\"updateOn\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateOnChange($event)\"\n />\n\n <tui-data-list-wrapper\n *tuiDropdown\n new\n [items]=\"updateOnVariants\"\n />\n </tui-textfield>\n <button\n automation-id=\"tui-demo-button__reset-state\"\n size=\"s\"\n tuiButton\n type=\"reset\"\n [style.flex]=\"'0 0 auto'\"\n >\n Reset\n </button>\n <button\n automation-id=\"tui-demo-button__submit-state\"\n size=\"s\"\n tuiButton\n type=\"submit\"\n [style.flex]=\"'0 0 auto'\"\n >\n Submit\n </button>\n </div>\n </ng-template>\n </tui-expand>\n </form>\n }\n <ng-content />\n </div>\n </div>\n <div\n #resizer\n class=\"t-resizer\"\n [tuiResizer]=\"[1, 0]\"\n (tuiSizeChange)=\"updateWidth($event[0])\"\n ></div>\n</div>\n", styles: [":host{position:relative;display:block;min-inline-size:100%;margin:1.5rem 0;pointer-events:none;font:var(--tui-font-text-s)}.t-settings{position:absolute;bottom:calc(100% + .75rem);display:flex;gap:1rem;align-items:center;justify-content:flex-end;pointer-events:none;inline-size:100%}.t-settings>*{pointer-events:auto}.t-label{display:flex;align-items:center;gap:.5rem}.t-wrapper{display:flex;box-shadow:var(--tui-shadow-medium);border:1px solid var(--tui-border-normal);border-radius:var(--tui-radius-m);max-inline-size:100%;min-block-size:6rem;inline-size:100%;min-inline-size:10rem;color:var(--tui-text-primary);background-color:var(--tui-background-base);overflow:hidden;pointer-events:auto}.t-wrapper.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-background-base-alt) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-background-base-alt) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-background-base-alt) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-background-base-alt) 75%);background-size:1.25rem 1.25rem;background-position:0 0,0 .625rem,.625rem -.625rem,-.625rem 0}@media screen and (max-width: 47.9625em){.t-wrapper{min-block-size:auto}}.t-content{flex:1 1 0;min-inline-size:0;padding:1.5rem;box-sizing:border-box;overflow:hidden}@media screen and (max-width: 47.9625em){.t-content{padding:1rem}}.t-form{display:flex;flex-wrap:wrap;align-items:flex-start}.t-input-wrapper{inline-size:100%;margin-block-end:.5rem}.t-expand{inline-size:100%}.t-value{flex:1;background:var(--tui-background-neutral-1);padding:.75rem;border-radius:.25rem}.t-mode{inline-size:12.5rem}.t-select{max-inline-size:15rem}.t-resizer{position:relative;display:flex;box-shadow:var(--tui-shadow-medium);inline-size:3.5rem;min-block-size:inherit;align-items:center;justify-content:center;flex-shrink:0;border-inline-start:1px solid var(--tui-border-normal);outline:none;background:var(--tui-background-base);color:var(--tui-text-primary)}.t-resizer:before,.t-resizer:after{content:\"\";position:absolute;top:.75rem;left:50%;bottom:calc(50% + 1rem);inline-size:1px;background:var(--tui-border-normal);box-shadow:-.25rem 0 var(--tui-border-normal);transform:translateZ(0)}.t-resizer:after{bottom:.75rem;top:calc(50% + 1rem)}@media screen and (max-width: 47.9625em){.t-resizer{display:none}}.t-resizer-text{position:relative;z-index:1;font:var(--tui-font-text-s);padding:.75rem;background:var(--tui-background-base)}.wrapper_light .t-resizer-text{background:#3e464e}.t-group,.t-checkbox{display:flex;align-items:center;margin-inline-start:.75rem}.t-button,.t-form-controls{margin-block-start:.75rem}@supports (position: sticky){@media screen and (min-height: 37.5rem){:host._sticky{position:sticky;top:4.625rem;z-index:2}}}\n"] }]
|
|
@@ -446,25 +432,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
446
432
|
}], template: [{
|
|
447
433
|
type: ContentChild,
|
|
448
434
|
args: [TemplateRef]
|
|
449
|
-
}], control: [{
|
|
450
|
-
type: Input
|
|
451
|
-
}], sticky: [{
|
|
452
|
-
type: Input
|
|
453
435
|
}], updateUrl: [] } });
|
|
454
436
|
|
|
455
437
|
class TuiDocTab {
|
|
456
438
|
constructor() {
|
|
457
|
-
this.src = '';
|
|
439
|
+
this.src = input('');
|
|
458
440
|
}
|
|
459
441
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocTab, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
460
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
442
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: TuiDocTab, isStandalone: true, selector: "tui-doc-tab", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"t-tab\">\n <img\n alt=\"Documentation tab icon\"\n class=\"t-icon\"\n [src]=\"src()\"\n />\n <ng-content />\n</div>\n", styles: [".t-tab{display:flex;align-items:center;justify-content:center;padding:0 .5rem;gap:.5rem;color:var(--tui-text-primary)}.t-tab .t-icon{inline-size:1rem;block-size:1rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
461
443
|
}
|
|
462
444
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocTab, decorators: [{
|
|
463
445
|
type: Component,
|
|
464
|
-
args: [{
|
|
465
|
-
}]
|
|
466
|
-
type: Input
|
|
467
|
-
}] } });
|
|
446
|
+
args: [{ selector: 'tui-doc-tab', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"t-tab\">\n <img\n alt=\"Documentation tab icon\"\n class=\"t-icon\"\n [src]=\"src()\"\n />\n <ng-content />\n</div>\n", styles: [".t-tab{display:flex;align-items:center;justify-content:center;padding:0 .5rem;gap:.5rem;color:var(--tui-text-primary)}.t-tab .t-icon{inline-size:1rem;block-size:1rem}\n"] }]
|
|
447
|
+
}] });
|
|
468
448
|
|
|
469
449
|
const SERIALIZED_SUFFIX = '$';
|
|
470
450
|
// @bad TODO: refactor output and value sync
|
|
@@ -474,34 +454,34 @@ class TuiDocDocumentationPropertyConnector {
|
|
|
474
454
|
this.activatedRoute = inject(ActivatedRoute);
|
|
475
455
|
this.urlSerializer = inject(UrlSerializer);
|
|
476
456
|
this.urlStateHandler = inject(TUI_DOC_URL_STATE_HANDLER);
|
|
477
|
-
this.alerts = inject(
|
|
478
|
-
this.documentationPropertyName = '';
|
|
479
|
-
this.documentationPropertyMode = null;
|
|
480
|
-
this.documentationPropertyType = '';
|
|
481
|
-
this.
|
|
482
|
-
this.
|
|
483
|
-
this.
|
|
457
|
+
this.alerts = inject(TuiNotificationService);
|
|
458
|
+
this.documentationPropertyName = input('');
|
|
459
|
+
this.documentationPropertyMode = input(null);
|
|
460
|
+
this.documentationPropertyType = input('');
|
|
461
|
+
this.documentationPropertyValue = model();
|
|
462
|
+
this.documentationPropertyDeprecated = input(false);
|
|
463
|
+
this.documentationPropertyValues = input(null);
|
|
484
464
|
this.changed$ = new Subject();
|
|
485
465
|
this.emits = signal(1);
|
|
486
466
|
this.template = inject(TemplateRef);
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
}
|
|
467
|
+
this.attrName = computed(() => {
|
|
468
|
+
switch (this.documentationPropertyMode()) {
|
|
469
|
+
case 'input':
|
|
470
|
+
return `[${this.documentationPropertyName()}]`;
|
|
471
|
+
case 'input-output':
|
|
472
|
+
return `[(${this.documentationPropertyName()})]`;
|
|
473
|
+
case 'output':
|
|
474
|
+
return `(${this.documentationPropertyName()})`;
|
|
475
|
+
default:
|
|
476
|
+
return this.documentationPropertyName();
|
|
477
|
+
}
|
|
478
|
+
});
|
|
499
479
|
}
|
|
500
480
|
get shouldShowValues() {
|
|
501
|
-
return this.documentationPropertyMode !== 'output';
|
|
481
|
+
return this.documentationPropertyMode() !== 'output';
|
|
502
482
|
}
|
|
503
483
|
get hasItems() {
|
|
504
|
-
return !!this.documentationPropertyValues;
|
|
484
|
+
return !!this.documentationPropertyValues();
|
|
505
485
|
}
|
|
506
486
|
ngOnInit() {
|
|
507
487
|
this.parseParams(this.activatedRoute.snapshot.queryParams);
|
|
@@ -510,30 +490,30 @@ class TuiDocDocumentationPropertyConnector {
|
|
|
510
490
|
this.changed$.next();
|
|
511
491
|
}
|
|
512
492
|
onValueChange(value) {
|
|
513
|
-
this.documentationPropertyValue
|
|
514
|
-
this.documentationPropertyValueChange.emit(value);
|
|
493
|
+
this.documentationPropertyValue.set(value);
|
|
515
494
|
this.setQueryParam(value);
|
|
516
495
|
}
|
|
517
496
|
emitEvent(event) {
|
|
518
497
|
// For more convenient debugging
|
|
519
|
-
console.info(this.attrName, event);
|
|
498
|
+
console.info(this.attrName(), event);
|
|
520
499
|
this.emits.update((x) => ++x);
|
|
521
500
|
let content;
|
|
522
501
|
if (event !== undefined) {
|
|
523
502
|
content = tuiInspectAny(event, 2);
|
|
524
503
|
}
|
|
525
|
-
this.alerts.open(content, { label: this.attrName }).subscribe();
|
|
504
|
+
this.alerts.open(content, { label: this.attrName() }).subscribe();
|
|
526
505
|
}
|
|
527
506
|
parseParams(params) {
|
|
528
|
-
const propertyValue = params[this.documentationPropertyName];
|
|
529
|
-
const propertyValueWithSuffix = params[`${this.documentationPropertyName}${SERIALIZED_SUFFIX}`];
|
|
507
|
+
const propertyValue = params[this.documentationPropertyName()];
|
|
508
|
+
const propertyValueWithSuffix = params[`${this.documentationPropertyName()}${SERIALIZED_SUFFIX}`];
|
|
530
509
|
if (!propertyValue && !propertyValueWithSuffix) {
|
|
531
510
|
return;
|
|
532
511
|
}
|
|
533
|
-
|
|
534
|
-
|
|
512
|
+
const documentationPropertyValues = this.documentationPropertyValues();
|
|
513
|
+
let value = !!propertyValueWithSuffix && documentationPropertyValues
|
|
514
|
+
? documentationPropertyValues[propertyValueWithSuffix]
|
|
535
515
|
: tuiCoerceValue(propertyValue);
|
|
536
|
-
if (this.documentationPropertyType === 'string' && tuiIsNumber(value)) {
|
|
516
|
+
if (this.documentationPropertyType() === 'string' && tuiIsNumber(value)) {
|
|
537
517
|
value = value.toString();
|
|
538
518
|
}
|
|
539
519
|
this.onValueChange(value);
|
|
@@ -541,10 +521,11 @@ class TuiDocDocumentationPropertyConnector {
|
|
|
541
521
|
setQueryParam(value) {
|
|
542
522
|
const tree = this.urlSerializer.parse(this.locationRef.path());
|
|
543
523
|
const isValueAvailableByKey = value instanceof Object;
|
|
544
|
-
const name = this.documentationPropertyName;
|
|
524
|
+
const name = this.documentationPropertyName();
|
|
545
525
|
const nameWithSuffix = `${name}${SERIALIZED_SUFFIX}`;
|
|
546
|
-
const
|
|
547
|
-
|
|
526
|
+
const documentationPropertyValues = this.documentationPropertyValues();
|
|
527
|
+
const computedValue = isValueAvailableByKey && documentationPropertyValues
|
|
528
|
+
? documentationPropertyValues.indexOf(value)
|
|
548
529
|
: value;
|
|
549
530
|
tree.queryParams = tuiCleanObject({
|
|
550
531
|
...tree.queryParams,
|
|
@@ -565,30 +546,15 @@ class TuiDocDocumentationPropertyConnector {
|
|
|
565
546
|
this.locationRef.go(this.urlStateHandler(tree));
|
|
566
547
|
}
|
|
567
548
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocDocumentationPropertyConnector, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
568
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
549
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiDocDocumentationPropertyConnector, isStandalone: true, selector: "ng-template[documentationPropertyName]", inputs: { documentationPropertyName: { classPropertyName: "documentationPropertyName", publicName: "documentationPropertyName", isSignal: true, isRequired: false, transformFunction: null }, documentationPropertyMode: { classPropertyName: "documentationPropertyMode", publicName: "documentationPropertyMode", isSignal: true, isRequired: false, transformFunction: null }, documentationPropertyType: { classPropertyName: "documentationPropertyType", publicName: "documentationPropertyType", isSignal: true, isRequired: false, transformFunction: null }, documentationPropertyValue: { classPropertyName: "documentationPropertyValue", publicName: "documentationPropertyValue", isSignal: true, isRequired: false, transformFunction: null }, documentationPropertyDeprecated: { classPropertyName: "documentationPropertyDeprecated", publicName: "documentationPropertyDeprecated", isSignal: true, isRequired: false, transformFunction: null }, documentationPropertyValues: { classPropertyName: "documentationPropertyValues", publicName: "documentationPropertyValues", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { documentationPropertyValue: "documentationPropertyValueChange" }, exportAs: ["documentationProperty"], usesOnChanges: true, ngImport: i0 }); }
|
|
569
550
|
}
|
|
570
551
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocDocumentationPropertyConnector, decorators: [{
|
|
571
552
|
type: Directive,
|
|
572
553
|
args: [{
|
|
573
|
-
standalone: true,
|
|
574
554
|
selector: 'ng-template[documentationPropertyName]',
|
|
575
555
|
exportAs: 'documentationProperty',
|
|
576
556
|
}]
|
|
577
|
-
}]
|
|
578
|
-
type: Input
|
|
579
|
-
}], documentationPropertyMode: [{
|
|
580
|
-
type: Input
|
|
581
|
-
}], documentationPropertyType: [{
|
|
582
|
-
type: Input
|
|
583
|
-
}], documentationPropertyValue: [{
|
|
584
|
-
type: Input
|
|
585
|
-
}], documentationPropertyDeprecated: [{
|
|
586
|
-
type: Input
|
|
587
|
-
}], documentationPropertyValues: [{
|
|
588
|
-
type: Input
|
|
589
|
-
}], documentationPropertyValueChange: [{
|
|
590
|
-
type: Output
|
|
591
|
-
}] } });
|
|
557
|
+
}] });
|
|
592
558
|
|
|
593
559
|
class TuiShowCleanerPipe {
|
|
594
560
|
transform(type) {
|
|
@@ -600,7 +566,6 @@ class TuiShowCleanerPipe {
|
|
|
600
566
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiShowCleanerPipe, decorators: [{
|
|
601
567
|
type: Pipe,
|
|
602
568
|
args: [{
|
|
603
|
-
standalone: true,
|
|
604
569
|
name: 'tuiShowCleanerPipe',
|
|
605
570
|
}]
|
|
606
571
|
}] });
|
|
@@ -615,7 +580,6 @@ class TuiIsOptionalPipe {
|
|
|
615
580
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIsOptionalPipe, decorators: [{
|
|
616
581
|
type: Pipe,
|
|
617
582
|
args: [{
|
|
618
|
-
standalone: true,
|
|
619
583
|
name: 'tuiIsOptionalPipe',
|
|
620
584
|
}]
|
|
621
585
|
}] });
|
|
@@ -630,7 +594,6 @@ class TuiStripOptionalPipe {
|
|
|
630
594
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiStripOptionalPipe, decorators: [{
|
|
631
595
|
type: Pipe,
|
|
632
596
|
args: [{
|
|
633
|
-
standalone: true,
|
|
634
597
|
name: 'tuiStripOptionalPipe',
|
|
635
598
|
}]
|
|
636
599
|
}] });
|
|
@@ -645,21 +608,19 @@ class TuiDocDocumentation {
|
|
|
645
608
|
this.texts = inject(TUI_DOC_DOCUMENTATION_TEXTS);
|
|
646
609
|
this.excludedProperties = inject(TUI_DOC_EXCLUDED_PROPERTIES);
|
|
647
610
|
this.activeItemIndex = 0;
|
|
648
|
-
this.
|
|
649
|
-
this.
|
|
650
|
-
this.
|
|
651
|
-
this.
|
|
611
|
+
this.type = computed(([argument, type] = this.texts) => this.isAPI() ? argument : type);
|
|
612
|
+
this.heading = input('');
|
|
613
|
+
this.showValues = input(true);
|
|
614
|
+
this.isAPI = input(false);
|
|
615
|
+
this.matcher = (item, exclusions) => !exclusions.has(item.documentationPropertyName());
|
|
652
616
|
}
|
|
653
617
|
ngAfterContentInit() {
|
|
654
618
|
tuiQueryListChanges(this.propertiesConnectors)
|
|
655
619
|
.pipe(switchMap((items) => merge(...items.map(({ changed$ }) => changed$))), tuiWatch(this.cdr), takeUntilDestroyed(this.destroyRef))
|
|
656
620
|
.subscribe();
|
|
657
621
|
}
|
|
658
|
-
get type() {
|
|
659
|
-
return this.isAPI ? this.texts[0] : this.texts[1];
|
|
660
|
-
}
|
|
661
622
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocDocumentation, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
662
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocDocumentation, isStandalone: true, selector: "tui-doc-documentation", inputs: { heading: "heading", showValues: "showValues", isAPI: "isAPI" }, providers: [tuiScrollbarOptionsProvider({ mode: 'hover' })], queries: [{ propertyName: "propertiesConnectors", predicate: TuiDocDocumentationPropertyConnector }], ngImport: i0, template: "@if (heading) {\n <h1 class=\"t-heading\">\n {{ heading }}\n </h1>\n}\n<ng-content />\n@if (propertiesConnectors | tuiToArray | tuiFilter: matcher : excludedProperties; as properties) {\n @if (properties.length) {\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 @if (showValues && !isAPI) {\n <th class=\"t-th t-cell t-th_value\">\n {{ texts[3] }}\n </th>\n }\n </tr>\n @for (propertyConnector of properties; track propertyConnector) {\n <tr\n class=\"t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated\"\n >\n <td class=\"t-cell t-no-overflow\">\n <div\n automation-id=\"tui-documentation__property-name\"\n class=\"t-property t-additional-info\"\n >\n @if (propertyConnector.attrName) {\n <code\n class=\"t-property-code\"\n [style.color]=\"'var(--tui-background-accent-2-pressed)'\"\n >\n {{ propertyConnector.attrName | tuiStripOptionalPipe }}\n </code>\n }\n @if (propertyConnector.attrName | tuiIsOptionalPipe) {\n <tui-badge\n appearance=\"neutral\"\n size=\"s\"\n >\n Optional\n </tui-badge>\n }\n @if (propertyConnector.documentationPropertyDeprecated) {\n <tui-badge\n appearance=\"negative\"\n size=\"s\"\n >\n Deprecated\n </tui-badge>\n }\n </div>\n <ng-container [ngTemplateOutlet]=\"propertyConnector.template\" />\n </td>\n <td class=\"t-cell t-no-overflow\">\n <span class=\"type\">\n <code class=\"t-code-type\">\n @for (\n item of propertyConnector.documentationPropertyType | tuiDocTypeReference;\n track item;\n let last = $last\n ) {\n @if (item.reference) {\n <a\n target=\"_blank\"\n class=\"t-code-reference\"\n [attr.href]=\"item.reference\"\n >\n {{ item.type }}\n </a>\n } @else {\n {{ item.type }}\n }\n @if (!last) {\n <span> | </span>\n }\n }\n </code>\n </span>\n </td>\n @if (showValues) {\n <td class=\"t-cell t-cell_value\">\n @if (propertyConnector.shouldShowValues) {\n @if (propertyConnector.hasItems) {\n <tui-select\n tuiDropdownLimitWidth=\"min\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [tuiTextfieldCleaner]=\"\n propertyConnector.documentationPropertyType | tuiShowCleanerPipe\n \"\n [tuiTextfieldLabelOutside]=\"true\"\n [valueContent]=\"selectContent\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n >\n <code class=\"t-exception\">null</code>\n <tui-data-list-wrapper\n *tuiDataList\n class=\"t-data-list\"\n [itemContent]=\"selectContent\"\n [items]=\"propertyConnector.documentationPropertyValues\"\n />\n </tui-select>\n } @else {\n @switch (propertyConnector.documentationPropertyType) {\n @case ('boolean') {\n <input\n tuiSwitch\n type=\"checkbox\"\n class=\"t-switch\"\n [id]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [showIcons]=\"true\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n />\n }\n @case ('string') {\n <tui-textfield tuiTextfieldSize=\"m\">\n <input\n tuiTextfield\n [id]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue || ''\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n />\n </tui-textfield>\n }\n @case ('number') {\n <tui-textfield tuiTextfieldSize=\"m\">\n <input\n tuiInputNumber\n [id]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [step]=\"1\"\n (ngModelChange)=\"propertyConnector.onValueChange($event || 0)\"\n />\n </tui-textfield>\n }\n }\n }\n <ng-template\n #selectContent\n let-data\n >\n <code>{{ data | tuiInspectAny }}</code>\n </ng-template>\n } @else {\n <tui-notification\n class=\"t-output\"\n [@emitEvent]=\"propertyConnector.emits()\"\n >\n Emit!\n </tui-notification>\n }\n </td>\n }\n </tr>\n }\n </table>\n }\n}\n", styles: [":host{display:block;min-inline-size:100%}.t-table{inline-size:100%;table-layout:fixed}.t-row:not(:last-child){border-block-end:1px solid var(--tui-border-normal)}@media screen and (max-width: 47.9625em){.t-row{display:flex;flex-wrap:wrap}.t-row_header{display:none}}.t-cell{padding:1rem 1rem .875rem}.t-cell:first-child{padding-inline-start:0}.t-cell:last-child{padding-inline-end:0}.t-cell_prop{inline-size:40%}.t-cell_value{text-align:end}@media screen and (max-width: 47.9625em){.t-cell{inline-size:100%;block-size:auto;padding:.5rem 0;text-align:start}}.t-th{padding:.5rem 1rem;color:var(--tui-text-secondary);font-weight:400;text-align:start}.t-th_value{max-inline-size:20rem;text-align:end}@media screen and (max-width: 47.9625em){.t-th_value{inline-size:9.375rem}}.t-property{font:var(--tui-font-text-m);margin-block-end:.25rem;font-family:monospace;color:#8f75d1}@media screen and (max-width: 47.9625em){.t-property{padding:.5rem 0}}.t-type{font-family:monospace}.t-deprecated .t-property-code{text-decoration:line-through}.t-deprecated-label{margin-inline-end:.125rem;color:var(--tui-text-negative);font-size:.75rem}.t-additional-info{display:flex;gap:.3125rem;align-items:center}.t-exception{display:block;inline-size:max-content}.t-output{text-align:start;opacity:0}.t-heading{font:var(--tui-font-heading-4)}.t-code-type{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start}.t-code-reference{display:inline-flex;color:var(--tui-text-action);text-decoration:none;align-items:center;justify-content:center;gap:.1875rem}.t-code-reference:after{content:\"\";font-size:1rem;inline-size:1rem;block-size:1rem;background:currentColor;mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1rem\" height=\"1rem\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"></path><polyline points=\"15 3 21 3 21 9\"></polyline><line x1=\"10\" y1=\"14\" x2=\"21\" y2=\"3\"></line></svg>') center / 100%}.t-switch{display:block}@media not screen and (max-width: 47.9625em){.t-switch{margin-inline-start:auto}}.t-data-list{overflow-wrap:anywhere}@media not screen and (max-width: 47.9625em){.t-data-list{max-inline-size:22.5rem}}.t-no-overflow{overflow:hidden!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TuiBadge, selector: "tui-badge,[tuiBadge],tui-icon[tuiBadge]", inputs: ["size"] }, { kind: "component", type: i2.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels]), tui-data-list-wrapper:not([labels])[new]", inputs: ["items", "disabledItemHandler", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "directive", type: i3$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "pipe", type: TuiDocTypeReferencePipe, name: "tuiDocTypeReference" }, { kind: "directive", type: i6.TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownAppearance], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: ["tuiDropdownAlign", "tuiDropdownAppearance", "tuiDropdownDirection", "tuiDropdownLimitWidth", "tuiDropdownMinHeight", "tuiDropdownMaxHeight", "tuiDropdownOffset"] }, { kind: "pipe", type: TuiFilterPipe, name: "tuiFilter" }, { kind: "directive", type: i3.TuiInputNumberDirective, selector: "input[tuiInputNumber]", inputs: ["min", "max", "prefix", "postfix"] }, { kind: "component", type: i3.TuiInputNumberStep, selector: "input[tuiInputNumber][step]", inputs: ["step"] }, { kind: "pipe", type: TuiInspectPipe, name: "tuiInspectAny" }, { kind: "pipe", type: TuiIsOptionalPipe, name: "tuiIsOptionalPipe" }, { kind: "directive", type: TuiNotification, selector: "tui-notification,a[tuiNotification],button[tuiNotification]", inputs: ["appearance", "icon", "size"] }, { kind: "ngmodule", type: TuiSelectModule }, { kind: "component", type: i6$2.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i6$2.TuiSelectDirective, selector: "tui-select" }, { kind: "pipe", type: TuiShowCleanerPipe, name: "tuiShowCleanerPipe" }, { kind: "pipe", type: TuiStripOptionalPipe, name: "tuiStripOptionalPipe" }, { kind: "component", type: TuiSwitch, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: ["showIcons"] }, { kind: "component", type: i7.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i7.TuiTextfieldDirective, selector: "input[tuiTextfield]" }, { kind: "directive", type: i7.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "directive", type: i8.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { kind: "directive", type: i8.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { kind: "directive", type: i8.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { kind: "pipe", type: TuiToArrayPipe, name: "tuiToArray" }], animations: [
|
|
623
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocDocumentation, isStandalone: true, selector: "tui-doc-documentation", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, showValues: { classPropertyName: "showValues", publicName: "showValues", isSignal: true, isRequired: false, transformFunction: null }, isAPI: { classPropertyName: "isAPI", publicName: "isAPI", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiScrollbarOptionsProvider({ mode: 'hover' })], queries: [{ propertyName: "propertiesConnectors", predicate: TuiDocDocumentationPropertyConnector }], ngImport: i0, template: "@if (heading()) {\n <h1 class=\"t-heading\">\n {{ heading() }}\n </h1>\n}\n<ng-content />\n@if (propertiesConnectors | tuiToArray | tuiFilter: matcher : excludedProperties; as properties) {\n @if (properties.length) {\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 @if (showValues() && !isAPI()) {\n <th class=\"t-th t-cell t-th_value\">\n {{ texts[3] }}\n </th>\n }\n </tr>\n @for (propertyConnector of properties; track propertyConnector) {\n <tr\n class=\"t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated()\"\n >\n <td class=\"t-cell t-no-overflow\">\n <div\n automation-id=\"tui-documentation__property-name\"\n class=\"t-property t-additional-info\"\n >\n @if (propertyConnector.attrName()) {\n <code\n class=\"t-property-code\"\n [style.color]=\"'var(--tui-background-accent-2-pressed)'\"\n >\n {{ propertyConnector.attrName() | tuiStripOptionalPipe }}\n </code>\n }\n @if (propertyConnector.attrName() | tuiIsOptionalPipe) {\n <tui-badge\n appearance=\"neutral\"\n size=\"s\"\n >\n Optional\n </tui-badge>\n }\n @if (propertyConnector.documentationPropertyDeprecated()) {\n <tui-badge\n appearance=\"negative\"\n size=\"s\"\n >\n Deprecated\n </tui-badge>\n }\n </div>\n <ng-container [ngTemplateOutlet]=\"propertyConnector.template\" />\n </td>\n <td class=\"t-cell t-no-overflow\">\n <span class=\"type\">\n <code class=\"t-code-type\">\n @for (\n item of propertyConnector.documentationPropertyType() | tuiDocTypeReference;\n track item;\n let last = $last\n ) {\n @if (item.reference) {\n <a\n target=\"_blank\"\n class=\"t-code-reference\"\n [attr.href]=\"item.reference\"\n >\n {{ item.type }}\n </a>\n } @else {\n {{ item.type }}\n }\n @if (!last) {\n <span> | </span>\n }\n }\n </code>\n </span>\n </td>\n @if (showValues()) {\n <td class=\"t-cell t-cell_value\">\n @if (propertyConnector.shouldShowValues) {\n @if (propertyConnector.hasItems) {\n <tui-select\n tuiDropdownLimitWidth=\"min\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName()\"\n [ngModel]=\"propertyConnector.documentationPropertyValue()\"\n [tuiTextfieldCleaner]=\"\n propertyConnector.documentationPropertyType() | tuiShowCleanerPipe\n \"\n [tuiTextfieldLabelOutside]=\"true\"\n [valueContent]=\"selectContent\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n >\n <code class=\"t-exception\">null</code>\n <tui-data-list-wrapper\n *tuiDataList\n class=\"t-data-list\"\n [itemContent]=\"selectContent\"\n [items]=\"propertyConnector.documentationPropertyValues()\"\n />\n </tui-select>\n } @else {\n @switch (propertyConnector.documentationPropertyType()) {\n @case ('boolean') {\n <input\n tuiSwitch\n type=\"checkbox\"\n class=\"t-switch\"\n [id]=\"propertyConnector.attrName()\"\n [ngModel]=\"propertyConnector.documentationPropertyValue()\"\n [showIcons]=\"true\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n />\n }\n @case ('string') {\n <tui-textfield tuiTextfieldSize=\"m\">\n <input\n tuiTextfield\n [id]=\"propertyConnector.attrName()\"\n [ngModel]=\"propertyConnector.documentationPropertyValue() || ''\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n />\n </tui-textfield>\n }\n @case ('number') {\n <tui-textfield tuiTextfieldSize=\"m\">\n <input\n tuiInputNumber\n [id]=\"propertyConnector.attrName()\"\n [ngModel]=\"propertyConnector.documentationPropertyValue()\"\n [step]=\"1\"\n (ngModelChange)=\"propertyConnector.onValueChange($event || 0)\"\n />\n </tui-textfield>\n }\n }\n }\n <ng-template\n #selectContent\n let-data\n >\n <code>{{ data | tuiInspectAny }}</code>\n </ng-template>\n } @else {\n <tui-notification\n class=\"t-output\"\n [@emitEvent]=\"propertyConnector.emits()\"\n >\n Emit!\n </tui-notification>\n }\n </td>\n }\n </tr>\n }\n </table>\n }\n}\n", styles: [":host{display:block;min-inline-size:100%}.t-table{inline-size:100%;table-layout:fixed}.t-row:not(:last-child){border-block-end:1px solid var(--tui-border-normal)}@media screen and (max-width: 47.9625em){.t-row{display:flex;flex-wrap:wrap}.t-row_header{display:none}}.t-cell{padding:1rem 1rem .875rem}.t-cell:first-child{padding-inline-start:0}.t-cell:last-child{padding-inline-end:0}.t-cell_prop{inline-size:40%}.t-cell_value{text-align:end}@media screen and (max-width: 47.9625em){.t-cell{inline-size:100%;block-size:auto;padding:.5rem 0;text-align:start}}.t-th{padding:.5rem 1rem;color:var(--tui-text-secondary);font-weight:400;text-align:start}.t-th_value{max-inline-size:20rem;text-align:end}@media screen and (max-width: 47.9625em){.t-th_value{inline-size:9.375rem}}.t-property{font:var(--tui-font-text-m);margin-block-end:.25rem;font-family:monospace;color:#8f75d1}@media screen and (max-width: 47.9625em){.t-property{padding:.5rem 0}}.t-type{font-family:monospace}.t-deprecated .t-property-code{text-decoration:line-through}.t-deprecated-label{margin-inline-end:.125rem;color:var(--tui-text-negative);font-size:.75rem}.t-additional-info{display:flex;gap:.3125rem;align-items:center}.t-exception{display:block;inline-size:max-content}.t-output{text-align:start;opacity:0}.t-heading{font:var(--tui-font-heading-4)}.t-code-type{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start}.t-code-reference{display:inline-flex;color:var(--tui-text-action);text-decoration:none;align-items:center;justify-content:center;gap:.1875rem}.t-code-reference:after{content:\"\";font-size:1rem;inline-size:1rem;block-size:1rem;background:currentColor;mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1rem\" height=\"1rem\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"></path><polyline points=\"15 3 21 3 21 9\"></polyline><line x1=\"10\" y1=\"14\" x2=\"21\" y2=\"3\"></line></svg>') center / 100%}.t-switch{display:block}@media not screen and (max-width: 47.9625em){.t-switch{margin-inline-start:auto}}.t-data-list{overflow-wrap:anywhere}@media not screen and (max-width: 47.9625em){.t-data-list{max-inline-size:22.5rem}}.t-no-overflow{overflow:hidden!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TuiBadge, selector: "tui-badge,[tuiBadge],tui-icon[tuiBadge]", inputs: ["size"] }, { kind: "component", type: i2.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels]), tui-data-list-wrapper:not([labels])[new]", inputs: ["items", "disabledItemHandler", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "directive", type: i3$2.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "pipe", type: TuiDocTypeReferencePipe, name: "tuiDocTypeReference" }, { kind: "directive", type: i6.TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownAppearance], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: ["tuiDropdownAlign", "tuiDropdownAppearance", "tuiDropdownDirection", "tuiDropdownLimitWidth", "tuiDropdownMinHeight", "tuiDropdownMaxHeight", "tuiDropdownOffset"] }, { kind: "pipe", type: TuiFilterPipe, name: "tuiFilter" }, { kind: "directive", type: i3.TuiInputNumberDirective, selector: "input[tuiInputNumber]", inputs: ["prefix", "postfix", "min", "max"] }, { kind: "component", type: i3.TuiInputNumberStep, selector: "input[tuiInputNumber][step]", inputs: ["step"] }, { kind: "pipe", type: TuiInspectPipe, name: "tuiInspectAny" }, { kind: "pipe", type: TuiIsOptionalPipe, name: "tuiIsOptionalPipe" }, { kind: "directive", type: i6$1.TuiNotificationDirective, selector: "tui-notification,[tuiNotification]:not(ng-template)", inputs: ["appearance", "size", "icon"] }, { kind: "ngmodule", type: TuiSelectModule }, { kind: "component", type: i7.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i7.TuiSelectDirective, selector: "tui-select" }, { kind: "pipe", type: TuiShowCleanerPipe, name: "tuiShowCleanerPipe" }, { kind: "pipe", type: TuiStripOptionalPipe, name: "tuiStripOptionalPipe" }, { kind: "component", type: TuiSwitch, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: ["showIcons"] }, { kind: "component", type: i5.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i5.TuiTextfieldDirective, selector: "input[tuiTextfield]" }, { kind: "directive", type: i5.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "directive", type: i9.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { kind: "directive", type: i9.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { kind: "directive", type: i9.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { kind: "pipe", type: TuiToArrayPipe, name: "tuiToArray" }], animations: [
|
|
663
624
|
trigger('emitEvent', [
|
|
664
625
|
transition(':increment', [style({ opacity: 1 }), animate('500ms ease-in')]),
|
|
665
626
|
]),
|
|
@@ -690,16 +651,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
690
651
|
trigger('emitEvent', [
|
|
691
652
|
transition(':increment', [style({ opacity: 1 }), animate('500ms ease-in')]),
|
|
692
653
|
]),
|
|
693
|
-
], template: "@if (heading) {\n <h1 class=\"t-heading\">\n {{ heading }}\n </h1>\n}\n<ng-content />\n@if (propertiesConnectors | tuiToArray | tuiFilter: matcher : excludedProperties; as properties) {\n @if (properties.length) {\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 @if (showValues && !isAPI) {\n <th class=\"t-th t-cell t-th_value\">\n {{ texts[3] }}\n </th>\n }\n </tr>\n @for (propertyConnector of properties; track propertyConnector) {\n <tr\n class=\"t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated\"\n >\n <td class=\"t-cell t-no-overflow\">\n <div\n automation-id=\"tui-documentation__property-name\"\n class=\"t-property t-additional-info\"\n >\n @if (propertyConnector.attrName) {\n <code\n class=\"t-property-code\"\n [style.color]=\"'var(--tui-background-accent-2-pressed)'\"\n >\n {{ propertyConnector.attrName | tuiStripOptionalPipe }}\n </code>\n }\n @if (propertyConnector.attrName | tuiIsOptionalPipe) {\n <tui-badge\n appearance=\"neutral\"\n size=\"s\"\n >\n Optional\n </tui-badge>\n }\n @if (propertyConnector.documentationPropertyDeprecated) {\n <tui-badge\n appearance=\"negative\"\n size=\"s\"\n >\n Deprecated\n </tui-badge>\n }\n </div>\n <ng-container [ngTemplateOutlet]=\"propertyConnector.template\" />\n </td>\n <td class=\"t-cell t-no-overflow\">\n <span class=\"type\">\n <code class=\"t-code-type\">\n @for (\n item of propertyConnector.documentationPropertyType | tuiDocTypeReference;\n track item;\n let last = $last\n ) {\n @if (item.reference) {\n <a\n target=\"_blank\"\n class=\"t-code-reference\"\n [attr.href]=\"item.reference\"\n >\n {{ item.type }}\n </a>\n } @else {\n {{ item.type }}\n }\n @if (!last) {\n <span> | </span>\n }\n }\n </code>\n </span>\n </td>\n @if (showValues) {\n <td class=\"t-cell t-cell_value\">\n @if (propertyConnector.shouldShowValues) {\n @if (propertyConnector.hasItems) {\n <tui-select\n tuiDropdownLimitWidth=\"min\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [tuiTextfieldCleaner]=\"\n propertyConnector.documentationPropertyType | tuiShowCleanerPipe\n \"\n [tuiTextfieldLabelOutside]=\"true\"\n [valueContent]=\"selectContent\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n >\n <code class=\"t-exception\">null</code>\n <tui-data-list-wrapper\n *tuiDataList\n class=\"t-data-list\"\n [itemContent]=\"selectContent\"\n [items]=\"propertyConnector.documentationPropertyValues\"\n />\n </tui-select>\n } @else {\n @switch (propertyConnector.documentationPropertyType) {\n @case ('boolean') {\n <input\n tuiSwitch\n type=\"checkbox\"\n class=\"t-switch\"\n [id]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [showIcons]=\"true\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n />\n }\n @case ('string') {\n <tui-textfield tuiTextfieldSize=\"m\">\n <input\n tuiTextfield\n [id]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue || ''\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n />\n </tui-textfield>\n }\n @case ('number') {\n <tui-textfield tuiTextfieldSize=\"m\">\n <input\n tuiInputNumber\n [id]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [step]=\"1\"\n (ngModelChange)=\"propertyConnector.onValueChange($event || 0)\"\n />\n </tui-textfield>\n }\n }\n }\n <ng-template\n #selectContent\n let-data\n >\n <code>{{ data | tuiInspectAny }}</code>\n </ng-template>\n } @else {\n <tui-notification\n class=\"t-output\"\n [@emitEvent]=\"propertyConnector.emits()\"\n >\n Emit!\n </tui-notification>\n }\n </td>\n }\n </tr>\n }\n </table>\n }\n}\n", styles: [":host{display:block;min-inline-size:100%}.t-table{inline-size:100%;table-layout:fixed}.t-row:not(:last-child){border-block-end:1px solid var(--tui-border-normal)}@media screen and (max-width: 47.9625em){.t-row{display:flex;flex-wrap:wrap}.t-row_header{display:none}}.t-cell{padding:1rem 1rem .875rem}.t-cell:first-child{padding-inline-start:0}.t-cell:last-child{padding-inline-end:0}.t-cell_prop{inline-size:40%}.t-cell_value{text-align:end}@media screen and (max-width: 47.9625em){.t-cell{inline-size:100%;block-size:auto;padding:.5rem 0;text-align:start}}.t-th{padding:.5rem 1rem;color:var(--tui-text-secondary);font-weight:400;text-align:start}.t-th_value{max-inline-size:20rem;text-align:end}@media screen and (max-width: 47.9625em){.t-th_value{inline-size:9.375rem}}.t-property{font:var(--tui-font-text-m);margin-block-end:.25rem;font-family:monospace;color:#8f75d1}@media screen and (max-width: 47.9625em){.t-property{padding:.5rem 0}}.t-type{font-family:monospace}.t-deprecated .t-property-code{text-decoration:line-through}.t-deprecated-label{margin-inline-end:.125rem;color:var(--tui-text-negative);font-size:.75rem}.t-additional-info{display:flex;gap:.3125rem;align-items:center}.t-exception{display:block;inline-size:max-content}.t-output{text-align:start;opacity:0}.t-heading{font:var(--tui-font-heading-4)}.t-code-type{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start}.t-code-reference{display:inline-flex;color:var(--tui-text-action);text-decoration:none;align-items:center;justify-content:center;gap:.1875rem}.t-code-reference:after{content:\"\";font-size:1rem;inline-size:1rem;block-size:1rem;background:currentColor;mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1rem\" height=\"1rem\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"></path><polyline points=\"15 3 21 3 21 9\"></polyline><line x1=\"10\" y1=\"14\" x2=\"21\" y2=\"3\"></line></svg>') center / 100%}.t-switch{display:block}@media not screen and (max-width: 47.9625em){.t-switch{margin-inline-start:auto}}.t-data-list{overflow-wrap:anywhere}@media not screen and (max-width: 47.9625em){.t-data-list{max-inline-size:22.5rem}}.t-no-overflow{overflow:hidden!important}\n"] }]
|
|
654
|
+
], template: "@if (heading()) {\n <h1 class=\"t-heading\">\n {{ heading() }}\n </h1>\n}\n<ng-content />\n@if (propertiesConnectors | tuiToArray | tuiFilter: matcher : excludedProperties; as properties) {\n @if (properties.length) {\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 @if (showValues() && !isAPI()) {\n <th class=\"t-th t-cell t-th_value\">\n {{ texts[3] }}\n </th>\n }\n </tr>\n @for (propertyConnector of properties; track propertyConnector) {\n <tr\n class=\"t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated()\"\n >\n <td class=\"t-cell t-no-overflow\">\n <div\n automation-id=\"tui-documentation__property-name\"\n class=\"t-property t-additional-info\"\n >\n @if (propertyConnector.attrName()) {\n <code\n class=\"t-property-code\"\n [style.color]=\"'var(--tui-background-accent-2-pressed)'\"\n >\n {{ propertyConnector.attrName() | tuiStripOptionalPipe }}\n </code>\n }\n @if (propertyConnector.attrName() | tuiIsOptionalPipe) {\n <tui-badge\n appearance=\"neutral\"\n size=\"s\"\n >\n Optional\n </tui-badge>\n }\n @if (propertyConnector.documentationPropertyDeprecated()) {\n <tui-badge\n appearance=\"negative\"\n size=\"s\"\n >\n Deprecated\n </tui-badge>\n }\n </div>\n <ng-container [ngTemplateOutlet]=\"propertyConnector.template\" />\n </td>\n <td class=\"t-cell t-no-overflow\">\n <span class=\"type\">\n <code class=\"t-code-type\">\n @for (\n item of propertyConnector.documentationPropertyType() | tuiDocTypeReference;\n track item;\n let last = $last\n ) {\n @if (item.reference) {\n <a\n target=\"_blank\"\n class=\"t-code-reference\"\n [attr.href]=\"item.reference\"\n >\n {{ item.type }}\n </a>\n } @else {\n {{ item.type }}\n }\n @if (!last) {\n <span> | </span>\n }\n }\n </code>\n </span>\n </td>\n @if (showValues()) {\n <td class=\"t-cell t-cell_value\">\n @if (propertyConnector.shouldShowValues) {\n @if (propertyConnector.hasItems) {\n <tui-select\n tuiDropdownLimitWidth=\"min\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName()\"\n [ngModel]=\"propertyConnector.documentationPropertyValue()\"\n [tuiTextfieldCleaner]=\"\n propertyConnector.documentationPropertyType() | tuiShowCleanerPipe\n \"\n [tuiTextfieldLabelOutside]=\"true\"\n [valueContent]=\"selectContent\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n >\n <code class=\"t-exception\">null</code>\n <tui-data-list-wrapper\n *tuiDataList\n class=\"t-data-list\"\n [itemContent]=\"selectContent\"\n [items]=\"propertyConnector.documentationPropertyValues()\"\n />\n </tui-select>\n } @else {\n @switch (propertyConnector.documentationPropertyType()) {\n @case ('boolean') {\n <input\n tuiSwitch\n type=\"checkbox\"\n class=\"t-switch\"\n [id]=\"propertyConnector.attrName()\"\n [ngModel]=\"propertyConnector.documentationPropertyValue()\"\n [showIcons]=\"true\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n />\n }\n @case ('string') {\n <tui-textfield tuiTextfieldSize=\"m\">\n <input\n tuiTextfield\n [id]=\"propertyConnector.attrName()\"\n [ngModel]=\"propertyConnector.documentationPropertyValue() || ''\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n />\n </tui-textfield>\n }\n @case ('number') {\n <tui-textfield tuiTextfieldSize=\"m\">\n <input\n tuiInputNumber\n [id]=\"propertyConnector.attrName()\"\n [ngModel]=\"propertyConnector.documentationPropertyValue()\"\n [step]=\"1\"\n (ngModelChange)=\"propertyConnector.onValueChange($event || 0)\"\n />\n </tui-textfield>\n }\n }\n }\n <ng-template\n #selectContent\n let-data\n >\n <code>{{ data | tuiInspectAny }}</code>\n </ng-template>\n } @else {\n <tui-notification\n class=\"t-output\"\n [@emitEvent]=\"propertyConnector.emits()\"\n >\n Emit!\n </tui-notification>\n }\n </td>\n }\n </tr>\n }\n </table>\n }\n}\n", styles: [":host{display:block;min-inline-size:100%}.t-table{inline-size:100%;table-layout:fixed}.t-row:not(:last-child){border-block-end:1px solid var(--tui-border-normal)}@media screen and (max-width: 47.9625em){.t-row{display:flex;flex-wrap:wrap}.t-row_header{display:none}}.t-cell{padding:1rem 1rem .875rem}.t-cell:first-child{padding-inline-start:0}.t-cell:last-child{padding-inline-end:0}.t-cell_prop{inline-size:40%}.t-cell_value{text-align:end}@media screen and (max-width: 47.9625em){.t-cell{inline-size:100%;block-size:auto;padding:.5rem 0;text-align:start}}.t-th{padding:.5rem 1rem;color:var(--tui-text-secondary);font-weight:400;text-align:start}.t-th_value{max-inline-size:20rem;text-align:end}@media screen and (max-width: 47.9625em){.t-th_value{inline-size:9.375rem}}.t-property{font:var(--tui-font-text-m);margin-block-end:.25rem;font-family:monospace;color:#8f75d1}@media screen and (max-width: 47.9625em){.t-property{padding:.5rem 0}}.t-type{font-family:monospace}.t-deprecated .t-property-code{text-decoration:line-through}.t-deprecated-label{margin-inline-end:.125rem;color:var(--tui-text-negative);font-size:.75rem}.t-additional-info{display:flex;gap:.3125rem;align-items:center}.t-exception{display:block;inline-size:max-content}.t-output{text-align:start;opacity:0}.t-heading{font:var(--tui-font-heading-4)}.t-code-type{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start}.t-code-reference{display:inline-flex;color:var(--tui-text-action);text-decoration:none;align-items:center;justify-content:center;gap:.1875rem}.t-code-reference:after{content:\"\";font-size:1rem;inline-size:1rem;block-size:1rem;background:currentColor;mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1rem\" height=\"1rem\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"></path><polyline points=\"15 3 21 3 21 9\"></polyline><line x1=\"10\" y1=\"14\" x2=\"21\" y2=\"3\"></line></svg>') center / 100%}.t-switch{display:block}@media not screen and (max-width: 47.9625em){.t-switch{margin-inline-start:auto}}.t-data-list{overflow-wrap:anywhere}@media not screen and (max-width: 47.9625em){.t-data-list{max-inline-size:22.5rem}}.t-no-overflow{overflow:hidden!important}\n"] }]
|
|
694
655
|
}], propDecorators: { propertiesConnectors: [{
|
|
695
656
|
type: ContentChildren,
|
|
696
657
|
args: [TuiDocDocumentationPropertyConnector]
|
|
697
|
-
}], heading: [{
|
|
698
|
-
type: Input
|
|
699
|
-
}], showValues: [{
|
|
700
|
-
type: Input
|
|
701
|
-
}], isAPI: [{
|
|
702
|
-
type: Input
|
|
703
658
|
}] } });
|
|
704
659
|
|
|
705
660
|
class TuiGetColorPipe {
|
|
@@ -732,7 +687,6 @@ class TuiGetColorPipe {
|
|
|
732
687
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiGetColorPipe, decorators: [{
|
|
733
688
|
type: Pipe,
|
|
734
689
|
args: [{
|
|
735
|
-
standalone: true,
|
|
736
690
|
name: 'tuiGetColorPipe',
|
|
737
691
|
}]
|
|
738
692
|
}] });
|
|
@@ -759,7 +713,6 @@ class TuiGetOpacityPipe {
|
|
|
759
713
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiGetOpacityPipe, decorators: [{
|
|
760
714
|
type: Pipe,
|
|
761
715
|
args: [{
|
|
762
|
-
standalone: true,
|
|
763
716
|
name: 'tuiGetOpacity',
|
|
764
717
|
}]
|
|
765
718
|
}] });
|
|
@@ -774,7 +727,6 @@ class TuiIsPrimitivePolymorpheusContentPipe {
|
|
|
774
727
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIsPrimitivePolymorpheusContentPipe, decorators: [{
|
|
775
728
|
type: Pipe,
|
|
776
729
|
args: [{
|
|
777
|
-
standalone: true,
|
|
778
730
|
name: 'tuiIsPrimitivePolymorpheusContentPipe',
|
|
779
731
|
}]
|
|
780
732
|
}] });
|
|
@@ -788,12 +740,7 @@ const TUI_DOC_EXAMPLE_DEFAULT_OPTIONS = {
|
|
|
788
740
|
/**
|
|
789
741
|
* Default parameters for DocExample component
|
|
790
742
|
*/
|
|
791
|
-
const TUI_DOC_EXAMPLE_OPTIONS =
|
|
792
|
-
factory: () => TUI_DOC_EXAMPLE_DEFAULT_OPTIONS,
|
|
793
|
-
});
|
|
794
|
-
function tuiDocExampleOptionsProvider(options) {
|
|
795
|
-
return tuiProvideOptions(TUI_DOC_EXAMPLE_OPTIONS, options, TUI_DOC_EXAMPLE_DEFAULT_OPTIONS);
|
|
796
|
-
}
|
|
743
|
+
const [TUI_DOC_EXAMPLE_OPTIONS, tuiDocExampleOptionsProvider] = tuiCreateOptions(TUI_DOC_EXAMPLE_DEFAULT_OPTIONS);
|
|
797
744
|
|
|
798
745
|
class TuiDocExampleGetTabsPipe {
|
|
799
746
|
transform(content, defaultTab) {
|
|
@@ -805,7 +752,6 @@ class TuiDocExampleGetTabsPipe {
|
|
|
805
752
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocExampleGetTabsPipe, decorators: [{
|
|
806
753
|
type: Pipe,
|
|
807
754
|
args: [{
|
|
808
|
-
standalone: true,
|
|
809
755
|
name: 'tuiDocExampleGetTabs',
|
|
810
756
|
}]
|
|
811
757
|
}] });
|
|
@@ -813,7 +759,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
813
759
|
class TuiDocExample {
|
|
814
760
|
constructor() {
|
|
815
761
|
this.clipboard = inject(Clipboard);
|
|
816
|
-
this.alerts = inject(
|
|
762
|
+
this.alerts = inject(TuiNotificationService);
|
|
817
763
|
this.location = inject(WA_LOCATION);
|
|
818
764
|
this.copyTexts = inject(TUI_COPY_TEXTS);
|
|
819
765
|
this.processContent = inject(TUI_DOC_EXAMPLE_CONTENT_PROCESSOR);
|
|
@@ -832,9 +778,12 @@ class TuiDocExample {
|
|
|
832
778
|
this.copy = computed(() => this.copyTexts()[0]);
|
|
833
779
|
this.loading = signal(false);
|
|
834
780
|
this.processor = toSignal(this.rawLoader$$.pipe(switchMap(tuiRawLoadRecord), map((value) => this.processContent(value))), { initialValue: {} });
|
|
835
|
-
this.id = null;
|
|
836
|
-
this.
|
|
837
|
-
this.
|
|
781
|
+
this.id = input(null);
|
|
782
|
+
this.heading = input();
|
|
783
|
+
this.description = input();
|
|
784
|
+
this.fullsize = input(inject(TUI_DOC_EXAMPLE_OPTIONS).fullsize);
|
|
785
|
+
this.componentName = input(this.location.pathname.slice(1));
|
|
786
|
+
this.component = input();
|
|
838
787
|
this.visible = (files) => Boolean(this.codeEditor && this.options.codeEditorVisibilityHandler(files));
|
|
839
788
|
}
|
|
840
789
|
set content(content) {
|
|
@@ -852,11 +801,11 @@ class TuiDocExample {
|
|
|
852
801
|
edit(files) {
|
|
853
802
|
this.loading.set(true);
|
|
854
803
|
this.codeEditor
|
|
855
|
-
?.edit(this.componentName, this.id || '', files)
|
|
804
|
+
?.edit(this.componentName(), this.id() || '', files)
|
|
856
805
|
.finally(() => this.loading.set(false));
|
|
857
806
|
}
|
|
858
807
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocExample, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
859
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocExample, isStandalone: true, selector: "tui-doc-example", inputs: { id: "id", heading: "heading", description: "description", fullsize: "fullsize", componentName: "componentName", component: "component", content: "content" }, host: { properties: { "attr.id": "id", "class._fullsize": "fullsize" } }, ngImport: i0, template: "<div class=\"t-title-block\">\n @if (heading) {\n <h2 class=\"t-title\">\n <span\n *polymorpheusOutlet=\"heading as text\"\n [textContent]=\"text\"\n ></span>\n </h2>\n }\n @if (id) {\n <a\n routerLink=\".\"\n routerLinkActive=\"t-link-active\"\n tuiLink\n type=\"button\"\n class=\"t-link\"\n [attr.title]=\"copy()\"\n [fragment]=\"id\"\n [relativeTo]=\"route.firstChild ?? route\"\n [routerLinkActiveOptions]=\"{matrixParams: 'exact', queryParams: 'exact', paths: 'exact', fragment: 'exact'}\"\n (click)=\"copyExampleLink($event.currentTarget)\"\n >\n #\n </a>\n }\n</div>\n@if (description) {\n <h3 class=\"t-description\">\n <ng-container *polymorpheusOutlet=\"description as text\">\n {{ text }}\n </ng-container>\n </h3>\n}\n\n<div\n class=\"t-example\"\n [(tuiFullscreen)]=\"fullscreen\"\n>\n @if (processor() | tuiDocExampleGetTabs: defaultTab; as tabs) {\n @if (tabs.length > 1) {\n <div class=\"t-tabs-wrapper\">\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n @for (tab of tabs; track tab) {\n <button\n *tuiItem\n tuiTab\n type=\"button\"\n >\n <ng-container *polymorpheusOutlet=\"getTabTitle(tab) as text\">\n {{ text }}\n </ng-container>\n </button>\n }\n </tui-tabs-with-more>\n @if (processor() | tuiMapper: visible) {\n <tui-loader\n size=\"xs\"\n class=\"t-code-editor\"\n [overlay]=\"true\"\n [showLoader]=\"loading()\"\n (click)=\"edit(processor())\"\n >\n @if (codeEditor?.content; as content) {\n <ng-container *polymorpheusOutlet=\"content as editContent\">\n {{ editContent }}\n </ng-container>\n } @else {\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n type=\"button\"\n >\n Edit on {{ codeEditor!.name }}\n </button>\n }\n </tui-loader>\n }\n @if (fullscreenEnabled) {\n <button\n appearance=\"flat\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"fullscreen ? icons.shrink : icons.expand\"\n (click)=\"fullscreen = !fullscreen\"\n >\n Fullscreen\n </button>\n }\n </div>\n }\n @for (tab of tabs; track tab) {\n <div class=\"t-content\">\n @if ($index === defaultTabIndex) {\n <section\n automation-id=\"tui-doc-example\"\n class=\"t-demo\"\n [style.display]=\"activeItemIndex === $index && $index === defaultTabIndex ? 'block' : 'none'\"\n >\n <ng-content />\n <ng-container *ngComponentOutlet=\"component | async\" />\n </section>\n }\n <tui-doc-code\n *tuiLet=\"processor()[tabs[$index] || 0] || '' as code\"\n [code]=\"code\"\n [style.display]=\"activeItemIndex === $index && $index !== defaultTabIndex ? 'block' : 'none'\"\n >\n @for (action of codeActions; track action) {\n <ng-container *polymorpheusOutlet=\"action as text; context: {$implicit: code}\">\n {{ text }}\n </ng-container>\n }\n </tui-doc-code>\n </div>\n }\n }\n</div>\n", styles: [":host{position:relative;display:block;padding-block-start:3.5rem;clear:inline-end}:host:target{animation:1s tuiShaking}@media screen and (max-width: 47.9625em){:host{padding-block-start:2rem}}.t-title-block{display:flex;flex-direction:row-reverse}.t-title{font:var(--tui-font-heading-5);margin:0 auto .5rem 0}@media screen and (max-width: 47.9625em){.t-title{font:var(--tui-font-heading-6)}}.t-title:hover+.t-link{opacity:1}.t-link{font:var(--tui-font-heading-6);padding-inline-end:.1rem}@media not screen and (max-width: 47.9625em){.t-link{font:var(--tui-font-heading-5);margin-inline-start:-1.6rem}.t-link:not(:hover,:focus-visible):not(.t-link-active){opacity:0}}.t-description{font:var(--tui-font-text-m);font-weight:400;margin:0}.t-title:first-letter,.t-description:first-letter{text-transform:capitalize}.t-example{position:relative;margin-block-start:1.5rem;border:1px solid var(--tui-border-normal);border-radius:var(--tui-radius-m);box-shadow:0 .125rem .1875rem #0000001a;overflow:hidden}@media screen and (max-width: 47.9625em){.t-example{margin-block-start:.75rem}}.t-tabs-wrapper{display:flex;padding:0 .875rem 0 2rem;box-shadow:inset 0 -1px var(--tui-border-normal);justify-content:space-between;align-items:center;gap:.5rem}@media screen and (max-width: 47.9625em){.t-tabs-wrapper{padding:0 .875rem 0 1rem}}.t-tabs{flex-grow:1;box-shadow:none}.t-code-editor{flex-shrink:0;block-size:auto}@media screen and (max-width: 47.9625em){.t-code-editor{font-size:0;inline-size:1.5rem}}.t-demo{position:relative;padding:2rem;max-inline-size:100%;box-sizing:border-box;overflow-x:auto}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.t-demo::-webkit-scrollbar,.t-demo::-webkit-scrollbar-thumb{inline-size:1rem;block-size:1rem;border-radius:6.25rem;background-clip:padding-box;border:.375rem solid transparent}.t-demo::-webkit-scrollbar{background-color:transparent}.t-demo::-webkit-scrollbar-thumb{background-color:var(--tui-background-neutral-1-hover)}.t-demo::-webkit-scrollbar-thumb:hover{background-color:var(--tui-background-neutral-1-pressed)}.t-demo::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-tertiary)}}@media screen and (max-width: 47.9625em){.t-demo{padding:1rem}}:host:not(._fullsize) .t-demo{inline-size:min-content;min-inline-size:21rem}tui-doc-code{overflow:hidden}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiDocCode, selector: "tui-doc-code", inputs: ["filename", "code"] }, { kind: "pipe", type: TuiDocExampleGetTabsPipe, name: "tuiDocExampleGetTabs" }, { kind: "component", type: TuiFullscreen, selector: "[tuiFullscreen]", inputs: ["tuiFullscreenOptions", "tuiFullscreen"], outputs: ["tuiFullscreenChange"] }, { kind: "directive", type: TuiLet, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "directive", type: i4.TuiItem, selector: "[tuiItem]" }, { kind: "directive", type: i2$1.TuiTab, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { kind: "component", type: i2$1.TuiTabsWithMore, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["size", "moreContent", "dropdownContent", "underline", "itemsLimit", "activeItemIndex"], outputs: ["activeItemIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
808
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocExample, isStandalone: true, selector: "tui-doc-example", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, fullsize: { classPropertyName: "fullsize", publicName: "fullsize", isSignal: true, isRequired: false, transformFunction: null }, componentName: { classPropertyName: "componentName", publicName: "componentName", isSignal: true, isRequired: false, transformFunction: null }, component: { classPropertyName: "component", publicName: "component", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "id()", "class._fullsize": "fullsize()" } }, ngImport: i0, template: "<div class=\"t-title-block\">\n @if (heading()) {\n <h2 class=\"t-title\">\n <span\n *polymorpheusOutlet=\"heading() as text\"\n [textContent]=\"text\"\n ></span>\n </h2>\n }\n\n @let fragmentId = id();\n\n @if (fragmentId) {\n <a\n routerLink=\".\"\n routerLinkActive=\"t-link-active\"\n tuiLink\n type=\"button\"\n class=\"t-link\"\n [attr.title]=\"copy()\"\n [fragment]=\"fragmentId\"\n [relativeTo]=\"route.firstChild ?? route\"\n [routerLinkActiveOptions]=\"{matrixParams: 'exact', queryParams: 'exact', paths: 'exact', fragment: 'exact'}\"\n (click)=\"copyExampleLink($event.currentTarget)\"\n >\n #\n </a>\n }\n</div>\n@if (description()) {\n <h3 class=\"t-description\">\n <ng-container *polymorpheusOutlet=\"description() as text\">\n {{ text }}\n </ng-container>\n </h3>\n}\n\n<div\n class=\"t-example\"\n [(tuiFullscreen)]=\"fullscreen\"\n>\n @if (processor() | tuiDocExampleGetTabs: defaultTab; as tabs) {\n @if (tabs.length > 1) {\n <div class=\"t-tabs-wrapper\">\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n @for (tab of tabs; track tab) {\n <button\n *tuiItem\n tuiTab\n type=\"button\"\n >\n <ng-container *polymorpheusOutlet=\"getTabTitle(tab) as text\">\n {{ text }}\n </ng-container>\n </button>\n }\n </tui-tabs-with-more>\n @if (processor() | tuiMapper: visible) {\n <tui-loader\n size=\"xs\"\n class=\"t-code-editor\"\n [loading]=\"loading()\"\n [overlay]=\"true\"\n (click)=\"edit(processor())\"\n >\n @if (codeEditor?.content; as content) {\n <ng-container *polymorpheusOutlet=\"content as editContent\">\n {{ editContent }}\n </ng-container>\n } @else {\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n type=\"button\"\n >\n Edit on {{ codeEditor!.name }}\n </button>\n }\n </tui-loader>\n }\n @if (fullscreenEnabled) {\n <button\n appearance=\"flat\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"fullscreen ? icons.shrink : icons.expand\"\n (click)=\"fullscreen = !fullscreen\"\n >\n Fullscreen\n </button>\n }\n </div>\n }\n @for (tab of tabs; track tab) {\n <div class=\"t-content\">\n @if ($index === defaultTabIndex) {\n <section\n automation-id=\"tui-doc-example\"\n class=\"t-demo\"\n [style.display]=\"activeItemIndex === $index && $index === defaultTabIndex ? 'block' : 'none'\"\n >\n <ng-content />\n <ng-container *ngComponentOutlet=\"component() | async\" />\n </section>\n }\n @let code = processor()[tabs[$index] || 0] || '';\n <tui-doc-code\n [code]=\"code\"\n [style.display]=\"activeItemIndex === $index && $index !== defaultTabIndex ? 'block' : 'none'\"\n >\n @for (action of codeActions; track action) {\n <ng-container *polymorpheusOutlet=\"action as text; context: {$implicit: code}\">\n {{ text }}\n </ng-container>\n }\n </tui-doc-code>\n </div>\n }\n }\n</div>\n", styles: [":host{position:relative;display:block;padding-block-start:3.5rem;clear:inline-end}:host:target{animation:1s tuiShaking}@media screen and (max-width: 47.9625em){:host{padding-block-start:2rem}}.t-title-block{display:flex;flex-direction:row-reverse}.t-title{font:var(--tui-font-heading-5);margin:0 auto .5rem 0}@media screen and (max-width: 47.9625em){.t-title{font:var(--tui-font-heading-6)}}.t-title:hover+.t-link{opacity:1}.t-link{font:var(--tui-font-heading-6);padding-inline-end:.1rem}@media not screen and (max-width: 47.9625em){.t-link{font:var(--tui-font-heading-5);margin-inline-start:-1.6rem}.t-link:not(:hover,:focus-visible):not(.t-link-active){opacity:0}}.t-description{font:var(--tui-font-text-m);font-weight:400;margin:0}.t-title:first-letter,.t-description:first-letter{text-transform:capitalize}.t-example{position:relative;margin-block-start:1.5rem;border:1px solid var(--tui-border-normal);border-radius:var(--tui-radius-m);box-shadow:0 .125rem .1875rem #0000001a;overflow:hidden}@media screen and (max-width: 47.9625em){.t-example{margin-block-start:.75rem}}.t-tabs-wrapper{display:flex;padding:0 .875rem 0 2rem;box-shadow:inset 0 -1px var(--tui-border-normal);justify-content:space-between;align-items:center;gap:.5rem}@media screen and (max-width: 47.9625em){.t-tabs-wrapper{padding:0 .875rem 0 1rem}}.t-tabs{flex-grow:1;box-shadow:none}.t-code-editor{flex-shrink:0;block-size:auto}@media screen and (max-width: 47.9625em){.t-code-editor{font-size:0;inline-size:1.5rem}}.t-demo{position:relative;padding:2rem;max-inline-size:100%;box-sizing:border-box;overflow-x:auto}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.t-demo::-webkit-scrollbar,.t-demo::-webkit-scrollbar-thumb{inline-size:1rem;block-size:1rem;border-radius:6.25rem;background-clip:padding-box;border:.375rem solid transparent}.t-demo::-webkit-scrollbar{background-color:transparent}.t-demo::-webkit-scrollbar-thumb{background-color:var(--tui-background-neutral-1-hover)}.t-demo::-webkit-scrollbar-thumb:hover{background-color:var(--tui-background-neutral-1-pressed)}.t-demo::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-tertiary)}}@media screen and (max-width: 47.9625em){.t-demo{padding:1rem}}:host:not(._fullsize) .t-demo{inline-size:min-content;min-inline-size:21rem}tui-doc-code{overflow:hidden}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiDocCode, selector: "tui-doc-code", inputs: ["filename", "code"] }, { kind: "pipe", type: TuiDocExampleGetTabsPipe, name: "tuiDocExampleGetTabs" }, { kind: "component", type: TuiFullscreen, selector: "[tuiFullscreen]", inputs: ["tuiFullscreenOptions", "tuiFullscreen"], outputs: ["tuiFullscreenChange"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "directive", type: i1$2.TuiItem, selector: "[tuiItem]" }, { kind: "directive", type: i2$1.TuiTab, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { kind: "component", type: i2$1.TuiTabsWithMore, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["size", "moreContent", "dropdownContent", "underline", "itemsLimit", "activeItemIndex"], outputs: ["activeItemIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
860
809
|
}
|
|
861
810
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocExample, decorators: [{
|
|
862
811
|
type: Component,
|
|
@@ -870,28 +819,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
870
819
|
TuiDocCode,
|
|
871
820
|
TuiDocExampleGetTabsPipe,
|
|
872
821
|
TuiFullscreen,
|
|
873
|
-
TuiLet,
|
|
874
822
|
TuiLink,
|
|
875
823
|
TuiLoader,
|
|
876
824
|
TuiMapperPipe,
|
|
877
825
|
TuiTabs,
|
|
878
826
|
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
879
|
-
'[attr.id]': 'id',
|
|
880
|
-
'[class._fullsize]': 'fullsize',
|
|
881
|
-
}, template: "<div class=\"t-title-block\">\n @if (heading) {\n <h2 class=\"t-title\">\n <span\n *polymorpheusOutlet=\"heading as text\"\n [textContent]=\"text\"\n ></span>\n </h2>\n }\n @if (
|
|
882
|
-
}], propDecorators: {
|
|
883
|
-
type: Input
|
|
884
|
-
}], heading: [{
|
|
885
|
-
type: Input
|
|
886
|
-
}], description: [{
|
|
887
|
-
type: Input
|
|
888
|
-
}], fullsize: [{
|
|
889
|
-
type: Input
|
|
890
|
-
}], componentName: [{
|
|
891
|
-
type: Input
|
|
892
|
-
}], component: [{
|
|
893
|
-
type: Input
|
|
894
|
-
}], content: [{
|
|
827
|
+
'[attr.id]': 'id()',
|
|
828
|
+
'[class._fullsize]': 'fullsize()',
|
|
829
|
+
}, template: "<div class=\"t-title-block\">\n @if (heading()) {\n <h2 class=\"t-title\">\n <span\n *polymorpheusOutlet=\"heading() as text\"\n [textContent]=\"text\"\n ></span>\n </h2>\n }\n\n @let fragmentId = id();\n\n @if (fragmentId) {\n <a\n routerLink=\".\"\n routerLinkActive=\"t-link-active\"\n tuiLink\n type=\"button\"\n class=\"t-link\"\n [attr.title]=\"copy()\"\n [fragment]=\"fragmentId\"\n [relativeTo]=\"route.firstChild ?? route\"\n [routerLinkActiveOptions]=\"{matrixParams: 'exact', queryParams: 'exact', paths: 'exact', fragment: 'exact'}\"\n (click)=\"copyExampleLink($event.currentTarget)\"\n >\n #\n </a>\n }\n</div>\n@if (description()) {\n <h3 class=\"t-description\">\n <ng-container *polymorpheusOutlet=\"description() as text\">\n {{ text }}\n </ng-container>\n </h3>\n}\n\n<div\n class=\"t-example\"\n [(tuiFullscreen)]=\"fullscreen\"\n>\n @if (processor() | tuiDocExampleGetTabs: defaultTab; as tabs) {\n @if (tabs.length > 1) {\n <div class=\"t-tabs-wrapper\">\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n @for (tab of tabs; track tab) {\n <button\n *tuiItem\n tuiTab\n type=\"button\"\n >\n <ng-container *polymorpheusOutlet=\"getTabTitle(tab) as text\">\n {{ text }}\n </ng-container>\n </button>\n }\n </tui-tabs-with-more>\n @if (processor() | tuiMapper: visible) {\n <tui-loader\n size=\"xs\"\n class=\"t-code-editor\"\n [loading]=\"loading()\"\n [overlay]=\"true\"\n (click)=\"edit(processor())\"\n >\n @if (codeEditor?.content; as content) {\n <ng-container *polymorpheusOutlet=\"content as editContent\">\n {{ editContent }}\n </ng-container>\n } @else {\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n type=\"button\"\n >\n Edit on {{ codeEditor!.name }}\n </button>\n }\n </tui-loader>\n }\n @if (fullscreenEnabled) {\n <button\n appearance=\"flat\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"fullscreen ? icons.shrink : icons.expand\"\n (click)=\"fullscreen = !fullscreen\"\n >\n Fullscreen\n </button>\n }\n </div>\n }\n @for (tab of tabs; track tab) {\n <div class=\"t-content\">\n @if ($index === defaultTabIndex) {\n <section\n automation-id=\"tui-doc-example\"\n class=\"t-demo\"\n [style.display]=\"activeItemIndex === $index && $index === defaultTabIndex ? 'block' : 'none'\"\n >\n <ng-content />\n <ng-container *ngComponentOutlet=\"component() | async\" />\n </section>\n }\n @let code = processor()[tabs[$index] || 0] || '';\n <tui-doc-code\n [code]=\"code\"\n [style.display]=\"activeItemIndex === $index && $index !== defaultTabIndex ? 'block' : 'none'\"\n >\n @for (action of codeActions; track action) {\n <ng-container *polymorpheusOutlet=\"action as text; context: {$implicit: code}\">\n {{ text }}\n </ng-container>\n }\n </tui-doc-code>\n </div>\n }\n }\n</div>\n", styles: [":host{position:relative;display:block;padding-block-start:3.5rem;clear:inline-end}:host:target{animation:1s tuiShaking}@media screen and (max-width: 47.9625em){:host{padding-block-start:2rem}}.t-title-block{display:flex;flex-direction:row-reverse}.t-title{font:var(--tui-font-heading-5);margin:0 auto .5rem 0}@media screen and (max-width: 47.9625em){.t-title{font:var(--tui-font-heading-6)}}.t-title:hover+.t-link{opacity:1}.t-link{font:var(--tui-font-heading-6);padding-inline-end:.1rem}@media not screen and (max-width: 47.9625em){.t-link{font:var(--tui-font-heading-5);margin-inline-start:-1.6rem}.t-link:not(:hover,:focus-visible):not(.t-link-active){opacity:0}}.t-description{font:var(--tui-font-text-m);font-weight:400;margin:0}.t-title:first-letter,.t-description:first-letter{text-transform:capitalize}.t-example{position:relative;margin-block-start:1.5rem;border:1px solid var(--tui-border-normal);border-radius:var(--tui-radius-m);box-shadow:0 .125rem .1875rem #0000001a;overflow:hidden}@media screen and (max-width: 47.9625em){.t-example{margin-block-start:.75rem}}.t-tabs-wrapper{display:flex;padding:0 .875rem 0 2rem;box-shadow:inset 0 -1px var(--tui-border-normal);justify-content:space-between;align-items:center;gap:.5rem}@media screen and (max-width: 47.9625em){.t-tabs-wrapper{padding:0 .875rem 0 1rem}}.t-tabs{flex-grow:1;box-shadow:none}.t-code-editor{flex-shrink:0;block-size:auto}@media screen and (max-width: 47.9625em){.t-code-editor{font-size:0;inline-size:1.5rem}}.t-demo{position:relative;padding:2rem;max-inline-size:100%;box-sizing:border-box;overflow-x:auto}@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.t-demo::-webkit-scrollbar,.t-demo::-webkit-scrollbar-thumb{inline-size:1rem;block-size:1rem;border-radius:6.25rem;background-clip:padding-box;border:.375rem solid transparent}.t-demo::-webkit-scrollbar{background-color:transparent}.t-demo::-webkit-scrollbar-thumb{background-color:var(--tui-background-neutral-1-hover)}.t-demo::-webkit-scrollbar-thumb:hover{background-color:var(--tui-background-neutral-1-pressed)}.t-demo::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-tertiary)}}@media screen and (max-width: 47.9625em){.t-demo{padding:1rem}}:host:not(._fullsize) .t-demo{inline-size:min-content;min-inline-size:21rem}tui-doc-code{overflow:hidden}\n"] }]
|
|
830
|
+
}], propDecorators: { content: [{
|
|
895
831
|
type: Input
|
|
896
832
|
}] } });
|
|
897
833
|
|
|
@@ -962,7 +898,6 @@ class TuiDocScrollIntoViewLink {
|
|
|
962
898
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocScrollIntoViewLink, decorators: [{
|
|
963
899
|
type: Directive,
|
|
964
900
|
args: [{
|
|
965
|
-
standalone: true,
|
|
966
901
|
selector: '[tuiDocScrollIntoViewLink]',
|
|
967
902
|
}]
|
|
968
903
|
}], propDecorators: { tuiDocScrollIntoViewLink: [{
|
|
@@ -1101,7 +1036,7 @@ class TuiDocNavigation {
|
|
|
1101
1036
|
target.remove();
|
|
1102
1037
|
}
|
|
1103
1038
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocNavigation, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1104
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocNavigation, isStandalone: true, selector: "tui-doc-navigation", host: { listeners: { "window:keydown": "onFocusSearch($event)" }, properties: { "class._open": "menuOpen" } }, providers: NAVIGATION_PROVIDERS, viewQueries: [{ propertyName: "searchInput", first: true, predicate: TuiTextfieldDirective, descendants: true, read: ElementRef }], ngImport: i0, template: "@if (searchEnabled()) {\n <tui-textfield\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n [iconStart]=\"docIcons.search\"\n [open]=\"open() && canOpen\"\n (keyup)=\"open.set(canOpen && $event.code !== 'Escape')\"\n (openChange)=\"open.set($event)\"\n >\n @if (!search.value) {\n <code class=\"t-slash\">/</code>\n }\n\n <input\n tuiTextfield\n class=\"t-prevent-ios-scroll\"\n [formControl]=\"search\"\n [placeholder]=\"searchText\"\n [tuiAutoFocus]=\"!!drawer\"\n />\n\n @if (canOpen) {\n <tui-data-list *tuiDropdown>\n @for (group of filtered(); track group) {\n <tui-opt-group [label]=\"labels[$index] || ''\">\n @for (item of group; track item) {\n @if (item.route.includes('://')) {\n <a\n tuiOption\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [target]=\"item.target || '_self'\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n } @else {\n <a\n tuiOption\n [attr.rel]=\"item.rel\"\n [fragment]=\"item.fragment\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n (click)=\"onClick()\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n }\n }\n </tui-opt-group>\n }\n </tui-data-list>\n }\n </tui-textfield>\n}\n\n<nav class=\"t-navigation\">\n <tui-scrollbar class=\"t-scrollbar\">\n <tui-accordion\n size=\"m\"\n [class.t-accordion-standalone]=\"!searchEnabled()\"\n [closeOthers]=\"false\"\n >\n @for (label of labels; track $index) {\n <button\n appearance=\"\"\n [tuiAccordion]=\"!!openPagesArr[$index]\"\n (tuiAccordionChange)=\"openPagesArr[$index] = !!$event\"\n >\n <span class=\"t-label\">\n <strong>{{ label }}</strong>\n </span>\n </button>\n <tui-expand [style.padding-block]=\"0\">\n <div\n *tuiItem\n class=\"t-section\"\n >\n @for (item of items[$index]; track $index) {\n <ng-container\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: $index * 100 + $index}\"\n />\n }\n </div>\n </tui-expand>\n }\n </tui-accordion>\n <div class=\"t-items-container\">\n @for (item of itemsWithoutSections; track item) {\n <ng-container\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: items.length - 1 + $index}\"\n />\n }\n </div>\n\n <ng-template\n #pages\n let-index=\"index\"\n let-item=\"item\"\n >\n @if (!item.subPages) {\n @if (item.route.includes('://')) {\n <a\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [target]=\"item.target || '_self'\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n } @else {\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n [tuiDocScrollIntoViewLink]=\"isActive(item.route)\"\n (click)=\"closeMenu()\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n }\n } @else {\n <div\n routerLinkActive\n class=\"t-subsection\"\n [routerLinkActiveOptions]=\"{exact: false}\"\n >\n @if (item.subPages) {\n <button\n tuiLink\n type=\"button\"\n class=\"t-sublink t-sublink_subsection\"\n (click)=\"onGroupClick(index)\"\n >\n <tui-icon\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesGroupsArr[index]\"\n [icon]=\"icons.more\"\n />\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </button>\n }\n\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"!!openPagesGroupsArr[index]\"\n >\n <div class=\"t-section t-section_bordered\">\n @for (subPage of $pages(item.subPages); track subPage) {\n @if (subPage.route.includes('://')) {\n <a\n tuiLink\n class=\"t-sublink t-sublink_small\"\n [attr.rel]=\"subPage.rel\"\n [href]=\"subPage.route\"\n [target]=\"subPage.target || '_self'\"\n >\n {{ subPage.title }}\n <tui-icon\n *polymorpheusOutlet=\"subPage.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n } @else {\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink t-sublink_small\"\n [attr.rel]=\"subPage.rel\"\n [fragment]=\"subPage.fragment\"\n [routerLink]=\"subPage.route\"\n [target]=\"subPage.target || '_self'\"\n [tuiDocScrollIntoViewLink]=\"isActive(subPage.route)\"\n (click)=\"closeMenu()\"\n >\n {{ subPage.title }}\n <tui-icon\n *polymorpheusOutlet=\"subPage.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n }\n }\n </div>\n </tui-expand>\n </div>\n }\n </ng-template>\n </tui-scrollbar>\n</nav>\n\n<ng-content />\n", styles: [":host{z-index:1;display:flex;flex-direction:column;text-align:center;background:var(--tui-background-base)}.t-input{margin:1.25rem}.t-slash{block-size:1rem;font-size:.5rem}.t-navigation{display:flex;max-block-size:100%;min-block-size:0;flex:1 1 0;text-align:start}.t-navigation tui-scrollbar{overscroll-behavior:none}:host-context(tui-drawer){margin:-1.25rem -1.5rem}:host-context(tui-drawer) .t-scrollbar{display:contents}.t-accordion-standalone{margin-block-start:1rem}.t-scrollbar{scroll-behavior:var(--tui-scroll-behavior);inline-size:100%}.t-items-container{display:flex;flex-direction:column;padding:0 1rem}.t-label{margin-inline-start:.5rem}.t-expand{margin-inline-start:.25rem;padding-block:0}.t-section{display:flex;flex-direction:column;align-items:flex-start}.t-section_bordered{margin:.5rem 0;border-inline-start:1px solid var(--tui-border-normal)}@supports (-webkit-touch-callout: none){.t-prevent-ios-scroll:focus{animation:tuiPreventIOSScroll 1ms}}@keyframes tuiPreventIOSScroll{0%{opacity:0}to{opacity:1}}.t-subsection{margin-inline-start:.5rem}.t-sublink{font:var(--tui-font-text-m);margin-inline-start:.5rem;padding:.5rem 0;text-decoration:none}.t-sublink_small{margin-inline-start:1rem;line-height:1.5rem;padding-block-start:.5rem}.t-sublink_subsection{margin-inline-start:0;line-height:1.6rem}.t-sublink.t-sublink.t-sublink_active{color:var(--tui-text-primary)}.t-icon{margin-inline-start:.5rem}.t-chevron{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font-size:1rem;margin:-.25rem .25rem 0 -.1875rem}.t-chevron_active{transform:rotate(90deg)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i2$2.TuiAccordionComponent, selector: "tui-accordion", inputs: ["closeOthers", "size"] }, { kind: "directive", type: i2$2.TuiAccordionDirective, selector: "button[tuiAccordion]", inputs: ["tuiAccordion"], outputs: ["tuiAccordionChange"] }, { kind: "component", type: i3$2.TuiExpand, selector: "tui-expand", inputs: ["expanded"] }, { kind: "directive", type: i4.TuiItem, selector: "[tuiItem]" }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { kind: "component", type: i3$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "component", type: i3$1.TuiOption, selector: "button[tuiOption]:not([new]), a[tuiOption]:not([new]), label[tuiOption]:not([new])", inputs: ["disabled", "value"] }, { kind: "directive", type: i3$1.TuiOptGroup, selector: "tui-opt-group", inputs: ["label"] }, { kind: "directive", type: TuiDocScrollIntoViewLink, selector: "[tuiDocScrollIntoViewLink]", inputs: ["tuiDocScrollIntoViewLink"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "ngmodule", type: TuiInputModule }, { kind: "directive", type: i6.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }, { kind: "component", type: i7.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i7.TuiTextfieldDirective, selector: "input[tuiTextfield]" }, { kind: "directive", type: i7.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "directive", type: i8.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1039
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocNavigation, isStandalone: true, selector: "tui-doc-navigation", host: { listeners: { "window:keydown": "onFocusSearch($event)" }, properties: { "class._open": "menuOpen" } }, providers: NAVIGATION_PROVIDERS, viewQueries: [{ propertyName: "searchInput", first: true, predicate: TuiTextfieldDirective, descendants: true, read: ElementRef }], ngImport: i0, template: "@if (searchEnabled()) {\n <tui-textfield\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n [iconStart]=\"docIcons.search\"\n [open]=\"open() && canOpen\"\n (keyup)=\"open.set(canOpen && $event.code !== 'Escape')\"\n (openChange)=\"open.set($event)\"\n >\n @if (!search.value) {\n <code class=\"t-slash\">/</code>\n }\n\n <input\n tuiTextfield\n class=\"t-prevent-ios-scroll\"\n [formControl]=\"search\"\n [placeholder]=\"searchText\"\n [tuiAutoFocus]=\"!!drawer\"\n />\n\n @if (canOpen) {\n <tui-data-list *tuiDropdown>\n @for (group of filtered(); track group) {\n <tui-opt-group [label]=\"labels[$index] || ''\">\n @for (item of group; track item) {\n @if (item.route.includes('://')) {\n <a\n tuiOption\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [target]=\"item.target || '_self'\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n } @else {\n <a\n tuiOption\n [attr.rel]=\"item.rel\"\n [fragment]=\"item.fragment\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n (click)=\"onClick()\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n }\n }\n </tui-opt-group>\n }\n </tui-data-list>\n }\n </tui-textfield>\n}\n\n<nav class=\"t-navigation\">\n <tui-scrollbar class=\"t-scrollbar\">\n <tui-accordion\n size=\"m\"\n [class.t-accordion-standalone]=\"!searchEnabled()\"\n [closeOthers]=\"false\"\n >\n @for (label of labels; track $index) {\n <button\n appearance=\"\"\n [tuiAccordion]=\"!!openPagesArr[$index]\"\n (tuiAccordionChange)=\"openPagesArr[$index] = !!$event\"\n >\n <span class=\"t-label\">\n <strong>{{ label }}</strong>\n </span>\n </button>\n <tui-expand [style.padding-block]=\"0\">\n <div\n *tuiItem\n class=\"t-section\"\n >\n @for (item of items[$index]; track $index) {\n <ng-container\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: $index * 100 + $index}\"\n />\n }\n </div>\n </tui-expand>\n }\n </tui-accordion>\n <div class=\"t-items-container\">\n @for (item of itemsWithoutSections; track item) {\n <ng-container\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: items.length - 1 + $index}\"\n />\n }\n </div>\n\n <ng-template\n #pages\n let-index=\"index\"\n let-item=\"item\"\n >\n @if (!item.subPages) {\n @if (item.route.includes('://')) {\n <a\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [target]=\"item.target || '_self'\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n } @else {\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n [tuiDocScrollIntoViewLink]=\"isActive(item.route)\"\n (click)=\"closeMenu()\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n }\n } @else {\n <div\n routerLinkActive\n class=\"t-subsection\"\n [routerLinkActiveOptions]=\"{exact: false}\"\n >\n @if (item.subPages) {\n <button\n tuiLink\n type=\"button\"\n class=\"t-sublink t-sublink_subsection\"\n (click)=\"onGroupClick(index)\"\n >\n <tui-icon\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesGroupsArr[index]\"\n [icon]=\"icons.more\"\n />\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </button>\n }\n\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"!!openPagesGroupsArr[index]\"\n >\n <div class=\"t-section t-section_bordered\">\n @for (subPage of $pages(item.subPages); track subPage) {\n @if (subPage.route.includes('://')) {\n <a\n tuiLink\n class=\"t-sublink t-sublink_small\"\n [attr.rel]=\"subPage.rel\"\n [href]=\"subPage.route\"\n [target]=\"subPage.target || '_self'\"\n >\n {{ subPage.title }}\n <tui-icon\n *polymorpheusOutlet=\"subPage.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n } @else {\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink t-sublink_small\"\n [attr.rel]=\"subPage.rel\"\n [fragment]=\"subPage.fragment\"\n [routerLink]=\"subPage.route\"\n [target]=\"subPage.target || '_self'\"\n [tuiDocScrollIntoViewLink]=\"isActive(subPage.route)\"\n (click)=\"closeMenu()\"\n >\n {{ subPage.title }}\n <tui-icon\n *polymorpheusOutlet=\"subPage.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n }\n }\n </div>\n </tui-expand>\n </div>\n }\n </ng-template>\n </tui-scrollbar>\n</nav>\n\n<ng-content />\n", styles: [":host{z-index:1;display:flex;flex-direction:column;text-align:center;background:var(--tui-background-base)}.t-input{margin:1.25rem}.t-slash{block-size:1rem;font-size:.5rem}.t-navigation{display:flex;max-block-size:100%;min-block-size:0;flex:1 1 0;text-align:start}.t-navigation tui-scrollbar{overscroll-behavior:none}:host-context(tui-drawer){margin:-1.25rem -1.5rem}:host-context(tui-drawer) .t-scrollbar{display:contents}.t-accordion-standalone{margin-block-start:1rem}.t-scrollbar{scroll-behavior:var(--tui-scroll-behavior);inline-size:100%}.t-items-container{display:flex;flex-direction:column;padding:0 1rem}.t-label{margin-inline-start:.5rem}.t-expand{margin-inline-start:.25rem;padding-block:0}.t-section{display:flex;flex-direction:column;align-items:flex-start}.t-section_bordered{margin:.5rem 0;border-inline-start:1px solid var(--tui-border-normal)}@supports (-webkit-touch-callout: none){.t-prevent-ios-scroll:focus{animation:tuiPreventIOSScroll 1ms}}@keyframes tuiPreventIOSScroll{0%{opacity:0}to{opacity:1}}.t-subsection{margin-inline-start:.5rem}.t-sublink{font:var(--tui-font-text-m);margin-inline-start:.5rem;padding:.5rem 0;text-decoration:none}.t-sublink_small{margin-inline-start:1rem;line-height:1.5rem;padding-block-start:.5rem}.t-sublink_subsection{margin-inline-start:0;line-height:1.6rem}.t-sublink.t-sublink.t-sublink_active{color:var(--tui-text-primary)}.t-icon{margin-inline-start:.5rem}.t-chevron{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font-size:1rem;margin:-.25rem .25rem 0 -.1875rem}.t-chevron_active{transform:rotate(90deg)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i2$2.TuiAccordionComponent, selector: "tui-accordion", inputs: ["closeOthers", "size"] }, { kind: "directive", type: i2$2.TuiAccordionDirective, selector: "button[tuiAccordion]", inputs: ["tuiAccordion"], outputs: ["tuiAccordionChange"] }, { kind: "component", type: i3$3.TuiExpand, selector: "tui-expand", inputs: ["expanded"] }, { kind: "directive", type: i1$2.TuiItem, selector: "[tuiItem]" }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { kind: "component", type: i3$2.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "component", type: i3$2.TuiOption, selector: "button[tuiOption]:not([new]), a[tuiOption]:not([new]), label[tuiOption]:not([new])", inputs: ["disabled", "value"] }, { kind: "directive", type: i3$2.TuiOptGroup, selector: "tui-opt-group", inputs: ["label"] }, { kind: "directive", type: TuiDocScrollIntoViewLink, selector: "[tuiDocScrollIntoViewLink]", inputs: ["tuiDocScrollIntoViewLink"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "ngmodule", type: TuiInputModule }, { kind: "directive", type: i6.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }, { kind: "component", type: i5.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i5.TuiTextfieldDirective, selector: "input[tuiTextfield]" }, { kind: "directive", type: i5.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "directive", type: i9.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1105
1040
|
}
|
|
1106
1041
|
__decorate([
|
|
1107
1042
|
tuiPure
|
|
@@ -1159,66 +1094,43 @@ class TuiDocSeeAlso {
|
|
|
1159
1094
|
constructor() {
|
|
1160
1095
|
this.pages = inject(TUI_DOC_MAP_PAGES);
|
|
1161
1096
|
this.text = inject(TUI_DOC_SEE_ALSO_TEXT);
|
|
1162
|
-
this.seeAlso = [];
|
|
1097
|
+
this.seeAlso = input([]);
|
|
1163
1098
|
}
|
|
1164
1099
|
getRouterLink(pageTitle) {
|
|
1165
1100
|
return this.pages.get(pageTitle)?.route ?? '';
|
|
1166
1101
|
}
|
|
1167
1102
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocSeeAlso, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1168
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocSeeAlso, isStandalone: true, selector: "tui-doc-see-also", inputs: { seeAlso: "seeAlso" }, ngImport: i0, template: "<h5 class=\"t-header\">{{ text }}</h5>\n@for (item of seeAlso; track item) {\n <a\n tuiLink\n [innerText]=\"item\"\n [routerLink]=\"getRouterLink(item)\"\n ></a>\n @if (!$last) {\n <span>{{ ', ' }}</span>\n }\n}\n", styles: [":host{display:block}.t-header{font-size:.6875rem;line-height:1rem;text-transform:uppercase;letter-spacing:.075em;color:var(--tui-text-secondary);margin:0 0 .5rem;white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1103
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocSeeAlso, isStandalone: true, selector: "tui-doc-see-also", inputs: { seeAlso: { classPropertyName: "seeAlso", publicName: "seeAlso", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<h5 class=\"t-header\">{{ text }}</h5>\n@for (item of seeAlso(); track item) {\n <a\n tuiLink\n [innerText]=\"item\"\n [routerLink]=\"getRouterLink(item)\"\n ></a>\n @if (!$last) {\n <span>{{ ', ' }}</span>\n }\n}\n", styles: [":host{display:block}.t-header{font-size:.6875rem;line-height:1rem;text-transform:uppercase;letter-spacing:.075em;color:var(--tui-text-secondary);margin:0 0 .5rem;white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1169
1104
|
}
|
|
1170
1105
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocSeeAlso, decorators: [{
|
|
1171
1106
|
type: Component,
|
|
1172
|
-
args: [{ selector: 'tui-doc-see-also', imports: [RouterLink, TuiLink], changeDetection: ChangeDetectionStrategy.OnPush, template: "<h5 class=\"t-header\">{{ text }}</h5>\n@for (item of seeAlso; track item) {\n <a\n tuiLink\n [innerText]=\"item\"\n [routerLink]=\"getRouterLink(item)\"\n ></a>\n @if (!$last) {\n <span>{{ ', ' }}</span>\n }\n}\n", styles: [":host{display:block}.t-header{font-size:.6875rem;line-height:1rem;text-transform:uppercase;letter-spacing:.075em;color:var(--tui-text-secondary);margin:0 0 .5rem;white-space:nowrap}\n"] }]
|
|
1173
|
-
}]
|
|
1174
|
-
type: Input
|
|
1175
|
-
}] } });
|
|
1107
|
+
args: [{ selector: 'tui-doc-see-also', imports: [RouterLink, TuiLink], changeDetection: ChangeDetectionStrategy.OnPush, template: "<h5 class=\"t-header\">{{ text }}</h5>\n@for (item of seeAlso(); track item) {\n <a\n tuiLink\n [innerText]=\"item\"\n [routerLink]=\"getRouterLink(item)\"\n ></a>\n @if (!$last) {\n <span>{{ ', ' }}</span>\n }\n}\n", styles: [":host{display:block}.t-header{font-size:.6875rem;line-height:1rem;text-transform:uppercase;letter-spacing:.075em;color:var(--tui-text-secondary);margin:0 0 .5rem;white-space:nowrap}\n"] }]
|
|
1108
|
+
}] });
|
|
1176
1109
|
|
|
1177
1110
|
class TuiDocSourceCode {
|
|
1178
1111
|
constructor() {
|
|
1179
1112
|
this.icons = inject(TUI_DOC_ICONS);
|
|
1180
1113
|
this.sourceCode = inject(TUI_DOC_SOURCE_CODE);
|
|
1181
1114
|
this.text = inject(TUI_DOC_SOURCE_CODE_TEXT);
|
|
1182
|
-
this.header = '';
|
|
1183
|
-
this.package = '';
|
|
1184
|
-
this.type = '';
|
|
1185
|
-
this.path = '';
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
getPathOptions(header, packageName, type, path) {
|
|
1194
|
-
return {
|
|
1195
|
-
header,
|
|
1196
|
-
package: packageName,
|
|
1197
|
-
type,
|
|
1198
|
-
path,
|
|
1199
|
-
};
|
|
1115
|
+
this.header = input('');
|
|
1116
|
+
this.package = input('');
|
|
1117
|
+
this.type = input('');
|
|
1118
|
+
this.path = input('');
|
|
1119
|
+
this.pathOptions = computed(() => ({
|
|
1120
|
+
header: this.header(),
|
|
1121
|
+
package: this.package(),
|
|
1122
|
+
type: this.type(),
|
|
1123
|
+
path: this.path(),
|
|
1124
|
+
}));
|
|
1125
|
+
this.pathIsUrl = computed(() => this.path()?.startsWith('http') ?? false);
|
|
1200
1126
|
}
|
|
1201
1127
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocSourceCode, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1202
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1128
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: TuiDocSourceCode, isStandalone: true, selector: "tui-doc-source-code", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, package: { classPropertyName: "package", publicName: "package", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, path: { classPropertyName: "path", publicName: "path", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<a\n *polymorpheusOutlet=\"pathIsUrl() ? path() : sourceCode as link; context: pathOptions()\"\n appearance=\"icon\"\n size=\"s\"\n target=\"_blank\"\n tuiIconButton\n type=\"button\"\n [href]=\"link\"\n [iconStart]=\"icons.code\"\n [style.height]=\"'var(--tui-height-l)'\"\n>\n {{ text }}\n</a>\n", dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1203
1129
|
}
|
|
1204
|
-
__decorate([
|
|
1205
|
-
tuiPure
|
|
1206
|
-
], TuiDocSourceCode.prototype, "pathIsUrl", null);
|
|
1207
|
-
__decorate([
|
|
1208
|
-
tuiPure
|
|
1209
|
-
], TuiDocSourceCode.prototype, "getPathOptions", null);
|
|
1210
1130
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocSourceCode, decorators: [{
|
|
1211
1131
|
type: Component,
|
|
1212
|
-
args: [{ selector: 'tui-doc-source-code', imports: [PolymorpheusOutlet, TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a\n *polymorpheusOutlet=\"pathIsUrl(
|
|
1213
|
-
}]
|
|
1214
|
-
type: Input
|
|
1215
|
-
}], package: [{
|
|
1216
|
-
type: Input
|
|
1217
|
-
}], type: [{
|
|
1218
|
-
type: Input
|
|
1219
|
-
}], path: [{
|
|
1220
|
-
type: Input
|
|
1221
|
-
}], pathIsUrl: [], getPathOptions: [] } });
|
|
1132
|
+
args: [{ selector: 'tui-doc-source-code', imports: [PolymorpheusOutlet, TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a\n *polymorpheusOutlet=\"pathIsUrl() ? path() : sourceCode as link; context: pathOptions()\"\n appearance=\"icon\"\n size=\"s\"\n target=\"_blank\"\n tuiIconButton\n type=\"button\"\n [href]=\"link\"\n [iconStart]=\"icons.code\"\n [style.height]=\"'var(--tui-height-l)'\"\n>\n {{ text }}\n</a>\n" }]
|
|
1133
|
+
}] });
|
|
1222
1134
|
|
|
1223
1135
|
class TuiDocLanguageSwitcher {
|
|
1224
1136
|
constructor() {
|
|
@@ -1257,7 +1169,7 @@ class TuiDocLanguageSwitcher {
|
|
|
1257
1169
|
this.open = false;
|
|
1258
1170
|
}
|
|
1259
1171
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocLanguageSwitcher, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1260
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocLanguageSwitcher, isStandalone: true, selector: "tui-doc-language-switcher", providers: [tuiScrollbarOptionsProvider({ mode: 'hover' })], ngImport: i0, template: "<tui-badged-content>\n <img\n alt=\"\"\n size=\"s\"\n tuiBadge\n tuiSlot=\"bottom\"\n [src]=\"flags.get(language.value ?? '') || flags.get(switcher.language) | tuiFlag\"\n />\n\n <button\n appearance=\"outline-grayscale\"\n size=\"s\"\n tuiButtonSelect\n tuiIconButton\n type=\"button\"\n [formControl]=\"language\"\n [iconStart]=\"icons.languages\"\n >\n Language\n <tui-data-list *tuiDropdown>\n <tui-opt-group label=\"Language of components\">\n @for (name of names; track name) {\n <button\n new\n tuiOption\n type=\"button\"\n [value]=\"name | titlecase\"\n (click)=\"setLang(name)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"flags.get(name) | tuiFlag\"\n />\n {{ name | titlecase }}\n </button>\n }\n </tui-opt-group>\n </tui-data-list>\n </button>\n</tui-badged-content>\n", styles: [".t-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:50%;margin-inline-end:.5rem}[tuiOption]{justify-content:flex-start;gap:.5rem}img{box-shadow:inset 0 0 0 1px var(--tui-border-normal)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "directive", type: TuiBadge, selector: "tui-badge,[tuiBadge],tui-icon[tuiBadge]", inputs: ["size"] }, { kind: "directive", type: i2$3.TuiBadgedContentDirective, selector: "[tuiSlot]", inputs: ["tuiSlot"] }, { kind: "component", type: i2$3.TuiBadgedContentComponent, selector: "tui-badged-content" }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiButtonSelect, selector: "button[tuiButtonSelect]" }, { kind: "component", type: i3$
|
|
1172
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocLanguageSwitcher, isStandalone: true, selector: "tui-doc-language-switcher", providers: [tuiScrollbarOptionsProvider({ mode: 'hover' })], ngImport: i0, template: "<tui-badged-content>\n <img\n alt=\"\"\n size=\"s\"\n tuiBadge\n tuiSlot=\"bottom\"\n [src]=\"flags.get(language.value ?? '') || flags.get(switcher.language) | tuiFlag\"\n />\n\n <button\n appearance=\"outline-grayscale\"\n size=\"s\"\n tuiButtonSelect\n tuiIconButton\n type=\"button\"\n [formControl]=\"language\"\n [iconStart]=\"icons.languages\"\n >\n Language\n <tui-data-list *tuiDropdown>\n <tui-opt-group label=\"Language of components\">\n @for (name of names; track name) {\n <button\n new\n tuiOption\n type=\"button\"\n [value]=\"name | titlecase\"\n (click)=\"setLang(name)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"flags.get(name) | tuiFlag\"\n />\n {{ name | titlecase }}\n </button>\n }\n </tui-opt-group>\n </tui-data-list>\n </button>\n</tui-badged-content>\n", styles: [".t-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:50%;margin-inline-end:.5rem}[tuiOption]{justify-content:flex-start;gap:.5rem}img{box-shadow:inset 0 0 0 1px var(--tui-border-normal)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "directive", type: TuiBadge, selector: "tui-badge,[tuiBadge],tui-icon[tuiBadge]", inputs: ["size"] }, { kind: "directive", type: i2$3.TuiBadgedContentDirective, selector: "[tuiSlot]", inputs: ["tuiSlot"] }, { kind: "component", type: i2$3.TuiBadgedContentComponent, selector: "tui-badged-content" }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiButtonSelect, selector: "button[tuiButtonSelect]" }, { kind: "component", type: i3$2.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i3$2.TuiOptionNew, selector: "button[tuiOption][new], a[tuiOption][new], label[tuiOption][new]", inputs: ["disabled"] }, { kind: "directive", type: i3$2.TuiOptionWithValue, selector: "button[tuiOption][value][new], a[tuiOption][value][new], label[tuiOption][value][new]", inputs: ["disabled", "value"] }, { kind: "directive", type: i3$2.TuiOptGroup, selector: "tui-opt-group", inputs: ["label"] }, { kind: "pipe", type: TuiFlagPipe, name: "tuiFlag" }, { kind: "directive", type: i6.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1261
1173
|
}
|
|
1262
1174
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocLanguageSwitcher, decorators: [{
|
|
1263
1175
|
type: Component,
|
|
@@ -1315,27 +1227,25 @@ const PAGE_PROVIDERS = [
|
|
|
1315
1227
|
.join()
|
|
1316
1228
|
.split(',')
|
|
1317
1229
|
.filter((component) => component && component !== currentHeader));
|
|
1318
|
-
return Array.from(seeAlsoSet);
|
|
1230
|
+
return signal(Array.from(seeAlsoSet));
|
|
1319
1231
|
},
|
|
1320
1232
|
},
|
|
1321
1233
|
];
|
|
1322
1234
|
|
|
1323
1235
|
class TuiDocPageTabConnector {
|
|
1324
1236
|
constructor() {
|
|
1237
|
+
this.pageTab = input();
|
|
1325
1238
|
this.template = inject((TemplateRef));
|
|
1326
1239
|
}
|
|
1327
1240
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocPageTabConnector, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1328
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1241
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiDocPageTabConnector, isStandalone: true, selector: "ng-template[pageTab]", inputs: { pageTab: { classPropertyName: "pageTab", publicName: "pageTab", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
1329
1242
|
}
|
|
1330
1243
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocPageTabConnector, decorators: [{
|
|
1331
1244
|
type: Directive,
|
|
1332
1245
|
args: [{
|
|
1333
|
-
standalone: true,
|
|
1334
1246
|
selector: 'ng-template[pageTab]',
|
|
1335
1247
|
}]
|
|
1336
|
-
}]
|
|
1337
|
-
type: Input
|
|
1338
|
-
}] } });
|
|
1248
|
+
}] });
|
|
1339
1249
|
|
|
1340
1250
|
class TuiDocPage {
|
|
1341
1251
|
constructor() {
|
|
@@ -1344,21 +1254,21 @@ class TuiDocPage {
|
|
|
1344
1254
|
this.defaultTabs = inject(TUI_DOC_DEFAULT_TABS);
|
|
1345
1255
|
this.from = / /g;
|
|
1346
1256
|
this.to = '_';
|
|
1347
|
-
this.header = '';
|
|
1348
|
-
this.package = '';
|
|
1349
|
-
this.type = '';
|
|
1350
|
-
this.tags = [];
|
|
1351
|
-
this.path = '';
|
|
1352
|
-
this.deprecated = false;
|
|
1257
|
+
this.header = input('');
|
|
1258
|
+
this.package = input('');
|
|
1259
|
+
this.type = input('');
|
|
1260
|
+
this.tags = input([]);
|
|
1261
|
+
this.path = input('');
|
|
1262
|
+
this.deprecated = input(false);
|
|
1353
1263
|
this.tabConnectors = EMPTY_QUERY;
|
|
1354
|
-
this.activeItemIndex = 0;
|
|
1264
|
+
this.activeItemIndex = model(0);
|
|
1355
1265
|
this.seeAlso = inject(PAGE_SEE_ALSO);
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1266
|
+
this.showSeeAlso = computed(() => {
|
|
1267
|
+
return !!this.seeAlso().length && this.activeItemIndex() === 0;
|
|
1268
|
+
});
|
|
1359
1269
|
}
|
|
1360
1270
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1361
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocPage, isStandalone: true, selector: "tui-doc-page", inputs: { header: "header", package: "package", type: "type", tags: "tags", path: "path", deprecated: "deprecated" }, providers: PAGE_PROVIDERS, queries: [{ propertyName: "tabConnectors", predicate: TuiDocPageTabConnector }], ngImport: i0, template: "<header class=\"t-header\">\n @if (header) {\n <h1 class=\"t-title\">\n {{ header }}\n @if (!!deprecated || deprecated === '') {\n <tui-chip\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_deprecated\"\n >\n deprecated\n </tui-chip>\n }\n @if (package) {\n <tui-chip\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_package\"\n [style.background]=\"package | tuiAutoColor\"\n >\n {{ package }}\n </tui-chip>\n }\n @for (tag of tags; track tag) {\n <tui-chip\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_package\"\n [style.background]=\"tag | tuiAutoColor\"\n >\n {{ tag }}\n </tui-chip>\n }\n </h1>\n }\n @if (tabConnectors.length) {\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n @for (tab of tabConnectors; track tab) {\n @if (tab.pageTab || defaultTabs[$index]; as tabName) {\n <a\n *tuiItem\n routerLinkActive\n tuiTab\n [routerLink]=\"$first ? './' : (tabName | tuiReplace: from : to)\"\n [routerLinkActiveOptions]=\"{exact: $first}\"\n >\n {{ tabName }}\n </a>\n }\n }\n @for (tab of tabs | keyvalue; track tab) {\n <a\n *tuiItem\n routerLinkActive\n tuiTab\n [routerLink]=\"tab.key\"\n >\n {{ tab.key }}\n </a>\n }\n </tui-tabs-with-more>\n }\n\n @if (package || path || type) {\n <div class=\"t-right-side\">\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header\"\n [package]=\"package\"\n [path]=\"path\"\n [type]=\"type\"\n />\n @if (supportLanguage.has(header)) {\n <tui-doc-language-switcher />\n }\n </div>\n }\n</header>\n<div class=\"t-content\">\n <ng-content />\n @if (showSeeAlso) {\n <tui-doc-see-also\n class=\"t-see-also\"\n [seeAlso]=\"seeAlso\"\n />\n }\n @for (tab of tabConnectors; track tab) {\n @if ($index === activeItemIndex) {\n <ng-container [ngTemplateOutlet]=\"tab.template\" />\n }\n }\n @for (tab of tabs | keyvalue; track tab) {\n @if ($index + tabConnectors.length === activeItemIndex) {\n <ng-container *polymorpheusOutlet=\"tab.value as text\">{{ text }}</ng-container>\n }\n }\n</div>\n", styles: [":host{display:flex;flex-direction:column;min-block-size:0;flex-basis:0;flex-grow:1;font:var(--tui-font-text-m)}.t-header{display:flex;font:var(--tui-font-heading-3);flex-wrap:wrap;color:var(--tui-text-primary);box-shadow:inset 0 -1px 0 0 var(--tui-border-normal);box-sizing:border-box;flex-shrink:0;margin:0 min(10vw,8.75rem)}@media screen and (max-width: 47.9625em){.t-header{font:var(--tui-font-heading-4);min-block-size:4.5rem;padding:0 1.25rem;margin:0}}.t-title{min-inline-size:100%;padding:3.75rem 0 0;font-size:inherit;margin:0}@media screen and (max-width: 47.9625em){.t-title{padding:1.25rem 0 0}}.t-tag{vertical-align:middle;text-transform:uppercase;margin-inline-end:.5rem}.t-tag_deprecated{background-color:var(--tui-status-negative);color:#fff}.t-tag.t-tag_package{color:#000}.t-tabs{flex:1;margin:1.125rem .3125rem 0 0;box-shadow:none}@media screen and (max-width: 47.9625em){.t-tabs{margin-block-start:.25rem}}.t-content{padding:2rem 0;margin:0 min(10vw,8.75rem)}@media screen and (max-width: 47.9625em){.t-content{padding:2rem 1.25rem;margin:0}}.t-see-also{min-inline-size:18.75rem;inline-size:30%;float:inline-end;margin:0 0 1rem;margin-inline-start:1.5rem}@media screen and (max-width: 47.9625em){.t-see-also{float:none;inline-size:100%;margin:0 0 1.5rem}}.t-right-side{display:flex;gap:1rem;align-items:center;align-self:center;margin-inline-start:auto}.t-source-code{block-size:3.125rem}\n"], dependencies: [{ kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "pipe", type: TuiAutoColorPipe, name: "tuiAutoColor" }, { kind: "directive", type: TuiChip, selector: "tui-chip,[tuiChip]", inputs: ["size"] }, { kind: "component", type: TuiDocLanguageSwitcher, selector: "tui-doc-language-switcher" }, { kind: "component", type: TuiDocSeeAlso, selector: "tui-doc-see-also", inputs: ["seeAlso"] }, { kind: "component", type: TuiDocSourceCode, selector: "tui-doc-source-code", inputs: ["header", "package", "type", "path"] }, { kind: "pipe", type: TuiReplacePipe, name: "tuiReplace" }, { kind: "directive", type:
|
|
1271
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocPage, isStandalone: true, selector: "tui-doc-page", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, package: { classPropertyName: "package", publicName: "package", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, tags: { classPropertyName: "tags", publicName: "tags", isSignal: true, isRequired: false, transformFunction: null }, path: { classPropertyName: "path", publicName: "path", isSignal: true, isRequired: false, transformFunction: null }, deprecated: { classPropertyName: "deprecated", publicName: "deprecated", isSignal: true, isRequired: false, transformFunction: null }, activeItemIndex: { classPropertyName: "activeItemIndex", publicName: "activeItemIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeItemIndex: "activeItemIndexChange" }, providers: PAGE_PROVIDERS, queries: [{ propertyName: "tabConnectors", predicate: TuiDocPageTabConnector }], ngImport: i0, template: "<header class=\"t-header\">\n @if (header()) {\n <h1 class=\"t-title\">\n {{ header() }}\n @if (!!deprecated() || deprecated() === '') {\n <tui-chip\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_deprecated\"\n >\n deprecated\n </tui-chip>\n }\n @if (package()) {\n <tui-chip\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_package\"\n [style.background]=\"package() | tuiAutoColor\"\n >\n {{ package() }}\n </tui-chip>\n }\n @for (tag of tags(); track tag) {\n <tui-chip\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_package\"\n [style.background]=\"tag | tuiAutoColor\"\n >\n {{ tag }}\n </tui-chip>\n }\n </h1>\n }\n @if (tabConnectors.length) {\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n @for (tab of tabConnectors; track tab) {\n @if (tab.pageTab() || defaultTabs[$index]; as tabName) {\n <a\n *tuiItem\n routerLinkActive\n tuiTab\n [routerLink]=\"$first ? './' : (tabName | tuiReplace: from : to)\"\n [routerLinkActiveOptions]=\"{exact: $first}\"\n >\n {{ tabName }}\n </a>\n }\n }\n @for (tab of tabs | keyvalue; track tab) {\n <a\n *tuiItem\n routerLinkActive\n tuiTab\n [routerLink]=\"tab.key\"\n >\n {{ tab.key }}\n </a>\n }\n </tui-tabs-with-more>\n }\n\n @if (package() || path() || type()) {\n <div class=\"t-right-side\">\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header()\"\n [package]=\"package()\"\n [path]=\"path()\"\n [type]=\"type()\"\n />\n @if (supportLanguage.has(header())) {\n <tui-doc-language-switcher />\n }\n </div>\n }\n</header>\n<div class=\"t-content\">\n <ng-content />\n @if (showSeeAlso()) {\n <tui-doc-see-also\n class=\"t-see-also\"\n [seeAlso]=\"seeAlso()\"\n />\n }\n @for (tab of tabConnectors; track tab) {\n @if ($index === activeItemIndex()) {\n <ng-container [ngTemplateOutlet]=\"tab.template\" />\n }\n }\n @for (tab of tabs | keyvalue; track tab) {\n @if ($index + tabConnectors.length === activeItemIndex()) {\n <ng-container *polymorpheusOutlet=\"tab.value as text\">{{ text }}</ng-container>\n }\n }\n</div>\n", styles: [":host{display:flex;flex-direction:column;min-block-size:0;flex-basis:0;flex-grow:1;font:var(--tui-font-text-m)}.t-header{display:flex;font:var(--tui-font-heading-3);flex-wrap:wrap;color:var(--tui-text-primary);box-shadow:inset 0 -1px 0 0 var(--tui-border-normal);box-sizing:border-box;flex-shrink:0;margin:0 min(10vw,8.75rem)}@media screen and (max-width: 47.9625em){.t-header{font:var(--tui-font-heading-4);min-block-size:4.5rem;padding:0 1.25rem;margin:0}}.t-title{min-inline-size:100%;padding:3.75rem 0 0;font-size:inherit;margin:0}@media screen and (max-width: 47.9625em){.t-title{padding:1.25rem 0 0}}.t-tag{vertical-align:middle;text-transform:uppercase;margin-inline-end:.5rem}.t-tag_deprecated{background-color:var(--tui-status-negative);color:#fff}.t-tag.t-tag_package{color:#000}.t-tabs{flex:1;margin:1.125rem .3125rem 0 0;box-shadow:none}@media screen and (max-width: 47.9625em){.t-tabs{margin-block-start:.25rem}}.t-content{padding:2rem 0;margin:0 min(10vw,8.75rem)}@media screen and (max-width: 47.9625em){.t-content{padding:2rem 1.25rem;margin:0}}.t-see-also{min-inline-size:18.75rem;inline-size:30%;float:inline-end;margin:0 0 1rem;margin-inline-start:1.5rem}@media screen and (max-width: 47.9625em){.t-see-also{float:none;inline-size:100%;margin:0 0 1.5rem}}.t-right-side{display:flex;gap:1rem;align-items:center;align-self:center;margin-inline-start:auto}.t-source-code{block-size:3.125rem}\n"], dependencies: [{ kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "pipe", type: TuiAutoColorPipe, name: "tuiAutoColor" }, { kind: "directive", type: TuiChip, selector: "tui-chip,[tuiChip]", inputs: ["size"] }, { kind: "component", type: TuiDocLanguageSwitcher, selector: "tui-doc-language-switcher" }, { kind: "component", type: TuiDocSeeAlso, selector: "tui-doc-see-also", inputs: ["seeAlso"] }, { kind: "component", type: TuiDocSourceCode, selector: "tui-doc-source-code", inputs: ["header", "package", "type", "path"] }, { kind: "pipe", type: TuiReplacePipe, name: "tuiReplace" }, { kind: "directive", type: i1$2.TuiItem, selector: "[tuiItem]" }, { kind: "directive", type: i2$1.TuiTab, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { kind: "component", type: i2$1.TuiTabsWithMore, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["size", "moreContent", "dropdownContent", "underline", "itemsLimit", "activeItemIndex"], outputs: ["activeItemIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1362
1272
|
}
|
|
1363
1273
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocPage, decorators: [{
|
|
1364
1274
|
type: Component,
|
|
@@ -1375,20 +1285,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
1375
1285
|
TuiDocSourceCode,
|
|
1376
1286
|
TuiReplacePipe,
|
|
1377
1287
|
TuiTabs,
|
|
1378
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, providers: PAGE_PROVIDERS, template: "<header class=\"t-header\">\n @if (header) {\n <h1 class=\"t-title\">\n {{ header }}\n @if (!!deprecated || deprecated === '') {\n <tui-chip\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_deprecated\"\n >\n deprecated\n </tui-chip>\n }\n @if (package) {\n <tui-chip\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_package\"\n [style.background]=\"package | tuiAutoColor\"\n >\n {{ package }}\n </tui-chip>\n }\n @for (tag of tags; track tag) {\n <tui-chip\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_package\"\n [style.background]=\"tag | tuiAutoColor\"\n >\n {{ tag }}\n </tui-chip>\n }\n </h1>\n }\n @if (tabConnectors.length) {\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n @for (tab of tabConnectors; track tab) {\n @if (tab.pageTab || defaultTabs[$index]; as tabName) {\n <a\n *tuiItem\n routerLinkActive\n tuiTab\n [routerLink]=\"$first ? './' : (tabName | tuiReplace: from : to)\"\n [routerLinkActiveOptions]=\"{exact: $first}\"\n >\n {{ tabName }}\n </a>\n }\n }\n @for (tab of tabs | keyvalue; track tab) {\n <a\n *tuiItem\n routerLinkActive\n tuiTab\n [routerLink]=\"tab.key\"\n >\n {{ tab.key }}\n </a>\n }\n </tui-tabs-with-more>\n }\n\n @if (package || path || type) {\n <div class=\"t-right-side\">\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header\"\n [package]=\"package\"\n [path]=\"path\"\n [type]=\"type\"\n />\n @if (supportLanguage.has(header)) {\n <tui-doc-language-switcher />\n }\n </div>\n }\n</header>\n<div class=\"t-content\">\n <ng-content />\n @if (showSeeAlso) {\n <tui-doc-see-also\n class=\"t-see-also\"\n [seeAlso]=\"seeAlso\"\n />\n }\n @for (tab of tabConnectors; track tab) {\n @if ($index === activeItemIndex) {\n <ng-container [ngTemplateOutlet]=\"tab.template\" />\n }\n }\n @for (tab of tabs | keyvalue; track tab) {\n @if ($index + tabConnectors.length === activeItemIndex) {\n <ng-container *polymorpheusOutlet=\"tab.value as text\">{{ text }}</ng-container>\n }\n }\n</div>\n", styles: [":host{display:flex;flex-direction:column;min-block-size:0;flex-basis:0;flex-grow:1;font:var(--tui-font-text-m)}.t-header{display:flex;font:var(--tui-font-heading-3);flex-wrap:wrap;color:var(--tui-text-primary);box-shadow:inset 0 -1px 0 0 var(--tui-border-normal);box-sizing:border-box;flex-shrink:0;margin:0 min(10vw,8.75rem)}@media screen and (max-width: 47.9625em){.t-header{font:var(--tui-font-heading-4);min-block-size:4.5rem;padding:0 1.25rem;margin:0}}.t-title{min-inline-size:100%;padding:3.75rem 0 0;font-size:inherit;margin:0}@media screen and (max-width: 47.9625em){.t-title{padding:1.25rem 0 0}}.t-tag{vertical-align:middle;text-transform:uppercase;margin-inline-end:.5rem}.t-tag_deprecated{background-color:var(--tui-status-negative);color:#fff}.t-tag.t-tag_package{color:#000}.t-tabs{flex:1;margin:1.125rem .3125rem 0 0;box-shadow:none}@media screen and (max-width: 47.9625em){.t-tabs{margin-block-start:.25rem}}.t-content{padding:2rem 0;margin:0 min(10vw,8.75rem)}@media screen and (max-width: 47.9625em){.t-content{padding:2rem 1.25rem;margin:0}}.t-see-also{min-inline-size:18.75rem;inline-size:30%;float:inline-end;margin:0 0 1rem;margin-inline-start:1.5rem}@media screen and (max-width: 47.9625em){.t-see-also{float:none;inline-size:100%;margin:0 0 1.5rem}}.t-right-side{display:flex;gap:1rem;align-items:center;align-self:center;margin-inline-start:auto}.t-source-code{block-size:3.125rem}\n"] }]
|
|
1379
|
-
}], propDecorators: {
|
|
1380
|
-
type: Input
|
|
1381
|
-
}], package: [{
|
|
1382
|
-
type: Input
|
|
1383
|
-
}], type: [{
|
|
1384
|
-
type: Input
|
|
1385
|
-
}], tags: [{
|
|
1386
|
-
type: Input
|
|
1387
|
-
}], path: [{
|
|
1388
|
-
type: Input
|
|
1389
|
-
}], deprecated: [{
|
|
1390
|
-
type: Input
|
|
1391
|
-
}], tabConnectors: [{
|
|
1288
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: PAGE_PROVIDERS, template: "<header class=\"t-header\">\n @if (header()) {\n <h1 class=\"t-title\">\n {{ header() }}\n @if (!!deprecated() || deprecated() === '') {\n <tui-chip\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_deprecated\"\n >\n deprecated\n </tui-chip>\n }\n @if (package()) {\n <tui-chip\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_package\"\n [style.background]=\"package() | tuiAutoColor\"\n >\n {{ package() }}\n </tui-chip>\n }\n @for (tag of tags(); track tag) {\n <tui-chip\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_package\"\n [style.background]=\"tag | tuiAutoColor\"\n >\n {{ tag }}\n </tui-chip>\n }\n </h1>\n }\n @if (tabConnectors.length) {\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n @for (tab of tabConnectors; track tab) {\n @if (tab.pageTab() || defaultTabs[$index]; as tabName) {\n <a\n *tuiItem\n routerLinkActive\n tuiTab\n [routerLink]=\"$first ? './' : (tabName | tuiReplace: from : to)\"\n [routerLinkActiveOptions]=\"{exact: $first}\"\n >\n {{ tabName }}\n </a>\n }\n }\n @for (tab of tabs | keyvalue; track tab) {\n <a\n *tuiItem\n routerLinkActive\n tuiTab\n [routerLink]=\"tab.key\"\n >\n {{ tab.key }}\n </a>\n }\n </tui-tabs-with-more>\n }\n\n @if (package() || path() || type()) {\n <div class=\"t-right-side\">\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header()\"\n [package]=\"package()\"\n [path]=\"path()\"\n [type]=\"type()\"\n />\n @if (supportLanguage.has(header())) {\n <tui-doc-language-switcher />\n }\n </div>\n }\n</header>\n<div class=\"t-content\">\n <ng-content />\n @if (showSeeAlso()) {\n <tui-doc-see-also\n class=\"t-see-also\"\n [seeAlso]=\"seeAlso()\"\n />\n }\n @for (tab of tabConnectors; track tab) {\n @if ($index === activeItemIndex()) {\n <ng-container [ngTemplateOutlet]=\"tab.template\" />\n }\n }\n @for (tab of tabs | keyvalue; track tab) {\n @if ($index + tabConnectors.length === activeItemIndex()) {\n <ng-container *polymorpheusOutlet=\"tab.value as text\">{{ text }}</ng-container>\n }\n }\n</div>\n", styles: [":host{display:flex;flex-direction:column;min-block-size:0;flex-basis:0;flex-grow:1;font:var(--tui-font-text-m)}.t-header{display:flex;font:var(--tui-font-heading-3);flex-wrap:wrap;color:var(--tui-text-primary);box-shadow:inset 0 -1px 0 0 var(--tui-border-normal);box-sizing:border-box;flex-shrink:0;margin:0 min(10vw,8.75rem)}@media screen and (max-width: 47.9625em){.t-header{font:var(--tui-font-heading-4);min-block-size:4.5rem;padding:0 1.25rem;margin:0}}.t-title{min-inline-size:100%;padding:3.75rem 0 0;font-size:inherit;margin:0}@media screen and (max-width: 47.9625em){.t-title{padding:1.25rem 0 0}}.t-tag{vertical-align:middle;text-transform:uppercase;margin-inline-end:.5rem}.t-tag_deprecated{background-color:var(--tui-status-negative);color:#fff}.t-tag.t-tag_package{color:#000}.t-tabs{flex:1;margin:1.125rem .3125rem 0 0;box-shadow:none}@media screen and (max-width: 47.9625em){.t-tabs{margin-block-start:.25rem}}.t-content{padding:2rem 0;margin:0 min(10vw,8.75rem)}@media screen and (max-width: 47.9625em){.t-content{padding:2rem 1.25rem;margin:0}}.t-see-also{min-inline-size:18.75rem;inline-size:30%;float:inline-end;margin:0 0 1rem;margin-inline-start:1.5rem}@media screen and (max-width: 47.9625em){.t-see-also{float:none;inline-size:100%;margin:0 0 1.5rem}}.t-right-side{display:flex;gap:1rem;align-items:center;align-self:center;margin-inline-start:auto}.t-source-code{block-size:3.125rem}\n"] }]
|
|
1289
|
+
}], propDecorators: { tabConnectors: [{
|
|
1392
1290
|
type: ContentChildren,
|
|
1393
1291
|
args: [TuiDocPageTabConnector]
|
|
1394
1292
|
}] } });
|
|
@@ -1419,11 +1317,11 @@ class TuiDocThemeSwitcher {
|
|
|
1419
1317
|
this.location.reload();
|
|
1420
1318
|
}
|
|
1421
1319
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocThemeSwitcher, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1422
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocThemeSwitcher, isStandalone: true, selector: "tui-doc-theme-switcher", ngImport: i0, template: "<tui-textfield\n tuiChevron\n [tuiTextfieldCleaner]=\"false\"\n>\n <label tuiLabel>\n <ng-content />\n </label>\n <input\n tuiSelect\n [ngModel]=\"theme\"\n (ngModelChange)=\"onTheme($event)\"\n />\n <tui-data-list\n *tuiDropdown\n new\n >\n @for (key of keys; track key) {\n <button\n new\n tuiOption\n type=\"button\"\n [value]=\"key\"\n >\n <img\n alt=\"\"\n [src]=\"themes[key]\"\n [style.margin-inline-end.rem]=\"0.5\"\n [style.width.rem]=\"1.75\"\n />\n {{ key }}\n </button>\n }\n </tui-data-list>\n</tui-textfield>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$
|
|
1320
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDocThemeSwitcher, isStandalone: true, selector: "tui-doc-theme-switcher", ngImport: i0, template: "<tui-textfield\n tuiChevron\n [tuiTextfieldCleaner]=\"false\"\n>\n <label tuiLabel>\n <ng-content />\n </label>\n <input\n tuiSelect\n [ngModel]=\"theme\"\n (ngModelChange)=\"onTheme($event)\"\n />\n <tui-data-list\n *tuiDropdown\n new\n >\n @for (key of keys; track key) {\n <button\n new\n tuiOption\n type=\"button\"\n [value]=\"key\"\n >\n <img\n alt=\"\"\n [src]=\"themes[key]\"\n [style.margin-inline-end.rem]=\"0.5\"\n [style.width.rem]=\"1.75\"\n />\n {{ key }}\n </button>\n }\n </tui-data-list>\n</tui-textfield>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i3$2.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i3$2.TuiOptionNew, selector: "button[tuiOption][new], a[tuiOption][new], label[tuiOption][new]", inputs: ["disabled"] }, { kind: "directive", type: i3$2.TuiOptionWithValue, selector: "button[tuiOption][value][new], a[tuiOption][value][new], label[tuiOption][value][new]", inputs: ["disabled", "value"] }, { kind: "directive", type: i3$1.TuiSelectDirective, selector: "input[tuiSelect]" }, { kind: "directive", type: i4.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i5.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i5.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i6.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1423
1321
|
}
|
|
1424
1322
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDocThemeSwitcher, decorators: [{
|
|
1425
1323
|
type: Component,
|
|
1426
|
-
args: [{ selector: 'tui-doc-theme-switcher', imports: [FormsModule, TuiDataList, TuiSelect, TuiTextfield
|
|
1324
|
+
args: [{ selector: 'tui-doc-theme-switcher', imports: [FormsModule, TuiChevron, TuiDataList, TuiSelect, TuiTextfield], changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-textfield\n tuiChevron\n [tuiTextfieldCleaner]=\"false\"\n>\n <label tuiLabel>\n <ng-content />\n </label>\n <input\n tuiSelect\n [ngModel]=\"theme\"\n (ngModelChange)=\"onTheme($event)\"\n />\n <tui-data-list\n *tuiDropdown\n new\n >\n @for (key of keys; track key) {\n <button\n new\n tuiOption\n type=\"button\"\n [value]=\"key\"\n >\n <img\n alt=\"\"\n [src]=\"themes[key]\"\n [style.margin-inline-end.rem]=\"0.5\"\n [style.width.rem]=\"1.75\"\n />\n {{ key }}\n </button>\n }\n </tui-data-list>\n</tui-textfield>\n" }]
|
|
1427
1325
|
}] });
|
|
1428
1326
|
|
|
1429
1327
|
/**
|