@ng-doc/app 16.0.1 → 16.0.2
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/playground/playground-demo/playground-demo.component.d.ts +1 -3
- package/components/playground/playground-property/playground-property.component.d.ts +1 -3
- package/components/search/search.component.d.ts +3 -4
- package/directives/route-active/route-active.directive.d.ts +2 -3
- package/esm2022/classes/default-search-engine/default-search-engine.mjs +1 -1
- package/esm2022/components/code/code.component.mjs +1 -1
- package/esm2022/components/code/code.module.mjs +2 -2
- package/esm2022/components/demo/demo.component.mjs +1 -1
- package/esm2022/components/demo-displayer/demo-displayer.module.mjs +2 -2
- package/esm2022/components/page/page.component.mjs +2 -4
- package/esm2022/components/page/page.module.mjs +2 -2
- package/esm2022/components/page-link/page-link.component.mjs +1 -1
- package/esm2022/components/playground/playground-demo/playground-demo.component.mjs +8 -11
- package/esm2022/components/playground/playground-properties/playground-properties.component.mjs +3 -3
- package/esm2022/components/playground/playground-property/playground-property.component.mjs +5 -6
- package/esm2022/components/playground/playground.component.mjs +1 -1
- package/esm2022/components/playground/playground.module.mjs +1 -1
- package/esm2022/components/root/root.component.mjs +3 -3
- package/esm2022/components/search/search.component.mjs +5 -7
- package/esm2022/components/theme-toggle/theme-toggle.component.mjs +2 -6
- package/esm2022/directives/route-active/route-active.directive.mjs +6 -8
- package/esm2022/services/sidebar/sidebar.service.mjs +1 -1
- package/esm2022/services/theme/theme.service.mjs +2 -2
- package/fesm2022/ng-doc-app-classes-default-search-engine.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo-displayer.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-link.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page.mjs +1 -3
- package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-playground.mjs +14 -17
- package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-root.mjs +2 -2
- package/fesm2022/ng-doc-app-components-root.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-search.mjs +4 -6
- package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-theme-toggle.mjs +1 -5
- package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
- package/fesm2022/ng-doc-app-directives-route-active.mjs +5 -7
- package/fesm2022/ng-doc-app-directives-route-active.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-sidebar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-theme.mjs +1 -1
- package/fesm2022/ng-doc-app-services-theme.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -91,7 +91,7 @@ let NgDocRootComponent = class NgDocRootComponent {
|
|
|
91
91
|
})), delay(0));
|
|
92
92
|
}
|
|
93
93
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocRootComponent, deps: [{ token: i1.NgDocSidebarService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
94
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocRootComponent, selector: "ng-doc-root", inputs: { sidebar: "sidebar", footerContent: "footerContent", noWidthLimit: "noWidthLimit" }, host: { properties: { "attr.data-ng-doc-no-width-limit": "this.noWidthLimit" } }, providers: [], viewQueries: [{ propertyName: "sidenav", first: true, predicate: NgDocSidenavComponent, descendants: true }], ngImport: i0, template: "<ng-container *ngDocLet=\"!!(sidebarService.isMobileMode() | async) as isMobileMode\">\n\t<div class=\"ng-doc-root-wrapper\" [class.collapsable]=\"isMobileMode\">\n\t\t<div class=\"ng-doc-header\">\n\t\t\t<ng-content select=\"ng-doc-navbar\"></ng-content>\n\t\t\t<ng-content select=\"[ngDocCustomNavbar]\"></ng-content>\n\t\t</div>\n\t\t<main *ngDocLet=\"sidebar && !!(sidebarService.isExpanded() | async) as opened\">\n\t\t\t<ng-doc-sidenav\n\t\t\t\t*ngDocLet=\"sidenavState$ | async as sidenavState\"\n\t\t\t\t[sidebar]=\"sidebarContent\"\n\t\t\t\t[opened]=\"opened\"\n\t\t\t\t[over]=\"sidenavState?.over ?? false\"\n\t\t\t\t[align]=\"sidenavState?.align ?? 'left'\"\n\t\t\t\t[hasBackdrop]=\"sidenavState?.hasBackdrop ?? false\"\n\t\t\t\t(closeEvent)=\"sidebarService.hide()\"\n\t\t\t>\n\t\t\t\t<ng-template #sidebarContent>\n\t\t\t\t\t<ng-content select=\"ng-doc-sidebar\"></ng-content>\n\t\t\t\t\t<ng-content select=\"[ngDocCustomSidebar]\"></ng-content>\n\t\t\t\t</ng-template>\n\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</ng-doc-sidenav>\n\t\t</main>\n\t\t<footer *ngIf=\"footerContent\">\n\t\t\t<ng-container *polymorpheusOutlet=\"footerContent as text\"> {{ text }} </ng-container>\n\t\t</footer>\n\t</div>\n</ng-container>\n", styles: [":host[data-ng-doc-no-width-limit=true] .ng-doc-root-wrapper main{max-width:none}:host .ng-doc-root-wrapper main{display:flex;width:100%;margin-left:auto;margin-right:auto;max-width:var(--ng-doc-app-max-width);padding:var(--ng-doc-main-padding);--ng-doc-sidenav-top: var(--ng-doc-navbar-height);--ng-doc-sidenav-width: var(--ng-doc-sidebar-width);--ng-doc-sidenav-content-padding: var(--ng-doc-page-padding)}:host .ng-doc-root-wrapper .ng-doc-header{position:fixed;top:0;height:var(--ng-doc-navbar-height);width:100%;z-index:10}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.NgDocSidenavComponent, selector: "ng-doc-sidenav", inputs: ["sidebar", "align", "over", "opened", "hasBackdrop"], outputs: ["openedChange", "closeEvent", "beforeOpen", "beforeClose", "afterOpen", "afterClose"] }, { kind: "directive", type: i3.NgDocLetDirective, selector: "[ngDocLet]", inputs: ["ngDocLet"] }, { kind: "directive", type: i4.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
94
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocRootComponent, selector: "ng-doc-root", inputs: { sidebar: "sidebar", footerContent: "footerContent", noWidthLimit: "noWidthLimit" }, host: { properties: { "attr.data-ng-doc-no-width-limit": "this.noWidthLimit" } }, providers: [], viewQueries: [{ propertyName: "sidenav", first: true, predicate: NgDocSidenavComponent, descendants: true }], ngImport: i0, template: "<ng-container *ngDocLet=\"!!(sidebarService.isMobileMode() | async) as isMobileMode\">\n\t<div class=\"ng-doc-root-wrapper\" [class.collapsable]=\"isMobileMode\">\n\t\t<div class=\"ng-doc-header\">\n\t\t\t<ng-content select=\"ng-doc-navbar\"></ng-content>\n\t\t\t<ng-content select=\"[ngDocCustomNavbar]\"></ng-content>\n\t\t</div>\n\t\t<main *ngDocLet=\"sidebar && !!(sidebarService.isExpanded() | async) as opened\">\n\t\t\t<ng-doc-sidenav\n\t\t\t\t*ngDocLet=\"sidenavState$ | async as sidenavState\"\n\t\t\t\t[sidebar]=\"sidebarContent\"\n\t\t\t\t[opened]=\"opened\"\n\t\t\t\t[over]=\"sidenavState?.over ?? false\"\n\t\t\t\t[align]=\"sidenavState?.align ?? 'left'\"\n\t\t\t\t[hasBackdrop]=\"sidenavState?.hasBackdrop ?? false\"\n\t\t\t\t(closeEvent)=\"sidebarService.hide()\"\n\t\t\t>\n\t\t\t\t<ng-template #sidebarContent>\n\t\t\t\t\t<ng-content select=\"ng-doc-sidebar\"></ng-content>\n\t\t\t\t\t<ng-content select=\"[ngDocCustomSidebar]\"></ng-content>\n\t\t\t\t</ng-template>\n\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</ng-doc-sidenav>\n\t\t</main>\n\t\t<footer *ngIf=\"footerContent\">\n\t\t\t<ng-container *polymorpheusOutlet=\"footerContent as text\"> {{ text }} </ng-container>\n\t\t</footer>\n\t</div>\n</ng-container>\n", styles: [":host[data-ng-doc-no-width-limit=true] .ng-doc-root-wrapper main{max-width:none}:host .ng-doc-root-wrapper{display:flex;flex-direction:column;height:100%}:host .ng-doc-root-wrapper main{display:flex;width:100%;margin-left:auto;margin-right:auto;max-width:var(--ng-doc-app-max-width);padding:var(--ng-doc-main-padding);--ng-doc-sidenav-top: var(--ng-doc-navbar-height);--ng-doc-sidenav-width: var(--ng-doc-sidebar-width);--ng-doc-sidenav-content-padding: var(--ng-doc-page-padding)}:host .ng-doc-root-wrapper footer{margin-top:auto}:host .ng-doc-root-wrapper .ng-doc-header{position:fixed;top:0;height:var(--ng-doc-navbar-height);width:100%;z-index:10}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.NgDocSidenavComponent, selector: "ng-doc-sidenav", inputs: ["sidebar", "align", "over", "opened", "hasBackdrop"], outputs: ["openedChange", "closeEvent", "beforeOpen", "beforeClose", "afterOpen", "afterClose"] }, { kind: "directive", type: i3.NgDocLetDirective, selector: "[ngDocLet]", inputs: ["ngDocLet"] }, { kind: "directive", type: i4.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
95
95
|
};
|
|
96
96
|
NgDocRootComponent = __decorate([
|
|
97
97
|
UntilDestroy(),
|
|
@@ -99,7 +99,7 @@ NgDocRootComponent = __decorate([
|
|
|
99
99
|
], NgDocRootComponent);
|
|
100
100
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocRootComponent, decorators: [{
|
|
101
101
|
type: Component,
|
|
102
|
-
args: [{ selector: 'ng-doc-root', providers: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngDocLet=\"!!(sidebarService.isMobileMode() | async) as isMobileMode\">\n\t<div class=\"ng-doc-root-wrapper\" [class.collapsable]=\"isMobileMode\">\n\t\t<div class=\"ng-doc-header\">\n\t\t\t<ng-content select=\"ng-doc-navbar\"></ng-content>\n\t\t\t<ng-content select=\"[ngDocCustomNavbar]\"></ng-content>\n\t\t</div>\n\t\t<main *ngDocLet=\"sidebar && !!(sidebarService.isExpanded() | async) as opened\">\n\t\t\t<ng-doc-sidenav\n\t\t\t\t*ngDocLet=\"sidenavState$ | async as sidenavState\"\n\t\t\t\t[sidebar]=\"sidebarContent\"\n\t\t\t\t[opened]=\"opened\"\n\t\t\t\t[over]=\"sidenavState?.over ?? false\"\n\t\t\t\t[align]=\"sidenavState?.align ?? 'left'\"\n\t\t\t\t[hasBackdrop]=\"sidenavState?.hasBackdrop ?? false\"\n\t\t\t\t(closeEvent)=\"sidebarService.hide()\"\n\t\t\t>\n\t\t\t\t<ng-template #sidebarContent>\n\t\t\t\t\t<ng-content select=\"ng-doc-sidebar\"></ng-content>\n\t\t\t\t\t<ng-content select=\"[ngDocCustomSidebar]\"></ng-content>\n\t\t\t\t</ng-template>\n\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</ng-doc-sidenav>\n\t\t</main>\n\t\t<footer *ngIf=\"footerContent\">\n\t\t\t<ng-container *polymorpheusOutlet=\"footerContent as text\"> {{ text }} </ng-container>\n\t\t</footer>\n\t</div>\n</ng-container>\n", styles: [":host[data-ng-doc-no-width-limit=true] .ng-doc-root-wrapper main{max-width:none}:host .ng-doc-root-wrapper main{display:flex;width:100%;margin-left:auto;margin-right:auto;max-width:var(--ng-doc-app-max-width);padding:var(--ng-doc-main-padding);--ng-doc-sidenav-top: var(--ng-doc-navbar-height);--ng-doc-sidenav-width: var(--ng-doc-sidebar-width);--ng-doc-sidenav-content-padding: var(--ng-doc-page-padding)}:host .ng-doc-root-wrapper .ng-doc-header{position:fixed;top:0;height:var(--ng-doc-navbar-height);width:100%;z-index:10}\n"] }]
|
|
102
|
+
args: [{ selector: 'ng-doc-root', providers: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngDocLet=\"!!(sidebarService.isMobileMode() | async) as isMobileMode\">\n\t<div class=\"ng-doc-root-wrapper\" [class.collapsable]=\"isMobileMode\">\n\t\t<div class=\"ng-doc-header\">\n\t\t\t<ng-content select=\"ng-doc-navbar\"></ng-content>\n\t\t\t<ng-content select=\"[ngDocCustomNavbar]\"></ng-content>\n\t\t</div>\n\t\t<main *ngDocLet=\"sidebar && !!(sidebarService.isExpanded() | async) as opened\">\n\t\t\t<ng-doc-sidenav\n\t\t\t\t*ngDocLet=\"sidenavState$ | async as sidenavState\"\n\t\t\t\t[sidebar]=\"sidebarContent\"\n\t\t\t\t[opened]=\"opened\"\n\t\t\t\t[over]=\"sidenavState?.over ?? false\"\n\t\t\t\t[align]=\"sidenavState?.align ?? 'left'\"\n\t\t\t\t[hasBackdrop]=\"sidenavState?.hasBackdrop ?? false\"\n\t\t\t\t(closeEvent)=\"sidebarService.hide()\"\n\t\t\t>\n\t\t\t\t<ng-template #sidebarContent>\n\t\t\t\t\t<ng-content select=\"ng-doc-sidebar\"></ng-content>\n\t\t\t\t\t<ng-content select=\"[ngDocCustomSidebar]\"></ng-content>\n\t\t\t\t</ng-template>\n\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</ng-doc-sidenav>\n\t\t</main>\n\t\t<footer *ngIf=\"footerContent\">\n\t\t\t<ng-container *polymorpheusOutlet=\"footerContent as text\"> {{ text }} </ng-container>\n\t\t</footer>\n\t</div>\n</ng-container>\n", styles: [":host[data-ng-doc-no-width-limit=true] .ng-doc-root-wrapper main{max-width:none}:host .ng-doc-root-wrapper{display:flex;flex-direction:column;height:100%}:host .ng-doc-root-wrapper main{display:flex;width:100%;margin-left:auto;margin-right:auto;max-width:var(--ng-doc-app-max-width);padding:var(--ng-doc-main-padding);--ng-doc-sidenav-top: var(--ng-doc-navbar-height);--ng-doc-sidenav-width: var(--ng-doc-sidebar-width);--ng-doc-sidenav-content-padding: var(--ng-doc-page-padding)}:host .ng-doc-root-wrapper footer{margin-top:auto}:host .ng-doc-root-wrapper .ng-doc-header{position:fixed;top:0;height:var(--ng-doc-navbar-height);width:100%;z-index:10}\n"] }]
|
|
103
103
|
}], ctorParameters: function () { return [{ type: i1.NgDocSidebarService }]; }, propDecorators: { sidebar: [{
|
|
104
104
|
type: Input
|
|
105
105
|
}], footerContent: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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/root.module.ts","../../../../libs/app/components/root/ng-doc-app-components-root.ts"],"sourcesContent":["import {\n\tAfterViewInit,\n\tChangeDetectionStrategy,\n\tComponent,\n\tDirective,\n\tHostBinding,\n\tInput,\n\tViewChild,\n} from '@angular/core';\nimport {NgDocSidebarService} from '@ng-doc/app/services/sidebar';\nimport {NgDocContent, NgDocHorizontalAlign, NgDocSidenavComponent} from '@ng-doc/ui-kit';\nimport {UntilDestroy} from '@ngneat/until-destroy';\nimport {combineLatest, merge, NEVER, Observable, of} from 'rxjs';\nimport {delay, filter, map, mapTo, startWith
|
|
1
|
+
{"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/root.module.ts","../../../../libs/app/components/root/ng-doc-app-components-root.ts"],"sourcesContent":["import {\n\tAfterViewInit,\n\tChangeDetectionStrategy,\n\tComponent,\n\tDirective,\n\tHostBinding,\n\tInput,\n\tViewChild,\n} from '@angular/core';\nimport {NgDocSidebarService} from '@ng-doc/app/services/sidebar';\nimport {NgDocContent, NgDocHorizontalAlign, NgDocSidenavComponent} from '@ng-doc/ui-kit';\nimport {UntilDestroy} from '@ngneat/until-destroy';\nimport {combineLatest, merge, NEVER, Observable, of} from 'rxjs';\nimport {delay, filter, map, mapTo, startWith} from 'rxjs/operators';\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\tselector: '[ngDocCustomNavbar]',\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\tselector: '[ngDocCustomSidebar]',\n})\nexport class NgDocCustomSidebarDirective {}\n\n@Component({\n\tselector: 'ng-doc-root',\n\ttemplateUrl: './root.component.html',\n\tstyleUrls: ['./root.component.scss'],\n\tproviders: [],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\n@UntilDestroy()\nexport class NgDocRootComponent implements AfterViewInit {\n\t/**\n\t * If `true` then the sidebar will be shown\n\t * You can use it for example for landing page to hide sidebar\n\t */\n\t@Input()\n\tsidebar: boolean = true;\n\n\t/**\n\t * Content for footer\n\t */\n\t@Input()\n\tfooterContent: NgDocContent = '';\n\n\t/**\n\t * If `true` then page will be shown without width limit.\n\t * You can use it for example for landing page\n\t */\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-no-width-limit')\n\tnoWidthLimit: boolean = false;\n\n\t@ViewChild(NgDocSidenavComponent)\n\tsidenav?: NgDocSidenavComponent;\n\n\tprotected sidenavState$: Observable<{\n\t\tover: boolean;\n\t\talign: NgDocHorizontalAlign;\n\t\thasBackdrop: boolean;\n\t}> = NEVER;\n\n\tconstructor(protected readonly sidebarService: NgDocSidebarService) {}\n\n\tngAfterViewInit(): void {\n\t\tthis.sidenavState$ = combineLatest([\n\t\t\tthis.sidebarService.isMobileMode(),\n\t\t\tthis.sidenav\n\t\t\t\t? merge(this.sidenav.beforeOpen.pipe(mapTo(true)), this.sidenav.afterClose.pipe(mapTo(false))).pipe(\n\t\t\t\t\t\tstartWith(false),\n\t\t\t\t )\n\t\t\t\t: of(true),\n\t\t]).pipe(\n\t\t\tfilter(([isMobile, opened]: [boolean, boolean]) => !opened || (opened && !isMobile)),\n\t\t\tmap(([isMobile]: [boolean, boolean]) => ({\n\t\t\t\tover: isMobile,\n\t\t\t\talign: (isMobile ? 'right' : 'left') as NgDocHorizontalAlign,\n\t\t\t\thasBackdrop: isMobile,\n\t\t\t})),\n\t\t\tdelay(0),\n\t\t);\n\t}\n}\n","<ng-container *ngDocLet=\"!!(sidebarService.isMobileMode() | async) as isMobileMode\">\n\t<div class=\"ng-doc-root-wrapper\" [class.collapsable]=\"isMobileMode\">\n\t\t<div class=\"ng-doc-header\">\n\t\t\t<ng-content select=\"ng-doc-navbar\"></ng-content>\n\t\t\t<ng-content select=\"[ngDocCustomNavbar]\"></ng-content>\n\t\t</div>\n\t\t<main *ngDocLet=\"sidebar && !!(sidebarService.isExpanded() | async) as opened\">\n\t\t\t<ng-doc-sidenav\n\t\t\t\t*ngDocLet=\"sidenavState$ | async as sidenavState\"\n\t\t\t\t[sidebar]=\"sidebarContent\"\n\t\t\t\t[opened]=\"opened\"\n\t\t\t\t[over]=\"sidenavState?.over ?? false\"\n\t\t\t\t[align]=\"sidenavState?.align ?? 'left'\"\n\t\t\t\t[hasBackdrop]=\"sidenavState?.hasBackdrop ?? false\"\n\t\t\t\t(closeEvent)=\"sidebarService.hide()\"\n\t\t\t>\n\t\t\t\t<ng-template #sidebarContent>\n\t\t\t\t\t<ng-content select=\"ng-doc-sidebar\"></ng-content>\n\t\t\t\t\t<ng-content select=\"[ngDocCustomSidebar]\"></ng-content>\n\t\t\t\t</ng-template>\n\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</ng-doc-sidenav>\n\t\t</main>\n\t\t<footer *ngIf=\"footerContent\">\n\t\t\t<ng-container *polymorpheusOutlet=\"footerContent as text\"> {{ text }} </ng-container>\n\t\t</footer>\n\t</div>\n</ng-container>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {NgDocLetModule, NgDocMediaQueryModule, NgDocSidenavModule} from '@ng-doc/ui-kit';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {NgDocCustomNavbarDirective, NgDocCustomSidebarDirective, NgDocRootComponent} from './root.component';\n\n@NgModule({\n\tdeclarations: [NgDocRootComponent, NgDocCustomNavbarDirective, NgDocCustomSidebarDirective],\n\timports: [CommonModule, NgDocMediaQueryModule, NgDocSidenavModule, NgDocLetModule, PolymorpheusModule],\n\texports: [NgDocRootComponent, NgDocCustomNavbarDirective, NgDocCustomSidebarDirective],\n})\nexport class NgDocRootModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAeA;;;;;;;;;;;;AAYG;AACH,MAGa,0BAA0B,CAAA;8GAA1B,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAA1B,0BAA0B,EAAA,QAAA,EAAA,qBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAHtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,iBAAA,CAAA;;AAGD;;;;;;;;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N,SAAS;uBAAC,qBAAqB,CAAA;;;AE1EjC,MAKa,eAAe,CAAA;8GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAf,eAAe,EAAA,YAAA,EAAA,CAJZ,kBAAkB,EAAE,0BAA0B,EAAE,2BAA2B,CAAA,EAAA,OAAA,EAAA,CAChF,YAAY,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,cAAc,EAAE,kBAAkB,aAC3F,kBAAkB,EAAE,0BAA0B,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA,EAAA;+GAEzE,eAAe,EAAA,OAAA,EAAA,CAHjB,YAAY,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,cAAc,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGzF,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,0BAA0B,EAAE,2BAA2B,CAAC;oBAC3F,OAAO,EAAE,CAAC,YAAY,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,cAAc,EAAE,kBAAkB,CAAC;AACtG,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,0BAA0B,EAAE,2BAA2B,CAAC;AACtF,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { ElementRef,
|
|
3
|
+
import { ElementRef, Component, ChangeDetectionStrategy, Optional, Input, HostBinding, ViewChild, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1 from '@ng-doc/app/classes/search-engine';
|
|
5
5
|
import { NgDocSearchEngine } from '@ng-doc/app/classes/search-engine';
|
|
6
6
|
import * as i5 from '@ng-doc/ui-kit';
|
|
@@ -20,9 +20,8 @@ import { NgDocSanitizeHtmlModule } from '@ng-doc/app/pipes';
|
|
|
20
20
|
|
|
21
21
|
var NgDocSearchComponent_1;
|
|
22
22
|
let NgDocSearchComponent = NgDocSearchComponent_1 = class NgDocSearchComponent {
|
|
23
|
-
constructor(elementRef,
|
|
23
|
+
constructor(elementRef, searchEngine) {
|
|
24
24
|
this.elementRef = elementRef;
|
|
25
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
26
25
|
this.searchEngine = searchEngine;
|
|
27
26
|
this.mod = 'input';
|
|
28
27
|
this.searchTerm = '';
|
|
@@ -40,7 +39,7 @@ let NgDocSearchComponent = NgDocSearchComponent_1 = class NgDocSearchComponent {
|
|
|
40
39
|
getPositions(key, item) {
|
|
41
40
|
return item.positions[key] ?? [];
|
|
42
41
|
}
|
|
43
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocSearchComponent, deps: [{ token: i0.ElementRef }, { token:
|
|
42
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocSearchComponent, deps: [{ token: i0.ElementRef }, { token: i1.NgDocSearchEngine, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
44
43
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocSearchComponent, selector: "ng-doc-search", inputs: { mod: "mod" }, host: { properties: { "attr.data-ng-doc-mod": "this.mod" } }, providers: [
|
|
45
44
|
{
|
|
46
45
|
provide: NgDocListHost,
|
|
@@ -51,7 +50,6 @@ let NgDocSearchComponent = NgDocSearchComponent_1 = class NgDocSearchComponent {
|
|
|
51
50
|
NgDocSearchComponent = NgDocSearchComponent_1 = __decorate([
|
|
52
51
|
UntilDestroy(),
|
|
53
52
|
__metadata("design:paramtypes", [ElementRef,
|
|
54
|
-
ChangeDetectorRef,
|
|
55
53
|
NgDocSearchEngine])
|
|
56
54
|
], NgDocSearchComponent);
|
|
57
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocSearchComponent, decorators: [{
|
|
@@ -62,7 +60,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
|
62
60
|
useExisting: NgDocSearchComponent,
|
|
63
61
|
},
|
|
64
62
|
], template: "<ng-container *ngDocLet=\"search$ | async as state\">\n\t<ng-container *ngIf=\"mod === 'icon'; else searchInput\">\n\t\t<button ng-doc-button-icon size=\"large\" (click)=\"inputDropdown.toggle()\" ngDocDropdownOrigin>\n\t\t\t<ng-doc-icon icon=\"search\" [size]=\"24\"></ng-doc-icon>\n\n\t\t\t<ng-doc-dropdown\n\t\t\t\t[content]=\"dropdownContent\"\n\t\t\t\tpanelClass=\"ng-doc-search-dropdown\"\n\t\t\t\twidth=\"100%\"\n\t\t\t\theight=\"80vh\"\n\t\t\t\t#inputDropdown\n\t\t\t>\n\t\t\t\t<ng-template #dropdownContent>\n\t\t\t\t\t<div class=\"ng-doc-search-wrapper\">\n\t\t\t\t\t\t<ng-doc-input-wrapper [leftContent]=\"leftContent\" ngDocDropdownOrigin>\n\t\t\t\t\t\t\t<ng-template #leftContent>\n\t\t\t\t\t\t\t\t<ng-doc-icon icon=\"search\"></ng-doc-icon>\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tngDocInputString\n\t\t\t\t\t\t\t\t[(ngModel)]=\"searchTerm\"\n\t\t\t\t\t\t\t\t(ngModelChange)=\"query$.next($event)\"\n\t\t\t\t\t\t\t\tplaceholder=\"Search...\"\n\t\t\t\t\t\t\t\tngDocAutofocus\n\t\t\t\t\t\t\t\t[selectAll]=\"true\"\n\t\t\t\t\t\t\t\t#inputElement\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ng-doc-input-wrapper>\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"searchResults\"></ng-container>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-template>\n\t\t\t</ng-doc-dropdown>\n\t\t</button>\n\t</ng-container>\n\n\t<ng-template #searchInput>\n\t\t<ng-doc-input-wrapper\n\t\t\t[leftContent]=\"leftContent\"\n\t\t\t[rightContent]=\"rightContent\"\n\t\t\tngDocDropdownOrigin\n\t\t\tngDocFocusCatcher\n\t\t\t(focusEvent)=\"inputElement.value ? dropdown.open() : null\"\n\t\t\t(click)=\"inputElement.value ? dropdown.open() : null\"\n\t\t\t#input\n\t\t>\n\t\t\t<ng-template #leftContent>\n\t\t\t\t<ng-doc-icon icon=\"search\"></ng-doc-icon>\n\t\t\t</ng-template>\n\t\t\t<input\n\t\t\t\tngDocInputString\n\t\t\t\t[(ngModel)]=\"searchTerm\"\n\t\t\t\t(ngModelChange)=\"query$.next($event); dropdown.open()\"\n\t\t\t\tplaceholder=\"Search...\"\n\t\t\t\t[ngDocHotkey]=\"{ctrlKey: false, altKey: false, shiftKey: false, code: 'Slash'}\"\n\t\t\t\t(ngDocHotkey)=\"inputElement.focus(); inputElement.select()\"\n\t\t\t\t#inputElement\n\t\t\t/>\n\t\t\t<ng-template #rightContent>\n\t\t\t\t<ng-doc-tag class=\"search-hotkey\">/</ng-doc-tag>\n\t\t\t</ng-template>\n\t\t\t<ng-doc-dropdown\n\t\t\t\t[content]=\"searchResults\"\n\t\t\t\tpositions=\"bottom-right\"\n\t\t\t\t[width]=\"input.elementRef.nativeElement.offsetWidth\"\n\t\t\t\tmaxHeight=\"calc(95vh - var(--ng-doc-navbar-height)\"\n\t\t\t\t#dropdown\n\t\t\t>\n\t\t\t\t<\n\t\t\t</ng-doc-dropdown>\n\t\t</ng-doc-input-wrapper>\n\t</ng-template>\n\n\t<ng-template #searchResults>\n\t\t<div class=\"ng-doc-search-result-content\" [attr.data-ng-doc-mod]=\"mod\">\n\t\t\t<ng-doc-data-list [items]=\"state?.result ?? []\" [itemContent]=\"itemContent\" [emptyContent]=\"emptyContent\">\n\t\t\t\t<ng-template let-item #itemContent>\n\t\t\t\t\t<a class=\"ng-doc-search-option\" [routerLink]=\"item.index.route\" [fragment]=\"item.index.fragment\">\n\t\t\t\t\t\t<div class=\"ng-doc-search-option-header\">\n\t\t\t\t\t\t\t<ng-doc-tag size=\"small\" [attr.data-ng-doc-page-type]=\"item.index.pageType\">\n\t\t\t\t\t\t\t\t{{ item.index.pageType }}\n\t\t\t\t\t\t\t</ng-doc-tag>\n\t\t\t\t\t\t\t<span class=\"ng-doc-search-option-breadcrumbs\" ng-doc-text>\n\t\t\t\t\t\t\t\t<ng-container *ngFor=\"let breadcrum of item.index.breadcrumbs; let i = index\">\n\t\t\t\t\t\t\t\t\t<span>{{ breadcrum }}</span>\n\t\t\t\t\t\t\t\t\t<span class=\"ng-doc-search-option-breadcrumb-divider\" *ngIf=\"i !== item.index.breadcrumbs.length - 1\"\n\t\t\t\t\t\t\t\t\t\t>/</span\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<h5\n\t\t\t\t\t\t\tclass=\"ng-doc-search-section-title\"\n\t\t\t\t\t\t\tng-doc-text\n\t\t\t\t\t\t\t[innerHTML]=\"\n\t\t\t\t\t\t\t\t(item.index.section\n\t\t\t\t\t\t\t\t\t| ngDocHighlighterPipe: (getPositions | ngDocRun: 'section':item)\n\t\t\t\t\t\t\t\t\t| ngDocSanitizeHtml) || item.index.title\n\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t></h5>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t*ngIf=\"item.index.content\"\n\t\t\t\t\t\t\tclass=\"ng-doc-search-content\"\n\t\t\t\t\t\t\t[innerHTML]=\"\n\t\t\t\t\t\t\t\titem.index.content | ngDocHighlighterPipe: (getPositions | ngDocRun: 'content':item) | ngDocSanitizeHtml\n\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\tng-doc-text\n\t\t\t\t\t\t></div>\n\t\t\t\t\t</a>\n\t\t\t\t</ng-template>\n\t\t\t\t<ng-template #emptyContent>\n\t\t\t\t\t<ng-container *ngIf=\"!state?.pending\">\n\t\t\t\t\t\t<div class=\"ng-doc-search-empty\">\n\t\t\t\t\t\t\t<ng-container *ngIf=\"query$.value.length\">Nothing found</ng-container>\n\t\t\t\t\t\t\t<ng-container *ngIf=\"!query$.value.length\">Please enter your search query</ng-container>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</ng-container>\n\t\t\t\t\t<ng-container *ngIf=\"state?.pending\">\n\t\t\t\t\t\t<div class=\"ng-doc-search-progress\">\n\t\t\t\t\t\t\t<ng-doc-spinner size=\"small\"></ng-doc-spinner>\n\t\t\t\t\t\t\tSearching...\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</ng-container>\n\t\t\t\t</ng-template>\n\t\t\t</ng-doc-data-list>\n\t\t</div>\n\t</ng-template>\n</ng-container>\n", styles: [":host{max-width:500px;--ng-doc-floated-border-radius: var(--ng-doc-base-gutter);--ng-doc-input-background-color: var(--ng-doc-base-1);--ng-doc-input-border: none;--ng-doc-input-border-hover: none;--ng-doc-icon-color: var(--ng-doc-base-8)}:host[data-ng-doc-mod=input]{width:480px}.ng-doc-search-result-content{height:100%;overflow:auto;--ng-doc-option-padding: 0}.ng-doc-search-result-content[data-ng-doc-mod=icon] .ng-doc-search-wrapper{padding:calc(var(--ng-doc-base-gutter) * 2) 0}.ng-doc-search-result-content[data-ng-doc-mod=icon] .ng-doc-search-option{padding:12px 16px}.ng-doc-search-wrapper{display:flex;flex-direction:column;height:100%;padding:calc(var(--ng-doc-base-gutter) * 2) 0}.ng-doc-search-wrapper ng-doc-input-wrapper{padding:0 calc(var(--ng-doc-base-gutter) * 2)}.ng-doc-search-wrapper .ng-doc-search-result-content{padding:0;margin-top:calc(var(--ng-doc-base-gutter) * 3)}.search-hotkey{display:flex;align-items:center;justify-content:center;width:calc(var(--ng-doc-base-gutter) * 3);height:calc(var(--ng-doc-base-gutter) * 3);margin-right:var(--ng-doc-base-gutter);--ng-doc-tag-border: 1px solid var(--ng-doc-base-7);--ng-doc-tag-color: var(--ng-doc-base-7);--ng-doc-tag-background: transparent}::ng-deep .ng-doc-search-dropdown{--ng-doc-overlay-border-radius: 0px !important}.ng-doc-search-option{display:block;padding:12px 36px;text-decoration:none}.ng-doc-search-option .ng-doc-search-option-header{display:flex;align-items:center}.ng-doc-search-option .ng-doc-search-option-header ng-doc-tag{text-transform:uppercase;margin-right:calc(var(--ng-doc-base-gutter) / 2);--ng-doc-font-weight: 900}.ng-doc-search-option .ng-doc-search-option-header ng-doc-tag[data-ng-doc-page-type=guide]{--ng-doc-tag-color: var(--ng-doc-guide-tag-color);--ng-doc-tag-background: var(--ng-doc-guide-tag-background)}.ng-doc-search-option .ng-doc-search-option-header ng-doc-tag[data-ng-doc-page-type=api]{--ng-doc-tag-color: var(--ng-doc-api-tag-color);--ng-doc-tag-background: var(--ng-doc-api-tag-background)}.ng-doc-search-option .ng-doc-search-option-header .ng-doc-search-option-breadcrumbs{--ng-doc-text: var(--ng-doc-text-muted);--ng-doc-font-size: 12px;--ng-doc-line-height: 16px;--ng-doc-font-weight: 600}.ng-doc-search-option .ng-doc-search-option-header .ng-doc-search-option-breadcrumbs .ng-doc-search-option-breadcrumb-divider{margin:0 6px}.ng-doc-search-option .ng-doc-search-section-title{display:block;color:var(--ng-doc-search-result-header-color, var(--ng-doc-text));--ng-doc-line-height: 20px;margin:4px 0}.ng-doc-search-option .ng-doc-search-content{display:block;color:var(--ng-doc-search-result-color, var(--ng-doc-text));--ng-doc-font-size: 14px;--ng-doc-line-height: 19px;--ng-doc-font-weight: 600}.ng-doc-search-empty{padding:0 22px}.ng-doc-search-progress{display:flex;align-items:center}.ng-doc-search-progress ng-doc-spinner{margin-right:var(--ng-doc-base-gutter)}\n"] }]
|
|
65
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type:
|
|
63
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.NgDocSearchEngine, decorators: [{
|
|
66
64
|
type: Optional
|
|
67
65
|
}] }]; }, propDecorators: { mod: [{
|
|
68
66
|
type: Input
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-components-search.mjs","sources":["../../../../libs/app/components/search/search.component.ts","../../../../libs/app/components/search/search.component.html","../../../../libs/app/components/search/search.module.ts","../../../../libs/app/components/search/ng-doc-app-components-search.ts"],"sourcesContent":["import {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tHostBinding,\n\tInput,\n\tOptional,\n\tViewChild,\n} from '@angular/core';\nimport {NgDocSearchEngine} from '@ng-doc/app/classes/search-engine';\nimport {NgDocSearchResult} from '@ng-doc/app/interfaces';\nimport {NgDocPageType} from '@ng-doc/core';\nimport {NgDocHighlightPosition, observableState, StatedObservable} from '@ng-doc/ui-kit';\nimport {NgDocListHost} from '@ng-doc/ui-kit/classes';\nimport {UntilDestroy, untilDestroyed} from '@ngneat/until-destroy';\nimport {BehaviorSubject, NEVER, ReplaySubject, Subject} from 'rxjs';\nimport {filter, skip, switchMap} from 'rxjs/operators';\n\n@Component({\n\tselector: 'ng-doc-search',\n\ttemplateUrl: './search.component.html',\n\tstyleUrls: ['./search.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NgDocListHost,\n\t\t\tuseExisting: NgDocSearchComponent,\n\t\t},\n\t],\n})\n@UntilDestroy()\nexport class NgDocSearchComponent implements NgDocListHost {\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-mod')\n\tmod: 'input' | 'icon' = 'input';\n\n\t@ViewChild('inputElement')\n\tinputElement?: ElementRef<HTMLElement>;\n\n\tsearchTerm: string = '';\n\n\treadonly query$: BehaviorSubject<string> = new BehaviorSubject<string>('');\n\treadonly search$: StatedObservable<NgDocSearchResult[]>;\n\n\tconstructor(\n\t\tprivate readonly elementRef: ElementRef<HTMLElement>,\n\t\tprivate readonly changeDetectorRef: ChangeDetectorRef,\n\t\t@Optional()\n\t\tprivate readonly searchEngine?: NgDocSearchEngine,\n\t) {\n\t\tif (!this.searchEngine) {\n\t\t\tthrow new Error(`NgDoc: Search engine is not provided,\n\t\t\tplease check this article: https://ng-doc.com/getting-started/installation#importing-global-modules\n\t\t\tto learn how to provide it.`);\n\t\t}\n\n\t\tthis.search$ = this.query$.pipe(\n\t\t\tskip(1),\n\t\t\tswitchMap((term: string) => this.searchEngine?.search(term).pipe(observableState()) ?? NEVER),\n\t\t\tuntilDestroyed(this),\n\t\t);\n\t}\n\n\tget listHostOrigin(): ElementRef<HTMLElement> {\n\t\treturn this.inputElement ?? this.elementRef;\n\t}\n\n\tgetPositions<T extends NgDocSearchResult, K extends keyof T['positions']>(key: K, item: T): NgDocHighlightPosition[] {\n\t\treturn item.positions[key] ?? [];\n\t}\n}\n","<ng-container *ngDocLet=\"search$ | async as state\">\n\t<ng-container *ngIf=\"mod === 'icon'; else searchInput\">\n\t\t<button ng-doc-button-icon size=\"large\" (click)=\"inputDropdown.toggle()\" ngDocDropdownOrigin>\n\t\t\t<ng-doc-icon icon=\"search\" [size]=\"24\"></ng-doc-icon>\n\n\t\t\t<ng-doc-dropdown\n\t\t\t\t[content]=\"dropdownContent\"\n\t\t\t\tpanelClass=\"ng-doc-search-dropdown\"\n\t\t\t\twidth=\"100%\"\n\t\t\t\theight=\"80vh\"\n\t\t\t\t#inputDropdown\n\t\t\t>\n\t\t\t\t<ng-template #dropdownContent>\n\t\t\t\t\t<div class=\"ng-doc-search-wrapper\">\n\t\t\t\t\t\t<ng-doc-input-wrapper [leftContent]=\"leftContent\" ngDocDropdownOrigin>\n\t\t\t\t\t\t\t<ng-template #leftContent>\n\t\t\t\t\t\t\t\t<ng-doc-icon icon=\"search\"></ng-doc-icon>\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tngDocInputString\n\t\t\t\t\t\t\t\t[(ngModel)]=\"searchTerm\"\n\t\t\t\t\t\t\t\t(ngModelChange)=\"query$.next($event)\"\n\t\t\t\t\t\t\t\tplaceholder=\"Search...\"\n\t\t\t\t\t\t\t\tngDocAutofocus\n\t\t\t\t\t\t\t\t[selectAll]=\"true\"\n\t\t\t\t\t\t\t\t#inputElement\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ng-doc-input-wrapper>\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"searchResults\"></ng-container>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-template>\n\t\t\t</ng-doc-dropdown>\n\t\t</button>\n\t</ng-container>\n\n\t<ng-template #searchInput>\n\t\t<ng-doc-input-wrapper\n\t\t\t[leftContent]=\"leftContent\"\n\t\t\t[rightContent]=\"rightContent\"\n\t\t\tngDocDropdownOrigin\n\t\t\tngDocFocusCatcher\n\t\t\t(focusEvent)=\"inputElement.value ? dropdown.open() : null\"\n\t\t\t(click)=\"inputElement.value ? dropdown.open() : null\"\n\t\t\t#input\n\t\t>\n\t\t\t<ng-template #leftContent>\n\t\t\t\t<ng-doc-icon icon=\"search\"></ng-doc-icon>\n\t\t\t</ng-template>\n\t\t\t<input\n\t\t\t\tngDocInputString\n\t\t\t\t[(ngModel)]=\"searchTerm\"\n\t\t\t\t(ngModelChange)=\"query$.next($event); dropdown.open()\"\n\t\t\t\tplaceholder=\"Search...\"\n\t\t\t\t[ngDocHotkey]=\"{ctrlKey: false, altKey: false, shiftKey: false, code: 'Slash'}\"\n\t\t\t\t(ngDocHotkey)=\"inputElement.focus(); inputElement.select()\"\n\t\t\t\t#inputElement\n\t\t\t/>\n\t\t\t<ng-template #rightContent>\n\t\t\t\t<ng-doc-tag class=\"search-hotkey\">/</ng-doc-tag>\n\t\t\t</ng-template>\n\t\t\t<ng-doc-dropdown\n\t\t\t\t[content]=\"searchResults\"\n\t\t\t\tpositions=\"bottom-right\"\n\t\t\t\t[width]=\"input.elementRef.nativeElement.offsetWidth\"\n\t\t\t\tmaxHeight=\"calc(95vh - var(--ng-doc-navbar-height)\"\n\t\t\t\t#dropdown\n\t\t\t>\n\t\t\t\t<\n\t\t\t</ng-doc-dropdown>\n\t\t</ng-doc-input-wrapper>\n\t</ng-template>\n\n\t<ng-template #searchResults>\n\t\t<div class=\"ng-doc-search-result-content\" [attr.data-ng-doc-mod]=\"mod\">\n\t\t\t<ng-doc-data-list [items]=\"state?.result ?? []\" [itemContent]=\"itemContent\" [emptyContent]=\"emptyContent\">\n\t\t\t\t<ng-template let-item #itemContent>\n\t\t\t\t\t<a class=\"ng-doc-search-option\" [routerLink]=\"item.index.route\" [fragment]=\"item.index.fragment\">\n\t\t\t\t\t\t<div class=\"ng-doc-search-option-header\">\n\t\t\t\t\t\t\t<ng-doc-tag size=\"small\" [attr.data-ng-doc-page-type]=\"item.index.pageType\">\n\t\t\t\t\t\t\t\t{{ item.index.pageType }}\n\t\t\t\t\t\t\t</ng-doc-tag>\n\t\t\t\t\t\t\t<span class=\"ng-doc-search-option-breadcrumbs\" ng-doc-text>\n\t\t\t\t\t\t\t\t<ng-container *ngFor=\"let breadcrum of item.index.breadcrumbs; let i = index\">\n\t\t\t\t\t\t\t\t\t<span>{{ breadcrum }}</span>\n\t\t\t\t\t\t\t\t\t<span class=\"ng-doc-search-option-breadcrumb-divider\" *ngIf=\"i !== item.index.breadcrumbs.length - 1\"\n\t\t\t\t\t\t\t\t\t\t>/</span\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<h5\n\t\t\t\t\t\t\tclass=\"ng-doc-search-section-title\"\n\t\t\t\t\t\t\tng-doc-text\n\t\t\t\t\t\t\t[innerHTML]=\"\n\t\t\t\t\t\t\t\t(item.index.section\n\t\t\t\t\t\t\t\t\t| ngDocHighlighterPipe: (getPositions | ngDocRun: 'section':item)\n\t\t\t\t\t\t\t\t\t| ngDocSanitizeHtml) || item.index.title\n\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t></h5>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t*ngIf=\"item.index.content\"\n\t\t\t\t\t\t\tclass=\"ng-doc-search-content\"\n\t\t\t\t\t\t\t[innerHTML]=\"\n\t\t\t\t\t\t\t\titem.index.content | ngDocHighlighterPipe: (getPositions | ngDocRun: 'content':item) | ngDocSanitizeHtml\n\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\tng-doc-text\n\t\t\t\t\t\t></div>\n\t\t\t\t\t</a>\n\t\t\t\t</ng-template>\n\t\t\t\t<ng-template #emptyContent>\n\t\t\t\t\t<ng-container *ngIf=\"!state?.pending\">\n\t\t\t\t\t\t<div class=\"ng-doc-search-empty\">\n\t\t\t\t\t\t\t<ng-container *ngIf=\"query$.value.length\">Nothing found</ng-container>\n\t\t\t\t\t\t\t<ng-container *ngIf=\"!query$.value.length\">Please enter your search query</ng-container>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</ng-container>\n\t\t\t\t\t<ng-container *ngIf=\"state?.pending\">\n\t\t\t\t\t\t<div class=\"ng-doc-search-progress\">\n\t\t\t\t\t\t\t<ng-doc-spinner size=\"small\"></ng-doc-spinner>\n\t\t\t\t\t\t\tSearching...\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</ng-container>\n\t\t\t\t</ng-template>\n\t\t\t</ng-doc-data-list>\n\t\t</div>\n\t</ng-template>\n</ng-container>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {RouterModule} from '@angular/router';\nimport {NgDocSanitizeHtmlModule} from '@ng-doc/app/pipes';\nimport {\n\tNgDocAutofocusModule,\n\tNgDocBindModule,\n\tNgDocButtonIconModule,\n\tNgDocDataListModule,\n\tNgDocDropdownModule,\n\tNgDocDropdownOriginModule,\n\tNgDocFocusCatcherModule,\n\tNgDocHighlighterModule,\n\tNgDocHotkeyModule,\n\tNgDocIconModule,\n\tNgDocInputStringModule,\n\tNgDocInputWrapperModule,\n\tNgDocLetModule,\n\tNgDocRunModule,\n\tNgDocSpinnerModule,\n\tNgDocTagModule,\n\tNgDocTextModule,\n} from '@ng-doc/ui-kit';\n\nimport {NgDocSearchComponent} from './search.component';\n\n@NgModule({\n\tdeclarations: [NgDocSearchComponent],\n\timports: [\n\t\tCommonModule,\n\t\tFormsModule,\n\t\tRouterModule,\n\t\tNgDocInputWrapperModule,\n\t\tNgDocInputStringModule,\n\t\tNgDocDropdownModule,\n\t\tNgDocDropdownOriginModule,\n\t\tNgDocFocusCatcherModule,\n\t\tNgDocIconModule,\n\t\tNgDocButtonIconModule,\n\t\tNgDocAutofocusModule,\n\t\tNgDocTagModule,\n\t\tNgDocHotkeyModule,\n\t\tNgDocDataListModule,\n\t\tNgDocHighlighterModule,\n\t\tNgDocTextModule,\n\t\tNgDocLetModule,\n\t\tNgDocRunModule,\n\t\tNgDocBindModule,\n\t\tNgDocSanitizeHtmlModule,\n\t\tNgDocSpinnerModule,\n\t],\n\texports: [NgDocSearchComponent],\n})\nexport class NgDocSearchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgCa,IAAA,oBAAoB,GAbjC,sBAAA,GAAA,MAaa,oBAAoB,CAAA;AAahC,IAAA,WAAA,CACkB,UAAmC,EACnC,iBAAoC,EAEpC,YAAgC,EAAA;QAHhC,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QACnC,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAmB;QAEpC,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAoB;QAdlD,IAAG,CAAA,GAAA,GAAqB,OAAO,CAAC;QAKhC,IAAU,CAAA,UAAA,GAAW,EAAE,CAAC;AAEf,QAAA,IAAA,CAAA,MAAM,GAA4B,I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Y,EAAE,CAAC,oBAAoB,CAAC;AACpC,oBAAA,OAAO,EAAE;wBACR,YAAY;wBACZ,WAAW;wBACX,YAAY;wBACZ,uBAAuB;wBACvB,sBAAsB;wBACtB,mBAAmB;wBACnB,yBAAyB;wBACzB,uBAAuB;wBACvB,eAAe;wBACf,qBAAqB;wBACrB,oBAAoB;wBACpB,cAAc;wBACd,iBAAiB;wBACjB,mBAAmB;wBACnB,sBAAsB;wBACtB,eAAe;wBACf,cAAc;wBACd,cAAc;wBACd,eAAe;wBACf,uBAAuB;wBACvB,kBAAkB;AAClB,qBAAA;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAC/B,iBAAA,CAAA;;;ACrDD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-doc-app-components-search.mjs","sources":["../../../../libs/app/components/search/search.component.ts","../../../../libs/app/components/search/search.component.html","../../../../libs/app/components/search/search.module.ts","../../../../libs/app/components/search/ng-doc-app-components-search.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, ElementRef, HostBinding, Input, Optional, ViewChild} from '@angular/core';\nimport {NgDocSearchEngine} from '@ng-doc/app/classes/search-engine';\nimport {NgDocSearchResult} from '@ng-doc/app/interfaces';\nimport {NgDocHighlightPosition, observableState, StatedObservable} from '@ng-doc/ui-kit';\nimport {NgDocListHost} from '@ng-doc/ui-kit/classes';\nimport {UntilDestroy, untilDestroyed} from '@ngneat/until-destroy';\nimport {BehaviorSubject, NEVER} from 'rxjs';\nimport {skip, switchMap} from 'rxjs/operators';\n\n@Component({\n\tselector: 'ng-doc-search',\n\ttemplateUrl: './search.component.html',\n\tstyleUrls: ['./search.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NgDocListHost,\n\t\t\tuseExisting: NgDocSearchComponent,\n\t\t},\n\t],\n})\n@UntilDestroy()\nexport class NgDocSearchComponent implements NgDocListHost {\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-mod')\n\tmod: 'input' | 'icon' = 'input';\n\n\t@ViewChild('inputElement')\n\tinputElement?: ElementRef<HTMLElement>;\n\n\tsearchTerm: string = '';\n\n\treadonly query$: BehaviorSubject<string> = new BehaviorSubject<string>('');\n\treadonly search$: StatedObservable<NgDocSearchResult[]>;\n\n\tconstructor(\n\t\tprivate readonly elementRef: ElementRef<HTMLElement>,\n\t\t@Optional()\n\t\tprivate readonly searchEngine?: NgDocSearchEngine,\n\t) {\n\t\tif (!this.searchEngine) {\n\t\t\tthrow new Error(`NgDoc: Search engine is not provided,\n\t\t\tplease check this article: https://ng-doc.com/getting-started/installation#importing-global-modules\n\t\t\tto learn how to provide it.`);\n\t\t}\n\n\t\tthis.search$ = this.query$.pipe(\n\t\t\tskip(1),\n\t\t\tswitchMap((term: string) => this.searchEngine?.search(term).pipe(observableState()) ?? NEVER),\n\t\t\tuntilDestroyed(this),\n\t\t);\n\t}\n\n\tget listHostOrigin(): ElementRef<HTMLElement> {\n\t\treturn this.inputElement ?? this.elementRef;\n\t}\n\n\tgetPositions<T extends NgDocSearchResult, K extends keyof T['positions']>(key: K, item: T): NgDocHighlightPosition[] {\n\t\treturn item.positions[key] ?? [];\n\t}\n}\n","<ng-container *ngDocLet=\"search$ | async as state\">\n\t<ng-container *ngIf=\"mod === 'icon'; else searchInput\">\n\t\t<button ng-doc-button-icon size=\"large\" (click)=\"inputDropdown.toggle()\" ngDocDropdownOrigin>\n\t\t\t<ng-doc-icon icon=\"search\" [size]=\"24\"></ng-doc-icon>\n\n\t\t\t<ng-doc-dropdown\n\t\t\t\t[content]=\"dropdownContent\"\n\t\t\t\tpanelClass=\"ng-doc-search-dropdown\"\n\t\t\t\twidth=\"100%\"\n\t\t\t\theight=\"80vh\"\n\t\t\t\t#inputDropdown\n\t\t\t>\n\t\t\t\t<ng-template #dropdownContent>\n\t\t\t\t\t<div class=\"ng-doc-search-wrapper\">\n\t\t\t\t\t\t<ng-doc-input-wrapper [leftContent]=\"leftContent\" ngDocDropdownOrigin>\n\t\t\t\t\t\t\t<ng-template #leftContent>\n\t\t\t\t\t\t\t\t<ng-doc-icon icon=\"search\"></ng-doc-icon>\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tngDocInputString\n\t\t\t\t\t\t\t\t[(ngModel)]=\"searchTerm\"\n\t\t\t\t\t\t\t\t(ngModelChange)=\"query$.next($event)\"\n\t\t\t\t\t\t\t\tplaceholder=\"Search...\"\n\t\t\t\t\t\t\t\tngDocAutofocus\n\t\t\t\t\t\t\t\t[selectAll]=\"true\"\n\t\t\t\t\t\t\t\t#inputElement\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ng-doc-input-wrapper>\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"searchResults\"></ng-container>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-template>\n\t\t\t</ng-doc-dropdown>\n\t\t</button>\n\t</ng-container>\n\n\t<ng-template #searchInput>\n\t\t<ng-doc-input-wrapper\n\t\t\t[leftContent]=\"leftContent\"\n\t\t\t[rightContent]=\"rightContent\"\n\t\t\tngDocDropdownOrigin\n\t\t\tngDocFocusCatcher\n\t\t\t(focusEvent)=\"inputElement.value ? dropdown.open() : null\"\n\t\t\t(click)=\"inputElement.value ? dropdown.open() : null\"\n\t\t\t#input\n\t\t>\n\t\t\t<ng-template #leftContent>\n\t\t\t\t<ng-doc-icon icon=\"search\"></ng-doc-icon>\n\t\t\t</ng-template>\n\t\t\t<input\n\t\t\t\tngDocInputString\n\t\t\t\t[(ngModel)]=\"searchTerm\"\n\t\t\t\t(ngModelChange)=\"query$.next($event); dropdown.open()\"\n\t\t\t\tplaceholder=\"Search...\"\n\t\t\t\t[ngDocHotkey]=\"{ctrlKey: false, altKey: false, shiftKey: false, code: 'Slash'}\"\n\t\t\t\t(ngDocHotkey)=\"inputElement.focus(); inputElement.select()\"\n\t\t\t\t#inputElement\n\t\t\t/>\n\t\t\t<ng-template #rightContent>\n\t\t\t\t<ng-doc-tag class=\"search-hotkey\">/</ng-doc-tag>\n\t\t\t</ng-template>\n\t\t\t<ng-doc-dropdown\n\t\t\t\t[content]=\"searchResults\"\n\t\t\t\tpositions=\"bottom-right\"\n\t\t\t\t[width]=\"input.elementRef.nativeElement.offsetWidth\"\n\t\t\t\tmaxHeight=\"calc(95vh - var(--ng-doc-navbar-height)\"\n\t\t\t\t#dropdown\n\t\t\t>\n\t\t\t\t<\n\t\t\t</ng-doc-dropdown>\n\t\t</ng-doc-input-wrapper>\n\t</ng-template>\n\n\t<ng-template #searchResults>\n\t\t<div class=\"ng-doc-search-result-content\" [attr.data-ng-doc-mod]=\"mod\">\n\t\t\t<ng-doc-data-list [items]=\"state?.result ?? []\" [itemContent]=\"itemContent\" [emptyContent]=\"emptyContent\">\n\t\t\t\t<ng-template let-item #itemContent>\n\t\t\t\t\t<a class=\"ng-doc-search-option\" [routerLink]=\"item.index.route\" [fragment]=\"item.index.fragment\">\n\t\t\t\t\t\t<div class=\"ng-doc-search-option-header\">\n\t\t\t\t\t\t\t<ng-doc-tag size=\"small\" [attr.data-ng-doc-page-type]=\"item.index.pageType\">\n\t\t\t\t\t\t\t\t{{ item.index.pageType }}\n\t\t\t\t\t\t\t</ng-doc-tag>\n\t\t\t\t\t\t\t<span class=\"ng-doc-search-option-breadcrumbs\" ng-doc-text>\n\t\t\t\t\t\t\t\t<ng-container *ngFor=\"let breadcrum of item.index.breadcrumbs; let i = index\">\n\t\t\t\t\t\t\t\t\t<span>{{ breadcrum }}</span>\n\t\t\t\t\t\t\t\t\t<span class=\"ng-doc-search-option-breadcrumb-divider\" *ngIf=\"i !== item.index.breadcrumbs.length - 1\"\n\t\t\t\t\t\t\t\t\t\t>/</span\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<h5\n\t\t\t\t\t\t\tclass=\"ng-doc-search-section-title\"\n\t\t\t\t\t\t\tng-doc-text\n\t\t\t\t\t\t\t[innerHTML]=\"\n\t\t\t\t\t\t\t\t(item.index.section\n\t\t\t\t\t\t\t\t\t| ngDocHighlighterPipe: (getPositions | ngDocRun: 'section':item)\n\t\t\t\t\t\t\t\t\t| ngDocSanitizeHtml) || item.index.title\n\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t></h5>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t*ngIf=\"item.index.content\"\n\t\t\t\t\t\t\tclass=\"ng-doc-search-content\"\n\t\t\t\t\t\t\t[innerHTML]=\"\n\t\t\t\t\t\t\t\titem.index.content | ngDocHighlighterPipe: (getPositions | ngDocRun: 'content':item) | ngDocSanitizeHtml\n\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\tng-doc-text\n\t\t\t\t\t\t></div>\n\t\t\t\t\t</a>\n\t\t\t\t</ng-template>\n\t\t\t\t<ng-template #emptyContent>\n\t\t\t\t\t<ng-container *ngIf=\"!state?.pending\">\n\t\t\t\t\t\t<div class=\"ng-doc-search-empty\">\n\t\t\t\t\t\t\t<ng-container *ngIf=\"query$.value.length\">Nothing found</ng-container>\n\t\t\t\t\t\t\t<ng-container *ngIf=\"!query$.value.length\">Please enter your search query</ng-container>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</ng-container>\n\t\t\t\t\t<ng-container *ngIf=\"state?.pending\">\n\t\t\t\t\t\t<div class=\"ng-doc-search-progress\">\n\t\t\t\t\t\t\t<ng-doc-spinner size=\"small\"></ng-doc-spinner>\n\t\t\t\t\t\t\tSearching...\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</ng-container>\n\t\t\t\t</ng-template>\n\t\t\t</ng-doc-data-list>\n\t\t</div>\n\t</ng-template>\n</ng-container>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {RouterModule} from '@angular/router';\nimport {NgDocSanitizeHtmlModule} from '@ng-doc/app/pipes';\nimport {\n\tNgDocAutofocusModule,\n\tNgDocBindModule,\n\tNgDocButtonIconModule,\n\tNgDocDataListModule,\n\tNgDocDropdownModule,\n\tNgDocDropdownOriginModule,\n\tNgDocFocusCatcherModule,\n\tNgDocHighlighterModule,\n\tNgDocHotkeyModule,\n\tNgDocIconModule,\n\tNgDocInputStringModule,\n\tNgDocInputWrapperModule,\n\tNgDocLetModule,\n\tNgDocRunModule,\n\tNgDocSpinnerModule,\n\tNgDocTagModule,\n\tNgDocTextModule,\n} from '@ng-doc/ui-kit';\n\nimport {NgDocSearchComponent} from './search.component';\n\n@NgModule({\n\tdeclarations: [NgDocSearchComponent],\n\timports: [\n\t\tCommonModule,\n\t\tFormsModule,\n\t\tRouterModule,\n\t\tNgDocInputWrapperModule,\n\t\tNgDocInputStringModule,\n\t\tNgDocDropdownModule,\n\t\tNgDocDropdownOriginModule,\n\t\tNgDocFocusCatcherModule,\n\t\tNgDocIconModule,\n\t\tNgDocButtonIconModule,\n\t\tNgDocAutofocusModule,\n\t\tNgDocTagModule,\n\t\tNgDocHotkeyModule,\n\t\tNgDocDataListModule,\n\t\tNgDocHighlighterModule,\n\t\tNgDocTextModule,\n\t\tNgDocLetModule,\n\t\tNgDocRunModule,\n\t\tNgDocBindModule,\n\t\tNgDocSanitizeHtmlModule,\n\t\tNgDocSpinnerModule,\n\t],\n\texports: [NgDocSearchComponent],\n})\nexport class NgDocSearchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBa,IAAA,oBAAoB,GAbjC,sBAAA,GAAA,MAaa,oBAAoB,CAAA;IAahC,WACkB,CAAA,UAAmC,EAEnC,YAAgC,EAAA;QAFhC,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QAEnC,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAoB;QAblD,IAAG,CAAA,GAAA,GAAqB,OAAO,CAAC;QAKhC,IAAU,CAAA,UAAA,GAAW,EA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BAAoB,CAAC;AACpC,oBAAA,OAAO,EAAE;wBACR,YAAY;wBACZ,WAAW;wBACX,YAAY;wBACZ,uBAAuB;wBACvB,sBAAsB;wBACtB,mBAAmB;wBACnB,yBAAyB;wBACzB,uBAAuB;wBACvB,eAAe;wBACf,qBAAqB;wBACrB,oBAAoB;wBACpB,cAAc;wBACd,iBAAiB;wBACjB,mBAAmB;wBACnB,sBAAsB;wBACtB,eAAe;wBACf,cAAc;wBACd,cAAc;wBACd,eAAe;wBACf,uBAAuB;wBACvB,kBAAkB;AAClB,qBAAA;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAC/B,iBAAA,CAAA;;;ACrDD;;AAEG;;;;"}
|
|
@@ -11,11 +11,7 @@ import { NgDocTooltipModule, NgDocButtonIconModule, NgDocIconModule } from '@ng-
|
|
|
11
11
|
class NgDocThemeToggleComponent {
|
|
12
12
|
constructor(themeService) {
|
|
13
13
|
this.themeService = themeService;
|
|
14
|
-
this.themes = [
|
|
15
|
-
NG_DOC_NIGHT_THEME,
|
|
16
|
-
NG_DOC_DARK_PURPLE_THEME,
|
|
17
|
-
undefined,
|
|
18
|
-
];
|
|
14
|
+
this.themes = [NG_DOC_NIGHT_THEME, NG_DOC_DARK_PURPLE_THEME, undefined];
|
|
19
15
|
}
|
|
20
16
|
get nextTheme() {
|
|
21
17
|
return this.themes[(this.themes.indexOf(this.themeService.currentTheme) + 1) % this.themes.length];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-components-theme-toggle.mjs","sources":["../../../../libs/app/components/theme-toggle/theme-toggle.component.ts","../../../../libs/app/components/theme-toggle/theme-toggle.component.html","../../../../libs/app/components/theme-toggle/theme-toggle.module.ts","../../../../libs/app/components/theme-toggle/ng-doc-app-components-theme-toggle.ts"],"sourcesContent":["import {animate, style, transition, trigger} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component} from '@angular/core';\nimport {NG_DOC_DARK_PURPLE_THEME, NG_DOC_NIGHT_THEME} from '@ng-doc/app/constants';\nimport {NgDocTheme} from '@ng-doc/app/interfaces';\nimport {NgDocThemeService} from '@ng-doc/app/services';\n\n@Component({\n\tanimations: [\n\t\ttrigger('switchIcon', [\n\t\t\ttransition(\n\t\t\t\t':enter',\n\t\t\t\t[\n\t\t\t\t\tstyle({transform: 'translateX({{from}})', position: 'absolute', opacity: 0}),\n\t\t\t\t\tanimate(\n\t\t\t\t\t\t'225ms cubic-bezier(0.4,0.0,0.2,1)',\n\t\t\t\t\t\tstyle({transform: 'translateX(0%)', position: 'absolute', opacity: 1}),\n\t\t\t\t\t),\n\t\t\t\t],\n\t\t\t\t{params: {from: '-100%'}},\n\t\t\t),\n\t\t\ttransition(\n\t\t\t\t':leave',\n\t\t\t\t[\n\t\t\t\t\tstyle({transform: 'translateX(0%)', position: 'absolute', opacity: 1}),\n\t\t\t\t\tanimate(\n\t\t\t\t\t\t'225ms cubic-bezier(0.4,0.0,0.2,1)',\n\t\t\t\t\t\tstyle({transform: 'translateX({{to}})', position: 'absolute', opacity: 0}),\n\t\t\t\t\t),\n\t\t\t\t],\n\t\t\t\t{params: {to: '-100%'}},\n\t\t\t),\n\t\t]),\n\t],\n\tselector: 'ng-doc-theme-toggle',\n\ttemplateUrl: './theme-toggle.component.html',\n\tstyleUrls: ['./theme-toggle.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgDocThemeToggleComponent {\n\tprotected readonly themes: Array<NgDocTheme | undefined> = [
|
|
1
|
+
{"version":3,"file":"ng-doc-app-components-theme-toggle.mjs","sources":["../../../../libs/app/components/theme-toggle/theme-toggle.component.ts","../../../../libs/app/components/theme-toggle/theme-toggle.component.html","../../../../libs/app/components/theme-toggle/theme-toggle.module.ts","../../../../libs/app/components/theme-toggle/ng-doc-app-components-theme-toggle.ts"],"sourcesContent":["import {animate, style, transition, trigger} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component} from '@angular/core';\nimport {NG_DOC_DARK_PURPLE_THEME, NG_DOC_NIGHT_THEME} from '@ng-doc/app/constants';\nimport {NgDocTheme} from '@ng-doc/app/interfaces';\nimport {NgDocThemeService} from '@ng-doc/app/services';\n\n@Component({\n\tanimations: [\n\t\ttrigger('switchIcon', [\n\t\t\ttransition(\n\t\t\t\t':enter',\n\t\t\t\t[\n\t\t\t\t\tstyle({transform: 'translateX({{from}})', position: 'absolute', opacity: 0}),\n\t\t\t\t\tanimate(\n\t\t\t\t\t\t'225ms cubic-bezier(0.4,0.0,0.2,1)',\n\t\t\t\t\t\tstyle({transform: 'translateX(0%)', position: 'absolute', opacity: 1}),\n\t\t\t\t\t),\n\t\t\t\t],\n\t\t\t\t{params: {from: '-100%'}},\n\t\t\t),\n\t\t\ttransition(\n\t\t\t\t':leave',\n\t\t\t\t[\n\t\t\t\t\tstyle({transform: 'translateX(0%)', position: 'absolute', opacity: 1}),\n\t\t\t\t\tanimate(\n\t\t\t\t\t\t'225ms cubic-bezier(0.4,0.0,0.2,1)',\n\t\t\t\t\t\tstyle({transform: 'translateX({{to}})', position: 'absolute', opacity: 0}),\n\t\t\t\t\t),\n\t\t\t\t],\n\t\t\t\t{params: {to: '-100%'}},\n\t\t\t),\n\t\t]),\n\t],\n\tselector: 'ng-doc-theme-toggle',\n\ttemplateUrl: './theme-toggle.component.html',\n\tstyleUrls: ['./theme-toggle.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgDocThemeToggleComponent {\n\tprotected readonly themes: Array<NgDocTheme | undefined> = [NG_DOC_NIGHT_THEME, NG_DOC_DARK_PURPLE_THEME, undefined];\n\n\tconstructor(protected readonly themeService: NgDocThemeService) {}\n\n\tget nextTheme(): NgDocTheme | undefined {\n\t\treturn this.themes[(this.themes.indexOf(this.themeService.currentTheme) + 1) % this.themes.length];\n\t}\n\n\ttoggleTheme(): void {\n\t\tthis.themeService.set(this.nextTheme?.id);\n\t}\n}\n","<button ng-doc-button-icon size=\"large\" (click)=\"toggleTheme()\" ngDocTooltip=\"Toggle Theme\">\n\t<ng-doc-icon\n\t\t[@switchIcon]=\"{value: ':enter', params: {from: '-100%', to: '100%'}}\"\n\t\ticon=\"sun\"\n\t\t[size]=\"24\"\n\t\t*ngIf=\"!nextTheme?.id\"\n\t></ng-doc-icon>\n\t<ng-doc-icon\n\t\t[@switchIcon]=\"{value: ':enter', params: {from: '-100%', to: '100%'}}\"\n\t\ticon=\"moon\"\n\t\t[size]=\"24\"\n\t\t*ngIf=\"nextTheme?.id === themes[0]?.id\"\n\t></ng-doc-icon>\n\t<ng-doc-icon\n\t\t[@switchIcon]=\"{value: ':enter', params: {from: '-100%', to: '100%'}}\"\n\t\ticon=\"circle\"\n\t\t[size]=\"24\"\n\t\t*ngIf=\"nextTheme?.id === themes[1]?.id\"\n\t></ng-doc-icon>\n</button>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {NgDocButtonIconModule, NgDocIconModule, NgDocTooltipModule} from '@ng-doc/ui-kit';\n\nimport {NgDocThemeToggleComponent} from './theme-toggle.component';\n\n@NgModule({\n\tdeclarations: [NgDocThemeToggleComponent],\n\timports: [CommonModule, NgDocTooltipModule, NgDocButtonIconModule, NgDocIconModule],\n\texports: [NgDocThemeToggleComponent],\n})\nexport class NgDocThemeToggleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAMA,MAgCa,yBAAyB,CAAA;AAGrC,IAAA,WAAA,CAA+B,YAA+B,EAAA;QAA/B,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAmB;QAF3C,IAAM,CAAA,MAAA,GAAkC,CAAC,kBAAkB,EAAE,wBAAwB,EAAE,SAAS,CAAC,CAAC;KAEnD;AAElE,IAAA,IAAI,SAAS,GAAA;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,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YAAY,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGtE,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBALlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,YAAY,EAAE,CAAC,yBAAyB,CAAC;oBACzC,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,eAAe,CAAC;oBACnF,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACpC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { ElementRef, Renderer2,
|
|
3
|
+
import { ElementRef, Renderer2, Directive, Input, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/router';
|
|
5
5
|
import { NavigationEnd, Router } from '@angular/router';
|
|
6
6
|
import { asArray } from '@ng-doc/core/helpers/as-array';
|
|
@@ -9,11 +9,10 @@ import { filter, map, distinctUntilChanged } from 'rxjs/operators';
|
|
|
9
9
|
import { CommonModule } from '@angular/common';
|
|
10
10
|
|
|
11
11
|
let NgDocRouteActiveDirective = class NgDocRouteActiveDirective {
|
|
12
|
-
constructor(elementRef, router, renderer
|
|
12
|
+
constructor(elementRef, router, renderer) {
|
|
13
13
|
this.elementRef = elementRef;
|
|
14
14
|
this.router = router;
|
|
15
15
|
this.renderer = renderer;
|
|
16
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
17
16
|
this.link = '';
|
|
18
17
|
this.activeClass = [];
|
|
19
18
|
this.matchOptions = {
|
|
@@ -30,22 +29,21 @@ let NgDocRouteActiveDirective = class NgDocRouteActiveDirective {
|
|
|
30
29
|
: asArray(this.activeClass).forEach((cls) => this.renderer.removeClass(this.elementRef.nativeElement, cls));
|
|
31
30
|
});
|
|
32
31
|
}
|
|
33
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocRouteActiveDirective, deps: [{ token: i0.ElementRef }, { token: i1.Router }, { token: i0.Renderer2 }
|
|
32
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocRouteActiveDirective, deps: [{ token: i0.ElementRef }, { token: i1.Router }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
34
33
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: NgDocRouteActiveDirective, selector: "[ngDocRouteActive]", inputs: { link: ["ngDocRouteActive", "link"], activeClass: "activeClass", matchOptions: "matchOptions" }, ngImport: i0 }); }
|
|
35
34
|
};
|
|
36
35
|
NgDocRouteActiveDirective = __decorate([
|
|
37
36
|
UntilDestroy(),
|
|
38
37
|
__metadata("design:paramtypes", [ElementRef,
|
|
39
38
|
Router,
|
|
40
|
-
Renderer2
|
|
41
|
-
ChangeDetectorRef])
|
|
39
|
+
Renderer2])
|
|
42
40
|
], NgDocRouteActiveDirective);
|
|
43
41
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocRouteActiveDirective, decorators: [{
|
|
44
42
|
type: Directive,
|
|
45
43
|
args: [{
|
|
46
44
|
selector: '[ngDocRouteActive]',
|
|
47
45
|
}]
|
|
48
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Router }, { type: i0.Renderer2 }
|
|
46
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Router }, { type: i0.Renderer2 }]; }, propDecorators: { link: [{
|
|
49
47
|
type: Input,
|
|
50
48
|
args: ['ngDocRouteActive']
|
|
51
49
|
}], activeClass: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-directives-route-active.mjs","sources":["../../../../libs/app/directives/route-active/route-active.directive.ts","../../../../libs/app/directives/route-active/route-active.module.ts","../../../../libs/app/directives/route-active/ng-doc-app-directives-route-active.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"ng-doc-app-directives-route-active.mjs","sources":["../../../../libs/app/directives/route-active/route-active.directive.ts","../../../../libs/app/directives/route-active/route-active.module.ts","../../../../libs/app/directives/route-active/ng-doc-app-directives-route-active.ts"],"sourcesContent":["import {Directive, ElementRef, Input, Renderer2} from '@angular/core';\nimport {Event, IsActiveMatchOptions, NavigationEnd, Router} from '@angular/router';\nimport {asArray} from '@ng-doc/core/helpers/as-array';\nimport {UntilDestroy, untilDestroyed} from '@ngneat/until-destroy';\nimport {distinctUntilChanged, filter, map} from 'rxjs/operators';\n\n@Directive({\n\tselector: '[ngDocRouteActive]',\n})\n@UntilDestroy()\nexport class NgDocRouteActiveDirective {\n\t@Input('ngDocRouteActive')\n\tlink: string = '';\n\n\t@Input()\n\tactiveClass: string | string[] = [];\n\n\t@Input()\n\tmatchOptions: IsActiveMatchOptions = {\n\t\tfragment: 'exact',\n\t\tpaths: 'subset',\n\t\tqueryParams: 'exact',\n\t\tmatrixParams: 'exact',\n\t};\n\n\tconstructor(\n\t\tprivate readonly elementRef: ElementRef<HTMLElement>,\n\t\tprivate readonly router: Router,\n\t\tprivate readonly renderer: Renderer2,\n\t) {\n\t\tthis.router.events\n\t\t\t.pipe(\n\t\t\t\tfilter((event: Event) => event instanceof NavigationEnd),\n\t\t\t\tmap(() => this.router.isActive(this.link, this.matchOptions)),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\tuntilDestroyed(this),\n\t\t\t)\n\t\t\t.subscribe((isActive: boolean) => {\n\t\t\t\tisActive\n\t\t\t\t\t? asArray(this.activeClass).forEach((cls: string) =>\n\t\t\t\t\t\t\tthis.renderer.addClass(this.elementRef.nativeElement, cls),\n\t\t\t\t\t )\n\t\t\t\t\t: asArray(this.activeClass).forEach((cls: string) =>\n\t\t\t\t\t\t\tthis.renderer.removeClass(this.elementRef.nativeElement, cls),\n\t\t\t\t\t );\n\t\t\t});\n\t}\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\n\nimport {NgDocRouteActiveDirective} from './route-active.directive';\n\n@NgModule({\n\tdeclarations: [NgDocRouteActiveDirective],\n\timports: [CommonModule],\n\texports: [NgDocRouteActiveDirective],\n})\nexport class NgDocRouteActiveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAUa,IAAA,yBAAyB,GAJtC,MAIa,yBAAyB,CAAA;AAerC,IAAA,WAAA,CACkB,UAAmC,EACnC,MAAc,EACd,QAAmB,EAAA;QAFnB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QACnC,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACd,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;QAhBrC,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAGlB,IAAW,CAAA,WAAA,GAAsB,EAAE,CAAC;AAGpC,QAAA,IAAA,CAAA,YAAY,GAAyB;AACpC,YAAA,QAAQ,EAAE,OAAO;AACjB,YAAA,KAAK,EAAE,QAAQ;AACf,YAAA,WAAW,EAAE,OAAO;AACpB,YAAA,YAAY,EAAE,OAAO;SACrB,CAAC;QAOD,IAAI,CAAC,MAAM,CAAC,MAAM;AAChB,aAAA,IAAI,CACJ,MAAM,CAAC,CAAC,KAAY,KAAK,KAAK,YAAY,aAAa,CAAC,EACxD,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,EAC7D,oBAAoB,EAAE,EACtB,cAAc,CAAC,IAAI,CAAC,CACpB;AACA,aAAA,SAAS,CAAC,CAAC,QAAiB,KAAI;YAChC,QAAQ;AACP,kBAAE,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,OAA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ZP,MAKa,sBAAsB,CAAA;8GAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,EAJnB,YAAA,EAAA,CAAA,yBAAyB,CAC9B,EAAA,OAAA,EAAA,CAAA,YAAY,aACZ,yBAAyB,CAAA,EAAA,CAAA,CAAA,EAAA;AAEvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAHxB,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGV,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBALlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,YAAY,EAAE,CAAC,yBAAyB,CAAC;oBACzC,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACpC,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-services-sidebar.mjs","sources":["../../../../libs/app/services/sidebar/sidebar.service.ts","../../../../libs/app/services/sidebar/ng-doc-app-services-sidebar.ts"],"sourcesContent":["import {BreakpointObserver, Breakpoints} from '@angular/cdk/layout';\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\nimport {Event, NavigationEnd, Router} from '@angular/router';\nimport {NgDocScrollService} from '@ng-doc/ui-kit/services/scroll';\nimport {UntilDestroy, untilDestroyed} from '@ngneat/until-destroy';\nimport {BehaviorSubject, combineLatest, Observable
|
|
1
|
+
{"version":3,"file":"ng-doc-app-services-sidebar.mjs","sources":["../../../../libs/app/services/sidebar/sidebar.service.ts","../../../../libs/app/services/sidebar/ng-doc-app-services-sidebar.ts"],"sourcesContent":["import {BreakpointObserver, Breakpoints} from '@angular/cdk/layout';\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\nimport {Event, NavigationEnd, Router} from '@angular/router';\nimport {NgDocScrollService} from '@ng-doc/ui-kit/services/scroll';\nimport {UntilDestroy, untilDestroyed} from '@ngneat/until-destroy';\nimport {BehaviorSubject, combineLatest, Observable} from 'rxjs';\nimport {debounceTime, distinctUntilChanged, filter, pluck} from 'rxjs/operators';\n\n/**\n * Service for sidebar, it can be used to hide/show sidebar or to check if sidebar is collapsable.\n */\n@Injectable({\n\tprovidedIn: 'root',\n})\n@UntilDestroy()\nexport class NgDocSidebarService {\n\treadonly breakpoints: string[] = [Breakpoints.XSmall, Breakpoints.Small];\n\tprotected readonly observer: Observable<boolean>;\n\tprotected readonly expanded: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);\n\n\tconstructor(\n\t\t@Inject(DOCUMENT)\n\t\tprotected readonly document: Document,\n\t\tprotected readonly breakpointObserver: BreakpointObserver,\n\t\tprotected readonly router: Router,\n\t\tprotected readonly scroll: NgDocScrollService,\n\t) {\n\t\tthis.observer = this.breakpointObserver\n\t\t\t.observe(this.breakpoints)\n\t\t\t.pipe(pluck('matches'), distinctUntilChanged(), untilDestroyed(this));\n\n\t\tcombineLatest([this.router.events, this.isMobileMode()])\n\t\t\t.pipe(\n\t\t\t\tfilter(\n\t\t\t\t\t([event, isMobileMode]: [Event, boolean]) =>\n\t\t\t\t\t\tevent instanceof NavigationEnd && this.expanded.value && isMobileMode,\n\t\t\t\t),\n\t\t\t\tdebounceTime(10),\n\t\t\t)\n\t\t\t.subscribe(() => this.hide());\n\n\t\tthis.isMobileMode()\n\t\t\t.pipe(untilDestroyed(this))\n\t\t\t.subscribe((isMobileMode: boolean) => {\n\t\t\t\tif (isMobileMode) {\n\t\t\t\t\tthis.hide();\n\t\t\t\t} else {\n\t\t\t\t\tthis.show();\n\t\t\t\t\tthis.scroll.unblock();\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t/**\n\t * Indicates if sidebar is collapsable, based on the screen size.\n\t */\n\tisMobileMode(): Observable<boolean> {\n\t\treturn this.observer;\n\t}\n\n\t/**\n\t * Indicates if sidebar is visible, based on the show/hide methods.\n\t */\n\tisExpanded(): Observable<boolean> {\n\t\treturn this.expanded.asObservable();\n\t}\n\n\t/**\n\t * Show sidebar, and block scrolling.\n\t */\n\tshow(): void {\n\t\tif (!this.expanded.value) {\n\t\t\tthis.expanded.next(true);\n\t\t\tthis.scroll.block();\n\t\t}\n\t}\n\n\t/**\n\t * Hide sidebar, and unblock scrolling.\n\t */\n\thide(): void {\n\t\tif (this.expanded.value) {\n\t\t\tthis.expanded.next(false);\n\t\t\tthis.scroll.unblock();\n\t\t}\n\t}\n\n\t/**\n\t * Toggle sidebar visibility.\n\t */\n\ttoggle(): void {\n\t\tthis.expanded.value ? this.hide() : this.show();\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AASA;;AAEG;AAKU,IAAA,mBAAmB,GAJhC,MAIa,mBAAmB,CAAA;AAK/B,IAAA,WAAA,CAEoB,QAAkB,EAClB,kBAAsC,EACtC,MAAc,EACd,MAA0B,EAAA;QAH1B,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;QAClB,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAoB;QACtC,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACd,IAAM,CAAA,MAAA,GAAN,MAAM,CAAoB;QATrC,IAAW,CAAA,WAAA,GAAa,CAAC,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAEtD,QAAA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N,kBAAkB,CAAA,CAAA;AAVlC,CAAA,EAAA,mBAAmB,CA8E/B,CAAA;2FA9EY,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACX,oBAAA,UAAU,EAAE,MAAM;AAClB,iBAAA,CAAA;;0BAQE,MAAM;2BAAC,QAAQ,CAAA;;;ACtBlB;;AAEG;;;;"}
|
|
@@ -22,7 +22,7 @@ let NgDocThemeService = class NgDocThemeService {
|
|
|
22
22
|
this.theme = undefined;
|
|
23
23
|
this.theme$ = new Subject();
|
|
24
24
|
this.disableAutoTheme$ = new Subject();
|
|
25
|
-
if (defaultThemeId === 'auto') {
|
|
25
|
+
if (this.defaultThemeId === 'auto') {
|
|
26
26
|
fromEvent(window.matchMedia('(prefers-color-scheme: dark)'), 'change')
|
|
27
27
|
.pipe(takeUntil(this.disableAutoTheme$), untilDestroyed(this))
|
|
28
28
|
.subscribe((event) => this.set(event.matches ? NG_DOC_NIGHT_THEME.id : undefined, false));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-services-theme.mjs","sources":["../../../../libs/app/services/theme/theme.service.ts","../../../../libs/app/services/theme/ng-doc-app-services-theme.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, Optional} from '@angular/core';\nimport {NG_DOC_NIGHT_THEME, NG_DOC_STORE_THEME_KEY} from '@ng-doc/app/constants';\nimport {NgDocTheme} from '@ng-doc/app/interfaces';\nimport {NgDocStoreService} from '@ng-doc/app/services/store';\nimport {NG_DOC_DEFAULT_THEME_ID, NG_DOC_THEME} from '@ng-doc/app/tokens';\nimport {UntilDestroy, untilDestroyed} from '@ngneat/until-destroy';\nimport {
|
|
1
|
+
{"version":3,"file":"ng-doc-app-services-theme.mjs","sources":["../../../../libs/app/services/theme/theme.service.ts","../../../../libs/app/services/theme/ng-doc-app-services-theme.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, Optional} from '@angular/core';\nimport {NG_DOC_NIGHT_THEME, NG_DOC_STORE_THEME_KEY} from '@ng-doc/app/constants';\nimport {NgDocTheme} from '@ng-doc/app/interfaces';\nimport {NgDocStoreService} from '@ng-doc/app/services/store';\nimport {NG_DOC_DEFAULT_THEME_ID, NG_DOC_THEME} from '@ng-doc/app/tokens';\nimport {UntilDestroy, untilDestroyed} from '@ngneat/until-destroy';\nimport {fromEvent, Observable, Subject} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n/**\n * Service for managing themes.\n */\n@Injectable({\n\tprovidedIn: 'root',\n})\n@UntilDestroy()\nexport class NgDocThemeService {\n\tprivate linkElement?: HTMLLinkElement;\n\tprivate theme: NgDocTheme | undefined = undefined;\n\tprivate readonly theme$: Subject<NgDocTheme | undefined> = new Subject<NgDocTheme | undefined>();\n\tprivate readonly disableAutoTheme$: Subject<void> = new Subject<void>();\n\n\tconstructor(\n\t\t@Inject(DOCUMENT)\n\t\tprivate readonly document: Document,\n\t\t@Inject(NG_DOC_THEME)\n\t\tprivate readonly themes: NgDocTheme[],\n\t\tprivate readonly store: NgDocStoreService,\n\t\t@Inject(NG_DOC_DEFAULT_THEME_ID)\n\t\t@Optional()\n\t\tprivate readonly defaultThemeId?: string | 'auto',\n\t) {\n\t\tif (this.defaultThemeId === 'auto') {\n\t\t\tfromEvent<MediaQueryList>(window.matchMedia('(prefers-color-scheme: dark)'), 'change')\n\t\t\t\t.pipe(takeUntil(this.disableAutoTheme$), untilDestroyed(this))\n\t\t\t\t.subscribe((event: MediaQueryList) => this.set(event.matches ? NG_DOC_NIGHT_THEME.id : undefined, false))\n\t\t}\n\t}\n\n\t/**\n\t * Returns the current theme.\n\t */\n\tget currentTheme(): NgDocTheme | undefined {\n\t\treturn this.theme;\n\t}\n\n\t/**\n\t * Sets the theme by id.\n\t *\n\t * @param id Theme id.\n\t * @param save Whether to save the theme in the store to restore it when the page is reloaded. (`true` by default)\n\t */\n\tset(id?: string | 'auto', save: boolean = true): Promise<void> {\n\t\tthis.removeLink();\n\n\t\tif (id === 'auto') {\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\tsave && this.disableAutoTheme$.next();\n\n\t\tif (id !== 'day' && id) {\n\t\t\tconst theme: NgDocTheme | undefined = this.themes.find((theme: NgDocTheme) => theme.id === id);\n\n\t\t\tif (!theme) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t`Theme with id \"${id}\" is not registered. Make sure that you registered it in the root of your application.`,\n\t\t\t\t);\n\n\t\t\t\treturn Promise.resolve();\n\t\t\t}\n\n\t\t\tthis.createLinkIfNoExists();\n\n\t\t\tif (this.linkElement) {\n\t\t\t\tthis.linkElement.href = theme.path;\n\t\t\t\tsave && this.store.set(NG_DOC_STORE_THEME_KEY, theme.id);\n\t\t\t\tthis.theme = theme;\n\n\t\t\t\treturn new Promise<void>((resolve: () => void, reject: (err: Event | string) => void) => {\n\t\t\t\t\tif (this.linkElement) {\n\t\t\t\t\t\tthis.linkElement.onload = () => {\n\t\t\t\t\t\t\tthis.theme$.next(theme);\n\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t};\n\t\t\t\t\t\tthis.linkElement.onerror = reject;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tsave && this.store.set(NG_DOC_STORE_THEME_KEY, 'day');\n\n\t\tthis.theme$.next(undefined);\n\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Returns an observable that emits when the theme changes.\n\t */\n\tthemeChanges(): Observable<NgDocTheme | undefined> {\n\t\treturn this.theme$.asObservable();\n\t}\n\n\tprivate removeLink(): void {\n\t\tthis.theme = undefined;\n\t\tthis.linkElement?.remove();\n\t\tthis.linkElement = undefined;\n\t}\n\tprivate createLinkIfNoExists(): void {\n\t\tif (!this.linkElement) {\n\t\t\tthis.linkElement = this.document.createElement('link');\n\t\t\tthis.linkElement.setAttribute('rel', 'stylesheet');\n\t\t\tthis.linkElement.setAttribute('type', 'text/css');\n\t\t\tthis.document.getElementsByTagName('head')[0].appendChild(this.linkElement);\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAUA;;AAEG;AAKU,IAAA,iBAAiB,GAJ9B,MAIa,iBAAiB,CAAA;AAM7B,IAAA,WAAA,CAEkB,QAAkB,EAElB,MAAoB,EACpB,KAAwB,EAGxB,cAAgC,EAAA;QANhC,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;QAElB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAc;QACpB,IAAK,CAAA,KAAA,GAAL,KAAK,CAAmB;QAGxB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAkB;QAZ1C,IAAK,CAAA,KAAA,GAA2B,SAAS,CAAC;AACjC,QAAA,IAAA,CAAA,MAAM,GAAoC,IAAI,OAAO,EAA0B,CAAC;AAChF,QAAA,IAAA,CAAA,iBAAiB,GAAkB,IAAI,OAAO,EAAQ,CAAC;AAYvE,QAAA,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM,EAAE;YACnC,SAAS,CAAiB,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC,EAAE,QAAQ,CAAC;AACpF,iBAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC;iBAC7D,SAAS,CAAC,CAAC,KAAqB,KAAK,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,kBAAkB,CAAC,EAAE,GAAG,SAAS,EAAE,KAAK,CAAC,CAAC,CAAA;AAC1G,SAAA;KACD;AAED;;AAEG;AACH,IAAA,IAAI,YAAY,GAAA;QACf,OAAO,IAAI,CAAC,KAAK,CAAC;KAClB;AAED;;;;;AAKG;AACH,IAAA,GAAG,CAAC,EAAoB,EAAE,IAAA,GAAgB,IAAI,EAAA;QAC7C,IAAI,CAAC,UAAU,EAAE,C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AA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAZpB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAHjB,MAAM,EAAA,CAAA,CAAA,EAAA;;AAGN,iBAAiB,GAAA,UAAA,CAAA;AAD7B,IAAA,YAAY,EAAE;AASc,IAAA,UAAA,CAAA,mBAAA,EAAA,CAAA,QAAQ,SAGX,iBAAiB,EAAA,MAAA,CAAA,CAAA;AAX9B,CAAA,EAAA,iBAAiB,CAsG7B,CAAA;2FAtGY,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACX,oBAAA,UAAU,EAAE,MAAM;AAClB,iBAAA,CAAA;;0BASE,MAAM;2BAAC,QAAQ,CAAA;;0BAEf,MAAM;2BAAC,YAAY,CAAA;;0BAGnB,MAAM;2BAAC,uBAAuB,CAAA;;0BAC9B,QAAQ;;;AC9BX;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-doc/app",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=16.0.0",
|
|
6
6
|
"@angular/core": ">=16.0.0",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"tslib": "^2.3.0",
|
|
15
|
-
"@ng-doc/core": "16.0.
|
|
16
|
-
"@ng-doc/ui-kit": "16.0.
|
|
15
|
+
"@ng-doc/core": "16.0.2",
|
|
16
|
+
"@ng-doc/ui-kit": "16.0.2",
|
|
17
17
|
"@orama/plugin-match-highlight": "1.0.0-beta.7",
|
|
18
18
|
"highlight.js": "11.5.1",
|
|
19
19
|
"js-beautify": "1.14.7"
|