@taiga-ui/addon-doc 5.23.0 → 5.24.0-canary.3f61c9e
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/components/navigation/navigation.component.d.ts +17 -1
- package/components/page/page.component.d.ts +3 -0
- package/fesm2022/taiga-ui-addon-doc-components.mjs +73 -7
- package/fesm2022/taiga-ui-addon-doc-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-doc-tokens.mjs +8 -1
- 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 +11 -1
- package/fesm2022/taiga-ui-addon-doc-utils.mjs.map +1 -1
- package/package.json +10 -10
- package/tokens/index.d.ts +1 -0
- package/tokens/version.d.ts +5 -0
- package/types/page.d.ts +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/version-parts.d.ts +7 -0
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { type Signal } from '@angular/core';
|
|
2
2
|
import { FormControl } from '@angular/forms';
|
|
3
|
-
import { type TuiDocRoutePage, type TuiDocRoutePages } from '@taiga-ui/addon-doc/types';
|
|
3
|
+
import { type TuiDocRoutePage, type TuiDocRoutePageGroup, type TuiDocRoutePages } from '@taiga-ui/addon-doc/types';
|
|
4
4
|
import { TuiDrawer } from '@taiga-ui/kit/components/drawer';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
+
interface TuiDocNavigationBadge {
|
|
7
|
+
readonly label: string;
|
|
8
|
+
readonly appearance: 'info' | 'positive';
|
|
9
|
+
}
|
|
6
10
|
export declare class TuiDocNavigation {
|
|
7
11
|
private readonly searchInput;
|
|
8
12
|
private readonly router;
|
|
9
13
|
private readonly doc;
|
|
14
|
+
private readonly current;
|
|
15
|
+
private readonly sectionLeads;
|
|
10
16
|
protected readonly open: import("@angular/core").WritableSignal<boolean>;
|
|
11
17
|
protected menuOpen: boolean;
|
|
12
18
|
protected readonly drawer: TuiDrawer | null;
|
|
@@ -18,6 +24,8 @@ export declare class TuiDocNavigation {
|
|
|
18
24
|
protected readonly pagesIcons: Record<string, string>;
|
|
19
25
|
protected readonly icons: import("@taiga-ui/core/tokens").TuiCommonIcons;
|
|
20
26
|
protected readonly flat: readonly (readonly TuiDocRoutePage[])[];
|
|
27
|
+
protected readonly sectionBadges: (TuiDocNavigationBadge | null)[];
|
|
28
|
+
protected readonly itemBadges: ReadonlyMap<TuiDocRoutePage | TuiDocRoutePageGroup, TuiDocNavigationBadge>;
|
|
21
29
|
protected openPagesArr: boolean[];
|
|
22
30
|
protected openPagesGroupsArr: boolean[];
|
|
23
31
|
protected active: string;
|
|
@@ -28,10 +36,17 @@ export declare class TuiDocNavigation {
|
|
|
28
36
|
protected get itemsWithoutSections(): TuiDocRoutePages;
|
|
29
37
|
protected $pages<T extends TuiDocRoutePage[]>(pages: T): readonly TuiDocRoutePage[];
|
|
30
38
|
protected isActive(route: string): boolean;
|
|
39
|
+
protected sectionBadge(index: number): TuiDocNavigationBadge | null;
|
|
40
|
+
protected itemBadge(item: TuiDocRoutePage | TuiDocRoutePageGroup): TuiDocNavigationBadge | null;
|
|
31
41
|
protected onGroupClick(index: number): void;
|
|
32
42
|
protected closeMenu(): void;
|
|
33
43
|
protected onClick(): void;
|
|
34
44
|
protected onFocusSearch(event: KeyboardEvent): void;
|
|
45
|
+
private mapItemBadges;
|
|
46
|
+
private leafBadge;
|
|
47
|
+
private newOrUpdated;
|
|
48
|
+
private hasRecent;
|
|
49
|
+
private isRecent;
|
|
35
50
|
private filterItems;
|
|
36
51
|
private isActiveRoute;
|
|
37
52
|
private openActivePageGroup;
|
|
@@ -39,3 +54,4 @@ export declare class TuiDocNavigation {
|
|
|
39
54
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiDocNavigation, never>;
|
|
40
55
|
static ɵcmp: i0.ɵɵComponentDeclaration<TuiDocNavigation, "tui-doc-navigation", never, {}, {}, never, ["*"], true, never>;
|
|
41
56
|
}
|
|
57
|
+
export {};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { TuiDocPageTabConnector } from './page-tab.directive';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class TuiDocPage {
|
|
4
|
+
private readonly pages;
|
|
5
|
+
private readonly major;
|
|
4
6
|
protected readonly tabConnectors: import("@angular/core").Signal<readonly TuiDocPageTabConnector[]>;
|
|
5
7
|
protected readonly tabs: Record<string, import("@taiga-ui/polymorpheus").PolymorpheusContent>;
|
|
6
8
|
protected readonly defaultTabs: readonly string[];
|
|
7
9
|
protected readonly from: RegExp;
|
|
8
10
|
protected readonly to = "_";
|
|
11
|
+
protected readonly version: import("@angular/core").Signal<string>;
|
|
9
12
|
readonly header: import("@angular/core").InputSignal<string>;
|
|
10
13
|
readonly package: import("@angular/core").InputSignal<string>;
|
|
11
14
|
readonly type: import("@angular/core").InputSignal<string>;
|
|
@@ -5,8 +5,8 @@ import { Location, isPlatformServer, NgTemplateOutlet, DOCUMENT, NgComponentOutl
|
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { FormsModule, FormGroup, ReactiveFormsModule, FormControl } from '@angular/forms';
|
|
7
7
|
import { ActivatedRoute, UrlSerializer, RouterLink, Router, NavigationEnd, Scroll, RouterLinkActive, RouterOutlet } from '@angular/router';
|
|
8
|
-
import { TUI_DOC_TYPE_REFERENCE_PARSER, TUI_DOC_TYPE_REFERENCE_HANDLER, TUI_DOC_URL_STATE_HANDLER, TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR, TUI_DOC_ICONS, TUI_DOC_DEMO_TEXTS, TUI_DOC_EXAMPLE_CONTENT_PROCESSOR, TUI_DOC_PREVIEW_TEXT, 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_PAGES_ICONS, TUI_DOC_LOGO, TUI_DOC_MENU_TEXT, TUI_DOC_SOURCE_CODE, TUI_DOC_SOURCE_CODE_TEXT, TUI_DOC_MAP_PAGES, TUI_DOC_SEE_ALSO_TEXT, TUI_DOC_TOC_TEXT, TUI_DOC_SEE_ALSO, TUI_DOC_DEFAULT_TABS } from '@taiga-ui/addon-doc/tokens';
|
|
9
|
-
import { tuiInspect, tuiCoerceValue, tuiRawLoad, tuiCoerceValueIsTrue, tuiCleanObject, tuiToKebab, tuiRawLoadRecord, tuiTransliterateKeyboardLayout, TuiDocKebabPipe } from '@taiga-ui/addon-doc/utils';
|
|
8
|
+
import { TUI_DOC_TYPE_REFERENCE_PARSER, TUI_DOC_TYPE_REFERENCE_HANDLER, TUI_DOC_URL_STATE_HANDLER, TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR, TUI_DOC_ICONS, TUI_DOC_DEMO_TEXTS, TUI_DOC_EXAMPLE_CONTENT_PROCESSOR, TUI_DOC_PREVIEW_TEXT, TUI_DOC_CODE_EDITOR, TUI_DOC_CODE_ACTIONS, TUI_DOC_TITLE, TUI_DOC_PAGES, TUI_DOC_PAGE_LOADED, TUI_DOC_VERSION, TUI_DOC_SEARCH_TEXT, TUI_DOC_SEARCH_ENABLED, TUI_DOC_PAGES_ICONS, TUI_DOC_LOGO, TUI_DOC_MENU_TEXT, TUI_DOC_SOURCE_CODE, TUI_DOC_SOURCE_CODE_TEXT, TUI_DOC_MAP_PAGES, TUI_DOC_SEE_ALSO_TEXT, TUI_DOC_TOC_TEXT, TUI_DOC_SEE_ALSO, TUI_DOC_DEFAULT_TABS } from '@taiga-ui/addon-doc/tokens';
|
|
9
|
+
import { tuiInspect, tuiCoerceValue, tuiRawLoad, tuiCoerceValueIsTrue, tuiCleanObject, tuiToKebab, tuiRawLoadRecord, tuiVersionParts, tuiIsRoutePageGroup, tuiTransliterateKeyboardLayout, TuiDocKebabPipe } from '@taiga-ui/addon-doc/utils';
|
|
10
10
|
import { tuiIsNumber, tuiPx, tuiIsPresent, tuiArrayToggle } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
11
11
|
import * as i5$1 from '@taiga-ui/core/components/input';
|
|
12
12
|
import { TuiInput, TuiInputDirective } from '@taiga-ui/core/components/input';
|
|
@@ -66,8 +66,8 @@ import { TuiDataList } from '@taiga-ui/core/components/data-list';
|
|
|
66
66
|
import { tuiScrollbarOptionsProvider, TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
|
|
67
67
|
import * as i2$1 from '@taiga-ui/kit/components/accordion';
|
|
68
68
|
import { TuiAccordion } from '@taiga-ui/kit/components/accordion';
|
|
69
|
-
import { TuiRoot } from '@taiga-ui/core/components/root';
|
|
70
69
|
import { TuiBadge } from '@taiga-ui/kit/components/badge';
|
|
70
|
+
import { TuiRoot } from '@taiga-ui/core/components/root';
|
|
71
71
|
import { TuiFade } from '@taiga-ui/kit/directives/fade';
|
|
72
72
|
import { TuiAutoColorPipe } from '@taiga-ui/kit/pipes/auto-color';
|
|
73
73
|
|
|
@@ -627,6 +627,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
627
627
|
args: [{ selector: '[tuiDocScrollIntoViewLink]' }]
|
|
628
628
|
}] });
|
|
629
629
|
|
|
630
|
+
const BADGE = {
|
|
631
|
+
new: { label: 'New', appearance: 'positive' },
|
|
632
|
+
updated: { label: 'Updated', appearance: 'info' },
|
|
633
|
+
};
|
|
634
|
+
const NEW_VERSION_RANGE = 6;
|
|
630
635
|
function tuiUniqBy(array, key) {
|
|
631
636
|
return Array.from(array
|
|
632
637
|
.reduce((map, item) => (map.has(item[key]) ? map : map.set(item[key], item)), new Map())
|
|
@@ -637,6 +642,10 @@ class TuiDocNavigation {
|
|
|
637
642
|
this.searchInput = viewChild(TuiInputDirective, { read: ElementRef });
|
|
638
643
|
this.router = inject(Router);
|
|
639
644
|
this.doc = inject(DOCUMENT);
|
|
645
|
+
this.current = tuiVersionParts(inject(TUI_DOC_VERSION));
|
|
646
|
+
this.sectionLeads = new Set(inject(NAVIGATION_ITEMS)
|
|
647
|
+
.slice(0, -1)
|
|
648
|
+
.map((pages) => pages[0]));
|
|
640
649
|
this.open = signal(false);
|
|
641
650
|
this.menuOpen = false;
|
|
642
651
|
this.drawer = inject(TuiDrawer, { optional: true });
|
|
@@ -651,6 +660,9 @@ class TuiDocNavigation {
|
|
|
651
660
|
...array,
|
|
652
661
|
item.reduce((pages, page) => 'subPages' in page ? [...pages, ...page.subPages] : [...pages, page], []),
|
|
653
662
|
], []);
|
|
663
|
+
// Inputs (items/version) are static, so badges are resolved once up front.
|
|
664
|
+
this.sectionBadges = this.items.map((section, index) => this.newOrUpdated(section[0]?.version, this.flat[index]));
|
|
665
|
+
this.itemBadges = this.mapItemBadges();
|
|
654
666
|
this.openPagesArr = [];
|
|
655
667
|
this.openPagesGroupsArr = [];
|
|
656
668
|
this.active = '';
|
|
@@ -685,6 +697,12 @@ class TuiDocNavigation {
|
|
|
685
697
|
isActive(route) {
|
|
686
698
|
return route === this.active;
|
|
687
699
|
}
|
|
700
|
+
sectionBadge(index) {
|
|
701
|
+
return this.sectionBadges[index] ?? null;
|
|
702
|
+
}
|
|
703
|
+
itemBadge(item) {
|
|
704
|
+
return this.itemBadges.get(item) ?? null;
|
|
705
|
+
}
|
|
688
706
|
onGroupClick(index) {
|
|
689
707
|
this.openPagesGroupsArr[index] = !this.openPagesGroupsArr[index];
|
|
690
708
|
}
|
|
@@ -704,6 +722,44 @@ class TuiDocNavigation {
|
|
|
704
722
|
event.preventDefault();
|
|
705
723
|
}
|
|
706
724
|
}
|
|
725
|
+
mapItemBadges() {
|
|
726
|
+
const badges = new Map();
|
|
727
|
+
const add = (item, badge) => {
|
|
728
|
+
if (badge) {
|
|
729
|
+
badges.set(item, badge);
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
for (const section of this.items) {
|
|
733
|
+
for (const item of section) {
|
|
734
|
+
if (tuiIsRoutePageGroup(item)) {
|
|
735
|
+
add(item, this.newOrUpdated(item.version, item.subPages));
|
|
736
|
+
item.subPages.forEach((page) => add(page, this.leafBadge(page)));
|
|
737
|
+
}
|
|
738
|
+
else {
|
|
739
|
+
add(item, this.leafBadge(item));
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
return badges;
|
|
744
|
+
}
|
|
745
|
+
leafBadge(item) {
|
|
746
|
+
return !this.sectionLeads.has(item) && this.isRecent(item.version)
|
|
747
|
+
? BADGE.new
|
|
748
|
+
: null;
|
|
749
|
+
}
|
|
750
|
+
newOrUpdated(version, pages = []) {
|
|
751
|
+
if (this.isRecent(version)) {
|
|
752
|
+
return BADGE.new;
|
|
753
|
+
}
|
|
754
|
+
return this.hasRecent(pages) ? BADGE.updated : null;
|
|
755
|
+
}
|
|
756
|
+
hasRecent(pages = []) {
|
|
757
|
+
return pages.some((page) => this.isRecent(page.version));
|
|
758
|
+
}
|
|
759
|
+
isRecent(version = '') {
|
|
760
|
+
const { major, minor } = tuiVersionParts(version);
|
|
761
|
+
return (major === this.current.major && this.current.minor - minor < NEW_VERSION_RANGE);
|
|
762
|
+
}
|
|
707
763
|
filterItems(items, search) {
|
|
708
764
|
return items.map((section) => tuiUniqBy(section.filter(({ title, keywords = '' }) => {
|
|
709
765
|
search = search.toLowerCase().trim();
|
|
@@ -762,7 +818,7 @@ class TuiDocNavigation {
|
|
|
762
818
|
target.remove();
|
|
763
819
|
}
|
|
764
820
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiDocNavigation, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
765
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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=\"s\"\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 [textContent]=\"item.title\"\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 [textContent]=\"item.title\"\n (click)=\"onClick()\"\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=\"s\"\n class=\"t-accordion\"\n [closeOthers]=\"false\"\n >\n @for (item of itemsWithoutSections; track item) {\n <ng-container\n [ngTemplateOutlet]=\"page\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n }\n @for (label of labels; track $index; let index = $index) {\n <button\n appearance=\"\"\n iconEnd=\"\"\n class=\"t-accordion-item\"\n [iconStart]=\"pagesIcons[label]\"\n [tuiAccordion]=\"!!openPagesArr[$index]\"\n (tuiAccordionChange)=\"openPagesArr[$index] = !!$event\"\n >\n <span class=\"t-label\">{{ label }}</span>\n <tui-icon\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesArr[$index]\"\n [icon]=\"icons.more\"\n [style.margin]=\"0\"\n />\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\n <ng-template\n #page\n let-item\n >\n @if (item.route.includes('://')) {\n <a\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [iconStart]=\"item.section ? '' : pagesIcons[item.title]\"\n [target]=\"item.target || '_self'\"\n [textContent]=\"item.title\"\n ></a>\n } @else {\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [iconStart]=\"item.section ? '' : pagesIcons[item.title]\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n [textContent]=\"item.title\"\n [tuiDocScrollIntoViewLink]=\"isActive(item.route)\"\n (click)=\"closeMenu()\"\n ></a>\n }\n </ng-template>\n\n <ng-template\n #pages\n let-index=\"index\"\n let-item=\"item\"\n >\n @if (!item.subPages) {\n <ng-container\n [ngTemplateOutlet]=\"page\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\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_nested\">\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 [textContent]=\"subPage.title\"\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 [textContent]=\"subPage.title\"\n [tuiDocScrollIntoViewLink]=\"isActive(subPage.route)\"\n (click)=\"closeMenu()\"\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;padding:0 .25rem;--tui-stroke-width: .09375rem}.t-input{margin:1.125rem 1.25rem 0}.t-slash{block-size:1rem;font-size:.5rem}.t-navigation{display:flex;flex-wrap:wrap;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;padding-inline-start:0}:host-context(tui-drawer) .t-scrollbar{display:contents}.t-accordion{inline-size:auto;margin:.5rem .375rem 1.5rem}.t-scrollbar{scroll-behavior:var(--tui-scroll-behavior);inline-size:100%}.t-label{margin-inline-start:1.1875rem;font-weight:700}.t-expand{margin-inline-start:.25rem;padding-block:0}.t-section{display:flex;flex-direction:column;align-items:flex-start}.t-section_nested{margin:0 .75rem;clip-path:inset(.5rem 0)}@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:.625rem}.t-sublink{display:inline-flex;align-items:center;font:var(--tui-typography-body-s);padding-block:.5rem;padding-inline-start:.4375rem;text-decoration:none}.t-accordion>.t-sublink{block-size:2.5rem;font:var(--tui-typography-body-s);font-weight:700;color:var(--tui-text-primary);align-items:center;padding:0 1rem;margin-inline-start:1px}.t-accordion>.t-sublink:before{margin-inline-end:calc(.875rem * (1 - .25 * var(--t-zoom)))}.t-accordion>.t-sublink:after{opacity:0}.t-sublink_small{margin-inline-start:1rem;padding-inline:0}.t-sublink_subsection{margin-inline-start:0!important;padding-inline-start:1.6875rem}.t-sublink_subsection .t-chevron{position:absolute;inset-inline-start:.4375rem}.t-sublink_subsection:before{opacity:0}.t-sublink.t-sublink.t-sublink_active{color:var(--tui-text-primary);font-weight:700}.t-sublink.t-sublink.t-sublink_active:after{position:absolute;display:block;inset-block:.5rem;inset-inline-start:-1rem;block-size:auto;inline-size:.1875rem;padding:0;margin-inline-start:-1px;border-radius:1rem;background:var(--tui-text-primary);zoom:1}.t-sublink:not([data-icon-start]){margin-inline-start:1.875rem}.t-sublink:not([data-icon-start]):before{position:absolute;display:block;inset-block-start:0;inset-block-end:0;inset-inline-start:-1rem;block-size:auto;inline-size:1px;padding:0;background:var(--tui-border-normal);zoom:1}.t-chevron{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);font-size:1rem;margin-inline:-.625rem .875rem}.t-chevron_active{transform:rotate(90deg)}.t-accordion-item{block-size:2.5rem}.t-accordion-item:before{position:relative;inset-inline-start:.5625rem;font-size:1rem}\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$1.TuiAccordionComponent, selector: "tui-accordion", inputs: ["closeOthers", "size"] }, { kind: "directive", type: i2$1.TuiAccordionDirective, selector: "button[tuiAccordion]", inputs: ["tuiAccordion"], outputs: ["tuiAccordionChange"] }, { kind: "component", type: i3$1.TuiExpand, selector: "tui-expand", inputs: ["expanded"] }, { kind: "directive", type: i4$1.TuiItem, selector: "[tuiItem]" }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { kind: "component", type: i5$2.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i5$2.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "directive", type: i5$2.TuiOptGroup, selector: "tui-opt-group", inputs: ["label"] }, { kind: "directive", type: TuiDocScrollIntoViewLink, selector: "[tuiDocScrollIntoViewLink]", inputs: ["tuiDocScrollIntoViewLink"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "component", type: i5.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler", "invalid", "tuiAppearanceFocus", "tuiAppearanceState"] }, { kind: "directive", type: i5.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i6.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "directive", type: i5$1.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "readonly", "invalid", "focused", "state"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]" }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
821
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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=\"s\"\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 [textContent]=\"item.title\"\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 [textContent]=\"item.title\"\n (click)=\"onClick()\"\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=\"s\"\n class=\"t-accordion\"\n [closeOthers]=\"false\"\n >\n @for (item of itemsWithoutSections; track item) {\n <ng-container\n [ngTemplateOutlet]=\"page\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n }\n @for (label of labels; track $index; let index = $index) {\n <button\n appearance=\"\"\n iconEnd=\"\"\n class=\"t-accordion-item\"\n [iconStart]=\"pagesIcons[label]\"\n [tuiAccordion]=\"!!openPagesArr[$index]\"\n (tuiAccordionChange)=\"openPagesArr[$index] = !!$event\"\n >\n <span class=\"t-label\">\n {{ label }}\n @if (sectionBadge($index); as badge) {\n <ng-container *ngTemplateOutlet=\"badgeTpl; context: {$implicit: badge}\" />\n }\n </span>\n <tui-icon\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesArr[$index]\"\n [icon]=\"icons.more\"\n [style.margin]=\"0\"\n />\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\n <ng-template\n #page\n let-item\n >\n @if (item.route.includes('://')) {\n <a\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [iconStart]=\"item.section ? '' : pagesIcons[item.title]\"\n [target]=\"item.target || '_self'\"\n >\n {{ item.title }}\n @if (itemBadge(item); as badge) {\n <ng-container *ngTemplateOutlet=\"badgeTpl; context: {$implicit: badge}\" />\n }\n </a>\n } @else {\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [iconStart]=\"item.section ? '' : pagesIcons[item.title]\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n [tuiDocScrollIntoViewLink]=\"isActive(item.route)\"\n (click)=\"closeMenu()\"\n >\n {{ item.title }}\n @if (itemBadge(item); as badge) {\n <ng-container *ngTemplateOutlet=\"badgeTpl; context: {$implicit: badge}\" />\n }\n </a>\n }\n </ng-template>\n\n <ng-template\n #pages\n let-index=\"index\"\n let-item=\"item\"\n >\n @if (!item.subPages) {\n <ng-container\n [ngTemplateOutlet]=\"page\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\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 @if (itemBadge(item); as badge) {\n <ng-container *ngTemplateOutlet=\"badgeTpl; context: {$implicit: badge}\" />\n }\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_nested\">\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 @if (itemBadge(subPage); as badge) {\n <ng-container *ngTemplateOutlet=\"badgeTpl; context: {$implicit: badge}\" />\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 @if (itemBadge(subPage); as badge) {\n <ng-container *ngTemplateOutlet=\"badgeTpl; context: {$implicit: badge}\" />\n }\n </a>\n }\n }\n </div>\n </tui-expand>\n </div>\n }\n </ng-template>\n\n <ng-template\n #badgeTpl\n let-badge\n >\n <span\n size=\"m\"\n tuiBadge\n class=\"t-badge\"\n [appearance]=\"badge.appearance\"\n >\n {{ badge.label }}\n </span>\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;padding:0 .25rem;--tui-stroke-width: .09375rem}.t-input{margin:1.125rem 1.25rem 0}.t-slash{block-size:1rem;font-size:.5rem}.t-navigation{display:flex;flex-wrap:wrap;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;padding-inline-start:0}:host-context(tui-drawer) .t-scrollbar{display:contents}.t-accordion{inline-size:auto;margin:.5rem .375rem 1.5rem}.t-scrollbar{scroll-behavior:var(--tui-scroll-behavior);inline-size:100%}.t-label{display:inline-flex;align-items:center;margin-inline-start:1.1875rem;font-weight:700}.t-badge{margin-inline-start:.375rem;font-size:.75rem}.t-expand{margin-inline-start:.25rem;padding-block:0}.t-section{display:flex;flex-direction:column;align-items:flex-start}.t-section_nested{margin:0 .75rem;clip-path:inset(.5rem 0)}@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:.625rem}.t-sublink{display:inline-flex;flex-wrap:wrap;align-items:center;max-inline-size:100%;font:var(--tui-typography-body-s);padding-block:.5rem;padding-inline-start:.4375rem;text-decoration:none}.t-accordion>.t-sublink{block-size:2.5rem;font:var(--tui-typography-body-s);font-weight:700;color:var(--tui-text-primary);align-items:center;padding:0 1rem;margin-inline-start:1px}.t-accordion>.t-sublink:before{margin-inline-end:calc(.875rem * (1 - .25 * var(--t-zoom)))}.t-accordion>.t-sublink:after{opacity:0}.t-sublink_small{margin-inline-start:1rem;padding-inline:0}.t-sublink_subsection{margin-inline-start:0!important;padding-inline-start:1.6875rem}.t-sublink_subsection .t-chevron{position:absolute;inset-inline-start:.4375rem}.t-sublink_subsection:before{opacity:0}.t-sublink.t-sublink.t-sublink_active{color:var(--tui-text-primary);font-weight:700}.t-sublink.t-sublink.t-sublink_active:after{position:absolute;display:block;inset-block:.5rem;inset-inline-start:-1rem;block-size:auto;inline-size:.1875rem;padding:0;margin-inline-start:-1px;border-radius:1rem;background:var(--tui-text-primary);zoom:1}.t-sublink:not([data-icon-start]){margin-inline-start:1.875rem}.t-sublink:not([data-icon-start]):before{position:absolute;display:block;inset-block-start:0;inset-block-end:0;inset-inline-start:-1rem;block-size:auto;inline-size:1px;padding:0;background:var(--tui-border-normal);zoom:1}.t-chevron{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);font-size:1rem;margin-inline:-.625rem .875rem}.t-chevron_active{transform:rotate(90deg)}.t-accordion-item{block-size:2.5rem}.t-accordion-item:before{position:relative;inset-inline-start:.5625rem;font-size:1rem}\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$1.TuiAccordionComponent, selector: "tui-accordion", inputs: ["closeOthers", "size"] }, { kind: "directive", type: i2$1.TuiAccordionDirective, selector: "button[tuiAccordion]", inputs: ["tuiAccordion"], outputs: ["tuiAccordionChange"] }, { kind: "component", type: i3$1.TuiExpand, selector: "tui-expand", inputs: ["expanded"] }, { kind: "directive", type: i4$1.TuiItem, selector: "[tuiItem]" }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { kind: "directive", type: TuiBadge, selector: "[tuiBadge],tui-icon[tuiBadge]", inputs: ["size"] }, { kind: "component", type: i5$2.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i5$2.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "directive", type: i5$2.TuiOptGroup, selector: "tui-opt-group", inputs: ["label"] }, { kind: "directive", type: TuiDocScrollIntoViewLink, selector: "[tuiDocScrollIntoViewLink]", inputs: ["tuiDocScrollIntoViewLink"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "component", type: i5.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler", "invalid", "tuiAppearanceFocus", "tuiAppearanceState"] }, { kind: "directive", type: i5.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i6.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "directive", type: i5$1.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "readonly", "invalid", "focused", "state"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]" }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
766
822
|
}
|
|
767
823
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiDocNavigation, decorators: [{
|
|
768
824
|
type: Component,
|
|
@@ -774,6 +830,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
774
830
|
RouterLinkActive,
|
|
775
831
|
TuiAccordion,
|
|
776
832
|
TuiAutoFocus,
|
|
833
|
+
TuiBadge,
|
|
777
834
|
TuiDataList,
|
|
778
835
|
TuiDocScrollIntoViewLink,
|
|
779
836
|
TuiExpand,
|
|
@@ -784,7 +841,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
784
841
|
], changeDetection: ChangeDetectionStrategy.OnPush, providers: NAVIGATION_PROVIDERS, host: {
|
|
785
842
|
'[class._open]': 'menuOpen',
|
|
786
843
|
'(window:keydown)': 'onFocusSearch($event)',
|
|
787
|
-
}, template: "@if (searchEnabled()) {\n <tui-textfield\n tuiTextfieldSize=\"s\"\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 [textContent]=\"item.title\"\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 [textContent]=\"item.title\"\n (click)=\"onClick()\"\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=\"s\"\n class=\"t-accordion\"\n [closeOthers]=\"false\"\n >\n @for (item of itemsWithoutSections; track item) {\n <ng-container\n [ngTemplateOutlet]=\"page\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n }\n @for (label of labels; track $index; let index = $index) {\n <button\n appearance=\"\"\n iconEnd=\"\"\n class=\"t-accordion-item\"\n [iconStart]=\"pagesIcons[label]\"\n [tuiAccordion]=\"!!openPagesArr[$index]\"\n (tuiAccordionChange)=\"openPagesArr[$index] = !!$event\"\n >\n <span class=\"t-label\">{{ label }}</span>\n <tui-icon\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesArr[$index]\"\n [icon]=\"icons.more\"\n [style.margin]=\"0\"\n />\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\n <ng-template\n #page\n let-item\n >\n @if (item.route.includes('://')) {\n <a\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [iconStart]=\"item.section ? '' : pagesIcons[item.title]\"\n [target]=\"item.target || '_self'\"\n [textContent]=\"item.title\"\n ></a>\n } @else {\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [iconStart]=\"item.section ? '' : pagesIcons[item.title]\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n [textContent]=\"item.title\"\n [tuiDocScrollIntoViewLink]=\"isActive(item.route)\"\n (click)=\"closeMenu()\"\n ></a>\n }\n </ng-template>\n\n <ng-template\n #pages\n let-index=\"index\"\n let-item=\"item\"\n >\n @if (!item.subPages) {\n <ng-container\n [ngTemplateOutlet]=\"page\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\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_nested\">\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 [textContent]=\"subPage.title\"\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 [textContent]=\"subPage.title\"\n [tuiDocScrollIntoViewLink]=\"isActive(subPage.route)\"\n (click)=\"closeMenu()\"\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;padding:0 .25rem;--tui-stroke-width: .09375rem}.t-input{margin:1.125rem 1.25rem 0}.t-slash{block-size:1rem;font-size:.5rem}.t-navigation{display:flex;flex-wrap:wrap;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;padding-inline-start:0}:host-context(tui-drawer) .t-scrollbar{display:contents}.t-accordion{inline-size:auto;margin:.5rem .375rem 1.5rem}.t-scrollbar{scroll-behavior:var(--tui-scroll-behavior);inline-size:100%}.t-label{margin-inline-start:1.1875rem;font-weight:700}.t-expand{margin-inline-start:.25rem;padding-block:0}.t-section{display:flex;flex-direction:column;align-items:flex-start}.t-section_nested{margin:0 .75rem;clip-path:inset(.5rem 0)}@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:.625rem}.t-sublink{display:inline-flex;align-items:center;font:var(--tui-typography-body-s);padding-block:.5rem;padding-inline-start:.4375rem;text-decoration:none}.t-accordion>.t-sublink{block-size:2.5rem;font:var(--tui-typography-body-s);font-weight:700;color:var(--tui-text-primary);align-items:center;padding:0 1rem;margin-inline-start:1px}.t-accordion>.t-sublink:before{margin-inline-end:calc(.875rem * (1 - .25 * var(--t-zoom)))}.t-accordion>.t-sublink:after{opacity:0}.t-sublink_small{margin-inline-start:1rem;padding-inline:0}.t-sublink_subsection{margin-inline-start:0!important;padding-inline-start:1.6875rem}.t-sublink_subsection .t-chevron{position:absolute;inset-inline-start:.4375rem}.t-sublink_subsection:before{opacity:0}.t-sublink.t-sublink.t-sublink_active{color:var(--tui-text-primary);font-weight:700}.t-sublink.t-sublink.t-sublink_active:after{position:absolute;display:block;inset-block:.5rem;inset-inline-start:-1rem;block-size:auto;inline-size:.1875rem;padding:0;margin-inline-start:-1px;border-radius:1rem;background:var(--tui-text-primary);zoom:1}.t-sublink:not([data-icon-start]){margin-inline-start:1.875rem}.t-sublink:not([data-icon-start]):before{position:absolute;display:block;inset-block-start:0;inset-block-end:0;inset-inline-start:-1rem;block-size:auto;inline-size:1px;padding:0;background:var(--tui-border-normal);zoom:1}.t-chevron{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);font-size:1rem;margin-inline:-.625rem .875rem}.t-chevron_active{transform:rotate(90deg)}.t-accordion-item{block-size:2.5rem}.t-accordion-item:before{position:relative;inset-inline-start:.5625rem;font-size:1rem}\n"] }]
|
|
844
|
+
}, template: "@if (searchEnabled()) {\n <tui-textfield\n tuiTextfieldSize=\"s\"\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 [textContent]=\"item.title\"\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 [textContent]=\"item.title\"\n (click)=\"onClick()\"\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=\"s\"\n class=\"t-accordion\"\n [closeOthers]=\"false\"\n >\n @for (item of itemsWithoutSections; track item) {\n <ng-container\n [ngTemplateOutlet]=\"page\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n }\n @for (label of labels; track $index; let index = $index) {\n <button\n appearance=\"\"\n iconEnd=\"\"\n class=\"t-accordion-item\"\n [iconStart]=\"pagesIcons[label]\"\n [tuiAccordion]=\"!!openPagesArr[$index]\"\n (tuiAccordionChange)=\"openPagesArr[$index] = !!$event\"\n >\n <span class=\"t-label\">\n {{ label }}\n @if (sectionBadge($index); as badge) {\n <ng-container *ngTemplateOutlet=\"badgeTpl; context: {$implicit: badge}\" />\n }\n </span>\n <tui-icon\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesArr[$index]\"\n [icon]=\"icons.more\"\n [style.margin]=\"0\"\n />\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\n <ng-template\n #page\n let-item\n >\n @if (item.route.includes('://')) {\n <a\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [iconStart]=\"item.section ? '' : pagesIcons[item.title]\"\n [target]=\"item.target || '_self'\"\n >\n {{ item.title }}\n @if (itemBadge(item); as badge) {\n <ng-container *ngTemplateOutlet=\"badgeTpl; context: {$implicit: badge}\" />\n }\n </a>\n } @else {\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [iconStart]=\"item.section ? '' : pagesIcons[item.title]\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n [tuiDocScrollIntoViewLink]=\"isActive(item.route)\"\n (click)=\"closeMenu()\"\n >\n {{ item.title }}\n @if (itemBadge(item); as badge) {\n <ng-container *ngTemplateOutlet=\"badgeTpl; context: {$implicit: badge}\" />\n }\n </a>\n }\n </ng-template>\n\n <ng-template\n #pages\n let-index=\"index\"\n let-item=\"item\"\n >\n @if (!item.subPages) {\n <ng-container\n [ngTemplateOutlet]=\"page\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\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 @if (itemBadge(item); as badge) {\n <ng-container *ngTemplateOutlet=\"badgeTpl; context: {$implicit: badge}\" />\n }\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_nested\">\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 @if (itemBadge(subPage); as badge) {\n <ng-container *ngTemplateOutlet=\"badgeTpl; context: {$implicit: badge}\" />\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 @if (itemBadge(subPage); as badge) {\n <ng-container *ngTemplateOutlet=\"badgeTpl; context: {$implicit: badge}\" />\n }\n </a>\n }\n }\n </div>\n </tui-expand>\n </div>\n }\n </ng-template>\n\n <ng-template\n #badgeTpl\n let-badge\n >\n <span\n size=\"m\"\n tuiBadge\n class=\"t-badge\"\n [appearance]=\"badge.appearance\"\n >\n {{ badge.label }}\n </span>\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;padding:0 .25rem;--tui-stroke-width: .09375rem}.t-input{margin:1.125rem 1.25rem 0}.t-slash{block-size:1rem;font-size:.5rem}.t-navigation{display:flex;flex-wrap:wrap;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;padding-inline-start:0}:host-context(tui-drawer) .t-scrollbar{display:contents}.t-accordion{inline-size:auto;margin:.5rem .375rem 1.5rem}.t-scrollbar{scroll-behavior:var(--tui-scroll-behavior);inline-size:100%}.t-label{display:inline-flex;align-items:center;margin-inline-start:1.1875rem;font-weight:700}.t-badge{margin-inline-start:.375rem;font-size:.75rem}.t-expand{margin-inline-start:.25rem;padding-block:0}.t-section{display:flex;flex-direction:column;align-items:flex-start}.t-section_nested{margin:0 .75rem;clip-path:inset(.5rem 0)}@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:.625rem}.t-sublink{display:inline-flex;flex-wrap:wrap;align-items:center;max-inline-size:100%;font:var(--tui-typography-body-s);padding-block:.5rem;padding-inline-start:.4375rem;text-decoration:none}.t-accordion>.t-sublink{block-size:2.5rem;font:var(--tui-typography-body-s);font-weight:700;color:var(--tui-text-primary);align-items:center;padding:0 1rem;margin-inline-start:1px}.t-accordion>.t-sublink:before{margin-inline-end:calc(.875rem * (1 - .25 * var(--t-zoom)))}.t-accordion>.t-sublink:after{opacity:0}.t-sublink_small{margin-inline-start:1rem;padding-inline:0}.t-sublink_subsection{margin-inline-start:0!important;padding-inline-start:1.6875rem}.t-sublink_subsection .t-chevron{position:absolute;inset-inline-start:.4375rem}.t-sublink_subsection:before{opacity:0}.t-sublink.t-sublink.t-sublink_active{color:var(--tui-text-primary);font-weight:700}.t-sublink.t-sublink.t-sublink_active:after{position:absolute;display:block;inset-block:.5rem;inset-inline-start:-1rem;block-size:auto;inline-size:.1875rem;padding:0;margin-inline-start:-1px;border-radius:1rem;background:var(--tui-text-primary);zoom:1}.t-sublink:not([data-icon-start]){margin-inline-start:1.875rem}.t-sublink:not([data-icon-start]):before{position:absolute;display:block;inset-block-start:0;inset-block-end:0;inset-inline-start:-1rem;block-size:auto;inline-size:1px;padding:0;background:var(--tui-border-normal);zoom:1}.t-chevron{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);font-size:1rem;margin-inline:-.625rem .875rem}.t-chevron_active{transform:rotate(90deg)}.t-accordion-item{block-size:2.5rem}.t-accordion-item:before{position:relative;inset-inline-start:.5625rem;font-size:1rem}\n"] }]
|
|
788
845
|
}], ctorParameters: () => [] });
|
|
789
846
|
|
|
790
847
|
class TuiDocHeader {
|
|
@@ -908,11 +965,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
908
965
|
|
|
909
966
|
class TuiDocPage {
|
|
910
967
|
constructor() {
|
|
968
|
+
this.pages = inject(TUI_DOC_MAP_PAGES);
|
|
969
|
+
this.major = tuiVersionParts(inject(TUI_DOC_VERSION)).major;
|
|
911
970
|
this.tabConnectors = contentChildren(TuiDocPageTabConnector);
|
|
912
971
|
this.tabs = inject(TUI_DOC_TABS)(inject(ActivatedRoute).snapshot);
|
|
913
972
|
this.defaultTabs = inject(TUI_DOC_DEFAULT_TABS);
|
|
914
973
|
this.from = / /g;
|
|
915
974
|
this.to = '_';
|
|
975
|
+
this.version = computed(() => {
|
|
976
|
+
const explicit = this.pages.get(this.header())?.version;
|
|
977
|
+
if (explicit) {
|
|
978
|
+
return explicit;
|
|
979
|
+
}
|
|
980
|
+
return this.package() && !Number.isNaN(this.major) ? `${this.major}.0.0` : '';
|
|
981
|
+
});
|
|
916
982
|
this.header = input('');
|
|
917
983
|
this.package = input('');
|
|
918
984
|
this.type = input('');
|
|
@@ -921,7 +987,7 @@ class TuiDocPage {
|
|
|
921
987
|
this.activeItemIndex = model(0);
|
|
922
988
|
}
|
|
923
989
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiDocPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
924
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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 }, activeItemIndex: { classPropertyName: "activeItemIndex", publicName: "activeItemIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeItemIndex: "activeItemIndexChange" }, queries: [{ propertyName: "tabConnectors", predicate: TuiDocPageTabConnector, isSignal: true }], ngImport: i0, template: "<header\n tuiHeader\n class=\"t-header\"\n>\n @if (header()) {\n <hgroup tuiTitle>\n <h1>\n {{ header() }}\n @if (package()) {\n <span\n appearance=\"custom\"\n size=\"m\"\n tuiBadge\n class=\"t-badge\"\n [style.background]=\"package() | tuiAutoColor\"\n >\n {{ package() }}\n </span>\n }\n @for (tag of tags(); track $index) {\n <span\n appearance=\"custom\"\n size=\"m\"\n tuiBadge\n class=\"t-badge\"\n [style.background]=\"tag | tuiAutoColor\"\n >\n {{ tag }}\n </span>\n }\n </h1>\n <p\n tuiFade\n class=\"t-navigation\"\n >\n @if (tabConnectors().length > 1) {\n <tui-segmented [(activeItemIndex)]=\"activeItemIndex\">\n @for (tab of tabConnectors(); track tab) {\n @if (tab.pageTab() || defaultTabs[$index]; as tabName) {\n <a\n routerLinkActive\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 routerLinkActive\n [routerLink]=\"tab.key\"\n >\n {{ tab.key }}\n </a>\n }\n </tui-segmented>\n }\n\n @if (package() || path() || type()) {\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 </p>\n </hgroup>\n }\n</header>\n<ng-content />\n@for (tab of tabConnectors(); track tab) {\n @if ($index === activeItemIndex()) {\n <tui-doc-toc />\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", styles: [":host{display:block;max-inline-size:70rem;font:var(--tui-typography-body-m);padding:3rem;margin:0 auto}@media screen and (max-width:767.4px){:host{padding:1rem 1.5rem}}.t-header{margin-block-end:2rem}.t-navigation:not(:empty){scrollbar-width:none;-ms-overflow-style:none;display:flex;gap:.625rem;margin-block-start:1rem;overflow:auto}.t-navigation:not(:empty)::-webkit-scrollbar,.t-navigation:not(:empty)::-webkit-scrollbar-thumb{display:none}@media screen and (max-width:767.4px){.t-navigation:not(:empty){margin:.5rem 0 1rem}}.t-badge{vertical-align:middle;text-transform:uppercase;margin-inline-end:.5rem;color:#000}.t-content{padding:1rem 2rem}@media screen and (max-width:767.4px){.t-content{padding:1rem 1.5rem}}.t-source-code{display:flex}\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: TuiBadge, selector: "[tuiBadge],tui-icon[tuiBadge]", inputs: ["size"] }, { kind: "component", type: TuiDocSourceCode, selector: "tui-doc-source-code", inputs: ["header", "package", "type", "path"] }, { kind: "component", type: TuiDocToc, selector: "tui-doc-toc" }, { kind: "directive", type: TuiFade, selector: "[tuiFade]", inputs: ["tuiFadeHeight", "tuiFadeSize", "tuiFadeOffset", "tuiFade"] }, { kind: "directive", type: TuiHeader, selector: "[tuiHeader]", inputs: ["tuiHeader"] }, { kind: "component", type: TuiSegmented, selector: "tui-segmented", inputs: ["size", "activeItemIndex", "disabled"], outputs: ["activeItemIndexChange"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
990
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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 }, activeItemIndex: { classPropertyName: "activeItemIndex", publicName: "activeItemIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeItemIndex: "activeItemIndexChange" }, queries: [{ propertyName: "tabConnectors", predicate: TuiDocPageTabConnector, isSignal: true }], ngImport: i0, template: "<header\n tuiHeader\n class=\"t-header\"\n>\n @if (header()) {\n <hgroup tuiTitle>\n <h1>\n {{ header() }}\n @if (package()) {\n <span\n appearance=\"custom\"\n size=\"m\"\n tuiBadge\n class=\"t-badge\"\n [style.background]=\"package() | tuiAutoColor\"\n >\n {{ package() }}\n </span>\n }\n @for (tag of tags(); track $index) {\n <span\n appearance=\"custom\"\n size=\"m\"\n tuiBadge\n class=\"t-badge\"\n [style.background]=\"tag | tuiAutoColor\"\n >\n {{ tag }}\n </span>\n }\n @if (version(); as version) {\n <span\n appearance=\"neutral\"\n size=\"m\"\n tuiBadge\n class=\"t-badge t-version\"\n >\n v{{ version }}+\n </span>\n }\n </h1>\n <p\n tuiFade\n class=\"t-navigation\"\n >\n @if (tabConnectors().length > 1) {\n <tui-segmented [(activeItemIndex)]=\"activeItemIndex\">\n @for (tab of tabConnectors(); track tab) {\n @if (tab.pageTab() || defaultTabs[$index]; as tabName) {\n <a\n routerLinkActive\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 routerLinkActive\n [routerLink]=\"tab.key\"\n >\n {{ tab.key }}\n </a>\n }\n </tui-segmented>\n }\n\n @if (package() || path() || type()) {\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 </p>\n </hgroup>\n }\n</header>\n<ng-content />\n@for (tab of tabConnectors(); track tab) {\n @if ($index === activeItemIndex()) {\n <tui-doc-toc />\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", styles: [":host{display:block;max-inline-size:70rem;font:var(--tui-typography-body-m);padding:3rem;margin:0 auto}@media screen and (max-width:767.4px){:host{padding:1rem 1.5rem}}.t-header{margin-block-end:2rem}.t-navigation:not(:empty){scrollbar-width:none;-ms-overflow-style:none;display:flex;gap:.625rem;margin-block-start:1rem;overflow:auto}.t-navigation:not(:empty)::-webkit-scrollbar,.t-navigation:not(:empty)::-webkit-scrollbar-thumb{display:none}@media screen and (max-width:767.4px){.t-navigation:not(:empty){margin:.5rem 0 1rem}}.t-badge{vertical-align:middle;text-transform:uppercase;margin-inline-end:.5rem;color:#000}.t-version{text-transform:none}.t-content{padding:1rem 2rem}@media screen and (max-width:767.4px){.t-content{padding:1rem 1.5rem}}.t-source-code{display:flex}\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: TuiBadge, selector: "[tuiBadge],tui-icon[tuiBadge]", inputs: ["size"] }, { kind: "component", type: TuiDocSourceCode, selector: "tui-doc-source-code", inputs: ["header", "package", "type", "path"] }, { kind: "component", type: TuiDocToc, selector: "tui-doc-toc" }, { kind: "directive", type: TuiFade, selector: "[tuiFade]", inputs: ["tuiFadeHeight", "tuiFadeSize", "tuiFadeOffset", "tuiFade"] }, { kind: "directive", type: TuiHeader, selector: "[tuiHeader]", inputs: ["tuiHeader"] }, { kind: "component", type: TuiSegmented, selector: "tui-segmented", inputs: ["size", "activeItemIndex", "disabled"], outputs: ["activeItemIndexChange"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
925
991
|
}
|
|
926
992
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiDocPage, decorators: [{
|
|
927
993
|
type: Component,
|
|
@@ -939,7 +1005,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
939
1005
|
TuiHeader,
|
|
940
1006
|
TuiSegmented,
|
|
941
1007
|
TuiTitle,
|
|
942
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<header\n tuiHeader\n class=\"t-header\"\n>\n @if (header()) {\n <hgroup tuiTitle>\n <h1>\n {{ header() }}\n @if (package()) {\n <span\n appearance=\"custom\"\n size=\"m\"\n tuiBadge\n class=\"t-badge\"\n [style.background]=\"package() | tuiAutoColor\"\n >\n {{ package() }}\n </span>\n }\n @for (tag of tags(); track $index) {\n <span\n appearance=\"custom\"\n size=\"m\"\n tuiBadge\n class=\"t-badge\"\n [style.background]=\"tag | tuiAutoColor\"\n >\n {{ tag }}\n </span>\n }\n </h1>\n <p\n tuiFade\n class=\"t-navigation\"\n >\n @if (tabConnectors().length > 1) {\n <tui-segmented [(activeItemIndex)]=\"activeItemIndex\">\n @for (tab of tabConnectors(); track tab) {\n @if (tab.pageTab() || defaultTabs[$index]; as tabName) {\n <a\n routerLinkActive\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 routerLinkActive\n [routerLink]=\"tab.key\"\n >\n {{ tab.key }}\n </a>\n }\n </tui-segmented>\n }\n\n @if (package() || path() || type()) {\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 </p>\n </hgroup>\n }\n</header>\n<ng-content />\n@for (tab of tabConnectors(); track tab) {\n @if ($index === activeItemIndex()) {\n <tui-doc-toc />\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", styles: [":host{display:block;max-inline-size:70rem;font:var(--tui-typography-body-m);padding:3rem;margin:0 auto}@media screen and (max-width:767.4px){:host{padding:1rem 1.5rem}}.t-header{margin-block-end:2rem}.t-navigation:not(:empty){scrollbar-width:none;-ms-overflow-style:none;display:flex;gap:.625rem;margin-block-start:1rem;overflow:auto}.t-navigation:not(:empty)::-webkit-scrollbar,.t-navigation:not(:empty)::-webkit-scrollbar-thumb{display:none}@media screen and (max-width:767.4px){.t-navigation:not(:empty){margin:.5rem 0 1rem}}.t-badge{vertical-align:middle;text-transform:uppercase;margin-inline-end:.5rem;color:#000}.t-content{padding:1rem 2rem}@media screen and (max-width:767.4px){.t-content{padding:1rem 1.5rem}}.t-source-code{display:flex}\n"] }]
|
|
1008
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<header\n tuiHeader\n class=\"t-header\"\n>\n @if (header()) {\n <hgroup tuiTitle>\n <h1>\n {{ header() }}\n @if (package()) {\n <span\n appearance=\"custom\"\n size=\"m\"\n tuiBadge\n class=\"t-badge\"\n [style.background]=\"package() | tuiAutoColor\"\n >\n {{ package() }}\n </span>\n }\n @for (tag of tags(); track $index) {\n <span\n appearance=\"custom\"\n size=\"m\"\n tuiBadge\n class=\"t-badge\"\n [style.background]=\"tag | tuiAutoColor\"\n >\n {{ tag }}\n </span>\n }\n @if (version(); as version) {\n <span\n appearance=\"neutral\"\n size=\"m\"\n tuiBadge\n class=\"t-badge t-version\"\n >\n v{{ version }}+\n </span>\n }\n </h1>\n <p\n tuiFade\n class=\"t-navigation\"\n >\n @if (tabConnectors().length > 1) {\n <tui-segmented [(activeItemIndex)]=\"activeItemIndex\">\n @for (tab of tabConnectors(); track tab) {\n @if (tab.pageTab() || defaultTabs[$index]; as tabName) {\n <a\n routerLinkActive\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 routerLinkActive\n [routerLink]=\"tab.key\"\n >\n {{ tab.key }}\n </a>\n }\n </tui-segmented>\n }\n\n @if (package() || path() || type()) {\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 </p>\n </hgroup>\n }\n</header>\n<ng-content />\n@for (tab of tabConnectors(); track tab) {\n @if ($index === activeItemIndex()) {\n <tui-doc-toc />\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", styles: [":host{display:block;max-inline-size:70rem;font:var(--tui-typography-body-m);padding:3rem;margin:0 auto}@media screen and (max-width:767.4px){:host{padding:1rem 1.5rem}}.t-header{margin-block-end:2rem}.t-navigation:not(:empty){scrollbar-width:none;-ms-overflow-style:none;display:flex;gap:.625rem;margin-block-start:1rem;overflow:auto}.t-navigation:not(:empty)::-webkit-scrollbar,.t-navigation:not(:empty)::-webkit-scrollbar-thumb{display:none}@media screen and (max-width:767.4px){.t-navigation:not(:empty){margin:.5rem 0 1rem}}.t-badge{vertical-align:middle;text-transform:uppercase;margin-inline-end:.5rem;color:#000}.t-version{text-transform:none}.t-content{padding:1rem 2rem}@media screen and (max-width:767.4px){.t-content{padding:1rem 1.5rem}}.t-source-code{display:flex}\n"] }]
|
|
943
1009
|
}] });
|
|
944
1010
|
|
|
945
1011
|
const TUI_THEME_KEY = new InjectionToken(ngDevMode ? 'TUI_THEME_KEY' : '', {
|