@ng-doc/app 22.1.0 → 22.2.0
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/LICENSE +21 -0
- package/fesm2022/ng-doc-app-classes-content-controller.mjs +22 -4
- package/fesm2022/ng-doc-app-classes-content-controller.mjs.map +1 -1
- package/fesm2022/ng-doc-app-classes-default-search-engine.mjs +36 -12
- package/fesm2022/ng-doc-app-classes-default-search-engine.mjs.map +1 -1
- package/fesm2022/ng-doc-app-classes-root-page.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-api-list.mjs +7 -5
- package/fesm2022/ng-doc-app-components-api-list.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-breadcrumb.mjs +5 -3
- package/fesm2022/ng-doc-app-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-code.mjs +6 -4
- package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-command-palette.mjs +35 -27
- package/fesm2022/ng-doc-app-components-command-palette.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-copy-button.mjs +6 -4
- package/fesm2022/ng-doc-app-components-copy-button.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo-displayer.mjs +19 -4
- package/fesm2022/ng-doc-app-components-demo-displayer.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo-frame.mjs +195 -12
- package/fesm2022/ng-doc-app-components-demo-frame.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo-pane.mjs +2 -2
- package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo.mjs +49 -12
- package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-fullscreen-button.mjs +5 -3
- package/fesm2022/ng-doc-app-components-fullscreen-button.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs +4 -2
- package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-heading-anchor.mjs +5 -3
- package/fesm2022/ng-doc-app-components-heading-anchor.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-image-viewer.mjs +5 -3
- package/fesm2022/ng-doc-app-components-image-viewer.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-navbar.mjs +4 -2
- package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-navigation.mjs +5 -3
- package/fesm2022/ng-doc-app-components-page-navigation.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-wrapper.mjs +2 -2
- package/fesm2022/ng-doc-app-components-page-wrapper.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page.mjs +83 -16
- package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-playground.mjs +743 -108
- package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-root.mjs +51 -4
- package/fesm2022/ng-doc-app-components-root.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-search-result.mjs +8 -6
- package/fesm2022/ng-doc-app-components-search-result.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-search.mjs +7 -5
- package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-sidebar.mjs +4 -3
- package/fesm2022/ng-doc-app-components-sidebar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-theme-toggle.mjs +7 -5
- package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-toc.mjs +4 -2
- package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
- package/fesm2022/ng-doc-app-constants.mjs +11 -1
- package/fesm2022/ng-doc-app-constants.mjs.map +1 -1
- package/fesm2022/ng-doc-app-demo-app.mjs +618 -15
- package/fesm2022/ng-doc-app-demo-app.mjs.map +1 -1
- package/fesm2022/ng-doc-app-helpers.mjs +125 -6
- package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +29 -18
- package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers-texts.mjs +53 -0
- package/fesm2022/ng-doc-app-providers-texts.mjs.map +1 -0
- package/fesm2022/ng-doc-app-providers.mjs +1 -0
- package/fesm2022/ng-doc-app-providers.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs +27 -2
- package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-highlighter.mjs +8 -5
- package/fesm2022/ng-doc-app-services-highlighter.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-shortcuts.mjs +38 -4
- package/fesm2022/ng-doc-app-services-shortcuts.mjs.map +1 -1
- package/fesm2022/ng-doc-app-texts-ar.mjs +238 -0
- package/fesm2022/ng-doc-app-texts-ar.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-de.mjs +205 -0
- package/fesm2022/ng-doc-app-texts-de.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-es.mjs +205 -0
- package/fesm2022/ng-doc-app-texts-es.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-fr.mjs +205 -0
- package/fesm2022/ng-doc-app-texts-fr.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-hi.mjs +219 -0
- package/fesm2022/ng-doc-app-texts-hi.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-ja.mjs +205 -0
- package/fesm2022/ng-doc-app-texts-ja.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-ko.mjs +205 -0
- package/fesm2022/ng-doc-app-texts-ko.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-pt-br.mjs +205 -0
- package/fesm2022/ng-doc-app-texts-pt-br.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-ru.mjs +231 -0
- package/fesm2022/ng-doc-app-texts-ru.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-uk.mjs +231 -0
- package/fesm2022/ng-doc-app-texts-uk.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-zh.mjs +205 -0
- package/fesm2022/ng-doc-app-texts-zh.mjs.map +1 -0
- package/fesm2022/ng-doc-app-tokens.mjs +214 -1
- package/fesm2022/ng-doc-app-tokens.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-json-control.mjs +90 -0
- package/fesm2022/ng-doc-app-type-controls-json-control.mjs.map +1 -0
- package/fesm2022/ng-doc-app-type-controls-list-control.mjs +792 -0
- package/fesm2022/ng-doc-app-type-controls-list-control.mjs.map +1 -0
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +5 -3
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls.mjs +2 -0
- package/fesm2022/ng-doc-app-type-controls.mjs.map +1 -1
- package/package.json +59 -3
- package/styles/global.css +1 -0
- package/styles/main.css +1 -0
- package/types/ng-doc-app-classes-default-search-engine.d.ts +11 -0
- package/types/ng-doc-app-classes-root-page.d.ts +5 -0
- package/types/ng-doc-app-components-api-list.d.ts +3 -1
- package/types/ng-doc-app-components-breadcrumb.d.ts +2 -1
- package/types/ng-doc-app-components-code.d.ts +2 -0
- package/types/ng-doc-app-components-command-palette.d.ts +3 -1
- package/types/ng-doc-app-components-copy-button.d.ts +3 -1
- package/types/ng-doc-app-components-demo-displayer.d.ts +13 -1
- package/types/ng-doc-app-components-demo-frame.d.ts +62 -3
- package/types/ng-doc-app-components-demo.d.ts +27 -8
- package/types/ng-doc-app-components-fullscreen-button.d.ts +2 -0
- package/types/ng-doc-app-components-fullscreen-toggle.d.ts +2 -0
- package/types/ng-doc-app-components-heading-anchor.d.ts +2 -0
- package/types/ng-doc-app-components-image-viewer.d.ts +2 -0
- package/types/ng-doc-app-components-navbar.d.ts +2 -0
- package/types/ng-doc-app-components-page-navigation.d.ts +2 -1
- package/types/ng-doc-app-components-page.d.ts +10 -1
- package/types/ng-doc-app-components-playground.d.ts +241 -44
- package/types/ng-doc-app-components-root.d.ts +18 -0
- package/types/ng-doc-app-components-search-result.d.ts +2 -0
- package/types/ng-doc-app-components-search.d.ts +2 -0
- package/types/ng-doc-app-components-sidebar.d.ts +2 -1
- package/types/ng-doc-app-components-theme-toggle.d.ts +4 -1
- package/types/ng-doc-app-components-toc.d.ts +2 -1
- package/types/ng-doc-app-constants.d.ts +11 -1
- package/types/ng-doc-app-demo-app.d.ts +211 -3
- package/types/ng-doc-app-helpers.d.ts +56 -3
- package/types/ng-doc-app-interfaces.d.ts +621 -3
- package/types/ng-doc-app-providers-ng-doc-app.d.ts +6 -0
- package/types/ng-doc-app-providers-texts.d.ts +28 -0
- package/types/ng-doc-app-providers.d.ts +1 -0
- package/types/ng-doc-app-services-content-scroll-intent.d.ts +11 -1
- package/types/ng-doc-app-services-highlighter.d.ts +3 -1
- package/types/ng-doc-app-services-shortcuts.d.ts +16 -0
- package/types/ng-doc-app-texts-ar.d.ts +13 -0
- package/types/ng-doc-app-texts-de.d.ts +12 -0
- package/types/ng-doc-app-texts-es.d.ts +12 -0
- package/types/ng-doc-app-texts-fr.d.ts +12 -0
- package/types/ng-doc-app-texts-hi.d.ts +12 -0
- package/types/ng-doc-app-texts-ja.d.ts +12 -0
- package/types/ng-doc-app-texts-ko.d.ts +12 -0
- package/types/ng-doc-app-texts-pt-br.d.ts +12 -0
- package/types/ng-doc-app-texts-ru.d.ts +12 -0
- package/types/ng-doc-app-texts-uk.d.ts +12 -0
- package/types/ng-doc-app-texts-zh.d.ts +12 -0
- package/types/ng-doc-app-tokens.d.ts +21 -2
- package/types/ng-doc-app-type-controls-json-control.d.ts +38 -0
- package/types/ng-doc-app-type-controls-list-control.d.ts +313 -0
- package/types/ng-doc-app-type-controls-type-alias-control.d.ts +2 -1
- package/types/ng-doc-app-type-controls.d.ts +2 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Clipboard } from '@angular/cdk/clipboard';
|
|
2
|
-
import { LocationStrategy, isPlatformBrowser } from '@angular/common';
|
|
2
|
+
import { LocationStrategy, ViewportScroller, isPlatformBrowser } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { viewChild, ElementRef,
|
|
4
|
+
import { inject, viewChild, ElementRef, ChangeDetectorRef, signal, NgZone, PLATFORM_ID, DestroyRef, effect, untracked, reflectComponentType, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
5
|
import { ActivatedRoute, RouterLink, RouterOutlet } from '@angular/router';
|
|
6
6
|
import { NgDocContentAnchorController } from '@ng-doc/app/classes/content-anchor-controller';
|
|
7
7
|
import { NgDocContentController } from '@ng-doc/app/classes/content-controller';
|
|
8
8
|
import { NgDocRootPage } from '@ng-doc/app/classes/root-page';
|
|
9
9
|
import { NgDocPageWrapperComponent } from '@ng-doc/app/components/page-wrapper';
|
|
10
|
-
import { ɵrestoreNgDocHydrationSnapshot as _restoreNgDocHydrationSnapshot, generateToc, createComponent, ɵngDocPageUrl as _ngDocPageUrl } from '@ng-doc/app/helpers';
|
|
10
|
+
import { ɵwatchNgDocContentUpdates as _watchNgDocContentUpdates, ɵupdatedNgDocContent as _updatedNgDocContent, ɵrestoreNgDocHydrationSnapshot as _restoreNgDocHydrationSnapshot, generateToc, createComponent, ɵngDocPageUrl as _ngDocPageUrl } from '@ng-doc/app/helpers';
|
|
11
11
|
import { NgDocSanitizeHtmlPipe } from '@ng-doc/app/pipes';
|
|
12
12
|
import { NgDocPageProcessorComponent } from '@ng-doc/app/processors';
|
|
13
13
|
import { provideTypeControl } from '@ng-doc/app/providers/type-control';
|
|
14
14
|
import { NgDocFullscreenRouteService } from '@ng-doc/app/services/fullscreen-route';
|
|
15
|
-
import { NG_DOC_PAGE_SKELETON } from '@ng-doc/app/tokens';
|
|
16
|
-
import { NgDocTypeAliasControlComponent, NgDocStringControlComponent, NgDocNumberControlComponent, NgDocBooleanControlComponent } from '@ng-doc/app/type-controls';
|
|
15
|
+
import { NG_DOC_TEXTS, NG_DOC_PAGE_SKELETON } from '@ng-doc/app/tokens';
|
|
16
|
+
import { NgDocTypeAliasControlComponent, NgDocStringControlComponent, NgDocNumberControlComponent, NgDocBooleanControlComponent, NgDocStringListControlComponent, NgDocNumberListControlComponent, NgDocTypeAliasListControlComponent, NgDocJsonControlComponent } from '@ng-doc/app/type-controls';
|
|
17
17
|
import { NgDocButtonIconComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';
|
|
18
18
|
import { WA_LOCATION } from '@ng-web-apis/common';
|
|
19
19
|
|
|
@@ -28,6 +28,7 @@ import { WA_LOCATION } from '@ng-web-apis/common';
|
|
|
28
28
|
*/
|
|
29
29
|
class NgDocPageComponent {
|
|
30
30
|
constructor() {
|
|
31
|
+
this.texts = inject(NG_DOC_TEXTS).page;
|
|
31
32
|
/** The element that holds the rendered page content. */
|
|
32
33
|
this.pageContainer = viewChild('pageContainer', { ...(ngDevMode ? { debugName: "pageContainer" } : /* istanbul ignore next */ {}), read: (ElementRef) });
|
|
33
34
|
this.rootPage = inject(NgDocRootPage);
|
|
@@ -51,14 +52,27 @@ class NgDocPageComponent {
|
|
|
51
52
|
this.ngZone = inject(NgZone);
|
|
52
53
|
this.location = inject(WA_LOCATION);
|
|
53
54
|
this.locationStrategy = inject(LocationStrategy);
|
|
55
|
+
this.viewportScroller = inject(ViewportScroller);
|
|
54
56
|
// The router state is complete when the page is created, so a fullscreen route opened
|
|
55
57
|
// directly (a new tab) is known before the first render and the page content never renders.
|
|
56
58
|
this.showFullscreenRoute(!!this.route.firstChild);
|
|
57
59
|
const source = this.rootPage.pageContentSource;
|
|
60
|
+
const browser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
61
|
+
if (source && browser) {
|
|
62
|
+
// Registered before the content controller's own listener, so the HTML is still the one on
|
|
63
|
+
// the page: an update that changes it renders a new pass, which restores the position.
|
|
64
|
+
const stop = _watchNgDocContentUpdates(({ ids }) => {
|
|
65
|
+
const payload = ids.has(source.id) ? _updatedNgDocContent(source.id) : undefined;
|
|
66
|
+
if (payload && payload.html !== this.contentController.html() && !this.fullscreenRoute()) {
|
|
67
|
+
this.updateScroll ??= this.viewportScroller.getScrollPosition();
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
inject(DestroyRef).onDestroy(stop);
|
|
71
|
+
}
|
|
58
72
|
if (source && !this.fullscreenRoute()) {
|
|
59
73
|
// Angular empties this host (it skips hydration) and the content loads asynchronously, so
|
|
60
74
|
// the server-rendered page stays visible until the loaded content renders.
|
|
61
|
-
if (
|
|
75
|
+
if (browser) {
|
|
62
76
|
this.snapshot = _restoreNgDocHydrationSnapshot(inject(ElementRef).nativeElement);
|
|
63
77
|
}
|
|
64
78
|
this.connectContent(source);
|
|
@@ -136,6 +150,7 @@ class NgDocPageComponent {
|
|
|
136
150
|
}
|
|
137
151
|
if (this.rootPage.pageContentSource)
|
|
138
152
|
this.contentAnchorController.contentProcessed();
|
|
153
|
+
this.restoreUpdateScroll();
|
|
139
154
|
}
|
|
140
155
|
/**
|
|
141
156
|
* Shows the page's own content in place of the server-rendered copy when a pass of the loaded
|
|
@@ -163,6 +178,12 @@ class NgDocPageComponent {
|
|
|
163
178
|
this.contentAnchorController.activate();
|
|
164
179
|
this.contentController.connect(source);
|
|
165
180
|
}
|
|
181
|
+
restoreUpdateScroll() {
|
|
182
|
+
const position = this.updateScroll;
|
|
183
|
+
this.updateScroll = undefined;
|
|
184
|
+
if (position)
|
|
185
|
+
this.viewportScroller.scrollToPosition(position);
|
|
186
|
+
}
|
|
166
187
|
releaseSnapshot() {
|
|
167
188
|
const release = this.snapshot;
|
|
168
189
|
this.snapshot = undefined;
|
|
@@ -172,11 +193,34 @@ class NgDocPageComponent {
|
|
|
172
193
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: NgDocPageComponent, isStandalone: true, selector: "ng-doc-page", host: { attributes: { "ngSkipHydration": "true" }, properties: { "attr.data-ng-doc-async-content": "rootPage.pageContentSource && !fullscreenRoute() ? \"\" : null" } }, providers: [
|
|
173
194
|
NgDocContentAnchorController,
|
|
174
195
|
NgDocContentController,
|
|
175
|
-
provideTypeControl('NgDocTypeAlias', NgDocTypeAliasControlComponent, {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
196
|
+
provideTypeControl('NgDocTypeAlias', NgDocTypeAliasControlComponent, {
|
|
197
|
+
order: 10,
|
|
198
|
+
cloneable: true,
|
|
199
|
+
}),
|
|
200
|
+
provideTypeControl('string', NgDocStringControlComponent, { order: 20, cloneable: true }),
|
|
201
|
+
provideTypeControl('number', NgDocNumberControlComponent, { order: 30, cloneable: true }),
|
|
202
|
+
provideTypeControl('boolean', NgDocBooleanControlComponent, { order: 40, cloneable: true }),
|
|
203
|
+
// The chip fields have several interactive parts, so their rows are not labels (see
|
|
204
|
+
// `labelWrapper`).
|
|
205
|
+
provideTypeControl('string[]', NgDocStringListControlComponent, {
|
|
206
|
+
order: 50,
|
|
207
|
+
labelWrapper: false,
|
|
208
|
+
cloneable: true,
|
|
209
|
+
}),
|
|
210
|
+
provideTypeControl('number[]', NgDocNumberListControlComponent, {
|
|
211
|
+
order: 50,
|
|
212
|
+
labelWrapper: false,
|
|
213
|
+
cloneable: true,
|
|
214
|
+
}),
|
|
215
|
+
// Arrays of a union of literals, whose item values the builder lists as `options`.
|
|
216
|
+
provideTypeControl('NgDocTypeAlias[]', NgDocTypeAliasListControlComponent, {
|
|
217
|
+
order: 50,
|
|
218
|
+
labelWrapper: false,
|
|
219
|
+
cloneable: true,
|
|
220
|
+
}),
|
|
221
|
+
// Array types without a control of their own (see the inspector's `arrayType`).
|
|
222
|
+
provideTypeControl('NgDocArray', NgDocJsonControlComponent, { order: 60, cloneable: true }),
|
|
223
|
+
], viewQueries: [{ propertyName: "pageContainer", first: true, predicate: ["pageContainer"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "@if (!fullscreenRoute()) {\n <div class=\"ng-doc-page-controls\">\n <button\n type=\"button\"\n ng-doc-button-icon\n [rounded]=\"false\"\n [attr.aria-label]=\"linkCopied() ? texts.linkCopied : texts.copyLink\"\n [ngDocTooltip]=\"linkCopied() ? texts.linkCopiedTooltip : texts.copyLinkTooltip\"\n [attr.data-ng-doc-copied]=\"linkCopied()\"\n (click)=\"copyLink()\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7\" />\n <path d=\"M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7\" />\n </svg>\n </button>\n @if (rootPage.editSourceFileUrl) {\n <a\n ng-doc-button-icon\n [rounded]=\"false\"\n target=\"_blank\"\n rel=\"noopener\"\n [attr.aria-label]=\"texts.edit\"\n [ngDocTooltip]=\"texts.edit\"\n [href]=\"rootPage.editSourceFileUrl\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"M12 20h9M16.5 3.5a2.1 2.1 0 1 1 3 3L7 19l-4 1 1-4Z\" />\n </svg>\n </a>\n }\n @if (rootPage.viewSourceFileUrl) {\n <a\n ng-doc-button-icon\n [rounded]=\"false\"\n target=\"_blank\"\n rel=\"noopener\"\n [attr.aria-label]=\"texts.viewSource\"\n [ngDocTooltip]=\"texts.viewSourceTooltip\"\n [href]=\"rootPage.viewSourceFileUrl\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"m8 7-5 5 5 5m8-10 5 5-5 5\" />\n </svg>\n </a>\n }\n </div>\n\n @if (rootPage.pageContentSource) {\n @if (contentController.error(); as error) {\n <div class=\"ng-doc-page-wrapper\" role=\"alert\">{{ error.message }}</div>\n } @else {\n <div\n class=\"ng-doc-page-wrapper\"\n [ngDocPageProcessor]=\"contentController.html() | ngDocSanitizeHtml\"\n [contentVersion]=\"contentController.version()\"\n (beforeRender)=\"revealLoaded($event)\"\n (contentProcessed)=\"contentController.processed($event)\"\n (processingError)=\"contentController.processingFailed($event)\"\n (afterRender)=\"createToc()\"\n #pageContainer></div>\n }\n } @else {\n <div\n class=\"ng-doc-page-wrapper\"\n [ngDocPageProcessor]=\"rootPage.pageContent | ngDocSanitizeHtml\"\n (afterRender)=\"createToc()\"\n #pageContainer></div>\n }\n}\n\n<!-- A fullscreen route replaces the page; the outlet stays, so it can open and close in place. -->\n@if (!rootPage.page?.disableFullscreenRoutes) {\n <div class=\"ng-doc-fullscreen-route\" [hidden]=\"!fullscreenRoute()\">\n @if (fullscreenRoute()) {\n <a\n class=\"ng-doc-fullscreen-route-back\"\n [routerLink]=\"pageUrl()\"\n [attr.aria-label]=\"texts.backTo({ title: rootPage.page?.title })\"\n [ngDocTooltip]=\"texts.backTo({ title: rootPage.page?.title })\">\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path d=\"M19 12H5m7 7-7-7 7-7\" />\n </svg>\n <span class=\"ng-doc-fullscreen-route-back-label\">{{\n rootPage.page?.title ?? texts.back\n }}</span>\n </a>\n }\n <router-outlet\n (activate)=\"showFullscreenRoute(true)\"\n (deactivate)=\"showFullscreenRoute(false)\" />\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host .ng-doc-page-controls{position:absolute;top:0;right:0;display:flex;gap:2px;--ng-doc-button-color: var(--ng-doc-text-muted);--ng-doc-button-hover-color: var(--ng-doc-heading-color);--ng-doc-button-active-color: var(--ng-doc-heading-color);--ng-doc-button-hover-background: var(--ng-doc-hover-background)}:host .ng-doc-page-controls [data-ng-doc-copied=true]{--ng-doc-button-color: var(--ng-doc-success-strong)}.ng-doc-fullscreen-route{background-image:radial-gradient(color-mix(in srgb,var(--_ng-doc-demo-canvas-dots, var(--ng-doc-base-5)) 55%,transparent) 1px,transparent 1px);background-size:16px 16px;display:grid;place-items:center;min-height:100vh;min-height:100dvh;padding:var(--ng-doc-space-16) var(--ng-doc-space-4);background-color:var(--ng-doc-demo-displayer-background, var(--ng-doc-background))}.ng-doc-fullscreen-route[hidden]{display:none}.ng-doc-fullscreen-route>router-outlet{display:none}.ng-doc-fullscreen-route-back{position:fixed;top:var(--ng-doc-space-4);left:var(--ng-doc-space-4);z-index:1;display:inline-flex;align-items:center;gap:var(--ng-doc-space-2);max-width:calc(100% - var(--ng-doc-space-8));height:32px;padding:0 var(--ng-doc-space-3) 0 var(--ng-doc-space-2);border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-background);box-shadow:0 0 0 1px var(--ng-doc-border-color),var(--ng-doc-shadow-xs);color:var(--ng-doc-text-muted);font-family:var(--ng-doc-font-family);font-size:13px;font-weight:500;line-height:18px;text-decoration:none}.ng-doc-fullscreen-route-back:hover{color:var(--ng-doc-heading-color)}.ng-doc-fullscreen-route-back:focus-visible{outline:none;box-shadow:var(--ng-doc-focus-ring)}.ng-doc-fullscreen-route-back svg{flex:none;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.ng-doc-fullscreen-route-back-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host[data-ng-doc-hydration-snapshot]>:not(.ng-doc-hydration-snapshot){display:none!important}\n"], dependencies: [{ kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon], button[ng-doc-button-icon-raised], a[ng-doc-button-icon-raised], button[ng-doc-button-icon-transparent], a[ng-doc-button-icon-transparent]", inputs: ["size", "rounded"] }, { kind: "directive", type: 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: "component", type: NgDocPageProcessorComponent, selector: "[ngDocPageProcessor]", inputs: ["ngDocPageProcessor", "contentVersion"], outputs: ["beforeRender", "afterRender", "contentProcessed", "processingError"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "pipe", type: NgDocSanitizeHtmlPipe, name: "ngDocSanitizeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
180
224
|
}
|
|
181
225
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocPageComponent, decorators: [{
|
|
182
226
|
type: Component,
|
|
@@ -190,16 +234,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
190
234
|
], providers: [
|
|
191
235
|
NgDocContentAnchorController,
|
|
192
236
|
NgDocContentController,
|
|
193
|
-
provideTypeControl('NgDocTypeAlias', NgDocTypeAliasControlComponent, {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
237
|
+
provideTypeControl('NgDocTypeAlias', NgDocTypeAliasControlComponent, {
|
|
238
|
+
order: 10,
|
|
239
|
+
cloneable: true,
|
|
240
|
+
}),
|
|
241
|
+
provideTypeControl('string', NgDocStringControlComponent, { order: 20, cloneable: true }),
|
|
242
|
+
provideTypeControl('number', NgDocNumberControlComponent, { order: 30, cloneable: true }),
|
|
243
|
+
provideTypeControl('boolean', NgDocBooleanControlComponent, { order: 40, cloneable: true }),
|
|
244
|
+
// The chip fields have several interactive parts, so their rows are not labels (see
|
|
245
|
+
// `labelWrapper`).
|
|
246
|
+
provideTypeControl('string[]', NgDocStringListControlComponent, {
|
|
247
|
+
order: 50,
|
|
248
|
+
labelWrapper: false,
|
|
249
|
+
cloneable: true,
|
|
250
|
+
}),
|
|
251
|
+
provideTypeControl('number[]', NgDocNumberListControlComponent, {
|
|
252
|
+
order: 50,
|
|
253
|
+
labelWrapper: false,
|
|
254
|
+
cloneable: true,
|
|
255
|
+
}),
|
|
256
|
+
// Arrays of a union of literals, whose item values the builder lists as `options`.
|
|
257
|
+
provideTypeControl('NgDocTypeAlias[]', NgDocTypeAliasListControlComponent, {
|
|
258
|
+
order: 50,
|
|
259
|
+
labelWrapper: false,
|
|
260
|
+
cloneable: true,
|
|
261
|
+
}),
|
|
262
|
+
// Array types without a control of their own (see the inspector's `arrayType`).
|
|
263
|
+
provideTypeControl('NgDocArray', NgDocJsonControlComponent, { order: 60, cloneable: true }),
|
|
197
264
|
], host: {
|
|
198
265
|
ngSkipHydration: 'true',
|
|
199
266
|
// Tells the browser that the server-rendered content must be kept until the loaded content
|
|
200
267
|
// renders (ɵNG_DOC_ASYNC_CONTENT_ATTRIBUTE).
|
|
201
268
|
'[attr.data-ng-doc-async-content]': 'rootPage.pageContentSource && !fullscreenRoute() ? "" : null',
|
|
202
|
-
}, template: "@if (!fullscreenRoute()) {\n <div class=\"ng-doc-page-controls\">\n <button\n type=\"button\"\n ng-doc-button-icon\n [rounded]=\"false\"\n [attr.aria-label]=\"linkCopied() ?
|
|
269
|
+
}, template: "@if (!fullscreenRoute()) {\n <div class=\"ng-doc-page-controls\">\n <button\n type=\"button\"\n ng-doc-button-icon\n [rounded]=\"false\"\n [attr.aria-label]=\"linkCopied() ? texts.linkCopied : texts.copyLink\"\n [ngDocTooltip]=\"linkCopied() ? texts.linkCopiedTooltip : texts.copyLinkTooltip\"\n [attr.data-ng-doc-copied]=\"linkCopied()\"\n (click)=\"copyLink()\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7\" />\n <path d=\"M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7\" />\n </svg>\n </button>\n @if (rootPage.editSourceFileUrl) {\n <a\n ng-doc-button-icon\n [rounded]=\"false\"\n target=\"_blank\"\n rel=\"noopener\"\n [attr.aria-label]=\"texts.edit\"\n [ngDocTooltip]=\"texts.edit\"\n [href]=\"rootPage.editSourceFileUrl\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"M12 20h9M16.5 3.5a2.1 2.1 0 1 1 3 3L7 19l-4 1 1-4Z\" />\n </svg>\n </a>\n }\n @if (rootPage.viewSourceFileUrl) {\n <a\n ng-doc-button-icon\n [rounded]=\"false\"\n target=\"_blank\"\n rel=\"noopener\"\n [attr.aria-label]=\"texts.viewSource\"\n [ngDocTooltip]=\"texts.viewSourceTooltip\"\n [href]=\"rootPage.viewSourceFileUrl\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"m8 7-5 5 5 5m8-10 5 5-5 5\" />\n </svg>\n </a>\n }\n </div>\n\n @if (rootPage.pageContentSource) {\n @if (contentController.error(); as error) {\n <div class=\"ng-doc-page-wrapper\" role=\"alert\">{{ error.message }}</div>\n } @else {\n <div\n class=\"ng-doc-page-wrapper\"\n [ngDocPageProcessor]=\"contentController.html() | ngDocSanitizeHtml\"\n [contentVersion]=\"contentController.version()\"\n (beforeRender)=\"revealLoaded($event)\"\n (contentProcessed)=\"contentController.processed($event)\"\n (processingError)=\"contentController.processingFailed($event)\"\n (afterRender)=\"createToc()\"\n #pageContainer></div>\n }\n } @else {\n <div\n class=\"ng-doc-page-wrapper\"\n [ngDocPageProcessor]=\"rootPage.pageContent | ngDocSanitizeHtml\"\n (afterRender)=\"createToc()\"\n #pageContainer></div>\n }\n}\n\n<!-- A fullscreen route replaces the page; the outlet stays, so it can open and close in place. -->\n@if (!rootPage.page?.disableFullscreenRoutes) {\n <div class=\"ng-doc-fullscreen-route\" [hidden]=\"!fullscreenRoute()\">\n @if (fullscreenRoute()) {\n <a\n class=\"ng-doc-fullscreen-route-back\"\n [routerLink]=\"pageUrl()\"\n [attr.aria-label]=\"texts.backTo({ title: rootPage.page?.title })\"\n [ngDocTooltip]=\"texts.backTo({ title: rootPage.page?.title })\">\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path d=\"M19 12H5m7 7-7-7 7-7\" />\n </svg>\n <span class=\"ng-doc-fullscreen-route-back-label\">{{\n rootPage.page?.title ?? texts.back\n }}</span>\n </a>\n }\n <router-outlet\n (activate)=\"showFullscreenRoute(true)\"\n (deactivate)=\"showFullscreenRoute(false)\" />\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host .ng-doc-page-controls{position:absolute;top:0;right:0;display:flex;gap:2px;--ng-doc-button-color: var(--ng-doc-text-muted);--ng-doc-button-hover-color: var(--ng-doc-heading-color);--ng-doc-button-active-color: var(--ng-doc-heading-color);--ng-doc-button-hover-background: var(--ng-doc-hover-background)}:host .ng-doc-page-controls [data-ng-doc-copied=true]{--ng-doc-button-color: var(--ng-doc-success-strong)}.ng-doc-fullscreen-route{background-image:radial-gradient(color-mix(in srgb,var(--_ng-doc-demo-canvas-dots, var(--ng-doc-base-5)) 55%,transparent) 1px,transparent 1px);background-size:16px 16px;display:grid;place-items:center;min-height:100vh;min-height:100dvh;padding:var(--ng-doc-space-16) var(--ng-doc-space-4);background-color:var(--ng-doc-demo-displayer-background, var(--ng-doc-background))}.ng-doc-fullscreen-route[hidden]{display:none}.ng-doc-fullscreen-route>router-outlet{display:none}.ng-doc-fullscreen-route-back{position:fixed;top:var(--ng-doc-space-4);left:var(--ng-doc-space-4);z-index:1;display:inline-flex;align-items:center;gap:var(--ng-doc-space-2);max-width:calc(100% - var(--ng-doc-space-8));height:32px;padding:0 var(--ng-doc-space-3) 0 var(--ng-doc-space-2);border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-background);box-shadow:0 0 0 1px var(--ng-doc-border-color),var(--ng-doc-shadow-xs);color:var(--ng-doc-text-muted);font-family:var(--ng-doc-font-family);font-size:13px;font-weight:500;line-height:18px;text-decoration:none}.ng-doc-fullscreen-route-back:hover{color:var(--ng-doc-heading-color)}.ng-doc-fullscreen-route-back:focus-visible{outline:none;box-shadow:var(--ng-doc-focus-ring)}.ng-doc-fullscreen-route-back svg{flex:none;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.ng-doc-fullscreen-route-back-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host[data-ng-doc-hydration-snapshot]>:not(.ng-doc-hydration-snapshot){display:none!important}\n"] }]
|
|
203
270
|
}], ctorParameters: () => [], propDecorators: { pageContainer: [{ type: i0.ViewChild, args: ['pageContainer', { ...{ read: (ElementRef) }, isSignal: true }] }] } });
|
|
204
271
|
|
|
205
272
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-components-page.mjs","sources":["../../../../libs/app/components/page/page.component.ts","../../../../libs/app/components/page/page.component.html","../../../../libs/app/components/page/ng-doc-app-components-page.ts"],"sourcesContent":["import { Clipboard } from '@angular/cdk/clipboard';\nimport { isPlatformBrowser, LocationStrategy } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n NgZone,\n PLATFORM_ID,\n reflectComponentType,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { ActivatedRoute, RouterLink, RouterOutlet } from '@angular/router';\nimport { NgDocContentAnchorController } from '@ng-doc/app/classes/content-anchor-controller';\nimport { NgDocContentController } from '@ng-doc/app/classes/content-controller';\nimport { NgDocRootPage } from '@ng-doc/app/classes/root-page';\nimport { NgDocPageWrapperComponent } from '@ng-doc/app/components/page-wrapper';\nimport {\n createComponent,\n generateToc,\n ɵngDocPageUrl,\n ɵrestoreNgDocHydrationSnapshot,\n} from '@ng-doc/app/helpers';\nimport { NgDocPageSkeleton } from '@ng-doc/app/interfaces';\nimport { NgDocSanitizeHtmlPipe } from '@ng-doc/app/pipes';\nimport { NgDocPageProcessorComponent } from '@ng-doc/app/processors';\nimport { provideTypeControl } from '@ng-doc/app/providers/type-control';\nimport { NgDocFullscreenRouteService } from '@ng-doc/app/services/fullscreen-route';\nimport { NG_DOC_PAGE_SKELETON } from '@ng-doc/app/tokens';\nimport {\n NgDocBooleanControlComponent,\n NgDocNumberControlComponent,\n NgDocStringControlComponent,\n NgDocTypeAliasControlComponent,\n} from '@ng-doc/app/type-controls';\nimport type { NgDocContentSource } from '@ng-doc/core/interfaces';\nimport { NgDocButtonIconComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';\nimport { WA_LOCATION } from '@ng-web-apis/common';\n\n/**\n * A generated page: its rendered content, the page actions (copy link, edit and view the source),\n * the table of contents it fills in, and the outlet of its fullscreen routes.\n *\n * A fullscreen route (a child route of the page, unless the page sets `disableFullscreenRoutes`)\n * replaces the page: it is shown on its own on the canvas of demos, with a link back to the page,\n * and `NgDocFullscreenRouteService` tells the root layout and the page wrapper to hide their\n * chrome.\n */\n@Component({\n selector: 'ng-doc-page',\n templateUrl: './page.component.html',\n styleUrls: ['./page.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocButtonIconComponent,\n NgDocTooltipDirective,\n NgDocPageProcessorComponent,\n RouterLink,\n RouterOutlet,\n NgDocSanitizeHtmlPipe,\n ],\n providers: [\n NgDocContentAnchorController,\n NgDocContentController,\n provideTypeControl('NgDocTypeAlias', NgDocTypeAliasControlComponent, { order: 10 }),\n provideTypeControl('string', NgDocStringControlComponent, { order: 20 }),\n provideTypeControl('number', NgDocNumberControlComponent, { order: 30 }),\n provideTypeControl('boolean', NgDocBooleanControlComponent, { order: 40 }),\n ],\n host: {\n ngSkipHydration: 'true',\n // Tells the browser that the server-rendered content must be kept until the loaded content\n // renders (ɵNG_DOC_ASYNC_CONTENT_ATTRIBUTE).\n '[attr.data-ng-doc-async-content]':\n 'rootPage.pageContentSource && !fullscreenRoute() ? \"\" : null',\n },\n})\nexport class NgDocPageComponent {\n /** The element that holds the rendered page content. */\n readonly pageContainer = viewChild('pageContainer', { read: ElementRef<HTMLElement> });\n\n protected rootPage: NgDocRootPage = inject(NgDocRootPage);\n protected skeleton: NgDocPageSkeleton = inject(NG_DOC_PAGE_SKELETON);\n protected changeDetectorRef = inject(ChangeDetectorRef);\n\n protected pageWrapper: NgDocPageWrapperComponent = inject(NgDocPageWrapperComponent);\n protected readonly contentController = inject(NgDocContentController);\n /** Whether the link to the page was just copied. */\n protected readonly linkCopied = signal(false);\n /** Whether one of the page's fullscreen routes is shown instead of the page. */\n protected readonly fullscreenRoute = signal(false);\n /** URL of the page, for the link back from a fullscreen route. */\n protected readonly pageUrl = signal('/');\n private readonly route = inject(ActivatedRoute);\n private readonly fullscreenRoutes = inject(NgDocFullscreenRouteService);\n private readonly contentAnchorController = inject(NgDocContentAnchorController);\n private readonly clipboard = inject(Clipboard);\n private readonly ngZone = inject(NgZone);\n private readonly location = inject(WA_LOCATION);\n private readonly locationStrategy = inject(LocationStrategy);\n private linkCopiedTimer?: ReturnType<typeof setTimeout>;\n /** Removes the server-rendered copy shown while asynchronous content loads. */\n private snapshot?: () => void;\n\n constructor() {\n // The router state is complete when the page is created, so a fullscreen route opened\n // directly (a new tab) is known before the first render and the page content never renders.\n this.showFullscreenRoute(!!this.route.firstChild);\n\n const source: NgDocContentSource | undefined = this.rootPage.pageContentSource;\n\n if (source && !this.fullscreenRoute()) {\n // Angular empties this host (it skips hydration) and the content loads asynchronously, so\n // the server-rendered page stays visible until the loaded content renders.\n if (isPlatformBrowser(inject(PLATFORM_ID))) {\n this.snapshot = ɵrestoreNgDocHydrationSnapshot(inject(ElementRef).nativeElement);\n }\n this.connectContent(source);\n }\n // A page opened on a fullscreen route loads its content only when the reader goes back to\n // it, because pending content holds the application unstable until it renders. An effect,\n // so a page that is leaving (its route closes as it is destroyed) loads nothing.\n effect(() => {\n if (source && !this.fullscreenRoute()) untracked(() => this.connectContent(source));\n });\n // A load that needs no new pass (its content is already rendered, for example an empty body)\n // or that failed settles without `revealLoaded`.\n effect(() => {\n if (this.contentController.settled()) untracked(() => this.releaseSnapshot());\n });\n effect(() => {\n if (this.contentController.error()) {\n untracked(() => {\n this.releaseSnapshot();\n this.pageWrapper.pageToc().clear();\n this.contentAnchorController.contentFailed();\n });\n }\n });\n inject(DestroyRef).onDestroy(() => {\n clearTimeout(this.linkCopiedTimer);\n this.releaseSnapshot();\n this.fullscreenRoutes.set(this, false);\n });\n }\n\n /**\n * Shows one of the page's fullscreen routes instead of the page, or the page again. The outlet\n * of the fullscreen routes calls it when a route opens or closes.\n * @param shown - Whether a fullscreen route is shown.\n */\n protected showFullscreenRoute(shown: boolean): void {\n // Pages that disable fullscreen routes render their child routes themselves.\n const fullscreen: boolean = shown && !this.rootPage.page?.disableFullscreenRoutes;\n\n if (fullscreen) {\n this.pageUrl.set(\n '/' +\n this.route.pathFromRoot\n .flatMap((route: ActivatedRoute) => route.snapshot.url)\n .map((segment) => segment.path)\n .join('/'),\n );\n }\n this.fullscreenRoute.set(fullscreen);\n this.fullscreenRoutes.set(this, fullscreen);\n }\n\n /**\n * Creates the table of contents from the headings of the rendered page.\n */\n createToc(): void {\n const container = this.pageContainer();\n const pageToc = this.pageWrapper.pageToc();\n\n pageToc.clear();\n if (container && this.skeleton.toc) {\n const inputs: Record<string, unknown> = {\n tableOfContent: generateToc(container.nativeElement) ?? [],\n };\n // Only components that declare the input get it: a custom table of contents may not.\n const declared = reflectComponentType(this.skeleton.toc)?.inputs ?? [];\n\n if (declared.some(({ templateName }) => templateName === 'editSourceFileUrl')) {\n inputs['editSourceFileUrl'] = this.rootPage.editSourceFileUrl;\n }\n\n // API pages carry their symbol details for the rail, hidden in the content.\n const details = container.nativeElement.querySelector('[data-ng-doc-rail-details]');\n\n if (details && declared.some(({ templateName }) => templateName === 'details')) {\n details.removeAttribute('hidden');\n inputs['details'] = details;\n }\n\n createComponent(pageToc, this.skeleton.toc, inputs);\n\n this.changeDetectorRef.detectChanges();\n }\n if (this.rootPage.pageContentSource) this.contentAnchorController.contentProcessed();\n }\n\n /**\n * Shows the page's own content in place of the server-rendered copy when a pass of the loaded\n * content is about to render, in the same task, so its components render and measure visible.\n * The pass of the empty content before the source has loaded keeps the copy.\n * @param version - The content version of the pass.\n * @internal\n */\n protected revealLoaded(version: number): void {\n if (version === this.contentController.loadedVersion()) this.releaseSnapshot();\n }\n\n /**\n * Copies the link to the page, without its query and fragment.\n */\n copyLink(): void {\n this.clipboard.copy(ɵngDocPageUrl(this.locationStrategy, this.location));\n this.linkCopied.set(true);\n clearTimeout(this.linkCopiedTimer);\n // The label timer must not hold the application unstable, so it runs outside the zone.\n this.linkCopiedTimer = this.ngZone.runOutsideAngular(() =>\n setTimeout(() => this.linkCopied.set(false), 1400),\n );\n }\n\n private connectContent(source: NgDocContentSource): void {\n // Both calls do nothing once the source is connected.\n this.contentAnchorController.activate();\n this.contentController.connect(source);\n }\n\n private releaseSnapshot(): void {\n const release = this.snapshot;\n\n this.snapshot = undefined;\n release?.();\n }\n}\n","@if (!fullscreenRoute()) {\n <div class=\"ng-doc-page-controls\">\n <button\n type=\"button\"\n ng-doc-button-icon\n [rounded]=\"false\"\n [attr.aria-label]=\"linkCopied() ? 'Link copied' : 'Copy link to this page'\"\n [ngDocTooltip]=\"linkCopied() ? 'Copied' : 'Copy link'\"\n [attr.data-ng-doc-copied]=\"linkCopied()\"\n (click)=\"copyLink()\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7\" />\n <path d=\"M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7\" />\n </svg>\n </button>\n @if (rootPage.editSourceFileUrl) {\n <a\n ng-doc-button-icon\n [rounded]=\"false\"\n [href]=\"rootPage.editSourceFileUrl\"\n target=\"_blank\"\n rel=\"noopener\"\n aria-label=\"Edit this page\"\n ngDocTooltip=\"Edit this page\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"M12 20h9M16.5 3.5a2.1 2.1 0 1 1 3 3L7 19l-4 1 1-4Z\" />\n </svg>\n </a>\n }\n @if (rootPage.viewSourceFileUrl) {\n <a\n ng-doc-button-icon\n [rounded]=\"false\"\n [href]=\"rootPage.viewSourceFileUrl\"\n target=\"_blank\"\n rel=\"noopener\"\n aria-label=\"View the page source\"\n ngDocTooltip=\"View source\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"m8 7-5 5 5 5m8-10 5 5-5 5\" />\n </svg>\n </a>\n }\n </div>\n\n @if (rootPage.pageContentSource) {\n @if (contentController.error(); as error) {\n <div class=\"ng-doc-page-wrapper\" role=\"alert\">{{ error.message }}</div>\n } @else {\n <div\n class=\"ng-doc-page-wrapper\"\n [ngDocPageProcessor]=\"contentController.html() | ngDocSanitizeHtml\"\n [contentVersion]=\"contentController.version()\"\n (beforeRender)=\"revealLoaded($event)\"\n (contentProcessed)=\"contentController.processed($event)\"\n (processingError)=\"contentController.processingFailed($event)\"\n (afterRender)=\"createToc()\"\n #pageContainer></div>\n }\n } @else {\n <div\n class=\"ng-doc-page-wrapper\"\n [ngDocPageProcessor]=\"rootPage.pageContent | ngDocSanitizeHtml\"\n (afterRender)=\"createToc()\"\n #pageContainer></div>\n }\n}\n\n<!-- A fullscreen route replaces the page; the outlet stays, so it can open and close in place. -->\n@if (!rootPage.page?.disableFullscreenRoutes) {\n <div class=\"ng-doc-fullscreen-route\" [hidden]=\"!fullscreenRoute()\">\n @if (fullscreenRoute()) {\n <a\n class=\"ng-doc-fullscreen-route-back\"\n [routerLink]=\"pageUrl()\"\n [attr.aria-label]=\"'Back to ' + (rootPage.page?.title ?? 'the page')\"\n [ngDocTooltip]=\"'Back to ' + (rootPage.page?.title ?? 'the page')\">\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path d=\"M19 12H5m7 7-7-7 7-7\" />\n </svg>\n <span class=\"ng-doc-fullscreen-route-back-label\">{{ rootPage.page?.title ?? 'Back' }}</span>\n </a>\n }\n <router-outlet\n (activate)=\"showFullscreenRoute(true)\"\n (deactivate)=\"showFullscreenRoute(false)\" />\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ɵrestoreNgDocHydrationSnapshot","ɵngDocPageUrl"],"mappings":";;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components/page/page.component.ts","../../../../libs/app/components/page/page.component.html","../../../../libs/app/components/page/ng-doc-app-components-page.ts"],"sourcesContent":["import { Clipboard } from '@angular/cdk/clipboard';\nimport { isPlatformBrowser, LocationStrategy, ViewportScroller } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n NgZone,\n PLATFORM_ID,\n reflectComponentType,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { ActivatedRoute, RouterLink, RouterOutlet } from '@angular/router';\nimport { NgDocContentAnchorController } from '@ng-doc/app/classes/content-anchor-controller';\nimport { NgDocContentController } from '@ng-doc/app/classes/content-controller';\nimport { NgDocRootPage } from '@ng-doc/app/classes/root-page';\nimport { NgDocPageWrapperComponent } from '@ng-doc/app/components/page-wrapper';\nimport {\n createComponent,\n generateToc,\n ɵngDocPageUrl,\n ɵrestoreNgDocHydrationSnapshot,\n ɵupdatedNgDocContent,\n ɵwatchNgDocContentUpdates,\n} from '@ng-doc/app/helpers';\nimport { NgDocPageSkeleton, NgDocPageTexts } from '@ng-doc/app/interfaces';\nimport { NgDocSanitizeHtmlPipe } from '@ng-doc/app/pipes';\nimport { NgDocPageProcessorComponent } from '@ng-doc/app/processors';\nimport { provideTypeControl } from '@ng-doc/app/providers/type-control';\nimport { NgDocFullscreenRouteService } from '@ng-doc/app/services/fullscreen-route';\nimport { NG_DOC_PAGE_SKELETON, NG_DOC_TEXTS } from '@ng-doc/app/tokens';\nimport {\n NgDocBooleanControlComponent,\n NgDocJsonControlComponent,\n NgDocNumberControlComponent,\n NgDocNumberListControlComponent,\n NgDocStringControlComponent,\n NgDocStringListControlComponent,\n NgDocTypeAliasControlComponent,\n NgDocTypeAliasListControlComponent,\n} from '@ng-doc/app/type-controls';\nimport type { NgDocContentSource } from '@ng-doc/core/interfaces';\nimport { NgDocButtonIconComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';\nimport { WA_LOCATION } from '@ng-web-apis/common';\n\n/**\n * A generated page: its rendered content, the page actions (copy link, edit and view the source),\n * the table of contents it fills in, and the outlet of its fullscreen routes.\n *\n * A fullscreen route (a child route of the page, unless the page sets `disableFullscreenRoutes`)\n * replaces the page: it is shown on its own on the canvas of demos, with a link back to the page,\n * and `NgDocFullscreenRouteService` tells the root layout and the page wrapper to hide their\n * chrome.\n */\n@Component({\n selector: 'ng-doc-page',\n templateUrl: './page.component.html',\n styleUrls: ['./page.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocButtonIconComponent,\n NgDocTooltipDirective,\n NgDocPageProcessorComponent,\n RouterLink,\n RouterOutlet,\n NgDocSanitizeHtmlPipe,\n ],\n providers: [\n NgDocContentAnchorController,\n NgDocContentController,\n provideTypeControl('NgDocTypeAlias', NgDocTypeAliasControlComponent, {\n order: 10,\n cloneable: true,\n }),\n provideTypeControl('string', NgDocStringControlComponent, { order: 20, cloneable: true }),\n provideTypeControl('number', NgDocNumberControlComponent, { order: 30, cloneable: true }),\n provideTypeControl('boolean', NgDocBooleanControlComponent, { order: 40, cloneable: true }),\n // The chip fields have several interactive parts, so their rows are not labels (see\n // `labelWrapper`).\n provideTypeControl('string[]', NgDocStringListControlComponent, {\n order: 50,\n labelWrapper: false,\n cloneable: true,\n }),\n provideTypeControl('number[]', NgDocNumberListControlComponent, {\n order: 50,\n labelWrapper: false,\n cloneable: true,\n }),\n // Arrays of a union of literals, whose item values the builder lists as `options`.\n provideTypeControl('NgDocTypeAlias[]', NgDocTypeAliasListControlComponent, {\n order: 50,\n labelWrapper: false,\n cloneable: true,\n }),\n // Array types without a control of their own (see the inspector's `arrayType`).\n provideTypeControl('NgDocArray', NgDocJsonControlComponent, { order: 60, cloneable: true }),\n ],\n host: {\n ngSkipHydration: 'true',\n // Tells the browser that the server-rendered content must be kept until the loaded content\n // renders (ɵNG_DOC_ASYNC_CONTENT_ATTRIBUTE).\n '[attr.data-ng-doc-async-content]':\n 'rootPage.pageContentSource && !fullscreenRoute() ? \"\" : null',\n },\n})\nexport class NgDocPageComponent {\n protected readonly texts: NgDocPageTexts = inject(NG_DOC_TEXTS).page;\n\n /** The element that holds the rendered page content. */\n readonly pageContainer = viewChild('pageContainer', { read: ElementRef<HTMLElement> });\n\n protected rootPage: NgDocRootPage = inject(NgDocRootPage);\n protected skeleton: NgDocPageSkeleton = inject(NG_DOC_PAGE_SKELETON);\n protected changeDetectorRef = inject(ChangeDetectorRef);\n\n protected pageWrapper: NgDocPageWrapperComponent = inject(NgDocPageWrapperComponent);\n protected readonly contentController = inject(NgDocContentController);\n /** Whether the link to the page was just copied. */\n protected readonly linkCopied = signal(false);\n /** Whether one of the page's fullscreen routes is shown instead of the page. */\n protected readonly fullscreenRoute = signal(false);\n /** URL of the page, for the link back from a fullscreen route. */\n protected readonly pageUrl = signal('/');\n private readonly route = inject(ActivatedRoute);\n private readonly fullscreenRoutes = inject(NgDocFullscreenRouteService);\n private readonly contentAnchorController = inject(NgDocContentAnchorController);\n private readonly clipboard = inject(Clipboard);\n private readonly ngZone = inject(NgZone);\n private readonly location = inject(WA_LOCATION);\n private readonly locationStrategy = inject(LocationStrategy);\n private readonly viewportScroller = inject(ViewportScroller);\n private linkCopiedTimer?: ReturnType<typeof setTimeout>;\n /** Removes the server-rendered copy shown while asynchronous content loads. */\n private snapshot?: () => void;\n /**\n * The scroll position when a development content update of this page arrived, restored once\n * its content has rendered: the new HTML replaces the old one, and the page may be shorter for\n * a moment while its processors run.\n */\n private updateScroll?: [number, number];\n\n constructor() {\n // The router state is complete when the page is created, so a fullscreen route opened\n // directly (a new tab) is known before the first render and the page content never renders.\n this.showFullscreenRoute(!!this.route.firstChild);\n\n const source: NgDocContentSource | undefined = this.rootPage.pageContentSource;\n\n const browser = isPlatformBrowser(inject(PLATFORM_ID));\n\n if (source && browser) {\n // Registered before the content controller's own listener, so the HTML is still the one on\n // the page: an update that changes it renders a new pass, which restores the position.\n const stop = ɵwatchNgDocContentUpdates(({ ids }) => {\n const payload = ids.has(source.id) ? ɵupdatedNgDocContent(source.id) : undefined;\n\n if (payload && payload.html !== this.contentController.html() && !this.fullscreenRoute()) {\n this.updateScroll ??= this.viewportScroller.getScrollPosition();\n }\n });\n\n inject(DestroyRef).onDestroy(stop);\n }\n if (source && !this.fullscreenRoute()) {\n // Angular empties this host (it skips hydration) and the content loads asynchronously, so\n // the server-rendered page stays visible until the loaded content renders.\n if (browser) {\n this.snapshot = ɵrestoreNgDocHydrationSnapshot(inject(ElementRef).nativeElement);\n }\n this.connectContent(source);\n }\n // A page opened on a fullscreen route loads its content only when the reader goes back to\n // it, because pending content holds the application unstable until it renders. An effect,\n // so a page that is leaving (its route closes as it is destroyed) loads nothing.\n effect(() => {\n if (source && !this.fullscreenRoute()) untracked(() => this.connectContent(source));\n });\n // A load that needs no new pass (its content is already rendered, for example an empty body)\n // or that failed settles without `revealLoaded`.\n effect(() => {\n if (this.contentController.settled()) untracked(() => this.releaseSnapshot());\n });\n effect(() => {\n if (this.contentController.error()) {\n untracked(() => {\n this.releaseSnapshot();\n this.pageWrapper.pageToc().clear();\n this.contentAnchorController.contentFailed();\n });\n }\n });\n inject(DestroyRef).onDestroy(() => {\n clearTimeout(this.linkCopiedTimer);\n this.releaseSnapshot();\n this.fullscreenRoutes.set(this, false);\n });\n }\n\n /**\n * Shows one of the page's fullscreen routes instead of the page, or the page again. The outlet\n * of the fullscreen routes calls it when a route opens or closes.\n * @param shown - Whether a fullscreen route is shown.\n */\n protected showFullscreenRoute(shown: boolean): void {\n // Pages that disable fullscreen routes render their child routes themselves.\n const fullscreen: boolean = shown && !this.rootPage.page?.disableFullscreenRoutes;\n\n if (fullscreen) {\n this.pageUrl.set(\n '/' +\n this.route.pathFromRoot\n .flatMap((route: ActivatedRoute) => route.snapshot.url)\n .map((segment) => segment.path)\n .join('/'),\n );\n }\n this.fullscreenRoute.set(fullscreen);\n this.fullscreenRoutes.set(this, fullscreen);\n }\n\n /**\n * Creates the table of contents from the headings of the rendered page.\n */\n createToc(): void {\n const container = this.pageContainer();\n const pageToc = this.pageWrapper.pageToc();\n\n pageToc.clear();\n if (container && this.skeleton.toc) {\n const inputs: Record<string, unknown> = {\n tableOfContent: generateToc(container.nativeElement) ?? [],\n };\n // Only components that declare the input get it: a custom table of contents may not.\n const declared = reflectComponentType(this.skeleton.toc)?.inputs ?? [];\n\n if (declared.some(({ templateName }) => templateName === 'editSourceFileUrl')) {\n inputs['editSourceFileUrl'] = this.rootPage.editSourceFileUrl;\n }\n\n // API pages carry their symbol details for the rail, hidden in the content.\n const details = container.nativeElement.querySelector('[data-ng-doc-rail-details]');\n\n if (details && declared.some(({ templateName }) => templateName === 'details')) {\n details.removeAttribute('hidden');\n inputs['details'] = details;\n }\n\n createComponent(pageToc, this.skeleton.toc, inputs);\n\n this.changeDetectorRef.detectChanges();\n }\n if (this.rootPage.pageContentSource) this.contentAnchorController.contentProcessed();\n this.restoreUpdateScroll();\n }\n\n /**\n * Shows the page's own content in place of the server-rendered copy when a pass of the loaded\n * content is about to render, in the same task, so its components render and measure visible.\n * The pass of the empty content before the source has loaded keeps the copy.\n * @param version - The content version of the pass.\n * @internal\n */\n protected revealLoaded(version: number): void {\n if (version === this.contentController.loadedVersion()) this.releaseSnapshot();\n }\n\n /**\n * Copies the link to the page, without its query and fragment.\n */\n copyLink(): void {\n this.clipboard.copy(ɵngDocPageUrl(this.locationStrategy, this.location));\n this.linkCopied.set(true);\n clearTimeout(this.linkCopiedTimer);\n // The label timer must not hold the application unstable, so it runs outside the zone.\n this.linkCopiedTimer = this.ngZone.runOutsideAngular(() =>\n setTimeout(() => this.linkCopied.set(false), 1400),\n );\n }\n\n private connectContent(source: NgDocContentSource): void {\n // Both calls do nothing once the source is connected.\n this.contentAnchorController.activate();\n this.contentController.connect(source);\n }\n\n private restoreUpdateScroll(): void {\n const position = this.updateScroll;\n\n this.updateScroll = undefined;\n if (position) this.viewportScroller.scrollToPosition(position);\n }\n\n private releaseSnapshot(): void {\n const release = this.snapshot;\n\n this.snapshot = undefined;\n release?.();\n }\n}\n","@if (!fullscreenRoute()) {\n <div class=\"ng-doc-page-controls\">\n <button\n type=\"button\"\n ng-doc-button-icon\n [rounded]=\"false\"\n [attr.aria-label]=\"linkCopied() ? texts.linkCopied : texts.copyLink\"\n [ngDocTooltip]=\"linkCopied() ? texts.linkCopiedTooltip : texts.copyLinkTooltip\"\n [attr.data-ng-doc-copied]=\"linkCopied()\"\n (click)=\"copyLink()\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7\" />\n <path d=\"M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7\" />\n </svg>\n </button>\n @if (rootPage.editSourceFileUrl) {\n <a\n ng-doc-button-icon\n [rounded]=\"false\"\n target=\"_blank\"\n rel=\"noopener\"\n [attr.aria-label]=\"texts.edit\"\n [ngDocTooltip]=\"texts.edit\"\n [href]=\"rootPage.editSourceFileUrl\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"M12 20h9M16.5 3.5a2.1 2.1 0 1 1 3 3L7 19l-4 1 1-4Z\" />\n </svg>\n </a>\n }\n @if (rootPage.viewSourceFileUrl) {\n <a\n ng-doc-button-icon\n [rounded]=\"false\"\n target=\"_blank\"\n rel=\"noopener\"\n [attr.aria-label]=\"texts.viewSource\"\n [ngDocTooltip]=\"texts.viewSourceTooltip\"\n [href]=\"rootPage.viewSourceFileUrl\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"m8 7-5 5 5 5m8-10 5 5-5 5\" />\n </svg>\n </a>\n }\n </div>\n\n @if (rootPage.pageContentSource) {\n @if (contentController.error(); as error) {\n <div class=\"ng-doc-page-wrapper\" role=\"alert\">{{ error.message }}</div>\n } @else {\n <div\n class=\"ng-doc-page-wrapper\"\n [ngDocPageProcessor]=\"contentController.html() | ngDocSanitizeHtml\"\n [contentVersion]=\"contentController.version()\"\n (beforeRender)=\"revealLoaded($event)\"\n (contentProcessed)=\"contentController.processed($event)\"\n (processingError)=\"contentController.processingFailed($event)\"\n (afterRender)=\"createToc()\"\n #pageContainer></div>\n }\n } @else {\n <div\n class=\"ng-doc-page-wrapper\"\n [ngDocPageProcessor]=\"rootPage.pageContent | ngDocSanitizeHtml\"\n (afterRender)=\"createToc()\"\n #pageContainer></div>\n }\n}\n\n<!-- A fullscreen route replaces the page; the outlet stays, so it can open and close in place. -->\n@if (!rootPage.page?.disableFullscreenRoutes) {\n <div class=\"ng-doc-fullscreen-route\" [hidden]=\"!fullscreenRoute()\">\n @if (fullscreenRoute()) {\n <a\n class=\"ng-doc-fullscreen-route-back\"\n [routerLink]=\"pageUrl()\"\n [attr.aria-label]=\"texts.backTo({ title: rootPage.page?.title })\"\n [ngDocTooltip]=\"texts.backTo({ title: rootPage.page?.title })\">\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path d=\"M19 12H5m7 7-7-7 7-7\" />\n </svg>\n <span class=\"ng-doc-fullscreen-route-back-label\">{{\n rootPage.page?.title ?? texts.back\n }}</span>\n </a>\n }\n <router-outlet\n (activate)=\"showFullscreenRoute(true)\"\n (deactivate)=\"showFullscreenRoute(false)\" />\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ɵwatchNgDocContentUpdates","ɵupdatedNgDocContent","ɵrestoreNgD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