@ng-doc/app 16.13.1 → 16.15.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/assets/themes/ng-doc-night.css +20 -19
- package/components/playground/playground-properties/playground-properties.component.d.ts +2 -1
- package/components/playground/playground.component.d.ts +3 -0
- package/components/theme-toggle/theme-toggle.component.d.ts +8 -2
- package/constants/themes.d.ts +8 -40
- package/esm2022/components/api-list/api-list.component.mjs +7 -5
- package/esm2022/components/code/code.component.mjs +3 -3
- package/esm2022/components/demo/demo.component.mjs +7 -6
- package/esm2022/components/demo-displayer/demo-displayer.component.mjs +3 -3
- package/esm2022/components/demo-pane/demo-pane.component.mjs +6 -5
- package/esm2022/components/kind-icon/kind-icon.component.mjs +3 -3
- package/esm2022/components/link/link.component.mjs +1 -1
- package/esm2022/components/navbar/navbar.component.mjs +3 -3
- package/esm2022/components/page/page.component.mjs +2 -2
- package/esm2022/components/page-link/page-link.component.mjs +4 -4
- 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-form.mjs +1 -1
- package/esm2022/components/playground/playground-properties/playground-properties.component.mjs +6 -3
- package/esm2022/components/playground/playground-property/playground-property.component.mjs +4 -2
- package/esm2022/components/playground/playground-property-control.mjs +1 -1
- package/esm2022/components/playground/playground.component.mjs +29 -10
- package/esm2022/components/search/search.component.mjs +3 -3
- package/esm2022/components/search-result/search-result.component.mjs +10 -2
- package/esm2022/components/sidebar/sidebar-category/sidebar-category.component.mjs +6 -5
- package/esm2022/components/sidebar/sidebar-item/sidebar-item.component.mjs +3 -3
- package/esm2022/components/sidebar/sidebar.component.mjs +3 -3
- package/esm2022/components/tabs/tabs.component.mjs +3 -3
- package/esm2022/components/theme-toggle/theme-toggle.component.mjs +35 -8
- package/esm2022/components/toc/toc-element/toc-element.component.mjs +3 -3
- package/esm2022/constants/themes.mjs +9 -44
- package/esm2022/directives/code-highlighter/code-highlighter.directive.mjs +1 -1
- package/esm2022/directives/route-active/route-active.directive.mjs +1 -1
- package/esm2022/helpers/as-boolean.mjs +6 -2
- package/esm2022/helpers/generate-toc.mjs +1 -1
- package/esm2022/interfaces/provided-type-control.mjs +1 -1
- package/esm2022/pipes/extract-value/extract-value.pipe.mjs +1 -1
- package/esm2022/pipes/filter-by-text/filter-by-text.pipe.mjs +1 -1
- package/esm2022/pipes/sanitize-html/sanitize-html.pipe.mjs +1 -1
- package/esm2022/processors/processors/code.processor.mjs +1 -1
- package/esm2022/processors/processors/demo-pane.processor.mjs +1 -1
- package/esm2022/processors/processors/demo.processor.mjs +1 -1
- package/esm2022/processors/processors/icon.processor.mjs +1 -1
- package/esm2022/processors/processors/link.processor.mjs +1 -1
- package/esm2022/processors/processors/playground.processor.mjs +3 -2
- package/esm2022/processors/processors/tabs.processor.mjs +1 -1
- package/esm2022/providers/ng-doc-app/provide-ng-doc-app.mjs +9 -8
- package/esm2022/services/store/store.service.mjs +1 -1
- package/esm2022/services/theme/theme.service.mjs +62 -33
- package/esm2022/tokens/api-list.mjs +1 -1
- package/esm2022/tokens/context.mjs +1 -1
- package/esm2022/tokens/theme.mjs +7 -7
- package/esm2022/tokens/type-control.mjs +1 -1
- package/esm2022/type-controls/boolean-control/boolean-control.component.mjs +1 -1
- package/esm2022/type-controls/number-control/number-control.component.mjs +1 -1
- package/esm2022/type-controls/string-control/string-control.component.mjs +1 -1
- package/esm2022/type-controls/type-alias-control/type-alias-control.component.mjs +1 -1
- package/esm2022/types/typed-form.mjs +1 -1
- package/fesm2022/ng-doc-app-components-api-list.mjs +5 -3
- package/fesm2022/ng-doc-app-components-api-list.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-code.mjs +2 -2
- package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo-displayer.mjs +2 -2
- package/fesm2022/ng-doc-app-components-demo-displayer.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo-pane.mjs +4 -3
- package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo.mjs +4 -3
- package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-kind-icon.mjs +2 -2
- package/fesm2022/ng-doc-app-components-kind-icon.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-link.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-navbar.mjs +2 -2
- package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-link.mjs +2 -2
- package/fesm2022/ng-doc-app-components-page-link.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-navigation.mjs +2 -2
- package/fesm2022/ng-doc-app-components-page-navigation.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page.mjs +2 -2
- package/fesm2022/ng-doc-app-components-playground.mjs +37 -14
- package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-search-result.mjs +9 -1
- package/fesm2022/ng-doc-app-components-search-result.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-search.mjs +2 -2
- package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-sidebar.mjs +8 -7
- package/fesm2022/ng-doc-app-components-sidebar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-tabs.mjs +2 -2
- package/fesm2022/ng-doc-app-components-tabs.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-theme-toggle.mjs +34 -7
- package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-toc.mjs +2 -2
- package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
- package/fesm2022/ng-doc-app-constants.mjs +9 -44
- package/fesm2022/ng-doc-app-constants.mjs.map +1 -1
- package/fesm2022/ng-doc-app-directives-code-highlighter.mjs.map +1 -1
- package/fesm2022/ng-doc-app-directives-route-active.mjs.map +1 -1
- package/fesm2022/ng-doc-app-helpers.mjs +5 -1
- package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
- package/fesm2022/ng-doc-app-pipes-extract-value.mjs.map +1 -1
- package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs.map +1 -1
- package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs.map +1 -1
- package/fesm2022/ng-doc-app-processors-processors.mjs +2 -1
- package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +8 -7
- package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-store.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-theme.mjs +61 -32
- package/fesm2022/ng-doc-app-services-theme.mjs.map +1 -1
- package/fesm2022/ng-doc-app-tokens.mjs +6 -6
- package/fesm2022/ng-doc-app-tokens.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-number-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-string-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
- package/package.json +3 -3
- package/services/theme/theme.service.d.ts +24 -7
- package/styles/global.css +154 -454
- package/styles/main.css +151 -451
- package/tokens/theme.d.ts +6 -6
- package/assets/themes/ng-doc-dark-purple.css +0 -120
|
@@ -2,23 +2,44 @@ import { trigger, transition, style, animate } from '@angular/animations';
|
|
|
2
2
|
import { NgIf } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
5
|
-
import { NG_DOC_NIGHT_THEME
|
|
5
|
+
import { NG_DOC_NIGHT_THEME } from '@ng-doc/app/constants';
|
|
6
6
|
import * as i1 from '@ng-doc/app/services';
|
|
7
|
-
import { NgDocButtonIconComponent, NgDocTooltipDirective, NgDocIconComponent } from '@ng-doc/ui-kit';
|
|
7
|
+
import { NgDocButtonIconComponent, NgDocTooltipDirective, NgDocIconComponent, NgDocSmoothResizeComponent } from '@ng-doc/ui-kit';
|
|
8
8
|
|
|
9
9
|
class NgDocThemeToggleComponent {
|
|
10
10
|
constructor(themeService) {
|
|
11
11
|
this.themeService = themeService;
|
|
12
|
-
this.themes = [
|
|
12
|
+
this.themes = [
|
|
13
|
+
{ name: 'Auto', theme: 'auto' },
|
|
14
|
+
{ name: 'Light', theme: undefined },
|
|
15
|
+
{ name: 'Dark', theme: NG_DOC_NIGHT_THEME },
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
get currentTheme() {
|
|
19
|
+
if (this.themeService.isAutoThemeEnabled) {
|
|
20
|
+
return this.themes[0];
|
|
21
|
+
}
|
|
22
|
+
const theme = this.themeService.currentTheme;
|
|
23
|
+
return this.themes.find(({ theme: t }) => t === theme) ?? this.themes[0];
|
|
13
24
|
}
|
|
14
25
|
get nextTheme() {
|
|
15
|
-
|
|
26
|
+
if (this.themeService.isAutoThemeEnabled) {
|
|
27
|
+
return this.themes[1];
|
|
28
|
+
}
|
|
29
|
+
const index = this.themes.findIndex(({ theme }) => theme === this.themeService.currentTheme);
|
|
30
|
+
return this.themes[(index + 1) % this.themes.length];
|
|
16
31
|
}
|
|
17
32
|
toggleTheme() {
|
|
18
|
-
this.
|
|
33
|
+
const { theme } = this.nextTheme;
|
|
34
|
+
if (theme === 'auto') {
|
|
35
|
+
this.themeService.enableAutoTheme(undefined, NG_DOC_NIGHT_THEME);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.themeService.set(theme?.id);
|
|
39
|
+
}
|
|
19
40
|
}
|
|
20
41
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocThemeToggleComponent, deps: [{ token: i1.NgDocThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocThemeToggleComponent, isStandalone: true, selector: "ng-doc-theme-toggle", ngImport: i0, template: "<button ng-doc-button-icon size=\"large\" (click)=\"toggleTheme()\" ngDocTooltip=\"
|
|
42
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocThemeToggleComponent, isStandalone: true, selector: "ng-doc-theme-toggle", ngImport: i0, template: "<button ng-doc-button-icon size=\"large\" (click)=\"toggleTheme()\" [ngDocTooltip]=\"tooltipContent\">\n\t<ng-template #tooltipContent>\n\t\t<ng-doc-smooth-resize [trigger]=\"nextTheme.name\">\n\t\t\tSet \"{{ nextTheme.name }}\" theme\n\t\t</ng-doc-smooth-resize>\n\t</ng-template>\n\t<ng-doc-icon\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\ticon=\"sun\"\n\t\t[size]=\"24\"\n\t\t*ngIf=\"nextTheme === themes[1]\"></ng-doc-icon>\n\t<ng-doc-icon\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\ticon=\"moon\"\n\t\t[size]=\"24\"\n\t\t*ngIf=\"nextTheme === themes[2]\"></ng-doc-icon>\n\t<div\n\t\tclass=\"letter\"\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\t*ngIf=\"nextTheme === themes[0]\">\n\t\tA\n\t</div>\n</button>\n", styles: [":host{display:inline-block;height:40px;width:40px}:host .letter{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);--ng-doc-font-size: 26px;--ng-doc-font-weight: 600}\n"], dependencies: [{ kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon]", inputs: ["size", "rounded"] }, { kind: "directive", type: NgDocTooltipDirective, selector: "[ngDocTooltip]", inputs: ["ngDocTooltip", "delay", "displayOrigin", "pointerOrigin", "positions", "canOpen", "panelClass", "minHeight", "maxHeight", "height", "minWidth", "maxWidth", "width"], outputs: ["beforeOpen", "afterOpen", "beforeClose", "afterClose"], exportAs: ["ngDocTooltip"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "component", type: NgDocSmoothResizeComponent, selector: "ng-doc-smooth-resize", inputs: ["trigger", "animateOpacity"] }], animations: [
|
|
22
43
|
trigger('switchIcon', [
|
|
23
44
|
transition(':enter', [
|
|
24
45
|
style({ transform: 'translateX({{from}})', position: 'absolute', opacity: 0 }),
|
|
@@ -44,7 +65,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
|
44
65
|
animate('225ms cubic-bezier(0.4,0.0,0.2,1)', style({ transform: 'translateX({{to}})', position: 'absolute', opacity: 0 })),
|
|
45
66
|
], { params: { to: '-100%' } }),
|
|
46
67
|
]),
|
|
47
|
-
], selector: 'ng-doc-theme-toggle', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
68
|
+
], selector: 'ng-doc-theme-toggle', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
69
|
+
NgDocButtonIconComponent,
|
|
70
|
+
NgDocTooltipDirective,
|
|
71
|
+
NgIf,
|
|
72
|
+
NgDocIconComponent,
|
|
73
|
+
NgDocSmoothResizeComponent,
|
|
74
|
+
], template: "<button ng-doc-button-icon size=\"large\" (click)=\"toggleTheme()\" [ngDocTooltip]=\"tooltipContent\">\n\t<ng-template #tooltipContent>\n\t\t<ng-doc-smooth-resize [trigger]=\"nextTheme.name\">\n\t\t\tSet \"{{ nextTheme.name }}\" theme\n\t\t</ng-doc-smooth-resize>\n\t</ng-template>\n\t<ng-doc-icon\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\ticon=\"sun\"\n\t\t[size]=\"24\"\n\t\t*ngIf=\"nextTheme === themes[1]\"></ng-doc-icon>\n\t<ng-doc-icon\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\ticon=\"moon\"\n\t\t[size]=\"24\"\n\t\t*ngIf=\"nextTheme === themes[2]\"></ng-doc-icon>\n\t<div\n\t\tclass=\"letter\"\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\t*ngIf=\"nextTheme === themes[0]\">\n\t\tA\n\t</div>\n</button>\n", styles: [":host{display:inline-block;height:40px;width:40px}:host .letter{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);--ng-doc-font-size: 26px;--ng-doc-font-weight: 600}\n"] }]
|
|
48
75
|
}], ctorParameters: function () { return [{ type: i1.NgDocThemeService }]; } });
|
|
49
76
|
|
|
50
77
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-components-theme-toggle.mjs","sources":["../../../../libs/app/components/theme-toggle/theme-toggle.component.ts","../../../../libs/app/components/theme-toggle/theme-toggle.component.html","../../../../libs/app/components/theme-toggle/ng-doc-app-components-theme-toggle.ts"],"sourcesContent":["import {animate, style, transition, trigger} from '@angular/animations';\nimport {NgIf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component} from '@angular/core';\nimport {
|
|
1
|
+
{"version":3,"file":"ng-doc-app-components-theme-toggle.mjs","sources":["../../../../libs/app/components/theme-toggle/theme-toggle.component.ts","../../../../libs/app/components/theme-toggle/theme-toggle.component.html","../../../../libs/app/components/theme-toggle/ng-doc-app-components-theme-toggle.ts"],"sourcesContent":["import { animate, style, transition, trigger } from '@angular/animations';\nimport { NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { NG_DOC_NIGHT_THEME } from '@ng-doc/app/constants';\nimport { NgDocTheme } from '@ng-doc/app/interfaces';\nimport { NgDocThemeService } from '@ng-doc/app/services';\nimport {\n\tNgDocButtonIconComponent,\n\tNgDocIconComponent,\n\tNgDocSmoothResizeComponent,\n\tNgDocTooltipDirective,\n} from '@ng-doc/ui-kit';\n\ninterface ToggleTheme {\n\tname: string;\n\ttheme: NgDocTheme | 'auto' | undefined;\n}\n\n@Component({\n\tanimations: [\n\t\ttrigger('switchIcon', [\n\t\t\ttransition(\n\t\t\t\t':enter',\n\t\t\t\t[\n\t\t\t\t\tstyle({ transform: 'translateX({{from}})', position: 'absolute', opacity: 0 }),\n\t\t\t\t\tanimate(\n\t\t\t\t\t\t'225ms cubic-bezier(0.4,0.0,0.2,1)',\n\t\t\t\t\t\tstyle({ transform: 'translateX(0%)', position: 'absolute', opacity: 1 }),\n\t\t\t\t\t),\n\t\t\t\t],\n\t\t\t\t{ params: { from: '-100%' } },\n\t\t\t),\n\t\t\ttransition(\n\t\t\t\t':leave',\n\t\t\t\t[\n\t\t\t\t\tstyle({ transform: 'translateX(0%)', position: 'absolute', opacity: 1 }),\n\t\t\t\t\tanimate(\n\t\t\t\t\t\t'225ms cubic-bezier(0.4,0.0,0.2,1)',\n\t\t\t\t\t\tstyle({ transform: 'translateX({{to}})', position: 'absolute', opacity: 0 }),\n\t\t\t\t\t),\n\t\t\t\t],\n\t\t\t\t{ params: { to: '-100%' } },\n\t\t\t),\n\t\t]),\n\t],\n\tselector: 'ng-doc-theme-toggle',\n\ttemplateUrl: './theme-toggle.component.html',\n\tstyleUrls: ['./theme-toggle.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgDocButtonIconComponent,\n\t\tNgDocTooltipDirective,\n\t\tNgIf,\n\t\tNgDocIconComponent,\n\t\tNgDocSmoothResizeComponent,\n\t],\n})\nexport class NgDocThemeToggleComponent {\n\tprotected readonly themes: ToggleTheme[] = [\n\t\t{ name: 'Auto', theme: 'auto' },\n\t\t{ name: 'Light', theme: undefined },\n\t\t{ name: 'Dark', theme: NG_DOC_NIGHT_THEME },\n\t];\n\n\tconstructor(protected readonly themeService: NgDocThemeService) {}\n\n\tget currentTheme(): ToggleTheme {\n\t\tif (this.themeService.isAutoThemeEnabled) {\n\t\t\treturn this.themes[0];\n\t\t}\n\n\t\tconst theme = this.themeService.currentTheme;\n\n\t\treturn this.themes.find(({ theme: t }) => t === theme) ?? this.themes[0];\n\t}\n\n\tget nextTheme(): ToggleTheme {\n\t\tif (this.themeService.isAutoThemeEnabled) {\n\t\t\treturn this.themes[1];\n\t\t}\n\n\t\tconst index = this.themes.findIndex(({ theme }) => theme === this.themeService.currentTheme);\n\n\t\treturn this.themes[(index + 1) % this.themes.length];\n\t}\n\n\ttoggleTheme(): void {\n\t\tconst { theme } = this.nextTheme;\n\n\t\tif (theme === 'auto') {\n\t\t\tthis.themeService.enableAutoTheme(undefined, NG_DOC_NIGHT_THEME);\n\t\t} else {\n\t\t\tthis.themeService.set(theme?.id);\n\t\t}\n\t}\n}\n","<button ng-doc-button-icon size=\"large\" (click)=\"toggleTheme()\" [ngDocTooltip]=\"tooltipContent\">\n\t<ng-template #tooltipContent>\n\t\t<ng-doc-smooth-resize [trigger]=\"nextTheme.name\">\n\t\t\tSet \"{{ nextTheme.name }}\" theme\n\t\t</ng-doc-smooth-resize>\n\t</ng-template>\n\t<ng-doc-icon\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\ticon=\"sun\"\n\t\t[size]=\"24\"\n\t\t*ngIf=\"nextTheme === themes[1]\"></ng-doc-icon>\n\t<ng-doc-icon\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\ticon=\"moon\"\n\t\t[size]=\"24\"\n\t\t*ngIf=\"nextTheme === themes[2]\"></ng-doc-icon>\n\t<div\n\t\tclass=\"letter\"\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\t*ngIf=\"nextTheme === themes[0]\">\n\t\tA\n\t</div>\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAkBA,MAwCa,yBAAyB,CAAA;AAOrC,IAAA,WAAA,CAA+B,YAA+B,EAAA;QAA/B,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAmB;AAN3C,QAAA,IAAA,CAAA,MAAM,GAAkB;AAC1C,YAAA,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;AAC/B,YAAA,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE;AACnC,YAAA,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,EAAE;SAC3C,CAAC;KAEgE;AAElE,IAAA,IAAI,YAAY,GAAA;AACf,QAAA,IAAI,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE;AACzC,YAAA,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACtB,SAAA;AAED,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC;QAE7C,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KACzE;AAED,IAAA,IAAI,SAAS,GAAA;AACZ,QAAA,IAAI,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE;AACzC,YAAA,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACtB,SAAA;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC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EAAA,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACR,wBAAwB;wBACxB,qBAAqB;wBACrB,IAAI;wBACJ,kBAAkB;wBAClB,0BAA0B;AAC1B,qBAAA,EAAA,QAAA,EAAA,40BAAA,EAAA,MAAA,EAAA,CAAA,+TAAA,CAAA,EAAA,CAAA;;;AExDF;;AAEG;;;;"}
|
|
@@ -17,11 +17,11 @@ class NgDocTocElementComponent {
|
|
|
17
17
|
this.level = 1;
|
|
18
18
|
}
|
|
19
19
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocTocElementComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
20
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", 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{padding:calc(var(--ng-doc-base-gutter) / 2);color:inherit;width:100%;text-decoration:none;word-break:break-word}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
20
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", 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
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocTocElementComponent, decorators: [{
|
|
23
23
|
type: Component,
|
|
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{padding:calc(var(--ng-doc-base-gutter) / 2);color:inherit;width:100%;text-decoration:none;word-break:break-word}\n"] }]
|
|
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
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { href: [{
|
|
26
26
|
type: Input
|
|
27
27
|
}], selected: [{
|
|
@@ -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\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);\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 *\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":";;;;;;;;;;;AAEA,MAOa,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,w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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\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);\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 *\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":";;;;;;;;;;;AAEA,MAOa,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,IAAI,EAAA,Q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CA0F7B,CAAA;2FA1FY,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;;;;"}
|
|
@@ -9,11 +9,11 @@ const NG_DOC_STORE_THEME_KEY = 'ng-doc-theme-id';
|
|
|
9
9
|
*
|
|
10
10
|
* @Component()
|
|
11
11
|
* export class AppComponent {
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
12
|
+
* constructor(
|
|
13
|
+
* private readonly themeService: NgDocThemeService,
|
|
14
|
+
* ) {
|
|
15
|
+
* this.themeService.setTheme(NG_DOC_NIGHT_THEME.id);
|
|
16
|
+
* }
|
|
17
17
|
* }
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
@@ -24,9 +24,9 @@ const NG_DOC_STORE_THEME_KEY = 'ng-doc-theme-id';
|
|
|
24
24
|
* import {AppComponent} from './app.component';
|
|
25
25
|
*
|
|
26
26
|
* @NgModule({
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
27
|
+
* declarations: [AppComponent],
|
|
28
|
+
* imports: [NgDocModule.forRoot({defaultTheme: NG_DOC_NIGHT_THEME.id})],
|
|
29
|
+
* bootstrap: [AppComponent],
|
|
30
30
|
* })
|
|
31
31
|
* export class AppModule {}
|
|
32
32
|
* ```
|
|
@@ -35,45 +35,10 @@ const NG_DOC_NIGHT_THEME = {
|
|
|
35
35
|
id: 'ng-doc-night',
|
|
36
36
|
path: 'assets/ng-doc/app/themes/ng-doc-night.css',
|
|
37
37
|
};
|
|
38
|
-
/**
|
|
39
|
-
* Dark purple theme. You can set it manually by calling `NgDocThemeService.set` method.
|
|
40
|
-
*
|
|
41
|
-
* ```typescript
|
|
42
|
-
* import {Component} from '@angular/core';
|
|
43
|
-
* import {NgDocThemeService, NG_DOC_DARK_PURPLE_THEME} from '@ng-doc/app';
|
|
44
|
-
*
|
|
45
|
-
* @Component()
|
|
46
|
-
* export class AppComponent {
|
|
47
|
-
* constructor(
|
|
48
|
-
* private readonly themeService: NgDocThemeService,
|
|
49
|
-
* ) {
|
|
50
|
-
* this.themeService.setTheme(NG_DOC_DARK_PURPLE_THEME.id);
|
|
51
|
-
* }
|
|
52
|
-
* }
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
* Or you can set it as default theme in your app module:
|
|
56
|
-
* ```typescript
|
|
57
|
-
* import {NgModule} from '@angular/core';
|
|
58
|
-
* import {NgDocModule, NG_DOC_DARK_PURPLE_THEME} from '@ng-doc/app';
|
|
59
|
-
* import {AppComponent} from './app.component';
|
|
60
|
-
*
|
|
61
|
-
* @NgModule({
|
|
62
|
-
* declarations: [AppComponent],
|
|
63
|
-
* imports: [NgDocModule.forRoot({defaultTheme: NG_DOC_DARK_PURPLE_THEME.id})],
|
|
64
|
-
* bootstrap: [AppComponent],
|
|
65
|
-
* })
|
|
66
|
-
* export class AppModule {}
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
const NG_DOC_DARK_PURPLE_THEME = {
|
|
70
|
-
id: 'ng-doc-dark-purple',
|
|
71
|
-
path: 'assets/ng-doc/app/themes/ng-doc-dark-purple.css',
|
|
72
|
-
};
|
|
73
38
|
|
|
74
39
|
/**
|
|
75
40
|
* Generated bundle index. Do not edit.
|
|
76
41
|
*/
|
|
77
42
|
|
|
78
|
-
export {
|
|
43
|
+
export { NG_DOC_NIGHT_THEME, NG_DOC_STORE_THEME_KEY };
|
|
79
44
|
//# sourceMappingURL=ng-doc-app-constants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-constants.mjs","sources":["../../../../libs/app/constants/store-keys.ts","../../../../libs/app/constants/themes.ts","../../../../libs/app/constants/ng-doc-app-constants.ts"],"sourcesContent":["export const NG_DOC_STORE_THEME_KEY: string = 'ng-doc-theme-id';\n","import { NgDocTheme } from '@ng-doc/app/interfaces';\n\n/**\n * Dark theme. You can set it manually by calling `NgDocThemeService.set` method.\n *\n * ```typescript\n * import {Component} from '@angular/core';\n * import {NgDocThemeService, NG_DOC_NIGHT_THEME} from '@ng-doc/app';\n *\n * @Component()\n * export class AppComponent {\n *
|
|
1
|
+
{"version":3,"file":"ng-doc-app-constants.mjs","sources":["../../../../libs/app/constants/store-keys.ts","../../../../libs/app/constants/themes.ts","../../../../libs/app/constants/ng-doc-app-constants.ts"],"sourcesContent":["export const NG_DOC_STORE_THEME_KEY: string = 'ng-doc-theme-id';\n","import { NgDocTheme } from '@ng-doc/app/interfaces';\n\n/**\n * Dark theme. You can set it manually by calling `NgDocThemeService.set` method.\n *\n * ```typescript\n * import {Component} from '@angular/core';\n * import {NgDocThemeService, NG_DOC_NIGHT_THEME} from '@ng-doc/app';\n *\n * @Component()\n * export class AppComponent {\n * constructor(\n * private readonly themeService: NgDocThemeService,\n * ) {\n * this.themeService.setTheme(NG_DOC_NIGHT_THEME.id);\n * }\n * }\n * ```\n *\n * Or you can set it as default theme in your app module:\n * ```typescript\n * import {NgModule} from '@angular/core';\n * import {NgDocModule, NG_DOC_NIGHT_THEME} from '@ng-doc/app';\n * import {AppComponent} from './app.component';\n *\n * @NgModule({\n * declarations: [AppComponent],\n * imports: [NgDocModule.forRoot({defaultTheme: NG_DOC_NIGHT_THEME.id})],\n * bootstrap: [AppComponent],\n * })\n * export class AppModule {}\n * ```\n */\nexport const NG_DOC_NIGHT_THEME: NgDocTheme = {\n\tid: 'ng-doc-night',\n\tpath: 'assets/ng-doc/app/themes/ng-doc-night.css',\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAO,MAAM,sBAAsB,GAAW;;ACE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;AACU,MAAA,kBAAkB,GAAe;AAC7C,IAAA,EAAE,EAAE,cAAc;AAClB,IAAA,IAAI,EAAE,2CAA2C;;;ACnClD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-directives-code-highlighter.mjs","sources":["../../../../libs/app/directives/code-highlighter/code-highlighter.directive.ts","../../../../libs/app/directives/code-highlighter/ng-doc-app-directives-code-highlighter.ts"],"sourcesContent":["import {Directive, ElementRef, HostBinding, Input, OnChanges} from '@angular/core';\nimport {HighlightResult} from 'highlight.js';\nimport highlight from 'highlight.js/lib/core';\nimport xml from 'highlight.js/lib/languages/xml';\n\nhighlight.registerLanguage('html', xml);\nhighlight.registerLanguage('xml', xml);\n\n@Directive({\n\tselector: 'code[ngDocCodeHighlighter]',\n\tstandalone: true,\n})\nexport class NgDocCodeHighlighterDirective implements OnChanges {\n\t@Input('ngDocCodeHighlighter')\n\tcode: string = '';\n\n\t@Input()\n\thtml: string = '';\n\n\t@Input()\n\tlanguage: string = 'typescript';\n\n\t@HostBinding('class.hljs')\n\tprotected highlightJsClass: boolean = true;\n\n\tconstructor(private readonly elementRef: ElementRef<HTMLElement>) {}\n\n\tngOnChanges(): void {\n\t\tif (this.code) {\n\t\t\tconst result: HighlightResult = highlight.highlight(this.code, {language: this.language});\n\n\t\t\tthis.elementRef.nativeElement.innerHTML = result.value ?? this.html;\n\t\t} else {\n\t\t\tthis.elementRef.nativeElement.innerHTML = this.html;\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAKA,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACxC,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAEvC,MAIa,6BAA6B,CAAA;AAazC,IAAA,WAAA,CAA6B,UAAmC,EAAA;QAAnC,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QAXhE,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAGlB,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAGlB,IAAQ,CAAA,QAAA,GAAW,YAAY,CAAC;QAGtB,IAAgB,CAAA,gBAAA,GAAY,IAAI,CAAC;KAEyB;IAEpE,WAAW,GAAA;QACV,IAAI,IAAI,CAAC,IAAI,EAAE;AACd,YAAA,MAAM,MAAM,GAAoB,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"ng-doc-app-directives-code-highlighter.mjs","sources":["../../../../libs/app/directives/code-highlighter/code-highlighter.directive.ts","../../../../libs/app/directives/code-highlighter/ng-doc-app-directives-code-highlighter.ts"],"sourcesContent":["import { Directive, ElementRef, HostBinding, Input, OnChanges } from '@angular/core';\nimport { HighlightResult } from 'highlight.js';\nimport highlight from 'highlight.js/lib/core';\nimport xml from 'highlight.js/lib/languages/xml';\n\nhighlight.registerLanguage('html', xml);\nhighlight.registerLanguage('xml', xml);\n\n@Directive({\n\tselector: 'code[ngDocCodeHighlighter]',\n\tstandalone: true,\n})\nexport class NgDocCodeHighlighterDirective implements OnChanges {\n\t@Input('ngDocCodeHighlighter')\n\tcode: string = '';\n\n\t@Input()\n\thtml: string = '';\n\n\t@Input()\n\tlanguage: string = 'typescript';\n\n\t@HostBinding('class.hljs')\n\tprotected highlightJsClass: boolean = true;\n\n\tconstructor(private readonly elementRef: ElementRef<HTMLElement>) {}\n\n\tngOnChanges(): void {\n\t\tif (this.code) {\n\t\t\tconst result: HighlightResult = highlight.highlight(this.code, { language: this.language });\n\n\t\t\tthis.elementRef.nativeElement.innerHTML = result.value ?? this.html;\n\t\t} else {\n\t\t\tthis.elementRef.nativeElement.innerHTML = this.html;\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAKA,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACxC,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAEvC,MAIa,6BAA6B,CAAA;AAazC,IAAA,WAAA,CAA6B,UAAmC,EAAA;QAAnC,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QAXhE,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAGlB,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAGlB,IAAQ,CAAA,QAAA,GAAW,YAAY,CAAC;QAGtB,IAAgB,CAAA,gBAAA,GAAY,IAAI,CAAC;KAEyB;IAEpE,WAAW,GAAA;QACV,IAAI,IAAI,CAAC,IAAI,EAAE;AACd,YAAA,MAAM,MAAM,GAAoB,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;AAE5F,YAAA,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,SAAS,GAAG,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC;AACpE,SAAA;AAAM,aAAA;YACN,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC;AACpD,SAAA;KACD;8GAvBW,6BAA6B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAA7B,6BAA6B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,4BAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,CAAA,sBAAA,EAAA,MAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,YAAA,EAAA,uBAAA,EAAA,EAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAA7B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAJzC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,UAAU,EAAE,IAAI;AAChB,iBAAA,CAAA;iGAGA,IAAI,EAAA,CAAA;sBADH,KAAK;uBAAC,sBAAsB,CAAA;gBAI7B,IAAI,EAAA,CAAA;sBADH,KAAK;gBAIN,QAAQ,EAAA,CAAA;sBADP,KAAK;gBAII,gBAAgB,EAAA,CAAA;sBADzB,WAAW;uBAAC,YAAY,CAAA;;;ACtB1B;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-directives-route-active.mjs","sources":["../../../../libs/app/directives/route-active/route-active.directive.ts","../../../../libs/app/directives/route-active/ng-doc-app-directives-route-active.ts"],"sourcesContent":["import {Directive, ElementRef, Input, Renderer2} from '@angular/core';\nimport {Event, IsActiveMatchOptions, NavigationEnd, Router} from '@angular/router';\nimport {asArray} from '@ng-doc/core/helpers/as-array';\nimport {UntilDestroy, untilDestroyed} from '@ngneat/until-destroy';\nimport {distinctUntilChanged, filter, map} from 'rxjs/operators';\n\n@Directive({\n\tselector: '[ngDocRouteActive]',\n\tstandalone: true,\n})\n@UntilDestroy()\nexport class NgDocRouteActiveDirective {\n\t@Input('ngDocRouteActive')\n\tlink: string = '';\n\n\t@Input()\n\tactiveClass: string | string[] = [];\n\n\t@Input()\n\tmatchOptions: IsActiveMatchOptions = {\n\t\tfragment: 'exact',\n\t\tpaths: 'subset',\n\t\tqueryParams: 'exact',\n\t\tmatrixParams: 'exact',\n\t};\n\n\tconstructor(\n\t\tprivate readonly elementRef: ElementRef<HTMLElement>,\n\t\tprivate readonly router: Router,\n\t\tprivate readonly renderer: Renderer2,\n\t) {\n\t\tthis.router.events\n\t\t\t.pipe(\n\t\t\t\tfilter((event: Event) => event instanceof NavigationEnd),\n\t\t\t\tmap(() => this.router.isActive(this.link, this.matchOptions)),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\tuntilDestroyed(this),\n\t\t\t)\n\t\t\t.subscribe((isActive: boolean) => {\n\t\t\t\tisActive\n\t\t\t\t\t? asArray(this.activeClass).forEach((cls: string) =>\n\t\t\t\t\t\t\tthis.renderer.addClass(this.elementRef.nativeElement, cls),\n\t\t\t\t\t )\n\t\t\t\t\t: asArray(this.activeClass).forEach((cls: string) =>\n\t\t\t\t\t\t\tthis.renderer.removeClass(this.elementRef.nativeElement, cls),\n\t\t\t\t\t );\n\t\t\t});\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAWa,IAAA,yBAAyB,GALtC,MAKa,yBAAyB,CAAA;AAerC,IAAA,WAAA,CACkB,UAAmC,EACnC,MAAc,EACd,QAAmB,EAAA;QAFnB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QACnC,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACd,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;QAhBrC,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAGlB,IAAW,CAAA,WAAA,GAAsB,EAAE,CAAC;AAGpC,QAAA,IAAA,CAAA,YAAY,GAAyB;AACpC,YAAA,QAAQ,EAAE,OAAO;AACjB,YAAA,KAAK,EAAE,QAAQ;A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AA,cAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;AAAzB,yBAAyB,GAAA,UAAA,CAAA;AADrC,IAAA,YAAY,EAAE;qCAiBgB,UAAU;QACd,MAAM;QACJ,SAAS,CAAA,CAAA;AAlBzB,CAAA,EAAA,yBAAyB,CAqCrC,CAAA;2FArCY,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBALrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,UAAU,EAAE,IAAI;AAChB,iBAAA,CAAA;8IAIA,IAAI,EAAA,CAAA;sBADH,KAAK;uBAAC,kBAAkB,CAAA;gBAIzB,WAAW,EAAA,CAAA;sBADV,KAAK;gBAIN,YAAY,EAAA,CAAA;sBADX,KAAK;;;AClBP;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-doc-app-directives-route-active.mjs","sources":["../../../../libs/app/directives/route-active/route-active.directive.ts","../../../../libs/app/directives/route-active/ng-doc-app-directives-route-active.ts"],"sourcesContent":["import { Directive, ElementRef, Input, Renderer2 } from '@angular/core';\nimport { Event, IsActiveMatchOptions, NavigationEnd, Router } from '@angular/router';\nimport { asArray } from '@ng-doc/core/helpers/as-array';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { distinctUntilChanged, filter, map } from 'rxjs/operators';\n\n@Directive({\n\tselector: '[ngDocRouteActive]',\n\tstandalone: true,\n})\n@UntilDestroy()\nexport class NgDocRouteActiveDirective {\n\t@Input('ngDocRouteActive')\n\tlink: string = '';\n\n\t@Input()\n\tactiveClass: string | string[] = [];\n\n\t@Input()\n\tmatchOptions: IsActiveMatchOptions = {\n\t\tfragment: 'exact',\n\t\tpaths: 'subset',\n\t\tqueryParams: 'exact',\n\t\tmatrixParams: 'exact',\n\t};\n\n\tconstructor(\n\t\tprivate readonly elementRef: ElementRef<HTMLElement>,\n\t\tprivate readonly router: Router,\n\t\tprivate readonly renderer: Renderer2,\n\t) {\n\t\tthis.router.events\n\t\t\t.pipe(\n\t\t\t\tfilter((event: Event) => event instanceof NavigationEnd),\n\t\t\t\tmap(() => this.router.isActive(this.link, this.matchOptions)),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\tuntilDestroyed(this),\n\t\t\t)\n\t\t\t.subscribe((isActive: boolean) => {\n\t\t\t\tisActive\n\t\t\t\t\t? asArray(this.activeClass).forEach((cls: string) =>\n\t\t\t\t\t\t\tthis.renderer.addClass(this.elementRef.nativeElement, cls),\n\t\t\t\t\t )\n\t\t\t\t\t: asArray(this.activeClass).forEach((cls: string) =>\n\t\t\t\t\t\t\tthis.renderer.removeClass(this.elementRef.nativeElement, cls),\n\t\t\t\t\t );\n\t\t\t});\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAWa,IAAA,yBAAyB,GALtC,MAKa,yBAAyB,CAAA;AAerC,IAAA,WAAA,CACkB,UAAmC,EACnC,MAAc,EACd,QAAmB,EAAA;QAFnB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QACnC,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACd,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;QAhBrC,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAGlB,IAAW,CAAA,WAAA,GAAsB,EAAE,CAAC;AAGpC,QAAA,IAAA,CAAA,YAAY,GAAyB;AACpC,YAAA,QAAQ,EAAE,OAAO;AACjB,YAAA,KAAK,EAAE,QAAQ;AACf,YAAA,WAAW,EAAE,OAAO;AACpB,YAAA,YAAY,EAAE,OAAO;SACrB,CAAC;QAOD,IAAI,CAAC,MAAM,CAAC,MAAM;AAChB,aAAA,IAAI,CACJ,MAAM,CAAC,CAAC,KAAY,KAAK,KAAK,YAAY,aAAa,CAAC,EACxD,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,C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AA,EAAA,CAAA;kBALrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,UAAU,EAAE,IAAI;AAChB,iBAAA,CAAA;8IAIA,IAAI,EAAA,CAAA;sBADH,KAAK;uBAAC,kBAAkB,CAAA;gBAIzB,WAAW,EAAA,CAAA;sBADV,KAAK;gBAIN,YAAY,EAAA,CAAA;sBADX,KAAK;;;AClBP;;AAEG;;;;"}
|
|
@@ -7,7 +7,11 @@ import { objectKeys } from '@ng-doc/core/helpers/object-keys';
|
|
|
7
7
|
*/
|
|
8
8
|
function asBoolean(value) {
|
|
9
9
|
if (typeof value === 'string') {
|
|
10
|
-
return value.toLowerCase() === 'true'
|
|
10
|
+
return value.toLowerCase() === 'true'
|
|
11
|
+
? true
|
|
12
|
+
: value.toLowerCase() === 'false'
|
|
13
|
+
? false
|
|
14
|
+
: !!value;
|
|
11
15
|
}
|
|
12
16
|
return !!value;
|
|
13
17
|
}
|
|
@@ -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'
|
|
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\tcomponentRef.changeDetectorRef.detectChanges();\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 *\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;;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A;IAC5D,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACzC;;ACTA;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-pipes-extract-value.mjs","sources":["../../../../libs/app/pipes/extract-value/extract-value.pipe.ts","../../../../libs/app/pipes/extract-value/ng-doc-app-pipes-extract-value.ts"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {extractValue} from '@ng-doc/core/helpers/extract-value';\nimport {NgDocExtractedValue} from '@ng-doc/core/types/extracted-value';\n\n@Pipe({\n\tname: 'ngDocExtractValue',\n\tstandalone: true,\n})\nexport class NgDocExtractValuePipe implements PipeTransform {\n\ttransform(value: string): NgDocExtractedValue {\n\t\treturn extractValue(value);\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAIA,MAIa,qBAAqB,CAAA;AACjC,IAAA,SAAS,CAAC,KAAa,EAAA;AACtB,QAAA,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;KAC3B;8GAHW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;4GAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,mBAAA,EAAA,CAAA,CAAA,EAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACL,oBAAA,IAAI,EAAE,mBAAmB;AACzB,oBAAA,UAAU,EAAE,IAAI;AAChB,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-doc-app-pipes-extract-value.mjs","sources":["../../../../libs/app/pipes/extract-value/extract-value.pipe.ts","../../../../libs/app/pipes/extract-value/ng-doc-app-pipes-extract-value.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\nimport { extractValue } from '@ng-doc/core/helpers/extract-value';\nimport { NgDocExtractedValue } from '@ng-doc/core/types/extracted-value';\n\n@Pipe({\n\tname: 'ngDocExtractValue',\n\tstandalone: true,\n})\nexport class NgDocExtractValuePipe implements PipeTransform {\n\ttransform(value: string): NgDocExtractedValue {\n\t\treturn extractValue(value);\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAIA,MAIa,qBAAqB,CAAA;AACjC,IAAA,SAAS,CAAC,KAAa,EAAA;AACtB,QAAA,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;KAC3B;8GAHW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;4GAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,mBAAA,EAAA,CAAA,CAAA,EAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACL,oBAAA,IAAI,EAAE,mBAAmB;AACzB,oBAAA,UAAU,EAAE,IAAI;AAChB,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-pipes-filter-by-text.mjs","sources":["../../../../libs/app/pipes/filter-by-text/filter-by-text.pipe.ts","../../../../libs/app/pipes/filter-by-text/ng-doc-app-pipes-filter-by-text.ts"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({\n\tname: 'ngDocFilterByText',\n\tstandalone: true,\n})\nexport class NgDocFilterByTextPipe<T> implements PipeTransform {\n\ttransform(\n\t\titems: readonly T[],\n\t\tsearchTerm: string,\n\t\tmatcher: (item: T, searchTerm: string) => boolean = (item: T, s: string) => String(item) === s,\n\t): readonly T[] {\n\t\treturn items?.filter((item: T) => matcher(item, searchTerm)) ?? [];\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA,MAIa,qBAAqB,CAAA;AACjC,IAAA,SAAS,CACR,KAAmB,EACnB,UAAkB,EAClB,OAAA,GAAoD,CAAC,IAAO,EAAE,CAAS,KAAK,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAA;AAE9F,QAAA,OAAO,KAAK,EAAE,MAAM,CAAC,CAAC,IAAO,KAAK,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC;KACnE;8GAPW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;4GAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,mBAAA,EAAA,CAAA,CAAA,EAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACL,oBAAA,IAAI,EAAE,mBAAmB;AACzB,oBAAA,UAAU,EAAE,IAAI;AAChB,iBAAA,CAAA;;;ACLD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-doc-app-pipes-filter-by-text.mjs","sources":["../../../../libs/app/pipes/filter-by-text/filter-by-text.pipe.ts","../../../../libs/app/pipes/filter-by-text/ng-doc-app-pipes-filter-by-text.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'ngDocFilterByText',\n\tstandalone: true,\n})\nexport class NgDocFilterByTextPipe<T> implements PipeTransform {\n\ttransform(\n\t\titems: readonly T[],\n\t\tsearchTerm: string,\n\t\tmatcher: (item: T, searchTerm: string) => boolean = (item: T, s: string) => String(item) === s,\n\t): readonly T[] {\n\t\treturn items?.filter((item: T) => matcher(item, searchTerm)) ?? [];\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA,MAIa,qBAAqB,CAAA;AACjC,IAAA,SAAS,CACR,KAAmB,EACnB,UAAkB,EAClB,OAAA,GAAoD,CAAC,IAAO,EAAE,CAAS,KAAK,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAA;AAE9F,QAAA,OAAO,KAAK,EAAE,MAAM,CAAC,CAAC,IAAO,KAAK,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC;KACnE;8GAPW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;4GAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,mBAAA,EAAA,CAAA,CAAA,EAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACL,oBAAA,IAAI,EAAE,mBAAmB;AACzB,oBAAA,UAAU,EAAE,IAAI;AAChB,iBAAA,CAAA;;;ACLD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-pipes-sanitize-html.mjs","sources":["../../../../libs/app/pipes/sanitize-html/sanitize-html.pipe.ts","../../../../libs/app/pipes/sanitize-html/ng-doc-app-pipes-sanitize-html.ts"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {DomSanitizer, SafeHtml} from '@angular/platform-browser';\n\n@Pipe({\n\tname: 'ngDocSanitizeHtml',\n\tstandalone: true,\n})\nexport class NgDocSanitizeHtmlPipe implements PipeTransform {\n\tconstructor(private readonly sanitizer: DomSanitizer) {}\n\n\ttransform(value: string): SafeHtml {\n\t\treturn this.sanitizer.bypassSecurityTrustHtml(value);\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA,MAIa,qBAAqB,CAAA;AACjC,IAAA,WAAA,CAA6B,SAAuB,EAAA;QAAvB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAc;KAAI;AAExD,IAAA,SAAS,CAAC,KAAa,EAAA;QACtB,OAAO,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;KACrD;8GALW,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;4GAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,mBAAA,EAAA,CAAA,CAAA,EAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACL,oBAAA,IAAI,EAAE,mBAAmB;AACzB,oBAAA,UAAU,EAAE,IAAI;AAChB,iBAAA,CAAA;;;ACND;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-doc-app-pipes-sanitize-html.mjs","sources":["../../../../libs/app/pipes/sanitize-html/sanitize-html.pipe.ts","../../../../libs/app/pipes/sanitize-html/ng-doc-app-pipes-sanitize-html.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Pipe({\n\tname: 'ngDocSanitizeHtml',\n\tstandalone: true,\n})\nexport class NgDocSanitizeHtmlPipe implements PipeTransform {\n\tconstructor(private readonly sanitizer: DomSanitizer) {}\n\n\ttransform(value: string): SafeHtml {\n\t\treturn this.sanitizer.bypassSecurityTrustHtml(value);\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA,MAIa,qBAAqB,CAAA;AACjC,IAAA,WAAA,CAA6B,SAAuB,EAAA;QAAvB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAc;KAAI;AAExD,IAAA,SAAS,CAAC,KAAa,EAAA;QACtB,OAAO,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;KACrD;8GALW,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;4GAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,mBAAA,EAAA,CAAA,CAAA,EAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACL,oBAAA,IAAI,EAAE,mBAAmB;AACzB,oBAAA,UAAU,EAAE,IAAI;AAChB,iBAAA,CAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -86,7 +86,8 @@ const playgroundProcessor = {
|
|
|
86
86
|
extractOptions: (element) => ({
|
|
87
87
|
inputs: {
|
|
88
88
|
id: element.getAttribute('id') || undefined,
|
|
89
|
-
properties: JSON.parse(element.querySelector('#data')?.textContent?.replace(/\n/g, '\\n') ?? '') ||
|
|
89
|
+
properties: JSON.parse(element.querySelector('#data')?.textContent?.replace(/\n/g, '\\n') ?? '') ||
|
|
90
|
+
undefined,
|
|
90
91
|
pipeName: element.querySelector('#pipeName')?.textContent || undefined,
|
|
91
92
|
selectors: (element.querySelector('#selectors')?.textContent || '')
|
|
92
93
|
.split(',')
|
|
@@ -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: JSON.parse(element.querySelector('#data')?.textContent?.replace(/\\n/g, '\\\\n') ?? '') || undefined,\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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AAiB,EAAA,CAAA;sBADxB,SAAS;uBAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;;AAiBtD,MAAA,gBAAgB,GAAqD;AACjF,IAAA,SAAS,EAAE,4BAA4B;AACvC,IAAA,QAAQ,EAAE,gBAAgB;AAC1B,IAAA,cAAc,EAAE,CAAC,OAAgB,MAAM;AACtC,QAAA,MAAM,EAAE;YACP,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,IAAI,EAAE;AACnD,SAAA;QACD,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;KACpC,CAAC;;;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 { 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,EAAE,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,OAAO;YAC1D,IAAI,EAAE,OAAO,CAAC,YAAY,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
2
|
import { APP_INITIALIZER, Optional } from '@angular/core';
|
|
3
|
-
import { NG_DOC_NIGHT_THEME,
|
|
4
|
-
import { isDarkOsTheme } from '@ng-doc/app/helpers';
|
|
3
|
+
import { NG_DOC_NIGHT_THEME, NG_DOC_STORE_THEME_KEY } from '@ng-doc/app/constants';
|
|
5
4
|
import { NgDocThemeService, NgDocStoreService } from '@ng-doc/app/services';
|
|
6
5
|
import { NG_DOC_THEME, NG_DOC_DEFAULT_THEME_ID } from '@ng-doc/app/tokens';
|
|
7
6
|
import { asArray } from '@ng-doc/core';
|
|
@@ -16,7 +15,6 @@ function provideNgDocApp(config) {
|
|
|
16
15
|
return [
|
|
17
16
|
/* --- Themes --- */
|
|
18
17
|
{ provide: NG_DOC_THEME, useValue: NG_DOC_NIGHT_THEME, multi: true },
|
|
19
|
-
{ provide: NG_DOC_THEME, useValue: NG_DOC_DARK_PURPLE_THEME, multi: true },
|
|
20
18
|
...asArray(config?.themes).map((theme) => ({
|
|
21
19
|
provide: NG_DOC_THEME,
|
|
22
20
|
useValue: theme,
|
|
@@ -31,11 +29,14 @@ function provideNgDocApp(config) {
|
|
|
31
29
|
provide: APP_INITIALIZER,
|
|
32
30
|
useFactory: (themeService, store, defaultThemeId) => {
|
|
33
31
|
return () => {
|
|
34
|
-
const
|
|
35
|
-
if (defaultThemeId === 'auto' && !
|
|
36
|
-
|
|
32
|
+
const savedThemeId = store.get(NG_DOC_STORE_THEME_KEY);
|
|
33
|
+
if ((defaultThemeId === 'auto' && !savedThemeId) ||
|
|
34
|
+
savedThemeId === NgDocThemeService.autoThemeId) {
|
|
35
|
+
return themeService.enableAutoTheme(undefined, NG_DOC_NIGHT_THEME);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
return themeService.set(savedThemeId ?? defaultThemeId, false);
|
|
37
39
|
}
|
|
38
|
-
return themeService.set(themeId ?? defaultThemeId, false);
|
|
39
40
|
};
|
|
40
41
|
},
|
|
41
42
|
multi: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-providers-ng-doc-app.mjs","sources":["../../../../libs/app/providers/ng-doc-app/provide-ng-doc-app.ts","../../../../libs/app/providers/ng-doc-app/ng-doc-app-providers-ng-doc-app.ts"],"sourcesContent":["import { ViewportScroller } from '@angular/common';\nimport { APP_INITIALIZER, Optional, Provider } from '@angular/core';\nimport {
|
|
1
|
+
{"version":3,"file":"ng-doc-app-providers-ng-doc-app.mjs","sources":["../../../../libs/app/providers/ng-doc-app/provide-ng-doc-app.ts","../../../../libs/app/providers/ng-doc-app/ng-doc-app-providers-ng-doc-app.ts"],"sourcesContent":["import { ViewportScroller } from '@angular/common';\nimport { APP_INITIALIZER, Optional, Provider } from '@angular/core';\nimport { NG_DOC_NIGHT_THEME, NG_DOC_STORE_THEME_KEY } from '@ng-doc/app/constants';\nimport { NgDocTheme } from '@ng-doc/app/interfaces';\nimport { NgDocStoreService, NgDocThemeService } from '@ng-doc/app/services';\nimport { NG_DOC_DEFAULT_THEME_ID, NG_DOC_THEME } from '@ng-doc/app/tokens';\nimport { asArray } from '@ng-doc/core';\nimport { NgDocUiConfig, provideNgDocUiKitConfig } from '@ng-doc/ui-kit';\n\n/**\n * NgDoc application config.\n */\nexport interface NgDocApplicationConfig {\n\t/**\n\t * List of themes that will be registered in the application and can be used via `NgDocThemeService`.\n\t */\n\tthemes?: NgDocTheme[];\n\n\t/**\n\t * Default theme id.\n\t * You can use `auto` to automatically select the theme based on the user's operating system settings.\n\t */\n\tdefaultThemeId?: string | 'auto';\n\n\t/**\n\t * UI Kit configuration.\n\t */\n\tuiKit?: NgDocUiConfig;\n}\n\n/**\n * Provides the NgDoc application configuration.\n *\n * @param config - The optional application configuration.\n */\nexport function provideNgDocApp(config?: NgDocApplicationConfig): Provider[] {\n\treturn [\n\t\t/* --- Themes --- */\n\t\t{ provide: NG_DOC_THEME, useValue: NG_DOC_NIGHT_THEME, multi: true },\n\t\t...asArray(config?.themes).map((theme: NgDocTheme) => ({\n\t\t\tprovide: NG_DOC_THEME,\n\t\t\tuseValue: theme,\n\t\t\tmulti: true,\n\t\t})),\n\t\t...asArray(config?.defaultThemeId).map((themeId: string) => ({\n\t\t\tprovide: NG_DOC_DEFAULT_THEME_ID,\n\t\t\tuseValue: themeId,\n\t\t})),\n\n\t\t/* --- Theme Initializer--- */\n\t\t{\n\t\t\tprovide: APP_INITIALIZER,\n\t\t\tuseFactory: (\n\t\t\t\tthemeService: NgDocThemeService,\n\t\t\t\tstore: NgDocStoreService,\n\t\t\t\tdefaultThemeId: string | 'auto',\n\t\t\t) => {\n\t\t\t\treturn () => {\n\t\t\t\t\tconst savedThemeId: string | null = store.get(NG_DOC_STORE_THEME_KEY);\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t(defaultThemeId === 'auto' && !savedThemeId) ||\n\t\t\t\t\t\tsavedThemeId === NgDocThemeService.autoThemeId\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn themeService.enableAutoTheme(undefined, NG_DOC_NIGHT_THEME);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn themeService.set(savedThemeId ?? defaultThemeId, false);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\t\t\tmulti: true,\n\t\t\tdeps: [NgDocThemeService, NgDocStoreService, [new Optional(), NG_DOC_DEFAULT_THEME_ID]],\n\t\t},\n\n\t\t/* --- Viewport Scroller --- */\n\t\t{\n\t\t\tprovide: APP_INITIALIZER,\n\t\t\tmulti: true,\n\t\t\tdeps: [ViewportScroller],\n\t\t\tuseFactory: (viewportScroller: ViewportScroller) => {\n\t\t\t\treturn () => viewportScroller.setOffset([0, 64]);\n\t\t\t},\n\t\t},\n\n\t\t/* --- UiKit --- */\n\t\t...provideNgDocUiKitConfig(config?.uiKit),\n\t];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA8BA;;;;AAIG;AACG,SAAU,eAAe,CAAC,MAA+B,EAAA;IAC9D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,IAAI,EAAE,CAAC,gBAAgB,CAAC;AACxB,YAAA,UAAU,EAAE,CAAC,gBAAkC,KAAI;AAClD,gBAAA,OAAO,MAAM,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;aACjD;AACD,SAAA;;AAGD,QAAA,GAAG,uBAAuB,CAAC,MAAM,EAAE,KAAK,CAAC;KACzC,CAAC;AACH;;ACvFA;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-services-store.mjs","sources":["../../../../libs/app/services/store/store.service.ts","../../../../libs/app/services/store/ng-doc-app-services-store.ts"],"sourcesContent":["import {Injectable} from '@angular/core';\n\nconst DEFAULT_SERIALIZE: (v: unknown) => string = (v: unknown) => String(v);\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class NgDocStoreService {\n\tset(key: string, data: string): void;\n\tset<T>(key: string, data: T, serialize: (v: T) => string): void;\n\tset<T>(key: string, data: T, serialize: (v: T) => string = DEFAULT_SERIALIZE): void {\n\t\treturn localStorage.setItem(key, serialize(data));\n\t}\n\n\tget(key: string): string | null;\n\tget<T>(key: string, deserialize: (v: string | null) => T): T;\n\tget<T>(key: string, deserialize?: (v: string | null) => T): T | string | null {\n\t\treturn deserialize ? deserialize(localStorage.getItem(key)) : localStorage.getItem(key);\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA,MAAM,iBAAiB,GAA2B,CAAC,CAAU,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC;AAE5E,MAGa,iBAAiB,CAAA;AAG7B,IAAA,GAAG,CAAI,GAAW,EAAE,IAAO,EAAE,YAA8B,iBAAiB,EAAA;QAC3E,OAAO,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;KAClD;IAID,GAAG,CAAI,GAAW,EAAE,WAAqC,EAAA;QACxD,OAAO,WAAW,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;KACxF;8GAXW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAFjB,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEN,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACX,oBAAA,UAAU,EAAE,MAAM;AAClB,iBAAA,CAAA;;;ACND;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-doc-app-services-store.mjs","sources":["../../../../libs/app/services/store/store.service.ts","../../../../libs/app/services/store/ng-doc-app-services-store.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nconst DEFAULT_SERIALIZE: (v: unknown) => string = (v: unknown) => String(v);\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class NgDocStoreService {\n\tset(key: string, data: string): void;\n\tset<T>(key: string, data: T, serialize: (v: T) => string): void;\n\tset<T>(key: string, data: T, serialize: (v: T) => string = DEFAULT_SERIALIZE): void {\n\t\treturn localStorage.setItem(key, serialize(data));\n\t}\n\n\tget(key: string): string | null;\n\tget<T>(key: string, deserialize: (v: string | null) => T): T;\n\tget<T>(key: string, deserialize?: (v: string | null) => T): T | string | null {\n\t\treturn deserialize ? deserialize(localStorage.getItem(key)) : localStorage.getItem(key);\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA,MAAM,iBAAiB,GAA2B,CAAC,CAAU,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC;AAE5E,MAGa,iBAAiB,CAAA;AAG7B,IAAA,GAAG,CAAI,GAAW,EAAE,IAAO,EAAE,YAA8B,iBAAiB,EAAA;QAC3E,OAAO,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;KAClD;IAID,GAAG,CAAI,GAAW,EAAE,WAAqC,EAAA;QACxD,OAAO,WAAW,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;KACxF;8GAXW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAFjB,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEN,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACX,oBAAA,UAAU,EAAE,MAAM;AAClB,iBAAA,CAAA;;;ACND;;AAEG;;;;"}
|