@ng-doc/app 17.6.16 → 18.0.0-beta.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/classes/root-page/root-page.d.ts +4 -7
- package/components/api-list/api-list.component.d.ts +13 -11
- package/components/breadcrumb/breadcrumb.component.d.ts +0 -1
- package/components/code/code.component.d.ts +2 -7
- package/components/copy-button/copy-button.component.d.ts +12 -0
- package/components/copy-button/index.d.ts +1 -0
- package/components/demo-displayer/demo-displayer.component.d.ts +0 -5
- package/components/heading-anchor/heading-anchor.component.d.ts +9 -0
- package/components/heading-anchor/index.d.ts +1 -0
- package/components/image-viewer/image-viewer.component.d.ts +16 -0
- package/components/image-viewer/index.d.ts +1 -0
- package/components/index.d.ts +7 -0
- package/components/kind-icon/kind-icon.component.d.ts +2 -1
- package/components/mermaid-viewer/index.d.ts +1 -0
- package/components/mermaid-viewer/mermaid-viewer.component.d.ts +17 -0
- package/components/navbar/navbar.component.d.ts +3 -16
- package/components/page/page.component.d.ts +6 -14
- package/components/page-header/index.d.ts +1 -0
- package/components/page-header/page-header.component.d.ts +6 -0
- package/components/page-wrapper/index.d.ts +1 -0
- package/components/page-wrapper/page-wrapper.component.d.ts +22 -0
- package/components/playground/base-playground.d.ts +1 -1
- package/components/playground/playground-demo/playground-demo.component.d.ts +5 -6
- package/components/root/root.component.d.ts +4 -13
- package/components/search/search.component.d.ts +11 -17
- package/components/search-dialog/index.d.ts +1 -0
- package/components/search-dialog/search-dialog.component.d.ts +24 -0
- package/components/sidebar/sidebar-category/sidebar-category.component.d.ts +9 -10
- package/components/sidebar/sidebar-item/sidebar-item.component.d.ts +7 -2
- package/components/sidebar/sidebar.component.d.ts +5 -3
- package/components/theme-toggle/theme-toggle.component.d.ts +4 -5
- package/constants/index.d.ts +0 -1
- package/directives/code-highlighter/code-highlighter.directive.d.ts +11 -10
- package/esm2022/classes/default-search-engine/default-search-engine.mjs +10 -4
- package/esm2022/classes/root-page/root-page.mjs +1 -1
- package/esm2022/components/api-list/api-list.component.mjs +46 -64
- package/esm2022/components/breadcrumb/breadcrumb.component.mjs +7 -9
- package/esm2022/components/code/code.component.mjs +16 -19
- package/esm2022/components/copy-button/copy-button.component.mjs +61 -0
- package/esm2022/components/copy-button/index.mjs +2 -0
- package/esm2022/components/copy-button/ng-doc-app-components-copy-button.mjs +5 -0
- package/esm2022/components/demo/demo.component.mjs +5 -5
- package/esm2022/components/demo-displayer/demo-displayer.component.mjs +9 -14
- package/esm2022/components/demo-pane/demo-pane.component.mjs +5 -5
- package/esm2022/components/fullscreen-button/fullscreen-button.component.mjs +3 -3
- package/esm2022/components/heading-anchor/heading-anchor.component.mjs +38 -0
- package/esm2022/components/heading-anchor/index.mjs +2 -0
- package/esm2022/components/heading-anchor/ng-doc-app-components-heading-anchor.mjs +5 -0
- package/esm2022/components/image-viewer/image-viewer.component.mjs +80 -0
- package/esm2022/components/image-viewer/index.mjs +2 -0
- package/esm2022/components/image-viewer/ng-doc-app-components-image-viewer.mjs +5 -0
- package/esm2022/components/index.mjs +8 -1
- package/esm2022/components/kind-icon/kind-icon.component.mjs +11 -5
- package/esm2022/components/link/link.component.mjs +3 -3
- package/esm2022/components/mermaid-viewer/index.mjs +2 -0
- package/esm2022/components/mermaid-viewer/mermaid-viewer.component.mjs +55 -0
- package/esm2022/components/mermaid-viewer/ng-doc-app-components-mermaid-viewer.mjs +5 -0
- package/esm2022/components/navbar/navbar.component.mjs +12 -32
- package/esm2022/components/page/page.component.mjs +20 -72
- package/esm2022/components/page-header/index.mjs +2 -0
- package/esm2022/components/page-header/ng-doc-app-components-page-header.mjs +5 -0
- package/esm2022/components/page-header/page-header.component.mjs +19 -0
- package/esm2022/components/page-link/page-link.component.mjs +5 -5
- package/esm2022/components/page-navigation/page-navigation.component.mjs +5 -5
- package/esm2022/components/page-wrapper/index.mjs +2 -0
- package/esm2022/components/page-wrapper/ng-doc-app-components-page-wrapper.mjs +5 -0
- package/esm2022/components/page-wrapper/page-wrapper.component.mjs +87 -0
- package/esm2022/components/playground/base-playground.mjs +8 -8
- package/esm2022/components/playground/playground-demo/playground-demo.component.mjs +22 -21
- package/esm2022/components/playground/playground-properties/playground-properties.component.mjs +8 -6
- package/esm2022/components/playground/playground-property/playground-property.component.mjs +4 -4
- package/esm2022/components/playground/playground.component.mjs +6 -6
- package/esm2022/components/root/root.component.mjs +20 -37
- package/esm2022/components/search/search.component.mjs +31 -49
- package/esm2022/components/search-dialog/index.mjs +2 -0
- package/esm2022/components/search-dialog/ng-doc-app-components-search-dialog.mjs +5 -0
- package/esm2022/components/search-dialog/search-dialog.component.mjs +74 -0
- package/esm2022/components/search-result/search-result.component.mjs +4 -4
- package/esm2022/components/sidebar/sidebar-category/sidebar-category.component.mjs +22 -27
- package/esm2022/components/sidebar/sidebar-item/sidebar-item.component.mjs +18 -10
- package/esm2022/components/sidebar/sidebar.component.mjs +14 -13
- package/esm2022/components/tabs/tabs.component.mjs +4 -4
- package/esm2022/components/theme-toggle/theme-toggle.component.mjs +18 -53
- package/esm2022/components/toc/toc-element/toc-element.component.mjs +5 -5
- package/esm2022/components/toc/toc.component.mjs +37 -35
- package/esm2022/constants/index.mjs +1 -2
- package/esm2022/defaults/default-processors/default-processors.mjs +7 -4
- package/esm2022/directives/code-highlighter/code-highlighter.directive.mjs +18 -36
- package/esm2022/directives/route-active/route-active.directive.mjs +3 -3
- package/esm2022/helpers/as-boolean.mjs +1 -1
- package/esm2022/helpers/create-component.mjs +1 -1
- package/esm2022/helpers/generate-toc.mjs +5 -5
- package/esm2022/interfaces/navigation.mjs +1 -1
- package/esm2022/interfaces/processor-options.mjs +1 -1
- package/esm2022/interfaces/toc-item.mjs +1 -1
- package/esm2022/interfaces/type-control.mjs +1 -1
- package/esm2022/pipes/decode-uri-component/decode-uri-component.pipe.mjs +4 -4
- package/esm2022/pipes/extract-value/extract-value.pipe.mjs +3 -3
- package/esm2022/pipes/filter-by-text/filter-by-text.pipe.mjs +3 -3
- package/esm2022/pipes/sanitize-html/sanitize-html.pipe.mjs +3 -3
- package/esm2022/processors/page-processor/index.mjs +2 -2
- package/esm2022/processors/page-processor/page-processor.component.mjs +74 -0
- package/esm2022/processors/processors/blockquote.processor.mjs +2 -1
- package/esm2022/processors/processors/code.processor.mjs +3 -5
- package/esm2022/processors/processors/demo.processor.mjs +2 -2
- package/esm2022/processors/processors/heading-anchor.processor.mjs +12 -0
- package/esm2022/processors/processors/image.processor.mjs +19 -0
- package/esm2022/processors/processors/index.mjs +6 -3
- package/esm2022/processors/processors/link/index.mjs +2 -0
- package/esm2022/processors/processors/link/link.processor.mjs +13 -0
- package/esm2022/processors/processors/link/ng-doc-app-processors-processors-link.mjs +5 -0
- package/esm2022/processors/processors/mermaid.processor.mjs +11 -0
- package/esm2022/processors/processors/playground.processor.mjs +2 -2
- package/esm2022/processors/processors/tooltip/index.mjs +2 -0
- package/esm2022/processors/processors/tooltip/ng-doc-app-processors-processors-tooltip.mjs +5 -0
- package/esm2022/processors/processors/tooltip/tooltip.processor.mjs +56 -0
- package/esm2022/providers/index.mjs +2 -1
- package/esm2022/providers/mermaid/index.mjs +2 -0
- package/esm2022/providers/mermaid/ng-doc-app-providers-mermaid.mjs +5 -0
- package/esm2022/providers/mermaid/provide-mermaid.mjs +16 -0
- package/esm2022/providers/ng-doc-app/provide-ng-doc-app.mjs +12 -35
- package/esm2022/providers/playground-demo/provide-playground-demo.mjs +1 -1
- package/esm2022/providers/search-engine/provide-search-engine.mjs +2 -2
- package/esm2022/providers/type-control/provide-type-control.mjs +1 -1
- package/esm2022/services/highlighter/highlighter.service.mjs +39 -0
- package/esm2022/services/highlighter/index.mjs +2 -0
- package/esm2022/services/highlighter/ng-doc-app-services-highlighter.mjs +5 -0
- package/esm2022/services/index.mjs +2 -2
- package/esm2022/services/sidebar/sidebar.service.mjs +35 -50
- package/esm2022/services/store/store.service.mjs +3 -3
- package/esm2022/services/theme/theme.service.mjs +28 -127
- package/esm2022/tokens/index.mjs +4 -2
- package/esm2022/tokens/mermaid.mjs +3 -0
- package/esm2022/tokens/page-processor.mjs +2 -2
- package/esm2022/tokens/route-prefix.mjs +3 -0
- package/esm2022/tokens/shiki-theme.mjs +3 -0
- package/esm2022/type-controls/boolean-control/boolean-control.component.mjs +3 -3
- package/esm2022/type-controls/number-control/number-control.component.mjs +5 -5
- package/esm2022/type-controls/string-control/string-control.component.mjs +5 -5
- package/esm2022/type-controls/type-alias-control/type-alias-control.component.mjs +5 -5
- package/fesm2022/ng-doc-app-classes-default-search-engine.mjs +10 -4
- package/fesm2022/ng-doc-app-classes-default-search-engine.mjs.map +1 -1
- package/fesm2022/ng-doc-app-classes-root-page.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-api-list.mjs +47 -64
- package/fesm2022/ng-doc-app-components-api-list.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-breadcrumb.mjs +6 -8
- package/fesm2022/ng-doc-app-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-code.mjs +16 -18
- package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-copy-button.mjs +68 -0
- package/fesm2022/ng-doc-app-components-copy-button.mjs.map +1 -0
- package/fesm2022/ng-doc-app-components-demo-displayer.mjs +8 -12
- package/fesm2022/ng-doc-app-components-demo-displayer.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo-pane.mjs +4 -4
- package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo.mjs +4 -4
- package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-fullscreen-button.mjs +3 -3
- package/fesm2022/ng-doc-app-components-heading-anchor.mjs +45 -0
- package/fesm2022/ng-doc-app-components-heading-anchor.mjs.map +1 -0
- package/fesm2022/ng-doc-app-components-image-viewer.mjs +87 -0
- package/fesm2022/ng-doc-app-components-image-viewer.mjs.map +1 -0
- package/fesm2022/ng-doc-app-components-kind-icon.mjs +10 -4
- package/fesm2022/ng-doc-app-components-kind-icon.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-link.mjs +3 -3
- package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs +62 -0
- package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs.map +1 -0
- package/fesm2022/ng-doc-app-components-navbar.mjs +12 -32
- package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-header.mjs +26 -0
- package/fesm2022/ng-doc-app-components-page-header.mjs.map +1 -0
- package/fesm2022/ng-doc-app-components-page-link.mjs +4 -4
- package/fesm2022/ng-doc-app-components-page-link.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-navigation.mjs +4 -4
- package/fesm2022/ng-doc-app-components-page-navigation.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-wrapper.mjs +94 -0
- package/fesm2022/ng-doc-app-components-page-wrapper.mjs.map +1 -0
- package/fesm2022/ng-doc-app-components-page.mjs +19 -71
- package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-playground.mjs +43 -38
- package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-root.mjs +18 -35
- package/fesm2022/ng-doc-app-components-root.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-search-dialog.mjs +81 -0
- package/fesm2022/ng-doc-app-components-search-dialog.mjs.map +1 -0
- package/fesm2022/ng-doc-app-components-search-result.mjs +3 -3
- package/fesm2022/ng-doc-app-components-search-result.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-search.mjs +30 -48
- package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-sidebar.mjs +49 -44
- package/fesm2022/ng-doc-app-components-sidebar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-tabs.mjs +3 -3
- package/fesm2022/ng-doc-app-components-tabs.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-theme-toggle.mjs +17 -51
- package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-toc.mjs +40 -38
- package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components.mjs +7 -0
- package/fesm2022/ng-doc-app-components.mjs.map +1 -1
- package/fesm2022/ng-doc-app-constants.mjs +1 -37
- package/fesm2022/ng-doc-app-constants.mjs.map +1 -1
- package/fesm2022/ng-doc-app-defaults-default-processors.mjs +6 -3
- package/fesm2022/ng-doc-app-defaults-default-processors.mjs.map +1 -1
- package/fesm2022/ng-doc-app-directives-code-highlighter.mjs +17 -35
- package/fesm2022/ng-doc-app-directives-code-highlighter.mjs.map +1 -1
- package/fesm2022/ng-doc-app-directives-route-active.mjs +3 -3
- package/fesm2022/ng-doc-app-helpers.mjs +4 -4
- package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
- package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs +3 -3
- package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs.map +1 -1
- package/fesm2022/ng-doc-app-pipes-extract-value.mjs +3 -3
- package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs +3 -3
- package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs +3 -3
- package/fesm2022/ng-doc-app-processors-page-processor.mjs +20 -14
- package/fesm2022/ng-doc-app-processors-page-processor.mjs.map +1 -1
- package/fesm2022/ng-doc-app-processors-processors-link.mjs +20 -0
- package/fesm2022/ng-doc-app-processors-processors-link.mjs.map +1 -0
- package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs +63 -0
- package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs.map +1 -0
- package/fesm2022/ng-doc-app-processors-processors.mjs +45 -70
- package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers-mermaid.mjs +23 -0
- package/fesm2022/ng-doc-app-providers-mermaid.mjs.map +1 -0
- package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +11 -34
- package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers-playground-demo.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers-search-engine.mjs +1 -1
- package/fesm2022/ng-doc-app-providers-search-engine.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers-type-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers.mjs +1 -0
- package/fesm2022/ng-doc-app-providers.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-highlighter.mjs +46 -0
- package/fesm2022/ng-doc-app-services-highlighter.mjs.map +1 -0
- package/fesm2022/ng-doc-app-services-sidebar.mjs +35 -50
- package/fesm2022/ng-doc-app-services-sidebar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-store.mjs +3 -3
- package/fesm2022/ng-doc-app-services-theme.mjs +27 -126
- package/fesm2022/ng-doc-app-services-theme.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services.mjs +1 -1
- package/fesm2022/ng-doc-app-tokens.mjs +8 -4
- package/fesm2022/ng-doc-app-tokens.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs +3 -3
- package/fesm2022/ng-doc-app-type-controls-number-control.mjs +4 -4
- package/fesm2022/ng-doc-app-type-controls-number-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-string-control.mjs +4 -4
- package/fesm2022/ng-doc-app-type-controls-string-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +4 -4
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
- package/interfaces/navigation.d.ts +7 -1
- package/interfaces/processor-options.d.ts +4 -1
- package/package.json +104 -29
- package/processors/page-processor/index.d.ts +1 -1
- package/processors/page-processor/{page-processor.directive.d.ts → page-processor.component.d.ts} +7 -6
- package/processors/processors/heading-anchor.processor.d.ts +3 -0
- package/processors/processors/image.processor.d.ts +3 -0
- package/processors/processors/index.d.ts +5 -2
- package/processors/processors/link/index.d.ts +1 -0
- package/processors/processors/mermaid.processor.d.ts +3 -0
- package/processors/processors/tooltip/index.d.ts +1 -0
- package/providers/index.d.ts +1 -0
- package/providers/mermaid/index.d.ts +1 -0
- package/providers/mermaid/provide-mermaid.d.ts +7 -0
- package/providers/ng-doc-app/provide-ng-doc-app.d.ts +5 -10
- package/providers/playground-demo/provide-playground-demo.d.ts +1 -1
- package/providers/search-engine/provide-search-engine.d.ts +1 -1
- package/providers/type-control/provide-type-control.d.ts +1 -1
- package/services/highlighter/highlighter.service.d.ts +24 -0
- package/services/highlighter/index.d.ts +1 -0
- package/services/index.d.ts +1 -1
- package/services/sidebar/sidebar.service.d.ts +4 -10
- package/services/theme/theme.service.d.ts +9 -37
- package/styles/global.css +161 -132
- package/styles/main.css +150 -106
- package/styles/themes/dark.css +71 -0
- package/tokens/index.d.ts +3 -1
- package/tokens/mermaid.d.ts +3 -0
- package/tokens/page-processor.d.ts +1 -1
- package/tokens/route-prefix.d.ts +2 -0
- package/tokens/shiki-theme.d.ts +6 -0
- package/assets/themes/ng-doc-night.css +0 -111
- package/constants/themes.d.ts +0 -33
- package/esm2022/constants/themes.mjs +0 -36
- package/esm2022/processors/page-processor/page-processor.directive.mjs +0 -68
- package/esm2022/processors/processors/link.processor.mjs +0 -13
- package/esm2022/processors/processors/tooltip.processor.mjs +0 -56
- package/esm2022/tokens/api-list.mjs +0 -3
- package/tokens/api-list.d.ts +0 -3
- /package/processors/processors/{link.processor.d.ts → link/link.processor.d.ts} +0 -0
- /package/processors/processors/{tooltip.processor.d.ts → tooltip/tooltip.processor.d.ts} +0 -0
|
@@ -31,10 +31,10 @@ class NgDocSearchResultComponent {
|
|
|
31
31
|
return 'Unknown';
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.
|
|
35
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.
|
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocSearchResultComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
35
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: NgDocSearchResultComponent, isStandalone: true, selector: "ng-doc-search-result", inputs: { result: "result" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"ng-doc-search-result-wrapper\" *ngIf=\"groupedResult | keyvalue as results\">\n\t<ng-container *ngIf=\"results.length; else emptyTemplate\">\n\t\t<div class=\"ng-doc-search-result-category\" *ngFor=\"let item of results\">\n\t\t\t<h4 class=\"ng-doc-search-result-title\" ng-doc-text>{{ typeToLabel(item.key) }}</h4>\n\t\t\t<ul class=\"ng-doc-search-result-pages\">\n\t\t\t\t<li class=\"ng-doc-search-result-page\" *ngFor=\"let page of item.value\">\n\t\t\t\t\t<a class=\"ng-doc-search-result-page-link\" [routerLink]=\"[page.route]\">\n\t\t\t\t\t\t<ng-doc-kind-icon\n\t\t\t\t\t\t\t*ngIf=\"page.kind\"\n\t\t\t\t\t\t\t[kind]=\"page.kind\"\n\t\t\t\t\t\t\t[ngDocTooltip]=\"page.kind\"></ng-doc-kind-icon>\n\t\t\t\t\t\t{{ page.title }}\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t</ng-container>\n\t<ng-template #emptyTemplate>\n\t\t<div ng-doc-text color=\"muted\">Nothing was found...</div>\n\t</ng-template>\n</div>\n", styles: [":host{display:block}:host .ng-doc-search-result-wrapper{display:flex;flex-direction:row}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category:not(:last-child){margin-right:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-title{margin:0 0 calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages{list-style:none;padding:0;margin:0}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page{margin-bottom:var(--ng-doc-base-gutter)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page .ng-doc-search-result-page-link{display:flex;align-items:center;text-decoration:none;color:var(--ng-doc-text)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page .ng-doc-search-result-page-link ng-doc-kind-icon{margin-right:var(--ng-doc-base-gutter)}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: NgDocTextComponent, selector: "[ng-doc-text]", inputs: ["size", "color", "align", "absoluteContent"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: NgDocKindIconComponent, selector: "ng-doc-kind-icon", inputs: ["kind", "type", "size"] }, { kind: "directive", type: NgDocTooltipDirective, selector: "[ngDocTooltip]", inputs: ["ngDocTooltip", "delay", "displayOrigin", "pointerOrigin", "positions", "canOpen", "panelClass", "minHeight", "maxHeight", "height", "minWidth", "maxWidth", "width"], outputs: ["beforeOpen", "afterOpen", "beforeClose", "afterClose"], exportAs: ["ngDocTooltip"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
36
36
|
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocSearchResultComponent, decorators: [{
|
|
38
38
|
type: Component,
|
|
39
39
|
args: [{ selector: 'ng-doc-search-result', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
40
40
|
NgIf,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-components-search-result.mjs","sources":["../../../../libs/app/components/search-result/search-result.component.ts","../../../../libs/app/components/search-result/search-result.component.html","../../../../libs/app/components/search-result/ng-doc-app-components-search-result.ts"],"sourcesContent":["import { KeyValuePipe, NgFor, NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { NgDocKindIconComponent } from '@ng-doc/app/components/kind-icon';\nimport { NgDocPageInfo } from '@ng-doc/core/interfaces';\nimport { NgDocTextComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';\n\n@Component({\n\tselector: 'ng-doc-search-result',\n\ttemplateUrl: './search-result.component.html',\n\tstyleUrls: ['./search-result.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgIf,\n\t\tNgFor,\n\t\tNgDocTextComponent,\n\t\tRouterLink,\n\t\tNgDocKindIconComponent,\n\t\tNgDocTooltipDirective,\n\t\tKeyValuePipe,\n\t],\n})\nexport class NgDocSearchResultComponent implements OnChanges {\n\t@Input()\n\tresult: NgDocPageInfo[] | null = [];\n\n\tgroupedResult: Record<string, NgDocPageInfo[]> = {};\n\n\tngOnChanges({ result }: SimpleChanges): void {\n\t\tif (result && this.result) {\n\t\t\tthis.groupedResult = this.result.reduce(\n\t\t\t\t(grouped: Record<string, NgDocPageInfo[]>, item: NgDocPageInfo) => {\n\t\t\t\t\tif (!grouped[item.type]) {\n\t\t\t\t\t\tgrouped[item.type] = [];\n\t\t\t\t\t}\n\n\t\t\t\t\tgrouped[item.type].push(item);\n\n\t\t\t\t\treturn grouped;\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t);\n\t\t}\n\t}\n\n\ttypeToLabel(type: string): string {\n\t\tswitch (type) {\n\t\t\tcase 'api':\n\t\t\t\treturn 'API';\n\t\t\tcase 'guide':\n\t\t\t\treturn 'Guides';\n\t\t\tdefault:\n\t\t\t\treturn 'Unknown';\n\t\t}\n\t}\n}\n","<div class=\"ng-doc-search-result-wrapper\" *ngIf=\"groupedResult | keyvalue as results\">\n\t<ng-container *ngIf=\"results.length; else emptyTemplate\">\n\t\t<div class=\"ng-doc-search-result-category\" *ngFor=\"let item of results\">\n\t\t\t<h4 class=\"ng-doc-search-result-title\" ng-doc-text>{{ typeToLabel(item.key) }}</h4>\n\t\t\t<ul class=\"ng-doc-search-result-pages\">\n\t\t\t\t<li class=\"ng-doc-search-result-page\" *ngFor=\"let page of item.value\">\n\t\t\t\t\t<a class=\"ng-doc-search-result-page-link\" [routerLink]=\"[page.route]\">\n\t\t\t\t\t\t<ng-doc-kind-icon\n\t\t\t\t\t\t\t*ngIf=\"page.kind\"\n\t\t\t\t\t\t\t[kind]=\"page.kind\"\n\t\t\t\t\t\t\t[ngDocTooltip]=\"page.kind\"></ng-doc-kind-icon>\n\t\t\t\t\t\t{{ page.title }}\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t</ng-container>\n\t<ng-template #emptyTemplate>\n\t\t<div ng-doc-text color=\"muted\">Nothing was found...</div>\n\t</ng-template>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAuBa,0BAA0B,CAAA;AAhBvC,IAAA,WAAA,GAAA;QAkBC,IAAM,CAAA,MAAA,GAA2B,EAAE,CAAC;QAEpC,IAAa,CAAA,aAAA,GAAoC,EAAE,CAAC;AA6BpD,KAAA;IA3BA,WAAW,CAAC,EAAE,MAAM,EAAiB,EAAA;AACpC,QAAA,IAAI,MAAM,IAA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","sources":["../../../../libs/app/components/search-result/search-result.component.ts","../../../../libs/app/components/search-result/search-result.component.html","../../../../libs/app/components/search-result/ng-doc-app-components-search-result.ts"],"sourcesContent":["import { KeyValuePipe, NgFor, NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { NgDocKindIconComponent } from '@ng-doc/app/components/kind-icon';\nimport { NgDocPageInfo } from '@ng-doc/core/interfaces';\nimport { NgDocTextComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';\n\n@Component({\n\tselector: 'ng-doc-search-result',\n\ttemplateUrl: './search-result.component.html',\n\tstyleUrls: ['./search-result.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgIf,\n\t\tNgFor,\n\t\tNgDocTextComponent,\n\t\tRouterLink,\n\t\tNgDocKindIconComponent,\n\t\tNgDocTooltipDirective,\n\t\tKeyValuePipe,\n\t],\n})\nexport class NgDocSearchResultComponent implements OnChanges {\n\t@Input()\n\tresult: NgDocPageInfo[] | null = [];\n\n\tgroupedResult: Record<string, NgDocPageInfo[]> = {};\n\n\tngOnChanges({ result }: SimpleChanges): void {\n\t\tif (result && this.result) {\n\t\t\tthis.groupedResult = this.result.reduce(\n\t\t\t\t(grouped: Record<string, NgDocPageInfo[]>, item: NgDocPageInfo) => {\n\t\t\t\t\tif (!grouped[item.type]) {\n\t\t\t\t\t\tgrouped[item.type] = [];\n\t\t\t\t\t}\n\n\t\t\t\t\tgrouped[item.type].push(item);\n\n\t\t\t\t\treturn grouped;\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t);\n\t\t}\n\t}\n\n\ttypeToLabel(type: string): string {\n\t\tswitch (type) {\n\t\t\tcase 'api':\n\t\t\t\treturn 'API';\n\t\t\tcase 'guide':\n\t\t\t\treturn 'Guides';\n\t\t\tdefault:\n\t\t\t\treturn 'Unknown';\n\t\t}\n\t}\n}\n","<div class=\"ng-doc-search-result-wrapper\" *ngIf=\"groupedResult | keyvalue as results\">\n\t<ng-container *ngIf=\"results.length; else emptyTemplate\">\n\t\t<div class=\"ng-doc-search-result-category\" *ngFor=\"let item of results\">\n\t\t\t<h4 class=\"ng-doc-search-result-title\" ng-doc-text>{{ typeToLabel(item.key) }}</h4>\n\t\t\t<ul class=\"ng-doc-search-result-pages\">\n\t\t\t\t<li class=\"ng-doc-search-result-page\" *ngFor=\"let page of item.value\">\n\t\t\t\t\t<a class=\"ng-doc-search-result-page-link\" [routerLink]=\"[page.route]\">\n\t\t\t\t\t\t<ng-doc-kind-icon\n\t\t\t\t\t\t\t*ngIf=\"page.kind\"\n\t\t\t\t\t\t\t[kind]=\"page.kind\"\n\t\t\t\t\t\t\t[ngDocTooltip]=\"page.kind\"></ng-doc-kind-icon>\n\t\t\t\t\t\t{{ page.title }}\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t</ng-container>\n\t<ng-template #emptyTemplate>\n\t\t<div ng-doc-text color=\"muted\">Nothing was found...</div>\n\t</ng-template>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAuBa,0BAA0B,CAAA;AAhBvC,IAAA,WAAA,GAAA;QAkBC,IAAM,CAAA,MAAA,GAA2B,EAAE,CAAC;QAEpC,IAAa,CAAA,aAAA,GAAoC,EAAE,CAAC;AA6BpD,KAAA;IA3BA,WAAW,CAAC,EAAE,MAAM,EAAiB,EAAA;AACpC,QAAA,IAAI,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE;AAC1B,YAAA,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CACtC,CAAC,OAAwC,EAAE,IAAmB,KAAI;gBACjE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AACxB,oBAAA,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,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A,EAClB,UAAU,EACV,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,sBAAsB,EACtB,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,qBAAqB,qUACrB,YAAY,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAGD,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAhBtC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,mBAGf,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACR,IAAI;wBACJ,KAAK;wBACL,kBAAkB;wBAClB,UAAU;wBACV,sBAAsB;wBACtB,qBAAqB;wBACrB,YAAY;AACZ,qBAAA,EAAA,QAAA,EAAA,i7BAAA,EAAA,MAAA,EAAA,CAAA,6kCAAA,CAAA,EAAA,CAAA;8BAID,MAAM,EAAA,CAAA;sBADL,KAAK;;;AExBP;;AAEG;;;;"}
|
|
@@ -1,60 +1,52 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import { NgIf, NgTemplateOutlet, NgFor, AsyncPipe } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
5
|
-
import * as i2 from '@angular/forms';
|
|
4
|
+
import { inject, Component, ChangeDetectionStrategy } from '@angular/core';
|
|
6
5
|
import { FormsModule } from '@angular/forms';
|
|
7
6
|
import { RouterLink } from '@angular/router';
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
7
|
+
import { NgDocSearchEngine } from '@ng-doc/app/classes';
|
|
8
|
+
import { NgDocSearchDialogComponent } from '@ng-doc/app/components/search-dialog';
|
|
10
9
|
import { NgDocSanitizeHtmlPipe } from '@ng-doc/app/pipes';
|
|
11
|
-
import { observableState,
|
|
12
|
-
import { NgDocListHost } from '@ng-doc/ui-kit/classes';
|
|
10
|
+
import { NgDocDialogService, observableState, NgDocComponentContent, NgDocButtonIconComponent, NgDocDropdownOriginDirective, NgDocIconComponent, NgDocInputWrapperComponent, NgDocInputStringDirective, NgDocHotkeyDirective, NgDocTagComponent, NgDocLetDirective, NgDocDropdownComponent, NgDocAutofocusDirective, NgDocFocusCatcherDirective, NgDocDataListComponent, NgDocTextComponent, NgDocSpinnerComponent, NgDocHighlighterPipe, NgDocExecutePipe } from '@ng-doc/ui-kit';
|
|
13
11
|
import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
|
|
14
12
|
import { BehaviorSubject, NEVER } from 'rxjs';
|
|
15
|
-
import { skip, switchMap } from 'rxjs/operators';
|
|
13
|
+
import { skip, switchMap, shareReplay } from 'rxjs/operators';
|
|
16
14
|
|
|
17
15
|
let NgDocSearchComponent = class NgDocSearchComponent {
|
|
18
|
-
constructor(
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.searchTerm = '';
|
|
23
|
-
this.query$ = new BehaviorSubject('');
|
|
16
|
+
constructor() {
|
|
17
|
+
this.query = new BehaviorSubject('');
|
|
18
|
+
this.dialog = inject(NgDocDialogService);
|
|
19
|
+
this.searchEngine = inject(NgDocSearchEngine, { optional: true });
|
|
24
20
|
if (!this.searchEngine) {
|
|
25
21
|
throw new Error(`NgDoc: Search engine is not provided,
|
|
26
|
-
please check this article: https://ng-doc.com/getting-started/installation#
|
|
22
|
+
please check this article: https://ng-doc.com/docs/getting-started/installation#configuring-application
|
|
27
23
|
to learn how to provide it.`);
|
|
28
24
|
}
|
|
29
|
-
this.
|
|
25
|
+
this.searchResults = this.query.pipe(skip(1), switchMap((term) => this.searchEngine?.search(term).pipe(observableState()) ?? NEVER), shareReplay(1), untilDestroyed(this));
|
|
30
26
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
useExisting: forwardRef(() => NgDocSearchComponent),
|
|
27
|
+
open() {
|
|
28
|
+
this.dialog.open(new NgDocComponentContent(NgDocSearchDialogComponent), {
|
|
29
|
+
hasBackdrop: true,
|
|
30
|
+
backdropClass: 'ng-doc-blur-backdrop',
|
|
31
|
+
panelClass: 'ng-doc-transparent-dialog',
|
|
32
|
+
positionStrategy: this.dialog.positionStrategy().centerHorizontally().top('5vh'),
|
|
33
|
+
data: {
|
|
34
|
+
term: this.query.value,
|
|
35
|
+
search: (query) => this.query.next(query),
|
|
36
|
+
searchResults: this.searchResults,
|
|
42
37
|
},
|
|
43
|
-
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }], ngImport: i0, 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\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</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\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<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\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\n\t\t\t\t[items]=\"state?.result ?? []\"\n\t\t\t\t[itemContent]=\"itemContent\"\n\t\t\t\t[emptyContent]=\"emptyContent\">\n\t\t\t\t<ng-template let-item #itemContent>\n\t\t\t\t\t<a\n\t\t\t\t\t\tclass=\"ng-doc-search-option\"\n\t\t\t\t\t\t[routerLink]=\"item.index.route\"\n\t\t\t\t\t\t[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\n\t\t\t\t\t\t\t\t\t\tclass=\"ng-doc-search-option-breadcrumb-divider\"\n\t\t\t\t\t\t\t\t\t\t*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 | execute: 'section':item)\n\t\t\t\t\t\t\t\t\t| ngDocSanitizeHtml) || item.index.title\n\t\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\n\t\t\t\t\t\t\t\t\t| ngDocHighlighterPipe: (getPositions | execute: 'content':item)\n\t\t\t\t\t\t\t\t\t| ngDocSanitizeHtml\n\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\tng-doc-text></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\"\n\t\t\t\t\t\t\t\t>Please enter your search query\n\t\t\t\t\t\t\t</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-7)}: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-6);--ng-doc-tag-color: var(--ng-doc-base-6);--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;margin-bottom:calc(var(--ng-doc-base-gutter) / 2)}.ng-doc-search-option .ng-doc-search-option-header ng-doc-tag{text-transform:uppercase;margin-right:var(--ng-doc-base-gutter);--ng-doc-font-weight: 500}.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-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-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"], dependencies: [{ kind: "directive", type: NgDocLetDirective, selector: "[ngDocLet]", inputs: ["ngDocLet"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon]", inputs: ["size", "rounded"] }, { kind: "directive", type: NgDocDropdownOriginDirective, selector: "[ngDocDropdownOrigin]", exportAs: ["ngDocDropdownOrigin"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "component", type: NgDocDropdownComponent, selector: "ng-doc-dropdown", inputs: ["content", "origin", "closeIfOutsideClick", "closeIfInnerClick", "withArrow", "borderOffset", "panelClass", "contactBorder", "hasBackdrop", "positions", "minHeight", "maxHeight", "height", "minWidth", "maxWidth", "width"], outputs: ["beforeOpen", "afterOpen", "beforeClose", "afterClose"] }, { kind: "component", type: NgDocInputWrapperComponent, selector: "ng-doc-input-wrapper", inputs: ["blurContent", "blurContext", "leftContent", "rightContent", "align"] }, { kind: "directive", type: NgDocInputStringDirective, selector: "input[ngDocInputString]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgDocAutofocusDirective, selector: "[ngDocAutofocus]", inputs: ["selectAll"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgDocFocusCatcherDirective, selector: "[ngDocFocusCatcher]", outputs: ["focusEvent", "blurEvent"], exportAs: ["ngDocFocusCatcher"] }, { kind: "directive", type: NgDocHotkeyDirective, selector: "[ngDocHotkey]", inputs: ["ngDocHotkey"], outputs: ["ngDocHotkey"] }, { kind: "component", type: NgDocTagComponent, selector: "ng-doc-tag", inputs: ["color", "size", "mod"] }, { kind: "component", type: NgDocDataListComponent, selector: "ng-doc-data-list", inputs: ["autofocus", "items", "itemContent", "emptyContent", "itemDisabledFn", "defineValueFn", "trackByFn"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: NgDocTextComponent, selector: "[ng-doc-text]", inputs: ["size", "color", "align", "absoluteContent"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: NgDocSpinnerComponent, selector: "ng-doc-spinner", inputs: ["size"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: NgDocHighlighterPipe, name: "ngDocHighlighterPipe" }, { kind: "pipe", type: NgDocExecutePipe, name: "execute" }, { kind: "pipe", type: NgDocSanitizeHtmlPipe, name: "ngDocSanitizeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
41
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: NgDocSearchComponent, isStandalone: true, selector: "ng-doc-search", ngImport: i0, template: "<ng-container\n [ngDocHotkey]=\"{ ctrlKey: false, altKey: false, shiftKey: false, code: 'Slash' }\"\n (ngDocHotkey)=\"open()\">\n <button ng-doc-button-icon size=\"large\" (click)=\"open()\" ngDocDropdownOrigin>\n <ng-doc-icon icon=\"search\" [size]=\"24\"></ng-doc-icon>\n </button>\n\n <ng-doc-input-wrapper ngDocDropdownOrigin>\n <ng-doc-icon icon=\"search\" ngDocInputWrapperLeft></ng-doc-icon>\n <input ngDocInputString readonly placeholder=\"Search...\" (click)=\"open()\" />\n <ng-doc-tag class=\"search-hotkey\" ngDocInputWrapperRight>/</ng-doc-tag>\n </ng-doc-input-wrapper>\n</ng-container>\n", styles: [":host{--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-7)}:host ng-doc-input-wrapper{cursor:pointer}:host ng-doc-input-wrapper ng-doc-icon,:host ng-doc-input-wrapper ng-doc-tag{cursor:pointer}@media (max-width: 1024px){:host ng-doc-input-wrapper{display:none}}@media (min-width: 1024px){:host{width:240px}:host button[ng-doc-button-icon]{display:none}}.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-6);--ng-doc-tag-color: var(--ng-doc-base-6);--ng-doc-tag-background: transparent}\n"], dependencies: [{ kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon], button[ng-doc-button-icon-raised], a[ng-doc-button-icon-raised], button[ng-doc-button-icon-transparent], a[ng-doc-button-icon-transparent]", inputs: ["size", "rounded"] }, { kind: "directive", type: NgDocDropdownOriginDirective, selector: "[ngDocDropdownOrigin]", exportAs: ["ngDocDropdownOrigin"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "component", type: NgDocInputWrapperComponent, selector: "ng-doc-input-wrapper", inputs: ["blurContent", "blurContext", "align"] }, { kind: "directive", type: NgDocInputStringDirective, selector: "input[ngDocInputString]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgDocHotkeyDirective, selector: "[ngDocHotkey]", inputs: ["ngDocHotkey"], outputs: ["ngDocHotkey"] }, { kind: "component", type: NgDocTagComponent, selector: "ng-doc-tag", inputs: ["color", "size", "mod"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
44
42
|
};
|
|
45
43
|
NgDocSearchComponent = __decorate([
|
|
46
44
|
UntilDestroy(),
|
|
47
|
-
__metadata("design:paramtypes", [
|
|
48
|
-
NgDocSearchEngine])
|
|
45
|
+
__metadata("design:paramtypes", [])
|
|
49
46
|
], NgDocSearchComponent);
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocSearchComponent, decorators: [{
|
|
51
48
|
type: Component,
|
|
52
|
-
args: [{ selector: 'ng-doc-search', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
53
|
-
{
|
|
54
|
-
provide: NgDocListHost,
|
|
55
|
-
useExisting: forwardRef(() => NgDocSearchComponent),
|
|
56
|
-
},
|
|
57
|
-
], standalone: true, imports: [
|
|
49
|
+
args: [{ selector: 'ng-doc-search', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
58
50
|
NgDocLetDirective,
|
|
59
51
|
NgIf,
|
|
60
52
|
NgDocButtonIconComponent,
|
|
@@ -78,18 +70,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImpor
|
|
|
78
70
|
NgDocHighlighterPipe,
|
|
79
71
|
NgDocExecutePipe,
|
|
80
72
|
NgDocSanitizeHtmlPipe,
|
|
81
|
-
], template: "<ng-container
|
|
82
|
-
}], ctorParameters: () => [
|
|
83
|
-
type: Optional
|
|
84
|
-
}] }], propDecorators: { mod: [{
|
|
85
|
-
type: Input
|
|
86
|
-
}, {
|
|
87
|
-
type: HostBinding,
|
|
88
|
-
args: ['attr.data-ng-doc-mod']
|
|
89
|
-
}], inputElement: [{
|
|
90
|
-
type: ViewChild,
|
|
91
|
-
args: ['inputElement']
|
|
92
|
-
}] } });
|
|
73
|
+
], template: "<ng-container\n [ngDocHotkey]=\"{ ctrlKey: false, altKey: false, shiftKey: false, code: 'Slash' }\"\n (ngDocHotkey)=\"open()\">\n <button ng-doc-button-icon size=\"large\" (click)=\"open()\" ngDocDropdownOrigin>\n <ng-doc-icon icon=\"search\" [size]=\"24\"></ng-doc-icon>\n </button>\n\n <ng-doc-input-wrapper ngDocDropdownOrigin>\n <ng-doc-icon icon=\"search\" ngDocInputWrapperLeft></ng-doc-icon>\n <input ngDocInputString readonly placeholder=\"Search...\" (click)=\"open()\" />\n <ng-doc-tag class=\"search-hotkey\" ngDocInputWrapperRight>/</ng-doc-tag>\n </ng-doc-input-wrapper>\n</ng-container>\n", styles: [":host{--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-7)}:host ng-doc-input-wrapper{cursor:pointer}:host ng-doc-input-wrapper ng-doc-icon,:host ng-doc-input-wrapper ng-doc-tag{cursor:pointer}@media (max-width: 1024px){:host ng-doc-input-wrapper{display:none}}@media (min-width: 1024px){:host{width:240px}:host button[ng-doc-button-icon]{display:none}}.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-6);--ng-doc-tag-color: var(--ng-doc-base-6);--ng-doc-tag-background: transparent}\n"] }]
|
|
74
|
+
}], ctorParameters: () => [] });
|
|
93
75
|
|
|
94
76
|
/**
|
|
95
77
|
* Generated bundle index. Do not edit.
|
|
@@ -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/ng-doc-app-components-search.ts"],"sourcesContent":["import { AsyncPipe, NgFor, NgIf, NgTemplateOutlet } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tforwardRef,\n\tHostBinding,\n\tInput,\n\tOptional,\n\tViewChild,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { RouterLink } from '@angular/router';\nimport { NgDocSearchEngine } from '@ng-doc/app/classes/search-engine';\nimport { NgDocSearchResult } from '@ng-doc/app/interfaces';\nimport { NgDocSanitizeHtmlPipe } from '@ng-doc/app/pipes';\nimport {\n\tNgDocAutofocusDirective,\n\tNgDocButtonIconComponent,\n\tNgDocDataListComponent,\n\tNgDocDropdownComponent,\n\tNgDocDropdownOriginDirective,\n\tNgDocExecutePipe,\n\tNgDocFocusCatcherDirective,\n\tNgDocHighlighterPipe,\n\tNgDocHighlightPosition,\n\tNgDocHotkeyDirective,\n\tNgDocIconComponent,\n\tNgDocInputStringDirective,\n\tNgDocInputWrapperComponent,\n\tNgDocLetDirective,\n\tNgDocSpinnerComponent,\n\tNgDocTagComponent,\n\tNgDocTextComponent,\n\tobservableState,\n\tStatedObservable,\n} 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: forwardRef(() => NgDocSearchComponent),\n\t\t},\n\t],\n\tstandalone: true,\n\timports: [\n\t\tNgDocLetDirective,\n\t\tNgIf,\n\t\tNgDocButtonIconComponent,\n\t\tNgDocDropdownOriginDirective,\n\t\tNgDocIconComponent,\n\t\tNgDocDropdownComponent,\n\t\tNgDocInputWrapperComponent,\n\t\tNgDocInputStringDirective,\n\t\tFormsModule,\n\t\tNgDocAutofocusDirective,\n\t\tNgTemplateOutlet,\n\t\tNgDocFocusCatcherDirective,\n\t\tNgDocHotkeyDirective,\n\t\tNgDocTagComponent,\n\t\tNgDocDataListComponent,\n\t\tRouterLink,\n\t\tNgDocTextComponent,\n\t\tNgFor,\n\t\tNgDocSpinnerComponent,\n\t\tAsyncPipe,\n\t\tNgDocHighlighterPipe,\n\t\tNgDocExecutePipe,\n\t\tNgDocSanitizeHtmlPipe,\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']>(\n\t\tkey: K,\n\t\titem: T,\n\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\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</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\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<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\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\n\t\t\t\t[items]=\"state?.result ?? []\"\n\t\t\t\t[itemContent]=\"itemContent\"\n\t\t\t\t[emptyContent]=\"emptyContent\">\n\t\t\t\t<ng-template let-item #itemContent>\n\t\t\t\t\t<a\n\t\t\t\t\t\tclass=\"ng-doc-search-option\"\n\t\t\t\t\t\t[routerLink]=\"item.index.route\"\n\t\t\t\t\t\t[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\n\t\t\t\t\t\t\t\t\t\tclass=\"ng-doc-search-option-breadcrumb-divider\"\n\t\t\t\t\t\t\t\t\t\t*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 | execute: 'section':item)\n\t\t\t\t\t\t\t\t\t| ngDocSanitizeHtml) || item.index.title\n\t\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\n\t\t\t\t\t\t\t\t\t| ngDocHighlighterPipe: (getPositions | execute: 'content':item)\n\t\t\t\t\t\t\t\t\t| ngDocSanitizeHtml\n\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\tng-doc-text></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\"\n\t\t\t\t\t\t\t\t>Please enter your search query\n\t\t\t\t\t\t\t</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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names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A,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAGR,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACpC,SAAA,EAAA;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,aAAa;AACtB,4BAAA,WAAW,EAAE,UAAU,CAAC,0BAA0B,CAAC;AACnD,yBAAA;AACD,qBAAA,EAAA,UAAA,EACW,IAAI,EACP,OAAA,EAAA;wBACR,iBAAiB;wBACjB,IAAI;wBACJ,wBAAwB;wBACxB,4BAA4B;wBAC5B,kBAAkB;wBAClB,sBAAsB;wBACtB,0BAA0B;wBAC1B,yBAAyB;wBACzB,WAAW;wBACX,uBAAuB;wBACvB,gBAAgB;wBAChB,0BAA0B;wBAC1B,oBAAoB;wBACpB,iBAAiB;wBACjB,sBAAsB;wBACtB,UAAU;wBACV,kBAAkB;wBAClB,KAAK;wBACL,qBAAqB;wBACrB,SAAS;wBACT,oBAAoB;wBACpB,gBAAgB;wBAChB,qBAAqB;AACrB,qBAAA,EAAA,QAAA,EAAA,knKAAA,EAAA,MAAA,EAAA,CAAA,q0FAAA,CAAA,EAAA,CAAA;;0BAkBC,QAAQ;yCAZV,GAAG,EAAA,CAAA;sBAFF,KAAK;;sBACL,WAAW;uBAAC,sBAAsB,CAAA;gBAInC,YAAY,EAAA,CAAA;sBADX,SAAS;uBAAC,cAAc,CAAA;;;AEtF1B;;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/ng-doc-app-components-search.ts"],"sourcesContent":["import { AsyncPipe, NgFor, NgIf, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { RouterLink } from '@angular/router';\nimport { NgDocSearchEngine } from '@ng-doc/app/classes';\nimport {\n NgDocSearchDialogComponent,\n NgDocSearchDialogData,\n} from '@ng-doc/app/components/search-dialog';\nimport { NgDocSearchResult } from '@ng-doc/app/interfaces';\nimport { NgDocSanitizeHtmlPipe } from '@ng-doc/app/pipes';\nimport {\n NgDocAutofocusDirective,\n NgDocButtonIconComponent,\n NgDocComponentContent,\n NgDocDataListComponent,\n NgDocDialogService,\n NgDocDropdownComponent,\n NgDocDropdownOriginDirective,\n NgDocExecutePipe,\n NgDocFocusCatcherDirective,\n NgDocHighlighterPipe,\n NgDocHotkeyDirective,\n NgDocIconComponent,\n NgDocInputStringDirective,\n NgDocInputWrapperComponent,\n NgDocLetDirective,\n NgDocSpinnerComponent,\n NgDocTagComponent,\n NgDocTextComponent,\n observableState,\n StatedObservable,\n} from '@ng-doc/ui-kit';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { BehaviorSubject, NEVER } from 'rxjs';\nimport { shareReplay, skip, switchMap } from 'rxjs/operators';\n\n@Component({\n selector: 'ng-doc-search',\n templateUrl: './search.component.html',\n styleUrls: ['./search.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n NgDocLetDirective,\n NgIf,\n NgDocButtonIconComponent,\n NgDocDropdownOriginDirective,\n NgDocIconComponent,\n NgDocDropdownComponent,\n NgDocInputWrapperComponent,\n NgDocInputStringDirective,\n FormsModule,\n NgDocAutofocusDirective,\n NgTemplateOutlet,\n NgDocFocusCatcherDirective,\n NgDocHotkeyDirective,\n NgDocTagComponent,\n NgDocDataListComponent,\n RouterLink,\n NgDocTextComponent,\n NgFor,\n NgDocSpinnerComponent,\n AsyncPipe,\n NgDocHighlighterPipe,\n NgDocExecutePipe,\n NgDocSanitizeHtmlPipe,\n ],\n})\n@UntilDestroy()\nexport class NgDocSearchComponent {\n protected readonly query: BehaviorSubject<string> = new BehaviorSubject<string>('');\n protected readonly searchResults: StatedObservable<NgDocSearchResult[]>;\n protected readonly dialog = inject(NgDocDialogService);\n protected readonly searchEngine = inject(NgDocSearchEngine, { optional: true });\n\n constructor() {\n if (!this.searchEngine) {\n throw new Error(`NgDoc: Search engine is not provided,\n\t\t\tplease check this article: https://ng-doc.com/docs/getting-started/installation#configuring-application\n\t\t\tto learn how to provide it.`);\n }\n\n this.searchResults = this.query.pipe(\n skip(1),\n switchMap((term: string) => this.searchEngine?.search(term).pipe(observableState()) ?? NEVER),\n shareReplay(1),\n untilDestroyed(this),\n );\n }\n\n open(): void {\n this.dialog.open<NgDocSearchDialogData>(new NgDocComponentContent(NgDocSearchDialogComponent), {\n hasBackdrop: true,\n backdropClass: 'ng-doc-blur-backdrop',\n panelClass: 'ng-doc-transparent-dialog',\n positionStrategy: this.dialog.positionStrategy().centerHorizontally().top('5vh'),\n data: {\n term: this.query.value,\n search: (query: string) => this.query.next(query),\n searchResults: this.searchResults,\n },\n });\n }\n}\n","<ng-container\n [ngDocHotkey]=\"{ ctrlKey: false, altKey: false, shiftKey: false, code: 'Slash' }\"\n (ngDocHotkey)=\"open()\">\n <button ng-doc-button-icon size=\"large\" (click)=\"open()\" ngDocDropdownOrigin>\n <ng-doc-icon icon=\"search\" [size]=\"24\"></ng-doc-icon>\n </button>\n\n <ng-doc-input-wrapper ngDocDropdownOrigin>\n <ng-doc-icon icon=\"search\" ngDocInputWrapperLeft></ng-doc-icon>\n <input ngDocInputString readonly placeholder=\"Search...\" (click)=\"open()\" />\n <ng-doc-tag class=\"search-hotkey\" ngDocInputWrapperRight>/</ng-doc-tag>\n </ng-doc-input-wrapper>\n</ng-container>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAsEa,IAAA,oBAAoB,GAA1B,MAAM,oBAAoB,CAAA;AAM/B,IAAA,WAAA,GAAA;AALmB,QAAA,IAAA,CAAA,KAAK,GAA4B,IAAI,eAAe,CAAS,EAAE,CAAC,CAAC;AAEjE,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;QACpC,IAAY,CAAA,YAAA,GAAG,MAAM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,EAAA;wBACP,iBAAiB;wBACjB,IAAI;wBACJ,wBAAwB;wBACxB,4BAA4B;wBAC5B,kBAAkB;wBAClB,sBAAsB;wBACtB,0BAA0B;wBAC1B,yBAAyB;wBACzB,WAAW;wBACX,uBAAuB;wBACvB,gBAAgB;wBAChB,0BAA0B;wBAC1B,oBAAoB;wBACpB,iBAAiB;wBACjB,sBAAsB;wBACtB,UAAU;wBACV,kBAAkB;wBAClB,KAAK;wBACL,qBAAqB;wBACrB,SAAS;wBACT,oBAAoB;wBACpB,gBAAgB;wBAChB,qBAAqB;AACtB,qBAAA,EAAA,QAAA,EAAA,8mBAAA,EAAA,MAAA,EAAA,CAAA,40BAAA,CAAA,EAAA,CAAA;;;AEnEH;;AAEG;;;;"}
|
|
@@ -1,33 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Location, NgIf, NgTemplateOutlet, NgFor } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { ChangeDetectorRef, Component, ChangeDetectionStrategy, Input, HostBinding,
|
|
3
|
+
import { inject, ChangeDetectorRef, Component, ChangeDetectionStrategy, Input, HostBinding, input, computed } from '@angular/core';
|
|
4
4
|
import { NG_DOC_CONTEXT } from '@ng-doc/app/tokens';
|
|
5
|
-
import { NgDocDotComponent, NgDocTextComponent, NgDocIconComponent, NgDocTextLeftDirective, NgDocRotatorDirective, NgDocExpanderComponent, NgDocExecutePipe, NgDocBindPipe } from '@ng-doc/ui-kit';
|
|
5
|
+
import { NgDocDotComponent, NgDocTextComponent, NgDocIconComponent, NgDocTextLeftDirective, NgDocRotatorDirective, NgDocExpanderComponent, NgDocTagComponent, NgDocExecutePipe, NgDocBindPipe } from '@ng-doc/ui-kit';
|
|
6
6
|
import { __decorate, __metadata } from 'tslib';
|
|
7
|
-
import * as i1 from '@angular/router';
|
|
8
|
-
import { NavigationEnd, Router, RouterLinkActive, RouterLink } from '@angular/router';
|
|
9
7
|
import { NgDocRouteActiveDirective } from '@ng-doc/app/directives/route-active';
|
|
10
|
-
import {
|
|
11
|
-
import * as
|
|
8
|
+
import { UntilDestroy } from '@ngneat/until-destroy';
|
|
9
|
+
import * as i1 from '@tinkoff/ng-polymorpheus';
|
|
12
10
|
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
13
|
-
import {
|
|
11
|
+
import { RouterLinkActive, RouterLink } from '@angular/router';
|
|
14
12
|
|
|
15
13
|
let NgDocSidebarCategoryComponent = class NgDocSidebarCategoryComponent {
|
|
16
|
-
constructor(
|
|
17
|
-
this.router = router;
|
|
18
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
14
|
+
constructor() {
|
|
19
15
|
this.isRoot = false;
|
|
20
16
|
this.content = '';
|
|
21
17
|
this.expandable = true;
|
|
22
18
|
this.expanded = true;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
.subscribe(() => this.expand());
|
|
19
|
+
this.location = inject(Location);
|
|
20
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
21
|
+
this.location.onUrlChange(() => {
|
|
22
|
+
if (this.location.path().includes(this.category.route ?? '', 0)) {
|
|
23
|
+
this.expand();
|
|
24
|
+
}
|
|
25
|
+
});
|
|
31
26
|
}
|
|
32
27
|
toggle() {
|
|
33
28
|
this.expanded ? this.collapse() : this.expand();
|
|
@@ -44,15 +39,14 @@ let NgDocSidebarCategoryComponent = class NgDocSidebarCategoryComponent {
|
|
|
44
39
|
this.changeDetectorRef.markForCheck();
|
|
45
40
|
}
|
|
46
41
|
}
|
|
47
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.
|
|
48
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.
|
|
42
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocSidebarCategoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
43
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: NgDocSidebarCategoryComponent, isStandalone: true, selector: "ng-doc-sidebar-category", inputs: { category: "category", isRoot: "isRoot", content: "content", expandable: "expandable", expanded: "expanded" }, host: { properties: { "attr.data-ng-doc-is-root": "this.isRoot", "attr.data-ng-doc-expandable": "this.expandable" } }, ngImport: i0, template: "<div class=\"ng-doc-sidebar-category-wrapper\">\n <div class=\"ng-doc-sidebar-category-button\" (click)=\"toggle()\">\n <div class=\"ng-doc-sidebar-category\" [ngDocRouteActive]=\"category.route\" activeClass=\"active\">\n <ng-doc-dot *ngIf=\"!expandable\"></ng-doc-dot>\n <span ng-doc-text>\n <ng-doc-icon\n icon=\"chevron-right\"\n *ngIf=\"category.expandable\"\n [ngDocRotator]=\"expanded\"\n ngDocTextLeft>\n </ng-doc-icon>\n {{ category.title }}\n </span>\n </div>\n <!--\t\t<div ng-doc-text color=\"muted\" size=\"small\">Some description</div>-->\n </div>\n <ng-doc-expander [expanded]=\"expanded\" [content]=\"contentTemplate\" />\n <ng-template #contentTemplate>\n <div class=\"ng-doc-sidebar-category-children\">\n <!--We wrap content via ng-template to save state of the child components -->\n <ng-content></ng-content>\n <ng-container *polymorpheusOutlet=\"content as text\">{{ text }}</ng-container>\n </div>\n </ng-template>\n</div>\n", styles: [":host{display:flex;flex-direction:column;--ng-doc-sidebar-category-indent: calc( var(--ng-doc-sidebar-item-indent) + calc(var(--ng-doc-base-gutter) * 2) );--ng-doc-icon-color: var(--ng-doc-text)}:host[data-ng-doc-expandable=false] .ng-doc-sidebar-category-button{padding:var(--ng-doc-sidebar-vetical-padding) var(--ng-doc-base-gutter) var(--ng-doc-sidebar-vetical-padding) var(--ng-doc-sidebar-item-indent)}:host[data-ng-doc-expandable=true] .ng-doc-sidebar-category-button{padding:var(--ng-doc-sidebar-vetical-padding) var(--ng-doc-base-gutter) var(--ng-doc-sidebar-vetical-padding) var(--ng-doc-sidebar-item-indent);cursor:pointer;border-radius:var(--ng-doc-base-gutter)}:host[data-ng-doc-expandable=true] .ng-doc-sidebar-category-button:hover{background-color:var(--ng-doc-base-1)}:host .ng-doc-sidebar-category-button{display:flex;flex-direction:column}:host .ng-doc-sidebar-category-button .ng-doc-sidebar-category{display:flex;align-items:center;--ng-doc-dot-background: var(--ng-doc-base-4);--ng-doc-text: var(--ng-doc-heading-color)}:host .ng-doc-sidebar-category-button .ng-doc-sidebar-category ng-doc-dot{margin-right:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-sidebar-category-button .ng-doc-sidebar-category.active{--ng-doc-font-weight: 600;--ng-doc-dot-background: var(--ng-doc-primary)}:host .ng-doc-sidebar-category-button span[ng-doc-text]{flex-shrink:0;margin-right:var(--ng-doc-base-gutter)}:host .ng-doc-sidebar-category-children{padding-bottom:calc(var(--ng-doc-base-gutter) * 2);--ng-doc-sidebar-item-indent: var(--ng-doc-sidebar-category-indent)}\n"], dependencies: [{ kind: "directive", type: NgDocRouteActiveDirective, selector: "[ngDocRouteActive]", inputs: ["ngDocRouteActive", "activeClass", "matchOptions"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocDotComponent, selector: "ng-doc-dot", inputs: ["color", "size"] }, { kind: "component", type: NgDocTextComponent, selector: "[ng-doc-text]", inputs: ["size", "color", "align", "absoluteContent"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "directive", type: NgDocTextLeftDirective, selector: "[ngDocTextLeft]" }, { kind: "directive", type: NgDocRotatorDirective, selector: "[ngDocRotator]", inputs: ["ngDocRotator", "from", "to"] }, { kind: "component", type: NgDocExpanderComponent, selector: "ng-doc-expander", inputs: ["expanded", "content", "from"] }, { kind: "ngmodule", type: PolymorpheusModule }, { kind: "directive", type: i1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
49
44
|
};
|
|
50
45
|
NgDocSidebarCategoryComponent = __decorate([
|
|
51
46
|
UntilDestroy(),
|
|
52
|
-
__metadata("design:paramtypes", [
|
|
53
|
-
ChangeDetectorRef])
|
|
47
|
+
__metadata("design:paramtypes", [])
|
|
54
48
|
], NgDocSidebarCategoryComponent);
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocSidebarCategoryComponent, decorators: [{
|
|
56
50
|
type: Component,
|
|
57
51
|
args: [{ selector: 'ng-doc-sidebar-category', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
58
52
|
NgDocRouteActiveDirective,
|
|
@@ -64,9 +58,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImpor
|
|
|
64
58
|
NgDocRotatorDirective,
|
|
65
59
|
NgDocExpanderComponent,
|
|
66
60
|
PolymorpheusModule,
|
|
67
|
-
|
|
68
|
-
}],
|
|
69
|
-
|
|
61
|
+
NgTemplateOutlet,
|
|
62
|
+
], template: "<div class=\"ng-doc-sidebar-category-wrapper\">\n <div class=\"ng-doc-sidebar-category-button\" (click)=\"toggle()\">\n <div class=\"ng-doc-sidebar-category\" [ngDocRouteActive]=\"category.route\" activeClass=\"active\">\n <ng-doc-dot *ngIf=\"!expandable\"></ng-doc-dot>\n <span ng-doc-text>\n <ng-doc-icon\n icon=\"chevron-right\"\n *ngIf=\"category.expandable\"\n [ngDocRotator]=\"expanded\"\n ngDocTextLeft>\n </ng-doc-icon>\n {{ category.title }}\n </span>\n </div>\n <!--\t\t<div ng-doc-text color=\"muted\" size=\"small\">Some description</div>-->\n </div>\n <ng-doc-expander [expanded]=\"expanded\" [content]=\"contentTemplate\" />\n <ng-template #contentTemplate>\n <div class=\"ng-doc-sidebar-category-children\">\n <!--We wrap content via ng-template to save state of the child components -->\n <ng-content></ng-content>\n <ng-container *polymorpheusOutlet=\"content as text\">{{ text }}</ng-container>\n </div>\n </ng-template>\n</div>\n", styles: [":host{display:flex;flex-direction:column;--ng-doc-sidebar-category-indent: calc( var(--ng-doc-sidebar-item-indent) + calc(var(--ng-doc-base-gutter) * 2) );--ng-doc-icon-color: var(--ng-doc-text)}:host[data-ng-doc-expandable=false] .ng-doc-sidebar-category-button{padding:var(--ng-doc-sidebar-vetical-padding) var(--ng-doc-base-gutter) var(--ng-doc-sidebar-vetical-padding) var(--ng-doc-sidebar-item-indent)}:host[data-ng-doc-expandable=true] .ng-doc-sidebar-category-button{padding:var(--ng-doc-sidebar-vetical-padding) var(--ng-doc-base-gutter) var(--ng-doc-sidebar-vetical-padding) var(--ng-doc-sidebar-item-indent);cursor:pointer;border-radius:var(--ng-doc-base-gutter)}:host[data-ng-doc-expandable=true] .ng-doc-sidebar-category-button:hover{background-color:var(--ng-doc-base-1)}:host .ng-doc-sidebar-category-button{display:flex;flex-direction:column}:host .ng-doc-sidebar-category-button .ng-doc-sidebar-category{display:flex;align-items:center;--ng-doc-dot-background: var(--ng-doc-base-4);--ng-doc-text: var(--ng-doc-heading-color)}:host .ng-doc-sidebar-category-button .ng-doc-sidebar-category ng-doc-dot{margin-right:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-sidebar-category-button .ng-doc-sidebar-category.active{--ng-doc-font-weight: 600;--ng-doc-dot-background: var(--ng-doc-primary)}:host .ng-doc-sidebar-category-button span[ng-doc-text]{flex-shrink:0;margin-right:var(--ng-doc-base-gutter)}:host .ng-doc-sidebar-category-children{padding-bottom:calc(var(--ng-doc-base-gutter) * 2);--ng-doc-sidebar-item-indent: var(--ng-doc-sidebar-category-indent)}\n"] }]
|
|
63
|
+
}], ctorParameters: () => [], propDecorators: { category: [{
|
|
64
|
+
type: Input,
|
|
65
|
+
args: [{ required: true }]
|
|
70
66
|
}], isRoot: [{
|
|
71
67
|
type: Input
|
|
72
68
|
}, {
|
|
@@ -84,27 +80,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImpor
|
|
|
84
80
|
}] } });
|
|
85
81
|
|
|
86
82
|
class NgDocSidebarItemComponent {
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
constructor() {
|
|
84
|
+
this.item = input.required();
|
|
85
|
+
this.statuses = computed(() => {
|
|
86
|
+
const statuses = this.item().metadata?.tags['status'] ?? [];
|
|
87
|
+
return statuses.map((status) => {
|
|
88
|
+
const [type, text] = status.split(/\s+(.+)/);
|
|
89
|
+
return { type: type.replace(/^:/, ''), text };
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocSidebarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
94
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.1", type: NgDocSidebarItemComponent, isStandalone: true, selector: "ng-doc-sidebar-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<a class=\"ng-doc-sidebar-link\" [routerLink]=\"[item().route]\" routerLinkActive=\"active\">\n <ng-doc-dot></ng-doc-dot>\n <span ng-doc-text [absoluteContent]=\"true\">\n {{ item().title }}\n @for (status of statuses(); track status) {\n <ng-doc-tag size=\"small\" [color]=\"status.type || 'success'\" mod=\"light\">{{\n status.text\n }}</ng-doc-tag>\n }\n </span>\n</a>\n", styles: [":host{display:block}.ng-doc-sidebar-link{font-family:var(--ng-doc-heading-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);display:flex;align-items:center;gap:var(--ng-doc-base-gutter);padding:var(--ng-doc-sidebar-vetical-padding) var(--ng-doc-sidebar-horizontal-padding) var(--ng-doc-sidebar-vetical-padding) var(--ng-doc-sidebar-item-indent);text-decoration:inherit;cursor:pointer;border-radius:var(--ng-doc-base-gutter);--ng-doc-icon-color: var(--ng-doc-text);--ng-doc-dot-background: var(--ng-doc-base-4);--ng-doc-font-weight: 400}.ng-doc-sidebar-link ng-doc-dot{margin-right:var(--ng-doc-base-gutter);z-index:1}.ng-doc-sidebar-link:hover:not(.active){background:var(--ng-doc-base-1)}.ng-doc-sidebar-link.active{background:color-mix(in srgb,var(--ng-doc-primary) 7%,transparent);--ng-doc-text: var(--ng-doc-primary);--ng-doc-dot-background: var(--ng-doc-primary)}.ng-doc-sidebar-link.active ng-doc-dot{animation:animation .5s ease-out}@keyframes animation{0%{transform:scale(1)}50%{transform:scale(2)}to{transform:scale(1)}}.ng-doc-sidebar-link ng-doc-tag{vertical-align:middle;margin-left:var(--ng-doc-base-gutter);font-weight:600}\n"], dependencies: [{ kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: NgDocDotComponent, selector: "ng-doc-dot", inputs: ["color", "size"] }, { kind: "component", type: NgDocTextComponent, selector: "[ng-doc-text]", inputs: ["size", "color", "align", "absoluteContent"] }, { kind: "component", type: NgDocTagComponent, selector: "ng-doc-tag", inputs: ["color", "size", "mod"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
89
95
|
}
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocSidebarItemComponent, decorators: [{
|
|
91
97
|
type: Component,
|
|
92
|
-
args: [{ selector: 'ng-doc-sidebar-item', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [RouterLinkActive, RouterLink, NgDocDotComponent, NgDocTextComponent], template: "<a class=\"ng-doc-sidebar-link\" [routerLink]=\"[item
|
|
93
|
-
}]
|
|
94
|
-
type: Input
|
|
95
|
-
}] } });
|
|
98
|
+
args: [{ selector: 'ng-doc-sidebar-item', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [RouterLinkActive, RouterLink, NgDocDotComponent, NgDocTextComponent, NgDocTagComponent], template: "<a class=\"ng-doc-sidebar-link\" [routerLink]=\"[item().route]\" routerLinkActive=\"active\">\n <ng-doc-dot></ng-doc-dot>\n <span ng-doc-text [absoluteContent]=\"true\">\n {{ item().title }}\n @for (status of statuses(); track status) {\n <ng-doc-tag size=\"small\" [color]=\"status.type || 'success'\" mod=\"light\">{{\n status.text\n }}</ng-doc-tag>\n }\n </span>\n</a>\n", styles: [":host{display:block}.ng-doc-sidebar-link{font-family:var(--ng-doc-heading-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);display:flex;align-items:center;gap:var(--ng-doc-base-gutter);padding:var(--ng-doc-sidebar-vetical-padding) var(--ng-doc-sidebar-horizontal-padding) var(--ng-doc-sidebar-vetical-padding) var(--ng-doc-sidebar-item-indent);text-decoration:inherit;cursor:pointer;border-radius:var(--ng-doc-base-gutter);--ng-doc-icon-color: var(--ng-doc-text);--ng-doc-dot-background: var(--ng-doc-base-4);--ng-doc-font-weight: 400}.ng-doc-sidebar-link ng-doc-dot{margin-right:var(--ng-doc-base-gutter);z-index:1}.ng-doc-sidebar-link:hover:not(.active){background:var(--ng-doc-base-1)}.ng-doc-sidebar-link.active{background:color-mix(in srgb,var(--ng-doc-primary) 7%,transparent);--ng-doc-text: var(--ng-doc-primary);--ng-doc-dot-background: var(--ng-doc-primary)}.ng-doc-sidebar-link.active ng-doc-dot{animation:animation .5s ease-out}@keyframes animation{0%{transform:scale(1)}50%{transform:scale(2)}to{transform:scale(1)}}.ng-doc-sidebar-link ng-doc-tag{vertical-align:middle;margin-left:var(--ng-doc-base-gutter);font-weight:600}\n"] }]
|
|
99
|
+
}] });
|
|
96
100
|
|
|
97
101
|
class NgDocSidebarComponent {
|
|
98
|
-
constructor(
|
|
99
|
-
this.
|
|
102
|
+
constructor() {
|
|
103
|
+
this.location = inject(Location);
|
|
104
|
+
this.context = inject(NG_DOC_CONTEXT);
|
|
100
105
|
}
|
|
101
106
|
getNavigation(nav) {
|
|
102
107
|
return nav ? nav.children ?? [] : this.context.navigation;
|
|
103
108
|
}
|
|
104
|
-
|
|
105
|
-
|
|
109
|
+
matchRoute(route) {
|
|
110
|
+
return this.location.path().includes(route ?? '', 0);
|
|
111
|
+
}
|
|
112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
113
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: NgDocSidebarComponent, isStandalone: true, selector: "ng-doc-sidebar", ngImport: i0, template: "<div class=\"ng-doc-side-bar-wrapper\">\n <ng-container *ngFor=\"let item of getNavigation | bind: this | execute\">\n <ng-container\n *ngTemplateOutlet=\"sidebarTemplate; context: { item: this.item, root: true }\"></ng-container>\n </ng-container>\n\n <ng-template let-item=\"item\" let-root=\"root\" #sidebarTemplate>\n <ng-container *ngIf=\"item.children?.length; else itemTemplate\">\n <ng-doc-sidebar-category\n *ngIf=\"!item.hidden\"\n [category]=\"item\"\n [expandable]=\"!!item?.expandable\"\n [expanded]=\"\n !!item?.expanded || !item?.expandable || (matchRoute | bind: this | execute: item.route)\n \"\n [isRoot]=\"!!root\"\n [content]=\"categoryContent\">\n </ng-doc-sidebar-category>\n <ng-template #categoryContent>\n <ng-container *ngFor=\"let child of getNavigation | bind: this | execute: item\">\n <ng-container\n *ngTemplateOutlet=\"\n sidebarTemplate;\n context: { item: child, root: false }\n \"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-template #itemTemplate>\n <ng-doc-sidebar-item [item]=\"item\" *ngIf=\"!item.hidden\"></ng-doc-sidebar-item>\n </ng-template>\n </ng-template>\n</div>\n", styles: [":host{display:block;height:calc(100vh - var(--ng-doc-navbar-height));width:100%;overflow:auto;padding:var(--ng-doc-sidebar-padding) 0;background:var(--ng-doc-sidebar-background);box-shadow:var(--ng-doc-sidebar-shadow);--ng-doc-sidebar-category-indent: var(--ng-doc-sidebar-horizontal-padding);--ng-doc-sidebar-item-indent: var(--ng-doc-sidebar-horizontal-padding)}:host .ng-doc-side-bar-wrapper{position:relative}\n"], dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocSidebarCategoryComponent, selector: "ng-doc-sidebar-category", inputs: ["category", "isRoot", "content", "expandable", "expanded"] }, { kind: "component", type: NgDocSidebarItemComponent, selector: "ng-doc-sidebar-item", inputs: ["item"] }, { kind: "pipe", type: NgDocExecutePipe, name: "execute" }, { kind: "pipe", type: NgDocBindPipe, name: "bind" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
106
114
|
}
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocSidebarComponent, decorators: [{
|
|
108
116
|
type: Component,
|
|
109
117
|
args: [{ selector: 'ng-doc-sidebar', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
110
118
|
NgFor,
|
|
@@ -114,11 +122,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImpor
|
|
|
114
122
|
NgDocSidebarItemComponent,
|
|
115
123
|
NgDocExecutePipe,
|
|
116
124
|
NgDocBindPipe,
|
|
117
|
-
],
|
|
118
|
-
}]
|
|
119
|
-
type: Inject,
|
|
120
|
-
args: [NG_DOC_CONTEXT]
|
|
121
|
-
}] }] });
|
|
125
|
+
], template: "<div class=\"ng-doc-side-bar-wrapper\">\n <ng-container *ngFor=\"let item of getNavigation | bind: this | execute\">\n <ng-container\n *ngTemplateOutlet=\"sidebarTemplate; context: { item: this.item, root: true }\"></ng-container>\n </ng-container>\n\n <ng-template let-item=\"item\" let-root=\"root\" #sidebarTemplate>\n <ng-container *ngIf=\"item.children?.length; else itemTemplate\">\n <ng-doc-sidebar-category\n *ngIf=\"!item.hidden\"\n [category]=\"item\"\n [expandable]=\"!!item?.expandable\"\n [expanded]=\"\n !!item?.expanded || !item?.expandable || (matchRoute | bind: this | execute: item.route)\n \"\n [isRoot]=\"!!root\"\n [content]=\"categoryContent\">\n </ng-doc-sidebar-category>\n <ng-template #categoryContent>\n <ng-container *ngFor=\"let child of getNavigation | bind: this | execute: item\">\n <ng-container\n *ngTemplateOutlet=\"\n sidebarTemplate;\n context: { item: child, root: false }\n \"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-template #itemTemplate>\n <ng-doc-sidebar-item [item]=\"item\" *ngIf=\"!item.hidden\"></ng-doc-sidebar-item>\n </ng-template>\n </ng-template>\n</div>\n", styles: [":host{display:block;height:calc(100vh - var(--ng-doc-navbar-height));width:100%;overflow:auto;padding:var(--ng-doc-sidebar-padding) 0;background:var(--ng-doc-sidebar-background);box-shadow:var(--ng-doc-sidebar-shadow);--ng-doc-sidebar-category-indent: var(--ng-doc-sidebar-horizontal-padding);--ng-doc-sidebar-item-indent: var(--ng-doc-sidebar-horizontal-padding)}:host .ng-doc-side-bar-wrapper{position:relative}\n"] }]
|
|
126
|
+
}] });
|
|
122
127
|
|
|
123
128
|
/**
|
|
124
129
|
* Generated bundle index. Do not edit.
|