@foblex/m-render 2.6.7 → 2.6.9
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/fesm2022/foblex-m-render.mjs +160 -221
- package/fesm2022/foblex-m-render.mjs.map +1 -1
- package/lib/documentation-page/components/markdown-container/f-markdown/components/f-markdown-footer/domain/get-previous-next-page-navigation/get-previous-next-page-navigation.handler.d.ts +1 -2
- package/lib/documentation-page/components/markdown-container/f-markdown/components/f-markdown-footer/f-markdown-footer.component.d.ts +1 -1
- package/lib/documentation-page/components/markdown-container/f-markdown/f-markdown-renderer.component.d.ts +0 -1
- package/lib/documentation-page/components/markdown-container/f-markdown/highlight/mark-code-focused-blocks.post-processor.d.ts +1 -2
- package/lib/documentation-page/components/navigation-panel/navigation-panel.component.d.ts +2 -1
- package/lib/documentation-page/components/scrollable-container/components/table-of-content/table-of-content.component.d.ts +1 -1
- package/lib/documentation-page/components/scrollable-container/domain/activate-toc-by-hash/activate-toc-by-hash.handler.d.ts +3 -5
- package/lib/documentation-page/components/scrollable-container/domain/calculate-hash-from-scroll-position-and-activate-toc/calculate-hash-from-scroll-position-and-activate-toc.handler.d.ts +4 -7
- package/lib/documentation-page/components/scrollable-container/domain/calculate-table-of-content-data/calculate-table-of-content-data.handler.d.ts +4 -6
- package/lib/documentation-page/components/scrollable-container/domain/get-absolute-top-to-container/get-absolute-top-to-container.handler.d.ts +3 -5
- package/lib/documentation-page/components/scrollable-container/domain/index.d.ts +0 -1
- package/lib/documentation-page/components/scrollable-container/domain/render-dynamic-components/render-dynamic-components.handler.d.ts +4 -6
- package/lib/documentation-page/components/scrollable-container/domain/scroll-to-element-in-container/scroll-to-element-in-container.handler.d.ts +3 -5
- package/lib/documentation-page/components/scrollable-container/scrollable-container.component.d.ts +1 -1
- package/lib/documentation-page/domain/handle-navigation-links/handle-navigation-links.handler.d.ts +1 -7
- package/lib/documentation-page/domain/handle-navigation-links/handle-navigation-links.request.d.ts +5 -1
- package/lib/documentation-page/domain/index.d.ts +0 -1
- package/package.json +1 -3
- package/lib/documentation-page/components/scrollable-container/domain/providers.d.ts +0 -7
- package/lib/documentation-page/domain/providers.d.ts +0 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { EventEmitter, booleanAttribute, HostListener, Input, ViewChild, Output, ChangeDetectionStrategy, Component, input, output, viewChild, InjectionToken, inject, signal, Injectable, Renderer2, ElementRef, NgZone, Directive, ChangeDetectorRef, DestroyRef, computed, ViewContainerRef,
|
2
|
+
import { EventEmitter, booleanAttribute, HostListener, Input, ViewChild, Output, ChangeDetectionStrategy, Component, input, output, viewChild, InjectionToken, inject, signal, Injectable, Renderer2, ElementRef, NgZone, Directive, ChangeDetectorRef, DestroyRef, computed, ViewContainerRef, Injector, forwardRef, effect, untracked } from '@angular/core';
|
3
3
|
import { BrowserService, F_LOCAL_STORAGE } from '@foblex/platform';
|
4
4
|
import { Subject, of, map, from, switchMap, startWith, filter, defer, Observable, EMPTY, debounceTime, fromEvent } from 'rxjs';
|
5
5
|
import { HttpClient } from '@angular/common/http';
|
@@ -8,9 +8,6 @@ import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
8
8
|
import { Overlay, CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
9
9
|
import { Router, RouterLink, NavigationEnd, ActivatedRoute, RouterOutlet } from '@angular/router';
|
10
10
|
import { DOCUMENT, TitleCasePipe } from '@angular/common';
|
11
|
-
import { __decorate } from 'tslib';
|
12
|
-
import { FExecutionRegister, FMediator } from '@foblex/mediator';
|
13
|
-
import { deepClone } from '@foblex/utils';
|
14
11
|
import { createHighlighter } from 'shiki';
|
15
12
|
import MarkdownIt from 'markdown-it';
|
16
13
|
import { DomSanitizer } from '@angular/platform-browser';
|
@@ -583,30 +580,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
583
580
|
args: [{ providedIn: 'root' }]
|
584
581
|
}] });
|
585
582
|
|
586
|
-
class
|
587
|
-
event;
|
588
|
-
constructor(event) {
|
589
|
-
this.event = event;
|
590
|
-
}
|
591
|
-
}
|
592
|
-
|
593
|
-
let HandleNavigationLinksHandler = class HandleNavigationLinksHandler {
|
594
|
-
_router = inject(Router);
|
595
|
-
_browser = inject(BrowserService);
|
583
|
+
class HandleNavigationLinksHandler {
|
596
584
|
handle(request) {
|
597
|
-
|
598
|
-
if (!target) {
|
599
|
-
return;
|
600
|
-
}
|
601
|
-
target = this._getClosestAnchorTag(target);
|
585
|
+
const target = this._getClosestAnchorTag(this._getTargetElement(request.event));
|
602
586
|
if (target && this._hasHref(target)) {
|
603
587
|
request.event.preventDefault();
|
604
588
|
const href = target.getAttribute('href');
|
605
589
|
if (!this._isExternalLink(href)) {
|
606
|
-
this._navigateInternalLink(href);
|
590
|
+
this._navigateInternalLink(href, request.router);
|
607
591
|
}
|
608
592
|
else {
|
609
|
-
this._navigateExternalLink(href);
|
593
|
+
this._navigateExternalLink(href, request.browser);
|
610
594
|
}
|
611
595
|
}
|
612
596
|
}
|
@@ -614,7 +598,7 @@ let HandleNavigationLinksHandler = class HandleNavigationLinksHandler {
|
|
614
598
|
return event?.target;
|
615
599
|
}
|
616
600
|
_getClosestAnchorTag(element) {
|
617
|
-
return element
|
601
|
+
return element?.closest('a');
|
618
602
|
}
|
619
603
|
_hasHref(element) {
|
620
604
|
return element.hasAttribute('href');
|
@@ -622,24 +606,27 @@ let HandleNavigationLinksHandler = class HandleNavigationLinksHandler {
|
|
622
606
|
_isExternalLink(href) {
|
623
607
|
return href.startsWith('www') || href.startsWith('http');
|
624
608
|
}
|
625
|
-
_navigateInternalLink(href) {
|
609
|
+
_navigateInternalLink(href, router) {
|
626
610
|
if (href.startsWith('/')) {
|
627
611
|
href = href.substring(1);
|
628
612
|
}
|
629
|
-
|
613
|
+
router.navigate([href]).then();
|
630
614
|
}
|
631
|
-
_navigateExternalLink(href) {
|
632
|
-
|
615
|
+
_navigateExternalLink(href, browser) {
|
616
|
+
browser.window.open(href, '_blank');
|
633
617
|
}
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
618
|
+
}
|
619
|
+
|
620
|
+
class HandleNavigationLinksRequest {
|
621
|
+
event;
|
622
|
+
browser;
|
623
|
+
router;
|
624
|
+
constructor(event, browser, router) {
|
625
|
+
this.event = event;
|
626
|
+
this.browser = browser;
|
627
|
+
this.router = router;
|
628
|
+
}
|
629
|
+
}
|
643
630
|
|
644
631
|
function provide404Markdown(notFoundMarkdown) {
|
645
632
|
return {
|
@@ -714,10 +701,6 @@ function provideTocData(toC) {
|
|
714
701
|
};
|
715
702
|
}
|
716
703
|
|
717
|
-
const COMMON_FEATURES = [
|
718
|
-
HandleNavigationLinksHandler,
|
719
|
-
];
|
720
|
-
|
721
704
|
class FMetaService {
|
722
705
|
_router = inject(Router);
|
723
706
|
_headTag = inject(FHeadTagService);
|
@@ -888,11 +871,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
888
871
|
type: Component,
|
889
872
|
args: [{ selector: 'f-header', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
890
873
|
HamburgerButtonComponent,
|
891
|
-
NpmVersionComponent,
|
892
874
|
FSocialLinksComponent,
|
893
875
|
FThemeButtonComponent,
|
894
876
|
InlineMenuComponent,
|
895
|
-
DropdownMenuComponent,
|
896
877
|
], template: "<button hamburger-button></button>\n<div class=\"title text-ellipsis\">{{ title }}</div>\n<inline-menu/>\n<!--<npm-version/>-->\n<div class=\"divider\"></div>\n<button f-theme-button></button>\n<div class=\"divider\"></div>\n<f-social-links/>\n\n", styles: [":host{position:sticky;width:100%;top:0;display:flex;justify-content:flex-start;align-items:center;padding:20px 32px;font-weight:600;color:var(--primary-text);height:calc(var(--header-height) + 1px);background-color:var(--background-color);border-bottom:1px solid var(--divider-color);z-index:var(--z-index-header)}@media (min-width: 1280px){:host{padding-right:max(var(--page-padding),(100vw - var(--layout-max-width)) / 3);padding-left:max(var(--page-padding),(100vw - var(--layout-max-width)) / 4)}}.title{display:none;justify-content:flex-start;align-items:center;padding:20px 0;font-weight:600;color:var(--primary-text);height:var(--header-height)}@media (min-width: 460px){.title{display:block}}@media (min-width: 960px){.title{display:none}}.divider{margin-right:8px;margin-left:8px;width:1px;height:24px;background-color:var(--divider-color);content:\"\"}\n"] }]
|
897
878
|
}] });
|
898
879
|
|
@@ -928,9 +909,9 @@ class NavigationPanelComponent {
|
|
928
909
|
optional: true,
|
929
910
|
});
|
930
911
|
_router = inject(Router);
|
931
|
-
_mediator = inject(FMediator);
|
932
912
|
_changeDetectorRef = inject(ChangeDetectorRef);
|
933
913
|
_destroyRef = inject(DestroyRef);
|
914
|
+
_browser = inject(BrowserService);
|
934
915
|
value;
|
935
916
|
navigation = this._provider.getNavigation();
|
936
917
|
title = this._provider.getTitle();
|
@@ -938,12 +919,15 @@ class NavigationPanelComponent {
|
|
938
919
|
ngOnInit() {
|
939
920
|
const currentPath = this._router.url;
|
940
921
|
const prefix = currentPath.substring(0, currentPath.lastIndexOf('/'));
|
941
|
-
const navigation =
|
922
|
+
const navigation = this._deepClone(this._provider.getNavigation());
|
942
923
|
navigation.forEach((group) => {
|
943
924
|
group.items.forEach((item) => this._normalizeLink(item, prefix));
|
944
925
|
});
|
945
926
|
this.navigation = navigation;
|
946
927
|
}
|
928
|
+
_deepClone(value) {
|
929
|
+
return JSON.parse(JSON.stringify(value));
|
930
|
+
}
|
947
931
|
_normalizeLink(item, prefix) {
|
948
932
|
if (item.link && !this._isExternalLink(item.link)) {
|
949
933
|
item.link = item.link.startsWith('/')
|
@@ -976,7 +960,7 @@ class NavigationPanelComponent {
|
|
976
960
|
});
|
977
961
|
}
|
978
962
|
_onDocumentClick(event) {
|
979
|
-
|
963
|
+
new HandleNavigationLinksHandler().handle(new HandleNavigationLinksRequest(event, this._browser, this._router));
|
980
964
|
}
|
981
965
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NavigationPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
982
966
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: NavigationPanelComponent, isStandalone: true, selector: "f-navigation-panel", host: { listeners: { "click": "_onDocumentClick($event)" } }, ngImport: i0, template: "<a routerLink class=\"navigation-header\">\n <img [src]=\"image\" width=\"24\" height=\"24\" alt=\"logo\" class=\"logo\"/> {{ title }}\n</a>\n\n@for (group of navigation; track group) {\n <f-navigation-group [title]=\"group.text\">\n @for (item of group.items; track item.link) {\n <a f-navigation-item [href]=\"item.link\" [class.active]=\"item.link === value\">\n <div class=\"text-ellipsis\">{{ item.text }}</div>\n @if (item.badge) {\n <span class=\"f-badge {{ item.badge.type }}\">{{ item.badge.text }}</span>\n }\n </a>\n }\n </f-navigation-group>\n}\n", styles: [":host{height:100%;flex-direction:column;justify-content:flex-start;align-items:flex-start;padding:0 var(--navigation-panel-padding);background-color:var(--navigation-panel-background);overflow:hidden;overflow-y:auto;position:fixed;width:var(--navigation-panel-width);top:0;left:calc(-1 * var(--navigation-panel-width));transition:transform .2s ease-in-out;z-index:var(--z-index-navigation);transform:none}@media (min-width: 960px){:host{position:unset;display:flex;min-width:var(--navigation-panel-width);width:fit-content;transform:none!important}}@media (min-width: 1440px){:host{min-width:calc((100% - (var(--layout-max-width) - 64px)) / 3 + var(--navigation-panel-width) - var(--navigation-panel-padding))}}:host.visible{transform:translate(var(--navigation-panel-width))}.navigation-header{display:flex;justify-content:flex-start;align-items:center;padding:20px 0;font-weight:600;color:var(--primary-text);height:var(--header-height);width:100%;max-width:240px;margin-left:auto;cursor:pointer}.navigation-header img{margin-right:8px}\n"], dependencies: [{ kind: "component", type: FNavigationItemComponent, selector: "a[f-navigation-item]" }, { kind: "component", type: NavigationGroupComponent, selector: "f-navigation-group", inputs: ["title"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
@@ -2035,12 +2019,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
2035
2019
|
}] });
|
2036
2020
|
|
2037
2021
|
class FMarkdownFooterComponent {
|
2038
|
-
_mediator = inject(FMediator);
|
2039
2022
|
_provider = inject(DocumentationStore);
|
2040
2023
|
_router = inject(Router);
|
2041
2024
|
_activatedRoute = inject(ActivatedRoute);
|
2042
2025
|
_changeDetectorRef = inject(ChangeDetectorRef);
|
2043
2026
|
_destroyRef = inject(DestroyRef);
|
2027
|
+
_browser = inject(BrowserService);
|
2044
2028
|
navigation = {};
|
2045
2029
|
editLink;
|
2046
2030
|
previousLink;
|
@@ -2081,7 +2065,7 @@ class FMarkdownFooterComponent {
|
|
2081
2065
|
return this._activatedRoute.snapshot.url.map((x) => x.path).join('/');
|
2082
2066
|
}
|
2083
2067
|
_onDocumentClick(event) {
|
2084
|
-
|
2068
|
+
new HandleNavigationLinksHandler().handle(new HandleNavigationLinksRequest(event, this._browser, this._router));
|
2085
2069
|
}
|
2086
2070
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FMarkdownFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
2087
2071
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: FMarkdownFooterComponent, isStandalone: true, selector: "footer [f-markdown-footer]", host: { listeners: { "click": "_onDocumentClick($event)" } }, ngImport: i0, template: "@if (editLink) {\n <f-footer-edit-information>\n <a f-footer-edit-link [href]=\"editLink\">\n {{ navigation.editLink?.text || 'Edit this page on GitHub' }}\n </a>\n\n<!-- <f-footer-last-updated>-->\n<!-- Last updated: <span>111</span>-->\n<!-- </f-footer-last-updated>-->\n </f-footer-edit-information>\n}\n\n@if (previousLink || nextLink) {\n <nav f-footer-navigation>\n @if (previousLink) {\n <a f-footer-navigation-button\n [href]=\"previousLink.link\"\n [description]=\"navigation.previous\"\n [link]=\"previousLink\">\n </a>\n }\n @if (nextLink) {\n <a f-footer-navigation-button class=\"next\"\n [href]=\"nextLink.link\"\n [description]=\"navigation.next\"\n [link]=\"nextLink\">\n </a>\n }\n </nav>\n}\n\n", styles: [":host{display:block;margin-top:64px}\n"], dependencies: [{ kind: "component", type: FFooterNavigationComponent, selector: "nav[f-footer-navigation]" }, { kind: "component", type: FFooterNavigationButtonComponent, selector: "a[f-footer-navigation-button]", inputs: ["description", "link"] }, { kind: "component", type: FFooterEditInformationComponent, selector: "f-footer-edit-information" }, { kind: "component", type: FFooterEditLinkComponent, selector: "a[f-footer-edit-link]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
@@ -2300,15 +2284,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
2300
2284
|
args: [{ selector: 'ul[f-table-of-content-items]', changeDetection: ChangeDetectionStrategy.Default, standalone: true, template: "@for (item of items(); track item.hash) {\n <li [class.active]=\"item.isActive\"><a class=\"text-ellipsis\" [href]=\"item.hash\">{{ item.title }}</a></li>\n @if (item.children) {\n <ul f-table-of-content-items [items]=\"item.children\"></ul>\n }\n}\n", styles: [":host{list-style:none;margin:0;padding:0}:host li{overflow-wrap:break-word;color:var(--secondary-text);max-width:180px}:host li a{display:block;line-height:var(--on-page-navigation-item-height);font-size:14px;color:inherit;font-weight:400}:host li.active{color:var(--primary-text)}:host li+ul{padding:0 16px}\n"] }]
|
2301
2285
|
}] });
|
2302
2286
|
|
2303
|
-
class
|
2304
|
-
|
2305
|
-
constructor(
|
2306
|
-
this.
|
2287
|
+
class ActivateTocByHashHandler {
|
2288
|
+
_provider;
|
2289
|
+
constructor(_injector) {
|
2290
|
+
this._provider = _injector.get(DocumentationStore);
|
2307
2291
|
}
|
2308
|
-
}
|
2309
|
-
|
2310
|
-
let ActivateTocByHashHandler = class ActivateTocByHashHandler {
|
2311
|
-
_provider = inject(DocumentationStore);
|
2312
2292
|
handle(payload) {
|
2313
2293
|
this._provider.tocData.update((data) => ({
|
2314
2294
|
...data,
|
@@ -2318,70 +2298,20 @@ let ActivateTocByHashHandler = class ActivateTocByHashHandler {
|
|
2318
2298
|
})),
|
2319
2299
|
}));
|
2320
2300
|
}
|
2321
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ActivateTocByHashHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
2322
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ActivateTocByHashHandler });
|
2323
|
-
};
|
2324
|
-
ActivateTocByHashHandler = __decorate([
|
2325
|
-
FExecutionRegister(ActivateTocByHashRequest)
|
2326
|
-
], ActivateTocByHashHandler);
|
2327
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ActivateTocByHashHandler, decorators: [{
|
2328
|
-
type: Injectable
|
2329
|
-
}] });
|
2330
|
-
|
2331
|
-
class TableOfContentComponent {
|
2332
|
-
_elementRef = inject((ElementRef));
|
2333
|
-
_browser = inject(BrowserService);
|
2334
|
-
_provider = inject(DocumentationStore);
|
2335
|
-
_mediator = inject(FMediator);
|
2336
|
-
tocData = computed(() => {
|
2337
|
-
return this._provider.tocData();
|
2338
|
-
});
|
2339
|
-
activeMarkerPosition = computed(() => {
|
2340
|
-
const index = this.tocData()?.flat.findIndex((x) => x.isActive) || 0;
|
2341
|
-
return this._getActiveMarkerPosition(index);
|
2342
|
-
});
|
2343
|
-
title = inject(DocumentationStore).getToC().title;
|
2344
|
-
_getActiveMarkerPosition(activeIndex) {
|
2345
|
-
const itemHeight = parseInt(this._getComputedStyle(this._elementRef.nativeElement).getPropertyValue('--on-page-navigation-item-height'));
|
2346
|
-
return (activeIndex + 1) * itemHeight + itemHeight / 4;
|
2347
|
-
}
|
2348
|
-
_getComputedStyle(element) {
|
2349
|
-
return this._browser.window.getComputedStyle(element);
|
2350
|
-
}
|
2351
|
-
_onDocumentClick(event) {
|
2352
|
-
const target = event.target;
|
2353
|
-
if (target.tagName === 'A') {
|
2354
|
-
event.preventDefault();
|
2355
|
-
this._scrollTo(target.getAttribute('href'));
|
2356
|
-
}
|
2357
|
-
}
|
2358
|
-
_scrollTo(hash) {
|
2359
|
-
this._mediator.execute(new ActivateTocByHashRequest(hash));
|
2360
|
-
this._mediator.execute(new ScrollToElementInContainerRequest(hash));
|
2361
|
-
}
|
2362
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TableOfContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
2363
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: TableOfContentComponent, isStandalone: true, selector: "aside[f-table-of-content]", host: { listeners: { "click": "_onDocumentClick($event)" } }, ngImport: i0, template: "@let data = tocData();\n@if (data) {\n <div class=\"title\">{{ title || 'In this article' }}</div>\n <ul f-table-of-content-items [items]=\"data.tree\"></ul>\n <div class=\"active-marker\" [style.top]=\"activeMarkerPosition() + 'px'\"></div>\n}\n\n", styles: [":host{--on-page-navigation-item-height: 32px;display:none;padding-left:16px;border-left:1px solid var(--divider-color);font-size:13px;font-weight:500;position:relative}:host .title{line-height:32px;font-size:14px;font-weight:600}@media (min-width: 1280px){:host{display:block;width:var(--on-page-navigation-width);position:fixed;top:calc(var(--header-height) + 48px);right:max(var(--page-padding),(100vw - var(--layout-max-width)) / 3)}}:host .active-marker{position:absolute;top:0;left:0;width:2px;height:calc(var(--on-page-navigation-item-height) / 2);border-radius:2px;background-color:var(--primary-1);transition:top .25s cubic-bezier(0,1,.5,1),opacity .25s}\n"], dependencies: [{ kind: "component", type: TableOfContentItemsComponent, selector: "ul[f-table-of-content-items]", inputs: ["items"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
2364
2301
|
}
|
2365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TableOfContentComponent, decorators: [{
|
2366
|
-
type: Component,
|
2367
|
-
args: [{ selector: 'aside[f-table-of-content]', standalone: true, imports: [TableOfContentItemsComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let data = tocData();\n@if (data) {\n <div class=\"title\">{{ title || 'In this article' }}</div>\n <ul f-table-of-content-items [items]=\"data.tree\"></ul>\n <div class=\"active-marker\" [style.top]=\"activeMarkerPosition() + 'px'\"></div>\n}\n\n", styles: [":host{--on-page-navigation-item-height: 32px;display:none;padding-left:16px;border-left:1px solid var(--divider-color);font-size:13px;font-weight:500;position:relative}:host .title{line-height:32px;font-size:14px;font-weight:600}@media (min-width: 1280px){:host{display:block;width:var(--on-page-navigation-width);position:fixed;top:calc(var(--header-height) + 48px);right:max(var(--page-padding),(100vw - var(--layout-max-width)) / 3)}}:host .active-marker{position:absolute;top:0;left:0;width:2px;height:calc(var(--on-page-navigation-item-height) / 2);border-radius:2px;background-color:var(--primary-1);transition:top .25s cubic-bezier(0,1,.5,1),opacity .25s}\n"] }]
|
2368
|
-
}], propDecorators: { _onDocumentClick: [{
|
2369
|
-
type: HostListener,
|
2370
|
-
args: ['click', ['$event']]
|
2371
|
-
}] } });
|
2372
2302
|
|
2373
|
-
class
|
2374
|
-
|
2375
|
-
|
2376
|
-
|
2377
|
-
element;
|
2378
|
-
constructor(element) {
|
2379
|
-
this.element = element;
|
2303
|
+
class ActivateTocByHashRequest {
|
2304
|
+
hash;
|
2305
|
+
constructor(hash) {
|
2306
|
+
this.hash = hash;
|
2380
2307
|
}
|
2381
2308
|
}
|
2382
2309
|
|
2383
|
-
|
2384
|
-
_scrollableContainer
|
2310
|
+
class GetAbsoluteTopToContainerHandler {
|
2311
|
+
_scrollableContainer;
|
2312
|
+
constructor(_injector) {
|
2313
|
+
this._scrollableContainer = _injector.get(SCROLLABLE_CONTAINER);
|
2314
|
+
}
|
2385
2315
|
handle(request) {
|
2386
2316
|
let element = request.element;
|
2387
2317
|
let result = 0;
|
@@ -2393,21 +2323,26 @@ let GetAbsoluteTopToContainerHandler = class GetAbsoluteTopToContainerHandler {
|
|
2393
2323
|
}
|
2394
2324
|
return result;
|
2395
2325
|
}
|
2396
|
-
|
2397
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GetAbsoluteTopToContainerHandler });
|
2398
|
-
};
|
2399
|
-
GetAbsoluteTopToContainerHandler = __decorate([
|
2400
|
-
FExecutionRegister(GetAbsoluteTopToContainerRequest)
|
2401
|
-
], GetAbsoluteTopToContainerHandler);
|
2402
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GetAbsoluteTopToContainerHandler, decorators: [{
|
2403
|
-
type: Injectable
|
2404
|
-
}] });
|
2326
|
+
}
|
2405
2327
|
|
2406
|
-
|
2407
|
-
|
2408
|
-
|
2409
|
-
|
2410
|
-
|
2328
|
+
class GetAbsoluteTopToContainerRequest {
|
2329
|
+
element;
|
2330
|
+
constructor(element) {
|
2331
|
+
this.element = element;
|
2332
|
+
}
|
2333
|
+
}
|
2334
|
+
|
2335
|
+
class CalculateHashFromScrollPositionAndActivateTocHandler {
|
2336
|
+
_injector;
|
2337
|
+
_browser;
|
2338
|
+
_provider;
|
2339
|
+
_scrollableContainer;
|
2340
|
+
constructor(_injector) {
|
2341
|
+
this._injector = _injector;
|
2342
|
+
this._browser = _injector.get(BrowserService);
|
2343
|
+
this._provider = _injector.get(DocumentationStore);
|
2344
|
+
this._scrollableContainer = _injector.get(SCROLLABLE_CONTAINER);
|
2345
|
+
}
|
2411
2346
|
handle() {
|
2412
2347
|
let result;
|
2413
2348
|
const containerScrollTop = this._getContainerScrollTop();
|
@@ -2420,7 +2355,7 @@ let CalculateHashFromScrollPositionAndActivateTocHandler = class CalculateHashFr
|
|
2420
2355
|
result = this._findTargetHashByPosition(containerScrollTop, elementsWithTopPosition);
|
2421
2356
|
}
|
2422
2357
|
}
|
2423
|
-
this.
|
2358
|
+
new ActivateTocByHashHandler(this._injector).handle(new ActivateTocByHashRequest(result));
|
2424
2359
|
}
|
2425
2360
|
_getContainerScrollTop() {
|
2426
2361
|
return this._scrollableContainer.htmlElement.scrollTop + this._getHeaderHeight();
|
@@ -2439,7 +2374,7 @@ let CalculateHashFromScrollPositionAndActivateTocHandler = class CalculateHashFr
|
|
2439
2374
|
}).filter((x) => !Number.isNaN(x.top));
|
2440
2375
|
}
|
2441
2376
|
_getAbsoluteTopToContainer(element) {
|
2442
|
-
return this.
|
2377
|
+
return new GetAbsoluteTopToContainerHandler(this._injector).handle(new GetAbsoluteTopToContainerRequest(element));
|
2443
2378
|
}
|
2444
2379
|
_isScrollAtBottom(containerScrollTop) {
|
2445
2380
|
return Math.abs(containerScrollTop - this._getHeaderHeight() + this._scrollableContainer.htmlElement.clientHeight - this._scrollableContainer.htmlElement.scrollHeight) < 1;
|
@@ -2453,21 +2388,9 @@ let CalculateHashFromScrollPositionAndActivateTocHandler = class CalculateHashFr
|
|
2453
2388
|
}
|
2454
2389
|
return result;
|
2455
2390
|
}
|
2456
|
-
|
2457
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CalculateHashFromScrollPositionAndActivateTocHandler });
|
2458
|
-
};
|
2459
|
-
CalculateHashFromScrollPositionAndActivateTocHandler = __decorate([
|
2460
|
-
FExecutionRegister(CalculateHashFromScrollPositionAndActivateTocRequest)
|
2461
|
-
], CalculateHashFromScrollPositionAndActivateTocHandler);
|
2462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CalculateHashFromScrollPositionAndActivateTocHandler, decorators: [{
|
2463
|
-
type: Injectable
|
2464
|
-
}] });
|
2391
|
+
}
|
2465
2392
|
|
2466
|
-
class
|
2467
|
-
fMarkdownPage;
|
2468
|
-
constructor(fMarkdownPage) {
|
2469
|
-
this.fMarkdownPage = fMarkdownPage;
|
2470
|
-
}
|
2393
|
+
class CalculateHashFromScrollPositionAndActivateTocRequest {
|
2471
2394
|
}
|
2472
2395
|
|
2473
2396
|
class TableOfContentData {
|
@@ -2479,9 +2402,13 @@ class TableOfContentData {
|
|
2479
2402
|
}
|
2480
2403
|
}
|
2481
2404
|
|
2482
|
-
|
2483
|
-
|
2484
|
-
|
2405
|
+
class CalculateTableOfContentDataHandler {
|
2406
|
+
_injector;
|
2407
|
+
_provider;
|
2408
|
+
constructor(_injector) {
|
2409
|
+
this._injector = _injector;
|
2410
|
+
this._provider = _injector.get(DocumentationStore);
|
2411
|
+
}
|
2485
2412
|
handle(request) {
|
2486
2413
|
const flat = [];
|
2487
2414
|
const tree = [];
|
@@ -2492,7 +2419,7 @@ let CalculateTableOfContentDataHandler = class CalculateTableOfContentDataHandle
|
|
2492
2419
|
flat.push(tocItem);
|
2493
2420
|
});
|
2494
2421
|
this._provider.tocData.set(new TableOfContentData(flat, tree));
|
2495
|
-
this.
|
2422
|
+
new CalculateHashFromScrollPositionAndActivateTocHandler(this._injector).handle();
|
2496
2423
|
}
|
2497
2424
|
_getNavigationSelectors(fMarkdownPage, tocRange) {
|
2498
2425
|
if (!tocRange || tocRange.start < 1 || tocRange.end > 6) {
|
@@ -2531,31 +2458,27 @@ let CalculateTableOfContentDataHandler = class CalculateTableOfContentDataHandle
|
|
2531
2458
|
}
|
2532
2459
|
stack.push(tocItem);
|
2533
2460
|
}
|
2534
|
-
|
2535
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CalculateTableOfContentDataHandler });
|
2536
|
-
};
|
2537
|
-
CalculateTableOfContentDataHandler = __decorate([
|
2538
|
-
FExecutionRegister(CalculateTableOfContentDataRequest)
|
2539
|
-
], CalculateTableOfContentDataHandler);
|
2540
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CalculateTableOfContentDataHandler, decorators: [{
|
2541
|
-
type: Injectable
|
2542
|
-
}] });
|
2461
|
+
}
|
2543
2462
|
|
2544
|
-
class
|
2545
|
-
|
2546
|
-
constructor(
|
2547
|
-
this.
|
2463
|
+
class CalculateTableOfContentDataRequest {
|
2464
|
+
fMarkdownPage;
|
2465
|
+
constructor(fMarkdownPage) {
|
2466
|
+
this.fMarkdownPage = fMarkdownPage;
|
2548
2467
|
}
|
2549
2468
|
}
|
2550
2469
|
|
2551
|
-
|
2552
|
-
_provider = inject(DocumentationStore);
|
2553
|
-
_containerRef = inject(ViewContainerRef);
|
2470
|
+
class RenderDynamicComponentsHandler {
|
2554
2471
|
_componentsMap = [
|
2555
2472
|
{ tag: 'f-code-group', component: FCodeGroupComponent },
|
2556
2473
|
{ tag: 'f-preview', component: FPreviewComponent },
|
2557
2474
|
{ tag: 'f-preview-group-filters', component: FPreviewGroupFiltersComponent },
|
2558
2475
|
];
|
2476
|
+
_provider;
|
2477
|
+
_containerRef;
|
2478
|
+
constructor(_injector) {
|
2479
|
+
this._provider = _injector.get(DocumentationStore);
|
2480
|
+
this._containerRef = _injector.get(ViewContainerRef);
|
2481
|
+
}
|
2559
2482
|
handle(request) {
|
2560
2483
|
this._provider.disposeDComponents();
|
2561
2484
|
this._componentsMap.forEach(({ tag, component }) => {
|
@@ -2597,7 +2520,8 @@ let RenderDynamicComponentsHandler = class RenderDynamicComponentsHandler {
|
|
2597
2520
|
value = JSON.parse(value);
|
2598
2521
|
// eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars
|
2599
2522
|
}
|
2600
|
-
catch (e) { /* empty */
|
2523
|
+
catch (e) { /* empty */
|
2524
|
+
}
|
2601
2525
|
}
|
2602
2526
|
if (componentRef.instance[key]?.set) {
|
2603
2527
|
componentRef.instance[key].set(value);
|
@@ -2614,25 +2538,20 @@ let RenderDynamicComponentsHandler = class RenderDynamicComponentsHandler {
|
|
2614
2538
|
_logError(tag, error) {
|
2615
2539
|
console.error(`Error inserting component for <${tag}>:`, error);
|
2616
2540
|
}
|
2617
|
-
|
2618
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RenderDynamicComponentsHandler });
|
2619
|
-
};
|
2620
|
-
RenderDynamicComponentsHandler = __decorate([
|
2621
|
-
FExecutionRegister(RenderDynamicComponentsRequest)
|
2622
|
-
], RenderDynamicComponentsHandler);
|
2623
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RenderDynamicComponentsHandler, decorators: [{
|
2624
|
-
type: Injectable
|
2625
|
-
}] });
|
2541
|
+
}
|
2626
2542
|
|
2627
|
-
class
|
2628
|
-
|
2629
|
-
constructor(
|
2630
|
-
this.
|
2543
|
+
class RenderDynamicComponentsRequest {
|
2544
|
+
hostElement;
|
2545
|
+
constructor(hostElement) {
|
2546
|
+
this.hostElement = hostElement;
|
2631
2547
|
}
|
2632
2548
|
}
|
2633
2549
|
|
2634
|
-
|
2635
|
-
_scrollableContainer
|
2550
|
+
class ScrollToElementInContainerHandler {
|
2551
|
+
_scrollableContainer;
|
2552
|
+
constructor(_injector) {
|
2553
|
+
this._scrollableContainer = _injector.get(SCROLLABLE_CONTAINER);
|
2554
|
+
}
|
2636
2555
|
handle(payload) {
|
2637
2556
|
this._scrollableContainer.htmlElement.scrollTo({
|
2638
2557
|
top: this._getScrollTo(this._getScrollToElement(payload.hash)) - 64,
|
@@ -2661,30 +2580,62 @@ let ScrollToElementInContainerHandler = class ScrollToElementInContainerHandler
|
|
2661
2580
|
_getContainerTop() {
|
2662
2581
|
return this._scrollableContainer.htmlElement.getBoundingClientRect().top;
|
2663
2582
|
}
|
2664
|
-
|
2665
|
-
|
2666
|
-
|
2667
|
-
|
2668
|
-
|
2669
|
-
|
2670
|
-
|
2671
|
-
|
2672
|
-
}] });
|
2583
|
+
}
|
2584
|
+
|
2585
|
+
class ScrollToElementInContainerRequest {
|
2586
|
+
hash;
|
2587
|
+
constructor(hash) {
|
2588
|
+
this.hash = hash;
|
2589
|
+
}
|
2590
|
+
}
|
2673
2591
|
|
2674
2592
|
const SCROLLABLE_CONTAINER = new InjectionToken('SCROLLABLE_CONTAINER');
|
2675
2593
|
|
2676
|
-
|
2677
|
-
|
2678
|
-
|
2679
|
-
|
2680
|
-
|
2681
|
-
|
2682
|
-
|
2683
|
-
|
2594
|
+
class TableOfContentComponent {
|
2595
|
+
_elementRef = inject((ElementRef));
|
2596
|
+
_browser = inject(BrowserService);
|
2597
|
+
_provider = inject(DocumentationStore);
|
2598
|
+
_injector = inject(Injector);
|
2599
|
+
tocData = computed(() => {
|
2600
|
+
return this._provider.tocData();
|
2601
|
+
});
|
2602
|
+
activeMarkerPosition = computed(() => {
|
2603
|
+
const index = this.tocData()?.flat.findIndex((x) => x.isActive) || 0;
|
2604
|
+
return this._getActiveMarkerPosition(index);
|
2605
|
+
});
|
2606
|
+
title = inject(DocumentationStore).getToC().title;
|
2607
|
+
_getActiveMarkerPosition(activeIndex) {
|
2608
|
+
const itemHeight = parseInt(this._getComputedStyle(this._elementRef.nativeElement).getPropertyValue('--on-page-navigation-item-height'));
|
2609
|
+
return (activeIndex + 1) * itemHeight + itemHeight / 4;
|
2610
|
+
}
|
2611
|
+
_getComputedStyle(element) {
|
2612
|
+
return this._browser.window.getComputedStyle(element);
|
2613
|
+
}
|
2614
|
+
_onDocumentClick(event) {
|
2615
|
+
const target = event.target;
|
2616
|
+
if (target.tagName === 'A') {
|
2617
|
+
event.preventDefault();
|
2618
|
+
this._scrollTo(target.getAttribute('href'));
|
2619
|
+
}
|
2620
|
+
}
|
2621
|
+
_scrollTo(hash) {
|
2622
|
+
new ActivateTocByHashHandler(this._injector).handle(new ActivateTocByHashRequest(hash));
|
2623
|
+
new ScrollToElementInContainerHandler(this._injector).handle(new ScrollToElementInContainerRequest(hash));
|
2624
|
+
}
|
2625
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TableOfContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
2626
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: TableOfContentComponent, isStandalone: true, selector: "aside[f-table-of-content]", host: { listeners: { "click": "_onDocumentClick($event)" } }, ngImport: i0, template: "@let data = tocData();\n@if (data) {\n <div class=\"title\">{{ title || 'In this article' }}</div>\n <ul f-table-of-content-items [items]=\"data.tree\"></ul>\n <div class=\"active-marker\" [style.top]=\"activeMarkerPosition() + 'px'\"></div>\n}\n\n", styles: [":host{--on-page-navigation-item-height: 32px;display:none;padding-left:16px;border-left:1px solid var(--divider-color);font-size:13px;font-weight:500;position:relative}:host .title{line-height:32px;font-size:14px;font-weight:600}@media (min-width: 1280px){:host{display:block;width:var(--on-page-navigation-width);position:fixed;top:calc(var(--header-height) + 48px);right:max(var(--page-padding),(100vw - var(--layout-max-width)) / 3)}}:host .active-marker{position:absolute;top:0;left:0;width:2px;height:calc(var(--on-page-navigation-item-height) / 2);border-radius:2px;background-color:var(--primary-1);transition:top .25s cubic-bezier(0,1,.5,1),opacity .25s}\n"], dependencies: [{ kind: "component", type: TableOfContentItemsComponent, selector: "ul[f-table-of-content-items]", inputs: ["items"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
2627
|
+
}
|
2628
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TableOfContentComponent, decorators: [{
|
2629
|
+
type: Component,
|
2630
|
+
args: [{ selector: 'aside[f-table-of-content]', standalone: true, imports: [TableOfContentItemsComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let data = tocData();\n@if (data) {\n <div class=\"title\">{{ title || 'In this article' }}</div>\n <ul f-table-of-content-items [items]=\"data.tree\"></ul>\n <div class=\"active-marker\" [style.top]=\"activeMarkerPosition() + 'px'\"></div>\n}\n\n", styles: [":host{--on-page-navigation-item-height: 32px;display:none;padding-left:16px;border-left:1px solid var(--divider-color);font-size:13px;font-weight:500;position:relative}:host .title{line-height:32px;font-size:14px;font-weight:600}@media (min-width: 1280px){:host{display:block;width:var(--on-page-navigation-width);position:fixed;top:calc(var(--header-height) + 48px);right:max(var(--page-padding),(100vw - var(--layout-max-width)) / 3)}}:host .active-marker{position:absolute;top:0;left:0;width:2px;height:calc(var(--on-page-navigation-item-height) / 2);border-radius:2px;background-color:var(--primary-1);transition:top .25s cubic-bezier(0,1,.5,1),opacity .25s}\n"] }]
|
2631
|
+
}], propDecorators: { _onDocumentClick: [{
|
2632
|
+
type: HostListener,
|
2633
|
+
args: ['click', ['$event']]
|
2634
|
+
}] } });
|
2684
2635
|
|
2685
2636
|
class ScrollableContainerComponent {
|
2686
|
-
_mediator = inject(FMediator);
|
2687
2637
|
_destroyRef = inject(DestroyRef);
|
2638
|
+
_injector = inject(Injector);
|
2688
2639
|
htmlElement = inject((ElementRef)).nativeElement;
|
2689
2640
|
ngOnInit() {
|
2690
2641
|
fromEvent(this.htmlElement, 'scroll')
|
@@ -2692,7 +2643,7 @@ class ScrollableContainerComponent {
|
|
2692
2643
|
.subscribe(() => this._calculateHashAndActivate());
|
2693
2644
|
}
|
2694
2645
|
_calculateHashAndActivate() {
|
2695
|
-
this.
|
2646
|
+
new CalculateHashFromScrollPositionAndActivateTocHandler(this._injector).handle();
|
2696
2647
|
}
|
2697
2648
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ScrollableContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
2698
2649
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ScrollableContainerComponent, isStandalone: true, selector: "f-scrollable-container", providers: [
|
@@ -2700,8 +2651,6 @@ class ScrollableContainerComponent {
|
|
2700
2651
|
provide: SCROLLABLE_CONTAINER,
|
2701
2652
|
useExisting: forwardRef(() => ScrollableContainerComponent),
|
2702
2653
|
},
|
2703
|
-
FMediator,
|
2704
|
-
...SCROLLABLE_CONTAINER_FEATURES,
|
2705
2654
|
], ngImport: i0, template: "<ng-content></ng-content>\n<aside f-table-of-content></aside>\n\n\n", styles: [":host{position:relative;width:100%;height:100%;overflow:hidden;overflow-y:auto}\n"], dependencies: [{ kind: "component", type: TableOfContentComponent, selector: "aside[f-table-of-content]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
2706
2655
|
}
|
2707
2656
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ScrollableContainerComponent, decorators: [{
|
@@ -2711,8 +2660,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
2711
2660
|
provide: SCROLLABLE_CONTAINER,
|
2712
2661
|
useExisting: forwardRef(() => ScrollableContainerComponent),
|
2713
2662
|
},
|
2714
|
-
FMediator,
|
2715
|
-
...SCROLLABLE_CONTAINER_FEATURES,
|
2716
2663
|
], changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
2717
2664
|
TableOfContentComponent,
|
2718
2665
|
], template: "<ng-content></ng-content>\n<aside f-table-of-content></aside>\n\n\n", styles: [":host{position:relative;width:100%;height:100%;overflow:hidden;overflow-y:auto}\n"] }]
|
@@ -2726,7 +2673,6 @@ class FMarkdownRendererComponent {
|
|
2726
2673
|
_destroyRef = inject(DestroyRef);
|
2727
2674
|
_injector = inject(Injector);
|
2728
2675
|
_browser = inject(BrowserService);
|
2729
|
-
_mediator = inject(FMediator);
|
2730
2676
|
_markdown = inject(MarkdownService);
|
2731
2677
|
_provider = inject(DocumentationStore);
|
2732
2678
|
get _markdownPath() {
|
@@ -2750,16 +2696,15 @@ class FMarkdownRendererComponent {
|
|
2750
2696
|
if (html && this._browser.isBrowser()) {
|
2751
2697
|
untracked(() => {
|
2752
2698
|
raf(() => {
|
2753
|
-
this.
|
2754
|
-
this.
|
2699
|
+
new RenderDynamicComponentsHandler(this._injector).handle(new RenderDynamicComponentsRequest(this._hostElement));
|
2700
|
+
new CalculateTableOfContentDataHandler(this._injector).handle(new CalculateTableOfContentDataRequest(this._hostElement));
|
2755
2701
|
});
|
2756
2702
|
});
|
2757
2703
|
}
|
2758
2704
|
}, { injector: this._injector });
|
2759
2705
|
}
|
2760
2706
|
_onDocumentClick(event) {
|
2761
|
-
|
2762
|
-
this._mediator.execute(new HandleNavigationLinksRequest(event));
|
2707
|
+
new HandleNavigationLinksHandler().handle(new HandleNavigationLinksRequest(event, this._browser, this._router));
|
2763
2708
|
}
|
2764
2709
|
ngOnDestroy() {
|
2765
2710
|
this._provider.disposeDComponents();
|
@@ -2879,8 +2824,6 @@ class DocumentationRootComponent {
|
|
2879
2824
|
provide: TOGGLE_NAVIGATION_COMPONENT,
|
2880
2825
|
useExisting: DocumentationRootComponent,
|
2881
2826
|
},
|
2882
|
-
FMediator,
|
2883
|
-
...COMMON_FEATURES,
|
2884
2827
|
], ngImport: i0, template: "<f-navigation-panel [class.visible]=\"isNavigationVisible()\"></f-navigation-panel>\n<div class=\"f-backdrop\" [class.visible]=\"isNavigationVisible()\" (click)=\"onToggleNavigation(false)\"></div>\n\n<f-scrollable-container>\n <f-header></f-header>\n <router-outlet></router-outlet>\n</f-scrollable-container>\n\n@if (popover()) {\n <div class=\"popover\">{{ popover() }}</div>\n}\n", styles: [":host{display:flex;justify-content:flex-start;align-items:flex-start;height:100%;gap:5px}.f-backdrop{position:fixed;inset:0;opacity:0;z-index:var(--z-index-backdrop);background:var(--backdrop-color);transition:opacity .2s ease-in-out;pointer-events:none}.f-backdrop.visible{opacity:1;pointer-events:all}@media (min-width: 960px){.f-backdrop{position:unset}}.popover{position:fixed;min-width:120px;bottom:50%;left:50%;text-align:center;transform:translate(-50%,-50%);background-color:var(--code-view-copy-button-hover-background);border:1px solid var(--code-view-copy-button-border-color);box-shadow:var(--shadow-3);color:var(--primary-text);font-size:14px;padding:4px 8px;border-radius:4px;z-index:var(--z-index-popover);opacity:1}\n"], dependencies: [{ kind: "component", type: NavigationPanelComponent, selector: "f-navigation-panel" }, { kind: "component", type: ScrollableContainerComponent, selector: "f-scrollable-container" }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: HeaderComponent, selector: "f-header" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
2885
2828
|
}
|
2886
2829
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentationRootComponent, decorators: [{
|
@@ -2905,8 +2848,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
2905
2848
|
provide: TOGGLE_NAVIGATION_COMPONENT,
|
2906
2849
|
useExisting: DocumentationRootComponent,
|
2907
2850
|
},
|
2908
|
-
FMediator,
|
2909
|
-
...COMMON_FEATURES,
|
2910
2851
|
], imports: [
|
2911
2852
|
NavigationPanelComponent,
|
2912
2853
|
ScrollableContainerComponent,
|
@@ -2930,12 +2871,11 @@ const DOCUMENTATION_ROUTES = [
|
|
2930
2871
|
|
2931
2872
|
var index$1 = /*#__PURE__*/Object.freeze({
|
2932
2873
|
__proto__: null,
|
2933
|
-
|
2874
|
+
ActivateTocByHashHandler: ActivateTocByHashHandler,
|
2934
2875
|
ActivateTocByHashRequest: ActivateTocByHashRequest,
|
2935
|
-
|
2936
|
-
get CalculateHashFromScrollPositionAndActivateTocHandler () { return CalculateHashFromScrollPositionAndActivateTocHandler; },
|
2876
|
+
CalculateHashFromScrollPositionAndActivateTocHandler: CalculateHashFromScrollPositionAndActivateTocHandler,
|
2937
2877
|
CalculateHashFromScrollPositionAndActivateTocRequest: CalculateHashFromScrollPositionAndActivateTocRequest,
|
2938
|
-
|
2878
|
+
CalculateTableOfContentDataHandler: CalculateTableOfContentDataHandler,
|
2939
2879
|
CalculateTableOfContentDataRequest: CalculateTableOfContentDataRequest,
|
2940
2880
|
DOCUMENTATION_CONFIGURATION: DOCUMENTATION_CONFIGURATION,
|
2941
2881
|
DOCUMENTATION_ROUTES: DOCUMENTATION_ROUTES,
|
@@ -2963,13 +2903,13 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
2963
2903
|
FPreviewGroupService: FPreviewGroupService,
|
2964
2904
|
F_ACCEPT_COOKIES_KEY: F_ACCEPT_COOKIES_KEY,
|
2965
2905
|
F_PREVIEW_NAVIGATION_PROVIDER: F_PREVIEW_NAVIGATION_PROVIDER,
|
2966
|
-
|
2906
|
+
GetAbsoluteTopToContainerHandler: GetAbsoluteTopToContainerHandler,
|
2967
2907
|
GetAbsoluteTopToContainerRequest: GetAbsoluteTopToContainerRequest,
|
2968
2908
|
GetPreviousNextPageNavigationHandler: GetPreviousNextPageNavigationHandler,
|
2969
2909
|
GetPreviousNextPageNavigationRequest: GetPreviousNextPageNavigationRequest,
|
2970
2910
|
GetPreviousNextPageNavigationResponse: GetPreviousNextPageNavigationResponse,
|
2971
2911
|
HamburgerButtonComponent: HamburgerButtonComponent,
|
2972
|
-
|
2912
|
+
HandleNavigationLinksHandler: HandleNavigationLinksHandler,
|
2973
2913
|
HandleNavigationLinksRequest: HandleNavigationLinksRequest,
|
2974
2914
|
HeaderComponent: HeaderComponent,
|
2975
2915
|
HighlightComponent: HighlightComponent,
|
@@ -2985,11 +2925,10 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
2985
2925
|
ParseGroupedCodeItems: ParseGroupedCodeItems,
|
2986
2926
|
ParsePreviewGroup: ParsePreviewGroup,
|
2987
2927
|
ParseSingleCodeItem: ParseSingleCodeItem,
|
2988
|
-
|
2928
|
+
RenderDynamicComponentsHandler: RenderDynamicComponentsHandler,
|
2989
2929
|
RenderDynamicComponentsRequest: RenderDynamicComponentsRequest,
|
2990
2930
|
SCROLLABLE_CONTAINER: SCROLLABLE_CONTAINER,
|
2991
|
-
|
2992
|
-
get ScrollToElementInContainerHandler () { return ScrollToElementInContainerHandler; },
|
2931
|
+
ScrollToElementInContainerHandler: ScrollToElementInContainerHandler,
|
2993
2932
|
ScrollToElementInContainerRequest: ScrollToElementInContainerRequest,
|
2994
2933
|
ScrollableContainerComponent: ScrollableContainerComponent,
|
2995
2934
|
TOGGLE_NAVIGATION_COMPONENT: TOGGLE_NAVIGATION_COMPONENT,
|
@@ -3267,5 +3206,5 @@ var index = /*#__PURE__*/Object.freeze({
|
|
3267
3206
|
* Generated bundle index. Do not edit.
|
3268
3207
|
*/
|
3269
3208
|
|
3270
|
-
export { ActivateTocByHashHandler, ActivateTocByHashRequest,
|
3209
|
+
export { ActivateTocByHashHandler, ActivateTocByHashRequest, CalculateHashFromScrollPositionAndActivateTocHandler, CalculateHashFromScrollPositionAndActivateTocRequest, CalculateTableOfContentDataHandler, CalculateTableOfContentDataRequest, DOCUMENTATION_CONFIGURATION, DOCUMENTATION_ROUTES, DocumentationRootComponent, DocumentationStore, DropdownMenuComponent, EMarkdownContainerType, EParsedContainerType, FAnalyticsService, FCheckboxComponent, FCodeGroupComponent, FCodeGroupTabsComponent, FCodeViewComponent, FCookiePopupComponent, FExampleViewComponent, FFooterEditInformationComponent, FFooterNavigationButtonComponent, FFooterNavigationComponent, FHomePageButtonsRowComponent, FHomePageFeaturesComponent, FHomePageFooterComponent, FHomePageHeaderComponent, FHomePageHeroComponent, FHomePageMembershipsComponent, FInsertComponentDirective, FMarkdownFooterComponent, FMarkdownRendererComponent, FMetaService, FNavigationItemComponent, FPreviewBase, FPreviewComponent, FPreviewGroupFiltersComponent, FPreviewGroupService, FRadioButtonComponent, FSocialLinksComponent, FThemeButtonComponent, F_ACCEPT_COOKIES_KEY, F_PREVIEW_NAVIGATION_PROVIDER, F_SOCIAL_LINKS_PROVIDER, GetAbsoluteTopToContainerHandler, GetAbsoluteTopToContainerRequest, GetPreviousNextPageNavigationHandler, GetPreviousNextPageNavigationRequest, GetPreviousNextPageNavigationResponse, HEADER_CONFIGURATION, HEADER_CONFIGURATION_STORE, HOME_PAGE_CONFIGURATION, HOME_ROUTES, HamburgerButtonComponent, HandleNavigationLinksHandler, HandleNavigationLinksRequest, HeaderComponent, HighlightComponent, HighlightService, HomeRootComponent, HomeStore, InlineMenuComponent, LANGUAGES, MarkCodeFocusedBlocksPostProcessor, MarkdownContainerComponent, MarkdownService, NavigationGroupComponent, NavigationPanelComponent, NpmVersionComponent, OverflowObserverDirective, ParseAlerts, ParseAngularExampleWithCodeLinks, ParseGroupedCodeItems, ParsePreviewGroup, ParseSingleCodeItem, PopoverService, RIGHT_TOP_OVERLAY_POSITION, RenderDynamicComponentsHandler, RenderDynamicComponentsRequest, SCROLLABLE_CONTAINER, ScrollToElementInContainerHandler, ScrollToElementInContainerRequest, ScrollableContainerComponent, TOGGLE_NAVIGATION_COMPONENT, TableOfContentComponent, TableOfContentData, TableOfContentItemsComponent, ThemeService, coerceComponentHeight, copyToClipboard, defineLazyComponent, defineNavigationGroup, encodeDataAttr, extractComponent, getContent, isClosingToken, isOpeningToken, parseComponentTag, parseFileLinkLine, parseLanguageFromFileExtension, parseSingleBracketText, parseSyntaxLanguage, provide404Markdown, provideBackground, provideComponents, provideDirectory, provideDocumentation, provideDocumentationMeta, provideFooterNavigation, provideHeader, provideHeaderMediaLinks, provideHeaderNavigation, provideHero, provideHomeButtons, provideHomeFeatures, provideHomeFooter, provideHomePage, provideImage, provideLanguage, provideLogo, provideNavigation, provideTitle, provideTocData, setCookieConsent };
|
3271
3210
|
//# sourceMappingURL=foblex-m-render.mjs.map
|