@ng-doc/builder 15.0.0-beta.28 → 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/apps/ng-doc/src/app/docs/content/guidelines/demo/demos/button-demo/button-demo.component.js +0 -1
- package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/demo/demos/button-inline-demo/button-inline-demo.component.js +0 -1
- package/engine/.cache/libs/app/classes/search-engine/search-engine.js +0 -1
- package/engine/.cache/libs/app/components/api-list/api-list.component.js +0 -9
- package/engine/.cache/libs/app/components/code/code.component.js +3 -8
- package/engine/.cache/libs/app/components/demo/demo.component.js +2 -5
- package/engine/.cache/libs/app/components/demo-displayer/demo-displayer.component.js +6 -8
- package/engine/.cache/libs/app/components/kind-icon/kind-icon.component.js +4 -2
- package/engine/.cache/libs/app/components/link/link.component.js +3 -1
- package/engine/.cache/libs/app/components/navbar/navbar.component.js +5 -9
- package/engine/.cache/libs/app/components/page/page.component.js +0 -1
- package/engine/.cache/libs/app/components/page-map/page-map-element/page-map-element.component.js +3 -4
- package/engine/.cache/libs/app/components/page-map/page-map.component.js +2 -9
- package/engine/.cache/libs/app/components/playground/playground.component.js +2 -7
- package/engine/.cache/libs/app/components/playground-demo/playground-demo.component.js +5 -14
- package/engine/.cache/libs/app/components/playground-properties/playground-properties.component.js +5 -6
- package/engine/.cache/libs/app/components/playground-property/playground-property.component.js +1 -7
- package/engine/.cache/libs/app/components/root/root.component.js +0 -7
- package/engine/.cache/libs/app/components/search/search.component.js +4 -6
- package/engine/.cache/libs/app/components/search-result/search-result.component.js +4 -2
- package/engine/.cache/libs/app/components/sidebar/sidebar-category/sidebar-category.component.js +4 -7
- package/engine/.cache/libs/app/components/sidebar/sidebar-item/sidebar-item.component.js +0 -1
- package/engine/.cache/libs/app/components/sidebar/sidebar.component.js +0 -1
- package/engine/.cache/libs/app/components/theme-toggle/theme-toggle.component.js +1 -2
- package/engine/.cache/libs/app/directives/code-highlighter/code-highlighter.directive.js +4 -5
- package/engine/.cache/libs/app/directives/route-active/route-active.directive.js +8 -12
- package/engine/.cache/libs/app/pipes/sanitize-html/sanitize-html.pipe.js +0 -1
- package/engine/.cache/libs/app/processors/blockquote-processor/blockquote-processor.directive.js +0 -2
- package/engine/.cache/libs/app/processors/code-processor/code-processor.directive.js +0 -2
- package/engine/.cache/libs/app/processors/demo-processor/demo-processor.directive.js +0 -2
- package/engine/.cache/libs/app/processors/html-processor/html-processor.directive.js +0 -4
- package/engine/.cache/libs/app/processors/icon-processor/icon-processor.directive.js +0 -2
- package/engine/.cache/libs/app/processors/playground-processor/playground-processor.directive.js +0 -2
- package/engine/.cache/libs/app/processors/tooltip-processor/tooltip-processor.directive.js +0 -2
- package/engine/.cache/libs/app/processors/tooltip-processor/tooltip-wrapper.component.js +0 -1
- package/engine/.cache/libs/app/services/sidebar/sidebar.service.js +2 -5
- package/engine/.cache/libs/app/services/theme/theme.service.js +1 -5
- package/engine/.cache/libs/app/type-controls/boolean-control/boolean-control.component.js +2 -2
- package/engine/.cache/libs/app/type-controls/number-control/number-control.component.js +0 -1
- package/engine/.cache/libs/app/type-controls/string-control/string-control.component.js +0 -1
- package/engine/.cache/libs/app/type-controls/type-alias-control/type-alias-control.component.js +0 -2
- package/engine/.cache/libs/builder/classes/observable-set.js +4 -2
- package/engine/.cache/libs/builder/engine/actions.js +0 -1
- package/engine/.cache/libs/builder/engine/builder.js +2 -5
- package/engine/.cache/libs/builder/engine/entities/abstractions/entity.js +23 -25
- package/engine/.cache/libs/builder/engine/entities/abstractions/file.entity.js +0 -4
- package/engine/.cache/libs/builder/engine/entities/abstractions/navigation.entity.js +7 -4
- package/engine/.cache/libs/builder/engine/entities/abstractions/route.entity.js +8 -5
- package/engine/.cache/libs/builder/engine/entities/abstractions/source-file.entity.js +4 -7
- package/engine/.cache/libs/builder/engine/entities/api-page.entity.js +7 -13
- package/engine/.cache/libs/builder/engine/entities/api-scope.entity.js +6 -11
- package/engine/.cache/libs/builder/engine/entities/api.entity.js +6 -4
- package/engine/.cache/libs/builder/engine/entities/category.entity.js +5 -3
- package/engine/.cache/libs/builder/engine/entities/dependencies.entity.js +4 -1
- package/engine/.cache/libs/builder/engine/entities/page.entity.js +6 -4
- package/engine/.cache/libs/builder/engine/entities/playground.entity.js +5 -2
- package/engine/.cache/libs/builder/engine/entities/skeleton.entity.js +8 -5
- package/engine/.cache/libs/builder/engine/entity-store.js +4 -1
- package/engine/.cache/libs/builder/engine/renderer.js +0 -5
- package/engine/.cache/libs/builder/engine/template-filters.js +15 -1
- package/engine/.cache/libs/builder/engine/watcher.js +4 -5
- package/engine/.cache/libs/builder/helpers/format-code.js +3 -6
- package/engine/.cache/libs/builder/helpers/presentation.js +76 -4
- 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/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/ui-kit/cdk/combobox-host/combobox-host.component.js +3 -8
- package/engine/.cache/libs/ui-kit/classes/base-input/base-input.js +0 -3
- package/engine/.cache/libs/ui-kit/classes/overlay-ref/overlay-ref.js +2 -8
- package/engine/.cache/libs/ui-kit/components/blockquote/blockquote.component.js +3 -1
- package/engine/.cache/libs/ui-kit/components/button/button.component.js +4 -2
- package/engine/.cache/libs/ui-kit/components/button-icon/button-icon.component.js +5 -3
- package/engine/.cache/libs/ui-kit/components/checkbox/checkbox.component.js +1 -3
- package/engine/.cache/libs/ui-kit/components/clear-control/clear-control.component.js +0 -3
- package/engine/.cache/libs/ui-kit/components/combobox/combobox.component.js +6 -7
- package/engine/.cache/libs/ui-kit/components/dot/dot.component.js +0 -2
- package/engine/.cache/libs/ui-kit/components/dropdown/dropdown.component.js +26 -32
- package/engine/.cache/libs/ui-kit/components/expander/expander.component.js +8 -7
- package/engine/.cache/libs/ui-kit/components/floated-content/floated-content.component.js +2 -6
- package/engine/.cache/libs/ui-kit/components/focus-control/focus-control.component.js +1 -2
- package/engine/.cache/libs/ui-kit/components/icon/icon.component.js +5 -8
- package/engine/.cache/libs/ui-kit/components/input-wrapper/input-wrapper.component.js +5 -11
- package/engine/.cache/libs/ui-kit/components/label/label.component.js +5 -3
- package/engine/.cache/libs/ui-kit/components/list/list.component.js +2 -6
- package/engine/.cache/libs/ui-kit/components/option/option.component.js +1 -5
- package/engine/.cache/libs/ui-kit/components/overlay-container/overlay-container.component.js +4 -14
- package/engine/.cache/libs/ui-kit/components/overlay-pointer/overlay-pointer.component.js +5 -3
- package/engine/.cache/libs/ui-kit/components/selection/selection-host.directive.js +4 -3
- package/engine/.cache/libs/ui-kit/components/selection/selection-origin.directive.js +1 -3
- package/engine/.cache/libs/ui-kit/components/selection/selection.component.js +1 -3
- package/engine/.cache/libs/ui-kit/components/tab-group/tab/tab.component.js +6 -4
- package/engine/.cache/libs/ui-kit/components/tab-group/tab-group.component.js +2 -5
- package/engine/.cache/libs/ui-kit/components/tag/tag.component.js +4 -2
- package/engine/.cache/libs/ui-kit/components/text/text.component.js +7 -10
- package/engine/.cache/libs/ui-kit/components/toggle/toggle.component.js +2 -8
- package/engine/.cache/libs/ui-kit/directives/autofocus/autofocus.directive.js +0 -1
- package/engine/.cache/libs/ui-kit/directives/checked-change/checked-change.directive.js +5 -7
- package/engine/.cache/libs/ui-kit/directives/data/data.directive.js +0 -2
- package/engine/.cache/libs/ui-kit/directives/dropdown-handler/dropdown-handler.directive.js +0 -1
- package/engine/.cache/libs/ui-kit/directives/dropdown-origin/dropdown-origin.directive.js +0 -1
- package/engine/.cache/libs/ui-kit/directives/event-switcher/event-switcher.directive.js +2 -4
- package/engine/.cache/libs/ui-kit/directives/focus-catcher/focus-catcher.directive.js +3 -6
- package/engine/.cache/libs/ui-kit/directives/focusable/focusable.directive.js +3 -1
- package/engine/.cache/libs/ui-kit/directives/input-number/input-number.directive.js +0 -3
- package/engine/.cache/libs/ui-kit/directives/input-string/input-string.directive.js +0 -3
- package/engine/.cache/libs/ui-kit/directives/let/let-context.js +0 -1
- package/engine/.cache/libs/ui-kit/directives/let/let.directive.js +0 -3
- package/engine/.cache/libs/ui-kit/directives/media-query/media-query.directive.js +3 -7
- package/engine/.cache/libs/ui-kit/directives/rotator/rotator.directive.js +6 -8
- package/engine/.cache/libs/ui-kit/directives/tooltip/tooltip.directive.js +21 -29
- package/engine/.cache/libs/ui-kit/interceptors/cache.interceptor.js +4 -2
- package/engine/.cache/libs/ui-kit/observables/zone.js +0 -1
- package/engine/.cache/libs/ui-kit/services/notify/notify.service.js +1 -3
- package/engine/.cache/libs/ui-kit/services/overlay/overlay.service.js +0 -4
- package/engine/.cache/libs/ui-kit/services/overlay-strategy/overlay-strategy.js +2 -4
- package/engine/.cache/libs/ui-kit/types/content.js +0 -2
- package/engine/entities/api-page.entity.d.ts +1 -1
- package/engine/template-filters.d.ts +1 -1
- package/engine/template-filters.js +15 -1
- package/engine/template-filters.js.map +1 -1
- package/helpers/format-code.js +3 -6
- package/helpers/format-code.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/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/helpers/constructor.html.nunj +34 -0
- package/templates/helpers/declaration-modifiers.html.nunj +4 -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
|
@@ -12,10 +12,6 @@ const utils_1 = require("@ng-doc/ui-kit/utils");
|
|
|
12
12
|
const ng_polymorpheus_1 = require("@tinkoff/ng-polymorpheus");
|
|
13
13
|
const operators_1 = require("rxjs/operators");
|
|
14
14
|
let NgDocOverlayService = class NgDocOverlayService {
|
|
15
|
-
overlay;
|
|
16
|
-
ngZone;
|
|
17
|
-
injector;
|
|
18
|
-
router;
|
|
19
15
|
constructor(overlay, ngZone, injector, router) {
|
|
20
16
|
this.overlay = overlay;
|
|
21
17
|
this.ngZone = ngZone;
|
|
@@ -9,13 +9,11 @@ const observables_1 = require("@ng-doc/ui-kit/observables");
|
|
|
9
9
|
const rxjs_1 = require("rxjs");
|
|
10
10
|
const operators_1 = require("rxjs/operators");
|
|
11
11
|
let NgDocOverlayStrategy = class NgDocOverlayStrategy {
|
|
12
|
-
documentRef;
|
|
13
|
-
ngZone;
|
|
14
|
-
overlayRef = null;
|
|
15
|
-
destroy$ = new rxjs_1.Subject();
|
|
16
12
|
constructor(documentRef, ngZone) {
|
|
17
13
|
this.documentRef = documentRef;
|
|
18
14
|
this.ngZone = ngZone;
|
|
15
|
+
this.overlayRef = null;
|
|
16
|
+
this.destroy$ = new rxjs_1.Subject();
|
|
19
17
|
}
|
|
20
18
|
attach(overlayRef) {
|
|
21
19
|
this.overlayRef = overlayRef;
|
|
@@ -6,8 +6,6 @@ const tokens_1 = require("@ng-doc/ui-kit/tokens");
|
|
|
6
6
|
const ng_polymorpheus_1 = require("@tinkoff/ng-polymorpheus");
|
|
7
7
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
8
8
|
class NgDocComponentContent extends ng_polymorpheus_1.PolymorpheusComponent {
|
|
9
|
-
component;
|
|
10
|
-
injectorRef;
|
|
11
9
|
constructor(component, injectorRef) {
|
|
12
10
|
super(component);
|
|
13
11
|
this.component = component;
|
|
@@ -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[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { displayType, extractDocs, extractParameterDocs, extractSeeDocs, extractSelectors, filterByScope, filterByStatic, marked, methodPresentation, noEmpty, 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.noEmpty = 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,11 +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; } });
|
|
15
28
|
Object.defineProperty(exports, "noEmpty", { enumerable: true, get: function () { return helpers_1.noEmpty; } });
|
|
16
29
|
Object.defineProperty(exports, "noLineBreaks", { enumerable: true, get: function () { return helpers_1.noLineBreaks; } });
|
|
17
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; } });
|
|
18
32
|
Object.defineProperty(exports, "typeAliasPresentation", { enumerable: true, get: function () { return helpers_1.typeAliasPresentation; } });
|
|
19
33
|
Object.defineProperty(exports, "variablePresentation", { enumerable: true, get: function () { return helpers_1.variablePresentation; } });
|
|
20
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/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"}
|
|
@@ -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
|
package/helpers/presentation.js
CHANGED
|
@@ -1,16 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.variablePresentation = exports.typeAliasPresentation = exports.methodPresentation = void 0;
|
|
3
|
+
exports.variablePresentation = exports.typeAliasPresentation = exports.functionPresentation = exports.methodPresentation = exports.constructorPresentation = void 0;
|
|
4
|
+
const core_1 = require("@ng-doc/core");
|
|
5
|
+
const ts_morph_1 = require("ts-morph");
|
|
6
|
+
const format_code_1 = require("./format-code");
|
|
4
7
|
const typescript_1 = require("./typescript");
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param constructor
|
|
11
|
+
*/
|
|
12
|
+
function constructorPresentation(constructor) {
|
|
13
|
+
const parameters = constructor.getParameters().map(parameterPresentation).join(', \n ');
|
|
14
|
+
const presentation = [
|
|
15
|
+
scopePresentation(constructor),
|
|
16
|
+
`constructor(\n ${parameters}\n):`,
|
|
17
|
+
(0, typescript_1.displayType)(constructor.getReturnType()),
|
|
18
|
+
]
|
|
19
|
+
.filter(core_1.isPresent)
|
|
20
|
+
.join(' ');
|
|
21
|
+
return (0, format_code_1.formatCode)(presentation, 'TypeScript');
|
|
22
|
+
}
|
|
23
|
+
exports.constructorPresentation = constructorPresentation;
|
|
5
24
|
/**
|
|
6
25
|
*
|
|
7
26
|
* @param method
|
|
8
27
|
*/
|
|
9
28
|
function methodPresentation(method) {
|
|
10
29
|
const parameters = method.getParameters().map(parameterPresentation).join(', ');
|
|
11
|
-
return
|
|
30
|
+
return [scopePresentation(method), `${method.getName()}(${parameters}):`, `${(0, typescript_1.displayType)(method.getReturnType())};`]
|
|
31
|
+
.filter(core_1.isPresent)
|
|
32
|
+
.join(' ');
|
|
12
33
|
}
|
|
13
34
|
exports.methodPresentation = methodPresentation;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @param fnc
|
|
38
|
+
*/
|
|
39
|
+
function functionPresentation(fnc) {
|
|
40
|
+
const parameters = fnc.getParameters().map(parameterPresentation).join(', ');
|
|
41
|
+
return ['function', `${fnc.getName()}(${parameters}):`, `${(0, typescript_1.displayType)(fnc.getReturnType())};`]
|
|
42
|
+
.filter(core_1.isPresent)
|
|
43
|
+
.join(' ');
|
|
44
|
+
}
|
|
45
|
+
exports.functionPresentation = functionPresentation;
|
|
14
46
|
/**
|
|
15
47
|
*
|
|
16
48
|
* @param typeAlias
|
|
@@ -25,7 +57,13 @@ exports.typeAliasPresentation = typeAliasPresentation;
|
|
|
25
57
|
*/
|
|
26
58
|
function variablePresentation(variable) {
|
|
27
59
|
var _a, _b;
|
|
28
|
-
return
|
|
60
|
+
return [
|
|
61
|
+
(_b = (_a = variable.getVariableStatement()) === null || _a === void 0 ? void 0 : _a.getDeclarationKind()) !== null && _b !== void 0 ? _b : 'const',
|
|
62
|
+
`${variable.getName()}:`,
|
|
63
|
+
`${(0, typescript_1.displayType)(variable.getType())};`,
|
|
64
|
+
]
|
|
65
|
+
.filter(core_1.isPresent)
|
|
66
|
+
.join(' ');
|
|
29
67
|
}
|
|
30
68
|
exports.variablePresentation = variablePresentation;
|
|
31
69
|
/**
|
|
@@ -33,6 +71,41 @@ exports.variablePresentation = variablePresentation;
|
|
|
33
71
|
* @param parameter
|
|
34
72
|
*/
|
|
35
73
|
function parameterPresentation(parameter) {
|
|
36
|
-
return
|
|
74
|
+
return [
|
|
75
|
+
parameter.hasOverrideKeyword() ? 'override' : '',
|
|
76
|
+
decoratorsPresentation(parameter),
|
|
77
|
+
scopePresentation(parameter),
|
|
78
|
+
modPresentation(parameter),
|
|
79
|
+
parameter.getName() + (parameter.hasQuestionToken() ? '?' : '') + ':',
|
|
80
|
+
(0, typescript_1.displayType)(parameter.getType()),
|
|
81
|
+
parameter.getInitializer() ? `= ${parameter.getInitializer()}` : '',
|
|
82
|
+
]
|
|
83
|
+
.filter(core_1.isPresent)
|
|
84
|
+
.join(' ');
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @param node
|
|
89
|
+
*/
|
|
90
|
+
function scopePresentation(node) {
|
|
91
|
+
var _a, _b;
|
|
92
|
+
return (_b = (node.getScope && ((_a = node.getScope()) === null || _a === void 0 ? void 0 : _a.replace(ts_morph_1.Scope.Public, '')))) !== null && _b !== void 0 ? _b : '';
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @param node
|
|
97
|
+
*/
|
|
98
|
+
function modPresentation(node) {
|
|
99
|
+
return (node.isReadonly && node.isReadonly() && 'readonly') || '';
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @param node
|
|
104
|
+
*/
|
|
105
|
+
function decoratorsPresentation(node) {
|
|
106
|
+
return node
|
|
107
|
+
.getDecorators()
|
|
108
|
+
.map((d) => `@${d.getName()}()`)
|
|
109
|
+
.join(' ');
|
|
37
110
|
}
|
|
38
111
|
//# sourceMappingURL=presentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/presentation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"presentation.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/presentation.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findBaseClass = void 0;
|
|
4
|
+
const for_all_classes_1 = require("./for-all-classes");
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param cls
|
|
8
|
+
* @param condition
|
|
9
|
+
*/
|
|
10
|
+
function findBaseClass(cls, condition) {
|
|
11
|
+
let baseClass;
|
|
12
|
+
(0, for_all_classes_1.forAllClasses)(cls, (c) => {
|
|
13
|
+
if (c !== cls && condition(c)) {
|
|
14
|
+
baseClass = c;
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
});
|
|
19
|
+
return baseClass;
|
|
20
|
+
}
|
|
21
|
+
exports.findBaseClass = findBaseClass;
|
|
22
|
+
//# sourceMappingURL=find-base-class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-base-class.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/class/find-base-class.ts"],"names":[],"mappings":";;;AAEA,uDAAgD;AAEhD;;;;GAIG;AACH,SAAgB,aAAa,CAC5B,GAAqB,EACrB,SAA6C;IAE7C,IAAI,SAAuC,CAAC;IAE5C,IAAA,+BAAa,EAAC,GAAG,EAAE,CAAC,CAAmB,EAAE,EAAE;QAC1C,IAAI,CAAC,KAAK,GAAG,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE;YAC9B,SAAS,GAAG,CAAC,CAAC;YAEd,OAAO,IAAI,CAAC;SACZ;QAED,OAAO,KAAK,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AAClB,CAAC;AAjBD,sCAiBC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findClass = void 0;
|
|
4
|
+
const for_all_classes_1 = require("./for-all-classes");
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param cls
|
|
8
|
+
* @param condition
|
|
9
|
+
*/
|
|
10
|
+
function findClass(cls, condition) {
|
|
11
|
+
let baseClass;
|
|
12
|
+
(0, for_all_classes_1.forAllClasses)(cls, (c) => {
|
|
13
|
+
if (condition(c)) {
|
|
14
|
+
baseClass = c;
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
});
|
|
19
|
+
return baseClass;
|
|
20
|
+
}
|
|
21
|
+
exports.findClass = findClass;
|
|
22
|
+
//# sourceMappingURL=find-class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-class.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/class/find-class.ts"],"names":[],"mappings":";;;AAGA,uDAAgD;AAEhD;;;;GAIG;AACH,SAAgB,SAAS,CACxB,GAAqB,EACrB,SAA2C;IAE3C,IAAI,SAAuC,CAAC;IAE5C,IAAA,+BAAa,EAAC,GAAG,EAAE,CAAC,CAAmB,EAAE,EAAE;QAC1C,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE;YACjB,SAAS,GAAG,CAAC,CAAC;YAEd,OAAO,IAAI,CAAC;SACZ;QAED,OAAO,KAAK,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AAClB,CAAC;AAjBD,8BAiBC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.forAllClasses = void 0;
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param cls
|
|
7
|
+
* @param fn
|
|
8
|
+
*/
|
|
9
|
+
function forAllClasses(cls, fn) {
|
|
10
|
+
let baseClass = cls;
|
|
11
|
+
while (baseClass && !fn(baseClass)) {
|
|
12
|
+
baseClass = baseClass.getBaseClass();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.forAllClasses = forAllClasses;
|
|
16
|
+
//# sourceMappingURL=for-all-classes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"for-all-classes.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/class/for-all-classes.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACH,SAAgB,aAAa,CAAC,GAAqB,EAAE,EAA2C;IAC/F,IAAI,SAAS,GAAiC,GAAG,CAAC;IAElD,OAAO,SAAS,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE;QACnC,SAAS,GAAG,SAAS,CAAC,YAAY,EAAE,CAAC;KACrC;AACF,CAAC;AAND,sCAMC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./find-base-class"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./find-class"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./for-all-classes"), exports);
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/class/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,uDAA6B;AAC7B,4DAAkC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.firstNodeWithComment = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Returns first node that has JSDoc comment, will return first node, if there are no comment nodes
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* @param nodes
|
|
9
|
+
*/
|
|
10
|
+
function firstNodeWithComment(nodes) {
|
|
11
|
+
var _a;
|
|
12
|
+
return (_a = nodes.find((n) => n.getJsDocs().length)) !== null && _a !== void 0 ? _a : nodes[0];
|
|
13
|
+
}
|
|
14
|
+
exports.firstNodeWithComment = firstNodeWithComment;
|
|
15
|
+
//# sourceMappingURL=first-node-with-comment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"first-node-with-comment.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/typescript/first-node-with-comment.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACH,SAAgB,oBAAoB,CAAC,KAAsB;;IAC1D,OAAO,MAAA,KAAK,CAAC,IAAI,CAAC,CAAC,CAAgB,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,mCAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAC3E,CAAC;AAFD,oDAEC"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
export * from './class';
|
|
1
2
|
export * from './create-project';
|
|
2
3
|
export * from './display-type';
|
|
3
4
|
export * from './filter-by-scope';
|
|
4
5
|
export * from './filter-by-static';
|
|
5
6
|
export * from './find-declaration';
|
|
7
|
+
export * from './first-node-with-comment';
|
|
8
|
+
export * from './interface';
|
|
9
|
+
export * from './method';
|
|
10
|
+
export * from './node';
|
|
11
|
+
export * from './property';
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./class"), exports);
|
|
4
5
|
tslib_1.__exportStar(require("./create-project"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./display-type"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./filter-by-scope"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./filter-by-static"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./find-declaration"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./first-node-with-comment"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./interface"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./method"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./node"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./property"), exports);
|
|
9
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/typescript/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,yDAA+B;AAC/B,4DAAkC;AAClC,6DAAmC;AACnC,6DAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/typescript/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,2DAAiC;AACjC,yDAA+B;AAC/B,4DAAkC;AAClC,6DAAmC;AACnC,6DAAmC;AACnC,oEAA0C;AAC1C,sDAA4B;AAC5B,mDAAyB;AACzB,iDAAuB;AACvB,qDAA2B"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findInterface = void 0;
|
|
4
|
+
const ts_morph_1 = require("ts-morph");
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param int
|
|
8
|
+
* @param fn
|
|
9
|
+
*/
|
|
10
|
+
function findInterface(int, fn) {
|
|
11
|
+
const baseInterface = int;
|
|
12
|
+
if (fn(baseInterface)) {
|
|
13
|
+
return baseInterface;
|
|
14
|
+
}
|
|
15
|
+
const ext = baseInterface
|
|
16
|
+
.getExtends()
|
|
17
|
+
.map((expr) => { var _a; return (_a = expr.getType().getSymbol()) === null || _a === void 0 ? void 0 : _a.getDeclarations()[0]; })
|
|
18
|
+
.filter((node) => ts_morph_1.Node.isInterfaceDeclaration(node))
|
|
19
|
+
// Reverse interfaces because the latest one overrides previous one
|
|
20
|
+
.reverse();
|
|
21
|
+
for (const i of ext) {
|
|
22
|
+
const deepResult = findInterface(i, fn);
|
|
23
|
+
if (deepResult) {
|
|
24
|
+
return i;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
exports.findInterface = findInterface;
|
|
30
|
+
//# sourceMappingURL=find-interface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-interface.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/interface/find-interface.ts"],"names":[],"mappings":";;;AAAA,uCAAiF;AAEjF;;;;GAIG;AACH,SAAgB,aAAa,CAC5B,GAAyB,EACzB,EAAwC;IAExC,MAAM,aAAa,GAAqC,GAAG,CAAC;IAE5D,IAAI,EAAE,CAAC,aAAa,CAAC,EAAE;QACtB,OAAO,aAAa,CAAC;KACrB;IAED,MAAM,GAAG,GAA2B,aAAa;SAC/C,UAAU,EAAE;SACZ,GAAG,CAAC,CAAC,IAAiC,EAAE,EAAE,WAAC,OAAA,MAAA,IAAI,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,0CAAE,eAAe,GAAG,CAAC,CAAC,CAAA,EAAA,CAAC;SAC5F,MAAM,CAAC,CAAC,IAAsB,EAAE,EAAE,CAAC,eAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC;QACtE,mEAAmE;SAClE,OAAO,EAA4B,CAAC;IAEtC,KAAK,MAAM,CAAC,IAAI,GAAG,EAAE;QACpB,MAAM,UAAU,GAAqC,aAAa,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAE1E,IAAI,UAAU,EAAE;YACf,OAAO,CAAC,CAAC;SACT;KACD;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AA1BD,sCA0BC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.forAllInterfaces = void 0;
|
|
4
|
+
const ts_morph_1 = require("ts-morph");
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param int
|
|
8
|
+
* @param fn
|
|
9
|
+
*/
|
|
10
|
+
function forAllInterfaces(int, fn) {
|
|
11
|
+
const baseInterface = int;
|
|
12
|
+
if (!fn(baseInterface)) {
|
|
13
|
+
baseInterface
|
|
14
|
+
.getExtends()
|
|
15
|
+
.map((expr) => { var _a; return (_a = expr.getType().getSymbol()) === null || _a === void 0 ? void 0 : _a.getDeclarations()[0]; })
|
|
16
|
+
.reverse()
|
|
17
|
+
.forEach((node) => ts_morph_1.Node.isInterfaceDeclaration(node) && forAllInterfaces(node, fn));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.forAllInterfaces = forAllInterfaces;
|
|
21
|
+
//# sourceMappingURL=for-all-interfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"for-all-interfaces.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/interface/for-all-interfaces.ts"],"names":[],"mappings":";;;AAAA,uCAAiF;AAEjF;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,GAAyB,EAAE,EAA+C;IAC1G,MAAM,aAAa,GAAqC,GAAG,CAAC;IAE5D,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,EAAE;QACvB,aAAa;aACX,UAAU,EAAE;aACZ,GAAG,CAAC,CAAC,IAAiC,EAAE,EAAE,WAAC,OAAA,MAAA,IAAI,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,0CAAE,eAAe,GAAG,CAAC,CAAC,CAAA,EAAA,CAAC;aAC5F,OAAO,EAAE;aACT,OAAO,CAAC,CAAC,IAAsB,EAAE,EAAE,CAAC,eAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;KACvG;AACF,CAAC;AAVD,4CAUC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./find-interface"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./for-all-interfaces"), exports);
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/interface/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,+DAAqC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getClassMethods = void 0;
|
|
4
|
+
const core_1 = require("@ng-doc/core");
|
|
5
|
+
const class_1 = require("../class");
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param cls
|
|
9
|
+
*/
|
|
10
|
+
function getClassMethods(cls) {
|
|
11
|
+
const methods = new Map();
|
|
12
|
+
(0, class_1.forAllClasses)(cls, (baseClass) => {
|
|
13
|
+
baseClass.getMethods().forEach((method) => {
|
|
14
|
+
const name = method.getName();
|
|
15
|
+
if (!methods.get(name) && (!method.isAbstract() || (method.isAbstract() && cls === baseClass))) {
|
|
16
|
+
methods.set(name, method);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
return (0, core_1.asArray)(methods.values());
|
|
21
|
+
}
|
|
22
|
+
exports.getClassMethods = getClassMethods;
|
|
23
|
+
//# sourceMappingURL=get-class-methods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-class-methods.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/method/get-class-methods.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AAGrC,oCAAuC;AAEvC;;;GAGG;AACH,SAAgB,eAAe,CAAC,GAAqB;IACpD,MAAM,OAAO,GAAmC,IAAI,GAAG,EAA6B,CAAC;IAErF,IAAA,qBAAa,EAAC,GAAG,EAAE,CAAC,SAA2B,EAAE,EAAE;QAClD,SAAS,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,CAAC,MAAyB,EAAE,EAAE;YAC5D,MAAM,IAAI,GAAW,MAAM,CAAC,OAAO,EAAE,CAAC;YAEtC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,GAAG,KAAK,SAAS,CAAC,CAAC,EAAE;gBAC/F,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;aAC1B;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,IAAA,cAAO,EAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AAClC,CAAC;AAdD,0CAcC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MethodDeclaration, MethodSignature } from 'ts-morph';
|
|
2
|
+
/**
|
|
3
|
+
* Returns method that was implemented by the provided one
|
|
4
|
+
*
|
|
5
|
+
* @param method - Target method
|
|
6
|
+
*/
|
|
7
|
+
export declare function getImplementedMethod(method: MethodDeclaration | MethodSignature): MethodDeclaration | MethodSignature | undefined;
|