@ng-doc/app 17.1.3 → 17.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/page/page.component.d.ts +4 -3
- package/components/page-link/page-link.component.d.ts +3 -3
- package/components/toc/toc-element/toc-element.component.d.ts +1 -2
- package/components/toc/toc.component.d.ts +5 -4
- package/esm2022/components/api-list/api-list.component.mjs +3 -3
- package/esm2022/components/breadcrumb/breadcrumb.component.mjs +3 -3
- package/esm2022/components/code/code.component.mjs +5 -7
- package/esm2022/components/demo/demo.component.mjs +3 -3
- package/esm2022/components/demo-displayer/demo-displayer.component.mjs +3 -3
- package/esm2022/components/demo-pane/demo-pane.component.mjs +3 -3
- 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 +17 -15
- package/esm2022/components/page/page.component.mjs +15 -18
- package/esm2022/components/page-link/page-link.component.mjs +10 -9
- package/esm2022/components/page-navigation/page-navigation.component.mjs +3 -3
- package/esm2022/components/playground/base-playground.mjs +3 -3
- package/esm2022/components/playground/playground-demo/playground-demo.component.mjs +3 -3
- package/esm2022/components/playground/playground-properties/playground-properties.component.mjs +3 -3
- package/esm2022/components/playground/playground-property/playground-property.component.mjs +3 -3
- package/esm2022/components/playground/playground.component.mjs +3 -3
- package/esm2022/components/root/root.component.mjs +9 -9
- package/esm2022/components/search/search.component.mjs +3 -3
- package/esm2022/components/search-result/search-result.component.mjs +3 -3
- package/esm2022/components/sidebar/sidebar-category/sidebar-category.component.mjs +3 -3
- package/esm2022/components/sidebar/sidebar-item/sidebar-item.component.mjs +3 -3
- package/esm2022/components/sidebar/sidebar.component.mjs +5 -5
- package/esm2022/components/tabs/tabs.component.mjs +3 -3
- package/esm2022/components/theme-toggle/theme-toggle.component.mjs +3 -3
- package/esm2022/components/toc/toc-element/toc-element.component.mjs +8 -8
- package/esm2022/components/toc/toc.component.mjs +43 -39
- package/esm2022/directives/code-highlighter/code-highlighter.directive.mjs +3 -3
- package/esm2022/directives/route-active/route-active.directive.mjs +3 -3
- package/esm2022/helpers/create-component.mjs +1 -2
- package/esm2022/interfaces/page-processor.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 +19 -13
- package/esm2022/processors/processors/icon.processor.mjs +2 -2
- package/esm2022/processors/processors/tabs.processor.mjs +5 -3
- package/esm2022/processors/processors/tooltip.processor.mjs +3 -3
- package/esm2022/providers/ng-doc-app/provide-ng-doc-app.mjs +5 -5
- package/esm2022/services/sidebar/sidebar.service.mjs +3 -3
- package/esm2022/services/store/store.service.mjs +13 -7
- package/esm2022/services/theme/theme.service.mjs +12 -9
- 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 +3 -3
- package/fesm2022/ng-doc-app-components-breadcrumb.mjs +3 -3
- package/fesm2022/ng-doc-app-components-code.mjs +4 -6
- package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
- 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.mjs +3 -3
- 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 +16 -14
- package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-link.mjs +9 -8
- package/fesm2022/ng-doc-app-components-page-link.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-navigation.mjs +3 -3
- package/fesm2022/ng-doc-app-components-page.mjs +14 -17
- package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-playground.mjs +15 -15
- 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.mjs +3 -3
- package/fesm2022/ng-doc-app-components-sidebar.mjs +10 -10
- 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-toc.mjs +48 -44
- 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-route-active.mjs +3 -3
- package/fesm2022/ng-doc-app-helpers.mjs +0 -1
- 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 +18 -12
- package/fesm2022/ng-doc-app-processors-page-processor.mjs.map +1 -1
- package/fesm2022/ng-doc-app-processors-processors.mjs +9 -8
- package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +4 -4
- 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-store.mjs +12 -6
- package/fesm2022/ng-doc-app-services-store.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-theme.mjs +11 -8
- 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/interfaces/page-processor.d.ts +3 -2
- package/package.json +3 -3
- package/processors/page-processor/page-processor.directive.d.ts +7 -6
- package/services/store/store.service.d.ts +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
1
|
+
import { __metadata, __decorate } from 'tslib';
|
|
2
2
|
import { DOCUMENT, NgFor } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, ChangeDetectionStrategy, Input, HostBinding, QueryList,
|
|
4
|
+
import { ElementRef, inject, Component, ChangeDetectionStrategy, Input, HostBinding, QueryList, signal, NgZone, ChangeDetectorRef, Renderer2, AfterRenderPhase, afterNextRender, ViewChild, ViewChildren } from '@angular/core';
|
|
5
5
|
import { Router, Scroll } from '@angular/router';
|
|
6
6
|
import { isPresent } from '@ng-doc/core/helpers/is-present';
|
|
7
7
|
import { ngDocZoneOptimize, NgDocMediaQueryDirective } from '@ng-doc/ui-kit';
|
|
@@ -10,19 +10,19 @@ import { fromEvent, merge } from 'rxjs';
|
|
|
10
10
|
import { filter, map, startWith, debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
11
11
|
|
|
12
12
|
class NgDocTocElementComponent {
|
|
13
|
-
constructor(
|
|
14
|
-
this.elementRef = elementRef;
|
|
13
|
+
constructor() {
|
|
15
14
|
this.href = '';
|
|
16
15
|
this.selected = false;
|
|
17
16
|
this.level = 1;
|
|
17
|
+
this.elementRef = inject(ElementRef);
|
|
18
18
|
}
|
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
20
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.
|
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocTocElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
20
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.7", 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.0.
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", 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: [{
|
|
26
26
|
type: Input
|
|
27
27
|
}], selected: [{
|
|
28
28
|
type: Input
|
|
@@ -40,40 +40,44 @@ let NgDocTocComponent = class NgDocTocComponent {
|
|
|
40
40
|
constructor() {
|
|
41
41
|
this.tableOfContent = [];
|
|
42
42
|
this.elements = new QueryList();
|
|
43
|
+
this.activeItem = signal(undefined);
|
|
43
44
|
this.document = inject(DOCUMENT);
|
|
44
45
|
this.ngZone = inject(NgZone);
|
|
45
46
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
46
47
|
this.renderer = inject(Renderer2);
|
|
47
48
|
this.router = inject(Router);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
return this.tableOfContent.reduce((pTarget, cTarget) => {
|
|
57
|
-
const pTop = pTarget.element.getBoundingClientRect().top + target.scrollTop;
|
|
58
|
-
const cTop = cTarget.element.getBoundingClientRect().top + target.scrollTop;
|
|
59
|
-
return Math.abs(cTop - selectionLine) < Math.abs(pTop - selectionLine)
|
|
60
|
-
? cTarget
|
|
61
|
-
: pTarget;
|
|
62
|
-
});
|
|
63
|
-
}), filter(isPresent));
|
|
64
|
-
const routerSelection = this.router.events.pipe(map((event) => {
|
|
65
|
-
if (event instanceof Scroll) {
|
|
66
|
-
const item = this.tableOfContent.find((item) => item.path.includes(event.routerEvent.url));
|
|
67
|
-
if (item) {
|
|
68
|
-
return item;
|
|
49
|
+
afterNextRender(() => {
|
|
50
|
+
const scrollSelection = fromEvent(this.document, 'scroll').pipe(filter(() => !!this.tableOfContent.length), map((event) => event.target.scrollingElement), startWith(this.document.scrollingElement), map((target) => {
|
|
51
|
+
const percentage = (target.scrollTop * 100) / (target.scrollHeight - target.offsetHeight);
|
|
52
|
+
const selectionLine = target.scrollTop + (target.offsetHeight * percentage) / 100;
|
|
53
|
+
if (!this.tableOfContent.length) {
|
|
54
|
+
return null;
|
|
69
55
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
56
|
+
return this.tableOfContent.reduce((pTarget, cTarget) => {
|
|
57
|
+
const pTop = pTarget.element.getBoundingClientRect().top + target.scrollTop;
|
|
58
|
+
const cTop = cTarget.element.getBoundingClientRect().top + target.scrollTop;
|
|
59
|
+
return Math.abs(cTop - selectionLine) < Math.abs(pTop - selectionLine)
|
|
60
|
+
? cTarget
|
|
61
|
+
: pTarget;
|
|
62
|
+
});
|
|
63
|
+
}), filter(isPresent));
|
|
64
|
+
const routerSelection = this.router.events.pipe(map((event) => {
|
|
65
|
+
if (event instanceof Scroll) {
|
|
66
|
+
const item = this.tableOfContent.find((item) => item.path.includes(event.routerEvent.url));
|
|
67
|
+
if (item) {
|
|
68
|
+
return item;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}), filter(isPresent), debounceTime(20));
|
|
73
|
+
const elementsChanges = this.elements.changes.pipe(map(() => this.activeItem()), filter(isPresent));
|
|
74
|
+
merge(merge(scrollSelection, routerSelection).pipe(distinctUntilChanged()), elementsChanges)
|
|
75
|
+
.pipe(ngDocZoneOptimize(this.ngZone), untilDestroyed(this))
|
|
76
|
+
.subscribe(this.select.bind(this));
|
|
77
|
+
}, { phase: AfterRenderPhase.Write });
|
|
78
|
+
}
|
|
79
|
+
ngOnInit() {
|
|
80
|
+
this.activeItem.set(this.tableOfContent[0]);
|
|
77
81
|
}
|
|
78
82
|
/**
|
|
79
83
|
* Selects the item in the table of content.
|
|
@@ -89,19 +93,19 @@ let NgDocTocComponent = class NgDocTocComponent {
|
|
|
89
93
|
element.scrollIntoView({ block: 'nearest' });
|
|
90
94
|
}
|
|
91
95
|
}
|
|
92
|
-
this.activeItem
|
|
93
|
-
this.changeDetectorRef.detectChanges();
|
|
96
|
+
this.activeItem.set(item);
|
|
94
97
|
}
|
|
95
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
96
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
98
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocTocComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
99
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.7", 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 }); }
|
|
97
100
|
};
|
|
98
101
|
NgDocTocComponent = __decorate([
|
|
99
|
-
UntilDestroy()
|
|
102
|
+
UntilDestroy(),
|
|
103
|
+
__metadata("design:paramtypes", [])
|
|
100
104
|
], NgDocTocComponent);
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocTocComponent, decorators: [{
|
|
102
106
|
type: Component,
|
|
103
|
-
args: [{ selector: 'ng-doc-toc', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgFor, NgDocTocElementComponent, NgDocMediaQueryDirective], template: "<
|
|
104
|
-
}], propDecorators: { tableOfContent: [{
|
|
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
|
+
}], ctorParameters: () => [], propDecorators: { tableOfContent: [{
|
|
105
109
|
type: Input
|
|
106
110
|
}], selection: [{
|
|
107
111
|
type: ViewChild,
|
|
@@ -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 { ChangeDetectionStrategy, Component, ElementRef, HostBinding, Input } 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\tconstructor(readonly elementRef: ElementRef<HTMLElement>) {}\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\tAfterViewInit,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tinject,\n\tInput,\n\tNgZone,\n\tQueryList,\n\tRenderer2,\n\tViewChild,\n\tViewChildren,\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 AfterViewInit, NgDocPageToc {\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?: NgDocTocItem;\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\tngAfterViewInit(): void {\n\t\tconst scrollSelection: Observable<NgDocTocItem> = fromEvent(this.document, 'scroll').pipe(\n\t\t\tfilter(() => !!this.tableOfContent.length),\n\t\t\tmap((event: Event) => (event.target as Document).scrollingElement as HTMLElement),\n\t\t\tstartWith(this.document.scrollingElement as HTMLElement),\n\t\t\tmap((target: HTMLElement) => {\n\t\t\t\tconst percentage: number =\n\t\t\t\t\t(target.scrollTop * 100) / (target.scrollHeight - target.offsetHeight);\n\t\t\t\tconst selectionLine: number = target.scrollTop + (target.offsetHeight * percentage) / 100;\n\n\t\t\t\tif (!this.tableOfContent.length) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn this.tableOfContent.reduce((pTarget: NgDocTocItem, cTarget: NgDocTocItem) => {\n\t\t\t\t\tconst pTop: number = pTarget.element.getBoundingClientRect().top + target.scrollTop;\n\t\t\t\t\tconst cTop: number = cTarget.element.getBoundingClientRect().top + target.scrollTop;\n\n\t\t\t\t\treturn Math.abs(cTop - selectionLine) < Math.abs(pTop - selectionLine)\n\t\t\t\t\t\t? cTarget\n\t\t\t\t\t\t: pTarget;\n\t\t\t\t});\n\t\t\t}),\n\t\t\tfilter(isPresent),\n\t\t);\n\n\t\tconst routerSelection: Observable<NgDocTocItem> = this.router.events.pipe(\n\t\t\tmap((event: REvent) => {\n\t\t\t\tif (event instanceof Scroll) {\n\t\t\t\t\tconst item: NgDocTocItem | undefined = this.tableOfContent.find((item: NgDocTocItem) =>\n\t\t\t\t\t\titem.path.includes(event.routerEvent.url),\n\t\t\t\t\t);\n\n\t\t\t\t\tif (item) {\n\t\t\t\t\t\treturn item;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t}),\n\t\t\tfilter(isPresent),\n\t\t\tdebounceTime(20),\n\t\t);\n\n\t\tconst elementsChanges = this.elements.changes.pipe(\n\t\t\tmap(() => this.activeItem),\n\t\t\tfilter(isPresent),\n\t\t);\n\n\t\tmerge(merge(scrollSelection, routerSelection).pipe(distinctUntilChanged()), elementsChanges)\n\t\t\t.pipe(ngDocZoneOptimize(this.ngZone), untilDestroyed(this))\n\t\t\t.subscribe(this.select.bind(this));\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 = item;\n\t\tthis.changeDetectorRef.detectChanges();\n\t}\n}\n","<ng-template\n\t[ngDocMediaQuery]=\"[mediaQuery.breakpoints.Large, mediaQuery.breakpoints.XLarge]\"\n\t#mediaQuery=\"ngDocMediaQuery\">\n\t<div class=\"ng-doc-toc-wrapper\">\n\t\t<div class=\"ng-doc-toc-container\">\n\t\t\t<div class=\"ng-doc-toc-selection\" #selection></div>\n\t\t\t<ul class=\"ng-doc-toc\">\n\t\t\t\t<li\n\t\t\t\t\t*ngFor=\"let item of tableOfContent\"\n\t\t\t\t\tng-doc-toc-element\n\t\t\t\t\t[href]=\"item.path\"\n\t\t\t\t\t[level]=\"item.level\"\n\t\t\t\t\t[selected]=\"item === activeItem\">\n\t\t\t\t\t{{ item.title }}\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MASa,wBAAwB,CAAA;AAYpC,IAAA,WAAA,CAAqB,UAAmC,EAAA;QAAnC,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QAVxD,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAIlB,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;QAI1B,IAAK,CAAA,KAAA,GAAW,CAAC,CAAC;KAE0C;8GAZhD,wBAAwB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,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,kQCTrC,oIAGA,EAAA,MAAA,EAAA,CAAA,8kBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FDMa,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAPpC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,EAGjB,eAAA,EAAA,uBAAuB,CAAC,MAAM,cACnC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eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;AAGvD,iBAAiB,GAAA,UAAA,CAAA;AAD7B,IAAA,YAAY,EAAE;AACF,CAAA,EAAA,iBAAiB,CA8F7B,CAAA;2FA9FY,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,omBAAA,EAAA,MAAA,EAAA,CAAA,uuBAAA,CAAA,EAAA,CAAA;8BAKpE,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;;;AEzCvC;;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(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,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FDaa,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAPpC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,EAGjB,eAAA,EAAA,uBAAuB,CAAC,MAAM,cACnC,IAAI,EAAA,QAAA,EAAA,oIAAA,EAAA,MAAA,EAAA,CAAA,8kBAAA,CAAA,EAAA,CAAA;8BAIhB,IAAI,EAAA,CAAA;sBADH,KAAK;gBA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AA,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.0.
|
|
26
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.
|
|
25
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocCodeHighlighterDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
26
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.7", 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.0.
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocCodeHighlighterDirective, decorators: [{
|
|
29
29
|
type: Directive,
|
|
30
30
|
args: [{
|
|
31
31
|
selector: 'code[ngDocCodeHighlighter]',
|
|
@@ -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.0.
|
|
32
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.
|
|
31
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", 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.0.7", 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.0.
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", 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\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
|
|
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\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;AACX,KAAA;IACD,OAAO,CAAC,CAAC,KAAK,CAAC;AAChB;;ACXA;;;;;AAKG;SACa,eAAe,CAC9B,aAA+B,EAC/B,SAAkB,EAClB,MAAe,EAAA;IAEf,MAAM,YAAY,GAAG,aAAa,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;AAE9D,IAAA,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;AACH,KAAA;AACF;;ACpBA;;;AAGG;AACI,eAAe,UAAU,CAAC,IAAY,EAAA;;;AAG5C,IAAA,MA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AC,GAAG,CAAC;AACvC,aAAA,CAAC,CAAC;AACH,SAAA;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.0.
|
|
10
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocExtractValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
10
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.7", ngImport: i0, type: NgDocExtractValuePipe, isStandalone: true, name: "ngDocExtractValue" }); }
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", 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.0.
|
|
9
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.
|
|
8
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocFilterByTextPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
9
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.7", ngImport: i0, type: NgDocFilterByTextPipe, isStandalone: true, name: "ngDocFilterByText" }); }
|
|
10
10
|
}
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", 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.0.
|
|
13
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocSanitizeHtmlPipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
13
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.7", ngImport: i0, type: NgDocSanitizeHtmlPipe, isStandalone: true, name: "ngDocSanitizeHtml" }); }
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocSanitizeHtmlPipe, decorators: [{
|
|
16
16
|
type: Pipe,
|
|
17
17
|
args: [{
|
|
18
18
|
name: 'ngDocSanitizeHtml',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injector, Directive } from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, ViewContainerRef, Injector, Renderer2, Directive, Input } from '@angular/core';
|
|
3
3
|
import { NG_DOC_PAGE_PROCESSOR, NG_DOC_PAGE_CUSTOM_PROCESSOR } from '@ng-doc/app/tokens';
|
|
4
4
|
import { asArray, objectKeys } from '@ng-doc/core';
|
|
5
5
|
|
|
@@ -8,24 +8,26 @@ import { asArray, objectKeys } from '@ng-doc/core';
|
|
|
8
8
|
* html nodes with an Angular component.
|
|
9
9
|
*/
|
|
10
10
|
class NgDocPageProcessorDirective {
|
|
11
|
-
constructor(
|
|
12
|
-
this.
|
|
13
|
-
this.viewContainerRef = viewContainerRef;
|
|
11
|
+
constructor() {
|
|
12
|
+
this.html = '';
|
|
14
13
|
this.processors = inject(NG_DOC_PAGE_PROCESSOR, { optional: true }) ?? [];
|
|
15
14
|
this.customProcessors = inject(NG_DOC_PAGE_CUSTOM_PROCESSOR, { optional: true }) ??
|
|
16
15
|
[];
|
|
16
|
+
this.elementRef = inject(ElementRef);
|
|
17
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
17
18
|
this.injector = inject(Injector);
|
|
19
|
+
this.renderer = inject(Renderer2);
|
|
18
20
|
}
|
|
19
21
|
ngOnInit() {
|
|
22
|
+
this.renderer.setProperty(this.elementRef.nativeElement, 'innerHTML', this.html);
|
|
20
23
|
asArray(this.processors, this.customProcessors).forEach(this.process.bind(this));
|
|
21
24
|
}
|
|
22
25
|
process(processor) {
|
|
23
|
-
this.elementRef.nativeElement
|
|
24
|
-
.querySelectorAll(processor.selector)
|
|
25
|
-
.forEach((elementNode) => {
|
|
26
|
+
Array.from(this.elementRef.nativeElement.querySelectorAll(processor.selector)).forEach((elementNode) => {
|
|
26
27
|
// check if element node has a parent node because it can be removed by another processor
|
|
27
28
|
if (elementNode.parentNode) {
|
|
28
|
-
const replaceElement = (processor.nodeToReplace && processor.nodeToReplace(elementNode)) ??
|
|
29
|
+
const replaceElement = (processor.nodeToReplace && processor.nodeToReplace(elementNode, this.injector)) ??
|
|
30
|
+
elementNode;
|
|
29
31
|
const options = processor.extractOptions(elementNode, this.elementRef.nativeElement);
|
|
30
32
|
// create component
|
|
31
33
|
const componentRef = this.viewContainerRef.createComponent(processor.component, {
|
|
@@ -42,16 +44,20 @@ class NgDocPageProcessorDirective {
|
|
|
42
44
|
}
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
46
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.
|
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocPageProcessorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
48
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.7", type: NgDocPageProcessorDirective, isStandalone: true, selector: "[ngDocPageProcessor]", inputs: { html: ["ngDocPageProcessor", "html"] }, host: { attributes: { "ngSkipHydration": "true" } }, ngImport: i0 }); }
|
|
47
49
|
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocPageProcessorDirective, decorators: [{
|
|
49
51
|
type: Directive,
|
|
50
52
|
args: [{
|
|
51
53
|
selector: '[ngDocPageProcessor]',
|
|
52
54
|
standalone: true,
|
|
55
|
+
host: { ngSkipHydration: 'true' },
|
|
53
56
|
}]
|
|
54
|
-
}],
|
|
57
|
+
}], propDecorators: { html: [{
|
|
58
|
+
type: Input,
|
|
59
|
+
args: [{ required: true, alias: 'ngDocPageProcessor' }]
|
|
60
|
+
}] } });
|
|
55
61
|
|
|
56
62
|
/**
|
|
57
63
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-processors-page-processor.mjs","sources":["../../../../libs/app/processors/page-processor/page-processor.directive.ts","../../../../libs/app/processors/page-processor/ng-doc-app-processors-page-processor.ts"],"sourcesContent":["import {\n\tComponentRef,\n\tDirective,\n\tElementRef,\n\tinject,\n\tInjector,\n\tOnInit,\n\tViewContainerRef,\n} from '@angular/core';\nimport { NgDocPageProcessor, NgDocProcessorOptions } from '@ng-doc/app/interfaces';\nimport { NG_DOC_PAGE_CUSTOM_PROCESSOR, NG_DOC_PAGE_PROCESSOR } from '@ng-doc/app/tokens';\nimport { asArray, objectKeys } from '@ng-doc/core';\n\n/**\n * Base processor class to create a processor directive that will be used to replace\n * html nodes with an Angular component.\n */\n@Directive({\n\tselector: '[ngDocPageProcessor]',\n\tstandalone: true,\n})\nexport class NgDocPageProcessorDirective implements OnInit {\n\tprocessors: Array<NgDocPageProcessor<unknown>> =\n\t\tinject<Array<NgDocPageProcessor<unknown>>>(NG_DOC_PAGE_PROCESSOR, { optional: true }) ?? [];\n\tcustomProcessors: Array<NgDocPageProcessor<unknown>> =\n\t\tinject<Array<NgDocPageProcessor<unknown>>>(NG_DOC_PAGE_CUSTOM_PROCESSOR, { optional: true }) ??\n\t\t[];\n\
|
|
1
|
+
{"version":3,"file":"ng-doc-app-processors-page-processor.mjs","sources":["../../../../libs/app/processors/page-processor/page-processor.directive.ts","../../../../libs/app/processors/page-processor/ng-doc-app-processors-page-processor.ts"],"sourcesContent":["import {\n\tComponentRef,\n\tDirective,\n\tElementRef,\n\tinject,\n\tInjector,\n\tInput,\n\tOnInit,\n\tRenderer2,\n\tViewContainerRef,\n} from '@angular/core';\nimport { NgDocPageProcessor, NgDocProcessorOptions } from '@ng-doc/app/interfaces';\nimport { NG_DOC_PAGE_CUSTOM_PROCESSOR, NG_DOC_PAGE_PROCESSOR } from '@ng-doc/app/tokens';\nimport { asArray, objectKeys } from '@ng-doc/core';\n\n/**\n * Base processor class to create a processor directive that will be used to replace\n * html nodes with an Angular component.\n */\n@Directive({\n\tselector: '[ngDocPageProcessor]',\n\tstandalone: true,\n\thost: { ngSkipHydration: 'true' },\n})\nexport class NgDocPageProcessorDirective implements OnInit {\n\t@Input({ required: true, alias: 'ngDocPageProcessor' })\n\thtml: string = '';\n\n\tprocessors: Array<NgDocPageProcessor<unknown>> =\n\t\tinject<Array<NgDocPageProcessor<unknown>>>(NG_DOC_PAGE_PROCESSOR, { optional: true }) ?? [];\n\tcustomProcessors: Array<NgDocPageProcessor<unknown>> =\n\t\tinject<Array<NgDocPageProcessor<unknown>>>(NG_DOC_PAGE_CUSTOM_PROCESSOR, { optional: true }) ??\n\t\t[];\n\n\tprotected readonly elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n\tprotected readonly viewContainerRef: ViewContainerRef = inject(ViewContainerRef);\n\tprotected readonly injector: Injector = inject(Injector);\n\tprotected readonly renderer: Renderer2 = inject(Renderer2);\n\n\tngOnInit(): void {\n\t\tthis.renderer.setProperty(this.elementRef.nativeElement, 'innerHTML', this.html);\n\n\t\tasArray(this.processors, this.customProcessors).forEach(this.process.bind(this));\n\t}\n\n\tprivate process<T>(processor: NgDocPageProcessor<T>): void {\n\t\tArray.from(this.elementRef.nativeElement.querySelectorAll(processor.selector)).forEach(\n\t\t\t(elementNode: Element) => {\n\t\t\t\t// check if element node has a parent node because it can be removed by another processor\n\t\t\t\tif (elementNode.parentNode) {\n\t\t\t\t\tconst replaceElement: Element =\n\t\t\t\t\t\t(processor.nodeToReplace && processor.nodeToReplace(elementNode, this.injector)) ??\n\t\t\t\t\t\telementNode;\n\t\t\t\t\tconst options: NgDocProcessorOptions<T> = processor.extractOptions(\n\t\t\t\t\t\telementNode,\n\t\t\t\t\t\tthis.elementRef.nativeElement,\n\t\t\t\t\t);\n\n\t\t\t\t\t// create component\n\t\t\t\t\tconst componentRef: ComponentRef<T> = this.viewContainerRef.createComponent(\n\t\t\t\t\t\tprocessor.component,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tprojectableNodes: options.content,\n\t\t\t\t\t\t\tinjector: this.injector,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\n\t\t\t\t\t// set component options\n\t\t\t\t\tif (options.inputs) {\n\t\t\t\t\t\tobjectKeys(options.inputs).forEach(\n\t\t\t\t\t\t\t(key: keyof T) =>\n\t\t\t\t\t\t\t\toptions.inputs && componentRef.setInput(key as string, options.inputs[key]),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// replace element node with component node\n\t\t\t\t\treplaceElement.parentNode?.replaceChild(\n\t\t\t\t\t\tcomponentRef.location.nativeElement,\n\t\t\t\t\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,oBAAA,EAAA,MAAA,CAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBALvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE;AACjC,iBAAA,CAAA;8BAGA,IAAI,EAAA,CAAA;sBADH,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAA;;;ACzBvD;;AAEG;;;;"}
|
|
@@ -5,9 +5,9 @@ import { NgDocDemoPaneComponent } from '@ng-doc/app/components/demo-pane';
|
|
|
5
5
|
import { NgDocPageLinkComponent } from '@ng-doc/app/components/page-link';
|
|
6
6
|
import { NgDocPlaygroundComponent } from '@ng-doc/app/components/playground';
|
|
7
7
|
import { isPresent } from '@ng-doc/core';
|
|
8
|
-
import { NgDocTabsComponent } from '@ng-doc/app/components/tabs';
|
|
9
8
|
import * as i0 from '@angular/core';
|
|
10
|
-
import { ElementRef, Component, ChangeDetectionStrategy, Input, ViewChild } from '@angular/core';
|
|
9
|
+
import { Renderer2, ElementRef, Component, ChangeDetectionStrategy, Input, ViewChild } from '@angular/core';
|
|
10
|
+
import { NgDocTabsComponent } from '@ng-doc/app/components/tabs';
|
|
11
11
|
|
|
12
12
|
const blockquoteProcessor = {
|
|
13
13
|
component: NgDocBlockquoteComponent,
|
|
@@ -63,7 +63,7 @@ const iconProcessor = {
|
|
|
63
63
|
extractOptions: (element) => ({
|
|
64
64
|
inputs: {
|
|
65
65
|
icon: element.getAttribute('icon') ?? '',
|
|
66
|
-
size: Number(element.getAttribute('size'))
|
|
66
|
+
size: Number(element.getAttribute('size')) || 16,
|
|
67
67
|
},
|
|
68
68
|
}),
|
|
69
69
|
};
|
|
@@ -101,8 +101,9 @@ const playgroundProcessor = {
|
|
|
101
101
|
const tabsProcessor = {
|
|
102
102
|
component: NgDocTabsComponent,
|
|
103
103
|
selector: 'ng-doc-tab',
|
|
104
|
-
nodeToReplace: (element) => {
|
|
105
|
-
const
|
|
104
|
+
nodeToReplace: (element, injector) => {
|
|
105
|
+
const renderer = injector.get(Renderer2);
|
|
106
|
+
const anchor = renderer.createElement('div');
|
|
106
107
|
return element.parentNode?.insertBefore(anchor, element) ?? element;
|
|
107
108
|
},
|
|
108
109
|
extractOptions: (element, root) => {
|
|
@@ -135,8 +136,8 @@ class NgDocTooltipWrapperComponent {
|
|
|
135
136
|
this.changeDetectorRef.detectChanges();
|
|
136
137
|
}
|
|
137
138
|
}
|
|
138
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.
|
|
139
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.
|
|
139
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocTooltipWrapperComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
140
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.7", type: NgDocTooltipWrapperComponent, isStandalone: true, selector: "ng-doc-tooltip-wrapper", inputs: { content: "content" }, viewQueries: [{ propertyName: "contentProjection", first: true, predicate: ["contentProjection"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: `
|
|
140
141
|
<div
|
|
141
142
|
class="content-projection"
|
|
142
143
|
[ngDocTooltip]="content ?? ''"
|
|
@@ -147,7 +148,7 @@ class NgDocTooltipWrapperComponent {
|
|
|
147
148
|
</div>
|
|
148
149
|
`, isInline: true, styles: [".content-projection{display:unset}\n"], dependencies: [{ 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
149
150
|
}
|
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: NgDocTooltipWrapperComponent, decorators: [{
|
|
151
152
|
type: Component,
|
|
152
153
|
args: [{ selector: 'ng-doc-tooltip-wrapper', template: `
|
|
153
154
|
<div
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-processors-processors.mjs","sources":["../../../../libs/app/processors/processors/blockquote.processor.ts","../../../../libs/app/processors/processors/code.processor.ts","../../../../libs/app/processors/processors/demo.processor.ts","../../../../libs/app/processors/processors/demo-pane.processor.ts","../../../../libs/app/processors/processors/icon.processor.ts","../../../../libs/app/processors/processors/link.processor.ts","../../../../libs/app/processors/processors/playground.processor.ts","../../../../libs/app/processors/processors/tabs.processor.ts","../../../../libs/app/processors/processors/tooltip.processor.ts","../../../../libs/app/processors/processors/ng-doc-app-processors-processors.ts"],"sourcesContent":["import { NgDocPageProcessor } from '@ng-doc/app/interfaces';\nimport { NgDocBlockquoteComponent, NgDocBlockquoteType } from '@ng-doc/ui-kit';\n\nexport const blockquoteProcessor: NgDocPageProcessor<NgDocBlockquoteComponent> = {\n\tcomponent: NgDocBlockquoteComponent,\n\tselector: 'ng-doc-blockquote',\n\textractOptions: (element: Element) => ({\n\t\tcontent: [Array.from(element.childNodes)],\n\t\tinputs: {\n\t\t\ttype: (element.getAttribute('type') as NgDocBlockquoteType) || 'default',\n\t\t},\n\t}),\n};\n","import { NgDocCodeComponent } from '@ng-doc/app/components/code';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const codeProcessor: NgDocPageProcessor<NgDocCodeComponent> = {\n\tcomponent: NgDocCodeComponent,\n\tselector: 'pre code',\n\tnodeToReplace: (element: Element) => element.closest('pre') ?? element,\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\tcopyButton: element.getAttribute('copyButton') !== 'false',\n\t\t\tname: element.getAttribute('name') || undefined,\n\t\t\ticon: element.getAttribute('icon') || undefined,\n\t\t\tlineNumbers: element.getAttribute('lineNumbers') !== 'false',\n\t\t},\n\t\tcontent: [[element.closest('pre') ?? element]],\n\t}),\n};\n","import { NgDocDemoComponent } from '@ng-doc/app/components/demo';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const demoProcessor: NgDocPageProcessor<NgDocDemoComponent> = {\n\tcomponent: NgDocDemoComponent,\n\tselector: 'ng-doc-demo',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\tcomponentName: element.getAttribute('componentName') || undefined,\n\t\t\toptions: JSON.parse(element.querySelector('#options')?.textContent ?? '') || {},\n\t\t},\n\t}),\n};\n","import { NgDocDemoPaneComponent } from '@ng-doc/app/components/demo-pane';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const demoPaneProcessor: NgDocPageProcessor<NgDocDemoPaneComponent> = {\n\tcomponent: NgDocDemoPaneComponent,\n\tselector: 'ng-doc-demo-pane',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\tcomponentName: element.getAttribute('componentName') || undefined,\n\t\t\toptions: JSON.parse(element.querySelector('#options')?.textContent ?? '') || {},\n\t\t},\n\t}),\n};\n","import { NgDocPageProcessor } from '@ng-doc/app/interfaces';\nimport { NgDocIconComponent, NgDocIconSize } from '@ng-doc/ui-kit';\n\nexport const iconProcessor: NgDocPageProcessor<NgDocIconComponent> = {\n\tcomponent: NgDocIconComponent,\n\tselector: 'ng-doc-icon',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\ticon: element.getAttribute('icon') ?? '',\n\t\t\tsize: (Number(element.getAttribute('size')) as NgDocIconSize) ?? 16,\n\t\t},\n\t}),\n};\n","import { NgDocPageLinkComponent } from '@ng-doc/app/components/page-link';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const linkProcessor: NgDocPageProcessor<NgDocPageLinkComponent> = {\n\tcomponent: NgDocPageLinkComponent,\n\tselector: 'a',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\thref: element.getAttribute('href') ?? '',\n\t\t\tclasses: element.getAttribute('class') ?? '',\n\t\t},\n\t\tcontent: [Array.from(element.childNodes)],\n\t}),\n};\n","import { NgDocPlaygroundComponent } from '@ng-doc/app/components/playground';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\nimport { isPresent } from '@ng-doc/core';\n\nexport const playgroundProcessor: NgDocPageProcessor<NgDocPlaygroundComponent> = {\n\tcomponent: NgDocPlaygroundComponent,\n\tselector: 'ng-doc-playground',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\tid: element.getAttribute('id') || undefined,\n\t\t\tproperties:\n\t\t\t\tJSON.parse(element.querySelector('#data')?.textContent?.replace(/\\n/g, '\\\\n') ?? '') ||\n\t\t\t\tundefined,\n\t\t\tpipeName: element.querySelector('#pipeName')?.textContent || undefined,\n\t\t\tselectors: (element.querySelector('#selectors')?.textContent || '')\n\t\t\t\t.split(',')\n\t\t\t\t.map((selector: string) => selector.trim())\n\t\t\t\t.filter(isPresent),\n\t\t\toptions: JSON.parse(element.querySelector('#options')?.textContent ?? '') || {},\n\t\t},\n\t}),\n};\n","import { NgDocTabsComponent } from '@ng-doc/app/components/tabs';\nimport { NgDocPageProcessor, NgDocTab } from '@ng-doc/app/interfaces';\n\nexport const tabsProcessor: NgDocPageProcessor<NgDocTabsComponent> = {\n\tcomponent: NgDocTabsComponent,\n\tselector: 'ng-doc-tab',\n\tnodeToReplace: (element: Element) => {\n\t\tconst anchor: Element = document.createElement('div');\n\n\t\treturn element.parentNode?.insertBefore(anchor, element) ?? element;\n\t},\n\textractOptions: (element: Element, root: Element) => {\n\t\tconst group: string | null = element.getAttribute('group') ?? '';\n\t\tconst tabs: Element[] = Array.from(root.querySelectorAll(`ng-doc-tab[group=\"${group}\"]`));\n\t\tconst mappedTabs: NgDocTab[] = tabs.map((tab: Element) => ({\n\t\t\ttitle: tab.getAttribute('name') ?? '',\n\t\t\tcontent: tab,\n\t\t\ticon: tab.getAttribute('icon') || undefined,\n\t\t\tactive: tab.hasAttribute('active'),\n\t\t}));\n\n\t\ttabs.forEach((tab: Element) => tab.remove());\n\n\t\treturn {\n\t\t\tinputs: {\n\t\t\t\ttabs: mappedTabs,\n\t\t\t},\n\t\t};\n\t},\n};\n","import {\n\tAfterViewInit,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tInput,\n\tViewChild,\n} from '@angular/core';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\nimport { NgDocTooltipDirective } from '@ng-doc/ui-kit';\n\n@Component({\n\tselector: 'ng-doc-tooltip-wrapper',\n\ttemplate: `\n\t\t<div\n\t\t\tclass=\"content-projection\"\n\t\t\t[ngDocTooltip]=\"content ?? ''\"\n\t\t\t[displayOrigin]=\"tooltipElement ?? contentProjection\"\n\t\t\t[pointerOrigin]=\"tooltipElement ?? contentProjection\"\n\t\t\t#contentProjection>\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t`,\n\tstyles: [\n\t\t`\n\t\t\t.content-projection {\n\t\t\t\tdisplay: unset;\n\t\t\t}\n\t\t`,\n\t],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [NgDocTooltipDirective],\n})\nclass NgDocTooltipWrapperComponent implements AfterViewInit {\n\t@Input()\n\tcontent?: string;\n\n\tprotected tooltipElement: HTMLElement | null = null;\n\n\t@ViewChild('contentProjection', { read: ElementRef, static: true })\n\tprivate contentProjection?: ElementRef<HTMLElement>;\n\n\tconstructor(private readonly changeDetectorRef: ChangeDetectorRef) {}\n\n\tngAfterViewInit(): void {\n\t\tif (this.contentProjection) {\n\t\t\tconst element: Element | null =\n\t\t\t\tthis.contentProjection.nativeElement.querySelector('[ngDocTooltip]');\n\n\t\t\tthis.tooltipElement = element instanceof HTMLElement ? element : null;\n\n\t\t\tthis.changeDetectorRef.detectChanges();\n\t\t}\n\t}\n}\n\nexport const tooltipProcessor: NgDocPageProcessor<NgDocTooltipWrapperComponent> = {\n\tcomponent: NgDocTooltipWrapperComponent,\n\tselector: '[ngDocTooltip]',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\tcontent: element.getAttribute('ngDocTooltip') ?? '',\n\t\t},\n\t\tcontent: [[element.cloneNode(true)]],\n\t}),\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAGa,MAAA,mBAAmB,GAAiD;AAChF,IAAA,SAAS,EAAE,wBAAwB;AACnC,IAAA,QAAQ,EAAE,mBAAmB;AAC7B,IAAA,cAAc,EAAE,CAAC,OAAgB,MAAM;QACtC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AACzC,QAAA,MAAM,EAAE;YACP,IAAI,EAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAyB,IAAI,SAAS;AACxE,SAAA;KACD,CAAC;;;ACRU,MAAA,aAAa,GAA2C;AACpE,IAAA,SAAS,EAAE,kBAAkB;AAC7B,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,aAAa,EAAE,CAAC,OAAgB,KAAK,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO;AACtE,IAAA,cAAc,EAAE,CAAC,OAAgB,MAAM;AACtC,QAAA,MAAM,EAAE;YACP,UAAU,EA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;AClEH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-doc-app-processors-processors.mjs","sources":["../../../../libs/app/processors/processors/blockquote.processor.ts","../../../../libs/app/processors/processors/code.processor.ts","../../../../libs/app/processors/processors/demo.processor.ts","../../../../libs/app/processors/processors/demo-pane.processor.ts","../../../../libs/app/processors/processors/icon.processor.ts","../../../../libs/app/processors/processors/link.processor.ts","../../../../libs/app/processors/processors/playground.processor.ts","../../../../libs/app/processors/processors/tabs.processor.ts","../../../../libs/app/processors/processors/tooltip.processor.ts","../../../../libs/app/processors/processors/ng-doc-app-processors-processors.ts"],"sourcesContent":["import { NgDocPageProcessor } from '@ng-doc/app/interfaces';\nimport { NgDocBlockquoteComponent, NgDocBlockquoteType } from '@ng-doc/ui-kit';\n\nexport const blockquoteProcessor: NgDocPageProcessor<NgDocBlockquoteComponent> = {\n\tcomponent: NgDocBlockquoteComponent,\n\tselector: 'ng-doc-blockquote',\n\textractOptions: (element: Element) => ({\n\t\tcontent: [Array.from(element.childNodes)],\n\t\tinputs: {\n\t\t\ttype: (element.getAttribute('type') as NgDocBlockquoteType) || 'default',\n\t\t},\n\t}),\n};\n","import { NgDocCodeComponent } from '@ng-doc/app/components/code';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const codeProcessor: NgDocPageProcessor<NgDocCodeComponent> = {\n\tcomponent: NgDocCodeComponent,\n\tselector: 'pre code',\n\tnodeToReplace: (element: Element) => element.closest('pre') ?? element,\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\tcopyButton: element.getAttribute('copyButton') !== 'false',\n\t\t\tname: element.getAttribute('name') || undefined,\n\t\t\ticon: element.getAttribute('icon') || undefined,\n\t\t\tlineNumbers: element.getAttribute('lineNumbers') !== 'false',\n\t\t},\n\t\tcontent: [[element.closest('pre') ?? element]],\n\t}),\n};\n","import { NgDocDemoComponent } from '@ng-doc/app/components/demo';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const demoProcessor: NgDocPageProcessor<NgDocDemoComponent> = {\n\tcomponent: NgDocDemoComponent,\n\tselector: 'ng-doc-demo',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\tcomponentName: element.getAttribute('componentName') || undefined,\n\t\t\toptions: JSON.parse(element.querySelector('#options')?.textContent ?? '') || {},\n\t\t},\n\t}),\n};\n","import { NgDocDemoPaneComponent } from '@ng-doc/app/components/demo-pane';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const demoPaneProcessor: NgDocPageProcessor<NgDocDemoPaneComponent> = {\n\tcomponent: NgDocDemoPaneComponent,\n\tselector: 'ng-doc-demo-pane',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\tcomponentName: element.getAttribute('componentName') || undefined,\n\t\t\toptions: JSON.parse(element.querySelector('#options')?.textContent ?? '') || {},\n\t\t},\n\t}),\n};\n","import { NgDocPageProcessor } from '@ng-doc/app/interfaces';\nimport { NgDocIconComponent, NgDocIconSize } from '@ng-doc/ui-kit';\n\nexport const iconProcessor: NgDocPageProcessor<NgDocIconComponent> = {\n\tcomponent: NgDocIconComponent,\n\tselector: 'ng-doc-icon',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\ticon: element.getAttribute('icon') ?? '',\n\t\t\tsize: (Number(element.getAttribute('size')) as NgDocIconSize) || 16,\n\t\t},\n\t}),\n};\n","import { NgDocPageLinkComponent } from '@ng-doc/app/components/page-link';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const linkProcessor: NgDocPageProcessor<NgDocPageLinkComponent> = {\n\tcomponent: NgDocPageLinkComponent,\n\tselector: 'a',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\thref: element.getAttribute('href') ?? '',\n\t\t\tclasses: element.getAttribute('class') ?? '',\n\t\t},\n\t\tcontent: [Array.from(element.childNodes)],\n\t}),\n};\n","import { NgDocPlaygroundComponent } from '@ng-doc/app/components/playground';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\nimport { isPresent } from '@ng-doc/core';\n\nexport const playgroundProcessor: NgDocPageProcessor<NgDocPlaygroundComponent> = {\n\tcomponent: NgDocPlaygroundComponent,\n\tselector: 'ng-doc-playground',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\tid: element.getAttribute('id') || undefined,\n\t\t\tproperties:\n\t\t\t\tJSON.parse(element.querySelector('#data')?.textContent?.replace(/\\n/g, '\\\\n') ?? '') ||\n\t\t\t\tundefined,\n\t\t\tpipeName: element.querySelector('#pipeName')?.textContent || undefined,\n\t\t\tselectors: (element.querySelector('#selectors')?.textContent || '')\n\t\t\t\t.split(',')\n\t\t\t\t.map((selector: string) => selector.trim())\n\t\t\t\t.filter(isPresent),\n\t\t\toptions: JSON.parse(element.querySelector('#options')?.textContent ?? '') || {},\n\t\t},\n\t}),\n};\n","import { Injector, Renderer2 } from '@angular/core';\nimport { NgDocTabsComponent } from '@ng-doc/app/components/tabs';\nimport { NgDocPageProcessor, NgDocTab } from '@ng-doc/app/interfaces';\n\nexport const tabsProcessor: NgDocPageProcessor<NgDocTabsComponent> = {\n\tcomponent: NgDocTabsComponent,\n\tselector: 'ng-doc-tab',\n\tnodeToReplace: (element: Element, injector: Injector) => {\n\t\tconst renderer: Renderer2 = injector.get(Renderer2);\n\t\tconst anchor: Element = renderer.createElement('div');\n\n\t\treturn element.parentNode?.insertBefore(anchor, element) ?? element;\n\t},\n\textractOptions: (element: Element, root: Element) => {\n\t\tconst group: string | null = element.getAttribute('group') ?? '';\n\t\tconst tabs: Element[] = Array.from(root.querySelectorAll(`ng-doc-tab[group=\"${group}\"]`));\n\t\tconst mappedTabs: NgDocTab[] = tabs.map((tab: Element) => ({\n\t\t\ttitle: tab.getAttribute('name') ?? '',\n\t\t\tcontent: tab,\n\t\t\ticon: tab.getAttribute('icon') || undefined,\n\t\t\tactive: tab.hasAttribute('active'),\n\t\t}));\n\n\t\ttabs.forEach((tab: Element) => tab.remove());\n\n\t\treturn {\n\t\t\tinputs: {\n\t\t\t\ttabs: mappedTabs,\n\t\t\t},\n\t\t};\n\t},\n};\n","import {\n\tAfterViewInit,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tInput,\n\tViewChild,\n} from '@angular/core';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\nimport { NgDocTooltipDirective } from '@ng-doc/ui-kit';\n\n@Component({\n\tselector: 'ng-doc-tooltip-wrapper',\n\ttemplate: `\n\t\t<div\n\t\t\tclass=\"content-projection\"\n\t\t\t[ngDocTooltip]=\"content ?? ''\"\n\t\t\t[displayOrigin]=\"tooltipElement ?? contentProjection\"\n\t\t\t[pointerOrigin]=\"tooltipElement ?? contentProjection\"\n\t\t\t#contentProjection>\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t`,\n\tstyles: [\n\t\t`\n\t\t\t.content-projection {\n\t\t\t\tdisplay: unset;\n\t\t\t}\n\t\t`,\n\t],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [NgDocTooltipDirective],\n})\nclass NgDocTooltipWrapperComponent implements AfterViewInit {\n\t@Input()\n\tcontent?: string;\n\n\tprotected tooltipElement: HTMLElement | null = null;\n\n\t@ViewChild('contentProjection', { read: ElementRef, static: true })\n\tprivate contentProjection?: ElementRef<HTMLElement>;\n\n\tconstructor(private readonly changeDetectorRef: ChangeDetectorRef) {}\n\n\tngAfterViewInit(): void {\n\t\tif (this.contentProjection) {\n\t\t\tconst element: Element | null =\n\t\t\t\tthis.contentProjection.nativeElement.querySelector('[ngDocTooltip]');\n\n\t\t\tthis.tooltipElement = element instanceof HTMLElement ? element : null;\n\n\t\t\tthis.changeDetectorRef.detectChanges();\n\t\t}\n\t}\n}\n\nexport const tooltipProcessor: NgDocPageProcessor<NgDocTooltipWrapperComponent> = {\n\tcomponent: NgDocTooltipWrapperComponent,\n\tselector: '[ngDocTooltip]',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\tcontent: element.getAttribute('ngDocTooltip') ?? '',\n\t\t},\n\t\tcontent: [[element.cloneNode(true)]],\n\t}),\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAGa,MAAA,mBAAmB,GAAiD;AAChF,IAAA,SAAS,EAAE,wBAAwB;AACnC,IAAA,QAAQ,EAAE,mBAAmB;AAC7B,IAAA,cAAc,EAAE,CAAC,OAAgB,MAAM;QACtC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AACzC,QAAA,MAAM,EAAE;YACP,IAAI,EAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAyB,IAAI,SAAS;AACxE,SAAA;KACD,CAAC;;;ACRU,MAAA,aAAa,GAA2C;AACpE,IAAA,SAAS,EAAE,kBAAkB;AAC7B,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,aAAa,EAAE,CAAC,OAAgB,KAAK,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO;AACtE,IAAA,cAAc,EAAE,CAAC,OAAgB,MAAM;AACtC,QAAA,MAAM,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,OAAO;YAC1D,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,SAAS;YAC/C,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,SAAS;YAC/C,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,KAAK,OAAO;AAC5D,SAAA;AACD,QAAA,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC;KAC9C,CAAC;;;ACZU,MAAA,aAAa,GAA2C;AACpE,IAAA,SAAS,EAAE,kBAAkB;AAC7B,IAAA,QAAQ,EAAE,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