UNPKG

@ng-doc/app

Version:

<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>

1 lines 6.25 kB
{"version":3,"file":"ng-doc-app-components-root.mjs","sources":["../../../../libs/app/components/root/root.component.ts","../../../../libs/app/components/root/root.component.html","../../../../libs/app/components/root/ng-doc-app-components-root.ts"],"sourcesContent":["import { AsyncPipe, NgIf } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n Directive,\n HostBinding,\n inject,\n Input,\n ViewChild,\n} from '@angular/core';\nimport { NgDocSidebarService } from '@ng-doc/app/services';\nimport { NgDocContent, NgDocLetDirective, NgDocSidenavComponent } from '@ng-doc/ui-kit';\nimport { UntilDestroy } from '@ngneat/until-destroy';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\n\n/**\n * Directive uses for providing custom navbar, you should mark element with this directive\n * and the `NgDocRootComponent` will use it as a navbar\n *\n * ```html\n * <ng-doc-root>\n * <my-custom-navbar ngDocCustomNavbar></my-custom-navbar>\n *\n * <ng-doc-sidebar></ng-doc-sidebar>\n * <router-outlet></router-outlet>\n * </ng-doc-root>\n * ```\n */\n@Directive({\n selector: '[ngDocCustomNavbar]',\n standalone: true,\n})\nexport class NgDocCustomNavbarDirective {}\n\n/**\n * Directive uses for providing custom sidebar, you should mark element with this directive\n * and the `NgDocRootComponent` will use it as a sidebar\n *\n * ```html\n * <ng-doc-root>\n * <ng-doc-navbar></ng-doc-sidebar>\n *\n * <my-custom-sidebar ngDocCustomSidebar></my-custom-sidebar>\n * <router-outlet></router-outlet>\n * </ng-doc-root>\n * ```\n */\n@Directive({\n selector: '[ngDocCustomSidebar]',\n standalone: true,\n})\nexport class NgDocCustomSidebarDirective {}\n\n@Component({\n selector: 'ng-doc-root',\n templateUrl: './root.component.html',\n styleUrls: ['./root.component.scss'],\n providers: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgDocLetDirective, NgDocSidenavComponent, NgIf, PolymorpheusModule, AsyncPipe],\n})\n@UntilDestroy()\nexport class NgDocRootComponent {\n /**\n * If `true` then the sidebar will be shown\n * You can use it for example for landing page to hide sidebar\n */\n @Input()\n sidebar: boolean = true;\n\n /**\n * Content for footer\n */\n @Input()\n footerContent: NgDocContent = '';\n\n /**\n * If `true` then page will be shown without width limit.\n * You can use it for example for landing page\n */\n @Input()\n @HostBinding('attr.data-ng-doc-no-width-limit')\n noWidthLimit: boolean = false;\n\n @ViewChild(NgDocSidenavComponent)\n sidenav?: NgDocSidenavComponent;\n\n protected readonly sidebarService = inject(NgDocSidebarService);\n}\n","<ng-container>\n <div class=\"ng-doc-root-wrapper\">\n <div class=\"ng-doc-header\">\n <ng-content select=\"ng-doc-navbar\"></ng-content>\n <ng-content select=\"[ngDocCustomNavbar]\"></ng-content>\n </div>\n <main>\n <ng-doc-sidenav\n [sidebar]=\"sidebar ? sidebarContent : null\"\n [opened]=\"(sidebarService.isExpanded() | async) ?? true\"\n [hasBackdrop]=\"sidebarService.isMobile\"\n (closeEvent)=\"sidebarService.hide()\">\n <ng-template #sidebarContent>\n <ng-content select=\"ng-doc-sidebar\"></ng-content>\n <ng-content select=\"[ngDocCustomSidebar]\"></ng-content>\n </ng-template>\n\n <ng-content></ng-content>\n </ng-doc-sidenav>\n </main>\n <footer *ngIf=\"footerContent\">\n <ng-container *polymorpheusOutlet=\"footerContent as text\"> {{ text }}</ng-container>\n </footer>\n </div>\n</ng-container>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAeA;;;;;;;;;;;;AAYG;MAKU,0BAA0B,CAAA;8GAA1B,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAA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