@ng-doc/app 17.5.5 → 17.5.7
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/esm2022/components/api-list/api-list.component.mjs +5 -5
- package/esm2022/components/breadcrumb/breadcrumb.component.mjs +3 -3
- package/esm2022/components/code/code.component.mjs +3 -3
- package/esm2022/components/demo/demo.component.mjs +4 -4
- package/esm2022/components/demo-displayer/demo-displayer.component.mjs +3 -3
- package/esm2022/components/demo-pane/demo-pane.component.mjs +4 -4
- package/esm2022/components/fullscreen-button/fullscreen-button.component.mjs +3 -3
- package/esm2022/components/kind-icon/kind-icon.component.mjs +3 -3
- package/esm2022/components/link/link.component.mjs +3 -3
- package/esm2022/components/navbar/navbar.component.mjs +3 -3
- package/esm2022/components/page/page.component.mjs +4 -4
- package/esm2022/components/page-link/page-link.component.mjs +3 -3
- package/esm2022/components/page-navigation/page-navigation.component.mjs +3 -3
- package/esm2022/components/playground/base-playground.mjs +4 -4
- package/esm2022/components/playground/playground-demo/playground-demo.component.mjs +4 -4
- package/esm2022/components/playground/playground-properties/playground-properties.component.mjs +5 -5
- package/esm2022/components/playground/playground-property/playground-property.component.mjs +4 -4
- package/esm2022/components/playground/playground.component.mjs +4 -4
- package/esm2022/components/root/root.component.mjs +9 -9
- package/esm2022/components/search/search.component.mjs +4 -4
- package/esm2022/components/search-result/search-result.component.mjs +4 -4
- package/esm2022/components/sidebar/sidebar-category/sidebar-category.component.mjs +4 -4
- package/esm2022/components/sidebar/sidebar-item/sidebar-item.component.mjs +3 -3
- package/esm2022/components/sidebar/sidebar.component.mjs +3 -3
- package/esm2022/components/tabs/tabs.component.mjs +3 -3
- package/esm2022/components/theme-toggle/theme-toggle.component.mjs +4 -4
- package/esm2022/components/toc/toc-element/toc-element.component.mjs +3 -3
- package/esm2022/components/toc/toc.component.mjs +4 -4
- package/esm2022/directives/code-highlighter/code-highlighter.directive.mjs +4 -4
- 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 +1 -1
- 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/page-processor.directive.mjs +4 -4
- package/esm2022/processors/processors/tooltip.processor.mjs +4 -4
- package/esm2022/providers/ng-doc-app/provide-ng-doc-app.mjs +1 -1
- package/esm2022/services/sidebar/sidebar.service.mjs +4 -4
- package/esm2022/services/store/store.service.mjs +3 -3
- package/esm2022/services/theme/theme.service.mjs +4 -4
- package/esm2022/type-controls/boolean-control/boolean-control.component.mjs +3 -3
- package/esm2022/type-controls/number-control/number-control.component.mjs +3 -3
- package/esm2022/type-controls/string-control/string-control.component.mjs +3 -3
- package/esm2022/type-controls/type-alias-control/type-alias-control.component.mjs +3 -3
- package/fesm2022/ng-doc-app-components-api-list.mjs +4 -4
- package/fesm2022/ng-doc-app-components-api-list.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-breadcrumb.mjs +3 -3
- package/fesm2022/ng-doc-app-components-code.mjs +3 -3
- package/fesm2022/ng-doc-app-components-demo-displayer.mjs +3 -3
- package/fesm2022/ng-doc-app-components-demo-pane.mjs +3 -3
- package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo.mjs +3 -3
- 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-kind-icon.mjs +3 -3
- package/fesm2022/ng-doc-app-components-link.mjs +3 -3
- package/fesm2022/ng-doc-app-components-navbar.mjs +3 -3
- package/fesm2022/ng-doc-app-components-page-link.mjs +3 -3
- package/fesm2022/ng-doc-app-components-page-navigation.mjs +3 -3
- package/fesm2022/ng-doc-app-components-page.mjs +3 -3
- package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-playground.mjs +16 -16
- package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-root.mjs +9 -9
- 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 +3 -3
- package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-sidebar.mjs +9 -9
- 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-theme-toggle.mjs +3 -3
- package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-toc.mjs +6 -6
- package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
- package/fesm2022/ng-doc-app-directives-code-highlighter.mjs +3 -3
- 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.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 +3 -3
- package/fesm2022/ng-doc-app-processors-page-processor.mjs.map +1 -1
- package/fesm2022/ng-doc-app-processors-processors.mjs +3 -3
- package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-sidebar.mjs +3 -3
- 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 +3 -3
- package/fesm2022/ng-doc-app-services-theme.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 +3 -3
- package/fesm2022/ng-doc-app-type-controls-string-control.mjs +3 -3
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +3 -3
- package/package.json +3 -3
|
@@ -44,15 +44,15 @@ let NgDocSidebarCategoryComponent = class NgDocSidebarCategoryComponent {
|
|
|
44
44
|
this.changeDetectorRef.markForCheck();
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
48
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocSidebarCategoryComponent, deps: [{ token: i1.Router }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
48
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.2", 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\t<div class=\"ng-doc-sidebar-category-button\" (click)=\"toggle()\">\n\t\t<div\n\t\t\tclass=\"ng-doc-sidebar-category\"\n\t\t\t[ngDocRouteActive]=\"category?.route ?? ''\"\n\t\t\tactiveClass=\"active\">\n\t\t\t<ng-doc-dot *ngIf=\"!expandable\"></ng-doc-dot>\n\t\t\t<span ng-doc-text [color]=\"expandable ? 'normal' : 'muted'\">\n\t\t\t\t<ng-doc-icon\n\t\t\t\t\ticon=\"chevron-right\"\n\t\t\t\t\t*ngIf=\"category?.expandable\"\n\t\t\t\t\t[ngDocRotator]=\"expanded\"\n\t\t\t\t\tngDocTextLeft>\n\t\t\t\t</ng-doc-icon>\n\t\t\t\t{{ category?.title }}\n\t\t\t</span>\n\t\t</div>\n\t\t<!--\t\t<div ng-doc-text color=\"muted\" size=\"small\">Some description</div>-->\n\t</div>\n\t<ng-doc-expander [expanded]=\"expanded\" [content]=\"contentTemplate\">\n\t\t<ng-template #contentTemplate>\n\t\t\t<div class=\"ng-doc-sidebar-category-children\">\n\t\t\t\t<!--We wrap content via ng-template to save state of the child components -->\n\t\t\t\t<ng-content></ng-content>\n\t\t\t\t<ng-container *polymorpheusOutlet=\"content\"></ng-container>\n\t\t\t</div>\n\t\t</ng-template>\n\t</ng-doc-expander>\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=false] .ng-doc-sidebar-category-button .ng-doc-sidebar-category{--ng-doc-font-weight: 600}: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-font-weight: 600}: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: 700;--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: i2.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
49
49
|
};
|
|
50
50
|
NgDocSidebarCategoryComponent = __decorate([
|
|
51
51
|
UntilDestroy(),
|
|
52
52
|
__metadata("design:paramtypes", [Router,
|
|
53
53
|
ChangeDetectorRef])
|
|
54
54
|
], NgDocSidebarCategoryComponent);
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocSidebarCategoryComponent, decorators: [{
|
|
56
56
|
type: Component,
|
|
57
57
|
args: [{ selector: 'ng-doc-sidebar-category', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
58
58
|
NgDocRouteActiveDirective,
|
|
@@ -84,10 +84,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImpor
|
|
|
84
84
|
}] } });
|
|
85
85
|
|
|
86
86
|
class NgDocSidebarItemComponent {
|
|
87
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
88
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
87
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocSidebarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
88
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.2", type: NgDocSidebarItemComponent, isStandalone: true, selector: "ng-doc-sidebar-item", inputs: { item: "item" }, ngImport: i0, template: "<a class=\"ng-doc-sidebar-link\" [routerLink]=\"[item?.route ?? '']\" routerLinkActive=\"active\">\n\t<ng-doc-dot></ng-doc-dot>\n\t<span ng-doc-text [absoluteContent]=\"true\">\n\t\t{{ item?.title }}\n\t</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;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;--ng-doc-icon-color: var(--ng-doc-text);--ng-doc-dot-background: var(--ng-doc-base-4);--ng-doc-font-weight: 500}.ng-doc-sidebar-link ng-doc-dot{margin-right:calc(var(--ng-doc-base-gutter) * 2)}.ng-doc-sidebar-link:hover:not(.active){--ng-doc-text: var(--ng-doc-text-muted)}.ng-doc-sidebar-link.active{--ng-doc-font-weight: 800;--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)}}\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
89
89
|
}
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocSidebarItemComponent, decorators: [{
|
|
91
91
|
type: Component,
|
|
92
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?.route ?? '']\" routerLinkActive=\"active\">\n\t<ng-doc-dot></ng-doc-dot>\n\t<span ng-doc-text [absoluteContent]=\"true\">\n\t\t{{ item?.title }}\n\t</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;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;--ng-doc-icon-color: var(--ng-doc-text);--ng-doc-dot-background: var(--ng-doc-base-4);--ng-doc-font-weight: 500}.ng-doc-sidebar-link ng-doc-dot{margin-right:calc(var(--ng-doc-base-gutter) * 2)}.ng-doc-sidebar-link:hover:not(.active){--ng-doc-text: var(--ng-doc-text-muted)}.ng-doc-sidebar-link.active{--ng-doc-font-weight: 800;--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)}}\n"] }]
|
|
93
93
|
}], propDecorators: { item: [{
|
|
@@ -101,10 +101,10 @@ class NgDocSidebarComponent {
|
|
|
101
101
|
getNavigation(nav) {
|
|
102
102
|
return nav ? nav.children ?? [] : this.context.navigation;
|
|
103
103
|
}
|
|
104
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
105
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
104
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocSidebarComponent, deps: [{ token: NG_DOC_CONTEXT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
105
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.2", type: NgDocSidebarComponent, isStandalone: true, selector: "ng-doc-sidebar", host: { attributes: { "ngSkipHydration": "true" } }, ngImport: i0, template: "<div class=\"ng-doc-side-bar-wrapper\">\n\t<ng-container *ngFor=\"let item of getNavigation | bind: this | execute\">\n\t\t<ng-container\n\t\t\t*ngTemplateOutlet=\"sidebarTemplate; context: { item: this.item, root: true }\"></ng-container>\n\t</ng-container>\n\n\t<ng-template let-item=\"item\" let-root=\"root\" #sidebarTemplate>\n\t\t<ng-container *ngIf=\"item.children?.length; else itemTemplate\">\n\t\t\t<ng-doc-sidebar-category\n\t\t\t\t*ngIf=\"!item.hidden\"\n\t\t\t\t[category]=\"item\"\n\t\t\t\t[expandable]=\"!!item?.expandable\"\n\t\t\t\t[expanded]=\"!!item?.expanded || !item?.expandable\"\n\t\t\t\t[isRoot]=\"!!root\"\n\t\t\t\t[content]=\"categoryContent\">\n\t\t\t\t<ng-template #categoryContent>\n\t\t\t\t\t<ng-container *ngFor=\"let child of getNavigation | bind: this | execute: item\">\n\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t*ngTemplateOutlet=\"\n\t\t\t\t\t\t\t\tsidebarTemplate;\n\t\t\t\t\t\t\t\tcontext: { item: child, root: false }\n\t\t\t\t\t\t\t\"></ng-container>\n\t\t\t\t\t</ng-container>\n\t\t\t\t</ng-template>\n\t\t\t</ng-doc-sidebar-category>\n\t\t</ng-container>\n\n\t\t<ng-template #itemTemplate>\n\t\t\t<ng-doc-sidebar-item [item]=\"item\" *ngIf=\"!item.hidden\"></ng-doc-sidebar-item>\n\t\t</ng-template>\n\t</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
106
|
}
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocSidebarComponent, decorators: [{
|
|
108
108
|
type: Component,
|
|
109
109
|
args: [{ selector: 'ng-doc-sidebar', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
110
110
|
NgFor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-components-sidebar.mjs","sources":["../../../../libs/app/components/sidebar/sidebar-category/sidebar-category.component.ts","../../../../libs/app/components/sidebar/sidebar-category/sidebar-category.component.html","../../../../libs/app/components/sidebar/sidebar-item/sidebar-item.component.ts","../../../../libs/app/components/sidebar/sidebar-item/sidebar-item.component.html","../../../../libs/app/components/sidebar/sidebar.component.ts","../../../../libs/app/components/sidebar/sidebar.component.html","../../../../libs/app/components/sidebar/ng-doc-app-components-sidebar.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tHostBinding,\n\tInput,\n\tOnInit,\n} from '@angular/core';\nimport { Event, NavigationEnd, Router } from '@angular/router';\nimport { NgDocRouteActiveDirective } from '@ng-doc/app/directives/route-active';\nimport { NgDocNavigation } from '@ng-doc/app/interfaces';\nimport {\n\tNgDocDotComponent,\n\tNgDocExpanderComponent,\n\tNgDocIconComponent,\n\tNgDocRotatorDirective,\n\tNgDocTextComponent,\n\tNgDocTextLeftDirective,\n} from '@ng-doc/ui-kit';\nimport { NgDocContent } from '@ng-doc/ui-kit/types';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport { filter, startWith } from 'rxjs/operators';\n\n@Component({\n\tselector: 'ng-doc-sidebar-category',\n\ttemplateUrl: './sidebar-category.component.html',\n\tstyleUrls: ['./sidebar-category.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgDocRouteActiveDirective,\n\t\tNgIf,\n\t\tNgDocDotComponent,\n\t\tNgDocTextComponent,\n\t\tNgDocIconComponent,\n\t\tNgDocTextLeftDirective,\n\t\tNgDocRotatorDirective,\n\t\tNgDocExpanderComponent,\n\t\tPolymorpheusModule,\n\t],\n})\n@UntilDestroy()\nexport class NgDocSidebarCategoryComponent implements OnInit {\n\t@Input()\n\tcategory?: NgDocNavigation;\n\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-is-root')\n\tisRoot: boolean = false;\n\n\t@Input()\n\tcontent: NgDocContent = '';\n\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-expandable')\n\texpandable: boolean = true;\n\n\t@Input()\n\texpanded: boolean = true;\n\n\tconstructor(\n\t\tprivate readonly router: Router,\n\t\tprivate readonly changeDetectorRef: ChangeDetectorRef,\n\t) {}\n\n\tngOnInit(): void {\n\t\t/**\n\t\t * We need to update this component every time a navigation occurs to expand the category if its child node is currently rendered\n\t\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\tstartWith(null),\n\t\t\t\tfilter(() => this.router.url.includes(this.category?.route ?? '', 0)),\n\t\t\t\tuntilDestroyed(this),\n\t\t\t)\n\t\t\t.subscribe(() => this.expand());\n\t}\n\n\ttoggle(): void {\n\t\tthis.expanded ? this.collapse() : this.expand();\n\t}\n\n\texpand(): void {\n\t\tif (this.category?.expandable) {\n\t\t\tthis.expanded = true;\n\t\t\tthis.changeDetectorRef.markForCheck();\n\t\t}\n\t}\n\n\tcollapse(): void {\n\t\tif (this.category?.expandable) {\n\t\t\tthis.expanded = false;\n\t\t\tthis.changeDetectorRef.markForCheck();\n\t\t}\n\t}\n}\n","<div class=\"ng-doc-sidebar-category-wrapper\">\n\t<div class=\"ng-doc-sidebar-category-button\" (click)=\"toggle()\">\n\t\t<div\n\t\t\tclass=\"ng-doc-sidebar-category\"\n\t\t\t[ngDocRouteActive]=\"category?.route ?? ''\"\n\t\t\tactiveClass=\"active\">\n\t\t\t<ng-doc-dot *ngIf=\"!expandable\"></ng-doc-dot>\n\t\t\t<span ng-doc-text [color]=\"expandable ? 'normal' : 'muted'\">\n\t\t\t\t<ng-doc-icon\n\t\t\t\t\ticon=\"chevron-right\"\n\t\t\t\t\t*ngIf=\"category?.expandable\"\n\t\t\t\t\t[ngDocRotator]=\"expanded\"\n\t\t\t\t\tngDocTextLeft>\n\t\t\t\t</ng-doc-icon>\n\t\t\t\t{{ category?.title }}\n\t\t\t</span>\n\t\t</div>\n\t\t<!--\t\t<div ng-doc-text color=\"muted\" size=\"small\">Some description</div>-->\n\t</div>\n\t<ng-doc-expander [expanded]=\"expanded\" [content]=\"contentTemplate\">\n\t\t<ng-template #contentTemplate>\n\t\t\t<div class=\"ng-doc-sidebar-category-children\">\n\t\t\t\t<!--We wrap content via ng-template to save state of the child components -->\n\t\t\t\t<ng-content></ng-content>\n\t\t\t\t<ng-container *polymorpheusOutlet=\"content\"></ng-container>\n\t\t\t</div>\n\t\t</ng-template>\n\t</ng-doc-expander>\n</div>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { NgDocNavigation } from '@ng-doc/app/interfaces';\nimport { NgDocDotComponent, NgDocTextComponent } from '@ng-doc/ui-kit';\n\n@Component({\n\tselector: 'ng-doc-sidebar-item',\n\ttemplateUrl: './sidebar-item.component.html',\n\tstyleUrls: ['./sidebar-item.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [RouterLinkActive, RouterLink, NgDocDotComponent, NgDocTextComponent],\n})\nexport class NgDocSidebarItemComponent {\n\t@Input()\n\titem?: NgDocNavigation;\n}\n","<a class=\"ng-doc-sidebar-link\" [routerLink]=\"[item?.route ?? '']\" routerLinkActive=\"active\">\n\t<ng-doc-dot></ng-doc-dot>\n\t<span ng-doc-text [absoluteContent]=\"true\">\n\t\t{{ item?.title }}\n\t</span>\n</a>\n","import { NgFor, NgIf, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { NgDocContext, NgDocNavigation } from '@ng-doc/app/interfaces';\nimport { NG_DOC_CONTEXT } from '@ng-doc/app/tokens';\nimport { NgDocBindPipe, NgDocExecutePipe } from '@ng-doc/ui-kit';\n\nimport { NgDocSidebarCategoryComponent } from './sidebar-category/sidebar-category.component';\nimport { NgDocSidebarItemComponent } from './sidebar-item/sidebar-item.component';\n\n@Component({\n\tselector: 'ng-doc-sidebar',\n\ttemplateUrl: './sidebar.component.html',\n\tstyleUrls: ['./sidebar.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgFor,\n\t\tNgTemplateOutlet,\n\t\tNgIf,\n\t\tNgDocSidebarCategoryComponent,\n\t\tNgDocSidebarItemComponent,\n\t\tNgDocExecutePipe,\n\t\tNgDocBindPipe,\n\t],\n\thost: { ngSkipHydration: 'true' },\n})\nexport class NgDocSidebarComponent {\n\tconstructor(\n\t\t@Inject(NG_DOC_CONTEXT)\n\t\treadonly context: NgDocContext,\n\t) {}\n\n\tgetNavigation(nav?: NgDocNavigation): NgDocNavigation[] {\n\t\treturn nav ? nav.children ?? [] : this.context.navigation;\n\t}\n}\n","<div class=\"ng-doc-side-bar-wrapper\">\n\t<ng-container *ngFor=\"let item of getNavigation | bind: this | execute\">\n\t\t<ng-container\n\t\t\t*ngTemplateOutlet=\"sidebarTemplate; context: { item: this.item, root: true }\"></ng-container>\n\t</ng-container>\n\n\t<ng-template let-item=\"item\" let-root=\"root\" #sidebarTemplate>\n\t\t<ng-container *ngIf=\"item.children?.length; else itemTemplate\">\n\t\t\t<ng-doc-sidebar-category\n\t\t\t\t*ngIf=\"!item.hidden\"\n\t\t\t\t[category]=\"item\"\n\t\t\t\t[expandable]=\"!!item?.expandable\"\n\t\t\t\t[expanded]=\"!!item?.expanded || !item?.expandable\"\n\t\t\t\t[isRoot]=\"!!root\"\n\t\t\t\t[content]=\"categoryContent\">\n\t\t\t\t<ng-template #categoryContent>\n\t\t\t\t\t<ng-container *ngFor=\"let child of getNavigation | bind: this | execute: item\">\n\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t*ngTemplateOutlet=\"\n\t\t\t\t\t\t\t\tsidebarTemplate;\n\t\t\t\t\t\t\t\tcontext: { item: child, root: false }\n\t\t\t\t\t\t\t\"></ng-container>\n\t\t\t\t\t</ng-container>\n\t\t\t\t</ng-template>\n\t\t\t</ng-doc-sidebar-category>\n\t\t</ng-container>\n\n\t\t<ng-template #itemTemplate>\n\t\t\t<ng-doc-sidebar-item [item]=\"item\" *ngIf=\"!item.hidden\"></ng-doc-sidebar-item>\n\t\t</ng-template>\n\t</ng-template>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from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AA,EAAA,IAAA,EACJ,6BAA6B,EAC7B,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,SAAA,EAAA,YAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,yBAAyB,EACzB,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,gBAAgB,2CAChB,aAAa,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAIF,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAjBjC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,mBAGT,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACR,KAAK;wBACL,gBAAgB;wBAChB,IAAI;wBACJ,6BAA6B;wBAC7B,yBAAyB;wBACzB,gBAAgB;wBAChB,aAAa;AACb,qBAAA,EAAA,IAAA,EACK,EAAE,eAAe,EAAE,MAAM,EAAE,EAAA,QAAA,EAAA,svCAAA,EAAA,MAAA,EAAA,CAAA,iaAAA,CAAA,EAAA,CAAA;;0BAI/B,MAAM;2BAAC,cAAc,CAAA;;;AE5BxB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-doc-app-components-sidebar.mjs","sources":["../../../../libs/app/components/sidebar/sidebar-category/sidebar-category.component.ts","../../../../libs/app/components/sidebar/sidebar-category/sidebar-category.component.html","../../../../libs/app/components/sidebar/sidebar-item/sidebar-item.component.ts","../../../../libs/app/components/sidebar/sidebar-item/sidebar-item.component.html","../../../../libs/app/components/sidebar/sidebar.component.ts","../../../../libs/app/components/sidebar/sidebar.component.html","../../../../libs/app/components/sidebar/ng-doc-app-components-sidebar.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tHostBinding,\n\tInput,\n\tOnInit,\n} from '@angular/core';\nimport { Event, NavigationEnd, Router } from '@angular/router';\nimport { NgDocRouteActiveDirective } from '@ng-doc/app/directives/route-active';\nimport { NgDocNavigation } from '@ng-doc/app/interfaces';\nimport {\n\tNgDocDotComponent,\n\tNgDocExpanderComponent,\n\tNgDocIconComponent,\n\tNgDocRotatorDirective,\n\tNgDocTextComponent,\n\tNgDocTextLeftDirective,\n} from '@ng-doc/ui-kit';\nimport { NgDocContent } from '@ng-doc/ui-kit/types';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport { filter, startWith } from 'rxjs/operators';\n\n@Component({\n\tselector: 'ng-doc-sidebar-category',\n\ttemplateUrl: './sidebar-category.component.html',\n\tstyleUrls: ['./sidebar-category.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgDocRouteActiveDirective,\n\t\tNgIf,\n\t\tNgDocDotComponent,\n\t\tNgDocTextComponent,\n\t\tNgDocIconComponent,\n\t\tNgDocTextLeftDirective,\n\t\tNgDocRotatorDirective,\n\t\tNgDocExpanderComponent,\n\t\tPolymorpheusModule,\n\t],\n})\n@UntilDestroy()\nexport class NgDocSidebarCategoryComponent implements OnInit {\n\t@Input()\n\tcategory?: NgDocNavigation;\n\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-is-root')\n\tisRoot: boolean = false;\n\n\t@Input()\n\tcontent: NgDocContent = '';\n\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-expandable')\n\texpandable: boolean = true;\n\n\t@Input()\n\texpanded: boolean = true;\n\n\tconstructor(\n\t\tprivate readonly router: Router,\n\t\tprivate readonly changeDetectorRef: ChangeDetectorRef,\n\t) {}\n\n\tngOnInit(): void {\n\t\t/**\n\t\t * We need to update this component every time a navigation occurs to expand the category if its child node is currently rendered\n\t\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\tstartWith(null),\n\t\t\t\tfilter(() => this.router.url.includes(this.category?.route ?? '', 0)),\n\t\t\t\tuntilDestroyed(this),\n\t\t\t)\n\t\t\t.subscribe(() => this.expand());\n\t}\n\n\ttoggle(): void {\n\t\tthis.expanded ? this.collapse() : this.expand();\n\t}\n\n\texpand(): void {\n\t\tif (this.category?.expandable) {\n\t\t\tthis.expanded = true;\n\t\t\tthis.changeDetectorRef.markForCheck();\n\t\t}\n\t}\n\n\tcollapse(): void {\n\t\tif (this.category?.expandable) {\n\t\t\tthis.expanded = false;\n\t\t\tthis.changeDetectorRef.markForCheck();\n\t\t}\n\t}\n}\n","<div class=\"ng-doc-sidebar-category-wrapper\">\n\t<div class=\"ng-doc-sidebar-category-button\" (click)=\"toggle()\">\n\t\t<div\n\t\t\tclass=\"ng-doc-sidebar-category\"\n\t\t\t[ngDocRouteActive]=\"category?.route ?? ''\"\n\t\t\tactiveClass=\"active\">\n\t\t\t<ng-doc-dot *ngIf=\"!expandable\"></ng-doc-dot>\n\t\t\t<span ng-doc-text [color]=\"expandable ? 'normal' : 'muted'\">\n\t\t\t\t<ng-doc-icon\n\t\t\t\t\ticon=\"chevron-right\"\n\t\t\t\t\t*ngIf=\"category?.expandable\"\n\t\t\t\t\t[ngDocRotator]=\"expanded\"\n\t\t\t\t\tngDocTextLeft>\n\t\t\t\t</ng-doc-icon>\n\t\t\t\t{{ category?.title }}\n\t\t\t</span>\n\t\t</div>\n\t\t<!--\t\t<div ng-doc-text color=\"muted\" size=\"small\">Some description</div>-->\n\t</div>\n\t<ng-doc-expander [expanded]=\"expanded\" [content]=\"contentTemplate\">\n\t\t<ng-template #contentTemplate>\n\t\t\t<div class=\"ng-doc-sidebar-category-children\">\n\t\t\t\t<!--We wrap content via ng-template to save state of the child components -->\n\t\t\t\t<ng-content></ng-content>\n\t\t\t\t<ng-container *polymorpheusOutlet=\"content\"></ng-container>\n\t\t\t</div>\n\t\t</ng-template>\n\t</ng-doc-expander>\n</div>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { NgDocNavigation } from '@ng-doc/app/interfaces';\nimport { NgDocDotComponent, NgDocTextComponent } from '@ng-doc/ui-kit';\n\n@Component({\n\tselector: 'ng-doc-sidebar-item',\n\ttemplateUrl: './sidebar-item.component.html',\n\tstyleUrls: ['./sidebar-item.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [RouterLinkActive, RouterLink, NgDocDotComponent, NgDocTextComponent],\n})\nexport class NgDocSidebarItemComponent {\n\t@Input()\n\titem?: NgDocNavigation;\n}\n","<a class=\"ng-doc-sidebar-link\" [routerLink]=\"[item?.route ?? '']\" routerLinkActive=\"active\">\n\t<ng-doc-dot></ng-doc-dot>\n\t<span ng-doc-text [absoluteContent]=\"true\">\n\t\t{{ item?.title }}\n\t</span>\n</a>\n","import { NgFor, NgIf, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { NgDocContext, NgDocNavigation } from '@ng-doc/app/interfaces';\nimport { NG_DOC_CONTEXT } from '@ng-doc/app/tokens';\nimport { NgDocBindPipe, NgDocExecutePipe } from '@ng-doc/ui-kit';\n\nimport { NgDocSidebarCategoryComponent } from './sidebar-category/sidebar-category.component';\nimport { NgDocSidebarItemComponent } from './sidebar-item/sidebar-item.component';\n\n@Component({\n\tselector: 'ng-doc-sidebar',\n\ttemplateUrl: './sidebar.component.html',\n\tstyleUrls: ['./sidebar.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgFor,\n\t\tNgTemplateOutlet,\n\t\tNgIf,\n\t\tNgDocSidebarCategoryComponent,\n\t\tNgDocSidebarItemComponent,\n\t\tNgDocExecutePipe,\n\t\tNgDocBindPipe,\n\t],\n\thost: { ngSkipHydration: 'true' },\n})\nexport class NgDocSidebarComponent {\n\tconstructor(\n\t\t@Inject(NG_DOC_CONTEXT)\n\t\treadonly context: NgDocContext,\n\t) {}\n\n\tgetNavigation(nav?: NgDocNavigation): NgDocNavigation[] {\n\t\treturn nav ? nav.children ?? [] : this.context.navigation;\n\t}\n}\n","<div class=\"ng-doc-side-bar-wrapper\">\n\t<ng-container *ngFor=\"let item of getNavigation | bind: this | execute\">\n\t\t<ng-container\n\t\t\t*ngTemplateOutlet=\"sidebarTemplate; context: { item: this.item, root: true }\"></ng-container>\n\t</ng-container>\n\n\t<ng-template let-item=\"item\" let-root=\"root\" #sidebarTemplate>\n\t\t<ng-container *ngIf=\"item.children?.length; else itemTemplate\">\n\t\t\t<ng-doc-sidebar-category\n\t\t\t\t*ngIf=\"!item.hidden\"\n\t\t\t\t[category]=\"item\"\n\t\t\t\t[expandable]=\"!!item?.expandable\"\n\t\t\t\t[expanded]=\"!!item?.expanded || !item?.expandable\"\n\t\t\t\t[isRoot]=\"!!root\"\n\t\t\t\t[content]=\"categoryContent\">\n\t\t\t\t<ng-template #categoryContent>\n\t\t\t\t\t<ng-container *ngFor=\"let child of getNavigation | bind: this | execute: item\">\n\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t*ngTemplateOutlet=\"\n\t\t\t\t\t\t\t\tsidebarTemplate;\n\t\t\t\t\t\t\t\tcontext: { item: child, root: false }\n\t\t\t\t\t\t\t\"></ng-container>\n\t\t\t\t\t</ng-container>\n\t\t\t\t</ng-template>\n\t\t\t</ng-doc-sidebar-category>\n\t\t</ng-container>\n\n\t\t<ng-template #itemTemplate>\n\t\t\t<ng-doc-sidebar-item [item]=\"item\" *ngIf=\"!item.hidden\"></ng-doc-sidebar-item>\n\t\t</ng-template>\n\t</ng-template>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n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AAA,IAAA,EACJ,6BAA6B,EAC7B,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,SAAA,EAAA,YAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,yBAAyB,EACzB,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,gBAAgB,2CAChB,aAAa,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAIF,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAjBjC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,mBAGT,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACR,KAAK;wBACL,gBAAgB;wBAChB,IAAI;wBACJ,6BAA6B;wBAC7B,yBAAyB;wBACzB,gBAAgB;wBAChB,aAAa;AACb,qBAAA,EAAA,IAAA,EACK,EAAE,eAAe,EAAE,MAAM,EAAE,EAAA,QAAA,EAAA,svCAAA,EAAA,MAAA,EAAA,CAAA,iaAAA,CAAA,EAAA,CAAA;;0BAI/B,MAAM;2BAAC,cAAc,CAAA;;;AE5BxB;;AAEG;;;;"}
|
|
@@ -15,10 +15,10 @@ class NgDocTabsComponent {
|
|
|
15
15
|
appendElement(element, parent) {
|
|
16
16
|
parent.appendChild(element);
|
|
17
17
|
}
|
|
18
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
19
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.2", type: NgDocTabsComponent, isStandalone: true, selector: "ng-doc-tabs", inputs: { tabs: "tabs" }, ngImport: i0, template: "<ng-doc-tab-group [openedTab]=\"getActiveIndex | execute: tabs\">\n\t<ng-doc-tab *ngFor=\"let tab of tabs; let i = index\" [label]=\"label\" [content]=\"content\" [id]=\"i\">\n\t\t<ng-template #label>\n\t\t\t<ng-doc-icon [customIcon]=\"tab.icon\" *ngIf=\"tab.icon\"></ng-doc-icon>\n\t\t\t{{ tab.title }}\n\t\t</ng-template>\n\t\t<ng-template #content>\n\t\t\t<div #element>\n\t\t\t\t{{ appendElement | execute: tab.content:element }}\n\t\t\t</div>\n\t\t</ng-template>\n\t</ng-doc-tab>\n</ng-doc-tab-group>\n", styles: [":host{display:block;border-radius:var(--ng-doc-tabs-border-radius);border:var(--ng-doc-tabs-border);margin:var(--ng-doc-tabs-margin);overflow:hidden;--ng-doc-code-margin: 0;--ng-doc-code-border-radius: 0;--ng-doc-code-border: none;--ng-doc-tab-group-header-background: var(--ng-doc-base-2)}:host ng-doc-icon{margin-right:calc(var(--ng-doc-base-gutter) / 2)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocTabGroupComponent, selector: "ng-doc-tab-group", inputs: ["openedTab"] }, { kind: "component", type: NgDocTabComponent, selector: "ng-doc-tab", inputs: ["label", "id", "content"] }, { kind: "pipe", type: NgDocExecutePipe, name: "execute" }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocTabsComponent, decorators: [{
|
|
22
22
|
type: Component,
|
|
23
23
|
args: [{ selector: 'ng-doc-tabs', standalone: true, imports: [
|
|
24
24
|
CommonModule,
|
|
@@ -38,8 +38,8 @@ class NgDocThemeToggleComponent {
|
|
|
38
38
|
this.themeService.set(theme?.id);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
42
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocThemeToggleComponent, deps: [{ token: i1.NgDocThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
42
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.2", type: NgDocThemeToggleComponent, isStandalone: true, selector: "ng-doc-theme-toggle", ngImport: i0, template: "<button ng-doc-button-icon size=\"large\" (click)=\"toggleTheme()\" [ngDocTooltip]=\"tooltipContent\">\n\t<ng-template #tooltipContent>\n\t\t<ng-doc-smooth-resize [trigger]=\"nextTheme.name\">\n\t\t\tSet \"{{ nextTheme.name }}\" theme\n\t\t</ng-doc-smooth-resize>\n\t</ng-template>\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 === themes[1]\"></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 === themes[2]\"></ng-doc-icon>\n\t<div\n\t\tclass=\"letter\"\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\t*ngIf=\"nextTheme === themes[0]\">\n\t\tA\n\t</div>\n</button>\n", styles: [":host{display:inline-block;height:40px;width:40px}:host .letter{font-family:var(--ng-doc-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);--ng-doc-font-size: 26px;--ng-doc-font-weight: 600}\n"], dependencies: [{ kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon]", inputs: ["size", "rounded"] }, { 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: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "component", type: NgDocSmoothResizeComponent, selector: "ng-doc-smooth-resize", inputs: ["trigger", "animateOpacity"] }], animations: [
|
|
43
43
|
trigger('switchIcon', [
|
|
44
44
|
transition(':enter', [
|
|
45
45
|
style({ transform: 'translateX({{from}})', position: 'absolute', opacity: 0 }),
|
|
@@ -52,7 +52,7 @@ class NgDocThemeToggleComponent {
|
|
|
52
52
|
]),
|
|
53
53
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
54
54
|
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocThemeToggleComponent, decorators: [{
|
|
56
56
|
type: Component,
|
|
57
57
|
args: [{ animations: [
|
|
58
58
|
trigger('switchIcon', [
|
|
@@ -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/ng-doc-app-components-theme-toggle.ts"],"sourcesContent":["import { animate, style, transition, trigger } from '@angular/animations';\nimport { NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { NG_DOC_NIGHT_THEME } from '@ng-doc/app/constants';\nimport { NgDocTheme } from '@ng-doc/app/interfaces';\nimport { NgDocThemeService } from '@ng-doc/app/services';\nimport {\n\tNgDocButtonIconComponent,\n\tNgDocIconComponent,\n\tNgDocSmoothResizeComponent,\n\tNgDocTooltipDirective,\n} from '@ng-doc/ui-kit';\n\ninterface ToggleTheme {\n\tname: string;\n\ttheme: NgDocTheme | 'auto' | undefined;\n}\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\tstandalone: true,\n\timports: [\n\t\tNgDocButtonIconComponent,\n\t\tNgDocTooltipDirective,\n\t\tNgIf,\n\t\tNgDocIconComponent,\n\t\tNgDocSmoothResizeComponent,\n\t],\n})\nexport class NgDocThemeToggleComponent {\n\tprotected readonly themes: ToggleTheme[] = [\n\t\t{ name: 'Auto', theme: 'auto' },\n\t\t{ name: 'Light', theme: undefined },\n\t\t{ name: 'Dark', theme: NG_DOC_NIGHT_THEME },\n\t];\n\n\tconstructor(protected readonly themeService: NgDocThemeService) {}\n\n\tget currentTheme(): ToggleTheme {\n\t\tif (this.themeService.isAutoThemeEnabled) {\n\t\t\treturn this.themes[0];\n\t\t}\n\n\t\tconst theme = this.themeService.currentTheme;\n\n\t\treturn this.themes.find(({ theme: t }) => t === theme) ?? this.themes[0];\n\t}\n\n\tget nextTheme(): ToggleTheme {\n\t\tif (this.themeService.isAutoThemeEnabled) {\n\t\t\treturn this.themes[1];\n\t\t}\n\n\t\tconst index = this.themes.findIndex(({ theme }) => theme === this.themeService.currentTheme);\n\n\t\treturn this.themes[(index + 1) % this.themes.length];\n\t}\n\n\ttoggleTheme(): void {\n\t\tconst { theme } = this.nextTheme;\n\n\t\tif (theme === 'auto') {\n\t\t\tthis.themeService.enableAutoTheme(undefined, NG_DOC_NIGHT_THEME);\n\t\t} else {\n\t\t\tthis.themeService.set(theme?.id);\n\t\t}\n\t}\n}\n","<button ng-doc-button-icon size=\"large\" (click)=\"toggleTheme()\" [ngDocTooltip]=\"tooltipContent\">\n\t<ng-template #tooltipContent>\n\t\t<ng-doc-smooth-resize [trigger]=\"nextTheme.name\">\n\t\t\tSet \"{{ nextTheme.name }}\" theme\n\t\t</ng-doc-smooth-resize>\n\t</ng-template>\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 === themes[1]\"></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 === themes[2]\"></ng-doc-icon>\n\t<div\n\t\tclass=\"letter\"\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\t*ngIf=\"nextTheme === themes[0]\">\n\t\tA\n\t</div>\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MA0Da,yBAAyB,CAAA;AAOrC,IAAA,WAAA,CAA+B,YAA+B,EAAA;QAA/B,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAmB;AAN3C,QAAA,IAAA,CAAA,MAAM,GAAkB;AAC1C,YAAA,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;AAC/B,YAAA,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE;AACnC,YAAA,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,EAAE;SAC3C,CAAC;KAEgE;AAElE,IAAA,IAAI,YAAY,GAAA;AACf,QAAA,IAAI,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE;AACzC,YAAA,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;
|
|
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/ng-doc-app-components-theme-toggle.ts"],"sourcesContent":["import { animate, style, transition, trigger } from '@angular/animations';\nimport { NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { NG_DOC_NIGHT_THEME } from '@ng-doc/app/constants';\nimport { NgDocTheme } from '@ng-doc/app/interfaces';\nimport { NgDocThemeService } from '@ng-doc/app/services';\nimport {\n\tNgDocButtonIconComponent,\n\tNgDocIconComponent,\n\tNgDocSmoothResizeComponent,\n\tNgDocTooltipDirective,\n} from '@ng-doc/ui-kit';\n\ninterface ToggleTheme {\n\tname: string;\n\ttheme: NgDocTheme | 'auto' | undefined;\n}\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\tstandalone: true,\n\timports: [\n\t\tNgDocButtonIconComponent,\n\t\tNgDocTooltipDirective,\n\t\tNgIf,\n\t\tNgDocIconComponent,\n\t\tNgDocSmoothResizeComponent,\n\t],\n})\nexport class NgDocThemeToggleComponent {\n\tprotected readonly themes: ToggleTheme[] = [\n\t\t{ name: 'Auto', theme: 'auto' },\n\t\t{ name: 'Light', theme: undefined },\n\t\t{ name: 'Dark', theme: NG_DOC_NIGHT_THEME },\n\t];\n\n\tconstructor(protected readonly themeService: NgDocThemeService) {}\n\n\tget currentTheme(): ToggleTheme {\n\t\tif (this.themeService.isAutoThemeEnabled) {\n\t\t\treturn this.themes[0];\n\t\t}\n\n\t\tconst theme = this.themeService.currentTheme;\n\n\t\treturn this.themes.find(({ theme: t }) => t === theme) ?? this.themes[0];\n\t}\n\n\tget nextTheme(): ToggleTheme {\n\t\tif (this.themeService.isAutoThemeEnabled) {\n\t\t\treturn this.themes[1];\n\t\t}\n\n\t\tconst index = this.themes.findIndex(({ theme }) => theme === this.themeService.currentTheme);\n\n\t\treturn this.themes[(index + 1) % this.themes.length];\n\t}\n\n\ttoggleTheme(): void {\n\t\tconst { theme } = this.nextTheme;\n\n\t\tif (theme === 'auto') {\n\t\t\tthis.themeService.enableAutoTheme(undefined, NG_DOC_NIGHT_THEME);\n\t\t} else {\n\t\t\tthis.themeService.set(theme?.id);\n\t\t}\n\t}\n}\n","<button ng-doc-button-icon size=\"large\" (click)=\"toggleTheme()\" [ngDocTooltip]=\"tooltipContent\">\n\t<ng-template #tooltipContent>\n\t\t<ng-doc-smooth-resize [trigger]=\"nextTheme.name\">\n\t\t\tSet \"{{ nextTheme.name }}\" theme\n\t\t</ng-doc-smooth-resize>\n\t</ng-template>\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 === themes[1]\"></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 === themes[2]\"></ng-doc-icon>\n\t<div\n\t\tclass=\"letter\"\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\t*ngIf=\"nextTheme === themes[0]\">\n\t\tA\n\t</div>\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MA0Da,yBAAyB,CAAA;AAOrC,IAAA,WAAA,CAA+B,YAA+B,EAAA;QAA/B,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAmB;AAN3C,QAAA,IAAA,CAAA,MAAM,GAAkB;AAC1C,YAAA,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;AAC/B,YAAA,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE;AACnC,YAAA,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,EAAE;SAC3C,CAAC;KAEgE;AAElE,IAAA,IAAI,YAAY,GAAA;AACf,QAAA,IAAI,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE;AACzC,YAAA,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;SACtB;AAED,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC;QAE7C,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KACzE;AAED,IAAA,IAAI,SAAS,GAAA;AACZ,QAAA,IAAI,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE;AACzC,YAAA,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CA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CAAC;AACF,qBAAA,EAAA,QAAA,EACS,qBAAqB,EAGd,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACR,wBAAwB;wBACxB,qBAAqB;wBACrB,IAAI;wBACJ,kBAAkB;wBAClB,0BAA0B;AAC1B,qBAAA,EAAA,QAAA,EAAA,40BAAA,EAAA,MAAA,EAAA,CAAA,+TAAA,CAAA,EAAA,CAAA;;;AExDF;;AAEG;;;;"}
|
|
@@ -16,10 +16,10 @@ class NgDocTocElementComponent {
|
|
|
16
16
|
this.level = 1;
|
|
17
17
|
this.elementRef = inject(ElementRef);
|
|
18
18
|
}
|
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
20
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.
|
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocTocElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
20
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.2", type: NgDocTocElementComponent, isStandalone: true, selector: "li[ng-doc-toc-element]", inputs: { href: "href", selected: "selected", level: "level" }, host: { properties: { "attr.data-ng-doc-selected": "this.selected", "attr.data-ng-doc-level": "this.level" } }, ngImport: i0, template: "<a [href]=\"href\" [style.padding-left]=\"'calc(var(--ng-doc-toc-indent) * ' + level + ')'\">\n\t<ng-content></ng-content>\n</a>\n", styles: [":host{display:flex;margin:0;color:var(--ng-doc-text)}:host[data-ng-doc-level=\"1\"] a{padding-left:var(--ng-doc-base-gutter)}:host[data-ng-doc-selected=true]{color:var(--ng-doc-primary)}:host:hover{cursor:pointer;color:var(--ng-doc-primary)}:host a{font-family:var(--ng-doc-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);padding:calc(var(--ng-doc-base-gutter) / 2);color:inherit;width:100%;text-decoration:none;word-break:break-word;--ng-doc-font-size: 14px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21
21
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocTocElementComponent, decorators: [{
|
|
23
23
|
type: Component,
|
|
24
24
|
args: [{ selector: 'li[ng-doc-toc-element]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<a [href]=\"href\" [style.padding-left]=\"'calc(var(--ng-doc-toc-indent) * ' + level + ')'\">\n\t<ng-content></ng-content>\n</a>\n", styles: [":host{display:flex;margin:0;color:var(--ng-doc-text)}:host[data-ng-doc-level=\"1\"] a{padding-left:var(--ng-doc-base-gutter)}:host[data-ng-doc-selected=true]{color:var(--ng-doc-primary)}:host:hover{cursor:pointer;color:var(--ng-doc-primary)}:host a{font-family:var(--ng-doc-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);padding:calc(var(--ng-doc-base-gutter) / 2);color:inherit;width:100%;text-decoration:none;word-break:break-word;--ng-doc-font-size: 14px}\n"] }]
|
|
25
25
|
}], propDecorators: { href: [{
|
|
@@ -95,14 +95,14 @@ let NgDocTocComponent = class NgDocTocComponent {
|
|
|
95
95
|
}
|
|
96
96
|
this.activeItem.set(item);
|
|
97
97
|
}
|
|
98
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
99
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.
|
|
98
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocTocComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
99
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.2", type: NgDocTocComponent, isStandalone: true, selector: "ng-doc-toc", inputs: { tableOfContent: "tableOfContent" }, viewQueries: [{ propertyName: "selection", first: true, predicate: ["selection"], descendants: true, read: ElementRef }, { propertyName: "elements", predicate: NgDocTocElementComponent, descendants: true }], ngImport: i0, template: "<div class=\"ng-doc-toc-wrapper\">\n\t<div class=\"ng-doc-toc-container\">\n\t\t<div class=\"ng-doc-toc-selection\" #selection></div>\n\t\t<ul class=\"ng-doc-toc\">\n\t\t\t@for (item of tableOfContent; track item) {\n\t\t\t<li\n\t\t\t\tng-doc-toc-element\n\t\t\t\t[href]=\"item.path\"\n\t\t\t\t[level]=\"item.level\"\n\t\t\t\t[selected]=\"item === activeItem()\">\n\t\t\t\t{{ item.title }}\n\t\t\t</li>\n\t\t\t}\n\t\t</ul>\n\t</div>\n</div>\n", styles: [":host .ng-doc-toc-wrapper{position:relative;width:var(--ng-doc-toc-width)}:host .ng-doc-toc-wrapper .ng-doc-toc-container{position:fixed;overflow-y:auto;height:calc(100% - var(--ng-doc-navbar-height) - var(--ng-doc-base-gutter) * 5);width:var(--ng-doc-toc-width)}:host .ng-doc-toc-wrapper .ng-doc-toc-selection{position:absolute;transform:translate(-50%);width:calc(var(--ng-doc-base-gutter) / 2);border-radius:calc(var(--ng-doc-base-gutter) / 2);background-color:var(--ng-doc-primary);left:calc(var(--ng-doc-toc-margin) + 1px);transition:var(--ng-doc-transition)}:host .ng-doc-toc-wrapper .ng-doc-toc{list-style:none;margin:0 0 0 var(--ng-doc-toc-margin);border-left:1px solid var(--ng-doc-base-3);padding:0 0 0 var(--ng-doc-base-gutter)}@media (max-width: 1200px){:host .ng-doc-toc-wrapper{display:none}}\n"], dependencies: [{ kind: "component", type: NgDocTocElementComponent, selector: "li[ng-doc-toc-element]", inputs: ["href", "selected", "level"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
100
100
|
};
|
|
101
101
|
NgDocTocComponent = __decorate([
|
|
102
102
|
UntilDestroy(),
|
|
103
103
|
__metadata("design:paramtypes", [])
|
|
104
104
|
], NgDocTocComponent);
|
|
105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocTocComponent, decorators: [{
|
|
106
106
|
type: Component,
|
|
107
107
|
args: [{ selector: 'ng-doc-toc', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgFor, NgDocTocElementComponent, NgDocMediaQueryDirective], template: "<div class=\"ng-doc-toc-wrapper\">\n\t<div class=\"ng-doc-toc-container\">\n\t\t<div class=\"ng-doc-toc-selection\" #selection></div>\n\t\t<ul class=\"ng-doc-toc\">\n\t\t\t@for (item of tableOfContent; track item) {\n\t\t\t<li\n\t\t\t\tng-doc-toc-element\n\t\t\t\t[href]=\"item.path\"\n\t\t\t\t[level]=\"item.level\"\n\t\t\t\t[selected]=\"item === activeItem()\">\n\t\t\t\t{{ item.title }}\n\t\t\t</li>\n\t\t\t}\n\t\t</ul>\n\t</div>\n</div>\n", styles: [":host .ng-doc-toc-wrapper{position:relative;width:var(--ng-doc-toc-width)}:host .ng-doc-toc-wrapper .ng-doc-toc-container{position:fixed;overflow-y:auto;height:calc(100% - var(--ng-doc-navbar-height) - var(--ng-doc-base-gutter) * 5);width:var(--ng-doc-toc-width)}:host .ng-doc-toc-wrapper .ng-doc-toc-selection{position:absolute;transform:translate(-50%);width:calc(var(--ng-doc-base-gutter) / 2);border-radius:calc(var(--ng-doc-base-gutter) / 2);background-color:var(--ng-doc-primary);left:calc(var(--ng-doc-toc-margin) + 1px);transition:var(--ng-doc-transition)}:host .ng-doc-toc-wrapper .ng-doc-toc{list-style:none;margin:0 0 0 var(--ng-doc-toc-margin);border-left:1px solid var(--ng-doc-base-3);padding:0 0 0 var(--ng-doc-base-gutter)}@media (max-width: 1200px){:host .ng-doc-toc-wrapper{display:none}}\n"] }]
|
|
108
108
|
}], ctorParameters: () => [], propDecorators: { tableOfContent: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-components-toc.mjs","sources":["../../../../libs/app/components/toc/toc-element/toc-element.component.ts","../../../../libs/app/components/toc/toc-element/toc-element.component.html","../../../../libs/app/components/toc/toc.component.ts","../../../../libs/app/components/toc/toc.component.html","../../../../libs/app/components/toc/ng-doc-app-components-toc.ts"],"sourcesContent":["import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tHostBinding,\n\tinject,\n\tInput,\n} from '@angular/core';\n\n@Component({\n\tselector: 'li[ng-doc-toc-element]',\n\ttemplateUrl: './toc-element.component.html',\n\tstyleUrls: ['./toc-element.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n})\nexport class NgDocTocElementComponent {\n\t@Input()\n\thref: string = '';\n\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-selected')\n\tselected: boolean = false;\n\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-level')\n\tlevel: number = 1;\n\n\treadonly elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n}\n","<a [href]=\"href\" [style.padding-left]=\"'calc(var(--ng-doc-toc-indent) * ' + level + ')'\">\n\t<ng-content></ng-content>\n</a>\n","import { DOCUMENT, NgFor } from '@angular/common';\nimport {\n\tafterNextRender,\n\tAfterRenderPhase,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tinject,\n\tInput,\n\tNgZone,\n\tOnInit,\n\tQueryList,\n\tRenderer2,\n\tsignal,\n\tViewChild,\n\tViewChildren,\n\tWritableSignal,\n} from '@angular/core';\nimport { Event as REvent, Router, Scroll } from '@angular/router';\nimport { NgDocPageToc, NgDocTocItem } from '@ng-doc/app/interfaces';\nimport { isPresent } from '@ng-doc/core/helpers/is-present';\nimport { NgDocMediaQueryDirective, ngDocZoneOptimize } from '@ng-doc/ui-kit';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { fromEvent, merge, Observable } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, filter, map, startWith } from 'rxjs/operators';\n\nimport { NgDocTocElementComponent } from './toc-element/toc-element.component';\n\n@Component({\n\tselector: 'ng-doc-toc',\n\ttemplateUrl: './toc.component.html',\n\tstyleUrls: ['./toc.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [NgFor, NgDocTocElementComponent, NgDocMediaQueryDirective],\n})\n@UntilDestroy()\nexport class NgDocTocComponent implements NgDocPageToc, OnInit {\n\t@Input()\n\ttableOfContent: NgDocTocItem[] = [];\n\n\t@ViewChild('selection', { read: ElementRef })\n\tselection?: ElementRef<HTMLElement>;\n\n\t@ViewChildren(NgDocTocElementComponent)\n\telements: QueryList<NgDocTocElementComponent> = new QueryList<NgDocTocElementComponent>();\n\n\tactiveItem: WritableSignal<NgDocTocItem | undefined> = signal(undefined);\n\n\tprotected readonly document: Document = inject(DOCUMENT);\n\tprotected readonly ngZone: NgZone = inject(NgZone);\n\tprotected readonly changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\tprotected readonly renderer: Renderer2 = inject(Renderer2);\n\tprotected readonly router: Router = inject(Router);\n\n\tconstructor() {\n\t\tafterNextRender(\n\t\t\t() => {\n\t\t\t\tconst scrollSelection: Observable<NgDocTocItem> = fromEvent(this.document, 'scroll').pipe(\n\t\t\t\t\tfilter(() => !!this.tableOfContent.length),\n\t\t\t\t\tmap((event: Event) => (event.target as Document).scrollingElement as HTMLElement),\n\t\t\t\t\tstartWith(this.document.scrollingElement as HTMLElement),\n\t\t\t\t\tmap((target: HTMLElement) => {\n\t\t\t\t\t\tconst percentage: number =\n\t\t\t\t\t\t\t(target.scrollTop * 100) / (target.scrollHeight - target.offsetHeight);\n\t\t\t\t\t\tconst selectionLine: number =\n\t\t\t\t\t\t\ttarget.scrollTop + (target.offsetHeight * percentage) / 100;\n\n\t\t\t\t\t\tif (!this.tableOfContent.length) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn this.tableOfContent.reduce((pTarget: NgDocTocItem, cTarget: NgDocTocItem) => {\n\t\t\t\t\t\t\tconst pTop: number = pTarget.element.getBoundingClientRect().top + target.scrollTop;\n\t\t\t\t\t\t\tconst cTop: number = cTarget.element.getBoundingClientRect().top + target.scrollTop;\n\n\t\t\t\t\t\t\treturn Math.abs(cTop - selectionLine) < Math.abs(pTop - selectionLine)\n\t\t\t\t\t\t\t\t? cTarget\n\t\t\t\t\t\t\t\t: pTarget;\n\t\t\t\t\t\t});\n\t\t\t\t\t}),\n\t\t\t\t\tfilter(isPresent),\n\t\t\t\t);\n\n\t\t\t\tconst routerSelection: Observable<NgDocTocItem> = this.router.events.pipe(\n\t\t\t\t\tmap((event: REvent) => {\n\t\t\t\t\t\tif (event instanceof Scroll) {\n\t\t\t\t\t\t\tconst item: NgDocTocItem | undefined = this.tableOfContent.find(\n\t\t\t\t\t\t\t\t(item: NgDocTocItem) => item.path.includes(event.routerEvent.url),\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif (item) {\n\t\t\t\t\t\t\t\treturn item;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}),\n\t\t\t\t\tfilter(isPresent),\n\t\t\t\t\tdebounceTime(20),\n\t\t\t\t);\n\n\t\t\t\tconst elementsChanges = this.elements.changes.pipe(\n\t\t\t\t\tmap(() => this.activeItem()),\n\t\t\t\t\tfilter(isPresent),\n\t\t\t\t);\n\n\t\t\t\tmerge(merge(scrollSelection, routerSelection).pipe(distinctUntilChanged()), elementsChanges)\n\t\t\t\t\t.pipe(debounceTime(0), ngDocZoneOptimize(this.ngZone), untilDestroyed(this))\n\t\t\t\t\t.subscribe(this.select.bind(this));\n\t\t\t},\n\t\t\t{ phase: AfterRenderPhase.Write },\n\t\t);\n\t}\n\n\tngOnInit(): void {\n\t\tthis.activeItem.set(this.tableOfContent[0]);\n\t}\n\n\t/**\n\t * Selects the item in the table of content.\n\t * @param item - Item to select.\n\t */\n\tprotected select(item: NgDocTocItem): void {\n\t\tconst index: number = this.tableOfContent.indexOf(item);\n\n\t\tif (this.selection) {\n\t\t\tconst element: HTMLElement | undefined =\n\t\t\t\tthis.elements.toArray()[index]?.elementRef.nativeElement;\n\n\t\t\tif (element) {\n\t\t\t\tthis.renderer.setStyle(this.selection.nativeElement, 'top', `${element.offsetTop}px`);\n\t\t\t\tthis.renderer.setStyle(this.selection.nativeElement, 'height', `${element.offsetHeight}px`);\n\n\t\t\t\telement.scrollIntoView({ block: 'nearest' });\n\t\t\t}\n\t\t}\n\n\t\tthis.activeItem.set(item);\n\t}\n}\n","<div class=\"ng-doc-toc-wrapper\">\n\t<div class=\"ng-doc-toc-container\">\n\t\t<div class=\"ng-doc-toc-selection\" #selection></div>\n\t\t<ul class=\"ng-doc-toc\">\n\t\t\t@for (item of tableOfContent; track item) {\n\t\t\t<li\n\t\t\t\tng-doc-toc-element\n\t\t\t\t[href]=\"item.path\"\n\t\t\t\t[level]=\"item.level\"\n\t\t\t\t[selected]=\"item === activeItem()\">\n\t\t\t\t{{ item.title }}\n\t\t\t</li>\n\t\t\t}\n\t\t</ul>\n\t</div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAgBa,wBAAwB,CAAA;AAPrC,IAAA,WAAA,GAAA;QASC,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAIlB,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;QAI1B,IAAK,CAAA,KAAA,GAAW,CAAC,CAAC;AAET,QAAA,IAAA,CAAA,UAA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OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,uMAIG,UAAU,EAAA,EAAA,EAAA,YAAA,EAAA,UAAA,EAAA,SAAA,EAG5B,wBAAwB,EC7CvC,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,4bAgBA,k2BDmBkB,wBAAwB,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;AAG7B,iBAAiB,GAAA,UAAA,CAAA;AAD7B,IAAA,YAAY,EAAE;;AACF,CAAA,EAAA,iBAAiB,CAuG7B,CAAA;2FAvGY,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAT7B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAGL,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACnC,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,KAAK,EAAE,wBAAwB,EAAE,wBAAwB,CAAC,EAAA,QAAA,EAAA,4bAAA,EAAA,MAAA,EAAA,CAAA,0yBAAA,CAAA,EAAA,CAAA;wDAKpE,cAAc,EAAA,CAAA;sBADb,KAAK;gBAIN,SAAS,EAAA,CAAA;sBADR,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,WAAW,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;gBAI5C,QAAQ,EAAA,CAAA;sBADP,YAAY;uBAAC,wBAAwB,CAAA;;;AE7CvC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-doc-app-components-toc.mjs","sources":["../../../../libs/app/components/toc/toc-element/toc-element.component.ts","../../../../libs/app/components/toc/toc-element/toc-element.component.html","../../../../libs/app/components/toc/toc.component.ts","../../../../libs/app/components/toc/toc.component.html","../../../../libs/app/components/toc/ng-doc-app-components-toc.ts"],"sourcesContent":["import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tHostBinding,\n\tinject,\n\tInput,\n} from '@angular/core';\n\n@Component({\n\tselector: 'li[ng-doc-toc-element]',\n\ttemplateUrl: './toc-element.component.html',\n\tstyleUrls: ['./toc-element.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n})\nexport class NgDocTocElementComponent {\n\t@Input()\n\thref: string = '';\n\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-selected')\n\tselected: boolean = false;\n\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-level')\n\tlevel: number = 1;\n\n\treadonly elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n}\n","<a [href]=\"href\" [style.padding-left]=\"'calc(var(--ng-doc-toc-indent) * ' + level + ')'\">\n\t<ng-content></ng-content>\n</a>\n","import { DOCUMENT, NgFor } from '@angular/common';\nimport {\n\tafterNextRender,\n\tAfterRenderPhase,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tinject,\n\tInput,\n\tNgZone,\n\tOnInit,\n\tQueryList,\n\tRenderer2,\n\tsignal,\n\tViewChild,\n\tViewChildren,\n\tWritableSignal,\n} from '@angular/core';\nimport { Event as REvent, Router, Scroll } from '@angular/router';\nimport { NgDocPageToc, NgDocTocItem } from '@ng-doc/app/interfaces';\nimport { isPresent } from '@ng-doc/core/helpers/is-present';\nimport { NgDocMediaQueryDirective, ngDocZoneOptimize } from '@ng-doc/ui-kit';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { fromEvent, merge, Observable } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, filter, map, startWith } from 'rxjs/operators';\n\nimport { NgDocTocElementComponent } from './toc-element/toc-element.component';\n\n@Component({\n\tselector: 'ng-doc-toc',\n\ttemplateUrl: './toc.component.html',\n\tstyleUrls: ['./toc.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [NgFor, NgDocTocElementComponent, NgDocMediaQueryDirective],\n})\n@UntilDestroy()\nexport class NgDocTocComponent implements NgDocPageToc, OnInit {\n\t@Input()\n\ttableOfContent: NgDocTocItem[] = [];\n\n\t@ViewChild('selection', { read: ElementRef })\n\tselection?: ElementRef<HTMLElement>;\n\n\t@ViewChildren(NgDocTocElementComponent)\n\telements: QueryList<NgDocTocElementComponent> = new QueryList<NgDocTocElementComponent>();\n\n\tactiveItem: WritableSignal<NgDocTocItem | undefined> = signal(undefined);\n\n\tprotected readonly document: Document = inject(DOCUMENT);\n\tprotected readonly ngZone: NgZone = inject(NgZone);\n\tprotected readonly changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\tprotected readonly renderer: Renderer2 = inject(Renderer2);\n\tprotected readonly router: Router = inject(Router);\n\n\tconstructor() {\n\t\tafterNextRender(\n\t\t\t() => {\n\t\t\t\tconst scrollSelection: Observable<NgDocTocItem> = fromEvent(this.document, 'scroll').pipe(\n\t\t\t\t\tfilter(() => !!this.tableOfContent.length),\n\t\t\t\t\tmap((event: Event) => (event.target as Document).scrollingElement as HTMLElement),\n\t\t\t\t\tstartWith(this.document.scrollingElement as HTMLElement),\n\t\t\t\t\tmap((target: HTMLElement) => {\n\t\t\t\t\t\tconst percentage: number =\n\t\t\t\t\t\t\t(target.scrollTop * 100) / (target.scrollHeight - target.offsetHeight);\n\t\t\t\t\t\tconst selectionLine: number =\n\t\t\t\t\t\t\ttarget.scrollTop + (target.offsetHeight * percentage) / 100;\n\n\t\t\t\t\t\tif (!this.tableOfContent.length) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn this.tableOfContent.reduce((pTarget: NgDocTocItem, cTarget: NgDocTocItem) => {\n\t\t\t\t\t\t\tconst pTop: number = pTarget.element.getBoundingClientRect().top + target.scrollTop;\n\t\t\t\t\t\t\tconst cTop: number = cTarget.element.getBoundingClientRect().top + target.scrollTop;\n\n\t\t\t\t\t\t\treturn Math.abs(cTop - selectionLine) < Math.abs(pTop - selectionLine)\n\t\t\t\t\t\t\t\t? cTarget\n\t\t\t\t\t\t\t\t: pTarget;\n\t\t\t\t\t\t});\n\t\t\t\t\t}),\n\t\t\t\t\tfilter(isPresent),\n\t\t\t\t);\n\n\t\t\t\tconst routerSelection: Observable<NgDocTocItem> = this.router.events.pipe(\n\t\t\t\t\tmap((event: REvent) => {\n\t\t\t\t\t\tif (event instanceof Scroll) {\n\t\t\t\t\t\t\tconst item: NgDocTocItem | undefined = this.tableOfContent.find(\n\t\t\t\t\t\t\t\t(item: NgDocTocItem) => item.path.includes(event.routerEvent.url),\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif (item) {\n\t\t\t\t\t\t\t\treturn item;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}),\n\t\t\t\t\tfilter(isPresent),\n\t\t\t\t\tdebounceTime(20),\n\t\t\t\t);\n\n\t\t\t\tconst elementsChanges = this.elements.changes.pipe(\n\t\t\t\t\tmap(() => this.activeItem()),\n\t\t\t\t\tfilter(isPresent),\n\t\t\t\t);\n\n\t\t\t\tmerge(merge(scrollSelection, routerSelection).pipe(distinctUntilChanged()), elementsChanges)\n\t\t\t\t\t.pipe(debounceTime(0), ngDocZoneOptimize(this.ngZone), untilDestroyed(this))\n\t\t\t\t\t.subscribe(this.select.bind(this));\n\t\t\t},\n\t\t\t{ phase: AfterRenderPhase.Write },\n\t\t);\n\t}\n\n\tngOnInit(): void {\n\t\tthis.activeItem.set(this.tableOfContent[0]);\n\t}\n\n\t/**\n\t * Selects the item in the table of content.\n\t * @param item - Item to select.\n\t */\n\tprotected select(item: NgDocTocItem): void {\n\t\tconst index: number = this.tableOfContent.indexOf(item);\n\n\t\tif (this.selection) {\n\t\t\tconst element: HTMLElement | undefined =\n\t\t\t\tthis.elements.toArray()[index]?.elementRef.nativeElement;\n\n\t\t\tif (element) {\n\t\t\t\tthis.renderer.setStyle(this.selection.nativeElement, 'top', `${element.offsetTop}px`);\n\t\t\t\tthis.renderer.setStyle(this.selection.nativeElement, 'height', `${element.offsetHeight}px`);\n\n\t\t\t\telement.scrollIntoView({ block: 'nearest' });\n\t\t\t}\n\t\t}\n\n\t\tthis.activeItem.set(item);\n\t}\n}\n","<div class=\"ng-doc-toc-wrapper\">\n\t<div class=\"ng-doc-toc-container\">\n\t\t<div class=\"ng-doc-toc-selection\" #selection></div>\n\t\t<ul class=\"ng-doc-toc\">\n\t\t\t@for (item of tableOfContent; track item) {\n\t\t\t<li\n\t\t\t\tng-doc-toc-element\n\t\t\t\t[href]=\"item.path\"\n\t\t\t\t[level]=\"item.level\"\n\t\t\t\t[selected]=\"item === activeItem()\">\n\t\t\t\t{{ item.title }}\n\t\t\t</li>\n\t\t\t}\n\t\t</ul>\n\t</div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAgBa,wBAAwB,CAAA;AAPrC,IAAA,WAAA,GAAA;QASC,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAIlB,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;QAI1B,IAAK,CAAA,KAAA,GAAW,CAAC,CAAC;AAET,QAAA,IAAA,CAAA,UAAU,GAA4B,MAAM,CAAC,UAAU,CAAC,CAAC;AAClE,KAAA;8GAbY,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAxB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,kQChBrC,oIAGA,EAAA,MAAA,EAAA,CAAA,8kBAAA,CAAA,EAAA,eAA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;AAG7B,iBAAiB,GAAA,UAAA,CAAA;AAD7B,IAAA,YAAY,EAAE;;AACF,CAAA,EAAA,iBAAiB,CAuG7B,CAAA;2FAvGY,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAT7B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAGL,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACnC,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,KAAK,EAAE,wBAAwB,EAAE,wBAAwB,CAAC,EAAA,QAAA,EAAA,4bAAA,EAAA,MAAA,EAAA,CAAA,0yBAAA,CAAA,EAAA,CAAA;wDAKpE,cAAc,EAAA,CAAA;sBADb,KAAK;gBAIN,SAAS,EAAA,CAAA;sBADR,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,WAAW,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;gBAI5C,QAAQ,EAAA,CAAA;sBADP,YAAY;uBAAC,wBAAwB,CAAA;;;AE7CvC;;AAEG;;;;"}
|
|
@@ -22,10 +22,10 @@ class NgDocCodeHighlighterDirective {
|
|
|
22
22
|
this.elementRef.nativeElement.innerHTML = this.html;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
26
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.
|
|
25
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocCodeHighlighterDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
26
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.2", type: NgDocCodeHighlighterDirective, isStandalone: true, selector: "code[ngDocCodeHighlighter]", inputs: { code: ["ngDocCodeHighlighter", "code"], html: "html", language: "language" }, host: { properties: { "class.hljs": "this.highlightJsClass" } }, usesOnChanges: true, ngImport: i0 }); }
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocCodeHighlighterDirective, decorators: [{
|
|
29
29
|
type: Directive,
|
|
30
30
|
args: [{
|
|
31
31
|
selector: 'code[ngDocCodeHighlighter]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-directives-code-highlighter.mjs","sources":["../../../../libs/app/directives/code-highlighter/code-highlighter.directive.ts","../../../../libs/app/directives/code-highlighter/ng-doc-app-directives-code-highlighter.ts"],"sourcesContent":["import { Directive, ElementRef, HostBinding, Input, OnChanges } from '@angular/core';\nimport { HighlightResult } from 'highlight.js';\nimport highlight from 'highlight.js/lib/core';\nimport xml from 'highlight.js/lib/languages/xml';\n\nhighlight.registerLanguage('html', xml);\nhighlight.registerLanguage('xml', xml);\n\n@Directive({\n\tselector: 'code[ngDocCodeHighlighter]',\n\tstandalone: true,\n})\nexport class NgDocCodeHighlighterDirective implements OnChanges {\n\t@Input('ngDocCodeHighlighter')\n\tcode: string = '';\n\n\t@Input()\n\thtml: string = '';\n\n\t@Input()\n\tlanguage: string = 'typescript';\n\n\t@HostBinding('class.hljs')\n\tprotected highlightJsClass: boolean = true;\n\n\tconstructor(private readonly elementRef: ElementRef<HTMLElement>) {}\n\n\tngOnChanges(): void {\n\t\tif (this.code) {\n\t\t\tconst result: HighlightResult = highlight.highlight(this.code, { language: this.language });\n\n\t\t\tthis.elementRef.nativeElement.innerHTML = result.value ?? this.html;\n\t\t} else {\n\t\t\tthis.elementRef.nativeElement.innerHTML = this.html;\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAKA,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACxC,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;MAM1B,6BAA6B,CAAA;AAazC,IAAA,WAAA,CAA6B,UAAmC,EAAA;QAAnC,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QAXhE,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAGlB,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAGlB,IAAQ,CAAA,QAAA,GAAW,YAAY,CAAC;QAGtB,IAAgB,CAAA,gBAAA,GAAY,IAAI,CAAC;KAEyB;IAEpE,WAAW,GAAA;
|
|
1
|
+
{"version":3,"file":"ng-doc-app-directives-code-highlighter.mjs","sources":["../../../../libs/app/directives/code-highlighter/code-highlighter.directive.ts","../../../../libs/app/directives/code-highlighter/ng-doc-app-directives-code-highlighter.ts"],"sourcesContent":["import { Directive, ElementRef, HostBinding, Input, OnChanges } from '@angular/core';\nimport { HighlightResult } from 'highlight.js';\nimport highlight from 'highlight.js/lib/core';\nimport xml from 'highlight.js/lib/languages/xml';\n\nhighlight.registerLanguage('html', xml);\nhighlight.registerLanguage('xml', xml);\n\n@Directive({\n\tselector: 'code[ngDocCodeHighlighter]',\n\tstandalone: true,\n})\nexport class NgDocCodeHighlighterDirective implements OnChanges {\n\t@Input('ngDocCodeHighlighter')\n\tcode: string = '';\n\n\t@Input()\n\thtml: string = '';\n\n\t@Input()\n\tlanguage: string = 'typescript';\n\n\t@HostBinding('class.hljs')\n\tprotected highlightJsClass: boolean = true;\n\n\tconstructor(private readonly elementRef: ElementRef<HTMLElement>) {}\n\n\tngOnChanges(): void {\n\t\tif (this.code) {\n\t\t\tconst result: HighlightResult = highlight.highlight(this.code, { language: this.language });\n\n\t\t\tthis.elementRef.nativeElement.innerHTML = result.value ?? this.html;\n\t\t} else {\n\t\t\tthis.elementRef.nativeElement.innerHTML = this.html;\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n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A,EAAA,EAAA,YAAA,EAAA,uBAAA,EAAA,EAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAA7B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAJzC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,UAAU,EAAE,IAAI;AAChB,iBAAA,CAAA;+EAGA,IAAI,EAAA,CAAA;sBADH,KAAK;uBAAC,sBAAsB,CAAA;gBAI7B,IAAI,EAAA,CAAA;sBADH,KAAK;gBAIN,QAAQ,EAAA,CAAA;sBADP,KAAK;gBAII,gBAAgB,EAAA,CAAA;sBADzB,WAAW;uBAAC,YAAY,CAAA;;;ACtB1B;;AAEG;;;;"}
|
|
@@ -28,8 +28,8 @@ let NgDocRouteActiveDirective = class NgDocRouteActiveDirective {
|
|
|
28
28
|
: asArray(this.activeClass).forEach((cls) => this.renderer.removeClass(this.elementRef.nativeElement, cls));
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
32
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.
|
|
31
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocRouteActiveDirective, deps: [{ token: i0.ElementRef }, { token: i1.Router }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
32
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.2", type: NgDocRouteActiveDirective, isStandalone: true, selector: "[ngDocRouteActive]", inputs: { link: ["ngDocRouteActive", "link"], activeClass: "activeClass", matchOptions: "matchOptions" }, ngImport: i0 }); }
|
|
33
33
|
};
|
|
34
34
|
NgDocRouteActiveDirective = __decorate([
|
|
35
35
|
UntilDestroy(),
|
|
@@ -37,7 +37,7 @@ NgDocRouteActiveDirective = __decorate([
|
|
|
37
37
|
Router,
|
|
38
38
|
Renderer2])
|
|
39
39
|
], NgDocRouteActiveDirective);
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocRouteActiveDirective, decorators: [{
|
|
41
41
|
type: Directive,
|
|
42
42
|
args: [{
|
|
43
43
|
selector: '[ngDocRouteActive]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-helpers.mjs","sources":["../../../../libs/app/helpers/as-boolean.ts","../../../../libs/app/helpers/create-component.ts","../../../../libs/app/helpers/format-html.ts","../../../../libs/app/helpers/generate-toc.ts","../../../../libs/app/helpers/is-dark-os-theme.ts","../../../../libs/app/helpers/is-external-link.ts","../../../../libs/app/helpers/is-playground-property.ts","../../../../libs/app/helpers/ng-doc-app-helpers.ts"],"sourcesContent":["/**\n *\n * @param value\n */\nexport function asBoolean(value: unknown): boolean {\n\tif (typeof value === 'string') {\n\t\treturn value.toLowerCase() === 'true'\n\t\t\t? true\n\t\t\t: value.toLowerCase() === 'false'\n\t\t\t? false\n\t\t\t: !!value;\n\t}\n\treturn !!value;\n}\n","import { Type, ViewContainerRef } from '@angular/core';\n\n/**\n *\n * @param viewContainer\n * @param component\n * @param inputs\n */\nexport function createComponent<T>(\n\tviewContainer: ViewContainerRef,\n\tcomponent: Type<T>,\n\tinputs?: object,\n): void {\n\tviewContainer.clear();\n\n\tconst componentRef = viewContainer.createComponent(component);\n\n\tif (inputs) {\n\t\tObject.entries(inputs).forEach(([key, value]) => {\n\t\t\tcomponentRef.setInput(key, value);\n\t\t});\n\t}\n}\n","/**\n *\n * @param html\n */\nexport async function formatHtml(html: string): Promise<string> {\n\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t// @ts-ignore\n\tconst formatter = await import('esthetic');\n\n\treturn formatter.default.html(html.trim(), {\n\t\twrap: 50,\n\t\tmarkup: {\n\t\t\tforceIndent: true,\n\t\t},\n\t});\n}\n","import { NgDocTocItem } from '@ng-doc/app/interfaces';\nimport { asArray } from '@ng-doc/core/helpers/as-array';\nimport { NgDocHeading } from '@ng-doc/core/types';\n\n/**\n * Generate table of contents, only for headings with id\n * @param container\n * @param headings\n */\nexport function generateToc(container: HTMLElement): NgDocTocItem[] {\n\tconst headings: NgDocHeading[] = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];\n\n\tconst headingElements: HTMLHeadingElement[] = Array.from(\n\t\tcontainer.querySelectorAll<HTMLHeadingElement>(headings.join(', ')),\n\t).filter((heading: HTMLHeadingElement) => heading.id);\n\n\tconst levels: number[] = asArray(new Set(headingElements.map(levelFromTagName).sort()));\n\n\treturn headingElements.reduce((map: NgDocTocItem[], heading: HTMLHeadingElement) => {\n\t\tconst headingLevel: number = levelFromTagName(heading);\n\t\tconst anchor: HTMLAnchorElement | null =\n\t\t\theading.querySelector<HTMLAnchorElement>('a.ng-doc-header-link');\n\n\t\tif (anchor) {\n\t\t\tmap.push({\n\t\t\t\ttitle: heading.textContent?.trim() ?? '',\n\t\t\t\telement: heading,\n\t\t\t\tpath: anchor.pathname + anchor.hash,\n\t\t\t\tlevel: levels.indexOf(headingLevel) + 1,\n\t\t\t});\n\t\t}\n\n\t\treturn map;\n\t}, []);\n}\n\n/**\n *\n * @param heading\n */\nfunction levelFromTagName(heading: HTMLHeadingElement): number {\n\treturn Number(heading.tagName.toLowerCase().replace(/[a-z]*/g, '') || 1);\n}\n","/**\n * Check if the OS theme is dark\n */\nexport function isDarkOsTheme(): boolean {\n\treturn window.matchMedia('(prefers-color-scheme: dark)').matches;\n}\n","/**\n *\n * @param url\n */\nexport function isExternalLink(url: string): boolean {\n\tconst anchorElement: HTMLAnchorElement = document.createElement('a');\n\n\tanchorElement.href = url;\n\n\treturn anchorElement.host !== window.location.host;\n}\n","import {objectKeys} from '@ng-doc/core/helpers/object-keys';\nimport {NgDocPlaygroundProperty} from '@ng-doc/core/interfaces';\n\n/**\n *\n * @param obj\n */\nexport function isPlaygroundProperty(obj: Record<string, any>): obj is NgDocPlaygroundProperty {\n\treturn objectKeys(obj).includes('type');\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;AAGG;AACG,SAAU,SAAS,CAAC,KAAc,EAAA;AACvC,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC9B,QAAA,OAAO,KAAK,CAAC,WAAW,EAAE,KAAK,MAAM;AACpC,cAAE,IAAI;AACN,cAAE,KAAK,CAAC,WAAW,EAAE,KAAK,OAAO;AACjC,kBAAE,KAAK;AACP,kBAAE,CAAC,CAAC,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"ng-doc-app-helpers.mjs","sources":["../../../../libs/app/helpers/as-boolean.ts","../../../../libs/app/helpers/create-component.ts","../../../../libs/app/helpers/format-html.ts","../../../../libs/app/helpers/generate-toc.ts","../../../../libs/app/helpers/is-dark-os-theme.ts","../../../../libs/app/helpers/is-external-link.ts","../../../../libs/app/helpers/is-playground-property.ts","../../../../libs/app/helpers/ng-doc-app-helpers.ts"],"sourcesContent":["/**\n *\n * @param value\n */\nexport function asBoolean(value: unknown): boolean {\n\tif (typeof value === 'string') {\n\t\treturn value.toLowerCase() === 'true'\n\t\t\t? true\n\t\t\t: value.toLowerCase() === 'false'\n\t\t\t? false\n\t\t\t: !!value;\n\t}\n\treturn !!value;\n}\n","import { Type, ViewContainerRef } from '@angular/core';\n\n/**\n *\n * @param viewContainer\n * @param component\n * @param inputs\n */\nexport function createComponent<T>(\n\tviewContainer: ViewContainerRef,\n\tcomponent: Type<T>,\n\tinputs?: object,\n): void {\n\tviewContainer.clear();\n\n\tconst componentRef = viewContainer.createComponent(component);\n\n\tif (inputs) {\n\t\tObject.entries(inputs).forEach(([key, value]) => {\n\t\t\tcomponentRef.setInput(key, value);\n\t\t});\n\t}\n}\n","/**\n *\n * @param html\n */\nexport async function formatHtml(html: string): Promise<string> {\n\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t// @ts-ignore\n\tconst formatter = await import('esthetic');\n\n\treturn formatter.default.html(html.trim(), {\n\t\twrap: 50,\n\t\tmarkup: {\n\t\t\tforceIndent: true,\n\t\t},\n\t});\n}\n","import { NgDocTocItem } from '@ng-doc/app/interfaces';\nimport { asArray } from '@ng-doc/core/helpers/as-array';\nimport { NgDocHeading } from '@ng-doc/core/types';\n\n/**\n * Generate table of contents, only for headings with id\n * @param container\n * @param headings\n */\nexport function generateToc(container: HTMLElement): NgDocTocItem[] {\n\tconst headings: NgDocHeading[] = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];\n\n\tconst headingElements: HTMLHeadingElement[] = Array.from(\n\t\tcontainer.querySelectorAll<HTMLHeadingElement>(headings.join(', ')),\n\t).filter((heading: HTMLHeadingElement) => heading.id);\n\n\tconst levels: number[] = asArray(new Set(headingElements.map(levelFromTagName).sort()));\n\n\treturn headingElements.reduce((map: NgDocTocItem[], heading: HTMLHeadingElement) => {\n\t\tconst headingLevel: number = levelFromTagName(heading);\n\t\tconst anchor: HTMLAnchorElement | null =\n\t\t\theading.querySelector<HTMLAnchorElement>('a.ng-doc-header-link');\n\n\t\tif (anchor) {\n\t\t\tmap.push({\n\t\t\t\ttitle: heading.textContent?.trim() ?? '',\n\t\t\t\telement: heading,\n\t\t\t\tpath: anchor.pathname + anchor.hash,\n\t\t\t\tlevel: levels.indexOf(headingLevel) + 1,\n\t\t\t});\n\t\t}\n\n\t\treturn map;\n\t}, []);\n}\n\n/**\n *\n * @param heading\n */\nfunction levelFromTagName(heading: HTMLHeadingElement): number {\n\treturn Number(heading.tagName.toLowerCase().replace(/[a-z]*/g, '') || 1);\n}\n","/**\n * Check if the OS theme is dark\n */\nexport function isDarkOsTheme(): boolean {\n\treturn window.matchMedia('(prefers-color-scheme: dark)').matches;\n}\n","/**\n *\n * @param url\n */\nexport function isExternalLink(url: string): boolean {\n\tconst anchorElement: HTMLAnchorElement = document.createElement('a');\n\n\tanchorElement.href = url;\n\n\treturn anchorElement.host !== window.location.host;\n}\n","import {objectKeys} from '@ng-doc/core/helpers/object-keys';\nimport {NgDocPlaygroundProperty} from '@ng-doc/core/interfaces';\n\n/**\n *\n * @param obj\n */\nexport function isPlaygroundProperty(obj: Record<string, any>): obj is NgDocPlaygroundProperty {\n\treturn objectKeys(obj).includes('type');\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;AAGG;AACG,SAAU,SAAS,CAAC,KAAc,EAAA;AACvC,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC9B,QAAA,OAAO,KAAK,CAAC,WAAW,EAAE,KAAK,MAAM;AACpC,cAAE,IAAI;AACN,cAAE,KAAK,CAAC,WAAW,EAAE,KAAK,OAAO;AACjC,kBAAE,KAAK;AACP,kBAAE,CAAC,CAAC,KAAK,CAAC;KACX;IACD,OAAO,CAAC,CAAC,KAAK,CAAC;AAChB;;ACXA;;;;;AAKG;SACa,eAAe,CAC9B,aAA+B,EAC/B,SAAkB,EAClB,MAAe,EAAA;IAEf,aAAa,CAAC,KAAK,EAAE,CAAC;IAEtB,MAAM,YAAY,GAAG,aAAa,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IAE9D,IAAI,MAAM,EAAE;AACX,QAAA,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;AAC/C,YAAA,YAAY,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AACnC,SAAC,CAAC,CAAC;KACH;AACF;;ACtBA;;;AAGG;AACI,eAAe,UAAU,CAAC,IAAY,EAAA;;;AAG5C,IAAA,MAAM,SAAS,GAAG,MAAM,O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AAC,CAAC;SACH;AAED,QAAA,OAAO,GAAG,CAAC;KACX,EAAE,EAAE,CAAC,CAAC;AACR,CAAC;AAED;;;AAGG;AACH,SAAS,gBAAgB,CAAC,OAA2B,EAAA;AACpD,IAAA,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1E;;AC1CA;;AAEG;SACa,aAAa,GAAA;IAC5B,OAAO,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC,OAAO,CAAC;AAClE;;ACLA;;;AAGG;AACG,SAAU,cAAc,CAAC,GAAW,EAAA;IACzC,MAAM,aAAa,GAAsB,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;AAErE,IAAA,aAAa,CAAC,IAAI,GAAG,GAAG,CAAC;IAEzB,OAAO,aAAa,CAAC,IAAI,KAAK,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;AACpD;;ACPA;;;AAGG;AACG,SAAU,oBAAoB,CAAC,GAAwB,EAAA;IAC5D,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACzC;;ACTA;;AAEG;;;;"}
|
|
@@ -6,10 +6,10 @@ class NgDocExtractValuePipe {
|
|
|
6
6
|
transform(value) {
|
|
7
7
|
return extractValue(value);
|
|
8
8
|
}
|
|
9
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
10
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocExtractValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
10
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.2", ngImport: i0, type: NgDocExtractValuePipe, isStandalone: true, name: "ngDocExtractValue" }); }
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocExtractValuePipe, decorators: [{
|
|
13
13
|
type: Pipe,
|
|
14
14
|
args: [{
|
|
15
15
|
name: 'ngDocExtractValue',
|
|
@@ -5,10 +5,10 @@ class NgDocFilterByTextPipe {
|
|
|
5
5
|
transform(items, searchTerm, matcher = (item, s) => String(item) === s) {
|
|
6
6
|
return items?.filter((item) => matcher(item, searchTerm)) ?? [];
|
|
7
7
|
}
|
|
8
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
9
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.
|
|
8
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocFilterByTextPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
9
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.2", ngImport: i0, type: NgDocFilterByTextPipe, isStandalone: true, name: "ngDocFilterByText" }); }
|
|
10
10
|
}
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocFilterByTextPipe, decorators: [{
|
|
12
12
|
type: Pipe,
|
|
13
13
|
args: [{
|
|
14
14
|
name: 'ngDocFilterByText',
|
|
@@ -9,10 +9,10 @@ class NgDocSanitizeHtmlPipe {
|
|
|
9
9
|
transform(value) {
|
|
10
10
|
return this.sanitizer.bypassSecurityTrustHtml(value);
|
|
11
11
|
}
|
|
12
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
13
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocSanitizeHtmlPipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
13
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.2", ngImport: i0, type: NgDocSanitizeHtmlPipe, isStandalone: true, name: "ngDocSanitizeHtml" }); }
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocSanitizeHtmlPipe, decorators: [{
|
|
16
16
|
type: Pipe,
|
|
17
17
|
args: [{
|
|
18
18
|
name: 'ngDocSanitizeHtml',
|
|
@@ -50,10 +50,10 @@ class NgDocPageProcessorDirective {
|
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
54
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.
|
|
53
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocPageProcessorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
54
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.2", type: NgDocPageProcessorDirective, isStandalone: true, selector: "[ngDocPageProcessor]", inputs: { html: ["ngDocPageProcessor", "html"] }, outputs: { afterRender: "afterRender" }, host: { attributes: { "ngSkipHydration": "true" } }, usesOnChanges: true, ngImport: i0 }); }
|
|
55
55
|
}
|
|
56
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: NgDocPageProcessorDirective, decorators: [{
|
|
57
57
|
type: Directive,
|
|
58
58
|
args: [{
|
|
59
59
|
selector: '[ngDocPageProcessor]',
|