@ng-doc/builder 15.0.0-beta.29 → 15.0.0-beta.31
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 +1 -1
- package/engine/.cache/libs/app/components/index.js +1 -1
- package/engine/.cache/libs/app/components/page/page.module.js +2 -2
- package/engine/.cache/libs/app/components/root/root.component.js +29 -16
- package/engine/.cache/libs/app/components/toc/index.js +6 -0
- package/engine/.cache/libs/app/components/{page-map/page-map-element/page-map-element.component.js → toc/toc-element/toc-element.component.js} +11 -11
- package/engine/.cache/libs/app/components/{page-map/page-map.component.js → toc/toc.component.js} +34 -19
- package/engine/.cache/libs/app/components/{page-map/page-map.module.js → toc/toc.module.js} +5 -5
- package/engine/.cache/libs/app/helpers/{generate-page-map/generate-page-map.js → generate-toc/generate-toc.js} +4 -5
- package/engine/.cache/libs/app/helpers/{generate-page-map → generate-toc}/index.js +1 -1
- package/engine/.cache/libs/app/helpers/index.js +1 -1
- package/engine/.cache/libs/app/interfaces/index.js +1 -1
- package/engine/.cache/libs/app/interfaces/{page-map.js → toc-item.js} +0 -0
- package/engine/.cache/libs/app/processors/tooltip-processor/tooltip-wrapper.component.js +24 -2
- package/engine/.cache/libs/builder/engine/entities/api.entity.js +1 -2
- package/engine/.cache/libs/builder/engine/entity-store.js +1 -0
- package/engine/.cache/libs/builder/engine/post-processors/html-plugins/keywords-processor.js +4 -3
- package/engine/.cache/libs/builder/engine/template-filters.js +12 -7
- package/engine/.cache/libs/builder/helpers/build-global-indexes.js +6 -34
- package/engine/.cache/libs/builder/helpers/filter-useless-members.js +13 -0
- package/engine/.cache/libs/builder/helpers/get-declaration-type.js +17 -0
- package/engine/.cache/libs/builder/helpers/get-keyword-type-from-entity.js +20 -0
- package/engine/.cache/libs/builder/helpers/get-kind-type.js +21 -0
- package/engine/.cache/libs/builder/helpers/index.js +4 -0
- package/engine/.cache/libs/builder/helpers/presentation.js +15 -2
- package/engine/.cache/libs/builder/helpers/typescript/accessor/accessor.js +2 -0
- package/engine/.cache/libs/builder/helpers/typescript/accessor/get-accessor-chain.js +49 -0
- package/engine/.cache/libs/builder/helpers/typescript/accessor/get-class-accessors.js +30 -0
- package/engine/.cache/libs/builder/helpers/typescript/accessor/get-interface-accessors.js +35 -0
- package/engine/.cache/libs/builder/helpers/typescript/accessor/group-accessors.js +22 -0
- package/engine/.cache/libs/builder/helpers/typescript/accessor/index.js +8 -0
- package/engine/.cache/libs/builder/helpers/typescript/index.js +2 -0
- package/engine/.cache/libs/builder/helpers/typescript/interface/get-interface-member.js +17 -0
- package/engine/.cache/libs/builder/helpers/typescript/member/find-member.js +26 -0
- package/engine/.cache/libs/builder/helpers/typescript/member/get-implemented-member.js +47 -0
- package/engine/.cache/libs/builder/helpers/typescript/member/get-inherited-parent.js +18 -0
- package/engine/.cache/libs/builder/helpers/typescript/member/get-member-parent.js +13 -0
- package/engine/.cache/libs/builder/helpers/typescript/member/get-overridden-member.js +31 -0
- package/engine/.cache/libs/builder/helpers/typescript/member/index.js +9 -0
- package/engine/.cache/libs/builder/helpers/typescript/member/member-type.js +2 -0
- package/engine/.cache/libs/builder/helpers/typescript/method/get-method-chain.js +1 -0
- package/engine/.cache/libs/builder/helpers/typescript/method/index.js +0 -2
- package/engine/.cache/libs/builder/helpers/typescript/property/get-property-chain.js +1 -0
- package/engine/.cache/libs/builder/helpers/typescript/property/index.js +0 -2
- package/engine/.cache/libs/builder/types/index.js +1 -0
- package/engine/.cache/libs/builder/types/keyword-type.js +2 -0
- package/engine/.cache/libs/core/constants/angular-entities.js +4 -0
- package/engine/.cache/libs/core/constants/declarations.js +4 -0
- package/engine/.cache/libs/core/constants/index.js +2 -0
- package/engine/.cache/libs/core/helpers/index.js +0 -1
- package/engine/.cache/libs/core/types/entity-type.js +2 -0
- package/engine/.cache/libs/core/types/index.js +1 -0
- package/engine/.cache/libs/ui-kit/directives/input-string/input-string.directive.js +1 -1
- package/engine/entities/api.entity.js +3 -4
- package/engine/entities/api.entity.js.map +1 -1
- package/engine/entity-store.js +1 -0
- package/engine/entity-store.js.map +1 -1
- package/engine/post-processors/html-plugins/keywords-processor.js +4 -3
- package/engine/post-processors/html-plugins/keywords-processor.js.map +1 -1
- package/engine/template-filters.d.ts +1 -2
- package/engine/template-filters.js +12 -7
- package/engine/template-filters.js.map +1 -1
- package/helpers/build-global-indexes.js +6 -35
- package/helpers/build-global-indexes.js.map +1 -1
- package/helpers/filter-useless-members.d.ts +7 -0
- package/helpers/filter-useless-members.js +14 -0
- package/helpers/filter-useless-members.js.map +1 -0
- package/helpers/get-declaration-type.d.ts +7 -0
- package/helpers/get-declaration-type.js +18 -0
- package/helpers/get-declaration-type.js.map +1 -0
- package/helpers/get-keyword-type-from-entity.d.ts +7 -0
- package/helpers/get-keyword-type-from-entity.js +21 -0
- package/helpers/get-keyword-type-from-entity.js.map +1 -0
- package/helpers/get-kind-type.d.ts +7 -0
- package/helpers/get-kind-type.js +22 -0
- package/helpers/get-kind-type.js.map +1 -0
- package/helpers/index.d.ts +4 -0
- package/helpers/index.js +4 -0
- package/helpers/index.js.map +1 -1
- package/helpers/presentation.d.ts +6 -1
- package/helpers/presentation.js +15 -2
- package/helpers/presentation.js.map +1 -1
- package/helpers/typescript/accessor/accessor.d.ts +5 -0
- package/helpers/typescript/accessor/accessor.js +3 -0
- package/helpers/typescript/accessor/accessor.js.map +1 -0
- package/helpers/typescript/accessor/get-accessor-chain.d.ts +7 -0
- package/helpers/typescript/accessor/get-accessor-chain.js +50 -0
- package/helpers/typescript/accessor/get-accessor-chain.js.map +1 -0
- package/helpers/typescript/accessor/get-class-accessors.d.ts +6 -0
- package/helpers/typescript/accessor/get-class-accessors.js +31 -0
- package/helpers/typescript/accessor/get-class-accessors.js.map +1 -0
- package/helpers/typescript/accessor/get-interface-accessors.d.ts +6 -0
- package/helpers/typescript/accessor/get-interface-accessors.js +36 -0
- package/helpers/typescript/accessor/get-interface-accessors.js.map +1 -0
- package/helpers/typescript/accessor/group-accessors.d.ts +7 -0
- package/helpers/typescript/accessor/group-accessors.js +23 -0
- package/helpers/typescript/accessor/group-accessors.js.map +1 -0
- package/helpers/typescript/accessor/index.d.ts +5 -0
- package/helpers/typescript/accessor/index.js +9 -0
- package/helpers/typescript/accessor/index.js.map +1 -0
- package/helpers/typescript/index.d.ts +2 -0
- package/helpers/typescript/index.js +2 -0
- package/helpers/typescript/index.js.map +1 -1
- package/helpers/typescript/interface/get-interface-member.d.ts +8 -0
- package/helpers/typescript/interface/get-interface-member.js +18 -0
- package/helpers/typescript/interface/get-interface-member.js.map +1 -0
- package/helpers/typescript/member/find-member.d.ts +4 -0
- package/helpers/typescript/member/find-member.js +28 -0
- package/helpers/typescript/member/find-member.js.map +1 -0
- package/helpers/typescript/member/get-implemented-member.d.ts +7 -0
- package/helpers/typescript/member/get-implemented-member.js +48 -0
- package/helpers/typescript/member/get-implemented-member.js.map +1 -0
- package/helpers/typescript/member/get-inherited-parent.d.ts +8 -0
- package/helpers/typescript/member/get-inherited-parent.js +19 -0
- package/helpers/typescript/member/get-inherited-parent.js.map +1 -0
- package/helpers/typescript/member/get-member-parent.d.ts +7 -0
- package/helpers/typescript/member/get-member-parent.js +14 -0
- package/helpers/typescript/member/get-member-parent.js.map +1 -0
- package/helpers/typescript/member/get-overridden-member.d.ts +7 -0
- package/helpers/typescript/member/get-overridden-member.js +32 -0
- package/helpers/typescript/member/get-overridden-member.js.map +1 -0
- package/helpers/typescript/member/index.d.ts +6 -0
- package/helpers/typescript/member/index.js +10 -0
- package/helpers/typescript/member/index.js.map +1 -0
- package/helpers/typescript/member/member-type.d.ts +4 -0
- package/helpers/typescript/member/member-type.js +3 -0
- package/helpers/typescript/member/member-type.js.map +1 -0
- package/helpers/typescript/method/get-method-chain.js +1 -0
- package/helpers/typescript/method/get-method-chain.js.map +1 -1
- package/helpers/typescript/method/index.d.ts +0 -2
- package/helpers/typescript/method/index.js +0 -2
- package/helpers/typescript/method/index.js.map +1 -1
- package/helpers/typescript/property/get-property-chain.js +1 -0
- package/helpers/typescript/property/get-property-chain.js.map +1 -1
- package/helpers/typescript/property/index.d.ts +0 -2
- package/helpers/typescript/property/index.js +0 -2
- package/helpers/typescript/property/index.js.map +1 -1
- package/interfaces/keyword-map.d.ts +2 -0
- package/interfaces/page-index.d.ts +2 -2
- package/package.json +2 -2
- package/templates/api/class.html.nunj +24 -8
- package/templates/api/interface.html.nunj +12 -4
- package/templates/helpers/accessor.html.nunj +68 -0
- package/templates/helpers/accessors.html.nunj +7 -0
- package/templates/helpers/declaration-modifiers.html.nunj +8 -8
- package/templates/helpers/method.html.nunj +9 -9
- package/templates/helpers/parameters.html.nunj +20 -1
- package/templates/helpers/properties.html.nunj +8 -10
- package/templates/parts/page-tags.html.nunj +2 -1
- package/types/index.d.ts +1 -0
- package/types/index.js +1 -0
- package/types/index.js.map +1 -1
- package/types/keyword-type.d.ts +2 -0
- package/types/keyword-type.js +3 -0
- package/types/keyword-type.js.map +1 -0
- package/engine/.cache/libs/app/components/page-map/index.js +0 -6
- package/engine/.cache/libs/builder/helpers/typescript/method/get-implemented-method.js +0 -44
- package/engine/.cache/libs/builder/helpers/typescript/method/get-overridden-method.js +0 -26
- package/engine/.cache/libs/builder/helpers/typescript/property/get-implemented-property.js +0 -44
- package/engine/.cache/libs/builder/helpers/typescript/property/get-overridden-property.js +0 -26
- package/engine/.cache/libs/core/helpers/humanize-declaration-name.js +0 -13
- package/helpers/typescript/method/get-implemented-method.d.ts +0 -7
- package/helpers/typescript/method/get-implemented-method.js +0 -46
- package/helpers/typescript/method/get-implemented-method.js.map +0 -1
- package/helpers/typescript/method/get-overridden-method.d.ts +0 -7
- package/helpers/typescript/method/get-overridden-method.js +0 -28
- package/helpers/typescript/method/get-overridden-method.js.map +0 -1
- package/helpers/typescript/property/get-implemented-property.d.ts +0 -7
- package/helpers/typescript/property/get-implemented-property.js +0 -46
- package/helpers/typescript/property/get-implemented-property.js.map +0 -1
- package/helpers/typescript/property/get-overridden-property.d.ts +0 -7
- package/helpers/typescript/property/get-overridden-property.js +0 -28
- package/helpers/typescript/property/get-overridden-property.js.map +0 -1
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { constructorPresentation, displayType, extractDocs, extractParameterDocs, extractSeeDocs, extractSelectors, filterByScope, filterByStatic, firstNodeWithComment, functionPresentation, getClassMethods, getClassProperties,
|
|
2
|
-
export { humanizeDeclarationName } from '@ng-doc/core';
|
|
1
|
+
export { accessorPresentation, constructorPresentation, displayType, extractDocs, extractParameterDocs, extractSeeDocs, extractSelectors, filterByScope, filterByStatic, filterUselessMembers, firstNodeWithComment, functionPresentation, getAccessorChain, getClassAccessors, getClassMethods, getClassProperties, getDeclarationType, getImplementedMember, getInheritedParent, getInterfaceAccessors, getInterfaceMethods, getInterfaceProperties, getMemberParent, getMethodChain, getOverriddenMember, getPropertyChain, groupAccessors, marked, methodPresentation, noEmpty, noLineBreaks, notEmptyAssets, sortByNodesName, typeAliasPresentation, variablePresentation, } from '../helpers';
|
|
@@ -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.
|
|
4
|
+
exports.variablePresentation = exports.typeAliasPresentation = exports.sortByNodesName = exports.notEmptyAssets = exports.noLineBreaks = exports.noEmpty = exports.methodPresentation = exports.marked = exports.groupAccessors = exports.getPropertyChain = exports.getOverriddenMember = exports.getMethodChain = exports.getMemberParent = exports.getInterfaceProperties = exports.getInterfaceMethods = exports.getInterfaceAccessors = exports.getInheritedParent = exports.getImplementedMember = exports.getDeclarationType = exports.getClassProperties = exports.getClassMethods = exports.getClassAccessors = exports.getAccessorChain = exports.functionPresentation = exports.firstNodeWithComment = exports.filterUselessMembers = exports.filterByStatic = exports.filterByScope = exports.extractSelectors = exports.extractSeeDocs = exports.extractParameterDocs = exports.extractDocs = exports.displayType = exports.constructorPresentation = exports.accessorPresentation = void 0;
|
|
5
5
|
var helpers_1 = require("../helpers");
|
|
6
|
+
Object.defineProperty(exports, "accessorPresentation", { enumerable: true, get: function () { return helpers_1.accessorPresentation; } });
|
|
6
7
|
Object.defineProperty(exports, "constructorPresentation", { enumerable: true, get: function () { return helpers_1.constructorPresentation; } });
|
|
7
8
|
Object.defineProperty(exports, "displayType", { enumerable: true, get: function () { return helpers_1.displayType; } });
|
|
8
9
|
Object.defineProperty(exports, "extractDocs", { enumerable: true, get: function () { return helpers_1.extractDocs; } });
|
|
@@ -11,18 +12,24 @@ Object.defineProperty(exports, "extractSeeDocs", { enumerable: true, get: functi
|
|
|
11
12
|
Object.defineProperty(exports, "extractSelectors", { enumerable: true, get: function () { return helpers_1.extractSelectors; } });
|
|
12
13
|
Object.defineProperty(exports, "filterByScope", { enumerable: true, get: function () { return helpers_1.filterByScope; } });
|
|
13
14
|
Object.defineProperty(exports, "filterByStatic", { enumerable: true, get: function () { return helpers_1.filterByStatic; } });
|
|
15
|
+
Object.defineProperty(exports, "filterUselessMembers", { enumerable: true, get: function () { return helpers_1.filterUselessMembers; } });
|
|
14
16
|
Object.defineProperty(exports, "firstNodeWithComment", { enumerable: true, get: function () { return helpers_1.firstNodeWithComment; } });
|
|
15
17
|
Object.defineProperty(exports, "functionPresentation", { enumerable: true, get: function () { return helpers_1.functionPresentation; } });
|
|
18
|
+
Object.defineProperty(exports, "getAccessorChain", { enumerable: true, get: function () { return helpers_1.getAccessorChain; } });
|
|
19
|
+
Object.defineProperty(exports, "getClassAccessors", { enumerable: true, get: function () { return helpers_1.getClassAccessors; } });
|
|
16
20
|
Object.defineProperty(exports, "getClassMethods", { enumerable: true, get: function () { return helpers_1.getClassMethods; } });
|
|
17
21
|
Object.defineProperty(exports, "getClassProperties", { enumerable: true, get: function () { return helpers_1.getClassProperties; } });
|
|
18
|
-
Object.defineProperty(exports, "
|
|
19
|
-
Object.defineProperty(exports, "
|
|
22
|
+
Object.defineProperty(exports, "getDeclarationType", { enumerable: true, get: function () { return helpers_1.getDeclarationType; } });
|
|
23
|
+
Object.defineProperty(exports, "getImplementedMember", { enumerable: true, get: function () { return helpers_1.getImplementedMember; } });
|
|
24
|
+
Object.defineProperty(exports, "getInheritedParent", { enumerable: true, get: function () { return helpers_1.getInheritedParent; } });
|
|
25
|
+
Object.defineProperty(exports, "getInterfaceAccessors", { enumerable: true, get: function () { return helpers_1.getInterfaceAccessors; } });
|
|
20
26
|
Object.defineProperty(exports, "getInterfaceMethods", { enumerable: true, get: function () { return helpers_1.getInterfaceMethods; } });
|
|
21
27
|
Object.defineProperty(exports, "getInterfaceProperties", { enumerable: true, get: function () { return helpers_1.getInterfaceProperties; } });
|
|
28
|
+
Object.defineProperty(exports, "getMemberParent", { enumerable: true, get: function () { return helpers_1.getMemberParent; } });
|
|
22
29
|
Object.defineProperty(exports, "getMethodChain", { enumerable: true, get: function () { return helpers_1.getMethodChain; } });
|
|
23
|
-
Object.defineProperty(exports, "
|
|
24
|
-
Object.defineProperty(exports, "getOverriddenProperty", { enumerable: true, get: function () { return helpers_1.getOverriddenProperty; } });
|
|
30
|
+
Object.defineProperty(exports, "getOverriddenMember", { enumerable: true, get: function () { return helpers_1.getOverriddenMember; } });
|
|
25
31
|
Object.defineProperty(exports, "getPropertyChain", { enumerable: true, get: function () { return helpers_1.getPropertyChain; } });
|
|
32
|
+
Object.defineProperty(exports, "groupAccessors", { enumerable: true, get: function () { return helpers_1.groupAccessors; } });
|
|
26
33
|
Object.defineProperty(exports, "marked", { enumerable: true, get: function () { return helpers_1.marked; } });
|
|
27
34
|
Object.defineProperty(exports, "methodPresentation", { enumerable: true, get: function () { return helpers_1.methodPresentation; } });
|
|
28
35
|
Object.defineProperty(exports, "noEmpty", { enumerable: true, get: function () { return helpers_1.noEmpty; } });
|
|
@@ -31,6 +38,4 @@ Object.defineProperty(exports, "notEmptyAssets", { enumerable: true, get: functi
|
|
|
31
38
|
Object.defineProperty(exports, "sortByNodesName", { enumerable: true, get: function () { return helpers_1.sortByNodesName; } });
|
|
32
39
|
Object.defineProperty(exports, "typeAliasPresentation", { enumerable: true, get: function () { return helpers_1.typeAliasPresentation; } });
|
|
33
40
|
Object.defineProperty(exports, "variablePresentation", { enumerable: true, get: function () { return helpers_1.variablePresentation; } });
|
|
34
|
-
var core_1 = require("@ng-doc/core");
|
|
35
|
-
Object.defineProperty(exports, "humanizeDeclarationName", { enumerable: true, get: function () { return core_1.humanizeDeclarationName; } });
|
|
36
41
|
//# sourceMappingURL=template-filters.js.map
|
|
@@ -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,sCAoCoB;AAnCnB,+GAAA,oBAAoB,OAAA;AACpB,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,+GAAA,oBAAoB,OAAA;AACpB,2GAAA,gBAAgB,OAAA;AAChB,4GAAA,iBAAiB,OAAA;AACjB,0GAAA,eAAe,OAAA;AACf,6GAAA,kBAAkB,OAAA;AAClB,6GAAA,kBAAkB,OAAA;AAClB,+GAAA,oBAAoB,OAAA;AACpB,6GAAA,kBAAkB,OAAA;AAClB,gHAAA,qBAAqB,OAAA;AACrB,8GAAA,mBAAmB,OAAA;AACnB,iHAAA,sBAAsB,OAAA;AACtB,0GAAA,eAAe,OAAA;AACf,yGAAA,cAAc,OAAA;AACd,8GAAA,mBAAmB,OAAA;AACnB,2GAAA,gBAAgB,OAAA;AAChB,yGAAA,cAAc,OAAA;AACd,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"}
|
|
@@ -8,6 +8,8 @@ const path = tslib_1.__importStar(require("path"));
|
|
|
8
8
|
const posthtml_parser_1 = require("posthtml-parser");
|
|
9
9
|
const entities_1 = require("../engine/entities");
|
|
10
10
|
const route_entity_1 = require("../engine/entities/abstractions/route.entity");
|
|
11
|
+
const entity_type_1 = require("./entity-type");
|
|
12
|
+
const get_kind_type_1 = require("./get-kind-type");
|
|
11
13
|
/**
|
|
12
14
|
*
|
|
13
15
|
* @param entities
|
|
@@ -68,7 +70,7 @@ function extractIndexes(entity, nodes, indexes = []) {
|
|
|
68
70
|
title: entity.title,
|
|
69
71
|
heading: entity.title,
|
|
70
72
|
content: '',
|
|
71
|
-
kind:
|
|
73
|
+
kind: ((0, entity_type_1.isApiPageEntity)(entity) && entity.declaration && (0, get_kind_type_1.getKindType)(entity.declaration)) || undefined,
|
|
72
74
|
});
|
|
73
75
|
}
|
|
74
76
|
nodes.forEach((node) => {
|
|
@@ -81,7 +83,8 @@ function extractIndexes(entity, nodes, indexes = []) {
|
|
|
81
83
|
title: entity.title,
|
|
82
84
|
heading: extractText(node),
|
|
83
85
|
content: '',
|
|
84
|
-
kind:
|
|
86
|
+
kind: ((0, entity_type_1.isApiPageEntity)(entity) && entity.declaration && (0, get_kind_type_1.getKindType)(entity.declaration)) ||
|
|
87
|
+
undefined,
|
|
85
88
|
});
|
|
86
89
|
}
|
|
87
90
|
else if (Array.isArray(node.content)) {
|
|
@@ -126,7 +129,7 @@ function getTypeFromEntity(entity) {
|
|
|
126
129
|
if (entity instanceof entities_1.NgDocApiPageEntity) {
|
|
127
130
|
return 'api';
|
|
128
131
|
}
|
|
129
|
-
return '
|
|
132
|
+
return 'guideline';
|
|
130
133
|
}
|
|
131
134
|
/**
|
|
132
135
|
*
|
|
@@ -135,36 +138,4 @@ function getTypeFromEntity(entity) {
|
|
|
135
138
|
function isHeadingTag(node) {
|
|
136
139
|
return ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(String(node.tag));
|
|
137
140
|
}
|
|
138
|
-
/**
|
|
139
|
-
*
|
|
140
|
-
* @param node
|
|
141
|
-
*/
|
|
142
|
-
function isHeaderTag(node) {
|
|
143
|
-
return ['header'].includes(String(node.tag));
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
*
|
|
147
|
-
* @param node
|
|
148
|
-
*/
|
|
149
|
-
function isSectionTag(node) {
|
|
150
|
-
return ['section'].includes(String(node.tag));
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
*
|
|
154
|
-
* @param node
|
|
155
|
-
*/
|
|
156
|
-
function isParagraph(node) {
|
|
157
|
-
return ['p'].includes(String(node.tag));
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
*
|
|
161
|
-
* @param entity
|
|
162
|
-
*/
|
|
163
|
-
function getKindFromEntity(entity) {
|
|
164
|
-
var _a, _b;
|
|
165
|
-
if (entity instanceof entities_1.NgDocApiPageEntity) {
|
|
166
|
-
return (0, core_1.humanizeDeclarationName)((_b = (_a = entity.declaration) === null || _a === void 0 ? void 0 : _a.getKindName()) !== null && _b !== void 0 ? _b : '');
|
|
167
|
-
}
|
|
168
|
-
return undefined;
|
|
169
|
-
}
|
|
170
141
|
//# sourceMappingURL=build-global-indexes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-global-indexes.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/build-global-indexes.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"build-global-indexes.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/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AI,CAAC,GAAG,CAAC,CAAC,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,SAAS,WAAW,CAAC,IAAU;IAC9B,IAAI,IAAA,gBAAS,EAAC,IAAI,CAAC,EAAE;QACpB,OAAO,YAAY,CAAC,IAAI,CAAC;YACxB,CAAC,CAAC,EAAE;YACJ,CAAC,CACC,IAAA,cAAO,EAAC,IAAI,CAAC,OAAO,CAAC;iBACnB,IAAI,EAAE;iBACN,MAAM,CAAC,CAAC,IAAU,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAChD;iBACA,GAAG,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;iBAChC,IAAI,CAAC,IAAI,CAAC,CAAC;KACf;SAAM;QACN,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;KACpB;AACF,CAAC;AAED;;;GAGG;AACH,SAAS,iBAAiB,CAAC,MAAmB;IAC7C,IAAI,MAAM,YAAY,6BAAkB,EAAE;QACzC,OAAO,KAAK,CAAC;KACb;IACD,OAAO,WAAW,CAAC;AACpB,CAAC;AAED;;;GAGG;AACH,SAAS,YAAY,CAAC,IAAa;IAClC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACxE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NgDocMemberType } from './typescript';
|
|
2
|
+
/**
|
|
3
|
+
* Excludes from the passed array members that have names that are not important to the end user
|
|
4
|
+
*
|
|
5
|
+
* @param members - List of members
|
|
6
|
+
*/
|
|
7
|
+
export declare function filterUselessMembers<T extends NgDocMemberType>(members: T[]): T[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.filterUselessMembers = void 0;
|
|
4
|
+
const EXCLUDING_RULES = [/^ɵ/];
|
|
5
|
+
/**
|
|
6
|
+
* Excludes from the passed array members that have names that are not important to the end user
|
|
7
|
+
*
|
|
8
|
+
* @param members - List of members
|
|
9
|
+
*/
|
|
10
|
+
function filterUselessMembers(members) {
|
|
11
|
+
return members.filter((member) => !EXCLUDING_RULES.every((rule) => rule.test(member.getName())));
|
|
12
|
+
}
|
|
13
|
+
exports.filterUselessMembers = filterUselessMembers;
|
|
14
|
+
//# sourceMappingURL=filter-useless-members.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-useless-members.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/filter-useless-members.ts"],"names":[],"mappings":";;;AAEA,MAAM,eAAe,GAAa,CAAC,IAAI,CAAC,CAAC;AAEzC;;;;GAIG;AACH,SAAgB,oBAAoB,CAA4B,OAAY;IAC3E,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,MAAS,EAAE,EAAE,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;AAC7G,CAAC;AAFD,oDAEC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDeclarationType = void 0;
|
|
4
|
+
const core_1 = require("@ng-doc/core");
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param node
|
|
8
|
+
*/
|
|
9
|
+
function getDeclarationType(node) {
|
|
10
|
+
for (const declaration of core_1.NgDocDeclarations) {
|
|
11
|
+
if (node === null || node === void 0 ? void 0 : node.getKindName().includes(declaration)) {
|
|
12
|
+
return declaration;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
exports.getDeclarationType = getDeclarationType;
|
|
18
|
+
//# sourceMappingURL=get-declaration-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-declaration-type.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-declaration-type.ts"],"names":[],"mappings":";;;AAAA,uCAAqE;AAGrE;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,IAAU;IAC5C,KAAK,MAAM,WAAW,IAAI,wBAAiB,EAAE;QAC5C,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC,EAAE;YAC9C,OAAO,WAAW,CAAC;SACnB;KACD;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AARD,gDAQC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NgDocRouteEntity } from '../engine/entities/abstractions/route.entity';
|
|
2
|
+
import { NgDocKeywordType } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param entity
|
|
6
|
+
*/
|
|
7
|
+
export declare function getKeywordTypeFromEntity(entity: NgDocRouteEntity): NgDocKeywordType | undefined;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getKeywordTypeFromEntity = void 0;
|
|
4
|
+
const entity_type_1 = require("./entity-type");
|
|
5
|
+
const get_kind_type_1 = require("./get-kind-type");
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param entity
|
|
9
|
+
*/
|
|
10
|
+
function getKeywordTypeFromEntity(entity) {
|
|
11
|
+
if ((0, entity_type_1.isApiPageEntity)(entity)) {
|
|
12
|
+
const kindType = entity.declaration && (0, get_kind_type_1.getKindType)(entity.declaration);
|
|
13
|
+
return kindType !== null && kindType !== void 0 ? kindType : 'api';
|
|
14
|
+
}
|
|
15
|
+
if ((0, entity_type_1.isPageEntity)(entity)) {
|
|
16
|
+
return 'guideline';
|
|
17
|
+
}
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
exports.getKeywordTypeFromEntity = getKeywordTypeFromEntity;
|
|
21
|
+
//# sourceMappingURL=get-keyword-type-from-entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-keyword-type-from-entity.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-keyword-type-from-entity.ts"],"names":[],"mappings":";;;AAIA,+CAA4D;AAC5D,mDAA4C;AAE5C;;;GAGG;AACH,SAAgB,wBAAwB,CAAC,MAAwB;IAChE,IAAI,IAAA,6BAAe,EAAC,MAAM,CAAC,EAAE;QAC5B,MAAM,QAAQ,GAA8B,MAAM,CAAC,WAAW,IAAI,IAAA,2BAAW,EAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAElG,OAAO,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,KAAK,CAAC;KACzB;IAED,IAAI,IAAA,0BAAY,EAAC,MAAM,CAAC,EAAE;QACzB,OAAO,WAAW,CAAC;KACnB;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AAZD,4DAYC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getKindType = void 0;
|
|
4
|
+
const core_1 = require("@ng-doc/core");
|
|
5
|
+
const ts_morph_1 = require("ts-morph");
|
|
6
|
+
const get_declaration_type_1 = require("./get-declaration-type");
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param node
|
|
10
|
+
*/
|
|
11
|
+
function getKindType(node) {
|
|
12
|
+
if (ts_morph_1.Node.isClassDeclaration(node)) {
|
|
13
|
+
for (const decorator of core_1.NgDocAngularEntities) {
|
|
14
|
+
if (node.getDecorator(decorator)) {
|
|
15
|
+
return decorator;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return (0, get_declaration_type_1.getDeclarationType)(node);
|
|
20
|
+
}
|
|
21
|
+
exports.getKindType = getKindType;
|
|
22
|
+
//# sourceMappingURL=get-kind-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-kind-type.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-kind-type.ts"],"names":[],"mappings":";;;AAAA,uCAAoF;AACpF,uCAA8B;AAE9B,iEAA0D;AAE1D;;;GAGG;AACH,SAAgB,WAAW,CAAC,IAAU;IACrC,IAAI,eAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE;QAClC,KAAK,MAAM,SAAS,IAAI,2BAAoB,EAAE;YAC7C,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE;gBACjC,OAAO,SAAS,CAAC;aACjB;SACD;KACD;IAED,OAAO,IAAA,yCAAkB,EAAC,IAAI,CAAC,CAAC;AACjC,CAAC;AAVD,kCAUC"}
|
package/helpers/index.d.ts
CHANGED
|
@@ -8,10 +8,14 @@ export * from './entity-type';
|
|
|
8
8
|
export * from './extract-docs';
|
|
9
9
|
export * from './extract-path-anchor';
|
|
10
10
|
export * from './extract-selectors';
|
|
11
|
+
export * from './filter-useless-members';
|
|
11
12
|
export * from './find-closest-file';
|
|
12
13
|
export * from './format-code';
|
|
13
14
|
export * from './generate-api-entities';
|
|
15
|
+
export * from './get-declaration-type';
|
|
14
16
|
export * from './get-entity-constructor';
|
|
17
|
+
export * from './get-keyword-type-from-entity';
|
|
18
|
+
export * from './get-kind-type';
|
|
15
19
|
export * from './is-not-excluded-path';
|
|
16
20
|
export * from './is-supported-declaration';
|
|
17
21
|
export * from './marked';
|
package/helpers/index.js
CHANGED
|
@@ -11,10 +11,14 @@ tslib_1.__exportStar(require("./entity-type"), exports);
|
|
|
11
11
|
tslib_1.__exportStar(require("./extract-docs"), exports);
|
|
12
12
|
tslib_1.__exportStar(require("./extract-path-anchor"), exports);
|
|
13
13
|
tslib_1.__exportStar(require("./extract-selectors"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./filter-useless-members"), exports);
|
|
14
15
|
tslib_1.__exportStar(require("./find-closest-file"), exports);
|
|
15
16
|
tslib_1.__exportStar(require("./format-code"), exports);
|
|
16
17
|
tslib_1.__exportStar(require("./generate-api-entities"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./get-declaration-type"), exports);
|
|
17
19
|
tslib_1.__exportStar(require("./get-entity-constructor"), exports);
|
|
20
|
+
tslib_1.__exportStar(require("./get-keyword-type-from-entity"), exports);
|
|
21
|
+
tslib_1.__exportStar(require("./get-kind-type"), exports);
|
|
18
22
|
tslib_1.__exportStar(require("./is-not-excluded-path"), exports);
|
|
19
23
|
tslib_1.__exportStar(require("./is-supported-declaration"), exports);
|
|
20
24
|
tslib_1.__exportStar(require("./marked"), 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,qDAA2B;AAC3B,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,mEAAyC;AACzC,8DAAoC;AACpC,wDAA8B;AAC9B,kEAAwC;AACxC,iEAAuC;AACvC,mEAAyC;AACzC,yEAA+C;AAC/C,0DAAgC;AAChC,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"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { ConstructorDeclaration, FunctionDeclaration, MethodDeclaration, TypeAliasDeclaration, VariableDeclaration } from 'ts-morph';
|
|
1
|
+
import { AccessorDeclaration, ConstructorDeclaration, FunctionDeclaration, MethodDeclaration, TypeAliasDeclaration, VariableDeclaration } from 'ts-morph';
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param constructor
|
|
5
5
|
*/
|
|
6
6
|
export declare function constructorPresentation(constructor: ConstructorDeclaration): string;
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param accessor
|
|
10
|
+
*/
|
|
11
|
+
export declare function accessorPresentation(accessor: AccessorDeclaration): string;
|
|
7
12
|
/**
|
|
8
13
|
*
|
|
9
14
|
* @param method
|
package/helpers/presentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.variablePresentation = exports.typeAliasPresentation = exports.functionPresentation = exports.methodPresentation = exports.constructorPresentation = void 0;
|
|
3
|
+
exports.variablePresentation = exports.typeAliasPresentation = exports.functionPresentation = exports.methodPresentation = exports.accessorPresentation = exports.constructorPresentation = void 0;
|
|
4
4
|
const core_1 = require("@ng-doc/core");
|
|
5
5
|
const ts_morph_1 = require("ts-morph");
|
|
6
6
|
const format_code_1 = require("./format-code");
|
|
@@ -21,6 +21,20 @@ function constructorPresentation(constructor) {
|
|
|
21
21
|
return (0, format_code_1.formatCode)(presentation, 'TypeScript');
|
|
22
22
|
}
|
|
23
23
|
exports.constructorPresentation = constructorPresentation;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param accessor
|
|
27
|
+
*/
|
|
28
|
+
function accessorPresentation(accessor) {
|
|
29
|
+
const parameters = accessor.getParameters().map(parameterPresentation).join(', ');
|
|
30
|
+
const prefix = ts_morph_1.Node.isGetAccessorDeclaration(accessor) ? 'get' : 'set';
|
|
31
|
+
const header = ts_morph_1.Node.isGetAccessorDeclaration(accessor)
|
|
32
|
+
? `${accessor.getName()}():`
|
|
33
|
+
: `${accessor.getName()}(${parameters})`;
|
|
34
|
+
const returnType = ts_morph_1.Node.isGetAccessorDeclaration(accessor) ? (0, typescript_1.displayType)(accessor.getReturnType()) : '';
|
|
35
|
+
return [prefix, scopePresentation(accessor), header, returnType].filter(core_1.isPresent).join(' ') + ';';
|
|
36
|
+
}
|
|
37
|
+
exports.accessorPresentation = accessorPresentation;
|
|
24
38
|
/**
|
|
25
39
|
*
|
|
26
40
|
* @param method
|
|
@@ -72,7 +86,6 @@ exports.variablePresentation = variablePresentation;
|
|
|
72
86
|
*/
|
|
73
87
|
function parameterPresentation(parameter) {
|
|
74
88
|
return [
|
|
75
|
-
parameter.hasOverrideKeyword() ? 'override' : '',
|
|
76
89
|
decoratorsPresentation(parameter),
|
|
77
90
|
scopePresentation(parameter),
|
|
78
91
|
modPresentation(parameter),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/presentation.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"presentation.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/presentation.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,uCAckB;AAElB,+CAAyC;AACzC,6CAAyC;AAEzC;;;GAGG;AACH,SAA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,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC;SAC1C,IAAI,CAAC,GAAG,CAAC,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessor.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/accessor/accessor.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GetAccessorDeclaration, SetAccessorDeclaration } from 'ts-morph';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param accessor
|
|
5
|
+
*/
|
|
6
|
+
export declare function getAccessorChain(accessor: GetAccessorDeclaration): GetAccessorDeclaration[];
|
|
7
|
+
export declare function getAccessorChain(accessor: SetAccessorDeclaration): SetAccessorDeclaration[];
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAccessorChain = void 0;
|
|
4
|
+
const ts_morph_1 = require("ts-morph");
|
|
5
|
+
const class_1 = require("../class");
|
|
6
|
+
const for_all_interfaces_1 = require("../interface/for-all-interfaces");
|
|
7
|
+
const get_interface_accessors_1 = require("./get-interface-accessors");
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param accessor
|
|
11
|
+
*/
|
|
12
|
+
function getAccessorChain(accessor) {
|
|
13
|
+
const parent = accessor.getParent();
|
|
14
|
+
const accessors = [];
|
|
15
|
+
const name = accessor.getName();
|
|
16
|
+
if (ts_morph_1.Node.isClassDeclaration(parent)) {
|
|
17
|
+
(0, class_1.forAllClasses)(parent, (cls) => {
|
|
18
|
+
if (ts_morph_1.Node.isGetAccessorDeclaration(accessor)) {
|
|
19
|
+
const getter = cls.getGetAccessor(name);
|
|
20
|
+
if (getter) {
|
|
21
|
+
accessors.push(getter);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (ts_morph_1.Node.isSetAccessorDeclaration(accessor)) {
|
|
25
|
+
const setter = cls.getSetAccessor(name);
|
|
26
|
+
if (setter) {
|
|
27
|
+
accessors.push(setter);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
// TODO: Add interfaces
|
|
32
|
+
}
|
|
33
|
+
if (ts_morph_1.Node.isInterfaceDeclaration(parent)) {
|
|
34
|
+
(0, for_all_interfaces_1.forAllInterfaces)(parent, (int) => {
|
|
35
|
+
(0, get_interface_accessors_1.getInterfaceAccessors)(int)
|
|
36
|
+
.filter((acc) => acc.getName() === name)
|
|
37
|
+
.forEach((acc) => {
|
|
38
|
+
if (ts_morph_1.Node.isGetAccessorDeclaration(accessor) && ts_morph_1.Node.isGetAccessorDeclaration(acc)) {
|
|
39
|
+
accessors.push(acc);
|
|
40
|
+
}
|
|
41
|
+
if (ts_morph_1.Node.isSetAccessorDeclaration(accessor) && ts_morph_1.Node.isSetAccessorDeclaration(acc)) {
|
|
42
|
+
accessors.push(acc);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return accessors;
|
|
48
|
+
}
|
|
49
|
+
exports.getAccessorChain = getAccessorChain;
|
|
50
|
+
//# sourceMappingURL=get-accessor-chain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-accessor-chain.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/accessor/get-accessor-chain.ts"],"names":[],"mappings":";;;AAAA,uCAOkB;AAElB,oCAAuC;AACvC,wEAAiE;AAEjE,uEAAgE;AAQhE;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,QAA6B;IAC7D,MAAM,MAAM,GAAqB,QAAQ,CAAC,SAAS,EAAE,CAAC;IACtD,MAAM,SAAS,GAA0B,EAAE,CAAC;IAC5C,MAAM,IAAI,GAAW,QAAQ,CAAC,OAAO,EAAE,CAAC;IAExC,IAAI,eAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE;QACpC,IAAA,qB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CC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getClassAccessors = void 0;
|
|
4
|
+
const core_1 = require("@ng-doc/core");
|
|
5
|
+
const class_1 = require("../class");
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param cls
|
|
9
|
+
*/
|
|
10
|
+
function getClassAccessors(cls) {
|
|
11
|
+
const accessors = new Map();
|
|
12
|
+
(0, class_1.forAllClasses)(cls, (baseClass) => {
|
|
13
|
+
baseClass.getGetAccessors().forEach((accessor) => {
|
|
14
|
+
const name = accessor.getName();
|
|
15
|
+
if (!accessors.get(`get${name}`) &&
|
|
16
|
+
(!accessor.isAbstract() || (accessor.isAbstract() && cls === baseClass))) {
|
|
17
|
+
accessors.set(`get${name}`, accessor);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
baseClass.getSetAccessors().forEach((accessor) => {
|
|
21
|
+
const name = accessor.getName();
|
|
22
|
+
if (!accessors.get(`set${name}`) &&
|
|
23
|
+
(!accessor.isAbstract() || (accessor.isAbstract() && cls === baseClass))) {
|
|
24
|
+
accessors.set(`set${name}`, accessor);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
return (0, core_1.asArray)(accessors.values());
|
|
29
|
+
}
|
|
30
|
+
exports.getClassAccessors = getClassAccessors;
|
|
31
|
+
//# sourceMappingURL=get-class-accessors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-class-accessors.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/accessor/get-class-accessors.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AAGrC,oCAAuC;AAGvC;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,GAAqB;IACtD,MAAM,SAAS,GAAqC,IAAI,GAAG,EAA+B,CAAC;IAE3F,IAAA,qBAAa,EAAC,GAAG,EAAE,CAAC,SAA2B,EAAE,EAAE;QAClD,SAAS,CAAC,eAAe,EAAE,CAAC,OAAO,CAAC,CAAC,QAAgC,EAAE,EAAE;YACxE,MAAM,IAAI,GAAW,QAAQ,CAAC,OAAO,EAAE,CAAC;YAExC,IACC,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC;gBAC5B,CAAC,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,GAAG,KAAK,SAAS,CAAC,CAAC,EACvE;gBACD,SAAS,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;aACtC;QACF,CAAC,CAAC,CAAC;QAEH,SAAS,CAAC,eAAe,EAAE,CAAC,OAAO,CAAC,CAAC,QAAgC,EAAE,EAAE;YACxE,MAAM,IAAI,GAAW,QAAQ,CAAC,OAAO,EAAE,CAAC;YAExC,IACC,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC;gBAC5B,CAAC,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,GAAG,KAAK,SAAS,CAAC,CAAC,EACvE;gBACD,SAAS,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;aACtC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,IAAA,cAAO,EAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;AACpC,CAAC;AA5BD,8CA4BC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInterfaceAccessors = void 0;
|
|
4
|
+
const core_1 = require("@ng-doc/core");
|
|
5
|
+
const ts_morph_1 = require("ts-morph");
|
|
6
|
+
const interface_1 = require("../interface");
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param int
|
|
10
|
+
*/
|
|
11
|
+
function getInterfaceAccessors(int) {
|
|
12
|
+
const accessors = new Map();
|
|
13
|
+
(0, interface_1.forAllInterfaces)(int, (i) => {
|
|
14
|
+
const getters = i
|
|
15
|
+
.getMembers()
|
|
16
|
+
.filter(ts_morph_1.Node.isGetAccessorDeclaration);
|
|
17
|
+
const setters = i
|
|
18
|
+
.getMembers()
|
|
19
|
+
.filter(ts_morph_1.Node.isSetAccessorDeclaration);
|
|
20
|
+
getters.forEach((getter) => {
|
|
21
|
+
const name = getter.getName();
|
|
22
|
+
if (!accessors.get(`get${name}`)) {
|
|
23
|
+
accessors.set(`get${name}`, getter);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
setters.forEach((setter) => {
|
|
27
|
+
const name = setter.getName();
|
|
28
|
+
if (!accessors.get(`set${name}`)) {
|
|
29
|
+
accessors.set(`set${name}`, setter);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
return (0, core_1.asArray)(accessors.values());
|
|
34
|
+
}
|
|
35
|
+
exports.getInterfaceAccessors = getInterfaceAccessors;
|
|
36
|
+
//# sourceMappingURL=get-interface-accessors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-interface-accessors.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/accessor/get-interface-accessors.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AACrC,uCAMkB;AAElB,4CAA8C;AAE9C;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,GAAyB;IAC9D,MAAM,SAAS,GAAqC,IAAI,GAAG,EAA+B,CAAC;IAE3F,IAAA,4BAAgB,EAAC,GAAG,EAAE,CAAC,CAAuB,EAAE,EAAE;QACjD,MAAM,OAAO,GAA6B,CAAC;aACzC,UAAU,EAAE;aACZ,MAAM,CAAC,eAAI,CAAC,wBAAwB,CAAwC,CAAC;QAE/E,MAAM,OAAO,GAA6B,CAAC;aACzC,UAAU,EAAE;aACZ,MAAM,CAAC,eAAI,CAAC,wBAAwB,CAAwC,CAAC;QAE/E,OAAO,CAAC,OAAO,CAAC,CAAC,MAA8B,EAAE,EAAE;YAClD,MAAM,IAAI,GAAW,MAAM,CAAC,OAAO,EAAE,CAAC;YAEtC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE;gBACjC,SAAS,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC;aACpC;QACF,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,OAAO,CAAC,CAAC,MAA8B,EAAE,EAAE;YAClD,MAAM,IAAI,GAAW,MAAM,CAAC,OAAO,EAAE,CAAC;YAEtC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE;gBACjC,SAAS,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC;aACpC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,IAAA,cAAO,EAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;AACpC,CAAC;AA9BD,sDA8BC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.groupAccessors = void 0;
|
|
4
|
+
const core_1 = require("@ng-doc/core");
|
|
5
|
+
const ts_morph_1 = require("ts-morph");
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param accessors
|
|
9
|
+
*/
|
|
10
|
+
function groupAccessors(accessors) {
|
|
11
|
+
const map = new Map();
|
|
12
|
+
accessors.forEach((accessor) => {
|
|
13
|
+
if (ts_morph_1.Node.isGetAccessorDeclaration(accessor)) {
|
|
14
|
+
map.set(accessor.getName(), { ...map.get(accessor.getName()), get: accessor });
|
|
15
|
+
}
|
|
16
|
+
if (ts_morph_1.Node.isSetAccessorDeclaration(accessor)) {
|
|
17
|
+
map.set(accessor.getName(), { ...map.get(accessor.getName()), set: accessor });
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
return (0, core_1.asArray)(map.values());
|
|
21
|
+
}
|
|
22
|
+
exports.groupAccessors = groupAccessors;
|
|
23
|
+
//# sourceMappingURL=group-accessors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-accessors.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/accessor/group-accessors.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AACrC,uCAAmD;AAInD;;;GAGG;AACH,SAAgB,cAAc,CAAC,SAAgC;IAC9D,MAAM,GAAG,GAA+B,IAAI,GAAG,EAAyB,CAAC;IAEzE,SAAS,CAAC,OAAO,CAAC,CAAC,QAA6B,EAAE,EAAE;QACnD,IAAI,eAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE;YAC5C,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,EAAC,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAC,CAAC,CAAC;SAC7E;QAED,IAAI,eAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE;YAC5C,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,EAAC,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAC,CAAC,CAAC;SAC7E;IACF,CAAC,CAAC,CAAC;IAEH,OAAO,IAAA,cAAO,EAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;AAC9B,CAAC;AAdD,wCAcC"}
|