@taiga-ui/addon-doc 4.65.0 → 5.0.0-canary.8b64ec1
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 +12 -9
- package/components/{documentation/pipes → api}/inspect.pipe.d.ts +1 -1
- package/components/{documentation/pipes → api}/type-reference.pipe.d.ts +3 -3
- package/components/code/index.d.ts +9 -6
- package/components/copy/index.d.ts +1 -1
- package/components/demo/index.d.ts +14 -9
- package/components/doc-tab/index.d.ts +2 -2
- package/components/example/example.component.d.ts +13 -16
- package/components/example/example.options.d.ts +1 -3
- package/components/index.d.ts +0 -10
- package/components/internal/header/index.d.ts +3 -4
- package/components/internal/see-also/index.d.ts +2 -2
- package/components/internal/source-code/source-code.component.d.ts +7 -8
- package/components/language-switcher/index.d.ts +1 -1
- package/components/main/main.component.d.ts +1 -2
- package/components/navigation/navigation.component.d.ts +6 -5
- package/components/navigation/scroll-into-view.directive.d.ts +5 -3
- package/components/page/page-tab.directive.d.ts +2 -2
- package/components/page/page.component.d.ts +12 -15
- package/components/page/page.providers.d.ts +2 -11
- package/fesm2022/taiga-ui-addon-doc-components.mjs +282 -740
- package/fesm2022/taiga-ui-addon-doc-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-doc-services.mjs +4 -4
- package/fesm2022/taiga-ui-addon-doc-services.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-types.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-doc-utils.mjs +7 -8
- package/fesm2022/taiga-ui-addon-doc-utils.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-doc.mjs +1 -7
- package/fesm2022/taiga-ui-addon-doc.mjs.map +1 -1
- package/index.d.ts +2 -4
- package/package.json +21 -36
- package/tokens/doc-icons.d.ts +2 -3
- package/types/page.d.ts +1 -1
- package/utils/inspect.d.ts +1 -1
- package/utils/provide-route-page-tab.d.ts +3 -4
- package/components/documentation/documentation-property-connector.directive.d.ts +0 -32
- package/components/documentation/documentation.component.d.ts +0 -23
- package/components/documentation/pipes/cleaner.pipe.d.ts +0 -7
- package/components/documentation/pipes/color.pipe.d.ts +0 -7
- package/components/documentation/pipes/opacity.pipe.d.ts +0 -7
- package/components/documentation/pipes/optional.pipe.d.ts +0 -7
- package/components/documentation/pipes/primitive-polymorpheus-content.pipe.d.ts +0 -7
- package/components/documentation/pipes/strip-optional.pipe.d.ts +0 -7
- package/directives/index.d.ts +0 -1
- package/directives/text-code/text-code.directive.d.ts +0 -9
- package/esm2022/components/api/api-item-number.directive.mjs +0 -23
- package/esm2022/components/api/api-item.component.mjs +0 -118
- package/esm2022/components/api/api.component.mjs +0 -16
- package/esm2022/components/code/index.mjs +0 -46
- package/esm2022/components/copy/index.mjs +0 -29
- package/esm2022/components/demo/index.mjs +0 -170
- package/esm2022/components/doc-tab/index.mjs +0 -17
- package/esm2022/components/documentation/documentation-property-connector.directive.mjs +0 -134
- package/esm2022/components/documentation/documentation.component.mjs +0 -108
- package/esm2022/components/documentation/pipes/cleaner.pipe.mjs +0 -18
- package/esm2022/components/documentation/pipes/color.pipe.mjs +0 -39
- package/esm2022/components/documentation/pipes/inspect.pipe.mjs +0 -33
- package/esm2022/components/documentation/pipes/opacity.pipe.mjs +0 -30
- package/esm2022/components/documentation/pipes/optional.pipe.mjs +0 -18
- package/esm2022/components/documentation/pipes/primitive-polymorpheus-content.pipe.mjs +0 -19
- package/esm2022/components/documentation/pipes/strip-optional.pipe.mjs +0 -18
- package/esm2022/components/documentation/pipes/type-reference.pipe.mjs +0 -29
- package/esm2022/components/example/example-get-tabs.pipe.mjs +0 -18
- package/esm2022/components/example/example.component.mjs +0 -118
- package/esm2022/components/example/example.options.mjs +0 -19
- package/esm2022/components/index.mjs +0 -33
- package/esm2022/components/internal/header/index.mjs +0 -39
- package/esm2022/components/internal/see-also/index.mjs +0 -26
- package/esm2022/components/internal/source-code/source-code.component.mjs +0 -54
- package/esm2022/components/language-switcher/index.mjs +0 -77
- package/esm2022/components/main/main.component.mjs +0 -41
- package/esm2022/components/navigation/navigation.component.mjs +0 -205
- package/esm2022/components/navigation/navigation.providers.mjs +0 -59
- package/esm2022/components/navigation/scroll-into-view.directive.mjs +0 -32
- package/esm2022/components/page/page-tab.directive.mjs +0 -20
- package/esm2022/components/page/page.component.mjs +0 -78
- package/esm2022/components/page/page.providers.mjs +0 -34
- package/esm2022/components/taiga-ui-addon-doc-components.mjs +0 -5
- package/esm2022/components/theme-switcher/theme-switcher.component.mjs +0 -45
- package/esm2022/directives/index.mjs +0 -2
- package/esm2022/directives/taiga-ui-addon-doc-directives.mjs +0 -5
- package/esm2022/directives/text-code/text-code.directive.mjs +0 -27
- package/esm2022/index.mjs +0 -28
- package/esm2022/services/index.mjs +0 -2
- package/esm2022/services/taiga-ui-addon-doc-services.mjs +0 -5
- package/esm2022/services/theme-dark.service.mjs +0 -52
- package/esm2022/taiga-ui-addon-doc.mjs +0 -5
- package/esm2022/tokens/code-actions.mjs +0 -8
- package/esm2022/tokens/code-editor.mjs +0 -6
- package/esm2022/tokens/default-tabs.mjs +0 -8
- package/esm2022/tokens/doc-icons.mjs +0 -29
- package/esm2022/tokens/example-content-processor.mjs +0 -16
- package/esm2022/tokens/excluded-properties.mjs +0 -11
- package/esm2022/tokens/i18n.mjs +0 -62
- package/esm2022/tokens/index.mjs +0 -17
- package/esm2022/tokens/logo.mjs +0 -8
- package/esm2022/tokens/page-loaded.mjs +0 -9
- package/esm2022/tokens/pages.mjs +0 -12
- package/esm2022/tokens/see-also.mjs +0 -8
- package/esm2022/tokens/source-code.mjs +0 -8
- package/esm2022/tokens/support-language.mjs +0 -5
- package/esm2022/tokens/taiga-ui-addon-doc-tokens.mjs +0 -5
- package/esm2022/tokens/title.mjs +0 -8
- package/esm2022/tokens/type-reference-handler.mjs +0 -9
- package/esm2022/tokens/url-state-handler.mjs +0 -27
- package/esm2022/types/code-editor.mjs +0 -2
- package/esm2022/types/demo-params.mjs +0 -2
- package/esm2022/types/index.mjs +0 -2
- package/esm2022/types/page.mjs +0 -6
- package/esm2022/types/source-code-path-options.mjs +0 -2
- package/esm2022/types/taiga-ui-addon-doc-types.mjs +0 -5
- package/esm2022/utils/clean-object.mjs +0 -10
- package/esm2022/utils/coerce-boolean.mjs +0 -4
- package/esm2022/utils/coerce-value.mjs +0 -43
- package/esm2022/utils/index.mjs +0 -14
- package/esm2022/utils/inspect.mjs +0 -67
- package/esm2022/utils/is-page-group.mjs +0 -4
- package/esm2022/utils/parse-code-block.mjs +0 -9
- package/esm2022/utils/provide-route-page-tab.mjs +0 -13
- package/esm2022/utils/raw-load-record.mjs +0 -11
- package/esm2022/utils/raw-load.mjs +0 -4
- package/esm2022/utils/sort-pages.mjs +0 -26
- package/esm2022/utils/taiga-ui-addon-doc-utils.mjs +0 -5
- package/esm2022/utils/to-flat-map-pages.mjs +0 -22
- package/esm2022/utils/transliterate-keyboard-layout.mjs +0 -47
- package/esm2022/utils/type-reference-parser.mjs +0 -21
- package/fesm2022/taiga-ui-addon-doc-directives.mjs +0 -33
- package/fesm2022/taiga-ui-addon-doc-directives.mjs.map +0 -1
|
@@ -1,100 +1,106 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject,
|
|
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,
|
|
4
|
-
import { Location,
|
|
2
|
+
import { inject, ChangeDetectionStrategy, ViewEncapsulation, Component, input, Directive, TemplateRef, Pipe, computed, model, PLATFORM_ID, viewChild, ElementRef, contentChild, signal, InjectionToken, effect, contentChildren } from '@angular/core';
|
|
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_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
|
+
import { Location, isPlatformServer, 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
|
-
import {
|
|
9
|
-
import { tuiIsNumber, tuiPx,
|
|
10
|
-
import { TuiAlertService } from '@taiga-ui/core/components/alert';
|
|
8
|
+
import { tuiInspect, tuiCoerceValue, tuiRawLoad, tuiCoerceValueIsTrue, tuiCleanObject, tuiRawLoadRecord, tuiTransliterateKeyboardLayout } from '@taiga-ui/addon-doc/utils';
|
|
9
|
+
import { tuiIsNumber, tuiPx, tuiIsPresent } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
11
10
|
import { TuiIcon } from '@taiga-ui/core/components/icon';
|
|
12
|
-
import * as
|
|
13
|
-
import {
|
|
11
|
+
import * as i5 from '@taiga-ui/core/components/input';
|
|
12
|
+
import { TuiInput, TuiInputDirective } from '@taiga-ui/core/components/input';
|
|
13
|
+
import { TuiNotificationService } from '@taiga-ui/core/components/notification';
|
|
14
14
|
import * as i2 from '@taiga-ui/kit/components/data-list-wrapper';
|
|
15
15
|
import { TuiDataListWrapper } from '@taiga-ui/kit/components/data-list-wrapper';
|
|
16
|
-
import * as
|
|
16
|
+
import * as i6 from '@taiga-ui/kit/components/input-number';
|
|
17
17
|
import { TuiInputNumber } from '@taiga-ui/kit/components/input-number';
|
|
18
|
+
import * as i3$1 from '@taiga-ui/kit/components/select';
|
|
19
|
+
import { TuiSelect } from '@taiga-ui/kit/components/select';
|
|
18
20
|
import { TuiSwitch } from '@taiga-ui/kit/components/switch';
|
|
19
21
|
import { TuiChevron } from '@taiga-ui/kit/directives/chevron';
|
|
20
|
-
import {
|
|
22
|
+
import { WA_IS_E2E } from '@ng-web-apis/platform';
|
|
23
|
+
import * as i3 from '@taiga-ui/core/components/textfield';
|
|
24
|
+
import { TuiTextfield } from '@taiga-ui/core/components/textfield';
|
|
25
|
+
import * as i4 from '@taiga-ui/core/portals/dropdown';
|
|
21
26
|
import * as i1$1 from '@angular/cdk/clipboard';
|
|
22
27
|
import { ClipboardModule, Clipboard } from '@angular/cdk/clipboard';
|
|
23
28
|
import { toSignal, toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
24
29
|
import { TuiButton } from '@taiga-ui/core/components/button';
|
|
25
30
|
import { TUI_COPY_TEXTS } from '@taiga-ui/kit/tokens';
|
|
26
31
|
import { Highlight } from 'ngx-highlightjs';
|
|
27
|
-
import { BehaviorSubject, Subject,
|
|
28
|
-
import { TUI_FALSE_HANDLER
|
|
29
|
-
import
|
|
32
|
+
import { BehaviorSubject, Subject, switchMap, timer, map, startWith, skip, filter, mergeMap, ReplaySubject, take, debounceTime, combineLatest, fromEvent, of } from 'rxjs';
|
|
33
|
+
import { TUI_FALSE_HANDLER } from '@taiga-ui/cdk/constants';
|
|
34
|
+
import * as i1$2 from '@taiga-ui/cdk/directives/item';
|
|
35
|
+
import { TuiItem } from '@taiga-ui/cdk/directives/item';
|
|
30
36
|
import { TuiResizable, TuiResizer } from '@taiga-ui/cdk/directives/resizer';
|
|
31
37
|
import { tuiInjectElement, tuiGetElementObscures } from '@taiga-ui/cdk/utils/dom';
|
|
32
|
-
import {
|
|
33
|
-
import * as
|
|
38
|
+
import { tuiClamp } from '@taiga-ui/cdk/utils/math';
|
|
39
|
+
import * as i3$2 from '@taiga-ui/core/components/expand';
|
|
34
40
|
import { TuiExpand } from '@taiga-ui/core/components/expand';
|
|
35
41
|
import { TuiGroup } from '@taiga-ui/core/directives/group';
|
|
36
42
|
import { TUI_DARK_MODE, TUI_COMMON_ICONS, TUI_THEME } from '@taiga-ui/core/tokens';
|
|
37
|
-
import * as i5 from '@taiga-ui/legacy/components/select';
|
|
38
|
-
import { TuiSelectModule } from '@taiga-ui/legacy/components/select';
|
|
39
|
-
import * as i8 from '@taiga-ui/legacy/directives/textfield-controller';
|
|
40
|
-
import { TuiTextfieldControllerModule } from '@taiga-ui/legacy/directives/textfield-controller';
|
|
41
|
-
import * as i3$1 from '@taiga-ui/core/components/data-list';
|
|
42
|
-
import { TuiDataList } from '@taiga-ui/core/components/data-list';
|
|
43
|
-
import { trigger, transition, style, animate } from '@angular/animations';
|
|
44
|
-
import { tuiQueryListChanges, tuiWatch, tuiZonefreeScheduler, tuiControlValue } from '@taiga-ui/cdk/observables';
|
|
45
|
-
import { TuiFilterPipe } from '@taiga-ui/cdk/pipes/filter';
|
|
46
|
-
import { TuiToArrayPipe } from '@taiga-ui/cdk/pipes/to-array';
|
|
47
|
-
import { TuiNotification } from '@taiga-ui/core/components/notification';
|
|
48
|
-
import { tuiScrollbarOptionsProvider, TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
|
|
49
|
-
import * as i4$2 from '@taiga-ui/core/directives/dropdown';
|
|
50
|
-
import { TuiDropdown } from '@taiga-ui/core/directives/dropdown';
|
|
51
|
-
import { TuiBadge } from '@taiga-ui/kit/components/badge';
|
|
52
|
-
import { tuiRgbToHex } from '@taiga-ui/cdk/utils/color';
|
|
53
43
|
import { WA_LOCATION, WA_LOCAL_STORAGE } from '@ng-web-apis/common';
|
|
54
|
-
import { TuiLet } from '@taiga-ui/cdk/directives/let';
|
|
55
44
|
import { TuiMapperPipe } from '@taiga-ui/cdk/pipes/mapper';
|
|
56
|
-
import { TuiFullscreen } from '@taiga-ui/core/components/fullscreen';
|
|
57
45
|
import { TuiLink, tuiLinkOptionsProvider } from '@taiga-ui/core/components/link';
|
|
58
46
|
import { TuiLoader } from '@taiga-ui/core/components/loader';
|
|
47
|
+
import { TuiFullscreen } from '@taiga-ui/kit/components/fullscreen';
|
|
59
48
|
import * as i2$1 from '@taiga-ui/kit/components/tabs';
|
|
60
49
|
import { TuiTabs } from '@taiga-ui/kit/components/tabs';
|
|
61
|
-
import {
|
|
50
|
+
import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
62
51
|
import { TUI_EXAMPLE_PRIMARY_FILE_NAME } from '@taiga-ui/addon-doc/types';
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import {
|
|
66
|
-
import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
|
|
52
|
+
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
53
|
+
import { TuiPopup } from '@taiga-ui/core/portals/popup';
|
|
54
|
+
import { TuiDrawer } from '@taiga-ui/kit/components/drawer';
|
|
67
55
|
import { Title } from '@angular/platform-browser';
|
|
68
56
|
import { tuiAutoFocusOptionsProvider, TuiAutoFocus } from '@taiga-ui/cdk/directives/auto-focus';
|
|
57
|
+
import { tuiZonefreeScheduler, tuiControlValue, tuiWatch } from '@taiga-ui/cdk/observables';
|
|
58
|
+
import * as i3$3 from '@taiga-ui/core/components/data-list';
|
|
59
|
+
import { TuiDataList } from '@taiga-ui/core/components/data-list';
|
|
60
|
+
import { tuiScrollbarOptionsProvider, TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
|
|
69
61
|
import * as i2$2 from '@taiga-ui/kit/components/accordion';
|
|
70
62
|
import { TuiAccordion } from '@taiga-ui/kit/components/accordion';
|
|
71
|
-
import { TuiInputModule } from '@taiga-ui/legacy/components/input';
|
|
72
|
-
import { TuiFlagPipe } from '@taiga-ui/core/pipes/flag';
|
|
73
63
|
import { TuiLanguageSwitcherService } from '@taiga-ui/i18n/utils';
|
|
64
|
+
import { TuiBadge } from '@taiga-ui/kit/components/badge';
|
|
74
65
|
import * as i2$3 from '@taiga-ui/kit/components/badged-content';
|
|
75
66
|
import { TuiBadgedContent } from '@taiga-ui/kit/components/badged-content';
|
|
76
67
|
import { TuiButtonSelect } from '@taiga-ui/kit/directives/button-select';
|
|
68
|
+
import { TuiFlagPipe } from '@taiga-ui/kit/pipes/flag';
|
|
77
69
|
import { TuiRoot } from '@taiga-ui/core/components/root';
|
|
78
|
-
import { TuiReplacePipe } from '@taiga-ui/cdk/pipes/replace';
|
|
79
|
-
import { TuiAutoColorPipe } from '@taiga-ui/core/pipes/auto-color';
|
|
80
70
|
import { TuiChip } from '@taiga-ui/kit/components/chip';
|
|
81
|
-
import {
|
|
71
|
+
import { TuiAutoColorPipe } from '@taiga-ui/kit/pipes/auto-color';
|
|
72
|
+
import * as i4$1 from '@taiga-ui/core/components/label';
|
|
82
73
|
|
|
83
74
|
class TuiDocAPI {
|
|
84
75
|
constructor() {
|
|
85
76
|
this.texts = inject(TUI_DOC_DOCUMENTATION_TEXTS);
|
|
86
77
|
}
|
|
87
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
88
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
78
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocAPI, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
79
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", 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: 767.4px){[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 }); }
|
|
89
80
|
}
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocAPI, decorators: [{
|
|
91
82
|
type: Component,
|
|
92
|
-
args: [{
|
|
83
|
+
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: 767.4px){[tuiDocAPI],[tuiDocAPI] tbody,[tuiDocAPI] tr{display:flex;flex-direction:column}[tuiDocAPI] th,[tuiDocAPI] tbody th,[tuiDocAPI] tr th{display:none}}\n"] }]
|
|
84
|
+
}] });
|
|
85
|
+
|
|
86
|
+
class TuiDocAPINumberItem {
|
|
87
|
+
constructor() {
|
|
88
|
+
this.min = input(null);
|
|
89
|
+
this.max = input(null);
|
|
90
|
+
}
|
|
91
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocAPINumberItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
92
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", 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 }); }
|
|
93
|
+
}
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocAPINumberItem, decorators: [{
|
|
95
|
+
type: Directive,
|
|
96
|
+
args: [{
|
|
97
|
+
selector: 'tr[tuiDocAPIItem][type=number]',
|
|
98
|
+
}]
|
|
93
99
|
}] });
|
|
94
100
|
|
|
95
101
|
class TuiInspectPipe {
|
|
96
102
|
constructor() {
|
|
97
|
-
this.isE2E = inject(
|
|
103
|
+
this.isE2E = inject(WA_IS_E2E);
|
|
98
104
|
}
|
|
99
105
|
transform(value, depth = 2) {
|
|
100
106
|
if (this.isE2E && typeof value === 'function') {
|
|
@@ -107,20 +113,19 @@ class TuiInspectPipe {
|
|
|
107
113
|
*/
|
|
108
114
|
return 'λ(x) => y';
|
|
109
115
|
}
|
|
110
|
-
return value instanceof TemplateRef ? 'TemplateRef' :
|
|
116
|
+
return value instanceof TemplateRef ? 'TemplateRef' : tuiInspect(value, depth);
|
|
111
117
|
}
|
|
112
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
113
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
118
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInspectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
119
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: TuiInspectPipe, isStandalone: true, name: "tuiInspect" }); }
|
|
114
120
|
}
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInspectPipe, decorators: [{
|
|
116
122
|
type: Pipe,
|
|
117
123
|
args: [{
|
|
118
|
-
|
|
119
|
-
name: 'tuiInspectAny',
|
|
124
|
+
name: 'tuiInspect',
|
|
120
125
|
}]
|
|
121
126
|
}] });
|
|
122
127
|
|
|
123
|
-
class
|
|
128
|
+
class TuiTypeReferencePipe {
|
|
124
129
|
constructor() {
|
|
125
130
|
this.parser = inject(TUI_DOC_TYPE_REFERENCE_PARSER);
|
|
126
131
|
this.linkHandler = inject(TUI_DOC_TYPE_REFERENCE_HANDLER);
|
|
@@ -134,84 +139,67 @@ class TuiDocTypeReferencePipe {
|
|
|
134
139
|
}))
|
|
135
140
|
.sort((a, b) => b.reference?.localeCompare(a.reference ?? '') ?? -1);
|
|
136
141
|
}
|
|
137
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
138
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
142
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiTypeReferencePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
143
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: TuiTypeReferencePipe, isStandalone: true, name: "tuiTypeReference" }); }
|
|
139
144
|
}
|
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiTypeReferencePipe, decorators: [{
|
|
141
146
|
type: Pipe,
|
|
142
147
|
args: [{
|
|
143
|
-
|
|
144
|
-
name: 'tuiDocTypeReference',
|
|
148
|
+
name: 'tuiTypeReference',
|
|
145
149
|
}]
|
|
146
150
|
}] });
|
|
147
151
|
|
|
148
|
-
|
|
149
|
-
constructor() {
|
|
150
|
-
this.min = null;
|
|
151
|
-
this.max = null;
|
|
152
|
-
}
|
|
153
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocAPINumberItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
154
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocAPINumberItem, isStandalone: true, selector: "tr[tuiDocAPIItem][type=number]", inputs: { min: "min", max: "max" }, ngImport: i0 }); }
|
|
155
|
-
}
|
|
156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocAPINumberItem, decorators: [{
|
|
157
|
-
type: Directive,
|
|
158
|
-
args: [{
|
|
159
|
-
standalone: true,
|
|
160
|
-
selector: 'tr[tuiDocAPIItem][type=number]',
|
|
161
|
-
}]
|
|
162
|
-
}], propDecorators: { min: [{
|
|
163
|
-
type: Input
|
|
164
|
-
}], max: [{
|
|
165
|
-
type: Input
|
|
166
|
-
}] } });
|
|
167
|
-
|
|
168
|
-
const SERIALIZED_SUFFIX$1 = '$';
|
|
152
|
+
const SERIALIZED_SUFFIX = '$';
|
|
169
153
|
class TuiDocAPIItem {
|
|
170
154
|
constructor() {
|
|
171
155
|
this.locationRef = inject(Location);
|
|
172
156
|
this.activatedRoute = inject(ActivatedRoute);
|
|
173
157
|
this.urlSerializer = inject(UrlSerializer);
|
|
174
158
|
this.urlStateHandler = inject(TUI_DOC_URL_STATE_HANDLER);
|
|
175
|
-
this.alerts = inject(
|
|
159
|
+
this.alerts = inject(TuiNotificationService);
|
|
176
160
|
this.icons = inject(TUI_DOC_ICONS);
|
|
177
161
|
this.numberItem = inject(TuiDocAPINumberItem, {
|
|
178
162
|
self: true,
|
|
179
163
|
optional: true,
|
|
180
164
|
});
|
|
181
|
-
this.
|
|
182
|
-
this.
|
|
183
|
-
this.
|
|
184
|
-
this.
|
|
165
|
+
this.isBananaBox = computed(() => this.name().startsWith('[('));
|
|
166
|
+
this.isInput = computed(() => this.name().startsWith('['));
|
|
167
|
+
this.isOutput = computed(() => this.name().startsWith('('));
|
|
168
|
+
this.name = input('');
|
|
169
|
+
this.type = input('');
|
|
170
|
+
this.value = model();
|
|
171
|
+
this.items = input([]);
|
|
172
|
+
this.hasCleaner = computed(() => this.type().includes('null') || this.type().includes('PolymorpheusContent'));
|
|
185
173
|
}
|
|
186
|
-
|
|
174
|
+
ngOnInit() {
|
|
187
175
|
this.parseParams(this.activatedRoute.snapshot.queryParams);
|
|
188
176
|
}
|
|
189
177
|
onValueChange(value) {
|
|
190
|
-
this.value
|
|
191
|
-
this.valueChange.emit(value);
|
|
178
|
+
this.value.set(value);
|
|
192
179
|
this.setQueryParam(value);
|
|
193
180
|
}
|
|
194
181
|
emitEvent(event) {
|
|
195
182
|
console.info('emitEvent', event);
|
|
196
183
|
const alert = !event || event?.toString() === '[object Object]'
|
|
197
|
-
?
|
|
184
|
+
? tuiInspect(event, 2)
|
|
198
185
|
: event;
|
|
199
|
-
this.alerts.open(alert, { label: this.name }).subscribe();
|
|
186
|
+
this.alerts.open(alert, { label: this.name() }).subscribe();
|
|
200
187
|
}
|
|
201
188
|
clearBrackets(value) {
|
|
202
189
|
return value.replaceAll(/[()[\]]/g, '');
|
|
203
190
|
}
|
|
204
191
|
parseParams(params) {
|
|
205
|
-
const name = this.clearBrackets(this.name);
|
|
192
|
+
const name = this.clearBrackets(this.name());
|
|
206
193
|
const propertyValue = params[name];
|
|
207
|
-
const propertyValueWithSuffix = params[`${name}${SERIALIZED_SUFFIX
|
|
194
|
+
const propertyValueWithSuffix = params[`${name}${SERIALIZED_SUFFIX}`];
|
|
208
195
|
if (!propertyValue && !propertyValueWithSuffix) {
|
|
209
196
|
return;
|
|
210
197
|
}
|
|
211
|
-
|
|
212
|
-
|
|
198
|
+
const items = this.items();
|
|
199
|
+
let value = !!propertyValueWithSuffix && items
|
|
200
|
+
? items[propertyValueWithSuffix]
|
|
213
201
|
: tuiCoerceValue(propertyValue);
|
|
214
|
-
if (this.type === 'string' && tuiIsNumber(value)) {
|
|
202
|
+
if (this.type() === 'string' && tuiIsNumber(value)) {
|
|
215
203
|
value = value.toString();
|
|
216
204
|
}
|
|
217
205
|
this.onValueChange(value);
|
|
@@ -219,109 +207,107 @@ class TuiDocAPIItem {
|
|
|
219
207
|
setQueryParam(value) {
|
|
220
208
|
const tree = this.urlSerializer.parse(this.locationRef.path());
|
|
221
209
|
const isValueAvailableByKey = value instanceof Object;
|
|
222
|
-
const
|
|
223
|
-
const
|
|
224
|
-
const
|
|
210
|
+
const items = this.items();
|
|
211
|
+
const computedValue = isValueAvailableByKey && items ? items.indexOf(value) : value;
|
|
212
|
+
const suffix = isValueAvailableByKey ? SERIALIZED_SUFFIX : '';
|
|
213
|
+
const propName = this.clearBrackets(this.name()) + suffix;
|
|
225
214
|
tree.queryParams = {
|
|
226
215
|
...tree.queryParams,
|
|
227
216
|
[propName]: computedValue,
|
|
228
217
|
};
|
|
229
218
|
this.locationRef.go(this.urlStateHandler(tree));
|
|
230
219
|
}
|
|
231
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
232
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
220
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocAPIItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
221
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", 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() | tuiTypeReference; 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 [itemContent]=\"content\"\n [items]=\"items()\"\n />\n </tui-textfield>\n } @else {\n @if (value() !== undefined) {\n @if (type() === 'boolean') {\n <input\n tuiSwitch\n type=\"checkbox\"\n [id]=\"name()\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n }\n\n @if (type() === 'string') {\n <tui-textfield\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n >\n <input\n tuiInput\n [id]=\"name()\"\n [ngModel]=\"value() || ''\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n </tui-textfield>\n }\n\n @if (type() === 'number' || type() === 'bigint' || type() === 'number | bigint') {\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 <ng-template\n #content\n let-data\n >\n <code [style.margin]=\"0\">{{ data | tuiInspect }}</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: 767.4px){: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])", inputs: ["items", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "component", type: i3.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i3.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i4.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "directive", type: i5.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "invalid", "focused", "state"] }, { kind: "directive", type: i6.TuiInputNumberDirective, selector: "input[tuiInputNumber]" }, { kind: "component", type: i6.TuiInputNumberStep, selector: "input[tuiInputNumber][step]", inputs: ["step"] }, { kind: "pipe", type: TuiInspectPipe, name: "tuiInspect" }, { kind: "directive", type: i3$1.TuiSelectDirective, selector: "input[tuiSelect]" }, { kind: "component", type: TuiSwitch, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: ["showIcons"] }, { kind: "pipe", type: TuiTypeReferencePipe, name: "tuiTypeReference" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
233
222
|
}
|
|
234
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocAPIItem, decorators: [{
|
|
235
224
|
type: Component,
|
|
236
|
-
args: [{
|
|
225
|
+
args: [{ selector: 'tr[tuiDocAPIItem]', imports: [
|
|
237
226
|
FormsModule,
|
|
238
|
-
NgForOf,
|
|
239
|
-
NgIf,
|
|
240
|
-
NgSwitch,
|
|
241
|
-
NgSwitchCase,
|
|
242
227
|
TuiChevron,
|
|
243
228
|
TuiDataListWrapper,
|
|
244
|
-
TuiDocTypeReferencePipe,
|
|
245
229
|
TuiIcon,
|
|
230
|
+
TuiInput,
|
|
246
231
|
TuiInputNumber,
|
|
247
232
|
TuiInspectPipe,
|
|
233
|
+
TuiSelect,
|
|
248
234
|
TuiSwitch,
|
|
249
|
-
|
|
250
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<td class=\"t-td\">\n <code\n class=\"t-name\"\n [class.t-name_banana]=\"
|
|
251
|
-
}]
|
|
252
|
-
type: Input
|
|
253
|
-
}], type: [{
|
|
254
|
-
type: Input
|
|
255
|
-
}], value: [{
|
|
256
|
-
type: Input
|
|
257
|
-
}], items: [{
|
|
258
|
-
type: Input
|
|
259
|
-
}], valueChange: [{
|
|
260
|
-
type: Output
|
|
261
|
-
}] } });
|
|
235
|
+
TuiTypeReferencePipe,
|
|
236
|
+
], 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() | tuiTypeReference; 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 [itemContent]=\"content\"\n [items]=\"items()\"\n />\n </tui-textfield>\n } @else {\n @if (value() !== undefined) {\n @if (type() === 'boolean') {\n <input\n tuiSwitch\n type=\"checkbox\"\n [id]=\"name()\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n }\n\n @if (type() === 'string') {\n <tui-textfield\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n >\n <input\n tuiInput\n [id]=\"name()\"\n [ngModel]=\"value() || ''\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n </tui-textfield>\n }\n\n @if (type() === 'number' || type() === 'bigint' || type() === 'number | bigint') {\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 <ng-template\n #content\n let-data\n >\n <code [style.margin]=\"0\">{{ data | tuiInspect }}</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: 767.4px){:host{gap:1rem;padding:1rem 0}.t-td{padding:0}.t-td:last-child{text-align:start}.t-input{margin:0}}\n"] }]
|
|
237
|
+
}] });
|
|
262
238
|
|
|
263
239
|
class TuiDocCode {
|
|
264
240
|
constructor() {
|
|
265
241
|
this.icons = inject(TUI_DOC_ICONS);
|
|
266
242
|
this.rawLoader$$ = new BehaviorSubject('');
|
|
243
|
+
this.texts = inject(TUI_COPY_TEXTS);
|
|
267
244
|
this.isServer = isPlatformServer(inject(PLATFORM_ID));
|
|
268
245
|
this.markdownCodeProcessor = inject(TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR);
|
|
269
246
|
this.copy$ = new Subject();
|
|
270
|
-
this.copyText =
|
|
247
|
+
this.copyText = computed(() => this.texts()[0]);
|
|
271
248
|
this.icon = toSignal(this.copy$.pipe(switchMap(() => timer(2000).pipe(map(() => this.icons.copy), startWith(this.icons.check)))), { initialValue: this.icons.copy });
|
|
272
249
|
this.processor = toSignal(this.rawLoader$$.pipe(switchMap(tuiRawLoad), map((value) => this.markdownCodeProcessor(value))), { initialValue: [] });
|
|
273
|
-
this.filename = '';
|
|
274
|
-
|
|
275
|
-
set code(code) {
|
|
276
|
-
this.rawLoader$$.next(code);
|
|
250
|
+
this.filename = input('');
|
|
251
|
+
this.code = input('');
|
|
277
252
|
}
|
|
278
253
|
get hasFilename() {
|
|
279
|
-
return !!this.filename;
|
|
254
|
+
return !!this.filename();
|
|
255
|
+
}
|
|
256
|
+
ngOnChanges() {
|
|
257
|
+
this.rawLoader$$.next(this.code());
|
|
280
258
|
}
|
|
281
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
282
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
259
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocCode, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
260
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", 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: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.visibility": "isServer ? \"hidden\" : \"visible\"", "class._has-filename": "hasFilename" } }, usesOnChanges: true, 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-body-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-body-m);font-size:.875rem;padding:1.5rem 2rem;font-family:monospace;overflow-wrap:break-word;white-space:pre-wrap}@media screen and (max-width: 767.4px){.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
261
|
}
|
|
284
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
262
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocCode, decorators: [{
|
|
285
263
|
type: Component,
|
|
286
|
-
args: [{
|
|
264
|
+
args: [{ selector: 'tui-doc-code', imports: [ClipboardModule, Highlight, TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
287
265
|
'[style.visibility]': 'isServer ? "hidden" : "visible"',
|
|
288
266
|
'[class._has-filename]': 'hasFilename',
|
|
289
|
-
}, template: "
|
|
290
|
-
}]
|
|
291
|
-
type: Input
|
|
292
|
-
}], code: [{
|
|
293
|
-
type: Input
|
|
294
|
-
}] } });
|
|
267
|
+
}, 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-body-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-body-m);font-size:.875rem;padding:1.5rem 2rem;font-family:monospace;overflow-wrap:break-word;white-space:pre-wrap}@media screen and (max-width: 767.4px){.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"] }]
|
|
268
|
+
}] });
|
|
295
269
|
|
|
296
270
|
const COPIED_TIMEOUT = 1500;
|
|
297
271
|
class TuiDocCopy {
|
|
298
272
|
constructor() {
|
|
299
273
|
this.copy$ = new Subject();
|
|
300
|
-
this.texts =
|
|
301
|
-
initialValue: ['', ''],
|
|
302
|
-
});
|
|
274
|
+
this.texts = inject(TUI_COPY_TEXTS);
|
|
303
275
|
this.copied = toSignal(this.copy$.pipe(switchMap(() => timer(COPIED_TIMEOUT).pipe(map(TUI_FALSE_HANDLER), startWith(true)))), { initialValue: false });
|
|
304
276
|
}
|
|
305
277
|
onClick() {
|
|
306
278
|
this.copy$.next();
|
|
307
279
|
}
|
|
308
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
309
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
280
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocCopy, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
281
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiDocCopy, isStandalone: true, selector: "tui-doc-copy", ngImport: i0, template: "<button\n appearance=\"\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-copy\"\n (click)=\"onClick()\"\n>\n <span class=\"t-content\">\n <span\n class=\"t-initial\"\n [attr.data-text]=\"copied() ? '' : texts()[0]\"\n >\n @if (!copied()) {\n <ng-content />\n }\n </span>\n {{ copied() ? texts()[1] : '' }}\n </span>\n</button>\n", styles: [":host{position:relative;display:inline-block;vertical-align:middle;border-radius:var(--tui-radius-m)}.t-copy{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:100%;block-size:100%;color:var(--tui-text-primary);background:var(--tui-background-base);overflow:hidden}.t-copy:hover{background:var(--tui-background-base-alt)}.t-initial{white-space:nowrap}.t-initial:empty:before{content:attr(data-text)}.t-content{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;flex-direction:column;text-align:center;line-height:2rem}\n"], dependencies: [{ kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
310
282
|
}
|
|
311
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
283
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocCopy, decorators: [{
|
|
312
284
|
type: Component,
|
|
313
|
-
args: [{
|
|
285
|
+
args: [{ selector: 'tui-doc-copy', imports: [TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n appearance=\"\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-copy\"\n (click)=\"onClick()\"\n>\n <span class=\"t-content\">\n <span\n class=\"t-initial\"\n [attr.data-text]=\"copied() ? '' : texts()[0]\"\n >\n @if (!copied()) {\n <ng-content />\n }\n </span>\n {{ copied() ? texts()[1] : '' }}\n </span>\n</button>\n", styles: [":host{position:relative;display:inline-block;vertical-align:middle;border-radius:var(--tui-radius-m)}.t-copy{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:100%;block-size:100%;color:var(--tui-text-primary);background:var(--tui-background-base);overflow:hidden}.t-copy:hover{background:var(--tui-background-base-alt)}.t-initial{white-space:nowrap}.t-initial:empty:before{content:attr(data-text)}.t-content{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;flex-direction:column;text-align:center;line-height:2rem}\n"] }]
|
|
314
286
|
}] });
|
|
315
287
|
|
|
316
288
|
const MIN_WIDTH = 160;
|
|
289
|
+
class TuiJsonPipe {
|
|
290
|
+
transform(value) {
|
|
291
|
+
return JSON.stringify(value, (_, x) => (typeof x === 'bigint' ? `${String(x)}n` : x), 2);
|
|
292
|
+
}
|
|
293
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiJsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
294
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: TuiJsonPipe, isStandalone: true, name: "json" }); }
|
|
295
|
+
}
|
|
296
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiJsonPipe, decorators: [{
|
|
297
|
+
type: Pipe,
|
|
298
|
+
args: [{ name: 'json' }]
|
|
299
|
+
}] });
|
|
317
300
|
class TuiDocDemo {
|
|
318
301
|
constructor() {
|
|
302
|
+
this.resizable = viewChild.required(TuiResizable, { read: ElementRef });
|
|
303
|
+
this.content = viewChild.required('content');
|
|
304
|
+
this.resizer = viewChild.required('resizer');
|
|
319
305
|
this.el = tuiInjectElement();
|
|
320
306
|
this.locationRef = inject(Location);
|
|
321
307
|
this.urlSerializer = inject(UrlSerializer);
|
|
322
308
|
this.urlStateHandler = inject(TUI_DOC_URL_STATE_HANDLER);
|
|
323
309
|
this.darkMode = inject(TUI_DARK_MODE);
|
|
324
|
-
this.template =
|
|
310
|
+
this.template = contentChild((TemplateRef));
|
|
325
311
|
this.rendered = signal(false);
|
|
326
312
|
this.theme = computed(() => (this.dark() ? 'dark' : 'light'));
|
|
327
313
|
this.dark = signal(tuiCoerceValueIsTrue(this.params.darkMode ?? this.darkMode()));
|
|
@@ -332,10 +318,10 @@ class TuiDocDemo {
|
|
|
332
318
|
this.updateOn = this.params.updateOn || this.updateOnVariants[0];
|
|
333
319
|
this.opaque = tuiCoerceValueIsTrue(this.params.sandboxOpaque ?? true);
|
|
334
320
|
this.expanded = tuiCoerceValueIsTrue(this.params.sandboxExpanded ?? false);
|
|
335
|
-
this.sandboxWidth =
|
|
321
|
+
this.sandboxWidth = parseInt(this.params.sandboxWidth, 10);
|
|
336
322
|
this.texts = inject(TUI_DOC_DEMO_TEXTS);
|
|
337
|
-
this.control = null;
|
|
338
|
-
this.sticky = true;
|
|
323
|
+
this.control = input(null);
|
|
324
|
+
this.sticky = input(true);
|
|
339
325
|
}
|
|
340
326
|
ngAfterViewInit() {
|
|
341
327
|
this.createForm();
|
|
@@ -367,21 +353,21 @@ class TuiDocDemo {
|
|
|
367
353
|
this.createForm();
|
|
368
354
|
}
|
|
369
355
|
updateWidth(width = NaN) {
|
|
370
|
-
if (!this.resizer || !this.resizable || !this.content) {
|
|
356
|
+
if (!this.resizer() || !this.resizable() || !this.content()) {
|
|
371
357
|
return;
|
|
372
358
|
}
|
|
373
|
-
const safe = width || this.resizable.nativeElement.clientWidth;
|
|
359
|
+
const safe = width || this.resizable().nativeElement.clientWidth;
|
|
374
360
|
const total = this.el.clientWidth;
|
|
375
361
|
const clamped = Math.round(tuiClamp(safe, MIN_WIDTH, total)) - this.delta;
|
|
376
362
|
const validated = safe < total ? clamped : NaN;
|
|
377
|
-
this.resizer.nativeElement.textContent = String(clamped || '-');
|
|
378
|
-
this.resizable.nativeElement.style.width = validated ? tuiPx(safe) : '';
|
|
363
|
+
this.resizer().nativeElement.textContent = String(clamped || '-');
|
|
364
|
+
this.resizable().nativeElement.style.width = validated ? tuiPx(safe) : '';
|
|
379
365
|
this.sandboxWidth = validated;
|
|
380
366
|
}
|
|
381
367
|
get delta() {
|
|
382
|
-
return this.resizable && this.content
|
|
383
|
-
? this.resizable.nativeElement.clientWidth -
|
|
384
|
-
this.content.nativeElement.clientWidth
|
|
368
|
+
return this.resizable() && this.content()
|
|
369
|
+
? this.resizable().nativeElement.clientWidth -
|
|
370
|
+
this.content().nativeElement.clientWidth
|
|
385
371
|
: 0;
|
|
386
372
|
}
|
|
387
373
|
get params() {
|
|
@@ -398,26 +384,21 @@ class TuiDocDemo {
|
|
|
398
384
|
this.locationRef.go(this.urlStateHandler(tree));
|
|
399
385
|
}
|
|
400
386
|
createForm() {
|
|
401
|
-
const
|
|
387
|
+
const control = this.control();
|
|
402
388
|
if (control) {
|
|
403
|
-
this.testForm = new FormGroup({ testValue: control }, { updateOn });
|
|
389
|
+
this.testForm = new FormGroup({ testValue: control }, { updateOn: this.updateOn });
|
|
404
390
|
}
|
|
405
391
|
}
|
|
406
392
|
getUrlTree() {
|
|
407
393
|
return this.urlSerializer.parse(this.locationRef.path());
|
|
408
394
|
}
|
|
409
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
410
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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 <form\n *ngIf=\"testForm\"\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 tuiExpandContent>\n <pre class=\"t-value\">Form data: {{ testForm.value | json }}</pre>\n <div\n tuiGroup\n class=\"t-form-controls\"\n >\n <tui-select\n automation-id=\"tui-demo-select__expand-update-on\"\n tuiTextfieldSize=\"s\"\n class=\"t-select\"\n [ngModel]=\"updateOn\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateOnChange($event)\"\n >\n updateOn\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"updateOnVariants\"\n />\n </tui-select>\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 <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.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: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: "directive", type: i3$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i4$1.TuiExpandComponent, selector: "tui-expand", inputs: ["async", "expanded"] }, { kind: "directive", type: i4$1.TuiExpandContent, selector: "[tuiExpandContent]" }, { 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: "ngmodule", type: TuiSelectModule }, { kind: "component", type: i5.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i5.TuiSelectDirective, selector: "tui-select" }, { kind: "component", type: TuiSwitch, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: ["size", "showIcons"] }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "directive", type: i8.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
395
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocDemo, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
396
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", 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, isSignal: true }], viewQueries: [{ propertyName: "resizable", first: true, predicate: TuiResizable, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }, { propertyName: "resizer", first: true, predicate: ["resizer"], descendants: true, isSignal: 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() || null\" />\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 [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-body-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: 767.4px){.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: 767.4px){.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: 767.4px){.t-resizer{display:none}}.t-resizer-text{position:relative;z-index:1;font:var(--tui-font-body-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: "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])", inputs: ["items", "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: "pipe", type: TuiJsonPipe, name: "json" }, { 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: i3.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i3.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i4.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "component", type: TuiSwitch, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: ["showIcons"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
411
397
|
}
|
|
412
|
-
|
|
413
|
-
tuiPure
|
|
414
|
-
], TuiDocDemo.prototype, "updateUrl", null);
|
|
415
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocDemo, decorators: [{
|
|
398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocDemo, decorators: [{
|
|
416
399
|
type: Component,
|
|
417
|
-
args: [{
|
|
400
|
+
args: [{ selector: 'tui-doc-demo', imports: [
|
|
418
401
|
FormsModule,
|
|
419
|
-
JsonPipe,
|
|
420
|
-
NgIf,
|
|
421
402
|
NgTemplateOutlet,
|
|
422
403
|
ReactiveFormsModule,
|
|
423
404
|
TuiButton,
|
|
@@ -425,363 +406,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
425
406
|
TuiDataListWrapper,
|
|
426
407
|
TuiExpand,
|
|
427
408
|
TuiGroup,
|
|
409
|
+
TuiItem,
|
|
410
|
+
TuiJsonPipe,
|
|
428
411
|
TuiResizable,
|
|
429
412
|
TuiResizer,
|
|
430
|
-
|
|
413
|
+
TuiSelect,
|
|
431
414
|
TuiSwitch,
|
|
432
|
-
|
|
415
|
+
TuiTextfield,
|
|
433
416
|
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
434
|
-
'[class._sticky]': 'sticky',
|
|
417
|
+
'[class._sticky]': 'sticky()',
|
|
435
418
|
'(window:resize)': 'onResize()',
|
|
436
419
|
'(document:mouseup.zoneless)': 'onMouseUp()',
|
|
437
|
-
}, 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
|
|
438
|
-
}], propDecorators: { resizable: [{
|
|
439
|
-
type: ViewChild,
|
|
440
|
-
args: [TuiResizable, { static: true }]
|
|
441
|
-
}], content: [{
|
|
442
|
-
type: ViewChild,
|
|
443
|
-
args: ['content', { static: true }]
|
|
444
|
-
}], resizer: [{
|
|
445
|
-
type: ViewChild,
|
|
446
|
-
args: ['resizer', { static: true }]
|
|
447
|
-
}], template: [{
|
|
448
|
-
type: ContentChild,
|
|
449
|
-
args: [TemplateRef]
|
|
450
|
-
}], control: [{
|
|
451
|
-
type: Input
|
|
452
|
-
}], sticky: [{
|
|
453
|
-
type: Input
|
|
454
|
-
}], updateUrl: [] } });
|
|
455
|
-
|
|
456
|
-
class TuiDocTab {
|
|
457
|
-
constructor() {
|
|
458
|
-
this.src = '';
|
|
459
|
-
}
|
|
460
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocTab, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
461
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocTab, isStandalone: true, selector: "tui-doc-tab", inputs: { src: "src" }, 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 }); }
|
|
462
|
-
}
|
|
463
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocTab, decorators: [{
|
|
464
|
-
type: Component,
|
|
465
|
-
args: [{ standalone: true, 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"] }]
|
|
466
|
-
}], propDecorators: { src: [{
|
|
467
|
-
type: Input
|
|
468
|
-
}] } });
|
|
469
|
-
|
|
470
|
-
const SERIALIZED_SUFFIX = '$';
|
|
471
|
-
// @bad TODO: refactor output and value sync
|
|
472
|
-
class TuiDocDocumentationPropertyConnector {
|
|
473
|
-
constructor() {
|
|
474
|
-
this.locationRef = inject(Location);
|
|
475
|
-
this.activatedRoute = inject(ActivatedRoute);
|
|
476
|
-
this.urlSerializer = inject(UrlSerializer);
|
|
477
|
-
this.urlStateHandler = inject(TUI_DOC_URL_STATE_HANDLER);
|
|
478
|
-
this.alerts = inject(TuiAlertService);
|
|
479
|
-
this.documentationPropertyName = '';
|
|
480
|
-
this.documentationPropertyMode = null;
|
|
481
|
-
this.documentationPropertyType = '';
|
|
482
|
-
this.documentationPropertyDeprecated = false;
|
|
483
|
-
this.documentationPropertyValues = null;
|
|
484
|
-
this.documentationPropertyValueChange = new EventEmitter();
|
|
485
|
-
this.changed$ = new Subject();
|
|
486
|
-
this.emits = signal(1);
|
|
487
|
-
this.template = inject(TemplateRef);
|
|
488
|
-
}
|
|
489
|
-
get attrName() {
|
|
490
|
-
switch (this.documentationPropertyMode) {
|
|
491
|
-
case 'input':
|
|
492
|
-
return `[${this.documentationPropertyName}]`;
|
|
493
|
-
case 'input-output':
|
|
494
|
-
return `[(${this.documentationPropertyName})]`;
|
|
495
|
-
case 'output':
|
|
496
|
-
return `(${this.documentationPropertyName})`;
|
|
497
|
-
default:
|
|
498
|
-
return this.documentationPropertyName;
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
get shouldShowValues() {
|
|
502
|
-
return this.documentationPropertyMode !== 'output';
|
|
503
|
-
}
|
|
504
|
-
get hasItems() {
|
|
505
|
-
return !!this.documentationPropertyValues;
|
|
506
|
-
}
|
|
507
|
-
ngOnInit() {
|
|
508
|
-
this.parseParams(this.activatedRoute.snapshot.queryParams);
|
|
509
|
-
}
|
|
510
|
-
ngOnChanges() {
|
|
511
|
-
this.changed$.next();
|
|
512
|
-
}
|
|
513
|
-
onValueChange(value) {
|
|
514
|
-
this.documentationPropertyValue = value;
|
|
515
|
-
this.documentationPropertyValueChange.emit(value);
|
|
516
|
-
this.setQueryParam(value);
|
|
517
|
-
}
|
|
518
|
-
emitEvent(event) {
|
|
519
|
-
// For more convenient debugging
|
|
520
|
-
console.info(this.attrName, event);
|
|
521
|
-
this.emits.update((x) => ++x);
|
|
522
|
-
let content;
|
|
523
|
-
if (event !== undefined) {
|
|
524
|
-
content = tuiInspectAny(event, 2);
|
|
525
|
-
}
|
|
526
|
-
this.alerts.open(content, { label: this.attrName }).subscribe();
|
|
527
|
-
}
|
|
528
|
-
parseParams(params) {
|
|
529
|
-
const propertyValue = params[this.documentationPropertyName];
|
|
530
|
-
const propertyValueWithSuffix = params[`${this.documentationPropertyName}${SERIALIZED_SUFFIX}`];
|
|
531
|
-
if (!propertyValue && !propertyValueWithSuffix) {
|
|
532
|
-
return;
|
|
533
|
-
}
|
|
534
|
-
let value = !!propertyValueWithSuffix && this.documentationPropertyValues
|
|
535
|
-
? this.documentationPropertyValues[propertyValueWithSuffix]
|
|
536
|
-
: tuiCoerceValue(propertyValue);
|
|
537
|
-
if (this.documentationPropertyType === 'string' && tuiIsNumber(value)) {
|
|
538
|
-
value = value.toString();
|
|
539
|
-
}
|
|
540
|
-
this.onValueChange(value);
|
|
541
|
-
}
|
|
542
|
-
setQueryParam(value) {
|
|
543
|
-
const tree = this.urlSerializer.parse(this.locationRef.path());
|
|
544
|
-
const isValueAvailableByKey = value instanceof Object;
|
|
545
|
-
const name = this.documentationPropertyName;
|
|
546
|
-
const nameWithSuffix = `${name}${SERIALIZED_SUFFIX}`;
|
|
547
|
-
const computedValue = isValueAvailableByKey && this.documentationPropertyValues
|
|
548
|
-
? this.documentationPropertyValues.indexOf(value)
|
|
549
|
-
: value;
|
|
550
|
-
tree.queryParams = tuiCleanObject({
|
|
551
|
-
...tree.queryParams,
|
|
552
|
-
/**
|
|
553
|
-
* Caretaker note: reset previous conflicted param in route
|
|
554
|
-
* issue: https://github.com/taiga-family/taiga-ui/issues/9764
|
|
555
|
-
*/
|
|
556
|
-
...(isValueAvailableByKey
|
|
557
|
-
? {
|
|
558
|
-
[nameWithSuffix]: computedValue,
|
|
559
|
-
[name]: undefined,
|
|
560
|
-
}
|
|
561
|
-
: {
|
|
562
|
-
[nameWithSuffix]: undefined,
|
|
563
|
-
[name]: computedValue,
|
|
564
|
-
}),
|
|
565
|
-
});
|
|
566
|
-
this.locationRef.go(this.urlStateHandler(tree));
|
|
567
|
-
}
|
|
568
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocDocumentationPropertyConnector, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
569
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocDocumentationPropertyConnector, isStandalone: true, selector: "ng-template[documentationPropertyName]", inputs: { documentationPropertyName: "documentationPropertyName", documentationPropertyMode: "documentationPropertyMode", documentationPropertyType: "documentationPropertyType", documentationPropertyValue: "documentationPropertyValue", documentationPropertyDeprecated: "documentationPropertyDeprecated", documentationPropertyValues: "documentationPropertyValues" }, outputs: { documentationPropertyValueChange: "documentationPropertyValueChange" }, exportAs: ["documentationProperty"], usesOnChanges: true, ngImport: i0 }); }
|
|
570
|
-
}
|
|
571
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocDocumentationPropertyConnector, decorators: [{
|
|
572
|
-
type: Directive,
|
|
573
|
-
args: [{
|
|
574
|
-
standalone: true,
|
|
575
|
-
selector: 'ng-template[documentationPropertyName]',
|
|
576
|
-
exportAs: 'documentationProperty',
|
|
577
|
-
}]
|
|
578
|
-
}], propDecorators: { documentationPropertyName: [{
|
|
579
|
-
type: Input
|
|
580
|
-
}], documentationPropertyMode: [{
|
|
581
|
-
type: Input
|
|
582
|
-
}], documentationPropertyType: [{
|
|
583
|
-
type: Input
|
|
584
|
-
}], documentationPropertyValue: [{
|
|
585
|
-
type: Input
|
|
586
|
-
}], documentationPropertyDeprecated: [{
|
|
587
|
-
type: Input
|
|
588
|
-
}], documentationPropertyValues: [{
|
|
589
|
-
type: Input
|
|
590
|
-
}], documentationPropertyValueChange: [{
|
|
591
|
-
type: Output
|
|
592
|
-
}] } });
|
|
593
|
-
|
|
594
|
-
class TuiShowCleanerPipe {
|
|
595
|
-
transform(type) {
|
|
596
|
-
return type.includes('null');
|
|
597
|
-
}
|
|
598
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiShowCleanerPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
599
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiShowCleanerPipe, isStandalone: true, name: "tuiShowCleanerPipe" }); }
|
|
600
|
-
}
|
|
601
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiShowCleanerPipe, decorators: [{
|
|
602
|
-
type: Pipe,
|
|
603
|
-
args: [{
|
|
604
|
-
standalone: true,
|
|
605
|
-
name: 'tuiShowCleanerPipe',
|
|
606
|
-
}]
|
|
607
|
-
}] });
|
|
608
|
-
|
|
609
|
-
class TuiIsOptionalPipe {
|
|
610
|
-
transform(name) {
|
|
611
|
-
return name.includes('?');
|
|
612
|
-
}
|
|
613
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIsOptionalPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
614
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiIsOptionalPipe, isStandalone: true, name: "tuiIsOptionalPipe" }); }
|
|
615
|
-
}
|
|
616
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIsOptionalPipe, decorators: [{
|
|
617
|
-
type: Pipe,
|
|
618
|
-
args: [{
|
|
619
|
-
standalone: true,
|
|
620
|
-
name: 'tuiIsOptionalPipe',
|
|
621
|
-
}]
|
|
622
|
-
}] });
|
|
623
|
-
|
|
624
|
-
class TuiStripOptionalPipe {
|
|
625
|
-
transform(name) {
|
|
626
|
-
return name.replace('?', '');
|
|
627
|
-
}
|
|
628
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiStripOptionalPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
629
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiStripOptionalPipe, isStandalone: true, name: "tuiStripOptionalPipe" }); }
|
|
630
|
-
}
|
|
631
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiStripOptionalPipe, decorators: [{
|
|
632
|
-
type: Pipe,
|
|
633
|
-
args: [{
|
|
634
|
-
standalone: true,
|
|
635
|
-
name: 'tuiStripOptionalPipe',
|
|
636
|
-
}]
|
|
420
|
+
}, 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() || null\" />\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 [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-body-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: 767.4px){.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: 767.4px){.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: 767.4px){.t-resizer{display:none}}.t-resizer-text{position:relative;z-index:1;font:var(--tui-font-body-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"] }]
|
|
637
421
|
}] });
|
|
638
422
|
|
|
639
|
-
|
|
640
|
-
// @bad TODO refactor to make more flexible
|
|
641
|
-
class TuiDocDocumentation {
|
|
423
|
+
class TuiDocTab {
|
|
642
424
|
constructor() {
|
|
643
|
-
this.
|
|
644
|
-
this.destroyRef = inject(DestroyRef);
|
|
645
|
-
this.propertiesConnectors = EMPTY_QUERY;
|
|
646
|
-
this.texts = inject(TUI_DOC_DOCUMENTATION_TEXTS);
|
|
647
|
-
this.excludedProperties = inject(TUI_DOC_EXCLUDED_PROPERTIES);
|
|
648
|
-
this.activeItemIndex = 0;
|
|
649
|
-
this.heading = '';
|
|
650
|
-
this.showValues = true;
|
|
651
|
-
this.isAPI = false;
|
|
652
|
-
this.matcher = (item, exclusions) => !exclusions.has(item.documentationPropertyName);
|
|
653
|
-
}
|
|
654
|
-
ngAfterContentInit() {
|
|
655
|
-
tuiQueryListChanges(this.propertiesConnectors)
|
|
656
|
-
.pipe(switchMap((items) => merge(...items.map(({ changed$ }) => changed$))), tuiWatch(this.cdr), takeUntilDestroyed(this.destroyRef))
|
|
657
|
-
.subscribe();
|
|
425
|
+
this.src = input('');
|
|
658
426
|
}
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
}
|
|
662
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocDocumentation, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
663
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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: "<h1\n *ngIf=\"heading\"\n class=\"t-heading\"\n>\n {{ heading }}\n</h1>\n<ng-content />\n<ng-container *ngIf=\"propertiesConnectors | tuiToArray | tuiFilter: matcher : excludedProperties as properties\">\n <table\n *ngIf=\"properties.length\"\n class=\"t-table\"\n >\n <tr class=\"t-row t-row_header\">\n <th class=\"t-th t-cell t-cell_prop\">{{ texts[2] }}</th>\n <th class=\"t-th\">{{ type }}</th>\n <th\n *ngIf=\"showValues && !isAPI\"\n class=\"t-th t-cell t-th_value\"\n >\n {{ texts[3] }}\n </th>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of properties\"\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 <code\n *ngIf=\"propertyConnector.attrName\"\n class=\"t-property-code\"\n [style.color]=\"'var(--tui-background-accent-2-pressed)'\"\n >\n {{ propertyConnector.attrName | tuiStripOptionalPipe }}\n </code>\n <tui-badge\n *ngIf=\"propertyConnector.attrName | tuiIsOptionalPipe\"\n appearance=\"neutral\"\n size=\"s\"\n >\n Optional\n </tui-badge>\n <tui-badge\n *ngIf=\"propertyConnector.documentationPropertyDeprecated\"\n appearance=\"negative\"\n size=\"s\"\n >\n Deprecated\n </tui-badge>\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 <ng-container\n *ngFor=\"\n let item of propertyConnector.documentationPropertyType | tuiDocTypeReference;\n let last = last\n \"\n >\n <a\n *ngIf=\"item.reference; else default\"\n target=\"_blank\"\n class=\"t-code-reference\"\n [attr.href]=\"item.reference\"\n >\n {{ item.type }}\n </a>\n <ng-template #default>\n {{ item.type }}\n </ng-template>\n <span *ngIf=\"!last\"> | </span>\n </ng-container>\n </code>\n </span>\n </td>\n <td\n *ngIf=\"showValues\"\n class=\"t-cell t-cell_value\"\n >\n <ng-container *ngIf=\"propertyConnector.shouldShowValues; else elseEmitter\">\n <tui-select\n *ngIf=\"propertyConnector.hasItems; else noItems\"\n tuiDropdownLimitWidth=\"min\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [tuiTextfieldCleaner]=\"propertyConnector.documentationPropertyType | tuiShowCleanerPipe\"\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 <ng-template\n #selectContent\n let-data\n >\n <code>{{ data | tuiInspectAny }}</code>\n </ng-template>\n\n <ng-template #noItems>\n <ng-container [ngSwitch]=\"propertyConnector.documentationPropertyType\">\n <input\n *ngSwitchCase=\"'boolean'\"\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 <tui-textfield\n *ngSwitchCase=\"'string'\"\n tuiTextfieldSize=\"m\"\n >\n <input\n tuiTextfield\n [id]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue || ''\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n />\n </tui-textfield>\n\n <tui-textfield\n *ngSwitchCase=\"'number'\"\n tuiTextfieldSize=\"m\"\n >\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 </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-template #elseEmitter>\n <tui-notification\n class=\"t-output\"\n [@emitEvent]=\"propertyConnector.emits()\"\n >\n Emit!\n </tui-notification>\n </ng-template>\n </td>\n </tr>\n </table>\n</ng-container>\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:-webkit-max-content;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;-webkit-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%;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: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TuiBadge, selector: "tui-badge,[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: i4$2.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: i5.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i5.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: ["size", "showIcons"] }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i4.TuiTextfieldDirective, selector: "input[tuiTextfield]:not([tuiInputCard]):not([tuiInputExpire]):not([tuiInputCVC])" }, { kind: "directive", type: i4.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: [
|
|
664
|
-
trigger('emitEvent', [
|
|
665
|
-
transition(':increment', [style({ opacity: 1 }), animate('500ms ease-in')]),
|
|
666
|
-
]),
|
|
667
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
427
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocTab, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
428
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.17", 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 }); }
|
|
668
429
|
}
|
|
669
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocTab, decorators: [{
|
|
670
431
|
type: Component,
|
|
671
|
-
args: [{
|
|
672
|
-
FormsModule,
|
|
673
|
-
NgForOf,
|
|
674
|
-
NgIf,
|
|
675
|
-
NgSwitch,
|
|
676
|
-
NgSwitchCase,
|
|
677
|
-
NgTemplateOutlet,
|
|
678
|
-
TuiBadge,
|
|
679
|
-
TuiDataListWrapper,
|
|
680
|
-
TuiDocTypeReferencePipe,
|
|
681
|
-
TuiDropdown,
|
|
682
|
-
TuiFilterPipe,
|
|
683
|
-
TuiInputNumber,
|
|
684
|
-
TuiInspectPipe,
|
|
685
|
-
TuiIsOptionalPipe,
|
|
686
|
-
TuiNotification,
|
|
687
|
-
TuiSelectModule,
|
|
688
|
-
TuiShowCleanerPipe,
|
|
689
|
-
TuiStripOptionalPipe,
|
|
690
|
-
TuiSwitch,
|
|
691
|
-
TuiTextfield,
|
|
692
|
-
TuiTextfieldControllerModule,
|
|
693
|
-
TuiToArrayPipe,
|
|
694
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiScrollbarOptionsProvider({ mode: 'hover' })], animations: [
|
|
695
|
-
trigger('emitEvent', [
|
|
696
|
-
transition(':increment', [style({ opacity: 1 }), animate('500ms ease-in')]),
|
|
697
|
-
]),
|
|
698
|
-
], template: "<h1\n *ngIf=\"heading\"\n class=\"t-heading\"\n>\n {{ heading }}\n</h1>\n<ng-content />\n<ng-container *ngIf=\"propertiesConnectors | tuiToArray | tuiFilter: matcher : excludedProperties as properties\">\n <table\n *ngIf=\"properties.length\"\n class=\"t-table\"\n >\n <tr class=\"t-row t-row_header\">\n <th class=\"t-th t-cell t-cell_prop\">{{ texts[2] }}</th>\n <th class=\"t-th\">{{ type }}</th>\n <th\n *ngIf=\"showValues && !isAPI\"\n class=\"t-th t-cell t-th_value\"\n >\n {{ texts[3] }}\n </th>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of properties\"\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 <code\n *ngIf=\"propertyConnector.attrName\"\n class=\"t-property-code\"\n [style.color]=\"'var(--tui-background-accent-2-pressed)'\"\n >\n {{ propertyConnector.attrName | tuiStripOptionalPipe }}\n </code>\n <tui-badge\n *ngIf=\"propertyConnector.attrName | tuiIsOptionalPipe\"\n appearance=\"neutral\"\n size=\"s\"\n >\n Optional\n </tui-badge>\n <tui-badge\n *ngIf=\"propertyConnector.documentationPropertyDeprecated\"\n appearance=\"negative\"\n size=\"s\"\n >\n Deprecated\n </tui-badge>\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 <ng-container\n *ngFor=\"\n let item of propertyConnector.documentationPropertyType | tuiDocTypeReference;\n let last = last\n \"\n >\n <a\n *ngIf=\"item.reference; else default\"\n target=\"_blank\"\n class=\"t-code-reference\"\n [attr.href]=\"item.reference\"\n >\n {{ item.type }}\n </a>\n <ng-template #default>\n {{ item.type }}\n </ng-template>\n <span *ngIf=\"!last\"> | </span>\n </ng-container>\n </code>\n </span>\n </td>\n <td\n *ngIf=\"showValues\"\n class=\"t-cell t-cell_value\"\n >\n <ng-container *ngIf=\"propertyConnector.shouldShowValues; else elseEmitter\">\n <tui-select\n *ngIf=\"propertyConnector.hasItems; else noItems\"\n tuiDropdownLimitWidth=\"min\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [tuiTextfieldCleaner]=\"propertyConnector.documentationPropertyType | tuiShowCleanerPipe\"\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 <ng-template\n #selectContent\n let-data\n >\n <code>{{ data | tuiInspectAny }}</code>\n </ng-template>\n\n <ng-template #noItems>\n <ng-container [ngSwitch]=\"propertyConnector.documentationPropertyType\">\n <input\n *ngSwitchCase=\"'boolean'\"\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 <tui-textfield\n *ngSwitchCase=\"'string'\"\n tuiTextfieldSize=\"m\"\n >\n <input\n tuiTextfield\n [id]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue || ''\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n />\n </tui-textfield>\n\n <tui-textfield\n *ngSwitchCase=\"'number'\"\n tuiTextfieldSize=\"m\"\n >\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 </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-template #elseEmitter>\n <tui-notification\n class=\"t-output\"\n [@emitEvent]=\"propertyConnector.emits()\"\n >\n Emit!\n </tui-notification>\n </ng-template>\n </td>\n </tr>\n </table>\n</ng-container>\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:-webkit-max-content;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;-webkit-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%;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"] }]
|
|
699
|
-
}], propDecorators: { propertiesConnectors: [{
|
|
700
|
-
type: ContentChildren,
|
|
701
|
-
args: [TuiDocDocumentationPropertyConnector]
|
|
702
|
-
}], heading: [{
|
|
703
|
-
type: Input
|
|
704
|
-
}], showValues: [{
|
|
705
|
-
type: Input
|
|
706
|
-
}], isAPI: [{
|
|
707
|
-
type: Input
|
|
708
|
-
}] } });
|
|
709
|
-
|
|
710
|
-
class TuiGetColorPipe {
|
|
711
|
-
transform(color) {
|
|
712
|
-
if (color.length === 4) {
|
|
713
|
-
return color
|
|
714
|
-
.split('')
|
|
715
|
-
.reduce((result, current) => [...result, current, current], [])
|
|
716
|
-
.join('')
|
|
717
|
-
.replace('#', '');
|
|
718
|
-
}
|
|
719
|
-
if (color.startsWith('#')) {
|
|
720
|
-
return color;
|
|
721
|
-
}
|
|
722
|
-
if (color === 'transparent') {
|
|
723
|
-
return '#000000';
|
|
724
|
-
}
|
|
725
|
-
const parsed = color
|
|
726
|
-
.replace('rgb(', '')
|
|
727
|
-
.replace('rgba(', '')
|
|
728
|
-
.replace(')', '')
|
|
729
|
-
.replace(' ', '')
|
|
730
|
-
.split(',')
|
|
731
|
-
.map((v) => Number.parseInt(v, 10));
|
|
732
|
-
return tuiRgbToHex(...parsed);
|
|
733
|
-
}
|
|
734
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiGetColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
735
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiGetColorPipe, isStandalone: true, name: "tuiGetColorPipe" }); }
|
|
736
|
-
}
|
|
737
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiGetColorPipe, decorators: [{
|
|
738
|
-
type: Pipe,
|
|
739
|
-
args: [{
|
|
740
|
-
standalone: true,
|
|
741
|
-
name: 'tuiGetColorPipe',
|
|
742
|
-
}]
|
|
743
|
-
}] });
|
|
744
|
-
|
|
745
|
-
class TuiGetOpacityPipe {
|
|
746
|
-
transform(color) {
|
|
747
|
-
if (color.startsWith('#') || color.startsWith('rgb(')) {
|
|
748
|
-
return 100;
|
|
749
|
-
}
|
|
750
|
-
if (color === 'transparent') {
|
|
751
|
-
return 0;
|
|
752
|
-
}
|
|
753
|
-
const lastComma = color.lastIndexOf(',');
|
|
754
|
-
const parsed = color
|
|
755
|
-
.slice(lastComma)
|
|
756
|
-
.replace(')', '')
|
|
757
|
-
.replace(' ', '')
|
|
758
|
-
.replace(',', '');
|
|
759
|
-
return Math.round(Number.parseFloat(parsed) * 100);
|
|
760
|
-
}
|
|
761
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiGetOpacityPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
762
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiGetOpacityPipe, isStandalone: true, name: "tuiGetOpacity" }); }
|
|
763
|
-
}
|
|
764
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiGetOpacityPipe, decorators: [{
|
|
765
|
-
type: Pipe,
|
|
766
|
-
args: [{
|
|
767
|
-
standalone: true,
|
|
768
|
-
name: 'tuiGetOpacity',
|
|
769
|
-
}]
|
|
770
|
-
}] });
|
|
771
|
-
|
|
772
|
-
class TuiIsPrimitivePolymorpheusContentPipe {
|
|
773
|
-
transform(value) {
|
|
774
|
-
return tuiIsString(value) || tuiIsNumber(value);
|
|
775
|
-
}
|
|
776
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIsPrimitivePolymorpheusContentPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
777
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiIsPrimitivePolymorpheusContentPipe, isStandalone: true, name: "tuiIsPrimitivePolymorpheusContentPipe" }); }
|
|
778
|
-
}
|
|
779
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIsPrimitivePolymorpheusContentPipe, decorators: [{
|
|
780
|
-
type: Pipe,
|
|
781
|
-
args: [{
|
|
782
|
-
standalone: true,
|
|
783
|
-
name: 'tuiIsPrimitivePolymorpheusContentPipe',
|
|
784
|
-
}]
|
|
432
|
+
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"] }]
|
|
785
433
|
}] });
|
|
786
434
|
|
|
787
435
|
const TUI_DOC_EXAMPLE_DEFAULT_OPTIONS = {
|
|
@@ -793,24 +441,18 @@ const TUI_DOC_EXAMPLE_DEFAULT_OPTIONS = {
|
|
|
793
441
|
/**
|
|
794
442
|
* Default parameters for DocExample component
|
|
795
443
|
*/
|
|
796
|
-
const TUI_DOC_EXAMPLE_OPTIONS =
|
|
797
|
-
factory: () => TUI_DOC_EXAMPLE_DEFAULT_OPTIONS,
|
|
798
|
-
});
|
|
799
|
-
function tuiDocExampleOptionsProvider(options) {
|
|
800
|
-
return tuiProvideOptions(TUI_DOC_EXAMPLE_OPTIONS, options, TUI_DOC_EXAMPLE_DEFAULT_OPTIONS);
|
|
801
|
-
}
|
|
444
|
+
const [TUI_DOC_EXAMPLE_OPTIONS, tuiDocExampleOptionsProvider] = tuiCreateOptions(TUI_DOC_EXAMPLE_DEFAULT_OPTIONS);
|
|
802
445
|
|
|
803
446
|
class TuiDocExampleGetTabsPipe {
|
|
804
447
|
transform(content, defaultTab) {
|
|
805
448
|
return [defaultTab, ...Object.keys(content).filter((tab) => content[tab])];
|
|
806
449
|
}
|
|
807
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
808
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
450
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocExampleGetTabsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
451
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: TuiDocExampleGetTabsPipe, isStandalone: true, name: "tuiDocExampleGetTabs" }); }
|
|
809
452
|
}
|
|
810
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
453
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocExampleGetTabsPipe, decorators: [{
|
|
811
454
|
type: Pipe,
|
|
812
455
|
args: [{
|
|
813
|
-
standalone: true,
|
|
814
456
|
name: 'tuiDocExampleGetTabs',
|
|
815
457
|
}]
|
|
816
458
|
}] });
|
|
@@ -818,12 +460,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
818
460
|
class TuiDocExample {
|
|
819
461
|
constructor() {
|
|
820
462
|
this.clipboard = inject(Clipboard);
|
|
821
|
-
this.alerts = inject(
|
|
463
|
+
this.alerts = inject(TuiNotificationService);
|
|
822
464
|
this.location = inject(WA_LOCATION);
|
|
823
|
-
this.copyTexts
|
|
465
|
+
this.copyTexts = inject(TUI_COPY_TEXTS);
|
|
824
466
|
this.processContent = inject(TUI_DOC_EXAMPLE_CONTENT_PROCESSOR);
|
|
825
467
|
this.rawLoader$$ = new BehaviorSubject({});
|
|
826
|
-
this.lazyLoader$$ = new ReplaySubject(1);
|
|
827
468
|
this.fullscreenEnabled = inject(DOCUMENT).fullscreenEnabled;
|
|
828
469
|
this.icons = inject(TUI_DOC_ICONS);
|
|
829
470
|
this.options = inject(TUI_DOC_EXAMPLE_OPTIONS);
|
|
@@ -835,22 +476,20 @@ class TuiDocExample {
|
|
|
835
476
|
this.defaultTab = this.texts[this.defaultTabIndex];
|
|
836
477
|
this.activeItemIndex = this.defaultTabIndex;
|
|
837
478
|
this.fullscreen = false;
|
|
838
|
-
this.copy =
|
|
839
|
-
initialValue: '',
|
|
840
|
-
});
|
|
479
|
+
this.copy = computed(() => this.copyTexts()[0]);
|
|
841
480
|
this.loading = signal(false);
|
|
842
481
|
this.processor = toSignal(this.rawLoader$$.pipe(switchMap(tuiRawLoadRecord), map((value) => this.processContent(value))), { initialValue: {} });
|
|
843
|
-
this.
|
|
844
|
-
this.
|
|
845
|
-
this.
|
|
846
|
-
this.
|
|
482
|
+
this.id = input(null);
|
|
483
|
+
this.heading = input();
|
|
484
|
+
this.description = input();
|
|
485
|
+
this.fullsize = input(inject(TUI_DOC_EXAMPLE_OPTIONS).fullsize);
|
|
486
|
+
this.componentName = input(this.location.pathname.slice(1));
|
|
487
|
+
this.component = input();
|
|
488
|
+
this.content = input({});
|
|
847
489
|
this.visible = (files) => Boolean(this.codeEditor && this.options.codeEditorVisibilityHandler(files));
|
|
848
490
|
}
|
|
849
|
-
|
|
850
|
-
this.rawLoader$$.next(content);
|
|
851
|
-
}
|
|
852
|
-
set component(content) {
|
|
853
|
-
this.lazyLoader$$.next(content);
|
|
491
|
+
ngOnChanges() {
|
|
492
|
+
this.rawLoader$$.next(this.content());
|
|
854
493
|
}
|
|
855
494
|
getTabTitle(fileName) {
|
|
856
495
|
return this.options.tabTitles.get(fileName) || fileName;
|
|
@@ -864,17 +503,17 @@ class TuiDocExample {
|
|
|
864
503
|
edit(files) {
|
|
865
504
|
this.loading.set(true);
|
|
866
505
|
this.codeEditor
|
|
867
|
-
?.edit(this.componentName, this.id || '', files)
|
|
506
|
+
?.edit(this.componentName(), this.id() || '', files)
|
|
868
507
|
.finally(() => this.loading.set(false));
|
|
869
508
|
}
|
|
870
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
871
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
509
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocExample, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
510
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", 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: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "id()", "class._fullsize": "fullsize()" } }, usesOnChanges: true, 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: 767.4px){:host{padding-block-start:2rem}}.t-title-block{display:flex;flex-direction:row-reverse}.t-title{font:var(--tui-font-heading-h5);margin:0 auto .5rem 0}@media screen and (max-width: 767.4px){.t-title{font:var(--tui-font-heading-h6)}}.t-title:hover+.t-link{opacity:1}.t-link{font:var(--tui-font-heading-h6);padding-inline-end:.1rem}@media not screen and (max-width: 767.4px){.t-link{font:var(--tui-font-heading-h5);margin-inline-start:-1.6rem}.t-link:not(:hover,:focus-visible):not(.t-link-active){opacity:0}}.t-description{font:var(--tui-font-body-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: 767.4px){.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: 767.4px){.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: 767.4px){.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 screen and (max-width: 767.4px){.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: ["tuiFullscreen", "tuiFullscreenOptions"], outputs: ["tuiFullscreenChange"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]" }, { 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", inputs: ["activeItemIndex", "size", "underline", "itemsLimit", "moreContent", "dropdownContent"], outputs: ["activeItemIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
872
511
|
}
|
|
873
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
512
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocExample, decorators: [{
|
|
874
513
|
type: Component,
|
|
875
|
-
args: [{
|
|
876
|
-
|
|
877
|
-
|
|
514
|
+
args: [{ selector: 'tui-doc-example', imports: [
|
|
515
|
+
AsyncPipe,
|
|
516
|
+
NgComponentOutlet,
|
|
878
517
|
PolymorpheusOutlet,
|
|
879
518
|
RouterLink,
|
|
880
519
|
RouterLinkActive,
|
|
@@ -882,30 +521,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
882
521
|
TuiDocCode,
|
|
883
522
|
TuiDocExampleGetTabsPipe,
|
|
884
523
|
TuiFullscreen,
|
|
885
|
-
TuiLet,
|
|
886
524
|
TuiLink,
|
|
887
525
|
TuiLoader,
|
|
888
526
|
TuiMapperPipe,
|
|
889
527
|
TuiTabs,
|
|
890
528
|
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
891
|
-
'[attr.id]': 'id',
|
|
892
|
-
'[class._fullsize]': 'fullsize',
|
|
893
|
-
}, template: "<div class=\"t-title-block\">\n
|
|
894
|
-
}]
|
|
895
|
-
type: Input
|
|
896
|
-
}], heading: [{
|
|
897
|
-
type: Input
|
|
898
|
-
}], description: [{
|
|
899
|
-
type: Input
|
|
900
|
-
}], fullsize: [{
|
|
901
|
-
type: Input
|
|
902
|
-
}], componentName: [{
|
|
903
|
-
type: Input
|
|
904
|
-
}], content: [{
|
|
905
|
-
type: Input
|
|
906
|
-
}], component: [{
|
|
907
|
-
type: Input
|
|
908
|
-
}] } });
|
|
529
|
+
'[attr.id]': 'id()',
|
|
530
|
+
'[class._fullsize]': 'fullsize()',
|
|
531
|
+
}, 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: 767.4px){:host{padding-block-start:2rem}}.t-title-block{display:flex;flex-direction:row-reverse}.t-title{font:var(--tui-font-heading-h5);margin:0 auto .5rem 0}@media screen and (max-width: 767.4px){.t-title{font:var(--tui-font-heading-h6)}}.t-title:hover+.t-link{opacity:1}.t-link{font:var(--tui-font-heading-h6);padding-inline-end:.1rem}@media not screen and (max-width: 767.4px){.t-link{font:var(--tui-font-heading-h5);margin-inline-start:-1.6rem}.t-link:not(:hover,:focus-visible):not(.t-link-active){opacity:0}}.t-description{font:var(--tui-font-body-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: 767.4px){.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: 767.4px){.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: 767.4px){.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 screen and (max-width: 767.4px){.t-demo{padding:1rem}}:host:not(._fullsize) .t-demo{inline-size:min-content;min-inline-size:21rem}tui-doc-code{overflow:hidden}\n"] }]
|
|
532
|
+
}] });
|
|
909
533
|
|
|
910
534
|
function labelsProviderFactory(pages) {
|
|
911
535
|
return pages
|
|
@@ -964,41 +588,49 @@ class TuiDocScrollIntoViewLink {
|
|
|
964
588
|
this.sub = inject(TUI_DOC_PAGE_LOADED)
|
|
965
589
|
.pipe(filter(Boolean), take(1), switchMap(() => this.scroll$), debounceTime(750, tuiZonefreeScheduler()), filter((shallWe) => shallWe && !!tuiGetElementObscures(this.el)), takeUntilDestroyed())
|
|
966
590
|
.subscribe(() => this.el.scrollIntoView());
|
|
591
|
+
this.tuiDocScrollIntoViewLink = input(false);
|
|
967
592
|
}
|
|
968
|
-
|
|
969
|
-
this.scroll$.next(
|
|
593
|
+
ngOnChanges() {
|
|
594
|
+
this.scroll$.next(this.tuiDocScrollIntoViewLink());
|
|
970
595
|
}
|
|
971
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
972
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
596
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocScrollIntoViewLink, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
597
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiDocScrollIntoViewLink, isStandalone: true, selector: "[tuiDocScrollIntoViewLink]", inputs: { tuiDocScrollIntoViewLink: { classPropertyName: "tuiDocScrollIntoViewLink", publicName: "tuiDocScrollIntoViewLink", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
|
|
973
598
|
}
|
|
974
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
599
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocScrollIntoViewLink, decorators: [{
|
|
975
600
|
type: Directive,
|
|
976
601
|
args: [{
|
|
977
|
-
standalone: true,
|
|
978
602
|
selector: '[tuiDocScrollIntoViewLink]',
|
|
979
603
|
}]
|
|
980
|
-
}]
|
|
981
|
-
type: Input
|
|
982
|
-
}] } });
|
|
604
|
+
}] });
|
|
983
605
|
|
|
606
|
+
function tuiUniqBy(array, key) {
|
|
607
|
+
return Array.from(array
|
|
608
|
+
.reduce((map, item) => (map.has(item[key]) ? map : map.set(item[key], item)), new Map())
|
|
609
|
+
.values());
|
|
610
|
+
}
|
|
984
611
|
class TuiDocNavigation {
|
|
985
612
|
constructor() {
|
|
613
|
+
this.searchInput = viewChild(TuiInputDirective, { read: ElementRef });
|
|
986
614
|
this.router = inject(Router);
|
|
987
615
|
this.doc = inject(DOCUMENT);
|
|
988
616
|
this.open = signal(false);
|
|
989
617
|
this.menuOpen = false;
|
|
990
|
-
this.
|
|
618
|
+
this.drawer = inject(TuiDrawer, { optional: true });
|
|
991
619
|
this.labels = inject(NAVIGATION_LABELS);
|
|
992
620
|
this.items = inject(NAVIGATION_ITEMS);
|
|
993
621
|
this.searchText = inject(TUI_DOC_SEARCH_TEXT);
|
|
994
622
|
this.searchEnabled = inject(TUI_DOC_SEARCH_ENABLED);
|
|
995
623
|
this.docIcons = inject(TUI_DOC_ICONS);
|
|
996
624
|
this.icons = inject(TUI_COMMON_ICONS);
|
|
625
|
+
this.flat = this.items.reduce((array, item) => [
|
|
626
|
+
...array,
|
|
627
|
+
item.reduce((pages, page) => 'subPages' in page ? [...pages, ...page.subPages] : [...pages, page], []),
|
|
628
|
+
], []);
|
|
997
629
|
this.openPagesArr = [];
|
|
998
630
|
this.openPagesGroupsArr = [];
|
|
999
631
|
this.active = '';
|
|
1000
632
|
this.search = new FormControl('');
|
|
1001
|
-
this.filtered = toSignal(tuiControlValue(this.search).pipe(filter((search) => search.trim().length > 2), map((search) => this.filterItems(this.
|
|
633
|
+
this.filtered = toSignal(tuiControlValue(this.search).pipe(filter((search) => search.trim().length > 2), map((search) => this.filterItems(this.flat, search))), { initialValue: [] });
|
|
1002
634
|
const titleService = inject(Title);
|
|
1003
635
|
const readyToScroll$ = inject(TUI_DOC_PAGE_LOADED);
|
|
1004
636
|
inject(NAVIGATION_TITLE)
|
|
@@ -1043,7 +675,7 @@ class TuiDocNavigation {
|
|
|
1043
675
|
onFocusSearch(event) {
|
|
1044
676
|
if (event.code === 'Slash' &&
|
|
1045
677
|
!this.doc.activeElement?.matches('input,textarea,[contenteditable]')) {
|
|
1046
|
-
this.searchInput?.nativeElement?.focus();
|
|
678
|
+
this.searchInput()?.nativeElement?.focus();
|
|
1047
679
|
event.preventDefault();
|
|
1048
680
|
}
|
|
1049
681
|
}
|
|
@@ -1062,14 +694,6 @@ class TuiDocNavigation {
|
|
|
1062
694
|
search.split(/\s/).find((word) => title.includes(word)));
|
|
1063
695
|
}), 'title'));
|
|
1064
696
|
}
|
|
1065
|
-
flattenSubPages(items) {
|
|
1066
|
-
return items.reduce((array, item) => [
|
|
1067
|
-
...array,
|
|
1068
|
-
item.reduce((pages, page) => 'subPages' in page
|
|
1069
|
-
? [...pages, ...page.subPages]
|
|
1070
|
-
: [...pages, page], []),
|
|
1071
|
-
], []);
|
|
1072
|
-
}
|
|
1073
697
|
isActiveRoute(route) {
|
|
1074
698
|
return this.router.isActive(route, {
|
|
1075
699
|
paths: 'subset',
|
|
@@ -1112,20 +736,12 @@ class TuiDocNavigation {
|
|
|
1112
736
|
target.click();
|
|
1113
737
|
target.remove();
|
|
1114
738
|
}
|
|
1115
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1116
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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: "<tui-textfield\n *ngIf=\"searchEnabled()\"\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 <code\n *ngIf=\"!search.value\"\n class=\"t-slash\"\n >\n /\n </code>\n <input\n tuiTextfield\n class=\"t-prevent-ios-scroll\"\n [formControl]=\"search\"\n [placeholder]=\"searchText\"\n [tuiAutoFocus]=\"!!sidebar\"\n />\n <ng-container *ngIf=\"canOpen\">\n <tui-data-list *tuiTextfieldDropdown>\n <tui-opt-group\n *ngFor=\"let group of filtered(); let index = index\"\n [label]=\"labels[index] || ''\"\n >\n <ng-container *ngFor=\"let item of group\">\n <a\n *ngIf=\"item.route.includes('://'); else internal\"\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\n <ng-template #internal>\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 </ng-template>\n </ng-container>\n </tui-opt-group>\n </tui-data-list>\n </ng-container>\n</tui-textfield>\n\n<nav class=\"t-navigation\">\n <tui-scrollbar class=\"t-scrollbar\">\n <tui-accordion\n [class.t-accordion-standalone]=\"!searchEnabled()\"\n [closeOthers]=\"false\"\n [rounded]=\"false\"\n >\n <tui-accordion-item\n *ngFor=\"let label of labels; index as index\"\n size=\"s\"\n [borders]=\"null\"\n [open]=\"!!openPagesArr[index]\"\n (openChange)=\"openPagesArr[index] = $event\"\n >\n <span class=\"t-label\">\n <strong>{{ label }}</strong>\n </span>\n <ng-template tuiAccordionItemContent>\n <div class=\"t-section\">\n <ng-container\n *ngFor=\"let item of items[index]; index as subIndex\"\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: index * 100 + subIndex}\"\n />\n </div>\n </ng-template>\n </tui-accordion-item>\n </tui-accordion>\n <div class=\"t-items-container\">\n <ng-container\n *ngFor=\"let item of itemsWithoutSections; let index = index\"\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: items.length - 1 + index}\"\n />\n </div>\n\n <ng-template\n #pages\n let-index=\"index\"\n let-item=\"item\"\n >\n <ng-container *ngIf=\"!item.subPages; else subPagesTemplate\">\n <a\n *ngIf=\"item.route.includes('://'); else internal\"\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\n <ng-template #internal>\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 </ng-template>\n </ng-container>\n\n <ng-template #subPagesTemplate>\n <div\n routerLinkActive\n class=\"t-subsection\"\n [routerLinkActiveOptions]=\"{exact: false}\"\n >\n <button\n *ngIf=\"item.subPages\"\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 <tui-expand\n class=\"t-expand\"\n [expanded]=\"!!openPagesGroupsArr[index]\"\n >\n <div class=\"t-section t-section_bordered\">\n <ng-container *ngFor=\"let subPage of $pages(item.subPages)\">\n <a\n *ngIf=\"subPage.route.includes('://'); else internal\"\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\n <ng-template #internal>\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 </ng-template>\n </ng-container>\n </div>\n </tui-expand>\n </div>\n </ng-template>\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-input ::ng-deep tui-icon{border-width:.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}.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}.t-section{display:flex;flex-direction:column;align-items:flex-start;margin:-.5rem 0 -1rem}.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;inline-size:1rem;block-size:1rem;margin:-.25rem .25rem 0 -.1875rem}.t-chevron_active{transform:rotate(90deg)}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i2$2.TuiAccordionItem, selector: "tui-accordion-item", inputs: ["noPadding", "showArrow", "borders", "size", "disabled", "disableHover", "open", "async"], outputs: ["openChange"] }, { kind: "directive", type: i2$2.TuiAccordionDirective, selector: "tui-accordion", inputs: ["closeOthers"] }, { kind: "directive", type: i2$2.TuiAccordionItemContent, selector: "ng-template[tuiAccordionItemContent]" }, { 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: i4$1.TuiExpandComponent, selector: "tui-expand", inputs: ["async", "expanded"] }, { kind: "component", type: TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }, { kind: "ngmodule", type: TuiInputModule }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i4.TuiTextfieldDirective, selector: "input[tuiTextfield]:not([tuiInputCard]):not([tuiInputExpire]):not([tuiInputCVC])" }, { kind: "directive", type: i4.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i4.TuiTextfieldDropdownDirective, selector: "ng-template[tuiTextfieldDropdown]" }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "directive", type: i8.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
739
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocNavigation, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
740
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", 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: TuiInputDirective, descendants: true, read: ElementRef, isSignal: true }], 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 tuiInput\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-body-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: i1$2.TuiItem, selector: "[tuiItem]" }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { kind: "component", type: i3$3.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i3$3.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "directive", type: i3$3.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: "component", type: i3.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i3.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i4.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "directive", type: i5.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "invalid", "focused", "state"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]" }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1117
741
|
}
|
|
1118
|
-
|
|
1119
|
-
tuiPure
|
|
1120
|
-
], TuiDocNavigation.prototype, "filterItems", null);
|
|
1121
|
-
__decorate([
|
|
1122
|
-
tuiPure
|
|
1123
|
-
], TuiDocNavigation.prototype, "flattenSubPages", null);
|
|
1124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocNavigation, decorators: [{
|
|
742
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocNavigation, decorators: [{
|
|
1125
743
|
type: Component,
|
|
1126
|
-
args: [{
|
|
1127
|
-
NgForOf,
|
|
1128
|
-
NgIf,
|
|
744
|
+
args: [{ selector: 'tui-doc-navigation', imports: [
|
|
1129
745
|
NgTemplateOutlet,
|
|
1130
746
|
PolymorpheusOutlet,
|
|
1131
747
|
ReactiveFormsModule,
|
|
@@ -1137,109 +753,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1137
753
|
TuiDocScrollIntoViewLink,
|
|
1138
754
|
TuiExpand,
|
|
1139
755
|
TuiIcon,
|
|
1140
|
-
|
|
756
|
+
TuiInput,
|
|
1141
757
|
TuiLink,
|
|
1142
758
|
TuiScrollbar,
|
|
1143
|
-
TuiTextfield,
|
|
1144
|
-
TuiTextfieldControllerModule,
|
|
1145
759
|
], changeDetection: ChangeDetectionStrategy.OnPush, providers: NAVIGATION_PROVIDERS, host: {
|
|
1146
760
|
'[class._open]': 'menuOpen',
|
|
1147
761
|
'(window:keydown)': 'onFocusSearch($event)',
|
|
1148
|
-
}, template: "<tui-textfield\n *ngIf=\"searchEnabled()\"\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 <code\n *ngIf=\"!search.value\"\n class=\"t-slash\"\n >\n /\n </code>\n <input\n tuiTextfield\n class=\"t-prevent-ios-scroll\"\n [formControl]=\"search\"\n [placeholder]=\"searchText\"\n [tuiAutoFocus]=\"!!sidebar\"\n />\n <ng-container *ngIf=\"canOpen\">\n <tui-data-list *tuiTextfieldDropdown>\n <tui-opt-group\n *ngFor=\"let group of filtered(); let index = index\"\n [label]=\"labels[index] || ''\"\n >\n <ng-container *ngFor=\"let item of group\">\n <a\n *ngIf=\"item.route.includes('://'); else internal\"\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\n <ng-template #internal>\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 </ng-template>\n </ng-container>\n </tui-opt-group>\n </tui-data-list>\n </ng-container>\n</tui-textfield>\n\n<nav class=\"t-navigation\">\n <tui-scrollbar class=\"t-scrollbar\">\n <tui-accordion\n [class.t-accordion-standalone]=\"!searchEnabled()\"\n [closeOthers]=\"false\"\n [rounded]=\"false\"\n >\n <tui-accordion-item\n *ngFor=\"let label of labels; index as index\"\n size=\"s\"\n [borders]=\"null\"\n [open]=\"!!openPagesArr[index]\"\n (openChange)=\"openPagesArr[index] = $event\"\n >\n <span class=\"t-label\">\n <strong>{{ label }}</strong>\n </span>\n <ng-template tuiAccordionItemContent>\n <div class=\"t-section\">\n <ng-container\n *ngFor=\"let item of items[index]; index as subIndex\"\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: index * 100 + subIndex}\"\n />\n </div>\n </ng-template>\n </tui-accordion-item>\n </tui-accordion>\n <div class=\"t-items-container\">\n <ng-container\n *ngFor=\"let item of itemsWithoutSections; let index = index\"\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: items.length - 1 + index}\"\n />\n </div>\n\n <ng-template\n #pages\n let-index=\"index\"\n let-item=\"item\"\n >\n <ng-container *ngIf=\"!item.subPages; else subPagesTemplate\">\n <a\n *ngIf=\"item.route.includes('://'); else internal\"\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\n <ng-template #internal>\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 </ng-template>\n </ng-container>\n\n <ng-template #subPagesTemplate>\n <div\n routerLinkActive\n class=\"t-subsection\"\n [routerLinkActiveOptions]=\"{exact: false}\"\n >\n <button\n *ngIf=\"item.subPages\"\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 <tui-expand\n class=\"t-expand\"\n [expanded]=\"!!openPagesGroupsArr[index]\"\n >\n <div class=\"t-section t-section_bordered\">\n <ng-container *ngFor=\"let subPage of $pages(item.subPages)\">\n <a\n *ngIf=\"subPage.route.includes('://'); else internal\"\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\n <ng-template #internal>\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 </ng-template>\n </ng-container>\n </div>\n </tui-expand>\n </div>\n </ng-template>\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-input ::ng-deep tui-icon{border-width:.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}.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}.t-section{display:flex;flex-direction:column;align-items:flex-start;margin:-.5rem 0 -1rem}.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;inline-size:1rem;block-size:1rem;margin:-.25rem .25rem 0 -.1875rem}.t-chevron_active{transform:rotate(90deg)}\n"] }]
|
|
1149
|
-
}], ctorParameters:
|
|
1150
|
-
type: ViewChild,
|
|
1151
|
-
args: [TuiTextfieldDirective, { read: ElementRef }]
|
|
1152
|
-
}], filterItems: [], flattenSubPages: [] } });
|
|
762
|
+
}, 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 tuiInput\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-body-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"] }]
|
|
763
|
+
}], ctorParameters: () => [] });
|
|
1153
764
|
|
|
1154
765
|
class TuiDocHeader {
|
|
1155
766
|
constructor() {
|
|
1156
|
-
this.stream$ = new Subject();
|
|
1157
767
|
this.router = inject(Router);
|
|
768
|
+
this.routeEvents = toSignal(this.router.events, { initialValue: null });
|
|
1158
769
|
this.icons = inject(TUI_DOC_ICONS);
|
|
1159
770
|
this.logo = inject(TUI_DOC_LOGO);
|
|
1160
771
|
this.menu = inject(TUI_DOC_MENU_TEXT);
|
|
1161
|
-
this.open =
|
|
1162
|
-
|
|
1163
|
-
onClick() {
|
|
1164
|
-
this.stream$.next(true);
|
|
1165
|
-
}
|
|
1166
|
-
onActiveZone(active) {
|
|
1167
|
-
if (!active) {
|
|
1168
|
-
this.stream$.next(false);
|
|
1169
|
-
}
|
|
772
|
+
this.open = signal(false);
|
|
773
|
+
effect(() => this.routeEvents() && this.open.set(false));
|
|
1170
774
|
}
|
|
1171
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1172
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
775
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
776
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: TuiDocHeader, isStandalone: true, selector: "header[tuiDocHeader]", ngImport: i0, template: "<button\n appearance=\"icon\"\n tuiIconButton\n type=\"button\"\n class=\"t-menu\"\n [iconStart]=\"icons.menu\"\n [title]=\"menu\"\n (click)=\"open.set(true)\"\n></button>\n\n<tui-drawer\n *tuiPopup=\"open()\"\n direction=\"start\"\n class=\"t-drawer\"\n [overlay]=\"true\"\n (click.self)=\"open.set(false)\"\n>\n <tui-doc-navigation />\n</tui-drawer>\n\n<div class=\"t-logo\">\n <img\n *polymorpheusOutlet=\"logo as src\"\n alt=\"Logo\"\n class=\"t-img\"\n [src]=\"src\"\n />\n</div>\n<ng-content />\n", styles: [":host{position:fixed;top:0;left:0;right:0;z-index:1;display:flex;box-shadow:0 .25rem 1.875rem #0000001a;block-size:4.125rem;align-items:center;padding:0 1.25rem;background:var(--tui-background-base);background:color-mix(in srgb,var(--tui-background-base) 70%,var(--tui-background-base) 0%);-webkit-backdrop-filter:blur(.625rem);backdrop-filter:blur(.625rem);border-radius:.9375rem;border:1px solid var(--tui-border-normal);margin:.4375rem 1rem}.t-logo{margin-inline-end:auto;font:var(--tui-font-heading-h5)}.t-img{display:block}.t-menu{margin-inline-start:-1.25rem}@media screen and (min-width: 768px){.t-menu{display:none}}.t-drawer{inline-size:17.25rem}\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"] }, { kind: "component", type: TuiDocNavigation, selector: "tui-doc-navigation" }, { kind: "component", type: TuiDrawer, selector: "tui-drawer", inputs: ["direction", "overlay"] }, { kind: "directive", type: TuiPopup, selector: "ng-template[tuiPopup]", inputs: ["tuiPopup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1173
777
|
}
|
|
1174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
778
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocHeader, decorators: [{
|
|
1175
779
|
type: Component,
|
|
1176
|
-
args: [{
|
|
1177
|
-
}] });
|
|
780
|
+
args: [{ selector: 'header[tuiDocHeader]', imports: [PolymorpheusOutlet, TuiButton, TuiDocNavigation, TuiDrawer, TuiPopup], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n appearance=\"icon\"\n tuiIconButton\n type=\"button\"\n class=\"t-menu\"\n [iconStart]=\"icons.menu\"\n [title]=\"menu\"\n (click)=\"open.set(true)\"\n></button>\n\n<tui-drawer\n *tuiPopup=\"open()\"\n direction=\"start\"\n class=\"t-drawer\"\n [overlay]=\"true\"\n (click.self)=\"open.set(false)\"\n>\n <tui-doc-navigation />\n</tui-drawer>\n\n<div class=\"t-logo\">\n <img\n *polymorpheusOutlet=\"logo as src\"\n alt=\"Logo\"\n class=\"t-img\"\n [src]=\"src\"\n />\n</div>\n<ng-content />\n", styles: [":host{position:fixed;top:0;left:0;right:0;z-index:1;display:flex;box-shadow:0 .25rem 1.875rem #0000001a;block-size:4.125rem;align-items:center;padding:0 1.25rem;background:var(--tui-background-base);background:color-mix(in srgb,var(--tui-background-base) 70%,var(--tui-background-base) 0%);-webkit-backdrop-filter:blur(.625rem);backdrop-filter:blur(.625rem);border-radius:.9375rem;border:1px solid var(--tui-border-normal);margin:.4375rem 1rem}.t-logo{margin-inline-end:auto;font:var(--tui-font-heading-h5)}.t-img{display:block}.t-menu{margin-inline-start:-1.25rem}@media screen and (min-width: 768px){.t-menu{display:none}}.t-drawer{inline-size:17.25rem}\n"] }]
|
|
781
|
+
}], ctorParameters: () => [] });
|
|
1178
782
|
|
|
1179
783
|
class TuiDocSeeAlso {
|
|
1180
784
|
constructor() {
|
|
1181
785
|
this.pages = inject(TUI_DOC_MAP_PAGES);
|
|
1182
786
|
this.text = inject(TUI_DOC_SEE_ALSO_TEXT);
|
|
1183
|
-
this.seeAlso = [];
|
|
787
|
+
this.seeAlso = input([]);
|
|
1184
788
|
}
|
|
1185
789
|
getRouterLink(pageTitle) {
|
|
1186
790
|
return this.pages.get(pageTitle)?.route ?? '';
|
|
1187
791
|
}
|
|
1188
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1189
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
792
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocSeeAlso, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
793
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", 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]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1190
794
|
}
|
|
1191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
795
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocSeeAlso, decorators: [{
|
|
1192
796
|
type: Component,
|
|
1193
|
-
args: [{
|
|
1194
|
-
}]
|
|
1195
|
-
type: Input
|
|
1196
|
-
}] } });
|
|
797
|
+
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"] }]
|
|
798
|
+
}] });
|
|
1197
799
|
|
|
1198
800
|
class TuiDocSourceCode {
|
|
1199
801
|
constructor() {
|
|
1200
802
|
this.icons = inject(TUI_DOC_ICONS);
|
|
1201
803
|
this.sourceCode = inject(TUI_DOC_SOURCE_CODE);
|
|
1202
804
|
this.text = inject(TUI_DOC_SOURCE_CODE_TEXT);
|
|
1203
|
-
this.header = '';
|
|
1204
|
-
this.package = '';
|
|
1205
|
-
this.type = '';
|
|
1206
|
-
this.path = '';
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
path,
|
|
1220
|
-
};
|
|
1221
|
-
}
|
|
1222
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocSourceCode, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1223
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocSourceCode, isStandalone: true, selector: "tui-doc-source-code", inputs: { header: "header", package: "package", type: "type", path: "path" }, ngImport: i0, template: "<a\n *polymorpheusOutlet=\"pathIsUrl(path) ? 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 }); }
|
|
1224
|
-
}
|
|
1225
|
-
__decorate([
|
|
1226
|
-
tuiPure
|
|
1227
|
-
], TuiDocSourceCode.prototype, "pathIsUrl", null);
|
|
1228
|
-
__decorate([
|
|
1229
|
-
tuiPure
|
|
1230
|
-
], TuiDocSourceCode.prototype, "getPathOptions", null);
|
|
1231
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocSourceCode, decorators: [{
|
|
805
|
+
this.header = input('');
|
|
806
|
+
this.package = input('');
|
|
807
|
+
this.type = input('');
|
|
808
|
+
this.path = input('');
|
|
809
|
+
this.pathOptions = computed(() => ({
|
|
810
|
+
header: this.header(),
|
|
811
|
+
package: this.package(),
|
|
812
|
+
type: this.type(),
|
|
813
|
+
path: this.path(),
|
|
814
|
+
}));
|
|
815
|
+
this.pathIsUrl = computed(() => this.path()?.startsWith('http') ?? false);
|
|
816
|
+
}
|
|
817
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocSourceCode, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
818
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.17", 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 }); }
|
|
819
|
+
}
|
|
820
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocSourceCode, decorators: [{
|
|
1232
821
|
type: Component,
|
|
1233
|
-
args: [{
|
|
1234
|
-
}]
|
|
1235
|
-
type: Input
|
|
1236
|
-
}], package: [{
|
|
1237
|
-
type: Input
|
|
1238
|
-
}], type: [{
|
|
1239
|
-
type: Input
|
|
1240
|
-
}], path: [{
|
|
1241
|
-
type: Input
|
|
1242
|
-
}], pathIsUrl: [], getPathOptions: [] } });
|
|
822
|
+
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" }]
|
|
823
|
+
}] });
|
|
1243
824
|
|
|
1244
825
|
class TuiDocLanguageSwitcher {
|
|
1245
826
|
constructor() {
|
|
@@ -1277,13 +858,12 @@ class TuiDocLanguageSwitcher {
|
|
|
1277
858
|
this.switcher.setLanguage(lang);
|
|
1278
859
|
this.open = false;
|
|
1279
860
|
}
|
|
1280
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1281
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
861
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocLanguageSwitcher, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
862
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", 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 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: "[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$3.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i3$3.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "directive", type: i3$3.TuiOptionWithValue, selector: "button[tuiOption][value], a[tuiOption][value], label[tuiOption][value]", inputs: ["disabled", "value"] }, { kind: "directive", type: i3$3.TuiOptGroup, selector: "tui-opt-group", inputs: ["label"] }, { kind: "pipe", type: TuiFlagPipe, name: "tuiFlag" }, { kind: "directive", type: i4.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1282
863
|
}
|
|
1283
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
864
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocLanguageSwitcher, decorators: [{
|
|
1284
865
|
type: Component,
|
|
1285
|
-
args: [{
|
|
1286
|
-
NgForOf,
|
|
866
|
+
args: [{ selector: 'tui-doc-language-switcher', imports: [
|
|
1287
867
|
ReactiveFormsModule,
|
|
1288
868
|
TitleCasePipe,
|
|
1289
869
|
TuiBadge,
|
|
@@ -1293,7 +873,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1293
873
|
TuiDataList,
|
|
1294
874
|
TuiFlagPipe,
|
|
1295
875
|
TuiTextfield,
|
|
1296
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiScrollbarOptionsProvider({ mode: 'hover' })], 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 *
|
|
876
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiScrollbarOptionsProvider({ mode: 'hover' })], 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 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"] }]
|
|
1297
877
|
}] });
|
|
1298
878
|
function capitalize(value) {
|
|
1299
879
|
return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;
|
|
@@ -1305,37 +885,20 @@ class TuiDocMain {
|
|
|
1305
885
|
this.icons = inject(TUI_DOC_ICONS);
|
|
1306
886
|
this.dir = inject(TUI_DOC_DIRECTION_ENABLED);
|
|
1307
887
|
this.darkMode = inject(TUI_DARK_MODE);
|
|
1308
|
-
this.theme = computed(() => (this.darkMode() ? 'dark' : null));
|
|
1309
888
|
this.icon = computed(() => this.darkMode() ? this.icons.light : this.icons.dark);
|
|
1310
889
|
}
|
|
1311
890
|
changeTextDirection() {
|
|
1312
891
|
const dir = this.doc.documentElement.getAttribute('dir') ?? 'ltr';
|
|
1313
892
|
this.doc.documentElement.setAttribute('dir', dir === 'ltr' ? 'rtl' : 'ltr');
|
|
1314
893
|
}
|
|
1315
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1316
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
894
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocMain, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
895
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiDocMain, isStandalone: true, selector: "tui-doc-main", ngImport: i0, template: "<tui-root>\n <div class=\"tui-doc-page\">\n <tui-doc-navigation class=\"tui-doc-navigation\">\n <ng-content select=\"tuiDocNavigation\" />\n </tui-doc-navigation>\n <div class=\"tui-doc-content\">\n <router-outlet class=\"tui-doc-outlet\" />\n </div>\n </div>\n <header tuiDocHeader>\n <ng-content select=\"tuiDocHeader\" />\n\n @if (dir && icons.ltr) {\n <button\n appearance=\"outline\"\n aria-label=\"Switch directionality of the element's text\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"tui-doc-switch-direction\"\n [iconEnd]=\"icons.ltr.preview\"\n (click)=\"changeTextDirection()\"\n >\n <tui-icon [icon]=\"icons.ltr.direction\" />\n </button>\n }\n\n <button\n appearance=\"secondary\"\n aria-label=\"Switch between dark and light mode\"\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"tui-doc-dark-mode-switch\"\n [iconStart]=\"icon()\"\n [style.border-radius.%]=\"100\"\n (click)=\"darkMode.set(!darkMode())\"\n ></button>\n </header>\n <ng-container ngProjectAs=\"tuiOverContent\">\n <ng-content select=\"tuiOverContent\" />\n </ng-container>\n</tui-root>\n", styles: ["@keyframes tuiShaking{0%,to{transform:translateZ(0)}10%,30%,50%,70%,90%{transform:translate3d(-.3125rem,0,0)}20%,40%,60%,80%{transform:translate3d(.3125rem,0,0)}}html,body{background:var(--tui-background-base)}tui-doc-main{display:block}code:not(pre code):not(.hljs):not([class*=language-]){transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:inline-flex;background:var(--tui-background-neutral-1);color:var(--tui-text-secondary);vertical-align:middle;align-items:center;border-radius:.25rem;font-weight:500;outline:1px solid var(--tui-border-hover);font-size:.75rem;padding:0 .3125rem;margin:.125rem .1875rem;text-wrap:wrap}a code:not(pre code):not(.hljs):not([class*=language-]){color:var(--tui-text-action)}button:focus code,a:focus code{background:var(--tui-background-base)}.tui-doc-page{isolation:isolate;padding-block-start:4rem}tui-doc-navigation.tui-doc-navigation{position:fixed;top:4rem;bottom:0;inline-size:16.25rem;border-inline-end:1px solid var(--tui-border-normal)}@media screen and (max-width: 767.4px){tui-doc-navigation.tui-doc-navigation{display:none}}.tui-doc-content{margin-inline-start:16.25rem}@media screen and (max-width: 767.4px){.tui-doc-content{margin-inline-start:0}}.tui-doc-outlet+*{display:block}.tui-doc-switch-direction,.tui-doc-dark-mode-switch{margin-inline-start:1rem}tui-doc-code .hljs-tag{background:none}tui-doc-code .hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-primary);background-color:var(--tui-background-neutral-1)}tui-doc-code .hljs.hljs-line-numbers{background:transparent}tui-doc-code .hljs-subst,tui-doc-code .hljs-title{font-weight:400;color:var(--tui-text-primary)}tui-doc-code .hljs-property{color:#bd65a4}tui-doc-code .hljs-comment,tui-doc-code .hljs-quote{color:var(--tui-text-secondary);font-style:italic}tui-doc-code .hljs-meta{color:#e38162}tui-doc-code .hljs-section,tui-doc-code .hljs-name,tui-doc-code .hljs-literal,tui-doc-code .hljs-keyword,tui-doc-code .hljs-selector-tag,tui-doc-code .hljs-type,tui-doc-code .hljs-selector-id,tui-doc-code .hljs-selector-class{font-weight:700;color:var(--tui-text-action)}tui-doc-code .hljs-attr{color:var(--tui-text-action)}tui-doc-code .hljs-attribute,tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link,tui-doc-code .hljs-built_in{font-weight:700;color:#b8474e}tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link{font-weight:400}tui-doc-code .hljs-string{color:var(--tui-status-positive);font-weight:700}tui-doc-code .hljs-symbol,tui-doc-code .hljs-bullet,tui-doc-code .hljs-formula{color:var(--tui-text-primary);background:var(--tui-background-base-alt);font-style:italic}tui-doc-code .hljs-doctag{text-decoration:underline}tui-doc-code .hljs-variable,tui-doc-code .hljs-template-variable{color:var(--tui-text-action-hover)}tui-doc-code .hljs-addition{background:var(--tui-status-positive-pale)}tui-doc-code .hljs-deletion{background:var(--tui-status-negative-pale)}tui-doc-code .hljs-emphasis{font-style:italic}tui-doc-code .hljs-strong{font-weight:700}tui-doc-code .hljs .hljs-line-numbers{padding:0}tui-doc-code .hljs-ln-numbers{vertical-align:top;opacity:.3;text-align:end;padding-inline-end:1em!important}[tuiTheme=dark] tui-doc-code .hljs-variable,tui-doc-code[tuiTheme=dark] .hljs-variable,[tuiTheme=dark] tui-doc-code .hljs-template-variable,tui-doc-code[tuiTheme=dark] .hljs-template-variable{color:var(--tui-status-warning)}\n"], dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiDocHeader, selector: "header[tuiDocHeader]" }, { kind: "component", type: TuiDocNavigation, selector: "tui-doc-navigation" }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "component", type: TuiRoot, selector: "tui-root" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1317
896
|
}
|
|
1318
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
897
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocMain, decorators: [{
|
|
1319
898
|
type: Component,
|
|
1320
|
-
args: [{
|
|
1321
|
-
NgIf,
|
|
1322
|
-
RouterOutlet,
|
|
1323
|
-
TuiButton,
|
|
1324
|
-
TuiDocHeader,
|
|
1325
|
-
TuiDocNavigation,
|
|
1326
|
-
TuiIcon,
|
|
1327
|
-
TuiRoot,
|
|
1328
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, template: "<tui-root [attr.tuiTheme]=\"theme()\">\n <div class=\"tui-doc-page\">\n <tui-doc-navigation class=\"tui-doc-navigation\">\n <ng-content select=\"tuiDocNavigation\" />\n </tui-doc-navigation>\n <div class=\"tui-doc-content\">\n <router-outlet class=\"tui-doc-outlet\" />\n </div>\n </div>\n <header tuiDocHeader>\n <ng-content select=\"tuiDocHeader\" />\n\n <button\n *ngIf=\"dir && icons.ltr\"\n appearance=\"outline\"\n aria-label=\"Switch directionality of the element's text\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"tui-doc-switch-direction\"\n [iconEnd]=\"icons.ltr.preview\"\n (click)=\"changeTextDirection()\"\n >\n <tui-icon [icon]=\"icons.ltr.direction\" />\n </button>\n\n <button\n appearance=\"secondary\"\n aria-label=\"Switch between dark and light mode\"\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"tui-doc-dark-mode-switch\"\n [iconStart]=\"icon()\"\n [style.border-radius.%]=\"100\"\n (click)=\"darkMode.set(!darkMode())\"\n ></button>\n </header>\n <ng-container ngProjectAs=\"tuiOverContent\">\n <ng-content select=\"tuiOverContent\" />\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverDialogs\">\n <ng-content select=\"tuiOverDialogs\" />\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverAlerts\">\n <ng-content select=\"tuiOverAlerts\" />\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverDropdowns\">\n <ng-content select=\"tuiOverDropdowns\" />\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverHints\">\n <ng-content select=\"tuiOverHints\" />\n </ng-container>\n</tui-root>\n", styles: ["@keyframes tuiShaking{0%,to{transform:translateZ(0)}10%,30%,50%,70%,90%{transform:translate3d(-.3125rem,0,0)}20%,40%,60%,80%{transform:translate3d(.3125rem,0,0)}}html,body{scroll-padding-top:4rem;background:var(--tui-background-base)}tui-root>tui-scroll-controls>.t-bar_vertical{top:4rem!important}tui-doc-main{display:block}code:not(pre code):not(.hljs):not([class*=language-]){transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:inline-flex;background:var(--tui-background-neutral-1);color:var(--tui-text-secondary);vertical-align:middle;align-items:center;border-radius:.25rem;font-weight:500;outline:1px solid var(--tui-border-hover);font-size:.75rem;padding:0 .3125rem;margin:.125rem .1875rem;text-wrap:wrap}a code:not(pre code):not(.hljs):not([class*=language-]){color:var(--tui-text-action)}button:focus code,a:focus code{background:var(--tui-background-base)}.tui-doc-page{isolation:isolate;padding-block-start:4rem}tui-doc-navigation.tui-doc-navigation{position:fixed;top:4rem;bottom:0;inline-size:16.25rem;border-inline-end:1px solid var(--tui-border-normal)}@media screen and (max-width: 47.9625em){tui-doc-navigation.tui-doc-navigation{display:none}}.tui-doc-content{margin-inline-start:16.25rem}@media screen and (max-width: 47.9625em){.tui-doc-content{margin-inline-start:0}}.tui-doc-outlet+*{display:block}.tui-doc-switch-direction,.tui-doc-dark-mode-switch{margin-inline-start:1rem}tui-doc-code .hljs-tag{background:none}tui-doc-code .hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-primary);background-color:var(--tui-background-neutral-1)}tui-doc-code .hljs.hljs-line-numbers{background:transparent}tui-doc-code .hljs-subst,tui-doc-code .hljs-title{font-weight:400;color:var(--tui-text-primary)}tui-doc-code .hljs-property{color:#bd65a4}tui-doc-code .hljs-comment,tui-doc-code .hljs-quote{color:var(--tui-text-secondary);font-style:italic}tui-doc-code .hljs-meta{color:#e38162}tui-doc-code .hljs-section,tui-doc-code .hljs-name,tui-doc-code .hljs-literal,tui-doc-code .hljs-keyword,tui-doc-code .hljs-selector-tag,tui-doc-code .hljs-type,tui-doc-code .hljs-selector-id,tui-doc-code .hljs-selector-class{font-weight:700;color:var(--tui-text-action)}tui-doc-code .hljs-attr{color:var(--tui-text-action)}tui-doc-code .hljs-attribute,tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link,tui-doc-code .hljs-built_in{font-weight:700;color:#b8474e}tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link{font-weight:400}tui-doc-code .hljs-string{color:var(--tui-status-positive);font-weight:700}tui-doc-code .hljs-symbol,tui-doc-code .hljs-bullet,tui-doc-code .hljs-formula{color:var(--tui-text-primary);background:var(--tui-background-base-alt);font-style:italic}tui-doc-code .hljs-doctag{text-decoration:underline}tui-doc-code .hljs-variable,tui-doc-code .hljs-template-variable{color:var(--tui-text-action-hover)}tui-doc-code .hljs-addition{background:var(--tui-status-positive-pale)}tui-doc-code .hljs-deletion{background:var(--tui-status-negative-pale)}tui-doc-code .hljs-emphasis{font-style:italic}tui-doc-code .hljs-strong{font-weight:700}tui-doc-code .hljs .hljs-line-numbers{padding:0}tui-doc-code .hljs-ln-numbers{vertical-align:top;opacity:.3;text-align:end;padding-inline-end:1em!important}[tuiTheme=dark] tui-doc-code .hljs-variable,tui-doc-code[tuiTheme=dark] .hljs-variable,[tuiTheme=dark] tui-doc-code .hljs-template-variable,tui-doc-code[tuiTheme=dark] .hljs-template-variable{color:var(--tui-status-warning)}\n"] }]
|
|
899
|
+
args: [{ selector: 'tui-doc-main', imports: [RouterOutlet, TuiButton, TuiDocHeader, TuiDocNavigation, TuiIcon, TuiRoot], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, template: "<tui-root>\n <div class=\"tui-doc-page\">\n <tui-doc-navigation class=\"tui-doc-navigation\">\n <ng-content select=\"tuiDocNavigation\" />\n </tui-doc-navigation>\n <div class=\"tui-doc-content\">\n <router-outlet class=\"tui-doc-outlet\" />\n </div>\n </div>\n <header tuiDocHeader>\n <ng-content select=\"tuiDocHeader\" />\n\n @if (dir && icons.ltr) {\n <button\n appearance=\"outline\"\n aria-label=\"Switch directionality of the element's text\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"tui-doc-switch-direction\"\n [iconEnd]=\"icons.ltr.preview\"\n (click)=\"changeTextDirection()\"\n >\n <tui-icon [icon]=\"icons.ltr.direction\" />\n </button>\n }\n\n <button\n appearance=\"secondary\"\n aria-label=\"Switch between dark and light mode\"\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"tui-doc-dark-mode-switch\"\n [iconStart]=\"icon()\"\n [style.border-radius.%]=\"100\"\n (click)=\"darkMode.set(!darkMode())\"\n ></button>\n </header>\n <ng-container ngProjectAs=\"tuiOverContent\">\n <ng-content select=\"tuiOverContent\" />\n </ng-container>\n</tui-root>\n", styles: ["@keyframes tuiShaking{0%,to{transform:translateZ(0)}10%,30%,50%,70%,90%{transform:translate3d(-.3125rem,0,0)}20%,40%,60%,80%{transform:translate3d(.3125rem,0,0)}}html,body{background:var(--tui-background-base)}tui-doc-main{display:block}code:not(pre code):not(.hljs):not([class*=language-]){transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:inline-flex;background:var(--tui-background-neutral-1);color:var(--tui-text-secondary);vertical-align:middle;align-items:center;border-radius:.25rem;font-weight:500;outline:1px solid var(--tui-border-hover);font-size:.75rem;padding:0 .3125rem;margin:.125rem .1875rem;text-wrap:wrap}a code:not(pre code):not(.hljs):not([class*=language-]){color:var(--tui-text-action)}button:focus code,a:focus code{background:var(--tui-background-base)}.tui-doc-page{isolation:isolate;padding-block-start:4rem}tui-doc-navigation.tui-doc-navigation{position:fixed;top:4rem;bottom:0;inline-size:16.25rem;border-inline-end:1px solid var(--tui-border-normal)}@media screen and (max-width: 767.4px){tui-doc-navigation.tui-doc-navigation{display:none}}.tui-doc-content{margin-inline-start:16.25rem}@media screen and (max-width: 767.4px){.tui-doc-content{margin-inline-start:0}}.tui-doc-outlet+*{display:block}.tui-doc-switch-direction,.tui-doc-dark-mode-switch{margin-inline-start:1rem}tui-doc-code .hljs-tag{background:none}tui-doc-code .hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-primary);background-color:var(--tui-background-neutral-1)}tui-doc-code .hljs.hljs-line-numbers{background:transparent}tui-doc-code .hljs-subst,tui-doc-code .hljs-title{font-weight:400;color:var(--tui-text-primary)}tui-doc-code .hljs-property{color:#bd65a4}tui-doc-code .hljs-comment,tui-doc-code .hljs-quote{color:var(--tui-text-secondary);font-style:italic}tui-doc-code .hljs-meta{color:#e38162}tui-doc-code .hljs-section,tui-doc-code .hljs-name,tui-doc-code .hljs-literal,tui-doc-code .hljs-keyword,tui-doc-code .hljs-selector-tag,tui-doc-code .hljs-type,tui-doc-code .hljs-selector-id,tui-doc-code .hljs-selector-class{font-weight:700;color:var(--tui-text-action)}tui-doc-code .hljs-attr{color:var(--tui-text-action)}tui-doc-code .hljs-attribute,tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link,tui-doc-code .hljs-built_in{font-weight:700;color:#b8474e}tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link{font-weight:400}tui-doc-code .hljs-string{color:var(--tui-status-positive);font-weight:700}tui-doc-code .hljs-symbol,tui-doc-code .hljs-bullet,tui-doc-code .hljs-formula{color:var(--tui-text-primary);background:var(--tui-background-base-alt);font-style:italic}tui-doc-code .hljs-doctag{text-decoration:underline}tui-doc-code .hljs-variable,tui-doc-code .hljs-template-variable{color:var(--tui-text-action-hover)}tui-doc-code .hljs-addition{background:var(--tui-status-positive-pale)}tui-doc-code .hljs-deletion{background:var(--tui-status-negative-pale)}tui-doc-code .hljs-emphasis{font-style:italic}tui-doc-code .hljs-strong{font-weight:700}tui-doc-code .hljs .hljs-line-numbers{padding:0}tui-doc-code .hljs-ln-numbers{vertical-align:top;opacity:.3;text-align:end;padding-inline-end:1em!important}[tuiTheme=dark] tui-doc-code .hljs-variable,tui-doc-code[tuiTheme=dark] .hljs-variable,[tuiTheme=dark] tui-doc-code .hljs-template-variable,tui-doc-code[tuiTheme=dark] .hljs-template-variable{color:var(--tui-status-warning)}\n"] }]
|
|
1329
900
|
}] });
|
|
1330
901
|
|
|
1331
|
-
const [TUI_DOC_PAGE_OPTIONS, tuiDocPageOptionsProvider] = tuiCreateOptions({
|
|
1332
|
-
header: '',
|
|
1333
|
-
package: '',
|
|
1334
|
-
type: '',
|
|
1335
|
-
tags: [],
|
|
1336
|
-
path: '',
|
|
1337
|
-
deprecated: false,
|
|
1338
|
-
});
|
|
1339
902
|
const TUI_DOC_TABS = new InjectionToken(ngDevMode ? 'TUI_DOC_TABS' : '', {
|
|
1340
903
|
factory: () => () => ({}),
|
|
1341
904
|
});
|
|
@@ -1354,58 +917,53 @@ const PAGE_PROVIDERS = [
|
|
|
1354
917
|
.join()
|
|
1355
918
|
.split(',')
|
|
1356
919
|
.filter((component) => component && component !== currentHeader));
|
|
1357
|
-
return Array.from(seeAlsoSet);
|
|
920
|
+
return signal(Array.from(seeAlsoSet));
|
|
1358
921
|
},
|
|
1359
922
|
},
|
|
1360
923
|
];
|
|
1361
924
|
|
|
1362
925
|
class TuiDocPageTabConnector {
|
|
1363
926
|
constructor() {
|
|
927
|
+
this.pageTab = input();
|
|
1364
928
|
this.template = inject((TemplateRef));
|
|
1365
929
|
}
|
|
1366
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1367
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
930
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocPageTabConnector, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
931
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiDocPageTabConnector, isStandalone: true, selector: "ng-template[pageTab]", inputs: { pageTab: { classPropertyName: "pageTab", publicName: "pageTab", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
1368
932
|
}
|
|
1369
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
933
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocPageTabConnector, decorators: [{
|
|
1370
934
|
type: Directive,
|
|
1371
935
|
args: [{
|
|
1372
|
-
standalone: true,
|
|
1373
936
|
selector: 'ng-template[pageTab]',
|
|
1374
937
|
}]
|
|
1375
|
-
}]
|
|
1376
|
-
type: Input
|
|
1377
|
-
}] } });
|
|
938
|
+
}] });
|
|
1378
939
|
|
|
1379
940
|
class TuiDocPage {
|
|
1380
941
|
constructor() {
|
|
1381
|
-
this.options = inject(TUI_DOC_PAGE_OPTIONS);
|
|
1382
942
|
this.tabs = inject(TUI_DOC_TABS)(inject(ActivatedRoute).snapshot);
|
|
1383
943
|
this.supportLanguage = inject(TUI_DOC_SUPPORT_LANGUAGE);
|
|
1384
944
|
this.defaultTabs = inject(TUI_DOC_DEFAULT_TABS);
|
|
1385
945
|
this.from = / /g;
|
|
1386
946
|
this.to = '_';
|
|
1387
|
-
this.header =
|
|
1388
|
-
this.package =
|
|
1389
|
-
this.type =
|
|
1390
|
-
this.tags =
|
|
1391
|
-
this.path =
|
|
1392
|
-
this.deprecated =
|
|
1393
|
-
this.tabConnectors =
|
|
1394
|
-
this.activeItemIndex = 0;
|
|
947
|
+
this.header = input('');
|
|
948
|
+
this.package = input('');
|
|
949
|
+
this.type = input('');
|
|
950
|
+
this.tags = input([]);
|
|
951
|
+
this.path = input('');
|
|
952
|
+
this.deprecated = input(false);
|
|
953
|
+
this.tabConnectors = contentChildren(TuiDocPageTabConnector);
|
|
954
|
+
this.activeItemIndex = model(0);
|
|
1395
955
|
this.seeAlso = inject(PAGE_SEE_ALSO);
|
|
956
|
+
this.showSeeAlso = computed(() => {
|
|
957
|
+
return !!this.seeAlso().length && this.activeItemIndex() === 0;
|
|
958
|
+
});
|
|
1396
959
|
}
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
}
|
|
1400
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1401
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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 <h1\n *ngIf=\"header\"\n class=\"t-title\"\n >\n {{ header }}\n <tui-chip\n *ngIf=\"!!deprecated || deprecated === ''\"\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_deprecated\"\n >\n deprecated\n </tui-chip>\n <tui-chip\n *ngIf=\"package\"\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 <tui-chip\n *ngFor=\"let tag of tags\"\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 </h1>\n <tui-tabs-with-more\n *ngIf=\"tabConnectors.length\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabConnectors; first as first; index as index\">\n <ng-container *ngIf=\"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 </ng-container>\n </ng-container>\n <ng-container *ngFor=\"let tab of tabs | keyvalue\">\n <a\n *tuiItem\n routerLinkActive\n tuiTab\n [routerLink]=\"tab.key\"\n >\n {{ tab.key }}\n </a>\n </ng-container>\n </tui-tabs-with-more>\n\n <div\n *ngIf=\"package || path || type\"\n class=\"t-right-side\"\n >\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header\"\n [package]=\"package\"\n [path]=\"path\"\n [type]=\"type\"\n />\n\n <tui-doc-language-switcher *ngIf=\"supportLanguage.has(header)\" />\n </div>\n</header>\n<div class=\"t-content\">\n <ng-content />\n <tui-doc-see-also\n *ngIf=\"showSeeAlso\"\n class=\"t-see-also\"\n [seeAlso]=\"seeAlso\"\n />\n <ng-container *ngFor=\"let tab of tabConnectors; index as index\">\n <ng-container\n *ngIf=\"index === activeItemIndex\"\n [ngTemplateOutlet]=\"tab.template\"\n />\n </ng-container>\n <ng-container *ngFor=\"let tab of tabs | keyvalue; index as index\">\n <ng-container *ngIf=\"index + tabConnectors.length === activeItemIndex\">\n <ng-container *polymorpheusOutlet=\"tab.value as text\">{{ text }}</ng-container>\n </ng-container>\n </ng-container>\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);margin:0}}@media screen and (max-width: 47.9625em){.t-header:not(:empty){min-block-size:4.5rem;padding:0 1.25rem}}.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: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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", "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 }); }
|
|
960
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
961
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", 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, isSignal: true }], ngImport: i0, template: "<header class=\"t-header\">\n @if (header()) {\n <h1 class=\"t-title\">\n {{ header() }}\n @if (!!deprecated() || deprecated() === '') {\n <span\n appearance=\"custom\"\n size=\"xs\"\n tuiChip\n class=\"t-tag t-tag_deprecated\"\n >\n deprecated\n </span>\n }\n @if (package()) {\n <span\n appearance=\"custom\"\n size=\"xs\"\n tuiChip\n class=\"t-tag t-tag_package\"\n [style.background]=\"package() | tuiAutoColor\"\n >\n {{ package() }}\n </span>\n }\n @for (tag of tags(); track tag) {\n <span\n appearance=\"custom\"\n size=\"xs\"\n tuiChip\n class=\"t-tag t-tag_package\"\n [style.background]=\"tag | tuiAutoColor\"\n >\n {{ tag }}\n </span>\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.replace(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-body-m)}.t-header{display:flex;min-block-size:7.5rem;font:var(--tui-font-heading-h3);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: 767.4px){.t-header{font:var(--tui-font-heading-h4);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: 767.4px){.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: 767.4px){.t-tabs{margin-block-start:.25rem}}.t-content{padding:2rem 0;margin:0 min(10vw,8.75rem)}@media screen and (max-width: 767.4px){.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: 767.4px){.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: "[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: "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", inputs: ["activeItemIndex", "size", "underline", "itemsLimit", "moreContent", "dropdownContent"], outputs: ["activeItemIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1402
962
|
}
|
|
1403
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
963
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocPage, decorators: [{
|
|
1404
964
|
type: Component,
|
|
1405
|
-
args: [{
|
|
965
|
+
args: [{ selector: 'tui-doc-page', imports: [
|
|
1406
966
|
KeyValuePipe,
|
|
1407
|
-
NgForOf,
|
|
1408
|
-
NgIf,
|
|
1409
967
|
NgTemplateOutlet,
|
|
1410
968
|
PolymorpheusOutlet,
|
|
1411
969
|
RouterLink,
|
|
@@ -1415,25 +973,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1415
973
|
TuiDocLanguageSwitcher,
|
|
1416
974
|
TuiDocSeeAlso,
|
|
1417
975
|
TuiDocSourceCode,
|
|
1418
|
-
TuiReplacePipe,
|
|
1419
976
|
TuiTabs,
|
|
1420
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, providers: PAGE_PROVIDERS, template: "<header class=\"t-header\">\n
|
|
1421
|
-
}]
|
|
1422
|
-
type: Input
|
|
1423
|
-
}], package: [{
|
|
1424
|
-
type: Input
|
|
1425
|
-
}], type: [{
|
|
1426
|
-
type: Input
|
|
1427
|
-
}], tags: [{
|
|
1428
|
-
type: Input
|
|
1429
|
-
}], path: [{
|
|
1430
|
-
type: Input
|
|
1431
|
-
}], deprecated: [{
|
|
1432
|
-
type: Input
|
|
1433
|
-
}], tabConnectors: [{
|
|
1434
|
-
type: ContentChildren,
|
|
1435
|
-
args: [TuiDocPageTabConnector]
|
|
1436
|
-
}] } });
|
|
977
|
+
], 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 <span\n appearance=\"custom\"\n size=\"xs\"\n tuiChip\n class=\"t-tag t-tag_deprecated\"\n >\n deprecated\n </span>\n }\n @if (package()) {\n <span\n appearance=\"custom\"\n size=\"xs\"\n tuiChip\n class=\"t-tag t-tag_package\"\n [style.background]=\"package() | tuiAutoColor\"\n >\n {{ package() }}\n </span>\n }\n @for (tag of tags(); track tag) {\n <span\n appearance=\"custom\"\n size=\"xs\"\n tuiChip\n class=\"t-tag t-tag_package\"\n [style.background]=\"tag | tuiAutoColor\"\n >\n {{ tag }}\n </span>\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.replace(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-body-m)}.t-header{display:flex;min-block-size:7.5rem;font:var(--tui-font-heading-h3);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: 767.4px){.t-header{font:var(--tui-font-heading-h4);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: 767.4px){.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: 767.4px){.t-tabs{margin-block-start:.25rem}}.t-content{padding:2rem 0;margin:0 min(10vw,8.75rem)}@media screen and (max-width: 767.4px){.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: 767.4px){.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"] }]
|
|
978
|
+
}] });
|
|
1437
979
|
|
|
1438
980
|
const TUI_THEME_KEY = new InjectionToken(ngDevMode ? 'TUI_THEME_KEY' : '', {
|
|
1439
981
|
factory: () => 'data-tui-theme',
|
|
@@ -1460,17 +1002,17 @@ class TuiDocThemeSwitcher {
|
|
|
1460
1002
|
this.storage?.setItem(this.key, theme);
|
|
1461
1003
|
this.location.reload();
|
|
1462
1004
|
}
|
|
1463
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1464
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1005
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocThemeSwitcher, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1006
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", 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 *tuiDropdown>\n @for (key of keys; track key) {\n <button\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$3.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i3$3.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "directive", type: i3$3.TuiOptionWithValue, selector: "button[tuiOption][value], a[tuiOption][value], label[tuiOption][value]", inputs: ["disabled", "value"] }, { kind: "directive", type: i3$1.TuiSelectDirective, selector: "input[tuiSelect]" }, { kind: "directive", type: i4$1.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i3.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i3.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i4.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1465
1007
|
}
|
|
1466
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1008
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDocThemeSwitcher, decorators: [{
|
|
1467
1009
|
type: Component,
|
|
1468
|
-
args: [{
|
|
1010
|
+
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 *tuiDropdown>\n @for (key of keys; track key) {\n <button\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" }]
|
|
1469
1011
|
}] });
|
|
1470
1012
|
|
|
1471
1013
|
/**
|
|
1472
1014
|
* Generated bundle index. Do not edit.
|
|
1473
1015
|
*/
|
|
1474
1016
|
|
|
1475
|
-
export { NAVIGATION_ITEMS, NAVIGATION_LABELS, NAVIGATION_PROVIDERS, NAVIGATION_TITLE, PAGE_PROVIDERS, PAGE_SEE_ALSO, TUI_DOC_EXAMPLE_DEFAULT_OPTIONS, TUI_DOC_EXAMPLE_OPTIONS,
|
|
1017
|
+
export { NAVIGATION_ITEMS, NAVIGATION_LABELS, NAVIGATION_PROVIDERS, NAVIGATION_TITLE, PAGE_PROVIDERS, PAGE_SEE_ALSO, TUI_DOC_EXAMPLE_DEFAULT_OPTIONS, TUI_DOC_EXAMPLE_OPTIONS, TUI_DOC_TABS, TUI_THEMES, TUI_THEME_KEY, TuiDocAPI, TuiDocAPIItem, TuiDocAPINumberItem, TuiDocCode, TuiDocCopy, TuiDocDemo, TuiDocExample, TuiDocExampleGetTabsPipe, TuiDocHeader, TuiDocLanguageSwitcher, TuiDocMain, TuiDocNavigation, TuiDocPage, TuiDocPageTabConnector, TuiDocScrollIntoViewLink, TuiDocSeeAlso, TuiDocSourceCode, TuiDocTab, TuiDocThemeSwitcher, TuiJsonPipe, tuiDocExampleOptionsProvider, tuiDocThemeProvider };
|
|
1476
1018
|
//# sourceMappingURL=taiga-ui-addon-doc-components.mjs.map
|