@ng-doc/builder 15.0.0-beta.27 → 15.0.0-beta.29
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/engine/.cache/libs/app/components/api-list/api-list.component.js +7 -7
- package/engine/.cache/libs/app/components/code/code.component.js +12 -16
- package/engine/.cache/libs/app/components/demo/demo.component.js +8 -10
- package/engine/.cache/libs/app/components/navbar/navbar.component.js +1 -1
- package/engine/.cache/libs/app/components/page/page.module.js +1 -0
- package/engine/.cache/libs/app/components/page-map/page-map.component.js +1 -2
- package/engine/.cache/libs/app/components/playground/playground.component.js +5 -10
- package/engine/.cache/libs/app/components/playground-demo/playground-demo.component.js +8 -9
- package/engine/.cache/libs/app/components/playground-properties/playground-properties.component.js +1 -2
- package/engine/.cache/libs/app/components/playground-property/playground-property.component.js +9 -10
- package/engine/.cache/libs/app/components/root/root.component.js +2 -3
- package/engine/.cache/libs/app/components/sidebar/sidebar-category/sidebar-category.component.js +3 -5
- package/engine/.cache/libs/app/components/sidebar/sidebar.component.js +1 -2
- package/engine/.cache/libs/app/directives/code-highlighter/code-highlighter.directive.js +1 -2
- package/engine/.cache/libs/app/helpers/generate-page-map/generate-page-map.js +1 -2
- package/engine/.cache/libs/app/modules/root/ng-doc.module.js +3 -3
- package/engine/.cache/libs/app/pipes/filter-by-text/filter-by-text.pipe.js +1 -2
- package/engine/.cache/libs/app/processors/code-processor/code-processor.directive.js +2 -5
- package/engine/.cache/libs/app/processors/html-processor/html-processor.directive.js +1 -2
- package/engine/.cache/libs/app/processors/icon-processor/icon-processor.directive.js +2 -3
- package/engine/.cache/libs/app/processors/index.js +1 -0
- package/engine/.cache/libs/app/processors/playground-processor/playground-processor.directive.js +2 -3
- package/engine/.cache/libs/app/processors/tooltip-processor/index.js +6 -0
- package/engine/.cache/libs/app/processors/tooltip-processor/tooltip-processor.directive.js +30 -0
- package/engine/.cache/libs/app/processors/tooltip-processor/tooltip-processor.module.js +18 -0
- package/engine/.cache/libs/app/processors/tooltip-processor/tooltip-wrapper.component.js +30 -0
- package/engine/.cache/libs/app/services/theme/theme.service.js +1 -2
- package/engine/.cache/libs/builder/engine/actions/demo.action.js +1 -2
- package/engine/.cache/libs/builder/engine/actions/playground.action.js +3 -4
- package/engine/.cache/libs/builder/engine/actions.js +1 -2
- package/engine/.cache/libs/builder/engine/builder.js +2 -2
- package/engine/.cache/libs/builder/engine/entities/abstractions/entity.js +2 -3
- package/engine/.cache/libs/builder/engine/entities/abstractions/file.entity.js +7 -2
- package/engine/.cache/libs/builder/engine/entities/abstractions/module.entity.js +1 -2
- package/engine/.cache/libs/builder/engine/entities/abstractions/route.entity.js +1 -2
- package/engine/.cache/libs/builder/engine/entities/abstractions/source-file.entity.js +3 -3
- package/engine/.cache/libs/builder/engine/entities/api-page.entity.js +4 -4
- package/engine/.cache/libs/builder/engine/entities/api-scope.entity.js +1 -2
- package/engine/.cache/libs/builder/engine/entities/api.entity.js +9 -16
- package/engine/.cache/libs/builder/engine/entities/category.entity.js +6 -12
- package/engine/.cache/libs/builder/engine/entities/dependencies.entity.js +20 -9
- package/engine/.cache/libs/builder/engine/entities/page.entity.js +13 -20
- package/engine/.cache/libs/builder/engine/entities/playground.entity.js +4 -3
- package/engine/.cache/libs/builder/engine/entity-store.js +3 -5
- package/engine/.cache/libs/builder/engine/functions/build-candidates.js +1 -2
- package/engine/.cache/libs/builder/engine/post-processors/html-plugins/keywords-processor.js +19 -16
- package/engine/.cache/libs/builder/engine/post-processors/html-post-processor.js +5 -2
- package/engine/.cache/libs/builder/engine/renderer.js +10 -7
- package/engine/.cache/libs/builder/engine/template-filters.js +16 -1
- package/engine/.cache/libs/builder/engine/watcher.js +1 -1
- package/engine/.cache/libs/builder/helpers/build-assets.js +2 -0
- package/engine/.cache/libs/builder/helpers/build-global-indexes.js +1 -2
- package/engine/.cache/libs/builder/helpers/create-builder-context.js +3 -4
- package/engine/.cache/libs/builder/helpers/declaration-to-playground.js +6 -4
- package/engine/.cache/libs/builder/helpers/extract-path-anchor.js +2 -3
- package/engine/.cache/libs/builder/helpers/extract-selectors.js +2 -3
- package/engine/.cache/libs/builder/helpers/format-code.js +3 -6
- package/engine/.cache/libs/builder/helpers/generate-api-entities.js +1 -2
- package/engine/.cache/libs/builder/helpers/index.js +1 -0
- package/engine/.cache/libs/builder/helpers/marked.js +1 -1
- package/engine/.cache/libs/builder/helpers/no-empty.js +12 -0
- package/engine/.cache/libs/builder/helpers/not-empty-assets.js +1 -1
- package/engine/.cache/libs/builder/helpers/presentation.js +76 -5
- package/engine/.cache/libs/builder/helpers/typescript/class/find-base-class.js +21 -0
- package/engine/.cache/libs/builder/helpers/typescript/class/find-class.js +21 -0
- package/engine/.cache/libs/builder/helpers/typescript/class/for-all-classes.js +15 -0
- package/engine/.cache/libs/builder/helpers/typescript/class/index.js +6 -0
- package/engine/.cache/libs/builder/helpers/typescript/create-project.js +17 -2
- package/engine/.cache/libs/builder/helpers/typescript/find-declaration.js +3 -4
- package/engine/.cache/libs/builder/helpers/typescript/first-node-with-comment.js +13 -0
- package/engine/.cache/libs/builder/helpers/typescript/index.js +6 -0
- package/engine/.cache/libs/builder/helpers/typescript/interface/find-interface.js +29 -0
- package/engine/.cache/libs/builder/helpers/typescript/interface/for-all-interfaces.js +20 -0
- package/engine/.cache/libs/builder/helpers/typescript/interface/index.js +5 -0
- package/engine/.cache/libs/builder/helpers/typescript/method/get-class-methods.js +22 -0
- package/engine/.cache/libs/builder/helpers/typescript/method/get-implemented-method.js +44 -0
- package/engine/.cache/libs/builder/helpers/typescript/method/get-interface-methods.js +22 -0
- package/engine/.cache/libs/builder/helpers/typescript/method/get-method-chain.js +32 -0
- package/engine/.cache/libs/builder/helpers/typescript/method/get-overridden-method.js +26 -0
- package/engine/.cache/libs/builder/helpers/typescript/method/index.js +8 -0
- package/engine/.cache/libs/builder/helpers/typescript/node/index.js +4 -0
- package/engine/.cache/libs/builder/helpers/typescript/node/sort-by-nodes-name.js +11 -0
- package/engine/.cache/libs/builder/helpers/typescript/property/get-class-properties.js +22 -0
- package/engine/.cache/libs/builder/helpers/typescript/property/get-implemented-property.js +44 -0
- package/engine/.cache/libs/builder/helpers/typescript/property/get-interface-properties.js +22 -0
- package/engine/.cache/libs/builder/helpers/typescript/property/get-overridden-property.js +26 -0
- package/engine/.cache/libs/builder/helpers/typescript/property/get-property-chain.js +33 -0
- package/engine/.cache/libs/builder/helpers/typescript/property/index.js +8 -0
- package/engine/.cache/libs/builder/resolvers/common/get-property-assignment.js +1 -2
- package/engine/.cache/libs/builder/schematics/api/index.js +1 -1
- package/engine/.cache/libs/builder/schematics/category/index.js +1 -1
- package/engine/.cache/libs/builder/schematics/dependencies/index.js +2 -3
- package/engine/.cache/libs/builder/schematics/page/index.js +7 -1
- package/engine/.cache/libs/builder/templates-env/code.env.js +2 -0
- package/engine/.cache/libs/builder/templates-env/index.js +1 -0
- package/engine/.cache/libs/core/helpers/extract-value.js +1 -1
- package/engine/.cache/libs/core/helpers/kebab-case.js +4 -3
- package/engine/.cache/libs/ui-kit/cdk/combobox-host/combobox-host.component.js +8 -11
- package/engine/.cache/libs/ui-kit/components/clear-control/clear-control.component.js +3 -6
- package/engine/.cache/libs/ui-kit/components/dropdown/dropdown.component.js +27 -17
- package/engine/.cache/libs/ui-kit/components/input-wrapper/input-wrapper.component.js +3 -6
- package/engine/.cache/libs/ui-kit/components/list/list.component.js +7 -10
- package/engine/.cache/libs/ui-kit/components/option/option.component.js +2 -4
- package/engine/.cache/libs/ui-kit/components/overlay-container/overlay-container.component.js +5 -9
- package/engine/.cache/libs/ui-kit/components/selection/selection-host.directive.js +1 -2
- package/engine/.cache/libs/ui-kit/components/tab-group/tab-group.component.js +1 -2
- package/engine/.cache/libs/ui-kit/components/toggle/toggle.component.js +2 -3
- package/engine/.cache/libs/ui-kit/directives/media-query/media-query.directive.js +1 -2
- package/engine/.cache/libs/ui-kit/directives/tooltip/tooltip.directive.js +14 -7
- package/engine/.cache/libs/ui-kit/helpers/merge-overlay-configs.js +5 -3
- package/engine/.cache/libs/ui-kit/modules/root/root.module.js +1 -2
- package/engine/.cache/libs/ui-kit/services/notify/notify.service.js +2 -2
- package/engine/.cache/libs/ui-kit/services/overlay/overlay.service.js +2 -3
- package/engine/.cache/libs/ui-kit/services/overlay-strategy/overlay-strategy.js +4 -7
- package/engine/.cache/libs/ui-kit/utils/overlay-utils.js +1 -1
- package/engine/entities/api-page.entity.d.ts +1 -1
- package/engine/entities/dependencies.entity.js +14 -4
- package/engine/entities/dependencies.entity.js.map +1 -1
- package/engine/post-processors/html-plugins/keywords-processor.js +18 -15
- package/engine/post-processors/html-plugins/keywords-processor.js.map +1 -1
- package/engine/renderer.d.ts +1 -0
- package/engine/renderer.js +4 -1
- package/engine/renderer.js.map +1 -1
- package/engine/template-filters.d.ts +1 -1
- package/engine/template-filters.js +16 -1
- package/engine/template-filters.js.map +1 -1
- package/helpers/build-assets.js +2 -0
- package/helpers/build-assets.js.map +1 -1
- package/helpers/format-code.js +3 -6
- package/helpers/format-code.js.map +1 -1
- package/helpers/index.d.ts +1 -0
- package/helpers/index.js +1 -0
- package/helpers/index.js.map +1 -1
- package/helpers/no-empty.d.ts +5 -0
- package/helpers/no-empty.js +13 -0
- package/helpers/no-empty.js.map +1 -0
- package/helpers/not-empty-assets.js +1 -1
- package/helpers/not-empty-assets.js.map +1 -1
- package/helpers/presentation.d.ts +11 -1
- package/helpers/presentation.js +77 -4
- package/helpers/presentation.js.map +1 -1
- package/helpers/typescript/class/find-base-class.d.ts +7 -0
- package/helpers/typescript/class/find-base-class.js +22 -0
- package/helpers/typescript/class/find-base-class.js.map +1 -0
- package/helpers/typescript/class/find-class.d.ts +7 -0
- package/helpers/typescript/class/find-class.js +22 -0
- package/helpers/typescript/class/find-class.js.map +1 -0
- package/helpers/typescript/class/for-all-classes.d.ts +7 -0
- package/helpers/typescript/class/for-all-classes.js +16 -0
- package/helpers/typescript/class/for-all-classes.js.map +1 -0
- package/helpers/typescript/class/index.d.ts +3 -0
- package/helpers/typescript/class/index.js +7 -0
- package/helpers/typescript/class/index.js.map +1 -0
- package/helpers/typescript/first-node-with-comment.d.ts +8 -0
- package/helpers/typescript/first-node-with-comment.js +15 -0
- package/helpers/typescript/first-node-with-comment.js.map +1 -0
- package/helpers/typescript/index.d.ts +6 -0
- package/helpers/typescript/index.js +6 -0
- package/helpers/typescript/index.js.map +1 -1
- package/helpers/typescript/interface/find-interface.d.ts +7 -0
- package/helpers/typescript/interface/find-interface.js +30 -0
- package/helpers/typescript/interface/find-interface.js.map +1 -0
- package/helpers/typescript/interface/for-all-interfaces.d.ts +7 -0
- package/helpers/typescript/interface/for-all-interfaces.js +21 -0
- package/helpers/typescript/interface/for-all-interfaces.js.map +1 -0
- package/helpers/typescript/interface/index.d.ts +2 -0
- package/helpers/typescript/interface/index.js +6 -0
- package/helpers/typescript/interface/index.js.map +1 -0
- package/helpers/typescript/method/get-class-methods.d.ts +6 -0
- package/helpers/typescript/method/get-class-methods.js +23 -0
- package/helpers/typescript/method/get-class-methods.js.map +1 -0
- package/helpers/typescript/method/get-implemented-method.d.ts +7 -0
- package/helpers/typescript/method/get-implemented-method.js +46 -0
- package/helpers/typescript/method/get-implemented-method.js.map +1 -0
- package/helpers/typescript/method/get-interface-methods.d.ts +6 -0
- package/helpers/typescript/method/get-interface-methods.js +23 -0
- package/helpers/typescript/method/get-interface-methods.js.map +1 -0
- package/helpers/typescript/method/get-method-chain.d.ts +6 -0
- package/helpers/typescript/method/get-method-chain.js +33 -0
- package/helpers/typescript/method/get-method-chain.js.map +1 -0
- package/helpers/typescript/method/get-overridden-method.d.ts +7 -0
- package/helpers/typescript/method/get-overridden-method.js +28 -0
- package/helpers/typescript/method/get-overridden-method.js.map +1 -0
- package/helpers/typescript/method/index.d.ts +5 -0
- package/helpers/typescript/method/index.js +9 -0
- package/helpers/typescript/method/index.js.map +1 -0
- package/helpers/typescript/node/index.d.ts +1 -0
- package/helpers/typescript/node/index.js +5 -0
- package/helpers/typescript/node/index.js.map +1 -0
- package/helpers/typescript/node/sort-by-nodes-name.d.ts +6 -0
- package/helpers/typescript/node/sort-by-nodes-name.js +12 -0
- package/helpers/typescript/node/sort-by-nodes-name.js.map +1 -0
- package/helpers/typescript/property/get-class-properties.d.ts +6 -0
- package/helpers/typescript/property/get-class-properties.js +23 -0
- package/helpers/typescript/property/get-class-properties.js.map +1 -0
- package/helpers/typescript/property/get-implemented-property.d.ts +7 -0
- package/helpers/typescript/property/get-implemented-property.js +46 -0
- package/helpers/typescript/property/get-implemented-property.js.map +1 -0
- package/helpers/typescript/property/get-interface-properties.d.ts +6 -0
- package/helpers/typescript/property/get-interface-properties.js +23 -0
- package/helpers/typescript/property/get-interface-properties.js.map +1 -0
- package/helpers/typescript/property/get-overridden-property.d.ts +7 -0
- package/helpers/typescript/property/get-overridden-property.js +28 -0
- package/helpers/typescript/property/get-overridden-property.js.map +1 -0
- package/helpers/typescript/property/get-property-chain.d.ts +6 -0
- package/helpers/typescript/property/get-property-chain.js +34 -0
- package/helpers/typescript/property/get-property-chain.js.map +1 -0
- package/helpers/typescript/property/index.d.ts +5 -0
- package/helpers/typescript/property/index.js +9 -0
- package/helpers/typescript/property/index.js.map +1 -0
- package/interfaces/asset.d.ts +1 -0
- package/package.json +2 -2
- package/templates/api/class.html.nunj +22 -8
- package/templates/api/function.html.nunj +1 -1
- package/templates/api/interface.html.nunj +4 -4
- package/templates/code.html.nunj +3 -0
- package/templates/helpers/code.html.nunj +1 -1
- package/templates/helpers/constructor.html.nunj +34 -0
- package/templates/helpers/declaration-modifiers.html.nunj +5 -8
- package/templates/helpers/method.html.nunj +19 -4
- package/templates/helpers/methods.html.nunj +2 -2
- package/templates/helpers/parameters.html.nunj +2 -1
- package/templates/helpers/properties.html.nunj +19 -2
- package/templates-env/code.env.d.ts +4 -0
- package/templates-env/code.env.js +3 -0
- package/templates-env/code.env.js.map +1 -0
- package/templates-env/index.d.ts +1 -0
- package/templates-env/index.js +1 -0
- package/templates-env/index.js.map +1 -1
package/engine/.cache/libs/ui-kit/components/overlay-container/overlay-container.component.js
CHANGED
|
@@ -26,9 +26,8 @@ let NgDocOverlayContainerComponent = class NgDocOverlayContainerComponent {
|
|
|
26
26
|
this.isOpened = true;
|
|
27
27
|
}
|
|
28
28
|
ngOnInit() {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (((_b = this.config) === null || _b === void 0 ? void 0 : _b.positionStrategy) instanceof overlay_1.FlexibleConnectedPositionStrategy) {
|
|
29
|
+
this.runAnimation(this.config?.openAnimation || []);
|
|
30
|
+
if (this.config?.positionStrategy instanceof overlay_1.FlexibleConnectedPositionStrategy) {
|
|
32
31
|
this.config.positionStrategy.positionChanges
|
|
33
32
|
.pipe((0, operators_1.distinctUntilChanged)((a, b) => a.connectionPair === b.connectionPair), (0, observables_1.ngDocZoneOptimize)(this.ngZone))
|
|
34
33
|
.subscribe((change) => {
|
|
@@ -39,12 +38,10 @@ let NgDocOverlayContainerComponent = class NgDocOverlayContainerComponent {
|
|
|
39
38
|
}
|
|
40
39
|
}
|
|
41
40
|
get contactBorder() {
|
|
42
|
-
|
|
43
|
-
return !!((_a = this.config) === null || _a === void 0 ? void 0 : _a.contactBorder);
|
|
41
|
+
return !!this.config?.contactBorder;
|
|
44
42
|
}
|
|
45
43
|
get isFocused() {
|
|
46
|
-
|
|
47
|
-
return !!((_a = this.focusCatcher) === null || _a === void 0 ? void 0 : _a.focused);
|
|
44
|
+
return !!this.focusCatcher?.focused;
|
|
48
45
|
}
|
|
49
46
|
get animationEvent() {
|
|
50
47
|
return this.animationEvent$.asObservable();
|
|
@@ -55,9 +52,8 @@ let NgDocOverlayContainerComponent = class NgDocOverlayContainerComponent {
|
|
|
55
52
|
: null;
|
|
56
53
|
}
|
|
57
54
|
close() {
|
|
58
|
-
var _a;
|
|
59
55
|
if (this.isOpened) {
|
|
60
|
-
this.runAnimation(
|
|
56
|
+
this.runAnimation(this.config?.closeAnimation || [], true);
|
|
61
57
|
this.isOpened = false;
|
|
62
58
|
this.changeDetectorRef.markForCheck();
|
|
63
59
|
}
|
|
@@ -23,9 +23,8 @@ let NgDocSelectionHostDirective = class NgDocSelectionHostDirective {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
changeSelected(origin, selected) {
|
|
26
|
-
var _a, _b, _c;
|
|
27
26
|
this.selected = this.selected === origin || selected ? (selected ? origin : undefined) : this.selected;
|
|
28
|
-
this.selectedChange.next(
|
|
27
|
+
this.selectedChange.next(this.selected?.elementRef?.nativeElement ?? undefined);
|
|
29
28
|
}
|
|
30
29
|
};
|
|
31
30
|
NgDocSelectionHostDirective = tslib_1.__decorate([
|
|
@@ -30,8 +30,7 @@ let NgDocTabGroupComponent = class NgDocTabGroupComponent {
|
|
|
30
30
|
return this.selectedTab ? this.tabs.toArray().indexOf(this.selectedTab) : -1;
|
|
31
31
|
}
|
|
32
32
|
get selectedHeaderTab() {
|
|
33
|
-
|
|
34
|
-
return this.selectedTab ? (_a = this.tabElements.get(this.selectedIndex)) !== null && _a !== void 0 ? _a : null : null;
|
|
33
|
+
return this.selectedTab ? this.tabElements.get(this.selectedIndex) ?? null : null;
|
|
35
34
|
}
|
|
36
35
|
selectTab(tab) {
|
|
37
36
|
this.selectedTab = tab;
|
|
@@ -24,9 +24,8 @@ let NgDocToggleComponent = class NgDocToggleComponent extends flex_controls_1.Fl
|
|
|
24
24
|
this.maxPixelValue = this.wrapper.nativeElement.offsetWidth - this.circle.nativeElement.offsetWidth - 6;
|
|
25
25
|
(0, rxjs_1.fromEvent)(this.circle.nativeElement, 'mousedown')
|
|
26
26
|
.pipe((0, operators_1.filter)(() => !this.disabled), (0, operators_1.switchMap)(() => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
this.renderer.setStyle((_c = this.circle) === null || _c === void 0 ? void 0 : _c.nativeElement, 'transition', '');
|
|
27
|
+
const transition = this.circle?.nativeElement.style.transition ?? '';
|
|
28
|
+
this.renderer.setStyle(this.circle?.nativeElement, 'transition', '');
|
|
30
29
|
this.setDragging(true);
|
|
31
30
|
return (0, rxjs_1.fromEvent)(document.body, 'mousemove').pipe((0, operators_1.pairwise)(), (0, operators_1.map)(([newEvent, oldEvent]) => [newEvent, oldEvent]), (0, operators_1.map)(([newEvent, oldEvent]) => oldEvent.clientX - newEvent.clientX), (0, operators_1.filter)((deltaX) => deltaX !== 0), (0, operators_1.tap)((deltaX) => this.changeCirclePosition(deltaX)), (0, operators_1.startWith)(null), (0, operators_1.takeUntil)((0, rxjs_1.fromEvent)(document.body, 'mouseup').pipe((0, operators_1.tap)(() => this.setDragging(false)))), (0, operators_1.last)(), (0, operators_1.tap)(() => this.circle &&
|
|
32
31
|
this.renderer.setStyle(this.circle.nativeElement, 'transition', transition)));
|
|
@@ -22,8 +22,7 @@ let NgDocMediaQueryDirective = class NgDocMediaQueryDirective {
|
|
|
22
22
|
.observe(this.match)
|
|
23
23
|
.pipe((0, operators_1.pluck)('matches'), (0, operators_1.takeUntil)(this.unsubscribe$), (0, until_destroy_1.untilDestroyed)(this))
|
|
24
24
|
.subscribe((matches) => {
|
|
25
|
-
|
|
26
|
-
(_a = this.viewRef) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
25
|
+
this.viewRef?.destroy();
|
|
27
26
|
this.viewRef = undefined;
|
|
28
27
|
if (matches) {
|
|
29
28
|
this.viewRef = this.viewContainerRef.createEmbeddedView(this.templateRef);
|
|
@@ -59,7 +59,6 @@ let NgDocTooltipDirective = class NgDocTooltipDirective {
|
|
|
59
59
|
.subscribe(() => this.hide());
|
|
60
60
|
}
|
|
61
61
|
show() {
|
|
62
|
-
var _a, _b, _c, _d;
|
|
63
62
|
if (!this.isOpened) {
|
|
64
63
|
this.overlayRef = this.overlayService.open(this.content, {
|
|
65
64
|
origin: this.displayOriginElement,
|
|
@@ -81,17 +80,25 @@ let NgDocTooltipDirective = class NgDocTooltipDirective {
|
|
|
81
80
|
closeAnimation: animations_1.tooltipCloseAnimation,
|
|
82
81
|
});
|
|
83
82
|
this.beforeOpen.emit();
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
this.overlayRef
|
|
84
|
+
?.afterOpen()
|
|
85
|
+
.pipe((0, observables_1.ngDocZoneDetach)(this.ngZone))
|
|
86
|
+
.subscribe(() => this.afterOpen.emit());
|
|
87
|
+
this.overlayRef
|
|
88
|
+
?.beforeClose()
|
|
89
|
+
.pipe((0, observables_1.ngDocZoneDetach)(this.ngZone))
|
|
90
|
+
.subscribe(() => this.beforeClose.emit());
|
|
91
|
+
this.overlayRef
|
|
92
|
+
?.afterClose()
|
|
93
|
+
.pipe((0, observables_1.ngDocZoneDetach)(this.ngZone))
|
|
94
|
+
.subscribe(() => this.afterClose.emit());
|
|
95
|
+
this.overlayRef?.beforeClose().subscribe(() => this.hide());
|
|
88
96
|
this.changeDetectorRef.markForCheck();
|
|
89
97
|
}
|
|
90
98
|
}
|
|
91
99
|
hide() {
|
|
92
|
-
var _a;
|
|
93
100
|
if (this.isOpened) {
|
|
94
|
-
|
|
101
|
+
this.overlayRef?.close();
|
|
95
102
|
this.overlayRef = null;
|
|
96
103
|
this.changeDetectorRef.markForCheck();
|
|
97
104
|
}
|
|
@@ -14,13 +14,15 @@ const core_1 = require("@ng-doc/core");
|
|
|
14
14
|
* @param hostConfig
|
|
15
15
|
*/
|
|
16
16
|
function mergeOverlayConfigs(defaultConfig, currentConfig, hostConfig = {}) {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const configKeys = Object.keys({
|
|
18
|
+
...defaultConfig,
|
|
19
|
+
...currentConfig,
|
|
20
|
+
});
|
|
19
21
|
const newConfig = {};
|
|
20
22
|
for (const key of configKeys) {
|
|
21
23
|
newConfig[key] = (defaultConfig[key] !== currentConfig[key] && (0, core_1.isPresent)(currentConfig[key])
|
|
22
24
|
? currentConfig[key]
|
|
23
|
-
: (
|
|
25
|
+
: (hostConfig && hostConfig[key]) ?? defaultConfig[key]);
|
|
24
26
|
}
|
|
25
27
|
return newConfig;
|
|
26
28
|
}
|
|
@@ -9,13 +9,12 @@ const interceptors_1 = require("@ng-doc/ui-kit/interceptors");
|
|
|
9
9
|
const tokens_1 = require("@ng-doc/ui-kit/tokens");
|
|
10
10
|
let NgDocUiKitRootModule = NgDocUiKitRootModule_1 = class NgDocUiKitRootModule {
|
|
11
11
|
static forRoot(config) {
|
|
12
|
-
var _a;
|
|
13
12
|
return {
|
|
14
13
|
ngModule: NgDocUiKitRootModule_1,
|
|
15
14
|
providers: [
|
|
16
15
|
{
|
|
17
16
|
provide: tokens_1.NG_DOC_ASSETS_PATH,
|
|
18
|
-
useValue:
|
|
17
|
+
useValue: config?.assetsPath ?? 'assets/ng-doc/ui-kit',
|
|
19
18
|
},
|
|
20
19
|
{
|
|
21
20
|
provide: http_1.HTTP_INTERCEPTORS,
|
|
@@ -14,8 +14,8 @@ let NgDocNotifyService = class NgDocNotifyService {
|
|
|
14
14
|
this.overlayService = overlayService;
|
|
15
15
|
this.notify$ = new rxjs_1.Subject();
|
|
16
16
|
this.notify$
|
|
17
|
-
.pipe((0, operators_1.tap)(() =>
|
|
18
|
-
.subscribe(() =>
|
|
17
|
+
.pipe((0, operators_1.tap)(() => this.overlayRef?.close()), (0, operators_1.tap)((content) => this.openOverlay(content)), (0, operators_1.switchMap)(() => (0, rxjs_1.timer)(2000)), (0, until_destroy_1.untilDestroyed)(this))
|
|
18
|
+
.subscribe(() => this.overlayRef?.close());
|
|
19
19
|
}
|
|
20
20
|
notify(content) {
|
|
21
21
|
this.notify$.next(content);
|
|
@@ -23,12 +23,11 @@ let NgDocOverlayService = class NgDocOverlayService {
|
|
|
23
23
|
return this.attachTooltipContainer(content, overlayRef, config, providers);
|
|
24
24
|
}
|
|
25
25
|
attachTooltipContainer(content, overlay, config, providers) {
|
|
26
|
-
|
|
27
|
-
const containerPortal = new portal_1.ComponentPortal(config.overlayContainer, config.viewContainerRef, (_a = config.viewContainerRef) === null || _a === void 0 ? void 0 : _a.injector);
|
|
26
|
+
const containerPortal = new portal_1.ComponentPortal(config.overlayContainer, config.viewContainerRef, config.viewContainerRef?.injector);
|
|
28
27
|
const containerRef = overlay.attach(containerPortal);
|
|
29
28
|
const overlayRef = new classes_1.NgDocOverlayRef(overlay, config, containerRef.instance, this.ngZone, this.router);
|
|
30
29
|
if (content instanceof ng_polymorpheus_1.PolymorpheusComponent) {
|
|
31
|
-
content = new ng_polymorpheus_1.PolymorpheusComponent(content.component, this.createInjector(overlayRef, providers,
|
|
30
|
+
content = new ng_polymorpheus_1.PolymorpheusComponent(content.component, this.createInjector(overlayRef, providers, config.viewContainerRef?.injector));
|
|
32
31
|
}
|
|
33
32
|
containerRef.instance.config = config;
|
|
34
33
|
containerRef.instance.content = content;
|
|
@@ -24,20 +24,17 @@ let NgDocOverlayStrategy = class NgDocOverlayStrategy {
|
|
|
24
24
|
.subscribe(() => this.detach());
|
|
25
25
|
}
|
|
26
26
|
get origin() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return (config === null || config === void 0 ? void 0 : config.viewContainerRef) ? (0, helpers_1.toElement)(config.viewContainerRef.element) : null;
|
|
27
|
+
const config = this.overlayRef?.getConfig();
|
|
28
|
+
return config?.viewContainerRef ? (0, helpers_1.toElement)(config.viewContainerRef.element) : null;
|
|
30
29
|
}
|
|
31
30
|
disable() {
|
|
32
31
|
this.destroy$.next();
|
|
33
32
|
}
|
|
34
33
|
detach() {
|
|
35
|
-
var _a;
|
|
36
34
|
this.disable();
|
|
37
|
-
if (
|
|
35
|
+
if (this.overlayRef?.hasAttached()) {
|
|
38
36
|
this.ngZone.run(() => {
|
|
39
|
-
|
|
40
|
-
(_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.detach();
|
|
37
|
+
this.overlayRef?.detach();
|
|
41
38
|
});
|
|
42
39
|
}
|
|
43
40
|
}
|
|
@@ -98,7 +98,7 @@ class NgDocOverlayUtils {
|
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
static toConnectedPosition(position) {
|
|
101
|
-
return typeof position === 'string' ?
|
|
101
|
+
return typeof position === 'string' ? { ...POSITION_DESCRIPTION[position] } : { ...position };
|
|
102
102
|
}
|
|
103
103
|
static toConnectedPositions(positions) {
|
|
104
104
|
return positions.map(NgDocOverlayUtils.toConnectedPosition);
|
|
@@ -23,7 +23,7 @@ export declare class NgDocApiPageEntity extends NgDocRouteEntity<never> {
|
|
|
23
23
|
constructor(builder: NgDocBuilder, sourceFile: SourceFile, context: NgDocBuilderContext, parent: NgDocApiScopeEntity, declarationName: string);
|
|
24
24
|
get isRoot(): boolean;
|
|
25
25
|
get route(): string;
|
|
26
|
-
emit(): Observable<
|
|
26
|
+
emit(): Observable<void>;
|
|
27
27
|
get title(): string;
|
|
28
28
|
get folderPath(): string;
|
|
29
29
|
get buildCandidates(): NgDocEntity[];
|
|
@@ -97,6 +97,7 @@ class NgDocDependenciesEntity extends source_file_entity_1.NgDocSourceFileEntity
|
|
|
97
97
|
}
|
|
98
98
|
getComponentAssets(classDeclaration) {
|
|
99
99
|
var _a;
|
|
100
|
+
const render = new renderer_1.NgDocRenderer(this.builder);
|
|
100
101
|
const decorator = classDeclaration.getDecorator('Component');
|
|
101
102
|
const decoratorArgument = decorator === null || decorator === void 0 ? void 0 : decorator.getArguments()[0];
|
|
102
103
|
if (ts_morph_1.Node.isObjectLiteralExpression(decoratorArgument)) {
|
|
@@ -115,11 +116,20 @@ class NgDocDependenciesEntity extends source_file_entity_1.NgDocSourceFileEntity
|
|
|
115
116
|
return {
|
|
116
117
|
[(_a = classDeclaration.getName()) !== null && _a !== void 0 ? _a : '']: assets.map((asset) => {
|
|
117
118
|
var _a, _b;
|
|
118
|
-
|
|
119
|
+
const code = (0, helpers_1.formatCode)(asset.output, asset.type);
|
|
120
|
+
return {
|
|
119
121
|
...asset,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
code,
|
|
123
|
+
output: render
|
|
124
|
+
.renderSync('./code.html.nunj', {
|
|
125
|
+
overrideContext: {
|
|
126
|
+
code,
|
|
127
|
+
lang: asset.type,
|
|
128
|
+
},
|
|
129
|
+
})
|
|
130
|
+
.trim(),
|
|
131
|
+
outputPath: (0, helpers_1.slash)(path.join((_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.assetsFolder) !== null && _b !== void 0 ? _b : this.folderPath, `${asset.name}.html`)),
|
|
132
|
+
};
|
|
123
133
|
}),
|
|
124
134
|
};
|
|
125
135
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencies.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/dependencies.entity.ts"],"names":[],"mappings":";;;;AACA,uCAAgD;AAChD,mDAA6B;AAC7B,+BAAoC;AACpC,8CAAmC;AACnC,uCAOkB;AAElB,2CAA2E;AAE3E,+FAAwF;AAExF,0CAA0C;AAC1C,4CAAuC;AAEvC,0EAAwE;AAKxE,MAAa,uBAAwB,SAAQ,0CAAqB;IAAlE;;QACS,qBAAgB,GAAmB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"dependencies.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/dependencies.entity.ts"],"names":[],"mappings":";;;;AACA,uCAAgD;AAChD,mDAA6B;AAC7B,+BAAoC;AACpC,8CAAmC;AACnC,uCAOkB;AAElB,2CAA2E;AAE3E,+FAAwF;AAExF,0CAA0C;AAC1C,4CAAuC;AAEvC,0EAAwE;AAKxE,MAAa,uBAAwB,SAAQ,0CAAqB;IAAlE;;QACS,qBAAgB,GAAmB,EAAE,CAAC;IA8J/C,CAAC;IA5JA,IAAa,MAAM;QAClB,iDAAiD;QACjD,OAAO,KAAK,CAAC;IACd,CAAC;IAED,IAAI,UAAU;;QACb,OAAO,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,UAAU,KAAI,EAAE,CAAC;IACtC,CAAC;IAED,IAAa,eAAe;QAC3B,OAAO,IAAA,cAAO,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAED,IAAa,MAAM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,CAAC;CACD;AA/JD,0DA+JC"}
|
|
@@ -4,6 +4,7 @@ const helpers_1 = require("../../../helpers");
|
|
|
4
4
|
const visit = require('unist-util-visit-parents');
|
|
5
5
|
const is = require('hast-util-is-element');
|
|
6
6
|
const textContent = require('hast-util-to-string');
|
|
7
|
+
const languages = ['typescript'];
|
|
7
8
|
/**
|
|
8
9
|
*
|
|
9
10
|
* @param entityStore
|
|
@@ -19,21 +20,23 @@ function keywordsProcessor(entityStore, entity) {
|
|
|
19
20
|
}
|
|
20
21
|
const parent = ancestors[ancestors.length - 1];
|
|
21
22
|
const isInlineCode = !is(parent, 'pre');
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
if (isInlineCode || languages.includes(node.properties.lang)) {
|
|
24
|
+
visit(node, 'text', (node, ancestors) => {
|
|
25
|
+
if (hasLinkAncestor(ancestors)) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const parent = ancestors[ancestors.length - 1];
|
|
29
|
+
const index = parent.children.indexOf(node);
|
|
30
|
+
// Parse the text for words that we can convert to links
|
|
31
|
+
const nodes = getNodes(node, parent, entityStore, isInlineCode, entity);
|
|
32
|
+
// Replace the text node with the links and leftover text nodes
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
Array.prototype.splice.apply(parent.children, [index, 1].concat(nodes));
|
|
36
|
+
// Do not visit this node's children or the newly added nodes
|
|
37
|
+
return [visit.SKIP, index + nodes.length];
|
|
38
|
+
});
|
|
39
|
+
}
|
|
37
40
|
});
|
|
38
41
|
}
|
|
39
42
|
exports.default = keywordsProcessor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keywords-processor.js","sourceRoot":"","sources":["../../../../../../libs/builder/engine/post-processors/html-plugins/keywords-processor.ts"],"names":[],"mappings":";;AAEA,8CAA4D;AAI5D,MAAM,KAAK,GAAQ,OAAO,CAAC,0BAA0B,CAAC,CAAC;AACvD,MAAM,EAAE,GAAQ,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAChD,MAAM,WAAW,GAAQ,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAExD;;;;GAIG;AACH,SAAwB,iBAAiB,CAAC,WAA6B,EAAE,MAAyB;IACjG,IAAI,MAAM,EAAE;QACX,MAAM,CAAC,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;KAChC;IAED,OAAO,CAAC,IAAS,EAAE,EAAE,CACpB,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,IAAS,EAAE,SAAc,EAAE,EAAE;QACpD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;YACtB,OAAO;SACP;QACD,MAAM,MAAM,GAAQ,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACpD,MAAM,YAAY,GAAY,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAEjD,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,IAAS,EAAE,SAAc,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"keywords-processor.js","sourceRoot":"","sources":["../../../../../../libs/builder/engine/post-processors/html-plugins/keywords-processor.ts"],"names":[],"mappings":";;AAEA,8CAA4D;AAI5D,MAAM,KAAK,GAAQ,OAAO,CAAC,0BAA0B,CAAC,CAAC;AACvD,MAAM,EAAE,GAAQ,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAChD,MAAM,WAAW,GAAQ,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAExD,MAAM,SAAS,GAAa,CAAC,YAAY,CAAC,CAAC;AAE3C;;;;GAIG;AACH,SAAwB,iBAAiB,CAAC,WAA6B,EAAE,MAAyB;IAC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UAAU,GAAG,EAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAC,CAAC;YAEzC,OAAO,EAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAC,CAAC;SAC5C;aAAM,IAAI,UAAU,IAAI,OAAO,EAAE;YACjC,MAAM,CAAC,UAAU,CAAC,KAAK,GAAG,uBAAuB,CAAC;SAClD;QAED,4DAA4D;QAC5D,OAAO,OAAO;YACb,CAAC,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC;YACjE,CAAC,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CAAC,IAAY,EAAE,IAAY;IACjD,OAAO;QACN,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,GAAG;QACZ,UAAU,EAAE,EAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,oBAAoB,EAAC;QACrD,QAAQ,EAAE,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC;KACvC,CAAC;AACH,CAAC"}
|
package/engine/renderer.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare class NgDocRenderer<T extends object> {
|
|
|
8
8
|
private readonly dependenciesStore?;
|
|
9
9
|
constructor(builder: NgDocBuilder, context?: T | undefined, dependenciesStore?: ObservableSet<string> | undefined);
|
|
10
10
|
render(template: string, options?: NgDocRendererOptions<T>): Observable<string>;
|
|
11
|
+
renderSync(template: string, options?: NgDocRendererOptions<T>): string;
|
|
11
12
|
private getContext;
|
|
12
13
|
private getEnvironment;
|
|
13
14
|
}
|
package/engine/renderer.js
CHANGED
|
@@ -45,9 +45,12 @@ class NgDocRenderer {
|
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
+
renderSync(template, options) {
|
|
49
|
+
return this.getEnvironment(options).render(template, this.getContext(options === null || options === void 0 ? void 0 : options.overrideContext));
|
|
50
|
+
}
|
|
48
51
|
getContext(context) {
|
|
49
52
|
return {
|
|
50
|
-
...(context !== null && context !== void 0 ? context : this.context)
|
|
53
|
+
...(context !== null && context !== void 0 ? context : this.context),
|
|
51
54
|
};
|
|
52
55
|
}
|
|
53
56
|
getEnvironment(options) {
|
package/engine/renderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../../../libs/builder/engine/renderer.ts"],"names":[],"mappings":";;;;AAAA,uCAAwC;AACxC,+CAAyB;AACzB,uCAAmD;AACnD,mDAA6B;AAC7B,+BAA4C;AAC5C,uCAA8B;AAG9B,oEAA8C;AAC9C,2CAA2C;AAK3C,MAAM,mBAAmB;IACxB,
|
|
1
|
+
{"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../../../libs/builder/engine/renderer.ts"],"names":[],"mappings":";;;;AAAA,uCAAwC;AACxC,+CAAyB;AACzB,uCAAmD;AACnD,mDAA6B;AAC7B,+BAA4C;AAC5C,uCAA8B;AAG9B,oEAA8C;AAC9C,2CAA2C;AAK3C,MAAM,mBAAmB;IACxB,YAA6B,IAAY,EAAmB,iBAAyC;QAAxE,SAAI,GAAJ,IAAI,CAAQ;QAAmB,sBAAiB,GAAjB,iBAAiB,CAAwB;IAAG,CAAC;IACzG,SAAS,CAAC,IAAY;;QACrB,MAAM,QAAQ,GAAW,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAEpD,MAAA,IAAI,CAAC,iBAAiB,0CAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;QAEtC,OAAO;YACN,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC;YACvC,IAAI,EAAE,QAAQ;YACd,O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A,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,mCAAI,0BAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC,EACjF,EAAC,UAAU,EAAE,KAAK,EAAC,CACnB,CAAC;QAEF,IAAA,iBAAU,EAAC,OAAO,CAAC,CAAC,OAAO,CAC1B,CAAC,MAA4B,EAAE,EAAE,CAAC,CAAC,WAAW,GAAG,WAAW,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAChG,CAAC;QAEF,WAAW,CAAC,SAAS,CAAC,MAAM,EAAE,eAAI,CAAC,CAAC;QACpC,WAAW,CAAC,SAAS,CAAC,cAAc,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAEpD,OAAO,WAAW,CAAC;IACpB,CAAC;CACD;AAjDD,sCAiDC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { displayType, extractDocs, extractParameterDocs, extractSeeDocs, extractSelectors, filterByScope, filterByStatic, marked, methodPresentation, noLineBreaks, notEmptyAssets, typeAliasPresentation, variablePresentation, } from '../helpers';
|
|
1
|
+
export { constructorPresentation, displayType, extractDocs, extractParameterDocs, extractSeeDocs, extractSelectors, filterByScope, filterByStatic, firstNodeWithComment, functionPresentation, getClassMethods, getClassProperties, getImplementedMethod, getImplementedProperty, getInterfaceMethods, getInterfaceProperties, getMethodChain, getOverriddenMethod, getOverriddenProperty, getPropertyChain, marked, methodPresentation, noEmpty, noLineBreaks, notEmptyAssets, sortByNodesName, typeAliasPresentation, variablePresentation, } from '../helpers';
|
|
2
2
|
export { humanizeDeclarationName } from '@ng-doc/core';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* Just export filters from this file, they will be included to the template renderer automatically */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.humanizeDeclarationName = exports.variablePresentation = exports.typeAliasPresentation = exports.notEmptyAssets = exports.noLineBreaks = exports.methodPresentation = exports.marked = exports.filterByStatic = exports.filterByScope = exports.extractSelectors = exports.extractSeeDocs = exports.extractParameterDocs = exports.extractDocs = exports.displayType = void 0;
|
|
4
|
+
exports.humanizeDeclarationName = exports.variablePresentation = exports.typeAliasPresentation = exports.sortByNodesName = exports.notEmptyAssets = exports.noLineBreaks = exports.noEmpty = exports.methodPresentation = exports.marked = exports.getPropertyChain = exports.getOverriddenProperty = exports.getOverriddenMethod = exports.getMethodChain = exports.getInterfaceProperties = exports.getInterfaceMethods = exports.getImplementedProperty = exports.getImplementedMethod = exports.getClassProperties = exports.getClassMethods = exports.functionPresentation = exports.firstNodeWithComment = exports.filterByStatic = exports.filterByScope = exports.extractSelectors = exports.extractSeeDocs = exports.extractParameterDocs = exports.extractDocs = exports.displayType = exports.constructorPresentation = void 0;
|
|
5
5
|
var helpers_1 = require("../helpers");
|
|
6
|
+
Object.defineProperty(exports, "constructorPresentation", { enumerable: true, get: function () { return helpers_1.constructorPresentation; } });
|
|
6
7
|
Object.defineProperty(exports, "displayType", { enumerable: true, get: function () { return helpers_1.displayType; } });
|
|
7
8
|
Object.defineProperty(exports, "extractDocs", { enumerable: true, get: function () { return helpers_1.extractDocs; } });
|
|
8
9
|
Object.defineProperty(exports, "extractParameterDocs", { enumerable: true, get: function () { return helpers_1.extractParameterDocs; } });
|
|
@@ -10,10 +11,24 @@ Object.defineProperty(exports, "extractSeeDocs", { enumerable: true, get: functi
|
|
|
10
11
|
Object.defineProperty(exports, "extractSelectors", { enumerable: true, get: function () { return helpers_1.extractSelectors; } });
|
|
11
12
|
Object.defineProperty(exports, "filterByScope", { enumerable: true, get: function () { return helpers_1.filterByScope; } });
|
|
12
13
|
Object.defineProperty(exports, "filterByStatic", { enumerable: true, get: function () { return helpers_1.filterByStatic; } });
|
|
14
|
+
Object.defineProperty(exports, "firstNodeWithComment", { enumerable: true, get: function () { return helpers_1.firstNodeWithComment; } });
|
|
15
|
+
Object.defineProperty(exports, "functionPresentation", { enumerable: true, get: function () { return helpers_1.functionPresentation; } });
|
|
16
|
+
Object.defineProperty(exports, "getClassMethods", { enumerable: true, get: function () { return helpers_1.getClassMethods; } });
|
|
17
|
+
Object.defineProperty(exports, "getClassProperties", { enumerable: true, get: function () { return helpers_1.getClassProperties; } });
|
|
18
|
+
Object.defineProperty(exports, "getImplementedMethod", { enumerable: true, get: function () { return helpers_1.getImplementedMethod; } });
|
|
19
|
+
Object.defineProperty(exports, "getImplementedProperty", { enumerable: true, get: function () { return helpers_1.getImplementedProperty; } });
|
|
20
|
+
Object.defineProperty(exports, "getInterfaceMethods", { enumerable: true, get: function () { return helpers_1.getInterfaceMethods; } });
|
|
21
|
+
Object.defineProperty(exports, "getInterfaceProperties", { enumerable: true, get: function () { return helpers_1.getInterfaceProperties; } });
|
|
22
|
+
Object.defineProperty(exports, "getMethodChain", { enumerable: true, get: function () { return helpers_1.getMethodChain; } });
|
|
23
|
+
Object.defineProperty(exports, "getOverriddenMethod", { enumerable: true, get: function () { return helpers_1.getOverriddenMethod; } });
|
|
24
|
+
Object.defineProperty(exports, "getOverriddenProperty", { enumerable: true, get: function () { return helpers_1.getOverriddenProperty; } });
|
|
25
|
+
Object.defineProperty(exports, "getPropertyChain", { enumerable: true, get: function () { return helpers_1.getPropertyChain; } });
|
|
13
26
|
Object.defineProperty(exports, "marked", { enumerable: true, get: function () { return helpers_1.marked; } });
|
|
14
27
|
Object.defineProperty(exports, "methodPresentation", { enumerable: true, get: function () { return helpers_1.methodPresentation; } });
|
|
28
|
+
Object.defineProperty(exports, "noEmpty", { enumerable: true, get: function () { return helpers_1.noEmpty; } });
|
|
15
29
|
Object.defineProperty(exports, "noLineBreaks", { enumerable: true, get: function () { return helpers_1.noLineBreaks; } });
|
|
16
30
|
Object.defineProperty(exports, "notEmptyAssets", { enumerable: true, get: function () { return helpers_1.notEmptyAssets; } });
|
|
31
|
+
Object.defineProperty(exports, "sortByNodesName", { enumerable: true, get: function () { return helpers_1.sortByNodesName; } });
|
|
17
32
|
Object.defineProperty(exports, "typeAliasPresentation", { enumerable: true, get: function () { return helpers_1.typeAliasPresentation; } });
|
|
18
33
|
Object.defineProperty(exports, "variablePresentation", { enumerable: true, get: function () { return helpers_1.variablePresentation; } });
|
|
19
34
|
var core_1 = require("@ng-doc/core");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-filters.js","sourceRoot":"","sources":["../../../../libs/builder/engine/template-filters.ts"],"names":[],"mappings":";AAAA,sGAAsG;;;AAEtG,
|
|
1
|
+
{"version":3,"file":"template-filters.js","sourceRoot":"","sources":["../../../../libs/builder/engine/template-filters.ts"],"names":[],"mappings":";AAAA,sGAAsG;;;AAEtG,sCA6BoB;AA5BnB,kHAAA,uBAAuB,OAAA;AACvB,sGAAA,WAAW,OAAA;AACX,sGAAA,WAAW,OAAA;AACX,+GAAA,oBAAoB,OAAA;AACpB,yGAAA,cAAc,OAAA;AACd,2GAAA,gBAAgB,OAAA;AAChB,wGAAA,aAAa,OAAA;AACb,yGAAA,cAAc,OAAA;AACd,+GAAA,oBAAoB,OAAA;AACpB,+GAAA,oBAAoB,OAAA;AACpB,0GAAA,eAAe,OAAA;AACf,6GAAA,kBAAkB,OAAA;AAClB,+GAAA,oBAAoB,OAAA;AACpB,iHAAA,sBAAsB,OAAA;AACtB,8GAAA,mBAAmB,OAAA;AACnB,iHAAA,sBAAsB,OAAA;AACtB,yGAAA,cAAc,OAAA;AACd,8GAAA,mBAAmB,OAAA;AACnB,gHAAA,qBAAqB,OAAA;AACrB,2GAAA,gBAAgB,OAAA;AAChB,iGAAA,MAAM,OAAA;AACN,6GAAA,kBAAkB,OAAA;AAClB,kGAAA,OAAO,OAAA;AACP,uGAAA,YAAY,OAAA;AACZ,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AACf,gHAAA,qBAAqB,OAAA;AACrB,+GAAA,oBAAoB,OAAA;AAErB,qCAAqD;AAA7C,+GAAA,uBAAuB,OAAA"}
|
package/helpers/build-assets.js
CHANGED
|
@@ -23,6 +23,7 @@ function buildAssets(filePath, styleType) {
|
|
|
23
23
|
title: snippet.name,
|
|
24
24
|
name: (0, unique_name_1.uniqueName)('Asset'),
|
|
25
25
|
originalPath: filePath,
|
|
26
|
+
code: snippet.content,
|
|
26
27
|
output: snippet.content,
|
|
27
28
|
type: snippet.type === 'styles'
|
|
28
29
|
? ['CSS', 'SCSS', 'SASS', 'LESS'].includes(codeType)
|
|
@@ -37,6 +38,7 @@ function buildAssets(filePath, styleType) {
|
|
|
37
38
|
title: codeType,
|
|
38
39
|
name: (0, unique_name_1.uniqueName)('Asset'),
|
|
39
40
|
originalPath: filePath,
|
|
41
|
+
code: fileContent,
|
|
40
42
|
output: fileContent,
|
|
41
43
|
type: codeType,
|
|
42
44
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-assets.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/build-assets.ts"],"names":[],"mappings":";;;;AACA,+CAAyB;AAIzB,6DAAqD;AACrD,yDAAmD;AACnD,+CAAyC;AAEzC;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,QAAgB,EAAE,SAAyB;IACtE,IAAI;QACH,MAAM,WAAW,GAAW,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;QACrE,MAAM,QAAQ,GAAmB,IAAA,kCAAe,EAAC,WAAW,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAkB,IAAA,oCAAe,EAAC,QAAQ,CAAC,CAAC;QAE1D,IAAI,QAAQ,CAAC,MAAM,EAAE;YACpB,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAqB,EAAE,EAAE,CAAC,CAAC;gBAC/C,KAAK,EAAE,OAAO,CAAC,IAAI;gBACnB,IAAI,EAAE,IAAA,wBAAU,EAAC,OAAO,CAAC;gBACzB,YAAY,EAAE,QAAQ;gBACtB,MAAM,EAAE,OAAO,CAAC,OAAO;gBACvB,IAAI,EACH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YAAY,EAAE,QAAQ;gBACtB,IAAI,EAAE,OAAO,CAAC,OAAO;gBACrB,MAAM,EAAE,OAAO,CAAC,OAAO;gBACvB,IAAI,EACH,OAAO,CAAC,IAAI,KAAK,QAAQ;oBACxB,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;wBACnD,CAAC,CAAC,QAAQ;wBACV,CAAC,CAAC,SAAS;oBACZ,CAAC,CAAC,OAAO,CAAC,IAAI;aAChB,CAAC,CAAC,CAAC;SACJ;aAAM;YACN,OAAO;gBACN;oBACC,KAAK,EAAE,QAAQ;oBACf,IAAI,EAAE,IAAA,wBAAU,EAAC,OAAO,CAAC;oBACzB,YAAY,EAAE,QAAQ;oBACtB,IAAI,EAAE,WAAW;oBACjB,MAAM,EAAE,WAAW;oBACnB,IAAI,EAAE,QAAQ;iBACd;aACD,CAAC;SACF;KACD;IAAC,OAAO,CAAC,EAAE;QACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACjB;IACD,OAAO,EAAE,CAAC;AACX,CAAC;AApCD,kCAoCC"}
|
package/helpers/format-code.js
CHANGED
|
@@ -10,7 +10,8 @@ exports.formatCode = void 0;
|
|
|
10
10
|
*/
|
|
11
11
|
function formatCode(code, codeType) {
|
|
12
12
|
try {
|
|
13
|
-
|
|
13
|
+
const parser = getPrettierParserFromCodeType(codeType);
|
|
14
|
+
return require('prettier').format(code, parser ? { parser } : {});
|
|
14
15
|
}
|
|
15
16
|
catch (e) {
|
|
16
17
|
return code;
|
|
@@ -25,17 +26,13 @@ exports.formatCode = formatCode;
|
|
|
25
26
|
*/
|
|
26
27
|
function getPrettierParserFromCodeType(codeType) {
|
|
27
28
|
switch (codeType) {
|
|
28
|
-
case 'TypeScript':
|
|
29
|
-
return 'typescript';
|
|
30
|
-
case 'HTML':
|
|
31
|
-
return 'html';
|
|
32
29
|
case 'CSS':
|
|
33
30
|
case 'LESS':
|
|
34
31
|
case 'SCSS':
|
|
35
32
|
case 'SASS':
|
|
36
33
|
return 'css';
|
|
37
34
|
default:
|
|
38
|
-
return
|
|
35
|
+
return codeType.toLowerCase();
|
|
39
36
|
}
|
|
40
37
|
}
|
|
41
38
|
//# sourceMappingURL=format-code.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-code.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/format-code.ts"],"names":[],"mappings":";;;AAGA;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAY,EAAE,QAAuB;IAC/D,IAAI;QACH,OAAO,OAAO,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"format-code.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/format-code.ts"],"names":[],"mappings":";;;AAGA;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAY,EAAE,QAAuB;IAC/D,IAAI;QACH,MAAM,MAAM,GAAkC,6BAA6B,CAAC,QAAQ,CAAC,CAAC;QAEtF,OAAO,OAAO,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,EAAC,MAAM,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;KAChE;IAAC,OAAO,CAAC,EAAE;QACX,OAAO,IAAI,CAAC;KACZ;AACF,CAAC;AARD,gCAQC;AAED;;;;;GAKG;AACH,SAAS,6BAA6B,CAAC,QAAuB;IAC7D,QAAQ,QAAQ,EAAE;QACjB,KAAK,KAAK,CAAC;QACX,KAAK,MAAM,CAAC;QACZ,KAAK,MAAM,CAAC;QACZ,KAAK,MAAM;YACV,OAAO,KAAK,CAAC;QACd;YACC,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;KAC/B;AACF,CAAC"}
|
package/helpers/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from './get-entity-constructor';
|
|
|
15
15
|
export * from './is-not-excluded-path';
|
|
16
16
|
export * from './is-supported-declaration';
|
|
17
17
|
export * from './marked';
|
|
18
|
+
export * from './no-empty';
|
|
18
19
|
export * from './no-line-breaks';
|
|
19
20
|
export * from './not-empty-assets';
|
|
20
21
|
export * from './presentation';
|
package/helpers/index.js
CHANGED
|
@@ -18,6 +18,7 @@ tslib_1.__exportStar(require("./get-entity-constructor"), exports);
|
|
|
18
18
|
tslib_1.__exportStar(require("./is-not-excluded-path"), exports);
|
|
19
19
|
tslib_1.__exportStar(require("./is-supported-declaration"), exports);
|
|
20
20
|
tslib_1.__exportStar(require("./marked"), exports);
|
|
21
|
+
tslib_1.__exportStar(require("./no-empty"), exports);
|
|
21
22
|
tslib_1.__exportStar(require("./no-line-breaks"), exports);
|
|
22
23
|
tslib_1.__exportStar(require("./not-empty-assets"), exports);
|
|
23
24
|
tslib_1.__exportStar(require("./presentation"), exports);
|
package/helpers/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,+DAAqC;AACrC,mEAAyC;AACzC,oEAA0C;AAC1C,sEAA4C;AAC5C,8DAAoC;AACpC,wDAA8B;AAC9B,yDAA+B;AAC/B,gEAAsC;AACtC,8DAAoC;AACpC,8DAAoC;AACpC,wDAA8B;AAC9B,kEAAwC;AACxC,mEAAyC;AACzC,iEAAuC;AACvC,qEAA2C;AAC3C,mDAAyB;AACzB,2DAAiC;AACjC,6DAAmC;AACnC,yDAA+B;AAC/B,0DAAgC;AAChC,6DAAmC;AACnC,kDAAwB;AACxB,uDAA6B;AAC7B,wDAA8B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,+DAAqC;AACrC,mEAAyC;AACzC,oEAA0C;AAC1C,sEAA4C;AAC5C,8DAAoC;AACpC,wDAA8B;AAC9B,yDAA+B;AAC/B,gEAAsC;AACtC,8DAAoC;AACpC,8DAAoC;AACpC,wDAA8B;AAC9B,kEAAwC;AACxC,mEAAyC;AACzC,iEAAuC;AACvC,qEAA2C;AAC3C,mDAAyB;AACzB,qDAA2B;AAC3B,2DAAiC;AACjC,6DAAmC;AACnC,yDAA+B;AAC/B,0DAAgC;AAChC,6DAAmC;AACnC,kDAAwB;AACxB,uDAA6B;AAC7B,wDAA8B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.noEmpty = void 0;
|
|
4
|
+
const core_1 = require("@ng-doc/core");
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param arr
|
|
8
|
+
*/
|
|
9
|
+
function noEmpty(arr) {
|
|
10
|
+
return arr.filter(core_1.isPresent);
|
|
11
|
+
}
|
|
12
|
+
exports.noEmpty = noEmpty;
|
|
13
|
+
//# sourceMappingURL=no-empty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-empty.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/no-empty.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AAEvC;;;GAGG;AACH,SAAgB,OAAO,CAAI,GAAQ;IAClC,OAAO,GAAG,CAAC,MAAM,CAAC,gBAAS,CAAC,CAAC;AAC9B,CAAC;AAFD,0BAEC"}
|
|
@@ -6,7 +6,7 @@ exports.notEmptyAssets = void 0;
|
|
|
6
6
|
* @param assets
|
|
7
7
|
*/
|
|
8
8
|
function notEmptyAssets(assets) {
|
|
9
|
-
return assets.filter((assets) => !!assets.
|
|
9
|
+
return assets.filter((assets) => !!assets.code.trim());
|
|
10
10
|
}
|
|
11
11
|
exports.notEmptyAssets = notEmptyAssets;
|
|
12
12
|
//# sourceMappingURL=not-empty-assets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not-empty-assets.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/not-empty-assets.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,SAAgB,cAAc,CAAC,MAAoB;IAClD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,MAAkB,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"not-empty-assets.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/not-empty-assets.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,SAAgB,cAAc,CAAC,MAAoB;IAClD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,MAAkB,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;AACpE,CAAC;AAFD,wCAEC"}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
import { MethodDeclaration, TypeAliasDeclaration, VariableDeclaration } from 'ts-morph';
|
|
1
|
+
import { ConstructorDeclaration, FunctionDeclaration, MethodDeclaration, TypeAliasDeclaration, VariableDeclaration } from 'ts-morph';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param constructor
|
|
5
|
+
*/
|
|
6
|
+
export declare function constructorPresentation(constructor: ConstructorDeclaration): string;
|
|
2
7
|
/**
|
|
3
8
|
*
|
|
4
9
|
* @param method
|
|
5
10
|
*/
|
|
6
11
|
export declare function methodPresentation(method: MethodDeclaration): string;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @param fnc
|
|
15
|
+
*/
|
|
16
|
+
export declare function functionPresentation(fnc: FunctionDeclaration): string;
|
|
7
17
|
/**
|
|
8
18
|
*
|
|
9
19
|
* @param typeAlias
|